smart-webcomponents-react 14.2.83 → 14.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (376) hide show
  1. package/alertwindow/alertwindow.d.ts +5 -5
  2. package/alertwindow/alertwindow.esm.js +10 -85
  3. package/alertwindow/alertwindow.umd.js +1134 -1209
  4. package/array/array.d.ts +5 -5
  5. package/array/array.esm.js +13 -88
  6. package/array/array.umd.js +752 -827
  7. package/barcode/barcode.d.ts +3 -3
  8. package/barcode/barcode.esm.js +6 -61
  9. package/barcode/barcode.umd.js +311 -366
  10. package/button/dropdownbutton.d.ts +2 -2
  11. package/button/multisplitbutton.d.ts +2 -2
  12. package/calendar/calendar.d.ts +2 -2
  13. package/calendar/calendar.esm.js +4 -49
  14. package/calendar/calendar.umd.js +710 -755
  15. package/card/cardview.d.ts +1 -1
  16. package/cardview/cardview.d.ts +1 -1
  17. package/cardview/cardview.esm.js +2 -37
  18. package/cardview/cardview.umd.js +515 -550
  19. package/chart/chart.d.ts +9 -9
  20. package/chart/chart.esm.js +18 -133
  21. package/chart/chart.umd.js +822 -937
  22. package/chart/ganttchart.d.ts +20 -20
  23. package/combobox/combobox.d.ts +4 -4
  24. package/combobox/combobox.esm.js +8 -73
  25. package/combobox/combobox.umd.js +1341 -1406
  26. package/datetimepicker/datetimepicker.d.ts +1 -1
  27. package/datetimepicker/datetimepicker.esm.js +2 -37
  28. package/datetimepicker/datetimepicker.umd.js +826 -861
  29. package/dialogwindow/dialogwindow.d.ts +5 -5
  30. package/dialogwindow/dialogwindow.esm.js +10 -85
  31. package/dialogwindow/dialogwindow.umd.js +1134 -1209
  32. package/dockinglayout/dockinglayout.d.ts +7 -7
  33. package/dockinglayout/dockinglayout.esm.js +14 -109
  34. package/dockinglayout/dockinglayout.umd.js +765 -860
  35. package/dropdownbutton/dropdownbutton.d.ts +2 -2
  36. package/dropdownbutton/dropdownbutton.esm.js +4 -49
  37. package/dropdownbutton/dropdownbutton.umd.js +527 -572
  38. package/dropdownlist/dropdownlist.d.ts +4 -4
  39. package/dropdownlist/dropdownlist.esm.js +8 -73
  40. package/dropdownlist/dropdownlist.umd.js +1275 -1340
  41. package/editor/editor.d.ts +11 -9
  42. package/editor/editor.esm.js +14 -109
  43. package/editor/editor.umd.js +911 -1006
  44. package/fileupload/fileupload.d.ts +2 -1
  45. package/filterbuilder/filterbuilder.d.ts +1 -1
  46. package/filterbuilder/filterbuilder.esm.js +2 -37
  47. package/filterbuilder/filterbuilder.umd.js +463 -498
  48. package/filterpanel/filterpanel.d.ts +1 -1
  49. package/filterpanel/filterpanel.esm.js +2 -37
  50. package/filterpanel/filterpanel.umd.js +354 -389
  51. package/form/form.d.ts +1 -1
  52. package/form/form.esm.js +4 -49
  53. package/form/form.umd.js +1016 -1061
  54. package/form/formgroup.d.ts +1 -1
  55. package/ganttchart/ganttchart.d.ts +20 -20
  56. package/ganttchart/ganttchart.esm.js +40 -265
  57. package/ganttchart/ganttchart.umd.js +1666 -1891
  58. package/gauge/gauge.d.ts +2 -2
  59. package/gauge/gauge.esm.js +4 -49
  60. package/gauge/gauge.umd.js +664 -709
  61. package/grid/grid.d.ts +56 -51
  62. package/grid/grid.esm.js +96 -460
  63. package/grid/grid.umd.js +2107 -2471
  64. package/index.d.ts +45 -3
  65. package/input/input.d.ts +2 -2
  66. package/input/input.esm.js +4 -49
  67. package/input/input.umd.js +505 -550
  68. package/input/numberinput.d.ts +2 -2
  69. package/input/phoneinput.d.ts +4 -4
  70. package/kanban/kanban.d.ts +6 -6
  71. package/kanban/kanban.esm.js +12 -97
  72. package/kanban/kanban.umd.js +1334 -1419
  73. package/layout/dockinglayout.d.ts +7 -7
  74. package/listbox/listbox.d.ts +5 -5
  75. package/listbox/listbox.esm.js +10 -85
  76. package/listbox/listbox.umd.js +1170 -1245
  77. package/listmenu/listmenu.d.ts +1 -1
  78. package/listmenu/listmenu.esm.js +2 -37
  79. package/listmenu/listmenu.umd.js +1005 -1040
  80. package/menu/listmenu.d.ts +1 -1
  81. package/menu/menu.d.ts +1 -1
  82. package/menu/menu.esm.js +2 -37
  83. package/menu/menu.umd.js +1025 -1060
  84. package/multilinetextbox/multilinetextbox.d.ts +1 -1
  85. package/multilinetextbox/multilinetextbox.esm.js +2 -37
  86. package/multilinetextbox/multilinetextbox.umd.js +907 -942
  87. package/multilinewindow/multilinewindow.d.ts +5 -5
  88. package/multilinewindow/multilinewindow.esm.js +10 -85
  89. package/multilinewindow/multilinewindow.umd.js +1134 -1209
  90. package/multisplitbutton/multisplitbutton.d.ts +2 -2
  91. package/multisplitbutton/multisplitbutton.esm.js +4 -49
  92. package/multisplitbutton/multisplitbutton.umd.js +941 -986
  93. package/numberinput/numberinput.d.ts +2 -2
  94. package/numberinput/numberinput.esm.js +4 -49
  95. package/numberinput/numberinput.umd.js +348 -393
  96. package/numerictextbox/numerictextbox.d.ts +1 -1
  97. package/numerictextbox/numerictextbox.esm.js +2 -37
  98. package/numerictextbox/numerictextbox.umd.js +592 -627
  99. package/package.json +1 -1
  100. package/phoneinput/phoneinput.d.ts +4 -4
  101. package/phoneinput/phoneinput.esm.js +8 -73
  102. package/phoneinput/phoneinput.umd.js +386 -451
  103. package/pivottable/pivottable.d.ts +3 -3
  104. package/pivottable/pivottable.esm.js +6 -61
  105. package/pivottable/pivottable.umd.js +762 -817
  106. package/progresswindow/progresswindow.d.ts +5 -5
  107. package/progresswindow/progresswindow.esm.js +10 -85
  108. package/progresswindow/progresswindow.umd.js +1134 -1209
  109. package/promptwindow/promptwindow.d.ts +5 -5
  110. package/promptwindow/promptwindow.esm.js +10 -85
  111. package/promptwindow/promptwindow.umd.js +1134 -1209
  112. package/qrcode/qrcode.d.ts +3 -3
  113. package/qrcode/qrcode.esm.js +6 -61
  114. package/qrcode/qrcode.umd.js +333 -388
  115. package/querybuilder/querybuilder.d.ts +6 -1
  116. package/querybuilder/querybuilder.esm.js +14 -38
  117. package/querybuilder/querybuilder.umd.js +446 -470
  118. package/rating/rating.d.ts +1 -1
  119. package/rating/rating.esm.js +2 -37
  120. package/rating/rating.umd.js +261 -296
  121. package/scheduler/scheduler.d.ts +17 -17
  122. package/scheduler/scheduler.esm.js +34 -229
  123. package/scheduler/scheduler.umd.js +1782 -1977
  124. package/slider/slider.d.ts +2 -2
  125. package/slider/slider.esm.js +4 -49
  126. package/slider/slider.umd.js +642 -687
  127. package/source/modules/smart.accordion.js +1 -1
  128. package/source/modules/smart.array.js +2 -2
  129. package/source/modules/smart.barcode.js +1 -1
  130. package/source/modules/smart.breadcrumb.js +1 -1
  131. package/source/modules/smart.button.js +1 -1
  132. package/source/modules/smart.buttongroup.js +1 -1
  133. package/source/modules/smart.calendar.js +3 -3
  134. package/source/modules/smart.card.js +1 -1
  135. package/source/modules/smart.cardview.js +4 -4
  136. package/source/modules/smart.carousel.js +1 -1
  137. package/source/modules/smart.chart.js +1 -1
  138. package/source/modules/smart.checkbox.js +1 -1
  139. package/source/modules/smart.checkinput.js +2 -2
  140. package/source/modules/smart.chip.js +1 -1
  141. package/source/modules/smart.colorinput.js +2 -2
  142. package/source/modules/smart.colorpanel.js +2 -2
  143. package/source/modules/smart.colorpicker.js +2 -2
  144. package/source/modules/smart.combobox.js +2 -2
  145. package/source/modules/smart.common.js +1 -1
  146. package/source/modules/smart.countryinput.js +2 -2
  147. package/source/modules/smart.dateinput.js +3 -3
  148. package/source/modules/smart.daterangeinput.js +4 -4
  149. package/source/modules/smart.datetimepicker.js +3 -3
  150. package/source/modules/smart.dockinglayout.js +1 -1
  151. package/source/modules/smart.dropdownbutton.js +1 -1
  152. package/source/modules/smart.dropdownlist.js +2 -2
  153. package/source/modules/smart.editor.js +5 -5
  154. package/source/modules/smart.element.js +1 -1
  155. package/source/modules/smart.fileupload.js +3 -3
  156. package/source/modules/smart.form.js +2 -2
  157. package/source/modules/smart.formulaparser.js +1 -1
  158. package/source/modules/smart.ganttchart.js +5 -5
  159. package/source/modules/smart.gauge.js +1 -1
  160. package/source/modules/smart.grid.js +14 -14
  161. package/source/modules/smart.gridpanel.js +4 -4
  162. package/source/modules/smart.input.js +2 -2
  163. package/source/modules/smart.kanban.js +5 -5
  164. package/source/modules/smart.layout.js +1 -1
  165. package/source/modules/smart.led.js +1 -1
  166. package/source/modules/smart.listbox.js +2 -2
  167. package/source/modules/smart.listmenu.js +1 -1
  168. package/source/modules/smart.map.js +1 -1
  169. package/source/modules/smart.maskedtextbox.js +2 -2
  170. package/source/modules/smart.menu.js +1 -1
  171. package/source/modules/smart.multicomboinput.js +2 -2
  172. package/source/modules/smart.multiinput.js +2 -2
  173. package/source/modules/smart.multilinetextbox.js +2 -2
  174. package/source/modules/smart.multisplitbutton.js +2 -2
  175. package/source/modules/smart.numberinput.js +2 -2
  176. package/source/modules/smart.numerictextbox.js +2 -2
  177. package/source/modules/smart.pager.js +2 -2
  178. package/source/modules/smart.passwordinput.js +2 -2
  179. package/source/modules/smart.passwordtextbox.js +2 -2
  180. package/source/modules/smart.path.js +1 -1
  181. package/source/modules/smart.phoneinput.js +2 -2
  182. package/source/modules/smart.pivottable.js +3 -3
  183. package/source/modules/smart.progressbar.js +1 -1
  184. package/source/modules/smart.qrcode.js +1 -1
  185. package/source/modules/smart.querybuilder.js +5 -5
  186. package/source/modules/smart.radiobutton.js +1 -1
  187. package/source/modules/smart.rating.js +1 -1
  188. package/source/modules/smart.router.js +1 -1
  189. package/source/modules/smart.scheduler.js +4 -4
  190. package/source/modules/smart.scrollbar.js +1 -1
  191. package/source/modules/smart.slider.js +1 -1
  192. package/source/modules/smart.sortable.js +1 -1
  193. package/source/modules/smart.splitter.js +1 -1
  194. package/source/modules/smart.switchbutton.js +1 -1
  195. package/source/modules/smart.table.js +3 -3
  196. package/source/modules/smart.tabs.js +1 -1
  197. package/source/modules/smart.tank.js +1 -1
  198. package/source/modules/smart.textarea.js +2 -2
  199. package/source/modules/smart.textbox.js +2 -2
  200. package/source/modules/smart.timeinput.js +2 -2
  201. package/source/modules/smart.timepicker.js +1 -1
  202. package/source/modules/smart.toast.js +1 -1
  203. package/source/modules/smart.tooltip.js +1 -1
  204. package/source/modules/smart.tree.js +1 -1
  205. package/source/modules/smart.validator.js +1 -1
  206. package/source/modules/smart.window.js +2 -2
  207. package/source/smart.accordion.js +1 -1
  208. package/source/smart.ajax.js +1 -1
  209. package/source/smart.array.js +1 -1
  210. package/source/smart.barcode.js +1 -1
  211. package/source/smart.bootstrap.js +1 -1
  212. package/source/smart.breadcrumb.js +1 -1
  213. package/source/smart.button.js +1 -1
  214. package/source/smart.buttongroup.js +1 -1
  215. package/source/smart.calendar.js +2 -2
  216. package/source/smart.card.js +1 -1
  217. package/source/smart.cardview.js +1 -1
  218. package/source/smart.carousel.js +1 -1
  219. package/source/smart.chart.annotations.js +1 -1
  220. package/source/smart.chart.api.js +1 -1
  221. package/source/smart.chart.core.js +1 -1
  222. package/source/smart.chart.js +1 -1
  223. package/source/smart.chart.rangeselector.js +1 -1
  224. package/source/smart.chart.waterfall.js +1 -1
  225. package/source/smart.checkbox.js +1 -1
  226. package/source/smart.checkinput.js +1 -1
  227. package/source/smart.chip.js +1 -1
  228. package/source/smart.colorinput.js +1 -1
  229. package/source/smart.colorpanel.js +1 -1
  230. package/source/smart.colorpicker.js +1 -1
  231. package/source/smart.combobox.js +1 -1
  232. package/source/smart.complex.js +1 -1
  233. package/source/smart.core.js +1 -1
  234. package/source/smart.countryinput.js +1 -1
  235. package/source/smart.data.js +1 -1
  236. package/source/smart.date.js +1 -1
  237. package/source/smart.dateformatpanel.js +1 -1
  238. package/source/smart.dateinput.js +1 -1
  239. package/source/smart.daterangeinput.js +1 -1
  240. package/source/smart.datetimepicker.js +1 -1
  241. package/source/smart.dockinglayout.js +1 -1
  242. package/source/smart.draw.js +1 -1
  243. package/source/smart.dropdownbutton.js +1 -1
  244. package/source/smart.dropdownlist.js +1 -1
  245. package/source/smart.editor.js +2 -2
  246. package/source/smart.element.js +1 -1
  247. package/source/smart.elements.js +17 -17
  248. package/source/smart.export.js +1 -1
  249. package/source/smart.fileupload.js +2 -2
  250. package/source/smart.filter.js +1 -1
  251. package/source/smart.filterbuilder.js +2 -2
  252. package/source/smart.filterpanel.js +1 -1
  253. package/source/smart.form.js +1 -1
  254. package/source/smart.format.js +1 -1
  255. package/source/smart.formulaparser.js +1 -1
  256. package/source/smart.ganttchart.js +2 -2
  257. package/source/smart.gauge.js +1 -1
  258. package/source/smart.grid.cell.js +2 -2
  259. package/source/smart.grid.chart.js +1 -1
  260. package/source/smart.grid.column.js +1 -1
  261. package/source/smart.grid.core.js +2 -2
  262. package/source/smart.grid.dialog.js +2 -2
  263. package/source/smart.grid.edit.js +2 -2
  264. package/source/smart.grid.export.js +1 -1
  265. package/source/smart.grid.filter.js +1 -1
  266. package/source/smart.grid.group.js +1 -1
  267. package/source/smart.grid.js +1 -1
  268. package/source/smart.grid.menu.js +2 -2
  269. package/source/smart.grid.pager.js +1 -1
  270. package/source/smart.grid.reorder.js +1 -1
  271. package/source/smart.grid.resize.js +2 -2
  272. package/source/smart.grid.row.js +1 -1
  273. package/source/smart.grid.select.js +2 -2
  274. package/source/smart.grid.sort.js +1 -1
  275. package/source/smart.grid.toolbar.js +2 -2
  276. package/source/smart.grid.tree.js +1 -1
  277. package/source/smart.grid.view.js +2 -2
  278. package/source/smart.gridpanel.js +1 -1
  279. package/source/smart.input.js +2 -2
  280. package/source/smart.kanban.js +2 -2
  281. package/source/smart.layout.js +1 -1
  282. package/source/smart.led.js +1 -1
  283. package/source/smart.listbox.js +2 -2
  284. package/source/smart.listmenu.js +1 -1
  285. package/source/smart.map.js +1 -1
  286. package/source/smart.maskedtextbox.js +1 -1
  287. package/source/smart.math.js +1 -1
  288. package/source/smart.menu.js +1 -1
  289. package/source/smart.multicomboinput.js +1 -1
  290. package/source/smart.multiinput.js +1 -1
  291. package/source/smart.multilinetextbox.js +1 -1
  292. package/source/smart.multisplitbutton.js +1 -1
  293. package/source/smart.numberformatpanel.js +1 -1
  294. package/source/smart.numberinput.js +1 -1
  295. package/source/smart.numeric.js +1 -1
  296. package/source/smart.numerictextbox.js +1 -1
  297. package/source/smart.pager.js +1 -1
  298. package/source/smart.passwordinput.js +1 -1
  299. package/source/smart.passwordtextbox.js +1 -1
  300. package/source/smart.path.js +1 -1
  301. package/source/smart.phoneinput.js +1 -1
  302. package/source/smart.pivottable.js +1 -1
  303. package/source/smart.powerbutton.js +1 -1
  304. package/source/smart.progressbar.js +1 -1
  305. package/source/smart.qrcode.js +1 -1
  306. package/source/smart.radiobutton.js +1 -1
  307. package/source/smart.rating.js +1 -1
  308. package/source/smart.router.js +1 -1
  309. package/source/smart.scheduler.js +1 -1
  310. package/source/smart.scrollbar.js +1 -1
  311. package/source/smart.slider.js +1 -1
  312. package/source/smart.sortable.js +1 -1
  313. package/source/smart.splitter.js +1 -1
  314. package/source/smart.switchbutton.js +1 -1
  315. package/source/smart.table.js +1 -1
  316. package/source/smart.tabs.js +1 -1
  317. package/source/smart.tank.js +1 -1
  318. package/source/smart.textarea.js +1 -1
  319. package/source/smart.textbox.js +1 -1
  320. package/source/smart.tickintervalhandler.js +1 -1
  321. package/source/smart.timeinput.js +1 -1
  322. package/source/smart.timepicker.js +1 -1
  323. package/source/smart.toast.js +1 -1
  324. package/source/smart.tooltip.js +1 -1
  325. package/source/smart.tree.js +1 -1
  326. package/source/smart.validationpanel.js +1 -1
  327. package/source/smart.validator.js +1 -1
  328. package/source/smart.window.js +1 -1
  329. package/source/styles/components/smart.grid.css +1 -1
  330. package/source/styles/default/scss/smart.grid.scss +10 -3
  331. package/source/styles/default/smart.grid.css +7 -3
  332. package/source/styles/smart.default.css +1 -1
  333. package/source/typescript/smart.editor.d.ts +4 -2
  334. package/source/typescript/smart.elements.d.ts +45 -3
  335. package/source/typescript/smart.fileupload.d.ts +2 -1
  336. package/source/typescript/smart.grid.d.ts +34 -0
  337. package/source/typescript/smart.querybuilder.d.ts +5 -0
  338. package/splitter/splitter.d.ts +3 -3
  339. package/splitter/splitter.esm.js +6 -61
  340. package/splitter/splitter.umd.js +901 -956
  341. package/table/pivottable.d.ts +3 -3
  342. package/table/table.d.ts +7 -7
  343. package/table/table.esm.js +14 -109
  344. package/table/table.umd.js +1278 -1373
  345. package/tabs/tabs.d.ts +4 -4
  346. package/tabs/tabs.esm.js +8 -73
  347. package/tabs/tabs.umd.js +875 -940
  348. package/tabs/tabswindow.d.ts +5 -5
  349. package/tabswindow/tabswindow.d.ts +5 -5
  350. package/tabswindow/tabswindow.esm.js +10 -85
  351. package/tabswindow/tabswindow.umd.js +1134 -1209
  352. package/tank/tank.d.ts +2 -2
  353. package/tank/tank.esm.js +4 -49
  354. package/tank/tank.umd.js +598 -643
  355. package/textbox/multilinetextbox.d.ts +1 -1
  356. package/textbox/numerictextbox.d.ts +1 -1
  357. package/timepicker/datetimepicker.d.ts +1 -1
  358. package/toast/toast.d.ts +1 -1
  359. package/toast/toast.esm.js +2 -37
  360. package/toast/toast.umd.js +397 -432
  361. package/tree/tree.d.ts +4 -4
  362. package/tree/tree.esm.js +8 -73
  363. package/tree/tree.umd.js +1310 -1375
  364. package/waitwindow/waitwindow.d.ts +5 -5
  365. package/waitwindow/waitwindow.esm.js +10 -85
  366. package/waitwindow/waitwindow.umd.js +1134 -1209
  367. package/window/alertwindow.d.ts +5 -5
  368. package/window/dialogwindow.d.ts +5 -5
  369. package/window/multilinewindow.d.ts +5 -5
  370. package/window/progresswindow.d.ts +5 -5
  371. package/window/promptwindow.d.ts +5 -5
  372. package/window/tabswindow.d.ts +5 -5
  373. package/window/waitwindow.d.ts +5 -5
  374. package/window/window.d.ts +5 -5
  375. package/window/window.esm.js +10 -85
  376. package/window/window.umd.js +1134 -1209
@@ -142,7 +142,7 @@ var __webpack_exports__ = {};
142
142
  /* harmony import */ var _smart_tank_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(5478);
143
143
  /* harmony import */ var _smart_tank_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_smart_tank_js__WEBPACK_IMPORTED_MODULE_7__);
144
144
 
145
- /* Smart UI v14.2.83 (2022-09-09)
145
+ /* Smart UI v14.3.0 (2022-09-27)
146
146
  Copyright (c) 2011-2022 jQWidgets.
147
147
  License: https://htmlelements.com/license/ */ //
148
148
 
@@ -24,7 +24,7 @@ Smart("smart-button",class extends Smart.ContentElement{static get properties(){
24
24
  /***/ 8588:
25
25
  /***/ (() => {
26
26
 
27
- Smart("smart-input",class extends Smart.BaseElement{static get properties(){return{autoCompleteDelay:{value:100,type:"number"},dataSource:{type:"any",value:[],reflectToAttribute:!1},dropDownClassList:{value:[],type:"array",reflectToAttribute:!1},dropDownDataSource:{type:"any",value:[]},dropDownHeight:{type:"any",value:200},dropDownOpenMode:{allowedValues:["default","manual"],value:"default",type:"string"},dropDownWidth:{type:"any",value:null},dropDownButtonPosition:{allowedValues:["none","left","right"],value:"none",type:"string"},dropDownOpenPosition:{allowedValues:["bottom","top"],value:"bottom",type:"string"},hint:{type:"string",value:""},inputPurpose:{type:"string",value:"off"},items:{type:"number",value:8},minLength:{type:"number",value:1},name:{value:"",type:"string"},opened:{value:!1,type:"boolean"},query:{type:"string",value:""},queryMode:{allowedValues:["contains","containsIgnoreCase","doesNotContain","doesNotContainIgnoreCase","equals","equalsIgnoreCase","startsWith","startsWithIgnoreCase","endsWith","endsWithIgnoreCase"],type:"string",value:"containsIgnoreCase"},placeholder:{value:"",type:"string"},readonly:{type:"boolean",value:!1},sorted:{value:!1,type:"boolean"},sortDirection:{value:"asc",type:"string"},selectedIndex:{type:"number",value:-1},selectedValue:{type:"any",value:""},selectedValues:{value:[],type:"array"},type:{type:"string"},value:{type:"string",value:""},innerHTML:{type:"string",reflectToAttribute:!1}}}static get styleUrls(){return["smart.textbox.css"]}template(){return'<div id="inputContainer" role="presentation"><div id="optionsContainer" inner-h-t-m-l=\'{{innerHTML}}\' class="smart-hidden"></div><input class="smart-input" id=\'input\' readonly=\'[[readonly]]\' placeholder=\'[[placeholder]]\' type=\'[[type]]\' name=\'[[name]]\' value=\'{{value::keyup}}\' disabled=\'[[disabled]]\' aria-label="[[placeholder]]" /><span class="smart-hidden smart-hint" id="span">[[hint]]</span><div id="dropDownButton" tabindex=-1 class="smart-drop-down-button" role="button" aria-label="Toggle popup"><div id="arrow" class="arrow" aria-hidden="true"></div></div></div>'}static get listeners(){return{"input.focus":"_focusHandler","input.blur":"_blurHandler","input.keydown":"_keyDownHandler","input.keyup":"_keyUpHandler","input.keypress":"_keyPressHandler","input.paste":"_pasteHandler","dropDownButton.down":"_dropDownButtonDownHandler","inputContainer.down":"_downHandler","document.up":"_documentUpHandler"}}get selectedIndexes(){return this.isCompleted?[this.selectedIndex]:[]}set selectedIndexes(e){if(!this.isCompleted)return;const t=this;if(e&&void 0!==e[0]){if(this.selectedIndex=e[0],null===this.dataSource)return;const a=this.dataSource[this.selectedIndex];if(!a)return;const r=this.context;this.context=this,this.$.input.dataValue=this.selectedValue="string"==typeof a?a:a.value,this.setAttribute("data-value",this.$.input.dataValue);let o=t.dataSource;"string"==typeof o&&(o=t.$.deserialize(o,"array"));for(let e=0;e<o.length;e++){let a=o[e];"string"!=typeof a&&"number"!=typeof a&&(a.value===t.$.input.dataValue?a.selected=!0:a.selected=!1)}this.context=r}else{const e=this.context;this.context=this,this.$.input.dataValue=this.selectedValue="",this.setAttribute("data-value",this.$.input.dataValue),this.selectedIndex=-1;let a=t.dataSource;if("string"==typeof a&&(a=t.$.deserialize(a,"array")),a&&Array.isArray(a))for(let e=0;e<a.length;e++){let r=a[e];"string"!=typeof r&&(r.value===t.$.input.dataValue?r.selected=!0:r.selected=!1)}this.context=e}}focus(){this.$.input.focus()}select(){const e=this;e.readonly?e.$.input.focus():e.$.input.select()}_documentUpHandler(e){const t=this,a=t.shadowRoot||t.isInShadowDOM?e.originalEvent.composedPath()[0]:e.originalEvent.target;a!==t&&a!==t.$.dropDownButton&&a!==t.$.input&&a!==t.$.arrow?t.$.scrollView.contains(a.shadowParent||a)?t._isPointerDown&&(t._isPointerDown=!1,t.opened&&(t._preventLookup=!0),t.$.input.focus()):(t.opened&&(t._preventLookup=!0),"manual"===t.dropDownOpenMode||t._isPointerDown||t.close(),t._isPointerDown=!1):t._isPointerDown=!1}_focusHandler(){const e=this;e.setAttribute("focus",""),e.readonly||0!==e.minLength||0!==e.$.input.value.length||e._preventLookup?(e.$.fireEvent("focus"),delete e._preventLookup):e._lookup()}_blurHandler(){const e=this;e.opened||e.removeAttribute("focus"),e.opened||e.$.fireEvent("blur"),e._refreshSelectedIndex(),delete e._preventLookup}_pasteHandler(e){const t=this,a=t.$.input,r=a.value,o=a.selectionStart,l=a.selectionEnd;if(!e.clipboardData&&!window.clipboardData)return;const n=(e.clipboardData||window.clipboardData).getData("text");let s=r.slice(0,o)+n,i=s.length;s+=r.slice(l),e.preventDefault(),t.set("value",s),t.setAttribute("data-value",s),a.setSelectionRange(i,i),t._refreshSelectedIndex()}_refreshSelectedIndex(){const e=this;let t=e.dataSource;if(t){let a=-1,r=null;if(e.dataSource instanceof Promise)return;if("function"==typeof e.dataSource)return;"string"==typeof t&&(t=e.$.deserialize(t,"array"));for(let o=0;o<t.length;o++){let l=t[o];if("number"!=typeof l&&"boolean"!=typeof l||(l=""+l),"string"==typeof l){if(l===e.value){a=o,r=e.value;break}}else l&&(delete l.selected,l.label===e.value&&(a=o,r=l.value,l.selected=!0))}e.set("selectedIndex",a,!1),e.set("selectedValue",r,!1),-1===e.selectedIndex&&(e.$.input.dataValue=null)}}selectItem(e){const t=this;let a=t.dataSource;if("string"==typeof a&&(a=t.$.deserialize(a,"array")),a)for(let r=0;r<a.length;r++){const o=a[r];if(t.set("selectedIndex",-1),t.set("value",""),t.$.input.dataValue=null,"string"==typeof o){if(o===e)return t.set("selectedIndex",r,!1),t.set("value",t.$.input.dataValue=e),void t.setAttribute("data-value",t.$.input.dataValue)}else if(o.value===e)return t.set("selectedIndex",r,!1),t.set("value",o.label),t.$.input.dataValue=e,void t.setAttribute("data-value",t.$.input.dataValue)}else t.set("value",t.$.input.dataValue=e),t.setAttribute("data-value",t.$.input.dataValue),t.set("selectedIndex",-1,!1)}getItem(e){const t=this;if(t.dataSource)for(let a=0;a<t.dataSource.length;a++){const r=t.dataSource[a];if(r.value===e)return r}return null}getPrevItem(){const e=this,t=e.getSelectedItem();if(e.dataSource&&t)for(let a=0;a<e.dataSource.length;a++)if(e.dataSource[a].value===t.value)return e.dataSource[a-1];return null}getNextItem(){const e=this,t=e.getSelectedItem();if(e.dataSource&&t)for(let a=0;a<e.dataSource.length;a++)if(e.dataSource[a].value===t.value)return e.dataSource[a+1];return null}getSelectedItem(){const e=this;return e.dataSource&&0===e.dataSource.length?{label:e.value,value:e.$.input.dataValue?e.$.input.dataValue:e.value}:{label:e.value,value:void 0!==e.$.input.dataValue?e.$.input.dataValue:e.value}}_refreshMenu(){const e=this;e.$.menu.classList.remove("scroll"),e.$.scrollView.computedVerticalScrollBarVisibility&&e.$.menu.classList.add("scroll")}_performSelect(){const e=this,t=e.$.menu.querySelector(".active"),a=t.getAttribute("data-label"),r=t.dataValue,o=e.value,l=e.$.input.dataValue;e.set("value",a),e.$.input.dataValue=r,e.setAttribute("data-value",r),e.set("selectedIndex",t.index),e.set("selectedValues",[e.$.input.dataValue]),e.set("selectedValue",e.$.input.dataValue);let n=e.dataSource;if("string"==typeof n&&(n=e.$.deserialize(n,"array")),n&&Array.isArray(n))for(let t=0;t<n.length;t++){let a=n[t];"string"!=typeof a&&"number"!=typeof a&&(a.value===e.$.input.dataValue?a.selected=!0:a.selected=!1)}e.close(),a===o&&r===l||(e.$.fireEvent("change",{value:r,label:a,oldValue:l,oldLabel:o}),e._updateTargetValue())}_open(){const e=this;if(e.opened)return;const t=window.scrollX,a=window.scrollY;let r=e.getBoundingClientRect(),o=0,l=0;if(e.timer&&clearTimeout(e.timer),e.getRootNode()&&e.getRootNode().host?e.getRootNode().host.shadowRoot.appendChild(e.$.scrollView):document.body.appendChild(e.$.scrollView),e.setAttribute("aria-owns",e.$.scrollView.id),e.readonly||e.$.input.setAttribute("aria-controls",e.$.scrollView.id),e.$.scrollView.enableShadowDOM&&!e._importedStyle&&(e.$.scrollView.importStyle(e._getStyleUrl("smart.textbox.css")),e._importedStyle=!0),"static"!==getComputedStyle(document.body).position){const e=document.body.getBoundingClientRect();o=e.left,l=e.top}e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",""),e.$.scrollView.style.left=-3+r.left+t-o+"px",e.$.scrollView.classList.remove("open"),"bottom"===e.dropDownOpenPosition?e.$.scrollView.style.top=r.bottom+a-l+1+"px":e.$.scrollView.style.top=r.top-e.$.scrollView.offsetHeight+a-l+1+"px",e.opening=!0,e._positionTimer&&clearInterval(e._positionTimer),e._positionTimer=setInterval((()=>{const t=e.getBoundingClientRect();if(e.opening)e.opening=!1,r=t;else if(Math.abs(parseInt(t.top)-parseInt(r.top))>=10||Math.abs(parseInt(t.left)-parseInt(r.left))>=10){const a=window.scrollX,r=window.scrollY;return e.$.scrollView.style.left=-3+t.left+a-o+"px",void("bottom"===e.dropDownOpenPosition?e.$.scrollView.style.top=t.bottom+r-l+1+"px":e.$.scrollView.style.top=t.top-e.$.scrollView.offsetHeight+r-l+1+"px")}}),50),e.$.scrollView.onpointerdown=function(){e._isPointerDown=!0},requestAnimationFrame((function(){const t=e.dropDownWidth;if(e.$.scrollView.refresh&&e.$.scrollView.refresh(),e._refreshMenu(),e.$.scrollView.setAttribute("open",""),e.setAttribute("open",""),e.$.dropDownButton.setAttribute("open",""),e.$.input.setAttribute("open",""),t&&"string"==typeof t&&-1!==t.indexOf("%")){const a=parseFloat(t)/100;e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",e.offsetWidth*a+"px")}else if("auto"!==t&&t)e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",parseFloat(t)+"px");else if("auto"===t){if(e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",""),e.$.scrollView.$.scrollViewerContainer.classList.contains("vscroll")){const t=e.$.scrollView.offsetWidth+parseFloat(getComputedStyle(e.$.scrollView).getPropertyValue("--smart-scroll-bar-size"));e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",t+"px")}}else{e.$.menu.style.width="auto";let t=e.$.menu.offsetWidth;const a=e.$.menu.querySelectorAll("li");for(let t=0;t<a.length;t++)e._maxDropDownWidth=Math.max((a[t].firstElementChild||a[t]).offsetWidth,e._maxDropDownWidth);e.$.scrollView.computedVerticalScrollBarVisibility&&(t+=e.$.scrollView.$&&e.$.scrollView.$.verticalScrollBar?e.$.scrollView.$.verticalScrollBar.offsetWidth:30),e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",Math.max(t,e.offsetWidth-8)+"px"),e.$.menu.style.width=""}(e.shadowRoot||e.isInShadowDOM)&&e.$.scrollView._scrollView&&Smart.ScrollBar&&requestAnimationFrame((()=>{e.$.scrollView._scrollView&&e.$.scrollView._scrollView.vScrollBar.refresh()}))})),e.$.scrollView.refresh&&e.$.scrollView.refresh(),e._refreshMenu(),e.set("opened",!0),e.setAttribute("aria-expanded",!0),e.$.fireEvent("open")}close(){const e=this;return!!e.opened&&(e.timer&&clearTimeout(e.timer),e.timer=setTimeout((function(){e.$.scrollView.parentNode&&!e.opened&&(e.$.scrollView.remove(),e.removeAttribute("aria-owns"),e.readonly||e.$.input.removeAttribute("aria-controls"))}),1e3),e._positionTimer&&clearInterval(e._positionTimer),e.$.scrollView.removeAttribute("open"),e.$.dropDownButton.removeAttribute("open"),e.$.input.removeAttribute("open"),e.removeAttribute("open"),e.set("opened",!1),e.setAttribute("aria-expanded",!1),e.$.input.focus(),e.$.fireEvent("close"),!0)}refresh(){const e=this;e.$.scrollView.refresh&&e.$.scrollView.refresh(),e._getDataSourceFromOption(),e.close()}_lookup(e){const t=this;if(t.query=t.$.input.value,t.$.input.readonly&&(t._incrementalSearchQuery||(t._incrementalSearchQuery=""),t._incrementalSearchQuery+=e.key,t._incrementalSearchTimer&&clearTimeout(t._incrementalSearchTimer),t.query=t._incrementalSearchQuery,t._incrementalSearchTimer=setTimeout((function(){t._incrementalSearchQuery=""}),700)),t.query.length<t.minLength)return void t.close();const a=function(e){clearTimeout(t._autoCompleteTimeout),t._autoCompleteTimeout=setTimeout((()=>{const a=t.context;t.context=t,t._process(e),t.context=a}),t.autoCompleteDelay)};"function"==typeof t.dataSource?t.dataSource(t.query,a):a(t.dataSource)}_downHandler(e){const t=this;t.readonly&&t._dropDownButtonDownHandler(e)}_dropDownButtonDownHandler(e){const t=this;return"manual"!==t.dropDownOpenMode&&t._toggle(),e.preventDefault(),e.stopPropagation(),e.originalEvent.preventDefault(),e.originalEvent.stopPropagation(),t._isPointerDown=!0,!1}_toggle(){const e=this;e.opened?e.close():e.open()}open(){const e=this;function t(t){e._process(t);const a=e.$.menu.querySelector(".active");if(a){const t=e.$.input.dataValue;for(let r=0;r<e.$.menu.children.length;r++){const o=e.$.menu.children[r],l=o.getAttribute("data-label"),n=o.dataValue;if(void 0!==t&&n===t||void 0===t&&l===e.$.input.value){a.classList.remove("active"),o.classList.add("active"),e._setActiveDescendant(o),e.$.input.dataValue=n,e.setAttribute("data-value",n);break}}}e.ensureVisible(),e.$.input.focus(),setTimeout((function(){e.$.input.focus()}),25)}e.dropDownDataSource&&(Array.isArray(e.dropDownDataSource)&&e.dropDownDataSource.length>0||"function"==typeof e.dropDownDataSource)?(e.query="","function"==typeof e.dropDownDataSource?e.dropDownDataSource(e.query,t):t(e.dropDownDataSource)):(e.query="","function"==typeof e.dataSource?e.dataSource(e.query,t):t(e.dataSource))}_process(e){const t=this;"string"==typeof e&&(e=t.$.deserialize(e,"array")),e=t.readonly?e.filter((function(){return!0})):e.filter((function(e){return""===e||(t.matcher?t.matcher(e):t._matcher(e))})),e=t._sorter(e),t.sorted&&(e.sort(((e,t)=>void 0!==e.label?e.label.localeCompare(t.label):e.localeCompare(t))),"desc"===t.sortDirection&&e.reverse()),!e.length&&t.opened&&t.close(),0===e.length&&!0!==t.allowItemsAdd||(t.query.length>0?t._render(e.slice(0,t.items)):t._render(e),t._open(),t.$.scrollView.refresh&&t.$.scrollView.refresh(),t._refreshMenu(),t.ensureVisible())}_matcher(e){const t=this.query;switch(null===e&&(e="null"),e=""+(e=e.label||e),this.queryMode){case"startsWith":return e.startsWith(t);case"startsWithIgnoreCase":return e.toLowerCase().startsWith(t.toLowerCase());case"doesNotContain":return e.indexOf(t)<0;case"doesNotContainIgnoreCase":return e.toLowerCase().indexOf(t.toLowerCase())<0;case"contains":return e.indexOf(t)>-1;default:case"containsIgnoreCase":return~e.toLowerCase().indexOf(t.toLowerCase());case"equals":return 0===e.localeCompare(t);case"equalsIgnoreCase":return 0===e.toLowerCase().localeCompare(t.toLowerCase());case"endsWith":return e.endsWith(t);case"endsWithIgnoreCase":return e.toLowerCase().endsWith(t.toLowerCase())}}_sorter(e){const t=this;let a,r=[],o=[],l=[];if(e&&""===e[0])return e;for(;a=e.shift();){let e=a.label||a;e=""+e,e.toLowerCase().indexOf(t.query.toLowerCase())?~e.indexOf(t.query)?o.push(a):l.push(a):r.push(a)}return r.concat(o,l)}_highlighter(e){const t=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return this.query?e.replace(new RegExp("("+t+")","ig"),(function(e,t){return"<strong>"+t+"</strong>"})):e}_render(e){const t=this;let a=0,r=-1,o=null;const l=e.map((function(e){let l=e,n=e;"object"==typeof e&&(l=e.label,n=void 0!==e.value?e.value:l),l=""+l;const s=document.createElement("li"),i=document.createElement("a");if(i.href="#",s.id=t.id+"Item"+Math.floor(65536*(1+Math.random())).toString(16).substring(1),s.setAttribute("data-label",l),s.index=a++,s.dataValue=n,"string"==typeof n?s.setAttribute("value",n):s.setAttribute("value",JSON.stringify(n)),s.setAttribute("role","option"),s.setAttribute("aria-label",l),void 0!==e.menuLabel?(l=e.menuLabel,i.innerHTML=l):i.innerHTML=t.highlighter?t.highlighter(l):t._highlighter(l),i.setAttribute("aria-hidden",!0),e.disabled&&s.classList.add("smart-disabled"),e.icon&&(i.classList.add("icon"),i.classList.add(e.icon)),e.prefix){const t=document.createElement("span");t.innerHTML=e.prefix,i.classList.add("has-prefix"),i.innerHTML=t.innerHTML+i.innerHTML}if(e.suffix){const t=document.createElement("span");t.innerHTML=e.suffix,i.classList.add("has-suffix"),i.innerHTML=i.innerHTML+t.innerHTML}if(e.dataset)for(let t in e.dataset)s.setAttribute("data-"+t,e.dataset[t]);if(e.className){const t=e.className.split(" ");for(let e=0;e<t.length;e++)s.classList.add(t[e].trim())}return void 0!==t.selectedValue&&void 0!==e.value&&""!==t.selectedValue&&t.selectedValue===e.value&&(e.selected=!0,o=e,r=s.index,s.classList.add("active")),s.appendChild(i),s}));function n(){const e=t.$.menu.getElementsByClassName("active");e[0]&&e[0].classList.remove("active"),this.classList.add("active"),t._setActiveDescendant(this)}-1===r&&l.length>0&&(l[0].classList.add("active"),t._setActiveDescendant(l[0])),o&&(t.$.input.value=o.label,t.$.input.dataValue=o.value,t.setAttribute("data-value",t.$.input.dataValue)),t.$.menu.innerHTML="";for(let e=0;e<l.length;e++){const a=l[e];t.$.menu.appendChild(a),a.onmouseenter=n,a.onmouseleave=function(){this.classList.remove("active"),t._setActiveDescendant(null)},a.onclick=n}}ensureVisible(){const e=this,t=e.$.menu.querySelector(".active");t&&(t.offsetTop+t.offsetHeight>=e.$.scrollView.scrollTop+e.$.scrollView.offsetHeight&&(e.$.scrollView.scrollTop=t.offsetTop+t.offsetHeight),(t.offsetTop<=e.$.scrollView.scrollTop||t.offsetTop>=e.$.scrollView.scrollTop+e.$.scrollView.offsetHeight)&&(e.$.scrollView.scrollTop=t.offsetTop),0===[...e.$.menu.children].indexOf(t)?e.$.scrollView.scrollTop=0:[...e.$.menu.children].indexOf(t)===e.$.menu.children.length-1&&(e.$.scrollView.scrollTop=e.$.scrollView.scrollHeight))}_next(){const e=this,t=e.$.menu.querySelector(".active");if(!t){const t=e.$.menu.firstElementChild;return t.classList.add("active"),void e._setActiveDescendant(t)}t.classList.remove("active");let a=t.nextElementSibling;a||(a=e.$.menu.firstElementChild),a.classList.add("active"),e._setActiveDescendant(a),e.ensureVisible()}_prev(){const e=this,t=e.$.menu.querySelector(".active");if(!t){const t=e.$.menu.firstElementChild;return t.classList.add("active"),void e._setActiveDescendant(t)}t.classList.remove("active");let a=t.previousElementSibling;a||(a=e.$.menu.lastElementChild),a.classList.add("active"),e._setActiveDescendant(a),e.ensureVisible()}_move(e){const t=this;if(t.readonly&&!t.opened){if("ArrowUp"===e.key){const a=t.getPrevItem();a&&t.selectItem(a.value),e.preventDefault()}if("ArrowDown"===e.key){const a=t.getNextItem();a&&t.selectItem(a.value),e.preventDefault()}}if(t.opened){switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),t._prev();break;case 40:e.preventDefault(),t._next()}e.stopPropagation()}}_keyDownHandler(e){const t=this;t._suppressKeyPressRepeat=![40,38,9,13,27,16,17,18].includes(e.keyCode),t._oldValue=t.$.input.value,e.shiftKey||e.altKey||e.ctrlKey||t._move(e)}_keyPressHandler(e){this._suppressKeyPressRepeat||e.shiftKey||e.altKey||e.ctrlKey||this._move(e)}_keyUpHandler(e){const t=this;if(!e.shiftKey&&"F2"!==e.key)switch(e.keyCode){case 40:case 38:case 16:case 17:case 18:40===e.keyCode&&e.altKey&&t.open(),38===e.keyCode&&e.altKey&&t.close();break;case 9:case 13:if(!t.opened)return;t._performSelect(),e.stopPropagation(),e.preventDefault();break;case 27:if(!t.opened)return;t.close(),e.stopPropagation(),e.preventDefault();break;default:t._lookup(e),!t.opened||e.ctrlKey||e.shiftKey||(e.stopPropagation(),e.preventDefault()),t.$.fireEvent("changing",{value:t.$.input.value,oldValue:t._oldValue}),t.$.input.dataValue=t.$.input.value,t.setAttribute("data-value",t.$.input.dataValue),t._updateTargetValue()}}propertyChangedHandler(e,t,a){super.propertyChangedHandler(e,t,a);const r=this;if("innerHTML"===e&&(r._getDataSourceFromOption(),r._setSelection(!1)),"selectedValue"===e){let e=-1;if(r.dataSource&&Array.isArray(r.dataSource)&&r.dataSource.forEach(((t,r)=>{"string"==typeof t?t===a&&(e=r):t&&t.value===a&&(e=r)})),e>=0){const t=r.context;r.context=r,r.selectedIndex=e,r.context=t}r._setSelection()}if("selectedIndex"===e){let e=r.dataSource;if(r.selectedValue=null,e&&Array.isArray(e))for(let t=0;t<e.length;t++){let a=e[t];"string"!=typeof a&&"number"!=typeof a&&(a.selected=!1)}r._setSelection()}else if("dataSource"===e){if(r.dataSource&&Array.isArray(r.dataSource)){let e=-1;if(r.dataSource.forEach(((t,a)=>{t.selected&&(e=a)})),e>=0){const t=r.context;r.context=r,r.selectedIndex=e,r.context=t}}r._setSelection(!1)}else if("dropDownClassList"===e){const e=r.$.scrollView;for(let a=0,r=t.length;a<r;a+=1)e.classList.remove(t[a]);for(let t=0,r=a.length;t<r;t+=1)e.classList.add(a[t])}else if("dropDownHeight"===e)"auto"!==r.dropDownHeight?r.$.scrollView.style.setProperty("--smart-input-drop-down-menu-height",r.dropDownHeight+"px"):r.$.scrollView.style.setProperty("--smart-input-drop-down-menu-height","auto");else if("opened"===e)r.opened=t,a?r.open():r.close();else if("placeholder"===e){if(r.readonly){const e=r.getAttribute("aria-label");if(e&&e!==t)return;a?r.setAttribute("aria-label",a):r.removeAttribute("aria-label")}}else if("selectedValues"===e)if(null===a)r.$.input.value="",r.$.input.dataValue=a,r.setAttribute("data-value",a),r._refreshSelectedIndex();else{const e=a.join(","),t=r.value;r.$.input.dataValue=e,r._setSelection(),r.propertyChangedHandler("value",t,r.value)}else"value"===e?(r.displayMember!==r.valueMember&&"string"!=typeof a?(r.set("value",a[r.displayMember]),r.$.input.dataValue=a[r.valueMember],r.setAttribute("data-value",r.$.input.dataValue)):(r.$.input.value=r.$.input.dataValue=a,r.setAttribute("data-value",a)),r._refreshSelectedIndex()):"readonly"===e?(r._setAriaRelations(),r._setInputPurpose()):"theme"===e||"rightToLeft"===e?r.$.scrollView[e]=a:"inputPurpose"===e?r._setInputPurpose():"inverted"===e?a?r.$.scrollView.setAttribute("inverted",""):r.$.scrollView.removeAttribute("inverted"):"disabled"!==e&&"unfocusable"!==e||r._setFocusable()}_updateTargetValue(){const e=this;if(e.dataset.target){const t=document.querySelector(e.dataset.target);if(t){const a=e.dataset.property,r=e.value;a&&void 0!==t[a]&&(t[a]=r)}}}detached(){super.detached(),this.close(),this.removeAttribute("focus")}_getDataSourceFromOption(){const e=this;if(e.innerHTML.indexOf("<option")>=0){e.$.optionsContainer.innerHTML=e.innerHTML.trim();const t=e.querySelectorAll("option");let a=[];for(let e=0;e<t.length;e++){const r=t[e],o=r.hasAttribute("selected"),l=(""+r.textContent).trim(),n=(""+r.innerHTML).trim(),s=r.hasAttribute("value")?r.getAttribute("value"):l,i=r.hasAttribute("disabled");a.push({label:l,menuLabel:n,value:s,disabled:i,selected:o,className:r.className,dataset:r.dataset}),r.classList.add("smart-hidden")}e.dataSource=a}}render(){const e=this,t=e.dropDownClassList;if(e._getDataSourceFromOption(),e.selectedValues&&e.selectedValues.length){const t=e.selectedValues.join(",");e.value=t}e._createElement&&e._createElement();const a=e.$.scrollView;for(let e=0,r=t.length;e<r;e+=1)a.classList.add(t[e]);e.opened&&(e.opened=!1,e.open());const r=e.$.menu;r&&(r.setAttribute("role","presentation"),a.appendChild(r)),"auto"!==e.dropDownHeight?a.style.setProperty("--smart-input-drop-down-menu-height",e.dropDownHeight+"px"):a.style.setProperty("--smart-input-drop-down-menu-height","auto"),a.classList.add("smart-input-drop-down-menu");for(let t=0;t<e.classList.length;t++){const r=e.classList[t];"smart-element"!==r&&"smart-input"!==r&&a.classList.add(r+"-drop-down-menu")}a.id=e.id+"_"+e.tagName.toLowerCase()+"_menu_"+Math.floor(65536*(1+Math.random())).toString(16).substring(1),a.ownerElement=e;let o=e.dataSource;if("string"==typeof o&&(o=e.$.deserialize(o,"array")),o&&o.length&&Array.isArray(o)){let t=-1;if(o.forEach(((e,a)=>{e.selected&&(t=a)})),t>=0){e.selectedIndex=t;const a=o[t];e.selectedValue="string"==typeof a?o[t]:o[t].value}}e._setAriaRelations(),e._setInputPurpose(),e._setSelection(),e.isInitialized=!0,super.render()}_setSelection(e){const t=this;let a=t.dataSource;if("string"==typeof a&&(a=t.$.deserialize(a,"array")),t.selectedIndex>=0&&a&&a.length>0){let r=a[t.selectedIndex];if("number"!=typeof r&&"boolean"!=typeof r||(r=""+r),"string"==typeof r){let e=t.$.input.dataValue,a=t.value;t.set("value",r),t.$.input.dataValue=r,t.$.input.setAttribute("data-value",r),t.selectedValues=[t.$.input.dataValue],t.isInitialized&&(t.$.fireEvent("change",{value:t.value,label:t.label,oldValue:e,oldLabel:a}),t._updateTargetValue())}else{let a=t.$.input.dataValue,o=t.value;r&&(void 0!==r.value?(t.set("value",void 0!==r.value?r.value+"":""),t.$.input.dataValue=r.value,t.$.input.setAttribute("data-value",r.value),t.selectedValues=[t.$.input.dataValue]):r.label&&(t.selectedValues=[r.value]),r.label&&t.set("value",r.label)),t.isInitialized&&!1!==e&&(t.$.fireEvent("change",{value:t.$.input.dataValue,label:r.value,oldValue:a,oldLabel:o}),t._updateTargetValue())}}}_createElement(){const e=this,t=document.createElement("ul"),a=document.createElement("smart-scroll-viewer");a.rightToLeft=e.rightToLeft,a.theme=e.theme,a.horizontalScrollBarVisibility="hidden",e.inverted?a.setAttribute("inverted",""):a.removeAttribute("inverted"),e.$.scrollView=a,e.$.menu=t,e._setFocusable(),e.$.menu.onclick=function(t){const a=t.target.closest("li");t.stopPropagation(),t.preventDefault(),e._performSelect(),a&&e.$.fireEvent("itemClick",{item:a,label:a.getAttribute("aria-label"),value:a.dataValue}),e.$.input.focus()}}_setAriaRelations(){const e=this,t=e.getAttribute("aria-label");e.readonly?(e.setAttribute("role","button"),!t&&e.placeholder&&e.setAttribute("aria-label",e.placeholder),e.removeAttribute("aria-readonly"),e.$.input.setAttribute("aria-hidden",!0),e.$.input.removeAttribute("aria-activedescendant"),e.$.input.removeAttribute("aria-controls"),e.$.dropDownButton.setAttribute("aria-hidden",!0)):(e.setAttribute("role","combobox"),t&&t===e.placeholder&&e.removeAttribute("aria-label"),e.$.input.setAttribute("role","searchbox"),e.$.input.removeAttribute("aria-hidden",!0),e.$.dropDownButton.removeAttribute("aria-hidden")),e.setAttribute("aria-expanded",e.opened),e.setAttribute("aria-haspopup","listbox"),e.setAttribute("aria-owns",e.$.scrollView.id),e.$.scrollView.setAttribute("role","listbox")}_setActiveDescendant(e){const t=this;t.readonly||(e?t.setAttribute("aria-activedescendant",e.id):t.removeAttribute("aria-activedescendant"))}_setInputPurpose(){const e=this;e.readonly?e.$.input.removeAttribute("autocomplete"):e.$.input.setAttribute("autocomplete",e.inputPurpose)}_setFocusable(){const e=this;e.disabled||e.unfocusable?e.$.input.setAttribute("tabindex",-1):e.$.input.removeAttribute("tabindex")}});
27
+ Smart("smart-input",class extends Smart.BaseElement{static get properties(){return{autoCompleteDelay:{value:100,type:"number"},dataSource:{type:"any",value:[],reflectToAttribute:!1},dropDownClassList:{value:[],type:"array",reflectToAttribute:!1},dropDownDataSource:{type:"any",value:[]},dropDownHeight:{type:"any",value:200},dropDownOpenMode:{allowedValues:["default","manual"],value:"default",type:"string"},dropDownAppendTo:{value:null,type:"any"},dropDownWidth:{type:"any",value:null},dropDownButtonPosition:{allowedValues:["none","left","right"],value:"none",type:"string"},dropDownOpenPosition:{allowedValues:["bottom","top"],value:"bottom",type:"string"},hint:{type:"string",value:""},inputPurpose:{type:"string",value:"off"},items:{type:"number",value:8},minLength:{type:"number",value:1},name:{value:"",type:"string"},opened:{value:!1,type:"boolean"},query:{type:"string",value:""},queryMode:{allowedValues:["contains","containsIgnoreCase","doesNotContain","doesNotContainIgnoreCase","equals","equalsIgnoreCase","startsWith","startsWithIgnoreCase","endsWith","endsWithIgnoreCase"],type:"string",value:"containsIgnoreCase"},placeholder:{value:"",type:"string"},readonly:{type:"boolean",value:!1},sorted:{value:!1,type:"boolean"},sortDirection:{value:"asc",type:"string"},selectedIndex:{type:"number",value:-1},selectedValue:{type:"any",value:""},selectedValues:{value:[],type:"array"},type:{type:"string"},value:{type:"string",value:""},innerHTML:{type:"string",reflectToAttribute:!1}}}static get styleUrls(){return["smart.textbox.css"]}template(){return'<div id="inputContainer" role="presentation"><div id="optionsContainer" inner-h-t-m-l=\'{{innerHTML}}\' class="smart-hidden"></div><input class="smart-input" id=\'input\' readonly=\'[[readonly]]\' placeholder=\'[[placeholder]]\' type=\'[[type]]\' name=\'[[name]]\' value=\'{{value::keyup}}\' disabled=\'[[disabled]]\' aria-label="[[placeholder]]" /><span class="smart-hidden smart-hint" id="span">[[hint]]</span><div id="dropDownButton" tabindex=-1 class="smart-drop-down-button" role="button" aria-label="Toggle popup"><div id="arrow" class="arrow" aria-hidden="true"></div></div></div>'}static get listeners(){return{"input.focus":"_focusHandler","input.blur":"_blurHandler","input.keydown":"_keyDownHandler","input.keyup":"_keyUpHandler","input.keypress":"_keyPressHandler","input.paste":"_pasteHandler","dropDownButton.down":"_dropDownButtonDownHandler","inputContainer.down":"_downHandler","document.up":"_documentUpHandler"}}get selectedIndexes(){return this.isCompleted?[this.selectedIndex]:[]}set selectedIndexes(e){if(!this.isCompleted)return;const t=this;if(e&&void 0!==e[0]){if(this.selectedIndex=e[0],null===this.dataSource)return;const o=this.dataSource[this.selectedIndex];if(!o)return;const a=this.context;this.context=this,this.$.input.dataValue=this.selectedValue="string"==typeof o?o:o.value,this.setAttribute("data-value",this.$.input.dataValue);let r=t.dataSource;"string"==typeof r&&(r=t.$.deserialize(r,"array"));for(let e=0;e<r.length;e++){let o=r[e];"string"!=typeof o&&"number"!=typeof o&&(o.value===t.$.input.dataValue?o.selected=!0:o.selected=!1)}this.context=a}else{const e=this.context;this.context=this,this.$.input.dataValue=this.selectedValue="",this.setAttribute("data-value",this.$.input.dataValue),this.selectedIndex=-1;let o=t.dataSource;if("string"==typeof o&&(o=t.$.deserialize(o,"array")),o&&Array.isArray(o))for(let e=0;e<o.length;e++){let a=o[e];"string"!=typeof a&&(a.value===t.$.input.dataValue?a.selected=!0:a.selected=!1)}this.context=e}}focus(){this.$.input.focus()}select(){const e=this;e.readonly?e.$.input.focus():e.$.input.select()}_documentUpHandler(e){const t=this,o=t.shadowRoot||t.isInShadowDOM?e.originalEvent.composedPath()[0]:e.originalEvent.target;o!==t&&o!==t.$.dropDownButton&&o!==t.$.input&&o!==t.$.arrow?t.$.scrollView.contains(o.shadowParent||o)?t._isPointerDown&&(t._isPointerDown=!1,t.opened&&(t._preventLookup=!0),t.$.input.focus()):(t.opened&&(t._preventLookup=!0),"manual"===t.dropDownOpenMode||t._isPointerDown||t.close(),t._isPointerDown=!1):t._isPointerDown=!1}_focusHandler(){const e=this;e.setAttribute("focus",""),e.readonly||0!==e.minLength||0!==e.$.input.value.length||e._preventLookup?(e.$.fireEvent("focus"),delete e._preventLookup):e._lookup()}_blurHandler(){const e=this;e.opened||e.removeAttribute("focus"),e.opened||e.$.fireEvent("blur"),e._refreshSelectedIndex(),delete e._preventLookup}_pasteHandler(e){const t=this,o=t.$.input,a=o.value,r=o.selectionStart,l=o.selectionEnd;if(!e.clipboardData&&!window.clipboardData)return;const n=(e.clipboardData||window.clipboardData).getData("text");let s=a.slice(0,r)+n,i=s.length;s+=a.slice(l),e.preventDefault(),t.set("value",s),t.setAttribute("data-value",s),o.setSelectionRange(i,i),t._refreshSelectedIndex()}_refreshSelectedIndex(){const e=this;let t=e.dataSource;if(t){let o=-1,a=null;if(e.dataSource instanceof Promise)return;if("function"==typeof e.dataSource)return;"string"==typeof t&&(t=e.$.deserialize(t,"array"));for(let r=0;r<t.length;r++){let l=t[r];if("number"!=typeof l&&"boolean"!=typeof l||(l=""+l),"string"==typeof l){if(l===e.value){o=r,a=e.value;break}}else l&&(delete l.selected,l.label===e.value&&(o=r,a=l.value,l.selected=!0))}e.set("selectedIndex",o,!1),e.set("selectedValue",a,!1),-1===e.selectedIndex&&(e.$.input.dataValue=null)}}selectItem(e){const t=this;let o=t.dataSource;if("string"==typeof o&&(o=t.$.deserialize(o,"array")),o)for(let a=0;a<o.length;a++){const r=o[a];if(t.set("selectedIndex",-1),t.set("value",""),t.$.input.dataValue=null,"string"==typeof r){if(r===e)return t.set("selectedIndex",a,!1),t.set("value",t.$.input.dataValue=e),void t.setAttribute("data-value",t.$.input.dataValue)}else if(r.value===e)return t.set("selectedIndex",a,!1),t.set("value",r.label),t.$.input.dataValue=e,void t.setAttribute("data-value",t.$.input.dataValue)}else t.set("value",t.$.input.dataValue=e),t.setAttribute("data-value",t.$.input.dataValue),t.set("selectedIndex",-1,!1)}getItem(e){const t=this;if(t.dataSource)for(let o=0;o<t.dataSource.length;o++){const a=t.dataSource[o];if(a.value===e)return a}return null}getPrevItem(){const e=this,t=e.getSelectedItem();if(e.dataSource&&t)for(let o=0;o<e.dataSource.length;o++)if(e.dataSource[o].value===t.value)return e.dataSource[o-1];return null}getNextItem(){const e=this,t=e.getSelectedItem();if(e.dataSource&&t)for(let o=0;o<e.dataSource.length;o++)if(e.dataSource[o].value===t.value)return e.dataSource[o+1];return null}getSelectedItem(){const e=this;return e.dataSource&&0===e.dataSource.length?{label:e.value,value:e.$.input.dataValue?e.$.input.dataValue:e.value}:{label:e.value,value:void 0!==e.$.input.dataValue?e.$.input.dataValue:e.value}}_refreshMenu(){const e=this;e.$.menu.classList.remove("scroll"),e.$.scrollView.computedVerticalScrollBarVisibility&&e.$.menu.classList.add("scroll")}_performSelect(){const e=this,t=e.$.menu.querySelector(".active"),o=t.getAttribute("data-label"),a=t.dataValue,r=e.value,l=e.$.input.dataValue;e.set("value",o),e.$.input.dataValue=a,e.setAttribute("data-value",a),e.set("selectedIndex",t.index),e.set("selectedValues",[e.$.input.dataValue]),e.set("selectedValue",e.$.input.dataValue);let n=e.dataSource;if("string"==typeof n&&(n=e.$.deserialize(n,"array")),n&&Array.isArray(n))for(let t=0;t<n.length;t++){let o=n[t];"string"!=typeof o&&"number"!=typeof o&&(o.value===e.$.input.dataValue?o.selected=!0:o.selected=!1)}e.close(),o===r&&a===l||(e.$.fireEvent("change",{value:a,label:o,oldValue:l,oldLabel:r}),e._updateTargetValue())}_open(){const e=this;if(e.opened)return;const t=window.scrollX,o=window.scrollY;let a=e.getBoundingClientRect(),r=0,l=0;if(e.timer&&clearTimeout(e.timer),e.getRootNode()&&e.getRootNode().host)e.getRootNode().host.shadowRoot.appendChild(e.$.scrollView);else if(e.dropDownAppendTo){if("body"===e.dropDownAppendTo||e.dropDownAppendTo===document.body)document.body.appendChild(e.$.scrollView);else if(e.dropDownAppendTo instanceof HTMLElement)e.dropDownAppendTo.appendChild(e.$.scrollView);else if("string"==typeof dropDownAppendTo){let t=document.getElementById(e.dropDownAppendTo);t instanceof HTMLElement?t.appendChild(e.$.scrollView):document.body.appendChild(e.$.scrollView)}}else document.body.appendChild(e.$.scrollView);if(e.setAttribute("aria-owns",e.$.scrollView.id),e.readonly||e.$.input.setAttribute("aria-controls",e.$.scrollView.id),e.$.scrollView.enableShadowDOM&&!e._importedStyle&&(e.$.scrollView.importStyle(e._getStyleUrl("smart.textbox.css")),e._importedStyle=!0),"static"!==getComputedStyle(document.body).position){const e=document.body.getBoundingClientRect();r=e.left,l=e.top}if(e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",""),e.$.scrollView.style.left=-3+a.left+t-r+"px",e.$.scrollView.classList.remove("open"),"bottom"===e.dropDownOpenPosition?e.$.scrollView.style.top=a.bottom+o-l+1+"px":e.$.scrollView.style.top=a.top-e.$.scrollView.offsetHeight+o-l+1+"px",e.dropDownAppendTo&&"body"!==e.dropDownAppendTo){e.$.scrollView.style.position="absolute",e.$.scrollView.style.width="auto",e.$.scrollView.style.height="auto";const t=e.$.scrollView.parentNode.getBoundingClientRect();e.$.scrollView.style.top=a.bottom-t.top+"px","top"===e.dropDownOpenPosition&&(e.$.scrollView.style.top=a.top-t.top-e.$.scrollView.offsetHeight+"px"),e.$.scrollView.style.left=-3+a.left-t.left+"px",e.dropDownHeight&&(e.$.scrollView.style.height=e.dropDownHeight),e.dropDownWidth&&(e.$.scrollView.style.width=e.dropDownWidth)}e.opening=!0,e._positionTimer&&clearInterval(e._positionTimer),e.dropDownAppendTo||(e._positionTimer=setInterval((()=>{const t=e.getBoundingClientRect();if(e.opening)e.opening=!1,a=t;else if(Math.abs(parseInt(t.top)-parseInt(a.top))>=10||Math.abs(parseInt(t.left)-parseInt(a.left))>=10){const o=window.scrollX,a=window.scrollY;return e.$.scrollView.style.left=-3+t.left+o-r+"px",void("bottom"===e.dropDownOpenPosition?e.$.scrollView.style.top=t.bottom+a-l+1+"px":e.$.scrollView.style.top=t.top-e.$.scrollView.offsetHeight+a-l+1+"px")}}),50)),e.$.scrollView.onpointerdown=function(){e._isPointerDown=!0},requestAnimationFrame((function(){const t=e.dropDownWidth;if(e.$.scrollView.refresh&&e.$.scrollView.refresh(),e._refreshMenu(),e.$.scrollView.setAttribute("open",""),e.setAttribute("open",""),e.$.dropDownButton.setAttribute("open",""),e.$.input.setAttribute("open",""),t&&"string"==typeof t&&-1!==t.indexOf("%")){const o=parseFloat(t)/100;e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",e.offsetWidth*o+"px")}else if("auto"!==t&&t)e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",parseFloat(t)+"px");else if("auto"===t){if(e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",""),e.$.scrollView.$.scrollViewerContainer.classList.contains("vscroll")){const t=e.$.scrollView.offsetWidth+parseFloat(getComputedStyle(e.$.scrollView).getPropertyValue("--smart-scroll-bar-size"));e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",t+"px")}}else{e.$.menu.style.width="auto";let t=e.$.menu.offsetWidth;const o=e.$.menu.querySelectorAll("li");for(let t=0;t<o.length;t++)e._maxDropDownWidth=Math.max((o[t].firstElementChild||o[t]).offsetWidth,e._maxDropDownWidth);e.$.scrollView.computedVerticalScrollBarVisibility&&(t+=e.$.scrollView.$&&e.$.scrollView.$.verticalScrollBar?e.$.scrollView.$.verticalScrollBar.offsetWidth:30),e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",Math.max(t,e.offsetWidth-8)+"px"),e.$.menu.style.width=""}(e.shadowRoot||e.isInShadowDOM)&&e.$.scrollView._scrollView&&Smart.ScrollBar&&requestAnimationFrame((()=>{e.$.scrollView._scrollView&&e.$.scrollView._scrollView.vScrollBar.refresh()}))})),e.$.scrollView.refresh&&e.$.scrollView.refresh(),e._refreshMenu(),e.set("opened",!0),e.setAttribute("aria-expanded",!0),e.$.fireEvent("open")}close(){const e=this;return!!e.opened&&(e.timer&&clearTimeout(e.timer),e.timer=setTimeout((function(){e.$.scrollView.parentNode&&!e.opened&&(e.$.scrollView.remove(),e.removeAttribute("aria-owns"),e.readonly||e.$.input.removeAttribute("aria-controls"))}),1e3),e._positionTimer&&clearInterval(e._positionTimer),e.$.scrollView.removeAttribute("open"),e.$.dropDownButton.removeAttribute("open"),e.$.input.removeAttribute("open"),e.removeAttribute("open"),e.set("opened",!1),e.setAttribute("aria-expanded",!1),e.$.input.focus(),e.$.fireEvent("close"),!0)}refresh(){const e=this;e.$.scrollView.refresh&&e.$.scrollView.refresh(),e._getDataSourceFromOption(),e.close()}_lookup(e){const t=this;if(t.query=t.$.input.value,t.$.input.readonly&&(t._incrementalSearchQuery||(t._incrementalSearchQuery=""),t._incrementalSearchQuery+=e.key,t._incrementalSearchTimer&&clearTimeout(t._incrementalSearchTimer),t.query=t._incrementalSearchQuery,t._incrementalSearchTimer=setTimeout((function(){t._incrementalSearchQuery=""}),700)),t.query.length<t.minLength)return void t.close();const o=function(e){clearTimeout(t._autoCompleteTimeout),t._autoCompleteTimeout=setTimeout((()=>{const o=t.context;t.context=t,t._process(e),t.context=o}),t.autoCompleteDelay)};"function"==typeof t.dataSource?t.dataSource(t.query,o):o(t.dataSource)}_downHandler(e){const t=this;t.readonly&&t._dropDownButtonDownHandler(e)}_dropDownButtonDownHandler(e){const t=this;return"manual"!==t.dropDownOpenMode&&t._toggle(),e.preventDefault(),e.stopPropagation(),e.originalEvent.preventDefault(),e.originalEvent.stopPropagation(),t._isPointerDown=!0,!1}_toggle(){const e=this;e.opened?e.close():e.open()}open(){const e=this;function t(t){e._process(t);const o=e.$.menu.querySelector(".active");if(o){const t=e.$.input.dataValue;for(let a=0;a<e.$.menu.children.length;a++){const r=e.$.menu.children[a],l=r.getAttribute("data-label"),n=r.dataValue;if(void 0!==t&&n===t||void 0===t&&l===e.$.input.value){o.classList.remove("active"),r.classList.add("active"),e._setActiveDescendant(r),e.$.input.dataValue=n,e.setAttribute("data-value",n);break}}}e.ensureVisible(),e.$.input.focus(),setTimeout((function(){e.$.input.focus()}),25)}e.dropDownDataSource&&(Array.isArray(e.dropDownDataSource)&&e.dropDownDataSource.length>0||"function"==typeof e.dropDownDataSource)?(e.query="","function"==typeof e.dropDownDataSource?e.dropDownDataSource(e.query,t):t(e.dropDownDataSource)):(e.query="","function"==typeof e.dataSource?e.dataSource(e.query,t):t(e.dataSource))}_process(e){const t=this;"string"==typeof e&&(e=t.$.deserialize(e,"array")),e=t.readonly?e.filter((function(){return!0})):e.filter((function(e){return""===e||(t.matcher?t.matcher(e):t._matcher(e))})),e=t._sorter(e),t.sorted&&(e.sort(((e,t)=>void 0!==e.label?e.label.localeCompare(t.label):e.localeCompare(t))),"desc"===t.sortDirection&&e.reverse()),!e.length&&t.opened&&t.close(),0===e.length&&!0!==t.allowItemsAdd||(t.query.length>0?t._render(e.slice(0,t.items)):t._render(e),t._open(),t.$.scrollView.refresh&&t.$.scrollView.refresh(),t._refreshMenu(),t.ensureVisible())}_matcher(e){const t=this.query;switch(null===e&&(e="null"),e=""+(e=e.label||e),this.queryMode){case"startsWith":return e.startsWith(t);case"startsWithIgnoreCase":return e.toLowerCase().startsWith(t.toLowerCase());case"doesNotContain":return e.indexOf(t)<0;case"doesNotContainIgnoreCase":return e.toLowerCase().indexOf(t.toLowerCase())<0;case"contains":return e.indexOf(t)>-1;default:case"containsIgnoreCase":return~e.toLowerCase().indexOf(t.toLowerCase());case"equals":return 0===e.localeCompare(t);case"equalsIgnoreCase":return 0===e.toLowerCase().localeCompare(t.toLowerCase());case"endsWith":return e.endsWith(t);case"endsWithIgnoreCase":return e.toLowerCase().endsWith(t.toLowerCase())}}_sorter(e){const t=this;let o,a=[],r=[],l=[];if(e&&""===e[0])return e;for(;o=e.shift();){let e=o.label||o;e=""+e,e.toLowerCase().indexOf(t.query.toLowerCase())?~e.indexOf(t.query)?r.push(o):l.push(o):a.push(o)}return a.concat(r,l)}_highlighter(e){const t=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return this.query?e.replace(new RegExp("("+t+")","ig"),(function(e,t){return"<strong>"+t+"</strong>"})):e}_render(e){const t=this;let o=0,a=-1,r=null;const l=e.map((function(e){let l=e,n=e;"object"==typeof e&&(l=e.label,n=void 0!==e.value?e.value:l),l=""+l,l=l.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&#39;").replace(/"/g,"&quot;");const s=document.createElement("li"),i=document.createElement("a");if(i.href="#",s.id=t.id+"Item"+Math.floor(65536*(1+Math.random())).toString(16).substring(1),s.setAttribute("data-label",l),s.index=o++,s.dataValue=n,"string"==typeof n?s.setAttribute("value",n):s.setAttribute("value",JSON.stringify(n)),s.setAttribute("role","option"),s.setAttribute("aria-label",l),void 0!==e.menuLabel?(l=e.menuLabel,i.innerHTML=l):i.innerHTML=t.highlighter?t.highlighter(l):t._highlighter(l),i.setAttribute("aria-hidden",!0),e.disabled&&s.classList.add("smart-disabled"),e.icon&&(i.classList.add("icon"),i.classList.add(e.icon)),e.prefix){const t=document.createElement("span");t.innerHTML=e.prefix,i.classList.add("has-prefix"),i.innerHTML=t.innerHTML+i.innerHTML}if(e.suffix){const t=document.createElement("span");t.innerHTML=e.suffix,i.classList.add("has-suffix"),i.innerHTML=i.innerHTML+t.innerHTML}if(e.dataset)for(let t in e.dataset)s.setAttribute("data-"+t,e.dataset[t]);if(e.className){const t=e.className.split(" ");for(let e=0;e<t.length;e++)s.classList.add(t[e].trim())}return void 0!==t.selectedValue&&void 0!==e.value&&""!==t.selectedValue&&t.selectedValue===e.value&&(e.selected=!0,r=e,a=s.index,s.classList.add("active")),s.appendChild(i),s}));function n(){const e=t.$.menu.getElementsByClassName("active");e[0]&&e[0].classList.remove("active"),this.classList.add("active"),t._setActiveDescendant(this)}-1===a&&l.length>0&&(l[0].classList.add("active"),t._setActiveDescendant(l[0])),r&&(t.$.input.value=r.label,t.$.input.dataValue=r.value,t.setAttribute("data-value",t.$.input.dataValue)),t.$.menu.innerHTML="";for(let e=0;e<l.length;e++){const o=l[e];t.$.menu.appendChild(o),o.onmouseenter=n,o.onmouseleave=function(){this.classList.remove("active"),t._setActiveDescendant(null)},o.onclick=n}}ensureVisible(){const e=this,t=e.$.menu.querySelector(".active");t&&(t.offsetTop+t.offsetHeight>=e.$.scrollView.scrollTop+e.$.scrollView.offsetHeight&&(e.$.scrollView.scrollTop=t.offsetTop+t.offsetHeight),(t.offsetTop<=e.$.scrollView.scrollTop||t.offsetTop>=e.$.scrollView.scrollTop+e.$.scrollView.offsetHeight)&&(e.$.scrollView.scrollTop=t.offsetTop),0===[...e.$.menu.children].indexOf(t)?e.$.scrollView.scrollTop=0:[...e.$.menu.children].indexOf(t)===e.$.menu.children.length-1&&(e.$.scrollView.scrollTop=e.$.scrollView.scrollHeight))}_next(){const e=this,t=e.$.menu.querySelector(".active");if(!t){const t=e.$.menu.firstElementChild;return t.classList.add("active"),void e._setActiveDescendant(t)}t.classList.remove("active");let o=t.nextElementSibling;o||(o=e.$.menu.firstElementChild),o.classList.add("active"),e._setActiveDescendant(o),e.ensureVisible()}_prev(){const e=this,t=e.$.menu.querySelector(".active");if(!t){const t=e.$.menu.firstElementChild;return t.classList.add("active"),void e._setActiveDescendant(t)}t.classList.remove("active");let o=t.previousElementSibling;o||(o=e.$.menu.lastElementChild),o.classList.add("active"),e._setActiveDescendant(o),e.ensureVisible()}_move(e){const t=this;if(t.readonly&&!t.opened){if("ArrowUp"===e.key){const o=t.getPrevItem();o&&t.selectItem(o.value),e.preventDefault()}if("ArrowDown"===e.key){const o=t.getNextItem();o&&t.selectItem(o.value),e.preventDefault()}}if(t.opened){switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),t._prev();break;case 40:e.preventDefault(),t._next()}e.stopPropagation()}}_keyDownHandler(e){const t=this;t._suppressKeyPressRepeat=![40,38,9,13,27,16,17,18].includes(e.keyCode),t._oldValue=t.$.input.value,e.shiftKey||e.altKey||e.ctrlKey||t._move(e)}_keyPressHandler(e){this._suppressKeyPressRepeat||e.shiftKey||e.altKey||e.ctrlKey||this._move(e)}_keyUpHandler(e){const t=this;if(!e.shiftKey&&"F2"!==e.key)switch(e.keyCode){case 40:case 38:case 16:case 17:case 18:40===e.keyCode&&e.altKey&&t.open(),38===e.keyCode&&e.altKey&&t.close();break;case 9:case 13:if(!t.opened)return;t._performSelect(),e.stopPropagation(),e.preventDefault();break;case 27:if(!t.opened)return;t.close(),e.stopPropagation(),e.preventDefault();break;default:t._lookup(e),!t.opened||e.ctrlKey||e.shiftKey||(e.stopPropagation(),e.preventDefault()),t.$.fireEvent("changing",{value:t.$.input.value,oldValue:t._oldValue}),t.$.input.dataValue=t.$.input.value,t.setAttribute("data-value",t.$.input.dataValue),t._updateTargetValue()}}propertyChangedHandler(e,t,o){super.propertyChangedHandler(e,t,o);const a=this;if("innerHTML"===e&&(a._getDataSourceFromOption(),a._setSelection(!1)),"selectedValue"===e){let e=-1;if(a.dataSource&&Array.isArray(a.dataSource)&&a.dataSource.forEach(((t,a)=>{"string"==typeof t?t===o&&(e=a):t&&t.value===o&&(e=a)})),e>=0){const t=a.context;a.context=a,a.selectedIndex=e,a.context=t}a._setSelection()}if("selectedIndex"===e){let e=a.dataSource;if(a.selectedValue=null,e&&Array.isArray(e))for(let t=0;t<e.length;t++){let o=e[t];"string"!=typeof o&&"number"!=typeof o&&(o.selected=!1)}a._setSelection()}else if("dataSource"===e){if(a.dataSource&&Array.isArray(a.dataSource)){let e=-1;if(a.dataSource.forEach(((t,o)=>{t.selected&&(e=o)})),e>=0){const t=a.context;a.context=a,a.selectedIndex=e,a.context=t}}a._setSelection(!1)}else if("dropDownClassList"===e){const e=a.$.scrollView;for(let o=0,a=t.length;o<a;o+=1)e.classList.remove(t[o]);for(let t=0,a=o.length;t<a;t+=1)e.classList.add(o[t])}else if("dropDownHeight"===e)"auto"!==a.dropDownHeight?a.$.scrollView.style.setProperty("--smart-input-drop-down-menu-height",a.dropDownHeight+"px"):a.$.scrollView.style.setProperty("--smart-input-drop-down-menu-height","auto");else if("opened"===e)a.opened=t,o?a.open():a.close();else if("placeholder"===e){if(a.readonly){const e=a.getAttribute("aria-label");if(e&&e!==t)return;o?a.setAttribute("aria-label",o):a.removeAttribute("aria-label")}}else if("selectedValues"===e)if(null===o)a.$.input.value="",a.$.input.dataValue=o,a.setAttribute("data-value",o),a._refreshSelectedIndex();else{const e=o.join(","),t=a.value;a.$.input.dataValue=e,a._setSelection(),a.propertyChangedHandler("value",t,a.value)}else"value"===e?(a.displayMember!==a.valueMember&&"string"!=typeof o?(a.set("value",o[a.displayMember]),a.$.input.dataValue=o[a.valueMember],a.setAttribute("data-value",a.$.input.dataValue)):(a.$.input.value=a.$.input.dataValue=o,a.setAttribute("data-value",o)),a._refreshSelectedIndex()):"readonly"===e?(a._setAriaRelations(),a._setInputPurpose()):"theme"===e||"rightToLeft"===e?a.$.scrollView[e]=o:"inputPurpose"===e?a._setInputPurpose():"inverted"===e?o?a.$.scrollView.setAttribute("inverted",""):a.$.scrollView.removeAttribute("inverted"):"disabled"!==e&&"unfocusable"!==e||a._setFocusable()}_updateTargetValue(){const e=this;if(e.dataset.target){const t=document.querySelector(e.dataset.target);if(t){const o=e.dataset.property,a=e.value;o&&void 0!==t[o]&&(t[o]=a)}}}detached(){super.detached(),this.close(),this.removeAttribute("focus")}_getDataSourceFromOption(){const e=this;if(e.innerHTML.indexOf("<option")>=0){e.$.optionsContainer.innerHTML=e.innerHTML.trim();const t=e.querySelectorAll("option");let o=[];for(let e=0;e<t.length;e++){const a=t[e],r=a.hasAttribute("selected"),l=(""+a.textContent).trim(),n=(""+a.innerHTML).trim(),s=a.hasAttribute("value")?a.getAttribute("value"):l,i=a.hasAttribute("disabled");o.push({label:l,menuLabel:n,value:s,disabled:i,selected:r,className:a.className,dataset:a.dataset}),a.classList.add("smart-hidden")}e.dataSource=o}}render(){const e=this,t=e.dropDownClassList;if(e._getDataSourceFromOption(),e.selectedValues&&e.selectedValues.length){const t=e.selectedValues.join(",");e.value=t}e._createElement&&e._createElement();const o=e.$.scrollView;for(let e=0,a=t.length;e<a;e+=1)o.classList.add(t[e]);e.opened&&(e.opened=!1,e.open());const a=e.$.menu;a&&(a.setAttribute("role","presentation"),o.appendChild(a)),"auto"!==e.dropDownHeight?o.style.setProperty("--smart-input-drop-down-menu-height",e.dropDownHeight+"px"):o.style.setProperty("--smart-input-drop-down-menu-height","auto"),o.classList.add("smart-input-drop-down-menu");for(let t=0;t<e.classList.length;t++){const a=e.classList[t];"smart-element"!==a&&"smart-input"!==a&&o.classList.add(a+"-drop-down-menu")}o.id=e.id+"_"+e.tagName.toLowerCase()+"_menu_"+Math.floor(65536*(1+Math.random())).toString(16).substring(1),o.ownerElement=e;let r=e.dataSource;if("string"==typeof r&&(r=e.$.deserialize(r,"array")),r&&r.length&&Array.isArray(r)){let t=-1;if(r.forEach(((e,o)=>{e.selected&&(t=o)})),t>=0){e.selectedIndex=t;const o=r[t];e.selectedValue="string"==typeof o?r[t]:r[t].value}}e._setAriaRelations(),e._setInputPurpose(),e._setSelection(),e.isInitialized=!0,super.render()}_setSelection(e){const t=this;let o=t.dataSource;if("string"==typeof o&&(o=t.$.deserialize(o,"array")),t.selectedIndex>=0&&o&&o.length>0){let a=o[t.selectedIndex];if("number"!=typeof a&&"boolean"!=typeof a||(a=""+a),"string"==typeof a){let e=t.$.input.dataValue,o=t.value;t.set("value",a),t.$.input.dataValue=a,t.$.input.setAttribute("data-value",a),t.selectedValues=[t.$.input.dataValue],t.isInitialized&&(t.$.fireEvent("change",{value:t.value,label:t.label,oldValue:e,oldLabel:o}),t._updateTargetValue())}else{let o=t.$.input.dataValue,r=t.value;a&&(void 0!==a.value?(t.set("value",void 0!==a.value?a.value+"":""),t.$.input.dataValue=a.value,t.$.input.setAttribute("data-value",a.value),t.selectedValues=[t.$.input.dataValue]):a.label&&(t.selectedValues=[a.value]),a.label&&t.set("value",a.label)),t.isInitialized&&!1!==e&&(t.$.fireEvent("change",{value:t.$.input.dataValue,label:a.value,oldValue:o,oldLabel:r}),t._updateTargetValue())}}}_createElement(){const e=this,t=document.createElement("ul"),o=document.createElement("smart-scroll-viewer");o.rightToLeft=e.rightToLeft,o.theme=e.theme,o.horizontalScrollBarVisibility="hidden",e.inverted?o.setAttribute("inverted",""):o.removeAttribute("inverted"),e.$.scrollView=o,e.$.menu=t,e._setFocusable();const a=e.$.input;e.$.menu.onclick=function(t){const o=t.target.closest("li");t.stopPropagation(),t.preventDefault(),e._performSelect(),o&&e.$.fireEvent("itemClick",{item:o,label:o.getAttribute("aria-label"),value:o.dataValue}),a.focus()}}_setAriaRelations(){const e=this,t=e.getAttribute("aria-label");e.readonly?(e.setAttribute("role","button"),!t&&e.placeholder&&e.setAttribute("aria-label",e.placeholder),e.removeAttribute("aria-readonly"),e.$.input.setAttribute("aria-hidden",!0),e.$.input.removeAttribute("aria-activedescendant"),e.$.input.removeAttribute("aria-controls"),e.$.dropDownButton.setAttribute("aria-hidden",!0)):(e.setAttribute("role","combobox"),t&&t===e.placeholder&&e.removeAttribute("aria-label"),e.$.input.setAttribute("role","searchbox"),e.$.input.removeAttribute("aria-hidden",!0),e.$.dropDownButton.removeAttribute("aria-hidden")),e.setAttribute("aria-expanded",e.opened),e.setAttribute("aria-haspopup","listbox"),e.setAttribute("aria-owns",e.$.scrollView.id),e.$.scrollView.setAttribute("role","listbox")}_setActiveDescendant(e){const t=this;t.readonly||(e?t.setAttribute("aria-activedescendant",e.id):t.removeAttribute("aria-activedescendant"))}_setInputPurpose(){const e=this;e.readonly?e.$.input.removeAttribute("autocomplete"):e.$.input.setAttribute("autocomplete",e.inputPurpose)}_setFocusable(){const e=this;e.disabled||e.unfocusable?e.$.input.setAttribute("tabindex",-1):e.$.input.removeAttribute("tabindex")}});
28
28
 
29
29
  /***/ }),
30
30
 
@@ -115,7 +115,7 @@ var __webpack_exports__ = {};
115
115
  /* harmony import */ var _smart_textarea_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7341);
116
116
  /* harmony import */ var _smart_textarea_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_smart_textarea_js__WEBPACK_IMPORTED_MODULE_4__);
117
117
 
118
- /* Smart UI v14.2.83 (2022-09-09)
118
+ /* Smart UI v14.3.0 (2022-09-27)
119
119
  Copyright (c) 2011-2022 jQWidgets.
120
120
  License: https://htmlelements.com/license/ */ //
121
121