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
@@ -2,1383 +2,1288 @@
2
2
  require('../source/modules/smart.table');
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.table = {}),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.table = {}),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
+ Table is an alternative of the HTMLTableElement.
15
+ */
16
+ class Table 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 = 'Table' + Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
25
+ }
26
+ return this._id;
27
+ }
28
+ /** Enables or disables auto load state from the browser's localStorage. Information about columns, expanded rows, selected rows, applied fitering, grouping, and sorted columns is loaded, based on the value of the stateSettings property.
29
+ * Property type: boolean
30
+ */
31
+ get autoLoadState() {
32
+ return this.nativeElement ? this.nativeElement.autoLoadState : undefined;
33
+ }
34
+ set autoLoadState(value) {
35
+ if (this.nativeElement) {
36
+ this.nativeElement.autoLoadState = value;
37
+ }
38
+ }
39
+ /** Enables or disables auto save state to the browser's localStorage. Information about columns, expanded rows, selected rows, applied fitering, grouping, and sorted columns is saved, based on the value of the stateSettings property.
40
+ * Property type: boolean
41
+ */
42
+ get autoSaveState() {
43
+ return this.nativeElement ? this.nativeElement.autoSaveState : undefined;
44
+ }
45
+ set autoSaveState(value) {
46
+ if (this.nativeElement) {
47
+ this.nativeElement.autoSaveState = value;
48
+ }
49
+ }
50
+ /** Sets or gets a list of column groups that constitute the column header hierarchy. Note: when column header hierarchy is created, column resizing and auto-sizing is not supported.
51
+ * Property type: TableColumnGroup[]
52
+ */
53
+ get columnGroups() {
54
+ return this.nativeElement ? this.nativeElement.columnGroups : undefined;
55
+ }
56
+ set columnGroups(value) {
57
+ if (this.nativeElement) {
58
+ this.nativeElement.columnGroups = value;
59
+ }
60
+ }
61
+ /** Sets or gets the min width of columns when columnSizeMode is 'auto' or when resizing columns. This property has no effect on columns with programmatically set width.
62
+ * Property type: string | number
63
+ */
64
+ get columnMinWidth() {
65
+ return this.nativeElement ? this.nativeElement.columnMinWidth : undefined;
66
+ }
67
+ set columnMinWidth(value) {
68
+ if (this.nativeElement) {
69
+ this.nativeElement.columnMinWidth = value;
70
+ }
71
+ }
72
+ /** Sets or gets whether the reordering of columns is enabled.
73
+ * Property type: boolean
74
+ */
75
+ get columnReorder() {
76
+ return this.nativeElement ? this.nativeElement.columnReorder : undefined;
77
+ }
78
+ set columnReorder(value) {
79
+ if (this.nativeElement) {
80
+ this.nativeElement.columnReorder = value;
81
+ }
82
+ }
83
+ /** Sets or gets whether the resizing of columns is enabled. Note: column sizes continue to adhere to the behavior of the standard HTML table element's table-layout: fixed, upon which smart-table is based.
84
+ * Property type: boolean
85
+ */
86
+ get columnResize() {
87
+ return this.nativeElement ? this.nativeElement.columnResize : undefined;
88
+ }
89
+ set columnResize(value) {
90
+ if (this.nativeElement) {
91
+ this.nativeElement.columnResize = value;
92
+ }
93
+ }
94
+ /** This property affects the table sizing, when the columnSizeMode is 'default'. When 'columnResizeNormalize' is false, the Table will add an additional TH element, if all table columns have the 'width' property set. This is done in order to maintain your width settings. Otherwise, when the property is set to true, the Table will auto-fill the remaining space similar to the layout of standard HTML Tables.
95
+ * Property type: boolean
96
+ */
97
+ get columnResizeNormalize() {
98
+ return this.nativeElement ? this.nativeElement.columnResizeNormalize : undefined;
99
+ }
100
+ set columnResizeNormalize(value) {
101
+ if (this.nativeElement) {
102
+ this.nativeElement.columnResizeNormalize = value;
103
+ }
104
+ }
105
+ /** Sets or gets whether when resizing a column, a feedback showing the new column width in px will be displayed.
106
+ * Property type: boolean
107
+ */
108
+ get columnResizeFeedback() {
109
+ return this.nativeElement ? this.nativeElement.columnResizeFeedback : undefined;
110
+ }
111
+ set columnResizeFeedback(value) {
112
+ if (this.nativeElement) {
113
+ this.nativeElement.columnResizeFeedback = value;
114
+ }
115
+ }
116
+ /** Describes the columns properties.
117
+ * Property type: TableColumn[]
118
+ */
119
+ get columns() {
120
+ return this.nativeElement ? this.nativeElement.columns : undefined;
121
+ }
122
+ set columns(value) {
123
+ if (this.nativeElement) {
124
+ this.nativeElement.columns = value;
125
+ }
126
+ }
127
+ /** Sets or gets details about conditional formatting to be applied to the Table's cells.
128
+ * Property type: TableConditionalFormatting[]
129
+ */
130
+ get conditionalFormatting() {
131
+ return this.nativeElement ? this.nativeElement.conditionalFormatting : undefined;
132
+ }
133
+ set conditionalFormatting(value) {
134
+ if (this.nativeElement) {
135
+ this.nativeElement.conditionalFormatting = value;
136
+ }
137
+ }
138
+ /** Sets or gets the column menu. When you set this property to true, each column will have a column menu. From the column menu, you will be able to sort, filter, show or hide columns.
139
+ * Property type: boolean
140
+ */
141
+ get columnMenu() {
142
+ return this.nativeElement ? this.nativeElement.columnMenu : undefined;
143
+ }
144
+ set columnMenu(value) {
145
+ if (this.nativeElement) {
146
+ this.nativeElement.columnMenu = value;
147
+ }
148
+ }
149
+ /** Sets or gets the column sizing behavior. In 'auto' mode Columns are automatically sized based on their content and the value of the columnMinWidth property, unless there is not enough space in the Table, in which case ellipses are shown. User-set static column width is still respected. In 'default' mode Columns are sized according to the rules of the standard HTML table element's table-layout: fixed. Custom width can also be applied to columns in this case by setting the column width property.
150
+ * Property type: TableColumnSizeMode | string
151
+ */
152
+ get columnSizeMode() {
153
+ return this.nativeElement ? this.nativeElement.columnSizeMode : undefined;
154
+ }
155
+ set columnSizeMode(value) {
156
+ if (this.nativeElement) {
157
+ this.nativeElement.columnSizeMode = value;
158
+ }
159
+ }
160
+ /** Sets or gets whether the "Conditional Formatting" button appears in the Table's header (toolbar). Clicking this button opens a dialog with formatting options.
161
+ * Property type: boolean
162
+ */
163
+ get conditionalFormattingButton() {
164
+ return this.nativeElement ? this.nativeElement.conditionalFormattingButton : undefined;
165
+ }
166
+ set conditionalFormattingButton(value) {
167
+ if (this.nativeElement) {
168
+ this.nativeElement.conditionalFormattingButton = value;
169
+ }
170
+ }
171
+ /** This property determines the time in milliseconds after which the Table data is updated, when you vertically scroll.
172
+ * Property type: number
173
+ */
174
+ get deferredScrollDelay() {
175
+ return this.nativeElement ? this.nativeElement.deferredScrollDelay : undefined;
176
+ }
177
+ set deferredScrollDelay(value) {
178
+ if (this.nativeElement) {
179
+ this.nativeElement.deferredScrollDelay = value;
180
+ }
181
+ }
182
+ /** When binding the dataSource property directly to an array (as opposed to an instance of JQX.DataAdapter), sets or gets the name of the data field in the source array to bind row ids to.
183
+ * Property type: string
184
+ */
185
+ get dataRowId() {
186
+ return this.nativeElement ? this.nativeElement.dataRowId : undefined;
187
+ }
188
+ set dataRowId(value) {
189
+ if (this.nativeElement) {
190
+ this.nativeElement.dataRowId = value;
191
+ }
192
+ }
193
+ /** Determines the data source of the table component. The data source of the Table can be a regular Array or a DataAdapter instance. You can read more about the dataAdapter here - https://www.htmlelements.com/docs/data-adapter/.
194
+ * Property type: any
195
+ */
196
+ get dataSource() {
197
+ return this.nativeElement ? this.nativeElement.dataSource : undefined;
198
+ }
199
+ set dataSource(value) {
200
+ if (this.nativeElement) {
201
+ this.nativeElement.dataSource = value;
202
+ }
203
+ }
204
+ /** Sets the grid's data source settings when the dataSource property is set to an Array or URL.
205
+ * Property type: TableDataSourceSettings
206
+ */
207
+ get dataSourceSettings() {
208
+ return this.nativeElement ? this.nativeElement.dataSourceSettings : undefined;
209
+ }
210
+ set dataSourceSettings(value) {
211
+ if (this.nativeElement) {
212
+ this.nativeElement.dataSourceSettings = value;
213
+ }
214
+ }
215
+ /** Disables the interaction with the element.
216
+ * Property type: { (record: any): void }
217
+ */
218
+ get dataTransform() {
219
+ return this.nativeElement ? this.nativeElement.dataTransform : undefined;
220
+ }
221
+ set dataTransform(value) {
222
+ if (this.nativeElement) {
223
+ this.nativeElement.dataTransform = value;
224
+ }
225
+ }
226
+ /** Sets or gets whether the Table can be edited.
227
+ * Property type: boolean
228
+ */
229
+ get disabled() {
230
+ return this.nativeElement ? this.nativeElement.disabled : undefined;
231
+ }
232
+ set disabled(value) {
233
+ if (this.nativeElement) {
234
+ this.nativeElement.disabled = value;
235
+ }
236
+ }
237
+ /** Sets or gets the edit mode.
238
+ * Property type: boolean
239
+ */
240
+ get editing() {
241
+ return this.nativeElement ? this.nativeElement.editing : undefined;
242
+ }
243
+ set editing(value) {
244
+ if (this.nativeElement) {
245
+ this.nativeElement.editing = value;
246
+ }
247
+ }
248
+ /** Sets or gets whether Row hierarchies are expanded by default, when created. Use this property when you want your groups to be expanded by default, when the Table is grouped or when you use the Table in tree mode.
249
+ * Property type: TableEditMode | string
250
+ */
251
+ get editMode() {
252
+ return this.nativeElement ? this.nativeElement.editMode : undefined;
253
+ }
254
+ set editMode(value) {
255
+ if (this.nativeElement) {
256
+ this.nativeElement.editMode = value;
257
+ }
258
+ }
259
+ /** Sets or gets whether the Table can be filtered. By default, the Table can be filtered by all string and numeric columns through a filter input in the header.
260
+ * Property type: boolean
261
+ */
262
+ get expandHierarchy() {
263
+ return this.nativeElement ? this.nativeElement.expandHierarchy : undefined;
264
+ }
265
+ set expandHierarchy(value) {
266
+ if (this.nativeElement) {
267
+ this.nativeElement.expandHierarchy = value;
268
+ }
269
+ }
270
+ /** Sets or gets whether the Table can be filtered via a filter row.
271
+ * Property type: boolean
272
+ */
273
+ get filtering() {
274
+ return this.nativeElement ? this.nativeElement.filtering : undefined;
275
+ }
276
+ set filtering(value) {
277
+ if (this.nativeElement) {
278
+ this.nativeElement.filtering = value;
279
+ }
280
+ }
281
+ /** Sets or gets the Table's filter operator. It determines whether 'and' or 'or' is used when applying column filters - cellvalue1 && cellvalue2 vs cellvalue1 || cellvalue2
282
+ * Property type: boolean
283
+ */
284
+ get filterRow() {
285
+ return this.nativeElement ? this.nativeElement.filterRow : undefined;
286
+ }
287
+ set filterRow(value) {
288
+ if (this.nativeElement) {
289
+ this.nativeElement.filterRow = value;
290
+ }
291
+ }
292
+ /** Sets or gets the id of an HTML template element to be applied as a custom filter template.
293
+ * Property type: boolean
294
+ */
295
+ get filterOperator() {
296
+ return this.nativeElement ? this.nativeElement.filterOperator : undefined;
297
+ }
298
+ set filterOperator(value) {
299
+ if (this.nativeElement) {
300
+ this.nativeElement.filterOperator = value;
301
+ }
302
+ }
303
+ /** Sets or gets the id of an HTML template element to be applied as footer row(s).
304
+ * Property type: string
305
+ */
306
+ get filterTemplate() {
307
+ return this.nativeElement ? this.nativeElement.filterTemplate : undefined;
308
+ }
309
+ set filterTemplate(value) {
310
+ if (this.nativeElement) {
311
+ this.nativeElement.filterTemplate = value;
312
+ }
313
+ }
314
+ /** Sets or gets whether Excel-like formulas can be passed as cell values. Formulas are always preceded by the = sign and are re-evaluated when cell values are changed. This feature depends on the third-party free plug-in formula-parser (the file formula-parser.min.js has to be referenced).
315
+ * Property type: string
316
+ */
317
+ get footerRow() {
318
+ return this.nativeElement ? this.nativeElement.footerRow : undefined;
319
+ }
320
+ set footerRow(value) {
321
+ if (this.nativeElement) {
322
+ this.nativeElement.footerRow = value;
323
+ }
324
+ }
325
+ /** Sets or gets whether the Table's footer is sticky/frozen.
326
+ * Property type: boolean
327
+ */
328
+ get formulas() {
329
+ return this.nativeElement ? this.nativeElement.formulas : undefined;
330
+ }
331
+ set formulas(value) {
332
+ if (this.nativeElement) {
333
+ this.nativeElement.formulas = value;
334
+ }
335
+ }
336
+ /** Sets or gets whether the Table's column header is sticky/frozen.
337
+ * Property type: boolean
338
+ */
339
+ get freezeFooter() {
340
+ return this.nativeElement ? this.nativeElement.freezeFooter : undefined;
341
+ }
342
+ set freezeFooter(value) {
343
+ if (this.nativeElement) {
344
+ this.nativeElement.freezeFooter = value;
345
+ }
346
+ }
347
+ /** Sets or gets whether grouping the Table is enabled.
348
+ * Property type: boolean
349
+ */
350
+ get freezeHeader() {
351
+ return this.nativeElement ? this.nativeElement.freezeHeader : undefined;
352
+ }
353
+ set freezeHeader(value) {
354
+ if (this.nativeElement) {
355
+ this.nativeElement.freezeHeader = value;
356
+ }
357
+ }
358
+ /** Allows to customize the header of the element. The property accepts the id of an HTMLElement, HTMLTemplateElement, function or a string that will be parsed as HTML. When set to a function it contains one argument - the header element of the Table.
359
+ * Property type: boolean
360
+ */
361
+ get grouping() {
362
+ return this.nativeElement ? this.nativeElement.grouping : undefined;
363
+ }
364
+ set grouping(value) {
365
+ if (this.nativeElement) {
366
+ this.nativeElement.grouping = value;
367
+ }
368
+ }
369
+ /** Sets or gets whether navigation with the keyboard is enabled in the Table.
370
+ * Property type: { (settings: { value: any, row: string | number, column: string, template?: any }): void }
371
+ */
372
+ get groupFormatFunction() {
373
+ return this.nativeElement ? this.nativeElement.groupFormatFunction : undefined;
374
+ }
375
+ set groupFormatFunction(value) {
376
+ if (this.nativeElement) {
377
+ this.nativeElement.groupFormatFunction = value;
378
+ }
379
+ }
380
+ /** Sets or gets whether the checkboxes are displayed in the selection column.
381
+ * Property type: string | HTMLElement | Function
382
+ */
383
+ get headerRow() {
384
+ return this.nativeElement ? this.nativeElement.headerRow : undefined;
385
+ }
386
+ set headerRow(value) {
387
+ if (this.nativeElement) {
388
+ this.nativeElement.headerRow = value;
389
+ }
390
+ }
391
+ /** Sets or gets the behavior when loading column settings either via autoLoadState or loadState. Applicable only when stateSettings contains 'columns'.
392
+ * Property type: boolean
393
+ */
394
+ get keyboardNavigation() {
395
+ return this.nativeElement ? this.nativeElement.keyboardNavigation : undefined;
396
+ }
397
+ set keyboardNavigation(value) {
398
+ if (this.nativeElement) {
399
+ this.nativeElement.keyboardNavigation = value;
400
+ }
401
+ }
402
+ /** Sets or gets the language. Used in conjunction with the property messages.
403
+ * Property type: boolean
404
+ */
405
+ get hideSelectionColumn() {
406
+ return this.nativeElement ? this.nativeElement.hideSelectionColumn : undefined;
407
+ }
408
+ set hideSelectionColumn(value) {
409
+ if (this.nativeElement) {
410
+ this.nativeElement.hideSelectionColumn = value;
411
+ }
412
+ }
413
+ /** Sets or gets an object specifying strings used in the element that can be localized. Used in conjunction with the property locale.
414
+ * Property type: TableLoadColumnStateBehavior | string
415
+ */
416
+ get loadColumnStateBehavior() {
417
+ return this.nativeElement ? this.nativeElement.loadColumnStateBehavior : undefined;
418
+ }
419
+ set loadColumnStateBehavior(value) {
420
+ if (this.nativeElement) {
421
+ this.nativeElement.loadColumnStateBehavior = value;
422
+ }
423
+ }
424
+ /** Sets or gets the page size (when paging is enabled).
425
+ * Property type: string
426
+ */
427
+ get locale() {
428
+ return this.nativeElement ? this.nativeElement.locale : undefined;
429
+ }
430
+ set locale(value) {
431
+ if (this.nativeElement) {
432
+ this.nativeElement.locale = value;
433
+ }
434
+ }
435
+ /** Sets or gets the current (zero-based) page index (when paging is enabled).
436
+ * Property type: any
437
+ */
438
+ get messages() {
439
+ return this.nativeElement ? this.nativeElement.messages : undefined;
440
+ }
441
+ set messages(value) {
442
+ if (this.nativeElement) {
443
+ this.nativeElement.messages = value;
444
+ }
445
+ }
446
+ /** Sets or gets whether paging is enabled.
447
+ * Property type: { (data: any, dataField: string, value: any, cell: HTMLTableCellElement): void }
448
+ */
449
+ get onCellRender() {
450
+ return this.nativeElement ? this.nativeElement.onCellRender : undefined;
451
+ }
452
+ set onCellRender(value) {
453
+ if (this.nativeElement) {
454
+ this.nativeElement.onCellRender = value;
455
+ }
456
+ }
457
+ /** Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts.
458
+ * Property type: { (dataField: string, headerCell: HTMLTableCellElement): void }
459
+ */
460
+ get onColumnRender() {
461
+ return this.nativeElement ? this.nativeElement.onColumnRender : undefined;
462
+ }
463
+ set onColumnRender(value) {
464
+ if (this.nativeElement) {
465
+ this.nativeElement.onColumnRender = value;
466
+ }
467
+ }
468
+ /** Sets or gets a string template to be applied as row detail template. Each cell value in the master row can be placed in the detail row by specifying the cell's data field in double curly brackets (e.g. {{price}}. The details can then be displayed by expanding the row by clicking it.
469
+ * Property type: { (): void }
470
+ */
471
+ get onInit() {
472
+ return this.nativeElement ? this.nativeElement.onInit : undefined;
473
+ }
474
+ set onInit(value) {
475
+ if (this.nativeElement) {
476
+ this.nativeElement.onInit = value;
477
+ }
478
+ }
479
+ /** Sets or gets an array of the Table's selected row's ids.
480
+ * Property type: { (): void }
481
+ */
482
+ get onLoad() {
483
+ return this.nativeElement ? this.nativeElement.onLoad : undefined;
484
+ }
485
+ set onLoad(value) {
486
+ if (this.nativeElement) {
487
+ this.nativeElement.onLoad = value;
488
+ }
489
+ }
490
+ /** Sets or gets whether row selection (via checkboxes) is enabled.
491
+ * Property type: { (): void }
492
+ */
493
+ get onUpdateComplete() {
494
+ return this.nativeElement ? this.nativeElement.onUpdateComplete : undefined;
495
+ }
496
+ set onUpdateComplete(value) {
497
+ if (this.nativeElement) {
498
+ this.nativeElement.onUpdateComplete = value;
499
+ }
500
+ }
501
+ /** Sets or gets the selection mode. Only applicable when selection is enabled.
502
+ * Property type: TablePageSize | string
503
+ */
504
+ get pageSize() {
505
+ return this.nativeElement ? this.nativeElement.pageSize : undefined;
506
+ }
507
+ set pageSize(value) {
508
+ if (this.nativeElement) {
509
+ this.nativeElement.pageSize = value;
510
+ }
511
+ }
512
+ /** Sets or gets whether row selection (via checkboxes) is hierarchical. When a parent row is selected, all sub rows are selected, too.
513
+ * Property type: number
514
+ */
515
+ get pageIndex() {
516
+ return this.nativeElement ? this.nativeElement.pageIndex : undefined;
517
+ }
518
+ set pageIndex(value) {
519
+ if (this.nativeElement) {
520
+ this.nativeElement.pageIndex = value;
521
+ }
522
+ }
523
+ /** Determines the sorting mode of the Table.
524
+ * Property type: boolean
525
+ */
526
+ get paging() {
527
+ return this.nativeElement ? this.nativeElement.paging : undefined;
528
+ }
529
+ set paging(value) {
530
+ if (this.nativeElement) {
531
+ this.nativeElement.paging = value;
532
+ }
533
+ }
534
+ /** Sets or gets what settings of the Table's state can be saved (by autoSaveState or saveState) or loaded (by autoLoadState or loadState).
535
+ * Property type: boolean
536
+ */
537
+ get rightToLeft() {
538
+ return this.nativeElement ? this.nativeElement.rightToLeft : undefined;
539
+ }
540
+ set rightToLeft(value) {
541
+ if (this.nativeElement) {
542
+ this.nativeElement.rightToLeft = value;
543
+ }
544
+ }
545
+ /** Determines the theme. Theme defines the look of the element
546
+ * Property type: string
547
+ */
548
+ get rowDetailTemplate() {
549
+ return this.nativeElement ? this.nativeElement.rowDetailTemplate : undefined;
550
+ }
551
+ set rowDetailTemplate(value) {
552
+ if (this.nativeElement) {
553
+ this.nativeElement.rowDetailTemplate = value;
554
+ }
555
+ }
556
+ /** Sets or gets whether when hovering a cell with truncated content, a tooltip with the full content will be shown.
557
+ * Property type: any[]
558
+ */
559
+ get selected() {
560
+ return this.nativeElement ? this.nativeElement.selected : undefined;
561
+ }
562
+ set selected(value) {
563
+ if (this.nativeElement) {
564
+ this.nativeElement.selected = value;
565
+ }
566
+ }
567
+ /** Enables or disables HTML virtualization. This functionality allows for only visible rows to be rendered, resulting in an increased Table performance.
568
+ * Property type: boolean
569
+ */
570
+ get selection() {
571
+ return this.nativeElement ? this.nativeElement.selection : undefined;
572
+ }
573
+ set selection(value) {
574
+ if (this.nativeElement) {
575
+ this.nativeElement.selection = value;
576
+ }
577
+ }
578
+ /** undefined
579
+ * Property type: TableSelectionMode | string
580
+ */
581
+ get selectionMode() {
582
+ return this.nativeElement ? this.nativeElement.selectionMode : undefined;
583
+ }
584
+ set selectionMode(value) {
585
+ if (this.nativeElement) {
586
+ this.nativeElement.selectionMode = value;
587
+ }
588
+ }
589
+ /** undefined
590
+ * Property type: boolean
591
+ */
592
+ get selectionByHierarchy() {
593
+ return this.nativeElement ? this.nativeElement.selectionByHierarchy : undefined;
594
+ }
595
+ set selectionByHierarchy(value) {
596
+ if (this.nativeElement) {
597
+ this.nativeElement.selectionByHierarchy = value;
598
+ }
599
+ }
600
+ /** undefined
601
+ * Property type: { (dataSource: any, sortColumns: string[], directions: string[], defaultCompareFunctions: { (firstRecord: any, secondRecord: any): number }[]): void }
602
+ */
603
+ get sort() {
604
+ return this.nativeElement ? this.nativeElement.sort : undefined;
605
+ }
606
+ set sort(value) {
607
+ if (this.nativeElement) {
608
+ this.nativeElement.sort = value;
609
+ }
610
+ }
611
+ /** undefined
612
+ * Property type: TableSortMode | string
613
+ */
614
+ get sortMode() {
615
+ return this.nativeElement ? this.nativeElement.sortMode : undefined;
616
+ }
617
+ set sortMode(value) {
618
+ if (this.nativeElement) {
619
+ this.nativeElement.sortMode = value;
620
+ }
621
+ }
622
+ /** undefined
623
+ * Property type: string[]
624
+ */
625
+ get stateSettings() {
626
+ return this.nativeElement ? this.nativeElement.stateSettings : undefined;
627
+ }
628
+ set stateSettings(value) {
629
+ if (this.nativeElement) {
630
+ this.nativeElement.stateSettings = value;
631
+ }
632
+ }
633
+ /** undefined
634
+ * Property type: string
635
+ */
636
+ get theme() {
637
+ return this.nativeElement ? this.nativeElement.theme : undefined;
638
+ }
639
+ set theme(value) {
640
+ if (this.nativeElement) {
641
+ this.nativeElement.theme = value;
642
+ }
643
+ }
644
+ /** undefined
645
+ * Property type: boolean
646
+ */
647
+ get tooltip() {
648
+ return this.nativeElement ? this.nativeElement.tooltip : undefined;
649
+ }
650
+ set tooltip(value) {
651
+ if (this.nativeElement) {
652
+ this.nativeElement.tooltip = value;
653
+ }
654
+ }
655
+ /** undefined
656
+ * Property type: boolean
657
+ */
658
+ get virtualization() {
659
+ return this.nativeElement ? this.nativeElement.virtualization : undefined;
660
+ }
661
+ set virtualization(value) {
662
+ if (this.nativeElement) {
663
+ this.nativeElement.virtualization = value;
664
+ }
665
+ }
666
+ // Gets the properties of the React component.
667
+ get properties() {
668
+ return ["autoLoadState", "autoSaveState", "columnGroups", "columnMinWidth", "columnReorder", "columnResize", "columnResizeNormalize", "columnResizeFeedback", "columns", "conditionalFormatting", "columnMenu", "columnSizeMode", "conditionalFormattingButton", "deferredScrollDelay", "dataRowId", "dataSource", "dataSourceSettings", "dataTransform", "disabled", "editing", "editMode", "expandHierarchy", "filtering", "filterRow", "filterOperator", "filterTemplate", "footerRow", "formulas", "freezeFooter", "freezeHeader", "grouping", "groupFormatFunction", "headerRow", "keyboardNavigation", "hideSelectionColumn", "loadColumnStateBehavior", "locale", "messages", "onCellRender", "onColumnRender", "onInit", "onLoad", "onUpdateComplete", "pageSize", "pageIndex", "paging", "rightToLeft", "rowDetailTemplate", "selected", "selection", "selectionMode", "selectionByHierarchy", "sort", "sortMode", "stateSettings", "theme", "tooltip", "virtualization"];
669
+ }
670
+ // Gets the events of the React component.
671
+ get eventListeners() {
672
+ return ["onCellBeginEdit", "onCellClick", "onCellEndEdit", "onChange", "onCollapse", "onExpand", "onColumnClick", "onCloseColumnMenu", "onColumnResize", "onFilter", "onGroup", "onOpenColumnMenu", "onPage", "onRowBeginEdit", "onRowEndEdit", "onSort", "onCreate", "onReady"];
673
+ }
674
+ /** Adds a new row. When you invoke the method, pass a JSON object with the row's data.
675
+ * @param {any} data. JSON object with the new row's data. Sample JSON: {firstName: 'Peter', lastName: 'Fuller'}.
676
+ */
677
+ addRow(data) {
678
+ if (this.nativeElement.isRendered) {
679
+ this.nativeElement.addRow(data);
680
+ }
681
+ else {
682
+ this.nativeElement.whenRendered(() => {
683
+ this.nativeElement.addRow(data);
684
+ });
685
+ }
686
+ }
687
+ /** Adds a filter to a specific column.
688
+ * @param {string} dataField. The column's data field.
689
+ * @param {any} filter. FilterGroup object or a Filter expression. Filter expression like: 'startsWith B'. Example 2: ['contains Andrew or contains Nancy'], Example 3: ['quantity', '<= 3 and >= 8']. Filter conditions which you can use in the expressions: '=', 'EQUAL','<>', 'NOT_EQUAL', '!=', '<', 'LESS_THAN','>', 'GREATER_THAN', '<=', 'LESS_THAN_OR_EQUAL', '>=', 'GREATER_THAN_OR_EQUAL','starts with', 'STARTS_WITH','ends with', 'ENDS_WITH', '', 'EMPTY', 'CONTAINS','DOES_NOT_CONTAIN', 'NULL','NOT_NULL'
690
+ */
691
+ addFilter(dataField, filter) {
692
+ if (this.nativeElement.isRendered) {
693
+ this.nativeElement.addFilter(dataField, filter);
694
+ }
695
+ else {
696
+ this.nativeElement.whenRendered(() => {
697
+ this.nativeElement.addFilter(dataField, filter);
698
+ });
699
+ }
700
+ }
701
+ /** Groups by a column.
702
+ * @param {string} dataField. The column's data field.
703
+ */
704
+ addGroup(dataField) {
705
+ if (this.nativeElement.isRendered) {
706
+ this.nativeElement.addGroup(dataField);
707
+ }
708
+ else {
709
+ this.nativeElement.whenRendered(() => {
710
+ this.nativeElement.addGroup(dataField);
711
+ });
712
+ }
713
+ }
714
+ /** Begins an edit operation.
715
+ * @param {string | number} row. The id of the row to edit.
716
+ * @param {string} dataField?. The dataField of the cell's column. May be omitted when <strong>editMode</strong> is <em>'row'</em>.
717
+ */
718
+ beginEdit(row, dataField) {
719
+ if (this.nativeElement.isRendered) {
720
+ this.nativeElement.beginEdit(row, dataField);
721
+ }
722
+ else {
723
+ this.nativeElement.whenRendered(() => {
724
+ this.nativeElement.beginEdit(row, dataField);
725
+ });
726
+ }
727
+ }
728
+ /** Begins an update operation. Suspends all table refreshes and renders.
729
+ */
730
+ beginUpdate() {
731
+ if (this.nativeElement.isRendered) {
732
+ this.nativeElement.beginUpdate();
733
+ }
734
+ else {
735
+ this.nativeElement.whenRendered(() => {
736
+ this.nativeElement.beginUpdate();
737
+ });
738
+ }
739
+ }
740
+ /** Ends the current edit operation and discards changes.
741
+ */
742
+ cancelEdit() {
743
+ if (this.nativeElement.isRendered) {
744
+ this.nativeElement.cancelEdit();
745
+ }
746
+ else {
747
+ this.nativeElement.whenRendered(() => {
748
+ this.nativeElement.cancelEdit();
749
+ });
750
+ }
751
+ }
752
+ /** Clears applied filters.
753
+ */
754
+ clearFilters() {
755
+ if (this.nativeElement.isRendered) {
756
+ this.nativeElement.clearFilters();
757
+ }
758
+ else {
759
+ this.nativeElement.whenRendered(() => {
760
+ this.nativeElement.clearFilters();
761
+ });
762
+ }
763
+ }
764
+ /** Clears grouping.
765
+ */
766
+ clearGrouping() {
767
+ if (this.nativeElement.isRendered) {
768
+ this.nativeElement.clearGrouping();
769
+ }
770
+ else {
771
+ this.nativeElement.whenRendered(() => {
772
+ this.nativeElement.clearGrouping();
773
+ });
774
+ }
775
+ }
776
+ /** Clears selection.
777
+ */
778
+ clearSelection() {
779
+ if (this.nativeElement.isRendered) {
780
+ this.nativeElement.clearSelection();
781
+ }
782
+ else {
783
+ this.nativeElement.whenRendered(() => {
784
+ this.nativeElement.clearSelection();
785
+ });
786
+ }
787
+ }
788
+ /** Clears the Table sorting.
789
+ */
790
+ clearSort() {
791
+ if (this.nativeElement.isRendered) {
792
+ this.nativeElement.clearSort();
793
+ }
794
+ else {
795
+ this.nativeElement.whenRendered(() => {
796
+ this.nativeElement.clearSort();
797
+ });
798
+ }
799
+ }
800
+ /** Collapses all rows (in tree mode).
801
+ */
802
+ collapseAllRows() {
803
+ if (this.nativeElement.isRendered) {
804
+ this.nativeElement.collapseAllRows();
805
+ }
806
+ else {
807
+ this.nativeElement.whenRendered(() => {
808
+ this.nativeElement.collapseAllRows();
809
+ });
810
+ }
811
+ }
812
+ /** Collapses all groups (in tree mode).
813
+ */
814
+ collapseAllGroups() {
815
+ if (this.nativeElement.isRendered) {
816
+ this.nativeElement.collapseAllGroups();
817
+ }
818
+ else {
819
+ this.nativeElement.whenRendered(() => {
820
+ this.nativeElement.collapseAllGroups();
821
+ });
822
+ }
823
+ }
824
+ /** Collapses all row details. Rows that have details defined via the rowDetailTemplate will be collapsed.
825
+ */
826
+ collapseAllRowDetails() {
827
+ if (this.nativeElement.isRendered) {
828
+ this.nativeElement.collapseAllRowDetails();
829
+ }
830
+ else {
831
+ this.nativeElement.whenRendered(() => {
832
+ this.nativeElement.collapseAllRowDetails();
833
+ });
834
+ }
835
+ }
836
+ /** Collapses a group.
837
+ * @param {string} index. The group's hierarchical index.
838
+ */
839
+ collapseGroup(index) {
840
+ if (this.nativeElement.isRendered) {
841
+ this.nativeElement.collapseGroup(index);
842
+ }
843
+ else {
844
+ this.nativeElement.whenRendered(() => {
845
+ this.nativeElement.collapseGroup(index);
846
+ });
847
+ }
848
+ }
849
+ /** Collapses a row (in tree mode).
850
+ * @param {string | number} rowId. The id of the row to collapse.
851
+ */
852
+ collapseRow(rowId) {
853
+ if (this.nativeElement.isRendered) {
854
+ this.nativeElement.collapseRow(rowId);
855
+ }
856
+ else {
857
+ this.nativeElement.whenRendered(() => {
858
+ this.nativeElement.collapseRow(rowId);
859
+ });
860
+ }
861
+ }
862
+ /** Disables a selection of a row. When the 'selection' property is set to 'true', selection is enabled for all rows by default.
863
+ * @param {string | number | (string | number)[]} rowId. The id of the row (or an array of row ids) to select.
864
+ */
865
+ disableSelect(rowId) {
866
+ if (this.nativeElement.isRendered) {
867
+ this.nativeElement.disableSelect(rowId);
868
+ }
869
+ else {
870
+ this.nativeElement.whenRendered(() => {
871
+ this.nativeElement.disableSelect(rowId);
872
+ });
873
+ }
874
+ }
875
+ /** Enables a selection of a row, if it was previously disabled through a 'disableSelect' method call. When the 'selection' property is set to 'true', selection is enabled for all rows by default.
876
+ * @param {string | number | (string | number)[]} rowId. The id of the row (or an array of row ids) to select.
877
+ */
878
+ enableSelect(rowId) {
879
+ if (this.nativeElement.isRendered) {
880
+ this.nativeElement.enableSelect(rowId);
881
+ }
882
+ else {
883
+ this.nativeElement.whenRendered(() => {
884
+ this.nativeElement.enableSelect(rowId);
885
+ });
886
+ }
887
+ }
888
+ /** Ends the current edit operation and saves changes.
889
+ */
890
+ endEdit() {
891
+ if (this.nativeElement.isRendered) {
892
+ this.nativeElement.endEdit();
893
+ }
894
+ else {
895
+ this.nativeElement.whenRendered(() => {
896
+ this.nativeElement.endEdit();
897
+ });
898
+ }
899
+ }
900
+ /** Ends an update operation. Resumes all table refreshes and renders. Re-renders the Table.
901
+ * @param {boolean} refresh?. Optionally you can pass 'false' in case you need to manually call the 'refresh' method. By default, the table is re-rendered.
902
+ */
903
+ endUpdate(refresh) {
904
+ if (this.nativeElement.isRendered) {
905
+ this.nativeElement.endUpdate(refresh);
906
+ }
907
+ else {
908
+ this.nativeElement.whenRendered(() => {
909
+ this.nativeElement.endUpdate(refresh);
910
+ });
911
+ }
912
+ }
913
+ /** Expands all rows (in tree mode).
914
+ */
915
+ expandAllRows() {
916
+ if (this.nativeElement.isRendered) {
917
+ this.nativeElement.expandAllRows();
918
+ }
919
+ else {
920
+ this.nativeElement.whenRendered(() => {
921
+ this.nativeElement.expandAllRows();
922
+ });
923
+ }
924
+ }
925
+ /** Expands all groups (in tree mode).
926
+ */
927
+ expandAllGroups() {
928
+ if (this.nativeElement.isRendered) {
929
+ this.nativeElement.expandAllGroups();
930
+ }
931
+ else {
932
+ this.nativeElement.whenRendered(() => {
933
+ this.nativeElement.expandAllGroups();
934
+ });
935
+ }
936
+ }
937
+ /** Expands all row details. Rows that have details defined via rowDetailTemplate will be expanded.
938
+ */
939
+ expandAllRowDetails() {
940
+ if (this.nativeElement.isRendered) {
941
+ this.nativeElement.expandAllRowDetails();
942
+ }
943
+ else {
944
+ this.nativeElement.whenRendered(() => {
945
+ this.nativeElement.expandAllRowDetails();
946
+ });
947
+ }
948
+ }
949
+ /** Expands a group.
950
+ * @param {string} index. The group's hierarchical index.
951
+ */
952
+ expandGroup(index) {
953
+ if (this.nativeElement.isRendered) {
954
+ this.nativeElement.expandGroup(index);
955
+ }
956
+ else {
957
+ this.nativeElement.whenRendered(() => {
958
+ this.nativeElement.expandGroup(index);
959
+ });
960
+ }
961
+ }
962
+ /** Expands a row (in tree mode).
963
+ * @param {string | number} rowId. The id of the row to expand.
964
+ */
965
+ expandRow(rowId) {
966
+ if (this.nativeElement.isRendered) {
967
+ this.nativeElement.expandRow(rowId);
968
+ }
969
+ else {
970
+ this.nativeElement.whenRendered(() => {
971
+ this.nativeElement.expandRow(rowId);
972
+ });
973
+ }
974
+ }
975
+ /** Exports the Table's data.
976
+ * @param {string} dataFormat. The file format to export to. Supported formats: 'csv', 'html', 'json', 'pdf', 'tsv', 'xlsx', 'xml'.
977
+ * @param {string} fileName?. The name of the file to export to
978
+ * @param {boolean} exportFiltered?. If set to true, exports only filtered records
979
+ * @param {Function} callback?. A callback function to pass the exported data to (if fileName is not provided)
980
+ * @returns {any}
981
+ */
982
+ exportData(dataFormat, fileName, exportFiltered, callback) {
983
+ const result = this.nativeElement.exportData(dataFormat, fileName, exportFiltered, callback);
984
+ return result;
985
+ }
986
+ /** Returns an array of selected row ids.
987
+ * @returns {(string | number)[]}
988
+ */
989
+ getSelection() {
990
+ const result = this.nativeElement.getSelection();
991
+ return result;
992
+ }
993
+ /** Returns the Table's state, containing information about columns, expanded rows, selected rows, applied fitering, grouping, and sorted columns. It can then be stored or passed to the method loadState.
994
+ * @returns {any}
995
+ */
996
+ getState() {
997
+ const result = this.nativeElement.getState();
998
+ return result;
999
+ }
1000
+ /** Returns the value of a cell.
1001
+ * @param {string | number} row. The id of the cell's row.
1002
+ * @param {string} dataField. The dataField of the cell's column.
1003
+ * @returns {any}
1004
+ */
1005
+ getValue(row, dataField) {
1006
+ const result = this.nativeElement.getValue(row, dataField);
1007
+ return result;
1008
+ }
1009
+ /** Gets a column property.
1010
+ * @param {string} columnDataField. Column field name.
1011
+ * @param {string} propertyName. Column property name.
1012
+ * @returns {any}
1013
+ */
1014
+ getColumnProperty(columnDataField, propertyName) {
1015
+ const result = this.nativeElement.getColumnProperty(columnDataField, propertyName);
1016
+ return result;
1017
+ }
1018
+ /** Checks whether a group is expanded and returns true or false. false is returned when the group index is undefined, too.
1019
+ * @param {string} index. The group's hierarchical index.
1020
+ * @returns {boolean}
1021
+ */
1022
+ isGroupExpanded(index) {
1023
+ const result = this.nativeElement.isGroupExpanded(index);
1024
+ return result;
1025
+ }
1026
+ /** Loads the Table's state. Information about columns, expanded rows, selected rows, applied fitering, grouping, and sorted columns is loaded, based on the value of the stateSettings property.
1027
+ * @param {any} state?. An object returned by one of the methods <strong>getState</strong> or <strong>saveState</strong>. If a state is not passed, the method tries to load the state from the browser's localStorage.
1028
+ */
1029
+ loadState(state) {
1030
+ if (this.nativeElement.isRendered) {
1031
+ this.nativeElement.loadState(state);
1032
+ }
1033
+ else {
1034
+ this.nativeElement.whenRendered(() => {
1035
+ this.nativeElement.loadState(state);
1036
+ });
1037
+ }
1038
+ }
1039
+ /** Navigates to a page.
1040
+ * @param {number} pageIndex. The zero-based page index to navigate to.
1041
+ */
1042
+ navigateTo(pageIndex) {
1043
+ if (this.nativeElement.isRendered) {
1044
+ this.nativeElement.navigateTo(pageIndex);
1045
+ }
1046
+ else {
1047
+ this.nativeElement.whenRendered(() => {
1048
+ this.nativeElement.navigateTo(pageIndex);
1049
+ });
1050
+ }
1051
+ }
1052
+ /** Refreshes the table.
1053
+ */
1054
+ refresh() {
1055
+ if (this.nativeElement.isRendered) {
1056
+ this.nativeElement.refresh();
1057
+ }
1058
+ else {
1059
+ this.nativeElement.whenRendered(() => {
1060
+ this.nativeElement.refresh();
1061
+ });
1062
+ }
1063
+ }
1064
+ /** Removes filters applied to a specific column.
1065
+ * @param {string} dataField. The column's data field.
1066
+ */
1067
+ removeFilter(dataField) {
1068
+ if (this.nativeElement.isRendered) {
1069
+ this.nativeElement.removeFilter(dataField);
1070
+ }
1071
+ else {
1072
+ this.nativeElement.whenRendered(() => {
1073
+ this.nativeElement.removeFilter(dataField);
1074
+ });
1075
+ }
1076
+ }
1077
+ /** Removes grouping by a column.
1078
+ * @param {string} dataField. The column's data field.
1079
+ */
1080
+ removeGroup(dataField) {
1081
+ if (this.nativeElement.isRendered) {
1082
+ this.nativeElement.removeGroup(dataField);
1083
+ }
1084
+ else {
1085
+ this.nativeElement.whenRendered(() => {
1086
+ this.nativeElement.removeGroup(dataField);
1087
+ });
1088
+ }
1089
+ }
1090
+ /** Removes a row by its id.
1091
+ * @param {string | number} row. The id of the cell's row.
1092
+ */
1093
+ removeRow(row) {
1094
+ if (this.nativeElement.isRendered) {
1095
+ this.nativeElement.removeRow(row);
1096
+ }
1097
+ else {
1098
+ this.nativeElement.whenRendered(() => {
1099
+ this.nativeElement.removeRow(row);
1100
+ });
1101
+ }
1102
+ }
1103
+ /** Saves the Table's state. Information about columns, expanded rows, selected rows, applied fitering, grouping, and sorted columns is saved, based on the value of the stateSettings property.
1104
+ * @returns {any}
1105
+ */
1106
+ saveState() {
1107
+ const result = this.nativeElement.saveState();
1108
+ return result;
1109
+ }
1110
+ /** Selects one or more rows.
1111
+ * @param {string | number | (string | number)[]} rowId. The id of the row (or an array of row ids) to select.
1112
+ */
1113
+ select(rowId) {
1114
+ if (this.nativeElement.isRendered) {
1115
+ this.nativeElement.select(rowId);
1116
+ }
1117
+ else {
1118
+ this.nativeElement.whenRendered(() => {
1119
+ this.nativeElement.select(rowId);
1120
+ });
1121
+ }
1122
+ }
1123
+ /** Sets the value of a cell.
1124
+ * @param {string | number} row. The id of the cell's row.
1125
+ * @param {string} dataField. The dataField of the cell's column.
1126
+ * @param {any} value. The new value of the cell.
1127
+ */
1128
+ setValue(row, dataField, value) {
1129
+ if (this.nativeElement.isRendered) {
1130
+ this.nativeElement.setValue(row, dataField, value);
1131
+ }
1132
+ else {
1133
+ this.nativeElement.whenRendered(() => {
1134
+ this.nativeElement.setValue(row, dataField, value);
1135
+ });
1136
+ }
1137
+ }
1138
+ /** Sorts the Table by a column.
1139
+ * @param {string} columnDataField. Column field name.
1140
+ * @param {string} sortOrder?. Sort order. Possible values: 'asc' (ascending), 'desc' (descending), and null (removes sorting by column). If not provided, toggles the sorting.
1141
+ */
1142
+ sortBy(columnDataField, sortOrder) {
1143
+ if (this.nativeElement.isRendered) {
1144
+ this.nativeElement.sortBy(columnDataField, sortOrder);
1145
+ }
1146
+ else {
1147
+ this.nativeElement.whenRendered(() => {
1148
+ this.nativeElement.sortBy(columnDataField, sortOrder);
1149
+ });
1150
+ }
1151
+ }
1152
+ /** Sets a column property.
1153
+ * @param {string} columnDataField. Column field name.
1154
+ * @param {string} propertyName. Column property name.
1155
+ * @param {any} propertyValue. Property value.
1156
+ */
1157
+ setColumnProperty(columnDataField, propertyName, propertyValue) {
1158
+ if (this.nativeElement.isRendered) {
1159
+ this.nativeElement.setColumnProperty(columnDataField, propertyName, propertyValue);
1160
+ }
1161
+ else {
1162
+ this.nativeElement.whenRendered(() => {
1163
+ this.nativeElement.setColumnProperty(columnDataField, propertyName, propertyValue);
1164
+ });
1165
+ }
1166
+ }
1167
+ /** Updates a table row. The method expects two parameters - row id and JSON object with the new row data.
1168
+ * @param {string | number} rowId. The id of the row.
1169
+ * @param {any} data. JSON object with the new row's data. Example: {firstName: 'Peter', lastName: 'Fuller'}.
1170
+ */
1171
+ updateRow(rowId, data) {
1172
+ if (this.nativeElement.isRendered) {
1173
+ this.nativeElement.updateRow(rowId, data);
1174
+ }
1175
+ else {
1176
+ this.nativeElement.whenRendered(() => {
1177
+ this.nativeElement.updateRow(rowId, data);
1178
+ });
1179
+ }
1180
+ }
1181
+ /** Unselects one or more rows.
1182
+ * @param {string | number | (string | number)[]} rowId. The id of the row (or an array of row ids) to unselect.
1183
+ */
1184
+ unselect(rowId) {
1185
+ if (this.nativeElement.isRendered) {
1186
+ this.nativeElement.unselect(rowId);
1187
+ }
1188
+ else {
1189
+ this.nativeElement.whenRendered(() => {
1190
+ this.nativeElement.unselect(rowId);
1191
+ });
1192
+ }
1193
+ }
1194
+ componentDidRender(initialize) {
1195
+ const that = this;
1196
+ const props = {};
1197
+ const events = {};
1198
+ let styles = null;
1199
+ for (let prop in that.props) {
1200
+ if (prop === 'children') {
1201
+ continue;
1202
+ }
1203
+ if (prop === 'style') {
1204
+ styles = that.props[prop];
1205
+ continue;
1206
+ }
1207
+ if (prop.startsWith('on') && that.properties.indexOf(prop) === -1) {
1208
+ events[prop] = that.props[prop];
1209
+ continue;
1210
+ }
1211
+ props[prop] = that.props[prop];
1212
+ }
1213
+ if (initialize) {
1214
+ that.nativeElement = this.componentRef.current;
1215
+ }
1216
+ for (let prop in props) {
1217
+ if (prop === 'class' || prop === 'className') {
1218
+ const classNames = props[prop].trim().split(' ');
1219
+ for (let className in classNames) {
1220
+ if (!that.nativeElement.classList.contains(classNames[className]) && classNames[className] !== "") {
1221
+ that.nativeElement.classList.add(classNames[className]);
1222
+ }
1223
+ }
1224
+ continue;
1225
+ }
1226
+ if (props[prop] !== that.nativeElement[prop]) {
1227
+ const normalizeProp = (str) => {
1228
+ return str.replace(/-([a-z])/g, function (g) {
1229
+ return g[1].toUpperCase();
1230
+ });
1231
+ };
1232
+ if (prop === 'hover' || prop === 'active' || prop === 'focus' || prop === 'selected') {
1233
+ that.nativeElement.setAttribute(prop, '');
1234
+ }
1235
+ const normalizedProp = normalizeProp(prop);
1236
+ that.nativeElement[normalizedProp] = props[prop];
1237
+ }
1238
+ }
1239
+ for (let eventName in events) {
1240
+ that[eventName] = events[eventName];
1241
+ that.nativeElement[eventName.toLowerCase()] = events[eventName];
1242
+ }
1243
+ if (initialize) {
1244
+ Smart.Render();
1245
+ if (that.onCreate) {
1246
+ that.onCreate();
1247
+ }
1248
+ that.nativeElement.whenRendered(() => {
1249
+ if (that.onReady) {
1250
+ that.onReady();
1251
+ }
1252
+ });
1253
+ }
1254
+ // setup styles.
1255
+ if (styles) {
1256
+ for (let styleName in styles) {
1257
+ that.nativeElement.style[styleName] = styles[styleName];
1258
+ }
1259
+ }
1260
+ }
1261
+ componentDidMount() {
1262
+ this.componentDidRender(true);
1263
+ }
1264
+ componentDidUpdate() {
1265
+ this.componentDidRender(false);
1266
+ }
1267
+ componentWillUnmount() {
1268
+ const that = this;
1269
+ if (!that.nativeElement) {
1270
+ return;
1271
+ }
1272
+ that.nativeElement.whenRenderedCallbacks = [];
1273
+ for (let i = 0; i < that.eventListeners.length; i++) {
1274
+ const eventName = that.eventListeners[i];
1275
+ that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
1276
+ }
1277
+ }
1278
+ render() {
1279
+ return (React.createElement("smart-table", { ref: this.componentRef }, this.props.children));
1280
+ }
1281
+ }
36
1282
 
37
- const Smart = window.Smart;
38
- /**
39
- Table is an alternative of the HTMLTableElement.
40
- */
41
- class Table 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 = 'Table' + Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
50
- }
51
- return this._id;
52
- }
53
- /** Enables or disables auto load state from the browser's localStorage. Information about columns, expanded rows, selected rows, applied fitering, grouping, and sorted columns is loaded, based on the value of the stateSettings property.
54
- * Property type: boolean
55
- */
56
- get autoLoadState() {
57
- return this.nativeElement ? this.nativeElement.autoLoadState : undefined;
58
- }
59
- set autoLoadState(value) {
60
- if (this.nativeElement) {
61
- this.nativeElement.autoLoadState = value;
62
- }
63
- }
64
- /** Enables or disables auto save state to the browser's localStorage. Information about columns, expanded rows, selected rows, applied fitering, grouping, and sorted columns is saved, based on the value of the stateSettings property.
65
- * Property type: boolean
66
- */
67
- get autoSaveState() {
68
- return this.nativeElement ? this.nativeElement.autoSaveState : undefined;
69
- }
70
- set autoSaveState(value) {
71
- if (this.nativeElement) {
72
- this.nativeElement.autoSaveState = value;
73
- }
74
- }
75
- /** Sets or gets a list of column groups that constitute the column header hierarchy. Note: when column header hierarchy is created, column resizing and auto-sizing is not supported.
76
- * Property type: TableColumnGroup[]
77
- */
78
- get columnGroups() {
79
- return this.nativeElement ? this.nativeElement.columnGroups : undefined;
80
- }
81
- set columnGroups(value) {
82
- if (this.nativeElement) {
83
- this.nativeElement.columnGroups = value;
84
- }
85
- }
86
- /** Sets or gets the min width of columns when columnSizeMode is 'auto' or when resizing columns. This property has no effect on columns with programmatically set width.
87
- * Property type: string | number
88
- */
89
- get columnMinWidth() {
90
- return this.nativeElement ? this.nativeElement.columnMinWidth : undefined;
91
- }
92
- set columnMinWidth(value) {
93
- if (this.nativeElement) {
94
- this.nativeElement.columnMinWidth = value;
95
- }
96
- }
97
- /** Sets or gets whether the reordering of columns is enabled.
98
- * Property type: boolean
99
- */
100
- get columnReorder() {
101
- return this.nativeElement ? this.nativeElement.columnReorder : undefined;
102
- }
103
- set columnReorder(value) {
104
- if (this.nativeElement) {
105
- this.nativeElement.columnReorder = value;
106
- }
107
- }
108
- /** Sets or gets whether the resizing of columns is enabled. Note: column sizes continue to adhere to the behavior of the standard HTML table element's table-layout: fixed, upon which smart-table is based.
109
- * Property type: boolean
110
- */
111
- get columnResize() {
112
- return this.nativeElement ? this.nativeElement.columnResize : undefined;
113
- }
114
- set columnResize(value) {
115
- if (this.nativeElement) {
116
- this.nativeElement.columnResize = value;
117
- }
118
- }
119
- /** This property affects the table sizing, when the columnSizeMode is 'default'. When 'columnResizeNormalize' is false, the Table will add an additional TH element, if all table columns have the 'width' property set. This is done in order to maintain your width settings. Otherwise, when the property is set to true, the Table will auto-fill the remaining space similar to the layout of standard HTML Tables.
120
- * Property type: boolean
121
- */
122
- get columnResizeNormalize() {
123
- return this.nativeElement ? this.nativeElement.columnResizeNormalize : undefined;
124
- }
125
- set columnResizeNormalize(value) {
126
- if (this.nativeElement) {
127
- this.nativeElement.columnResizeNormalize = value;
128
- }
129
- }
130
- /** Sets or gets whether when resizing a column, a feedback showing the new column width in px will be displayed.
131
- * Property type: boolean
132
- */
133
- get columnResizeFeedback() {
134
- return this.nativeElement ? this.nativeElement.columnResizeFeedback : undefined;
135
- }
136
- set columnResizeFeedback(value) {
137
- if (this.nativeElement) {
138
- this.nativeElement.columnResizeFeedback = value;
139
- }
140
- }
141
- /** Describes the columns properties.
142
- * Property type: TableColumn[]
143
- */
144
- get columns() {
145
- return this.nativeElement ? this.nativeElement.columns : undefined;
146
- }
147
- set columns(value) {
148
- if (this.nativeElement) {
149
- this.nativeElement.columns = value;
150
- }
151
- }
152
- /** Sets or gets details about conditional formatting to be applied to the Table's cells.
153
- * Property type: TableConditionalFormatting[]
154
- */
155
- get conditionalFormatting() {
156
- return this.nativeElement ? this.nativeElement.conditionalFormatting : undefined;
157
- }
158
- set conditionalFormatting(value) {
159
- if (this.nativeElement) {
160
- this.nativeElement.conditionalFormatting = value;
161
- }
162
- }
163
- /** Sets or gets the column menu. When you set this property to true, each column will have a column menu. From the column menu, you will be able to sort, filter, show or hide columns.
164
- * Property type: boolean
165
- */
166
- get columnMenu() {
167
- return this.nativeElement ? this.nativeElement.columnMenu : undefined;
168
- }
169
- set columnMenu(value) {
170
- if (this.nativeElement) {
171
- this.nativeElement.columnMenu = value;
172
- }
173
- }
174
- /** Sets or gets the column sizing behavior. In 'auto' mode Columns are automatically sized based on their content and the value of the columnMinWidth property, unless there is not enough space in the Table, in which case ellipses are shown. User-set static column width is still respected. In 'default' mode Columns are sized according to the rules of the standard HTML table element's table-layout: fixed. Custom width can also be applied to columns in this case by setting the column width property.
175
- * Property type: TableColumnSizeMode | string
176
- */
177
- get columnSizeMode() {
178
- return this.nativeElement ? this.nativeElement.columnSizeMode : undefined;
179
- }
180
- set columnSizeMode(value) {
181
- if (this.nativeElement) {
182
- this.nativeElement.columnSizeMode = value;
183
- }
184
- }
185
- /** Sets or gets whether the "Conditional Formatting" button appears in the Table's header (toolbar). Clicking this button opens a dialog with formatting options.
186
- * Property type: boolean
187
- */
188
- get conditionalFormattingButton() {
189
- return this.nativeElement ? this.nativeElement.conditionalFormattingButton : undefined;
190
- }
191
- set conditionalFormattingButton(value) {
192
- if (this.nativeElement) {
193
- this.nativeElement.conditionalFormattingButton = value;
194
- }
195
- }
196
- /** This property determines the time in milliseconds after which the Table data is updated, when you vertically scroll.
197
- * Property type: number
198
- */
199
- get deferredScrollDelay() {
200
- return this.nativeElement ? this.nativeElement.deferredScrollDelay : undefined;
201
- }
202
- set deferredScrollDelay(value) {
203
- if (this.nativeElement) {
204
- this.nativeElement.deferredScrollDelay = value;
205
- }
206
- }
207
- /** When binding the dataSource property directly to an array (as opposed to an instance of JQX.DataAdapter), sets or gets the name of the data field in the source array to bind row ids to.
208
- * Property type: string
209
- */
210
- get dataRowId() {
211
- return this.nativeElement ? this.nativeElement.dataRowId : undefined;
212
- }
213
- set dataRowId(value) {
214
- if (this.nativeElement) {
215
- this.nativeElement.dataRowId = value;
216
- }
217
- }
218
- /** Determines the data source of the table component. The data source of the Table can be a regular Array or a DataAdapter instance. You can read more about the dataAdapter here - https://www.htmlelements.com/docs/data-adapter/.
219
- * Property type: any
220
- */
221
- get dataSource() {
222
- return this.nativeElement ? this.nativeElement.dataSource : undefined;
223
- }
224
- set dataSource(value) {
225
- if (this.nativeElement) {
226
- this.nativeElement.dataSource = value;
227
- }
228
- }
229
- /** Sets the grid's data source settings when the dataSource property is set to an Array or URL.
230
- * Property type: TableDataSourceSettings
231
- */
232
- get dataSourceSettings() {
233
- return this.nativeElement ? this.nativeElement.dataSourceSettings : undefined;
234
- }
235
- set dataSourceSettings(value) {
236
- if (this.nativeElement) {
237
- this.nativeElement.dataSourceSettings = value;
238
- }
239
- }
240
- /** Disables the interaction with the element.
241
- * Property type: { (record: any): void }
242
- */
243
- get dataTransform() {
244
- return this.nativeElement ? this.nativeElement.dataTransform : undefined;
245
- }
246
- set dataTransform(value) {
247
- if (this.nativeElement) {
248
- this.nativeElement.dataTransform = value;
249
- }
250
- }
251
- /** Sets or gets whether the Table can be edited.
252
- * Property type: boolean
253
- */
254
- get disabled() {
255
- return this.nativeElement ? this.nativeElement.disabled : undefined;
256
- }
257
- set disabled(value) {
258
- if (this.nativeElement) {
259
- this.nativeElement.disabled = value;
260
- }
261
- }
262
- /** Sets or gets the edit mode.
263
- * Property type: boolean
264
- */
265
- get editing() {
266
- return this.nativeElement ? this.nativeElement.editing : undefined;
267
- }
268
- set editing(value) {
269
- if (this.nativeElement) {
270
- this.nativeElement.editing = value;
271
- }
272
- }
273
- /** Sets or gets whether Row hierarchies are expanded by default, when created. Use this property when you want your groups to be expanded by default, when the Table is grouped or when you use the Table in tree mode.
274
- * Property type: TableEditMode | string
275
- */
276
- get editMode() {
277
- return this.nativeElement ? this.nativeElement.editMode : undefined;
278
- }
279
- set editMode(value) {
280
- if (this.nativeElement) {
281
- this.nativeElement.editMode = value;
282
- }
283
- }
284
- /** Sets or gets whether the Table can be filtered. By default, the Table can be filtered by all string and numeric columns through a filter input in the header.
285
- * Property type: boolean
286
- */
287
- get expandHierarchy() {
288
- return this.nativeElement ? this.nativeElement.expandHierarchy : undefined;
289
- }
290
- set expandHierarchy(value) {
291
- if (this.nativeElement) {
292
- this.nativeElement.expandHierarchy = value;
293
- }
294
- }
295
- /** Sets or gets whether the Table can be filtered via a filter row.
296
- * Property type: boolean
297
- */
298
- get filtering() {
299
- return this.nativeElement ? this.nativeElement.filtering : undefined;
300
- }
301
- set filtering(value) {
302
- if (this.nativeElement) {
303
- this.nativeElement.filtering = value;
304
- }
305
- }
306
- /** Sets or gets the Table's filter operator. It determines whether 'and' or 'or' is used when applying column filters - cellvalue1 && cellvalue2 vs cellvalue1 || cellvalue2
307
- * Property type: boolean
308
- */
309
- get filterRow() {
310
- return this.nativeElement ? this.nativeElement.filterRow : undefined;
311
- }
312
- set filterRow(value) {
313
- if (this.nativeElement) {
314
- this.nativeElement.filterRow = value;
315
- }
316
- }
317
- /** Sets or gets the id of an HTML template element to be applied as a custom filter template.
318
- * Property type: boolean
319
- */
320
- get filterOperator() {
321
- return this.nativeElement ? this.nativeElement.filterOperator : undefined;
322
- }
323
- set filterOperator(value) {
324
- if (this.nativeElement) {
325
- this.nativeElement.filterOperator = value;
326
- }
327
- }
328
- /** Sets or gets the id of an HTML template element to be applied as footer row(s).
329
- * Property type: string
330
- */
331
- get filterTemplate() {
332
- return this.nativeElement ? this.nativeElement.filterTemplate : undefined;
333
- }
334
- set filterTemplate(value) {
335
- if (this.nativeElement) {
336
- this.nativeElement.filterTemplate = value;
337
- }
338
- }
339
- /** Sets or gets whether Excel-like formulas can be passed as cell values. Formulas are always preceded by the = sign and are re-evaluated when cell values are changed. This feature depends on the third-party free plug-in formula-parser (the file formula-parser.min.js has to be referenced).
340
- * Property type: string
341
- */
342
- get footerRow() {
343
- return this.nativeElement ? this.nativeElement.footerRow : undefined;
344
- }
345
- set footerRow(value) {
346
- if (this.nativeElement) {
347
- this.nativeElement.footerRow = value;
348
- }
349
- }
350
- /** Sets or gets whether the Table's footer is sticky/frozen.
351
- * Property type: boolean
352
- */
353
- get formulas() {
354
- return this.nativeElement ? this.nativeElement.formulas : undefined;
355
- }
356
- set formulas(value) {
357
- if (this.nativeElement) {
358
- this.nativeElement.formulas = value;
359
- }
360
- }
361
- /** Sets or gets whether the Table's column header is sticky/frozen.
362
- * Property type: boolean
363
- */
364
- get freezeFooter() {
365
- return this.nativeElement ? this.nativeElement.freezeFooter : undefined;
366
- }
367
- set freezeFooter(value) {
368
- if (this.nativeElement) {
369
- this.nativeElement.freezeFooter = value;
370
- }
371
- }
372
- /** Sets or gets whether grouping the Table is enabled.
373
- * Property type: boolean
374
- */
375
- get freezeHeader() {
376
- return this.nativeElement ? this.nativeElement.freezeHeader : undefined;
377
- }
378
- set freezeHeader(value) {
379
- if (this.nativeElement) {
380
- this.nativeElement.freezeHeader = value;
381
- }
382
- }
383
- /** Allows to customize the header of the element. The property accepts the id of an HTMLElement, HTMLTemplateElement, function or a string that will be parsed as HTML. When set to a function it contains one argument - the header element of the Table.
384
- * Property type: boolean
385
- */
386
- get grouping() {
387
- return this.nativeElement ? this.nativeElement.grouping : undefined;
388
- }
389
- set grouping(value) {
390
- if (this.nativeElement) {
391
- this.nativeElement.grouping = value;
392
- }
393
- }
394
- /** Sets or gets whether navigation with the keyboard is enabled in the Table.
395
- * Property type: { (settings: { value: any, row: string | number, column: string, template?: any }): void }
396
- */
397
- get groupFormatFunction() {
398
- return this.nativeElement ? this.nativeElement.groupFormatFunction : undefined;
399
- }
400
- set groupFormatFunction(value) {
401
- if (this.nativeElement) {
402
- this.nativeElement.groupFormatFunction = value;
403
- }
404
- }
405
- /** Sets or gets whether the checkboxes are displayed in the selection column.
406
- * Property type: string | HTMLElement | Function
407
- */
408
- get headerRow() {
409
- return this.nativeElement ? this.nativeElement.headerRow : undefined;
410
- }
411
- set headerRow(value) {
412
- if (this.nativeElement) {
413
- this.nativeElement.headerRow = value;
414
- }
415
- }
416
- /** Sets or gets the behavior when loading column settings either via autoLoadState or loadState. Applicable only when stateSettings contains 'columns'.
417
- * Property type: boolean
418
- */
419
- get keyboardNavigation() {
420
- return this.nativeElement ? this.nativeElement.keyboardNavigation : undefined;
421
- }
422
- set keyboardNavigation(value) {
423
- if (this.nativeElement) {
424
- this.nativeElement.keyboardNavigation = value;
425
- }
426
- }
427
- /** Sets or gets the language. Used in conjunction with the property messages.
428
- * Property type: boolean
429
- */
430
- get hideSelectionColumn() {
431
- return this.nativeElement ? this.nativeElement.hideSelectionColumn : undefined;
432
- }
433
- set hideSelectionColumn(value) {
434
- if (this.nativeElement) {
435
- this.nativeElement.hideSelectionColumn = value;
436
- }
437
- }
438
- /** Sets or gets an object specifying strings used in the element that can be localized. Used in conjunction with the property locale.
439
- * Property type: TableLoadColumnStateBehavior | string
440
- */
441
- get loadColumnStateBehavior() {
442
- return this.nativeElement ? this.nativeElement.loadColumnStateBehavior : undefined;
443
- }
444
- set loadColumnStateBehavior(value) {
445
- if (this.nativeElement) {
446
- this.nativeElement.loadColumnStateBehavior = value;
447
- }
448
- }
449
- /** Sets or gets the page size (when paging is enabled).
450
- * Property type: string
451
- */
452
- get locale() {
453
- return this.nativeElement ? this.nativeElement.locale : undefined;
454
- }
455
- set locale(value) {
456
- if (this.nativeElement) {
457
- this.nativeElement.locale = value;
458
- }
459
- }
460
- /** Sets or gets the current (zero-based) page index (when paging is enabled).
461
- * Property type: any
462
- */
463
- get messages() {
464
- return this.nativeElement ? this.nativeElement.messages : undefined;
465
- }
466
- set messages(value) {
467
- if (this.nativeElement) {
468
- this.nativeElement.messages = value;
469
- }
470
- }
471
- /** Sets or gets whether paging is enabled.
472
- * Property type: { (data: any, dataField: string, value: any, cell: HTMLTableCellElement): void }
473
- */
474
- get onCellRender() {
475
- return this.nativeElement ? this.nativeElement.onCellRender : undefined;
476
- }
477
- set onCellRender(value) {
478
- if (this.nativeElement) {
479
- this.nativeElement.onCellRender = value;
480
- }
481
- }
482
- /** Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts.
483
- * Property type: { (dataField: string, headerCell: HTMLTableCellElement): void }
484
- */
485
- get onColumnRender() {
486
- return this.nativeElement ? this.nativeElement.onColumnRender : undefined;
487
- }
488
- set onColumnRender(value) {
489
- if (this.nativeElement) {
490
- this.nativeElement.onColumnRender = value;
491
- }
492
- }
493
- /** Sets or gets a string template to be applied as row detail template. Each cell value in the master row can be placed in the detail row by specifying the cell's data field in double curly brackets (e.g. {{price}}. The details can then be displayed by expanding the row by clicking it.
494
- * Property type: { (): void }
495
- */
496
- get onInit() {
497
- return this.nativeElement ? this.nativeElement.onInit : undefined;
498
- }
499
- set onInit(value) {
500
- if (this.nativeElement) {
501
- this.nativeElement.onInit = value;
502
- }
503
- }
504
- /** Sets or gets an array of the Table's selected row's ids.
505
- * Property type: { (): void }
506
- */
507
- get onLoad() {
508
- return this.nativeElement ? this.nativeElement.onLoad : undefined;
509
- }
510
- set onLoad(value) {
511
- if (this.nativeElement) {
512
- this.nativeElement.onLoad = value;
513
- }
514
- }
515
- /** Sets or gets whether row selection (via checkboxes) is enabled.
516
- * Property type: { (): void }
517
- */
518
- get onUpdateComplete() {
519
- return this.nativeElement ? this.nativeElement.onUpdateComplete : undefined;
520
- }
521
- set onUpdateComplete(value) {
522
- if (this.nativeElement) {
523
- this.nativeElement.onUpdateComplete = value;
524
- }
525
- }
526
- /** Sets or gets the selection mode. Only applicable when selection is enabled.
527
- * Property type: TablePageSize | string
528
- */
529
- get pageSize() {
530
- return this.nativeElement ? this.nativeElement.pageSize : undefined;
531
- }
532
- set pageSize(value) {
533
- if (this.nativeElement) {
534
- this.nativeElement.pageSize = value;
535
- }
536
- }
537
- /** Sets or gets whether row selection (via checkboxes) is hierarchical. When a parent row is selected, all sub rows are selected, too.
538
- * Property type: number
539
- */
540
- get pageIndex() {
541
- return this.nativeElement ? this.nativeElement.pageIndex : undefined;
542
- }
543
- set pageIndex(value) {
544
- if (this.nativeElement) {
545
- this.nativeElement.pageIndex = value;
546
- }
547
- }
548
- /** Determines the sorting mode of the Table.
549
- * Property type: boolean
550
- */
551
- get paging() {
552
- return this.nativeElement ? this.nativeElement.paging : undefined;
553
- }
554
- set paging(value) {
555
- if (this.nativeElement) {
556
- this.nativeElement.paging = value;
557
- }
558
- }
559
- /** Sets or gets what settings of the Table's state can be saved (by autoSaveState or saveState) or loaded (by autoLoadState or loadState).
560
- * Property type: boolean
561
- */
562
- get rightToLeft() {
563
- return this.nativeElement ? this.nativeElement.rightToLeft : undefined;
564
- }
565
- set rightToLeft(value) {
566
- if (this.nativeElement) {
567
- this.nativeElement.rightToLeft = value;
568
- }
569
- }
570
- /** Determines the theme. Theme defines the look of the element
571
- * Property type: string
572
- */
573
- get rowDetailTemplate() {
574
- return this.nativeElement ? this.nativeElement.rowDetailTemplate : undefined;
575
- }
576
- set rowDetailTemplate(value) {
577
- if (this.nativeElement) {
578
- this.nativeElement.rowDetailTemplate = value;
579
- }
580
- }
581
- /** Sets or gets whether when hovering a cell with truncated content, a tooltip with the full content will be shown.
582
- * Property type: any[]
583
- */
584
- get selected() {
585
- return this.nativeElement ? this.nativeElement.selected : undefined;
586
- }
587
- set selected(value) {
588
- if (this.nativeElement) {
589
- this.nativeElement.selected = value;
590
- }
591
- }
592
- /** Enables or disables HTML virtualization. This functionality allows for only visible rows to be rendered, resulting in an increased Table performance.
593
- * Property type: boolean
594
- */
595
- get selection() {
596
- return this.nativeElement ? this.nativeElement.selection : undefined;
597
- }
598
- set selection(value) {
599
- if (this.nativeElement) {
600
- this.nativeElement.selection = value;
601
- }
602
- }
603
- /** undefined
604
- * Property type: TableSelectionMode | string
605
- */
606
- get selectionMode() {
607
- return this.nativeElement ? this.nativeElement.selectionMode : undefined;
608
- }
609
- set selectionMode(value) {
610
- if (this.nativeElement) {
611
- this.nativeElement.selectionMode = value;
612
- }
613
- }
614
- /** undefined
615
- * Property type: boolean
616
- */
617
- get selectionByHierarchy() {
618
- return this.nativeElement ? this.nativeElement.selectionByHierarchy : undefined;
619
- }
620
- set selectionByHierarchy(value) {
621
- if (this.nativeElement) {
622
- this.nativeElement.selectionByHierarchy = value;
623
- }
624
- }
625
- /** undefined
626
- * Property type: { (dataSource: any, sortColumns: string[], directions: string[], defaultCompareFunctions: { (firstRecord: any, secondRecord: any): number }[]): void }
627
- */
628
- get sort() {
629
- return this.nativeElement ? this.nativeElement.sort : undefined;
630
- }
631
- set sort(value) {
632
- if (this.nativeElement) {
633
- this.nativeElement.sort = value;
634
- }
635
- }
636
- /** undefined
637
- * Property type: TableSortMode | string
638
- */
639
- get sortMode() {
640
- return this.nativeElement ? this.nativeElement.sortMode : undefined;
641
- }
642
- set sortMode(value) {
643
- if (this.nativeElement) {
644
- this.nativeElement.sortMode = value;
645
- }
646
- }
647
- /** undefined
648
- * Property type: string[]
649
- */
650
- get stateSettings() {
651
- return this.nativeElement ? this.nativeElement.stateSettings : undefined;
652
- }
653
- set stateSettings(value) {
654
- if (this.nativeElement) {
655
- this.nativeElement.stateSettings = value;
656
- }
657
- }
658
- /** undefined
659
- * Property type: string
660
- */
661
- get theme() {
662
- return this.nativeElement ? this.nativeElement.theme : undefined;
663
- }
664
- set theme(value) {
665
- if (this.nativeElement) {
666
- this.nativeElement.theme = value;
667
- }
668
- }
669
- /** undefined
670
- * Property type: boolean
671
- */
672
- get tooltip() {
673
- return this.nativeElement ? this.nativeElement.tooltip : undefined;
674
- }
675
- set tooltip(value) {
676
- if (this.nativeElement) {
677
- this.nativeElement.tooltip = value;
678
- }
679
- }
680
- /** undefined
681
- * Property type: boolean
682
- */
683
- get virtualization() {
684
- return this.nativeElement ? this.nativeElement.virtualization : undefined;
685
- }
686
- set virtualization(value) {
687
- if (this.nativeElement) {
688
- this.nativeElement.virtualization = value;
689
- }
690
- }
691
- // Gets the properties of the React component.
692
- get properties() {
693
- return ["autoLoadState", "autoSaveState", "columnGroups", "columnMinWidth", "columnReorder", "columnResize", "columnResizeNormalize", "columnResizeFeedback", "columns", "conditionalFormatting", "columnMenu", "columnSizeMode", "conditionalFormattingButton", "deferredScrollDelay", "dataRowId", "dataSource", "dataSourceSettings", "dataTransform", "disabled", "editing", "editMode", "expandHierarchy", "filtering", "filterRow", "filterOperator", "filterTemplate", "footerRow", "formulas", "freezeFooter", "freezeHeader", "grouping", "groupFormatFunction", "headerRow", "keyboardNavigation", "hideSelectionColumn", "loadColumnStateBehavior", "locale", "messages", "onCellRender", "onColumnRender", "onInit", "onLoad", "onUpdateComplete", "pageSize", "pageIndex", "paging", "rightToLeft", "rowDetailTemplate", "selected", "selection", "selectionMode", "selectionByHierarchy", "sort", "sortMode", "stateSettings", "theme", "tooltip", "virtualization"];
694
- }
695
- // Gets the events of the React component.
696
- get eventListeners() {
697
- return ["onCellBeginEdit", "onCellClick", "onCellEndEdit", "onChange", "onCollapse", "onExpand", "onColumnClick", "onCloseColumnMenu", "onColumnResize", "onFilter", "onGroup", "onOpenColumnMenu", "onPage", "onRowBeginEdit", "onRowEndEdit", "onSort", "onCreate", "onReady"];
698
- }
699
- /** Adds a new row. When you invoke the method, pass a JSON object with the row's data.
700
- * @param {any} data. JSON object with the new row's data. Sample JSON: {firstName: 'Peter', lastName: 'Fuller'}.
701
- */
702
- addRow(data) {
703
- if (this.nativeElement.isRendered) {
704
- this.nativeElement.addRow(data);
705
- }
706
- else {
707
- this.nativeElement.whenRendered(() => {
708
- this.nativeElement.addRow(data);
709
- });
710
- }
711
- }
712
- /** Adds a filter to a specific column.
713
- * @param {string} dataField. The column's data field.
714
- * @param {any} filter. FilterGroup object or a Filter expression. Filter expression like: 'startsWith B'. Example 2: ['contains Andrew or contains Nancy'], Example 3: ['quantity', '&lt;= 3 and &gt;= 8']. Filter conditions which you can use in the expressions: '=', 'EQUAL','&lt;&gt;', 'NOT_EQUAL', '!=', '&lt;', 'LESS_THAN','&gt;', 'GREATER_THAN', '&lt;=', 'LESS_THAN_OR_EQUAL', '&gt;=', 'GREATER_THAN_OR_EQUAL','starts with', 'STARTS_WITH','ends with', 'ENDS_WITH', '', 'EMPTY', 'CONTAINS','DOES_NOT_CONTAIN', 'NULL','NOT_NULL'
715
- */
716
- addFilter(dataField, filter) {
717
- if (this.nativeElement.isRendered) {
718
- this.nativeElement.addFilter(dataField, filter);
719
- }
720
- else {
721
- this.nativeElement.whenRendered(() => {
722
- this.nativeElement.addFilter(dataField, filter);
723
- });
724
- }
725
- }
726
- /** Groups by a column.
727
- * @param {string} dataField. The column's data field.
728
- */
729
- addGroup(dataField) {
730
- if (this.nativeElement.isRendered) {
731
- this.nativeElement.addGroup(dataField);
732
- }
733
- else {
734
- this.nativeElement.whenRendered(() => {
735
- this.nativeElement.addGroup(dataField);
736
- });
737
- }
738
- }
739
- /** Begins an edit operation.
740
- * @param {string | number} row. The id of the row to edit.
741
- * @param {string} dataField?. The dataField of the cell's column. May be omitted when <strong>editMode</strong> is <em>'row'</em>.
742
- */
743
- beginEdit(row, dataField) {
744
- if (this.nativeElement.isRendered) {
745
- this.nativeElement.beginEdit(row, dataField);
746
- }
747
- else {
748
- this.nativeElement.whenRendered(() => {
749
- this.nativeElement.beginEdit(row, dataField);
750
- });
751
- }
752
- }
753
- /** Begins an update operation. Suspends all table refreshes and renders.
754
- */
755
- beginUpdate() {
756
- if (this.nativeElement.isRendered) {
757
- this.nativeElement.beginUpdate();
758
- }
759
- else {
760
- this.nativeElement.whenRendered(() => {
761
- this.nativeElement.beginUpdate();
762
- });
763
- }
764
- }
765
- /** Ends the current edit operation and discards changes.
766
- */
767
- cancelEdit() {
768
- if (this.nativeElement.isRendered) {
769
- this.nativeElement.cancelEdit();
770
- }
771
- else {
772
- this.nativeElement.whenRendered(() => {
773
- this.nativeElement.cancelEdit();
774
- });
775
- }
776
- }
777
- /** Clears applied filters.
778
- */
779
- clearFilters() {
780
- if (this.nativeElement.isRendered) {
781
- this.nativeElement.clearFilters();
782
- }
783
- else {
784
- this.nativeElement.whenRendered(() => {
785
- this.nativeElement.clearFilters();
786
- });
787
- }
788
- }
789
- /** Clears grouping.
790
- */
791
- clearGrouping() {
792
- if (this.nativeElement.isRendered) {
793
- this.nativeElement.clearGrouping();
794
- }
795
- else {
796
- this.nativeElement.whenRendered(() => {
797
- this.nativeElement.clearGrouping();
798
- });
799
- }
800
- }
801
- /** Clears selection.
802
- */
803
- clearSelection() {
804
- if (this.nativeElement.isRendered) {
805
- this.nativeElement.clearSelection();
806
- }
807
- else {
808
- this.nativeElement.whenRendered(() => {
809
- this.nativeElement.clearSelection();
810
- });
811
- }
812
- }
813
- /** Clears the Table sorting.
814
- */
815
- clearSort() {
816
- if (this.nativeElement.isRendered) {
817
- this.nativeElement.clearSort();
818
- }
819
- else {
820
- this.nativeElement.whenRendered(() => {
821
- this.nativeElement.clearSort();
822
- });
823
- }
824
- }
825
- /** Collapses all rows (in tree mode).
826
- */
827
- collapseAllRows() {
828
- if (this.nativeElement.isRendered) {
829
- this.nativeElement.collapseAllRows();
830
- }
831
- else {
832
- this.nativeElement.whenRendered(() => {
833
- this.nativeElement.collapseAllRows();
834
- });
835
- }
836
- }
837
- /** Collapses all groups (in tree mode).
838
- */
839
- collapseAllGroups() {
840
- if (this.nativeElement.isRendered) {
841
- this.nativeElement.collapseAllGroups();
842
- }
843
- else {
844
- this.nativeElement.whenRendered(() => {
845
- this.nativeElement.collapseAllGroups();
846
- });
847
- }
848
- }
849
- /** Collapses all row details. Rows that have details defined via the rowDetailTemplate will be collapsed.
850
- */
851
- collapseAllRowDetails() {
852
- if (this.nativeElement.isRendered) {
853
- this.nativeElement.collapseAllRowDetails();
854
- }
855
- else {
856
- this.nativeElement.whenRendered(() => {
857
- this.nativeElement.collapseAllRowDetails();
858
- });
859
- }
860
- }
861
- /** Collapses a group.
862
- * @param {string} index. The group's hierarchical index.
863
- */
864
- collapseGroup(index) {
865
- if (this.nativeElement.isRendered) {
866
- this.nativeElement.collapseGroup(index);
867
- }
868
- else {
869
- this.nativeElement.whenRendered(() => {
870
- this.nativeElement.collapseGroup(index);
871
- });
872
- }
873
- }
874
- /** Collapses a row (in tree mode).
875
- * @param {string | number} rowId. The id of the row to collapse.
876
- */
877
- collapseRow(rowId) {
878
- if (this.nativeElement.isRendered) {
879
- this.nativeElement.collapseRow(rowId);
880
- }
881
- else {
882
- this.nativeElement.whenRendered(() => {
883
- this.nativeElement.collapseRow(rowId);
884
- });
885
- }
886
- }
887
- /** Disables a selection of a row. When the 'selection' property is set to 'true', selection is enabled for all rows by default.
888
- * @param {string | number | (string | number)[]} rowId. The id of the row (or an array of row ids) to select.
889
- */
890
- disableSelect(rowId) {
891
- if (this.nativeElement.isRendered) {
892
- this.nativeElement.disableSelect(rowId);
893
- }
894
- else {
895
- this.nativeElement.whenRendered(() => {
896
- this.nativeElement.disableSelect(rowId);
897
- });
898
- }
899
- }
900
- /** Enables a selection of a row, if it was previously disabled through a 'disableSelect' method call. When the 'selection' property is set to 'true', selection is enabled for all rows by default.
901
- * @param {string | number | (string | number)[]} rowId. The id of the row (or an array of row ids) to select.
902
- */
903
- enableSelect(rowId) {
904
- if (this.nativeElement.isRendered) {
905
- this.nativeElement.enableSelect(rowId);
906
- }
907
- else {
908
- this.nativeElement.whenRendered(() => {
909
- this.nativeElement.enableSelect(rowId);
910
- });
911
- }
912
- }
913
- /** Ends the current edit operation and saves changes.
914
- */
915
- endEdit() {
916
- if (this.nativeElement.isRendered) {
917
- this.nativeElement.endEdit();
918
- }
919
- else {
920
- this.nativeElement.whenRendered(() => {
921
- this.nativeElement.endEdit();
922
- });
923
- }
924
- }
925
- /** Ends an update operation. Resumes all table refreshes and renders. Re-renders the Table.
926
- * @param {boolean} refresh?. Optionally you can pass 'false' in case you need to manually call the 'refresh' method. By default, the table is re-rendered.
927
- */
928
- endUpdate(refresh) {
929
- if (this.nativeElement.isRendered) {
930
- this.nativeElement.endUpdate(refresh);
931
- }
932
- else {
933
- this.nativeElement.whenRendered(() => {
934
- this.nativeElement.endUpdate(refresh);
935
- });
936
- }
937
- }
938
- /** Expands all rows (in tree mode).
939
- */
940
- expandAllRows() {
941
- if (this.nativeElement.isRendered) {
942
- this.nativeElement.expandAllRows();
943
- }
944
- else {
945
- this.nativeElement.whenRendered(() => {
946
- this.nativeElement.expandAllRows();
947
- });
948
- }
949
- }
950
- /** Expands all groups (in tree mode).
951
- */
952
- expandAllGroups() {
953
- if (this.nativeElement.isRendered) {
954
- this.nativeElement.expandAllGroups();
955
- }
956
- else {
957
- this.nativeElement.whenRendered(() => {
958
- this.nativeElement.expandAllGroups();
959
- });
960
- }
961
- }
962
- /** Expands all row details. Rows that have details defined via rowDetailTemplate will be expanded.
963
- */
964
- expandAllRowDetails() {
965
- if (this.nativeElement.isRendered) {
966
- this.nativeElement.expandAllRowDetails();
967
- }
968
- else {
969
- this.nativeElement.whenRendered(() => {
970
- this.nativeElement.expandAllRowDetails();
971
- });
972
- }
973
- }
974
- /** Expands a group.
975
- * @param {string} index. The group's hierarchical index.
976
- */
977
- expandGroup(index) {
978
- if (this.nativeElement.isRendered) {
979
- this.nativeElement.expandGroup(index);
980
- }
981
- else {
982
- this.nativeElement.whenRendered(() => {
983
- this.nativeElement.expandGroup(index);
984
- });
985
- }
986
- }
987
- /** Expands a row (in tree mode).
988
- * @param {string | number} rowId. The id of the row to expand.
989
- */
990
- expandRow(rowId) {
991
- if (this.nativeElement.isRendered) {
992
- this.nativeElement.expandRow(rowId);
993
- }
994
- else {
995
- this.nativeElement.whenRendered(() => {
996
- this.nativeElement.expandRow(rowId);
997
- });
998
- }
999
- }
1000
- /** Exports the Table's data.
1001
- * @param {string} dataFormat. The file format to export to. Supported formats: 'csv', 'html', 'json', 'pdf', 'tsv', 'xlsx', 'xml'.
1002
- * @param {string} fileName?. The name of the file to export to
1003
- * @param {boolean} exportFiltered?. If set to true, exports only filtered records
1004
- * @param {Function} callback?. A callback function to pass the exported data to (if fileName is not provided)
1005
- * @returns {any}
1006
- */
1007
- exportData(dataFormat, fileName, exportFiltered, callback) {
1008
- return __awaiter(this, void 0, void 0, function* () {
1009
- const getResultOnRender = () => {
1010
- return new Promise(resolve => {
1011
- this.nativeElement.whenRendered(() => {
1012
- const result = this.nativeElement.exportData(dataFormat, fileName, exportFiltered, callback);
1013
- resolve(result);
1014
- });
1015
- });
1016
- };
1017
- const result = yield getResultOnRender();
1018
- return result;
1019
- });
1020
- }
1021
- /** Returns an array of selected row ids.
1022
- * @returns {(string | number)[]}
1023
- */
1024
- getSelection() {
1025
- return __awaiter(this, void 0, void 0, function* () {
1026
- const getResultOnRender = () => {
1027
- return new Promise(resolve => {
1028
- this.nativeElement.whenRendered(() => {
1029
- const result = this.nativeElement.getSelection();
1030
- resolve(result);
1031
- });
1032
- });
1033
- };
1034
- const result = yield getResultOnRender();
1035
- return result;
1036
- });
1037
- }
1038
- /** Returns the Table's state, containing information about columns, expanded rows, selected rows, applied fitering, grouping, and sorted columns. It can then be stored or passed to the method loadState.
1039
- * @returns {any}
1040
- */
1041
- getState() {
1042
- return __awaiter(this, void 0, void 0, function* () {
1043
- const getResultOnRender = () => {
1044
- return new Promise(resolve => {
1045
- this.nativeElement.whenRendered(() => {
1046
- const result = this.nativeElement.getState();
1047
- resolve(result);
1048
- });
1049
- });
1050
- };
1051
- const result = yield getResultOnRender();
1052
- return result;
1053
- });
1054
- }
1055
- /** Returns the value of a cell.
1056
- * @param {string | number} row. The id of the cell's row.
1057
- * @param {string} dataField. The dataField of the cell's column.
1058
- * @returns {any}
1059
- */
1060
- getValue(row, dataField) {
1061
- return __awaiter(this, void 0, void 0, function* () {
1062
- const getResultOnRender = () => {
1063
- return new Promise(resolve => {
1064
- this.nativeElement.whenRendered(() => {
1065
- const result = this.nativeElement.getValue(row, dataField);
1066
- resolve(result);
1067
- });
1068
- });
1069
- };
1070
- const result = yield getResultOnRender();
1071
- return result;
1072
- });
1073
- }
1074
- /** Gets a column property.
1075
- * @param {string} columnDataField. Column field name.
1076
- * @param {string} propertyName. Column property name.
1077
- * @returns {any}
1078
- */
1079
- getColumnProperty(columnDataField, propertyName) {
1080
- return __awaiter(this, void 0, void 0, function* () {
1081
- const getResultOnRender = () => {
1082
- return new Promise(resolve => {
1083
- this.nativeElement.whenRendered(() => {
1084
- const result = this.nativeElement.getColumnProperty(columnDataField, propertyName);
1085
- resolve(result);
1086
- });
1087
- });
1088
- };
1089
- const result = yield getResultOnRender();
1090
- return result;
1091
- });
1092
- }
1093
- /** Checks whether a group is expanded and returns true or false. false is returned when the group index is undefined, too.
1094
- * @param {string} index. The group's hierarchical index.
1095
- * @returns {boolean}
1096
- */
1097
- isGroupExpanded(index) {
1098
- return __awaiter(this, void 0, void 0, function* () {
1099
- const getResultOnRender = () => {
1100
- return new Promise(resolve => {
1101
- this.nativeElement.whenRendered(() => {
1102
- const result = this.nativeElement.isGroupExpanded(index);
1103
- resolve(result);
1104
- });
1105
- });
1106
- };
1107
- const result = yield getResultOnRender();
1108
- return result;
1109
- });
1110
- }
1111
- /** Loads the Table's state. Information about columns, expanded rows, selected rows, applied fitering, grouping, and sorted columns is loaded, based on the value of the stateSettings property.
1112
- * @param {any} state?. An object returned by one of the methods <strong>getState</strong> or <strong>saveState</strong>. If a state is not passed, the method tries to load the state from the browser's localStorage.
1113
- */
1114
- loadState(state) {
1115
- if (this.nativeElement.isRendered) {
1116
- this.nativeElement.loadState(state);
1117
- }
1118
- else {
1119
- this.nativeElement.whenRendered(() => {
1120
- this.nativeElement.loadState(state);
1121
- });
1122
- }
1123
- }
1124
- /** Navigates to a page.
1125
- * @param {number} pageIndex. The zero-based page index to navigate to.
1126
- */
1127
- navigateTo(pageIndex) {
1128
- if (this.nativeElement.isRendered) {
1129
- this.nativeElement.navigateTo(pageIndex);
1130
- }
1131
- else {
1132
- this.nativeElement.whenRendered(() => {
1133
- this.nativeElement.navigateTo(pageIndex);
1134
- });
1135
- }
1136
- }
1137
- /** Refreshes the table.
1138
- */
1139
- refresh() {
1140
- if (this.nativeElement.isRendered) {
1141
- this.nativeElement.refresh();
1142
- }
1143
- else {
1144
- this.nativeElement.whenRendered(() => {
1145
- this.nativeElement.refresh();
1146
- });
1147
- }
1148
- }
1149
- /** Removes filters applied to a specific column.
1150
- * @param {string} dataField. The column's data field.
1151
- */
1152
- removeFilter(dataField) {
1153
- if (this.nativeElement.isRendered) {
1154
- this.nativeElement.removeFilter(dataField);
1155
- }
1156
- else {
1157
- this.nativeElement.whenRendered(() => {
1158
- this.nativeElement.removeFilter(dataField);
1159
- });
1160
- }
1161
- }
1162
- /** Removes grouping by a column.
1163
- * @param {string} dataField. The column's data field.
1164
- */
1165
- removeGroup(dataField) {
1166
- if (this.nativeElement.isRendered) {
1167
- this.nativeElement.removeGroup(dataField);
1168
- }
1169
- else {
1170
- this.nativeElement.whenRendered(() => {
1171
- this.nativeElement.removeGroup(dataField);
1172
- });
1173
- }
1174
- }
1175
- /** Removes a row by its id.
1176
- * @param {string | number} row. The id of the cell's row.
1177
- */
1178
- removeRow(row) {
1179
- if (this.nativeElement.isRendered) {
1180
- this.nativeElement.removeRow(row);
1181
- }
1182
- else {
1183
- this.nativeElement.whenRendered(() => {
1184
- this.nativeElement.removeRow(row);
1185
- });
1186
- }
1187
- }
1188
- /** Saves the Table's state. Information about columns, expanded rows, selected rows, applied fitering, grouping, and sorted columns is saved, based on the value of the stateSettings property.
1189
- * @returns {any}
1190
- */
1191
- saveState() {
1192
- return __awaiter(this, void 0, void 0, function* () {
1193
- const getResultOnRender = () => {
1194
- return new Promise(resolve => {
1195
- this.nativeElement.whenRendered(() => {
1196
- const result = this.nativeElement.saveState();
1197
- resolve(result);
1198
- });
1199
- });
1200
- };
1201
- const result = yield getResultOnRender();
1202
- return result;
1203
- });
1204
- }
1205
- /** Selects one or more rows.
1206
- * @param {string | number | (string | number)[]} rowId. The id of the row (or an array of row ids) to select.
1207
- */
1208
- select(rowId) {
1209
- if (this.nativeElement.isRendered) {
1210
- this.nativeElement.select(rowId);
1211
- }
1212
- else {
1213
- this.nativeElement.whenRendered(() => {
1214
- this.nativeElement.select(rowId);
1215
- });
1216
- }
1217
- }
1218
- /** Sets the value of a cell.
1219
- * @param {string | number} row. The id of the cell's row.
1220
- * @param {string} dataField. The dataField of the cell's column.
1221
- * @param {any} value. The new value of the cell.
1222
- */
1223
- setValue(row, dataField, value) {
1224
- if (this.nativeElement.isRendered) {
1225
- this.nativeElement.setValue(row, dataField, value);
1226
- }
1227
- else {
1228
- this.nativeElement.whenRendered(() => {
1229
- this.nativeElement.setValue(row, dataField, value);
1230
- });
1231
- }
1232
- }
1233
- /** Sorts the Table by a column.
1234
- * @param {string} columnDataField. Column field name.
1235
- * @param {string} sortOrder?. Sort order. Possible values: 'asc' (ascending), 'desc' (descending), and null (removes sorting by column). If not provided, toggles the sorting.
1236
- */
1237
- sortBy(columnDataField, sortOrder) {
1238
- if (this.nativeElement.isRendered) {
1239
- this.nativeElement.sortBy(columnDataField, sortOrder);
1240
- }
1241
- else {
1242
- this.nativeElement.whenRendered(() => {
1243
- this.nativeElement.sortBy(columnDataField, sortOrder);
1244
- });
1245
- }
1246
- }
1247
- /** Sets a column property.
1248
- * @param {string} columnDataField. Column field name.
1249
- * @param {string} propertyName. Column property name.
1250
- * @param {any} propertyValue. Property value.
1251
- */
1252
- setColumnProperty(columnDataField, propertyName, propertyValue) {
1253
- if (this.nativeElement.isRendered) {
1254
- this.nativeElement.setColumnProperty(columnDataField, propertyName, propertyValue);
1255
- }
1256
- else {
1257
- this.nativeElement.whenRendered(() => {
1258
- this.nativeElement.setColumnProperty(columnDataField, propertyName, propertyValue);
1259
- });
1260
- }
1261
- }
1262
- /** Updates a table row. The method expects two parameters - row id and JSON object with the new row data.
1263
- * @param {string | number} rowId. The id of the row.
1264
- * @param {any} data. JSON object with the new row's data. Example: {firstName: 'Peter', lastName: 'Fuller'}.
1265
- */
1266
- updateRow(rowId, data) {
1267
- if (this.nativeElement.isRendered) {
1268
- this.nativeElement.updateRow(rowId, data);
1269
- }
1270
- else {
1271
- this.nativeElement.whenRendered(() => {
1272
- this.nativeElement.updateRow(rowId, data);
1273
- });
1274
- }
1275
- }
1276
- /** Unselects one or more rows.
1277
- * @param {string | number | (string | number)[]} rowId. The id of the row (or an array of row ids) to unselect.
1278
- */
1279
- unselect(rowId) {
1280
- if (this.nativeElement.isRendered) {
1281
- this.nativeElement.unselect(rowId);
1282
- }
1283
- else {
1284
- this.nativeElement.whenRendered(() => {
1285
- this.nativeElement.unselect(rowId);
1286
- });
1287
- }
1288
- }
1289
- componentDidRender(initialize) {
1290
- const that = this;
1291
- const props = {};
1292
- const events = {};
1293
- let styles = null;
1294
- for (let prop in that.props) {
1295
- if (prop === 'children') {
1296
- continue;
1297
- }
1298
- if (prop === 'style') {
1299
- styles = that.props[prop];
1300
- continue;
1301
- }
1302
- if (prop.startsWith('on') && that.properties.indexOf(prop) === -1) {
1303
- events[prop] = that.props[prop];
1304
- continue;
1305
- }
1306
- props[prop] = that.props[prop];
1307
- }
1308
- if (initialize) {
1309
- that.nativeElement = this.componentRef.current;
1310
- }
1311
- for (let prop in props) {
1312
- if (prop === 'class' || prop === 'className') {
1313
- const classNames = props[prop].trim().split(' ');
1314
- for (let className in classNames) {
1315
- if (!that.nativeElement.classList.contains(classNames[className]) && classNames[className] !== "") {
1316
- that.nativeElement.classList.add(classNames[className]);
1317
- }
1318
- }
1319
- continue;
1320
- }
1321
- if (props[prop] !== that.nativeElement[prop]) {
1322
- const normalizeProp = (str) => {
1323
- return str.replace(/-([a-z])/g, function (g) {
1324
- return g[1].toUpperCase();
1325
- });
1326
- };
1327
- if (prop === 'hover' || prop === 'active' || prop === 'focus' || prop === 'selected') {
1328
- that.nativeElement.setAttribute(prop, '');
1329
- }
1330
- const normalizedProp = normalizeProp(prop);
1331
- that.nativeElement[normalizedProp] = props[prop];
1332
- }
1333
- }
1334
- for (let eventName in events) {
1335
- that[eventName] = events[eventName];
1336
- that.nativeElement[eventName.toLowerCase()] = events[eventName];
1337
- }
1338
- if (initialize) {
1339
- Smart.Render();
1340
- if (that.onCreate) {
1341
- that.onCreate();
1342
- }
1343
- that.nativeElement.whenRendered(() => {
1344
- if (that.onReady) {
1345
- that.onReady();
1346
- }
1347
- });
1348
- }
1349
- // setup styles.
1350
- if (styles) {
1351
- for (let styleName in styles) {
1352
- that.nativeElement.style[styleName] = styles[styleName];
1353
- }
1354
- }
1355
- }
1356
- componentDidMount() {
1357
- this.componentDidRender(true);
1358
- }
1359
- componentDidUpdate() {
1360
- this.componentDidRender(false);
1361
- }
1362
- componentWillUnmount() {
1363
- const that = this;
1364
- if (!that.nativeElement) {
1365
- return;
1366
- }
1367
- that.nativeElement.whenRenderedCallbacks = [];
1368
- for (let i = 0; i < that.eventListeners.length; i++) {
1369
- const eventName = that.eventListeners[i];
1370
- that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
1371
- }
1372
- }
1373
- render() {
1374
- return (React.createElement("smart-table", { ref: this.componentRef }, this.props.children));
1375
- }
1376
- }
1283
+ exports.Smart = Smart;
1284
+ exports.Table = Table;
1285
+ exports.default = Table;
1377
1286
 
1378
- exports.Smart = Smart;
1379
- exports.Table = Table;
1380
- exports.default = Table;
1381
-
1382
- Object.defineProperty(exports, '__esModule', { value: true });
1287
+ Object.defineProperty(exports, '__esModule', { value: true });
1383
1288
 
1384
1289
  })));