smart-webcomponents-react 14.2.83 → 14.3.0

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 (376) hide show
  1. package/alertwindow/alertwindow.d.ts +5 -5
  2. package/alertwindow/alertwindow.esm.js +10 -85
  3. package/alertwindow/alertwindow.umd.js +1134 -1209
  4. package/array/array.d.ts +5 -5
  5. package/array/array.esm.js +13 -88
  6. package/array/array.umd.js +752 -827
  7. package/barcode/barcode.d.ts +3 -3
  8. package/barcode/barcode.esm.js +6 -61
  9. package/barcode/barcode.umd.js +311 -366
  10. package/button/dropdownbutton.d.ts +2 -2
  11. package/button/multisplitbutton.d.ts +2 -2
  12. package/calendar/calendar.d.ts +2 -2
  13. package/calendar/calendar.esm.js +4 -49
  14. package/calendar/calendar.umd.js +710 -755
  15. package/card/cardview.d.ts +1 -1
  16. package/cardview/cardview.d.ts +1 -1
  17. package/cardview/cardview.esm.js +2 -37
  18. package/cardview/cardview.umd.js +515 -550
  19. package/chart/chart.d.ts +9 -9
  20. package/chart/chart.esm.js +18 -133
  21. package/chart/chart.umd.js +822 -937
  22. package/chart/ganttchart.d.ts +20 -20
  23. package/combobox/combobox.d.ts +4 -4
  24. package/combobox/combobox.esm.js +8 -73
  25. package/combobox/combobox.umd.js +1341 -1406
  26. package/datetimepicker/datetimepicker.d.ts +1 -1
  27. package/datetimepicker/datetimepicker.esm.js +2 -37
  28. package/datetimepicker/datetimepicker.umd.js +826 -861
  29. package/dialogwindow/dialogwindow.d.ts +5 -5
  30. package/dialogwindow/dialogwindow.esm.js +10 -85
  31. package/dialogwindow/dialogwindow.umd.js +1134 -1209
  32. package/dockinglayout/dockinglayout.d.ts +7 -7
  33. package/dockinglayout/dockinglayout.esm.js +14 -109
  34. package/dockinglayout/dockinglayout.umd.js +765 -860
  35. package/dropdownbutton/dropdownbutton.d.ts +2 -2
  36. package/dropdownbutton/dropdownbutton.esm.js +4 -49
  37. package/dropdownbutton/dropdownbutton.umd.js +527 -572
  38. package/dropdownlist/dropdownlist.d.ts +4 -4
  39. package/dropdownlist/dropdownlist.esm.js +8 -73
  40. package/dropdownlist/dropdownlist.umd.js +1275 -1340
  41. package/editor/editor.d.ts +11 -9
  42. package/editor/editor.esm.js +14 -109
  43. package/editor/editor.umd.js +911 -1006
  44. package/fileupload/fileupload.d.ts +2 -1
  45. package/filterbuilder/filterbuilder.d.ts +1 -1
  46. package/filterbuilder/filterbuilder.esm.js +2 -37
  47. package/filterbuilder/filterbuilder.umd.js +463 -498
  48. package/filterpanel/filterpanel.d.ts +1 -1
  49. package/filterpanel/filterpanel.esm.js +2 -37
  50. package/filterpanel/filterpanel.umd.js +354 -389
  51. package/form/form.d.ts +1 -1
  52. package/form/form.esm.js +4 -49
  53. package/form/form.umd.js +1016 -1061
  54. package/form/formgroup.d.ts +1 -1
  55. package/ganttchart/ganttchart.d.ts +20 -20
  56. package/ganttchart/ganttchart.esm.js +40 -265
  57. package/ganttchart/ganttchart.umd.js +1666 -1891
  58. package/gauge/gauge.d.ts +2 -2
  59. package/gauge/gauge.esm.js +4 -49
  60. package/gauge/gauge.umd.js +664 -709
  61. package/grid/grid.d.ts +56 -51
  62. package/grid/grid.esm.js +96 -460
  63. package/grid/grid.umd.js +2107 -2471
  64. package/index.d.ts +45 -3
  65. package/input/input.d.ts +2 -2
  66. package/input/input.esm.js +4 -49
  67. package/input/input.umd.js +505 -550
  68. package/input/numberinput.d.ts +2 -2
  69. package/input/phoneinput.d.ts +4 -4
  70. package/kanban/kanban.d.ts +6 -6
  71. package/kanban/kanban.esm.js +12 -97
  72. package/kanban/kanban.umd.js +1334 -1419
  73. package/layout/dockinglayout.d.ts +7 -7
  74. package/listbox/listbox.d.ts +5 -5
  75. package/listbox/listbox.esm.js +10 -85
  76. package/listbox/listbox.umd.js +1170 -1245
  77. package/listmenu/listmenu.d.ts +1 -1
  78. package/listmenu/listmenu.esm.js +2 -37
  79. package/listmenu/listmenu.umd.js +1005 -1040
  80. package/menu/listmenu.d.ts +1 -1
  81. package/menu/menu.d.ts +1 -1
  82. package/menu/menu.esm.js +2 -37
  83. package/menu/menu.umd.js +1025 -1060
  84. package/multilinetextbox/multilinetextbox.d.ts +1 -1
  85. package/multilinetextbox/multilinetextbox.esm.js +2 -37
  86. package/multilinetextbox/multilinetextbox.umd.js +907 -942
  87. package/multilinewindow/multilinewindow.d.ts +5 -5
  88. package/multilinewindow/multilinewindow.esm.js +10 -85
  89. package/multilinewindow/multilinewindow.umd.js +1134 -1209
  90. package/multisplitbutton/multisplitbutton.d.ts +2 -2
  91. package/multisplitbutton/multisplitbutton.esm.js +4 -49
  92. package/multisplitbutton/multisplitbutton.umd.js +941 -986
  93. package/numberinput/numberinput.d.ts +2 -2
  94. package/numberinput/numberinput.esm.js +4 -49
  95. package/numberinput/numberinput.umd.js +348 -393
  96. package/numerictextbox/numerictextbox.d.ts +1 -1
  97. package/numerictextbox/numerictextbox.esm.js +2 -37
  98. package/numerictextbox/numerictextbox.umd.js +592 -627
  99. package/package.json +1 -1
  100. package/phoneinput/phoneinput.d.ts +4 -4
  101. package/phoneinput/phoneinput.esm.js +8 -73
  102. package/phoneinput/phoneinput.umd.js +386 -451
  103. package/pivottable/pivottable.d.ts +3 -3
  104. package/pivottable/pivottable.esm.js +6 -61
  105. package/pivottable/pivottable.umd.js +762 -817
  106. package/progresswindow/progresswindow.d.ts +5 -5
  107. package/progresswindow/progresswindow.esm.js +10 -85
  108. package/progresswindow/progresswindow.umd.js +1134 -1209
  109. package/promptwindow/promptwindow.d.ts +5 -5
  110. package/promptwindow/promptwindow.esm.js +10 -85
  111. package/promptwindow/promptwindow.umd.js +1134 -1209
  112. package/qrcode/qrcode.d.ts +3 -3
  113. package/qrcode/qrcode.esm.js +6 -61
  114. package/qrcode/qrcode.umd.js +333 -388
  115. package/querybuilder/querybuilder.d.ts +6 -1
  116. package/querybuilder/querybuilder.esm.js +14 -38
  117. package/querybuilder/querybuilder.umd.js +446 -470
  118. package/rating/rating.d.ts +1 -1
  119. package/rating/rating.esm.js +2 -37
  120. package/rating/rating.umd.js +261 -296
  121. package/scheduler/scheduler.d.ts +17 -17
  122. package/scheduler/scheduler.esm.js +34 -229
  123. package/scheduler/scheduler.umd.js +1782 -1977
  124. package/slider/slider.d.ts +2 -2
  125. package/slider/slider.esm.js +4 -49
  126. package/slider/slider.umd.js +642 -687
  127. package/source/modules/smart.accordion.js +1 -1
  128. package/source/modules/smart.array.js +2 -2
  129. package/source/modules/smart.barcode.js +1 -1
  130. package/source/modules/smart.breadcrumb.js +1 -1
  131. package/source/modules/smart.button.js +1 -1
  132. package/source/modules/smart.buttongroup.js +1 -1
  133. package/source/modules/smart.calendar.js +3 -3
  134. package/source/modules/smart.card.js +1 -1
  135. package/source/modules/smart.cardview.js +4 -4
  136. package/source/modules/smart.carousel.js +1 -1
  137. package/source/modules/smart.chart.js +1 -1
  138. package/source/modules/smart.checkbox.js +1 -1
  139. package/source/modules/smart.checkinput.js +2 -2
  140. package/source/modules/smart.chip.js +1 -1
  141. package/source/modules/smart.colorinput.js +2 -2
  142. package/source/modules/smart.colorpanel.js +2 -2
  143. package/source/modules/smart.colorpicker.js +2 -2
  144. package/source/modules/smart.combobox.js +2 -2
  145. package/source/modules/smart.common.js +1 -1
  146. package/source/modules/smart.countryinput.js +2 -2
  147. package/source/modules/smart.dateinput.js +3 -3
  148. package/source/modules/smart.daterangeinput.js +4 -4
  149. package/source/modules/smart.datetimepicker.js +3 -3
  150. package/source/modules/smart.dockinglayout.js +1 -1
  151. package/source/modules/smart.dropdownbutton.js +1 -1
  152. package/source/modules/smart.dropdownlist.js +2 -2
  153. package/source/modules/smart.editor.js +5 -5
  154. package/source/modules/smart.element.js +1 -1
  155. package/source/modules/smart.fileupload.js +3 -3
  156. package/source/modules/smart.form.js +2 -2
  157. package/source/modules/smart.formulaparser.js +1 -1
  158. package/source/modules/smart.ganttchart.js +5 -5
  159. package/source/modules/smart.gauge.js +1 -1
  160. package/source/modules/smart.grid.js +14 -14
  161. package/source/modules/smart.gridpanel.js +4 -4
  162. package/source/modules/smart.input.js +2 -2
  163. package/source/modules/smart.kanban.js +5 -5
  164. package/source/modules/smart.layout.js +1 -1
  165. package/source/modules/smart.led.js +1 -1
  166. package/source/modules/smart.listbox.js +2 -2
  167. package/source/modules/smart.listmenu.js +1 -1
  168. package/source/modules/smart.map.js +1 -1
  169. package/source/modules/smart.maskedtextbox.js +2 -2
  170. package/source/modules/smart.menu.js +1 -1
  171. package/source/modules/smart.multicomboinput.js +2 -2
  172. package/source/modules/smart.multiinput.js +2 -2
  173. package/source/modules/smart.multilinetextbox.js +2 -2
  174. package/source/modules/smart.multisplitbutton.js +2 -2
  175. package/source/modules/smart.numberinput.js +2 -2
  176. package/source/modules/smart.numerictextbox.js +2 -2
  177. package/source/modules/smart.pager.js +2 -2
  178. package/source/modules/smart.passwordinput.js +2 -2
  179. package/source/modules/smart.passwordtextbox.js +2 -2
  180. package/source/modules/smart.path.js +1 -1
  181. package/source/modules/smart.phoneinput.js +2 -2
  182. package/source/modules/smart.pivottable.js +3 -3
  183. package/source/modules/smart.progressbar.js +1 -1
  184. package/source/modules/smart.qrcode.js +1 -1
  185. package/source/modules/smart.querybuilder.js +5 -5
  186. package/source/modules/smart.radiobutton.js +1 -1
  187. package/source/modules/smart.rating.js +1 -1
  188. package/source/modules/smart.router.js +1 -1
  189. package/source/modules/smart.scheduler.js +4 -4
  190. package/source/modules/smart.scrollbar.js +1 -1
  191. package/source/modules/smart.slider.js +1 -1
  192. package/source/modules/smart.sortable.js +1 -1
  193. package/source/modules/smart.splitter.js +1 -1
  194. package/source/modules/smart.switchbutton.js +1 -1
  195. package/source/modules/smart.table.js +3 -3
  196. package/source/modules/smart.tabs.js +1 -1
  197. package/source/modules/smart.tank.js +1 -1
  198. package/source/modules/smart.textarea.js +2 -2
  199. package/source/modules/smart.textbox.js +2 -2
  200. package/source/modules/smart.timeinput.js +2 -2
  201. package/source/modules/smart.timepicker.js +1 -1
  202. package/source/modules/smart.toast.js +1 -1
  203. package/source/modules/smart.tooltip.js +1 -1
  204. package/source/modules/smart.tree.js +1 -1
  205. package/source/modules/smart.validator.js +1 -1
  206. package/source/modules/smart.window.js +2 -2
  207. package/source/smart.accordion.js +1 -1
  208. package/source/smart.ajax.js +1 -1
  209. package/source/smart.array.js +1 -1
  210. package/source/smart.barcode.js +1 -1
  211. package/source/smart.bootstrap.js +1 -1
  212. package/source/smart.breadcrumb.js +1 -1
  213. package/source/smart.button.js +1 -1
  214. package/source/smart.buttongroup.js +1 -1
  215. package/source/smart.calendar.js +2 -2
  216. package/source/smart.card.js +1 -1
  217. package/source/smart.cardview.js +1 -1
  218. package/source/smart.carousel.js +1 -1
  219. package/source/smart.chart.annotations.js +1 -1
  220. package/source/smart.chart.api.js +1 -1
  221. package/source/smart.chart.core.js +1 -1
  222. package/source/smart.chart.js +1 -1
  223. package/source/smart.chart.rangeselector.js +1 -1
  224. package/source/smart.chart.waterfall.js +1 -1
  225. package/source/smart.checkbox.js +1 -1
  226. package/source/smart.checkinput.js +1 -1
  227. package/source/smart.chip.js +1 -1
  228. package/source/smart.colorinput.js +1 -1
  229. package/source/smart.colorpanel.js +1 -1
  230. package/source/smart.colorpicker.js +1 -1
  231. package/source/smart.combobox.js +1 -1
  232. package/source/smart.complex.js +1 -1
  233. package/source/smart.core.js +1 -1
  234. package/source/smart.countryinput.js +1 -1
  235. package/source/smart.data.js +1 -1
  236. package/source/smart.date.js +1 -1
  237. package/source/smart.dateformatpanel.js +1 -1
  238. package/source/smart.dateinput.js +1 -1
  239. package/source/smart.daterangeinput.js +1 -1
  240. package/source/smart.datetimepicker.js +1 -1
  241. package/source/smart.dockinglayout.js +1 -1
  242. package/source/smart.draw.js +1 -1
  243. package/source/smart.dropdownbutton.js +1 -1
  244. package/source/smart.dropdownlist.js +1 -1
  245. package/source/smart.editor.js +2 -2
  246. package/source/smart.element.js +1 -1
  247. package/source/smart.elements.js +17 -17
  248. package/source/smart.export.js +1 -1
  249. package/source/smart.fileupload.js +2 -2
  250. package/source/smart.filter.js +1 -1
  251. package/source/smart.filterbuilder.js +2 -2
  252. package/source/smart.filterpanel.js +1 -1
  253. package/source/smart.form.js +1 -1
  254. package/source/smart.format.js +1 -1
  255. package/source/smart.formulaparser.js +1 -1
  256. package/source/smart.ganttchart.js +2 -2
  257. package/source/smart.gauge.js +1 -1
  258. package/source/smart.grid.cell.js +2 -2
  259. package/source/smart.grid.chart.js +1 -1
  260. package/source/smart.grid.column.js +1 -1
  261. package/source/smart.grid.core.js +2 -2
  262. package/source/smart.grid.dialog.js +2 -2
  263. package/source/smart.grid.edit.js +2 -2
  264. package/source/smart.grid.export.js +1 -1
  265. package/source/smart.grid.filter.js +1 -1
  266. package/source/smart.grid.group.js +1 -1
  267. package/source/smart.grid.js +1 -1
  268. package/source/smart.grid.menu.js +2 -2
  269. package/source/smart.grid.pager.js +1 -1
  270. package/source/smart.grid.reorder.js +1 -1
  271. package/source/smart.grid.resize.js +2 -2
  272. package/source/smart.grid.row.js +1 -1
  273. package/source/smart.grid.select.js +2 -2
  274. package/source/smart.grid.sort.js +1 -1
  275. package/source/smart.grid.toolbar.js +2 -2
  276. package/source/smart.grid.tree.js +1 -1
  277. package/source/smart.grid.view.js +2 -2
  278. package/source/smart.gridpanel.js +1 -1
  279. package/source/smart.input.js +2 -2
  280. package/source/smart.kanban.js +2 -2
  281. package/source/smart.layout.js +1 -1
  282. package/source/smart.led.js +1 -1
  283. package/source/smart.listbox.js +2 -2
  284. package/source/smart.listmenu.js +1 -1
  285. package/source/smart.map.js +1 -1
  286. package/source/smart.maskedtextbox.js +1 -1
  287. package/source/smart.math.js +1 -1
  288. package/source/smart.menu.js +1 -1
  289. package/source/smart.multicomboinput.js +1 -1
  290. package/source/smart.multiinput.js +1 -1
  291. package/source/smart.multilinetextbox.js +1 -1
  292. package/source/smart.multisplitbutton.js +1 -1
  293. package/source/smart.numberformatpanel.js +1 -1
  294. package/source/smart.numberinput.js +1 -1
  295. package/source/smart.numeric.js +1 -1
  296. package/source/smart.numerictextbox.js +1 -1
  297. package/source/smart.pager.js +1 -1
  298. package/source/smart.passwordinput.js +1 -1
  299. package/source/smart.passwordtextbox.js +1 -1
  300. package/source/smart.path.js +1 -1
  301. package/source/smart.phoneinput.js +1 -1
  302. package/source/smart.pivottable.js +1 -1
  303. package/source/smart.powerbutton.js +1 -1
  304. package/source/smart.progressbar.js +1 -1
  305. package/source/smart.qrcode.js +1 -1
  306. package/source/smart.radiobutton.js +1 -1
  307. package/source/smart.rating.js +1 -1
  308. package/source/smart.router.js +1 -1
  309. package/source/smart.scheduler.js +1 -1
  310. package/source/smart.scrollbar.js +1 -1
  311. package/source/smart.slider.js +1 -1
  312. package/source/smart.sortable.js +1 -1
  313. package/source/smart.splitter.js +1 -1
  314. package/source/smart.switchbutton.js +1 -1
  315. package/source/smart.table.js +1 -1
  316. package/source/smart.tabs.js +1 -1
  317. package/source/smart.tank.js +1 -1
  318. package/source/smart.textarea.js +1 -1
  319. package/source/smart.textbox.js +1 -1
  320. package/source/smart.tickintervalhandler.js +1 -1
  321. package/source/smart.timeinput.js +1 -1
  322. package/source/smart.timepicker.js +1 -1
  323. package/source/smart.toast.js +1 -1
  324. package/source/smart.tooltip.js +1 -1
  325. package/source/smart.tree.js +1 -1
  326. package/source/smart.validationpanel.js +1 -1
  327. package/source/smart.validator.js +1 -1
  328. package/source/smart.window.js +1 -1
  329. package/source/styles/components/smart.grid.css +1 -1
  330. package/source/styles/default/scss/smart.grid.scss +10 -3
  331. package/source/styles/default/smart.grid.css +7 -3
  332. package/source/styles/smart.default.css +1 -1
  333. package/source/typescript/smart.editor.d.ts +4 -2
  334. package/source/typescript/smart.elements.d.ts +45 -3
  335. package/source/typescript/smart.fileupload.d.ts +2 -1
  336. package/source/typescript/smart.grid.d.ts +34 -0
  337. package/source/typescript/smart.querybuilder.d.ts +5 -0
  338. package/splitter/splitter.d.ts +3 -3
  339. package/splitter/splitter.esm.js +6 -61
  340. package/splitter/splitter.umd.js +901 -956
  341. package/table/pivottable.d.ts +3 -3
  342. package/table/table.d.ts +7 -7
  343. package/table/table.esm.js +14 -109
  344. package/table/table.umd.js +1278 -1373
  345. package/tabs/tabs.d.ts +4 -4
  346. package/tabs/tabs.esm.js +8 -73
  347. package/tabs/tabs.umd.js +875 -940
  348. package/tabs/tabswindow.d.ts +5 -5
  349. package/tabswindow/tabswindow.d.ts +5 -5
  350. package/tabswindow/tabswindow.esm.js +10 -85
  351. package/tabswindow/tabswindow.umd.js +1134 -1209
  352. package/tank/tank.d.ts +2 -2
  353. package/tank/tank.esm.js +4 -49
  354. package/tank/tank.umd.js +598 -643
  355. package/textbox/multilinetextbox.d.ts +1 -1
  356. package/textbox/numerictextbox.d.ts +1 -1
  357. package/timepicker/datetimepicker.d.ts +1 -1
  358. package/toast/toast.d.ts +1 -1
  359. package/toast/toast.esm.js +2 -37
  360. package/toast/toast.umd.js +397 -432
  361. package/tree/tree.d.ts +4 -4
  362. package/tree/tree.esm.js +8 -73
  363. package/tree/tree.umd.js +1310 -1375
  364. package/waitwindow/waitwindow.d.ts +5 -5
  365. package/waitwindow/waitwindow.esm.js +10 -85
  366. package/waitwindow/waitwindow.umd.js +1134 -1209
  367. package/window/alertwindow.d.ts +5 -5
  368. package/window/dialogwindow.d.ts +5 -5
  369. package/window/multilinewindow.d.ts +5 -5
  370. package/window/progresswindow.d.ts +5 -5
  371. package/window/promptwindow.d.ts +5 -5
  372. package/window/tabswindow.d.ts +5 -5
  373. package/window/waitwindow.d.ts +5 -5
  374. package/window/window.d.ts +5 -5
  375. package/window/window.esm.js +10 -85
  376. package/window/window.umd.js +1134 -1209
package/tabs/tabs.umd.js CHANGED
@@ -2,952 +2,887 @@
2
2
  require('../source/modules/smart.tabs');
3
3
 
4
4
  (function (global, factory) {
5
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
6
- typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) :
7
- (factory((global.tabs = {}),global.React));
5
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
6
+ typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) :
7
+ (factory((global.tabs = {}),global.React));
8
8
  }(this, (function (exports,React) { 'use strict';
9
9
 
10
- React = React && React.hasOwnProperty('default') ? React['default'] : React;
10
+ React = React && React.hasOwnProperty('default') ? React['default'] : React;
11
11
 
12
- /*! *****************************************************************************
13
- Copyright (c) Microsoft Corporation. All rights reserved.
14
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use
15
- this file except in compliance with the License. You may obtain a copy of the
16
- License at http://www.apache.org/licenses/LICENSE-2.0
17
-
18
- THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
19
- KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
20
- WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
21
- MERCHANTABLITY OR NON-INFRINGEMENT.
22
-
23
- See the Apache Version 2.0 License for specific language governing permissions
24
- and limitations under the License.
25
- ***************************************************************************** */
26
-
27
- function __awaiter(thisArg, _arguments, P, generator) {
28
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
29
- return new (P || (P = Promise))(function (resolve, reject) {
30
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
31
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
32
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
33
- step((generator = generator.apply(thisArg, _arguments || [])).next());
34
- });
35
- }
12
+ const Smart = window.Smart;
13
+ /**
14
+ Defines a tab item.
15
+ */
16
+ class TabItem extends React.Component {
17
+ constructor(props) {
18
+ super(props);
19
+ this.componentRef = React.createRef();
20
+ }
21
+ // Gets the id of the React component.
22
+ get id() {
23
+ if (!this._id) {
24
+ this._id = 'TabItem' + Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
25
+ }
26
+ return this._id;
27
+ }
28
+ /** Tab item close button state
29
+ * Property type: boolean
30
+ */
31
+ get closeButtonHidden() {
32
+ return this.nativeElement ? this.nativeElement.closeButtonHidden : undefined;
33
+ }
34
+ set closeButtonHidden(value) {
35
+ if (this.nativeElement) {
36
+ this.nativeElement.closeButtonHidden = value;
37
+ }
38
+ }
39
+ /** Disables the Tab item
40
+ * Property type: boolean
41
+ */
42
+ get disabled() {
43
+ return this.nativeElement ? this.nativeElement.disabled : undefined;
44
+ }
45
+ set disabled(value) {
46
+ if (this.nativeElement) {
47
+ this.nativeElement.disabled = value;
48
+ }
49
+ }
50
+ /** Tab item index
51
+ * Property type: number
52
+ */
53
+ get index() {
54
+ return this.nativeElement ? this.nativeElement.index : undefined;
55
+ }
56
+ set index(value) {
57
+ if (this.nativeElement) {
58
+ this.nativeElement.index = value;
59
+ }
60
+ }
61
+ /** Tab item selected state
62
+ * Property type: boolean
63
+ */
64
+ get selected() {
65
+ return this.nativeElement ? this.nativeElement.selected : undefined;
66
+ }
67
+ set selected(value) {
68
+ if (this.nativeElement) {
69
+ this.nativeElement.selected = value;
70
+ }
71
+ }
72
+ /** Tab item label
73
+ * Property type: string
74
+ */
75
+ get label() {
76
+ return this.nativeElement ? this.nativeElement.label : undefined;
77
+ }
78
+ set label(value) {
79
+ if (this.nativeElement) {
80
+ this.nativeElement.label = value;
81
+ }
82
+ }
83
+ /** Tab item content
84
+ * Property type: number
85
+ */
86
+ get labelSize() {
87
+ return this.nativeElement ? this.nativeElement.labelSize : undefined;
88
+ }
89
+ set labelSize(value) {
90
+ if (this.nativeElement) {
91
+ this.nativeElement.labelSize = value;
92
+ }
93
+ }
94
+ // Gets the properties of the React component.
95
+ get properties() {
96
+ return ["closeButtonHidden", "disabled", "index", "selected", "label", "content", "labelSize"];
97
+ }
98
+ // Gets the events of the React component.
99
+ get eventListeners() {
100
+ return ["onCreate", "onReady"];
101
+ }
102
+ componentDidRender(initialize) {
103
+ const that = this;
104
+ const props = {};
105
+ const events = {};
106
+ let styles = null;
107
+ for (let prop in that.props) {
108
+ if (prop === 'children') {
109
+ continue;
110
+ }
111
+ if (prop === 'style') {
112
+ styles = that.props[prop];
113
+ continue;
114
+ }
115
+ if (prop.startsWith('on') && that.properties.indexOf(prop) === -1) {
116
+ events[prop] = that.props[prop];
117
+ continue;
118
+ }
119
+ props[prop] = that.props[prop];
120
+ }
121
+ if (initialize) {
122
+ that.nativeElement = this.componentRef.current;
123
+ }
124
+ for (let prop in props) {
125
+ if (prop === 'class' || prop === 'className') {
126
+ const classNames = props[prop].trim().split(' ');
127
+ for (let className in classNames) {
128
+ if (!that.nativeElement.classList.contains(classNames[className]) && classNames[className] !== "") {
129
+ that.nativeElement.classList.add(classNames[className]);
130
+ }
131
+ }
132
+ continue;
133
+ }
134
+ if (props[prop] !== that.nativeElement[prop]) {
135
+ const normalizeProp = (str) => {
136
+ return str.replace(/-([a-z])/g, function (g) {
137
+ return g[1].toUpperCase();
138
+ });
139
+ };
140
+ if (prop === 'hover' || prop === 'active' || prop === 'focus' || prop === 'selected') {
141
+ that.nativeElement.setAttribute(prop, '');
142
+ }
143
+ const normalizedProp = normalizeProp(prop);
144
+ that.nativeElement[normalizedProp] = props[prop];
145
+ }
146
+ }
147
+ for (let eventName in events) {
148
+ that[eventName] = events[eventName];
149
+ that.nativeElement[eventName.toLowerCase()] = events[eventName];
150
+ }
151
+ if (initialize) {
152
+ if (that.onCreate) {
153
+ that.onCreate();
154
+ }
155
+ that.nativeElement.whenRendered(() => {
156
+ if (that.onReady) {
157
+ that.onReady();
158
+ }
159
+ });
160
+ }
161
+ // setup styles.
162
+ if (styles) {
163
+ for (let styleName in styles) {
164
+ that.nativeElement.style[styleName] = styles[styleName];
165
+ }
166
+ }
167
+ }
168
+ componentDidMount() {
169
+ this.componentDidRender(true);
170
+ }
171
+ componentDidUpdate() {
172
+ this.componentDidRender(false);
173
+ }
174
+ componentWillUnmount() {
175
+ const that = this;
176
+ if (!that.nativeElement) {
177
+ return;
178
+ }
179
+ that.nativeElement.whenRenderedCallbacks = [];
180
+ for (let i = 0; i < that.eventListeners.length; i++) {
181
+ const eventName = that.eventListeners[i];
182
+ that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
183
+ }
184
+ }
185
+ render() {
186
+ return (React.createElement("smart-tab-item", { ref: this.componentRef }, this.props.children));
187
+ }
188
+ }
36
189
 
37
- const Smart = window.Smart;
38
- /**
39
- Defines a tab item.
40
- */
41
- class TabItem extends React.Component {
42
- constructor(props) {
43
- super(props);
44
- this.componentRef = React.createRef();
45
- }
46
- // Gets the id of the React component.
47
- get id() {
48
- if (!this._id) {
49
- this._id = 'TabItem' + Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
50
- }
51
- return this._id;
52
- }
53
- /** Tab item close button state
54
- * Property type: boolean
55
- */
56
- get closeButtonHidden() {
57
- return this.nativeElement ? this.nativeElement.closeButtonHidden : undefined;
58
- }
59
- set closeButtonHidden(value) {
60
- if (this.nativeElement) {
61
- this.nativeElement.closeButtonHidden = value;
62
- }
63
- }
64
- /** Disables the Tab item
65
- * Property type: boolean
66
- */
67
- get disabled() {
68
- return this.nativeElement ? this.nativeElement.disabled : undefined;
69
- }
70
- set disabled(value) {
71
- if (this.nativeElement) {
72
- this.nativeElement.disabled = value;
73
- }
74
- }
75
- /** Tab item index
76
- * Property type: number
77
- */
78
- get index() {
79
- return this.nativeElement ? this.nativeElement.index : undefined;
80
- }
81
- set index(value) {
82
- if (this.nativeElement) {
83
- this.nativeElement.index = value;
84
- }
85
- }
86
- /** Tab item selected state
87
- * Property type: boolean
88
- */
89
- get selected() {
90
- return this.nativeElement ? this.nativeElement.selected : undefined;
91
- }
92
- set selected(value) {
93
- if (this.nativeElement) {
94
- this.nativeElement.selected = value;
95
- }
96
- }
97
- /** Tab item label
98
- * Property type: string
99
- */
100
- get label() {
101
- return this.nativeElement ? this.nativeElement.label : undefined;
102
- }
103
- set label(value) {
104
- if (this.nativeElement) {
105
- this.nativeElement.label = value;
106
- }
107
- }
108
- /** Tab item content
109
- * Property type: number
110
- */
111
- get labelSize() {
112
- return this.nativeElement ? this.nativeElement.labelSize : undefined;
113
- }
114
- set labelSize(value) {
115
- if (this.nativeElement) {
116
- this.nativeElement.labelSize = value;
117
- }
118
- }
119
- // Gets the properties of the React component.
120
- get properties() {
121
- return ["closeButtonHidden", "disabled", "index", "selected", "label", "content", "labelSize"];
122
- }
123
- // Gets the events of the React component.
124
- get eventListeners() {
125
- return ["onCreate", "onReady"];
126
- }
127
- componentDidRender(initialize) {
128
- const that = this;
129
- const props = {};
130
- const events = {};
131
- let styles = null;
132
- for (let prop in that.props) {
133
- if (prop === 'children') {
134
- continue;
135
- }
136
- if (prop === 'style') {
137
- styles = that.props[prop];
138
- continue;
139
- }
140
- if (prop.startsWith('on') && that.properties.indexOf(prop) === -1) {
141
- events[prop] = that.props[prop];
142
- continue;
143
- }
144
- props[prop] = that.props[prop];
145
- }
146
- if (initialize) {
147
- that.nativeElement = this.componentRef.current;
148
- }
149
- for (let prop in props) {
150
- if (prop === 'class' || prop === 'className') {
151
- const classNames = props[prop].trim().split(' ');
152
- for (let className in classNames) {
153
- if (!that.nativeElement.classList.contains(classNames[className]) && classNames[className] !== "") {
154
- that.nativeElement.classList.add(classNames[className]);
155
- }
156
- }
157
- continue;
158
- }
159
- if (props[prop] !== that.nativeElement[prop]) {
160
- const normalizeProp = (str) => {
161
- return str.replace(/-([a-z])/g, function (g) {
162
- return g[1].toUpperCase();
163
- });
164
- };
165
- if (prop === 'hover' || prop === 'active' || prop === 'focus' || prop === 'selected') {
166
- that.nativeElement.setAttribute(prop, '');
167
- }
168
- const normalizedProp = normalizeProp(prop);
169
- that.nativeElement[normalizedProp] = props[prop];
170
- }
171
- }
172
- for (let eventName in events) {
173
- that[eventName] = events[eventName];
174
- that.nativeElement[eventName.toLowerCase()] = events[eventName];
175
- }
176
- if (initialize) {
177
- if (that.onCreate) {
178
- that.onCreate();
179
- }
180
- that.nativeElement.whenRendered(() => {
181
- if (that.onReady) {
182
- that.onReady();
183
- }
184
- });
185
- }
186
- // setup styles.
187
- if (styles) {
188
- for (let styleName in styles) {
189
- that.nativeElement.style[styleName] = styles[styleName];
190
- }
191
- }
192
- }
193
- componentDidMount() {
194
- this.componentDidRender(true);
195
- }
196
- componentDidUpdate() {
197
- this.componentDidRender(false);
198
- }
199
- componentWillUnmount() {
200
- const that = this;
201
- if (!that.nativeElement) {
202
- return;
203
- }
204
- that.nativeElement.whenRenderedCallbacks = [];
205
- for (let i = 0; i < that.eventListeners.length; i++) {
206
- const eventName = that.eventListeners[i];
207
- that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
208
- }
209
- }
210
- render() {
211
- return (React.createElement("smart-tab-item", { ref: this.componentRef }, this.props.children));
212
- }
213
- }
190
+ const Smart$1 = window.Smart;
191
+ /**
192
+ Defines a group of tab items.
193
+ */
194
+ class TabItemsGroup extends React.Component {
195
+ constructor(props) {
196
+ super(props);
197
+ this.componentRef = React.createRef();
198
+ }
199
+ // Gets the id of the React component.
200
+ get id() {
201
+ if (!this._id) {
202
+ this._id = 'TabItemsGroup' + Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
203
+ }
204
+ return this._id;
205
+ }
206
+ /**
207
+ * Property type: string
208
+ */
209
+ get label() {
210
+ return this.nativeElement ? this.nativeElement.label : undefined;
211
+ }
212
+ set label(value) {
213
+ if (this.nativeElement) {
214
+ this.nativeElement.label = value;
215
+ }
216
+ }
217
+ /**
218
+ * Property type: number
219
+ */
220
+ get labelSize() {
221
+ return this.nativeElement ? this.nativeElement.labelSize : undefined;
222
+ }
223
+ set labelSize(value) {
224
+ if (this.nativeElement) {
225
+ this.nativeElement.labelSize = value;
226
+ }
227
+ }
228
+ // Gets the properties of the React component.
229
+ get properties() {
230
+ return ["label", "labelSize"];
231
+ }
232
+ // Gets the events of the React component.
233
+ get eventListeners() {
234
+ return ["onCreate", "onReady"];
235
+ }
236
+ componentDidRender(initialize) {
237
+ const that = this;
238
+ const props = {};
239
+ const events = {};
240
+ let styles = null;
241
+ for (let prop in that.props) {
242
+ if (prop === 'children') {
243
+ continue;
244
+ }
245
+ if (prop === 'style') {
246
+ styles = that.props[prop];
247
+ continue;
248
+ }
249
+ if (prop.startsWith('on') && that.properties.indexOf(prop) === -1) {
250
+ events[prop] = that.props[prop];
251
+ continue;
252
+ }
253
+ props[prop] = that.props[prop];
254
+ }
255
+ if (initialize) {
256
+ that.nativeElement = this.componentRef.current;
257
+ }
258
+ for (let prop in props) {
259
+ if (prop === 'class' || prop === 'className') {
260
+ const classNames = props[prop].trim().split(' ');
261
+ for (let className in classNames) {
262
+ if (!that.nativeElement.classList.contains(classNames[className]) && classNames[className] !== "") {
263
+ that.nativeElement.classList.add(classNames[className]);
264
+ }
265
+ }
266
+ continue;
267
+ }
268
+ if (props[prop] !== that.nativeElement[prop]) {
269
+ const normalizeProp = (str) => {
270
+ return str.replace(/-([a-z])/g, function (g) {
271
+ return g[1].toUpperCase();
272
+ });
273
+ };
274
+ if (prop === 'hover' || prop === 'active' || prop === 'focus' || prop === 'selected') {
275
+ that.nativeElement.setAttribute(prop, '');
276
+ }
277
+ const normalizedProp = normalizeProp(prop);
278
+ that.nativeElement[normalizedProp] = props[prop];
279
+ }
280
+ }
281
+ for (let eventName in events) {
282
+ that[eventName] = events[eventName];
283
+ that.nativeElement[eventName.toLowerCase()] = events[eventName];
284
+ }
285
+ if (initialize) {
286
+ if (that.onCreate) {
287
+ that.onCreate();
288
+ }
289
+ that.nativeElement.whenRendered(() => {
290
+ if (that.onReady) {
291
+ that.onReady();
292
+ }
293
+ });
294
+ }
295
+ // setup styles.
296
+ if (styles) {
297
+ for (let styleName in styles) {
298
+ that.nativeElement.style[styleName] = styles[styleName];
299
+ }
300
+ }
301
+ }
302
+ componentDidMount() {
303
+ this.componentDidRender(true);
304
+ }
305
+ componentDidUpdate() {
306
+ this.componentDidRender(false);
307
+ }
308
+ componentWillUnmount() {
309
+ const that = this;
310
+ if (!that.nativeElement) {
311
+ return;
312
+ }
313
+ that.nativeElement.whenRenderedCallbacks = [];
314
+ for (let i = 0; i < that.eventListeners.length; i++) {
315
+ const eventName = that.eventListeners[i];
316
+ that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
317
+ }
318
+ }
319
+ render() {
320
+ return (React.createElement("smart-tab-items-group", { ref: this.componentRef }, this.props.children));
321
+ }
322
+ }
214
323
 
215
- const Smart$1 = window.Smart;
216
- /**
217
- Defines a group of tab items.
218
- */
219
- class TabItemsGroup extends React.Component {
220
- constructor(props) {
221
- super(props);
222
- this.componentRef = React.createRef();
223
- }
224
- // Gets the id of the React component.
225
- get id() {
226
- if (!this._id) {
227
- this._id = 'TabItemsGroup' + Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
228
- }
229
- return this._id;
230
- }
231
- /**
232
- * Property type: string
233
- */
234
- get label() {
235
- return this.nativeElement ? this.nativeElement.label : undefined;
236
- }
237
- set label(value) {
238
- if (this.nativeElement) {
239
- this.nativeElement.label = value;
240
- }
241
- }
242
- /**
243
- * Property type: number
244
- */
245
- get labelSize() {
246
- return this.nativeElement ? this.nativeElement.labelSize : undefined;
247
- }
248
- set labelSize(value) {
249
- if (this.nativeElement) {
250
- this.nativeElement.labelSize = value;
251
- }
252
- }
253
- // Gets the properties of the React component.
254
- get properties() {
255
- return ["label", "labelSize"];
256
- }
257
- // Gets the events of the React component.
258
- get eventListeners() {
259
- return ["onCreate", "onReady"];
260
- }
261
- componentDidRender(initialize) {
262
- const that = this;
263
- const props = {};
264
- const events = {};
265
- let styles = null;
266
- for (let prop in that.props) {
267
- if (prop === 'children') {
268
- continue;
269
- }
270
- if (prop === 'style') {
271
- styles = that.props[prop];
272
- continue;
273
- }
274
- if (prop.startsWith('on') && that.properties.indexOf(prop) === -1) {
275
- events[prop] = that.props[prop];
276
- continue;
277
- }
278
- props[prop] = that.props[prop];
279
- }
280
- if (initialize) {
281
- that.nativeElement = this.componentRef.current;
282
- }
283
- for (let prop in props) {
284
- if (prop === 'class' || prop === 'className') {
285
- const classNames = props[prop].trim().split(' ');
286
- for (let className in classNames) {
287
- if (!that.nativeElement.classList.contains(classNames[className]) && classNames[className] !== "") {
288
- that.nativeElement.classList.add(classNames[className]);
289
- }
290
- }
291
- continue;
292
- }
293
- if (props[prop] !== that.nativeElement[prop]) {
294
- const normalizeProp = (str) => {
295
- return str.replace(/-([a-z])/g, function (g) {
296
- return g[1].toUpperCase();
297
- });
298
- };
299
- if (prop === 'hover' || prop === 'active' || prop === 'focus' || prop === 'selected') {
300
- that.nativeElement.setAttribute(prop, '');
301
- }
302
- const normalizedProp = normalizeProp(prop);
303
- that.nativeElement[normalizedProp] = props[prop];
304
- }
305
- }
306
- for (let eventName in events) {
307
- that[eventName] = events[eventName];
308
- that.nativeElement[eventName.toLowerCase()] = events[eventName];
309
- }
310
- if (initialize) {
311
- if (that.onCreate) {
312
- that.onCreate();
313
- }
314
- that.nativeElement.whenRendered(() => {
315
- if (that.onReady) {
316
- that.onReady();
317
- }
318
- });
319
- }
320
- // setup styles.
321
- if (styles) {
322
- for (let styleName in styles) {
323
- that.nativeElement.style[styleName] = styles[styleName];
324
- }
325
- }
326
- }
327
- componentDidMount() {
328
- this.componentDidRender(true);
329
- }
330
- componentDidUpdate() {
331
- this.componentDidRender(false);
332
- }
333
- componentWillUnmount() {
334
- const that = this;
335
- if (!that.nativeElement) {
336
- return;
337
- }
338
- that.nativeElement.whenRenderedCallbacks = [];
339
- for (let i = 0; i < that.eventListeners.length; i++) {
340
- const eventName = that.eventListeners[i];
341
- that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
342
- }
343
- }
344
- render() {
345
- return (React.createElement("smart-tab-items-group", { ref: this.componentRef }, this.props.children));
346
- }
347
- }
324
+ const Smart$2 = window.Smart;
325
+ /**
326
+ Tabs organize content across different screens, data sets, and other interactions. Tabs can be paired with components like top app bars. Tabs can be displayed horizontally or vertically.
327
+ */
328
+ class Tabs extends React.Component {
329
+ constructor(props) {
330
+ super(props);
331
+ this.componentRef = React.createRef();
332
+ }
333
+ // Gets the id of the React component.
334
+ get id() {
335
+ if (!this._id) {
336
+ this._id = 'Tabs' + Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
337
+ }
338
+ return this._id;
339
+ }
340
+ /** Sets or gets whether the "Add new tab" button (+) is displayed.
341
+ * Property type: boolean
342
+ */
343
+ get addNewTab() {
344
+ return this.nativeElement ? this.nativeElement.addNewTab : undefined;
345
+ }
346
+ set addNewTab(value) {
347
+ if (this.nativeElement) {
348
+ this.nativeElement.addNewTab = value;
349
+ }
350
+ }
351
+ /** Allows toggle. If set to true, **selectedIndex** can be set to null (no selected tab).
352
+ * Property type: boolean
353
+ */
354
+ get allowToggle() {
355
+ return this.nativeElement ? this.nativeElement.allowToggle : undefined;
356
+ }
357
+ set allowToggle(value) {
358
+ if (this.nativeElement) {
359
+ this.nativeElement.allowToggle = value;
360
+ }
361
+ }
362
+ /** Sets or gets the animation mode. Animation is disabled when the property is set to 'none'
363
+ * Property type: Animation | string
364
+ */
365
+ get animation() {
366
+ return this.nativeElement ? this.nativeElement.animation : undefined;
367
+ }
368
+ set animation(value) {
369
+ if (this.nativeElement) {
370
+ this.nativeElement.animation = value;
371
+ }
372
+ }
373
+ /** Sets or gets the close button mode.
374
+ * Property type: TabsCloseButtonMode | string
375
+ */
376
+ get closeButtonMode() {
377
+ return this.nativeElement ? this.nativeElement.closeButtonMode : undefined;
378
+ }
379
+ set closeButtonMode(value) {
380
+ if (this.nativeElement) {
381
+ this.nativeElement.closeButtonMode = value;
382
+ }
383
+ }
384
+ /** Sets or gets whether close buttons are displayed.
385
+ * Property type: boolean
386
+ */
387
+ get closeButtons() {
388
+ return this.nativeElement ? this.nativeElement.closeButtons : undefined;
389
+ }
390
+ set closeButtons(value) {
391
+ if (this.nativeElement) {
392
+ this.nativeElement.closeButtons = value;
393
+ }
394
+ }
395
+ /** Sets or gets whether the Tabs content section is collapsed.
396
+ * Property type: boolean
397
+ */
398
+ get collapsed() {
399
+ return this.nativeElement ? this.nativeElement.collapsed : undefined;
400
+ }
401
+ set collapsed(value) {
402
+ if (this.nativeElement) {
403
+ this.nativeElement.collapsed = value;
404
+ }
405
+ }
406
+ /** Enables or disables the collapsible feature.
407
+ * Property type: boolean
408
+ */
409
+ get collapsible() {
410
+ return this.nativeElement ? this.nativeElement.collapsible : undefined;
411
+ }
412
+ set collapsible(value) {
413
+ if (this.nativeElement) {
414
+ this.nativeElement.collapsible = value;
415
+ }
416
+ }
417
+ /** Determines the data source that will be loaded to the Tabs.
418
+ * Property type: any
419
+ */
420
+ get dataSource() {
421
+ return this.nativeElement ? this.nativeElement.dataSource : undefined;
422
+ }
423
+ set dataSource(value) {
424
+ if (this.nativeElement) {
425
+ this.nativeElement.dataSource = value;
426
+ }
427
+ }
428
+ /** Enables or disables the element.
429
+ * Property type: boolean
430
+ */
431
+ get disabled() {
432
+ return this.nativeElement ? this.nativeElement.disabled : undefined;
433
+ }
434
+ set disabled(value) {
435
+ if (this.nativeElement) {
436
+ this.nativeElement.disabled = value;
437
+ }
438
+ }
439
+ /** Enables or disables scrolling using the mouse wheel through overflowing tab labels in the tab strip.
440
+ * Property type: boolean
441
+ */
442
+ get enableMouseWheelAction() {
443
+ return this.nativeElement ? this.nativeElement.enableMouseWheelAction : undefined;
444
+ }
445
+ set enableMouseWheelAction(value) {
446
+ if (this.nativeElement) {
447
+ this.nativeElement.enableMouseWheelAction = value;
448
+ }
449
+ }
450
+ /** Sets or gets the locale. Used in conjunction with the property messages.
451
+ * Property type: string
452
+ */
453
+ get locale() {
454
+ return this.nativeElement ? this.nativeElement.locale : undefined;
455
+ }
456
+ set locale(value) {
457
+ if (this.nativeElement) {
458
+ this.nativeElement.locale = value;
459
+ }
460
+ }
461
+ /** Callback, related to localization module.
462
+ * Property type: any
463
+ */
464
+ get localizeFormatFunction() {
465
+ return this.nativeElement ? this.nativeElement.localizeFormatFunction : undefined;
466
+ }
467
+ set localizeFormatFunction(value) {
468
+ if (this.nativeElement) {
469
+ this.nativeElement.localizeFormatFunction = value;
470
+ }
471
+ }
472
+ /** Sets or gets an object specifying strings used in the widget that can be localized. Used in conjunction with the property locale.
473
+ * Property type: any
474
+ */
475
+ get messages() {
476
+ return this.nativeElement ? this.nativeElement.messages : undefined;
477
+ }
478
+ set messages(value) {
479
+ if (this.nativeElement) {
480
+ this.nativeElement.messages = value;
481
+ }
482
+ }
483
+ /** Sets or gets the widget's name.
484
+ * Property type: string
485
+ */
486
+ get name() {
487
+ return this.nativeElement ? this.nativeElement.name : undefined;
488
+ }
489
+ set name(value) {
490
+ if (this.nativeElement) {
491
+ this.nativeElement.name = value;
492
+ }
493
+ }
494
+ /** Sets or gets the Tabs scroll buttons behavior. Applicable only when tabLayout is 'scroll'.
495
+ * Property type: Overflow | string
496
+ */
497
+ get overflow() {
498
+ return this.nativeElement ? this.nativeElement.overflow : undefined;
499
+ }
500
+ set overflow(value) {
501
+ if (this.nativeElement) {
502
+ this.nativeElement.overflow = value;
503
+ }
504
+ }
505
+ /** Disables user interaction with the element.
506
+ * Property type: boolean
507
+ */
508
+ get readonly() {
509
+ return this.nativeElement ? this.nativeElement.readonly : undefined;
510
+ }
511
+ set readonly(value) {
512
+ if (this.nativeElement) {
513
+ this.nativeElement.readonly = value;
514
+ }
515
+ }
516
+ /** Enables or disables the reorder feature. When this feature is enabled, the end-user can drag a tab and drop it over another tab. As a result the tabs will be reordered.
517
+ * Property type: boolean
518
+ */
519
+ get reorder() {
520
+ return this.nativeElement ? this.nativeElement.reorder : undefined;
521
+ }
522
+ set reorder(value) {
523
+ if (this.nativeElement) {
524
+ this.nativeElement.reorder = value;
525
+ }
526
+ }
527
+ /** Sets or gets whether tab labels can be resized by dragging with the mouse.
528
+ * Property type: boolean
529
+ */
530
+ get resize() {
531
+ return this.nativeElement ? this.nativeElement.resize : undefined;
532
+ }
533
+ set resize(value) {
534
+ if (this.nativeElement) {
535
+ this.nativeElement.resize = value;
536
+ }
537
+ }
538
+ /** Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts.
539
+ * Property type: boolean
540
+ */
541
+ get rightToLeft() {
542
+ return this.nativeElement ? this.nativeElement.rightToLeft : undefined;
543
+ }
544
+ set rightToLeft(value) {
545
+ if (this.nativeElement) {
546
+ this.nativeElement.rightToLeft = value;
547
+ }
548
+ }
549
+ /** Sets or gets the position of the scroll buttons.
550
+ * Property type: LayoutPosition | string
551
+ */
552
+ get scrollButtonsPosition() {
553
+ return this.nativeElement ? this.nativeElement.scrollButtonsPosition : undefined;
554
+ }
555
+ set scrollButtonsPosition(value) {
556
+ if (this.nativeElement) {
557
+ this.nativeElement.scrollButtonsPosition = value;
558
+ }
559
+ }
560
+ /** Sets or gets the behavior when scrolling the tab strip via the scroll buttons.
561
+ * Property type: TabsScrollMode | string
562
+ */
563
+ get scrollMode() {
564
+ return this.nativeElement ? this.nativeElement.scrollMode : undefined;
565
+ }
566
+ set scrollMode(value) {
567
+ if (this.nativeElement) {
568
+ this.nativeElement.scrollMode = value;
569
+ }
570
+ }
571
+ /** Sets or gets which tab is selected.
572
+ * Property type: number | null
573
+ */
574
+ get selectedIndex() {
575
+ return this.nativeElement ? this.nativeElement.selectedIndex : undefined;
576
+ }
577
+ set selectedIndex(value) {
578
+ if (this.nativeElement) {
579
+ this.nativeElement.selectedIndex = value;
580
+ }
581
+ }
582
+ /** Determines the way the user can switch between tabs.
583
+ * Property type: TabSelectionMode | string
584
+ */
585
+ get selectionMode() {
586
+ return this.nativeElement ? this.nativeElement.selectionMode : undefined;
587
+ }
588
+ set selectionMode(value) {
589
+ if (this.nativeElement) {
590
+ this.nativeElement.selectionMode = value;
591
+ }
592
+ }
593
+ /** Applies one of four behaviors when the element is not wide enough to display all tab labels.
594
+ * Property type: TabsTabLayout | string
595
+ */
596
+ get tabLayout() {
597
+ return this.nativeElement ? this.nativeElement.tabLayout : undefined;
598
+ }
599
+ set tabLayout(value) {
600
+ if (this.nativeElement) {
601
+ this.nativeElement.tabLayout = value;
602
+ }
603
+ }
604
+ /** Sets or gets where the tab strip is positioned.
605
+ * Property type: TabPosition | string
606
+ */
607
+ get tabPosition() {
608
+ return this.nativeElement ? this.nativeElement.tabPosition : undefined;
609
+ }
610
+ set tabPosition(value) {
611
+ if (this.nativeElement) {
612
+ this.nativeElement.tabPosition = value;
613
+ }
614
+ }
615
+ /** Sets or gets the orientation of the text in the tabs.
616
+ * Property type: Orientation | string
617
+ */
618
+ get tabTextOrientation() {
619
+ return this.nativeElement ? this.nativeElement.tabTextOrientation : undefined;
620
+ }
621
+ set tabTextOrientation(value) {
622
+ if (this.nativeElement) {
623
+ this.nativeElement.tabTextOrientation = value;
624
+ }
625
+ }
626
+ /** Determines the theme. Theme defines the look of the element
627
+ * Property type: string
628
+ */
629
+ get theme() {
630
+ return this.nativeElement ? this.nativeElement.theme : undefined;
631
+ }
632
+ set theme(value) {
633
+ if (this.nativeElement) {
634
+ this.nativeElement.theme = value;
635
+ }
636
+ }
637
+ /** If is set to true, the element cannot be focused.
638
+ * Property type: boolean
639
+ */
640
+ get unfocusable() {
641
+ return this.nativeElement ? this.nativeElement.unfocusable : undefined;
642
+ }
643
+ set unfocusable(value) {
644
+ if (this.nativeElement) {
645
+ this.nativeElement.unfocusable = value;
646
+ }
647
+ }
648
+ // Gets the properties of the React component.
649
+ get properties() {
650
+ return ["addNewTab", "allowToggle", "animation", "closeButtonMode", "closeButtons", "collapsed", "collapsible", "dataSource", "disabled", "enableMouseWheelAction", "locale", "localizeFormatFunction", "messages", "name", "overflow", "readonly", "reorder", "resize", "rightToLeft", "scrollButtonsPosition", "scrollMode", "selectedIndex", "selectionMode", "tabLayout", "tabPosition", "tabTextOrientation", "theme", "unfocusable"];
651
+ }
652
+ // Gets the events of the React component.
653
+ get eventListeners() {
654
+ return ["onAddNewTabClick", "onChange", "onClose", "onClosing", "onDragEnd", "onDragStart", "onReorder", "onCreate", "onReady"];
655
+ }
656
+ /** Collapses the content section.
657
+ */
658
+ collapse() {
659
+ if (this.nativeElement.isRendered) {
660
+ this.nativeElement.collapse();
661
+ }
662
+ else {
663
+ this.nativeElement.whenRendered(() => {
664
+ this.nativeElement.collapse();
665
+ });
666
+ }
667
+ }
668
+ /** Returns the label of a Tab at given index.
669
+ * @param {number} index. The index of the tab.
670
+ * @returns {string}
671
+ */
672
+ getTabLabel(index) {
673
+ const result = this.nativeElement.getTabLabel(index);
674
+ return result;
675
+ }
676
+ /** Returns the content of a Tab at given index.
677
+ * @param {number} index. The index of the tab.
678
+ * @returns {HTMLElement}
679
+ */
680
+ getTabContent(index) {
681
+ const result = this.nativeElement.getTabContent(index);
682
+ return result;
683
+ }
684
+ /** Makes sure a tab is visible by scrolling to it.
685
+ * @param {number} index. The index of the tab to scroll to.
686
+ */
687
+ ensureVisible(index) {
688
+ if (this.nativeElement.isRendered) {
689
+ this.nativeElement.ensureVisible(index);
690
+ }
691
+ else {
692
+ this.nativeElement.whenRendered(() => {
693
+ this.nativeElement.ensureVisible(index);
694
+ });
695
+ }
696
+ }
697
+ /** Expands the content section.
698
+ */
699
+ expand() {
700
+ if (this.nativeElement.isRendered) {
701
+ this.nativeElement.expand();
702
+ }
703
+ else {
704
+ this.nativeElement.whenRendered(() => {
705
+ this.nativeElement.expand();
706
+ });
707
+ }
708
+ }
709
+ /** Returns an array of the TabItems inside the element.
710
+ * @returns {TabItem[]}
711
+ */
712
+ getTabs() {
713
+ const result = this.nativeElement.getTabs();
714
+ return result;
715
+ }
716
+ /** Returns the offset of the tab item container (smart-tab-item element) from the edge of the Tabs (smart-tabs element) where the tab strip is positioned.
717
+ * @param {number} index. The index of the tab item.
718
+ * @returns {number}
719
+ */
720
+ getOffsetFromEdgeOfElement(index) {
721
+ const result = this.nativeElement.getOffsetFromEdgeOfElement(index);
722
+ return result;
723
+ }
724
+ /** Inserts a new tab and an associated content section.
725
+ * @param {number} index. The index to insert a new tab at.
726
+ * @param {any} details. An Object with the fields "label", "labelSize", "content" and "group".
727
+ */
728
+ insert(index, details) {
729
+ if (this.nativeElement.isRendered) {
730
+ this.nativeElement.insert(index, details);
731
+ }
732
+ else {
733
+ this.nativeElement.whenRendered(() => {
734
+ this.nativeElement.insert(index, details);
735
+ });
736
+ }
737
+ }
738
+ /** Refreshes the Tabs header section. Useful when the header contains elements (such as images) loaded slower than the Tabs itself.
739
+ */
740
+ refreshTabHeader() {
741
+ if (this.nativeElement.isRendered) {
742
+ this.nativeElement.refreshTabHeader();
743
+ }
744
+ else {
745
+ this.nativeElement.whenRendered(() => {
746
+ this.nativeElement.refreshTabHeader();
747
+ });
748
+ }
749
+ }
750
+ /** Removes a tab and its associated content section.
751
+ * @param {number} index. The index of the tab to remove.
752
+ */
753
+ removeAt(index) {
754
+ if (this.nativeElement.isRendered) {
755
+ this.nativeElement.removeAt(index);
756
+ }
757
+ else {
758
+ this.nativeElement.whenRendered(() => {
759
+ this.nativeElement.removeAt(index);
760
+ });
761
+ }
762
+ }
763
+ /** Selects a tab.
764
+ * @param {number} index. The index of the tab to select.
765
+ */
766
+ select(index) {
767
+ if (this.nativeElement.isRendered) {
768
+ this.nativeElement.select(index);
769
+ }
770
+ else {
771
+ this.nativeElement.whenRendered(() => {
772
+ this.nativeElement.select(index);
773
+ });
774
+ }
775
+ }
776
+ /** Updates a tab and its associated content section.
777
+ * @param {number} index. The index of the tab to update.
778
+ * @param {string} label. The new label of the tab. The value can be the id of an HTMLTemplateElement
779
+ * @param {string | HTMLElement} content. The new content of the tab.
780
+ */
781
+ update(index, label, content) {
782
+ if (this.nativeElement.isRendered) {
783
+ this.nativeElement.update(index, label, content);
784
+ }
785
+ else {
786
+ this.nativeElement.whenRendered(() => {
787
+ this.nativeElement.update(index, label, content);
788
+ });
789
+ }
790
+ }
791
+ componentDidRender(initialize) {
792
+ const that = this;
793
+ const props = {};
794
+ const events = {};
795
+ let styles = null;
796
+ for (let prop in that.props) {
797
+ if (prop === 'children') {
798
+ continue;
799
+ }
800
+ if (prop === 'style') {
801
+ styles = that.props[prop];
802
+ continue;
803
+ }
804
+ if (prop.startsWith('on') && that.properties.indexOf(prop) === -1) {
805
+ events[prop] = that.props[prop];
806
+ continue;
807
+ }
808
+ props[prop] = that.props[prop];
809
+ }
810
+ if (initialize) {
811
+ that.nativeElement = this.componentRef.current;
812
+ }
813
+ for (let prop in props) {
814
+ if (prop === 'class' || prop === 'className') {
815
+ const classNames = props[prop].trim().split(' ');
816
+ for (let className in classNames) {
817
+ if (!that.nativeElement.classList.contains(classNames[className]) && classNames[className] !== "") {
818
+ that.nativeElement.classList.add(classNames[className]);
819
+ }
820
+ }
821
+ continue;
822
+ }
823
+ if (props[prop] !== that.nativeElement[prop]) {
824
+ const normalizeProp = (str) => {
825
+ return str.replace(/-([a-z])/g, function (g) {
826
+ return g[1].toUpperCase();
827
+ });
828
+ };
829
+ if (prop === 'hover' || prop === 'active' || prop === 'focus' || prop === 'selected') {
830
+ that.nativeElement.setAttribute(prop, '');
831
+ }
832
+ const normalizedProp = normalizeProp(prop);
833
+ that.nativeElement[normalizedProp] = props[prop];
834
+ }
835
+ }
836
+ for (let eventName in events) {
837
+ that[eventName] = events[eventName];
838
+ that.nativeElement[eventName.toLowerCase()] = events[eventName];
839
+ }
840
+ if (initialize) {
841
+ Smart$2.Render();
842
+ if (that.onCreate) {
843
+ that.onCreate();
844
+ }
845
+ that.nativeElement.whenRendered(() => {
846
+ if (that.onReady) {
847
+ that.onReady();
848
+ }
849
+ });
850
+ }
851
+ // setup styles.
852
+ if (styles) {
853
+ for (let styleName in styles) {
854
+ that.nativeElement.style[styleName] = styles[styleName];
855
+ }
856
+ }
857
+ }
858
+ componentDidMount() {
859
+ this.componentDidRender(true);
860
+ }
861
+ componentDidUpdate() {
862
+ this.componentDidRender(false);
863
+ }
864
+ componentWillUnmount() {
865
+ const that = this;
866
+ if (!that.nativeElement) {
867
+ return;
868
+ }
869
+ that.nativeElement.whenRenderedCallbacks = [];
870
+ for (let i = 0; i < that.eventListeners.length; i++) {
871
+ const eventName = that.eventListeners[i];
872
+ that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
873
+ }
874
+ }
875
+ render() {
876
+ return (React.createElement("smart-tabs", { ref: this.componentRef }, this.props.children));
877
+ }
878
+ }
348
879
 
349
- const Smart$2 = window.Smart;
350
- /**
351
- Tabs organize content across different screens, data sets, and other interactions. Tabs can be paired with components like top app bars. Tabs can be displayed horizontally or vertically.
352
- */
353
- class Tabs extends React.Component {
354
- constructor(props) {
355
- super(props);
356
- this.componentRef = React.createRef();
357
- }
358
- // Gets the id of the React component.
359
- get id() {
360
- if (!this._id) {
361
- this._id = 'Tabs' + Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
362
- }
363
- return this._id;
364
- }
365
- /** Sets or gets whether the "Add new tab" button (+) is displayed.
366
- * Property type: boolean
367
- */
368
- get addNewTab() {
369
- return this.nativeElement ? this.nativeElement.addNewTab : undefined;
370
- }
371
- set addNewTab(value) {
372
- if (this.nativeElement) {
373
- this.nativeElement.addNewTab = value;
374
- }
375
- }
376
- /** Allows toggle. If set to true, **selectedIndex** can be set to null (no selected tab).
377
- * Property type: boolean
378
- */
379
- get allowToggle() {
380
- return this.nativeElement ? this.nativeElement.allowToggle : undefined;
381
- }
382
- set allowToggle(value) {
383
- if (this.nativeElement) {
384
- this.nativeElement.allowToggle = value;
385
- }
386
- }
387
- /** Sets or gets the animation mode. Animation is disabled when the property is set to 'none'
388
- * Property type: Animation | string
389
- */
390
- get animation() {
391
- return this.nativeElement ? this.nativeElement.animation : undefined;
392
- }
393
- set animation(value) {
394
- if (this.nativeElement) {
395
- this.nativeElement.animation = value;
396
- }
397
- }
398
- /** Sets or gets the close button mode.
399
- * Property type: TabsCloseButtonMode | string
400
- */
401
- get closeButtonMode() {
402
- return this.nativeElement ? this.nativeElement.closeButtonMode : undefined;
403
- }
404
- set closeButtonMode(value) {
405
- if (this.nativeElement) {
406
- this.nativeElement.closeButtonMode = value;
407
- }
408
- }
409
- /** Sets or gets whether close buttons are displayed.
410
- * Property type: boolean
411
- */
412
- get closeButtons() {
413
- return this.nativeElement ? this.nativeElement.closeButtons : undefined;
414
- }
415
- set closeButtons(value) {
416
- if (this.nativeElement) {
417
- this.nativeElement.closeButtons = value;
418
- }
419
- }
420
- /** Sets or gets whether the Tabs content section is collapsed.
421
- * Property type: boolean
422
- */
423
- get collapsed() {
424
- return this.nativeElement ? this.nativeElement.collapsed : undefined;
425
- }
426
- set collapsed(value) {
427
- if (this.nativeElement) {
428
- this.nativeElement.collapsed = value;
429
- }
430
- }
431
- /** Enables or disables the collapsible feature.
432
- * Property type: boolean
433
- */
434
- get collapsible() {
435
- return this.nativeElement ? this.nativeElement.collapsible : undefined;
436
- }
437
- set collapsible(value) {
438
- if (this.nativeElement) {
439
- this.nativeElement.collapsible = value;
440
- }
441
- }
442
- /** Determines the data source that will be loaded to the Tabs.
443
- * Property type: any
444
- */
445
- get dataSource() {
446
- return this.nativeElement ? this.nativeElement.dataSource : undefined;
447
- }
448
- set dataSource(value) {
449
- if (this.nativeElement) {
450
- this.nativeElement.dataSource = value;
451
- }
452
- }
453
- /** Enables or disables the element.
454
- * Property type: boolean
455
- */
456
- get disabled() {
457
- return this.nativeElement ? this.nativeElement.disabled : undefined;
458
- }
459
- set disabled(value) {
460
- if (this.nativeElement) {
461
- this.nativeElement.disabled = value;
462
- }
463
- }
464
- /** Enables or disables scrolling using the mouse wheel through overflowing tab labels in the tab strip.
465
- * Property type: boolean
466
- */
467
- get enableMouseWheelAction() {
468
- return this.nativeElement ? this.nativeElement.enableMouseWheelAction : undefined;
469
- }
470
- set enableMouseWheelAction(value) {
471
- if (this.nativeElement) {
472
- this.nativeElement.enableMouseWheelAction = value;
473
- }
474
- }
475
- /** Sets or gets the locale. Used in conjunction with the property messages.
476
- * Property type: string
477
- */
478
- get locale() {
479
- return this.nativeElement ? this.nativeElement.locale : undefined;
480
- }
481
- set locale(value) {
482
- if (this.nativeElement) {
483
- this.nativeElement.locale = value;
484
- }
485
- }
486
- /** Callback, related to localization module.
487
- * Property type: any
488
- */
489
- get localizeFormatFunction() {
490
- return this.nativeElement ? this.nativeElement.localizeFormatFunction : undefined;
491
- }
492
- set localizeFormatFunction(value) {
493
- if (this.nativeElement) {
494
- this.nativeElement.localizeFormatFunction = value;
495
- }
496
- }
497
- /** Sets or gets an object specifying strings used in the widget that can be localized. Used in conjunction with the property locale.
498
- * Property type: any
499
- */
500
- get messages() {
501
- return this.nativeElement ? this.nativeElement.messages : undefined;
502
- }
503
- set messages(value) {
504
- if (this.nativeElement) {
505
- this.nativeElement.messages = value;
506
- }
507
- }
508
- /** Sets or gets the widget's name.
509
- * Property type: string
510
- */
511
- get name() {
512
- return this.nativeElement ? this.nativeElement.name : undefined;
513
- }
514
- set name(value) {
515
- if (this.nativeElement) {
516
- this.nativeElement.name = value;
517
- }
518
- }
519
- /** Sets or gets the Tabs scroll buttons behavior. Applicable only when tabLayout is 'scroll'.
520
- * Property type: Overflow | string
521
- */
522
- get overflow() {
523
- return this.nativeElement ? this.nativeElement.overflow : undefined;
524
- }
525
- set overflow(value) {
526
- if (this.nativeElement) {
527
- this.nativeElement.overflow = value;
528
- }
529
- }
530
- /** Disables user interaction with the element.
531
- * Property type: boolean
532
- */
533
- get readonly() {
534
- return this.nativeElement ? this.nativeElement.readonly : undefined;
535
- }
536
- set readonly(value) {
537
- if (this.nativeElement) {
538
- this.nativeElement.readonly = value;
539
- }
540
- }
541
- /** Enables or disables the reorder feature. When this feature is enabled, the end-user can drag a tab and drop it over another tab. As a result the tabs will be reordered.
542
- * Property type: boolean
543
- */
544
- get reorder() {
545
- return this.nativeElement ? this.nativeElement.reorder : undefined;
546
- }
547
- set reorder(value) {
548
- if (this.nativeElement) {
549
- this.nativeElement.reorder = value;
550
- }
551
- }
552
- /** Sets or gets whether tab labels can be resized by dragging with the mouse.
553
- * Property type: boolean
554
- */
555
- get resize() {
556
- return this.nativeElement ? this.nativeElement.resize : undefined;
557
- }
558
- set resize(value) {
559
- if (this.nativeElement) {
560
- this.nativeElement.resize = value;
561
- }
562
- }
563
- /** Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts.
564
- * Property type: boolean
565
- */
566
- get rightToLeft() {
567
- return this.nativeElement ? this.nativeElement.rightToLeft : undefined;
568
- }
569
- set rightToLeft(value) {
570
- if (this.nativeElement) {
571
- this.nativeElement.rightToLeft = value;
572
- }
573
- }
574
- /** Sets or gets the position of the scroll buttons.
575
- * Property type: LayoutPosition | string
576
- */
577
- get scrollButtonsPosition() {
578
- return this.nativeElement ? this.nativeElement.scrollButtonsPosition : undefined;
579
- }
580
- set scrollButtonsPosition(value) {
581
- if (this.nativeElement) {
582
- this.nativeElement.scrollButtonsPosition = value;
583
- }
584
- }
585
- /** Sets or gets the behavior when scrolling the tab strip via the scroll buttons.
586
- * Property type: TabsScrollMode | string
587
- */
588
- get scrollMode() {
589
- return this.nativeElement ? this.nativeElement.scrollMode : undefined;
590
- }
591
- set scrollMode(value) {
592
- if (this.nativeElement) {
593
- this.nativeElement.scrollMode = value;
594
- }
595
- }
596
- /** Sets or gets which tab is selected.
597
- * Property type: number | null
598
- */
599
- get selectedIndex() {
600
- return this.nativeElement ? this.nativeElement.selectedIndex : undefined;
601
- }
602
- set selectedIndex(value) {
603
- if (this.nativeElement) {
604
- this.nativeElement.selectedIndex = value;
605
- }
606
- }
607
- /** Determines the way the user can switch between tabs.
608
- * Property type: TabSelectionMode | string
609
- */
610
- get selectionMode() {
611
- return this.nativeElement ? this.nativeElement.selectionMode : undefined;
612
- }
613
- set selectionMode(value) {
614
- if (this.nativeElement) {
615
- this.nativeElement.selectionMode = value;
616
- }
617
- }
618
- /** Applies one of four behaviors when the element is not wide enough to display all tab labels.
619
- * Property type: TabsTabLayout | string
620
- */
621
- get tabLayout() {
622
- return this.nativeElement ? this.nativeElement.tabLayout : undefined;
623
- }
624
- set tabLayout(value) {
625
- if (this.nativeElement) {
626
- this.nativeElement.tabLayout = value;
627
- }
628
- }
629
- /** Sets or gets where the tab strip is positioned.
630
- * Property type: TabPosition | string
631
- */
632
- get tabPosition() {
633
- return this.nativeElement ? this.nativeElement.tabPosition : undefined;
634
- }
635
- set tabPosition(value) {
636
- if (this.nativeElement) {
637
- this.nativeElement.tabPosition = value;
638
- }
639
- }
640
- /** Sets or gets the orientation of the text in the tabs.
641
- * Property type: Orientation | string
642
- */
643
- get tabTextOrientation() {
644
- return this.nativeElement ? this.nativeElement.tabTextOrientation : undefined;
645
- }
646
- set tabTextOrientation(value) {
647
- if (this.nativeElement) {
648
- this.nativeElement.tabTextOrientation = value;
649
- }
650
- }
651
- /** Determines the theme. Theme defines the look of the element
652
- * Property type: string
653
- */
654
- get theme() {
655
- return this.nativeElement ? this.nativeElement.theme : undefined;
656
- }
657
- set theme(value) {
658
- if (this.nativeElement) {
659
- this.nativeElement.theme = value;
660
- }
661
- }
662
- /** If is set to true, the element cannot be focused.
663
- * Property type: boolean
664
- */
665
- get unfocusable() {
666
- return this.nativeElement ? this.nativeElement.unfocusable : undefined;
667
- }
668
- set unfocusable(value) {
669
- if (this.nativeElement) {
670
- this.nativeElement.unfocusable = value;
671
- }
672
- }
673
- // Gets the properties of the React component.
674
- get properties() {
675
- return ["addNewTab", "allowToggle", "animation", "closeButtonMode", "closeButtons", "collapsed", "collapsible", "dataSource", "disabled", "enableMouseWheelAction", "locale", "localizeFormatFunction", "messages", "name", "overflow", "readonly", "reorder", "resize", "rightToLeft", "scrollButtonsPosition", "scrollMode", "selectedIndex", "selectionMode", "tabLayout", "tabPosition", "tabTextOrientation", "theme", "unfocusable"];
676
- }
677
- // Gets the events of the React component.
678
- get eventListeners() {
679
- return ["onAddNewTabClick", "onChange", "onClose", "onClosing", "onDragEnd", "onDragStart", "onReorder", "onCreate", "onReady"];
680
- }
681
- /** Collapses the content section.
682
- */
683
- collapse() {
684
- if (this.nativeElement.isRendered) {
685
- this.nativeElement.collapse();
686
- }
687
- else {
688
- this.nativeElement.whenRendered(() => {
689
- this.nativeElement.collapse();
690
- });
691
- }
692
- }
693
- /** Returns the label of a Tab at given index.
694
- * @param {number} index. The index of the tab.
695
- * @returns {string}
696
- */
697
- getTabLabel(index) {
698
- return __awaiter(this, void 0, void 0, function* () {
699
- const getResultOnRender = () => {
700
- return new Promise(resolve => {
701
- this.nativeElement.whenRendered(() => {
702
- const result = this.nativeElement.getTabLabel(index);
703
- resolve(result);
704
- });
705
- });
706
- };
707
- const result = yield getResultOnRender();
708
- return result;
709
- });
710
- }
711
- /** Returns the content of a Tab at given index.
712
- * @param {number} index. The index of the tab.
713
- * @returns {HTMLElement}
714
- */
715
- getTabContent(index) {
716
- return __awaiter(this, void 0, void 0, function* () {
717
- const getResultOnRender = () => {
718
- return new Promise(resolve => {
719
- this.nativeElement.whenRendered(() => {
720
- const result = this.nativeElement.getTabContent(index);
721
- resolve(result);
722
- });
723
- });
724
- };
725
- const result = yield getResultOnRender();
726
- return result;
727
- });
728
- }
729
- /** Makes sure a tab is visible by scrolling to it.
730
- * @param {number} index. The index of the tab to scroll to.
731
- */
732
- ensureVisible(index) {
733
- if (this.nativeElement.isRendered) {
734
- this.nativeElement.ensureVisible(index);
735
- }
736
- else {
737
- this.nativeElement.whenRendered(() => {
738
- this.nativeElement.ensureVisible(index);
739
- });
740
- }
741
- }
742
- /** Expands the content section.
743
- */
744
- expand() {
745
- if (this.nativeElement.isRendered) {
746
- this.nativeElement.expand();
747
- }
748
- else {
749
- this.nativeElement.whenRendered(() => {
750
- this.nativeElement.expand();
751
- });
752
- }
753
- }
754
- /** Returns an array of the TabItems inside the element.
755
- * @returns {TabItem[]}
756
- */
757
- getTabs() {
758
- return __awaiter(this, void 0, void 0, function* () {
759
- const getResultOnRender = () => {
760
- return new Promise(resolve => {
761
- this.nativeElement.whenRendered(() => {
762
- const result = this.nativeElement.getTabs();
763
- resolve(result);
764
- });
765
- });
766
- };
767
- const result = yield getResultOnRender();
768
- return result;
769
- });
770
- }
771
- /** Returns the offset of the tab item container (smart-tab-item element) from the edge of the Tabs (smart-tabs element) where the tab strip is positioned.
772
- * @param {number} index. The index of the tab item.
773
- * @returns {number}
774
- */
775
- getOffsetFromEdgeOfElement(index) {
776
- return __awaiter(this, void 0, void 0, function* () {
777
- const getResultOnRender = () => {
778
- return new Promise(resolve => {
779
- this.nativeElement.whenRendered(() => {
780
- const result = this.nativeElement.getOffsetFromEdgeOfElement(index);
781
- resolve(result);
782
- });
783
- });
784
- };
785
- const result = yield getResultOnRender();
786
- return result;
787
- });
788
- }
789
- /** Inserts a new tab and an associated content section.
790
- * @param {number} index. The index to insert a new tab at.
791
- * @param {any} details. An Object with the fields "label", "labelSize", "content" and "group".
792
- */
793
- insert(index, details) {
794
- if (this.nativeElement.isRendered) {
795
- this.nativeElement.insert(index, details);
796
- }
797
- else {
798
- this.nativeElement.whenRendered(() => {
799
- this.nativeElement.insert(index, details);
800
- });
801
- }
802
- }
803
- /** Refreshes the Tabs header section. Useful when the header contains elements (such as images) loaded slower than the Tabs itself.
804
- */
805
- refreshTabHeader() {
806
- if (this.nativeElement.isRendered) {
807
- this.nativeElement.refreshTabHeader();
808
- }
809
- else {
810
- this.nativeElement.whenRendered(() => {
811
- this.nativeElement.refreshTabHeader();
812
- });
813
- }
814
- }
815
- /** Removes a tab and its associated content section.
816
- * @param {number} index. The index of the tab to remove.
817
- */
818
- removeAt(index) {
819
- if (this.nativeElement.isRendered) {
820
- this.nativeElement.removeAt(index);
821
- }
822
- else {
823
- this.nativeElement.whenRendered(() => {
824
- this.nativeElement.removeAt(index);
825
- });
826
- }
827
- }
828
- /** Selects a tab.
829
- * @param {number} index. The index of the tab to select.
830
- */
831
- select(index) {
832
- if (this.nativeElement.isRendered) {
833
- this.nativeElement.select(index);
834
- }
835
- else {
836
- this.nativeElement.whenRendered(() => {
837
- this.nativeElement.select(index);
838
- });
839
- }
840
- }
841
- /** Updates a tab and its associated content section.
842
- * @param {number} index. The index of the tab to update.
843
- * @param {string} label. The new label of the tab. The value can be the id of an HTMLTemplateElement
844
- * @param {string | HTMLElement} content. The new content of the tab.
845
- */
846
- update(index, label, content) {
847
- if (this.nativeElement.isRendered) {
848
- this.nativeElement.update(index, label, content);
849
- }
850
- else {
851
- this.nativeElement.whenRendered(() => {
852
- this.nativeElement.update(index, label, content);
853
- });
854
- }
855
- }
856
- componentDidRender(initialize) {
857
- const that = this;
858
- const props = {};
859
- const events = {};
860
- let styles = null;
861
- for (let prop in that.props) {
862
- if (prop === 'children') {
863
- continue;
864
- }
865
- if (prop === 'style') {
866
- styles = that.props[prop];
867
- continue;
868
- }
869
- if (prop.startsWith('on') && that.properties.indexOf(prop) === -1) {
870
- events[prop] = that.props[prop];
871
- continue;
872
- }
873
- props[prop] = that.props[prop];
874
- }
875
- if (initialize) {
876
- that.nativeElement = this.componentRef.current;
877
- }
878
- for (let prop in props) {
879
- if (prop === 'class' || prop === 'className') {
880
- const classNames = props[prop].trim().split(' ');
881
- for (let className in classNames) {
882
- if (!that.nativeElement.classList.contains(classNames[className]) && classNames[className] !== "") {
883
- that.nativeElement.classList.add(classNames[className]);
884
- }
885
- }
886
- continue;
887
- }
888
- if (props[prop] !== that.nativeElement[prop]) {
889
- const normalizeProp = (str) => {
890
- return str.replace(/-([a-z])/g, function (g) {
891
- return g[1].toUpperCase();
892
- });
893
- };
894
- if (prop === 'hover' || prop === 'active' || prop === 'focus' || prop === 'selected') {
895
- that.nativeElement.setAttribute(prop, '');
896
- }
897
- const normalizedProp = normalizeProp(prop);
898
- that.nativeElement[normalizedProp] = props[prop];
899
- }
900
- }
901
- for (let eventName in events) {
902
- that[eventName] = events[eventName];
903
- that.nativeElement[eventName.toLowerCase()] = events[eventName];
904
- }
905
- if (initialize) {
906
- Smart$2.Render();
907
- if (that.onCreate) {
908
- that.onCreate();
909
- }
910
- that.nativeElement.whenRendered(() => {
911
- if (that.onReady) {
912
- that.onReady();
913
- }
914
- });
915
- }
916
- // setup styles.
917
- if (styles) {
918
- for (let styleName in styles) {
919
- that.nativeElement.style[styleName] = styles[styleName];
920
- }
921
- }
922
- }
923
- componentDidMount() {
924
- this.componentDidRender(true);
925
- }
926
- componentDidUpdate() {
927
- this.componentDidRender(false);
928
- }
929
- componentWillUnmount() {
930
- const that = this;
931
- if (!that.nativeElement) {
932
- return;
933
- }
934
- that.nativeElement.whenRenderedCallbacks = [];
935
- for (let i = 0; i < that.eventListeners.length; i++) {
936
- const eventName = that.eventListeners[i];
937
- that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
938
- }
939
- }
940
- render() {
941
- return (React.createElement("smart-tabs", { ref: this.componentRef }, this.props.children));
942
- }
943
- }
880
+ exports.Smart = Smart$2;
881
+ exports.Tabs = Tabs;
882
+ exports.default = Tabs;
883
+ exports.TabItem = TabItem;
884
+ exports.TabItemsGroup = TabItemsGroup;
944
885
 
945
- exports.Smart = Smart$2;
946
- exports.Tabs = Tabs;
947
- exports.default = Tabs;
948
- exports.TabItem = TabItem;
949
- exports.TabItemsGroup = TabItemsGroup;
950
-
951
- Object.defineProperty(exports, '__esModule', { value: true });
886
+ Object.defineProperty(exports, '__esModule', { value: true });
952
887
 
953
888
  })));