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
package/menu/menu.umd.js CHANGED
@@ -2,1072 +2,1037 @@
2
2
  require('../source/modules/smart.menu');
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.menu = {}),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.menu = {}),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
+ Horizontal, Vertical and Popup Menu. Popup Menus appear when a user taps an interactive UI element such as an icon, button, action, or content, such as selected items or text.
426
+ */
427
+ class Menu 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 = 'Menu' + 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 delay (in milliseconds) before a Menu dropdown is closed when leaving the Menu with the mouse. Applicable only when selectionMode is 'mouseenter'.
451
+ * Property type: number
452
+ */
453
+ get autoCloseDelay() {
454
+ return this.nativeElement ? this.nativeElement.autoCloseDelay : undefined;
455
+ }
456
+ set autoCloseDelay(value) {
457
+ if (this.nativeElement) {
458
+ this.nativeElement.autoCloseDelay = value;
459
+ }
460
+ }
461
+ /** If set to true, on mouseenter, the element receives focus automatically.
462
+ * Property type: boolean
463
+ */
464
+ get autoFocusOnMouseenter() {
465
+ return this.nativeElement ? this.nativeElement.autoFocusOnMouseenter : undefined;
466
+ }
467
+ set autoFocusOnMouseenter(value) {
468
+ if (this.nativeElement) {
469
+ this.nativeElement.autoFocusOnMouseenter = value;
470
+ }
471
+ }
472
+ /** Allows top-level Menu items (immediate children of the Menu) to be checkable. Sublevels are controlled by setting checkable to the respective smart-menu-items-group.
473
+ * Property type: boolean
474
+ */
475
+ get checkable() {
476
+ return this.nativeElement ? this.nativeElement.checkable : undefined;
477
+ }
478
+ set checkable(value) {
479
+ if (this.nativeElement) {
480
+ this.nativeElement.checkable = value;
481
+ }
482
+ }
483
+ /** Sets or gets whether checkboxes and radio buttons can be displayed in the Menu. This property is applicable only to the Menu itself, and not its smart-menu-item/smart-menu-items-group subitems. See also the property checkable.
484
+ * Property type: boolean
485
+ */
486
+ get checkboxes() {
487
+ return this.nativeElement ? this.nativeElement.checkboxes : undefined;
488
+ }
489
+ set checkboxes(value) {
490
+ if (this.nativeElement) {
491
+ this.nativeElement.checkboxes = value;
492
+ }
493
+ }
494
+ /** Sets the check mode of top-level Menu items (immediate children of the Menu). checkMode can be set to 'checkbox', 'radioButton', or a comma-separated list containing 'checkbox', 'radioButton', or 'none' (e.g. 'checkbox, radioButton, none, checkbox'). When set to a list, each value in the list is applied to groups of Menu items separated by an item with separator (item after the one with separator is the start of a new checkMode context). Sublevels are controlled by setting checkMode to the respective smart-menu-items-group.
495
+ * Property type: MenuCheckMode | string
496
+ */
497
+ get checkMode() {
498
+ return this.nativeElement ? this.nativeElement.checkMode : undefined;
499
+ }
500
+ set checkMode(value) {
501
+ if (this.nativeElement) {
502
+ this.nativeElement.checkMode = value;
503
+ }
504
+ }
505
+ /** Sets the document event which closes any open Menu drop downs (or the Menu itself when mode is 'dropDown').
506
+ * Property type: MenuCloseAction | string
507
+ */
508
+ get closeAction() {
509
+ return this.nativeElement ? this.nativeElement.closeAction : undefined;
510
+ }
511
+ set closeAction(value) {
512
+ if (this.nativeElement) {
513
+ this.nativeElement.closeAction = value;
514
+ }
515
+ }
516
+ /** Determines the data source that will be loaded to the Menu. 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.
517
+ * Property type: any
518
+ */
519
+ get dataSource() {
520
+ return this.nativeElement ? this.nativeElement.dataSource : undefined;
521
+ }
522
+ set dataSource(value) {
523
+ if (this.nativeElement) {
524
+ this.nativeElement.dataSource = value;
525
+ }
526
+ }
527
+ /** Enables or disables element.
528
+ * Property type: boolean
529
+ */
530
+ get disabled() {
531
+ return this.nativeElement ? this.nativeElement.disabled : undefined;
532
+ }
533
+ set disabled(value) {
534
+ if (this.nativeElement) {
535
+ this.nativeElement.disabled = value;
536
+ }
537
+ }
538
+ /** Determines the field in the data source that corresponds to an item's label.
539
+ * Property type: string
540
+ */
541
+ get displayMember() {
542
+ return this.nativeElement ? this.nativeElement.displayMember : undefined;
543
+ }
544
+ set displayMember(value) {
545
+ if (this.nativeElement) {
546
+ this.nativeElement.displayMember = value;
547
+ }
548
+ }
549
+ /** Sets custom outer container, where all dropdown containers must be appended. By default they are inside the menu. The value of the property can be an HTML element or the id of an HTML element. In mode 'dropDown', the property dropDownAppendTo also controls the parent element of the whole Menu. The open method works relatively to the original place of the Menu in the DOM.
550
+ * Property type: string | HTMLElement
551
+ */
552
+ get dropDownAppendTo() {
553
+ return this.nativeElement ? this.nativeElement.dropDownAppendTo : undefined;
554
+ }
555
+ set dropDownAppendTo(value) {
556
+ if (this.nativeElement) {
557
+ this.nativeElement.dropDownAppendTo = value;
558
+ }
559
+ }
560
+ /** If this property is enabled, when an element's dropdown is opened, a transparent overlay is positioned between the dropdown and the rest of the document.
561
+ * Property type: boolean
562
+ */
563
+ get dropDownOverlay() {
564
+ return this.nativeElement ? this.nativeElement.dropDownOverlay : undefined;
565
+ }
566
+ set dropDownOverlay(value) {
567
+ if (this.nativeElement) {
568
+ this.nativeElement.dropDownOverlay = value;
569
+ }
570
+ }
571
+ /** Determines the opening direction of Menu dropdowns.
572
+ * Property type: MenuDropDownPosition | string
573
+ */
574
+ get dropDownPosition() {
575
+ return this.nativeElement ? this.nativeElement.dropDownPosition : undefined;
576
+ }
577
+ set dropDownPosition(value) {
578
+ if (this.nativeElement) {
579
+ this.nativeElement.dropDownPosition = value;
580
+ }
581
+ }
582
+ /** A getter that returns an array of all Menu items.
583
+ * Property type: any
584
+ */
585
+ get items() {
586
+ return this.nativeElement ? this.nativeElement.items : undefined;
587
+ }
588
+ set items(value) {
589
+ if (this.nativeElement) {
590
+ this.nativeElement.items = value;
591
+ }
592
+ }
593
+ /** Determines the field in the data source that corresponds to an item group's subitems collection.
594
+ * Property type: string
595
+ */
596
+ get itemsMember() {
597
+ return this.nativeElement ? this.nativeElement.itemsMember : undefined;
598
+ }
599
+ set itemsMember(value) {
600
+ if (this.nativeElement) {
601
+ this.nativeElement.itemsMember = value;
602
+ }
603
+ }
604
+ /** Sets or gets the language. Used in conjunction with the property messages.
605
+ * Property type: string
606
+ */
607
+ get locale() {
608
+ return this.nativeElement ? this.nativeElement.locale : undefined;
609
+ }
610
+ set locale(value) {
611
+ if (this.nativeElement) {
612
+ this.nativeElement.locale = value;
613
+ }
614
+ }
615
+ /** Callback used to customize the format of the messages that are returned from the Localization Module.
616
+ * Property type: any
617
+ */
618
+ get localizeFormatFunction() {
619
+ return this.nativeElement ? this.nativeElement.localizeFormatFunction : undefined;
620
+ }
621
+ set localizeFormatFunction(value) {
622
+ if (this.nativeElement) {
623
+ this.nativeElement.localizeFormatFunction = value;
624
+ }
625
+ }
626
+ /** Sets or gets an object specifying strings used in the widget that can be localized. Used in conjunction with the property locale.
627
+ * Property type: any
628
+ */
629
+ get messages() {
630
+ return this.nativeElement ? this.nativeElement.messages : undefined;
631
+ }
632
+ set messages(value) {
633
+ if (this.nativeElement) {
634
+ this.nativeElement.messages = value;
635
+ }
636
+ }
637
+ /** Used to load a custom minimize icon from an HTMLTemplateElement object. The HTMLTemplateElement is selected by it's id.
638
+ * Property type: string
639
+ */
640
+ get minimizeIconTemplate() {
641
+ return this.nativeElement ? this.nativeElement.minimizeIconTemplate : undefined;
642
+ }
643
+ set minimizeIconTemplate(value) {
644
+ if (this.nativeElement) {
645
+ this.nativeElement.minimizeIconTemplate = value;
646
+ }
647
+ }
648
+ /** Determines the minimum width of the Menu at which it will switch from normal to minimized mode. If set to null, the Menu does not minimize automatically.
649
+ * Property type: number
650
+ */
651
+ get minimizeWidth() {
652
+ return this.nativeElement ? this.nativeElement.minimizeWidth : undefined;
653
+ }
654
+ set minimizeWidth(value) {
655
+ if (this.nativeElement) {
656
+ this.nativeElement.minimizeWidth = value;
657
+ }
658
+ }
659
+ /** Determines the menu's display mode.
660
+ * Property type: MenuMode | string
661
+ */
662
+ get mode() {
663
+ return this.nativeElement ? this.nativeElement.mode : undefined;
664
+ }
665
+ set mode(value) {
666
+ if (this.nativeElement) {
667
+ this.nativeElement.mode = value;
668
+ }
669
+ }
670
+ /** Opens or closes thte menu when it's in 'dropDown' mode.
671
+ * Property type: boolean
672
+ */
673
+ get opened() {
674
+ return this.nativeElement ? this.nativeElement.opened : undefined;
675
+ }
676
+ set opened(value) {
677
+ if (this.nativeElement) {
678
+ this.nativeElement.opened = value;
679
+ }
680
+ }
681
+ /** Sets or gets the menu's scroll buttons behavior. Applicable only when dropDownAppendTo is not null.
682
+ * Property type: Overflow | string
683
+ */
684
+ get overflow() {
685
+ return this.nativeElement ? this.nativeElement.overflow : undefined;
686
+ }
687
+ set overflow(value) {
688
+ if (this.nativeElement) {
689
+ this.nativeElement.overflow = value;
690
+ }
691
+ }
692
+ /** If set to true, prevents the closing of the Menu or its dropdowns when Menu items are checked/unchecked.
693
+ * Property type: boolean
694
+ */
695
+ get preventCloseOnCheck() {
696
+ return this.nativeElement ? this.nativeElement.preventCloseOnCheck : undefined;
697
+ }
698
+ set preventCloseOnCheck(value) {
699
+ if (this.nativeElement) {
700
+ this.nativeElement.preventCloseOnCheck = value;
701
+ }
702
+ }
703
+ /** If the element is readonly, users cannot interact with it.
704
+ * Property type: boolean
705
+ */
706
+ get readonly() {
707
+ return this.nativeElement ? this.nativeElement.readonly : undefined;
708
+ }
709
+ set readonly(value) {
710
+ if (this.nativeElement) {
711
+ this.nativeElement.readonly = value;
712
+ }
713
+ }
714
+ /** Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts.
715
+ * Property type: boolean
716
+ */
717
+ get rightToLeft() {
718
+ return this.nativeElement ? this.nativeElement.rightToLeft : undefined;
719
+ }
720
+ set rightToLeft(value) {
721
+ if (this.nativeElement) {
722
+ this.nativeElement.rightToLeft = value;
723
+ }
724
+ }
725
+ /** Determines the menu's selection mode.
726
+ * Property type: MenuSelectionMode | string
727
+ */
728
+ get selectionMode() {
729
+ return this.nativeElement ? this.nativeElement.selectionMode : undefined;
730
+ }
731
+ set selectionMode(value) {
732
+ if (this.nativeElement) {
733
+ this.nativeElement.selectionMode = value;
734
+ }
735
+ }
736
+ /** Determines the theme. Theme defines the look of the element
737
+ * Property type: string
738
+ */
739
+ get theme() {
740
+ return this.nativeElement ? this.nativeElement.theme : undefined;
741
+ }
742
+ set theme(value) {
743
+ if (this.nativeElement) {
744
+ this.nativeElement.theme = value;
745
+ }
746
+ }
747
+ /** If is set to true, the element cannot be focused.
748
+ * Property type: boolean
749
+ */
750
+ get unfocusable() {
751
+ return this.nativeElement ? this.nativeElement.unfocusable : undefined;
752
+ }
753
+ set unfocusable(value) {
754
+ if (this.nativeElement) {
755
+ this.nativeElement.unfocusable = value;
756
+ }
757
+ }
758
+ /** Determines the field in the data source that corresponds to an item's value.
759
+ * Property type: string
760
+ */
761
+ get valueMember() {
762
+ return this.nativeElement ? this.nativeElement.valueMember : undefined;
763
+ }
764
+ set valueMember(value) {
765
+ if (this.nativeElement) {
766
+ this.nativeElement.valueMember = value;
767
+ }
768
+ }
769
+ // Gets the properties of the React component.
770
+ get properties() {
771
+ return ["animation", "autoCloseDelay", "autoFocusOnMouseenter", "checkable", "checkboxes", "checkMode", "closeAction", "dataSource", "disabled", "displayMember", "dropDownAppendTo", "dropDownOverlay", "dropDownPosition", "items", "itemsMember", "locale", "localizeFormatFunction", "messages", "minimizeIconTemplate", "minimizeWidth", "mode", "opened", "overflow", "preventCloseOnCheck", "readonly", "rightToLeft", "selectionMode", "theme", "unfocusable", "valueMember"];
772
+ }
773
+ // Gets the events of the React component.
774
+ get eventListeners() {
775
+ return ["onClose", "onClosing", "onCollapse", "onCollapsing", "onExpand", "onExpanding", "onItemCheckChange", "onItemClick", "onOpen", "onOpening", "onCreate", "onReady"];
776
+ }
777
+ /** Adds an item to the menu.
778
+ * @param {HTMLElement} Item. A jqx-menu-item to add to the Menu.
779
+ * @param {HTMLElement | string} Parent?. The jqx-menu-items-group or its id or numeric path to add the item to.
780
+ */
781
+ addItem(Item, Parent) {
782
+ if (this.nativeElement.isRendered) {
783
+ this.nativeElement.addItem(Item, Parent);
784
+ }
785
+ else {
786
+ this.nativeElement.whenRendered(() => {
787
+ this.nativeElement.addItem(Item, Parent);
788
+ });
789
+ }
790
+ }
791
+ /** Checks an item.
792
+ * @param {HTMLElement | string} item. jqx-menu-item/jqx-menu-items-group or its id or numeric path.
793
+ */
794
+ checkItem(item) {
795
+ if (this.nativeElement.isRendered) {
796
+ this.nativeElement.checkItem(item);
797
+ }
798
+ else {
799
+ this.nativeElement.whenRendered(() => {
800
+ this.nativeElement.checkItem(item);
801
+ });
802
+ }
803
+ }
804
+ /** Clears all Menu items.
805
+ */
806
+ clear() {
807
+ if (this.nativeElement.isRendered) {
808
+ this.nativeElement.clear();
809
+ }
810
+ else {
811
+ this.nativeElement.whenRendered(() => {
812
+ this.nativeElement.clear();
813
+ });
814
+ }
815
+ }
816
+ /** Clicks on an item programatically.
817
+ * @param {HTMLElement | string} item. jqx-menu-item/jqx-menu-items-group or its id or numeric path.
818
+ */
819
+ clickItem(item) {
820
+ if (this.nativeElement.isRendered) {
821
+ this.nativeElement.clickItem(item);
822
+ }
823
+ else {
824
+ this.nativeElement.whenRendered(() => {
825
+ this.nativeElement.clickItem(item);
826
+ });
827
+ }
828
+ }
829
+ /** Closes the Menu when mode is 'dropDown'.
830
+ */
831
+ close() {
832
+ if (this.nativeElement.isRendered) {
833
+ this.nativeElement.close();
834
+ }
835
+ else {
836
+ this.nativeElement.whenRendered(() => {
837
+ this.nativeElement.close();
838
+ });
839
+ }
840
+ }
841
+ /** Collapses an item.
842
+ * @param {HTMLElement | string} item?. jqx-menu-item/jqx-menu-items-group or its id or numeric path. If no item is passed, all open items are collapsed.
843
+ * @param {boolean} animation?. If set to false, disables collapse animation even if animation is enabled for the element.
844
+ */
845
+ collapseItem(item, animation) {
846
+ if (this.nativeElement.isRendered) {
847
+ this.nativeElement.collapseItem(item, animation);
848
+ }
849
+ else {
850
+ this.nativeElement.whenRendered(() => {
851
+ this.nativeElement.collapseItem(item, animation);
852
+ });
853
+ }
854
+ }
855
+ /** Expands an item.
856
+ * @param {HTMLElement | string} item. jqx-menu-item/jqx-menu-items-group or its id or numeric path.
857
+ * @param {boolean} animation?. If set to false, disables expand animation even if animation is enabled for the element.
858
+ */
859
+ expandItem(item, animation) {
860
+ if (this.nativeElement.isRendered) {
861
+ this.nativeElement.expandItem(item, animation);
862
+ }
863
+ else {
864
+ this.nativeElement.whenRendered(() => {
865
+ this.nativeElement.expandItem(item, animation);
866
+ });
867
+ }
868
+ }
869
+ /** Gets an item by its id or numeric path.
870
+ * @param {string} id. The id or numeric path of an item
871
+ * @returns {HTMLElement}
872
+ */
873
+ getItem(id) {
874
+ const result = this.nativeElement.getItem(id);
875
+ return result;
876
+ }
877
+ /** Maximizes the Menu.
878
+ */
879
+ maximize() {
880
+ if (this.nativeElement.isRendered) {
881
+ this.nativeElement.maximize();
882
+ }
883
+ else {
884
+ this.nativeElement.whenRendered(() => {
885
+ this.nativeElement.maximize();
886
+ });
887
+ }
888
+ }
889
+ /** Minimizes the Menu.
890
+ */
891
+ minimize() {
892
+ if (this.nativeElement.isRendered) {
893
+ this.nativeElement.minimize();
894
+ }
895
+ else {
896
+ this.nativeElement.whenRendered(() => {
897
+ this.nativeElement.minimize();
898
+ });
899
+ }
900
+ }
901
+ /** Opens the Menu when mode is 'dropDown'.
902
+ * @param {number} left. Horizontal position
903
+ * @param {number} top. Vertical position
904
+ */
905
+ open(left, top) {
906
+ if (this.nativeElement.isRendered) {
907
+ this.nativeElement.open(left, top);
908
+ }
909
+ else {
910
+ this.nativeElement.whenRendered(() => {
911
+ this.nativeElement.open(left, top);
912
+ });
913
+ }
914
+ }
915
+ /** Removes an item from the menu.
916
+ * @param {HTMLElement | string} item. The jqx-menu-item/jqx-menu-items-group or its id or numeric path to remove.
917
+ */
918
+ removeItem(item) {
919
+ if (this.nativeElement.isRendered) {
920
+ this.nativeElement.removeItem(item);
921
+ }
922
+ else {
923
+ this.nativeElement.whenRendered(() => {
924
+ this.nativeElement.removeItem(item);
925
+ });
926
+ }
927
+ }
928
+ /** Unchecks an item.
929
+ * @param {HTMLElement | string} item. jqx-menu-item/jqx-menu-items-group (or its id or numeric path)
930
+ */
931
+ uncheckItem(item) {
932
+ if (this.nativeElement.isRendered) {
933
+ this.nativeElement.uncheckItem(item);
934
+ }
935
+ else {
936
+ this.nativeElement.whenRendered(() => {
937
+ this.nativeElement.uncheckItem(item);
938
+ });
939
+ }
940
+ }
941
+ componentDidRender(initialize) {
942
+ const that = this;
943
+ const props = {};
944
+ const events = {};
945
+ let styles = null;
946
+ for (let prop in that.props) {
947
+ if (prop === 'children') {
948
+ continue;
949
+ }
950
+ if (prop === 'style') {
951
+ styles = that.props[prop];
952
+ continue;
953
+ }
954
+ if (prop.startsWith('on') && that.properties.indexOf(prop) === -1) {
955
+ events[prop] = that.props[prop];
956
+ continue;
957
+ }
958
+ props[prop] = that.props[prop];
959
+ }
960
+ if (initialize) {
961
+ that.nativeElement = this.componentRef.current;
962
+ }
963
+ for (let prop in props) {
964
+ if (prop === 'class' || prop === 'className') {
965
+ const classNames = props[prop].trim().split(' ');
966
+ for (let className in classNames) {
967
+ if (!that.nativeElement.classList.contains(classNames[className]) && classNames[className] !== "") {
968
+ that.nativeElement.classList.add(classNames[className]);
969
+ }
970
+ }
971
+ continue;
972
+ }
973
+ if (props[prop] !== that.nativeElement[prop]) {
974
+ const normalizeProp = (str) => {
975
+ return str.replace(/-([a-z])/g, function (g) {
976
+ return g[1].toUpperCase();
977
+ });
978
+ };
979
+ if (prop === 'hover' || prop === 'active' || prop === 'focus' || prop === 'selected') {
980
+ that.nativeElement.setAttribute(prop, '');
981
+ }
982
+ const normalizedProp = normalizeProp(prop);
983
+ that.nativeElement[normalizedProp] = props[prop];
984
+ }
985
+ }
986
+ for (let eventName in events) {
987
+ that[eventName] = events[eventName];
988
+ that.nativeElement[eventName.toLowerCase()] = events[eventName];
989
+ }
990
+ if (initialize) {
991
+ Smart$2.Render();
992
+ if (that.onCreate) {
993
+ that.onCreate();
994
+ }
995
+ that.nativeElement.whenRendered(() => {
996
+ if (that.onReady) {
997
+ that.onReady();
998
+ }
999
+ });
1000
+ }
1001
+ // setup styles.
1002
+ if (styles) {
1003
+ for (let styleName in styles) {
1004
+ that.nativeElement.style[styleName] = styles[styleName];
1005
+ }
1006
+ }
1007
+ }
1008
+ componentDidMount() {
1009
+ this.componentDidRender(true);
1010
+ }
1011
+ componentDidUpdate() {
1012
+ this.componentDidRender(false);
1013
+ }
1014
+ componentWillUnmount() {
1015
+ const that = this;
1016
+ if (!that.nativeElement) {
1017
+ return;
1018
+ }
1019
+ that.nativeElement.whenRenderedCallbacks = [];
1020
+ for (let i = 0; i < that.eventListeners.length; i++) {
1021
+ const eventName = that.eventListeners[i];
1022
+ that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
1023
+ }
1024
+ }
1025
+ render() {
1026
+ return (React.createElement("smart-menu", { ref: this.componentRef }, this.props.children));
1027
+ }
1028
+ }
447
1029
 
448
- const Smart$2 = window.Smart;
449
- /**
450
- Horizontal, Vertical and Popup Menu. Popup Menus appear when a user taps an interactive UI element such as an icon, button, action, or content, such as selected items or text.
451
- */
452
- class Menu 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 = 'Menu' + 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 delay (in milliseconds) before a Menu dropdown is closed when leaving the Menu with the mouse. Applicable only when selectionMode is 'mouseenter'.
476
- * Property type: number
477
- */
478
- get autoCloseDelay() {
479
- return this.nativeElement ? this.nativeElement.autoCloseDelay : undefined;
480
- }
481
- set autoCloseDelay(value) {
482
- if (this.nativeElement) {
483
- this.nativeElement.autoCloseDelay = value;
484
- }
485
- }
486
- /** If set to true, on mouseenter, the element receives focus automatically.
487
- * Property type: boolean
488
- */
489
- get autoFocusOnMouseenter() {
490
- return this.nativeElement ? this.nativeElement.autoFocusOnMouseenter : undefined;
491
- }
492
- set autoFocusOnMouseenter(value) {
493
- if (this.nativeElement) {
494
- this.nativeElement.autoFocusOnMouseenter = value;
495
- }
496
- }
497
- /** Allows top-level Menu items (immediate children of the Menu) to be checkable. Sublevels are controlled by setting checkable to the respective smart-menu-items-group.
498
- * Property type: boolean
499
- */
500
- get checkable() {
501
- return this.nativeElement ? this.nativeElement.checkable : undefined;
502
- }
503
- set checkable(value) {
504
- if (this.nativeElement) {
505
- this.nativeElement.checkable = value;
506
- }
507
- }
508
- /** Sets or gets whether checkboxes and radio buttons can be displayed in the Menu. This property is applicable only to the Menu itself, and not its smart-menu-item/smart-menu-items-group subitems. See also the property checkable.
509
- * Property type: boolean
510
- */
511
- get checkboxes() {
512
- return this.nativeElement ? this.nativeElement.checkboxes : undefined;
513
- }
514
- set checkboxes(value) {
515
- if (this.nativeElement) {
516
- this.nativeElement.checkboxes = value;
517
- }
518
- }
519
- /** Sets the check mode of top-level Menu items (immediate children of the Menu). checkMode can be set to 'checkbox', 'radioButton', or a comma-separated list containing 'checkbox', 'radioButton', or 'none' (e.g. 'checkbox, radioButton, none, checkbox'). When set to a list, each value in the list is applied to groups of Menu items separated by an item with separator (item after the one with separator is the start of a new checkMode context). Sublevels are controlled by setting checkMode to the respective smart-menu-items-group.
520
- * Property type: MenuCheckMode | string
521
- */
522
- get checkMode() {
523
- return this.nativeElement ? this.nativeElement.checkMode : undefined;
524
- }
525
- set checkMode(value) {
526
- if (this.nativeElement) {
527
- this.nativeElement.checkMode = value;
528
- }
529
- }
530
- /** Sets the document event which closes any open Menu drop downs (or the Menu itself when mode is 'dropDown').
531
- * Property type: MenuCloseAction | string
532
- */
533
- get closeAction() {
534
- return this.nativeElement ? this.nativeElement.closeAction : undefined;
535
- }
536
- set closeAction(value) {
537
- if (this.nativeElement) {
538
- this.nativeElement.closeAction = value;
539
- }
540
- }
541
- /** Determines the data source that will be loaded to the Menu. 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.
542
- * Property type: any
543
- */
544
- get dataSource() {
545
- return this.nativeElement ? this.nativeElement.dataSource : undefined;
546
- }
547
- set dataSource(value) {
548
- if (this.nativeElement) {
549
- this.nativeElement.dataSource = value;
550
- }
551
- }
552
- /** Enables or disables element.
553
- * Property type: boolean
554
- */
555
- get disabled() {
556
- return this.nativeElement ? this.nativeElement.disabled : undefined;
557
- }
558
- set disabled(value) {
559
- if (this.nativeElement) {
560
- this.nativeElement.disabled = value;
561
- }
562
- }
563
- /** Determines the field in the data source that corresponds to an item's label.
564
- * Property type: string
565
- */
566
- get displayMember() {
567
- return this.nativeElement ? this.nativeElement.displayMember : undefined;
568
- }
569
- set displayMember(value) {
570
- if (this.nativeElement) {
571
- this.nativeElement.displayMember = value;
572
- }
573
- }
574
- /** Sets custom outer container, where all dropdown containers must be appended. By default they are inside the menu. The value of the property can be an HTML element or the id of an HTML element. In mode 'dropDown', the property dropDownAppendTo also controls the parent element of the whole Menu. The open method works relatively to the original place of the Menu in the DOM.
575
- * Property type: string | HTMLElement
576
- */
577
- get dropDownAppendTo() {
578
- return this.nativeElement ? this.nativeElement.dropDownAppendTo : undefined;
579
- }
580
- set dropDownAppendTo(value) {
581
- if (this.nativeElement) {
582
- this.nativeElement.dropDownAppendTo = value;
583
- }
584
- }
585
- /** If this property is enabled, when an element's dropdown is opened, a transparent overlay is positioned between the dropdown and the rest of the document.
586
- * Property type: boolean
587
- */
588
- get dropDownOverlay() {
589
- return this.nativeElement ? this.nativeElement.dropDownOverlay : undefined;
590
- }
591
- set dropDownOverlay(value) {
592
- if (this.nativeElement) {
593
- this.nativeElement.dropDownOverlay = value;
594
- }
595
- }
596
- /** Determines the opening direction of Menu dropdowns.
597
- * Property type: MenuDropDownPosition | string
598
- */
599
- get dropDownPosition() {
600
- return this.nativeElement ? this.nativeElement.dropDownPosition : undefined;
601
- }
602
- set dropDownPosition(value) {
603
- if (this.nativeElement) {
604
- this.nativeElement.dropDownPosition = value;
605
- }
606
- }
607
- /** A getter that returns an array of all Menu items.
608
- * Property type: any
609
- */
610
- get items() {
611
- return this.nativeElement ? this.nativeElement.items : undefined;
612
- }
613
- set items(value) {
614
- if (this.nativeElement) {
615
- this.nativeElement.items = value;
616
- }
617
- }
618
- /** Determines the field in the data source that corresponds to an item group's subitems collection.
619
- * Property type: string
620
- */
621
- get itemsMember() {
622
- return this.nativeElement ? this.nativeElement.itemsMember : undefined;
623
- }
624
- set itemsMember(value) {
625
- if (this.nativeElement) {
626
- this.nativeElement.itemsMember = value;
627
- }
628
- }
629
- /** Sets or gets the language. Used in conjunction with the property messages.
630
- * Property type: string
631
- */
632
- get locale() {
633
- return this.nativeElement ? this.nativeElement.locale : undefined;
634
- }
635
- set locale(value) {
636
- if (this.nativeElement) {
637
- this.nativeElement.locale = value;
638
- }
639
- }
640
- /** Callback used to customize the format of the messages that are returned from the Localization Module.
641
- * Property type: any
642
- */
643
- get localizeFormatFunction() {
644
- return this.nativeElement ? this.nativeElement.localizeFormatFunction : undefined;
645
- }
646
- set localizeFormatFunction(value) {
647
- if (this.nativeElement) {
648
- this.nativeElement.localizeFormatFunction = value;
649
- }
650
- }
651
- /** Sets or gets an object specifying strings used in the widget that can be localized. Used in conjunction with the property locale.
652
- * Property type: any
653
- */
654
- get messages() {
655
- return this.nativeElement ? this.nativeElement.messages : undefined;
656
- }
657
- set messages(value) {
658
- if (this.nativeElement) {
659
- this.nativeElement.messages = value;
660
- }
661
- }
662
- /** Used to load a custom minimize icon from an HTMLTemplateElement object. The HTMLTemplateElement is selected by it's id.
663
- * Property type: string
664
- */
665
- get minimizeIconTemplate() {
666
- return this.nativeElement ? this.nativeElement.minimizeIconTemplate : undefined;
667
- }
668
- set minimizeIconTemplate(value) {
669
- if (this.nativeElement) {
670
- this.nativeElement.minimizeIconTemplate = value;
671
- }
672
- }
673
- /** Determines the minimum width of the Menu at which it will switch from normal to minimized mode. If set to null, the Menu does not minimize automatically.
674
- * Property type: number
675
- */
676
- get minimizeWidth() {
677
- return this.nativeElement ? this.nativeElement.minimizeWidth : undefined;
678
- }
679
- set minimizeWidth(value) {
680
- if (this.nativeElement) {
681
- this.nativeElement.minimizeWidth = value;
682
- }
683
- }
684
- /** Determines the menu's display mode.
685
- * Property type: MenuMode | string
686
- */
687
- get mode() {
688
- return this.nativeElement ? this.nativeElement.mode : undefined;
689
- }
690
- set mode(value) {
691
- if (this.nativeElement) {
692
- this.nativeElement.mode = value;
693
- }
694
- }
695
- /** Opens or closes thte menu when it's in 'dropDown' mode.
696
- * Property type: boolean
697
- */
698
- get opened() {
699
- return this.nativeElement ? this.nativeElement.opened : undefined;
700
- }
701
- set opened(value) {
702
- if (this.nativeElement) {
703
- this.nativeElement.opened = value;
704
- }
705
- }
706
- /** Sets or gets the menu's scroll buttons behavior. Applicable only when dropDownAppendTo is not null.
707
- * Property type: Overflow | string
708
- */
709
- get overflow() {
710
- return this.nativeElement ? this.nativeElement.overflow : undefined;
711
- }
712
- set overflow(value) {
713
- if (this.nativeElement) {
714
- this.nativeElement.overflow = value;
715
- }
716
- }
717
- /** If set to true, prevents the closing of the Menu or its dropdowns when Menu items are checked/unchecked.
718
- * Property type: boolean
719
- */
720
- get preventCloseOnCheck() {
721
- return this.nativeElement ? this.nativeElement.preventCloseOnCheck : undefined;
722
- }
723
- set preventCloseOnCheck(value) {
724
- if (this.nativeElement) {
725
- this.nativeElement.preventCloseOnCheck = value;
726
- }
727
- }
728
- /** If the element is readonly, users cannot interact with it.
729
- * Property type: boolean
730
- */
731
- get readonly() {
732
- return this.nativeElement ? this.nativeElement.readonly : undefined;
733
- }
734
- set readonly(value) {
735
- if (this.nativeElement) {
736
- this.nativeElement.readonly = value;
737
- }
738
- }
739
- /** Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts.
740
- * Property type: boolean
741
- */
742
- get rightToLeft() {
743
- return this.nativeElement ? this.nativeElement.rightToLeft : undefined;
744
- }
745
- set rightToLeft(value) {
746
- if (this.nativeElement) {
747
- this.nativeElement.rightToLeft = value;
748
- }
749
- }
750
- /** Determines the menu's selection mode.
751
- * Property type: MenuSelectionMode | string
752
- */
753
- get selectionMode() {
754
- return this.nativeElement ? this.nativeElement.selectionMode : undefined;
755
- }
756
- set selectionMode(value) {
757
- if (this.nativeElement) {
758
- this.nativeElement.selectionMode = value;
759
- }
760
- }
761
- /** Determines the theme. Theme defines the look of the element
762
- * Property type: string
763
- */
764
- get theme() {
765
- return this.nativeElement ? this.nativeElement.theme : undefined;
766
- }
767
- set theme(value) {
768
- if (this.nativeElement) {
769
- this.nativeElement.theme = value;
770
- }
771
- }
772
- /** If is set to true, the element cannot be focused.
773
- * Property type: boolean
774
- */
775
- get unfocusable() {
776
- return this.nativeElement ? this.nativeElement.unfocusable : undefined;
777
- }
778
- set unfocusable(value) {
779
- if (this.nativeElement) {
780
- this.nativeElement.unfocusable = value;
781
- }
782
- }
783
- /** Determines the field in the data source that corresponds to an item's value.
784
- * Property type: string
785
- */
786
- get valueMember() {
787
- return this.nativeElement ? this.nativeElement.valueMember : undefined;
788
- }
789
- set valueMember(value) {
790
- if (this.nativeElement) {
791
- this.nativeElement.valueMember = value;
792
- }
793
- }
794
- // Gets the properties of the React component.
795
- get properties() {
796
- return ["animation", "autoCloseDelay", "autoFocusOnMouseenter", "checkable", "checkboxes", "checkMode", "closeAction", "dataSource", "disabled", "displayMember", "dropDownAppendTo", "dropDownOverlay", "dropDownPosition", "items", "itemsMember", "locale", "localizeFormatFunction", "messages", "minimizeIconTemplate", "minimizeWidth", "mode", "opened", "overflow", "preventCloseOnCheck", "readonly", "rightToLeft", "selectionMode", "theme", "unfocusable", "valueMember"];
797
- }
798
- // Gets the events of the React component.
799
- get eventListeners() {
800
- return ["onClose", "onClosing", "onCollapse", "onCollapsing", "onExpand", "onExpanding", "onItemCheckChange", "onItemClick", "onOpen", "onOpening", "onCreate", "onReady"];
801
- }
802
- /** Adds an item to the menu.
803
- * @param {HTMLElement} Item. A jqx-menu-item to add to the Menu.
804
- * @param {HTMLElement | string} Parent?. The jqx-menu-items-group or its id or numeric path to add the item to.
805
- */
806
- addItem(Item, Parent) {
807
- if (this.nativeElement.isRendered) {
808
- this.nativeElement.addItem(Item, Parent);
809
- }
810
- else {
811
- this.nativeElement.whenRendered(() => {
812
- this.nativeElement.addItem(Item, Parent);
813
- });
814
- }
815
- }
816
- /** Checks an item.
817
- * @param {HTMLElement | string} item. jqx-menu-item/jqx-menu-items-group or its id or numeric path.
818
- */
819
- checkItem(item) {
820
- if (this.nativeElement.isRendered) {
821
- this.nativeElement.checkItem(item);
822
- }
823
- else {
824
- this.nativeElement.whenRendered(() => {
825
- this.nativeElement.checkItem(item);
826
- });
827
- }
828
- }
829
- /** Clears all Menu items.
830
- */
831
- clear() {
832
- if (this.nativeElement.isRendered) {
833
- this.nativeElement.clear();
834
- }
835
- else {
836
- this.nativeElement.whenRendered(() => {
837
- this.nativeElement.clear();
838
- });
839
- }
840
- }
841
- /** Clicks on an item programatically.
842
- * @param {HTMLElement | string} item. jqx-menu-item/jqx-menu-items-group or its id or numeric path.
843
- */
844
- clickItem(item) {
845
- if (this.nativeElement.isRendered) {
846
- this.nativeElement.clickItem(item);
847
- }
848
- else {
849
- this.nativeElement.whenRendered(() => {
850
- this.nativeElement.clickItem(item);
851
- });
852
- }
853
- }
854
- /** Closes the Menu when mode is 'dropDown'.
855
- */
856
- close() {
857
- if (this.nativeElement.isRendered) {
858
- this.nativeElement.close();
859
- }
860
- else {
861
- this.nativeElement.whenRendered(() => {
862
- this.nativeElement.close();
863
- });
864
- }
865
- }
866
- /** Collapses an item.
867
- * @param {HTMLElement | string} item?. jqx-menu-item/jqx-menu-items-group or its id or numeric path. If no item is passed, all open items are collapsed.
868
- * @param {boolean} animation?. If set to false, disables collapse animation even if animation is enabled for the element.
869
- */
870
- collapseItem(item, animation) {
871
- if (this.nativeElement.isRendered) {
872
- this.nativeElement.collapseItem(item, animation);
873
- }
874
- else {
875
- this.nativeElement.whenRendered(() => {
876
- this.nativeElement.collapseItem(item, animation);
877
- });
878
- }
879
- }
880
- /** Expands an item.
881
- * @param {HTMLElement | string} item. jqx-menu-item/jqx-menu-items-group or its id or numeric path.
882
- * @param {boolean} animation?. If set to false, disables expand animation even if animation is enabled for the element.
883
- */
884
- expandItem(item, animation) {
885
- if (this.nativeElement.isRendered) {
886
- this.nativeElement.expandItem(item, animation);
887
- }
888
- else {
889
- this.nativeElement.whenRendered(() => {
890
- this.nativeElement.expandItem(item, animation);
891
- });
892
- }
893
- }
894
- /** Gets an item by its id or numeric path.
895
- * @param {string} id. The id or numeric path of an item
896
- * @returns {HTMLElement}
897
- */
898
- getItem(id) {
899
- return __awaiter(this, void 0, void 0, function* () {
900
- const getResultOnRender = () => {
901
- return new Promise(resolve => {
902
- this.nativeElement.whenRendered(() => {
903
- const result = this.nativeElement.getItem(id);
904
- resolve(result);
905
- });
906
- });
907
- };
908
- const result = yield getResultOnRender();
909
- return result;
910
- });
911
- }
912
- /** Maximizes the Menu.
913
- */
914
- maximize() {
915
- if (this.nativeElement.isRendered) {
916
- this.nativeElement.maximize();
917
- }
918
- else {
919
- this.nativeElement.whenRendered(() => {
920
- this.nativeElement.maximize();
921
- });
922
- }
923
- }
924
- /** Minimizes the Menu.
925
- */
926
- minimize() {
927
- if (this.nativeElement.isRendered) {
928
- this.nativeElement.minimize();
929
- }
930
- else {
931
- this.nativeElement.whenRendered(() => {
932
- this.nativeElement.minimize();
933
- });
934
- }
935
- }
936
- /** Opens the Menu when mode is 'dropDown'.
937
- * @param {number} left. Horizontal position
938
- * @param {number} top. Vertical position
939
- */
940
- open(left, top) {
941
- if (this.nativeElement.isRendered) {
942
- this.nativeElement.open(left, top);
943
- }
944
- else {
945
- this.nativeElement.whenRendered(() => {
946
- this.nativeElement.open(left, top);
947
- });
948
- }
949
- }
950
- /** Removes an item from the menu.
951
- * @param {HTMLElement | string} item. The jqx-menu-item/jqx-menu-items-group or its id or numeric path to remove.
952
- */
953
- removeItem(item) {
954
- if (this.nativeElement.isRendered) {
955
- this.nativeElement.removeItem(item);
956
- }
957
- else {
958
- this.nativeElement.whenRendered(() => {
959
- this.nativeElement.removeItem(item);
960
- });
961
- }
962
- }
963
- /** Unchecks an item.
964
- * @param {HTMLElement | string} item. jqx-menu-item/jqx-menu-items-group (or its id or numeric path)
965
- */
966
- uncheckItem(item) {
967
- if (this.nativeElement.isRendered) {
968
- this.nativeElement.uncheckItem(item);
969
- }
970
- else {
971
- this.nativeElement.whenRendered(() => {
972
- this.nativeElement.uncheckItem(item);
973
- });
974
- }
975
- }
976
- componentDidRender(initialize) {
977
- const that = this;
978
- const props = {};
979
- const events = {};
980
- let styles = null;
981
- for (let prop in that.props) {
982
- if (prop === 'children') {
983
- continue;
984
- }
985
- if (prop === 'style') {
986
- styles = that.props[prop];
987
- continue;
988
- }
989
- if (prop.startsWith('on') && that.properties.indexOf(prop) === -1) {
990
- events[prop] = that.props[prop];
991
- continue;
992
- }
993
- props[prop] = that.props[prop];
994
- }
995
- if (initialize) {
996
- that.nativeElement = this.componentRef.current;
997
- }
998
- for (let prop in props) {
999
- if (prop === 'class' || prop === 'className') {
1000
- const classNames = props[prop].trim().split(' ');
1001
- for (let className in classNames) {
1002
- if (!that.nativeElement.classList.contains(classNames[className]) && classNames[className] !== "") {
1003
- that.nativeElement.classList.add(classNames[className]);
1004
- }
1005
- }
1006
- continue;
1007
- }
1008
- if (props[prop] !== that.nativeElement[prop]) {
1009
- const normalizeProp = (str) => {
1010
- return str.replace(/-([a-z])/g, function (g) {
1011
- return g[1].toUpperCase();
1012
- });
1013
- };
1014
- if (prop === 'hover' || prop === 'active' || prop === 'focus' || prop === 'selected') {
1015
- that.nativeElement.setAttribute(prop, '');
1016
- }
1017
- const normalizedProp = normalizeProp(prop);
1018
- that.nativeElement[normalizedProp] = props[prop];
1019
- }
1020
- }
1021
- for (let eventName in events) {
1022
- that[eventName] = events[eventName];
1023
- that.nativeElement[eventName.toLowerCase()] = events[eventName];
1024
- }
1025
- if (initialize) {
1026
- Smart$2.Render();
1027
- if (that.onCreate) {
1028
- that.onCreate();
1029
- }
1030
- that.nativeElement.whenRendered(() => {
1031
- if (that.onReady) {
1032
- that.onReady();
1033
- }
1034
- });
1035
- }
1036
- // setup styles.
1037
- if (styles) {
1038
- for (let styleName in styles) {
1039
- that.nativeElement.style[styleName] = styles[styleName];
1040
- }
1041
- }
1042
- }
1043
- componentDidMount() {
1044
- this.componentDidRender(true);
1045
- }
1046
- componentDidUpdate() {
1047
- this.componentDidRender(false);
1048
- }
1049
- componentWillUnmount() {
1050
- const that = this;
1051
- if (!that.nativeElement) {
1052
- return;
1053
- }
1054
- that.nativeElement.whenRenderedCallbacks = [];
1055
- for (let i = 0; i < that.eventListeners.length; i++) {
1056
- const eventName = that.eventListeners[i];
1057
- that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
1058
- }
1059
- }
1060
- render() {
1061
- return (React.createElement("smart-menu", { ref: this.componentRef }, this.props.children));
1062
- }
1063
- }
1030
+ exports.Smart = Smart$2;
1031
+ exports.Menu = Menu;
1032
+ exports.default = Menu;
1033
+ exports.MenuItem = MenuItem;
1034
+ exports.MenuItemsGroup = MenuItemsGroup;
1064
1035
 
1065
- exports.Smart = Smart$2;
1066
- exports.Menu = Menu;
1067
- exports.default = Menu;
1068
- exports.MenuItem = MenuItem;
1069
- exports.MenuItemsGroup = MenuItemsGroup;
1070
-
1071
- Object.defineProperty(exports, '__esModule', { value: true });
1036
+ Object.defineProperty(exports, '__esModule', { value: true });
1072
1037
 
1073
1038
  })));