smart-webcomponents-react 14.2.92 → 14.4.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 (372) 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 +2 -2
  134. package/source/modules/smart.card.js +1 -1
  135. package/source/modules/smart.cardview.js +3 -3
  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 +2 -2
  148. package/source/modules/smart.daterangeinput.js +3 -3
  149. package/source/modules/smart.datetimepicker.js +2 -2
  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 +4 -4
  159. package/source/modules/smart.gauge.js +1 -1
  160. package/source/modules/smart.grid.js +10 -10
  161. package/source/modules/smart.gridpanel.js +3 -3
  162. package/source/modules/smart.input.js +2 -2
  163. package/source/modules/smart.kanban.js +4 -4
  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 +4 -4
  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 +3 -3
  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 +1 -1
  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 +14 -14
  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 +1 -1
  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 +1 -1
  276. package/source/smart.grid.tree.js +1 -1
  277. package/source/smart.grid.view.js +1 -1
  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/typescript/smart.editor.d.ts +4 -2
  330. package/source/typescript/smart.elements.d.ts +45 -3
  331. package/source/typescript/smart.fileupload.d.ts +2 -1
  332. package/source/typescript/smart.grid.d.ts +34 -0
  333. package/source/typescript/smart.querybuilder.d.ts +5 -0
  334. package/splitter/splitter.d.ts +3 -3
  335. package/splitter/splitter.esm.js +6 -61
  336. package/splitter/splitter.umd.js +901 -956
  337. package/table/pivottable.d.ts +3 -3
  338. package/table/table.d.ts +7 -7
  339. package/table/table.esm.js +14 -109
  340. package/table/table.umd.js +1278 -1373
  341. package/tabs/tabs.d.ts +4 -4
  342. package/tabs/tabs.esm.js +8 -73
  343. package/tabs/tabs.umd.js +875 -940
  344. package/tabs/tabswindow.d.ts +5 -5
  345. package/tabswindow/tabswindow.d.ts +5 -5
  346. package/tabswindow/tabswindow.esm.js +10 -85
  347. package/tabswindow/tabswindow.umd.js +1134 -1209
  348. package/tank/tank.d.ts +2 -2
  349. package/tank/tank.esm.js +4 -49
  350. package/tank/tank.umd.js +598 -643
  351. package/textbox/multilinetextbox.d.ts +1 -1
  352. package/textbox/numerictextbox.d.ts +1 -1
  353. package/timepicker/datetimepicker.d.ts +1 -1
  354. package/toast/toast.d.ts +1 -1
  355. package/toast/toast.esm.js +2 -37
  356. package/toast/toast.umd.js +397 -432
  357. package/tree/tree.d.ts +4 -4
  358. package/tree/tree.esm.js +8 -73
  359. package/tree/tree.umd.js +1310 -1375
  360. package/waitwindow/waitwindow.d.ts +5 -5
  361. package/waitwindow/waitwindow.esm.js +10 -85
  362. package/waitwindow/waitwindow.umd.js +1134 -1209
  363. package/window/alertwindow.d.ts +5 -5
  364. package/window/dialogwindow.d.ts +5 -5
  365. package/window/multilinewindow.d.ts +5 -5
  366. package/window/progresswindow.d.ts +5 -5
  367. package/window/promptwindow.d.ts +5 -5
  368. package/window/tabswindow.d.ts +5 -5
  369. package/window/waitwindow.d.ts +5 -5
  370. package/window/window.d.ts +5 -5
  371. package/window/window.esm.js +10 -85
  372. package/window/window.umd.js +1134 -1209
@@ -2,1052 +2,1017 @@
2
2
  require('../source/modules/smart.listmenu');
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.listmenu = {}),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.listmenu = {}),global.React));
8
8
  }(this, (function (exports,React) { 'use strict';
9
9
 
10
- React = React && React.hasOwnProperty('default') ? React['default'] : React;
10
+ React = React && React.hasOwnProperty('default') ? React['default'] : React;
11
11
 
12
- /*! *****************************************************************************
13
- Copyright (c) Microsoft Corporation. All rights reserved.
14
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use
15
- this file except in compliance with the License. You may obtain a copy of the
16
- License at http://www.apache.org/licenses/LICENSE-2.0
17
-
18
- THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
19
- KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
20
- WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
21
- MERCHANTABLITY OR NON-INFRINGEMENT.
22
-
23
- See the Apache Version 2.0 License for specific language governing permissions
24
- and limitations under the License.
25
- ***************************************************************************** */
26
-
27
- function __awaiter(thisArg, _arguments, P, generator) {
28
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
29
- return new (P || (P = Promise))(function (resolve, reject) {
30
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
31
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
32
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
33
- step((generator = generator.apply(thisArg, _arguments || [])).next());
34
- });
35
- }
12
+ const Smart = window.Smart;
13
+ /**
14
+ Defines a menu item.
15
+ */
16
+ class MenuItem 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 = 'MenuItem' + Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
25
+ }
26
+ return this._id;
27
+ }
28
+ /**
29
+ * Property type: boolean
30
+ */
31
+ get checked() {
32
+ return this.nativeElement ? this.nativeElement.checked : undefined;
33
+ }
34
+ set checked(value) {
35
+ if (this.nativeElement) {
36
+ this.nativeElement.checked = value;
37
+ }
38
+ }
39
+ /** Enables or disables element.
40
+ * Property type: boolean
41
+ */
42
+ get disabled() {
43
+ return this.nativeElement ? this.nativeElement.disabled : undefined;
44
+ }
45
+ set disabled(value) {
46
+ if (this.nativeElement) {
47
+ this.nativeElement.disabled = value;
48
+ }
49
+ }
50
+ /**
51
+ * Property type: any
52
+ */
53
+ get label() {
54
+ return this.nativeElement ? this.nativeElement.label : undefined;
55
+ }
56
+ set label(value) {
57
+ if (this.nativeElement) {
58
+ this.nativeElement.label = value;
59
+ }
60
+ }
61
+ /**
62
+ * Property type: number
63
+ */
64
+ get level() {
65
+ return this.nativeElement ? this.nativeElement.level : undefined;
66
+ }
67
+ set level(value) {
68
+ if (this.nativeElement) {
69
+ this.nativeElement.level = value;
70
+ }
71
+ }
72
+ /**
73
+ * Property type: boolean
74
+ */
75
+ get separator() {
76
+ return this.nativeElement ? this.nativeElement.separator : undefined;
77
+ }
78
+ set separator(value) {
79
+ if (this.nativeElement) {
80
+ this.nativeElement.separator = value;
81
+ }
82
+ }
83
+ /**
84
+ * Property type: string
85
+ */
86
+ get shortcut() {
87
+ return this.nativeElement ? this.nativeElement.shortcut : undefined;
88
+ }
89
+ set shortcut(value) {
90
+ if (this.nativeElement) {
91
+ this.nativeElement.shortcut = value;
92
+ }
93
+ }
94
+ /**
95
+ * Property type: any
96
+ */
97
+ get value() {
98
+ return this.nativeElement ? this.nativeElement.value : undefined;
99
+ }
100
+ set value(value) {
101
+ if (this.nativeElement) {
102
+ this.nativeElement.value = value;
103
+ }
104
+ }
105
+ // Gets the properties of the React component.
106
+ get properties() {
107
+ return ["checked", "disabled", "label", "level", "separator", "shortcut", "value"];
108
+ }
109
+ // Gets the events of the React component.
110
+ get eventListeners() {
111
+ return ["onCreate", "onReady"];
112
+ }
113
+ componentDidRender(initialize) {
114
+ const that = this;
115
+ const props = {};
116
+ const events = {};
117
+ let styles = null;
118
+ for (let prop in that.props) {
119
+ if (prop === 'children') {
120
+ continue;
121
+ }
122
+ if (prop === 'style') {
123
+ styles = that.props[prop];
124
+ continue;
125
+ }
126
+ if (prop.startsWith('on') && that.properties.indexOf(prop) === -1) {
127
+ events[prop] = that.props[prop];
128
+ continue;
129
+ }
130
+ props[prop] = that.props[prop];
131
+ }
132
+ if (initialize) {
133
+ that.nativeElement = this.componentRef.current;
134
+ }
135
+ for (let prop in props) {
136
+ if (prop === 'class' || prop === 'className') {
137
+ const classNames = props[prop].trim().split(' ');
138
+ for (let className in classNames) {
139
+ if (!that.nativeElement.classList.contains(classNames[className]) && classNames[className] !== "") {
140
+ that.nativeElement.classList.add(classNames[className]);
141
+ }
142
+ }
143
+ continue;
144
+ }
145
+ if (props[prop] !== that.nativeElement[prop]) {
146
+ const normalizeProp = (str) => {
147
+ return str.replace(/-([a-z])/g, function (g) {
148
+ return g[1].toUpperCase();
149
+ });
150
+ };
151
+ if (prop === 'hover' || prop === 'active' || prop === 'focus' || prop === 'selected') {
152
+ that.nativeElement.setAttribute(prop, '');
153
+ }
154
+ const normalizedProp = normalizeProp(prop);
155
+ that.nativeElement[normalizedProp] = props[prop];
156
+ }
157
+ }
158
+ for (let eventName in events) {
159
+ that[eventName] = events[eventName];
160
+ that.nativeElement[eventName.toLowerCase()] = events[eventName];
161
+ }
162
+ if (initialize) {
163
+ if (that.onCreate) {
164
+ that.onCreate();
165
+ }
166
+ that.nativeElement.whenRendered(() => {
167
+ if (that.onReady) {
168
+ that.onReady();
169
+ }
170
+ });
171
+ }
172
+ // setup styles.
173
+ if (styles) {
174
+ for (let styleName in styles) {
175
+ that.nativeElement.style[styleName] = styles[styleName];
176
+ }
177
+ }
178
+ }
179
+ componentDidMount() {
180
+ this.componentDidRender(true);
181
+ }
182
+ componentDidUpdate() {
183
+ this.componentDidRender(false);
184
+ }
185
+ componentWillUnmount() {
186
+ const that = this;
187
+ if (!that.nativeElement) {
188
+ return;
189
+ }
190
+ that.nativeElement.whenRenderedCallbacks = [];
191
+ for (let i = 0; i < that.eventListeners.length; i++) {
192
+ const eventName = that.eventListeners[i];
193
+ that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
194
+ }
195
+ }
196
+ render() {
197
+ return (React.createElement("smart-menu-item", { ref: this.componentRef }, this.props.children));
198
+ }
199
+ }
36
200
 
37
- const Smart = window.Smart;
38
- /**
39
- Defines a menu item.
40
- */
41
- class MenuItem 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 = 'MenuItem' + Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
50
- }
51
- return this._id;
52
- }
53
- /**
54
- * Property type: boolean
55
- */
56
- get checked() {
57
- return this.nativeElement ? this.nativeElement.checked : undefined;
58
- }
59
- set checked(value) {
60
- if (this.nativeElement) {
61
- this.nativeElement.checked = value;
62
- }
63
- }
64
- /** Enables or disables element.
65
- * Property type: boolean
66
- */
67
- get disabled() {
68
- return this.nativeElement ? this.nativeElement.disabled : undefined;
69
- }
70
- set disabled(value) {
71
- if (this.nativeElement) {
72
- this.nativeElement.disabled = value;
73
- }
74
- }
75
- /**
76
- * Property type: any
77
- */
78
- get label() {
79
- return this.nativeElement ? this.nativeElement.label : undefined;
80
- }
81
- set label(value) {
82
- if (this.nativeElement) {
83
- this.nativeElement.label = value;
84
- }
85
- }
86
- /**
87
- * Property type: number
88
- */
89
- get level() {
90
- return this.nativeElement ? this.nativeElement.level : undefined;
91
- }
92
- set level(value) {
93
- if (this.nativeElement) {
94
- this.nativeElement.level = value;
95
- }
96
- }
97
- /**
98
- * Property type: boolean
99
- */
100
- get separator() {
101
- return this.nativeElement ? this.nativeElement.separator : undefined;
102
- }
103
- set separator(value) {
104
- if (this.nativeElement) {
105
- this.nativeElement.separator = value;
106
- }
107
- }
108
- /**
109
- * Property type: string
110
- */
111
- get shortcut() {
112
- return this.nativeElement ? this.nativeElement.shortcut : undefined;
113
- }
114
- set shortcut(value) {
115
- if (this.nativeElement) {
116
- this.nativeElement.shortcut = value;
117
- }
118
- }
119
- /**
120
- * Property type: any
121
- */
122
- get value() {
123
- return this.nativeElement ? this.nativeElement.value : undefined;
124
- }
125
- set value(value) {
126
- if (this.nativeElement) {
127
- this.nativeElement.value = value;
128
- }
129
- }
130
- // Gets the properties of the React component.
131
- get properties() {
132
- return ["checked", "disabled", "label", "level", "separator", "shortcut", "value"];
133
- }
134
- // Gets the events of the React component.
135
- get eventListeners() {
136
- return ["onCreate", "onReady"];
137
- }
138
- componentDidRender(initialize) {
139
- const that = this;
140
- const props = {};
141
- const events = {};
142
- let styles = null;
143
- for (let prop in that.props) {
144
- if (prop === 'children') {
145
- continue;
146
- }
147
- if (prop === 'style') {
148
- styles = that.props[prop];
149
- continue;
150
- }
151
- if (prop.startsWith('on') && that.properties.indexOf(prop) === -1) {
152
- events[prop] = that.props[prop];
153
- continue;
154
- }
155
- props[prop] = that.props[prop];
156
- }
157
- if (initialize) {
158
- that.nativeElement = this.componentRef.current;
159
- }
160
- for (let prop in props) {
161
- if (prop === 'class' || prop === 'className') {
162
- const classNames = props[prop].trim().split(' ');
163
- for (let className in classNames) {
164
- if (!that.nativeElement.classList.contains(classNames[className]) && classNames[className] !== "") {
165
- that.nativeElement.classList.add(classNames[className]);
166
- }
167
- }
168
- continue;
169
- }
170
- if (props[prop] !== that.nativeElement[prop]) {
171
- const normalizeProp = (str) => {
172
- return str.replace(/-([a-z])/g, function (g) {
173
- return g[1].toUpperCase();
174
- });
175
- };
176
- if (prop === 'hover' || prop === 'active' || prop === 'focus' || prop === 'selected') {
177
- that.nativeElement.setAttribute(prop, '');
178
- }
179
- const normalizedProp = normalizeProp(prop);
180
- that.nativeElement[normalizedProp] = props[prop];
181
- }
182
- }
183
- for (let eventName in events) {
184
- that[eventName] = events[eventName];
185
- that.nativeElement[eventName.toLowerCase()] = events[eventName];
186
- }
187
- if (initialize) {
188
- if (that.onCreate) {
189
- that.onCreate();
190
- }
191
- that.nativeElement.whenRendered(() => {
192
- if (that.onReady) {
193
- that.onReady();
194
- }
195
- });
196
- }
197
- // setup styles.
198
- if (styles) {
199
- for (let styleName in styles) {
200
- that.nativeElement.style[styleName] = styles[styleName];
201
- }
202
- }
203
- }
204
- componentDidMount() {
205
- this.componentDidRender(true);
206
- }
207
- componentDidUpdate() {
208
- this.componentDidRender(false);
209
- }
210
- componentWillUnmount() {
211
- const that = this;
212
- if (!that.nativeElement) {
213
- return;
214
- }
215
- that.nativeElement.whenRenderedCallbacks = [];
216
- for (let i = 0; i < that.eventListeners.length; i++) {
217
- const eventName = that.eventListeners[i];
218
- that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
219
- }
220
- }
221
- render() {
222
- return (React.createElement("smart-menu-item", { ref: this.componentRef }, this.props.children));
223
- }
224
- }
201
+ const Smart$1 = window.Smart;
202
+ /**
203
+ Defines a group of menu items.
204
+ */
205
+ class MenuItemsGroup extends React.Component {
206
+ constructor(props) {
207
+ super(props);
208
+ this.componentRef = React.createRef();
209
+ }
210
+ // Gets the id of the React component.
211
+ get id() {
212
+ if (!this._id) {
213
+ this._id = 'MenuItemsGroup' + Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
214
+ }
215
+ return this._id;
216
+ }
217
+ /**
218
+ * Property type: boolean
219
+ */
220
+ get checkable() {
221
+ return this.nativeElement ? this.nativeElement.checkable : undefined;
222
+ }
223
+ set checkable(value) {
224
+ if (this.nativeElement) {
225
+ this.nativeElement.checkable = value;
226
+ }
227
+ }
228
+ /**
229
+ * Property type: boolean
230
+ */
231
+ get checked() {
232
+ return this.nativeElement ? this.nativeElement.checked : undefined;
233
+ }
234
+ set checked(value) {
235
+ if (this.nativeElement) {
236
+ this.nativeElement.checked = value;
237
+ }
238
+ }
239
+ /**
240
+ * Property type: MenuCheckMode | string
241
+ */
242
+ get checkMode() {
243
+ return this.nativeElement ? this.nativeElement.checkMode : undefined;
244
+ }
245
+ set checkMode(value) {
246
+ if (this.nativeElement) {
247
+ this.nativeElement.checkMode = value;
248
+ }
249
+ }
250
+ /** Enables or disables element.
251
+ * Property type: boolean
252
+ */
253
+ get disabled() {
254
+ return this.nativeElement ? this.nativeElement.disabled : undefined;
255
+ }
256
+ set disabled(value) {
257
+ if (this.nativeElement) {
258
+ this.nativeElement.disabled = value;
259
+ }
260
+ }
261
+ /**
262
+ * Property type: number
263
+ */
264
+ get dropDownHeight() {
265
+ return this.nativeElement ? this.nativeElement.dropDownHeight : undefined;
266
+ }
267
+ set dropDownHeight(value) {
268
+ if (this.nativeElement) {
269
+ this.nativeElement.dropDownHeight = value;
270
+ }
271
+ }
272
+ /**
273
+ * Property type: boolean
274
+ */
275
+ get expanded() {
276
+ return this.nativeElement ? this.nativeElement.expanded : undefined;
277
+ }
278
+ set expanded(value) {
279
+ if (this.nativeElement) {
280
+ this.nativeElement.expanded = value;
281
+ }
282
+ }
283
+ /**
284
+ * Property type: any
285
+ */
286
+ get label() {
287
+ return this.nativeElement ? this.nativeElement.label : undefined;
288
+ }
289
+ set label(value) {
290
+ if (this.nativeElement) {
291
+ this.nativeElement.label = value;
292
+ }
293
+ }
294
+ /**
295
+ * Property type: number
296
+ */
297
+ get level() {
298
+ return this.nativeElement ? this.nativeElement.level : undefined;
299
+ }
300
+ set level(value) {
301
+ if (this.nativeElement) {
302
+ this.nativeElement.level = value;
303
+ }
304
+ }
305
+ /**
306
+ * Property type: boolean
307
+ */
308
+ get separator() {
309
+ return this.nativeElement ? this.nativeElement.separator : undefined;
310
+ }
311
+ set separator(value) {
312
+ if (this.nativeElement) {
313
+ this.nativeElement.separator = value;
314
+ }
315
+ }
316
+ /**
317
+ * Property type: any
318
+ */
319
+ get value() {
320
+ return this.nativeElement ? this.nativeElement.value : undefined;
321
+ }
322
+ set value(value) {
323
+ if (this.nativeElement) {
324
+ this.nativeElement.value = value;
325
+ }
326
+ }
327
+ // Gets the properties of the React component.
328
+ get properties() {
329
+ return ["checkable", "checked", "checkMode", "disabled", "dropDownHeight", "expanded", "label", "level", "separator", "value"];
330
+ }
331
+ // Gets the events of the React component.
332
+ get eventListeners() {
333
+ return ["onCreate", "onReady"];
334
+ }
335
+ componentDidRender(initialize) {
336
+ const that = this;
337
+ const props = {};
338
+ const events = {};
339
+ let styles = null;
340
+ for (let prop in that.props) {
341
+ if (prop === 'children') {
342
+ continue;
343
+ }
344
+ if (prop === 'style') {
345
+ styles = that.props[prop];
346
+ continue;
347
+ }
348
+ if (prop.startsWith('on') && that.properties.indexOf(prop) === -1) {
349
+ events[prop] = that.props[prop];
350
+ continue;
351
+ }
352
+ props[prop] = that.props[prop];
353
+ }
354
+ if (initialize) {
355
+ that.nativeElement = this.componentRef.current;
356
+ }
357
+ for (let prop in props) {
358
+ if (prop === 'class' || prop === 'className') {
359
+ const classNames = props[prop].trim().split(' ');
360
+ for (let className in classNames) {
361
+ if (!that.nativeElement.classList.contains(classNames[className]) && classNames[className] !== "") {
362
+ that.nativeElement.classList.add(classNames[className]);
363
+ }
364
+ }
365
+ continue;
366
+ }
367
+ if (props[prop] !== that.nativeElement[prop]) {
368
+ const normalizeProp = (str) => {
369
+ return str.replace(/-([a-z])/g, function (g) {
370
+ return g[1].toUpperCase();
371
+ });
372
+ };
373
+ if (prop === 'hover' || prop === 'active' || prop === 'focus' || prop === 'selected') {
374
+ that.nativeElement.setAttribute(prop, '');
375
+ }
376
+ const normalizedProp = normalizeProp(prop);
377
+ that.nativeElement[normalizedProp] = props[prop];
378
+ }
379
+ }
380
+ for (let eventName in events) {
381
+ that[eventName] = events[eventName];
382
+ that.nativeElement[eventName.toLowerCase()] = events[eventName];
383
+ }
384
+ if (initialize) {
385
+ if (that.onCreate) {
386
+ that.onCreate();
387
+ }
388
+ that.nativeElement.whenRendered(() => {
389
+ if (that.onReady) {
390
+ that.onReady();
391
+ }
392
+ });
393
+ }
394
+ // setup styles.
395
+ if (styles) {
396
+ for (let styleName in styles) {
397
+ that.nativeElement.style[styleName] = styles[styleName];
398
+ }
399
+ }
400
+ }
401
+ componentDidMount() {
402
+ this.componentDidRender(true);
403
+ }
404
+ componentDidUpdate() {
405
+ this.componentDidRender(false);
406
+ }
407
+ componentWillUnmount() {
408
+ const that = this;
409
+ if (!that.nativeElement) {
410
+ return;
411
+ }
412
+ that.nativeElement.whenRenderedCallbacks = [];
413
+ for (let i = 0; i < that.eventListeners.length; i++) {
414
+ const eventName = that.eventListeners[i];
415
+ that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
416
+ }
417
+ }
418
+ render() {
419
+ return (React.createElement("smart-menu-items-group", { ref: this.componentRef }, this.props.children));
420
+ }
421
+ }
225
422
 
226
- const Smart$1 = window.Smart;
227
- /**
228
- Defines a group of menu items.
229
- */
230
- class MenuItemsGroup extends React.Component {
231
- constructor(props) {
232
- super(props);
233
- this.componentRef = React.createRef();
234
- }
235
- // Gets the id of the React component.
236
- get id() {
237
- if (!this._id) {
238
- this._id = 'MenuItemsGroup' + Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
239
- }
240
- return this._id;
241
- }
242
- /**
243
- * Property type: boolean
244
- */
245
- get checkable() {
246
- return this.nativeElement ? this.nativeElement.checkable : undefined;
247
- }
248
- set checkable(value) {
249
- if (this.nativeElement) {
250
- this.nativeElement.checkable = value;
251
- }
252
- }
253
- /**
254
- * Property type: boolean
255
- */
256
- get checked() {
257
- return this.nativeElement ? this.nativeElement.checked : undefined;
258
- }
259
- set checked(value) {
260
- if (this.nativeElement) {
261
- this.nativeElement.checked = value;
262
- }
263
- }
264
- /**
265
- * Property type: MenuCheckMode | string
266
- */
267
- get checkMode() {
268
- return this.nativeElement ? this.nativeElement.checkMode : undefined;
269
- }
270
- set checkMode(value) {
271
- if (this.nativeElement) {
272
- this.nativeElement.checkMode = value;
273
- }
274
- }
275
- /** Enables or disables element.
276
- * Property type: boolean
277
- */
278
- get disabled() {
279
- return this.nativeElement ? this.nativeElement.disabled : undefined;
280
- }
281
- set disabled(value) {
282
- if (this.nativeElement) {
283
- this.nativeElement.disabled = value;
284
- }
285
- }
286
- /**
287
- * Property type: number
288
- */
289
- get dropDownHeight() {
290
- return this.nativeElement ? this.nativeElement.dropDownHeight : undefined;
291
- }
292
- set dropDownHeight(value) {
293
- if (this.nativeElement) {
294
- this.nativeElement.dropDownHeight = value;
295
- }
296
- }
297
- /**
298
- * Property type: boolean
299
- */
300
- get expanded() {
301
- return this.nativeElement ? this.nativeElement.expanded : undefined;
302
- }
303
- set expanded(value) {
304
- if (this.nativeElement) {
305
- this.nativeElement.expanded = value;
306
- }
307
- }
308
- /**
309
- * Property type: any
310
- */
311
- get label() {
312
- return this.nativeElement ? this.nativeElement.label : undefined;
313
- }
314
- set label(value) {
315
- if (this.nativeElement) {
316
- this.nativeElement.label = value;
317
- }
318
- }
319
- /**
320
- * Property type: number
321
- */
322
- get level() {
323
- return this.nativeElement ? this.nativeElement.level : undefined;
324
- }
325
- set level(value) {
326
- if (this.nativeElement) {
327
- this.nativeElement.level = value;
328
- }
329
- }
330
- /**
331
- * Property type: boolean
332
- */
333
- get separator() {
334
- return this.nativeElement ? this.nativeElement.separator : undefined;
335
- }
336
- set separator(value) {
337
- if (this.nativeElement) {
338
- this.nativeElement.separator = value;
339
- }
340
- }
341
- /**
342
- * Property type: any
343
- */
344
- get value() {
345
- return this.nativeElement ? this.nativeElement.value : undefined;
346
- }
347
- set value(value) {
348
- if (this.nativeElement) {
349
- this.nativeElement.value = value;
350
- }
351
- }
352
- // Gets the properties of the React component.
353
- get properties() {
354
- return ["checkable", "checked", "checkMode", "disabled", "dropDownHeight", "expanded", "label", "level", "separator", "value"];
355
- }
356
- // Gets the events of the React component.
357
- get eventListeners() {
358
- return ["onCreate", "onReady"];
359
- }
360
- componentDidRender(initialize) {
361
- const that = this;
362
- const props = {};
363
- const events = {};
364
- let styles = null;
365
- for (let prop in that.props) {
366
- if (prop === 'children') {
367
- continue;
368
- }
369
- if (prop === 'style') {
370
- styles = that.props[prop];
371
- continue;
372
- }
373
- if (prop.startsWith('on') && that.properties.indexOf(prop) === -1) {
374
- events[prop] = that.props[prop];
375
- continue;
376
- }
377
- props[prop] = that.props[prop];
378
- }
379
- if (initialize) {
380
- that.nativeElement = this.componentRef.current;
381
- }
382
- for (let prop in props) {
383
- if (prop === 'class' || prop === 'className') {
384
- const classNames = props[prop].trim().split(' ');
385
- for (let className in classNames) {
386
- if (!that.nativeElement.classList.contains(classNames[className]) && classNames[className] !== "") {
387
- that.nativeElement.classList.add(classNames[className]);
388
- }
389
- }
390
- continue;
391
- }
392
- if (props[prop] !== that.nativeElement[prop]) {
393
- const normalizeProp = (str) => {
394
- return str.replace(/-([a-z])/g, function (g) {
395
- return g[1].toUpperCase();
396
- });
397
- };
398
- if (prop === 'hover' || prop === 'active' || prop === 'focus' || prop === 'selected') {
399
- that.nativeElement.setAttribute(prop, '');
400
- }
401
- const normalizedProp = normalizeProp(prop);
402
- that.nativeElement[normalizedProp] = props[prop];
403
- }
404
- }
405
- for (let eventName in events) {
406
- that[eventName] = events[eventName];
407
- that.nativeElement[eventName.toLowerCase()] = events[eventName];
408
- }
409
- if (initialize) {
410
- if (that.onCreate) {
411
- that.onCreate();
412
- }
413
- that.nativeElement.whenRendered(() => {
414
- if (that.onReady) {
415
- that.onReady();
416
- }
417
- });
418
- }
419
- // setup styles.
420
- if (styles) {
421
- for (let styleName in styles) {
422
- that.nativeElement.style[styleName] = styles[styleName];
423
- }
424
- }
425
- }
426
- componentDidMount() {
427
- this.componentDidRender(true);
428
- }
429
- componentDidUpdate() {
430
- this.componentDidRender(false);
431
- }
432
- componentWillUnmount() {
433
- const that = this;
434
- if (!that.nativeElement) {
435
- return;
436
- }
437
- that.nativeElement.whenRenderedCallbacks = [];
438
- for (let i = 0; i < that.eventListeners.length; i++) {
439
- const eventName = that.eventListeners[i];
440
- that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
441
- }
442
- }
443
- render() {
444
- return (React.createElement("smart-menu-items-group", { ref: this.componentRef }, this.props.children));
445
- }
446
- }
423
+ const Smart$2 = window.Smart;
424
+ /**
425
+ ListMenu allows you to present users a listing of options and sub options.
426
+ */
427
+ class ListMenu extends React.Component {
428
+ constructor(props) {
429
+ super(props);
430
+ this.componentRef = React.createRef();
431
+ }
432
+ // Gets the id of the React component.
433
+ get id() {
434
+ if (!this._id) {
435
+ this._id = 'ListMenu' + Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
436
+ }
437
+ return this._id;
438
+ }
439
+ /** Sets or gets the animation mode. Animation is disabled when the property is set to 'none'
440
+ * Property type: Animation | string
441
+ */
442
+ get animation() {
443
+ return this.nativeElement ? this.nativeElement.animation : undefined;
444
+ }
445
+ set animation(value) {
446
+ if (this.nativeElement) {
447
+ this.nativeElement.animation = value;
448
+ }
449
+ }
450
+ /** Determines whether the element becomes focused on hover or not.
451
+ * Property type: boolean
452
+ */
453
+ get autoFocusOnMouseenter() {
454
+ return this.nativeElement ? this.nativeElement.autoFocusOnMouseenter : undefined;
455
+ }
456
+ set autoFocusOnMouseenter(value) {
457
+ if (this.nativeElement) {
458
+ this.nativeElement.autoFocusOnMouseenter = value;
459
+ }
460
+ }
461
+ /** Allows top-level ListMenu items to be checkable.
462
+ * Property type: boolean
463
+ */
464
+ get checkable() {
465
+ return this.nativeElement ? this.nativeElement.checkable : undefined;
466
+ }
467
+ set checkable(value) {
468
+ if (this.nativeElement) {
469
+ this.nativeElement.checkable = value;
470
+ }
471
+ }
472
+ /** Sets or gets whether checkboxes and radio buttons can be displayed in the top level menu groups. This property is applicable only to the ListMenu itself, and not its smart-menu-item/smart-menu-items-group subitems. See also the property checkable.
473
+ * Property type: boolean
474
+ */
475
+ get checkboxes() {
476
+ return this.nativeElement ? this.nativeElement.checkboxes : undefined;
477
+ }
478
+ set checkboxes(value) {
479
+ if (this.nativeElement) {
480
+ this.nativeElement.checkboxes = value;
481
+ }
482
+ }
483
+ /** Sets the check mode of top-level ListMenu items(groups).
484
+ * Property type: MenuCheckMode | string
485
+ */
486
+ get checkMode() {
487
+ return this.nativeElement ? this.nativeElement.checkMode : undefined;
488
+ }
489
+ set checkMode(value) {
490
+ if (this.nativeElement) {
491
+ this.nativeElement.checkMode = value;
492
+ }
493
+ }
494
+ /** Determines the data source that will be loaded to the ListMenu. The data source represents an array of objects with the following properties: label - a string representing the text content of the item.value - the value of the item.shortcut - a string representing a shortuct for the item. It will be displayed inside the item.items - allows to define an array of sub menu items.
495
+ * Property type: any
496
+ */
497
+ get dataSource() {
498
+ return this.nativeElement ? this.nativeElement.dataSource : undefined;
499
+ }
500
+ set dataSource(value) {
501
+ if (this.nativeElement) {
502
+ this.nativeElement.dataSource = value;
503
+ }
504
+ }
505
+ /** Enables or disables the element.
506
+ * Property type: boolean
507
+ */
508
+ get disabled() {
509
+ return this.nativeElement ? this.nativeElement.disabled : undefined;
510
+ }
511
+ set disabled(value) {
512
+ if (this.nativeElement) {
513
+ this.nativeElement.disabled = value;
514
+ }
515
+ }
516
+ /** Displays or hides the loading indicator. Loading indicator is hidden by default.
517
+ * Property type: boolean
518
+ */
519
+ get displayLoadingIndicator() {
520
+ return this.nativeElement ? this.nativeElement.displayLoadingIndicator : undefined;
521
+ }
522
+ set displayLoadingIndicator(value) {
523
+ if (this.nativeElement) {
524
+ this.nativeElement.displayLoadingIndicator = value;
525
+ }
526
+ }
527
+ /** Determines the field in the data source that corresponds to an item's label.
528
+ * Property type: string
529
+ */
530
+ get displayMember() {
531
+ return this.nativeElement ? this.nativeElement.displayMember : undefined;
532
+ }
533
+ set displayMember(value) {
534
+ if (this.nativeElement) {
535
+ this.nativeElement.displayMember = value;
536
+ }
537
+ }
538
+ /** Sets custom outer container where the minimized dropdown will be appednded. By default it is in the ListMenu. The value of the property can be an HTML element or the id of an HTML element.
539
+ * Property type: string | HTMLElement
540
+ */
541
+ get dropDownAppendTo() {
542
+ return this.nativeElement ? this.nativeElement.dropDownAppendTo : undefined;
543
+ }
544
+ set dropDownAppendTo(value) {
545
+ if (this.nativeElement) {
546
+ this.nativeElement.dropDownAppendTo = value;
547
+ }
548
+ }
549
+ /** If this property is enabled, when the element's minimized dropdown is opened, a transparent overlay is positioned between the dropdown and the rest of the document.
550
+ * Property type: boolean
551
+ */
552
+ get dropDownOverlay() {
553
+ return this.nativeElement ? this.nativeElement.dropDownOverlay : undefined;
554
+ }
555
+ set dropDownOverlay(value) {
556
+ if (this.nativeElement) {
557
+ this.nativeElement.dropDownOverlay = value;
558
+ }
559
+ }
560
+ /** Sets or gets the opening direction of the ListMenu minimized dropdown.
561
+ * Property type: MenuDropDownPosition | string
562
+ */
563
+ get dropDownPosition() {
564
+ return this.nativeElement ? this.nativeElement.dropDownPosition : undefined;
565
+ }
566
+ set dropDownPosition(value) {
567
+ if (this.nativeElement) {
568
+ this.nativeElement.dropDownPosition = value;
569
+ }
570
+ }
571
+ /** Enables or disables scrolling using the mouse wheel through overflowing menu items.
572
+ * Property type: boolean
573
+ */
574
+ get enableMouseWheelAction() {
575
+ return this.nativeElement ? this.nativeElement.enableMouseWheelAction : undefined;
576
+ }
577
+ set enableMouseWheelAction(value) {
578
+ if (this.nativeElement) {
579
+ this.nativeElement.enableMouseWheelAction = value;
580
+ }
581
+ }
582
+ /** Determines whether menu item filtering is enabled. When enabled a filter input is shown at the top of the element. Only items in the current view can be filtered.
583
+ * Property type: boolean
584
+ */
585
+ get filterable() {
586
+ return this.nativeElement ? this.nativeElement.filterable : undefined;
587
+ }
588
+ set filterable(value) {
589
+ if (this.nativeElement) {
590
+ this.nativeElement.filterable = value;
591
+ }
592
+ }
593
+ /** Determines the placeholder for the filter input.
594
+ * Property type: string
595
+ */
596
+ get filterInputPlaceholder() {
597
+ return this.nativeElement ? this.nativeElement.filterInputPlaceholder : undefined;
598
+ }
599
+ set filterInputPlaceholder(value) {
600
+ if (this.nativeElement) {
601
+ this.nativeElement.filterInputPlaceholder = value;
602
+ }
603
+ }
604
+ /** Determines the MenuItem property that will be used as a filtering criteria. By default the label property is used. It can be set to 'value' if the user wants to filter by the 'value' property or 'textContent' if the user wants to filter by text inside the MenuItem's content or any other property.
605
+ * Property type: string
606
+ */
607
+ get filterMember() {
608
+ return this.nativeElement ? this.nativeElement.filterMember : undefined;
609
+ }
610
+ set filterMember(value) {
611
+ if (this.nativeElement) {
612
+ this.nativeElement.filterMember = value;
613
+ }
614
+ }
615
+ /** Determines the filtering mode.
616
+ * Property type: FilterMode | string
617
+ */
618
+ get filterMode() {
619
+ return this.nativeElement ? this.nativeElement.filterMode : undefined;
620
+ }
621
+ set filterMode(value) {
622
+ if (this.nativeElement) {
623
+ this.nativeElement.filterMode = value;
624
+ }
625
+ }
626
+ /** If enabled, the items will be grouped by their first letter and sorted.
627
+ * Property type: boolean
628
+ */
629
+ get grouped() {
630
+ return this.nativeElement ? this.nativeElement.grouped : undefined;
631
+ }
632
+ set grouped(value) {
633
+ if (this.nativeElement) {
634
+ this.nativeElement.grouped = value;
635
+ }
636
+ }
637
+ /** Determines the field in the data source that corresponds to an item group's subitems collection.
638
+ * Property type: string
639
+ */
640
+ get itemsMember() {
641
+ return this.nativeElement ? this.nativeElement.itemsMember : undefined;
642
+ }
643
+ set itemsMember(value) {
644
+ if (this.nativeElement) {
645
+ this.nativeElement.itemsMember = value;
646
+ }
647
+ }
648
+ /** Determines the text that will be displayed next to the loading indicator when the loader is visible and it's position is top or bottom.
649
+ * Property type: string
650
+ */
651
+ get loadingIndicatorPlaceholder() {
652
+ return this.nativeElement ? this.nativeElement.loadingIndicatorPlaceholder : undefined;
653
+ }
654
+ set loadingIndicatorPlaceholder(value) {
655
+ if (this.nativeElement) {
656
+ this.nativeElement.loadingIndicatorPlaceholder = value;
657
+ }
658
+ }
659
+ /** Determines the position of the loading indicator inside the element.
660
+ * Property type: VerticalAlignment | string
661
+ */
662
+ get loadingIndicatorPosition() {
663
+ return this.nativeElement ? this.nativeElement.loadingIndicatorPosition : undefined;
664
+ }
665
+ set loadingIndicatorPosition(value) {
666
+ if (this.nativeElement) {
667
+ this.nativeElement.loadingIndicatorPosition = value;
668
+ }
669
+ }
670
+ /** Sets or gets the language. Used in conjunction with the property messages.
671
+ * Property type: string
672
+ */
673
+ get locale() {
674
+ return this.nativeElement ? this.nativeElement.locale : undefined;
675
+ }
676
+ set locale(value) {
677
+ if (this.nativeElement) {
678
+ this.nativeElement.locale = value;
679
+ }
680
+ }
681
+ /** Callback used to customize the format of the messages that are returned from the Localization Module.
682
+ * Property type: any
683
+ */
684
+ get localizeFormatFunction() {
685
+ return this.nativeElement ? this.nativeElement.localizeFormatFunction : undefined;
686
+ }
687
+ set localizeFormatFunction(value) {
688
+ if (this.nativeElement) {
689
+ this.nativeElement.localizeFormatFunction = value;
690
+ }
691
+ }
692
+ /** Sets or gets an object specifying strings used in the widget that can be localized. Used in conjunction with the property locale.
693
+ * Property type: any
694
+ */
695
+ get messages() {
696
+ return this.nativeElement ? this.nativeElement.messages : undefined;
697
+ }
698
+ set messages(value) {
699
+ if (this.nativeElement) {
700
+ this.nativeElement.messages = value;
701
+ }
702
+ }
703
+ /** Allows to load a custom minimize icon from an HTMLTemplateElement.The property acceps the id of an HTMLTemplateElement or it's direct instance.
704
+ * Property type: string
705
+ */
706
+ get minimizeIconTemplate() {
707
+ return this.nativeElement ? this.nativeElement.minimizeIconTemplate : undefined;
708
+ }
709
+ set minimizeIconTemplate(value) {
710
+ if (this.nativeElement) {
711
+ this.nativeElement.minimizeIconTemplate = value;
712
+ }
713
+ }
714
+ /** Determines the minimum width of the ListMenu at which it will switch from normal to minimized mode. If set to null, the ListMenu does not minimize automatically.
715
+ * Property type: number | null
716
+ */
717
+ get minimizeWidth() {
718
+ return this.nativeElement ? this.nativeElement.minimizeWidth : undefined;
719
+ }
720
+ set minimizeWidth(value) {
721
+ if (this.nativeElement) {
722
+ this.nativeElement.minimizeWidth = value;
723
+ }
724
+ }
725
+ /** Sets or gets the ListMenu's scroll buttons behavior.
726
+ * Property type: Overflow | string
727
+ */
728
+ get overflow() {
729
+ return this.nativeElement ? this.nativeElement.overflow : undefined;
730
+ }
731
+ set overflow(value) {
732
+ if (this.nativeElement) {
733
+ this.nativeElement.overflow = value;
734
+ }
735
+ }
736
+ /** If the element is readonly, users cannot interact with it.
737
+ * Property type: boolean
738
+ */
739
+ get readonly() {
740
+ return this.nativeElement ? this.nativeElement.readonly : undefined;
741
+ }
742
+ set readonly(value) {
743
+ if (this.nativeElement) {
744
+ this.nativeElement.readonly = value;
745
+ }
746
+ }
747
+ /** Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts.
748
+ * Property type: boolean
749
+ */
750
+ get rightToLeft() {
751
+ return this.nativeElement ? this.nativeElement.rightToLeft : undefined;
752
+ }
753
+ set rightToLeft(value) {
754
+ if (this.nativeElement) {
755
+ this.nativeElement.rightToLeft = value;
756
+ }
757
+ }
758
+ /** Determines whether to use scrollbar or scrollButtons when content overflows an element's box.
759
+ * Property type: ListMenuScrollMode | string
760
+ */
761
+ get scrollMode() {
762
+ return this.nativeElement ? this.nativeElement.scrollMode : undefined;
763
+ }
764
+ set scrollMode(value) {
765
+ if (this.nativeElement) {
766
+ this.nativeElement.scrollMode = value;
767
+ }
768
+ }
769
+ /** Determines the theme. Theme defines the look of the element
770
+ * Property type: string
771
+ */
772
+ get theme() {
773
+ return this.nativeElement ? this.nativeElement.theme : undefined;
774
+ }
775
+ set theme(value) {
776
+ if (this.nativeElement) {
777
+ this.nativeElement.theme = value;
778
+ }
779
+ }
780
+ /** If is set to true, the element cannot be focused.
781
+ * Property type: boolean
782
+ */
783
+ get unfocusable() {
784
+ return this.nativeElement ? this.nativeElement.unfocusable : undefined;
785
+ }
786
+ set unfocusable(value) {
787
+ if (this.nativeElement) {
788
+ this.nativeElement.unfocusable = value;
789
+ }
790
+ }
791
+ /** Determines the field in the data source that corresponds to an item's value.
792
+ * Property type: string
793
+ */
794
+ get valueMember() {
795
+ return this.nativeElement ? this.nativeElement.valueMember : undefined;
796
+ }
797
+ set valueMember(value) {
798
+ if (this.nativeElement) {
799
+ this.nativeElement.valueMember = value;
800
+ }
801
+ }
802
+ // Gets the properties of the React component.
803
+ get properties() {
804
+ return ["animation", "autoFocusOnMouseenter", "checkable", "checkboxes", "checkMode", "dataSource", "disabled", "displayLoadingIndicator", "displayMember", "dropDownAppendTo", "dropDownOverlay", "dropDownPosition", "enableMouseWheelAction", "filterable", "filterInputPlaceholder", "filterMember", "filterMode", "grouped", "itemsMember", "loadingIndicatorPlaceholder", "loadingIndicatorPosition", "locale", "localizeFormatFunction", "messages", "minimizeIconTemplate", "minimizeWidth", "overflow", "readonly", "rightToLeft", "scrollMode", "theme", "unfocusable", "valueMember"];
805
+ }
806
+ // Gets the events of the React component.
807
+ get eventListeners() {
808
+ return ["onExpand", "onItemCheckChange", "onItemClick", "onScrollBottomReached", "onSwipeleft", "onSwiperight", "onCreate", "onReady"];
809
+ }
810
+ /** Adds an item to the list.
811
+ * @param {HTMLElement} Item. A jqx-menu-item to add to the List Menu.
812
+ * @param {HTMLElement | string} Parent?. The jqx-menu-items-group (or its id or numeric path) to add the item to.
813
+ */
814
+ addItem(Item, Parent) {
815
+ if (this.nativeElement.isRendered) {
816
+ this.nativeElement.addItem(Item, Parent);
817
+ }
818
+ else {
819
+ this.nativeElement.whenRendered(() => {
820
+ this.nativeElement.addItem(Item, Parent);
821
+ });
822
+ }
823
+ }
824
+ /** Navigates to the previous page (smart-menu-items-group).
825
+ * @param {boolean} animation?. If set to false, disables collapse animation even if animation is enabled for the element
826
+ */
827
+ back(animation) {
828
+ if (this.nativeElement.isRendered) {
829
+ this.nativeElement.back(animation);
830
+ }
831
+ else {
832
+ this.nativeElement.whenRendered(() => {
833
+ this.nativeElement.back(animation);
834
+ });
835
+ }
836
+ }
837
+ /** Navigates to a particular page (smart-menu-items-group).
838
+ * @param {string} id. The id or numeric path of a page (jqx-menu-items-group).
839
+ */
840
+ changePage(id) {
841
+ if (this.nativeElement.isRendered) {
842
+ this.nativeElement.changePage(id);
843
+ }
844
+ else {
845
+ this.nativeElement.whenRendered(() => {
846
+ this.nativeElement.changePage(id);
847
+ });
848
+ }
849
+ }
850
+ /** Checks an item.
851
+ * @param {HTMLElement | string} item. jqx-menu-item/jqx-menu-items-group (or its id or numeric path).
852
+ */
853
+ checkItem(item) {
854
+ if (this.nativeElement.isRendered) {
855
+ this.nativeElement.checkItem(item);
856
+ }
857
+ else {
858
+ this.nativeElement.whenRendered(() => {
859
+ this.nativeElement.checkItem(item);
860
+ });
861
+ }
862
+ }
863
+ /** Gets an item by its id or numeric path.
864
+ * @param {string} id. The id or numeric path of an item
865
+ * @returns {HTMLElement}
866
+ */
867
+ getItem(id) {
868
+ const result = this.nativeElement.getItem(id);
869
+ return result;
870
+ }
871
+ /** Maximizes the List Menu.
872
+ */
873
+ maximize() {
874
+ if (this.nativeElement.isRendered) {
875
+ this.nativeElement.maximize();
876
+ }
877
+ else {
878
+ this.nativeElement.whenRendered(() => {
879
+ this.nativeElement.maximize();
880
+ });
881
+ }
882
+ }
883
+ /** Minimizes the List Menu. An icon is displayed and the menu is hidden when minimized.
884
+ */
885
+ minimize() {
886
+ if (this.nativeElement.isRendered) {
887
+ this.nativeElement.minimize();
888
+ }
889
+ else {
890
+ this.nativeElement.whenRendered(() => {
891
+ this.nativeElement.minimize();
892
+ });
893
+ }
894
+ }
895
+ /** Removes an item.
896
+ * @param {HTMLElement | string} item. The jqx-menu-item/jqx-menu-items-group (or its id or numeric path) to remove.
897
+ */
898
+ removeItem(item) {
899
+ if (this.nativeElement.isRendered) {
900
+ this.nativeElement.removeItem(item);
901
+ }
902
+ else {
903
+ this.nativeElement.whenRendered(() => {
904
+ this.nativeElement.removeItem(item);
905
+ });
906
+ }
907
+ }
908
+ /** Unchecks an item.
909
+ * @param {HTMLElement | string} item. jqx-menu-item/jqx-menu-items-group (or its id or numeric path).
910
+ */
911
+ uncheckItem(item) {
912
+ if (this.nativeElement.isRendered) {
913
+ this.nativeElement.uncheckItem(item);
914
+ }
915
+ else {
916
+ this.nativeElement.whenRendered(() => {
917
+ this.nativeElement.uncheckItem(item);
918
+ });
919
+ }
920
+ }
921
+ componentDidRender(initialize) {
922
+ const that = this;
923
+ const props = {};
924
+ const events = {};
925
+ let styles = null;
926
+ for (let prop in that.props) {
927
+ if (prop === 'children') {
928
+ continue;
929
+ }
930
+ if (prop === 'style') {
931
+ styles = that.props[prop];
932
+ continue;
933
+ }
934
+ if (prop.startsWith('on') && that.properties.indexOf(prop) === -1) {
935
+ events[prop] = that.props[prop];
936
+ continue;
937
+ }
938
+ props[prop] = that.props[prop];
939
+ }
940
+ if (initialize) {
941
+ that.nativeElement = this.componentRef.current;
942
+ }
943
+ for (let prop in props) {
944
+ if (prop === 'class' || prop === 'className') {
945
+ const classNames = props[prop].trim().split(' ');
946
+ for (let className in classNames) {
947
+ if (!that.nativeElement.classList.contains(classNames[className]) && classNames[className] !== "") {
948
+ that.nativeElement.classList.add(classNames[className]);
949
+ }
950
+ }
951
+ continue;
952
+ }
953
+ if (props[prop] !== that.nativeElement[prop]) {
954
+ const normalizeProp = (str) => {
955
+ return str.replace(/-([a-z])/g, function (g) {
956
+ return g[1].toUpperCase();
957
+ });
958
+ };
959
+ if (prop === 'hover' || prop === 'active' || prop === 'focus' || prop === 'selected') {
960
+ that.nativeElement.setAttribute(prop, '');
961
+ }
962
+ const normalizedProp = normalizeProp(prop);
963
+ that.nativeElement[normalizedProp] = props[prop];
964
+ }
965
+ }
966
+ for (let eventName in events) {
967
+ that[eventName] = events[eventName];
968
+ that.nativeElement[eventName.toLowerCase()] = events[eventName];
969
+ }
970
+ if (initialize) {
971
+ Smart$2.Render();
972
+ if (that.onCreate) {
973
+ that.onCreate();
974
+ }
975
+ that.nativeElement.whenRendered(() => {
976
+ if (that.onReady) {
977
+ that.onReady();
978
+ }
979
+ });
980
+ }
981
+ // setup styles.
982
+ if (styles) {
983
+ for (let styleName in styles) {
984
+ that.nativeElement.style[styleName] = styles[styleName];
985
+ }
986
+ }
987
+ }
988
+ componentDidMount() {
989
+ this.componentDidRender(true);
990
+ }
991
+ componentDidUpdate() {
992
+ this.componentDidRender(false);
993
+ }
994
+ componentWillUnmount() {
995
+ const that = this;
996
+ if (!that.nativeElement) {
997
+ return;
998
+ }
999
+ that.nativeElement.whenRenderedCallbacks = [];
1000
+ for (let i = 0; i < that.eventListeners.length; i++) {
1001
+ const eventName = that.eventListeners[i];
1002
+ that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
1003
+ }
1004
+ }
1005
+ render() {
1006
+ return (React.createElement("smart-list-menu", { ref: this.componentRef }, this.props.children));
1007
+ }
1008
+ }
447
1009
 
448
- const Smart$2 = window.Smart;
449
- /**
450
- ListMenu allows you to present users a listing of options and sub options.
451
- */
452
- class ListMenu extends React.Component {
453
- constructor(props) {
454
- super(props);
455
- this.componentRef = React.createRef();
456
- }
457
- // Gets the id of the React component.
458
- get id() {
459
- if (!this._id) {
460
- this._id = 'ListMenu' + Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
461
- }
462
- return this._id;
463
- }
464
- /** Sets or gets the animation mode. Animation is disabled when the property is set to 'none'
465
- * Property type: Animation | string
466
- */
467
- get animation() {
468
- return this.nativeElement ? this.nativeElement.animation : undefined;
469
- }
470
- set animation(value) {
471
- if (this.nativeElement) {
472
- this.nativeElement.animation = value;
473
- }
474
- }
475
- /** Determines whether the element becomes focused on hover or not.
476
- * Property type: boolean
477
- */
478
- get autoFocusOnMouseenter() {
479
- return this.nativeElement ? this.nativeElement.autoFocusOnMouseenter : undefined;
480
- }
481
- set autoFocusOnMouseenter(value) {
482
- if (this.nativeElement) {
483
- this.nativeElement.autoFocusOnMouseenter = value;
484
- }
485
- }
486
- /** Allows top-level ListMenu items to be checkable.
487
- * Property type: boolean
488
- */
489
- get checkable() {
490
- return this.nativeElement ? this.nativeElement.checkable : undefined;
491
- }
492
- set checkable(value) {
493
- if (this.nativeElement) {
494
- this.nativeElement.checkable = value;
495
- }
496
- }
497
- /** Sets or gets whether checkboxes and radio buttons can be displayed in the top level menu groups. This property is applicable only to the ListMenu itself, and not its smart-menu-item/smart-menu-items-group subitems. See also the property checkable.
498
- * Property type: boolean
499
- */
500
- get checkboxes() {
501
- return this.nativeElement ? this.nativeElement.checkboxes : undefined;
502
- }
503
- set checkboxes(value) {
504
- if (this.nativeElement) {
505
- this.nativeElement.checkboxes = value;
506
- }
507
- }
508
- /** Sets the check mode of top-level ListMenu items(groups).
509
- * Property type: MenuCheckMode | string
510
- */
511
- get checkMode() {
512
- return this.nativeElement ? this.nativeElement.checkMode : undefined;
513
- }
514
- set checkMode(value) {
515
- if (this.nativeElement) {
516
- this.nativeElement.checkMode = value;
517
- }
518
- }
519
- /** Determines the data source that will be loaded to the ListMenu. The data source represents an array of objects with the following properties: label - a string representing the text content of the item.value - the value of the item.shortcut - a string representing a shortuct for the item. It will be displayed inside the item.items - allows to define an array of sub menu items.
520
- * Property type: any
521
- */
522
- get dataSource() {
523
- return this.nativeElement ? this.nativeElement.dataSource : undefined;
524
- }
525
- set dataSource(value) {
526
- if (this.nativeElement) {
527
- this.nativeElement.dataSource = value;
528
- }
529
- }
530
- /** Enables or disables the element.
531
- * Property type: boolean
532
- */
533
- get disabled() {
534
- return this.nativeElement ? this.nativeElement.disabled : undefined;
535
- }
536
- set disabled(value) {
537
- if (this.nativeElement) {
538
- this.nativeElement.disabled = value;
539
- }
540
- }
541
- /** Displays or hides the loading indicator. Loading indicator is hidden by default.
542
- * Property type: boolean
543
- */
544
- get displayLoadingIndicator() {
545
- return this.nativeElement ? this.nativeElement.displayLoadingIndicator : undefined;
546
- }
547
- set displayLoadingIndicator(value) {
548
- if (this.nativeElement) {
549
- this.nativeElement.displayLoadingIndicator = value;
550
- }
551
- }
552
- /** Determines the field in the data source that corresponds to an item's label.
553
- * Property type: string
554
- */
555
- get displayMember() {
556
- return this.nativeElement ? this.nativeElement.displayMember : undefined;
557
- }
558
- set displayMember(value) {
559
- if (this.nativeElement) {
560
- this.nativeElement.displayMember = value;
561
- }
562
- }
563
- /** Sets custom outer container where the minimized dropdown will be appednded. By default it is in the ListMenu. The value of the property can be an HTML element or the id of an HTML element.
564
- * Property type: string | HTMLElement
565
- */
566
- get dropDownAppendTo() {
567
- return this.nativeElement ? this.nativeElement.dropDownAppendTo : undefined;
568
- }
569
- set dropDownAppendTo(value) {
570
- if (this.nativeElement) {
571
- this.nativeElement.dropDownAppendTo = value;
572
- }
573
- }
574
- /** If this property is enabled, when the element's minimized dropdown is opened, a transparent overlay is positioned between the dropdown and the rest of the document.
575
- * Property type: boolean
576
- */
577
- get dropDownOverlay() {
578
- return this.nativeElement ? this.nativeElement.dropDownOverlay : undefined;
579
- }
580
- set dropDownOverlay(value) {
581
- if (this.nativeElement) {
582
- this.nativeElement.dropDownOverlay = value;
583
- }
584
- }
585
- /** Sets or gets the opening direction of the ListMenu minimized dropdown.
586
- * Property type: MenuDropDownPosition | string
587
- */
588
- get dropDownPosition() {
589
- return this.nativeElement ? this.nativeElement.dropDownPosition : undefined;
590
- }
591
- set dropDownPosition(value) {
592
- if (this.nativeElement) {
593
- this.nativeElement.dropDownPosition = value;
594
- }
595
- }
596
- /** Enables or disables scrolling using the mouse wheel through overflowing menu items.
597
- * Property type: boolean
598
- */
599
- get enableMouseWheelAction() {
600
- return this.nativeElement ? this.nativeElement.enableMouseWheelAction : undefined;
601
- }
602
- set enableMouseWheelAction(value) {
603
- if (this.nativeElement) {
604
- this.nativeElement.enableMouseWheelAction = value;
605
- }
606
- }
607
- /** Determines whether menu item filtering is enabled. When enabled a filter input is shown at the top of the element. Only items in the current view can be filtered.
608
- * Property type: boolean
609
- */
610
- get filterable() {
611
- return this.nativeElement ? this.nativeElement.filterable : undefined;
612
- }
613
- set filterable(value) {
614
- if (this.nativeElement) {
615
- this.nativeElement.filterable = value;
616
- }
617
- }
618
- /** Determines the placeholder for the filter input.
619
- * Property type: string
620
- */
621
- get filterInputPlaceholder() {
622
- return this.nativeElement ? this.nativeElement.filterInputPlaceholder : undefined;
623
- }
624
- set filterInputPlaceholder(value) {
625
- if (this.nativeElement) {
626
- this.nativeElement.filterInputPlaceholder = value;
627
- }
628
- }
629
- /** Determines the MenuItem property that will be used as a filtering criteria. By default the label property is used. It can be set to 'value' if the user wants to filter by the 'value' property or 'textContent' if the user wants to filter by text inside the MenuItem's content or any other property.
630
- * Property type: string
631
- */
632
- get filterMember() {
633
- return this.nativeElement ? this.nativeElement.filterMember : undefined;
634
- }
635
- set filterMember(value) {
636
- if (this.nativeElement) {
637
- this.nativeElement.filterMember = value;
638
- }
639
- }
640
- /** Determines the filtering mode.
641
- * Property type: FilterMode | string
642
- */
643
- get filterMode() {
644
- return this.nativeElement ? this.nativeElement.filterMode : undefined;
645
- }
646
- set filterMode(value) {
647
- if (this.nativeElement) {
648
- this.nativeElement.filterMode = value;
649
- }
650
- }
651
- /** If enabled, the items will be grouped by their first letter and sorted.
652
- * Property type: boolean
653
- */
654
- get grouped() {
655
- return this.nativeElement ? this.nativeElement.grouped : undefined;
656
- }
657
- set grouped(value) {
658
- if (this.nativeElement) {
659
- this.nativeElement.grouped = value;
660
- }
661
- }
662
- /** Determines the field in the data source that corresponds to an item group's subitems collection.
663
- * Property type: string
664
- */
665
- get itemsMember() {
666
- return this.nativeElement ? this.nativeElement.itemsMember : undefined;
667
- }
668
- set itemsMember(value) {
669
- if (this.nativeElement) {
670
- this.nativeElement.itemsMember = value;
671
- }
672
- }
673
- /** Determines the text that will be displayed next to the loading indicator when the loader is visible and it's position is top or bottom.
674
- * Property type: string
675
- */
676
- get loadingIndicatorPlaceholder() {
677
- return this.nativeElement ? this.nativeElement.loadingIndicatorPlaceholder : undefined;
678
- }
679
- set loadingIndicatorPlaceholder(value) {
680
- if (this.nativeElement) {
681
- this.nativeElement.loadingIndicatorPlaceholder = value;
682
- }
683
- }
684
- /** Determines the position of the loading indicator inside the element.
685
- * Property type: VerticalAlignment | string
686
- */
687
- get loadingIndicatorPosition() {
688
- return this.nativeElement ? this.nativeElement.loadingIndicatorPosition : undefined;
689
- }
690
- set loadingIndicatorPosition(value) {
691
- if (this.nativeElement) {
692
- this.nativeElement.loadingIndicatorPosition = value;
693
- }
694
- }
695
- /** Sets or gets the language. Used in conjunction with the property messages.
696
- * Property type: string
697
- */
698
- get locale() {
699
- return this.nativeElement ? this.nativeElement.locale : undefined;
700
- }
701
- set locale(value) {
702
- if (this.nativeElement) {
703
- this.nativeElement.locale = value;
704
- }
705
- }
706
- /** Callback used to customize the format of the messages that are returned from the Localization Module.
707
- * Property type: any
708
- */
709
- get localizeFormatFunction() {
710
- return this.nativeElement ? this.nativeElement.localizeFormatFunction : undefined;
711
- }
712
- set localizeFormatFunction(value) {
713
- if (this.nativeElement) {
714
- this.nativeElement.localizeFormatFunction = value;
715
- }
716
- }
717
- /** Sets or gets an object specifying strings used in the widget that can be localized. Used in conjunction with the property locale.
718
- * Property type: any
719
- */
720
- get messages() {
721
- return this.nativeElement ? this.nativeElement.messages : undefined;
722
- }
723
- set messages(value) {
724
- if (this.nativeElement) {
725
- this.nativeElement.messages = value;
726
- }
727
- }
728
- /** Allows to load a custom minimize icon from an HTMLTemplateElement.The property acceps the id of an HTMLTemplateElement or it's direct instance.
729
- * Property type: string
730
- */
731
- get minimizeIconTemplate() {
732
- return this.nativeElement ? this.nativeElement.minimizeIconTemplate : undefined;
733
- }
734
- set minimizeIconTemplate(value) {
735
- if (this.nativeElement) {
736
- this.nativeElement.minimizeIconTemplate = value;
737
- }
738
- }
739
- /** Determines the minimum width of the ListMenu at which it will switch from normal to minimized mode. If set to null, the ListMenu does not minimize automatically.
740
- * Property type: number | null
741
- */
742
- get minimizeWidth() {
743
- return this.nativeElement ? this.nativeElement.minimizeWidth : undefined;
744
- }
745
- set minimizeWidth(value) {
746
- if (this.nativeElement) {
747
- this.nativeElement.minimizeWidth = value;
748
- }
749
- }
750
- /** Sets or gets the ListMenu's scroll buttons behavior.
751
- * Property type: Overflow | string
752
- */
753
- get overflow() {
754
- return this.nativeElement ? this.nativeElement.overflow : undefined;
755
- }
756
- set overflow(value) {
757
- if (this.nativeElement) {
758
- this.nativeElement.overflow = value;
759
- }
760
- }
761
- /** If the element is readonly, users cannot interact with it.
762
- * Property type: boolean
763
- */
764
- get readonly() {
765
- return this.nativeElement ? this.nativeElement.readonly : undefined;
766
- }
767
- set readonly(value) {
768
- if (this.nativeElement) {
769
- this.nativeElement.readonly = value;
770
- }
771
- }
772
- /** Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts.
773
- * Property type: boolean
774
- */
775
- get rightToLeft() {
776
- return this.nativeElement ? this.nativeElement.rightToLeft : undefined;
777
- }
778
- set rightToLeft(value) {
779
- if (this.nativeElement) {
780
- this.nativeElement.rightToLeft = value;
781
- }
782
- }
783
- /** Determines whether to use scrollbar or scrollButtons when content overflows an element's box.
784
- * Property type: ListMenuScrollMode | string
785
- */
786
- get scrollMode() {
787
- return this.nativeElement ? this.nativeElement.scrollMode : undefined;
788
- }
789
- set scrollMode(value) {
790
- if (this.nativeElement) {
791
- this.nativeElement.scrollMode = value;
792
- }
793
- }
794
- /** Determines the theme. Theme defines the look of the element
795
- * Property type: string
796
- */
797
- get theme() {
798
- return this.nativeElement ? this.nativeElement.theme : undefined;
799
- }
800
- set theme(value) {
801
- if (this.nativeElement) {
802
- this.nativeElement.theme = value;
803
- }
804
- }
805
- /** If is set to true, the element cannot be focused.
806
- * Property type: boolean
807
- */
808
- get unfocusable() {
809
- return this.nativeElement ? this.nativeElement.unfocusable : undefined;
810
- }
811
- set unfocusable(value) {
812
- if (this.nativeElement) {
813
- this.nativeElement.unfocusable = value;
814
- }
815
- }
816
- /** Determines the field in the data source that corresponds to an item's value.
817
- * Property type: string
818
- */
819
- get valueMember() {
820
- return this.nativeElement ? this.nativeElement.valueMember : undefined;
821
- }
822
- set valueMember(value) {
823
- if (this.nativeElement) {
824
- this.nativeElement.valueMember = value;
825
- }
826
- }
827
- // Gets the properties of the React component.
828
- get properties() {
829
- return ["animation", "autoFocusOnMouseenter", "checkable", "checkboxes", "checkMode", "dataSource", "disabled", "displayLoadingIndicator", "displayMember", "dropDownAppendTo", "dropDownOverlay", "dropDownPosition", "enableMouseWheelAction", "filterable", "filterInputPlaceholder", "filterMember", "filterMode", "grouped", "itemsMember", "loadingIndicatorPlaceholder", "loadingIndicatorPosition", "locale", "localizeFormatFunction", "messages", "minimizeIconTemplate", "minimizeWidth", "overflow", "readonly", "rightToLeft", "scrollMode", "theme", "unfocusable", "valueMember"];
830
- }
831
- // Gets the events of the React component.
832
- get eventListeners() {
833
- return ["onExpand", "onItemCheckChange", "onItemClick", "onScrollBottomReached", "onSwipeleft", "onSwiperight", "onCreate", "onReady"];
834
- }
835
- /** Adds an item to the list.
836
- * @param {HTMLElement} Item. A jqx-menu-item to add to the List Menu.
837
- * @param {HTMLElement | string} Parent?. The jqx-menu-items-group (or its id or numeric path) to add the item to.
838
- */
839
- addItem(Item, Parent) {
840
- if (this.nativeElement.isRendered) {
841
- this.nativeElement.addItem(Item, Parent);
842
- }
843
- else {
844
- this.nativeElement.whenRendered(() => {
845
- this.nativeElement.addItem(Item, Parent);
846
- });
847
- }
848
- }
849
- /** Navigates to the previous page (smart-menu-items-group).
850
- * @param {boolean} animation?. If set to false, disables collapse animation even if animation is enabled for the element
851
- */
852
- back(animation) {
853
- if (this.nativeElement.isRendered) {
854
- this.nativeElement.back(animation);
855
- }
856
- else {
857
- this.nativeElement.whenRendered(() => {
858
- this.nativeElement.back(animation);
859
- });
860
- }
861
- }
862
- /** Navigates to a particular page (smart-menu-items-group).
863
- * @param {string} id. The id or numeric path of a page (jqx-menu-items-group).
864
- */
865
- changePage(id) {
866
- if (this.nativeElement.isRendered) {
867
- this.nativeElement.changePage(id);
868
- }
869
- else {
870
- this.nativeElement.whenRendered(() => {
871
- this.nativeElement.changePage(id);
872
- });
873
- }
874
- }
875
- /** Checks an item.
876
- * @param {HTMLElement | string} item. jqx-menu-item/jqx-menu-items-group (or its id or numeric path).
877
- */
878
- checkItem(item) {
879
- if (this.nativeElement.isRendered) {
880
- this.nativeElement.checkItem(item);
881
- }
882
- else {
883
- this.nativeElement.whenRendered(() => {
884
- this.nativeElement.checkItem(item);
885
- });
886
- }
887
- }
888
- /** Gets an item by its id or numeric path.
889
- * @param {string} id. The id or numeric path of an item
890
- * @returns {HTMLElement}
891
- */
892
- getItem(id) {
893
- return __awaiter(this, void 0, void 0, function* () {
894
- const getResultOnRender = () => {
895
- return new Promise(resolve => {
896
- this.nativeElement.whenRendered(() => {
897
- const result = this.nativeElement.getItem(id);
898
- resolve(result);
899
- });
900
- });
901
- };
902
- const result = yield getResultOnRender();
903
- return result;
904
- });
905
- }
906
- /** Maximizes the List Menu.
907
- */
908
- maximize() {
909
- if (this.nativeElement.isRendered) {
910
- this.nativeElement.maximize();
911
- }
912
- else {
913
- this.nativeElement.whenRendered(() => {
914
- this.nativeElement.maximize();
915
- });
916
- }
917
- }
918
- /** Minimizes the List Menu. An icon is displayed and the menu is hidden when minimized.
919
- */
920
- minimize() {
921
- if (this.nativeElement.isRendered) {
922
- this.nativeElement.minimize();
923
- }
924
- else {
925
- this.nativeElement.whenRendered(() => {
926
- this.nativeElement.minimize();
927
- });
928
- }
929
- }
930
- /** Removes an item.
931
- * @param {HTMLElement | string} item. The jqx-menu-item/jqx-menu-items-group (or its id or numeric path) to remove.
932
- */
933
- removeItem(item) {
934
- if (this.nativeElement.isRendered) {
935
- this.nativeElement.removeItem(item);
936
- }
937
- else {
938
- this.nativeElement.whenRendered(() => {
939
- this.nativeElement.removeItem(item);
940
- });
941
- }
942
- }
943
- /** Unchecks an item.
944
- * @param {HTMLElement | string} item. jqx-menu-item/jqx-menu-items-group (or its id or numeric path).
945
- */
946
- uncheckItem(item) {
947
- if (this.nativeElement.isRendered) {
948
- this.nativeElement.uncheckItem(item);
949
- }
950
- else {
951
- this.nativeElement.whenRendered(() => {
952
- this.nativeElement.uncheckItem(item);
953
- });
954
- }
955
- }
956
- componentDidRender(initialize) {
957
- const that = this;
958
- const props = {};
959
- const events = {};
960
- let styles = null;
961
- for (let prop in that.props) {
962
- if (prop === 'children') {
963
- continue;
964
- }
965
- if (prop === 'style') {
966
- styles = that.props[prop];
967
- continue;
968
- }
969
- if (prop.startsWith('on') && that.properties.indexOf(prop) === -1) {
970
- events[prop] = that.props[prop];
971
- continue;
972
- }
973
- props[prop] = that.props[prop];
974
- }
975
- if (initialize) {
976
- that.nativeElement = this.componentRef.current;
977
- }
978
- for (let prop in props) {
979
- if (prop === 'class' || prop === 'className') {
980
- const classNames = props[prop].trim().split(' ');
981
- for (let className in classNames) {
982
- if (!that.nativeElement.classList.contains(classNames[className]) && classNames[className] !== "") {
983
- that.nativeElement.classList.add(classNames[className]);
984
- }
985
- }
986
- continue;
987
- }
988
- if (props[prop] !== that.nativeElement[prop]) {
989
- const normalizeProp = (str) => {
990
- return str.replace(/-([a-z])/g, function (g) {
991
- return g[1].toUpperCase();
992
- });
993
- };
994
- if (prop === 'hover' || prop === 'active' || prop === 'focus' || prop === 'selected') {
995
- that.nativeElement.setAttribute(prop, '');
996
- }
997
- const normalizedProp = normalizeProp(prop);
998
- that.nativeElement[normalizedProp] = props[prop];
999
- }
1000
- }
1001
- for (let eventName in events) {
1002
- that[eventName] = events[eventName];
1003
- that.nativeElement[eventName.toLowerCase()] = events[eventName];
1004
- }
1005
- if (initialize) {
1006
- Smart$2.Render();
1007
- if (that.onCreate) {
1008
- that.onCreate();
1009
- }
1010
- that.nativeElement.whenRendered(() => {
1011
- if (that.onReady) {
1012
- that.onReady();
1013
- }
1014
- });
1015
- }
1016
- // setup styles.
1017
- if (styles) {
1018
- for (let styleName in styles) {
1019
- that.nativeElement.style[styleName] = styles[styleName];
1020
- }
1021
- }
1022
- }
1023
- componentDidMount() {
1024
- this.componentDidRender(true);
1025
- }
1026
- componentDidUpdate() {
1027
- this.componentDidRender(false);
1028
- }
1029
- componentWillUnmount() {
1030
- const that = this;
1031
- if (!that.nativeElement) {
1032
- return;
1033
- }
1034
- that.nativeElement.whenRenderedCallbacks = [];
1035
- for (let i = 0; i < that.eventListeners.length; i++) {
1036
- const eventName = that.eventListeners[i];
1037
- that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
1038
- }
1039
- }
1040
- render() {
1041
- return (React.createElement("smart-list-menu", { ref: this.componentRef }, this.props.children));
1042
- }
1043
- }
1010
+ exports.Smart = Smart$2;
1011
+ exports.ListMenu = ListMenu;
1012
+ exports.default = ListMenu;
1013
+ exports.MenuItem = MenuItem;
1014
+ exports.MenuItemsGroup = MenuItemsGroup;
1044
1015
 
1045
- exports.Smart = Smart$2;
1046
- exports.ListMenu = ListMenu;
1047
- exports.default = ListMenu;
1048
- exports.MenuItem = MenuItem;
1049
- exports.MenuItemsGroup = MenuItemsGroup;
1050
-
1051
- Object.defineProperty(exports, '__esModule', { value: true });
1016
+ Object.defineProperty(exports, '__esModule', { value: true });
1052
1017
 
1053
1018
  })));