smart-webcomponents-react 14.2.83 → 14.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (376) hide show
  1. package/alertwindow/alertwindow.d.ts +5 -5
  2. package/alertwindow/alertwindow.esm.js +10 -85
  3. package/alertwindow/alertwindow.umd.js +1134 -1209
  4. package/array/array.d.ts +5 -5
  5. package/array/array.esm.js +13 -88
  6. package/array/array.umd.js +752 -827
  7. package/barcode/barcode.d.ts +3 -3
  8. package/barcode/barcode.esm.js +6 -61
  9. package/barcode/barcode.umd.js +311 -366
  10. package/button/dropdownbutton.d.ts +2 -2
  11. package/button/multisplitbutton.d.ts +2 -2
  12. package/calendar/calendar.d.ts +2 -2
  13. package/calendar/calendar.esm.js +4 -49
  14. package/calendar/calendar.umd.js +710 -755
  15. package/card/cardview.d.ts +1 -1
  16. package/cardview/cardview.d.ts +1 -1
  17. package/cardview/cardview.esm.js +2 -37
  18. package/cardview/cardview.umd.js +515 -550
  19. package/chart/chart.d.ts +9 -9
  20. package/chart/chart.esm.js +18 -133
  21. package/chart/chart.umd.js +822 -937
  22. package/chart/ganttchart.d.ts +20 -20
  23. package/combobox/combobox.d.ts +4 -4
  24. package/combobox/combobox.esm.js +8 -73
  25. package/combobox/combobox.umd.js +1341 -1406
  26. package/datetimepicker/datetimepicker.d.ts +1 -1
  27. package/datetimepicker/datetimepicker.esm.js +2 -37
  28. package/datetimepicker/datetimepicker.umd.js +826 -861
  29. package/dialogwindow/dialogwindow.d.ts +5 -5
  30. package/dialogwindow/dialogwindow.esm.js +10 -85
  31. package/dialogwindow/dialogwindow.umd.js +1134 -1209
  32. package/dockinglayout/dockinglayout.d.ts +7 -7
  33. package/dockinglayout/dockinglayout.esm.js +14 -109
  34. package/dockinglayout/dockinglayout.umd.js +765 -860
  35. package/dropdownbutton/dropdownbutton.d.ts +2 -2
  36. package/dropdownbutton/dropdownbutton.esm.js +4 -49
  37. package/dropdownbutton/dropdownbutton.umd.js +527 -572
  38. package/dropdownlist/dropdownlist.d.ts +4 -4
  39. package/dropdownlist/dropdownlist.esm.js +8 -73
  40. package/dropdownlist/dropdownlist.umd.js +1275 -1340
  41. package/editor/editor.d.ts +11 -9
  42. package/editor/editor.esm.js +14 -109
  43. package/editor/editor.umd.js +911 -1006
  44. package/fileupload/fileupload.d.ts +2 -1
  45. package/filterbuilder/filterbuilder.d.ts +1 -1
  46. package/filterbuilder/filterbuilder.esm.js +2 -37
  47. package/filterbuilder/filterbuilder.umd.js +463 -498
  48. package/filterpanel/filterpanel.d.ts +1 -1
  49. package/filterpanel/filterpanel.esm.js +2 -37
  50. package/filterpanel/filterpanel.umd.js +354 -389
  51. package/form/form.d.ts +1 -1
  52. package/form/form.esm.js +4 -49
  53. package/form/form.umd.js +1016 -1061
  54. package/form/formgroup.d.ts +1 -1
  55. package/ganttchart/ganttchart.d.ts +20 -20
  56. package/ganttchart/ganttchart.esm.js +40 -265
  57. package/ganttchart/ganttchart.umd.js +1666 -1891
  58. package/gauge/gauge.d.ts +2 -2
  59. package/gauge/gauge.esm.js +4 -49
  60. package/gauge/gauge.umd.js +664 -709
  61. package/grid/grid.d.ts +56 -51
  62. package/grid/grid.esm.js +96 -460
  63. package/grid/grid.umd.js +2107 -2471
  64. package/index.d.ts +45 -3
  65. package/input/input.d.ts +2 -2
  66. package/input/input.esm.js +4 -49
  67. package/input/input.umd.js +505 -550
  68. package/input/numberinput.d.ts +2 -2
  69. package/input/phoneinput.d.ts +4 -4
  70. package/kanban/kanban.d.ts +6 -6
  71. package/kanban/kanban.esm.js +12 -97
  72. package/kanban/kanban.umd.js +1334 -1419
  73. package/layout/dockinglayout.d.ts +7 -7
  74. package/listbox/listbox.d.ts +5 -5
  75. package/listbox/listbox.esm.js +10 -85
  76. package/listbox/listbox.umd.js +1170 -1245
  77. package/listmenu/listmenu.d.ts +1 -1
  78. package/listmenu/listmenu.esm.js +2 -37
  79. package/listmenu/listmenu.umd.js +1005 -1040
  80. package/menu/listmenu.d.ts +1 -1
  81. package/menu/menu.d.ts +1 -1
  82. package/menu/menu.esm.js +2 -37
  83. package/menu/menu.umd.js +1025 -1060
  84. package/multilinetextbox/multilinetextbox.d.ts +1 -1
  85. package/multilinetextbox/multilinetextbox.esm.js +2 -37
  86. package/multilinetextbox/multilinetextbox.umd.js +907 -942
  87. package/multilinewindow/multilinewindow.d.ts +5 -5
  88. package/multilinewindow/multilinewindow.esm.js +10 -85
  89. package/multilinewindow/multilinewindow.umd.js +1134 -1209
  90. package/multisplitbutton/multisplitbutton.d.ts +2 -2
  91. package/multisplitbutton/multisplitbutton.esm.js +4 -49
  92. package/multisplitbutton/multisplitbutton.umd.js +941 -986
  93. package/numberinput/numberinput.d.ts +2 -2
  94. package/numberinput/numberinput.esm.js +4 -49
  95. package/numberinput/numberinput.umd.js +348 -393
  96. package/numerictextbox/numerictextbox.d.ts +1 -1
  97. package/numerictextbox/numerictextbox.esm.js +2 -37
  98. package/numerictextbox/numerictextbox.umd.js +592 -627
  99. package/package.json +1 -1
  100. package/phoneinput/phoneinput.d.ts +4 -4
  101. package/phoneinput/phoneinput.esm.js +8 -73
  102. package/phoneinput/phoneinput.umd.js +386 -451
  103. package/pivottable/pivottable.d.ts +3 -3
  104. package/pivottable/pivottable.esm.js +6 -61
  105. package/pivottable/pivottable.umd.js +762 -817
  106. package/progresswindow/progresswindow.d.ts +5 -5
  107. package/progresswindow/progresswindow.esm.js +10 -85
  108. package/progresswindow/progresswindow.umd.js +1134 -1209
  109. package/promptwindow/promptwindow.d.ts +5 -5
  110. package/promptwindow/promptwindow.esm.js +10 -85
  111. package/promptwindow/promptwindow.umd.js +1134 -1209
  112. package/qrcode/qrcode.d.ts +3 -3
  113. package/qrcode/qrcode.esm.js +6 -61
  114. package/qrcode/qrcode.umd.js +333 -388
  115. package/querybuilder/querybuilder.d.ts +6 -1
  116. package/querybuilder/querybuilder.esm.js +14 -38
  117. package/querybuilder/querybuilder.umd.js +446 -470
  118. package/rating/rating.d.ts +1 -1
  119. package/rating/rating.esm.js +2 -37
  120. package/rating/rating.umd.js +261 -296
  121. package/scheduler/scheduler.d.ts +17 -17
  122. package/scheduler/scheduler.esm.js +34 -229
  123. package/scheduler/scheduler.umd.js +1782 -1977
  124. package/slider/slider.d.ts +2 -2
  125. package/slider/slider.esm.js +4 -49
  126. package/slider/slider.umd.js +642 -687
  127. package/source/modules/smart.accordion.js +1 -1
  128. package/source/modules/smart.array.js +2 -2
  129. package/source/modules/smart.barcode.js +1 -1
  130. package/source/modules/smart.breadcrumb.js +1 -1
  131. package/source/modules/smart.button.js +1 -1
  132. package/source/modules/smart.buttongroup.js +1 -1
  133. package/source/modules/smart.calendar.js +3 -3
  134. package/source/modules/smart.card.js +1 -1
  135. package/source/modules/smart.cardview.js +4 -4
  136. package/source/modules/smart.carousel.js +1 -1
  137. package/source/modules/smart.chart.js +1 -1
  138. package/source/modules/smart.checkbox.js +1 -1
  139. package/source/modules/smart.checkinput.js +2 -2
  140. package/source/modules/smart.chip.js +1 -1
  141. package/source/modules/smart.colorinput.js +2 -2
  142. package/source/modules/smart.colorpanel.js +2 -2
  143. package/source/modules/smart.colorpicker.js +2 -2
  144. package/source/modules/smart.combobox.js +2 -2
  145. package/source/modules/smart.common.js +1 -1
  146. package/source/modules/smart.countryinput.js +2 -2
  147. package/source/modules/smart.dateinput.js +3 -3
  148. package/source/modules/smart.daterangeinput.js +4 -4
  149. package/source/modules/smart.datetimepicker.js +3 -3
  150. package/source/modules/smart.dockinglayout.js +1 -1
  151. package/source/modules/smart.dropdownbutton.js +1 -1
  152. package/source/modules/smart.dropdownlist.js +2 -2
  153. package/source/modules/smart.editor.js +5 -5
  154. package/source/modules/smart.element.js +1 -1
  155. package/source/modules/smart.fileupload.js +3 -3
  156. package/source/modules/smart.form.js +2 -2
  157. package/source/modules/smart.formulaparser.js +1 -1
  158. package/source/modules/smart.ganttchart.js +5 -5
  159. package/source/modules/smart.gauge.js +1 -1
  160. package/source/modules/smart.grid.js +14 -14
  161. package/source/modules/smart.gridpanel.js +4 -4
  162. package/source/modules/smart.input.js +2 -2
  163. package/source/modules/smart.kanban.js +5 -5
  164. package/source/modules/smart.layout.js +1 -1
  165. package/source/modules/smart.led.js +1 -1
  166. package/source/modules/smart.listbox.js +2 -2
  167. package/source/modules/smart.listmenu.js +1 -1
  168. package/source/modules/smart.map.js +1 -1
  169. package/source/modules/smart.maskedtextbox.js +2 -2
  170. package/source/modules/smart.menu.js +1 -1
  171. package/source/modules/smart.multicomboinput.js +2 -2
  172. package/source/modules/smart.multiinput.js +2 -2
  173. package/source/modules/smart.multilinetextbox.js +2 -2
  174. package/source/modules/smart.multisplitbutton.js +2 -2
  175. package/source/modules/smart.numberinput.js +2 -2
  176. package/source/modules/smart.numerictextbox.js +2 -2
  177. package/source/modules/smart.pager.js +2 -2
  178. package/source/modules/smart.passwordinput.js +2 -2
  179. package/source/modules/smart.passwordtextbox.js +2 -2
  180. package/source/modules/smart.path.js +1 -1
  181. package/source/modules/smart.phoneinput.js +2 -2
  182. package/source/modules/smart.pivottable.js +3 -3
  183. package/source/modules/smart.progressbar.js +1 -1
  184. package/source/modules/smart.qrcode.js +1 -1
  185. package/source/modules/smart.querybuilder.js +5 -5
  186. package/source/modules/smart.radiobutton.js +1 -1
  187. package/source/modules/smart.rating.js +1 -1
  188. package/source/modules/smart.router.js +1 -1
  189. package/source/modules/smart.scheduler.js +4 -4
  190. package/source/modules/smart.scrollbar.js +1 -1
  191. package/source/modules/smart.slider.js +1 -1
  192. package/source/modules/smart.sortable.js +1 -1
  193. package/source/modules/smart.splitter.js +1 -1
  194. package/source/modules/smart.switchbutton.js +1 -1
  195. package/source/modules/smart.table.js +3 -3
  196. package/source/modules/smart.tabs.js +1 -1
  197. package/source/modules/smart.tank.js +1 -1
  198. package/source/modules/smart.textarea.js +2 -2
  199. package/source/modules/smart.textbox.js +2 -2
  200. package/source/modules/smart.timeinput.js +2 -2
  201. package/source/modules/smart.timepicker.js +1 -1
  202. package/source/modules/smart.toast.js +1 -1
  203. package/source/modules/smart.tooltip.js +1 -1
  204. package/source/modules/smart.tree.js +1 -1
  205. package/source/modules/smart.validator.js +1 -1
  206. package/source/modules/smart.window.js +2 -2
  207. package/source/smart.accordion.js +1 -1
  208. package/source/smart.ajax.js +1 -1
  209. package/source/smart.array.js +1 -1
  210. package/source/smart.barcode.js +1 -1
  211. package/source/smart.bootstrap.js +1 -1
  212. package/source/smart.breadcrumb.js +1 -1
  213. package/source/smart.button.js +1 -1
  214. package/source/smart.buttongroup.js +1 -1
  215. package/source/smart.calendar.js +2 -2
  216. package/source/smart.card.js +1 -1
  217. package/source/smart.cardview.js +1 -1
  218. package/source/smart.carousel.js +1 -1
  219. package/source/smart.chart.annotations.js +1 -1
  220. package/source/smart.chart.api.js +1 -1
  221. package/source/smart.chart.core.js +1 -1
  222. package/source/smart.chart.js +1 -1
  223. package/source/smart.chart.rangeselector.js +1 -1
  224. package/source/smart.chart.waterfall.js +1 -1
  225. package/source/smart.checkbox.js +1 -1
  226. package/source/smart.checkinput.js +1 -1
  227. package/source/smart.chip.js +1 -1
  228. package/source/smart.colorinput.js +1 -1
  229. package/source/smart.colorpanel.js +1 -1
  230. package/source/smart.colorpicker.js +1 -1
  231. package/source/smart.combobox.js +1 -1
  232. package/source/smart.complex.js +1 -1
  233. package/source/smart.core.js +1 -1
  234. package/source/smart.countryinput.js +1 -1
  235. package/source/smart.data.js +1 -1
  236. package/source/smart.date.js +1 -1
  237. package/source/smart.dateformatpanel.js +1 -1
  238. package/source/smart.dateinput.js +1 -1
  239. package/source/smart.daterangeinput.js +1 -1
  240. package/source/smart.datetimepicker.js +1 -1
  241. package/source/smart.dockinglayout.js +1 -1
  242. package/source/smart.draw.js +1 -1
  243. package/source/smart.dropdownbutton.js +1 -1
  244. package/source/smart.dropdownlist.js +1 -1
  245. package/source/smart.editor.js +2 -2
  246. package/source/smart.element.js +1 -1
  247. package/source/smart.elements.js +17 -17
  248. package/source/smart.export.js +1 -1
  249. package/source/smart.fileupload.js +2 -2
  250. package/source/smart.filter.js +1 -1
  251. package/source/smart.filterbuilder.js +2 -2
  252. package/source/smart.filterpanel.js +1 -1
  253. package/source/smart.form.js +1 -1
  254. package/source/smart.format.js +1 -1
  255. package/source/smart.formulaparser.js +1 -1
  256. package/source/smart.ganttchart.js +2 -2
  257. package/source/smart.gauge.js +1 -1
  258. package/source/smart.grid.cell.js +2 -2
  259. package/source/smart.grid.chart.js +1 -1
  260. package/source/smart.grid.column.js +1 -1
  261. package/source/smart.grid.core.js +2 -2
  262. package/source/smart.grid.dialog.js +2 -2
  263. package/source/smart.grid.edit.js +2 -2
  264. package/source/smart.grid.export.js +1 -1
  265. package/source/smart.grid.filter.js +1 -1
  266. package/source/smart.grid.group.js +1 -1
  267. package/source/smart.grid.js +1 -1
  268. package/source/smart.grid.menu.js +2 -2
  269. package/source/smart.grid.pager.js +1 -1
  270. package/source/smart.grid.reorder.js +1 -1
  271. package/source/smart.grid.resize.js +2 -2
  272. package/source/smart.grid.row.js +1 -1
  273. package/source/smart.grid.select.js +2 -2
  274. package/source/smart.grid.sort.js +1 -1
  275. package/source/smart.grid.toolbar.js +2 -2
  276. package/source/smart.grid.tree.js +1 -1
  277. package/source/smart.grid.view.js +2 -2
  278. package/source/smart.gridpanel.js +1 -1
  279. package/source/smart.input.js +2 -2
  280. package/source/smart.kanban.js +2 -2
  281. package/source/smart.layout.js +1 -1
  282. package/source/smart.led.js +1 -1
  283. package/source/smart.listbox.js +2 -2
  284. package/source/smart.listmenu.js +1 -1
  285. package/source/smart.map.js +1 -1
  286. package/source/smart.maskedtextbox.js +1 -1
  287. package/source/smart.math.js +1 -1
  288. package/source/smart.menu.js +1 -1
  289. package/source/smart.multicomboinput.js +1 -1
  290. package/source/smart.multiinput.js +1 -1
  291. package/source/smart.multilinetextbox.js +1 -1
  292. package/source/smart.multisplitbutton.js +1 -1
  293. package/source/smart.numberformatpanel.js +1 -1
  294. package/source/smart.numberinput.js +1 -1
  295. package/source/smart.numeric.js +1 -1
  296. package/source/smart.numerictextbox.js +1 -1
  297. package/source/smart.pager.js +1 -1
  298. package/source/smart.passwordinput.js +1 -1
  299. package/source/smart.passwordtextbox.js +1 -1
  300. package/source/smart.path.js +1 -1
  301. package/source/smart.phoneinput.js +1 -1
  302. package/source/smart.pivottable.js +1 -1
  303. package/source/smart.powerbutton.js +1 -1
  304. package/source/smart.progressbar.js +1 -1
  305. package/source/smart.qrcode.js +1 -1
  306. package/source/smart.radiobutton.js +1 -1
  307. package/source/smart.rating.js +1 -1
  308. package/source/smart.router.js +1 -1
  309. package/source/smart.scheduler.js +1 -1
  310. package/source/smart.scrollbar.js +1 -1
  311. package/source/smart.slider.js +1 -1
  312. package/source/smart.sortable.js +1 -1
  313. package/source/smart.splitter.js +1 -1
  314. package/source/smart.switchbutton.js +1 -1
  315. package/source/smart.table.js +1 -1
  316. package/source/smart.tabs.js +1 -1
  317. package/source/smart.tank.js +1 -1
  318. package/source/smart.textarea.js +1 -1
  319. package/source/smart.textbox.js +1 -1
  320. package/source/smart.tickintervalhandler.js +1 -1
  321. package/source/smart.timeinput.js +1 -1
  322. package/source/smart.timepicker.js +1 -1
  323. package/source/smart.toast.js +1 -1
  324. package/source/smart.tooltip.js +1 -1
  325. package/source/smart.tree.js +1 -1
  326. package/source/smart.validationpanel.js +1 -1
  327. package/source/smart.validator.js +1 -1
  328. package/source/smart.window.js +1 -1
  329. package/source/styles/components/smart.grid.css +1 -1
  330. package/source/styles/default/scss/smart.grid.scss +10 -3
  331. package/source/styles/default/smart.grid.css +7 -3
  332. package/source/styles/smart.default.css +1 -1
  333. package/source/typescript/smart.editor.d.ts +4 -2
  334. package/source/typescript/smart.elements.d.ts +45 -3
  335. package/source/typescript/smart.fileupload.d.ts +2 -1
  336. package/source/typescript/smart.grid.d.ts +34 -0
  337. package/source/typescript/smart.querybuilder.d.ts +5 -0
  338. package/splitter/splitter.d.ts +3 -3
  339. package/splitter/splitter.esm.js +6 -61
  340. package/splitter/splitter.umd.js +901 -956
  341. package/table/pivottable.d.ts +3 -3
  342. package/table/table.d.ts +7 -7
  343. package/table/table.esm.js +14 -109
  344. package/table/table.umd.js +1278 -1373
  345. package/tabs/tabs.d.ts +4 -4
  346. package/tabs/tabs.esm.js +8 -73
  347. package/tabs/tabs.umd.js +875 -940
  348. package/tabs/tabswindow.d.ts +5 -5
  349. package/tabswindow/tabswindow.d.ts +5 -5
  350. package/tabswindow/tabswindow.esm.js +10 -85
  351. package/tabswindow/tabswindow.umd.js +1134 -1209
  352. package/tank/tank.d.ts +2 -2
  353. package/tank/tank.esm.js +4 -49
  354. package/tank/tank.umd.js +598 -643
  355. package/textbox/multilinetextbox.d.ts +1 -1
  356. package/textbox/numerictextbox.d.ts +1 -1
  357. package/timepicker/datetimepicker.d.ts +1 -1
  358. package/toast/toast.d.ts +1 -1
  359. package/toast/toast.esm.js +2 -37
  360. package/toast/toast.umd.js +397 -432
  361. package/tree/tree.d.ts +4 -4
  362. package/tree/tree.esm.js +8 -73
  363. package/tree/tree.umd.js +1310 -1375
  364. package/waitwindow/waitwindow.d.ts +5 -5
  365. package/waitwindow/waitwindow.esm.js +10 -85
  366. package/waitwindow/waitwindow.umd.js +1134 -1209
  367. package/window/alertwindow.d.ts +5 -5
  368. package/window/dialogwindow.d.ts +5 -5
  369. package/window/multilinewindow.d.ts +5 -5
  370. package/window/progresswindow.d.ts +5 -5
  371. package/window/promptwindow.d.ts +5 -5
  372. package/window/tabswindow.d.ts +5 -5
  373. package/window/waitwindow.d.ts +5 -5
  374. package/window/window.d.ts +5 -5
  375. package/window/window.esm.js +10 -85
  376. package/window/window.umd.js +1134 -1209
package/tree/tree.umd.js CHANGED
@@ -2,1387 +2,1322 @@
2
2
  require('../source/modules/smart.tree');
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.tree = {}),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.tree = {}),global.React));
8
8
  }(this, (function (exports,React) { 'use strict';
9
9
 
10
- React = React && React.hasOwnProperty('default') ? React['default'] : React;
10
+ React = React && React.hasOwnProperty('default') ? React['default'] : React;
11
11
 
12
- /*! *****************************************************************************
13
- Copyright (c) Microsoft Corporation. All rights reserved.
14
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use
15
- this file except in compliance with the License. You may obtain a copy of the
16
- License at http://www.apache.org/licenses/LICENSE-2.0
17
-
18
- THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
19
- KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
20
- WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
21
- MERCHANTABLITY OR NON-INFRINGEMENT.
22
-
23
- See the Apache Version 2.0 License for specific language governing permissions
24
- and limitations under the License.
25
- ***************************************************************************** */
26
-
27
- function __awaiter(thisArg, _arguments, P, generator) {
28
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
29
- return new (P || (P = Promise))(function (resolve, reject) {
30
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
31
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
32
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
33
- step((generator = generator.apply(thisArg, _arguments || [])).next());
34
- });
35
- }
12
+ const Smart = window.Smart;
13
+ /**
14
+ Defines a tree items.
15
+ */
16
+ class TreeItem 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 = 'TreeItem' + Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
25
+ }
26
+ return this._id;
27
+ }
28
+ /** Enables or disables element.
29
+ * Property type: boolean
30
+ */
31
+ get disabled() {
32
+ return this.nativeElement ? this.nativeElement.disabled : undefined;
33
+ }
34
+ set disabled(value) {
35
+ if (this.nativeElement) {
36
+ this.nativeElement.disabled = value;
37
+ }
38
+ }
39
+ /**
40
+ * Property type: any
41
+ */
42
+ get label() {
43
+ return this.nativeElement ? this.nativeElement.label : undefined;
44
+ }
45
+ set label(value) {
46
+ if (this.nativeElement) {
47
+ this.nativeElement.label = value;
48
+ }
49
+ }
50
+ /**
51
+ * Property type: number
52
+ */
53
+ get level() {
54
+ return this.nativeElement ? this.nativeElement.level : undefined;
55
+ }
56
+ set level(value) {
57
+ if (this.nativeElement) {
58
+ this.nativeElement.level = value;
59
+ }
60
+ }
61
+ /**
62
+ * Property type: boolean
63
+ */
64
+ get selected() {
65
+ return this.nativeElement ? this.nativeElement.selected : undefined;
66
+ }
67
+ set selected(value) {
68
+ if (this.nativeElement) {
69
+ this.nativeElement.selected = value;
70
+ }
71
+ }
72
+ /**
73
+ * Property type: boolean
74
+ */
75
+ get separator() {
76
+ return this.nativeElement ? this.nativeElement.separator : undefined;
77
+ }
78
+ set separator(value) {
79
+ if (this.nativeElement) {
80
+ this.nativeElement.separator = value;
81
+ }
82
+ }
83
+ /**
84
+ * Property type: string
85
+ */
86
+ get shortcut() {
87
+ return this.nativeElement ? this.nativeElement.shortcut : undefined;
88
+ }
89
+ set shortcut(value) {
90
+ if (this.nativeElement) {
91
+ this.nativeElement.shortcut = value;
92
+ }
93
+ }
94
+ /**
95
+ * Property type: any
96
+ */
97
+ get value() {
98
+ return this.nativeElement ? this.nativeElement.value : undefined;
99
+ }
100
+ set value(value) {
101
+ if (this.nativeElement) {
102
+ this.nativeElement.value = value;
103
+ }
104
+ }
105
+ /** Disables user interaction with the item.
106
+ * Property type: boolean
107
+ */
108
+ get readonly() {
109
+ return this.nativeElement ? this.nativeElement.readonly : undefined;
110
+ }
111
+ set readonly(value) {
112
+ if (this.nativeElement) {
113
+ this.nativeElement.readonly = value;
114
+ }
115
+ }
116
+ // Gets the properties of the React component.
117
+ get properties() {
118
+ return ["disabled", "label", "level", "selected", "separator", "shortcut", "value", "readonly"];
119
+ }
120
+ // Gets the events of the React component.
121
+ get eventListeners() {
122
+ return ["onCreate", "onReady"];
123
+ }
124
+ componentDidRender(initialize) {
125
+ const that = this;
126
+ const props = {};
127
+ const events = {};
128
+ let styles = null;
129
+ for (let prop in that.props) {
130
+ if (prop === 'children') {
131
+ continue;
132
+ }
133
+ if (prop === 'style') {
134
+ styles = that.props[prop];
135
+ continue;
136
+ }
137
+ if (prop.startsWith('on') && that.properties.indexOf(prop) === -1) {
138
+ events[prop] = that.props[prop];
139
+ continue;
140
+ }
141
+ props[prop] = that.props[prop];
142
+ }
143
+ if (initialize) {
144
+ that.nativeElement = this.componentRef.current;
145
+ }
146
+ for (let prop in props) {
147
+ if (prop === 'class' || prop === 'className') {
148
+ const classNames = props[prop].trim().split(' ');
149
+ for (let className in classNames) {
150
+ if (!that.nativeElement.classList.contains(classNames[className]) && classNames[className] !== "") {
151
+ that.nativeElement.classList.add(classNames[className]);
152
+ }
153
+ }
154
+ continue;
155
+ }
156
+ if (props[prop] !== that.nativeElement[prop]) {
157
+ const normalizeProp = (str) => {
158
+ return str.replace(/-([a-z])/g, function (g) {
159
+ return g[1].toUpperCase();
160
+ });
161
+ };
162
+ if (prop === 'hover' || prop === 'active' || prop === 'focus' || prop === 'selected') {
163
+ that.nativeElement.setAttribute(prop, '');
164
+ }
165
+ const normalizedProp = normalizeProp(prop);
166
+ that.nativeElement[normalizedProp] = props[prop];
167
+ }
168
+ }
169
+ for (let eventName in events) {
170
+ that[eventName] = events[eventName];
171
+ that.nativeElement[eventName.toLowerCase()] = events[eventName];
172
+ }
173
+ if (initialize) {
174
+ if (that.onCreate) {
175
+ that.onCreate();
176
+ }
177
+ that.nativeElement.whenRendered(() => {
178
+ if (that.onReady) {
179
+ that.onReady();
180
+ }
181
+ });
182
+ }
183
+ // setup styles.
184
+ if (styles) {
185
+ for (let styleName in styles) {
186
+ that.nativeElement.style[styleName] = styles[styleName];
187
+ }
188
+ }
189
+ }
190
+ componentDidMount() {
191
+ this.componentDidRender(true);
192
+ }
193
+ componentDidUpdate() {
194
+ this.componentDidRender(false);
195
+ }
196
+ componentWillUnmount() {
197
+ const that = this;
198
+ if (!that.nativeElement) {
199
+ return;
200
+ }
201
+ that.nativeElement.whenRenderedCallbacks = [];
202
+ for (let i = 0; i < that.eventListeners.length; i++) {
203
+ const eventName = that.eventListeners[i];
204
+ that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
205
+ }
206
+ }
207
+ render() {
208
+ return (React.createElement("smart-tree-item", { ref: this.componentRef }, this.props.children));
209
+ }
210
+ }
36
211
 
37
- const Smart = window.Smart;
38
- /**
39
- Defines a tree items.
40
- */
41
- class TreeItem 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 = 'TreeItem' + Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
50
- }
51
- return this._id;
52
- }
53
- /** Enables or disables element.
54
- * Property type: boolean
55
- */
56
- get disabled() {
57
- return this.nativeElement ? this.nativeElement.disabled : undefined;
58
- }
59
- set disabled(value) {
60
- if (this.nativeElement) {
61
- this.nativeElement.disabled = value;
62
- }
63
- }
64
- /**
65
- * Property type: any
66
- */
67
- get label() {
68
- return this.nativeElement ? this.nativeElement.label : undefined;
69
- }
70
- set label(value) {
71
- if (this.nativeElement) {
72
- this.nativeElement.label = value;
73
- }
74
- }
75
- /**
76
- * Property type: number
77
- */
78
- get level() {
79
- return this.nativeElement ? this.nativeElement.level : undefined;
80
- }
81
- set level(value) {
82
- if (this.nativeElement) {
83
- this.nativeElement.level = value;
84
- }
85
- }
86
- /**
87
- * Property type: boolean
88
- */
89
- get selected() {
90
- return this.nativeElement ? this.nativeElement.selected : undefined;
91
- }
92
- set selected(value) {
93
- if (this.nativeElement) {
94
- this.nativeElement.selected = value;
95
- }
96
- }
97
- /**
98
- * Property type: boolean
99
- */
100
- get separator() {
101
- return this.nativeElement ? this.nativeElement.separator : undefined;
102
- }
103
- set separator(value) {
104
- if (this.nativeElement) {
105
- this.nativeElement.separator = value;
106
- }
107
- }
108
- /**
109
- * Property type: string
110
- */
111
- get shortcut() {
112
- return this.nativeElement ? this.nativeElement.shortcut : undefined;
113
- }
114
- set shortcut(value) {
115
- if (this.nativeElement) {
116
- this.nativeElement.shortcut = value;
117
- }
118
- }
119
- /**
120
- * Property type: any
121
- */
122
- get value() {
123
- return this.nativeElement ? this.nativeElement.value : undefined;
124
- }
125
- set value(value) {
126
- if (this.nativeElement) {
127
- this.nativeElement.value = value;
128
- }
129
- }
130
- /** Disables user interaction with the item.
131
- * Property type: boolean
132
- */
133
- get readonly() {
134
- return this.nativeElement ? this.nativeElement.readonly : undefined;
135
- }
136
- set readonly(value) {
137
- if (this.nativeElement) {
138
- this.nativeElement.readonly = value;
139
- }
140
- }
141
- // Gets the properties of the React component.
142
- get properties() {
143
- return ["disabled", "label", "level", "selected", "separator", "shortcut", "value", "readonly"];
144
- }
145
- // Gets the events of the React component.
146
- get eventListeners() {
147
- return ["onCreate", "onReady"];
148
- }
149
- componentDidRender(initialize) {
150
- const that = this;
151
- const props = {};
152
- const events = {};
153
- let styles = null;
154
- for (let prop in that.props) {
155
- if (prop === 'children') {
156
- continue;
157
- }
158
- if (prop === 'style') {
159
- styles = that.props[prop];
160
- continue;
161
- }
162
- if (prop.startsWith('on') && that.properties.indexOf(prop) === -1) {
163
- events[prop] = that.props[prop];
164
- continue;
165
- }
166
- props[prop] = that.props[prop];
167
- }
168
- if (initialize) {
169
- that.nativeElement = this.componentRef.current;
170
- }
171
- for (let prop in props) {
172
- if (prop === 'class' || prop === 'className') {
173
- const classNames = props[prop].trim().split(' ');
174
- for (let className in classNames) {
175
- if (!that.nativeElement.classList.contains(classNames[className]) && classNames[className] !== "") {
176
- that.nativeElement.classList.add(classNames[className]);
177
- }
178
- }
179
- continue;
180
- }
181
- if (props[prop] !== that.nativeElement[prop]) {
182
- const normalizeProp = (str) => {
183
- return str.replace(/-([a-z])/g, function (g) {
184
- return g[1].toUpperCase();
185
- });
186
- };
187
- if (prop === 'hover' || prop === 'active' || prop === 'focus' || prop === 'selected') {
188
- that.nativeElement.setAttribute(prop, '');
189
- }
190
- const normalizedProp = normalizeProp(prop);
191
- that.nativeElement[normalizedProp] = props[prop];
192
- }
193
- }
194
- for (let eventName in events) {
195
- that[eventName] = events[eventName];
196
- that.nativeElement[eventName.toLowerCase()] = events[eventName];
197
- }
198
- if (initialize) {
199
- if (that.onCreate) {
200
- that.onCreate();
201
- }
202
- that.nativeElement.whenRendered(() => {
203
- if (that.onReady) {
204
- that.onReady();
205
- }
206
- });
207
- }
208
- // setup styles.
209
- if (styles) {
210
- for (let styleName in styles) {
211
- that.nativeElement.style[styleName] = styles[styleName];
212
- }
213
- }
214
- }
215
- componentDidMount() {
216
- this.componentDidRender(true);
217
- }
218
- componentDidUpdate() {
219
- this.componentDidRender(false);
220
- }
221
- componentWillUnmount() {
222
- const that = this;
223
- if (!that.nativeElement) {
224
- return;
225
- }
226
- that.nativeElement.whenRenderedCallbacks = [];
227
- for (let i = 0; i < that.eventListeners.length; i++) {
228
- const eventName = that.eventListeners[i];
229
- that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
230
- }
231
- }
232
- render() {
233
- return (React.createElement("smart-tree-item", { ref: this.componentRef }, this.props.children));
234
- }
235
- }
212
+ const Smart$1 = window.Smart;
213
+ /**
214
+ Defines a group of tree items.
215
+ */
216
+ class TreeItemsGroup extends React.Component {
217
+ constructor(props) {
218
+ super(props);
219
+ this.componentRef = React.createRef();
220
+ }
221
+ // Gets the id of the React component.
222
+ get id() {
223
+ if (!this._id) {
224
+ this._id = 'TreeItemsGroup' + Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
225
+ }
226
+ return this._id;
227
+ }
228
+ /** Enables or disables element.
229
+ * Property type: boolean
230
+ */
231
+ get disabled() {
232
+ return this.nativeElement ? this.nativeElement.disabled : undefined;
233
+ }
234
+ set disabled(value) {
235
+ if (this.nativeElement) {
236
+ this.nativeElement.disabled = value;
237
+ }
238
+ }
239
+ /**
240
+ * Property type: boolean
241
+ */
242
+ get expanded() {
243
+ return this.nativeElement ? this.nativeElement.expanded : undefined;
244
+ }
245
+ set expanded(value) {
246
+ if (this.nativeElement) {
247
+ this.nativeElement.expanded = value;
248
+ }
249
+ }
250
+ /**
251
+ * Property type: any
252
+ */
253
+ get label() {
254
+ return this.nativeElement ? this.nativeElement.label : undefined;
255
+ }
256
+ set label(value) {
257
+ if (this.nativeElement) {
258
+ this.nativeElement.label = value;
259
+ }
260
+ }
261
+ /**
262
+ * Property type: number
263
+ */
264
+ get level() {
265
+ return this.nativeElement ? this.nativeElement.level : undefined;
266
+ }
267
+ set level(value) {
268
+ if (this.nativeElement) {
269
+ this.nativeElement.level = value;
270
+ }
271
+ }
272
+ /**
273
+ * Property type: boolean
274
+ */
275
+ get selected() {
276
+ return this.nativeElement ? this.nativeElement.selected : undefined;
277
+ }
278
+ set selected(value) {
279
+ if (this.nativeElement) {
280
+ this.nativeElement.selected = value;
281
+ }
282
+ }
283
+ /**
284
+ * Property type: boolean
285
+ */
286
+ get separator() {
287
+ return this.nativeElement ? this.nativeElement.separator : undefined;
288
+ }
289
+ set separator(value) {
290
+ if (this.nativeElement) {
291
+ this.nativeElement.separator = value;
292
+ }
293
+ }
294
+ /**
295
+ * Property type: any
296
+ */
297
+ get value() {
298
+ return this.nativeElement ? this.nativeElement.value : undefined;
299
+ }
300
+ set value(value) {
301
+ if (this.nativeElement) {
302
+ this.nativeElement.value = value;
303
+ }
304
+ }
305
+ /** Disables user interaction with the item.
306
+ * Property type: boolean
307
+ */
308
+ get readonly() {
309
+ return this.nativeElement ? this.nativeElement.readonly : undefined;
310
+ }
311
+ set readonly(value) {
312
+ if (this.nativeElement) {
313
+ this.nativeElement.readonly = value;
314
+ }
315
+ }
316
+ // Gets the properties of the React component.
317
+ get properties() {
318
+ return ["disabled", "expanded", "label", "level", "selected", "separator", "value", "readonly"];
319
+ }
320
+ // Gets the events of the React component.
321
+ get eventListeners() {
322
+ return ["onCreate", "onReady"];
323
+ }
324
+ componentDidRender(initialize) {
325
+ const that = this;
326
+ const props = {};
327
+ const events = {};
328
+ let styles = null;
329
+ for (let prop in that.props) {
330
+ if (prop === 'children') {
331
+ continue;
332
+ }
333
+ if (prop === 'style') {
334
+ styles = that.props[prop];
335
+ continue;
336
+ }
337
+ if (prop.startsWith('on') && that.properties.indexOf(prop) === -1) {
338
+ events[prop] = that.props[prop];
339
+ continue;
340
+ }
341
+ props[prop] = that.props[prop];
342
+ }
343
+ if (initialize) {
344
+ that.nativeElement = this.componentRef.current;
345
+ }
346
+ for (let prop in props) {
347
+ if (prop === 'class' || prop === 'className') {
348
+ const classNames = props[prop].trim().split(' ');
349
+ for (let className in classNames) {
350
+ if (!that.nativeElement.classList.contains(classNames[className]) && classNames[className] !== "") {
351
+ that.nativeElement.classList.add(classNames[className]);
352
+ }
353
+ }
354
+ continue;
355
+ }
356
+ if (props[prop] !== that.nativeElement[prop]) {
357
+ const normalizeProp = (str) => {
358
+ return str.replace(/-([a-z])/g, function (g) {
359
+ return g[1].toUpperCase();
360
+ });
361
+ };
362
+ if (prop === 'hover' || prop === 'active' || prop === 'focus' || prop === 'selected') {
363
+ that.nativeElement.setAttribute(prop, '');
364
+ }
365
+ const normalizedProp = normalizeProp(prop);
366
+ that.nativeElement[normalizedProp] = props[prop];
367
+ }
368
+ }
369
+ for (let eventName in events) {
370
+ that[eventName] = events[eventName];
371
+ that.nativeElement[eventName.toLowerCase()] = events[eventName];
372
+ }
373
+ if (initialize) {
374
+ if (that.onCreate) {
375
+ that.onCreate();
376
+ }
377
+ that.nativeElement.whenRendered(() => {
378
+ if (that.onReady) {
379
+ that.onReady();
380
+ }
381
+ });
382
+ }
383
+ // setup styles.
384
+ if (styles) {
385
+ for (let styleName in styles) {
386
+ that.nativeElement.style[styleName] = styles[styleName];
387
+ }
388
+ }
389
+ }
390
+ componentDidMount() {
391
+ this.componentDidRender(true);
392
+ }
393
+ componentDidUpdate() {
394
+ this.componentDidRender(false);
395
+ }
396
+ componentWillUnmount() {
397
+ const that = this;
398
+ if (!that.nativeElement) {
399
+ return;
400
+ }
401
+ that.nativeElement.whenRenderedCallbacks = [];
402
+ for (let i = 0; i < that.eventListeners.length; i++) {
403
+ const eventName = that.eventListeners[i];
404
+ that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
405
+ }
406
+ }
407
+ render() {
408
+ return (React.createElement("smart-tree-items-group", { ref: this.componentRef }, this.props.children));
409
+ }
410
+ }
236
411
 
237
- const Smart$1 = window.Smart;
238
- /**
239
- Defines a group of tree items.
240
- */
241
- class TreeItemsGroup extends React.Component {
242
- constructor(props) {
243
- super(props);
244
- this.componentRef = React.createRef();
245
- }
246
- // Gets the id of the React component.
247
- get id() {
248
- if (!this._id) {
249
- this._id = 'TreeItemsGroup' + Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
250
- }
251
- return this._id;
252
- }
253
- /** Enables or disables element.
254
- * Property type: boolean
255
- */
256
- get disabled() {
257
- return this.nativeElement ? this.nativeElement.disabled : undefined;
258
- }
259
- set disabled(value) {
260
- if (this.nativeElement) {
261
- this.nativeElement.disabled = value;
262
- }
263
- }
264
- /**
265
- * Property type: boolean
266
- */
267
- get expanded() {
268
- return this.nativeElement ? this.nativeElement.expanded : undefined;
269
- }
270
- set expanded(value) {
271
- if (this.nativeElement) {
272
- this.nativeElement.expanded = value;
273
- }
274
- }
275
- /**
276
- * Property type: any
277
- */
278
- get label() {
279
- return this.nativeElement ? this.nativeElement.label : undefined;
280
- }
281
- set label(value) {
282
- if (this.nativeElement) {
283
- this.nativeElement.label = value;
284
- }
285
- }
286
- /**
287
- * Property type: number
288
- */
289
- get level() {
290
- return this.nativeElement ? this.nativeElement.level : undefined;
291
- }
292
- set level(value) {
293
- if (this.nativeElement) {
294
- this.nativeElement.level = value;
295
- }
296
- }
297
- /**
298
- * Property type: boolean
299
- */
300
- get selected() {
301
- return this.nativeElement ? this.nativeElement.selected : undefined;
302
- }
303
- set selected(value) {
304
- if (this.nativeElement) {
305
- this.nativeElement.selected = value;
306
- }
307
- }
308
- /**
309
- * Property type: boolean
310
- */
311
- get separator() {
312
- return this.nativeElement ? this.nativeElement.separator : undefined;
313
- }
314
- set separator(value) {
315
- if (this.nativeElement) {
316
- this.nativeElement.separator = value;
317
- }
318
- }
319
- /**
320
- * Property type: any
321
- */
322
- get value() {
323
- return this.nativeElement ? this.nativeElement.value : undefined;
324
- }
325
- set value(value) {
326
- if (this.nativeElement) {
327
- this.nativeElement.value = value;
328
- }
329
- }
330
- /** Disables user interaction with the item.
331
- * Property type: boolean
332
- */
333
- get readonly() {
334
- return this.nativeElement ? this.nativeElement.readonly : undefined;
335
- }
336
- set readonly(value) {
337
- if (this.nativeElement) {
338
- this.nativeElement.readonly = value;
339
- }
340
- }
341
- // Gets the properties of the React component.
342
- get properties() {
343
- return ["disabled", "expanded", "label", "level", "selected", "separator", "value", "readonly"];
344
- }
345
- // Gets the events of the React component.
346
- get eventListeners() {
347
- return ["onCreate", "onReady"];
348
- }
349
- componentDidRender(initialize) {
350
- const that = this;
351
- const props = {};
352
- const events = {};
353
- let styles = null;
354
- for (let prop in that.props) {
355
- if (prop === 'children') {
356
- continue;
357
- }
358
- if (prop === 'style') {
359
- styles = that.props[prop];
360
- continue;
361
- }
362
- if (prop.startsWith('on') && that.properties.indexOf(prop) === -1) {
363
- events[prop] = that.props[prop];
364
- continue;
365
- }
366
- props[prop] = that.props[prop];
367
- }
368
- if (initialize) {
369
- that.nativeElement = this.componentRef.current;
370
- }
371
- for (let prop in props) {
372
- if (prop === 'class' || prop === 'className') {
373
- const classNames = props[prop].trim().split(' ');
374
- for (let className in classNames) {
375
- if (!that.nativeElement.classList.contains(classNames[className]) && classNames[className] !== "") {
376
- that.nativeElement.classList.add(classNames[className]);
377
- }
378
- }
379
- continue;
380
- }
381
- if (props[prop] !== that.nativeElement[prop]) {
382
- const normalizeProp = (str) => {
383
- return str.replace(/-([a-z])/g, function (g) {
384
- return g[1].toUpperCase();
385
- });
386
- };
387
- if (prop === 'hover' || prop === 'active' || prop === 'focus' || prop === 'selected') {
388
- that.nativeElement.setAttribute(prop, '');
389
- }
390
- const normalizedProp = normalizeProp(prop);
391
- that.nativeElement[normalizedProp] = props[prop];
392
- }
393
- }
394
- for (let eventName in events) {
395
- that[eventName] = events[eventName];
396
- that.nativeElement[eventName.toLowerCase()] = events[eventName];
397
- }
398
- if (initialize) {
399
- if (that.onCreate) {
400
- that.onCreate();
401
- }
402
- that.nativeElement.whenRendered(() => {
403
- if (that.onReady) {
404
- that.onReady();
405
- }
406
- });
407
- }
408
- // setup styles.
409
- if (styles) {
410
- for (let styleName in styles) {
411
- that.nativeElement.style[styleName] = styles[styleName];
412
- }
413
- }
414
- }
415
- componentDidMount() {
416
- this.componentDidRender(true);
417
- }
418
- componentDidUpdate() {
419
- this.componentDidRender(false);
420
- }
421
- componentWillUnmount() {
422
- const that = this;
423
- if (!that.nativeElement) {
424
- return;
425
- }
426
- that.nativeElement.whenRenderedCallbacks = [];
427
- for (let i = 0; i < that.eventListeners.length; i++) {
428
- const eventName = that.eventListeners[i];
429
- that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
430
- }
431
- }
432
- render() {
433
- return (React.createElement("smart-tree-items-group", { ref: this.componentRef }, this.props.children));
434
- }
435
- }
412
+ const Smart$2 = window.Smart;
413
+ /**
414
+ Treeview component is a user interface that is used to represent hierarchical data in a tree structure.
415
+ */
416
+ class Tree extends React.Component {
417
+ constructor(props) {
418
+ super(props);
419
+ this.componentRef = React.createRef();
420
+ }
421
+ // Gets the id of the React component.
422
+ get id() {
423
+ if (!this._id) {
424
+ this._id = 'Tree' + Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
425
+ }
426
+ return this._id;
427
+ }
428
+ /** Allows drag operation in current tree. When enabled, items can be dragged and dropped to a tree with enabled allowDrop.
429
+ * Property type: boolean
430
+ */
431
+ get allowDrag() {
432
+ return this.nativeElement ? this.nativeElement.allowDrag : undefined;
433
+ }
434
+ set allowDrag(value) {
435
+ if (this.nativeElement) {
436
+ this.nativeElement.allowDrag = value;
437
+ }
438
+ }
439
+ /** Allows drop operation. Dropped items could originate from the current tree or another tree.
440
+ * Property type: boolean
441
+ */
442
+ get allowDrop() {
443
+ return this.nativeElement ? this.nativeElement.allowDrop : undefined;
444
+ }
445
+ set allowDrop(value) {
446
+ if (this.nativeElement) {
447
+ this.nativeElement.allowDrop = value;
448
+ }
449
+ }
450
+ /** Sets or gets the animation mode. Animation is disabled when the property is set to 'none'
451
+ * Property type: Animation | string
452
+ */
453
+ get animation() {
454
+ return this.nativeElement ? this.nativeElement.animation : undefined;
455
+ }
456
+ set animation(value) {
457
+ if (this.nativeElement) {
458
+ this.nativeElement.animation = value;
459
+ }
460
+ }
461
+ /** Automatically hides the tree's toggle element (arrow) on mouseleave and shows it on mouseenter.
462
+ * Property type: boolean
463
+ */
464
+ get autoHideToggleElement() {
465
+ return this.nativeElement ? this.nativeElement.autoHideToggleElement : undefined;
466
+ }
467
+ set autoHideToggleElement(value) {
468
+ if (this.nativeElement) {
469
+ this.nativeElement.autoHideToggleElement = value;
470
+ }
471
+ }
472
+ /** Enables or disables auto load state from the browser's localStorage. Information about filtering, sorting, expanded and selected items is loaded.
473
+ * Property type: boolean
474
+ */
475
+ get autoLoadState() {
476
+ return this.nativeElement ? this.nativeElement.autoLoadState : undefined;
477
+ }
478
+ set autoLoadState(value) {
479
+ if (this.nativeElement) {
480
+ this.nativeElement.autoLoadState = value;
481
+ }
482
+ }
483
+ /** Enables or disables auto save state to the browser's localStorage. Information about filtering, sorting, expanded and selected items is saved.
484
+ * Property type: boolean
485
+ */
486
+ get autoSaveState() {
487
+ return this.nativeElement ? this.nativeElement.autoSaveState : undefined;
488
+ }
489
+ set autoSaveState(value) {
490
+ if (this.nativeElement) {
491
+ this.nativeElement.autoSaveState = value;
492
+ }
493
+ }
494
+ /** Enables or disables auto sorting. If modifications are made to a sorted tree, but autoSort is false, the tree will not be re-sorted automatically.
495
+ * Property type: boolean
496
+ */
497
+ get autoSort() {
498
+ return this.nativeElement ? this.nativeElement.autoSort : undefined;
499
+ }
500
+ set autoSort(value) {
501
+ if (this.nativeElement) {
502
+ this.nativeElement.autoSort = value;
503
+ }
504
+ }
505
+ /** Determines the data source that will be loaded to the Tree.
506
+ * Property type: any
507
+ */
508
+ get dataSource() {
509
+ return this.nativeElement ? this.nativeElement.dataSource : undefined;
510
+ }
511
+ set dataSource(value) {
512
+ if (this.nativeElement) {
513
+ this.nativeElement.dataSource = value;
514
+ }
515
+ }
516
+ /** Enables or disables jqxTree.
517
+ * Property type: boolean
518
+ */
519
+ get disabled() {
520
+ return this.nativeElement ? this.nativeElement.disabled : undefined;
521
+ }
522
+ set disabled(value) {
523
+ if (this.nativeElement) {
524
+ this.nativeElement.disabled = value;
525
+ }
526
+ }
527
+ /** Shows or hides loading indicator.
528
+ * Property type: boolean
529
+ */
530
+ get displayLoadingIndicator() {
531
+ return this.nativeElement ? this.nativeElement.displayLoadingIndicator : undefined;
532
+ }
533
+ set displayLoadingIndicator(value) {
534
+ if (this.nativeElement) {
535
+ this.nativeElement.displayLoadingIndicator = value;
536
+ }
537
+ }
538
+ /** Determines the field in the data source that corresponds to an item's label.
539
+ * Property type: string
540
+ */
541
+ get displayMember() {
542
+ return this.nativeElement ? this.nativeElement.displayMember : undefined;
543
+ }
544
+ set displayMember(value) {
545
+ if (this.nativeElement) {
546
+ this.nativeElement.displayMember = value;
547
+ }
548
+ }
549
+ /** A callback function for customizing the HTML of the drag feedback. It receives one parameter - an array of the currently dragged items.
550
+ * Property type: any
551
+ */
552
+ get dragFeedbackFormatFunction() {
553
+ return this.nativeElement ? this.nativeElement.dragFeedbackFormatFunction : undefined;
554
+ }
555
+ set dragFeedbackFormatFunction(value) {
556
+ if (this.nativeElement) {
557
+ this.nativeElement.dragFeedbackFormatFunction = value;
558
+ }
559
+ }
560
+ /** Determines the offset of the drag feedback element from the mouse cursor when dragging items. The first member of the array is the horizontal offset and the second one - the vertical offset.
561
+ * Property type: number[]
562
+ */
563
+ get dragOffset() {
564
+ return this.nativeElement ? this.nativeElement.dragOffset : undefined;
565
+ }
566
+ set dragOffset(value) {
567
+ if (this.nativeElement) {
568
+ this.nativeElement.dragOffset = value;
569
+ }
570
+ }
571
+ /** Enables or disables item's editting. An edit operation can be initiated by double-clicking a tree item or pressing F2 while an item is selected.
572
+ * Property type: boolean
573
+ */
574
+ get editable() {
575
+ return this.nativeElement ? this.nativeElement.editable : undefined;
576
+ }
577
+ set editable(value) {
578
+ if (this.nativeElement) {
579
+ this.nativeElement.editable = value;
580
+ }
581
+ }
582
+ /** Determines the expand behavior of TreeItemsGroups in the Tree.
583
+ * Property type: TreeExpandMode | string
584
+ */
585
+ get expandMode() {
586
+ return this.nativeElement ? this.nativeElement.expandMode : undefined;
587
+ }
588
+ set expandMode(value) {
589
+ if (this.nativeElement) {
590
+ this.nativeElement.expandMode = value;
591
+ }
592
+ }
593
+ /** Enables or disables filtering. Shows or hides filter input.
594
+ * Property type: boolean
595
+ */
596
+ get filterable() {
597
+ return this.nativeElement ? this.nativeElement.filterable : undefined;
598
+ }
599
+ set filterable(value) {
600
+ if (this.nativeElement) {
601
+ this.nativeElement.filterable = value;
602
+ }
603
+ }
604
+ /** Applies a filter only after the 'Enter' key is pressed.
605
+ * Property type: boolean
606
+ */
607
+ get filterOnEnter() {
608
+ return this.nativeElement ? this.nativeElement.filterOnEnter : undefined;
609
+ }
610
+ set filterOnEnter(value) {
611
+ if (this.nativeElement) {
612
+ this.nativeElement.filterOnEnter = value;
613
+ }
614
+ }
615
+ /** Sets custom text for placeholder in the filter input.
616
+ * Property type: string
617
+ */
618
+ get filterInputPlaceholder() {
619
+ return this.nativeElement ? this.nativeElement.filterInputPlaceholder : undefined;
620
+ }
621
+ set filterInputPlaceholder(value) {
622
+ if (this.nativeElement) {
623
+ this.nativeElement.filterInputPlaceholder = value;
624
+ }
625
+ }
626
+ /** Determines the TreeItem property that will be used as a filtering criteria. By default the label property is used. It can be set to 'value' if the user wants to filter by the value property or 'textContent' if the user wants to filter by text inside the TreeItem's content or any other property.
627
+ * Property type: string
628
+ */
629
+ get filterMember() {
630
+ return this.nativeElement ? this.nativeElement.filterMember : undefined;
631
+ }
632
+ set filterMember(value) {
633
+ if (this.nativeElement) {
634
+ this.nativeElement.filterMember = value;
635
+ }
636
+ }
637
+ /** Sets filter mode.
638
+ * Property type: FilterMode | string
639
+ */
640
+ get filterMode() {
641
+ return this.nativeElement ? this.nativeElement.filterMode : undefined;
642
+ }
643
+ set filterMode(value) {
644
+ if (this.nativeElement) {
645
+ this.nativeElement.filterMode = value;
646
+ }
647
+ }
648
+ /** Sets or gets whether the tree checkboxes have three states - checked, unchecked and indeterminate. Whorks on selectionMode: 'checkBox'
649
+ * Property type: boolean
650
+ */
651
+ get hasThreeStates() {
652
+ return this.nativeElement ? this.nativeElement.hasThreeStates : undefined;
653
+ }
654
+ set hasThreeStates(value) {
655
+ if (this.nativeElement) {
656
+ this.nativeElement.hasThreeStates = value;
657
+ }
658
+ }
659
+ /** Determines the field in the data source that corresponds to an item group's subitems collection.
660
+ * Property type: string
661
+ */
662
+ get itemsMember() {
663
+ return this.nativeElement ? this.nativeElement.itemsMember : undefined;
664
+ }
665
+ set itemsMember(value) {
666
+ if (this.nativeElement) {
667
+ this.nativeElement.itemsMember = value;
668
+ }
669
+ }
670
+ /** Sets custom text for placeholder in the loading indicator if loadingIndicatorPosition is set to 'top' or 'bottom'.
671
+ * Property type: string
672
+ */
673
+ get loadingIndicatorPlaceholder() {
674
+ return this.nativeElement ? this.nativeElement.loadingIndicatorPlaceholder : undefined;
675
+ }
676
+ set loadingIndicatorPlaceholder(value) {
677
+ if (this.nativeElement) {
678
+ this.nativeElement.loadingIndicatorPlaceholder = value;
679
+ }
680
+ }
681
+ /** Sets the position of the loading indicator.
682
+ * Property type: VerticalAlignment | string
683
+ */
684
+ get loadingIndicatorPosition() {
685
+ return this.nativeElement ? this.nativeElement.loadingIndicatorPosition : undefined;
686
+ }
687
+ set loadingIndicatorPosition(value) {
688
+ if (this.nativeElement) {
689
+ this.nativeElement.loadingIndicatorPosition = value;
690
+ }
691
+ }
692
+ /** Sets or gets the locale. Used in conjunction with the property messages.
693
+ * Property type: string
694
+ */
695
+ get locale() {
696
+ return this.nativeElement ? this.nativeElement.locale : undefined;
697
+ }
698
+ set locale(value) {
699
+ if (this.nativeElement) {
700
+ this.nativeElement.locale = value;
701
+ }
702
+ }
703
+ /** Callback, related to localization module.
704
+ * Property type: any
705
+ */
706
+ get localizeFormatFunction() {
707
+ return this.nativeElement ? this.nativeElement.localizeFormatFunction : undefined;
708
+ }
709
+ set localizeFormatFunction(value) {
710
+ if (this.nativeElement) {
711
+ this.nativeElement.localizeFormatFunction = value;
712
+ }
713
+ }
714
+ /** Sets or gets an object specifying strings used in the widget that can be localized. Used in conjunction with the property locale.
715
+ * Property type: any
716
+ */
717
+ get messages() {
718
+ return this.nativeElement ? this.nativeElement.messages : undefined;
719
+ }
720
+ set messages(value) {
721
+ if (this.nativeElement) {
722
+ this.nativeElement.messages = value;
723
+ }
724
+ }
725
+ /** Specifies what should happen with the scrollbar (or scroll buttons in scrollMode: 'scrollButtons') if content overflows the element's box.
726
+ * Property type: Overflow | string
727
+ */
728
+ get overflow() {
729
+ return this.nativeElement ? this.nativeElement.overflow : undefined;
730
+ }
731
+ set overflow(value) {
732
+ if (this.nativeElement) {
733
+ this.nativeElement.overflow = value;
734
+ }
735
+ }
736
+ /** If the element is readonly, users cannot interact with it.
737
+ * Property type: boolean
738
+ */
739
+ get readonly() {
740
+ return this.nativeElement ? this.nativeElement.readonly : undefined;
741
+ }
742
+ set readonly(value) {
743
+ if (this.nativeElement) {
744
+ this.nativeElement.readonly = value;
745
+ }
746
+ }
747
+ /** Determines whether the right-to-left support is enabled.
748
+ * Property type: boolean
749
+ */
750
+ get rightToLeft() {
751
+ return this.nativeElement ? this.nativeElement.rightToLeft : undefined;
752
+ }
753
+ set rightToLeft(value) {
754
+ if (this.nativeElement) {
755
+ this.nativeElement.rightToLeft = value;
756
+ }
757
+ }
758
+ /** Determines whether to use scrollbar or scrollButtons when content overflows an element's box.
759
+ * Property type: TreeScrollMode | string
760
+ */
761
+ get scrollMode() {
762
+ return this.nativeElement ? this.nativeElement.scrollMode : undefined;
763
+ }
764
+ set scrollMode(value) {
765
+ if (this.nativeElement) {
766
+ this.nativeElement.scrollMode = value;
767
+ }
768
+ }
769
+ /** An array with indexes (paths) of the selected items.
770
+ * Property type: string[]
771
+ */
772
+ get selectedIndexes() {
773
+ return this.nativeElement ? this.nativeElement.selectedIndexes : undefined;
774
+ }
775
+ set selectedIndexes(value) {
776
+ if (this.nativeElement) {
777
+ this.nativeElement.selectedIndexes = value;
778
+ }
779
+ }
780
+ /** Determines the way selected items are highlighted.
781
+ * Property type: TreeSelectionDisplayMode | string
782
+ */
783
+ get selectionDisplayMode() {
784
+ return this.nativeElement ? this.nativeElement.selectionDisplayMode : undefined;
785
+ }
786
+ set selectionDisplayMode(value) {
787
+ if (this.nativeElement) {
788
+ this.nativeElement.selectionDisplayMode = value;
789
+ }
790
+ }
791
+ /** Determines selection mode.
792
+ * Property type: TreeSelectionMode | string
793
+ */
794
+ get selectionMode() {
795
+ return this.nativeElement ? this.nativeElement.selectionMode : undefined;
796
+ }
797
+ set selectionMode(value) {
798
+ if (this.nativeElement) {
799
+ this.nativeElement.selectionMode = value;
800
+ }
801
+ }
802
+ /** Determines whether smart-tree-items-groups can be selected.
803
+ * Property type: TreeSelectionTarget | string
804
+ */
805
+ get selectionTarget() {
806
+ return this.nativeElement ? this.nativeElement.selectionTarget : undefined;
807
+ }
808
+ set selectionTarget(value) {
809
+ if (this.nativeElement) {
810
+ this.nativeElement.selectionTarget = value;
811
+ }
812
+ }
813
+ /** Shows or hides lines, displaying the relation between elements in group.
814
+ * Property type: boolean
815
+ */
816
+ get showLines() {
817
+ return this.nativeElement ? this.nativeElement.showLines : undefined;
818
+ }
819
+ set showLines(value) {
820
+ if (this.nativeElement) {
821
+ this.nativeElement.showLines = value;
822
+ }
823
+ }
824
+ /** Shows or hides lines starting from the root node. Enabled when 'showLines' is set to true.
825
+ * Property type: boolean
826
+ */
827
+ get showRootLines() {
828
+ return this.nativeElement ? this.nativeElement.showRootLines : undefined;
829
+ }
830
+ set showRootLines(value) {
831
+ if (this.nativeElement) {
832
+ this.nativeElement.showRootLines = value;
833
+ }
834
+ }
835
+ /** Sets user-defined function about custom sorting.
836
+ * Property type: any
837
+ */
838
+ get sort() {
839
+ return this.nativeElement ? this.nativeElement.sort : undefined;
840
+ }
841
+ set sort(value) {
842
+ if (this.nativeElement) {
843
+ this.nativeElement.sort = value;
844
+ }
845
+ }
846
+ /** Determines sort direction - ascending or descending.
847
+ * Property type: TreeSortDirection | string
848
+ */
849
+ get sortDirection() {
850
+ return this.nativeElement ? this.nativeElement.sortDirection : undefined;
851
+ }
852
+ set sortDirection(value) {
853
+ if (this.nativeElement) {
854
+ this.nativeElement.sortDirection = value;
855
+ }
856
+ }
857
+ /** Enables or disables sorting.
858
+ * Property type: boolean
859
+ */
860
+ get sorted() {
861
+ return this.nativeElement ? this.nativeElement.sorted : undefined;
862
+ }
863
+ set sorted(value) {
864
+ if (this.nativeElement) {
865
+ this.nativeElement.sorted = value;
866
+ }
867
+ }
868
+ /** Sets or gets the element's visual theme.
869
+ * Property type: string
870
+ */
871
+ get theme() {
872
+ return this.nativeElement ? this.nativeElement.theme : undefined;
873
+ }
874
+ set theme(value) {
875
+ if (this.nativeElement) {
876
+ this.nativeElement.theme = value;
877
+ }
878
+ }
879
+ /** Determines togle element (arrow) position.
880
+ * Property type: Position | string
881
+ */
882
+ get toggleElementPosition() {
883
+ return this.nativeElement ? this.nativeElement.toggleElementPosition : undefined;
884
+ }
885
+ set toggleElementPosition(value) {
886
+ if (this.nativeElement) {
887
+ this.nativeElement.toggleElementPosition = value;
888
+ }
889
+ }
890
+ /** Determines the way to toggle smart-tree-items-groups.
891
+ * Property type: TreeToggleMode | string
892
+ */
893
+ get toggleMode() {
894
+ return this.nativeElement ? this.nativeElement.toggleMode : undefined;
895
+ }
896
+ set toggleMode(value) {
897
+ if (this.nativeElement) {
898
+ this.nativeElement.toggleMode = value;
899
+ }
900
+ }
901
+ /** Sets or gets if the element can be focused.
902
+ * Property type: boolean
903
+ */
904
+ get unfocusable() {
905
+ return this.nativeElement ? this.nativeElement.unfocusable : undefined;
906
+ }
907
+ set unfocusable(value) {
908
+ if (this.nativeElement) {
909
+ this.nativeElement.unfocusable = value;
910
+ }
911
+ }
912
+ /** Determines the field in the data source that corresponds to an item's value.
913
+ * Property type: string
914
+ */
915
+ get valueMember() {
916
+ return this.nativeElement ? this.nativeElement.valueMember : undefined;
917
+ }
918
+ set valueMember(value) {
919
+ if (this.nativeElement) {
920
+ this.nativeElement.valueMember = value;
921
+ }
922
+ }
923
+ // Gets the properties of the React component.
924
+ get properties() {
925
+ return ["allowDrag", "allowDrop", "animation", "autoHideToggleElement", "autoLoadState", "autoSaveState", "autoSort", "dataSource", "disabled", "displayLoadingIndicator", "displayMember", "dragFeedbackFormatFunction", "dragOffset", "editable", "expandMode", "filterable", "filterOnEnter", "filterInputPlaceholder", "filterMember", "filterMode", "hasThreeStates", "itemsMember", "loadingIndicatorPlaceholder", "loadingIndicatorPosition", "locale", "localizeFormatFunction", "messages", "overflow", "readonly", "rightToLeft", "scrollMode", "selectedIndexes", "selectionDisplayMode", "selectionMode", "selectionTarget", "showLines", "showRootLines", "sort", "sortDirection", "sorted", "theme", "toggleElementPosition", "toggleMode", "unfocusable", "valueMember"];
926
+ }
927
+ // Gets the events of the React component.
928
+ get eventListeners() {
929
+ return ["onChange", "onCollapse", "onCollapsing", "onDragEnd", "onDragging", "onDragStart", "onExpand", "onExpanding", "onScrollBottomReached", "onScrollTopReached", "onSwipeleft", "onSwiperight", "onCreate", "onReady"];
930
+ }
931
+ /** Adds an item after another item as a sibling.
932
+ * @param {HTMLElement} item. A jqx-tree-item/jqx-tree-items-group to add to the Tree
933
+ * @param {string | HTMLElement} sibling. The jqx-tree-item/jqx-tree-items-group (or its id or numeric path) to add the item after.
934
+ */
935
+ addAfter(item, sibling) {
936
+ if (this.nativeElement.isRendered) {
937
+ this.nativeElement.addAfter(item, sibling);
938
+ }
939
+ else {
940
+ this.nativeElement.whenRendered(() => {
941
+ this.nativeElement.addAfter(item, sibling);
942
+ });
943
+ }
944
+ }
945
+ /** Adds an item before another item as a sibling.
946
+ * @param {HTMLElement} item. A jqx-tree-item/jqx-tree-items-group to add to the Tree
947
+ * @param {string | HTMLElement} sibling. The jqx-tree-item/jqx-tree-items-group (or its id or numeric path) to add the item before.
948
+ */
949
+ addBefore(item, sibling) {
950
+ if (this.nativeElement.isRendered) {
951
+ this.nativeElement.addBefore(item, sibling);
952
+ }
953
+ else {
954
+ this.nativeElement.whenRendered(() => {
955
+ this.nativeElement.addBefore(item, sibling);
956
+ });
957
+ }
958
+ }
959
+ /** Adds an item as the last child of a parent item.
960
+ * @param {HTMLElement} item. A jqx-tree-item/jqx-tree-items-group to add to the Tree
961
+ * @param {string | HTMLElement} parent?. The jqx-tree-items-group (or its id or numeric path) to add the item to.
962
+ */
963
+ addTo(item, parent) {
964
+ if (this.nativeElement.isRendered) {
965
+ this.nativeElement.addTo(item, parent);
966
+ }
967
+ else {
968
+ this.nativeElement.whenRendered(() => {
969
+ this.nativeElement.addTo(item, parent);
970
+ });
971
+ }
972
+ }
973
+ /** Clears selection.
974
+ */
975
+ clearSelection() {
976
+ if (this.nativeElement.isRendered) {
977
+ this.nativeElement.clearSelection();
978
+ }
979
+ else {
980
+ this.nativeElement.whenRendered(() => {
981
+ this.nativeElement.clearSelection();
982
+ });
983
+ }
984
+ }
985
+ /** Collapses all smart-tree-items-groups.
986
+ * @param {boolean} animation?. If set to false, disables collapse animation even if animation is enabled for the element.
987
+ */
988
+ collapseAll(animation) {
989
+ if (this.nativeElement.isRendered) {
990
+ this.nativeElement.collapseAll(animation);
991
+ }
992
+ else {
993
+ this.nativeElement.whenRendered(() => {
994
+ this.nativeElement.collapseAll(animation);
995
+ });
996
+ }
997
+ }
998
+ /** Collapses a smart-tree-items-group.
999
+ * @param {HTMLElement | string} item. jqx-tree-items-group (or its id or numeric path).
1000
+ * @param {boolean} animation?. If set to false, disables collapse animation even if animation is enabled for the element.
1001
+ */
1002
+ collapseItem(item, animation) {
1003
+ if (this.nativeElement.isRendered) {
1004
+ this.nativeElement.collapseItem(item, animation);
1005
+ }
1006
+ else {
1007
+ this.nativeElement.whenRendered(() => {
1008
+ this.nativeElement.collapseItem(item, animation);
1009
+ });
1010
+ }
1011
+ }
1012
+ /** Makes sure an item is visible by scrolling to it.
1013
+ * @param {HTMLElement | string} item. The id or numeric path of an item
1014
+ */
1015
+ ensureVisible(item) {
1016
+ if (this.nativeElement.isRendered) {
1017
+ this.nativeElement.ensureVisible(item);
1018
+ }
1019
+ else {
1020
+ this.nativeElement.whenRendered(() => {
1021
+ this.nativeElement.ensureVisible(item);
1022
+ });
1023
+ }
1024
+ }
1025
+ /** Expands all smart-tree-items-groups.
1026
+ * @param {string} animation?. If set to false, disables expand animation even if animation is enabled for the element.
1027
+ */
1028
+ expandAll(animation) {
1029
+ if (this.nativeElement.isRendered) {
1030
+ this.nativeElement.expandAll(animation);
1031
+ }
1032
+ else {
1033
+ this.nativeElement.whenRendered(() => {
1034
+ this.nativeElement.expandAll(animation);
1035
+ });
1036
+ }
1037
+ }
1038
+ /** Expands single smart-tree-items-group.
1039
+ * @param {HTMLElement | string} item. jqx-tree-items-group (or its id or numeric path).
1040
+ * @param {boolean} animation?. If set to false, disables expand animation even if animation is enabled for the element.
1041
+ */
1042
+ expandItem(item, animation) {
1043
+ if (this.nativeElement.isRendered) {
1044
+ this.nativeElement.expandItem(item, animation);
1045
+ }
1046
+ else {
1047
+ this.nativeElement.whenRendered(() => {
1048
+ this.nativeElement.expandItem(item, animation);
1049
+ });
1050
+ }
1051
+ }
1052
+ /** Applies filter to the Tree.
1053
+ * @param {string} filterQuery. Filter query.
1054
+ */
1055
+ filter(filterQuery) {
1056
+ if (this.nativeElement.isRendered) {
1057
+ this.nativeElement.filter(filterQuery);
1058
+ }
1059
+ else {
1060
+ this.nativeElement.whenRendered(() => {
1061
+ this.nativeElement.filter(filterQuery);
1062
+ });
1063
+ }
1064
+ }
1065
+ /** Gets an item by its id or numeric path.
1066
+ * @param {string} id. The id or numeric path of an item.
1067
+ * @returns {HTMLElement}
1068
+ */
1069
+ getItem(id) {
1070
+ const result = this.nativeElement.getItem(id);
1071
+ return result;
1072
+ }
1073
+ /** Gets the selected values. If value is not defined, returns the selected labels.
1074
+ * @returns {string[]}
1075
+ */
1076
+ getSelectedValues() {
1077
+ const result = this.nativeElement.getSelectedValues();
1078
+ return result;
1079
+ }
1080
+ /** Returns SmartTree's state
1081
+ * @returns {any}
1082
+ */
1083
+ getState() {
1084
+ const result = this.nativeElement.getState();
1085
+ return result;
1086
+ }
1087
+ /** Inserts an item at the given position.
1088
+ * @param {any} item. A jqx-tree-item/jqx-tree-items-group (or an Object to create an item from) to add to the Tree. If an Object is passed, the available fields are <strong>tagName</strong> (<em>'jqx-tree-item'</em> - default - or <em>'jqx-tree-items-group'</em>), <strong>disabled</strong>, <strong>expanded</strong> (only if <strong>tagName</strong> is <em>'jqx-tree-items-group'</em>), <strong>(items)</strong> (only if <strong>tagName</strong> is <em>'jqx-tree-items-group'</em>), <strong>(label)</strong>, <strong>separator</strong>, <strong>shortcut</strong> (only if <strong>tagName</strong> is <em>'jqx-tree-item'</em>), and <strong>(value)</strong>. (items), (label), and (value) have to correspond to the values of <strong>itemsMember</strong>, <strong>displayMember</strong>, and <strong>valueMember</strong> respectively.
1089
+ * @param {string} path?. The path to insert the item at.
1090
+ */
1091
+ insert(item, path) {
1092
+ if (this.nativeElement.isRendered) {
1093
+ this.nativeElement.insert(item, path);
1094
+ }
1095
+ else {
1096
+ this.nativeElement.whenRendered(() => {
1097
+ this.nativeElement.insert(item, path);
1098
+ });
1099
+ }
1100
+ }
1101
+ /** Loads the Tree's state.
1102
+ * @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.
1103
+ */
1104
+ loadState(state) {
1105
+ if (this.nativeElement.isRendered) {
1106
+ this.nativeElement.loadState(state);
1107
+ }
1108
+ else {
1109
+ this.nativeElement.whenRendered(() => {
1110
+ this.nativeElement.loadState(state);
1111
+ });
1112
+ }
1113
+ }
1114
+ /** Moves an item down relative to its siblings.
1115
+ * @param {HTMLElement | string} item. The jqx-tree-item/jqx-tree-items-group (or its id or numeric path) to remove.
1116
+ */
1117
+ moveDown(item) {
1118
+ if (this.nativeElement.isRendered) {
1119
+ this.nativeElement.moveDown(item);
1120
+ }
1121
+ else {
1122
+ this.nativeElement.whenRendered(() => {
1123
+ this.nativeElement.moveDown(item);
1124
+ });
1125
+ }
1126
+ }
1127
+ /** Moves an item up relative to its siblings.
1128
+ * @param {HTMLElement | string} item. The jqx-tree-item/jqx-tree-items-group (or its id or numeric path) to remove.
1129
+ */
1130
+ moveUp(item) {
1131
+ if (this.nativeElement.isRendered) {
1132
+ this.nativeElement.moveUp(item);
1133
+ }
1134
+ else {
1135
+ this.nativeElement.whenRendered(() => {
1136
+ this.nativeElement.moveUp(item);
1137
+ });
1138
+ }
1139
+ }
1140
+ /** Removes an item.
1141
+ * @param {HTMLElement | string} item. The jqx-tree-item/jqx-tree-items-group (or its id or numeric path) to remove.
1142
+ */
1143
+ removeItem(item) {
1144
+ if (this.nativeElement.isRendered) {
1145
+ this.nativeElement.removeItem(item);
1146
+ }
1147
+ else {
1148
+ this.nativeElement.whenRendered(() => {
1149
+ this.nativeElement.removeItem(item);
1150
+ });
1151
+ }
1152
+ }
1153
+ /** Saves the Tree's state.
1154
+ * @returns {any}
1155
+ */
1156
+ saveState() {
1157
+ const result = this.nativeElement.saveState();
1158
+ return result;
1159
+ }
1160
+ /** Selects an item by its index or by HTMLElement id.
1161
+ * @param {HTMLElement | string} item. The jqx-tree-item/jqx-tree-items-group (or its id or numeric path) to remove.
1162
+ */
1163
+ select(item) {
1164
+ if (this.nativeElement.isRendered) {
1165
+ this.nativeElement.select(item);
1166
+ }
1167
+ else {
1168
+ this.nativeElement.whenRendered(() => {
1169
+ this.nativeElement.select(item);
1170
+ });
1171
+ }
1172
+ }
1173
+ /** Selects an item or items by values.
1174
+ * @param {string | string[]} items. The jqx-tree-item/jqx-tree-items-group values or labels, if values are not defined.
1175
+ */
1176
+ setSelectedValues(items) {
1177
+ if (this.nativeElement.isRendered) {
1178
+ this.nativeElement.setSelectedValues(items);
1179
+ }
1180
+ else {
1181
+ this.nativeElement.whenRendered(() => {
1182
+ this.nativeElement.setSelectedValues(items);
1183
+ });
1184
+ }
1185
+ }
1186
+ /** Unselects an item by its index or by HTMLElement id.
1187
+ * @param {HTMLElement | string} item. The jqx-tree-item/jqx-tree-items-group (or its id or numeric path) to remove.
1188
+ */
1189
+ unselect(item) {
1190
+ if (this.nativeElement.isRendered) {
1191
+ this.nativeElement.unselect(item);
1192
+ }
1193
+ else {
1194
+ this.nativeElement.whenRendered(() => {
1195
+ this.nativeElement.unselect(item);
1196
+ });
1197
+ }
1198
+ }
1199
+ /** Unselects an item or items by values.
1200
+ * @param {string | string[]} items. The jqx-tree-item/jqx-tree-items-group values or labels, if values are not defined.
1201
+ */
1202
+ unselectValues(items) {
1203
+ if (this.nativeElement.isRendered) {
1204
+ this.nativeElement.unselectValues(items);
1205
+ }
1206
+ else {
1207
+ this.nativeElement.whenRendered(() => {
1208
+ this.nativeElement.unselectValues(items);
1209
+ });
1210
+ }
1211
+ }
1212
+ /** Updates an item.
1213
+ * @param {HTMLElement | string} item. jqx-tree-item/jqx-tree-items-group (or its id or numeric path).
1214
+ * @param {any} newItem. An object with updated properties.
1215
+ */
1216
+ updateItem(item, newItem) {
1217
+ if (this.nativeElement.isRendered) {
1218
+ this.nativeElement.updateItem(item, newItem);
1219
+ }
1220
+ else {
1221
+ this.nativeElement.whenRendered(() => {
1222
+ this.nativeElement.updateItem(item, newItem);
1223
+ });
1224
+ }
1225
+ }
1226
+ componentDidRender(initialize) {
1227
+ const that = this;
1228
+ const props = {};
1229
+ const events = {};
1230
+ let styles = null;
1231
+ for (let prop in that.props) {
1232
+ if (prop === 'children') {
1233
+ continue;
1234
+ }
1235
+ if (prop === 'style') {
1236
+ styles = that.props[prop];
1237
+ continue;
1238
+ }
1239
+ if (prop.startsWith('on') && that.properties.indexOf(prop) === -1) {
1240
+ events[prop] = that.props[prop];
1241
+ continue;
1242
+ }
1243
+ props[prop] = that.props[prop];
1244
+ }
1245
+ if (initialize) {
1246
+ that.nativeElement = this.componentRef.current;
1247
+ }
1248
+ for (let prop in props) {
1249
+ if (prop === 'class' || prop === 'className') {
1250
+ const classNames = props[prop].trim().split(' ');
1251
+ for (let className in classNames) {
1252
+ if (!that.nativeElement.classList.contains(classNames[className]) && classNames[className] !== "") {
1253
+ that.nativeElement.classList.add(classNames[className]);
1254
+ }
1255
+ }
1256
+ continue;
1257
+ }
1258
+ if (props[prop] !== that.nativeElement[prop]) {
1259
+ const normalizeProp = (str) => {
1260
+ return str.replace(/-([a-z])/g, function (g) {
1261
+ return g[1].toUpperCase();
1262
+ });
1263
+ };
1264
+ if (prop === 'hover' || prop === 'active' || prop === 'focus' || prop === 'selected') {
1265
+ that.nativeElement.setAttribute(prop, '');
1266
+ }
1267
+ const normalizedProp = normalizeProp(prop);
1268
+ that.nativeElement[normalizedProp] = props[prop];
1269
+ }
1270
+ }
1271
+ for (let eventName in events) {
1272
+ that[eventName] = events[eventName];
1273
+ that.nativeElement[eventName.toLowerCase()] = events[eventName];
1274
+ }
1275
+ if (initialize) {
1276
+ Smart$2.Render();
1277
+ if (that.onCreate) {
1278
+ that.onCreate();
1279
+ }
1280
+ that.nativeElement.whenRendered(() => {
1281
+ if (that.onReady) {
1282
+ that.onReady();
1283
+ }
1284
+ });
1285
+ }
1286
+ // setup styles.
1287
+ if (styles) {
1288
+ for (let styleName in styles) {
1289
+ that.nativeElement.style[styleName] = styles[styleName];
1290
+ }
1291
+ }
1292
+ }
1293
+ componentDidMount() {
1294
+ this.componentDidRender(true);
1295
+ }
1296
+ componentDidUpdate() {
1297
+ this.componentDidRender(false);
1298
+ }
1299
+ componentWillUnmount() {
1300
+ const that = this;
1301
+ if (!that.nativeElement) {
1302
+ return;
1303
+ }
1304
+ that.nativeElement.whenRenderedCallbacks = [];
1305
+ for (let i = 0; i < that.eventListeners.length; i++) {
1306
+ const eventName = that.eventListeners[i];
1307
+ that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
1308
+ }
1309
+ }
1310
+ render() {
1311
+ return (React.createElement("smart-tree", { ref: this.componentRef }, this.props.children));
1312
+ }
1313
+ }
436
1314
 
437
- const Smart$2 = window.Smart;
438
- /**
439
- Treeview component is a user interface that is used to represent hierarchical data in a tree structure.
440
- */
441
- class Tree extends React.Component {
442
- constructor(props) {
443
- super(props);
444
- this.componentRef = React.createRef();
445
- }
446
- // Gets the id of the React component.
447
- get id() {
448
- if (!this._id) {
449
- this._id = 'Tree' + Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
450
- }
451
- return this._id;
452
- }
453
- /** Allows drag operation in current tree. When enabled, items can be dragged and dropped to a tree with enabled allowDrop.
454
- * Property type: boolean
455
- */
456
- get allowDrag() {
457
- return this.nativeElement ? this.nativeElement.allowDrag : undefined;
458
- }
459
- set allowDrag(value) {
460
- if (this.nativeElement) {
461
- this.nativeElement.allowDrag = value;
462
- }
463
- }
464
- /** Allows drop operation. Dropped items could originate from the current tree or another tree.
465
- * Property type: boolean
466
- */
467
- get allowDrop() {
468
- return this.nativeElement ? this.nativeElement.allowDrop : undefined;
469
- }
470
- set allowDrop(value) {
471
- if (this.nativeElement) {
472
- this.nativeElement.allowDrop = value;
473
- }
474
- }
475
- /** Sets or gets the animation mode. Animation is disabled when the property is set to 'none'
476
- * Property type: Animation | string
477
- */
478
- get animation() {
479
- return this.nativeElement ? this.nativeElement.animation : undefined;
480
- }
481
- set animation(value) {
482
- if (this.nativeElement) {
483
- this.nativeElement.animation = value;
484
- }
485
- }
486
- /** Automatically hides the tree's toggle element (arrow) on mouseleave and shows it on mouseenter.
487
- * Property type: boolean
488
- */
489
- get autoHideToggleElement() {
490
- return this.nativeElement ? this.nativeElement.autoHideToggleElement : undefined;
491
- }
492
- set autoHideToggleElement(value) {
493
- if (this.nativeElement) {
494
- this.nativeElement.autoHideToggleElement = value;
495
- }
496
- }
497
- /** Enables or disables auto load state from the browser's localStorage. Information about filtering, sorting, expanded and selected items is loaded.
498
- * Property type: boolean
499
- */
500
- get autoLoadState() {
501
- return this.nativeElement ? this.nativeElement.autoLoadState : undefined;
502
- }
503
- set autoLoadState(value) {
504
- if (this.nativeElement) {
505
- this.nativeElement.autoLoadState = value;
506
- }
507
- }
508
- /** Enables or disables auto save state to the browser's localStorage. Information about filtering, sorting, expanded and selected items is saved.
509
- * Property type: boolean
510
- */
511
- get autoSaveState() {
512
- return this.nativeElement ? this.nativeElement.autoSaveState : undefined;
513
- }
514
- set autoSaveState(value) {
515
- if (this.nativeElement) {
516
- this.nativeElement.autoSaveState = value;
517
- }
518
- }
519
- /** Enables or disables auto sorting. If modifications are made to a sorted tree, but autoSort is false, the tree will not be re-sorted automatically.
520
- * Property type: boolean
521
- */
522
- get autoSort() {
523
- return this.nativeElement ? this.nativeElement.autoSort : undefined;
524
- }
525
- set autoSort(value) {
526
- if (this.nativeElement) {
527
- this.nativeElement.autoSort = value;
528
- }
529
- }
530
- /** Determines the data source that will be loaded to the Tree.
531
- * Property type: any
532
- */
533
- get dataSource() {
534
- return this.nativeElement ? this.nativeElement.dataSource : undefined;
535
- }
536
- set dataSource(value) {
537
- if (this.nativeElement) {
538
- this.nativeElement.dataSource = value;
539
- }
540
- }
541
- /** Enables or disables jqxTree.
542
- * Property type: boolean
543
- */
544
- get disabled() {
545
- return this.nativeElement ? this.nativeElement.disabled : undefined;
546
- }
547
- set disabled(value) {
548
- if (this.nativeElement) {
549
- this.nativeElement.disabled = value;
550
- }
551
- }
552
- /** Shows or hides loading indicator.
553
- * Property type: boolean
554
- */
555
- get displayLoadingIndicator() {
556
- return this.nativeElement ? this.nativeElement.displayLoadingIndicator : undefined;
557
- }
558
- set displayLoadingIndicator(value) {
559
- if (this.nativeElement) {
560
- this.nativeElement.displayLoadingIndicator = value;
561
- }
562
- }
563
- /** Determines the field in the data source that corresponds to an item's label.
564
- * Property type: string
565
- */
566
- get displayMember() {
567
- return this.nativeElement ? this.nativeElement.displayMember : undefined;
568
- }
569
- set displayMember(value) {
570
- if (this.nativeElement) {
571
- this.nativeElement.displayMember = value;
572
- }
573
- }
574
- /** A callback function for customizing the HTML of the drag feedback. It receives one parameter - an array of the currently dragged items.
575
- * Property type: any
576
- */
577
- get dragFeedbackFormatFunction() {
578
- return this.nativeElement ? this.nativeElement.dragFeedbackFormatFunction : undefined;
579
- }
580
- set dragFeedbackFormatFunction(value) {
581
- if (this.nativeElement) {
582
- this.nativeElement.dragFeedbackFormatFunction = value;
583
- }
584
- }
585
- /** Determines the offset of the drag feedback element from the mouse cursor when dragging items. The first member of the array is the horizontal offset and the second one - the vertical offset.
586
- * Property type: number[]
587
- */
588
- get dragOffset() {
589
- return this.nativeElement ? this.nativeElement.dragOffset : undefined;
590
- }
591
- set dragOffset(value) {
592
- if (this.nativeElement) {
593
- this.nativeElement.dragOffset = value;
594
- }
595
- }
596
- /** Enables or disables item's editting. An edit operation can be initiated by double-clicking a tree item or pressing F2 while an item is selected.
597
- * Property type: boolean
598
- */
599
- get editable() {
600
- return this.nativeElement ? this.nativeElement.editable : undefined;
601
- }
602
- set editable(value) {
603
- if (this.nativeElement) {
604
- this.nativeElement.editable = value;
605
- }
606
- }
607
- /** Determines the expand behavior of TreeItemsGroups in the Tree.
608
- * Property type: TreeExpandMode | string
609
- */
610
- get expandMode() {
611
- return this.nativeElement ? this.nativeElement.expandMode : undefined;
612
- }
613
- set expandMode(value) {
614
- if (this.nativeElement) {
615
- this.nativeElement.expandMode = value;
616
- }
617
- }
618
- /** Enables or disables filtering. Shows or hides filter input.
619
- * Property type: boolean
620
- */
621
- get filterable() {
622
- return this.nativeElement ? this.nativeElement.filterable : undefined;
623
- }
624
- set filterable(value) {
625
- if (this.nativeElement) {
626
- this.nativeElement.filterable = value;
627
- }
628
- }
629
- /** Applies a filter only after the 'Enter' key is pressed.
630
- * Property type: boolean
631
- */
632
- get filterOnEnter() {
633
- return this.nativeElement ? this.nativeElement.filterOnEnter : undefined;
634
- }
635
- set filterOnEnter(value) {
636
- if (this.nativeElement) {
637
- this.nativeElement.filterOnEnter = value;
638
- }
639
- }
640
- /** Sets custom text for placeholder in the filter input.
641
- * Property type: string
642
- */
643
- get filterInputPlaceholder() {
644
- return this.nativeElement ? this.nativeElement.filterInputPlaceholder : undefined;
645
- }
646
- set filterInputPlaceholder(value) {
647
- if (this.nativeElement) {
648
- this.nativeElement.filterInputPlaceholder = value;
649
- }
650
- }
651
- /** Determines the TreeItem property that will be used as a filtering criteria. By default the label property is used. It can be set to 'value' if the user wants to filter by the value property or 'textContent' if the user wants to filter by text inside the TreeItem's content or any other property.
652
- * Property type: string
653
- */
654
- get filterMember() {
655
- return this.nativeElement ? this.nativeElement.filterMember : undefined;
656
- }
657
- set filterMember(value) {
658
- if (this.nativeElement) {
659
- this.nativeElement.filterMember = value;
660
- }
661
- }
662
- /** Sets filter mode.
663
- * Property type: FilterMode | string
664
- */
665
- get filterMode() {
666
- return this.nativeElement ? this.nativeElement.filterMode : undefined;
667
- }
668
- set filterMode(value) {
669
- if (this.nativeElement) {
670
- this.nativeElement.filterMode = value;
671
- }
672
- }
673
- /** Sets or gets whether the tree checkboxes have three states - checked, unchecked and indeterminate. Whorks on selectionMode: 'checkBox'
674
- * Property type: boolean
675
- */
676
- get hasThreeStates() {
677
- return this.nativeElement ? this.nativeElement.hasThreeStates : undefined;
678
- }
679
- set hasThreeStates(value) {
680
- if (this.nativeElement) {
681
- this.nativeElement.hasThreeStates = value;
682
- }
683
- }
684
- /** Determines the field in the data source that corresponds to an item group's subitems collection.
685
- * Property type: string
686
- */
687
- get itemsMember() {
688
- return this.nativeElement ? this.nativeElement.itemsMember : undefined;
689
- }
690
- set itemsMember(value) {
691
- if (this.nativeElement) {
692
- this.nativeElement.itemsMember = value;
693
- }
694
- }
695
- /** Sets custom text for placeholder in the loading indicator if loadingIndicatorPosition is set to 'top' or 'bottom'.
696
- * Property type: string
697
- */
698
- get loadingIndicatorPlaceholder() {
699
- return this.nativeElement ? this.nativeElement.loadingIndicatorPlaceholder : undefined;
700
- }
701
- set loadingIndicatorPlaceholder(value) {
702
- if (this.nativeElement) {
703
- this.nativeElement.loadingIndicatorPlaceholder = value;
704
- }
705
- }
706
- /** Sets the position of the loading indicator.
707
- * Property type: VerticalAlignment | string
708
- */
709
- get loadingIndicatorPosition() {
710
- return this.nativeElement ? this.nativeElement.loadingIndicatorPosition : undefined;
711
- }
712
- set loadingIndicatorPosition(value) {
713
- if (this.nativeElement) {
714
- this.nativeElement.loadingIndicatorPosition = value;
715
- }
716
- }
717
- /** Sets or gets the locale. Used in conjunction with the property messages.
718
- * Property type: string
719
- */
720
- get locale() {
721
- return this.nativeElement ? this.nativeElement.locale : undefined;
722
- }
723
- set locale(value) {
724
- if (this.nativeElement) {
725
- this.nativeElement.locale = value;
726
- }
727
- }
728
- /** Callback, related to localization module.
729
- * Property type: any
730
- */
731
- get localizeFormatFunction() {
732
- return this.nativeElement ? this.nativeElement.localizeFormatFunction : undefined;
733
- }
734
- set localizeFormatFunction(value) {
735
- if (this.nativeElement) {
736
- this.nativeElement.localizeFormatFunction = value;
737
- }
738
- }
739
- /** Sets or gets an object specifying strings used in the widget that can be localized. Used in conjunction with the property locale.
740
- * Property type: any
741
- */
742
- get messages() {
743
- return this.nativeElement ? this.nativeElement.messages : undefined;
744
- }
745
- set messages(value) {
746
- if (this.nativeElement) {
747
- this.nativeElement.messages = value;
748
- }
749
- }
750
- /** Specifies what should happen with the scrollbar (or scroll buttons in scrollMode: 'scrollButtons') if content overflows the element's box.
751
- * Property type: Overflow | string
752
- */
753
- get overflow() {
754
- return this.nativeElement ? this.nativeElement.overflow : undefined;
755
- }
756
- set overflow(value) {
757
- if (this.nativeElement) {
758
- this.nativeElement.overflow = value;
759
- }
760
- }
761
- /** If the element is readonly, users cannot interact with it.
762
- * Property type: boolean
763
- */
764
- get readonly() {
765
- return this.nativeElement ? this.nativeElement.readonly : undefined;
766
- }
767
- set readonly(value) {
768
- if (this.nativeElement) {
769
- this.nativeElement.readonly = value;
770
- }
771
- }
772
- /** Determines whether the right-to-left support is enabled.
773
- * Property type: boolean
774
- */
775
- get rightToLeft() {
776
- return this.nativeElement ? this.nativeElement.rightToLeft : undefined;
777
- }
778
- set rightToLeft(value) {
779
- if (this.nativeElement) {
780
- this.nativeElement.rightToLeft = value;
781
- }
782
- }
783
- /** Determines whether to use scrollbar or scrollButtons when content overflows an element's box.
784
- * Property type: TreeScrollMode | string
785
- */
786
- get scrollMode() {
787
- return this.nativeElement ? this.nativeElement.scrollMode : undefined;
788
- }
789
- set scrollMode(value) {
790
- if (this.nativeElement) {
791
- this.nativeElement.scrollMode = value;
792
- }
793
- }
794
- /** An array with indexes (paths) of the selected items.
795
- * Property type: string[]
796
- */
797
- get selectedIndexes() {
798
- return this.nativeElement ? this.nativeElement.selectedIndexes : undefined;
799
- }
800
- set selectedIndexes(value) {
801
- if (this.nativeElement) {
802
- this.nativeElement.selectedIndexes = value;
803
- }
804
- }
805
- /** Determines the way selected items are highlighted.
806
- * Property type: TreeSelectionDisplayMode | string
807
- */
808
- get selectionDisplayMode() {
809
- return this.nativeElement ? this.nativeElement.selectionDisplayMode : undefined;
810
- }
811
- set selectionDisplayMode(value) {
812
- if (this.nativeElement) {
813
- this.nativeElement.selectionDisplayMode = value;
814
- }
815
- }
816
- /** Determines selection mode.
817
- * Property type: TreeSelectionMode | string
818
- */
819
- get selectionMode() {
820
- return this.nativeElement ? this.nativeElement.selectionMode : undefined;
821
- }
822
- set selectionMode(value) {
823
- if (this.nativeElement) {
824
- this.nativeElement.selectionMode = value;
825
- }
826
- }
827
- /** Determines whether smart-tree-items-groups can be selected.
828
- * Property type: TreeSelectionTarget | string
829
- */
830
- get selectionTarget() {
831
- return this.nativeElement ? this.nativeElement.selectionTarget : undefined;
832
- }
833
- set selectionTarget(value) {
834
- if (this.nativeElement) {
835
- this.nativeElement.selectionTarget = value;
836
- }
837
- }
838
- /** Shows or hides lines, displaying the relation between elements in group.
839
- * Property type: boolean
840
- */
841
- get showLines() {
842
- return this.nativeElement ? this.nativeElement.showLines : undefined;
843
- }
844
- set showLines(value) {
845
- if (this.nativeElement) {
846
- this.nativeElement.showLines = value;
847
- }
848
- }
849
- /** Shows or hides lines starting from the root node. Enabled when 'showLines' is set to true.
850
- * Property type: boolean
851
- */
852
- get showRootLines() {
853
- return this.nativeElement ? this.nativeElement.showRootLines : undefined;
854
- }
855
- set showRootLines(value) {
856
- if (this.nativeElement) {
857
- this.nativeElement.showRootLines = value;
858
- }
859
- }
860
- /** Sets user-defined function about custom sorting.
861
- * Property type: any
862
- */
863
- get sort() {
864
- return this.nativeElement ? this.nativeElement.sort : undefined;
865
- }
866
- set sort(value) {
867
- if (this.nativeElement) {
868
- this.nativeElement.sort = value;
869
- }
870
- }
871
- /** Determines sort direction - ascending or descending.
872
- * Property type: TreeSortDirection | string
873
- */
874
- get sortDirection() {
875
- return this.nativeElement ? this.nativeElement.sortDirection : undefined;
876
- }
877
- set sortDirection(value) {
878
- if (this.nativeElement) {
879
- this.nativeElement.sortDirection = value;
880
- }
881
- }
882
- /** Enables or disables sorting.
883
- * Property type: boolean
884
- */
885
- get sorted() {
886
- return this.nativeElement ? this.nativeElement.sorted : undefined;
887
- }
888
- set sorted(value) {
889
- if (this.nativeElement) {
890
- this.nativeElement.sorted = value;
891
- }
892
- }
893
- /** Sets or gets the element's visual theme.
894
- * Property type: string
895
- */
896
- get theme() {
897
- return this.nativeElement ? this.nativeElement.theme : undefined;
898
- }
899
- set theme(value) {
900
- if (this.nativeElement) {
901
- this.nativeElement.theme = value;
902
- }
903
- }
904
- /** Determines togle element (arrow) position.
905
- * Property type: Position | string
906
- */
907
- get toggleElementPosition() {
908
- return this.nativeElement ? this.nativeElement.toggleElementPosition : undefined;
909
- }
910
- set toggleElementPosition(value) {
911
- if (this.nativeElement) {
912
- this.nativeElement.toggleElementPosition = value;
913
- }
914
- }
915
- /** Determines the way to toggle smart-tree-items-groups.
916
- * Property type: TreeToggleMode | string
917
- */
918
- get toggleMode() {
919
- return this.nativeElement ? this.nativeElement.toggleMode : undefined;
920
- }
921
- set toggleMode(value) {
922
- if (this.nativeElement) {
923
- this.nativeElement.toggleMode = value;
924
- }
925
- }
926
- /** Sets or gets if the element can be focused.
927
- * Property type: boolean
928
- */
929
- get unfocusable() {
930
- return this.nativeElement ? this.nativeElement.unfocusable : undefined;
931
- }
932
- set unfocusable(value) {
933
- if (this.nativeElement) {
934
- this.nativeElement.unfocusable = value;
935
- }
936
- }
937
- /** Determines the field in the data source that corresponds to an item's value.
938
- * Property type: string
939
- */
940
- get valueMember() {
941
- return this.nativeElement ? this.nativeElement.valueMember : undefined;
942
- }
943
- set valueMember(value) {
944
- if (this.nativeElement) {
945
- this.nativeElement.valueMember = value;
946
- }
947
- }
948
- // Gets the properties of the React component.
949
- get properties() {
950
- return ["allowDrag", "allowDrop", "animation", "autoHideToggleElement", "autoLoadState", "autoSaveState", "autoSort", "dataSource", "disabled", "displayLoadingIndicator", "displayMember", "dragFeedbackFormatFunction", "dragOffset", "editable", "expandMode", "filterable", "filterOnEnter", "filterInputPlaceholder", "filterMember", "filterMode", "hasThreeStates", "itemsMember", "loadingIndicatorPlaceholder", "loadingIndicatorPosition", "locale", "localizeFormatFunction", "messages", "overflow", "readonly", "rightToLeft", "scrollMode", "selectedIndexes", "selectionDisplayMode", "selectionMode", "selectionTarget", "showLines", "showRootLines", "sort", "sortDirection", "sorted", "theme", "toggleElementPosition", "toggleMode", "unfocusable", "valueMember"];
951
- }
952
- // Gets the events of the React component.
953
- get eventListeners() {
954
- return ["onChange", "onCollapse", "onCollapsing", "onDragEnd", "onDragging", "onDragStart", "onExpand", "onExpanding", "onScrollBottomReached", "onScrollTopReached", "onSwipeleft", "onSwiperight", "onCreate", "onReady"];
955
- }
956
- /** Adds an item after another item as a sibling.
957
- * @param {HTMLElement} item. A jqx-tree-item/jqx-tree-items-group to add to the Tree
958
- * @param {string | HTMLElement} sibling. The jqx-tree-item/jqx-tree-items-group (or its id or numeric path) to add the item after.
959
- */
960
- addAfter(item, sibling) {
961
- if (this.nativeElement.isRendered) {
962
- this.nativeElement.addAfter(item, sibling);
963
- }
964
- else {
965
- this.nativeElement.whenRendered(() => {
966
- this.nativeElement.addAfter(item, sibling);
967
- });
968
- }
969
- }
970
- /** Adds an item before another item as a sibling.
971
- * @param {HTMLElement} item. A jqx-tree-item/jqx-tree-items-group to add to the Tree
972
- * @param {string | HTMLElement} sibling. The jqx-tree-item/jqx-tree-items-group (or its id or numeric path) to add the item before.
973
- */
974
- addBefore(item, sibling) {
975
- if (this.nativeElement.isRendered) {
976
- this.nativeElement.addBefore(item, sibling);
977
- }
978
- else {
979
- this.nativeElement.whenRendered(() => {
980
- this.nativeElement.addBefore(item, sibling);
981
- });
982
- }
983
- }
984
- /** Adds an item as the last child of a parent item.
985
- * @param {HTMLElement} item. A jqx-tree-item/jqx-tree-items-group to add to the Tree
986
- * @param {string | HTMLElement} parent?. The jqx-tree-items-group (or its id or numeric path) to add the item to.
987
- */
988
- addTo(item, parent) {
989
- if (this.nativeElement.isRendered) {
990
- this.nativeElement.addTo(item, parent);
991
- }
992
- else {
993
- this.nativeElement.whenRendered(() => {
994
- this.nativeElement.addTo(item, parent);
995
- });
996
- }
997
- }
998
- /** Clears selection.
999
- */
1000
- clearSelection() {
1001
- if (this.nativeElement.isRendered) {
1002
- this.nativeElement.clearSelection();
1003
- }
1004
- else {
1005
- this.nativeElement.whenRendered(() => {
1006
- this.nativeElement.clearSelection();
1007
- });
1008
- }
1009
- }
1010
- /** Collapses all smart-tree-items-groups.
1011
- * @param {boolean} animation?. If set to false, disables collapse animation even if animation is enabled for the element.
1012
- */
1013
- collapseAll(animation) {
1014
- if (this.nativeElement.isRendered) {
1015
- this.nativeElement.collapseAll(animation);
1016
- }
1017
- else {
1018
- this.nativeElement.whenRendered(() => {
1019
- this.nativeElement.collapseAll(animation);
1020
- });
1021
- }
1022
- }
1023
- /** Collapses a smart-tree-items-group.
1024
- * @param {HTMLElement | string} item. jqx-tree-items-group (or its id or numeric path).
1025
- * @param {boolean} animation?. If set to false, disables collapse animation even if animation is enabled for the element.
1026
- */
1027
- collapseItem(item, animation) {
1028
- if (this.nativeElement.isRendered) {
1029
- this.nativeElement.collapseItem(item, animation);
1030
- }
1031
- else {
1032
- this.nativeElement.whenRendered(() => {
1033
- this.nativeElement.collapseItem(item, animation);
1034
- });
1035
- }
1036
- }
1037
- /** Makes sure an item is visible by scrolling to it.
1038
- * @param {HTMLElement | string} item. The id or numeric path of an item
1039
- */
1040
- ensureVisible(item) {
1041
- if (this.nativeElement.isRendered) {
1042
- this.nativeElement.ensureVisible(item);
1043
- }
1044
- else {
1045
- this.nativeElement.whenRendered(() => {
1046
- this.nativeElement.ensureVisible(item);
1047
- });
1048
- }
1049
- }
1050
- /** Expands all smart-tree-items-groups.
1051
- * @param {string} animation?. If set to false, disables expand animation even if animation is enabled for the element.
1052
- */
1053
- expandAll(animation) {
1054
- if (this.nativeElement.isRendered) {
1055
- this.nativeElement.expandAll(animation);
1056
- }
1057
- else {
1058
- this.nativeElement.whenRendered(() => {
1059
- this.nativeElement.expandAll(animation);
1060
- });
1061
- }
1062
- }
1063
- /** Expands single smart-tree-items-group.
1064
- * @param {HTMLElement | string} item. jqx-tree-items-group (or its id or numeric path).
1065
- * @param {boolean} animation?. If set to false, disables expand animation even if animation is enabled for the element.
1066
- */
1067
- expandItem(item, animation) {
1068
- if (this.nativeElement.isRendered) {
1069
- this.nativeElement.expandItem(item, animation);
1070
- }
1071
- else {
1072
- this.nativeElement.whenRendered(() => {
1073
- this.nativeElement.expandItem(item, animation);
1074
- });
1075
- }
1076
- }
1077
- /** Applies filter to the Tree.
1078
- * @param {string} filterQuery. Filter query.
1079
- */
1080
- filter(filterQuery) {
1081
- if (this.nativeElement.isRendered) {
1082
- this.nativeElement.filter(filterQuery);
1083
- }
1084
- else {
1085
- this.nativeElement.whenRendered(() => {
1086
- this.nativeElement.filter(filterQuery);
1087
- });
1088
- }
1089
- }
1090
- /** Gets an item by its id or numeric path.
1091
- * @param {string} id. The id or numeric path of an item.
1092
- * @returns {HTMLElement}
1093
- */
1094
- getItem(id) {
1095
- return __awaiter(this, void 0, void 0, function* () {
1096
- const getResultOnRender = () => {
1097
- return new Promise(resolve => {
1098
- this.nativeElement.whenRendered(() => {
1099
- const result = this.nativeElement.getItem(id);
1100
- resolve(result);
1101
- });
1102
- });
1103
- };
1104
- const result = yield getResultOnRender();
1105
- return result;
1106
- });
1107
- }
1108
- /** Gets the selected values. If value is not defined, returns the selected labels.
1109
- * @returns {string[]}
1110
- */
1111
- getSelectedValues() {
1112
- return __awaiter(this, void 0, void 0, function* () {
1113
- const getResultOnRender = () => {
1114
- return new Promise(resolve => {
1115
- this.nativeElement.whenRendered(() => {
1116
- const result = this.nativeElement.getSelectedValues();
1117
- resolve(result);
1118
- });
1119
- });
1120
- };
1121
- const result = yield getResultOnRender();
1122
- return result;
1123
- });
1124
- }
1125
- /** Returns SmartTree's state
1126
- * @returns {any}
1127
- */
1128
- getState() {
1129
- return __awaiter(this, void 0, void 0, function* () {
1130
- const getResultOnRender = () => {
1131
- return new Promise(resolve => {
1132
- this.nativeElement.whenRendered(() => {
1133
- const result = this.nativeElement.getState();
1134
- resolve(result);
1135
- });
1136
- });
1137
- };
1138
- const result = yield getResultOnRender();
1139
- return result;
1140
- });
1141
- }
1142
- /** Inserts an item at the given position.
1143
- * @param {any} item. A jqx-tree-item/jqx-tree-items-group (or an Object to create an item from) to add to the Tree. If an Object is passed, the available fields are <strong>tagName</strong> (<em>'jqx-tree-item'</em> - default - or <em>'jqx-tree-items-group'</em>), <strong>disabled</strong>, <strong>expanded</strong> (only if <strong>tagName</strong> is <em>'jqx-tree-items-group'</em>), <strong>(items)</strong> (only if <strong>tagName</strong> is <em>'jqx-tree-items-group'</em>), <strong>(label)</strong>, <strong>separator</strong>, <strong>shortcut</strong> (only if <strong>tagName</strong> is <em>'jqx-tree-item'</em>), and <strong>(value)</strong>. (items), (label), and (value) have to correspond to the values of <strong>itemsMember</strong>, <strong>displayMember</strong>, and <strong>valueMember</strong> respectively.
1144
- * @param {string} path?. The path to insert the item at.
1145
- */
1146
- insert(item, path) {
1147
- if (this.nativeElement.isRendered) {
1148
- this.nativeElement.insert(item, path);
1149
- }
1150
- else {
1151
- this.nativeElement.whenRendered(() => {
1152
- this.nativeElement.insert(item, path);
1153
- });
1154
- }
1155
- }
1156
- /** Loads the Tree's state.
1157
- * @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.
1158
- */
1159
- loadState(state) {
1160
- if (this.nativeElement.isRendered) {
1161
- this.nativeElement.loadState(state);
1162
- }
1163
- else {
1164
- this.nativeElement.whenRendered(() => {
1165
- this.nativeElement.loadState(state);
1166
- });
1167
- }
1168
- }
1169
- /** Moves an item down relative to its siblings.
1170
- * @param {HTMLElement | string} item. The jqx-tree-item/jqx-tree-items-group (or its id or numeric path) to remove.
1171
- */
1172
- moveDown(item) {
1173
- if (this.nativeElement.isRendered) {
1174
- this.nativeElement.moveDown(item);
1175
- }
1176
- else {
1177
- this.nativeElement.whenRendered(() => {
1178
- this.nativeElement.moveDown(item);
1179
- });
1180
- }
1181
- }
1182
- /** Moves an item up relative to its siblings.
1183
- * @param {HTMLElement | string} item. The jqx-tree-item/jqx-tree-items-group (or its id or numeric path) to remove.
1184
- */
1185
- moveUp(item) {
1186
- if (this.nativeElement.isRendered) {
1187
- this.nativeElement.moveUp(item);
1188
- }
1189
- else {
1190
- this.nativeElement.whenRendered(() => {
1191
- this.nativeElement.moveUp(item);
1192
- });
1193
- }
1194
- }
1195
- /** Removes an item.
1196
- * @param {HTMLElement | string} item. The jqx-tree-item/jqx-tree-items-group (or its id or numeric path) to remove.
1197
- */
1198
- removeItem(item) {
1199
- if (this.nativeElement.isRendered) {
1200
- this.nativeElement.removeItem(item);
1201
- }
1202
- else {
1203
- this.nativeElement.whenRendered(() => {
1204
- this.nativeElement.removeItem(item);
1205
- });
1206
- }
1207
- }
1208
- /** Saves the Tree's state.
1209
- * @returns {any}
1210
- */
1211
- saveState() {
1212
- return __awaiter(this, void 0, void 0, function* () {
1213
- const getResultOnRender = () => {
1214
- return new Promise(resolve => {
1215
- this.nativeElement.whenRendered(() => {
1216
- const result = this.nativeElement.saveState();
1217
- resolve(result);
1218
- });
1219
- });
1220
- };
1221
- const result = yield getResultOnRender();
1222
- return result;
1223
- });
1224
- }
1225
- /** Selects an item by its index or by HTMLElement id.
1226
- * @param {HTMLElement | string} item. The jqx-tree-item/jqx-tree-items-group (or its id or numeric path) to remove.
1227
- */
1228
- select(item) {
1229
- if (this.nativeElement.isRendered) {
1230
- this.nativeElement.select(item);
1231
- }
1232
- else {
1233
- this.nativeElement.whenRendered(() => {
1234
- this.nativeElement.select(item);
1235
- });
1236
- }
1237
- }
1238
- /** Selects an item or items by values.
1239
- * @param {string | string[]} items. The jqx-tree-item/jqx-tree-items-group values or labels, if values are not defined.
1240
- */
1241
- setSelectedValues(items) {
1242
- if (this.nativeElement.isRendered) {
1243
- this.nativeElement.setSelectedValues(items);
1244
- }
1245
- else {
1246
- this.nativeElement.whenRendered(() => {
1247
- this.nativeElement.setSelectedValues(items);
1248
- });
1249
- }
1250
- }
1251
- /** Unselects an item by its index or by HTMLElement id.
1252
- * @param {HTMLElement | string} item. The jqx-tree-item/jqx-tree-items-group (or its id or numeric path) to remove.
1253
- */
1254
- unselect(item) {
1255
- if (this.nativeElement.isRendered) {
1256
- this.nativeElement.unselect(item);
1257
- }
1258
- else {
1259
- this.nativeElement.whenRendered(() => {
1260
- this.nativeElement.unselect(item);
1261
- });
1262
- }
1263
- }
1264
- /** Unselects an item or items by values.
1265
- * @param {string | string[]} items. The jqx-tree-item/jqx-tree-items-group values or labels, if values are not defined.
1266
- */
1267
- unselectValues(items) {
1268
- if (this.nativeElement.isRendered) {
1269
- this.nativeElement.unselectValues(items);
1270
- }
1271
- else {
1272
- this.nativeElement.whenRendered(() => {
1273
- this.nativeElement.unselectValues(items);
1274
- });
1275
- }
1276
- }
1277
- /** Updates an item.
1278
- * @param {HTMLElement | string} item. jqx-tree-item/jqx-tree-items-group (or its id or numeric path).
1279
- * @param {any} newItem. An object with updated properties.
1280
- */
1281
- updateItem(item, newItem) {
1282
- if (this.nativeElement.isRendered) {
1283
- this.nativeElement.updateItem(item, newItem);
1284
- }
1285
- else {
1286
- this.nativeElement.whenRendered(() => {
1287
- this.nativeElement.updateItem(item, newItem);
1288
- });
1289
- }
1290
- }
1291
- componentDidRender(initialize) {
1292
- const that = this;
1293
- const props = {};
1294
- const events = {};
1295
- let styles = null;
1296
- for (let prop in that.props) {
1297
- if (prop === 'children') {
1298
- continue;
1299
- }
1300
- if (prop === 'style') {
1301
- styles = that.props[prop];
1302
- continue;
1303
- }
1304
- if (prop.startsWith('on') && that.properties.indexOf(prop) === -1) {
1305
- events[prop] = that.props[prop];
1306
- continue;
1307
- }
1308
- props[prop] = that.props[prop];
1309
- }
1310
- if (initialize) {
1311
- that.nativeElement = this.componentRef.current;
1312
- }
1313
- for (let prop in props) {
1314
- if (prop === 'class' || prop === 'className') {
1315
- const classNames = props[prop].trim().split(' ');
1316
- for (let className in classNames) {
1317
- if (!that.nativeElement.classList.contains(classNames[className]) && classNames[className] !== "") {
1318
- that.nativeElement.classList.add(classNames[className]);
1319
- }
1320
- }
1321
- continue;
1322
- }
1323
- if (props[prop] !== that.nativeElement[prop]) {
1324
- const normalizeProp = (str) => {
1325
- return str.replace(/-([a-z])/g, function (g) {
1326
- return g[1].toUpperCase();
1327
- });
1328
- };
1329
- if (prop === 'hover' || prop === 'active' || prop === 'focus' || prop === 'selected') {
1330
- that.nativeElement.setAttribute(prop, '');
1331
- }
1332
- const normalizedProp = normalizeProp(prop);
1333
- that.nativeElement[normalizedProp] = props[prop];
1334
- }
1335
- }
1336
- for (let eventName in events) {
1337
- that[eventName] = events[eventName];
1338
- that.nativeElement[eventName.toLowerCase()] = events[eventName];
1339
- }
1340
- if (initialize) {
1341
- Smart$2.Render();
1342
- if (that.onCreate) {
1343
- that.onCreate();
1344
- }
1345
- that.nativeElement.whenRendered(() => {
1346
- if (that.onReady) {
1347
- that.onReady();
1348
- }
1349
- });
1350
- }
1351
- // setup styles.
1352
- if (styles) {
1353
- for (let styleName in styles) {
1354
- that.nativeElement.style[styleName] = styles[styleName];
1355
- }
1356
- }
1357
- }
1358
- componentDidMount() {
1359
- this.componentDidRender(true);
1360
- }
1361
- componentDidUpdate() {
1362
- this.componentDidRender(false);
1363
- }
1364
- componentWillUnmount() {
1365
- const that = this;
1366
- if (!that.nativeElement) {
1367
- return;
1368
- }
1369
- that.nativeElement.whenRenderedCallbacks = [];
1370
- for (let i = 0; i < that.eventListeners.length; i++) {
1371
- const eventName = that.eventListeners[i];
1372
- that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
1373
- }
1374
- }
1375
- render() {
1376
- return (React.createElement("smart-tree", { ref: this.componentRef }, this.props.children));
1377
- }
1378
- }
1315
+ exports.Smart = Smart$2;
1316
+ exports.Tree = Tree;
1317
+ exports.default = Tree;
1318
+ exports.TreeItem = TreeItem;
1319
+ exports.TreeItemsGroup = TreeItemsGroup;
1379
1320
 
1380
- exports.Smart = Smart$2;
1381
- exports.Tree = Tree;
1382
- exports.default = Tree;
1383
- exports.TreeItem = TreeItem;
1384
- exports.TreeItemsGroup = TreeItemsGroup;
1385
-
1386
- Object.defineProperty(exports, '__esModule', { value: true });
1321
+ Object.defineProperty(exports, '__esModule', { value: true });
1387
1322
 
1388
1323
  })));