smart-webcomponents-react 14.2.83 → 14.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (376) hide show
  1. package/alertwindow/alertwindow.d.ts +5 -5
  2. package/alertwindow/alertwindow.esm.js +10 -85
  3. package/alertwindow/alertwindow.umd.js +1134 -1209
  4. package/array/array.d.ts +5 -5
  5. package/array/array.esm.js +13 -88
  6. package/array/array.umd.js +752 -827
  7. package/barcode/barcode.d.ts +3 -3
  8. package/barcode/barcode.esm.js +6 -61
  9. package/barcode/barcode.umd.js +311 -366
  10. package/button/dropdownbutton.d.ts +2 -2
  11. package/button/multisplitbutton.d.ts +2 -2
  12. package/calendar/calendar.d.ts +2 -2
  13. package/calendar/calendar.esm.js +4 -49
  14. package/calendar/calendar.umd.js +710 -755
  15. package/card/cardview.d.ts +1 -1
  16. package/cardview/cardview.d.ts +1 -1
  17. package/cardview/cardview.esm.js +2 -37
  18. package/cardview/cardview.umd.js +515 -550
  19. package/chart/chart.d.ts +9 -9
  20. package/chart/chart.esm.js +18 -133
  21. package/chart/chart.umd.js +822 -937
  22. package/chart/ganttchart.d.ts +20 -20
  23. package/combobox/combobox.d.ts +4 -4
  24. package/combobox/combobox.esm.js +8 -73
  25. package/combobox/combobox.umd.js +1341 -1406
  26. package/datetimepicker/datetimepicker.d.ts +1 -1
  27. package/datetimepicker/datetimepicker.esm.js +2 -37
  28. package/datetimepicker/datetimepicker.umd.js +826 -861
  29. package/dialogwindow/dialogwindow.d.ts +5 -5
  30. package/dialogwindow/dialogwindow.esm.js +10 -85
  31. package/dialogwindow/dialogwindow.umd.js +1134 -1209
  32. package/dockinglayout/dockinglayout.d.ts +7 -7
  33. package/dockinglayout/dockinglayout.esm.js +14 -109
  34. package/dockinglayout/dockinglayout.umd.js +765 -860
  35. package/dropdownbutton/dropdownbutton.d.ts +2 -2
  36. package/dropdownbutton/dropdownbutton.esm.js +4 -49
  37. package/dropdownbutton/dropdownbutton.umd.js +527 -572
  38. package/dropdownlist/dropdownlist.d.ts +4 -4
  39. package/dropdownlist/dropdownlist.esm.js +8 -73
  40. package/dropdownlist/dropdownlist.umd.js +1275 -1340
  41. package/editor/editor.d.ts +11 -9
  42. package/editor/editor.esm.js +14 -109
  43. package/editor/editor.umd.js +911 -1006
  44. package/fileupload/fileupload.d.ts +2 -1
  45. package/filterbuilder/filterbuilder.d.ts +1 -1
  46. package/filterbuilder/filterbuilder.esm.js +2 -37
  47. package/filterbuilder/filterbuilder.umd.js +463 -498
  48. package/filterpanel/filterpanel.d.ts +1 -1
  49. package/filterpanel/filterpanel.esm.js +2 -37
  50. package/filterpanel/filterpanel.umd.js +354 -389
  51. package/form/form.d.ts +1 -1
  52. package/form/form.esm.js +4 -49
  53. package/form/form.umd.js +1016 -1061
  54. package/form/formgroup.d.ts +1 -1
  55. package/ganttchart/ganttchart.d.ts +20 -20
  56. package/ganttchart/ganttchart.esm.js +40 -265
  57. package/ganttchart/ganttchart.umd.js +1666 -1891
  58. package/gauge/gauge.d.ts +2 -2
  59. package/gauge/gauge.esm.js +4 -49
  60. package/gauge/gauge.umd.js +664 -709
  61. package/grid/grid.d.ts +56 -51
  62. package/grid/grid.esm.js +96 -460
  63. package/grid/grid.umd.js +2107 -2471
  64. package/index.d.ts +45 -3
  65. package/input/input.d.ts +2 -2
  66. package/input/input.esm.js +4 -49
  67. package/input/input.umd.js +505 -550
  68. package/input/numberinput.d.ts +2 -2
  69. package/input/phoneinput.d.ts +4 -4
  70. package/kanban/kanban.d.ts +6 -6
  71. package/kanban/kanban.esm.js +12 -97
  72. package/kanban/kanban.umd.js +1334 -1419
  73. package/layout/dockinglayout.d.ts +7 -7
  74. package/listbox/listbox.d.ts +5 -5
  75. package/listbox/listbox.esm.js +10 -85
  76. package/listbox/listbox.umd.js +1170 -1245
  77. package/listmenu/listmenu.d.ts +1 -1
  78. package/listmenu/listmenu.esm.js +2 -37
  79. package/listmenu/listmenu.umd.js +1005 -1040
  80. package/menu/listmenu.d.ts +1 -1
  81. package/menu/menu.d.ts +1 -1
  82. package/menu/menu.esm.js +2 -37
  83. package/menu/menu.umd.js +1025 -1060
  84. package/multilinetextbox/multilinetextbox.d.ts +1 -1
  85. package/multilinetextbox/multilinetextbox.esm.js +2 -37
  86. package/multilinetextbox/multilinetextbox.umd.js +907 -942
  87. package/multilinewindow/multilinewindow.d.ts +5 -5
  88. package/multilinewindow/multilinewindow.esm.js +10 -85
  89. package/multilinewindow/multilinewindow.umd.js +1134 -1209
  90. package/multisplitbutton/multisplitbutton.d.ts +2 -2
  91. package/multisplitbutton/multisplitbutton.esm.js +4 -49
  92. package/multisplitbutton/multisplitbutton.umd.js +941 -986
  93. package/numberinput/numberinput.d.ts +2 -2
  94. package/numberinput/numberinput.esm.js +4 -49
  95. package/numberinput/numberinput.umd.js +348 -393
  96. package/numerictextbox/numerictextbox.d.ts +1 -1
  97. package/numerictextbox/numerictextbox.esm.js +2 -37
  98. package/numerictextbox/numerictextbox.umd.js +592 -627
  99. package/package.json +1 -1
  100. package/phoneinput/phoneinput.d.ts +4 -4
  101. package/phoneinput/phoneinput.esm.js +8 -73
  102. package/phoneinput/phoneinput.umd.js +386 -451
  103. package/pivottable/pivottable.d.ts +3 -3
  104. package/pivottable/pivottable.esm.js +6 -61
  105. package/pivottable/pivottable.umd.js +762 -817
  106. package/progresswindow/progresswindow.d.ts +5 -5
  107. package/progresswindow/progresswindow.esm.js +10 -85
  108. package/progresswindow/progresswindow.umd.js +1134 -1209
  109. package/promptwindow/promptwindow.d.ts +5 -5
  110. package/promptwindow/promptwindow.esm.js +10 -85
  111. package/promptwindow/promptwindow.umd.js +1134 -1209
  112. package/qrcode/qrcode.d.ts +3 -3
  113. package/qrcode/qrcode.esm.js +6 -61
  114. package/qrcode/qrcode.umd.js +333 -388
  115. package/querybuilder/querybuilder.d.ts +6 -1
  116. package/querybuilder/querybuilder.esm.js +14 -38
  117. package/querybuilder/querybuilder.umd.js +446 -470
  118. package/rating/rating.d.ts +1 -1
  119. package/rating/rating.esm.js +2 -37
  120. package/rating/rating.umd.js +261 -296
  121. package/scheduler/scheduler.d.ts +17 -17
  122. package/scheduler/scheduler.esm.js +34 -229
  123. package/scheduler/scheduler.umd.js +1782 -1977
  124. package/slider/slider.d.ts +2 -2
  125. package/slider/slider.esm.js +4 -49
  126. package/slider/slider.umd.js +642 -687
  127. package/source/modules/smart.accordion.js +1 -1
  128. package/source/modules/smart.array.js +2 -2
  129. package/source/modules/smart.barcode.js +1 -1
  130. package/source/modules/smart.breadcrumb.js +1 -1
  131. package/source/modules/smart.button.js +1 -1
  132. package/source/modules/smart.buttongroup.js +1 -1
  133. package/source/modules/smart.calendar.js +3 -3
  134. package/source/modules/smart.card.js +1 -1
  135. package/source/modules/smart.cardview.js +4 -4
  136. package/source/modules/smart.carousel.js +1 -1
  137. package/source/modules/smart.chart.js +1 -1
  138. package/source/modules/smart.checkbox.js +1 -1
  139. package/source/modules/smart.checkinput.js +2 -2
  140. package/source/modules/smart.chip.js +1 -1
  141. package/source/modules/smart.colorinput.js +2 -2
  142. package/source/modules/smart.colorpanel.js +2 -2
  143. package/source/modules/smart.colorpicker.js +2 -2
  144. package/source/modules/smart.combobox.js +2 -2
  145. package/source/modules/smart.common.js +1 -1
  146. package/source/modules/smart.countryinput.js +2 -2
  147. package/source/modules/smart.dateinput.js +3 -3
  148. package/source/modules/smart.daterangeinput.js +4 -4
  149. package/source/modules/smart.datetimepicker.js +3 -3
  150. package/source/modules/smart.dockinglayout.js +1 -1
  151. package/source/modules/smart.dropdownbutton.js +1 -1
  152. package/source/modules/smart.dropdownlist.js +2 -2
  153. package/source/modules/smart.editor.js +5 -5
  154. package/source/modules/smart.element.js +1 -1
  155. package/source/modules/smart.fileupload.js +3 -3
  156. package/source/modules/smart.form.js +2 -2
  157. package/source/modules/smart.formulaparser.js +1 -1
  158. package/source/modules/smart.ganttchart.js +5 -5
  159. package/source/modules/smart.gauge.js +1 -1
  160. package/source/modules/smart.grid.js +14 -14
  161. package/source/modules/smart.gridpanel.js +4 -4
  162. package/source/modules/smart.input.js +2 -2
  163. package/source/modules/smart.kanban.js +5 -5
  164. package/source/modules/smart.layout.js +1 -1
  165. package/source/modules/smart.led.js +1 -1
  166. package/source/modules/smart.listbox.js +2 -2
  167. package/source/modules/smart.listmenu.js +1 -1
  168. package/source/modules/smart.map.js +1 -1
  169. package/source/modules/smart.maskedtextbox.js +2 -2
  170. package/source/modules/smart.menu.js +1 -1
  171. package/source/modules/smart.multicomboinput.js +2 -2
  172. package/source/modules/smart.multiinput.js +2 -2
  173. package/source/modules/smart.multilinetextbox.js +2 -2
  174. package/source/modules/smart.multisplitbutton.js +2 -2
  175. package/source/modules/smart.numberinput.js +2 -2
  176. package/source/modules/smart.numerictextbox.js +2 -2
  177. package/source/modules/smart.pager.js +2 -2
  178. package/source/modules/smart.passwordinput.js +2 -2
  179. package/source/modules/smart.passwordtextbox.js +2 -2
  180. package/source/modules/smart.path.js +1 -1
  181. package/source/modules/smart.phoneinput.js +2 -2
  182. package/source/modules/smart.pivottable.js +3 -3
  183. package/source/modules/smart.progressbar.js +1 -1
  184. package/source/modules/smart.qrcode.js +1 -1
  185. package/source/modules/smart.querybuilder.js +5 -5
  186. package/source/modules/smart.radiobutton.js +1 -1
  187. package/source/modules/smart.rating.js +1 -1
  188. package/source/modules/smart.router.js +1 -1
  189. package/source/modules/smart.scheduler.js +4 -4
  190. package/source/modules/smart.scrollbar.js +1 -1
  191. package/source/modules/smart.slider.js +1 -1
  192. package/source/modules/smart.sortable.js +1 -1
  193. package/source/modules/smart.splitter.js +1 -1
  194. package/source/modules/smart.switchbutton.js +1 -1
  195. package/source/modules/smart.table.js +3 -3
  196. package/source/modules/smart.tabs.js +1 -1
  197. package/source/modules/smart.tank.js +1 -1
  198. package/source/modules/smart.textarea.js +2 -2
  199. package/source/modules/smart.textbox.js +2 -2
  200. package/source/modules/smart.timeinput.js +2 -2
  201. package/source/modules/smart.timepicker.js +1 -1
  202. package/source/modules/smart.toast.js +1 -1
  203. package/source/modules/smart.tooltip.js +1 -1
  204. package/source/modules/smart.tree.js +1 -1
  205. package/source/modules/smart.validator.js +1 -1
  206. package/source/modules/smart.window.js +2 -2
  207. package/source/smart.accordion.js +1 -1
  208. package/source/smart.ajax.js +1 -1
  209. package/source/smart.array.js +1 -1
  210. package/source/smart.barcode.js +1 -1
  211. package/source/smart.bootstrap.js +1 -1
  212. package/source/smart.breadcrumb.js +1 -1
  213. package/source/smart.button.js +1 -1
  214. package/source/smart.buttongroup.js +1 -1
  215. package/source/smart.calendar.js +2 -2
  216. package/source/smart.card.js +1 -1
  217. package/source/smart.cardview.js +1 -1
  218. package/source/smart.carousel.js +1 -1
  219. package/source/smart.chart.annotations.js +1 -1
  220. package/source/smart.chart.api.js +1 -1
  221. package/source/smart.chart.core.js +1 -1
  222. package/source/smart.chart.js +1 -1
  223. package/source/smart.chart.rangeselector.js +1 -1
  224. package/source/smart.chart.waterfall.js +1 -1
  225. package/source/smart.checkbox.js +1 -1
  226. package/source/smart.checkinput.js +1 -1
  227. package/source/smart.chip.js +1 -1
  228. package/source/smart.colorinput.js +1 -1
  229. package/source/smart.colorpanel.js +1 -1
  230. package/source/smart.colorpicker.js +1 -1
  231. package/source/smart.combobox.js +1 -1
  232. package/source/smart.complex.js +1 -1
  233. package/source/smart.core.js +1 -1
  234. package/source/smart.countryinput.js +1 -1
  235. package/source/smart.data.js +1 -1
  236. package/source/smart.date.js +1 -1
  237. package/source/smart.dateformatpanel.js +1 -1
  238. package/source/smart.dateinput.js +1 -1
  239. package/source/smart.daterangeinput.js +1 -1
  240. package/source/smart.datetimepicker.js +1 -1
  241. package/source/smart.dockinglayout.js +1 -1
  242. package/source/smart.draw.js +1 -1
  243. package/source/smart.dropdownbutton.js +1 -1
  244. package/source/smart.dropdownlist.js +1 -1
  245. package/source/smart.editor.js +2 -2
  246. package/source/smart.element.js +1 -1
  247. package/source/smart.elements.js +17 -17
  248. package/source/smart.export.js +1 -1
  249. package/source/smart.fileupload.js +2 -2
  250. package/source/smart.filter.js +1 -1
  251. package/source/smart.filterbuilder.js +2 -2
  252. package/source/smart.filterpanel.js +1 -1
  253. package/source/smart.form.js +1 -1
  254. package/source/smart.format.js +1 -1
  255. package/source/smart.formulaparser.js +1 -1
  256. package/source/smart.ganttchart.js +2 -2
  257. package/source/smart.gauge.js +1 -1
  258. package/source/smart.grid.cell.js +2 -2
  259. package/source/smart.grid.chart.js +1 -1
  260. package/source/smart.grid.column.js +1 -1
  261. package/source/smart.grid.core.js +2 -2
  262. package/source/smart.grid.dialog.js +2 -2
  263. package/source/smart.grid.edit.js +2 -2
  264. package/source/smart.grid.export.js +1 -1
  265. package/source/smart.grid.filter.js +1 -1
  266. package/source/smart.grid.group.js +1 -1
  267. package/source/smart.grid.js +1 -1
  268. package/source/smart.grid.menu.js +2 -2
  269. package/source/smart.grid.pager.js +1 -1
  270. package/source/smart.grid.reorder.js +1 -1
  271. package/source/smart.grid.resize.js +2 -2
  272. package/source/smart.grid.row.js +1 -1
  273. package/source/smart.grid.select.js +2 -2
  274. package/source/smart.grid.sort.js +1 -1
  275. package/source/smart.grid.toolbar.js +2 -2
  276. package/source/smart.grid.tree.js +1 -1
  277. package/source/smart.grid.view.js +2 -2
  278. package/source/smart.gridpanel.js +1 -1
  279. package/source/smart.input.js +2 -2
  280. package/source/smart.kanban.js +2 -2
  281. package/source/smart.layout.js +1 -1
  282. package/source/smart.led.js +1 -1
  283. package/source/smart.listbox.js +2 -2
  284. package/source/smart.listmenu.js +1 -1
  285. package/source/smart.map.js +1 -1
  286. package/source/smart.maskedtextbox.js +1 -1
  287. package/source/smart.math.js +1 -1
  288. package/source/smart.menu.js +1 -1
  289. package/source/smart.multicomboinput.js +1 -1
  290. package/source/smart.multiinput.js +1 -1
  291. package/source/smart.multilinetextbox.js +1 -1
  292. package/source/smart.multisplitbutton.js +1 -1
  293. package/source/smart.numberformatpanel.js +1 -1
  294. package/source/smart.numberinput.js +1 -1
  295. package/source/smart.numeric.js +1 -1
  296. package/source/smart.numerictextbox.js +1 -1
  297. package/source/smart.pager.js +1 -1
  298. package/source/smart.passwordinput.js +1 -1
  299. package/source/smart.passwordtextbox.js +1 -1
  300. package/source/smart.path.js +1 -1
  301. package/source/smart.phoneinput.js +1 -1
  302. package/source/smart.pivottable.js +1 -1
  303. package/source/smart.powerbutton.js +1 -1
  304. package/source/smart.progressbar.js +1 -1
  305. package/source/smart.qrcode.js +1 -1
  306. package/source/smart.radiobutton.js +1 -1
  307. package/source/smart.rating.js +1 -1
  308. package/source/smart.router.js +1 -1
  309. package/source/smart.scheduler.js +1 -1
  310. package/source/smart.scrollbar.js +1 -1
  311. package/source/smart.slider.js +1 -1
  312. package/source/smart.sortable.js +1 -1
  313. package/source/smart.splitter.js +1 -1
  314. package/source/smart.switchbutton.js +1 -1
  315. package/source/smart.table.js +1 -1
  316. package/source/smart.tabs.js +1 -1
  317. package/source/smart.tank.js +1 -1
  318. package/source/smart.textarea.js +1 -1
  319. package/source/smart.textbox.js +1 -1
  320. package/source/smart.tickintervalhandler.js +1 -1
  321. package/source/smart.timeinput.js +1 -1
  322. package/source/smart.timepicker.js +1 -1
  323. package/source/smart.toast.js +1 -1
  324. package/source/smart.tooltip.js +1 -1
  325. package/source/smart.tree.js +1 -1
  326. package/source/smart.validationpanel.js +1 -1
  327. package/source/smart.validator.js +1 -1
  328. package/source/smart.window.js +1 -1
  329. package/source/styles/components/smart.grid.css +1 -1
  330. package/source/styles/default/scss/smart.grid.scss +10 -3
  331. package/source/styles/default/smart.grid.css +7 -3
  332. package/source/styles/smart.default.css +1 -1
  333. package/source/typescript/smart.editor.d.ts +4 -2
  334. package/source/typescript/smart.elements.d.ts +45 -3
  335. package/source/typescript/smart.fileupload.d.ts +2 -1
  336. package/source/typescript/smart.grid.d.ts +34 -0
  337. package/source/typescript/smart.querybuilder.d.ts +5 -0
  338. package/splitter/splitter.d.ts +3 -3
  339. package/splitter/splitter.esm.js +6 -61
  340. package/splitter/splitter.umd.js +901 -956
  341. package/table/pivottable.d.ts +3 -3
  342. package/table/table.d.ts +7 -7
  343. package/table/table.esm.js +14 -109
  344. package/table/table.umd.js +1278 -1373
  345. package/tabs/tabs.d.ts +4 -4
  346. package/tabs/tabs.esm.js +8 -73
  347. package/tabs/tabs.umd.js +875 -940
  348. package/tabs/tabswindow.d.ts +5 -5
  349. package/tabswindow/tabswindow.d.ts +5 -5
  350. package/tabswindow/tabswindow.esm.js +10 -85
  351. package/tabswindow/tabswindow.umd.js +1134 -1209
  352. package/tank/tank.d.ts +2 -2
  353. package/tank/tank.esm.js +4 -49
  354. package/tank/tank.umd.js +598 -643
  355. package/textbox/multilinetextbox.d.ts +1 -1
  356. package/textbox/numerictextbox.d.ts +1 -1
  357. package/timepicker/datetimepicker.d.ts +1 -1
  358. package/toast/toast.d.ts +1 -1
  359. package/toast/toast.esm.js +2 -37
  360. package/toast/toast.umd.js +397 -432
  361. package/tree/tree.d.ts +4 -4
  362. package/tree/tree.esm.js +8 -73
  363. package/tree/tree.umd.js +1310 -1375
  364. package/waitwindow/waitwindow.d.ts +5 -5
  365. package/waitwindow/waitwindow.esm.js +10 -85
  366. package/waitwindow/waitwindow.umd.js +1134 -1209
  367. package/window/alertwindow.d.ts +5 -5
  368. package/window/dialogwindow.d.ts +5 -5
  369. package/window/multilinewindow.d.ts +5 -5
  370. package/window/progresswindow.d.ts +5 -5
  371. package/window/promptwindow.d.ts +5 -5
  372. package/window/tabswindow.d.ts +5 -5
  373. package/window/waitwindow.d.ts +5 -5
  374. package/window/window.d.ts +5 -5
  375. package/window/window.esm.js +10 -85
  376. package/window/window.umd.js +1134 -1209
@@ -2,837 +2,762 @@
2
2
  require('../source/modules/smart.array');
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.array = {}),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.array = {}),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
+ Array is broadly used in Engineering applications and displays a Grid of values.
15
+ */
16
+ class Array 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 = 'Array' + Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
25
+ }
26
+ return this._id;
27
+ }
28
+ /** Sets or gets the animation mode. Animation is disabled when the property is set to 'none'
29
+ * Property type: Animation | string
30
+ */
31
+ get animation() {
32
+ return this.nativeElement ? this.nativeElement.animation : undefined;
33
+ }
34
+ set animation(value) {
35
+ if (this.nativeElement) {
36
+ this.nativeElement.animation = value;
37
+ }
38
+ }
39
+ /** Sets or gets the indexing mode of the Array.
40
+ * Property type: ArrayArrayIndexingMode | string
41
+ */
42
+ get arrayIndexingMode() {
43
+ return this.nativeElement ? this.nativeElement.arrayIndexingMode : undefined;
44
+ }
45
+ set arrayIndexingMode(value) {
46
+ if (this.nativeElement) {
47
+ this.nativeElement.arrayIndexingMode = value;
48
+ }
49
+ }
50
+ /** A callback function that is called when the width, height or disabled properties of an inner element need to be updated. Applicable only when type is 'custom'.
51
+ * Property type: any
52
+ */
53
+ get changeProperty() {
54
+ return this.nativeElement ? this.nativeElement.changeProperty : undefined;
55
+ }
56
+ set changeProperty(value) {
57
+ if (this.nativeElement) {
58
+ this.nativeElement.changeProperty = value;
59
+ }
60
+ }
61
+ /** Sets or gets the number of visible columns in the Array.
62
+ * Property type: number
63
+ */
64
+ get columns() {
65
+ return this.nativeElement ? this.nativeElement.columns : undefined;
66
+ }
67
+ set columns(value) {
68
+ if (this.nativeElement) {
69
+ this.nativeElement.columns = value;
70
+ }
71
+ }
72
+ /** Sets or gets the default value of inner elements when type is 'custom'.
73
+ * Property type: any
74
+ */
75
+ get customWidgetDefaultValue() {
76
+ return this.nativeElement ? this.nativeElement.customWidgetDefaultValue : undefined;
77
+ }
78
+ set customWidgetDefaultValue(value) {
79
+ if (this.nativeElement) {
80
+ this.nativeElement.customWidgetDefaultValue = value;
81
+ }
82
+ }
83
+ /** Sets or gets the dimensions of the Array.
84
+ * Property type: number
85
+ */
86
+ get dimensions() {
87
+ return this.nativeElement ? this.nativeElement.dimensions : undefined;
88
+ }
89
+ set dimensions(value) {
90
+ if (this.nativeElement) {
91
+ this.nativeElement.dimensions = value;
92
+ }
93
+ }
94
+ /** Sets or gets disabled state of the Array.
95
+ * Property type: boolean
96
+ */
97
+ get disabled() {
98
+ return this.nativeElement ? this.nativeElement.disabled : undefined;
99
+ }
100
+ set disabled(value) {
101
+ if (this.nativeElement) {
102
+ this.nativeElement.disabled = value;
103
+ }
104
+ }
105
+ /** Sets or gets the height of Array elements (row height).
106
+ * Property type: number
107
+ */
108
+ get elementHeight() {
109
+ return this.nativeElement ? this.nativeElement.elementHeight : undefined;
110
+ }
111
+ set elementHeight(value) {
112
+ if (this.nativeElement) {
113
+ this.nativeElement.elementHeight = value;
114
+ }
115
+ }
116
+ /** A callback function that can be used for applying settings to element widgets. When type is 'custom', widgets have to be initialized in this callback function.
117
+ * Property type: any
118
+ */
119
+ get elementTemplate() {
120
+ return this.nativeElement ? this.nativeElement.elementTemplate : undefined;
121
+ }
122
+ set elementTemplate(value) {
123
+ if (this.nativeElement) {
124
+ this.nativeElement.elementTemplate = value;
125
+ }
126
+ }
127
+ /** Sets or gets the width of Array elements (column width).
128
+ * Property type: number
129
+ */
130
+ get elementWidth() {
131
+ return this.nativeElement ? this.nativeElement.elementWidth : undefined;
132
+ }
133
+ set elementWidth(value) {
134
+ if (this.nativeElement) {
135
+ this.nativeElement.elementWidth = value;
136
+ }
137
+ }
138
+ /** A callback function that can be used for getting the value of element widgets.
139
+ * Property type: any
140
+ */
141
+ get getElementValue() {
142
+ return this.nativeElement ? this.nativeElement.getElementValue : undefined;
143
+ }
144
+ set getElementValue(value) {
145
+ if (this.nativeElement) {
146
+ this.nativeElement.getElementValue = value;
147
+ }
148
+ }
149
+ /** Sets or gets the height of indexers.
150
+ * Property type: number
151
+ */
152
+ get indexerHeight() {
153
+ return this.nativeElement ? this.nativeElement.indexerHeight : undefined;
154
+ }
155
+ set indexerHeight(value) {
156
+ if (this.nativeElement) {
157
+ this.nativeElement.indexerHeight = value;
158
+ }
159
+ }
160
+ /** Sets or gets the width of indexers.
161
+ * Property type: number
162
+ */
163
+ get indexerWidth() {
164
+ return this.nativeElement ? this.nativeElement.indexerWidth : undefined;
165
+ }
166
+ set indexerWidth(value) {
167
+ if (this.nativeElement) {
168
+ this.nativeElement.indexerWidth = value;
169
+ }
170
+ }
171
+ /** Sets or gets the language. Used in conjunction with the property messages.
172
+ * Property type: string
173
+ */
174
+ get locale() {
175
+ return this.nativeElement ? this.nativeElement.locale : undefined;
176
+ }
177
+ set locale(value) {
178
+ if (this.nativeElement) {
179
+ this.nativeElement.locale = value;
180
+ }
181
+ }
182
+ /** Callback, related to localization module.
183
+ * Property type: any
184
+ */
185
+ get localizeFormatFunction() {
186
+ return this.nativeElement ? this.nativeElement.localizeFormatFunction : undefined;
187
+ }
188
+ set localizeFormatFunction(value) {
189
+ if (this.nativeElement) {
190
+ this.nativeElement.localizeFormatFunction = value;
191
+ }
192
+ }
193
+ /** Sets or gets an object specifying strings used in the widget that can be localized. Used in conjunction with the property locale.
194
+ * Property type: any
195
+ */
196
+ get messages() {
197
+ return this.nativeElement ? this.nativeElement.messages : undefined;
198
+ }
199
+ set messages(value) {
200
+ if (this.nativeElement) {
201
+ this.nativeElement.messages = value;
202
+ }
203
+ }
204
+ /** If the element is readonly, users cannot interact with it.
205
+ * Property type: boolean
206
+ */
207
+ get readonly() {
208
+ return this.nativeElement ? this.nativeElement.readonly : undefined;
209
+ }
210
+ set readonly(value) {
211
+ if (this.nativeElement) {
212
+ this.nativeElement.readonly = value;
213
+ }
214
+ }
215
+ /** Sets or gets the number of visible rows in the Array.
216
+ * Property type: number
217
+ */
218
+ get rows() {
219
+ return this.nativeElement ? this.nativeElement.rows : undefined;
220
+ }
221
+ set rows(value) {
222
+ if (this.nativeElement) {
223
+ this.nativeElement.rows = value;
224
+ }
225
+ }
226
+ /** A callback function that can be used for setting the value of element widgets.
227
+ * Property type: any
228
+ */
229
+ get setElementValue() {
230
+ return this.nativeElement ? this.nativeElement.setElementValue : undefined;
231
+ }
232
+ set setElementValue(value) {
233
+ if (this.nativeElement) {
234
+ this.nativeElement.setElementValue = value;
235
+ }
236
+ }
237
+ /** Sets or gets whether to display the horizontal scrollbar.
238
+ * Property type: boolean
239
+ */
240
+ get showHorizontalScrollbar() {
241
+ return this.nativeElement ? this.nativeElement.showHorizontalScrollbar : undefined;
242
+ }
243
+ set showHorizontalScrollbar(value) {
244
+ if (this.nativeElement) {
245
+ this.nativeElement.showHorizontalScrollbar = value;
246
+ }
247
+ }
248
+ /** Sets or gets whether to display the array indexers.
249
+ * Property type: boolean
250
+ */
251
+ get showIndexDisplay() {
252
+ return this.nativeElement ? this.nativeElement.showIndexDisplay : undefined;
253
+ }
254
+ set showIndexDisplay(value) {
255
+ if (this.nativeElement) {
256
+ this.nativeElement.showIndexDisplay = value;
257
+ }
258
+ }
259
+ /** Sets or gets whether to highlight selected elements.
260
+ * Property type: boolean
261
+ */
262
+ get showSelection() {
263
+ return this.nativeElement ? this.nativeElement.showSelection : undefined;
264
+ }
265
+ set showSelection(value) {
266
+ if (this.nativeElement) {
267
+ this.nativeElement.showSelection = value;
268
+ }
269
+ }
270
+ /** Sets or gets whether to display the vertical scrollbar.
271
+ * Property type: boolean
272
+ */
273
+ get showVerticalScrollbar() {
274
+ return this.nativeElement ? this.nativeElement.showVerticalScrollbar : undefined;
275
+ }
276
+ set showVerticalScrollbar(value) {
277
+ if (this.nativeElement) {
278
+ this.nativeElement.showVerticalScrollbar = value;
279
+ }
280
+ }
281
+ /** Determines the theme. Theme defines the look of the element
282
+ * Property type: string
283
+ */
284
+ get theme() {
285
+ return this.nativeElement ? this.nativeElement.theme : undefined;
286
+ }
287
+ set theme(value) {
288
+ if (this.nativeElement) {
289
+ this.nativeElement.theme = value;
290
+ }
291
+ }
292
+ /** Sets or gets the data type and element widgets to be used in the Array.
293
+ * Property type: ArrayType | string
294
+ */
295
+ get type() {
296
+ return this.nativeElement ? this.nativeElement.type : undefined;
297
+ }
298
+ set type(value) {
299
+ if (this.nativeElement) {
300
+ this.nativeElement.type = value;
301
+ }
302
+ }
303
+ /** If is set to true, the element cannot be focused.
304
+ * Property type: boolean
305
+ */
306
+ get unfocusable() {
307
+ return this.nativeElement ? this.nativeElement.unfocusable : undefined;
308
+ }
309
+ set unfocusable(value) {
310
+ if (this.nativeElement) {
311
+ this.nativeElement.unfocusable = value;
312
+ }
313
+ }
314
+ /** Sets or gets the value of the Array.
315
+ * Property type: any
316
+ */
317
+ get value() {
318
+ return this.nativeElement ? this.nativeElement.value : undefined;
319
+ }
320
+ set value(value) {
321
+ if (this.nativeElement) {
322
+ this.nativeElement.value = value;
323
+ }
324
+ }
325
+ // Gets the properties of the React component.
326
+ get properties() {
327
+ return ["animation", "arrayIndexingMode", "changeProperty", "columns", "customWidgetDefaultValue", "dimensions", "disabled", "elementHeight", "elementTemplate", "elementWidth", "getElementValue", "indexerHeight", "indexerWidth", "locale", "localizeFormatFunction", "messages", "readonly", "rows", "setElementValue", "showHorizontalScrollbar", "showIndexDisplay", "showSelection", "showVerticalScrollbar", "theme", "type", "unfocusable", "value"];
328
+ }
329
+ // Gets the events of the React component.
330
+ get eventListeners() {
331
+ return ["onArraySizeChange", "onChange", "onDimensionChange", "onElementClick", "onScroll", "onSizeChange", "onCreate", "onReady"];
332
+ }
333
+ /** Adds a dimension to the array. Note: when adding multiple dimensions simultaneously, it is recommended to do so by dynamically setting the dimensions property.
334
+ */
335
+ addDimension() {
336
+ if (this.nativeElement.isRendered) {
337
+ this.nativeElement.addDimension();
338
+ }
339
+ else {
340
+ this.nativeElement.whenRendered(() => {
341
+ this.nativeElement.addDimension();
342
+ });
343
+ }
344
+ }
345
+ /** Clears the selection.
346
+ */
347
+ clearSelection() {
348
+ if (this.nativeElement.isRendered) {
349
+ this.nativeElement.clearSelection();
350
+ }
351
+ else {
352
+ this.nativeElement.whenRendered(() => {
353
+ this.nativeElement.clearSelection();
354
+ });
355
+ }
356
+ }
357
+ /** Copies the value of an Array element to the clipboard.
358
+ * @param {number} Rowvisibleindex. The visible index of the row (y coordinate) of the element.
359
+ * @param {number} Columnvisibleindex. The visible index of the column (x coordinate) of the element.
360
+ */
361
+ copyElementValueToClipboard(Rowvisibleindex, Columnvisibleindex) {
362
+ if (this.nativeElement.isRendered) {
363
+ this.nativeElement.copyElementValueToClipboard(Rowvisibleindex, Columnvisibleindex);
364
+ }
365
+ else {
366
+ this.nativeElement.whenRendered(() => {
367
+ this.nativeElement.copyElementValueToClipboard(Rowvisibleindex, Columnvisibleindex);
368
+ });
369
+ }
370
+ }
371
+ /** Deletes a column in the value array.
372
+ * @param {number} Columnindex. Index of the column to be deleted.
373
+ */
374
+ deleteColumn(Columnindex) {
375
+ if (this.nativeElement.isRendered) {
376
+ this.nativeElement.deleteColumn(Columnindex);
377
+ }
378
+ else {
379
+ this.nativeElement.whenRendered(() => {
380
+ this.nativeElement.deleteColumn(Columnindex);
381
+ });
382
+ }
383
+ }
384
+ /** Deletes a row in the value array.
385
+ * @param {number} Rowindex. Index of the row to be deleted.
386
+ */
387
+ deleteRow(Rowindex) {
388
+ if (this.nativeElement.isRendered) {
389
+ this.nativeElement.deleteRow(Rowindex);
390
+ }
391
+ else {
392
+ this.nativeElement.whenRendered(() => {
393
+ this.nativeElement.deleteRow(Rowindex);
394
+ });
395
+ }
396
+ }
397
+ /** Empties the value array.
398
+ */
399
+ emptyArray() {
400
+ if (this.nativeElement.isRendered) {
401
+ this.nativeElement.emptyArray();
402
+ }
403
+ else {
404
+ this.nativeElement.whenRendered(() => {
405
+ this.nativeElement.emptyArray();
406
+ });
407
+ }
408
+ }
409
+ /** Designates the end of a selection started with the method startSelection.
410
+ * @param {number} Rowboundindex. The bound index of the row (y coordinate) to end the selection to.
411
+ * @param {number} Columnboundindex. The bound index of the column (x coordinate) to end the selection to.
412
+ */
413
+ endSelection(Rowboundindex, Columnboundindex) {
414
+ if (this.nativeElement.isRendered) {
415
+ this.nativeElement.endSelection(Rowboundindex, Columnboundindex);
416
+ }
417
+ else {
418
+ this.nativeElement.whenRendered(() => {
419
+ this.nativeElement.endSelection(Rowboundindex, Columnboundindex);
420
+ });
421
+ }
422
+ }
423
+ /** Returns the HTML element at the specified visible row and column coordinates of the Array.
424
+ * @param {number} RowVisibleIndex. The visible index of the row (y coordinate) of the element.
425
+ * @param {number} ColumnVisibleIndex. The visible index of the column (x coordinate) of the element.
426
+ * @returns {HTMLElement}
427
+ */
428
+ getElement(RowVisibleIndex, ColumnVisibleIndex) {
429
+ const result = this.nativeElement.getElement(RowVisibleIndex, ColumnVisibleIndex);
430
+ return result;
431
+ }
432
+ /** Returns an object with the values of the Array element width and height.
433
+ * @returns {any}
434
+ */
435
+ getElementSize() {
436
+ const result = this.nativeElement.getElementSize();
437
+ return result;
438
+ }
439
+ /** Gets an array with the values of all indexers.
440
+ * @returns {any[]}
441
+ */
442
+ getIndexerValue() {
443
+ const result = this.nativeElement.getIndexerValue();
444
+ return result;
445
+ }
446
+ /** Returns an HTML element from the Array at the specified page coordinates and other information about this element.
447
+ * @param {number} Pagexcoordinate.
448
+ * @param {number} Pageycoordinate.
449
+ * @returns {any}
450
+ */
451
+ hitTest(Pagexcoordinate, Pageycoordinate) {
452
+ const result = this.nativeElement.hitTest(Pagexcoordinate, Pageycoordinate);
453
+ return result;
454
+ }
455
+ /** Inserts a column in the value array before the specified column. The new column is filled with default values.
456
+ * @param {number} Columnindex. Index of the column to add a new column before.
457
+ */
458
+ insertColumnBefore(Columnindex) {
459
+ if (this.nativeElement.isRendered) {
460
+ this.nativeElement.insertColumnBefore(Columnindex);
461
+ }
462
+ else {
463
+ this.nativeElement.whenRendered(() => {
464
+ this.nativeElement.insertColumnBefore(Columnindex);
465
+ });
466
+ }
467
+ }
468
+ /** Inserts a row in the value array before the specified row. The new row is filled with default values.
469
+ * @param {number} Rowindex. Index of the row to add a new row before.
470
+ */
471
+ insertRowBefore(Rowindex) {
472
+ if (this.nativeElement.isRendered) {
473
+ this.nativeElement.insertRowBefore(Rowindex);
474
+ }
475
+ else {
476
+ this.nativeElement.whenRendered(() => {
477
+ this.nativeElement.insertRowBefore(Rowindex);
478
+ });
479
+ }
480
+ }
481
+ /** Sets all value array members to the default value.
482
+ */
483
+ reinitializeArray() {
484
+ if (this.nativeElement.isRendered) {
485
+ this.nativeElement.reinitializeArray();
486
+ }
487
+ else {
488
+ this.nativeElement.whenRendered(() => {
489
+ this.nativeElement.reinitializeArray();
490
+ });
491
+ }
492
+ }
493
+ /** Removes a dimension from the array. Note: when removing multiple dimensions simultaneously, it is recommended to do so by dynamically setting the dimensions property.
494
+ */
495
+ removeDimension() {
496
+ if (this.nativeElement.isRendered) {
497
+ this.nativeElement.removeDimension();
498
+ }
499
+ else {
500
+ this.nativeElement.whenRendered(() => {
501
+ this.nativeElement.removeDimension();
502
+ });
503
+ }
504
+ }
505
+ /** Sets the array's type to 'none'.
506
+ */
507
+ reset() {
508
+ if (this.nativeElement.isRendered) {
509
+ this.nativeElement.reset();
510
+ }
511
+ else {
512
+ this.nativeElement.whenRendered(() => {
513
+ this.nativeElement.reset();
514
+ });
515
+ }
516
+ }
517
+ /** Resizes Array elements (changes both the column width and the row height).
518
+ * @param {number} Elementwidth. The new element (column) width.
519
+ * @param {number} Elementheight. The new element (row) height.
520
+ */
521
+ resizeElement(Elementwidth, Elementheight) {
522
+ if (this.nativeElement.isRendered) {
523
+ this.nativeElement.resizeElement(Elementwidth, Elementheight);
524
+ }
525
+ else {
526
+ this.nativeElement.whenRendered(() => {
527
+ this.nativeElement.resizeElement(Elementwidth, Elementheight);
528
+ });
529
+ }
530
+ }
531
+ /** Selects all members of the array.
532
+ */
533
+ selectAll() {
534
+ if (this.nativeElement.isRendered) {
535
+ this.nativeElement.selectAll();
536
+ }
537
+ else {
538
+ this.nativeElement.whenRendered(() => {
539
+ this.nativeElement.selectAll();
540
+ });
541
+ }
542
+ }
543
+ /** Selects an element with the passed row and column bound indexes.
544
+ * @param {number} Rowboundindex.
545
+ * @param {number} Columnboundindex.
546
+ */
547
+ selectElement(Rowboundindex, Columnboundindex) {
548
+ if (this.nativeElement.isRendered) {
549
+ this.nativeElement.selectElement(Rowboundindex, Columnboundindex);
550
+ }
551
+ else {
552
+ this.nativeElement.whenRendered(() => {
553
+ this.nativeElement.selectElement(Rowboundindex, Columnboundindex);
554
+ });
555
+ }
556
+ }
557
+ /** Sets the column (element) width.
558
+ * @param {number} Columnwidth. The new column width.
559
+ */
560
+ setColumnWidth(Columnwidth) {
561
+ if (this.nativeElement.isRendered) {
562
+ this.nativeElement.setColumnWidth(Columnwidth);
563
+ }
564
+ else {
565
+ this.nativeElement.whenRendered(() => {
566
+ this.nativeElement.setColumnWidth(Columnwidth);
567
+ });
568
+ }
569
+ }
570
+ /** Sets the default value of array members.
571
+ * @param {any} Defaultvalue. The new default value. Its data type should correspond to the <strong>type</strong> of the Array.
572
+ */
573
+ setDefaultValue(Defaultvalue) {
574
+ if (this.nativeElement.isRendered) {
575
+ this.nativeElement.setDefaultValue(Defaultvalue);
576
+ }
577
+ else {
578
+ this.nativeElement.whenRendered(() => {
579
+ this.nativeElement.setDefaultValue(Defaultvalue);
580
+ });
581
+ }
582
+ }
583
+ /** Sets the value of one or more Array indexers.
584
+ * @param {any[]} Settings. An array of objects with the fields index and value.
585
+ */
586
+ setIndexerValue(Settings) {
587
+ if (this.nativeElement.isRendered) {
588
+ this.nativeElement.setIndexerValue(Settings);
589
+ }
590
+ else {
591
+ this.nativeElement.whenRendered(() => {
592
+ this.nativeElement.setIndexerValue(Settings);
593
+ });
594
+ }
595
+ }
596
+ /** Sets the row (element) height.
597
+ * @param {number} Rowheight. The new row height.
598
+ */
599
+ setRowHeight(Rowheight) {
600
+ if (this.nativeElement.isRendered) {
601
+ this.nativeElement.setRowHeight(Rowheight);
602
+ }
603
+ else {
604
+ this.nativeElement.whenRendered(() => {
605
+ this.nativeElement.setRowHeight(Rowheight);
606
+ });
607
+ }
608
+ }
609
+ /** Makes the last array member visible.
610
+ */
611
+ showLastElement() {
612
+ if (this.nativeElement.isRendered) {
613
+ this.nativeElement.showLastElement();
614
+ }
615
+ else {
616
+ this.nativeElement.whenRendered(() => {
617
+ this.nativeElement.showLastElement();
618
+ });
619
+ }
620
+ }
621
+ /** Designates the start of a selection. To end a selection, call endSelection.
622
+ * @param {number} Rowboundindex. The bound index of the row (y coordinate) to start the selection from.
623
+ * @param {number} Columnboundindex. The bound index of the column (x coordinate) to start the selection from.
624
+ */
625
+ startSelection(Rowboundindex, Columnboundindex) {
626
+ if (this.nativeElement.isRendered) {
627
+ this.nativeElement.startSelection(Rowboundindex, Columnboundindex);
628
+ }
629
+ else {
630
+ this.nativeElement.whenRendered(() => {
631
+ this.nativeElement.startSelection(Rowboundindex, Columnboundindex);
632
+ });
633
+ }
634
+ }
635
+ /** Increases or decreases the visual gap between Array elements.
636
+ */
637
+ toggleElementGap() {
638
+ if (this.nativeElement.isRendered) {
639
+ this.nativeElement.toggleElementGap();
640
+ }
641
+ else {
642
+ this.nativeElement.whenRendered(() => {
643
+ this.nativeElement.toggleElementGap();
644
+ });
645
+ }
646
+ }
647
+ /** Transposes the array. Applicable only when dimensions is 2 (2D array).
648
+ */
649
+ transposeArray() {
650
+ if (this.nativeElement.isRendered) {
651
+ this.nativeElement.transposeArray();
652
+ }
653
+ else {
654
+ this.nativeElement.whenRendered(() => {
655
+ this.nativeElement.transposeArray();
656
+ });
657
+ }
658
+ }
659
+ /** Sets or gets the value of the whole array or sets the value of a member of the array.
660
+ * @param {any} Newvalue?. If the method is used for setting the value of the whole array, the expected value is an array. If it is used for setting the value of an array member, the value can be of any applicable type.
661
+ * @param {number | number[]} Elementindexes?. If this parameter is passed, only the value of the array member with the provided dimension indexes is set. Dimension indexes that are not passed are considered to be 0.
662
+ * @returns {any[]}
663
+ */
664
+ val(Newvalue, Elementindexes) {
665
+ const result = this.nativeElement.val(Newvalue, Elementindexes);
666
+ return result;
667
+ }
668
+ componentDidRender(initialize) {
669
+ const that = this;
670
+ const props = {};
671
+ const events = {};
672
+ let styles = null;
673
+ for (let prop in that.props) {
674
+ if (prop === 'children') {
675
+ continue;
676
+ }
677
+ if (prop === 'style') {
678
+ styles = that.props[prop];
679
+ continue;
680
+ }
681
+ if (prop.startsWith('on') && that.properties.indexOf(prop) === -1) {
682
+ events[prop] = that.props[prop];
683
+ continue;
684
+ }
685
+ props[prop] = that.props[prop];
686
+ }
687
+ if (initialize) {
688
+ that.nativeElement = this.componentRef.current;
689
+ }
690
+ for (let prop in props) {
691
+ if (prop === 'class' || prop === 'className') {
692
+ const classNames = props[prop].trim().split(' ');
693
+ for (let className in classNames) {
694
+ if (!that.nativeElement.classList.contains(classNames[className]) && classNames[className] !== "") {
695
+ that.nativeElement.classList.add(classNames[className]);
696
+ }
697
+ }
698
+ continue;
699
+ }
700
+ if (props[prop] !== that.nativeElement[prop]) {
701
+ const normalizeProp = (str) => {
702
+ return str.replace(/-([a-z])/g, function (g) {
703
+ return g[1].toUpperCase();
704
+ });
705
+ };
706
+ if (prop === 'hover' || prop === 'active' || prop === 'focus' || prop === 'selected') {
707
+ that.nativeElement.setAttribute(prop, '');
708
+ }
709
+ const normalizedProp = normalizeProp(prop);
710
+ that.nativeElement[normalizedProp] = props[prop];
711
+ }
712
+ }
713
+ for (let eventName in events) {
714
+ that[eventName] = events[eventName];
715
+ that.nativeElement[eventName.toLowerCase()] = events[eventName];
716
+ }
717
+ if (initialize) {
718
+ Smart.Render();
719
+ if (that.onCreate) {
720
+ that.onCreate();
721
+ }
722
+ that.nativeElement.whenRendered(() => {
723
+ if (that.onReady) {
724
+ that.onReady();
725
+ }
726
+ });
727
+ }
728
+ // setup styles.
729
+ if (styles) {
730
+ for (let styleName in styles) {
731
+ that.nativeElement.style[styleName] = styles[styleName];
732
+ }
733
+ }
734
+ }
735
+ componentDidMount() {
736
+ this.componentDidRender(true);
737
+ }
738
+ componentDidUpdate() {
739
+ this.componentDidRender(false);
740
+ }
741
+ componentWillUnmount() {
742
+ const that = this;
743
+ if (!that.nativeElement) {
744
+ return;
745
+ }
746
+ that.nativeElement.whenRenderedCallbacks = [];
747
+ for (let i = 0; i < that.eventListeners.length; i++) {
748
+ const eventName = that.eventListeners[i];
749
+ that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
750
+ }
751
+ }
752
+ render() {
753
+ return (React.createElement("smart-array", { ref: this.componentRef }, this.props.children));
754
+ }
755
+ }
36
756
 
37
- const Smart = window.Smart;
38
- /**
39
- Array is broadly used in Engineering applications and displays a Grid of values.
40
- */
41
- class Array$1 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 = 'Array' + Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
50
- }
51
- return this._id;
52
- }
53
- /** Sets or gets the animation mode. Animation is disabled when the property is set to 'none'
54
- * Property type: Animation | string
55
- */
56
- get animation() {
57
- return this.nativeElement ? this.nativeElement.animation : undefined;
58
- }
59
- set animation(value) {
60
- if (this.nativeElement) {
61
- this.nativeElement.animation = value;
62
- }
63
- }
64
- /** Sets or gets the indexing mode of the Array.
65
- * Property type: ArrayArrayIndexingMode | string
66
- */
67
- get arrayIndexingMode() {
68
- return this.nativeElement ? this.nativeElement.arrayIndexingMode : undefined;
69
- }
70
- set arrayIndexingMode(value) {
71
- if (this.nativeElement) {
72
- this.nativeElement.arrayIndexingMode = value;
73
- }
74
- }
75
- /** A callback function that is called when the width, height or disabled properties of an inner element need to be updated. Applicable only when type is 'custom'.
76
- * Property type: any
77
- */
78
- get changeProperty() {
79
- return this.nativeElement ? this.nativeElement.changeProperty : undefined;
80
- }
81
- set changeProperty(value) {
82
- if (this.nativeElement) {
83
- this.nativeElement.changeProperty = value;
84
- }
85
- }
86
- /** Sets or gets the number of visible columns in the Array.
87
- * Property type: number
88
- */
89
- get columns() {
90
- return this.nativeElement ? this.nativeElement.columns : undefined;
91
- }
92
- set columns(value) {
93
- if (this.nativeElement) {
94
- this.nativeElement.columns = value;
95
- }
96
- }
97
- /** Sets or gets the default value of inner elements when type is 'custom'.
98
- * Property type: any
99
- */
100
- get customWidgetDefaultValue() {
101
- return this.nativeElement ? this.nativeElement.customWidgetDefaultValue : undefined;
102
- }
103
- set customWidgetDefaultValue(value) {
104
- if (this.nativeElement) {
105
- this.nativeElement.customWidgetDefaultValue = value;
106
- }
107
- }
108
- /** Sets or gets the dimensions of the Array.
109
- * Property type: number
110
- */
111
- get dimensions() {
112
- return this.nativeElement ? this.nativeElement.dimensions : undefined;
113
- }
114
- set dimensions(value) {
115
- if (this.nativeElement) {
116
- this.nativeElement.dimensions = value;
117
- }
118
- }
119
- /** Sets or gets disabled state of the Array.
120
- * Property type: boolean
121
- */
122
- get disabled() {
123
- return this.nativeElement ? this.nativeElement.disabled : undefined;
124
- }
125
- set disabled(value) {
126
- if (this.nativeElement) {
127
- this.nativeElement.disabled = value;
128
- }
129
- }
130
- /** Sets or gets the height of Array elements (row height).
131
- * Property type: number
132
- */
133
- get elementHeight() {
134
- return this.nativeElement ? this.nativeElement.elementHeight : undefined;
135
- }
136
- set elementHeight(value) {
137
- if (this.nativeElement) {
138
- this.nativeElement.elementHeight = value;
139
- }
140
- }
141
- /** A callback function that can be used for applying settings to element widgets. When type is 'custom', widgets have to be initialized in this callback function.
142
- * Property type: any
143
- */
144
- get elementTemplate() {
145
- return this.nativeElement ? this.nativeElement.elementTemplate : undefined;
146
- }
147
- set elementTemplate(value) {
148
- if (this.nativeElement) {
149
- this.nativeElement.elementTemplate = value;
150
- }
151
- }
152
- /** Sets or gets the width of Array elements (column width).
153
- * Property type: number
154
- */
155
- get elementWidth() {
156
- return this.nativeElement ? this.nativeElement.elementWidth : undefined;
157
- }
158
- set elementWidth(value) {
159
- if (this.nativeElement) {
160
- this.nativeElement.elementWidth = value;
161
- }
162
- }
163
- /** A callback function that can be used for getting the value of element widgets.
164
- * Property type: any
165
- */
166
- get getElementValue() {
167
- return this.nativeElement ? this.nativeElement.getElementValue : undefined;
168
- }
169
- set getElementValue(value) {
170
- if (this.nativeElement) {
171
- this.nativeElement.getElementValue = value;
172
- }
173
- }
174
- /** Sets or gets the height of indexers.
175
- * Property type: number
176
- */
177
- get indexerHeight() {
178
- return this.nativeElement ? this.nativeElement.indexerHeight : undefined;
179
- }
180
- set indexerHeight(value) {
181
- if (this.nativeElement) {
182
- this.nativeElement.indexerHeight = value;
183
- }
184
- }
185
- /** Sets or gets the width of indexers.
186
- * Property type: number
187
- */
188
- get indexerWidth() {
189
- return this.nativeElement ? this.nativeElement.indexerWidth : undefined;
190
- }
191
- set indexerWidth(value) {
192
- if (this.nativeElement) {
193
- this.nativeElement.indexerWidth = value;
194
- }
195
- }
196
- /** Sets or gets the language. Used in conjunction with the property messages.
197
- * Property type: string
198
- */
199
- get locale() {
200
- return this.nativeElement ? this.nativeElement.locale : undefined;
201
- }
202
- set locale(value) {
203
- if (this.nativeElement) {
204
- this.nativeElement.locale = value;
205
- }
206
- }
207
- /** Callback, related to localization module.
208
- * Property type: any
209
- */
210
- get localizeFormatFunction() {
211
- return this.nativeElement ? this.nativeElement.localizeFormatFunction : undefined;
212
- }
213
- set localizeFormatFunction(value) {
214
- if (this.nativeElement) {
215
- this.nativeElement.localizeFormatFunction = value;
216
- }
217
- }
218
- /** Sets or gets an object specifying strings used in the widget that can be localized. Used in conjunction with the property locale.
219
- * Property type: any
220
- */
221
- get messages() {
222
- return this.nativeElement ? this.nativeElement.messages : undefined;
223
- }
224
- set messages(value) {
225
- if (this.nativeElement) {
226
- this.nativeElement.messages = value;
227
- }
228
- }
229
- /** If the element is readonly, users cannot interact with it.
230
- * Property type: boolean
231
- */
232
- get readonly() {
233
- return this.nativeElement ? this.nativeElement.readonly : undefined;
234
- }
235
- set readonly(value) {
236
- if (this.nativeElement) {
237
- this.nativeElement.readonly = value;
238
- }
239
- }
240
- /** Sets or gets the number of visible rows in the Array.
241
- * Property type: number
242
- */
243
- get rows() {
244
- return this.nativeElement ? this.nativeElement.rows : undefined;
245
- }
246
- set rows(value) {
247
- if (this.nativeElement) {
248
- this.nativeElement.rows = value;
249
- }
250
- }
251
- /** A callback function that can be used for setting the value of element widgets.
252
- * Property type: any
253
- */
254
- get setElementValue() {
255
- return this.nativeElement ? this.nativeElement.setElementValue : undefined;
256
- }
257
- set setElementValue(value) {
258
- if (this.nativeElement) {
259
- this.nativeElement.setElementValue = value;
260
- }
261
- }
262
- /** Sets or gets whether to display the horizontal scrollbar.
263
- * Property type: boolean
264
- */
265
- get showHorizontalScrollbar() {
266
- return this.nativeElement ? this.nativeElement.showHorizontalScrollbar : undefined;
267
- }
268
- set showHorizontalScrollbar(value) {
269
- if (this.nativeElement) {
270
- this.nativeElement.showHorizontalScrollbar = value;
271
- }
272
- }
273
- /** Sets or gets whether to display the array indexers.
274
- * Property type: boolean
275
- */
276
- get showIndexDisplay() {
277
- return this.nativeElement ? this.nativeElement.showIndexDisplay : undefined;
278
- }
279
- set showIndexDisplay(value) {
280
- if (this.nativeElement) {
281
- this.nativeElement.showIndexDisplay = value;
282
- }
283
- }
284
- /** Sets or gets whether to highlight selected elements.
285
- * Property type: boolean
286
- */
287
- get showSelection() {
288
- return this.nativeElement ? this.nativeElement.showSelection : undefined;
289
- }
290
- set showSelection(value) {
291
- if (this.nativeElement) {
292
- this.nativeElement.showSelection = value;
293
- }
294
- }
295
- /** Sets or gets whether to display the vertical scrollbar.
296
- * Property type: boolean
297
- */
298
- get showVerticalScrollbar() {
299
- return this.nativeElement ? this.nativeElement.showVerticalScrollbar : undefined;
300
- }
301
- set showVerticalScrollbar(value) {
302
- if (this.nativeElement) {
303
- this.nativeElement.showVerticalScrollbar = value;
304
- }
305
- }
306
- /** Determines the theme. Theme defines the look of the element
307
- * Property type: string
308
- */
309
- get theme() {
310
- return this.nativeElement ? this.nativeElement.theme : undefined;
311
- }
312
- set theme(value) {
313
- if (this.nativeElement) {
314
- this.nativeElement.theme = value;
315
- }
316
- }
317
- /** Sets or gets the data type and element widgets to be used in the Array.
318
- * Property type: ArrayType | string
319
- */
320
- get type() {
321
- return this.nativeElement ? this.nativeElement.type : undefined;
322
- }
323
- set type(value) {
324
- if (this.nativeElement) {
325
- this.nativeElement.type = value;
326
- }
327
- }
328
- /** If is set to true, the element cannot be focused.
329
- * Property type: boolean
330
- */
331
- get unfocusable() {
332
- return this.nativeElement ? this.nativeElement.unfocusable : undefined;
333
- }
334
- set unfocusable(value) {
335
- if (this.nativeElement) {
336
- this.nativeElement.unfocusable = value;
337
- }
338
- }
339
- /** Sets or gets the value of the Array.
340
- * Property type: any
341
- */
342
- get value() {
343
- return this.nativeElement ? this.nativeElement.value : undefined;
344
- }
345
- set value(value) {
346
- if (this.nativeElement) {
347
- this.nativeElement.value = value;
348
- }
349
- }
350
- // Gets the properties of the React component.
351
- get properties() {
352
- return ["animation", "arrayIndexingMode", "changeProperty", "columns", "customWidgetDefaultValue", "dimensions", "disabled", "elementHeight", "elementTemplate", "elementWidth", "getElementValue", "indexerHeight", "indexerWidth", "locale", "localizeFormatFunction", "messages", "readonly", "rows", "setElementValue", "showHorizontalScrollbar", "showIndexDisplay", "showSelection", "showVerticalScrollbar", "theme", "type", "unfocusable", "value"];
353
- }
354
- // Gets the events of the React component.
355
- get eventListeners() {
356
- return ["onArraySizeChange", "onChange", "onDimensionChange", "onElementClick", "onScroll", "onSizeChange", "onCreate", "onReady"];
357
- }
358
- /** Adds a dimension to the array. Note: when adding multiple dimensions simultaneously, it is recommended to do so by dynamically setting the dimensions property.
359
- */
360
- addDimension() {
361
- if (this.nativeElement.isRendered) {
362
- this.nativeElement.addDimension();
363
- }
364
- else {
365
- this.nativeElement.whenRendered(() => {
366
- this.nativeElement.addDimension();
367
- });
368
- }
369
- }
370
- /** Clears the selection.
371
- */
372
- clearSelection() {
373
- if (this.nativeElement.isRendered) {
374
- this.nativeElement.clearSelection();
375
- }
376
- else {
377
- this.nativeElement.whenRendered(() => {
378
- this.nativeElement.clearSelection();
379
- });
380
- }
381
- }
382
- /** Copies the value of an Array element to the clipboard.
383
- * @param {number} Rowvisibleindex. The visible index of the row (y coordinate) of the element.
384
- * @param {number} Columnvisibleindex. The visible index of the column (x coordinate) of the element.
385
- */
386
- copyElementValueToClipboard(Rowvisibleindex, Columnvisibleindex) {
387
- if (this.nativeElement.isRendered) {
388
- this.nativeElement.copyElementValueToClipboard(Rowvisibleindex, Columnvisibleindex);
389
- }
390
- else {
391
- this.nativeElement.whenRendered(() => {
392
- this.nativeElement.copyElementValueToClipboard(Rowvisibleindex, Columnvisibleindex);
393
- });
394
- }
395
- }
396
- /** Deletes a column in the value array.
397
- * @param {number} Columnindex. Index of the column to be deleted.
398
- */
399
- deleteColumn(Columnindex) {
400
- if (this.nativeElement.isRendered) {
401
- this.nativeElement.deleteColumn(Columnindex);
402
- }
403
- else {
404
- this.nativeElement.whenRendered(() => {
405
- this.nativeElement.deleteColumn(Columnindex);
406
- });
407
- }
408
- }
409
- /** Deletes a row in the value array.
410
- * @param {number} Rowindex. Index of the row to be deleted.
411
- */
412
- deleteRow(Rowindex) {
413
- if (this.nativeElement.isRendered) {
414
- this.nativeElement.deleteRow(Rowindex);
415
- }
416
- else {
417
- this.nativeElement.whenRendered(() => {
418
- this.nativeElement.deleteRow(Rowindex);
419
- });
420
- }
421
- }
422
- /** Empties the value array.
423
- */
424
- emptyArray() {
425
- if (this.nativeElement.isRendered) {
426
- this.nativeElement.emptyArray();
427
- }
428
- else {
429
- this.nativeElement.whenRendered(() => {
430
- this.nativeElement.emptyArray();
431
- });
432
- }
433
- }
434
- /** Designates the end of a selection started with the method startSelection.
435
- * @param {number} Rowboundindex. The bound index of the row (y coordinate) to end the selection to.
436
- * @param {number} Columnboundindex. The bound index of the column (x coordinate) to end the selection to.
437
- */
438
- endSelection(Rowboundindex, Columnboundindex) {
439
- if (this.nativeElement.isRendered) {
440
- this.nativeElement.endSelection(Rowboundindex, Columnboundindex);
441
- }
442
- else {
443
- this.nativeElement.whenRendered(() => {
444
- this.nativeElement.endSelection(Rowboundindex, Columnboundindex);
445
- });
446
- }
447
- }
448
- /** Returns the HTML element at the specified visible row and column coordinates of the Array.
449
- * @param {number} RowVisibleIndex. The visible index of the row (y coordinate) of the element.
450
- * @param {number} ColumnVisibleIndex. The visible index of the column (x coordinate) of the element.
451
- * @returns {HTMLElement}
452
- */
453
- getElement(RowVisibleIndex, ColumnVisibleIndex) {
454
- return __awaiter(this, void 0, void 0, function* () {
455
- const getResultOnRender = () => {
456
- return new Promise(resolve => {
457
- this.nativeElement.whenRendered(() => {
458
- const result = this.nativeElement.getElement(RowVisibleIndex, ColumnVisibleIndex);
459
- resolve(result);
460
- });
461
- });
462
- };
463
- const result = yield getResultOnRender();
464
- return result;
465
- });
466
- }
467
- /** Returns an object with the values of the Array element width and height.
468
- * @returns {any}
469
- */
470
- getElementSize() {
471
- return __awaiter(this, void 0, void 0, function* () {
472
- const getResultOnRender = () => {
473
- return new Promise(resolve => {
474
- this.nativeElement.whenRendered(() => {
475
- const result = this.nativeElement.getElementSize();
476
- resolve(result);
477
- });
478
- });
479
- };
480
- const result = yield getResultOnRender();
481
- return result;
482
- });
483
- }
484
- /** Gets an array with the values of all indexers.
485
- * @returns {any[]}
486
- */
487
- getIndexerValue() {
488
- return __awaiter(this, void 0, void 0, function* () {
489
- const getResultOnRender = () => {
490
- return new Promise(resolve => {
491
- this.nativeElement.whenRendered(() => {
492
- const result = this.nativeElement.getIndexerValue();
493
- resolve(result);
494
- });
495
- });
496
- };
497
- const result = yield getResultOnRender();
498
- return result;
499
- });
500
- }
501
- /** Returns an HTML element from the Array at the specified page coordinates and other information about this element.
502
- * @param {number} Pagexcoordinate.
503
- * @param {number} Pageycoordinate.
504
- * @returns {any}
505
- */
506
- hitTest(Pagexcoordinate, Pageycoordinate) {
507
- return __awaiter(this, void 0, void 0, function* () {
508
- const getResultOnRender = () => {
509
- return new Promise(resolve => {
510
- this.nativeElement.whenRendered(() => {
511
- const result = this.nativeElement.hitTest(Pagexcoordinate, Pageycoordinate);
512
- resolve(result);
513
- });
514
- });
515
- };
516
- const result = yield getResultOnRender();
517
- return result;
518
- });
519
- }
520
- /** Inserts a column in the value array before the specified column. The new column is filled with default values.
521
- * @param {number} Columnindex. Index of the column to add a new column before.
522
- */
523
- insertColumnBefore(Columnindex) {
524
- if (this.nativeElement.isRendered) {
525
- this.nativeElement.insertColumnBefore(Columnindex);
526
- }
527
- else {
528
- this.nativeElement.whenRendered(() => {
529
- this.nativeElement.insertColumnBefore(Columnindex);
530
- });
531
- }
532
- }
533
- /** Inserts a row in the value array before the specified row. The new row is filled with default values.
534
- * @param {number} Rowindex. Index of the row to add a new row before.
535
- */
536
- insertRowBefore(Rowindex) {
537
- if (this.nativeElement.isRendered) {
538
- this.nativeElement.insertRowBefore(Rowindex);
539
- }
540
- else {
541
- this.nativeElement.whenRendered(() => {
542
- this.nativeElement.insertRowBefore(Rowindex);
543
- });
544
- }
545
- }
546
- /** Sets all value array members to the default value.
547
- */
548
- reinitializeArray() {
549
- if (this.nativeElement.isRendered) {
550
- this.nativeElement.reinitializeArray();
551
- }
552
- else {
553
- this.nativeElement.whenRendered(() => {
554
- this.nativeElement.reinitializeArray();
555
- });
556
- }
557
- }
558
- /** Removes a dimension from the array. Note: when removing multiple dimensions simultaneously, it is recommended to do so by dynamically setting the dimensions property.
559
- */
560
- removeDimension() {
561
- if (this.nativeElement.isRendered) {
562
- this.nativeElement.removeDimension();
563
- }
564
- else {
565
- this.nativeElement.whenRendered(() => {
566
- this.nativeElement.removeDimension();
567
- });
568
- }
569
- }
570
- /** Sets the array's type to 'none'.
571
- */
572
- reset() {
573
- if (this.nativeElement.isRendered) {
574
- this.nativeElement.reset();
575
- }
576
- else {
577
- this.nativeElement.whenRendered(() => {
578
- this.nativeElement.reset();
579
- });
580
- }
581
- }
582
- /** Resizes Array elements (changes both the column width and the row height).
583
- * @param {number} Elementwidth. The new element (column) width.
584
- * @param {number} Elementheight. The new element (row) height.
585
- */
586
- resizeElement(Elementwidth, Elementheight) {
587
- if (this.nativeElement.isRendered) {
588
- this.nativeElement.resizeElement(Elementwidth, Elementheight);
589
- }
590
- else {
591
- this.nativeElement.whenRendered(() => {
592
- this.nativeElement.resizeElement(Elementwidth, Elementheight);
593
- });
594
- }
595
- }
596
- /** Selects all members of the array.
597
- */
598
- selectAll() {
599
- if (this.nativeElement.isRendered) {
600
- this.nativeElement.selectAll();
601
- }
602
- else {
603
- this.nativeElement.whenRendered(() => {
604
- this.nativeElement.selectAll();
605
- });
606
- }
607
- }
608
- /** Selects an element with the passed row and column bound indexes.
609
- * @param {number} Rowboundindex.
610
- * @param {number} Columnboundindex.
611
- */
612
- selectElement(Rowboundindex, Columnboundindex) {
613
- if (this.nativeElement.isRendered) {
614
- this.nativeElement.selectElement(Rowboundindex, Columnboundindex);
615
- }
616
- else {
617
- this.nativeElement.whenRendered(() => {
618
- this.nativeElement.selectElement(Rowboundindex, Columnboundindex);
619
- });
620
- }
621
- }
622
- /** Sets the column (element) width.
623
- * @param {number} Columnwidth. The new column width.
624
- */
625
- setColumnWidth(Columnwidth) {
626
- if (this.nativeElement.isRendered) {
627
- this.nativeElement.setColumnWidth(Columnwidth);
628
- }
629
- else {
630
- this.nativeElement.whenRendered(() => {
631
- this.nativeElement.setColumnWidth(Columnwidth);
632
- });
633
- }
634
- }
635
- /** Sets the default value of array members.
636
- * @param {any} Defaultvalue. The new default value. Its data type should correspond to the <strong>type</strong> of the Array.
637
- */
638
- setDefaultValue(Defaultvalue) {
639
- if (this.nativeElement.isRendered) {
640
- this.nativeElement.setDefaultValue(Defaultvalue);
641
- }
642
- else {
643
- this.nativeElement.whenRendered(() => {
644
- this.nativeElement.setDefaultValue(Defaultvalue);
645
- });
646
- }
647
- }
648
- /** Sets the value of one or more Array indexers.
649
- * @param {any[]} Settings. An array of objects with the fields index and value.
650
- */
651
- setIndexerValue(Settings) {
652
- if (this.nativeElement.isRendered) {
653
- this.nativeElement.setIndexerValue(Settings);
654
- }
655
- else {
656
- this.nativeElement.whenRendered(() => {
657
- this.nativeElement.setIndexerValue(Settings);
658
- });
659
- }
660
- }
661
- /** Sets the row (element) height.
662
- * @param {number} Rowheight. The new row height.
663
- */
664
- setRowHeight(Rowheight) {
665
- if (this.nativeElement.isRendered) {
666
- this.nativeElement.setRowHeight(Rowheight);
667
- }
668
- else {
669
- this.nativeElement.whenRendered(() => {
670
- this.nativeElement.setRowHeight(Rowheight);
671
- });
672
- }
673
- }
674
- /** Makes the last array member visible.
675
- */
676
- showLastElement() {
677
- if (this.nativeElement.isRendered) {
678
- this.nativeElement.showLastElement();
679
- }
680
- else {
681
- this.nativeElement.whenRendered(() => {
682
- this.nativeElement.showLastElement();
683
- });
684
- }
685
- }
686
- /** Designates the start of a selection. To end a selection, call endSelection.
687
- * @param {number} Rowboundindex. The bound index of the row (y coordinate) to start the selection from.
688
- * @param {number} Columnboundindex. The bound index of the column (x coordinate) to start the selection from.
689
- */
690
- startSelection(Rowboundindex, Columnboundindex) {
691
- if (this.nativeElement.isRendered) {
692
- this.nativeElement.startSelection(Rowboundindex, Columnboundindex);
693
- }
694
- else {
695
- this.nativeElement.whenRendered(() => {
696
- this.nativeElement.startSelection(Rowboundindex, Columnboundindex);
697
- });
698
- }
699
- }
700
- /** Increases or decreases the visual gap between Array elements.
701
- */
702
- toggleElementGap() {
703
- if (this.nativeElement.isRendered) {
704
- this.nativeElement.toggleElementGap();
705
- }
706
- else {
707
- this.nativeElement.whenRendered(() => {
708
- this.nativeElement.toggleElementGap();
709
- });
710
- }
711
- }
712
- /** Transposes the array. Applicable only when dimensions is 2 (2D array).
713
- */
714
- transposeArray() {
715
- if (this.nativeElement.isRendered) {
716
- this.nativeElement.transposeArray();
717
- }
718
- else {
719
- this.nativeElement.whenRendered(() => {
720
- this.nativeElement.transposeArray();
721
- });
722
- }
723
- }
724
- /** Sets or gets the value of the whole array or sets the value of a member of the array.
725
- * @param {any} Newvalue?. If the method is used for setting the value of the whole array, the expected value is an array. If it is used for setting the value of an array member, the value can be of any applicable type.
726
- * @param {number | number[]} Elementindexes?. If this parameter is passed, only the value of the array member with the provided dimension indexes is set. Dimension indexes that are not passed are considered to be 0.
727
- * @returns {any[]}
728
- */
729
- val(Newvalue, Elementindexes) {
730
- return __awaiter(this, void 0, void 0, function* () {
731
- const getResultOnRender = () => {
732
- return new Promise(resolve => {
733
- this.nativeElement.whenRendered(() => {
734
- const result = this.nativeElement.val(Newvalue, Elementindexes);
735
- resolve(result);
736
- });
737
- });
738
- };
739
- const result = yield getResultOnRender();
740
- return result;
741
- });
742
- }
743
- componentDidRender(initialize) {
744
- const that = this;
745
- const props = {};
746
- const events = {};
747
- let styles = null;
748
- for (let prop in that.props) {
749
- if (prop === 'children') {
750
- continue;
751
- }
752
- if (prop === 'style') {
753
- styles = that.props[prop];
754
- continue;
755
- }
756
- if (prop.startsWith('on') && that.properties.indexOf(prop) === -1) {
757
- events[prop] = that.props[prop];
758
- continue;
759
- }
760
- props[prop] = that.props[prop];
761
- }
762
- if (initialize) {
763
- that.nativeElement = this.componentRef.current;
764
- }
765
- for (let prop in props) {
766
- if (prop === 'class' || prop === 'className') {
767
- const classNames = props[prop].trim().split(' ');
768
- for (let className in classNames) {
769
- if (!that.nativeElement.classList.contains(classNames[className]) && classNames[className] !== "") {
770
- that.nativeElement.classList.add(classNames[className]);
771
- }
772
- }
773
- continue;
774
- }
775
- if (props[prop] !== that.nativeElement[prop]) {
776
- const normalizeProp = (str) => {
777
- return str.replace(/-([a-z])/g, function (g) {
778
- return g[1].toUpperCase();
779
- });
780
- };
781
- if (prop === 'hover' || prop === 'active' || prop === 'focus' || prop === 'selected') {
782
- that.nativeElement.setAttribute(prop, '');
783
- }
784
- const normalizedProp = normalizeProp(prop);
785
- that.nativeElement[normalizedProp] = props[prop];
786
- }
787
- }
788
- for (let eventName in events) {
789
- that[eventName] = events[eventName];
790
- that.nativeElement[eventName.toLowerCase()] = events[eventName];
791
- }
792
- if (initialize) {
793
- Smart.Render();
794
- if (that.onCreate) {
795
- that.onCreate();
796
- }
797
- that.nativeElement.whenRendered(() => {
798
- if (that.onReady) {
799
- that.onReady();
800
- }
801
- });
802
- }
803
- // setup styles.
804
- if (styles) {
805
- for (let styleName in styles) {
806
- that.nativeElement.style[styleName] = styles[styleName];
807
- }
808
- }
809
- }
810
- componentDidMount() {
811
- this.componentDidRender(true);
812
- }
813
- componentDidUpdate() {
814
- this.componentDidRender(false);
815
- }
816
- componentWillUnmount() {
817
- const that = this;
818
- if (!that.nativeElement) {
819
- return;
820
- }
821
- that.nativeElement.whenRenderedCallbacks = [];
822
- for (let i = 0; i < that.eventListeners.length; i++) {
823
- const eventName = that.eventListeners[i];
824
- that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
825
- }
826
- }
827
- render() {
828
- return (React.createElement("smart-array", { ref: this.componentRef }, this.props.children));
829
- }
830
- }
757
+ exports.Smart = Smart;
758
+ exports.Array = Array;
759
+ exports.default = Array;
831
760
 
832
- exports.Smart = Smart;
833
- exports.Array = Array$1;
834
- exports.default = Array$1;
835
-
836
- Object.defineProperty(exports, '__esModule', { value: true });
761
+ Object.defineProperty(exports, '__esModule', { value: true });
837
762
 
838
763
  })));