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,1429 +2,1344 @@
2
2
  require('../source/modules/smart.kanban');
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.kanban = {}),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.kanban = {}),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
+ Kanban represents a kanban board that visually depicts work at various stages of a process using cards to represent tasks and columns to represent each stage of the process.
15
+ */
16
+ class Kanban 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 = 'Kanban' + Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
25
+ }
26
+ return this._id;
27
+ }
28
+ /** Enables or disables column reordering. When this property is set to true and allowDrag is enabled, users will be able to reoder columns through drag & drop. For example: Click and drag the first column's header and drop it over another column.
29
+ * Property type: boolean
30
+ */
31
+ get allowColumnReorder() {
32
+ return this.nativeElement ? this.nativeElement.allowColumnReorder : undefined;
33
+ }
34
+ set allowColumnReorder(value) {
35
+ if (this.nativeElement) {
36
+ this.nativeElement.allowColumnReorder = value;
37
+ }
38
+ }
39
+ /** Enables or disables column editing. When this property is set to true, users will be able to dynamically change the column's header label by double clicking on it.
40
+ * Property type: boolean
41
+ */
42
+ get allowColumnEdit() {
43
+ return this.nativeElement ? this.nativeElement.allowColumnEdit : undefined;
44
+ }
45
+ set allowColumnEdit(value) {
46
+ if (this.nativeElement) {
47
+ this.nativeElement.allowColumnEdit = value;
48
+ }
49
+ }
50
+ /** Enables or disables column removing. When this property is set to true, users will be able to dynamically remove a column through the column actions menu. the 'columnActions' property should be true.
51
+ * Property type: boolean
52
+ */
53
+ get allowColumnRemove() {
54
+ return this.nativeElement ? this.nativeElement.allowColumnRemove : undefined;
55
+ }
56
+ set allowColumnRemove(value) {
57
+ if (this.nativeElement) {
58
+ this.nativeElement.allowColumnRemove = value;
59
+ }
60
+ }
61
+ /** Enables or disables column hiding. When this property is set to true, users will be able to dynamically hide a column through the column actions menu. the 'columnActions' property should be true.
62
+ * Property type: boolean
63
+ */
64
+ get allowColumnHide() {
65
+ return this.nativeElement ? this.nativeElement.allowColumnHide : undefined;
66
+ }
67
+ set allowColumnHide(value) {
68
+ if (this.nativeElement) {
69
+ this.nativeElement.allowColumnHide = value;
70
+ }
71
+ }
72
+ /** Toggles the visibility of the column buttons for adding tasks. A particular button can be disabled by setting addNewButton in the column's definition to false.
73
+ * Property type: boolean
74
+ */
75
+ get addNewButton() {
76
+ return this.nativeElement ? this.nativeElement.addNewButton : undefined;
77
+ }
78
+ set addNewButton(value) {
79
+ if (this.nativeElement) {
80
+ this.nativeElement.addNewButton = value;
81
+ }
82
+ }
83
+ /** Determines whether the add button is visible in the column header and/or after the tasks in the column.
84
+ * Property type: KanbanAddNewButtonDisplayMode | string
85
+ */
86
+ get addNewButtonDisplayMode() {
87
+ return this.nativeElement ? this.nativeElement.addNewButtonDisplayMode : undefined;
88
+ }
89
+ set addNewButtonDisplayMode(value) {
90
+ if (this.nativeElement) {
91
+ this.nativeElement.addNewButtonDisplayMode = value;
92
+ }
93
+ }
94
+ /** Sets or gets whether a column with a button for adding new status columns to the Kanban will be displayed.
95
+ * Property type: boolean
96
+ */
97
+ get addNewColumn() {
98
+ return this.nativeElement ? this.nativeElement.addNewColumn : undefined;
99
+ }
100
+ set addNewColumn(value) {
101
+ if (this.nativeElement) {
102
+ this.nativeElement.addNewColumn = value;
103
+ }
104
+ }
105
+ /** Sets the width of the add new column. The property is used, if the 'columnWidth' property is set, too. It specifies the width of the dynamic new column.
106
+ * Property type: number | null
107
+ */
108
+ get addNewColumnWidth() {
109
+ return this.nativeElement ? this.nativeElement.addNewColumnWidth : undefined;
110
+ }
111
+ set addNewColumnWidth(value) {
112
+ if (this.nativeElement) {
113
+ this.nativeElement.addNewColumnWidth = value;
114
+ }
115
+ }
116
+ /** Allows the dragging of tasks.
117
+ * Property type: boolean
118
+ */
119
+ get allowDrag() {
120
+ return this.nativeElement ? this.nativeElement.allowDrag : undefined;
121
+ }
122
+ set allowDrag(value) {
123
+ if (this.nativeElement) {
124
+ this.nativeElement.allowDrag = value;
125
+ }
126
+ }
127
+ /** Allows the dropping of tasks.
128
+ * Property type: boolean
129
+ */
130
+ get allowDrop() {
131
+ return this.nativeElement ? this.nativeElement.allowDrop : undefined;
132
+ }
133
+ set allowDrop(value) {
134
+ if (this.nativeElement) {
135
+ this.nativeElement.allowDrop = value;
136
+ }
137
+ }
138
+ /** This property changes the visual appeal of the Kanban columns and tasks. When set to true and the Kanban columns have their 'color' property set, the color is also applied to the tasks and edit dialog.
139
+ * Property type: boolean
140
+ */
141
+ get applyColumnColorToTasks() {
142
+ return this.nativeElement ? this.nativeElement.applyColumnColorToTasks : undefined;
143
+ }
144
+ set applyColumnColorToTasks(value) {
145
+ if (this.nativeElement) {
146
+ this.nativeElement.applyColumnColorToTasks = value;
147
+ }
148
+ }
149
+ /** Enables or disables auto load state from the browser's localStorage. Information about tasks and their position and selected state, filtering, sorting, collapsed columns, as well as the values of the properties taskActions, taskComments, taskDue, taskPriority, taskProgress, taskTags, and taskUserIcon is loaded.
150
+ * Property type: boolean
151
+ */
152
+ get autoLoadState() {
153
+ return this.nativeElement ? this.nativeElement.autoLoadState : undefined;
154
+ }
155
+ set autoLoadState(value) {
156
+ if (this.nativeElement) {
157
+ this.nativeElement.autoLoadState = value;
158
+ }
159
+ }
160
+ /** Enables or disables auto save state to the browser's localStorage. Information about tasks and their position and selected state, filtering, sorting, collapsed columns, as well as the values of the properties taskActions, taskComments, taskDue, taskPriority, taskProgress, taskTags, and taskUserIcon is saved.
161
+ * Property type: boolean
162
+ */
163
+ get autoSaveState() {
164
+ return this.nativeElement ? this.nativeElement.autoSaveState : undefined;
165
+ }
166
+ set autoSaveState(value) {
167
+ if (this.nativeElement) {
168
+ this.nativeElement.autoSaveState = value;
169
+ }
170
+ }
171
+ /** Automatically updates the columns height depending on the tasks inside the column. The effect of this property is observed when 'columnColorEntireSurface' is true.
172
+ * Property type: boolean
173
+ */
174
+ get autoColumnHeight() {
175
+ return this.nativeElement ? this.nativeElement.autoColumnHeight : undefined;
176
+ }
177
+ set autoColumnHeight(value) {
178
+ if (this.nativeElement) {
179
+ this.nativeElement.autoColumnHeight = value;
180
+ }
181
+ }
182
+ /** Allows collapsing the card content.
183
+ * Property type: boolean
184
+ */
185
+ get collapsible() {
186
+ return this.nativeElement ? this.nativeElement.collapsible : undefined;
187
+ }
188
+ set collapsible(value) {
189
+ if (this.nativeElement) {
190
+ this.nativeElement.collapsible = value;
191
+ }
192
+ }
193
+ /** Displays colors in the column header, when the column's color property is set.
194
+ * Property type: boolean
195
+ */
196
+ get columnColors() {
197
+ return this.nativeElement ? this.nativeElement.columnColors : undefined;
198
+ }
199
+ set columnColors(value) {
200
+ if (this.nativeElement) {
201
+ this.nativeElement.columnColors = value;
202
+ }
203
+ }
204
+ /** Sets the Kanban columns width. When this property is set, the kanban columns width is set and a horizontal scrollbar may appear.
205
+ * Property type: number | null
206
+ */
207
+ get columnWidth() {
208
+ return this.nativeElement ? this.nativeElement.columnWidth : undefined;
209
+ }
210
+ set columnWidth(value) {
211
+ if (this.nativeElement) {
212
+ this.nativeElement.columnWidth = value;
213
+ }
214
+ }
215
+ /** Displays background in the Kanban column.
216
+ * Property type: boolean
217
+ */
218
+ get columnColorEntireSurface() {
219
+ return this.nativeElement ? this.nativeElement.columnColorEntireSurface : undefined;
220
+ }
221
+ set columnColorEntireSurface(value) {
222
+ if (this.nativeElement) {
223
+ this.nativeElement.columnColorEntireSurface = value;
224
+ }
225
+ }
226
+ /** Displays a column footer which shows the summary of the column.
227
+ * Property type: boolean
228
+ */
229
+ get columnFooter() {
230
+ return this.nativeElement ? this.nativeElement.columnFooter : undefined;
231
+ }
232
+ set columnFooter(value) {
233
+ if (this.nativeElement) {
234
+ this.nativeElement.columnFooter = value;
235
+ }
236
+ }
237
+ /** Describes the columns properties.
238
+ * Property type: KanbanColumn[]
239
+ */
240
+ get columns() {
241
+ return this.nativeElement ? this.nativeElement.columns : undefined;
242
+ }
243
+ set columns(value) {
244
+ if (this.nativeElement) {
245
+ this.nativeElement.columns = value;
246
+ }
247
+ }
248
+ /** Toggles the visibility of the column actions icon.
249
+ * Property type: boolean
250
+ */
251
+ get columnActions() {
252
+ return this.nativeElement ? this.nativeElement.columnActions : undefined;
253
+ }
254
+ set columnActions(value) {
255
+ if (this.nativeElement) {
256
+ this.nativeElement.columnActions = value;
257
+ }
258
+ }
259
+ /** Determines whether task count information is displayed in column headers.
260
+ * Property type: boolean
261
+ */
262
+ get columnSummary() {
263
+ return this.nativeElement ? this.nativeElement.columnSummary : undefined;
264
+ }
265
+ set columnSummary(value) {
266
+ if (this.nativeElement) {
267
+ this.nativeElement.columnSummary = value;
268
+ }
269
+ }
270
+ /** Determines whether a column header has a template. You can pass 'string', 'function' or HTMLTemplateElement as a value.
271
+ * Property type: any
272
+ */
273
+ get columnHeaderTemplate() {
274
+ return this.nativeElement ? this.nativeElement.columnHeaderTemplate : undefined;
275
+ }
276
+ set columnHeaderTemplate(value) {
277
+ if (this.nativeElement) {
278
+ this.nativeElement.columnHeaderTemplate = value;
279
+ }
280
+ }
281
+ /** Determines the column edit behavior. With the 'header' option, edit starts on double click on the column's label. In 'menu' mode, edit is allowed from the 'columnActions' menu. In 'headerAndMenu' option, column editing includes both options.
282
+ * Property type: KanbanColumnEditMode | string
283
+ */
284
+ get columnEditMode() {
285
+ return this.nativeElement ? this.nativeElement.columnEditMode : undefined;
286
+ }
287
+ set columnEditMode(value) {
288
+ if (this.nativeElement) {
289
+ this.nativeElement.columnEditMode = value;
290
+ }
291
+ }
292
+ /** Sets or gets the id of the current user. Has to correspond to the id of an item from the users property/array. Depending on the current user, different privileges are enabled. If no current user is set, privileges depend on the element's properties.
293
+ * Property type: string | number
294
+ */
295
+ get currentUser() {
296
+ return this.nativeElement ? this.nativeElement.currentUser : undefined;
297
+ }
298
+ set currentUser(value) {
299
+ if (this.nativeElement) {
300
+ this.nativeElement.currentUser = value;
301
+ }
302
+ }
303
+ /** Sets or gets whether the default dialog for adding/removing tasks or comments is disabled.
304
+ * Property type: boolean
305
+ */
306
+ get disableDialog() {
307
+ return this.nativeElement ? this.nativeElement.disableDialog : undefined;
308
+ }
309
+ set disableDialog(value) {
310
+ if (this.nativeElement) {
311
+ this.nativeElement.disableDialog = value;
312
+ }
313
+ }
314
+ /** Sets or gets a customization function for the dialog. This function can be used to customize the dialog look or to replace it. The Kanban calls this function with 5 arguments - 'dialog', 'taskOrComment', 'editors', 'purpose' and 'type'. The dialog is the 'smart-window' instance used as a default Kanban dialog. 'taskOrComment' is object which could be Kanban task or comment. 'purpose' could be 'add' or 'edit' and 'type' could be 'task' or 'column' depending on the action.
315
+ * Property type: any
316
+ */
317
+ get dialogCustomizationFunction() {
318
+ return this.nativeElement ? this.nativeElement.dialogCustomizationFunction : undefined;
319
+ }
320
+ set dialogCustomizationFunction(value) {
321
+ if (this.nativeElement) {
322
+ this.nativeElement.dialogCustomizationFunction = value;
323
+ }
324
+ }
325
+ /** Sets or gets a function called when the dialog is rendered. The Kanban calls this function with 6 arguments - 'dialog', 'editors', 'labels', 'tabs', 'layout', 'taskOrComment'. The dialog is the 'smart-window' instance used as a default Kanban dialog. 'taskOrComment' is object which could be Kanban task or comment. 'editors', 'labels', 'tabs' and 'layout' are JSON objects with key which describes the element type and value which is HTML Element.
326
+ * Property type: any
327
+ */
328
+ get dialogRendered() {
329
+ return this.nativeElement ? this.nativeElement.dialogRendered : undefined;
330
+ }
331
+ set dialogRendered(value) {
332
+ if (this.nativeElement) {
333
+ this.nativeElement.dialogRendered = value;
334
+ }
335
+ }
336
+ /** Determines the data source to be visualized in the kanban board.
337
+ * Property type: KanbanDataSource[]
338
+ */
339
+ get dataSource() {
340
+ return this.nativeElement ? this.nativeElement.dataSource : undefined;
341
+ }
342
+ set dataSource(value) {
343
+ if (this.nativeElement) {
344
+ this.nativeElement.dataSource = value;
345
+ }
346
+ }
347
+ /** Determines the the relation (mapping) between the Kanban's default fields (keywords) and the data fields from the data source. Not necessary if both match. Only some of the default mapping can be overwritten.
348
+ * Property type: { checklist: string; color: string; comments: string; dueDate: string; id: string; priority: string; progress: string; startDate: string; status: string; swimlane: string; tags: string; text: string; userId: string; createdUserId: string; upDatedUserId: string; createdDate: Date; upDatedDate: Date;}
349
+ */
350
+ get dataSourceMap() {
351
+ return this.nativeElement ? this.nativeElement.dataSourceMap : undefined;
352
+ }
353
+ set dataSourceMap(value) {
354
+ if (this.nativeElement) {
355
+ this.nativeElement.dataSourceMap = value;
356
+ }
357
+ }
358
+ /** Determines the offset of the drag feedback element from the mouse cursor when dragging tasks. The first member of the array is the horizontal offset and the second one - the vertical offset. If set to 'auto', the offset is based on the mouse position when the dragging started.
359
+ * Property type: boolean
360
+ */
361
+ get dragOffset() {
362
+ return this.nativeElement ? this.nativeElement.dragOffset : undefined;
363
+ }
364
+ set dragOffset(value) {
365
+ if (this.nativeElement) {
366
+ this.nativeElement.dragOffset = value;
367
+ }
368
+ }
369
+ /** Sets or gets whether tasks can be edited (including the assigning of users to tasks).
370
+ * Property type: boolean
371
+ */
372
+ get editable() {
373
+ return this.nativeElement ? this.nativeElement.editable : undefined;
374
+ }
375
+ set editable(value) {
376
+ if (this.nativeElement) {
377
+ this.nativeElement.editable = value;
378
+ }
379
+ }
380
+ /** Sets or gets the format string of the "Due date" label and the "Start date" and "Due date" editors.
381
+ * Property type: string
382
+ */
383
+ get formatStringDate() {
384
+ return this.nativeElement ? this.nativeElement.formatStringDate : undefined;
385
+ }
386
+ set formatStringDate(value) {
387
+ if (this.nativeElement) {
388
+ this.nativeElement.formatStringDate = value;
389
+ }
390
+ }
391
+ /** Sets or gets the format string of comments time stamp.
392
+ * Property type: string
393
+ */
394
+ get formatStringTime() {
395
+ return this.nativeElement ? this.nativeElement.formatStringTime : undefined;
396
+ }
397
+ set formatStringTime(value) {
398
+ if (this.nativeElement) {
399
+ this.nativeElement.formatStringTime = value;
400
+ }
401
+ }
402
+ /** Sets or gets the header position. The header contains the Customize, Filter, Sort, and Search buttons.
403
+ * Property type: KanbanHeaderPosition | string
404
+ */
405
+ get headerPosition() {
406
+ return this.nativeElement ? this.nativeElement.headerPosition : undefined;
407
+ }
408
+ set headerPosition(value) {
409
+ if (this.nativeElement) {
410
+ this.nativeElement.headerPosition = value;
411
+ }
412
+ }
413
+ /** Sets or gets the way column hierarchy is represented.
414
+ * Property type: KanbanHierarchy | string
415
+ */
416
+ get hierarchy() {
417
+ return this.nativeElement ? this.nativeElement.hierarchy : undefined;
418
+ }
419
+ set hierarchy(value) {
420
+ if (this.nativeElement) {
421
+ this.nativeElement.hierarchy = value;
422
+ }
423
+ }
424
+ /** Sets or gets the locale. Used in conjunction with the property messages.
425
+ * Property type: string
426
+ */
427
+ get locale() {
428
+ return this.nativeElement ? this.nativeElement.locale : undefined;
429
+ }
430
+ set locale(value) {
431
+ if (this.nativeElement) {
432
+ this.nativeElement.locale = value;
433
+ }
434
+ }
435
+ /** Sets or gets an object specifying strings used in the widget that can be localized. Used in conjunction with the property locale.
436
+ * Property type: any
437
+ */
438
+ get messages() {
439
+ return this.nativeElement ? this.nativeElement.messages : undefined;
440
+ }
441
+ set messages(value) {
442
+ if (this.nativeElement) {
443
+ this.nativeElement.messages = value;
444
+ }
445
+ }
446
+ /** Callback function which can be used for customizing the tasks rendering. The Kanban calls it with 2 arguments - task html element and task data.
447
+ * Property type: any
448
+ */
449
+ get onTaskRender() {
450
+ return this.nativeElement ? this.nativeElement.onTaskRender : undefined;
451
+ }
452
+ set onTaskRender(value) {
453
+ if (this.nativeElement) {
454
+ this.nativeElement.onTaskRender = value;
455
+ }
456
+ }
457
+ /** Callback function which can be used for customizing the filter items. The function is called with 1 argument - Array of items which will be displayed in the filter drop down. You can modify that array to remove or update items to filter by.
458
+ * Property type: any
459
+ */
460
+ get onFilterPrepare() {
461
+ return this.nativeElement ? this.nativeElement.onFilterPrepare : undefined;
462
+ }
463
+ set onFilterPrepare(value) {
464
+ if (this.nativeElement) {
465
+ this.nativeElement.onFilterPrepare = value;
466
+ }
467
+ }
468
+ /** Callback function which can be used for customizing the sort items. The function is called with 1 argument - Array of items which will be displayed in the sort drop down. You can modify that array to remove or update items to sort by.
469
+ * Property type: any
470
+ */
471
+ get onSortPrepare() {
472
+ return this.nativeElement ? this.nativeElement.onSortPrepare : undefined;
473
+ }
474
+ set onSortPrepare(value) {
475
+ if (this.nativeElement) {
476
+ this.nativeElement.onSortPrepare = value;
477
+ }
478
+ }
479
+ /** Callback function which can be used for customizing the column header rendering. The Kanban calls it with 3 arguments - column header html element and column data and column data field.
480
+ * Property type: any
481
+ */
482
+ get onColumnHeaderRender() {
483
+ return this.nativeElement ? this.nativeElement.onColumnHeaderRender : undefined;
484
+ }
485
+ set onColumnHeaderRender(value) {
486
+ if (this.nativeElement) {
487
+ this.nativeElement.onColumnHeaderRender = value;
488
+ }
489
+ }
490
+ /** Callback function which can be used for customizing the column footer rendering. The Kanban calls it with 3 arguments - column header html element and column data and column data field.
491
+ * Property type: any
492
+ */
493
+ get onColumnFooterRender() {
494
+ return this.nativeElement ? this.nativeElement.onColumnFooterRender : undefined;
495
+ }
496
+ set onColumnFooterRender(value) {
497
+ if (this.nativeElement) {
498
+ this.nativeElement.onColumnFooterRender = value;
499
+ }
500
+ }
501
+ /** Determines selection mode.
502
+ * Property type: KanbanSelectionMode | string
503
+ */
504
+ get selectionMode() {
505
+ return this.nativeElement ? this.nativeElement.selectionMode : undefined;
506
+ }
507
+ set selectionMode(value) {
508
+ if (this.nativeElement) {
509
+ this.nativeElement.selectionMode = value;
510
+ }
511
+ }
512
+ /** Sets or gets whether the tasks history will be stored and displayed in the task dialog.
513
+ * Property type: boolean
514
+ */
515
+ get storeHistory() {
516
+ return this.nativeElement ? this.nativeElement.storeHistory : undefined;
517
+ }
518
+ set storeHistory(value) {
519
+ if (this.nativeElement) {
520
+ this.nativeElement.storeHistory = value;
521
+ }
522
+ }
523
+ /** Sets or gets the task history items that will be stored when storeHistory is enabled.
524
+ * Property type: number
525
+ */
526
+ get storeHistoryItems() {
527
+ return this.nativeElement ? this.nativeElement.storeHistoryItems : undefined;
528
+ }
529
+ set storeHistoryItems(value) {
530
+ if (this.nativeElement) {
531
+ this.nativeElement.storeHistoryItems = value;
532
+ }
533
+ }
534
+ /** Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts.
535
+ * Property type: boolean
536
+ */
537
+ get rightToLeft() {
538
+ return this.nativeElement ? this.nativeElement.rightToLeft : undefined;
539
+ }
540
+ set rightToLeft(value) {
541
+ if (this.nativeElement) {
542
+ this.nativeElement.rightToLeft = value;
543
+ }
544
+ }
545
+ /** Sets or gets whether the edit dialog is displayed in readonly mode. In that mode it shows only the task details, but the editing is disabled. However, if comments are enabled, you will be able to add comments in the dialog.
546
+ * Property type: boolean
547
+ */
548
+ get readonly() {
549
+ return this.nativeElement ? this.nativeElement.readonly : undefined;
550
+ }
551
+ set readonly(value) {
552
+ if (this.nativeElement) {
553
+ this.nativeElement.readonly = value;
554
+ }
555
+ }
556
+ /** Describes the swimlanes in the kanban board. Sub-columns are not applicable when swimlanes are present.
557
+ * Property type: KanbanSwimlane[]
558
+ */
559
+ get swimlanes() {
560
+ return this.nativeElement ? this.nativeElement.swimlanes : undefined;
561
+ }
562
+ set swimlanes(value) {
563
+ if (this.nativeElement) {
564
+ this.nativeElement.swimlanes = value;
565
+ }
566
+ }
567
+ /** Sets or gets the index of the column at which to start the swimlanes.
568
+ * Property type: number
569
+ */
570
+ get swimlanesFrom() {
571
+ return this.nativeElement ? this.nativeElement.swimlanesFrom : undefined;
572
+ }
573
+ set swimlanesFrom(value) {
574
+ if (this.nativeElement) {
575
+ this.nativeElement.swimlanesFrom = value;
576
+ }
577
+ }
578
+ /** Sets or gets the index of the column at which to end the swimlanes. By default, swimlanes end at the last column.
579
+ * Property type: number
580
+ */
581
+ get swimlanesTo() {
582
+ return this.nativeElement ? this.nativeElement.swimlanesTo : undefined;
583
+ }
584
+ set swimlanesTo(value) {
585
+ if (this.nativeElement) {
586
+ this.nativeElement.swimlanesTo = value;
587
+ }
588
+ }
589
+ /** Sets or gets the allowed tags. If no tags are listed, all tags from the data source are allowed.
590
+ * Property type: any[]
591
+ */
592
+ get tags() {
593
+ return this.nativeElement ? this.nativeElement.tags : undefined;
594
+ }
595
+ set tags(value) {
596
+ if (this.nativeElement) {
597
+ this.nativeElement.tags = value;
598
+ }
599
+ }
600
+ /** Toggles the visibility of the task actions icon.
601
+ * Property type: boolean
602
+ */
603
+ get taskActions() {
604
+ return this.nativeElement ? this.nativeElement.taskActions : undefined;
605
+ }
606
+ set taskActions(value) {
607
+ if (this.nativeElement) {
608
+ this.nativeElement.taskActions = value;
609
+ }
610
+ }
611
+ /** Represents a callback function which is called when the task actions menu is created. The task actions element is passed as parameter and allows you to customize the menu. Example: (list) => { list.innerHTML = 'Custom Item'; list.onclick = () => { alert('clicked'); }}
612
+ * Property type: any
613
+ */
614
+ get taskActionsRendered() {
615
+ return this.nativeElement ? this.nativeElement.taskActionsRendered : undefined;
616
+ }
617
+ set taskActionsRendered(value) {
618
+ if (this.nativeElement) {
619
+ this.nativeElement.taskActionsRendered = value;
620
+ }
621
+ }
622
+ /** Toggles the visibility of the task comments icon.
623
+ * Property type: boolean
624
+ */
625
+ get taskComments() {
626
+ return this.nativeElement ? this.nativeElement.taskComments : undefined;
627
+ }
628
+ set taskComments(value) {
629
+ if (this.nativeElement) {
630
+ this.nativeElement.taskComments = value;
631
+ }
632
+ }
633
+ /** Toggles the visibility of the task due icon.
634
+ * Property type: boolean
635
+ */
636
+ get taskDue() {
637
+ return this.nativeElement ? this.nativeElement.taskDue : undefined;
638
+ }
639
+ set taskDue(value) {
640
+ if (this.nativeElement) {
641
+ this.nativeElement.taskDue = value;
642
+ }
643
+ }
644
+ /** Sets or gets whether tasks can be shown in all levels of column hierarchy or only on leaf columns.
645
+ * Property type: KanbanTaskPosition | string
646
+ */
647
+ get taskPosition() {
648
+ return this.nativeElement ? this.nativeElement.taskPosition : undefined;
649
+ }
650
+ set taskPosition(value) {
651
+ if (this.nativeElement) {
652
+ this.nativeElement.taskPosition = value;
653
+ }
654
+ }
655
+ /** Toggles the visibility of the task priority icon (shown when priority is low or high).
656
+ * Property type: boolean
657
+ */
658
+ get taskPriority() {
659
+ return this.nativeElement ? this.nativeElement.taskPriority : undefined;
660
+ }
661
+ set taskPriority(value) {
662
+ if (this.nativeElement) {
663
+ this.nativeElement.taskPriority = value;
664
+ }
665
+ }
666
+ /** Toggles the visibility of task progress bar and the completed sub-tasks label.
667
+ * Property type: boolean
668
+ */
669
+ get taskProgress() {
670
+ return this.nativeElement ? this.nativeElement.taskProgress : undefined;
671
+ }
672
+ set taskProgress(value) {
673
+ if (this.nativeElement) {
674
+ this.nativeElement.taskProgress = value;
675
+ }
676
+ }
677
+ /** Sets the task custom fields displayed in the card. Each array item should have 'dataField', 'label' 'dataType' and optionally 'visible', 'image' and 'cover' properties. The 'dataField' determines the value, the label is displayed as title, 'dataType' is used for formatting and 'visible' determines whether the field will be displayed. If your string represents an image either URL or Base64, set image: true. If you want to display that image as a cover image, set cover:true, too.
678
+ * Property type: any
679
+ */
680
+ get taskCustomFields() {
681
+ return this.nativeElement ? this.nativeElement.taskCustomFields : undefined;
682
+ }
683
+ set taskCustomFields(value) {
684
+ if (this.nativeElement) {
685
+ this.nativeElement.taskCustomFields = value;
686
+ }
687
+ }
688
+ /** The task's background color depends on the task's color property. By default the color is rendered within the task's left border.
689
+ * Property type: boolean
690
+ */
691
+ get taskColorEntireSurface() {
692
+ return this.nativeElement ? this.nativeElement.taskColorEntireSurface : undefined;
693
+ }
694
+ set taskColorEntireSurface(value) {
695
+ if (this.nativeElement) {
696
+ this.nativeElement.taskColorEntireSurface = value;
697
+ }
698
+ }
699
+ /** Displays an input in the task's card for adding dynamically a sub task. The 'taskSubTasks' property should be set to a value different than 'none'.
700
+ * Property type: boolean
701
+ */
702
+ get taskSubTasksInput() {
703
+ return this.nativeElement ? this.nativeElement.taskSubTasksInput : undefined;
704
+ }
705
+ set taskSubTasksInput(value) {
706
+ if (this.nativeElement) {
707
+ this.nativeElement.taskSubTasksInput = value;
708
+ }
709
+ }
710
+ /** Sets the rendering mode of sub tasks. 'none' - default value. Sub tasks are displayed only in the edit dialog. 'onePerRow' - all sub tasks are displayed in the task's card. 'onlyUnfinished' - only tasks which are not completed are displayed in the task's card.
711
+ * Property type: KanbanTaskSubTasks | string
712
+ */
713
+ get taskSubTasks() {
714
+ return this.nativeElement ? this.nativeElement.taskSubTasks : undefined;
715
+ }
716
+ set taskSubTasks(value) {
717
+ if (this.nativeElement) {
718
+ this.nativeElement.taskSubTasks = value;
719
+ }
720
+ }
721
+ /** Toggles the visibility of task tags.
722
+ * Property type: boolean
723
+ */
724
+ get taskTags() {
725
+ return this.nativeElement ? this.nativeElement.taskTags : undefined;
726
+ }
727
+ set taskTags(value) {
728
+ if (this.nativeElement) {
729
+ this.nativeElement.taskTags = value;
730
+ }
731
+ }
732
+ /** Toggles the visibility of the task user icon.
733
+ * Property type: boolean
734
+ */
735
+ get taskUserIcon() {
736
+ return this.nativeElement ? this.nativeElement.taskUserIcon : undefined;
737
+ }
738
+ set taskUserIcon(value) {
739
+ if (this.nativeElement) {
740
+ this.nativeElement.taskUserIcon = value;
741
+ }
742
+ }
743
+ /** Sets or gets a template to be applied to task text. Can be a string beginning with # and referencing the id of a template element on the page. Can also be a function that modifies the task text or the template itself. Finally, it can also be a string that will be parsed.
744
+ * Property type: any
745
+ */
746
+ get textTemplate() {
747
+ return this.nativeElement ? this.nativeElement.textTemplate : undefined;
748
+ }
749
+ set textTemplate(value) {
750
+ if (this.nativeElement) {
751
+ this.nativeElement.textTemplate = value;
752
+ }
753
+ }
754
+ /** Determines the theme. Theme defines the look of the element
755
+ * Property type: string
756
+ */
757
+ get theme() {
758
+ return this.nativeElement ? this.nativeElement.theme : undefined;
759
+ }
760
+ set theme(value) {
761
+ if (this.nativeElement) {
762
+ this.nativeElement.theme = value;
763
+ }
764
+ }
765
+ /** Determines whether the priority list (as defined by the priority property) will be shown when clicking the priority icon. Only applicable if editable privileges are enabled.
766
+ * Property type: boolean
767
+ */
768
+ get priorityList() {
769
+ return this.nativeElement ? this.nativeElement.priorityList : undefined;
770
+ }
771
+ set priorityList(value) {
772
+ if (this.nativeElement) {
773
+ this.nativeElement.priorityList = value;
774
+ }
775
+ }
776
+ /** Determines the priority Kanban tasks can be assigned to. Example: [{label: 'low', value: 'low'}, {label: 'high', value: 'high'}]
777
+ * Property type: KanbanPriority[]
778
+ */
779
+ get priority() {
780
+ return this.nativeElement ? this.nativeElement.priority : undefined;
781
+ }
782
+ set priority(value) {
783
+ if (this.nativeElement) {
784
+ this.nativeElement.priority = value;
785
+ }
786
+ }
787
+ /** Determines whether the user list (as defined by the users property) will be shown when clicking the user icon. Only applicable if editable privileges are enabled.
788
+ * Property type: boolean
789
+ */
790
+ get userList() {
791
+ return this.nativeElement ? this.nativeElement.userList : undefined;
792
+ }
793
+ set userList(value) {
794
+ if (this.nativeElement) {
795
+ this.nativeElement.userList = value;
796
+ }
797
+ }
798
+ /** Determines the users Kanban tasks can be assigned to and their characteristics and privileges.
799
+ * Property type: KanbanUser[]
800
+ */
801
+ get users() {
802
+ return this.nativeElement ? this.nativeElement.users : undefined;
803
+ }
804
+ set users(value) {
805
+ if (this.nativeElement) {
806
+ this.nativeElement.users = value;
807
+ }
808
+ }
809
+ // Gets the properties of the React component.
810
+ get properties() {
811
+ return ["allowColumnReorder", "allowColumnEdit", "allowColumnRemove", "allowColumnHide", "addNewButton", "addNewButtonDisplayMode", "addNewColumn", "addNewColumnWidth", "allowDrag", "allowDrop", "applyColumnColorToTasks", "autoLoadState", "autoSaveState", "autoColumnHeight", "collapsible", "columnColors", "columnWidth", "columnColorEntireSurface", "columnFooter", "columns", "columnActions", "columnSummary", "columnHeaderTemplate", "columnEditMode", "currentUser", "disableDialog", "dialogCustomizationFunction", "dialogRendered", "dataSource", "dataSourceMap", "dragOffset", "editable", "formatStringDate", "formatStringTime", "headerPosition", "hierarchy", "locale", "messages", "onTaskRender", "onFilterPrepare", "onSortPrepare", "onColumnHeaderRender", "onColumnFooterRender", "selectionMode", "storeHistory", "storeHistoryItems", "rightToLeft", "readonly", "swimlanes", "swimlanesFrom", "swimlanesTo", "tags", "taskActions", "taskActionsRendered", "taskComments", "taskDue", "taskPosition", "taskPriority", "taskProgress", "taskCustomFields", "taskColorEntireSurface", "taskSubTasksInput", "taskSubTasks", "taskTags", "taskUserIcon", "textTemplate", "theme", "priorityList", "priority", "userList", "users"];
812
+ }
813
+ // Gets the events of the React component.
814
+ get eventListeners() {
815
+ return ["onChange", "onClose", "onClosing", "onColumnAdd", "onColumnRemove", "onColumnReorder", "onColumnUpdate", "onColumnClick", "onColumnDoubleClick", "onColumnShow", "onColumnHide", "onColumnCollapse", "onColumnExpand", "onCommentAdd", "onCommentRemove", "onCommentUpdate", "onDragEnd", "onDragging", "onDragStart", "onFilter", "onOpen", "onOpening", "onSort", "onTaskBeforeAdd", "onTaskAdd", "onTaskRemove", "onTaskUpdate", "onTaskClick", "onTaskDoubleClick", "onCreate", "onReady"];
816
+ }
817
+ /** Adds filtering. Example: const filterGroup = new Smart.FilterGroup(); const filterObject = filterGroup.createFilter('string', 'Italy', 'contains'); filterGroup.addFilter('and', filterObject); kanban.addFilter([['Country', filterGroup]]);
818
+ * @param {any} filters. Filter information. Example: kanban.addFilter([['Country', filterGroup]]);. Each array item is a sub array with two items - 'dataField' and 'filterGroup' object. The 'dataField' is any valid data field from the data source bound to the Kanban like 'dueDate', 'startDate' or custom fields like 'Country'. Filter conditions which you can use in the expressions: '=', 'EQUAL','<>', 'NOT_EQUAL', '!=', '<', 'LESS_THAN','>', 'GREATER_THAN', '<=', 'LESS_THAN_OR_EQUAL', '>=', 'GREATER_THAN_OR_EQUAL','starts with', 'STARTS_WITH','ends with', 'ENDS_WITH', '', 'EMPTY', 'CONTAINS','DOES_NOT_CONTAIN', 'NULL','NOT_NULL'
819
+ * @param {string} operator?. Logical operator between the filters of different fields. Possible values are: 'and', 'or'.
820
+ */
821
+ addFilter(filters, operator) {
822
+ if (this.nativeElement.isRendered) {
823
+ this.nativeElement.addFilter(filters, operator);
824
+ }
825
+ else {
826
+ this.nativeElement.whenRendered(() => {
827
+ this.nativeElement.addFilter(filters, operator);
828
+ });
829
+ }
830
+ }
831
+ /** Adds sorting. Example: kanban.addSort(['Country'], 'ascending');
832
+ * @param {[] | string} dataFields. The data field(s) to sort by
833
+ * @param {[] | string} orderBy. The sort direction(s) to sort the data field(s) by. Possible values are: 'ascending' and 'descending'.
834
+ */
835
+ addSort(dataFields, orderBy) {
836
+ if (this.nativeElement.isRendered) {
837
+ this.nativeElement.addSort(dataFields, orderBy);
838
+ }
839
+ else {
840
+ this.nativeElement.whenRendered(() => {
841
+ this.nativeElement.addSort(dataFields, orderBy);
842
+ });
843
+ }
844
+ }
845
+ /** Adds a task to a Kanban column. If no data is specified, an empty task is added to the first column.
846
+ * @param {any} data?. An object containing the new task's data
847
+ */
848
+ addTask(data) {
849
+ if (this.nativeElement.isRendered) {
850
+ this.nativeElement.addTask(data);
851
+ }
852
+ else {
853
+ this.nativeElement.whenRendered(() => {
854
+ this.nativeElement.addTask(data);
855
+ });
856
+ }
857
+ }
858
+ /** Adds a column to a Kanban. If no data is specified, an empty column is added.
859
+ * @param {any} data?. An object containing the new column's data
860
+ */
861
+ addColumn(data) {
862
+ if (this.nativeElement.isRendered) {
863
+ this.nativeElement.addColumn(data);
864
+ }
865
+ else {
866
+ this.nativeElement.whenRendered(() => {
867
+ this.nativeElement.addColumn(data);
868
+ });
869
+ }
870
+ }
871
+ /** Begins an edit operation
872
+ * @param {number | string | HTMLElement} task. The task's id or corresponding HTMLElement
873
+ */
874
+ beginEdit(task) {
875
+ if (this.nativeElement.isRendered) {
876
+ this.nativeElement.beginEdit(task);
877
+ }
878
+ else {
879
+ this.nativeElement.whenRendered(() => {
880
+ this.nativeElement.beginEdit(task);
881
+ });
882
+ }
883
+ }
884
+ /** Ends the current edit operation and discards changes
885
+ */
886
+ cancelEdit() {
887
+ if (this.nativeElement.isRendered) {
888
+ this.nativeElement.cancelEdit();
889
+ }
890
+ else {
891
+ this.nativeElement.whenRendered(() => {
892
+ this.nativeElement.cancelEdit();
893
+ });
894
+ }
895
+ }
896
+ /** Closes any open header panel (drop down)
897
+ */
898
+ closePanel() {
899
+ if (this.nativeElement.isRendered) {
900
+ this.nativeElement.closePanel();
901
+ }
902
+ else {
903
+ this.nativeElement.whenRendered(() => {
904
+ this.nativeElement.closePanel();
905
+ });
906
+ }
907
+ }
908
+ /** Collapses a Kanban column.
909
+ * @param {number | string} column. The index or dataField of the column to collapse
910
+ */
911
+ collapse(column) {
912
+ if (this.nativeElement.isRendered) {
913
+ this.nativeElement.collapse(column);
914
+ }
915
+ else {
916
+ this.nativeElement.whenRendered(() => {
917
+ this.nativeElement.collapse(column);
918
+ });
919
+ }
920
+ }
921
+ /** Clears the Kanban's selection.
922
+ */
923
+ clearSelection() {
924
+ if (this.nativeElement.isRendered) {
925
+ this.nativeElement.clearSelection();
926
+ }
927
+ else {
928
+ this.nativeElement.whenRendered(() => {
929
+ this.nativeElement.clearSelection();
930
+ });
931
+ }
932
+ }
933
+ /** Hides a Kanban column.
934
+ * @param {number | string} column. The index or dataField of the column to hide
935
+ */
936
+ hide(column) {
937
+ if (this.nativeElement.isRendered) {
938
+ this.nativeElement.hide(column);
939
+ }
940
+ else {
941
+ this.nativeElement.whenRendered(() => {
942
+ this.nativeElement.hide(column);
943
+ });
944
+ }
945
+ }
946
+ /** Creates a copy of a task in the same column.
947
+ * @param {number | string | HTMLElement} task. The task's id or corresponding HTMLElement
948
+ */
949
+ copyTask(task) {
950
+ if (this.nativeElement.isRendered) {
951
+ this.nativeElement.copyTask(task);
952
+ }
953
+ else {
954
+ this.nativeElement.whenRendered(() => {
955
+ this.nativeElement.copyTask(task);
956
+ });
957
+ }
958
+ }
959
+ /** Ends the current edit operation and saves changes
960
+ */
961
+ endEdit() {
962
+ if (this.nativeElement.isRendered) {
963
+ this.nativeElement.endEdit();
964
+ }
965
+ else {
966
+ this.nativeElement.whenRendered(() => {
967
+ this.nativeElement.endEdit();
968
+ });
969
+ }
970
+ }
971
+ /** Makes sure a task is visible by scrolling to it. If succcessful, the method returns the HTML element of the task.
972
+ * @param {number | string | HTMLElement} task. The task's id or corresponding HTMLElement
973
+ * @returns {HTMLElement}
974
+ */
975
+ ensureVisible(task) {
976
+ const result = this.nativeElement.ensureVisible(task);
977
+ return result;
978
+ }
979
+ /** Expands a Kanban column.
980
+ * @param {number | string} column. The index or dataField of the column to expand
981
+ */
982
+ expand(column) {
983
+ if (this.nativeElement.isRendered) {
984
+ this.nativeElement.expand(column);
985
+ }
986
+ else {
987
+ this.nativeElement.whenRendered(() => {
988
+ this.nativeElement.expand(column);
989
+ });
990
+ }
991
+ }
992
+ /** Expands all Kanban columns.
993
+ */
994
+ expandAll() {
995
+ if (this.nativeElement.isRendered) {
996
+ this.nativeElement.expandAll();
997
+ }
998
+ else {
999
+ this.nativeElement.whenRendered(() => {
1000
+ this.nativeElement.expandAll();
1001
+ });
1002
+ }
1003
+ }
1004
+ /** Exports the Kanban's data.
1005
+ * @param {string} dataFormat. The file format to export to. Supported formats: 'csv', 'html', 'json', 'pdf', 'tsv', 'xlsx', 'xml'.
1006
+ * @param {string} fileName. The name of the file to export to
1007
+ * @param {Function} callback?. A callback function to pass the exported data to (if fileName is not provided)
1008
+ * @returns {any}
1009
+ */
1010
+ exportData(dataFormat, fileName, callback) {
1011
+ const result = this.nativeElement.exportData(dataFormat, fileName, callback);
1012
+ return result;
1013
+ }
1014
+ /** Gets the data of a column. The returned value is a JSON object with the following fields: 'label', 'dataField', 'collapsed', 'collapsible', 'allowRemove', 'editable', 'reorder', 'orientation'.
1015
+ * @param {string} dataField. The column's data field
1016
+ * @returns {any}
1017
+ */
1018
+ getColumn(dataField) {
1019
+ const result = this.nativeElement.getColumn(dataField);
1020
+ return result;
1021
+ }
1022
+ /** Gets the data of a task. The returned value is a JSON object with the following fields: 'checklist', 'id', 'color', 'comments', 'history', 'dueDate', 'startDate', 'priority', 'progress', 'status', 'swimlane', 'tags', 'text', 'description', 'userId', 'createdUserId', 'createdDate', 'updatedUserId', 'updatedDate'
1023
+ * @param {number} id. The task's id
1024
+ * @returns {any}
1025
+ */
1026
+ getTask(id) {
1027
+ const result = this.nativeElement.getTask(id);
1028
+ return result;
1029
+ }
1030
+ /** Gets the selected ids. The returned value is an array. Each item in the array is the 'id' of a selected task.
1031
+ * @param {number} id. The task's id
1032
+ * @returns {any}
1033
+ */
1034
+ getSelectedTasks(id) {
1035
+ const result = this.nativeElement.getSelectedTasks(id);
1036
+ return result;
1037
+ }
1038
+ /** Gets the Kanban's state.
1039
+ * @returns {{ collapsed: {}, dataSource: [], filtering: { filters: [], operator: string }, selection: { selected: [], selectionStart: number | string, selectionInColumn: string, swimlane: string }, sorting: { dataFields: [], dataTypes: [], orderBy: [] }, tabs: [], visibility: { taskActions: boolean, taskComments: boolean, taskDue: boolean, taskPriority: boolean, taskProgress: boolean, taskTags: boolean, taskUserIcon: boolean } }}
1040
+ */
1041
+ getState() {
1042
+ const result = this.nativeElement.getState();
1043
+ return result;
1044
+ }
1045
+ /** Loads the Kanban's state.
1046
+ * @param {{ collapsed: {}, dataSource: [], filtering: { filters: [], operator: string }, selection: { selected: [], selectionStart?: number | string, selectionInColumn: string, swimlane: string }, sorting: { dataFields: [], dataTypes: [], orderBy: [] }, tabs: [], visibility: { taskActions: boolean, taskComments: boolean, taskDue: boolean, taskPriority: boolean, taskProgress: boolean, taskTags: boolean, taskUserIcon: boolean } }} state?. An object returned by one of the methods getState or saveState. If not passed, gets saved state from the browser's localStorage.
1047
+ */
1048
+ loadState(state) {
1049
+ if (this.nativeElement.isRendered) {
1050
+ this.nativeElement.loadState(state);
1051
+ }
1052
+ else {
1053
+ this.nativeElement.whenRendered(() => {
1054
+ this.nativeElement.loadState(state);
1055
+ });
1056
+ }
1057
+ }
1058
+ /** Moves a task to a different column.
1059
+ * @param {number | string | HTMLElement} task. The task's id or corresponding HTMLElement
1060
+ * @param {string} newStatus. The new status of the task (its new column's dataField)
1061
+ */
1062
+ moveTask(task, newStatus) {
1063
+ if (this.nativeElement.isRendered) {
1064
+ this.nativeElement.moveTask(task, newStatus);
1065
+ }
1066
+ else {
1067
+ this.nativeElement.whenRendered(() => {
1068
+ this.nativeElement.moveTask(task, newStatus);
1069
+ });
1070
+ }
1071
+ }
1072
+ /** Opens the "Customize tasks" header panel (drop down)
1073
+ */
1074
+ openCustomizePanel() {
1075
+ if (this.nativeElement.isRendered) {
1076
+ this.nativeElement.openCustomizePanel();
1077
+ }
1078
+ else {
1079
+ this.nativeElement.whenRendered(() => {
1080
+ this.nativeElement.openCustomizePanel();
1081
+ });
1082
+ }
1083
+ }
1084
+ /** Opens the "Filter" header panel (drop down)
1085
+ */
1086
+ openFilterPanel() {
1087
+ if (this.nativeElement.isRendered) {
1088
+ this.nativeElement.openFilterPanel();
1089
+ }
1090
+ else {
1091
+ this.nativeElement.whenRendered(() => {
1092
+ this.nativeElement.openFilterPanel();
1093
+ });
1094
+ }
1095
+ }
1096
+ /** Opens the "Sort" header panel (drop down)
1097
+ */
1098
+ openSortPanel() {
1099
+ if (this.nativeElement.isRendered) {
1100
+ this.nativeElement.openSortPanel();
1101
+ }
1102
+ else {
1103
+ this.nativeElement.whenRendered(() => {
1104
+ this.nativeElement.openSortPanel();
1105
+ });
1106
+ }
1107
+ }
1108
+ /** Removes filtering
1109
+ */
1110
+ removeFilter() {
1111
+ if (this.nativeElement.isRendered) {
1112
+ this.nativeElement.removeFilter();
1113
+ }
1114
+ else {
1115
+ this.nativeElement.whenRendered(() => {
1116
+ this.nativeElement.removeFilter();
1117
+ });
1118
+ }
1119
+ }
1120
+ /** Removes sorting
1121
+ */
1122
+ removeSort() {
1123
+ if (this.nativeElement.isRendered) {
1124
+ this.nativeElement.removeSort();
1125
+ }
1126
+ else {
1127
+ this.nativeElement.whenRendered(() => {
1128
+ this.nativeElement.removeSort();
1129
+ });
1130
+ }
1131
+ }
1132
+ /** Removes a task.
1133
+ * @param {number | string | HTMLElement} task. The task's id or corresponding HTMLElement
1134
+ * @param {boolean} prompt?. Whether or not to prompt the user before removing the task
1135
+ */
1136
+ removeTask(task, prompt) {
1137
+ if (this.nativeElement.isRendered) {
1138
+ this.nativeElement.removeTask(task, prompt);
1139
+ }
1140
+ else {
1141
+ this.nativeElement.whenRendered(() => {
1142
+ this.nativeElement.removeTask(task, prompt);
1143
+ });
1144
+ }
1145
+ }
1146
+ /** Removes a column.
1147
+ * @param {string} dataField. The column's data field
1148
+ */
1149
+ removeColumn(dataField) {
1150
+ if (this.nativeElement.isRendered) {
1151
+ this.nativeElement.removeColumn(dataField);
1152
+ }
1153
+ else {
1154
+ this.nativeElement.whenRendered(() => {
1155
+ this.nativeElement.removeColumn(dataField);
1156
+ });
1157
+ }
1158
+ }
1159
+ /** Saves the Kanban's state to the browser's localStorage.
1160
+ */
1161
+ saveState() {
1162
+ if (this.nativeElement.isRendered) {
1163
+ this.nativeElement.saveState();
1164
+ }
1165
+ else {
1166
+ this.nativeElement.whenRendered(() => {
1167
+ this.nativeElement.saveState();
1168
+ });
1169
+ }
1170
+ }
1171
+ /** Shows a Kanban column.
1172
+ * @param {number | string} column. The index or dataField of the column to show
1173
+ */
1174
+ show(column) {
1175
+ if (this.nativeElement.isRendered) {
1176
+ this.nativeElement.show(column);
1177
+ }
1178
+ else {
1179
+ this.nativeElement.whenRendered(() => {
1180
+ this.nativeElement.show(column);
1181
+ });
1182
+ }
1183
+ }
1184
+ /** Shows all Kanban columns.
1185
+ */
1186
+ showAllColumns() {
1187
+ if (this.nativeElement.isRendered) {
1188
+ this.nativeElement.showAllColumns();
1189
+ }
1190
+ else {
1191
+ this.nativeElement.whenRendered(() => {
1192
+ this.nativeElement.showAllColumns();
1193
+ });
1194
+ }
1195
+ }
1196
+ /** Selects a task.
1197
+ * @param {number | string} task. The task's id.
1198
+ */
1199
+ selectTask(task) {
1200
+ if (this.nativeElement.isRendered) {
1201
+ this.nativeElement.selectTask(task);
1202
+ }
1203
+ else {
1204
+ this.nativeElement.whenRendered(() => {
1205
+ this.nativeElement.selectTask(task);
1206
+ });
1207
+ }
1208
+ }
1209
+ /** Unselects a task.
1210
+ * @param {number | string} task. The task's id.
1211
+ */
1212
+ unselectTask(task) {
1213
+ if (this.nativeElement.isRendered) {
1214
+ this.nativeElement.unselectTask(task);
1215
+ }
1216
+ else {
1217
+ this.nativeElement.whenRendered(() => {
1218
+ this.nativeElement.unselectTask(task);
1219
+ });
1220
+ }
1221
+ }
1222
+ /** Updates a task.
1223
+ * @param {number | string | HTMLElement} task. The task's id or corresponding HTMLElement
1224
+ * @param {{}} newData. The new data to visualize in the task.
1225
+ */
1226
+ updateTask(task, newData) {
1227
+ if (this.nativeElement.isRendered) {
1228
+ this.nativeElement.updateTask(task, newData);
1229
+ }
1230
+ else {
1231
+ this.nativeElement.whenRendered(() => {
1232
+ this.nativeElement.updateTask(task, newData);
1233
+ });
1234
+ }
1235
+ }
1236
+ /** Updates a column.
1237
+ * @param {string} dataField. The new column's data field
1238
+ * @param {{}} newData. The new data to visualize in the column.
1239
+ */
1240
+ updateColumn(dataField, newData) {
1241
+ if (this.nativeElement.isRendered) {
1242
+ this.nativeElement.updateColumn(dataField, newData);
1243
+ }
1244
+ else {
1245
+ this.nativeElement.whenRendered(() => {
1246
+ this.nativeElement.updateColumn(dataField, newData);
1247
+ });
1248
+ }
1249
+ }
1250
+ componentDidRender(initialize) {
1251
+ const that = this;
1252
+ const props = {};
1253
+ const events = {};
1254
+ let styles = null;
1255
+ for (let prop in that.props) {
1256
+ if (prop === 'children') {
1257
+ continue;
1258
+ }
1259
+ if (prop === 'style') {
1260
+ styles = that.props[prop];
1261
+ continue;
1262
+ }
1263
+ if (prop.startsWith('on') && that.properties.indexOf(prop) === -1) {
1264
+ events[prop] = that.props[prop];
1265
+ continue;
1266
+ }
1267
+ props[prop] = that.props[prop];
1268
+ }
1269
+ if (initialize) {
1270
+ that.nativeElement = this.componentRef.current;
1271
+ }
1272
+ for (let prop in props) {
1273
+ if (prop === 'class' || prop === 'className') {
1274
+ const classNames = props[prop].trim().split(' ');
1275
+ for (let className in classNames) {
1276
+ if (!that.nativeElement.classList.contains(classNames[className]) && classNames[className] !== "") {
1277
+ that.nativeElement.classList.add(classNames[className]);
1278
+ }
1279
+ }
1280
+ continue;
1281
+ }
1282
+ if (props[prop] !== that.nativeElement[prop]) {
1283
+ const normalizeProp = (str) => {
1284
+ return str.replace(/-([a-z])/g, function (g) {
1285
+ return g[1].toUpperCase();
1286
+ });
1287
+ };
1288
+ if (prop === 'hover' || prop === 'active' || prop === 'focus' || prop === 'selected') {
1289
+ that.nativeElement.setAttribute(prop, '');
1290
+ }
1291
+ const normalizedProp = normalizeProp(prop);
1292
+ that.nativeElement[normalizedProp] = props[prop];
1293
+ }
1294
+ }
1295
+ for (let eventName in events) {
1296
+ that[eventName] = events[eventName];
1297
+ that.nativeElement[eventName.toLowerCase()] = events[eventName];
1298
+ }
1299
+ if (initialize) {
1300
+ Smart.Render();
1301
+ if (that.onCreate) {
1302
+ that.onCreate();
1303
+ }
1304
+ that.nativeElement.whenRendered(() => {
1305
+ if (that.onReady) {
1306
+ that.onReady();
1307
+ }
1308
+ });
1309
+ }
1310
+ // setup styles.
1311
+ if (styles) {
1312
+ for (let styleName in styles) {
1313
+ that.nativeElement.style[styleName] = styles[styleName];
1314
+ }
1315
+ }
1316
+ }
1317
+ componentDidMount() {
1318
+ this.componentDidRender(true);
1319
+ }
1320
+ componentDidUpdate() {
1321
+ this.componentDidRender(false);
1322
+ }
1323
+ componentWillUnmount() {
1324
+ const that = this;
1325
+ if (!that.nativeElement) {
1326
+ return;
1327
+ }
1328
+ that.nativeElement.whenRenderedCallbacks = [];
1329
+ for (let i = 0; i < that.eventListeners.length; i++) {
1330
+ const eventName = that.eventListeners[i];
1331
+ that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
1332
+ }
1333
+ }
1334
+ render() {
1335
+ return (React.createElement("smart-kanban", { ref: this.componentRef }, this.props.children));
1336
+ }
1337
+ }
36
1338
 
37
- const Smart = window.Smart;
38
- /**
39
- Kanban represents a kanban board that visually depicts work at various stages of a process using cards to represent tasks and columns to represent each stage of the process.
40
- */
41
- class Kanban 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 = 'Kanban' + Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
50
- }
51
- return this._id;
52
- }
53
- /** Enables or disables column reordering. When this property is set to true and allowDrag is enabled, users will be able to reoder columns through drag & drop. For example: Click and drag the first column's header and drop it over another column.
54
- * Property type: boolean
55
- */
56
- get allowColumnReorder() {
57
- return this.nativeElement ? this.nativeElement.allowColumnReorder : undefined;
58
- }
59
- set allowColumnReorder(value) {
60
- if (this.nativeElement) {
61
- this.nativeElement.allowColumnReorder = value;
62
- }
63
- }
64
- /** Enables or disables column editing. When this property is set to true, users will be able to dynamically change the column's header label by double clicking on it.
65
- * Property type: boolean
66
- */
67
- get allowColumnEdit() {
68
- return this.nativeElement ? this.nativeElement.allowColumnEdit : undefined;
69
- }
70
- set allowColumnEdit(value) {
71
- if (this.nativeElement) {
72
- this.nativeElement.allowColumnEdit = value;
73
- }
74
- }
75
- /** Enables or disables column removing. When this property is set to true, users will be able to dynamically remove a column through the column actions menu. the 'columnActions' property should be true.
76
- * Property type: boolean
77
- */
78
- get allowColumnRemove() {
79
- return this.nativeElement ? this.nativeElement.allowColumnRemove : undefined;
80
- }
81
- set allowColumnRemove(value) {
82
- if (this.nativeElement) {
83
- this.nativeElement.allowColumnRemove = value;
84
- }
85
- }
86
- /** Enables or disables column hiding. When this property is set to true, users will be able to dynamically hide a column through the column actions menu. the 'columnActions' property should be true.
87
- * Property type: boolean
88
- */
89
- get allowColumnHide() {
90
- return this.nativeElement ? this.nativeElement.allowColumnHide : undefined;
91
- }
92
- set allowColumnHide(value) {
93
- if (this.nativeElement) {
94
- this.nativeElement.allowColumnHide = value;
95
- }
96
- }
97
- /** Toggles the visibility of the column buttons for adding tasks. A particular button can be disabled by setting addNewButton in the column's definition to false.
98
- * Property type: boolean
99
- */
100
- get addNewButton() {
101
- return this.nativeElement ? this.nativeElement.addNewButton : undefined;
102
- }
103
- set addNewButton(value) {
104
- if (this.nativeElement) {
105
- this.nativeElement.addNewButton = value;
106
- }
107
- }
108
- /** Determines whether the add button is visible in the column header and/or after the tasks in the column.
109
- * Property type: KanbanAddNewButtonDisplayMode | string
110
- */
111
- get addNewButtonDisplayMode() {
112
- return this.nativeElement ? this.nativeElement.addNewButtonDisplayMode : undefined;
113
- }
114
- set addNewButtonDisplayMode(value) {
115
- if (this.nativeElement) {
116
- this.nativeElement.addNewButtonDisplayMode = value;
117
- }
118
- }
119
- /** Sets or gets whether a column with a button for adding new status columns to the Kanban will be displayed.
120
- * Property type: boolean
121
- */
122
- get addNewColumn() {
123
- return this.nativeElement ? this.nativeElement.addNewColumn : undefined;
124
- }
125
- set addNewColumn(value) {
126
- if (this.nativeElement) {
127
- this.nativeElement.addNewColumn = value;
128
- }
129
- }
130
- /** Sets the width of the add new column. The property is used, if the 'columnWidth' property is set, too. It specifies the width of the dynamic new column.
131
- * Property type: number | null
132
- */
133
- get addNewColumnWidth() {
134
- return this.nativeElement ? this.nativeElement.addNewColumnWidth : undefined;
135
- }
136
- set addNewColumnWidth(value) {
137
- if (this.nativeElement) {
138
- this.nativeElement.addNewColumnWidth = value;
139
- }
140
- }
141
- /** Allows the dragging of tasks.
142
- * Property type: boolean
143
- */
144
- get allowDrag() {
145
- return this.nativeElement ? this.nativeElement.allowDrag : undefined;
146
- }
147
- set allowDrag(value) {
148
- if (this.nativeElement) {
149
- this.nativeElement.allowDrag = value;
150
- }
151
- }
152
- /** Allows the dropping of tasks.
153
- * Property type: boolean
154
- */
155
- get allowDrop() {
156
- return this.nativeElement ? this.nativeElement.allowDrop : undefined;
157
- }
158
- set allowDrop(value) {
159
- if (this.nativeElement) {
160
- this.nativeElement.allowDrop = value;
161
- }
162
- }
163
- /** This property changes the visual appeal of the Kanban columns and tasks. When set to true and the Kanban columns have their 'color' property set, the color is also applied to the tasks and edit dialog.
164
- * Property type: boolean
165
- */
166
- get applyColumnColorToTasks() {
167
- return this.nativeElement ? this.nativeElement.applyColumnColorToTasks : undefined;
168
- }
169
- set applyColumnColorToTasks(value) {
170
- if (this.nativeElement) {
171
- this.nativeElement.applyColumnColorToTasks = value;
172
- }
173
- }
174
- /** Enables or disables auto load state from the browser's localStorage. Information about tasks and their position and selected state, filtering, sorting, collapsed columns, as well as the values of the properties taskActions, taskComments, taskDue, taskPriority, taskProgress, taskTags, and taskUserIcon is loaded.
175
- * Property type: boolean
176
- */
177
- get autoLoadState() {
178
- return this.nativeElement ? this.nativeElement.autoLoadState : undefined;
179
- }
180
- set autoLoadState(value) {
181
- if (this.nativeElement) {
182
- this.nativeElement.autoLoadState = value;
183
- }
184
- }
185
- /** Enables or disables auto save state to the browser's localStorage. Information about tasks and their position and selected state, filtering, sorting, collapsed columns, as well as the values of the properties taskActions, taskComments, taskDue, taskPriority, taskProgress, taskTags, and taskUserIcon is saved.
186
- * Property type: boolean
187
- */
188
- get autoSaveState() {
189
- return this.nativeElement ? this.nativeElement.autoSaveState : undefined;
190
- }
191
- set autoSaveState(value) {
192
- if (this.nativeElement) {
193
- this.nativeElement.autoSaveState = value;
194
- }
195
- }
196
- /** Automatically updates the columns height depending on the tasks inside the column. The effect of this property is observed when 'columnColorEntireSurface' is true.
197
- * Property type: boolean
198
- */
199
- get autoColumnHeight() {
200
- return this.nativeElement ? this.nativeElement.autoColumnHeight : undefined;
201
- }
202
- set autoColumnHeight(value) {
203
- if (this.nativeElement) {
204
- this.nativeElement.autoColumnHeight = value;
205
- }
206
- }
207
- /** Allows collapsing the card content.
208
- * Property type: boolean
209
- */
210
- get collapsible() {
211
- return this.nativeElement ? this.nativeElement.collapsible : undefined;
212
- }
213
- set collapsible(value) {
214
- if (this.nativeElement) {
215
- this.nativeElement.collapsible = value;
216
- }
217
- }
218
- /** Displays colors in the column header, when the column's color property is set.
219
- * Property type: boolean
220
- */
221
- get columnColors() {
222
- return this.nativeElement ? this.nativeElement.columnColors : undefined;
223
- }
224
- set columnColors(value) {
225
- if (this.nativeElement) {
226
- this.nativeElement.columnColors = value;
227
- }
228
- }
229
- /** Sets the Kanban columns width. When this property is set, the kanban columns width is set and a horizontal scrollbar may appear.
230
- * Property type: number | null
231
- */
232
- get columnWidth() {
233
- return this.nativeElement ? this.nativeElement.columnWidth : undefined;
234
- }
235
- set columnWidth(value) {
236
- if (this.nativeElement) {
237
- this.nativeElement.columnWidth = value;
238
- }
239
- }
240
- /** Displays background in the Kanban column.
241
- * Property type: boolean
242
- */
243
- get columnColorEntireSurface() {
244
- return this.nativeElement ? this.nativeElement.columnColorEntireSurface : undefined;
245
- }
246
- set columnColorEntireSurface(value) {
247
- if (this.nativeElement) {
248
- this.nativeElement.columnColorEntireSurface = value;
249
- }
250
- }
251
- /** Displays a column footer which shows the summary of the column.
252
- * Property type: boolean
253
- */
254
- get columnFooter() {
255
- return this.nativeElement ? this.nativeElement.columnFooter : undefined;
256
- }
257
- set columnFooter(value) {
258
- if (this.nativeElement) {
259
- this.nativeElement.columnFooter = value;
260
- }
261
- }
262
- /** Describes the columns properties.
263
- * Property type: KanbanColumn[]
264
- */
265
- get columns() {
266
- return this.nativeElement ? this.nativeElement.columns : undefined;
267
- }
268
- set columns(value) {
269
- if (this.nativeElement) {
270
- this.nativeElement.columns = value;
271
- }
272
- }
273
- /** Toggles the visibility of the column actions icon.
274
- * Property type: boolean
275
- */
276
- get columnActions() {
277
- return this.nativeElement ? this.nativeElement.columnActions : undefined;
278
- }
279
- set columnActions(value) {
280
- if (this.nativeElement) {
281
- this.nativeElement.columnActions = value;
282
- }
283
- }
284
- /** Determines whether task count information is displayed in column headers.
285
- * Property type: boolean
286
- */
287
- get columnSummary() {
288
- return this.nativeElement ? this.nativeElement.columnSummary : undefined;
289
- }
290
- set columnSummary(value) {
291
- if (this.nativeElement) {
292
- this.nativeElement.columnSummary = value;
293
- }
294
- }
295
- /** Determines whether a column header has a template. You can pass 'string', 'function' or HTMLTemplateElement as a value.
296
- * Property type: any
297
- */
298
- get columnHeaderTemplate() {
299
- return this.nativeElement ? this.nativeElement.columnHeaderTemplate : undefined;
300
- }
301
- set columnHeaderTemplate(value) {
302
- if (this.nativeElement) {
303
- this.nativeElement.columnHeaderTemplate = value;
304
- }
305
- }
306
- /** Determines the column edit behavior. With the 'header' option, edit starts on double click on the column's label. In 'menu' mode, edit is allowed from the 'columnActions' menu. In 'headerAndMenu' option, column editing includes both options.
307
- * Property type: KanbanColumnEditMode | string
308
- */
309
- get columnEditMode() {
310
- return this.nativeElement ? this.nativeElement.columnEditMode : undefined;
311
- }
312
- set columnEditMode(value) {
313
- if (this.nativeElement) {
314
- this.nativeElement.columnEditMode = value;
315
- }
316
- }
317
- /** Sets or gets the id of the current user. Has to correspond to the id of an item from the users property/array. Depending on the current user, different privileges are enabled. If no current user is set, privileges depend on the element's properties.
318
- * Property type: string | number
319
- */
320
- get currentUser() {
321
- return this.nativeElement ? this.nativeElement.currentUser : undefined;
322
- }
323
- set currentUser(value) {
324
- if (this.nativeElement) {
325
- this.nativeElement.currentUser = value;
326
- }
327
- }
328
- /** Sets or gets whether the default dialog for adding/removing tasks or comments is disabled.
329
- * Property type: boolean
330
- */
331
- get disableDialog() {
332
- return this.nativeElement ? this.nativeElement.disableDialog : undefined;
333
- }
334
- set disableDialog(value) {
335
- if (this.nativeElement) {
336
- this.nativeElement.disableDialog = value;
337
- }
338
- }
339
- /** Sets or gets a customization function for the dialog. This function can be used to customize the dialog look or to replace it. The Kanban calls this function with 5 arguments - 'dialog', 'taskOrComment', 'editors', 'purpose' and 'type'. The dialog is the 'smart-window' instance used as a default Kanban dialog. 'taskOrComment' is object which could be Kanban task or comment. 'purpose' could be 'add' or 'edit' and 'type' could be 'task' or 'column' depending on the action.
340
- * Property type: any
341
- */
342
- get dialogCustomizationFunction() {
343
- return this.nativeElement ? this.nativeElement.dialogCustomizationFunction : undefined;
344
- }
345
- set dialogCustomizationFunction(value) {
346
- if (this.nativeElement) {
347
- this.nativeElement.dialogCustomizationFunction = value;
348
- }
349
- }
350
- /** Sets or gets a function called when the dialog is rendered. The Kanban calls this function with 6 arguments - 'dialog', 'editors', 'labels', 'tabs', 'layout', 'taskOrComment'. The dialog is the 'smart-window' instance used as a default Kanban dialog. 'taskOrComment' is object which could be Kanban task or comment. 'editors', 'labels', 'tabs' and 'layout' are JSON objects with key which describes the element type and value which is HTML Element.
351
- * Property type: any
352
- */
353
- get dialogRendered() {
354
- return this.nativeElement ? this.nativeElement.dialogRendered : undefined;
355
- }
356
- set dialogRendered(value) {
357
- if (this.nativeElement) {
358
- this.nativeElement.dialogRendered = value;
359
- }
360
- }
361
- /** Determines the data source to be visualized in the kanban board.
362
- * Property type: KanbanDataSource[]
363
- */
364
- get dataSource() {
365
- return this.nativeElement ? this.nativeElement.dataSource : undefined;
366
- }
367
- set dataSource(value) {
368
- if (this.nativeElement) {
369
- this.nativeElement.dataSource = value;
370
- }
371
- }
372
- /** Determines the the relation (mapping) between the Kanban's default fields (keywords) and the data fields from the data source. Not necessary if both match. Only some of the default mapping can be overwritten.
373
- * Property type: { checklist: string; color: string; comments: string; dueDate: string; id: string; priority: string; progress: string; startDate: string; status: string; swimlane: string; tags: string; text: string; userId: string; createdUserId: string; upDatedUserId: string; createdDate: Date; upDatedDate: Date;}
374
- */
375
- get dataSourceMap() {
376
- return this.nativeElement ? this.nativeElement.dataSourceMap : undefined;
377
- }
378
- set dataSourceMap(value) {
379
- if (this.nativeElement) {
380
- this.nativeElement.dataSourceMap = value;
381
- }
382
- }
383
- /** Determines the offset of the drag feedback element from the mouse cursor when dragging tasks. The first member of the array is the horizontal offset and the second one - the vertical offset. If set to 'auto', the offset is based on the mouse position when the dragging started.
384
- * Property type: boolean
385
- */
386
- get dragOffset() {
387
- return this.nativeElement ? this.nativeElement.dragOffset : undefined;
388
- }
389
- set dragOffset(value) {
390
- if (this.nativeElement) {
391
- this.nativeElement.dragOffset = value;
392
- }
393
- }
394
- /** Sets or gets whether tasks can be edited (including the assigning of users to tasks).
395
- * Property type: boolean
396
- */
397
- get editable() {
398
- return this.nativeElement ? this.nativeElement.editable : undefined;
399
- }
400
- set editable(value) {
401
- if (this.nativeElement) {
402
- this.nativeElement.editable = value;
403
- }
404
- }
405
- /** Sets or gets the format string of the "Due date" label and the "Start date" and "Due date" editors.
406
- * Property type: string
407
- */
408
- get formatStringDate() {
409
- return this.nativeElement ? this.nativeElement.formatStringDate : undefined;
410
- }
411
- set formatStringDate(value) {
412
- if (this.nativeElement) {
413
- this.nativeElement.formatStringDate = value;
414
- }
415
- }
416
- /** Sets or gets the format string of comments time stamp.
417
- * Property type: string
418
- */
419
- get formatStringTime() {
420
- return this.nativeElement ? this.nativeElement.formatStringTime : undefined;
421
- }
422
- set formatStringTime(value) {
423
- if (this.nativeElement) {
424
- this.nativeElement.formatStringTime = value;
425
- }
426
- }
427
- /** Sets or gets the header position. The header contains the Customize, Filter, Sort, and Search buttons.
428
- * Property type: KanbanHeaderPosition | string
429
- */
430
- get headerPosition() {
431
- return this.nativeElement ? this.nativeElement.headerPosition : undefined;
432
- }
433
- set headerPosition(value) {
434
- if (this.nativeElement) {
435
- this.nativeElement.headerPosition = value;
436
- }
437
- }
438
- /** Sets or gets the way column hierarchy is represented.
439
- * Property type: KanbanHierarchy | string
440
- */
441
- get hierarchy() {
442
- return this.nativeElement ? this.nativeElement.hierarchy : undefined;
443
- }
444
- set hierarchy(value) {
445
- if (this.nativeElement) {
446
- this.nativeElement.hierarchy = value;
447
- }
448
- }
449
- /** Sets or gets the locale. Used in conjunction with the property messages.
450
- * Property type: string
451
- */
452
- get locale() {
453
- return this.nativeElement ? this.nativeElement.locale : undefined;
454
- }
455
- set locale(value) {
456
- if (this.nativeElement) {
457
- this.nativeElement.locale = value;
458
- }
459
- }
460
- /** Sets or gets an object specifying strings used in the widget that can be localized. Used in conjunction with the property locale.
461
- * Property type: any
462
- */
463
- get messages() {
464
- return this.nativeElement ? this.nativeElement.messages : undefined;
465
- }
466
- set messages(value) {
467
- if (this.nativeElement) {
468
- this.nativeElement.messages = value;
469
- }
470
- }
471
- /** Callback function which can be used for customizing the tasks rendering. The Kanban calls it with 2 arguments - task html element and task data.
472
- * Property type: any
473
- */
474
- get onTaskRender() {
475
- return this.nativeElement ? this.nativeElement.onTaskRender : undefined;
476
- }
477
- set onTaskRender(value) {
478
- if (this.nativeElement) {
479
- this.nativeElement.onTaskRender = value;
480
- }
481
- }
482
- /** Callback function which can be used for customizing the filter items. The function is called with 1 argument - Array of items which will be displayed in the filter drop down. You can modify that array to remove or update items to filter by.
483
- * Property type: any
484
- */
485
- get onFilterPrepare() {
486
- return this.nativeElement ? this.nativeElement.onFilterPrepare : undefined;
487
- }
488
- set onFilterPrepare(value) {
489
- if (this.nativeElement) {
490
- this.nativeElement.onFilterPrepare = value;
491
- }
492
- }
493
- /** Callback function which can be used for customizing the sort items. The function is called with 1 argument - Array of items which will be displayed in the sort drop down. You can modify that array to remove or update items to sort by.
494
- * Property type: any
495
- */
496
- get onSortPrepare() {
497
- return this.nativeElement ? this.nativeElement.onSortPrepare : undefined;
498
- }
499
- set onSortPrepare(value) {
500
- if (this.nativeElement) {
501
- this.nativeElement.onSortPrepare = value;
502
- }
503
- }
504
- /** Callback function which can be used for customizing the column header rendering. The Kanban calls it with 3 arguments - column header html element and column data and column data field.
505
- * Property type: any
506
- */
507
- get onColumnHeaderRender() {
508
- return this.nativeElement ? this.nativeElement.onColumnHeaderRender : undefined;
509
- }
510
- set onColumnHeaderRender(value) {
511
- if (this.nativeElement) {
512
- this.nativeElement.onColumnHeaderRender = value;
513
- }
514
- }
515
- /** Callback function which can be used for customizing the column footer rendering. The Kanban calls it with 3 arguments - column header html element and column data and column data field.
516
- * Property type: any
517
- */
518
- get onColumnFooterRender() {
519
- return this.nativeElement ? this.nativeElement.onColumnFooterRender : undefined;
520
- }
521
- set onColumnFooterRender(value) {
522
- if (this.nativeElement) {
523
- this.nativeElement.onColumnFooterRender = value;
524
- }
525
- }
526
- /** Determines selection mode.
527
- * Property type: KanbanSelectionMode | string
528
- */
529
- get selectionMode() {
530
- return this.nativeElement ? this.nativeElement.selectionMode : undefined;
531
- }
532
- set selectionMode(value) {
533
- if (this.nativeElement) {
534
- this.nativeElement.selectionMode = value;
535
- }
536
- }
537
- /** Sets or gets whether the tasks history will be stored and displayed in the task dialog.
538
- * Property type: boolean
539
- */
540
- get storeHistory() {
541
- return this.nativeElement ? this.nativeElement.storeHistory : undefined;
542
- }
543
- set storeHistory(value) {
544
- if (this.nativeElement) {
545
- this.nativeElement.storeHistory = value;
546
- }
547
- }
548
- /** Sets or gets the task history items that will be stored when storeHistory is enabled.
549
- * Property type: number
550
- */
551
- get storeHistoryItems() {
552
- return this.nativeElement ? this.nativeElement.storeHistoryItems : undefined;
553
- }
554
- set storeHistoryItems(value) {
555
- if (this.nativeElement) {
556
- this.nativeElement.storeHistoryItems = value;
557
- }
558
- }
559
- /** Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts.
560
- * Property type: boolean
561
- */
562
- get rightToLeft() {
563
- return this.nativeElement ? this.nativeElement.rightToLeft : undefined;
564
- }
565
- set rightToLeft(value) {
566
- if (this.nativeElement) {
567
- this.nativeElement.rightToLeft = value;
568
- }
569
- }
570
- /** Sets or gets whether the edit dialog is displayed in readonly mode. In that mode it shows only the task details, but the editing is disabled. However, if comments are enabled, you will be able to add comments in the dialog.
571
- * Property type: boolean
572
- */
573
- get readonly() {
574
- return this.nativeElement ? this.nativeElement.readonly : undefined;
575
- }
576
- set readonly(value) {
577
- if (this.nativeElement) {
578
- this.nativeElement.readonly = value;
579
- }
580
- }
581
- /** Describes the swimlanes in the kanban board. Sub-columns are not applicable when swimlanes are present.
582
- * Property type: KanbanSwimlane[]
583
- */
584
- get swimlanes() {
585
- return this.nativeElement ? this.nativeElement.swimlanes : undefined;
586
- }
587
- set swimlanes(value) {
588
- if (this.nativeElement) {
589
- this.nativeElement.swimlanes = value;
590
- }
591
- }
592
- /** Sets or gets the index of the column at which to start the swimlanes.
593
- * Property type: number
594
- */
595
- get swimlanesFrom() {
596
- return this.nativeElement ? this.nativeElement.swimlanesFrom : undefined;
597
- }
598
- set swimlanesFrom(value) {
599
- if (this.nativeElement) {
600
- this.nativeElement.swimlanesFrom = value;
601
- }
602
- }
603
- /** Sets or gets the index of the column at which to end the swimlanes. By default, swimlanes end at the last column.
604
- * Property type: number
605
- */
606
- get swimlanesTo() {
607
- return this.nativeElement ? this.nativeElement.swimlanesTo : undefined;
608
- }
609
- set swimlanesTo(value) {
610
- if (this.nativeElement) {
611
- this.nativeElement.swimlanesTo = value;
612
- }
613
- }
614
- /** Sets or gets the allowed tags. If no tags are listed, all tags from the data source are allowed.
615
- * Property type: any[]
616
- */
617
- get tags() {
618
- return this.nativeElement ? this.nativeElement.tags : undefined;
619
- }
620
- set tags(value) {
621
- if (this.nativeElement) {
622
- this.nativeElement.tags = value;
623
- }
624
- }
625
- /** Toggles the visibility of the task actions icon.
626
- * Property type: boolean
627
- */
628
- get taskActions() {
629
- return this.nativeElement ? this.nativeElement.taskActions : undefined;
630
- }
631
- set taskActions(value) {
632
- if (this.nativeElement) {
633
- this.nativeElement.taskActions = value;
634
- }
635
- }
636
- /** Represents a callback function which is called when the task actions menu is created. The task actions element is passed as parameter and allows you to customize the menu. Example: (list) => { list.innerHTML = 'Custom Item'; list.onclick = () => { alert('clicked'); }}
637
- * Property type: any
638
- */
639
- get taskActionsRendered() {
640
- return this.nativeElement ? this.nativeElement.taskActionsRendered : undefined;
641
- }
642
- set taskActionsRendered(value) {
643
- if (this.nativeElement) {
644
- this.nativeElement.taskActionsRendered = value;
645
- }
646
- }
647
- /** Toggles the visibility of the task comments icon.
648
- * Property type: boolean
649
- */
650
- get taskComments() {
651
- return this.nativeElement ? this.nativeElement.taskComments : undefined;
652
- }
653
- set taskComments(value) {
654
- if (this.nativeElement) {
655
- this.nativeElement.taskComments = value;
656
- }
657
- }
658
- /** Toggles the visibility of the task due icon.
659
- * Property type: boolean
660
- */
661
- get taskDue() {
662
- return this.nativeElement ? this.nativeElement.taskDue : undefined;
663
- }
664
- set taskDue(value) {
665
- if (this.nativeElement) {
666
- this.nativeElement.taskDue = value;
667
- }
668
- }
669
- /** Sets or gets whether tasks can be shown in all levels of column hierarchy or only on leaf columns.
670
- * Property type: KanbanTaskPosition | string
671
- */
672
- get taskPosition() {
673
- return this.nativeElement ? this.nativeElement.taskPosition : undefined;
674
- }
675
- set taskPosition(value) {
676
- if (this.nativeElement) {
677
- this.nativeElement.taskPosition = value;
678
- }
679
- }
680
- /** Toggles the visibility of the task priority icon (shown when priority is low or high).
681
- * Property type: boolean
682
- */
683
- get taskPriority() {
684
- return this.nativeElement ? this.nativeElement.taskPriority : undefined;
685
- }
686
- set taskPriority(value) {
687
- if (this.nativeElement) {
688
- this.nativeElement.taskPriority = value;
689
- }
690
- }
691
- /** Toggles the visibility of task progress bar and the completed sub-tasks label.
692
- * Property type: boolean
693
- */
694
- get taskProgress() {
695
- return this.nativeElement ? this.nativeElement.taskProgress : undefined;
696
- }
697
- set taskProgress(value) {
698
- if (this.nativeElement) {
699
- this.nativeElement.taskProgress = value;
700
- }
701
- }
702
- /** Sets the task custom fields displayed in the card. Each array item should have 'dataField', 'label' 'dataType' and optionally 'visible', 'image' and 'cover' properties. The 'dataField' determines the value, the label is displayed as title, 'dataType' is used for formatting and 'visible' determines whether the field will be displayed. If your string represents an image either URL or Base64, set image: true. If you want to display that image as a cover image, set cover:true, too.
703
- * Property type: any
704
- */
705
- get taskCustomFields() {
706
- return this.nativeElement ? this.nativeElement.taskCustomFields : undefined;
707
- }
708
- set taskCustomFields(value) {
709
- if (this.nativeElement) {
710
- this.nativeElement.taskCustomFields = value;
711
- }
712
- }
713
- /** The task's background color depends on the task's color property. By default the color is rendered within the task's left border.
714
- * Property type: boolean
715
- */
716
- get taskColorEntireSurface() {
717
- return this.nativeElement ? this.nativeElement.taskColorEntireSurface : undefined;
718
- }
719
- set taskColorEntireSurface(value) {
720
- if (this.nativeElement) {
721
- this.nativeElement.taskColorEntireSurface = value;
722
- }
723
- }
724
- /** Displays an input in the task's card for adding dynamically a sub task. The 'taskSubTasks' property should be set to a value different than 'none'.
725
- * Property type: boolean
726
- */
727
- get taskSubTasksInput() {
728
- return this.nativeElement ? this.nativeElement.taskSubTasksInput : undefined;
729
- }
730
- set taskSubTasksInput(value) {
731
- if (this.nativeElement) {
732
- this.nativeElement.taskSubTasksInput = value;
733
- }
734
- }
735
- /** Sets the rendering mode of sub tasks. 'none' - default value. Sub tasks are displayed only in the edit dialog. 'onePerRow' - all sub tasks are displayed in the task's card. 'onlyUnfinished' - only tasks which are not completed are displayed in the task's card.
736
- * Property type: KanbanTaskSubTasks | string
737
- */
738
- get taskSubTasks() {
739
- return this.nativeElement ? this.nativeElement.taskSubTasks : undefined;
740
- }
741
- set taskSubTasks(value) {
742
- if (this.nativeElement) {
743
- this.nativeElement.taskSubTasks = value;
744
- }
745
- }
746
- /** Toggles the visibility of task tags.
747
- * Property type: boolean
748
- */
749
- get taskTags() {
750
- return this.nativeElement ? this.nativeElement.taskTags : undefined;
751
- }
752
- set taskTags(value) {
753
- if (this.nativeElement) {
754
- this.nativeElement.taskTags = value;
755
- }
756
- }
757
- /** Toggles the visibility of the task user icon.
758
- * Property type: boolean
759
- */
760
- get taskUserIcon() {
761
- return this.nativeElement ? this.nativeElement.taskUserIcon : undefined;
762
- }
763
- set taskUserIcon(value) {
764
- if (this.nativeElement) {
765
- this.nativeElement.taskUserIcon = value;
766
- }
767
- }
768
- /** Sets or gets a template to be applied to task text. Can be a string beginning with # and referencing the id of a template element on the page. Can also be a function that modifies the task text or the template itself. Finally, it can also be a string that will be parsed.
769
- * Property type: any
770
- */
771
- get textTemplate() {
772
- return this.nativeElement ? this.nativeElement.textTemplate : undefined;
773
- }
774
- set textTemplate(value) {
775
- if (this.nativeElement) {
776
- this.nativeElement.textTemplate = value;
777
- }
778
- }
779
- /** Determines the theme. Theme defines the look of the element
780
- * Property type: string
781
- */
782
- get theme() {
783
- return this.nativeElement ? this.nativeElement.theme : undefined;
784
- }
785
- set theme(value) {
786
- if (this.nativeElement) {
787
- this.nativeElement.theme = value;
788
- }
789
- }
790
- /** Determines whether the priority list (as defined by the priority property) will be shown when clicking the priority icon. Only applicable if editable privileges are enabled.
791
- * Property type: boolean
792
- */
793
- get priorityList() {
794
- return this.nativeElement ? this.nativeElement.priorityList : undefined;
795
- }
796
- set priorityList(value) {
797
- if (this.nativeElement) {
798
- this.nativeElement.priorityList = value;
799
- }
800
- }
801
- /** Determines the priority Kanban tasks can be assigned to. Example: [{label: 'low', value: 'low'}, {label: 'high', value: 'high'}]
802
- * Property type: KanbanPriority[]
803
- */
804
- get priority() {
805
- return this.nativeElement ? this.nativeElement.priority : undefined;
806
- }
807
- set priority(value) {
808
- if (this.nativeElement) {
809
- this.nativeElement.priority = value;
810
- }
811
- }
812
- /** Determines whether the user list (as defined by the users property) will be shown when clicking the user icon. Only applicable if editable privileges are enabled.
813
- * Property type: boolean
814
- */
815
- get userList() {
816
- return this.nativeElement ? this.nativeElement.userList : undefined;
817
- }
818
- set userList(value) {
819
- if (this.nativeElement) {
820
- this.nativeElement.userList = value;
821
- }
822
- }
823
- /** Determines the users Kanban tasks can be assigned to and their characteristics and privileges.
824
- * Property type: KanbanUser[]
825
- */
826
- get users() {
827
- return this.nativeElement ? this.nativeElement.users : undefined;
828
- }
829
- set users(value) {
830
- if (this.nativeElement) {
831
- this.nativeElement.users = value;
832
- }
833
- }
834
- // Gets the properties of the React component.
835
- get properties() {
836
- return ["allowColumnReorder", "allowColumnEdit", "allowColumnRemove", "allowColumnHide", "addNewButton", "addNewButtonDisplayMode", "addNewColumn", "addNewColumnWidth", "allowDrag", "allowDrop", "applyColumnColorToTasks", "autoLoadState", "autoSaveState", "autoColumnHeight", "collapsible", "columnColors", "columnWidth", "columnColorEntireSurface", "columnFooter", "columns", "columnActions", "columnSummary", "columnHeaderTemplate", "columnEditMode", "currentUser", "disableDialog", "dialogCustomizationFunction", "dialogRendered", "dataSource", "dataSourceMap", "dragOffset", "editable", "formatStringDate", "formatStringTime", "headerPosition", "hierarchy", "locale", "messages", "onTaskRender", "onFilterPrepare", "onSortPrepare", "onColumnHeaderRender", "onColumnFooterRender", "selectionMode", "storeHistory", "storeHistoryItems", "rightToLeft", "readonly", "swimlanes", "swimlanesFrom", "swimlanesTo", "tags", "taskActions", "taskActionsRendered", "taskComments", "taskDue", "taskPosition", "taskPriority", "taskProgress", "taskCustomFields", "taskColorEntireSurface", "taskSubTasksInput", "taskSubTasks", "taskTags", "taskUserIcon", "textTemplate", "theme", "priorityList", "priority", "userList", "users"];
837
- }
838
- // Gets the events of the React component.
839
- get eventListeners() {
840
- return ["onChange", "onClose", "onClosing", "onColumnAdd", "onColumnRemove", "onColumnReorder", "onColumnUpdate", "onColumnClick", "onColumnDoubleClick", "onColumnShow", "onColumnHide", "onColumnCollapse", "onColumnExpand", "onCommentAdd", "onCommentRemove", "onCommentUpdate", "onDragEnd", "onDragging", "onDragStart", "onFilter", "onOpen", "onOpening", "onSort", "onTaskBeforeAdd", "onTaskAdd", "onTaskRemove", "onTaskUpdate", "onTaskClick", "onTaskDoubleClick", "onCreate", "onReady"];
841
- }
842
- /** Adds filtering. Example: const filterGroup = new Smart.FilterGroup(); const filterObject = filterGroup.createFilter('string', 'Italy', 'contains'); filterGroup.addFilter('and', filterObject); kanban.addFilter([['Country', filterGroup]]);
843
- * @param {any} filters. Filter information. Example: kanban.addFilter([['Country', filterGroup]]);. Each array item is a sub array with two items - 'dataField' and 'filterGroup' object. The 'dataField' is any valid data field from the data source bound to the Kanban like 'dueDate', 'startDate' or custom fields like 'Country'. Filter conditions which you can use in the expressions: '=', 'EQUAL','&lt;&gt;', 'NOT_EQUAL', '!=', '&lt;', 'LESS_THAN','&gt;', 'GREATER_THAN', '&lt;=', 'LESS_THAN_OR_EQUAL', '&gt;=', 'GREATER_THAN_OR_EQUAL','starts with', 'STARTS_WITH','ends with', 'ENDS_WITH', '', 'EMPTY', 'CONTAINS','DOES_NOT_CONTAIN', 'NULL','NOT_NULL'
844
- * @param {string} operator?. Logical operator between the filters of different fields. Possible values are: 'and', 'or'.
845
- */
846
- addFilter(filters, operator) {
847
- if (this.nativeElement.isRendered) {
848
- this.nativeElement.addFilter(filters, operator);
849
- }
850
- else {
851
- this.nativeElement.whenRendered(() => {
852
- this.nativeElement.addFilter(filters, operator);
853
- });
854
- }
855
- }
856
- /** Adds sorting. Example: kanban.addSort(['Country'], 'ascending');
857
- * @param {[] | string} dataFields. The data field(s) to sort by
858
- * @param {[] | string} orderBy. The sort direction(s) to sort the data field(s) by. Possible values are: 'ascending' and 'descending'.
859
- */
860
- addSort(dataFields, orderBy) {
861
- if (this.nativeElement.isRendered) {
862
- this.nativeElement.addSort(dataFields, orderBy);
863
- }
864
- else {
865
- this.nativeElement.whenRendered(() => {
866
- this.nativeElement.addSort(dataFields, orderBy);
867
- });
868
- }
869
- }
870
- /** Adds a task to a Kanban column. If no data is specified, an empty task is added to the first column.
871
- * @param {any} data?. An object containing the new task's data
872
- */
873
- addTask(data) {
874
- if (this.nativeElement.isRendered) {
875
- this.nativeElement.addTask(data);
876
- }
877
- else {
878
- this.nativeElement.whenRendered(() => {
879
- this.nativeElement.addTask(data);
880
- });
881
- }
882
- }
883
- /** Adds a column to a Kanban. If no data is specified, an empty column is added.
884
- * @param {any} data?. An object containing the new column's data
885
- */
886
- addColumn(data) {
887
- if (this.nativeElement.isRendered) {
888
- this.nativeElement.addColumn(data);
889
- }
890
- else {
891
- this.nativeElement.whenRendered(() => {
892
- this.nativeElement.addColumn(data);
893
- });
894
- }
895
- }
896
- /** Begins an edit operation
897
- * @param {number | string | HTMLElement} task. The task's id or corresponding HTMLElement
898
- */
899
- beginEdit(task) {
900
- if (this.nativeElement.isRendered) {
901
- this.nativeElement.beginEdit(task);
902
- }
903
- else {
904
- this.nativeElement.whenRendered(() => {
905
- this.nativeElement.beginEdit(task);
906
- });
907
- }
908
- }
909
- /** Ends the current edit operation and discards changes
910
- */
911
- cancelEdit() {
912
- if (this.nativeElement.isRendered) {
913
- this.nativeElement.cancelEdit();
914
- }
915
- else {
916
- this.nativeElement.whenRendered(() => {
917
- this.nativeElement.cancelEdit();
918
- });
919
- }
920
- }
921
- /** Closes any open header panel (drop down)
922
- */
923
- closePanel() {
924
- if (this.nativeElement.isRendered) {
925
- this.nativeElement.closePanel();
926
- }
927
- else {
928
- this.nativeElement.whenRendered(() => {
929
- this.nativeElement.closePanel();
930
- });
931
- }
932
- }
933
- /** Collapses a Kanban column.
934
- * @param {number | string} column. The index or dataField of the column to collapse
935
- */
936
- collapse(column) {
937
- if (this.nativeElement.isRendered) {
938
- this.nativeElement.collapse(column);
939
- }
940
- else {
941
- this.nativeElement.whenRendered(() => {
942
- this.nativeElement.collapse(column);
943
- });
944
- }
945
- }
946
- /** Clears the Kanban's selection.
947
- */
948
- clearSelection() {
949
- if (this.nativeElement.isRendered) {
950
- this.nativeElement.clearSelection();
951
- }
952
- else {
953
- this.nativeElement.whenRendered(() => {
954
- this.nativeElement.clearSelection();
955
- });
956
- }
957
- }
958
- /** Hides a Kanban column.
959
- * @param {number | string} column. The index or dataField of the column to hide
960
- */
961
- hide(column) {
962
- if (this.nativeElement.isRendered) {
963
- this.nativeElement.hide(column);
964
- }
965
- else {
966
- this.nativeElement.whenRendered(() => {
967
- this.nativeElement.hide(column);
968
- });
969
- }
970
- }
971
- /** Creates a copy of a task in the same column.
972
- * @param {number | string | HTMLElement} task. The task's id or corresponding HTMLElement
973
- */
974
- copyTask(task) {
975
- if (this.nativeElement.isRendered) {
976
- this.nativeElement.copyTask(task);
977
- }
978
- else {
979
- this.nativeElement.whenRendered(() => {
980
- this.nativeElement.copyTask(task);
981
- });
982
- }
983
- }
984
- /** Ends the current edit operation and saves changes
985
- */
986
- endEdit() {
987
- if (this.nativeElement.isRendered) {
988
- this.nativeElement.endEdit();
989
- }
990
- else {
991
- this.nativeElement.whenRendered(() => {
992
- this.nativeElement.endEdit();
993
- });
994
- }
995
- }
996
- /** Makes sure a task is visible by scrolling to it. If succcessful, the method returns the HTML element of the task.
997
- * @param {number | string | HTMLElement} task. The task's id or corresponding HTMLElement
998
- * @returns {HTMLElement}
999
- */
1000
- ensureVisible(task) {
1001
- return __awaiter(this, void 0, void 0, function* () {
1002
- const getResultOnRender = () => {
1003
- return new Promise(resolve => {
1004
- this.nativeElement.whenRendered(() => {
1005
- const result = this.nativeElement.ensureVisible(task);
1006
- resolve(result);
1007
- });
1008
- });
1009
- };
1010
- const result = yield getResultOnRender();
1011
- return result;
1012
- });
1013
- }
1014
- /** Expands a Kanban column.
1015
- * @param {number | string} column. The index or dataField of the column to expand
1016
- */
1017
- expand(column) {
1018
- if (this.nativeElement.isRendered) {
1019
- this.nativeElement.expand(column);
1020
- }
1021
- else {
1022
- this.nativeElement.whenRendered(() => {
1023
- this.nativeElement.expand(column);
1024
- });
1025
- }
1026
- }
1027
- /** Expands all Kanban columns.
1028
- */
1029
- expandAll() {
1030
- if (this.nativeElement.isRendered) {
1031
- this.nativeElement.expandAll();
1032
- }
1033
- else {
1034
- this.nativeElement.whenRendered(() => {
1035
- this.nativeElement.expandAll();
1036
- });
1037
- }
1038
- }
1039
- /** Exports the Kanban's data.
1040
- * @param {string} dataFormat. The file format to export to. Supported formats: 'csv', 'html', 'json', 'pdf', 'tsv', 'xlsx', 'xml'.
1041
- * @param {string} fileName. The name of the file to export to
1042
- * @param {Function} callback?. A callback function to pass the exported data to (if fileName is not provided)
1043
- * @returns {any}
1044
- */
1045
- exportData(dataFormat, fileName, callback) {
1046
- return __awaiter(this, void 0, void 0, function* () {
1047
- const getResultOnRender = () => {
1048
- return new Promise(resolve => {
1049
- this.nativeElement.whenRendered(() => {
1050
- const result = this.nativeElement.exportData(dataFormat, fileName, callback);
1051
- resolve(result);
1052
- });
1053
- });
1054
- };
1055
- const result = yield getResultOnRender();
1056
- return result;
1057
- });
1058
- }
1059
- /** Gets the data of a column. The returned value is a JSON object with the following fields: 'label', 'dataField', 'collapsed', 'collapsible', 'allowRemove', 'editable', 'reorder', 'orientation'.
1060
- * @param {string} dataField. The column's data field
1061
- * @returns {any}
1062
- */
1063
- getColumn(dataField) {
1064
- return __awaiter(this, void 0, void 0, function* () {
1065
- const getResultOnRender = () => {
1066
- return new Promise(resolve => {
1067
- this.nativeElement.whenRendered(() => {
1068
- const result = this.nativeElement.getColumn(dataField);
1069
- resolve(result);
1070
- });
1071
- });
1072
- };
1073
- const result = yield getResultOnRender();
1074
- return result;
1075
- });
1076
- }
1077
- /** Gets the data of a task. The returned value is a JSON object with the following fields: 'checklist', 'id', 'color', 'comments', 'history', 'dueDate', 'startDate', 'priority', 'progress', 'status', 'swimlane', 'tags', 'text', 'description', 'userId', 'createdUserId', 'createdDate', 'updatedUserId', 'updatedDate'
1078
- * @param {number} id. The task's id
1079
- * @returns {any}
1080
- */
1081
- getTask(id) {
1082
- return __awaiter(this, void 0, void 0, function* () {
1083
- const getResultOnRender = () => {
1084
- return new Promise(resolve => {
1085
- this.nativeElement.whenRendered(() => {
1086
- const result = this.nativeElement.getTask(id);
1087
- resolve(result);
1088
- });
1089
- });
1090
- };
1091
- const result = yield getResultOnRender();
1092
- return result;
1093
- });
1094
- }
1095
- /** Gets the selected ids. The returned value is an array. Each item in the array is the 'id' of a selected task.
1096
- * @param {number} id. The task's id
1097
- * @returns {any}
1098
- */
1099
- getSelectedTasks(id) {
1100
- return __awaiter(this, void 0, void 0, function* () {
1101
- const getResultOnRender = () => {
1102
- return new Promise(resolve => {
1103
- this.nativeElement.whenRendered(() => {
1104
- const result = this.nativeElement.getSelectedTasks(id);
1105
- resolve(result);
1106
- });
1107
- });
1108
- };
1109
- const result = yield getResultOnRender();
1110
- return result;
1111
- });
1112
- }
1113
- /** Gets the Kanban's state.
1114
- * @returns {{ collapsed: {}, dataSource: [], filtering: { filters: [], operator: string }, selection: { selected: [], selectionStart: number | string, selectionInColumn: string, swimlane: string }, sorting: { dataFields: [], dataTypes: [], orderBy: [] }, tabs: [], visibility: { taskActions: boolean, taskComments: boolean, taskDue: boolean, taskPriority: boolean, taskProgress: boolean, taskTags: boolean, taskUserIcon: boolean } }}
1115
- */
1116
- getState() {
1117
- return __awaiter(this, void 0, void 0, function* () {
1118
- const getResultOnRender = () => {
1119
- return new Promise(resolve => {
1120
- this.nativeElement.whenRendered(() => {
1121
- const result = this.nativeElement.getState();
1122
- resolve(result);
1123
- });
1124
- });
1125
- };
1126
- const result = yield getResultOnRender();
1127
- return result;
1128
- });
1129
- }
1130
- /** Loads the Kanban's state.
1131
- * @param {{ collapsed: {}, dataSource: [], filtering: { filters: [], operator: string }, selection: { selected: [], selectionStart?: number | string, selectionInColumn: string, swimlane: string }, sorting: { dataFields: [], dataTypes: [], orderBy: [] }, tabs: [], visibility: { taskActions: boolean, taskComments: boolean, taskDue: boolean, taskPriority: boolean, taskProgress: boolean, taskTags: boolean, taskUserIcon: boolean } }} state?. An object returned by one of the methods getState or saveState. If not passed, gets saved state from the browser's localStorage.
1132
- */
1133
- loadState(state) {
1134
- if (this.nativeElement.isRendered) {
1135
- this.nativeElement.loadState(state);
1136
- }
1137
- else {
1138
- this.nativeElement.whenRendered(() => {
1139
- this.nativeElement.loadState(state);
1140
- });
1141
- }
1142
- }
1143
- /** Moves a task to a different column.
1144
- * @param {number | string | HTMLElement} task. The task's id or corresponding HTMLElement
1145
- * @param {string} newStatus. The new status of the task (its new column's dataField)
1146
- */
1147
- moveTask(task, newStatus) {
1148
- if (this.nativeElement.isRendered) {
1149
- this.nativeElement.moveTask(task, newStatus);
1150
- }
1151
- else {
1152
- this.nativeElement.whenRendered(() => {
1153
- this.nativeElement.moveTask(task, newStatus);
1154
- });
1155
- }
1156
- }
1157
- /** Opens the "Customize tasks" header panel (drop down)
1158
- */
1159
- openCustomizePanel() {
1160
- if (this.nativeElement.isRendered) {
1161
- this.nativeElement.openCustomizePanel();
1162
- }
1163
- else {
1164
- this.nativeElement.whenRendered(() => {
1165
- this.nativeElement.openCustomizePanel();
1166
- });
1167
- }
1168
- }
1169
- /** Opens the "Filter" header panel (drop down)
1170
- */
1171
- openFilterPanel() {
1172
- if (this.nativeElement.isRendered) {
1173
- this.nativeElement.openFilterPanel();
1174
- }
1175
- else {
1176
- this.nativeElement.whenRendered(() => {
1177
- this.nativeElement.openFilterPanel();
1178
- });
1179
- }
1180
- }
1181
- /** Opens the "Sort" header panel (drop down)
1182
- */
1183
- openSortPanel() {
1184
- if (this.nativeElement.isRendered) {
1185
- this.nativeElement.openSortPanel();
1186
- }
1187
- else {
1188
- this.nativeElement.whenRendered(() => {
1189
- this.nativeElement.openSortPanel();
1190
- });
1191
- }
1192
- }
1193
- /** Removes filtering
1194
- */
1195
- removeFilter() {
1196
- if (this.nativeElement.isRendered) {
1197
- this.nativeElement.removeFilter();
1198
- }
1199
- else {
1200
- this.nativeElement.whenRendered(() => {
1201
- this.nativeElement.removeFilter();
1202
- });
1203
- }
1204
- }
1205
- /** Removes sorting
1206
- */
1207
- removeSort() {
1208
- if (this.nativeElement.isRendered) {
1209
- this.nativeElement.removeSort();
1210
- }
1211
- else {
1212
- this.nativeElement.whenRendered(() => {
1213
- this.nativeElement.removeSort();
1214
- });
1215
- }
1216
- }
1217
- /** Removes a task.
1218
- * @param {number | string | HTMLElement} task. The task's id or corresponding HTMLElement
1219
- * @param {boolean} prompt?. Whether or not to prompt the user before removing the task
1220
- */
1221
- removeTask(task, prompt) {
1222
- if (this.nativeElement.isRendered) {
1223
- this.nativeElement.removeTask(task, prompt);
1224
- }
1225
- else {
1226
- this.nativeElement.whenRendered(() => {
1227
- this.nativeElement.removeTask(task, prompt);
1228
- });
1229
- }
1230
- }
1231
- /** Removes a column.
1232
- * @param {string} dataField. The column's data field
1233
- */
1234
- removeColumn(dataField) {
1235
- if (this.nativeElement.isRendered) {
1236
- this.nativeElement.removeColumn(dataField);
1237
- }
1238
- else {
1239
- this.nativeElement.whenRendered(() => {
1240
- this.nativeElement.removeColumn(dataField);
1241
- });
1242
- }
1243
- }
1244
- /** Saves the Kanban's state to the browser's localStorage.
1245
- */
1246
- saveState() {
1247
- if (this.nativeElement.isRendered) {
1248
- this.nativeElement.saveState();
1249
- }
1250
- else {
1251
- this.nativeElement.whenRendered(() => {
1252
- this.nativeElement.saveState();
1253
- });
1254
- }
1255
- }
1256
- /** Shows a Kanban column.
1257
- * @param {number | string} column. The index or dataField of the column to show
1258
- */
1259
- show(column) {
1260
- if (this.nativeElement.isRendered) {
1261
- this.nativeElement.show(column);
1262
- }
1263
- else {
1264
- this.nativeElement.whenRendered(() => {
1265
- this.nativeElement.show(column);
1266
- });
1267
- }
1268
- }
1269
- /** Shows all Kanban columns.
1270
- */
1271
- showAllColumns() {
1272
- if (this.nativeElement.isRendered) {
1273
- this.nativeElement.showAllColumns();
1274
- }
1275
- else {
1276
- this.nativeElement.whenRendered(() => {
1277
- this.nativeElement.showAllColumns();
1278
- });
1279
- }
1280
- }
1281
- /** Selects a task.
1282
- * @param {number | string} task. The task's id.
1283
- */
1284
- selectTask(task) {
1285
- if (this.nativeElement.isRendered) {
1286
- this.nativeElement.selectTask(task);
1287
- }
1288
- else {
1289
- this.nativeElement.whenRendered(() => {
1290
- this.nativeElement.selectTask(task);
1291
- });
1292
- }
1293
- }
1294
- /** Unselects a task.
1295
- * @param {number | string} task. The task's id.
1296
- */
1297
- unselectTask(task) {
1298
- if (this.nativeElement.isRendered) {
1299
- this.nativeElement.unselectTask(task);
1300
- }
1301
- else {
1302
- this.nativeElement.whenRendered(() => {
1303
- this.nativeElement.unselectTask(task);
1304
- });
1305
- }
1306
- }
1307
- /** Updates a task.
1308
- * @param {number | string | HTMLElement} task. The task's id or corresponding HTMLElement
1309
- * @param {{}} newData. The new data to visualize in the task.
1310
- */
1311
- updateTask(task, newData) {
1312
- if (this.nativeElement.isRendered) {
1313
- this.nativeElement.updateTask(task, newData);
1314
- }
1315
- else {
1316
- this.nativeElement.whenRendered(() => {
1317
- this.nativeElement.updateTask(task, newData);
1318
- });
1319
- }
1320
- }
1321
- /** Updates a column.
1322
- * @param {string} dataField. The new column's data field
1323
- * @param {{}} newData. The new data to visualize in the column.
1324
- */
1325
- updateColumn(dataField, newData) {
1326
- if (this.nativeElement.isRendered) {
1327
- this.nativeElement.updateColumn(dataField, newData);
1328
- }
1329
- else {
1330
- this.nativeElement.whenRendered(() => {
1331
- this.nativeElement.updateColumn(dataField, newData);
1332
- });
1333
- }
1334
- }
1335
- componentDidRender(initialize) {
1336
- const that = this;
1337
- const props = {};
1338
- const events = {};
1339
- let styles = null;
1340
- for (let prop in that.props) {
1341
- if (prop === 'children') {
1342
- continue;
1343
- }
1344
- if (prop === 'style') {
1345
- styles = that.props[prop];
1346
- continue;
1347
- }
1348
- if (prop.startsWith('on') && that.properties.indexOf(prop) === -1) {
1349
- events[prop] = that.props[prop];
1350
- continue;
1351
- }
1352
- props[prop] = that.props[prop];
1353
- }
1354
- if (initialize) {
1355
- that.nativeElement = this.componentRef.current;
1356
- }
1357
- for (let prop in props) {
1358
- if (prop === 'class' || prop === 'className') {
1359
- const classNames = props[prop].trim().split(' ');
1360
- for (let className in classNames) {
1361
- if (!that.nativeElement.classList.contains(classNames[className]) && classNames[className] !== "") {
1362
- that.nativeElement.classList.add(classNames[className]);
1363
- }
1364
- }
1365
- continue;
1366
- }
1367
- if (props[prop] !== that.nativeElement[prop]) {
1368
- const normalizeProp = (str) => {
1369
- return str.replace(/-([a-z])/g, function (g) {
1370
- return g[1].toUpperCase();
1371
- });
1372
- };
1373
- if (prop === 'hover' || prop === 'active' || prop === 'focus' || prop === 'selected') {
1374
- that.nativeElement.setAttribute(prop, '');
1375
- }
1376
- const normalizedProp = normalizeProp(prop);
1377
- that.nativeElement[normalizedProp] = props[prop];
1378
- }
1379
- }
1380
- for (let eventName in events) {
1381
- that[eventName] = events[eventName];
1382
- that.nativeElement[eventName.toLowerCase()] = events[eventName];
1383
- }
1384
- if (initialize) {
1385
- Smart.Render();
1386
- if (that.onCreate) {
1387
- that.onCreate();
1388
- }
1389
- that.nativeElement.whenRendered(() => {
1390
- if (that.onReady) {
1391
- that.onReady();
1392
- }
1393
- });
1394
- }
1395
- // setup styles.
1396
- if (styles) {
1397
- for (let styleName in styles) {
1398
- that.nativeElement.style[styleName] = styles[styleName];
1399
- }
1400
- }
1401
- }
1402
- componentDidMount() {
1403
- this.componentDidRender(true);
1404
- }
1405
- componentDidUpdate() {
1406
- this.componentDidRender(false);
1407
- }
1408
- componentWillUnmount() {
1409
- const that = this;
1410
- if (!that.nativeElement) {
1411
- return;
1412
- }
1413
- that.nativeElement.whenRenderedCallbacks = [];
1414
- for (let i = 0; i < that.eventListeners.length; i++) {
1415
- const eventName = that.eventListeners[i];
1416
- that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
1417
- }
1418
- }
1419
- render() {
1420
- return (React.createElement("smart-kanban", { ref: this.componentRef }, this.props.children));
1421
- }
1422
- }
1339
+ exports.Smart = Smart;
1340
+ exports.Kanban = Kanban;
1341
+ exports.default = Kanban;
1423
1342
 
1424
- exports.Smart = Smart;
1425
- exports.Kanban = Kanban;
1426
- exports.default = Kanban;
1427
-
1428
- Object.defineProperty(exports, '__esModule', { value: true });
1343
+ Object.defineProperty(exports, '__esModule', { value: true });
1429
1344
 
1430
1345
  })));