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
@@ -1,5 +1,5 @@
1
1
 
2
- /* Smart UI v14.2.83 (2022-09-09)
2
+ /* Smart UI v14.3.0 (2022-09-27)
3
3
  Copyright (c) 2011-2021 jQWidgets.
4
4
  License: https://htmlelements.com/license/ */ //
5
5
 
@@ -1,6 +1,6 @@
1
1
 
2
- /* Smart UI v14.2.83 (2022-09-09)
2
+ /* Smart UI v14.3.0 (2022-09-27)
3
3
  Copyright (c) 2011-2021 jQWidgets.
4
4
  License: https://htmlelements.com/license/ */ //
5
5
 
6
- Smart.Utilities.Assign("Grid.Cell",class{constructor(e,t){const l=this;if(l.row=e,l.column=t,l.grid=e.grid,l.rowSpan=1,l.colSpan=1,l.value=void 0,l.fontSize=null,l.fontWeight=null,l.fontFamily=null,l.fontStyle=null,l.color=null,l.background=null,l.textDecoration=null,l.tooltip=null,l.align=null,l.verticalAlign=null,l.readonly=!1,l.oldValue=void 0,l._updating=!1,l.styleChanged=!0,l.editor=null,l.template=null,l.isEditing=!1,l.canNotify=!0,l.selected=!1,l.focused=!1,l.error=!1,e._style){const t=e._style;l.color=t.color,l.background=t.background,l.fontFamily=t.fontFamily,l.fontSize=t.fontSize,l.fontStyle=t.fontStyle,l.textDecoration=t.textDecoration,l.fontWeight=t.fontWeight}return new Proxy(l,{deleteProperty:function(e,t){return delete e[t],!0},get:function(e,t){if("value"===t)return l.column.displayField?l.row.data[l.column.displayField]:l.row.data[l.column.dataField];if("editor"===t||"template"===t)return e[t]||l.column[t];if("focused"===t){if(l.grid.selection.allowCellSelection&&l.grid._selection.focusedCell&&l.grid._selection.focusedCell.id===l.row.id&&l.grid._selection.focusedCell.dataField===l.column.dataField)return!0;if(l.grid.selection.allowRowSelection&&l.grid._selection.focusedCell&&l.grid._selection.focusedCell.id===l.row.id&&l.grid._selection.focusedCell.dataField===l.column.dataField)return!0;const e=l.parent();return!!(e&&l.grid.selection.allowCellSelection&&l.grid._selection.focusedCell&&l.grid._selection.focusedCell.id===e.row.id&&l.grid._selection.focusedCell.dataField===e.column.dataField)}if("selected"===t)return!0===l.row.getProperty("selected")||!0===l.column.getProperty("selected")||!!l.grid._selection.cells["row"+l.row.id]&&l.grid._selection.cells["row"+l.row.id][l.column.dataField];if("modifiedValue"===t){l.grid._cellsUpdatedValues||(l.grid._cellsUpdatedValues=[]);const t=l.grid._cellsUpdatedValues[l.row.id+"_"+l.column.dataField];return void 0!==t?t:e.value}return e[t]},set:function(e,a,i){const n=this.get(e,a);return n===i||(e[a]=i,!("element"!==a&&"isEditing"!==a&&"oldValue"!==a&&"_updating"!==a&&"notifyFn"!==a&&!a.startsWith("_")&&"canNotify"!==a)||("error"===a||("focused"===a&&(l.grid._selection.focusedCell={id:l.row.id,dataField:l.column.dataField,value:l.value,index:l.row.index}),"colSpan"!==a&&"rowSpan"!==a||i>=0&&-1===l.grid._cellsMerge.indexOf(l)&&l.grid._cellsMerge.push(l),"row"===a||"column"===a||"grid"===a||"styleChanged"===a||("background"!==a&&"fontSize"!==a&&"fontWeight"!==a&&"fontFamily"!==a&&"textDecoration"!==a&&"color"!==a&&"fontStyle"!==a||(l.grid._cellStyles["row"+l.row.id]=!0,l.grid._cellStyles.length++,l._styleChanged=!0),"value"===a&&(void 0===l.oldValue&&(l.oldValue=n),(()=>{l.grid.dataSource.boundSource.canNotify=!1,null===i&&(l.column.allowNull||(i="number"===l.column.dataType||"int"===l.column.dataType||"float"===l.column.dataType||"integer"===l.column.dataType?0:"date"===l.column.dataType?new Date:"boolean"!==l.column.dataType&&"bool"!==t.dataType&&"")),null!==i&&i.label&&i.value?(l.row.data[l.column.displayField]=i.label,l.row.data[l.column.dataField]=i.value):(l.column.valueField&&(l.row.data[l.column.valueField]=i),l.row.data[l.column.dataField]=i);const e=l.grid.dataSource.dataItemById[l.row.id];if(e){const t=e.$.index;l.grid.dataSource&&i!==l.grid.dataSource.boundSource[t][l.column.dataField]&&(l.grid._sortedColumns&&l.grid._sortedColumns.length>0?e[l.column.dataField]=i:l.grid.dataSource.boundSource[t][l.column.dataField]=i)}l.grid.dataSource.boundSource.canNotify=!0})()),"selected"===a&&(l.grid._selection.cells["row"+l.row.id]&&(delete l.grid._selection.cells["row"+l.row.id][l.column.dataField],1===Object.getOwnPropertyNames(l.grid._selection.cells["row"+l.row.id]).length&&delete l.grid._selection.cells["row"+l.row.id]),l.grid._selection.cells["column"+l.column.dataField]&&(delete l.grid._selection.cells["column"+l.column.dataField][l.row.id],1===Object.getOwnPropertyNames(l.grid._selection.cells["column"+l.column.dataField]).length&&delete l.grid._selection.cells["column"+l.column.dataField]),i&&(l.grid._selection.cells["row"+l.row.id]||(l.grid._selection.cells["row"+l.row.id]=[]),l.grid._selection.cells["column"+l.column.dataField]||(l.grid._selection.cells["column"+l.column.dataField]=[]),l.grid._selection.cells["row"+l.row.id][l.column.dataField]=!0,l.grid._selection.cells["column"+l.column.dataField][l.row.id]=!0)),!(!l._updating&&l.canNotify&&(l.grid._recycle(),l.row.canNotify&&(l.propertyChanged&&l.propertyChanged(name.substring(1),n),0)))))))}})}setStyle(e){this.setProperties(e)}_setStyle(e){const t=this;if(t._styleChanged){if(!t.grid._cellStyles.length)return;let l="";const a={background:"background",color:"color",fontSize:"font-size",fontFamily:"font-family",fontWeight:"font-weight",fontStyle:"font-style",textDecoration:"text-decoration"},i=e=>{const i=t[e];if(""===i||null===i)return;const n=a[e];l+=`${n}: ${i};`},n=["background","color","fontSize","fontFamily","fontWeight","fontStyle","textDecoration"];for(let e=0;e<n.length;e++)i(n[e]);e.getAttribute("style")!==l&&e.setAttribute("style",l),""!==e.style.paddingBottom&&(e.style.paddingBottom=""),t._styleChanged=!1}t.selected&&(t.background||t.color)&&(e.style.background="",e.style.color="")}getFormattedValue(e,t){const l=this;if(null==e||""===e)return e;if(!t)return""+e;if(l.column._cellsCachedValues||(l.column._cellsCachedValues=[]),l.column._cellsCachedValues[""+e+t+l.column.grid.locale])return l.column._cellsCachedValues[""+e+t+l.column.grid.locale];if("date"===l.column.dataType||"datetime"===l.column.dataType||"time"===l.column.dataType){if("dateRangeInput"===l.column.editor.template){if(Array.isArray(e)){const a=l.formatDate(e[0],t)+" - "+l.formatDate(e[1],t);return l.column._cellsCachedValues[""+e+t+l.column.grid.locale]=a,a}{const a=l.formatDate(e,t)+" - "+l.formatDate(e,t);return l.column._cellsCachedValues[""+e+t+l.column.grid.locale]=a,a}}const a=l.formatDate(e,t);return l.column._cellsCachedValues[""+e+t+l.column.grid.locale]=a,a}if("int"===l.column.dataType||"int64"===l.column.dataType||"float"===l.column.dataType||"number"===l.column.dataType){const a=l.formatNumber(e,t);return l.column._cellsCachedValues[""+e+t+l.column.grid.locale]=a,a}return e}formatDate(e,t){if(!Smart.Utilities.DateTime)return e;const l=this,a=l.grid;if(l.column.formatSettings.Intl&&l.column.formatSettings.Intl.DateTimeFormat)return new Intl.DateTimeFormat(this.grid.locale,l.column.formatSettings.Intl.DateTimeFormat).format(e);!t&&l.column.formatSettings.dateFormat&&(t=l.column.formatSettings.dateFormat);try{const l=new Smart.Utilities.DateTime(e);l.calendar.locale=a.locale,a.messages[a.locale]&&a.messages[a.locale].calendar&&(a.messages[a.locale].calendar.months&&(l.calendar.months=a.messages[a.locale].calendar.months),a.messages[a.locale].calendar.days&&(l.calendar.days=a.messages[a.locale].calendar.days),void 0!==a.messages[a.locale].calendar.firstDay&&(l.calendar.firstDay=a.messages[a.locale].calendar.firstDay),void 0!==a.messages[a.locale].calendar.eras&&(l.calendar.eras=a.messages[a.locale].calendar.eras),void 0!==a.messages[a.locale].calendar.AM&&(l.calendar.AM=a.messages[a.locale].calendar.AM),void 0!==a.messages[a.locale].calendar.PM&&(l.calendar.PM=a.messages[a.locale].calendar.PM),void 0!==a.messages[a.locale].calendar["/"]&&(l.calendar["/"]=a.messages[a.locale].calendar["/"]),void 0!==a.messages[a.locale].calendar[":"]&&(l.calendar[":"]=a.messages[a.locale].calendar[":"]),l.calendar.today=a.messages[a.locale].today);let i=l.toString(t);return i!==a.messages[a.locale].today||a.showTodayDateAsString||(l.showTodayDateAsString=!1,i=l.toString(t),delete l.showTodayDateAsString),i}catch(t){return e}}formatNumber(e,t){if(!Smart.Utilities.NumberRenderer)return e;const l=this,a=l.grid;if(l.column.formatSettings.Intl&&l.column.formatSettings.Intl.NumberFormat){if(l.column.formatSettings.Intl.NumberFormat.currency&&Smart.Utilities.CurrencyFormatter){const t=void 0!==l.column.formatSettings.Intl.NumberFormat.maximumFractionDigits?l.column.formatSettings.Intl.NumberFormat.maximumFractionDigits:2,a=(new Smart.Utilities.CurrencyFormatter).format(e,{decimalPlaces:t,currency:l.column.formatSettings.Intl.NumberFormat.currency});return"accounting"===l.column.formatSettings.Intl.NumberFormat.currency.currencySign&&e<0?"("+a.replace("-","")+")":a}return l.column.formatSettings.Intl.NumberFormat.locale?new Intl.NumberFormat(l.column.formatSettings.Intl.NumberFormat.locale,l.column.formatSettings.Intl.NumberFormat).format(e):new Intl.NumberFormat(this.grid.locale,l.column.formatSettings.Intl.NumberFormat).format(e)}const i=new Smart.Utilities.NumberRenderer;if(i.localizationObject){const e=l.column.formatSettings,t=a.messages[a.locale]?a.messages[a.locale].calendar:{};e.decimalPlaces&&(i.localizationObject.decimalPlaces=e.decimalPlaces),(e.decimalSeparator||t.decimalSeparator)&&(i.localizationObject.decimalSeparator=e.decimalSeparator||t.decimalSeparator,i.localizationObject.decimalseparator=i.localizationObject.decimalSeparator),(e.thousandsSeparator||t.thousandsSeparator)&&(i.localizationObject.thousandsSeparator=e.thousandsSeparator||t.thousandsSeparator,i.localizationObject.thousandsseparator=i.localizationObject.thousandsSeparator),i.localizationObject.currencysymbol=t.currencySymbol,i.localizationObject.currencysymbolposition=t.currencySymbolPosition,e.prefix&&(i.localizationObject.currencysymbol=e.prefix),e.sufix&&(i.localizationObject.currencysymbol=e.sufix,i.localizationObject.currencysymbolposition="after")}const n=i.formatNumber(e,t);return void 0===n?e:e<0&&l.column.formatSettings.negativeWithBrackets?"("+n+")":n}refresh(){const e=this;if(e.element){const t=e.element.firstChild;e._setStyle(t)}}autoWrap(){const e=this;e.element&&e.element._autoWrap()}setProperties(e){const t=this;t._updating=!0;for(let l in e)t[l]=e[l];t._updating=!1,t.grid._recycle()}createElement(){const e=document.createElement("smart-grid-cell");return e.setAttribute("role","gridcell"),this.element=e,e._initialize(this),e}render(){this.element&&this.element._render()}parent(e){const t=this,l=t.row,a=t.column.dataField,i=t.grid;if(!i._cellsMerge.length)return null;if(t.__parentCells&&void 0!==t.__parentCells["row"+l.id+"_column_"+a])return t.__parentCells["row"+l.id+"_column_"+a];let n=i.getVisibleRows();i.paging.enabled&&"page"===i.selection.selectAllMode&&(n=n.slice(i.paging.pageIndex*i.paging.pageSize,(i.paging.pageIndex+1)*i.paging.pageSize)),t.__parentCells||(t.__parentCells=[]);for(let r=0;r<i._cellsMerge.length;r++){const s=i._cellsMerge[r];let o=[],d=[];if(o.push(s.row),s.rowspan>1){const e=n.indexOf(s.row);if(e>=0)for(let t=e;t<e+s.rowSpan;t++)n[t]&&-1===o.indexOf(n[t])&&o.push(n[t])}if(d.push(s.column.dataField),s.colspan>1){const e=i.columns.indexOf(i.columnByDataField[s.column.dataField]);for(let t=e;t<e+s.colSpan;t++)i.columns[t]&&-1===d.indexOf(i.columns[t].dataField)&&d.push(i.columns[t].dataField)}if(o.indexOf(l)>=0&&d.indexOf(a)>=0){if(e){const e={cell:s.row.getCell(s.column.dataField),rows:o,columns:d,row:s.row,column:s.column,endRow:o[o.length-1],endColumn:i.columnByDataField[d[d.length-1]]};return t.__parentCells["row"+l.id+"_column_"+a]=e,e}const n=s.row.getCell(s.column.dataField);return t.__parentCells["row"+l.id+"_column_"+a]=n,n}}return t.__parentCells["row"+l.id+"_column_"+a]=null,null}}),Smart("smart-grid-cell",class extends Smart.BaseElement{static get properties(){return{}}get hasStyleObserver(){return!1}get enableShadowDOM(){return!1}addThemeClass(){}addDefaultClass(){}get isUtilityElement(){return!0}_refresh(){const e=this;e.innerHTML="",e._initialize(e.cell)}_createToggleButton(e,t){const l=this,a=document.createElement("div"),i=document.createElement("button"),n=document.createElement("div"),r=document.createElement("div"),s=document.createElement("div"),o=document.createElement("span"),d=t.grid;t.row.expanded?i.setAttribute("toggled",""):i.removeAttribute("toggled",""),i.tabIndex=-1,l.toggleButton=i,l.checkbox=s,e.appendChild(a),e.appendChild(r),r.setAttribute("content",""),a.setAttribute("indent",""),n.setAttribute("label",""),i.setAttribute("toggle-button",""),s.setAttribute("checkbox",""),s.setAttribute("role","checkbox"),l.setAttribute("has-toggle-button",""),r.appendChild(i),r.appendChild(s),o.classList.add("smart-input"),s.appendChild(o),d.checkBoxes.visible?o.classList.remove("smart-hidden"):o.classList.add("smart-hidden"),r.appendChild(n),l.content=n}_initialize(e){const t=this,l=document.createElement("div"),a=e.column,i=e.grid;t._properties=[],t.cell=e,t.appendChild(l);let n=!1;if(a&&a._treeColumn&&i.dataSource.boundHierarchy&&(n=!0,e.row.filterRow&&(n=!1),!i.grouping.enabled&&i.dataSource.groupBy&&i.dataSource.groupBy.length>0&&(n=!1),i.grouping.enabled&&i.dataSource.groupBy&&0===i.dataSource.groupBy.length&&(n=!1)),n)return t._createToggleButton(l,e),void(t.isRendered=!0);{const e=document.createElement("div");l.appendChild(e)}t.content=l,t.isRendered=!0}_renderCommands(){const e=this,t=e.cell.grid;if(t.__cellsCommandTemplate)return e.firstChild.innerHTML=t.__cellsCommandTemplate,void t._updateCommandColumnCommandsVisibility(e.firstChild,e.cell.row);const l=t._getCommandColumnCommandsTemplate();e.firstChild.innerHTML=l,t._updateCommandColumnCommandsVisibility(e.firstChild,e.cell.row),t.__cellsCommandTemplate=l}_renderGroupCell(){const e=this,t=e.cell.grid,l=e.cell.column,a=e.cell.row;[...e.attributes].forEach((t=>e.removeAttribute(t.name))),e.setAttribute("group","");const i=l===t._firstRenderedColumn;e.style.width!==l.computedWidth+"px"&&(e.style.width=l.computedWidth+"px"),i||(t.rightToLeft?e.style.right!==l.left+"px"&&(e.style.right=l.left+"px"):e.style.left!==l.left+"px"&&(e.style.left=l.left+"px")),e.classList.contains("smart-hidden")&&e.classList.remove("smart-hidden"),l===t._firstRenderedColumn||a.summaryRow||e.classList.add("smart-hidden"),l.autoGenerated&&(e.style.width="0px");let n=a.label;const r=function(e,t,l){if(!t)return[];for(let a=0;a<t.length;a++){const i=t[a];i.$&&!1===i.$.filtered||(void 0!==i[e]&&l.push(i),i.summaryRow||(i.children||i.data&&i.data.children)&&r(e,i.children,l))}return l};if(void 0!==a.label){let s="",o=[];if(t.grouping.summaryRow.visible){const n=r(l.dataField,a.summaryRow?a.parent.data.children:a.data.children,[]),d={},c=i?l.summary.length>0?l.summary:["count"]:l.summary;d[l.dataField]=c;const m=c.length>0?t.dataSource.summarize([d],n):null;if(m)for(let a=0;a<c.length;a++){const i=c[a];a>0&&(s+=", ");let n=m[l.dataField][i];const r=l.cellsFormat;r&&(n=e.cell.getFormattedValue(n,r)),s+=t.localize(i,{value:n}),o.push(m[l.dataField][i])}}if(t.dataSource.virtualDataSourceOnExpand&&(s=""),i){const l=t.columnByDataField[a.groupDataField],i=l?l.label:"";if("advanced"===t.grouping.renderMode){if(a.summaryRow)n="<div header group-advanced><span group></span><span value></span>",s&&(n+="<div summary>",n+=s,n+="</div>");else{let e=a.label?a.label:t.localize("blankSummary");a.label||"taskStatus"!==a.groupDataField||(e="");let r="";if(l&&l.editor&&l.editor.dataSource){const t=l.editor.dataSource.find((t=>t.value===e));t&&t.color?(r=`--smart-primary: ${t.color}`,t.label&&(e=t.label)):t&&t.label&&(e=t.label)}if(a.label||"taskStatus"!==a.groupDataField||(e=t.localize("uncategorized")),"object"==typeof e&&l.cellsFormat){const t=a.getCell(l.dataField);e=t.getFormattedValue(e,l.cellsFormat)}n=`<div style="${r}" header group-advanced><span group>${i}: </span><span value>${e}</span>`,s&&t.grouping.summaryRow.inline&&(n+="<span summary>",n+=""+s,n+="</span>")}n+="</div>",e.classList.add("smart-grid-column-border-collapse")}else if("compact"===t.grouping.renderMode){if(a.summaryRow)n="<div header><span group></span><span value></span>",s&&(n+="<div summary>",n+=s,n+="</div>");else{let e=a.label;"object"==typeof e&&l.cellsFormat&&(e=a.getCell(l.dataField).getFormattedValue(e,l.cellsFormat)),n="<div header><span group>"+i+": </span><span value>"+e+"</span>",s&&t.grouping.summaryRow.inline&&(n+="<span summary>",n+=" ("+o+")",n+="</span>")}n+="</div>",e.classList.add("smart-grid-column-border-collapse")}else("basic"===t.grouping.renderMode||"multipleColumns"===t.grouping.renderMode)&&(n=a.label,"object"==typeof n&&l.cellsFormat&&(n=a.getCell(l.dataField).getFormattedValue(n,l.cellsFormat)),a.summaryRow?s&&(n+="<div summary>",n+=s,n+="</div>"):s&&t.grouping.summaryRow.inline&&(n+="<span summary>",n+=" ("+o+")",n+="</span>"),e.classList.add("smart-grid-column-border-collapse"));e.setAttribute("has-toggle-button","")}else e.removeAttribute("has-toggle-button",""),n=s}let s=e.firstChild;if(t.dataSource.boundHierarchy&&i){s.children.length<=1&&(e.innerHTML="<div></div>",s=e.firstChild,e._createToggleButton(s,e.cell),s=e.firstChild);const r=s.children[0],o=s.children[1].children[0],d=s.children[1].children[1].firstChild,c=s.children[1].children[2];r.setAttribute("indent",""),a.checked?d.setAttribute("checked",""):!1===a.checked?d.removeAttribute("checked"):null===a.checked&&d.setAttribute("checked","indeterminate"),a.leaf?o.classList.add("smart-visibility-hidden"):(o.classList.remove("smart-visibility-hidden"),a.expanded?o.setAttribute("toggled",""):o.removeAttribute("toggled",""));let m="";if(!l._treeColumn||a.summaryRow||a.filterRow?e.toggleButton.classList.add("smart-hidden"):e.toggleButton.classList.remove("smart-hidden"),l._treeColumn)if(t.grouping.enabled){let e=a.level-1;if(1+e===0)m+="",r.classList.add("smart-hidden");else{if("multipleColumns"===t.grouping.renderMode){let l=0;for(let a=0;a<t.columns.length;a++)a<1+e&&(l+=t.columns[a].computedWidth);m+='<div style="width: '+l+'px;"></div>'}else m+='<div style="width: '+(1+e)*t.grouping.groupIndent+'px;"></div>';r.classList.remove("smart-hidden")}}else for(let e=0;e<a.level;e++)m+="<div class='smart-indent'></div>";if(void 0===a.label||a.summaryRow||a.filterRow?o.classList.add("smart-hidden"):(o.classList.remove("smart-hidden"),o.style.marginLeft=""),r.innerHTML=m,c.innerHTML=n,i&&t.grouping.formatFunction){const i={row:a,column:l,cell:e.cell,value:n,template:null};t.grouping.formatFunction(i),i.value!==n?c.innerHTML=i.value:i.template&&(c.innerHTML=i.template)}t.appearance.showTooltips?c.setAttribute("title",a.label?a.label:n):c.hasAttribute("title")&&c.removeAttribute("title")}else void 0!==a.label&&t.grouping.enabled&&!i&&(s.innerHTML=n);let o="smart-label";e.style.zIndex="";const d=t.editing.addNewColumn.visible?t._addNewColumn.width-1:0;if(i){const l=t.columnByDataField[a.groupDataField];l.cellsAlign&&(o+=" align-"+l.cellsAlign),l.cellsVerticalAlign&&(o+=" align-"+l.cellsVerticalAlign),e.setAttribute("header",""),a.summaryRow||(e.style.width="calc(100% - "+d+"px)"),void 0!==a.label&&(e.style.zIndex=11)}else l===t._firstRenderedColumn&&(e.style.zIndex=4),e.setAttribute("header",""),a.summaryRow||(e.style.width="calc(100% - "+d+"px)");if(a.summaryRow&&(e.setAttribute("header",""),e.classList.add("smart-grid-column-border-collapse"),l.cellsAlign&&(o+=" align-"+l.cellsAlign),l.cellsVerticalAlign&&(o+=" align-"+l.cellsVerticalAlign)),s.className!==o&&(s.className=o),l.formatFunction){const t={row:a,column:l,cell:e.cell,value:null,template:null,group:{value:n,template:null}};l.formatFunction(t),t.group.value!==n&&(l._treeColumn?s.children[1].children[2].innerHTML=t.group.value:s.innerHTML=t.group.value),null!==t.group.template&&(s.innerHTML=t.group.template)}}_renderFilterCell(e){const t=this,l=t.cell.grid,a=t.cell.column;let i;const n=(e,t)=>{l._handleFilterMenuClick(e,t)};l._filterInfo||(l._filterInfo={},l._filterInfo.stringConditions=[{icon:"smart-icon-contains",command:n,value:"CONTAINS",label:l.localize("CONTAINS")},{icon:"smart-icon-does-not-contain",command:n,value:"DOES_NOT_CONTAIN",label:l.localize("DOES_NOT_CONTAIN")},{icon:"smart-icon-starts-with",command:n,value:"STARTS_WITH",label:l.localize("STARTS_WITH")},{icon:"smart-icon-ends-with",command:n,value:"ENDS_WITH",label:l.localize("ENDS_WITH")},{icon:"smart-icon-equals",command:n,value:"EQUAL",label:l.localize("EQUAL")},{icon:"smart-icon-delete",command:n,value:"CLEAR_FILTER",label:l.localize("CLEAR_FILTER")}],l._filterInfo.numberAndDateConditions=[{icon:"smart-icon-equals",command:n,value:"EQUAL",label:l.localize("EQUAL")},{icon:"smart-icon-not-equal",command:n,value:"NOT_EQUAL",label:l.localize("NOT_EQUAL")},{icon:"smart-icon-less-than",command:n,value:"LESS_THAN",label:l.localize("LESS_THAN")},{icon:"smart-icon-less-than-equal",command:n,value:"LESS_THAN_OR_EQUAL",label:l.localize("LESS_THAN_OR_EQUAL")},{icon:"smart-icon-greater-than",command:n,value:"GREATER_THAN",label:l.localize("GREATER_THAN")},{icon:"smart-icon-greater-than-equal",command:n,value:"GREATER_THAN_OR_EQUAL",label:l.localize("GREATER_THAN_OR_EQUAL")},{icon:"smart-icon-between",command:n,value:"RANGE",label:l.localize("RANGE")},{icon:"smart-icon-delete",command:n,value:"CLEAR_FILTER",label:l.localize("CLEAR_FILTER")}]),i="string"===a.dataType?l._filterInfo.stringConditions:l._filterInfo.numberAndDateConditions;let r="smart-icon-search";if(a._filterInfo||(a._filterInfo={condition:""}),a.filterEditor&&a.filterEditor.condition&&(a._filterInfo.condition=a.filterEditor.condition),a.filterEditor&&a.filterEditor.value&&(a._filterInfo.value=a.filterEditor.value),a._filterInfo.dataSource=i,null===a._filterInfo.condition)a._filterInfo.condition="",r="smart-icon-search";else switch(a._filterInfo.condition.toLowerCase()){case"equal":r="smart-icon-equals";break;case"starts_with":r="smart-icon-starts-with";break;case"ends_with":r="smart-icon-ends-with";break;case"not_equal":r="smart-icon-not-equal";break;case"less_than":r="smart-icon-less-than";break;case"less_than_or_equal":r="smart-icon-less-than-or-equal";break;case"greater_than":r="smart-icon-greater-than";break;case"greater_than_or_equal":r="smart-icon-greater-than-or-equal";break;case"contains":r="smart-icon-contains";break;case"does_not_contain":r="smart-icon-does-not-contain";break;case"range":r="smart-icon-between";break;default:r="smart-icon-search"}let s=`<div class="smart-filter-input-type"><i class="smart-grid-icon ${r} show"></i></div> `;if("string"===a.dataType)s+=`<input class="smart-filter-input-value" data-type="${a.dataType}" /> `,e.innerHTML=s;else if("date"===a.dataType){const i=new Smart.Utilities.DateTime;s+=`<input placeholder = "${i.expandFormat(i.calendar,a.cellsFormat||"d")}" class="smart-filter-input-value" data-type="${a.dataType}"/><div class="smart-filter-input-type"><i class="smart-grid-icon smart-icon-calendar show"></i></div>`,e.innerHTML=s,e.lastElementChild.onpointerdown=function(){l._handleFilterCalendarCellClick(t.cell)}}else if("number"===a.dataType)s+='<div class="smart-grid-cell-editor smart-filter-input-value smart-grid-number-input-cell-editor"><input class="smart-input" type="number"><div tabindex="-1" class="nav"><div tabindex="-1" class="up"></div><div tabindex="-1" class="down"></div></div></div>',e.innerHTML=s,l._handleFilterNumberCellEditor(this.cell,e);else if("boolean"===a.dataType||"bool"===a.dataType){const a=document.createElement("div");a.classList.add("smart-input"),a.classList.add("smart-grid-check-box-cell-editor"),a.classList.add("smart-filter-input-value"),e.tabIndex=0,e.style.outline="none",t.setAttribute("template","checkBox"),a.setAttribute("checked","indeterminate"),s=a.outerHTML,e.innerHTML=s,e.classList.add("align-center"),e.classList.add("smart-label"),e.onfocus=()=>{e.setAttribute("focus","")},e.onblur=()=>{e.removeAttribute("focus","")},e.onclick=e=>{e.target.classList.contains("smart-input")&&l._handleFilterCellCheckBoxClick(this.cell)}}const o=e.querySelector("input");if(o&&(e.firstElementChild.onpointerdown=function(){l._handleFilterCellIconClick(this.cell)}.bind(this),o.onfocus=function(){l._handleFilterCellFocus(this.cell)}.bind(this),o.onblur=function(){l._handleFilterCellBlur(this.cell)}.bind(this),o.onkeyup=function(e){l._handleFilterCellKeyUp(this.cell,e)}.bind(this),o.onkeydown=function(e){l._handleFilterCellKeyDown(this.cell,e)}.bind(this)),e.classList.add("smart-filter-input-container"),a._filterInfo.input=o,a._filterInfo.cell=t.cell,a._filterInfo.editor=e,a._filterInfo.value&&(o.value=a._filterInfo.value,"date"===a.dataType&&(o.value=t.cell.getFormattedValue(a._filterInfo.value,a.cellsFormat))),a.allowFilter||(o.disabled=!0),a.filterEditor)if(a.filterEditor.template){const t=a.filterEditor.template,l=document.createElement("div");a.filterTemplate instanceof HTMLTemplateElement?l.appendChild(t.content.cloneNode(!0)):t instanceof HTMLElement?l.appendChild(t):l.innerHTML=t,e.innerHTML="",e.appendChild(l),l.style.height="100%",l.style.width="100%";const i=e.querySelector("input");i&&(i.onfocus=()=>{e.setAttribute("focus","")},i.onblur=()=>{e.removeAttribute("focus","")}),a.filterEditor.onInit&&a.filterEditor.onInit(a,l)}else void 0!==a.filterEditor.min&&(o.min=a.filterEditor.min),void 0!==a.filterEditor.max&&(o.max=a.filterEditor.max),void 0!==a.filterEditor.minLength&&(o.minLength=a.filterEditor.minLength),void 0!==a.filterEditor.maxLength&&(o.maxLength=a.filterEditor.maxLength),void 0!==a.filterEditor.placeholder&&(o.placeholder=a.filterEditor.placeholder),void 0!==a.filterEditor.value&&(o.value=a.filterEditor.value),void 0!==a.filterEditor.step&&(o.step=a.filterEditor.step),void 0!==a.filterEditor.disabled&&(o.disabled=a.filterEditor.disabled),void 0!==a.filterEditor.condition&&(a._filterInfo.condition=a.filterEditor.condition),a.filterEditor.onInit&&a.filterEditor.onInit(a,e)}_setTemplate(e,t,l){const a=this,i=a.cell.grid,n=a.cell.column;let r=null;switch((!i.editing.enabled||!n.allowEdit||a.cell.readonly||i.editing.enabled&&i.editing.commandColumn.visible&&i.editing.editRow!==a.cell.row)&&a.setAttribute("readonly",""),t){case"checkBox":case"radioButton":case"switchButton":r=document.createElement("span"),r.className="smart-input",e?r.setAttribute("checked",""):null===e?r.setAttribute("checked","indeterminate"):r.removeAttribute("checked"),a.setAttribute("template",a.cell.template);break;case"checklist":if(e&&e.indexOf("[")>=0&&(e=JSON.parse(e)),l.firstElementChild&&l.firstElementChild.hasAttribute("value")&&l.firstElementChild.getAttribute("value")===e.length)return a.cell._setStyle(l),void a.setAttribute("template",a.cell.template);if(e&&Array.isArray(e)&&e.length>0){const t=e.filter((e=>e.completed)).length;e=i.localize("completed",{value:t})+"/"+e.length}else e="";r=document.createElement("span"),r.innerHTML=e,a.setAttribute("template",a.cell.template),r.setAttribute("value",e.length);break;case"createdBy":case"updatedBy":{const e=a.cell.row;let s=null,o=null;if(s="createdBy"===t?e.createdBy:e.updatedBy,l.firstElementChild&&l.firstElementChild.hasAttribute("user-id")&&s===parseInt(l.firstElementChild.getAttribute("user-id")))return a.cell._setStyle(l),void a.setAttribute("template",a.cell.template);const d=document.createElement("div");d.classList.add("smart-multi-combo-input"),d.setAttribute("data-field",n.dataField),d.setAttribute("row-id",a.cell.row.id);let c="";if(null!=s&&-1!==s){o=i.users.find((e=>e.id===s));const e=o,t="string"==typeof e?e:e.name,l="string"==typeof e?null:e.color,a="string"==typeof e?null:e.image,n=document.createElement("span");a&&(n.style.backgroundImage=`url('${e.image}')`,n.className="smart-drop-down-list-selection-image"),c+=l?'<span title="'+t+'" data-item="'+t+'" style="background: '+l+"; color: "+new Smart.Color(l).getInvertedColor()+';" class="smart-truncate smart-token">'+n.outerHTML+"<span class='smart-drop-down-list-selection-label' role=\"presentation\">"+t+"</span></span>":'<span title="'+t+'" data-item="'+t+'" class="smart-truncate smart-token">'+n.outerHTML+"<span class='smart-drop-down-list-selection-label' role=\"presentation\">"+t+"</span></span>"}d.innerHTML=c;const m=document.createElement("div");m.classList.add("smart-multi-combo-input-container","tokens","smart-flex-auto"),d.classList.add("smart-flex-auto"),m.appendChild(d),r=m,r.setAttribute("user-id",s),a.setAttribute("template",a.cell.template);break}case"tags":{let t=[];if("number"==typeof e&&(e=""+e),null!==e&&(t=e.indexOf("{")>=0||"[]"===e?JSON.parse(e):e.split(",").map((e=>e.trim()))),l.firstElementChild&&l.firstElementChild.hasAttribute("value")&&n.editor._items&&l.firstElementChild.getAttribute("value")===e)return a.cell._setStyle(l),void a.setAttribute("template",a.cell.template);const s=document.createElement("div");s.classList.add("smart-multi-combo-input"),s.setAttribute("data-field",n.dataField),s.setAttribute("row-id",a.cell.row.id);let o="";if(e)for(let e=0;e<t.length;e++){const l=t[e];let a=null;if(n.editor.dataSource)if("string"==typeof l&&n.editor._items&&n.editor._items[l])a=n.editor._items[l];else for(let e=0;e<n.editor.dataSource.length;e++){const t=n.editor.dataSource[e];if(void 0!==t.value&&void 0!==l&&void 0!==l.value&&t.value===l.value){a=t,n.editor._items||(n.editor._items=[]),n.editor._items[l]=t;break}if(void 0===t.value&&t===l||void 0!==t.value&&""+t.value===l){a=t,n.editor._items||(n.editor._items=[]),n.editor._items[l]=t;break}}else a=l;if(!a)continue;const i="string"==typeof a?a:a.label,r="string"==typeof a?null:a.color,s="string"==typeof a?null:a.image;if(""===i)continue;const d=document.createElement("span");if(s&&(d.style.backgroundImage=`url('${a.image}')`,d.className="smart-drop-down-list-selection-image"),r&&n.editor.colorItems?o+='<span title="'+i+'" data-item="'+i+'" style="background: '+r+"; color: "+new Smart.Color(r).getInvertedColor()+';" class="smart-truncate smart-token">'+d.outerHTML+"<span class='smart-drop-down-list-selection-label' role=\"presentation\">"+i+"</span>":o+='<span title="'+i+'" data-item="'+i+'" class="smart-truncate smart-token">'+d.outerHTML+"<span class='smart-drop-down-list-selection-label' role=\"presentation\">"+i+"</span>",n.editor.dataSource){if(n.editor.singleSelect){o+="</span>";break}o+='<span class=\'smart-drop-down-list-unselect-button\' role="button" aria-label="Unselect"></span></span>'}else o+="</span>"}if(s.innerHTML=o,s.onpointerdown=e=>{if(e.target&&"#text"!==e.target.nodeName&&e.target.classList.contains("smart-drop-down-list-unselect-button")){const l=e.target.parentNode.getAttribute("data-item");if(t[0]&&t[0].label){const r=t.map((e=>e.value)).indexOf(l);r>=0&&(t.splice(r,1),i.setCellValue(a.cell.row.id,n.dataField,JSON.stringify(t)),e.preventDefault(),e.stopPropagation())}else t.indexOf(l)>=0&&(t.splice(t.indexOf(l),1),i.setCellValue(a.cell.row.id,n.dataField,t.join(", ")),e.preventDefault(),e.stopPropagation())}else if(e.target.classList.contains("smart-drop-down-list-selection-label")){if(i.editing.enabled){const t=e.target.parentElement.parentElement,l=t.getAttribute("data-field"),a=t.getAttribute("row-id");i.beginEdit(a,l)}e.stopPropagation(),e.preventDefault()}},!n.cellsWrap&&n.allowEdit&&i.editing.enabled){const e=document.createElement("span");e.classList.add("smart-arrow-down","arrowbtn");const t=document.createElement("div");t.classList.add("smart-multi-combo-input-container","tokens","smart-flex-auto"),s.classList.add("smart-flex-auto"),i.rightToLeft&&(s.style.direction="rtl"),t.appendChild(s),"input"!==n.editor.template&&t.appendChild(e),r=t,e.onpointerdown=e=>{if(i.editing.enabled){const t=e.target.previousElementSibling,l=t.getAttribute("data-field"),a=t.closest("smart-grid-row").getAttribute("data-id");i.beginEdit(a,l)}e.stopPropagation(),e.preventDefault()}}else n.cellsWrap||n.allowEdit||s.classList.add("smart-flex-auto"),r=s;a.setAttribute("template",a.cell.template),r.setAttribute("value",e);break}case"dropDownList":case"dropdownlist":case"list":{const t=document.createElement("div");if(l.firstElementChild&&l.firstElementChild.hasAttribute("value")&&l.firstElementChild.getAttribute("value")===e)return a.cell._setStyle(l),void a.setAttribute("template",a.cell.template);if(t.innerHTML='<span class="smart-truncate">'+e+"</span>",n.allowEdit&&i.editing.enabled){const e=document.createElement("span");e.classList.add("smart-arrow-down","arrowbtn");const l=document.createElement("div");l.classList.add("smart-multi-combo-input-container","tokens","smart-flex-auto"),t.classList.add("smart-flex-auto"),l.appendChild(t),l.appendChild(e),l.classList.add(a.cell.template.toLowerCase()),r=l,e.onpointerdown=e=>{if(i.editing.enabled){const t=e.target.closest("smart-grid-cell"),l=e.target.closest("smart-grid-row"),n=t.getAttribute("data-field"),r=l.getAttribute("data-id");if(i.beginEdit(r,n),a.cell.column.editor&&a.cell.column.editor.instance){const e=a.cell.column.editor,t=e.instance.element;!e.autoOpen&&t.open?t.open():!e.autoOpen&&t.firstElementChild&&t.firstElementChild.open&&setTimeout((()=>{t.firstElementChild.open()}),250)}}e.stopPropagation(),e.preventDefault()}}else r=t;a.setAttribute("template",a.cell.template.toLowerCase()),r.setAttribute("value",e);break}case"password":l.innerHTML=e?'<span class="smart-truncate">'+e.replace(/./g,"*")+"</span>":"",a.setAttribute("template",a.cell.template);break;case"color":l.innerHTML=`<span style="left: calc(50% - 12px); top: calc(50% - 12px); position: absolute; border-radius: 50%; width: 24px; height: 24px; display: block; background:${e};"></span>`,a.setAttribute("template",a.cell.template);break;case"autoNumber":r=document.createElement("span"),r.innerHTML=1+a.cell.row.visibleIndex,a.setAttribute("template",a.cell.template);break;case"createdDate":case"createdTime":l.innerHTML='<span class="smart-truncate">'+a.cell.getFormattedValue(a.cell.row.createdDate,"d")+" "+a.cell.getFormattedValue(a.cell.row.createdDate,"t")+"</span>",a.cell._setStyle(l),a.setAttribute("template",a.cell.template);break;case"updatedDate":case"updatedTime":a.cell.row.updatedDate?l.innerHTML='<span class="smart-truncate">'+a.cell.getFormattedValue(a.cell.row.updatedDate,"d")+" "+a.cell.getFormattedValue(a.cell.row.updatedDate,"t")+"</span>":l.innerHTML="",a.cell._setStyle(l),a.setAttribute("template",a.cell.template);break;case"progress":{const t=e?parseInt(100*e)+"%":"0%";if(l.firstElementChild&&l.firstElementChild.hasAttribute("value")&&t===l.firstElementChild.getAttribute("value"))return a.cell._setStyle(l),void a.setAttribute("template",a.cell.template);const i="white",n=["#D50000","#F4511E","#F6BF26","#33B679"];let r=n[0];r=e<.25?n[0]:e<.5?n[1]:e<.75?n[2]:n[3],l.innerHTML='<div value="'+t+'" style="padding-left: 5px; padding-right: 5px; display: grid; grid-template-columns: 1fr auto"><div style="height: 100%; display: flex; align-items: center; width: '+t+';"><div title="'+t+'" style="width: 100%; height: 4px; background: '+r+"; color: "+i+';" class="smart-truncate smart-token"></div></div><span>'+t+"</span></div>",a.setAttribute("template",a.cell.template);break}case"images":{if(""===e)return l.innerHTML="",a.cell._setStyle(l),void a.setAttribute("template",a.cell.template);if(l.firstElementChild&&l.firstElementChild.hasAttribute("value")){const t=l.firstElementChild.getAttribute("value");if(e&&e.indexOf(t)>=0)return a.cell._setStyle(l),a.setAttribute("template",a.cell.template),void(l.firstElementChild.evaluateScroll&&l.firstElementChild.evaluateScroll());if(t&&e&&Array.isArray(e)&&e[0]&&e[0].value&&t.length===e[0].value.length)return a.cell._setStyle(l),void a.setAttribute("template",a.cell.template)}const t=document.createElement("div"),n=document.createElement("div");t.classList.add("container"),n.classList.add("images");let s=e;if("string"==typeof s&&(s.indexOf("http")>=0||s.indexOf("base64")>=0)){let e="";if(s)try{e=JSON.parse(s)}catch(e){console.log(e)}s=e}Array.isArray(s)&&s.forEach((e=>{const l=document.createElement("img");l.src=e.value,l.title=e.label,t.appendChild(l)}));const o=document.createElement("div");o.classList.add("smart-arrow-left","arrowbtn","smart-hidden");const d=document.createElement("div");if(d.classList.add("smart-arrow-right","arrowbtn"),n.onpointerdown=e=>{if("IMG"===e.target.nodeName)i._openImagePreviewDialog(e.target),e.stopPropagation(),e.preventDefault();else if("DIV"===e.target.nodeName&&e.target.classList.contains("arrowbtn")){let l=parseInt(t.style.marginLeft);isNaN(l)&&(l=0);const i=o===e.target,n=t.scrollWidth-a.offsetWidth+30;t.style.marginLeft=i?Math.min(0,l+25)+"px":Math.max(-n,l-25)+"px",l=parseInt(t.style.marginLeft),0===l?o.classList.add("smart-hidden"):o.classList.remove("smart-hidden"),e.stopPropagation(),e.preventDefault()}},t.children.length){n.appendChild(t);const e=25*s.length;e-a.offsetWidth+30>30&&(n.appendChild(o),n.appendChild(d)),n.evaluateScroll=()=>{const l=e-a.offsetWidth+30;t.style.marginLeft="0px",o.classList.add("smart-hidden"),l<0?d.classList.add("smart-hidden"):d.classList.remove("smart-hidden"),l>30&&(n.appendChild(o),n.appendChild(d))},r=n}else r=document.createElement("div");a.setAttribute("template",a.cell.template),e&&e[0]&&e[0].value?r.setAttribute("value",e[0].value):s&&s[0]&&s[0].label?r.setAttribute("value",s[0].label):r.setAttribute("value",e);break}case"email":Smart.Validator&&(r=document.createElement("span"),Smart.Validator.email(e)?r.innerHTML=e:(r.className="url",r.innerHTML='<a href="mailto:'+e+'" target="_blank" contenteditable="false" rel="noreferrer noopener">'+e+"</a>",r.firstElementChild.onpointerdown=e=>{e.stopPropagation(),e.preventDefault(),r.firstElementChild.click()})),a.setAttribute("template",a.cell.template);break;case"url":Smart.Validator&&(r=document.createElement("span"),r.className="url",Smart.Validator.url(e)?r.innerHTML='<a href="https://'+e+'" target="_blank" contenteditable="false" rel="noreferrer noopener">'+e+"</a>":r.innerHTML='<a href="'+e+'" target="_blank" contenteditable="false" rel="noreferrer noopener">'+e+"</a>",r.firstElementChild.onpointerdown=e=>{e.stopPropagation(),e.preventDefault(),r.firstElementChild.click()}),a.setAttribute("template",a.cell.template);break;default:{let t=null;a.setAttribute("template","");const r=a.cell.row,s=l;let o=a.cell.getFormattedValue(e,n.cellsFormat);if(s.style.lineHeight="","function"==typeof a.cell.template){const t={row:r,column:n,cell:a.cell,oldValue:a.cell.oldValue,value:e,template:null};let l=s.querySelector(".smart-grid-cell-template");l&&l.getAttribute("column")===n.dataField?t.template=l.firstElementChild:l=null,a.formattedValue!==o&&(l=null),a.cell.canNotify=!1,r.canNotify=!1;const i=Object.assign({},{background:a.cell.background,color:a.cell.color,fontSize:a.cell.fontSize,fontFamily:a.cell.fontFamily,fontWeight:a.cell.fontWeight,textDecoration:a.cell.textDecoration,fontStyle:a.cell.fontStyle});if(a.cell.template(t),!l&&t.template)if(t.template instanceof HTMLElement){const e=document.createElement("div");e.classList.add("smart-grid-cell-template"),e.setAttribute("column",n.dataField),s.innerHTML="",s.appendChild(e),e.appendChild(t.template)}else s.innerHTML='<div column="'+n.dataField+'" class="smart-grid-cell-template">'+t.template+"</div>";else l||null!==t.template||(s.innerHTML=e);s.style.background===i.background&&s.style.color===i.color&&s.style.fontSize===i.fontSize&&s.style.fontWeight===i.fontWeight&&s.style.fontStyle===i.fontStyle||(a.cell._styleChanged=!0,a.cell._setStyle(s)),a.cell.background!==i.background||a.cell.color!==i.color||a.cell.fontSize!==i.fontSize||a.cell.fontWeight!==i.fontWeight||a.cell.fontStyle!==i.fontStyle?(a.cell._styleChanged=!0,a.cell._setStyle(s)):a.cell._styleChanged&&a.cell._setStyle(s),void 0===a.cell.oldValue&&(a.cell.oldValue=e),a.formattedValue=o,a.cell.canNotify=!0,r.canNotify=!0}else{if(""!==s.textContent&&(s.textContent=""),a.cell.template instanceof HTMLTemplateElement)t=a.cell.template;else if(a.cell.template instanceof HTMLElement){const t=a.cell.template.innerHTML.replace(/{{value}}/gi,e).replace(/{{id}}/gi,r.id);s.innerHTML!==t&&(s.innerHTML=t)}if(a.cell.template.startsWith&&a.cell.template.startsWith("#")&&(t=document.querySelector(a.cell.template)),t){let l=t.content.cloneNode(!0).firstElementChild;const d=e;if(e=(e=(e=e.toString()).replace(/'/gi,"\\'")).replace(/"/gi,'\\"'),l.querySelector("[smart-if]")){const t=l.querySelector("[smart-else]"),a=l.querySelectorAll("[smart-if]");let i=!1;for(let t=0;t<a.length;t++){const r=a[t],s=r.getAttribute("smart-if").split(" "),o=s[1].trim();let c=s[2].trim(),m=e;switch("Today"===c&&(c=new Date),"date"===n.dataType&&(e=new Date(d).getTime(),c=new Date(c).getTime()),o){case">":e>parseFloat(c)&&(l=r,i=!0);break;case">=":e>=parseFloat(c)&&(l=r,i=!0);break;case"=":case"==":case"===":e===c&&(l=r,i=!0);break;case"<":e<parseFloat(c)&&(l=r,i=!0);break;case"<=":e<=parseFloat(c)&&(l=r,i=!0)}if(e=m,i)break}!i&&t&&(l=t)}let c=l.outerHTML.replace(/{{value}}/gi,e).replace(/{{id}}/gi,r.id);for(c.indexOf("{{value=")>=0&&(e?(c=c.substring(0,c.indexOf("{{value="))+e+c.substring(c.indexOf("}")),c=c.replace(/}/gi,""),c=c.replace(/{/gi,"")):(c=c.replace(/{{value=/gi,""),c=c.replace(/}}/gi,"")));c.indexOf("{{value::")>=0;){const t=c.indexOf("{{value::"),l=c.substring(t+9,c.indexOf("}}")),i=a.cell.getFormattedValue(e,l);c=c.replace(`{{value::${l}}}`,i)}if(n._treeColumn){const e=s.firstChild;if(e&&e.classList&&a.toggleButton&&n._treeColumn&&s.children[1]){const e=s.children[0],t=s.children[1].children[0],l=s.children[1].children[1].firstChild,a=s.children[1].children[2];let n="";if(i.grouping.enabled){let e=r.level-1;"multipleColumns"!==i.grouping.renderMode&&(n+='<div style="width: '+(1+e)*i.grouping.groupIndent+'px;"></div>')}else for(let e=0;e<r.level;e++)n+="<div class='smart-indent'></div>";r.checked?l.setAttribute("checked",""):!1===r.checked?l.removeAttribute("checked"):null===r.checked&&l.setAttribute("checked","indeterminate"),r.leaf?r.allowCheck?l.classList.remove("smart-visibility-hidden"):l.classList.add("smart-visibility-hidden"):r.allowCheck?l.classList.remove("smart-hidden"):l.classList.add("smart-hidden"),r.allowCheck?i.checkBoxes.visible?l.classList.remove("smart-hidden"):l.classList.add("smart-hidden"):i.checkBoxes.visible||l.classList.add("smart-hidden"),e.innerHTML=n,t.classList.add("smart-visibility-hidden"),r.leaf?t.classList.add("smart-visibility-hidden"):(t.classList.remove("smart-visibility-hidden"),r.expanded?t.setAttribute("toggled",""):t.removeAttribute("toggled","")),r.data.isEmpty&&t.classList.add("smart-visibility-hidden"),a.innerHTML=c,i.appearance.showTooltips?a.setAttribute("title",o):a.hasAttribute("title")&&a.removeAttribute("title")}}else s.innerHTML!==c&&(s.innerHTML=c)}else if("string"==typeof a.cell.template){""===e&&(e="&nbsp;");const t=a.cell.template.replace(/{{value}}/gi,e).replace(/{{id}}/gi,r.id);s.innerHTML!==t&&(s.innerHTML=t)}}if("auto"===a.cell.row.height||i.layout.allowCellsWrap||"auto"===i.layout.rowHeight){const e=s.querySelector(".smart-grid-cell-template");if(e){r._templatesHeight||(r._templatesHeight=[]);const t=(e,t)=>{if(e){const l=i.rowById[e.getAttribute("data-id")];l._templatesHeight[n.dataField]=t,l._isDirty=!0,l.autoSize(),delete l._isDirty}};if(e.firstElementChild){if(!e.firstElementChild.resizeObserver){const l=new ResizeObserver((function(){const e=this.target.closest("smart-grid-row");this.target.offsetHeight&&(t(e,this.target.offsetHeight),i.$.scrollView.scrollTop=0)}));e.firstElementChild.resizeObserver=l,l.target=e.firstElementChild,l.observe(e.firstElementChild)}e.firstElementChild.onblur=e.firstElementChild.onchange=function(){const e=this.closest("smart-grid-row");t(e,this.offsetHeight)}}else{const l=this.closest("smart-grid-row");t(l,e.offsetHeight)}}}}}if(r)return l.innerHTML="",l.appendChild(r),a.cell._setStyle(l),r}async _render(){const e=this,t=e.cell.grid,l=e.cell.column,a=e.cell.row,i=a.data,n=a._isMeasureRow?null:l.cellsFormat;if(!1===t._recycleValues)return e.cell.selected?(e.setAttribute("selected",""),e.setAttribute("aria-selected",!0)):(e.removeAttribute("selected"),e.removeAttribute("aria-selected")),e.classList.contains("smart-hidden")&&e.classList.remove("smart-hidden"),void(e.cell.focused?(t.selection.allowCellSelection&&e.setAttribute("focus",""),a.element.setAttribute("focus",""),a.element.toggleDetailButton&&(a.element.toggleDetailButton.classList.remove("smart-visibility-hidden"),a.element.star&&a.element.star.classList.add("smart-hidden")),e.cell.id||(e.id="gridcell_"+Math.floor(65536*(1+Math.random())).toString(16).substring(1)),t.setAttribute("aria-activedescendant",e.id)):(e.removeAttribute("focus"),a.element.star&&t._selection.focusedCell&&t._selection.focusedCell.id!==a.id&&a.element.star.classList.remove("smart-hidden")));if(t.grouping.enabled&&t.dataSource.groupBy.length>0){if(void 0!==a.label){let t=l.displayField?i[l.displayField]:i[l.dataField];return e._renderGroupCell(t),void(a.summaryRow&&(e.cell.canNotify=!1,a.canNotify=!1,e.cell._styleChanged=!0,e.cell.background=null,e.cell.color=null,e.cell.fontFamily=null,e.cell.fontSize=null,e.cell.element&&e.cell.element.firstElementChild&&e.cell._setStyle(e.cell.element.firstElementChild),e.cell.canNotify=!0,a.canNotify=!0))}e.style.zIndex=""}else if(t.appearance.showTreeRowHeader&&t.rowHierarchy&&!1===a.leaf&&!l.autoGenerated){let t=i[a.groupDataField];return a.label=t,void e._renderGroupCell(t)}if(t.appearance.showTreeRowHeader&&e.removeAttribute("header"),t.grouping.enabled&&t.dataSource.groupBy.length>0&&e.toggleButton&&(e.toggleButton.classList.remove("smart-hidden"),e.toggleButton.classList.remove("smart-visibility-hidden"),e.toggleButton.style.marginLeft="",l._treeColumn&&t.grouping.enabled&&t.grouping.toggleButtonIndent>0&&(e.toggleButton.style.marginLeft=a.level*(t.grouping.toggleButtonIndent-t.grouping.groupIndent)+"px")),t.grouping.enabled&&t.dataSource.groupBy.length>0&&(e.removeAttribute("header"),e.removeAttribute("group")),!l.visible)return void(e.style.width="0px");t.appearance.showSortColumnBackground&&t.sorting.maintainSort&&!a.summaryRow?l.sorted?e.setAttribute("sort",""):e.removeAttribute("sort"):l.sorted&&e.hasAttribute("sort")&&e.removeAttribute("sort"),t.appearance.showFilterColumnBackground?l.filtered?e.setAttribute("filter",""):e.removeAttribute("filter"):l.filtered&&e.hasAttribute("filter")&&e.removeAttribute("filter"),t.dataSource.boundHierarchy&&e.hasAttribute("has-toggle-button")&&!l._treeColumn&&e.removeAttribute("has-toggle-button");let r=l.displayField?i[l.displayField]:i[l.dataField];null!==r||l.allowNull||("int"!==l.dataType&&"number"!==l.dataType||(r=0),"string"===l.dataType&&(r=""),"boolean"!==l.dataType&&"bool"!==l.dataType||(r=!1),"date"===l.dataType&&(r=new Date)),t.grouping.enabled&&"multipleColumns"===t.grouping.renderMode&&t.dataSource&&t.dataSource.groupBy.length>0&&t.dataSource.groupBy.indexOf(l.dataField)>=0&&(r="",e.setAttribute("header","")),e.removeAttribute("highlight"),t.highlighted!==a.id||l.autoGenerated||e.setAttribute("highlight",""),t.editing.addNewRow.visible&&e.classList.remove("smart-add-new-row");const s=t=>t?t.startsWith("off_")?(e.classList.remove(t.substring(4)),!1):(e.classList.add(t),e.setAttribute("customCSS",t),!0):(e.setAttribute("highlight",""),!0);if((t.highlightedRows||t.highlightedCells)&&e.hasAttribute("customCSS")){const t=e.getAttribute("customCSS");e.removeAttribute("customCSS"),e.classList.remove(t)}if(l.highlight&&!a.summaryRow&&(s(l._highlightCSS||""),e.setAttribute("highlight-data-field",l.dataField)),t.highlightedCells&&t.highlightedCells[a.id]&&!a.summaryRow&&void 0!==t.highlightedCells[a.id][l.dataField]&&s(t.highlightedCells[a.id][l.dataField]),t.highlightedRows&&!a.summaryRow&&void 0!==t.highlightedRows[a.id]&&s(t.highlightedRows[a.id]),t.editing.batch){if(t._cellsUpdatedValues){e.removeAttribute("update");const i=t._cellsUpdatedValues[a.id+"_"+l.dataField];void 0!==i&&(e.setAttribute("update",""),r=i)}t._rowsDeleted&&(t._rowsDeleted.indexOf(a.id)>=0?e.setAttribute("delete",""):e.removeAttribute("delete")),t._rowsAdded&&(t._rowsAdded.indexOf(a.id)>=0?e.setAttribute("add",""):e.removeAttribute("add"))}!t.onCellValue||l.rowHeaderColumn||l.selectionColumn||(e.cell._updating=!0,t.onCellValue(e.cell,t),e.cell._updating=!1,r=e.cell.value),void 0===r&&(r="");let o=r;n?o=e.cell.getFormattedValue(r,n):l.formatSettings&&l.formatSettings.Intl&&(o=e.cell.getFormattedValue(r,l.formatSettings.Intl));const d=e.firstChild;if(e.content=d,l._isDirty&&(d.innerHTML=""),d.hasAttribute("data-field")&&d.getAttribute("data-field")!==l.dataField&&(d.innerHTML=""),d.setAttribute("data-field",l.dataField),t.onCellRender||l.onCellRender)if(l._cellsCachedValues||(l._cellsCachedValues=[]),l._cellsCachedValues[a.index]){const t=l._cellsCachedValues[a.index];d.firstChild&&d.removeChild(d.firstChild),e.cell.template instanceof HTMLTemplateElement||"string"==typeof e.cell.template?d.appendChild(t):d.innerHTML=t.innerHTML}else{if(e.cell._updating=!0,t.onCellRender?t.onCellRender(e.cell,a.visibleIndex,l.dataField,a.data,e):l.onCellRender(e.cell,a.visibleIndex,l.dataField,a.data,e),e.cell._updating=!1,e.cell.template!==l.template){const t=document.createElement("div");return d.firstChild&&d.removeChild(d.firstChild),e.cell.template instanceof HTMLTemplateElement?(t.appendChild(e.cell.template.content.cloneNode(!0)),l._cellsCachedValues[a.index]=t):t.appendChild(e.cell.template),void d.appendChild(t)}e.cell.value!==r&&(o=e.cell.value)}if(l.autoGenerated||e.setAttribute("data-field",l.dataField),e.cell.focused?(t.selection.allowCellSelection&&e.setAttribute("focus",""),a.element.setAttribute("focus",""),a.element.toggleDetailButton&&(a.element.toggleDetailButton.classList.remove("smart-visibility-hidden"),a.element.star&&a.element.star.classList.add("smart-hidden")),e.cell.id||(e.id="gridcell_"+Math.floor(65536*(1+Math.random())).toString(16).substring(1)),t.setAttribute("aria-activedescendant",e.id)):e.removeAttribute("focus"),e.cell.selected?(e.setAttribute("selected",""),e.setAttribute("aria-selected",!0)):(e.removeAttribute("selected"),e.removeAttribute("aria-selected")),t.dragDrop&&t.dragDrop.row===a?e.classList.add("dragged"):e.classList.remove("dragged"),e._classNames)for(let t=0;t<e._classNames.length;t++)e.classList.remove(e._classNames[t]);if(a._classNames){if(e._rowClassNames)for(let t=0;t<e._rowClassNames.length;t++)e.classList.remove(e._rowClassNames[t]);for(let t=0;t<a._classNames.length;t++)e.classList.add(a._classNames[t]);e._rowClassNames=a._classNames}if(t.onCellClass){const i=t.onCellClass(a.visibleIndex,l.dataField,r,a.data,a,t);if(e.___classNames)for(let t=0;t<e.___classNames.length;t++)e.classList.remove(e.___classNames[t]);if(i){const t=i.trim().split(" ");for(let l=0;l<t.length;l++)e.classList.add(t[l]);e.___classNames=t}}if(l.cellsClassName)if("string"==typeof l.cellsClassName){const t=l.cellsClassName.trim().split(" ");for(let l=0;l<t.length;l++)e.classList.add(t[l]);e._classNames=t}else{const t=l.cellsClassName(a.visibleIndex,l.dataField,r,a.data,a);if(e._classNames)for(let t=0;t<e._classNames.length;t++)e.classList.remove(e._classNames[t]);if(t){const l=t.trim().split(" ");for(let t=0;t<l.length;t++)e.classList.add(l[t]);e._classNames=l}}if(l.cellsCSSRules){if(e.__classNames)for(let t=0;t<e.__classNames.length;t++)e.classList.remove(e.__classNames[t]);const i=Object.keys(l.cellsCSSRules);for(let n=0;n<i.length;n++){let s=i[n];const o={index:a.visibleIndex,value:r,dataField:l.dataField,row:a,api:t};l.cellsCSSRules[s](o)&&(e.classList.add(s),e.__classNames=[s])}}t.rowDetail.enabled&&a.showDetail&&!1===t.rowDetail.dialog.enabled&&(e.style.height=a.cellHeight+"px",e.style.lineHeight=a.cellHeight+"px"),a.expanded&&a.expandHeight>0&&(e.style.height=a.cellHeight+"px",e.style.lineHeight=a.cellHeight+"px");const c=e._getCellAlignment(a,l),m=""!==e.cell.template&&t.isInitialized&&!a._isMeasureRow;let u="";if(c.align&&(u+=c.align+" "),c.verticalAlign&&(u+=c.verticalAlign+" "),l.cellsWrap&&(u+="wrap "),u+="smart-label",e.style.width!==l.computedWidth+"px"){const a=t._isLastVisibleColumn(l);l.autoGenerated||a?e.style.width=l.computedWidth+"px":e.style.width=l.computedWidth-t._columnGap+"px"}l===t._firstVisibleColumn?e.classList.add("smart-grid-column-border-collapse"):e.classList.remove("smart-grid-column-border-collapse"),t.grouping.enabled&&"multipleColumns"===t.grouping.renderMode&&t.dataSource&&t.dataSource.groupBy.length>0&&t.dataSource.groupBy.indexOf(l.dataField)>=0&&e.classList.add("smart-grid-column-border-collapse"),t._columnGap>0&&t.appearance.showColumnLines&&e.classList.add("smart-grid-column-border"),t._rowGap>0&&e.classList.add("smart-grid-row-border"),t.appearance.showColumnLines?e.classList.remove("smart-grid-vertical-border-collapse"):e.classList.add("smart-grid-vertical-border-collapse"),t.appearance.showRowLines?e.classList.remove("smart-grid-horizontal-border-collapse"):e.classList.add("smart-grid-horizontal-border-collapse");let g=l.left;if(t.rightToLeft?e.style.right!==g+"px"&&(e.style.right=g+"px"):e.style.left!==g+"px"&&(e.style.left=g+"px"),e.classList.contains("smart-hidden")&&e.classList.remove("smart-hidden"),e.hasAttribute("template")&&e.removeAttribute("template"),e.hasAttribute("freeze")&&e.removeAttribute("freeze"),e.hasAttribute("detail")&&e.removeAttribute("detail"),e.hasAttribute("error")&&e.removeAttribute("error"),e.cell.error&&e.setAttribute("error",e.cell.error),a.filterRow?e.classList.add("smart-grid-filter-row-cell"):a.summaryRow?e.classList.add("smart-grid-summary-row-cell"):(l.freeze||a.freeze)&&(l.selectionColumn&&(e.setAttribute("checkbox",""),u+=" smart-input",l.grid.selection.checkBoxes.enabled&&l.grid.selection.checkBoxes.autoShow?e.setAttribute("auto-show",""):e.removeAttribute("auto-show")),(l.rowHeaderColumn||l.selectionColumn)&&(e.setAttribute("header",""),e.setAttribute("role","rowheader")),l.rowDetailColumn&&(e.setAttribute("header",""),e.setAttribute("detail",""),e.setAttribute("has-toggle-button",""),e.classList.add("smart-grid-column-border-collapse")),l.commandColumn&&e.setAttribute("command",""),t.appearance.showFrozenColumnBackground&&l.freeze&&e.setAttribute("freeze",""),t.appearance.showFrozenRowBackground&&a.freeze&&e.setAttribute("freeze","")),l.cellsRotationAngle){if(!e._rotateCellContent(d,l,r))return}else if(a.filterRow){if(!l.toggleColumn&&!l.rowHeaderColumn)return t.grouping.enabled&&t.dataSource&&t.dataSource.groupBy.length>0&&(l._filterEditorInitialized=!1),l._filterEditorInitialized||l.autoGenerated?void("boolean"===l.dataType||"bool"===l.dataType?e.setAttribute("template","checkBox"):e.removeAttribute("template")):(l._filterEditorInitialized=!0,void e._renderFilterCell(d));d.innerHTML=""}else if(a.summaryRow){if(l.toggleColumn||l.rowHeaderColumn)d.innerHTML="";else if(l.autoGenerated&&(d.innerHTML=""),t.dataSource.boundHierarchy&&e.hasAttribute("has-toggle-button")&&e.removeAttribute("has-toggle-button"),!l.autoGenerated){if(l.summary.length>0&&t._summaryItems){const a=t._summaryItems[l.dataField],i=[];for(let n in a){const r=l.cellsFormat;let s=a[n];r&&r.indexOf("p")>=0&&"count"===n?s=a[n]:r&&"date"!==l.dataType&&(s=e.cell.getFormattedValue(s,r)),i.push(t.localize(n,{value:s}))}const n=i.join(", "),r=t.summaryRow.editing?'<span class="smart-arrow-down"></span>':"";let s=`<div title = "${n}" class="smart-truncate summary-value" > <span class="label">${n}</span>${r}</div> `;if(t.columns[0].dataField===l.dataField&&i.length<3){const e=t._recyclingRows.length;s=`<div title = "${n}" class="smart-truncate summary-value" > <span style = "justify-content: flex-start" class="smart-truncate summary-value" > ${1===e?t.localize("oneRow"):t.localize("rows",{value:e})}</span> <span class="label">${n}</span>${r}</div> `}d.innerHTML!==s&&(d.innerHTML=s)}else if(t.summaryRow.editing&&l.allowSummary)if(t.columns[0].dataField===l.dataField){const e=t._recyclingRows.length,l=`<div class="smart-truncate summary-value" ><span style="justify-content: flex-start" class="smart-truncate summary-value">${1===e?t.localize("oneRow"):t.localize("rows",{value:e})}</span><span class="smart-summary-placeholder label">${t.localize("summary")}</span><span class="smart-arrow-down"></span></div> `;d.innerHTML!==l&&(d.innerHTML=l)}else{const e=`<div class="smart-truncate summary-value" ><span class="smart-summary-placeholder label">${t.localize("summary")}</span><span class="smart-arrow-down"></span></div> `;d.innerHTML!==e&&(d.innerHTML=e)}t.summaryRow.editing&&l.allowSummary&&(t._selection&&t._selection.focusedCell&&t._selection.focusedCell.dataField===l.dataField?d.firstElementChild.setAttribute("has-summary",""):d.firstElementChild.removeAttribute("has-summary"),d.onpointerdown=e=>{e.preventDefault(),e.stopPropagation(),d._clickTarget=e.target},d.onpointerup=l=>{d._clickTarget===l.target&&(l.preventDefault(),l.stopPropagation(),t._summaryRowDialog&&t._summaryRowDialog.classList.contains("open")&&t._summaryRowDialog.dataField===e.cell.column.dataField?t._summaryRowDialog.confirm():t._openSummaryRowDialog(e.cell,(()=>{})))})}}else if(t.rowDetail.enabled&&l.rowDetailColumn){let l="";if(l=a.showDetail?'<button tabindex="-1" class="smart-visibility-hidden smart-animate" toggled toggle-button></button>':'<button tabindex="-1" class="smart-visibility-hidden smart-animate" toggle-button></button>',t.appearance.showRowStatus){l=a._style&&a._style.status?`<span class="row-status custom" style = "color: ${a._style.status};" ></span> `+l:'<span class="row-status"></span>'+l,d.innerHTML===l||a.element.star?(a.element.star.classList.remove("smart-hidden"),a.element.star.classList.remove("custom"),a._style&&a._style.status?(a.element.star.style.color=a._style.status,a.element.star.classList.add("custom")):a.element.star.style.color=""):d.innerHTML=l;const i=()=>{if(a.comments&&a.comments.length>0){const e=a.comments.length;a.element.star.classList.add("comments"),a.element.star.setAttribute("title",t.localize(a.starred?"starred":"notStarred",{elementType:"Grid"})+", "+e+" "+t.localize("comments"))}else a.comments&&0===a.comments.length&&a.element.star.classList.remove("comments")};a.element.star=e.querySelector("span"),a.element.star||(d.innerHTML=l,a.element.star=e.querySelector("span")),a.element.star.onpointerdown=e=>{a.canNotify=!1,a.starred=!a.starred,a.canNotify=!0,a.data.$&&(a.data.$.starred=a.starred),a.starred?a.element.star.classList.add("starred"):a.element.star.classList.remove("starred"),a.element.star.setAttribute("title",t.localize(a.starred?"starred":"notStarred",{elementType:"Grid"})),i(),e.stopPropagation(),e.preventDefault(),t.$.fireEvent("rowStarred",{id:a.id,originalEvent:e,row:a,value:a.starred})},a.element.star.setAttribute("title",t.localize(a.starred?"starred":"notStarred",{elementType:"Grid"})),a.starred?a.element.star.classList.add("starred"):a.element.star.classList.remove("starred"),i()}else d.innerHTML!==l&&(d.innerHTML=l);if(a.element.toggleDetailButton=e.querySelector("button"),a.element.toggleDetailButton.setAttribute("title",t.localize(a.showDetail?"collapseRow":"expandRow",{elementType:"Grid"})),(t.rowDetail.template||t.onRowDetailInit)&&a.element.toggleDetailButton.classList.remove("smart-visibility-hidden"),a.comments&&a.comments.length>0){const e=a.comments.length;a.element.toggleDetailButton.classList.remove("smart-visibility-hidden"),t.appearance.showRowStatus?a.element.toggleDetailButton.querySelector(".comments-length")?a.element.toggleDetailButton.querySelector(".comments-length").innerHTML=e:a.element.toggleDetailButton.innerHTML+=`<div class="comments-length'>${e}</div>`:a.element.toggleDetailButton.innerHTML=`<div class="comments-length'>${e}</div>`,a.starred&&a.element.toggleDetailButton.classList.add("starred"),a.element.toggleDetailButton.classList.add("row-comments"),a.element.toggleDetailButton.setAttribute("title",t.localize(a.showDetail?"collapseRow":"expandRowComments",{value:e,elementType:"Grid"}))}else a.comments&&0===a.comments.length&&a.element.toggleDetailButton.classList.remove("row-comments");t.rowDetail.dialog.enabled&&a.element.toggleDetailButton.classList.add("row-detail")}else if(l.commandColumn)e._renderCommands();else if(t.appearance.showRowHeaderNumber&&l.rowHeaderColumn)if(a.addNewRow)d.textContent="";else{const l=l=>{if(e.cell.value)return e.cell.value;if("number"===t.appearance.autoGenerateRowLabelMode)return l.visibleIndex+1;{const e=l.visibleIndex%26,t=Math.floor(l.visibleIndex/26),a="A".charCodeAt(0),i=String.fromCharCode(a+e);let n="";for(let e=0;e<t;e++)n+="A";return n+i}};t._rowsAdded&&t._rowsAdded.indexOf(a.id)>=0?d.textContent="":d.textContent=l(a)}else if(m)if(e.removeAttribute("readonly"),t.appearance.displayLoadingIndicator&&!l.autoGenerated)d.innerHTML='<div class="smart-grid-cell-loading"></div>';else if(a._isMeasureRow)d.innerHTML=r;else switch(e.cell.template){case"checkBox":case"switchButton":case"radioButton":e._setTemplate(r,e.cell.template,d);break;case"tags":case"checklist":case"collaborator":case"updatedBy":case"createdBy":case"multiComboInput":e._setTemplate(r,e.cell.template,d);break;case"image":e._setTemplate(r,"images",d);break;case"email":e._setTemplate(r,"email",d);break;case"url":e._setTemplate(r,"url",d);break;default:e._setTemplate(r,e.cell.template,d)}else{const i=d.firstChild;if(i&&i.classList&&e.toggleButton&&l._treeColumn&&d.children[1]){const e=d.children[0],i=d.children[1].children[0],n=d.children[1].children[1].firstChild,r=d.children[1].children[2];let s="";if(l._treeColumn){if(t.grouping.enabled){let e=a.level-1;t.appearance.showRowHeaderNumber&&e--,t.rowDetail.enabled&&e--,e<-1?s="":"multipleColumns"!==t.grouping.renderMode&&(s+='<div style="width: '+(1+e)*t.grouping.groupIndent+'px;"></div>')}else for(let e=0;e<a.level;e++)s+="<div class='smart-indent'></div>";if(a.checked?n.setAttribute("checked",""):!1===a.checked?n.removeAttribute("checked"):null===a.checked&&n.setAttribute("checked","indeterminate"),a.leaf?a.allowCheck?n.classList.remove("smart-visibility-hidden"):n.classList.add("smart-visibility-hidden"):a.allowCheck?n.classList.remove("smart-hidden"):n.classList.add("smart-hidden"),!l.autoGenerated){const e=a["column_"+l.dataField];e&&e._setStyle(d)}}a.allowCheck?t.checkBoxes.visible?n.classList.remove("smart-hidden"):n.classList.add("smart-hidden"):t.checkBoxes.visible||n.classList.add("smart-hidden"),e.innerHTML=s,i.classList.add("smart-visibility-hidden"),a.leaf?i.classList.add("smart-visibility-hidden"):(i.classList.remove("smart-visibility-hidden"),a.expanded?i.setAttribute("toggled",""):i.removeAttribute("toggled","")),t.grouping.enabled&&i.classList.add("smart-hidden"),a.data.isEmpty&&i.classList.add("smart-visibility-hidden"),r.innerHTML=o,t.appearance.showTooltips?r.setAttribute("title",o):r.hasAttribute("title")&&r.removeAttribute("title")}else{const i=a["column_"+l.dataField];if(e.getAttribute("rowspan")&&(e.removeAttribute("rowspan"),e.removeAttribute("aria-rowspan"),e.style.height=""),e.getAttribute("colspan")&&(e.removeAttribute("colspan"),e.removeAttribute("aria-colspan")),i){if(i.colSpan>1){const a=t.columns.indexOf(l);let n=0;for(let e=a;e<a+i.colSpan;e++){const l=t.columns[e];l&&l.visible&&(n+=l.computedWidth)}e.style.width=n+"px",e.setAttribute("colspan",""),e.setAttribute("aria-colspan",i.colSpan),i._styleChanged=!0}let n=i.rowSpan;if(i.rowSpan>1){const l=t.rows.indexOf(a);let n=0;a.element.setAttribute("rowspan","");for(let e=l;e<=l+i.rowSpan-1;e++){const l=t.rows[e];l&&l.visible&&l.filtered&&(n+=l.cellHeight)}e.style.height=n+"px",e.setAttribute("rowspan",""),e.setAttribute("aria-rowspan",i.rowSpan),i._styleChanged=!0}else if(l.rowSpan&&!a._isMeasureRow){const s="number"==typeof l.rowSpan?l.rowSpan:l.rowSpan(r,a.visibleIndex,a.data),o=a.visibleIndex;let d=!1;for(let e=0;e<t._cellRowSpan.length;e++){const l=t._cellRowSpan[e];if(o>l[0]&&o<l[1]){d=!0;break}}if(a._rowSpan=s,s&&!d){let r=0;t._cellRowSpan.push([o,o+s,l.dataField]),t._cellRowSpan.maxSpan||(t._cellRowSpan.maxSpan=1),t._cellRowSpan.maxSpan=Math.max(s,t._cellRowSpan.maxSpan),a.element.setAttribute("rowspan","");for(let e=o;e<=o+s-1;e++){const l=t.rows[e];l&&l.visible&&l.filtered&&(r+=l.cellHeight)}e.style.height=r+"px",e.setAttribute("rowspan",""),e.setAttribute("aria-rowspan",s),i._styleChanged=!0,n=s}}1===i.colSpan&&e.hasAttribute("colspan")&&(e.style.width="",e.removeAttribute("colspan"),e.removeAttribute("aria-colspan"),i._styleChanged=!0),e.hasAttribute("rowspan")&&1===n&&(e.style.height="",e.removeAttribute("rowspan"),e.removeAttribute("aria-rowspan"),i._styleChanged=!0),d.textContent===o||l.formatFunction||(d.textContent=o),i.column.autoGenerated||i._setStyle(d),t.appearance.showTooltips?d.setAttribute("title",i.tooltip||o):d.hasAttribute("title")&&d.removeAttribute("title")}else d.textContent=o}}if(d.className!==u&&(d.className=u),!t.appearance.displayLoadingIndicator||l.autoGenerated||t.dataSource.boundHierarchy?t.appearance.displayLoadingIndicator&&l.selectionColumn?e.removeAttribute("selected"):!l.autoGenerated&&d.firstChild&&d.firstChild.classList&&d.firstChild.classList.contains("smart-grid-cell-loading")&&(d.firstChild.classList.remove("smart-grid-cell-loading"),e.removeAttribute("selected")):(a.element.removeAttribute("focus"),e.removeAttribute("selected"),d.innerHTML='<div class="smart-grid-cell-loading"></div>'),l.formatFunction&&!a.data.isEmpty&&t.isInitialized&&!a.summaryRow){const t={row:a,column:l,cell:e.cell,oldValue:e.cell.oldValue,value:r,formattedValue:o,template:null};e.cell.canNotify=!1,a.canNotify=!1;const i=Object.assign({},{background:e.cell.background,color:e.cell.color,fontSize:e.cell.fontSize,fontFamily:e.cell.fontFamily,textDecoration:e.cell.textDecoration,fontWeight:e.cell.fontWeight,fontStyle:e.cell.fontStyle});await l.formatFunction(t),d.style.background===i.background&&d.style.color===i.color&&d.style.fontSize===i.fontSize&&d.style.fontFamily===i.fontFamily&&d.style.textDecoration===i.textDecoration&&d.style.fontWeight===i.fontWeight&&d.style.fontStyle===i.fontStyle||(e.cell._styleChanged=!0,e.cell._setStyle(d)),e.cell.background===i.background&&e.cell.color===i.color&&e.cell.fontSize===i.fontSize&&e.cell.fontWeight===i.fontWeight&&e.cell.textDecoration===i.textDecoration&&e.cell.fontFamily===i.fontFamily&&e.cell.fontStyle===i.fontStyle||(e.cell._styleChanged=!0,e.cell._setStyle(d));let n=!0;if(t.value!==r&&(e.toggleButton?d.children[1].children[2].innerHTML=t.value:d.innerHTML=t.value,n=!1),null!==t.template){if(e.toggleButton){const e=d.children[1].children[2];e.innerHTML!==t.template&&(e.innerHTML=t.template)}else if(d.innerHTML!==t.template){const e=document.createElement("div");e.innerHTML=t.template,e.innerHTML!==d.innerHTML&&(d.innerHTML=t.template)}n=!1}n&&(l.cellsFormat?d.textContent=o:d.textContent=r),e.cell.canNotify=!0,a.canNotify=!0}if(!a.data.isEmpty&&t.isInitialized&&e._applyConditionalFormattingToCell(e.cell,t,d),t.grouping.enabled&&t.dataSource&&t.dataSource.groupBy.length>0&&l===t._firstVisibleColumn&&t.rowDetail.enabled&&t.rowDetail.visible&&d.querySelector("[toggle-button]")){const e=d.querySelector("[toggle-button]");e.classList.remove("smart-visibility-hidden"),e.classList.add("row-detail"),a.element.toggleDetailButton=e,a.element.toggleDetailButton.setAttribute("title",t.localize(a.showDetail?"collapseRow":"expandRow",{elementType:"Grid"})),e.onpointerdown=function(e){a.showDetail=!a.showDetail,e.stopPropagation(),e.preventDefault()}}}_autoWrap(){const e=this,t=e.firstChild,l=e.cell.grid;l.layout.allowCellsWrapShortcut&&e.hasAttribute("focus")&&e.hasAttribute("selected")&&(t.offsetWidth<t.scrollWidth?e._popupCellContent(t.innerHTML,e.cell):l._cellContentPopup&&l._cellContentPopup.remove())}_popupCellContent(e,t){const l=this,a=t.grid;let i=a._cellContentPopup;if(!a._cellContentPopup){i=document.createElement("div");const t=document.createElement("span"),l=document.createElement("div"),n=document.createElement("div");i.style.minHeight="0px",i.style.minWidth="0px",i.setAttribute("theme",a.theme),i.classList.add("smart-grid-cell-content-popup"),n.appendChild(l),n.classList.add("smart-grid-text-area-container"),l.innerHTML=e,l.classList.add("smart-grid-cell-content-popup-content"),t.classList.add("smart-hidden"),t.classList.add("close-button"),t.classList.add("smart-grid-icon"),t.classList.add("smart-icon-cancel-circled"),t.onclick=function(){a._cellContentPopup.parentNode.removeChild(a._cellContentPopup)},i.classList.add("smart-grid-text-area-dialog"),i.appendChild(n),i.appendChild(t),a._cellContentPopup=i}i.querySelector(".smart-grid-cell-content-popup-content").innerHTML=e;const n=a.offset(a.$.scrollView);i.style.top=a._offsetTop(l)-n.top+"px",i.style.left=a._offsetLeft(l)-n.left+"px",i.style.width=l.offsetWidth-4+"px",a.$.scrollView.appendChild(i)}_applyConditionalFormattingToCell(e,t,l){const a=this,i=e.column.dataField,n=e.row,r=e.row.index,s=n._style;if(t._conditionalFormatting&&t._conditionalFormatting[i]){const e=t._conditionalFormatting[i][r];a.cell.canNotify=!1,n.canNotify=!1,e?(a.cell._styleChanged=!0,a.cell.background=e.background,a.cell.color=e.color,a.cell.fontFamily=e.fontFamily,a.cell.fontSize=e.fontSize,a.cell._setStyle(l)):a.cell._styleChanged||(s&&s._changed?(a.cell._styleChanged=!0,a.cell.background=s.background,a.cell.color=s.color,a.cell.fontFamily=s.fontFamily,a.cell.fontSize=s.fontSize,a.cell._setStyle(l)):(a.cell._styleChanged=!0,a.cell.background=null,a.cell.color=null,a.cell.fontFamily=null,a.cell.fontSize=null,a.cell._setStyle(l))),a.cell.canNotify=!0,n.canNotify=!0}else t._conditionalFormattingChanged&&!a.cell._styleChanged&&(a.cell.canNotify=!1,n.canNotify=!1,s&&s._changed?(a.cell._styleChanged=!0,a.cell.background=s.background,a.cell.color=s.color,a.cell.fontFamily=s.fontFamily,a.cell.fontSize=s.fontSize,a.cell._setStyle(l)):(a.cell._styleChanged=!0,a.cell.background=null,a.cell.color=null,a.cell.fontFamily=null,a.cell.fontSize=null,a.cell._setStyle(l)),a.cell.canNotify=!0,n.canNotify=!0)}_rotateCellContent(e,t,l){const a=document.createElement("span");return e.innerHTML="",a.innerHTML=l,e.appendChild(a),a.className="rotate",a.style.transform="rotate("+t.cellsRotationAngle+"deg)",this.grid._recycleRotate(e,a,t.cellsAlign,t.cellsVerticalAlign,l)}_getCellAlignment(e,t){const l=e["column_"+t.dataField],a=l&&l.verticalAlign||t.cellsVerticalAlign;let i=l&&l.align||t.cellsAlign;const n={align:"",verticalAlign:""};if(!l)return{align:"align-left",verticalAlign:"align-middle"};switch(l.grid.rightToLeft&&("left"===i?i="right":"right"===i&&(i="left")),i){case"left":n.align="align-left";break;case"center":case"middle":n.align="align-center";break;case"right":n.align="align-right"}switch(a){case"top":n.verticalAlign="align-top";break;case"center":case"middle":n.verticalAlign="align-middle";break;case"bottom":n.verticalAlign="align-bottom"}return n}template(){return""}_detach(){this.element=null,this.cell=null}onDetached(){this._detach()}});
6
+ Smart.Utilities.Assign("Grid.Cell",class{constructor(e,t){const l=this;if(l.row=e,l.column=t,l.grid=e.grid,l.rowSpan=1,l.colSpan=1,l.value=void 0,l.fontSize=null,l.fontWeight=null,l.fontFamily=null,l.fontStyle=null,l.color=null,l.background=null,l.textDecoration=null,l.tooltip=null,l.align=null,l.verticalAlign=null,l.readonly=!1,l.oldValue=void 0,l._updating=!1,l.styleChanged=!0,l.editor=null,l.template=null,l.isEditing=!1,l.canNotify=!0,l.selected=!1,l.focused=!1,l.error=!1,e._style){const t=e._style;l.color=t.color,l.background=t.background,l.fontFamily=t.fontFamily,l.fontSize=t.fontSize,l.fontStyle=t.fontStyle,l.textDecoration=t.textDecoration,l.fontWeight=t.fontWeight}return new Proxy(l,{deleteProperty:function(e,t){return delete e[t],!0},get:function(e,t){if("value"===t)return l.column.displayField?l.row.data[l.column.displayField]:l.row.data[l.column.dataField];if("editor"===t||"template"===t)return e[t]||l.column[t];if("focused"===t){if(l.grid.selection.allowCellSelection&&l.grid._selection.focusedCell&&l.grid._selection.focusedCell.id===l.row.id&&l.grid._selection.focusedCell.dataField===l.column.dataField)return!0;if(l.grid.selection.allowRowSelection&&l.grid._selection.focusedCell&&l.grid._selection.focusedCell.id===l.row.id&&l.grid._selection.focusedCell.dataField===l.column.dataField)return!0;const e=l.parent();return!!(e&&l.grid.selection.allowCellSelection&&l.grid._selection.focusedCell&&l.grid._selection.focusedCell.id===e.row.id&&l.grid._selection.focusedCell.dataField===e.column.dataField)}if("selected"===t)return!0===l.row.getProperty("selected")||!0===l.column.getProperty("selected")||!!l.grid._selection.cells["row"+l.row.id]&&l.grid._selection.cells["row"+l.row.id][l.column.dataField];if("modifiedValue"===t){l.grid._cellsUpdatedValues||(l.grid._cellsUpdatedValues=[]);const t=l.grid._cellsUpdatedValues[l.row.id+"_"+l.column.dataField];return void 0!==t?t:e.value}return e[t]},set:function(e,a,i){const n=this.get(e,a);return n===i||(e[a]=i,!("element"!==a&&"isEditing"!==a&&"oldValue"!==a&&"_updating"!==a&&"notifyFn"!==a&&!a.startsWith("_")&&"canNotify"!==a)||("error"===a||("focused"===a&&(l.grid._selection.focusedCell={id:l.row.id,dataField:l.column.dataField,value:l.value,index:l.row.index}),"colSpan"!==a&&"rowSpan"!==a||i>=0&&-1===l.grid._cellsMerge.indexOf(l)&&l.grid._cellsMerge.push(l),"row"===a||"column"===a||"grid"===a||"styleChanged"===a||("background"!==a&&"fontSize"!==a&&"fontWeight"!==a&&"fontFamily"!==a&&"textDecoration"!==a&&"color"!==a&&"fontStyle"!==a||(l.grid._cellStyles["row"+l.row.id]=!0,l.grid._cellStyles.length++,l._styleChanged=!0),"value"===a&&(void 0===l.oldValue&&(l.oldValue=n),(()=>{l.grid.dataSource.boundSource.canNotify=!1,null===i&&(l.column.allowNull||(i="number"===l.column.dataType||"int"===l.column.dataType||"float"===l.column.dataType||"integer"===l.column.dataType?0:"date"===l.column.dataType?new Date:"boolean"!==l.column.dataType&&"bool"!==t.dataType&&"")),null!==i&&i.label&&i.value?(l.row.data[l.column.displayField]=i.label,l.row.data[l.column.dataField]=i.value):(l.column.valueField&&(l.row.data[l.column.valueField]=i),l.row.data[l.column.dataField]=i);const e=l.grid.dataSource.dataItemById[l.row.id];if(e){const t=e.$.index;l.grid.dataSource&&i!==l.grid.dataSource.boundSource[t][l.column.dataField]&&(l.grid._sortedColumns&&l.grid._sortedColumns.length>0?e[l.column.dataField]=i:l.grid.dataSource.boundSource[t][l.column.dataField]=i)}l.grid.dataSource.boundSource.canNotify=!0})()),"selected"===a&&(l.grid._selection.cells["row"+l.row.id]&&(delete l.grid._selection.cells["row"+l.row.id][l.column.dataField],1===Object.getOwnPropertyNames(l.grid._selection.cells["row"+l.row.id]).length&&delete l.grid._selection.cells["row"+l.row.id]),l.grid._selection.cells["column"+l.column.dataField]&&(delete l.grid._selection.cells["column"+l.column.dataField][l.row.id],1===Object.getOwnPropertyNames(l.grid._selection.cells["column"+l.column.dataField]).length&&delete l.grid._selection.cells["column"+l.column.dataField]),i&&(l.grid._selection.cells["row"+l.row.id]||(l.grid._selection.cells["row"+l.row.id]=[]),l.grid._selection.cells["column"+l.column.dataField]||(l.grid._selection.cells["column"+l.column.dataField]=[]),l.grid._selection.cells["row"+l.row.id][l.column.dataField]=!0,l.grid._selection.cells["column"+l.column.dataField][l.row.id]=!0)),!(!l._updating&&l.canNotify&&(l.grid._recycle(),l.row.canNotify&&(l.propertyChanged&&l.propertyChanged(name.substring(1),n),0)))))))}})}setStyle(e){this.setProperties(e)}_setStyle(e){const t=this;if(t._styleChanged){if(!t.grid._cellStyles.length)return;let l="";const a={background:"background",color:"color",fontSize:"font-size",fontFamily:"font-family",fontWeight:"font-weight",fontStyle:"font-style",textDecoration:"text-decoration"},i=e=>{const i=t[e];if(""===i||null===i)return;const n=a[e];l+=`${n}: ${i};`},n=["background","color","fontSize","fontFamily","fontWeight","fontStyle","textDecoration"];for(let e=0;e<n.length;e++)i(n[e]);e.getAttribute("style")!==l&&e.setAttribute("style",l),""!==e.style.paddingBottom&&(e.style.paddingBottom=""),t._styleChanged=!1}t.selected&&(t.background||t.color)&&(e.style.background="",e.style.color="")}getFormattedValue(e,t){const l=this;if(null==e||""===e)return e;if(!t)return""+e;if(l.column._cellsCachedValues||(l.column._cellsCachedValues=[]),l.column._cellsCachedValues[""+e+t+l.column.grid.locale])return l.column._cellsCachedValues[""+e+t+l.column.grid.locale];if("date"===l.column.dataType||"datetime"===l.column.dataType||"time"===l.column.dataType){if("dateRangeInput"===l.column.editor.template){if(Array.isArray(e)){const a=l.formatDate(e[0],t)+" - "+l.formatDate(e[1],t);return l.column._cellsCachedValues[""+e+t+l.column.grid.locale]=a,a}{const a=l.formatDate(e,t)+" - "+l.formatDate(e,t);return l.column._cellsCachedValues[""+e+t+l.column.grid.locale]=a,a}}const a=l.formatDate(e,t);return l.column._cellsCachedValues[""+e+t+l.column.grid.locale]=a,a}if("int"===l.column.dataType||"int64"===l.column.dataType||"float"===l.column.dataType||"number"===l.column.dataType){const a=l.formatNumber(e,t);return l.column._cellsCachedValues[""+e+t+l.column.grid.locale]=a,a}return e}formatDate(e,t){if(!Smart.Utilities.DateTime)return e;const l=this,a=l.grid;if(l.column.formatSettings.Intl&&l.column.formatSettings.Intl.DateTimeFormat)return new Intl.DateTimeFormat(this.grid.locale,l.column.formatSettings.Intl.DateTimeFormat).format(e);!t&&l.column.formatSettings.dateFormat&&(t=l.column.formatSettings.dateFormat);try{const l=new Smart.Utilities.DateTime(e);l.calendar.locale=a.locale,a.messages[a.locale]&&a.messages[a.locale].calendar&&(a.messages[a.locale].calendar.months&&(l.calendar.months=a.messages[a.locale].calendar.months),a.messages[a.locale].calendar.days&&(l.calendar.days=a.messages[a.locale].calendar.days),void 0!==a.messages[a.locale].calendar.firstDay&&(l.calendar.firstDay=a.messages[a.locale].calendar.firstDay),void 0!==a.messages[a.locale].calendar.eras&&(l.calendar.eras=a.messages[a.locale].calendar.eras),void 0!==a.messages[a.locale].calendar.AM&&(l.calendar.AM=a.messages[a.locale].calendar.AM),void 0!==a.messages[a.locale].calendar.PM&&(l.calendar.PM=a.messages[a.locale].calendar.PM),void 0!==a.messages[a.locale].calendar["/"]&&(l.calendar["/"]=a.messages[a.locale].calendar["/"]),void 0!==a.messages[a.locale].calendar[":"]&&(l.calendar[":"]=a.messages[a.locale].calendar[":"]),l.calendar.today=a.messages[a.locale].today);let i=l.toString(t);return i!==a.messages[a.locale].today||a.showTodayDateAsString||(l.showTodayDateAsString=!1,i=l.toString(t),delete l.showTodayDateAsString),i}catch(t){return e}}formatNumber(e,t){if(!Smart.Utilities.NumberRenderer)return e;const l=this,a=l.grid;if(l.column.formatSettings.Intl&&l.column.formatSettings.Intl.NumberFormat){if(l.column.formatSettings.Intl.NumberFormat.currency&&Smart.Utilities.CurrencyFormatter){const t=void 0!==l.column.formatSettings.Intl.NumberFormat.maximumFractionDigits?l.column.formatSettings.Intl.NumberFormat.maximumFractionDigits:2,a=(new Smart.Utilities.CurrencyFormatter).format(e,{decimalPlaces:t,currency:l.column.formatSettings.Intl.NumberFormat.currency});return"accounting"===l.column.formatSettings.Intl.NumberFormat.currency.currencySign&&e<0?"("+a.replace("-","")+")":a}return l.column.formatSettings.Intl.NumberFormat.locale?new Intl.NumberFormat(l.column.formatSettings.Intl.NumberFormat.locale,l.column.formatSettings.Intl.NumberFormat).format(e):new Intl.NumberFormat(this.grid.locale,l.column.formatSettings.Intl.NumberFormat).format(e)}const i=new Smart.Utilities.NumberRenderer;if(i.localizationObject){const e=l.column.formatSettings,t=a.messages[a.locale]?a.messages[a.locale].calendar:{};e.decimalPlaces&&(i.localizationObject.decimalPlaces=e.decimalPlaces),(e.decimalSeparator||t.decimalSeparator)&&(i.localizationObject.decimalSeparator=e.decimalSeparator||t.decimalSeparator,i.localizationObject.decimalseparator=i.localizationObject.decimalSeparator),(e.thousandsSeparator||t.thousandsSeparator)&&(i.localizationObject.thousandsSeparator=e.thousandsSeparator||t.thousandsSeparator,i.localizationObject.thousandsseparator=i.localizationObject.thousandsSeparator),i.localizationObject.currencysymbol=t.currencySymbol,i.localizationObject.currencysymbolposition=t.currencySymbolPosition,e.prefix&&(i.localizationObject.currencysymbol=e.prefix),e.sufix&&(i.localizationObject.currencysymbol=e.sufix,i.localizationObject.currencysymbolposition="after")}const n=i.formatNumber(e,t);return void 0===n?e:e<0&&l.column.formatSettings.negativeWithBrackets?"("+n+")":n}refresh(){const e=this;if(e.element){const t=e.element.firstChild;e._setStyle(t)}}autoWrap(){const e=this;e.element&&e.element._autoWrap()}setProperties(e){const t=this;t._updating=!0;for(let l in e)t[l]=e[l];t._updating=!1,t.grid._recycle()}createElement(){const e=document.createElement("smart-grid-cell");return e.setAttribute("role","gridcell"),this.element=e,e._initialize(this),e}render(){this.element&&this.element._render()}parent(e){const t=this,l=t.row,a=t.column.dataField,i=t.grid;if(!i._cellsMerge.length)return null;if(t.__parentCells&&void 0!==t.__parentCells["row"+l.id+"_column_"+a])return t.__parentCells["row"+l.id+"_column_"+a];let n=i.getVisibleRows();i.paging.enabled&&"page"===i.selection.selectAllMode&&(n=n.slice(i.paging.pageIndex*i.paging.pageSize,(i.paging.pageIndex+1)*i.paging.pageSize)),t.__parentCells||(t.__parentCells=[]);for(let r=0;r<i._cellsMerge.length;r++){const o=i._cellsMerge[r];let s=[],d=[];if(s.push(o.row),o.rowspan>1){const e=n.indexOf(o.row);if(e>=0)for(let t=e;t<e+o.rowSpan;t++)n[t]&&-1===s.indexOf(n[t])&&s.push(n[t])}if(d.push(o.column.dataField),o.colspan>1){const e=i.columns.indexOf(i.columnByDataField[o.column.dataField]);for(let t=e;t<e+o.colSpan;t++)i.columns[t]&&-1===d.indexOf(i.columns[t].dataField)&&d.push(i.columns[t].dataField)}if(s.indexOf(l)>=0&&d.indexOf(a)>=0){if(e){const e={cell:o.row.getCell(o.column.dataField),rows:s,columns:d,row:o.row,column:o.column,endRow:s[s.length-1],endColumn:i.columnByDataField[d[d.length-1]]};return t.__parentCells["row"+l.id+"_column_"+a]=e,e}const n=o.row.getCell(o.column.dataField);return t.__parentCells["row"+l.id+"_column_"+a]=n,n}}return t.__parentCells["row"+l.id+"_column_"+a]=null,null}}),Smart("smart-grid-cell",class extends Smart.BaseElement{static get properties(){return{}}get hasStyleObserver(){return!1}get enableShadowDOM(){return!1}addThemeClass(){}addDefaultClass(){}get isUtilityElement(){return!0}_refresh(){const e=this;e.innerHTML="",e._initialize(e.cell)}_createToggleButton(e,t){const l=this,a=document.createElement("div"),i=document.createElement("button"),n=document.createElement("div"),r=document.createElement("div"),o=document.createElement("div"),s=document.createElement("span"),d=t.grid;t.row.expanded?i.setAttribute("toggled",""):i.removeAttribute("toggled",""),i.tabIndex=-1,l.toggleButton=i,l.checkbox=o,e.appendChild(a),e.appendChild(r),r.setAttribute("content",""),a.setAttribute("indent",""),n.setAttribute("label",""),i.setAttribute("toggle-button",""),o.setAttribute("checkbox",""),o.setAttribute("role","checkbox"),l.setAttribute("has-toggle-button",""),r.appendChild(i),r.appendChild(o),s.classList.add("smart-input"),o.appendChild(s),d.checkBoxes.visible?s.classList.remove("smart-hidden"):s.classList.add("smart-hidden"),r.appendChild(n),l.content=n}_initialize(e){const t=this,l=document.createElement("div"),a=e.column,i=e.grid;t._properties=[],t.cell=e,t.appendChild(l);let n=!1;if(a&&a._treeColumn&&i.dataSource.boundHierarchy&&(n=!0,e.row.filterRow&&(n=!1),!i.grouping.enabled&&i.dataSource.groupBy&&i.dataSource.groupBy.length>0&&(n=!1),i.grouping.enabled&&i.dataSource.groupBy&&0===i.dataSource.groupBy.length&&(n=!1)),n)return t._createToggleButton(l,e),void(t.isRendered=!0);{const e=document.createElement("div");l.appendChild(e)}t.content=l,t.isRendered=!0}_renderCommands(){const e=this,t=e.cell.grid;if(t.__cellsCommandTemplate)return e.firstChild.innerHTML=t.__cellsCommandTemplate,void t._updateCommandColumnCommandsVisibility(e.firstChild,e.cell.row);const l=t._getCommandColumnCommandsTemplate();e.firstChild.innerHTML=l,t._updateCommandColumnCommandsVisibility(e.firstChild,e.cell.row),t.__cellsCommandTemplate=l}_renderGroupCell(){const e=this,t=e.cell.grid,l=e.cell.column,a=e.cell.row;[...e.attributes].forEach((t=>e.removeAttribute(t.name))),e.setAttribute("group","");const i=l===t._firstRenderedColumn;e.style.width!==l.computedWidth+"px"&&(e.style.width=l.computedWidth+"px"),i||(t.rightToLeft?e.style.right!==l.left+"px"&&(e.style.right=l.left+"px"):e.style.left!==l.left+"px"&&(e.style.left=l.left+"px")),e.classList.contains("smart-hidden")&&e.classList.remove("smart-hidden"),l===t._firstRenderedColumn||a.summaryRow||e.classList.add("smart-hidden"),l.autoGenerated&&(e.style.width="0px");let n=a.label;const r=function(e,t,l){if(!t)return[];for(let a=0;a<t.length;a++){const i=t[a];i.$&&!1===i.$.filtered||(void 0!==i[e]&&l.push(i),i.summaryRow||(i.children||i.data&&i.data.children)&&r(e,i.children,l))}return l};if(void 0!==a.label){let o="",s=[];if(t.grouping.summaryRow.visible){const n=r(l.dataField,a.summaryRow?a.parent.data.children:a.data.children,[]),d={},c=i?l.summary.length>0?l.summary:["count"]:l.summary;d[l.dataField]=c;const m=c.length>0?t.dataSource.summarize([d],n):null;if(m)for(let a=0;a<c.length;a++){const i=c[a];a>0&&(o+=", ");let n=m[l.dataField][i];const r=l.cellsFormat;r&&(n=e.cell.getFormattedValue(n,r)),o+=t.localize(i,{value:n}),s.push(m[l.dataField][i])}}if(t.dataSource.virtualDataSourceOnExpand&&(o=""),i){const l=t.columnByDataField[a.groupDataField],i=l?l.label:"";if("advanced"===t.grouping.renderMode){if(a.summaryRow)n="<div header group-advanced><span group></span><span value></span>",o&&(n+="<div summary>",n+=o,n+="</div>");else{let e=a.label?a.label:t.localize("blankSummary");a.label||"taskStatus"!==a.groupDataField||(e="");let r="";if(l&&l.editor&&l.editor.dataSource){const t=l.editor.dataSource.find((t=>t.value===e));t&&t.color?(r=`--smart-primary: ${t.color}`,t.label&&(e=t.label)):t&&t.label&&(e=t.label)}if(a.label||"taskStatus"!==a.groupDataField||(e=t.localize("uncategorized")),"object"==typeof e&&l.cellsFormat){const t=a.getCell(l.dataField);e=t.getFormattedValue(e,l.cellsFormat)}n=`<div style="${r}" header group-advanced><span group>${i}: </span><span value>${e}</span>`,o&&t.grouping.summaryRow.inline&&(n+="<span summary>",n+=""+o,n+="</span>")}n+="</div>",e.classList.add("smart-grid-column-border-collapse")}else if("compact"===t.grouping.renderMode){if(a.summaryRow)n="<div header><span group></span><span value></span>",o&&(n+="<div summary>",n+=o,n+="</div>");else{let e=a.label;"object"==typeof e&&l.cellsFormat&&(e=a.getCell(l.dataField).getFormattedValue(e,l.cellsFormat)),n="<div header><span group>"+i+": </span><span value>"+e+"</span>",o&&t.grouping.summaryRow.inline&&(n+="<span summary>",n+=" ("+s+")",n+="</span>")}n+="</div>",e.classList.add("smart-grid-column-border-collapse")}else("basic"===t.grouping.renderMode||"multipleColumns"===t.grouping.renderMode)&&(n=a.label,"object"==typeof n&&l.cellsFormat&&(n=a.getCell(l.dataField).getFormattedValue(n,l.cellsFormat)),a.summaryRow?o&&(n+="<div summary>",n+=o,n+="</div>"):o&&t.grouping.summaryRow.inline&&(n+="<span summary>",n+=" ("+s+")",n+="</span>"),e.classList.add("smart-grid-column-border-collapse"));e.setAttribute("has-toggle-button","")}else e.removeAttribute("has-toggle-button",""),n=o}let o=e.firstChild;if(t.dataSource.boundHierarchy&&i){o.children.length<=1&&(e.innerHTML="<div></div>",o=e.firstChild,e._createToggleButton(o,e.cell),o=e.firstChild);const r=o.children[0],s=o.children[1].children[0],d=o.children[1].children[1].firstChild,c=o.children[1].children[2];r.setAttribute("indent",""),a.checked?d.setAttribute("checked",""):!1===a.checked?d.removeAttribute("checked"):null===a.checked&&d.setAttribute("checked","indeterminate"),a.leaf?s.classList.add("smart-visibility-hidden"):(s.classList.remove("smart-visibility-hidden"),a.expanded?s.setAttribute("toggled",""):s.removeAttribute("toggled",""));let m="";if(!l._treeColumn||a.summaryRow||a.filterRow?e.toggleButton.classList.add("smart-hidden"):e.toggleButton.classList.remove("smart-hidden"),l._treeColumn)if(t.grouping.enabled){let e=a.level-1;if(1+e===0)m+="",r.classList.add("smart-hidden");else{if("multipleColumns"===t.grouping.renderMode){let l=0;for(let a=0;a<t.columns.length;a++)a<1+e&&(l+=t.columns[a].computedWidth);m+='<div style="width: '+l+'px;"></div>'}else m+='<div style="width: '+(1+e)*t.grouping.groupIndent+'px;"></div>';r.classList.remove("smart-hidden")}}else for(let e=0;e<a.level;e++)m+="<div class='smart-indent'></div>";if(void 0===a.label||a.summaryRow||a.filterRow?s.classList.add("smart-hidden"):(s.classList.remove("smart-hidden"),s.style.marginLeft=""),r.innerHTML=m,c.innerHTML=n,i&&t.grouping.formatFunction){const i={row:a,column:l,cell:e.cell,value:n,template:null};t.grouping.formatFunction(i),i.value!==n?c.innerHTML=i.value:i.template&&(c.innerHTML=i.template)}t.appearance.showTooltips?c.setAttribute("title",a.label?a.label:n):c.hasAttribute("title")&&c.removeAttribute("title")}else void 0!==a.label&&t.grouping.enabled&&!i&&(o.innerHTML=n);let s="smart-label";e.style.zIndex="";const d=t.editing.addNewColumn.visible?t._addNewColumn.width-1:0;if(i){const l=t.columnByDataField[a.groupDataField];l.cellsAlign&&(s+=" align-"+l.cellsAlign),l.cellsVerticalAlign&&(s+=" align-"+l.cellsVerticalAlign),e.setAttribute("header",""),a.summaryRow||(e.style.width="calc(100% - "+d+"px)"),void 0!==a.label&&(e.style.zIndex=11)}else l===t._firstRenderedColumn&&(e.style.zIndex=4),e.setAttribute("header",""),a.summaryRow||(e.style.width="calc(100% - "+d+"px)");if(a.summaryRow&&(e.setAttribute("header",""),e.classList.add("smart-grid-column-border-collapse"),l.cellsAlign&&(s+=" align-"+l.cellsAlign),l.cellsVerticalAlign&&(s+=" align-"+l.cellsVerticalAlign)),o.className!==s&&(o.className=s),l.formatFunction){const t={row:a,column:l,cell:e.cell,value:null,template:null,group:{value:n,template:null}};l.formatFunction(t),t.group.value!==n&&(l._treeColumn?o.children[1].children[2].innerHTML=t.group.value:o.innerHTML=t.group.value),null!==t.group.template&&(o.innerHTML=t.group.template)}}_renderFilterCell(e){const t=this,l=t.cell.grid,a=t.cell.column;let i;const n=(e,t)=>{l._handleFilterMenuClick(e,t)};l._filterInfo||(l._filterInfo={},l._filterInfo.stringConditions=[{icon:"smart-icon-contains",command:n,value:"CONTAINS",label:l.localize("CONTAINS")},{icon:"smart-icon-does-not-contain",command:n,value:"DOES_NOT_CONTAIN",label:l.localize("DOES_NOT_CONTAIN")},{icon:"smart-icon-starts-with",command:n,value:"STARTS_WITH",label:l.localize("STARTS_WITH")},{icon:"smart-icon-ends-with",command:n,value:"ENDS_WITH",label:l.localize("ENDS_WITH")},{icon:"smart-icon-equals",command:n,value:"EQUAL",label:l.localize("EQUAL")},{icon:"smart-icon-delete",command:n,value:"CLEAR_FILTER",label:l.localize("CLEAR_FILTER")}],l._filterInfo.numberAndDateConditions=[{icon:"smart-icon-equals",command:n,value:"EQUAL",label:l.localize("EQUAL")},{icon:"smart-icon-not-equal",command:n,value:"NOT_EQUAL",label:l.localize("NOT_EQUAL")},{icon:"smart-icon-less-than",command:n,value:"LESS_THAN",label:l.localize("LESS_THAN")},{icon:"smart-icon-less-than-equal",command:n,value:"LESS_THAN_OR_EQUAL",label:l.localize("LESS_THAN_OR_EQUAL")},{icon:"smart-icon-greater-than",command:n,value:"GREATER_THAN",label:l.localize("GREATER_THAN")},{icon:"smart-icon-greater-than-equal",command:n,value:"GREATER_THAN_OR_EQUAL",label:l.localize("GREATER_THAN_OR_EQUAL")},{icon:"smart-icon-between",command:n,value:"RANGE",label:l.localize("RANGE")},{icon:"smart-icon-delete",command:n,value:"CLEAR_FILTER",label:l.localize("CLEAR_FILTER")}]),i="string"===a.dataType?l._filterInfo.stringConditions:l._filterInfo.numberAndDateConditions;let r="smart-icon-search";if(a._filterInfo||(a._filterInfo={condition:""}),a.filterEditor&&a.filterEditor.condition&&(a._filterInfo.condition=a.filterEditor.condition),a.filterEditor&&a.filterEditor.value&&(a._filterInfo.value=a.filterEditor.value),a._filterInfo.dataSource=i,null===a._filterInfo.condition)a._filterInfo.condition="",r="smart-icon-search";else switch(a._filterInfo.condition.toLowerCase()){case"equal":r="smart-icon-equals";break;case"starts_with":r="smart-icon-starts-with";break;case"ends_with":r="smart-icon-ends-with";break;case"not_equal":r="smart-icon-not-equal";break;case"less_than":r="smart-icon-less-than";break;case"less_than_or_equal":r="smart-icon-less-than-or-equal";break;case"greater_than":r="smart-icon-greater-than";break;case"greater_than_or_equal":r="smart-icon-greater-than-or-equal";break;case"contains":r="smart-icon-contains";break;case"does_not_contain":r="smart-icon-does-not-contain";break;case"range":r="smart-icon-between";break;default:r="smart-icon-search"}let o=`<div class="smart-filter-input-type"><i class="smart-grid-icon ${r} show"></i></div> `;if("string"===a.dataType)o+=`<input class="smart-filter-input-value" data-type="${a.dataType}" /> `,e.innerHTML=o;else if("date"===a.dataType){const i=new Smart.Utilities.DateTime;o+=`<input placeholder = "${i.expandFormat(i.calendar,a.cellsFormat||"d")}" class="smart-filter-input-value" data-type="${a.dataType}"/><div class="smart-filter-input-type"><i class="smart-grid-icon smart-icon-calendar show"></i></div>`,e.innerHTML=o,e.lastElementChild.onpointerdown=function(){l._handleFilterCalendarCellClick(t.cell)}}else if("number"===a.dataType)o+='<div class="smart-grid-cell-editor smart-filter-input-value smart-grid-number-input-cell-editor"><input class="smart-input" type="number"><div tabindex="-1" class="nav"><div tabindex="-1" class="up"></div><div tabindex="-1" class="down"></div></div></div>',e.innerHTML=o,l._handleFilterNumberCellEditor(this.cell,e);else if("boolean"===a.dataType||"bool"===a.dataType){const a=document.createElement("div");a.classList.add("smart-input"),a.classList.add("smart-grid-check-box-cell-editor"),a.classList.add("smart-filter-input-value"),e.tabIndex=0,e.style.outline="none",t.setAttribute("template","checkBox"),a.setAttribute("checked","indeterminate"),o=a.outerHTML,e.innerHTML=o,e.classList.add("align-center"),e.classList.add("smart-label"),e.onfocus=()=>{e.setAttribute("focus","")},e.onblur=()=>{e.removeAttribute("focus","")},e.onclick=e=>{e.target.classList.contains("smart-input")&&l._handleFilterCellCheckBoxClick(this.cell)}}const s=e.querySelector("input");if(s&&(e.firstElementChild.onpointerdown=function(){l._handleFilterCellIconClick(this.cell)}.bind(this),s.onfocus=function(){l._handleFilterCellFocus(this.cell)}.bind(this),s.onblur=function(){l._handleFilterCellBlur(this.cell)}.bind(this),s.onkeyup=function(e){l._handleFilterCellKeyUp(this.cell,e)}.bind(this),s.onkeydown=function(e){l._handleFilterCellKeyDown(this.cell,e)}.bind(this)),e.classList.add("smart-filter-input-container"),a._filterInfo.input=s,a._filterInfo.cell=t.cell,a._filterInfo.editor=e,a._filterInfo.value&&(s.value=a._filterInfo.value,"date"===a.dataType&&(s.value=t.cell.getFormattedValue(a._filterInfo.value,a.cellsFormat))),a.allowFilter||(s.disabled=!0),a.filterEditor)if(a.filterEditor.template){const t=a.filterEditor.template,l=document.createElement("div");a.filterTemplate instanceof HTMLTemplateElement?l.appendChild(t.content.cloneNode(!0)):t instanceof HTMLElement?l.appendChild(t):l.innerHTML=t,e.innerHTML="",e.appendChild(l),l.style.height="100%",l.style.width="100%";const i=e.querySelector("input");i&&(i.onfocus=()=>{e.setAttribute("focus","")},i.onblur=()=>{e.removeAttribute("focus","")}),a.filterEditor.onInit&&a.filterEditor.onInit(a,l)}else void 0!==a.filterEditor.min&&(s.min=a.filterEditor.min),void 0!==a.filterEditor.max&&(s.max=a.filterEditor.max),void 0!==a.filterEditor.minLength&&(s.minLength=a.filterEditor.minLength),void 0!==a.filterEditor.maxLength&&(s.maxLength=a.filterEditor.maxLength),void 0!==a.filterEditor.placeholder&&(s.placeholder=a.filterEditor.placeholder),void 0!==a.filterEditor.value&&(s.value=a.filterEditor.value),void 0!==a.filterEditor.step&&(s.step=a.filterEditor.step),void 0!==a.filterEditor.disabled&&(s.disabled=a.filterEditor.disabled),void 0!==a.filterEditor.condition&&(a._filterInfo.condition=a.filterEditor.condition),a.filterEditor.onInit&&a.filterEditor.onInit(a,e)}_setTemplate(e,t,l){const a=this,i=a.cell.grid,n=a.cell.column;let r=null;switch((!i.editing.enabled||!n.allowEdit||a.cell.readonly||"none"===i.editing.action||i.editing.enabled&&i.editing.commandColumn.visible&&i.editing.editRow!==a.cell.row)&&a.setAttribute("readonly",""),t){case"checkBox":case"radioButton":case"switchButton":r=document.createElement("span"),r.className="smart-input",e?r.setAttribute("checked",""):null===e?r.setAttribute("checked","indeterminate"):r.removeAttribute("checked"),a.setAttribute("template",a.cell.template);break;case"checklist":if(e&&e.indexOf("[")>=0&&(e=JSON.parse(e)),l.firstElementChild&&l.firstElementChild.hasAttribute("value")&&l.firstElementChild.getAttribute("value")===e.length)return a.cell._setStyle(l),void a.setAttribute("template",a.cell.template);if(e&&Array.isArray(e)&&e.length>0){const t=e.filter((e=>e.completed)).length;e=i.localize("completed",{value:t})+"/"+e.length}else e="";r=document.createElement("span"),r.innerHTML=e,a.setAttribute("template",a.cell.template),r.setAttribute("value",e.length);break;case"createdBy":case"updatedBy":{const e=a.cell.row;let o=null,s=null;if(o="createdBy"===t?e.createdBy:e.updatedBy,l.firstElementChild&&l.firstElementChild.hasAttribute("user-id")&&o===parseInt(l.firstElementChild.getAttribute("user-id")))return a.cell._setStyle(l),void a.setAttribute("template",a.cell.template);const d=document.createElement("div");d.classList.add("smart-multi-combo-input"),d.setAttribute("data-field",n.dataField),d.setAttribute("row-id",a.cell.row.id);let c="";if(null!=o&&-1!==o){s=i.users.find((e=>e.id===o));const e=s,t="string"==typeof e?e:e.name,l="string"==typeof e?null:e.color,a="string"==typeof e?null:e.image,n=document.createElement("span");a&&(n.style.backgroundImage=`url('${e.image}')`,n.className="smart-drop-down-list-selection-image"),c+=l?'<span title="'+t+'" data-item="'+t+'" style="background: '+l+"; color: "+new Smart.Color(l).getInvertedColor()+';" class="smart-truncate smart-token">'+n.outerHTML+"<span class='smart-drop-down-list-selection-label' role=\"presentation\">"+t+"</span></span>":'<span title="'+t+'" data-item="'+t+'" class="smart-truncate smart-token">'+n.outerHTML+"<span class='smart-drop-down-list-selection-label' role=\"presentation\">"+t+"</span></span>"}d.innerHTML=c;const m=document.createElement("div");m.classList.add("smart-multi-combo-input-container","tokens","smart-flex-auto"),d.classList.add("smart-flex-auto"),m.appendChild(d),r=m,r.setAttribute("user-id",o),a.setAttribute("template",a.cell.template);break}case"tags":{let t=[];if("number"==typeof e&&(e=""+e),null!==e&&(t=e.indexOf("{")>=0||"[]"===e?JSON.parse(e):e.split(",").map((e=>e.trim()))),l.firstElementChild&&l.firstElementChild.hasAttribute("value")&&n.editor._items&&l.firstElementChild.getAttribute("value")===e)return a.cell._setStyle(l),void a.setAttribute("template",a.cell.template);const o=document.createElement("div");o.classList.add("smart-multi-combo-input"),o.setAttribute("data-field",n.dataField),o.setAttribute("row-id",a.cell.row.id);let s="";if(e)for(let e=0;e<t.length;e++){const l=t[e];let a=null;if(n.editor.dataSource)if("string"==typeof l&&n.editor._items&&n.editor._items[l])a=n.editor._items[l];else for(let e=0;e<n.editor.dataSource.length;e++){const t=n.editor.dataSource[e];if(void 0!==t.value&&void 0!==l&&void 0!==l.value&&t.value===l.value){a=t,n.editor._items||(n.editor._items=[]),n.editor._items[l]=t;break}if(void 0===t.value&&t===l||void 0!==t.value&&""+t.value===l){a=t,n.editor._items||(n.editor._items=[]),n.editor._items[l]=t;break}}else a=l;if(!a)continue;const i="string"==typeof a?a:a.label,r="string"==typeof a?null:a.color,o="string"==typeof a?null:a.image;if(""===i)continue;const d=document.createElement("span");if(o&&(d.style.backgroundImage=`url('${a.image}')`,d.className="smart-drop-down-list-selection-image"),r&&n.editor.colorItems?s+='<span title="'+i+'" data-item="'+i+'" style="background: '+r+"; color: "+new Smart.Color(r).getInvertedColor()+';" class="smart-truncate smart-token">'+d.outerHTML+"<span class='smart-drop-down-list-selection-label' role=\"presentation\">"+i+"</span>":s+='<span title="'+i+'" data-item="'+i+'" class="smart-truncate smart-token">'+d.outerHTML+"<span class='smart-drop-down-list-selection-label' role=\"presentation\">"+i+"</span>",n.editor.dataSource){if(n.editor.singleSelect){s+="</span>";break}s+='<span class=\'smart-drop-down-list-unselect-button\' role="button" aria-label="Unselect"></span></span>'}else s+="</span>"}if(o.innerHTML=s,o.onpointerdown=e=>{if(e.target&&"#text"!==e.target.nodeName&&e.target.classList.contains("smart-drop-down-list-unselect-button")){const l=e.target.parentNode.getAttribute("data-item");if(t[0]&&t[0].label){const r=t.map((e=>e.value)).indexOf(l);r>=0&&(t.splice(r,1),i.setCellValue(a.cell.row.id,n.dataField,JSON.stringify(t)),e.preventDefault(),e.stopPropagation())}else t.indexOf(l)>=0&&(t.splice(t.indexOf(l),1),i.setCellValue(a.cell.row.id,n.dataField,t.join(", ")),e.preventDefault(),e.stopPropagation())}else if(e.target.classList.contains("smart-drop-down-list-selection-label")){if(i.editing.enabled){const t=e.target.parentElement.parentElement,l=t.getAttribute("data-field"),a=t.getAttribute("row-id");i.beginEdit(a,l)}e.stopPropagation(),e.preventDefault()}},!n.cellsWrap&&n.allowEdit&&i.editing.enabled){const e=document.createElement("span");e.classList.add("smart-arrow-down","arrowbtn");const t=document.createElement("div");t.classList.add("smart-multi-combo-input-container","tokens","smart-flex-auto"),o.classList.add("smart-flex-auto"),i.rightToLeft&&(o.style.direction="rtl"),t.appendChild(o),"input"!==n.editor.template&&t.appendChild(e),r=t,e.onpointerdown=e=>{if(i.editing.enabled){const t=e.target.previousElementSibling,l=t.getAttribute("data-field"),a=t.closest("smart-grid-row").getAttribute("data-id");i.beginEdit(a,l)}e.stopPropagation(),e.preventDefault()}}else n.cellsWrap||n.allowEdit||o.classList.add("smart-flex-auto"),r=o;a.setAttribute("template",a.cell.template),r.setAttribute("value",e);break}case"dropDownList":case"dropdownlist":case"list":{const t=document.createElement("div");if(l.firstElementChild&&l.firstElementChild.hasAttribute("value")&&l.firstElementChild.getAttribute("value")===e)return a.cell._setStyle(l),void a.setAttribute("template",a.cell.template);if(t.innerHTML='<span class="smart-truncate">'+e+"</span>",n.allowEdit&&i.editing.enabled){const e=document.createElement("span");e.classList.add("smart-arrow-down","arrowbtn");const l=document.createElement("div");l.classList.add("smart-multi-combo-input-container","tokens","smart-flex-auto"),t.classList.add("smart-flex-auto"),l.appendChild(t),l.appendChild(e),l.classList.add(a.cell.template.toLowerCase()),r=l,e.onpointerdown=e=>{if(i.editing.enabled){const t=e.target.closest("smart-grid-cell"),l=e.target.closest("smart-grid-row"),n=t.getAttribute("data-field"),r=l.getAttribute("data-id");if(i.beginEdit(r,n),a.cell.column.editor&&a.cell.column.editor.instance){const e=a.cell.column.editor,t=e.instance.element;!e.autoOpen&&t.open?t.open():!e.autoOpen&&t.firstElementChild&&t.firstElementChild.open&&setTimeout((()=>{t.firstElementChild.open()}),250)}}e.stopPropagation(),e.preventDefault()}}else r=t;a.setAttribute("template",a.cell.template.toLowerCase()),r.setAttribute("value",e);break}case"password":l.innerHTML=e?'<span class="smart-truncate">'+e.replace(/./g,"*")+"</span>":"",a.setAttribute("template",a.cell.template);break;case"color":l.innerHTML=`<span style="left: calc(50% - 12px); top: calc(50% - 12px); position: absolute; border-radius: 50%; width: 24px; height: 24px; display: block; background:${e};"></span>`,a.setAttribute("template",a.cell.template);break;case"autoNumber":r=document.createElement("span"),r.innerHTML=1+a.cell.row.visibleIndex,a.setAttribute("template",a.cell.template);break;case"createdDate":case"createdTime":l.innerHTML='<span class="smart-truncate">'+a.cell.getFormattedValue(a.cell.row.createdDate,"d")+" "+a.cell.getFormattedValue(a.cell.row.createdDate,"t")+"</span>",a.cell._setStyle(l),a.setAttribute("template",a.cell.template);break;case"updatedDate":case"updatedTime":a.cell.row.updatedDate?l.innerHTML='<span class="smart-truncate">'+a.cell.getFormattedValue(a.cell.row.updatedDate,"d")+" "+a.cell.getFormattedValue(a.cell.row.updatedDate,"t")+"</span>":l.innerHTML="",a.cell._setStyle(l),a.setAttribute("template",a.cell.template);break;case"progress":{const t=e?parseInt(100*e)+"%":"0%";if(l.firstElementChild&&l.firstElementChild.hasAttribute("value")&&t===l.firstElementChild.getAttribute("value"))return a.cell._setStyle(l),void a.setAttribute("template",a.cell.template);const i="white",n=["#D50000","#F4511E","#F6BF26","#33B679"];let r=n[0];r=e<.25?n[0]:e<.5?n[1]:e<.75?n[2]:n[3],l.innerHTML='<div value="'+t+'" style="padding-left: 5px; padding-right: 5px; display: grid; grid-template-columns: 1fr auto"><div style="height: 100%; display: flex; align-items: center; width: '+t+';"><div title="'+t+'" style="width: 100%; height: 4px; background: '+r+"; color: "+i+';" class="smart-truncate smart-token"></div></div><span>'+t+"</span></div>",a.setAttribute("template",a.cell.template);break}case"images":{if(""===e)return l.innerHTML="",a.cell._setStyle(l),void a.setAttribute("template",a.cell.template);if(l.firstElementChild&&l.firstElementChild.hasAttribute("value")){const t=l.firstElementChild.getAttribute("value");if(e&&e.indexOf(t)>=0)return a.cell._setStyle(l),a.setAttribute("template",a.cell.template),void(l.firstElementChild.evaluateScroll&&l.firstElementChild.evaluateScroll());if(t&&e&&Array.isArray(e)&&e[0]&&e[0].value&&t.length===e[0].value.length)return a.cell._setStyle(l),void a.setAttribute("template",a.cell.template)}const t=document.createElement("div"),n=document.createElement("div");t.classList.add("container"),n.classList.add("images");let o=e;if("string"==typeof o&&(o.indexOf("http")>=0||o.indexOf("base64")>=0)){let e="";if(o)try{e=JSON.parse(o)}catch(e){console.log(e)}o=e}if("string"==typeof o&&(o.indexOf("[{")>=0||o.indexOf("}]")>=0)){let e="";if(o)try{e=JSON.parse(o)}catch(e){console.log(e)}o=e}Array.isArray(o)&&o.forEach((e=>{const l=document.createElement("img");l.src=e.value,l.title=e.label,t.appendChild(l)}));const s=document.createElement("div");s.classList.add("smart-arrow-left","arrowbtn","smart-hidden");const d=document.createElement("div");if(d.classList.add("smart-arrow-right","arrowbtn"),n.onpointerdown=e=>{if("IMG"===e.target.nodeName)i._openImagePreviewDialog(e.target),e.stopPropagation(),e.preventDefault();else if("DIV"===e.target.nodeName&&e.target.classList.contains("arrowbtn")){let l=parseInt(t.style.marginLeft);isNaN(l)&&(l=0);const i=s===e.target,n=t.scrollWidth-a.offsetWidth+30;t.style.marginLeft=i?Math.min(0,l+25)+"px":Math.max(-n,l-25)+"px",l=parseInt(t.style.marginLeft),0===l?s.classList.add("smart-hidden"):s.classList.remove("smart-hidden"),e.stopPropagation(),e.preventDefault()}},t.children.length){n.appendChild(t);const e=25*o.length;e-a.offsetWidth+30>30&&(n.appendChild(s),n.appendChild(d)),n.evaluateScroll=()=>{const l=e-a.offsetWidth+30;t.style.marginLeft="0px",s.classList.add("smart-hidden"),l<0?d.classList.add("smart-hidden"):d.classList.remove("smart-hidden"),l>30&&(n.appendChild(s),n.appendChild(d))},r=n}else r=document.createElement("div");a.setAttribute("template",a.cell.template),e&&e[0]&&e[0].value?r.setAttribute("value",e[0].value):o&&o[0]&&o[0].label?r.setAttribute("value",o[0].label):r.setAttribute("value",e);break}case"email":Smart.Validator&&(r=document.createElement("span"),Smart.Validator.email(e)?r.innerHTML=e:(r.className="url",r.innerHTML='<a href="mailto:'+e+'" target="_blank" contenteditable="false" rel="noreferrer noopener">'+e+"</a>",r.firstElementChild.onpointerdown=e=>{e.stopPropagation(),e.preventDefault(),r.firstElementChild.click()})),a.setAttribute("template",a.cell.template);break;case"url":Smart.Validator&&(r=document.createElement("span"),r.className="url",Smart.Validator.url(e)?r.innerHTML='<a href="https://'+e+'" target="_blank" contenteditable="false" rel="noreferrer noopener">'+e+"</a>":r.innerHTML='<a href="'+e+'" target="_blank" contenteditable="false" rel="noreferrer noopener">'+e+"</a>",r.firstElementChild.onpointerdown=e=>{e.stopPropagation(),e.preventDefault(),r.firstElementChild.click()}),a.setAttribute("template",a.cell.template);break;default:{let t=null;a.setAttribute("template","");const r=a.cell.row,o=l;let s=a.cell.getFormattedValue(e,n.cellsFormat);if(o.style.lineHeight="","function"==typeof a.cell.template){const t={row:r,column:n,cell:a.cell,oldValue:a.cell.oldValue,value:e,template:null};let l=o.querySelector(".smart-grid-cell-template");l&&l.getAttribute("column")===n.dataField?t.template=l.firstElementChild:l=null,a.formattedValue!==s&&(l=null),a.cell.canNotify=!1,r.canNotify=!1;const i=Object.assign({},{background:a.cell.background,color:a.cell.color,fontSize:a.cell.fontSize,fontFamily:a.cell.fontFamily,fontWeight:a.cell.fontWeight,textDecoration:a.cell.textDecoration,fontStyle:a.cell.fontStyle});if(a.cell.template(t),!l&&t.template)if(t.template instanceof HTMLElement){const e=document.createElement("div");e.classList.add("smart-grid-cell-template"),e.setAttribute("column",n.dataField),o.innerHTML="",o.appendChild(e),e.appendChild(t.template)}else o.innerHTML='<div column="'+n.dataField+'" class="smart-grid-cell-template">'+t.template+"</div>";else l||null!==t.template||(o.innerHTML=e);o.style.background===i.background&&o.style.color===i.color&&o.style.fontSize===i.fontSize&&o.style.fontWeight===i.fontWeight&&o.style.fontStyle===i.fontStyle||(a.cell._styleChanged=!0,a.cell._setStyle(o)),a.cell.background!==i.background||a.cell.color!==i.color||a.cell.fontSize!==i.fontSize||a.cell.fontWeight!==i.fontWeight||a.cell.fontStyle!==i.fontStyle?(a.cell._styleChanged=!0,a.cell._setStyle(o)):a.cell._styleChanged&&a.cell._setStyle(o),void 0===a.cell.oldValue&&(a.cell.oldValue=e),a.formattedValue=s,a.cell.canNotify=!0,r.canNotify=!0}else{if(""!==o.textContent&&(o.textContent=""),a.cell.template instanceof HTMLTemplateElement)t=a.cell.template;else if(a.cell.template instanceof HTMLElement){const t=a.cell.template.innerHTML.replace(/{{value}}/gi,e).replace(/{{id}}/gi,r.id);o.innerHTML!==t&&(o.innerHTML=t)}if(a.cell.template.startsWith&&a.cell.template.startsWith("#")&&(t=document.querySelector(a.cell.template)),t){let l=t.content.cloneNode(!0).firstElementChild;const d=e;if(e=(e=(e=e.toString()).replace(/'/gi,"\\'")).replace(/"/gi,'\\"'),l.querySelector("[smart-if]")){const t=l.querySelector("[smart-else]"),a=l.querySelectorAll("[smart-if]");let i=!1;for(let t=0;t<a.length;t++){const r=a[t],o=r.getAttribute("smart-if").split(" "),s=o[1].trim();let c=o[2].trim(),m=e;switch("Today"===c&&(c=new Date),"date"===n.dataType&&(e=new Date(d).getTime(),c=new Date(c).getTime()),s){case">":e>parseFloat(c)&&(l=r,i=!0);break;case">=":e>=parseFloat(c)&&(l=r,i=!0);break;case"=":case"==":case"===":e===c&&(l=r,i=!0);break;case"<":e<parseFloat(c)&&(l=r,i=!0);break;case"<=":e<=parseFloat(c)&&(l=r,i=!0)}if(e=m,i)break}!i&&t&&(l=t)}let c=l.outerHTML.replace(/{{value}}/gi,e).replace(/{{id}}/gi,r.id);for(c.indexOf("{{value=")>=0&&(e?(c=c.substring(0,c.indexOf("{{value="))+e+c.substring(c.indexOf("}")),c=c.replace(/}/gi,""),c=c.replace(/{/gi,"")):(c=c.replace(/{{value=/gi,""),c=c.replace(/}}/gi,"")));c.indexOf("{{value::")>=0;){const t=c.indexOf("{{value::"),l=c.substring(t+9,c.indexOf("}}")),i=a.cell.getFormattedValue(e,l);c=c.replace(`{{value::${l}}}`,i)}if(n._treeColumn){const e=o.firstChild;if(e&&e.classList&&a.toggleButton&&n._treeColumn&&o.children[1]){const e=o.children[0],t=o.children[1].children[0],l=o.children[1].children[1].firstChild,a=o.children[1].children[2];let n="";if(i.grouping.enabled){let e=r.level-1;"multipleColumns"!==i.grouping.renderMode&&(n+='<div style="width: '+(1+e)*i.grouping.groupIndent+'px;"></div>')}else for(let e=0;e<r.level;e++)n+="<div class='smart-indent'></div>";r.checked?l.setAttribute("checked",""):!1===r.checked?l.removeAttribute("checked"):null===r.checked&&l.setAttribute("checked","indeterminate"),r.leaf?r.allowCheck?l.classList.remove("smart-visibility-hidden"):l.classList.add("smart-visibility-hidden"):r.allowCheck?l.classList.remove("smart-hidden"):l.classList.add("smart-hidden"),r.allowCheck?i.checkBoxes.visible?l.classList.remove("smart-hidden"):l.classList.add("smart-hidden"):i.checkBoxes.visible||l.classList.add("smart-hidden"),e.innerHTML=n,t.classList.add("smart-visibility-hidden"),r.leaf?t.classList.add("smart-visibility-hidden"):(t.classList.remove("smart-visibility-hidden"),r.expanded?t.setAttribute("toggled",""):t.removeAttribute("toggled","")),r.data.isEmpty&&t.classList.add("smart-visibility-hidden"),a.innerHTML=c,i.appearance.showTooltips?a.setAttribute("title",s):a.hasAttribute("title")&&a.removeAttribute("title")}}else o.innerHTML!==c&&(o.innerHTML=c)}else if("string"==typeof a.cell.template){""===e&&(e="&nbsp;");const t=a.cell.template.replace(/{{value}}/gi,e).replace(/{{id}}/gi,r.id);o.innerHTML!==t&&(o.innerHTML=t)}}if("auto"===a.cell.row.height||i.layout.allowCellsWrap||"auto"===i.layout.rowHeight){const e=o.querySelector(".smart-grid-cell-template");if(e){r._templatesHeight||(r._templatesHeight=[]);const t=(e,t)=>{if(e){const l=i.rowById[e.getAttribute("data-id")];l._templatesHeight[n.dataField]=t,l._isDirty=!0,l.autoSize(),delete l._isDirty}};if(e.firstElementChild){if(!e.firstElementChild.resizeObserver){const l=new ResizeObserver((function(){const e=this.target.closest("smart-grid-row");this.target.offsetHeight&&(t(e,this.target.offsetHeight),i.$.scrollView.scrollTop=0)}));e.firstElementChild.resizeObserver=l,l.target=e.firstElementChild,l.observe(e.firstElementChild)}e.firstElementChild.onblur=e.firstElementChild.onchange=function(){const e=this.closest("smart-grid-row");t(e,this.offsetHeight)}}else{const l=this.closest("smart-grid-row");t(l,e.offsetHeight)}}}}}if(r)return l.innerHTML="",l.appendChild(r),a.cell._setStyle(l),r}async _render(){const e=this,t=e.cell.grid,l=e.cell.column,a=e.cell.row,i=a.data,n=a._isMeasureRow?null:l.cellsFormat,r=t.grouping.enabled&&t.dataSource.groupBy.length>0;if(!1===t._recycleValues&&!r)return e.cell.selected?(e.setAttribute("selected",""),e.setAttribute("aria-selected",!0)):(e.removeAttribute("selected"),e.removeAttribute("aria-selected")),e.classList.contains("smart-hidden")&&e.classList.remove("smart-hidden"),void(e.cell.focused?(t.selection.allowCellSelection&&e.setAttribute("focus",""),a.element.setAttribute("focus",""),a.element.toggleDetailButton&&(a.element.toggleDetailButton.classList.remove("smart-visibility-hidden"),a.element.star&&a.element.star.classList.add("smart-hidden")),e.cell.id||(e.id="gridcell_"+Math.floor(65536*(1+Math.random())).toString(16).substring(1)),t.setAttribute("aria-activedescendant",e.id)):(e.removeAttribute("focus"),a.element.star&&t._selection.focusedCell&&t._selection.focusedCell.id!==a.id&&a.element.star.classList.remove("smart-hidden")));if(t.grouping.enabled&&t.dataSource.groupBy.length>0){if(void 0!==a.label){let t=l.displayField?i[l.displayField]:i[l.dataField];return e._renderGroupCell(t),void(a.summaryRow&&(e.cell.canNotify=!1,a.canNotify=!1,e.cell._styleChanged=!0,e.cell.background=null,e.cell.color=null,e.cell.fontFamily=null,e.cell.fontSize=null,e.cell.element&&e.cell.element.firstElementChild&&e.cell._setStyle(e.cell.element.firstElementChild),e.cell.canNotify=!0,a.canNotify=!0))}e.style.zIndex=""}else if(t.appearance.showTreeRowHeader&&t.rowHierarchy&&!1===a.leaf&&!l.autoGenerated){let t=i[a.groupDataField];return a.label=t,void e._renderGroupCell(t)}if(t.appearance.showTreeRowHeader&&e.removeAttribute("header"),t.grouping.enabled&&t.dataSource.groupBy.length>0&&e.toggleButton&&(e.toggleButton.classList.remove("smart-hidden"),e.toggleButton.classList.remove("smart-visibility-hidden"),e.toggleButton.style.marginLeft="",l._treeColumn&&t.grouping.enabled&&t.grouping.toggleButtonIndent>0&&(e.toggleButton.style.marginLeft=a.level*(t.grouping.toggleButtonIndent-t.grouping.groupIndent)+"px")),t.grouping.enabled&&t.dataSource.groupBy.length>0&&(e.removeAttribute("header"),e.removeAttribute("group")),!l.visible)return void(e.style.width="0px");t.appearance.showSortColumnBackground&&t.sorting.maintainSort&&!a.summaryRow?l.sorted?e.setAttribute("sort",""):e.removeAttribute("sort"):l.sorted&&e.hasAttribute("sort")&&e.removeAttribute("sort"),t.appearance.showFilterColumnBackground?l.filtered?e.setAttribute("filter",""):e.removeAttribute("filter"):l.filtered&&e.hasAttribute("filter")&&e.removeAttribute("filter"),t.dataSource.boundHierarchy&&e.hasAttribute("has-toggle-button")&&!l._treeColumn&&e.removeAttribute("has-toggle-button");let o=l.displayField?i[l.displayField]:i[l.dataField];null!==o||l.allowNull||("int"!==l.dataType&&"number"!==l.dataType||(o=0),"string"===l.dataType&&(o=""),"boolean"!==l.dataType&&"bool"!==l.dataType||(o=!1),"date"===l.dataType&&(o=new Date)),t.grouping.enabled&&"multipleColumns"===t.grouping.renderMode&&t.dataSource&&t.dataSource.groupBy.length>0&&t.dataSource.groupBy.indexOf(l.dataField)>=0&&(o="",e.setAttribute("header","")),e.removeAttribute("highlight"),t.highlighted!==a.id||l.autoGenerated||e.setAttribute("highlight",""),t.editing.addNewRow.visible&&e.classList.remove("smart-add-new-row");const s=t=>t?t.startsWith("off_")?(e.classList.remove(t.substring(4)),!1):(e.classList.add(t),e.setAttribute("customCSS",t),!0):(e.setAttribute("highlight",""),!0);if((t.highlightedRows||t.highlightedCells)&&e.hasAttribute("customCSS")){const t=e.getAttribute("customCSS");e.removeAttribute("customCSS"),e.classList.remove(t)}if(l.highlight&&!a.summaryRow&&(s(l._highlightCSS||""),e.setAttribute("highlight-data-field",l.dataField)),t.highlightedCells&&t.highlightedCells[a.id]&&!a.summaryRow&&void 0!==t.highlightedCells[a.id][l.dataField]&&s(t.highlightedCells[a.id][l.dataField]),t.highlightedRows&&!a.summaryRow&&void 0!==t.highlightedRows[a.id]&&s(t.highlightedRows[a.id]),t.editing.batch){if(t._cellsUpdatedValues){e.removeAttribute("update");const i=t._cellsUpdatedValues[a.id+"_"+l.dataField];void 0!==i&&(e.setAttribute("update",""),o=i)}t._rowsDeleted&&(t._rowsDeleted.indexOf(a.id)>=0?e.setAttribute("delete",""):e.removeAttribute("delete")),t._rowsAdded&&(t._rowsAdded.indexOf(a.id)>=0?e.setAttribute("add",""):e.removeAttribute("add"))}!t.onCellValue||l.rowHeaderColumn||l.selectionColumn||(e.cell._updating=!0,t.onCellValue(e.cell,t),e.cell._updating=!1,o=e.cell.value),void 0===o&&(o="");let d=o;n?d=e.cell.getFormattedValue(o,n):l.formatSettings&&l.formatSettings.Intl&&(d=e.cell.getFormattedValue(o,l.formatSettings.Intl));const c=e.firstChild;if(e.content=c,l._isDirty&&(c.innerHTML=""),c.hasAttribute("data-field")&&c.getAttribute("data-field")!==l.dataField&&(c.innerHTML=""),c.setAttribute("data-field",l.dataField),t.onCellRender||l.onCellRender)if(l._cellsCachedValues||(l._cellsCachedValues=[]),l._cellsCachedValues[a.index]){const t=l._cellsCachedValues[a.index];c.firstChild&&c.removeChild(c.firstChild),e.cell.template instanceof HTMLTemplateElement||"string"==typeof e.cell.template?c.appendChild(t):c.innerHTML=t.innerHTML}else{if(e.cell._updating=!0,t.onCellRender?t.onCellRender(e.cell,a.visibleIndex,l.dataField,a.data,e):l.onCellRender(e.cell,a.visibleIndex,l.dataField,a.data,e),e.cell._updating=!1,e.cell.template!==l.template){const t=document.createElement("div");return c.firstChild&&c.removeChild(c.firstChild),e.cell.template instanceof HTMLTemplateElement?(t.appendChild(e.cell.template.content.cloneNode(!0)),l._cellsCachedValues[a.index]=t):t.appendChild(e.cell.template),void c.appendChild(t)}e.cell.value!==o&&(d=e.cell.value)}if(l.autoGenerated||e.setAttribute("data-field",l.dataField),e.cell.focused?(t.selection.allowCellSelection&&e.setAttribute("focus",""),a.element.setAttribute("focus",""),a.element.toggleDetailButton&&(a.element.toggleDetailButton.classList.remove("smart-visibility-hidden"),a.element.star&&a.element.star.classList.add("smart-hidden")),e.cell.id||(e.id="gridcell_"+Math.floor(65536*(1+Math.random())).toString(16).substring(1)),t.setAttribute("aria-activedescendant",e.id)):e.removeAttribute("focus"),e.cell.selected?(e.setAttribute("selected",""),e.setAttribute("aria-selected",!0)):(e.removeAttribute("selected"),e.removeAttribute("aria-selected")),t.dragDrop&&t.dragDrop.row===a?e.classList.add("dragged"):e.classList.remove("dragged"),e._classNames)for(let t=0;t<e._classNames.length;t++)e.classList.remove(e._classNames[t]);if(a._classNames){if(e._rowClassNames)for(let t=0;t<e._rowClassNames.length;t++)e.classList.remove(e._rowClassNames[t]);for(let t=0;t<a._classNames.length;t++)e.classList.add(a._classNames[t]);e._rowClassNames=a._classNames}if(t.onCellClass){const i=t.onCellClass(a.visibleIndex,l.dataField,o,a.data,a,t);if(e.___classNames)for(let t=0;t<e.___classNames.length;t++)e.classList.remove(e.___classNames[t]);if(i){const t=i.trim().split(" ");for(let l=0;l<t.length;l++)e.classList.add(t[l]);e.___classNames=t}}if(l.cellsClassName)if("string"==typeof l.cellsClassName){const t=l.cellsClassName.trim().split(" ");for(let l=0;l<t.length;l++)e.classList.add(t[l]);e._classNames=t}else{const t=l.cellsClassName(a.visibleIndex,l.dataField,o,a.data,a);if(e._classNames)for(let t=0;t<e._classNames.length;t++)e.classList.remove(e._classNames[t]);if(t){const l=t.trim().split(" ");for(let t=0;t<l.length;t++)e.classList.add(l[t]);e._classNames=l}}if(l.cellsCSSRules){if(e.__classNames)for(let t=0;t<e.__classNames.length;t++)e.classList.remove(e.__classNames[t]);const i=Object.keys(l.cellsCSSRules);for(let n=0;n<i.length;n++){let r=i[n];const s={index:a.visibleIndex,value:o,dataField:l.dataField,row:a,api:t};l.cellsCSSRules[r](s)&&(e.classList.add(r),e.__classNames=[r])}}t.rowDetail.enabled&&a.showDetail&&!1===t.rowDetail.dialog.enabled&&(e.style.height=a.cellHeight+"px",e.style.lineHeight=a.cellHeight+"px"),a.expanded&&a.expandHeight>0&&(e.style.height=a.cellHeight+"px",e.style.lineHeight=a.cellHeight+"px");const m=e._getCellAlignment(a,l),u=""!==e.cell.template&&t.isInitialized&&!a._isMeasureRow;let g="";if(m.align&&(g+=m.align+" "),m.verticalAlign&&(g+=m.verticalAlign+" "),l.cellsWrap&&(g+="wrap "),g+="smart-label",e.style.width!==l.computedWidth+"px"){const a=t._isLastVisibleColumn(l);l.autoGenerated||a?e.style.width=l.computedWidth+"px":e.style.width=l.computedWidth-t._columnGap+"px"}l===t._firstVisibleColumn?e.classList.add("smart-grid-column-border-collapse"):e.classList.remove("smart-grid-column-border-collapse"),t.grouping.enabled&&"multipleColumns"===t.grouping.renderMode&&t.dataSource&&t.dataSource.groupBy.length>0&&t.dataSource.groupBy.indexOf(l.dataField)>=0&&e.classList.add("smart-grid-column-border-collapse"),t._columnGap>0&&t.appearance.showColumnLines&&e.classList.add("smart-grid-column-border"),t._rowGap>0&&e.classList.add("smart-grid-row-border"),t.appearance.showColumnLines?e.classList.remove("smart-grid-vertical-border-collapse"):e.classList.add("smart-grid-vertical-border-collapse"),t.appearance.showRowLines?e.classList.remove("smart-grid-horizontal-border-collapse"):e.classList.add("smart-grid-horizontal-border-collapse");let p=l.left;if(t.rightToLeft?e.style.right!==p+"px"&&(e.style.right=p+"px"):e.style.left!==p+"px"&&(e.style.left=p+"px"),e.classList.contains("smart-hidden")&&e.classList.remove("smart-hidden"),e.hasAttribute("template")&&e.removeAttribute("template"),e.hasAttribute("freeze")&&e.removeAttribute("freeze"),e.hasAttribute("detail")&&e.removeAttribute("detail"),e.hasAttribute("error")&&e.removeAttribute("error"),e.cell.error&&e.setAttribute("error",e.cell.error),a.filterRow?e.classList.add("smart-grid-filter-row-cell"):a.summaryRow?e.classList.add("smart-grid-summary-row-cell"):(l.freeze||a.freeze)&&(l.selectionColumn&&(e.setAttribute("checkbox",""),g+=" smart-input",l.grid.selection.checkBoxes.enabled&&l.grid.selection.checkBoxes.autoShow?e.setAttribute("auto-show",""):e.removeAttribute("auto-show")),(l.rowHeaderColumn||l.selectionColumn)&&(e.setAttribute("header",""),e.setAttribute("role","rowheader")),l.rowDetailColumn&&(e.setAttribute("header",""),e.setAttribute("detail",""),e.setAttribute("has-toggle-button",""),e.classList.add("smart-grid-column-border-collapse")),l.commandColumn&&e.setAttribute("command",""),t.appearance.showFrozenColumnBackground&&l.freeze&&e.setAttribute("freeze",""),t.appearance.showFrozenRowBackground&&a.freeze&&e.setAttribute("freeze","")),l.cellsRotationAngle){if(!e._rotateCellContent(c,l,o))return}else if(a.filterRow){if(!l.toggleColumn&&!l.rowHeaderColumn)return t.grouping.enabled&&t.dataSource&&t.dataSource.groupBy.length>0&&(l._filterEditorInitialized=!1),l._filterEditorInitialized||l.autoGenerated?void("boolean"===l.dataType||"bool"===l.dataType?e.setAttribute("template","checkBox"):e.removeAttribute("template")):(l._filterEditorInitialized=!0,void e._renderFilterCell(c));c.innerHTML=""}else if(a.summaryRow){if(l.toggleColumn||l.rowHeaderColumn)c.innerHTML="";else if(l.autoGenerated&&(c.innerHTML=""),t.dataSource.boundHierarchy&&e.hasAttribute("has-toggle-button")&&e.removeAttribute("has-toggle-button"),!l.autoGenerated){if(l.summary.length>0&&t._summaryItems){const a=t._summaryItems[l.dataField],i=[];for(let n in a){const r=l.cellsFormat;let o=a[n];r&&r.indexOf("p")>=0&&"count"===n?o=a[n]:r&&"date"!==l.dataType&&(o=e.cell.getFormattedValue(o,r)),i.push(t.localize(n,{value:o}))}const n=i.join(", "),r=t.summaryRow.editing?'<span class="smart-arrow-down"></span>':"";let o=`<div title = "${n}" class="smart-truncate summary-value" > <span class="label">${n}</span>${r}</div> `;if(t.columns[0].dataField===l.dataField&&i.length<3){const e=t._recyclingRows.length;o=`<div title = "${n}" class="smart-truncate summary-value" > <span style = "justify-content: flex-start" class="smart-truncate summary-value" > ${1===e?t.localize("oneRow"):t.localize("rows",{value:e})}</span> <span class="label">${n}</span>${r}</div> `}c.innerHTML!==o&&(c.innerHTML=o)}else if(t.summaryRow.editing&&l.allowSummary)if(t.columns[0].dataField===l.dataField){const e=t._recyclingRows.length,l=`<div class="smart-truncate summary-value" ><span style="justify-content: flex-start" class="smart-truncate summary-value">${1===e?t.localize("oneRow"):t.localize("rows",{value:e})}</span><span class="smart-summary-placeholder label">${t.localize("summary")}</span><span class="smart-arrow-down"></span></div> `;c.innerHTML!==l&&(c.innerHTML=l)}else{const e=`<div class="smart-truncate summary-value" ><span class="smart-summary-placeholder label">${t.localize("summary")}</span><span class="smart-arrow-down"></span></div> `;c.innerHTML!==e&&(c.innerHTML=e)}t.summaryRow.editing&&l.allowSummary&&(t._selection&&t._selection.focusedCell&&t._selection.focusedCell.dataField===l.dataField?c.firstElementChild.setAttribute("has-summary",""):c.firstElementChild.removeAttribute("has-summary"),c.onpointerdown=e=>{e.preventDefault(),e.stopPropagation(),c._clickTarget=e.target},c.onpointerup=l=>{c._clickTarget===l.target&&(l.preventDefault(),l.stopPropagation(),t._summaryRowDialog&&t._summaryRowDialog.classList.contains("open")&&t._summaryRowDialog.dataField===e.cell.column.dataField?t._summaryRowDialog.confirm():t._openSummaryRowDialog(e.cell,(()=>{})))})}}else if(t.rowDetail.enabled&&l.rowDetailColumn){let l="";if(l=a.showDetail?'<button tabindex="-1" class="smart-visibility-hidden smart-animate" toggled toggle-button></button>':'<button tabindex="-1" class="smart-visibility-hidden smart-animate" toggle-button></button>',t.appearance.showRowStatus){l=a._style&&a._style.status?`<span class="row-status custom" style = "color: ${a._style.status};" ></span> `+l:'<span class="row-status"></span>'+l,c.innerHTML===l||a.element.star?(a.element.star.classList.remove("smart-hidden"),a.element.star.classList.remove("custom"),a._style&&a._style.status?(a.element.star.style.color=a._style.status,a.element.star.classList.add("custom")):a.element.star.style.color=""):c.innerHTML=l;const i=()=>{if(a.comments&&a.comments.length>0){const e=a.comments.length;a.element.star.classList.add("comments"),a.element.star.setAttribute("title",t.localize(a.starred?"starred":"notStarred",{elementType:"Grid"})+", "+e+" "+t.localize("comments"))}else a.comments&&0===a.comments.length&&a.element.star.classList.remove("comments")};a.element.star=e.querySelector("span"),a.element.star||(c.innerHTML=l,a.element.star=e.querySelector("span")),a.element.star.onpointerdown=e=>{a.canNotify=!1,a.starred=!a.starred,a.canNotify=!0,a.data.$&&(a.data.$.starred=a.starred),a.starred?a.element.star.classList.add("starred"):a.element.star.classList.remove("starred"),a.element.star.setAttribute("title",t.localize(a.starred?"starred":"notStarred",{elementType:"Grid"})),i(),e.stopPropagation(),e.preventDefault(),t.$.fireEvent("rowStarred",{id:a.id,originalEvent:e,row:a,value:a.starred})},a.element.star.setAttribute("title",t.localize(a.starred?"starred":"notStarred",{elementType:"Grid"})),a.starred?a.element.star.classList.add("starred"):a.element.star.classList.remove("starred"),i()}else c.innerHTML!==l&&(c.innerHTML=l);if(a.element.toggleDetailButton=e.querySelector("button"),a.element.toggleDetailButton.setAttribute("title",t.localize(a.showDetail?"collapseRow":"expandRow",{elementType:"Grid"})),(t.rowDetail.template||t.onRowDetailInit)&&a.element.toggleDetailButton.classList.remove("smart-visibility-hidden"),a.comments&&a.comments.length>0){const e=a.comments.length;a.element.toggleDetailButton.classList.remove("smart-visibility-hidden"),t.appearance.showRowStatus?a.element.toggleDetailButton.querySelector(".comments-length")?a.element.toggleDetailButton.querySelector(".comments-length").innerHTML=e:a.element.toggleDetailButton.innerHTML+=`<div class="comments-length'>${e}</div>`:a.element.toggleDetailButton.innerHTML=`<div class="comments-length'>${e}</div>`,a.starred&&a.element.toggleDetailButton.classList.add("starred"),a.element.toggleDetailButton.classList.add("row-comments"),a.element.toggleDetailButton.setAttribute("title",t.localize(a.showDetail?"collapseRow":"expandRowComments",{value:e,elementType:"Grid"}))}else a.comments&&0===a.comments.length&&a.element.toggleDetailButton.classList.remove("row-comments");t.rowDetail.dialog.enabled&&a.element.toggleDetailButton.classList.add("row-detail")}else if(l.commandColumn)e._renderCommands();else if(t.appearance.showRowHeaderNumber&&l.rowHeaderColumn)if(a.addNewRow)c.textContent="";else{const l=l=>{if(e.cell.value)return e.cell.value;if("number"===t.appearance.autoGenerateRowLabelMode)return l.visibleIndex+1;{const e=l.visibleIndex%26,t=Math.floor(l.visibleIndex/26),a="A".charCodeAt(0),i=String.fromCharCode(a+e);let n="";for(let e=0;e<t;e++)n+="A";return n+i}};t._rowsAdded&&t._rowsAdded.indexOf(a.id)>=0?c.textContent="":c.textContent=l(a)}else if(u)if(e.removeAttribute("readonly"),t.appearance.displayLoadingIndicator&&!l.autoGenerated)c.innerHTML='<div class="smart-grid-cell-loading"></div>';else if(a._isMeasureRow)c.innerHTML=o;else switch(e.cell.template){case"checkBox":case"switchButton":case"radioButton":e._setTemplate(o,e.cell.template,c);break;case"tags":case"checklist":case"collaborator":case"updatedBy":case"createdBy":case"multiComboInput":e._setTemplate(o,e.cell.template,c);break;case"image":e._setTemplate(o,"images",c);break;case"email":e._setTemplate(o,"email",c);break;case"url":e._setTemplate(o,"url",c);break;default:e._setTemplate(o,e.cell.template,c)}else{const i=c.firstChild;if(i&&i.classList&&e.toggleButton&&l._treeColumn&&c.children[1]){const e=c.children[0],i=c.children[1].children[0],n=c.children[1].children[1].firstChild,r=c.children[1].children[2];let o="";if(l._treeColumn){if(t.grouping.enabled){let e=a.level-1;t.appearance.showRowHeaderNumber&&e--,t.rowDetail.enabled&&e--,e<-1?o="":"multipleColumns"!==t.grouping.renderMode&&(o+='<div style="width: '+(1+e)*t.grouping.groupIndent+'px;"></div>')}else for(let e=0;e<a.level;e++)o+="<div class='smart-indent'></div>";if(a.checked?n.setAttribute("checked",""):!1===a.checked?n.removeAttribute("checked"):null===a.checked&&n.setAttribute("checked","indeterminate"),a.leaf?a.allowCheck?n.classList.remove("smart-visibility-hidden"):n.classList.add("smart-visibility-hidden"):a.allowCheck?n.classList.remove("smart-hidden"):n.classList.add("smart-hidden"),!l.autoGenerated){const e=a["column_"+l.dataField];e&&e._setStyle(c)}}a.allowCheck?t.checkBoxes.visible?n.classList.remove("smart-hidden"):n.classList.add("smart-hidden"):t.checkBoxes.visible||n.classList.add("smart-hidden"),e.innerHTML=o,i.classList.add("smart-visibility-hidden"),a.leaf?i.classList.add("smart-visibility-hidden"):(i.classList.remove("smart-visibility-hidden"),a.expanded?i.setAttribute("toggled",""):i.removeAttribute("toggled","")),t.grouping.enabled&&i.classList.add("smart-hidden"),a.data.isEmpty&&i.classList.add("smart-visibility-hidden"),r.innerHTML=d,t.appearance.showTooltips?r.setAttribute("title",d):r.hasAttribute("title")&&r.removeAttribute("title")}else{const i=a["column_"+l.dataField];if(e.getAttribute("rowspan")&&(e.removeAttribute("rowspan"),e.removeAttribute("aria-rowspan"),e.style.height=""),e.getAttribute("colspan")&&(e.removeAttribute("colspan"),e.removeAttribute("aria-colspan")),i){if(i.colSpan>1){const a=t.columns.indexOf(l);let n=0;for(let e=a;e<a+i.colSpan;e++){const l=t.columns[e];l&&l.visible&&(n+=l.computedWidth)}e.style.width=n+"px",e.setAttribute("colspan",""),e.setAttribute("aria-colspan",i.colSpan),i._styleChanged=!0}let n=i.rowSpan;if(i.rowSpan>1){const l=t.rows.indexOf(a);let n=0;a.element.setAttribute("rowspan","");for(let e=l;e<=l+i.rowSpan-1;e++){const l=t.rows[e];l&&l.visible&&l.filtered&&(n+=l.cellHeight)}e.style.height=n+"px",e.setAttribute("rowspan",""),e.setAttribute("aria-rowspan",i.rowSpan),i._styleChanged=!0}else if(l.rowSpan&&!a._isMeasureRow){const r="number"==typeof l.rowSpan?l.rowSpan:l.rowSpan(o,a.visibleIndex,a.data),s=a.visibleIndex;let d=!1;for(let e=0;e<t._cellRowSpan.length;e++){const l=t._cellRowSpan[e];if(s>l[0]&&s<l[1]){d=!0;break}}if(a._rowSpan=r,r&&!d){let o=0;t._cellRowSpan.push([s,s+r,l.dataField]),t._cellRowSpan.maxSpan||(t._cellRowSpan.maxSpan=1),t._cellRowSpan.maxSpan=Math.max(r,t._cellRowSpan.maxSpan),a.element.setAttribute("rowspan","");for(let e=s;e<=s+r-1;e++){const l=t.rows[e];l&&l.visible&&l.filtered&&(o+=l.cellHeight)}e.style.height=o+"px",e.setAttribute("rowspan",""),e.setAttribute("aria-rowspan",r),i._styleChanged=!0,n=r}}1===i.colSpan&&e.hasAttribute("colspan")&&(e.style.width="",e.removeAttribute("colspan"),e.removeAttribute("aria-colspan"),i._styleChanged=!0),e.hasAttribute("rowspan")&&1===n&&(e.style.height="",e.removeAttribute("rowspan"),e.removeAttribute("aria-rowspan"),i._styleChanged=!0),c.textContent===d||l.formatFunction||(c.textContent=d),i.column.autoGenerated||i._setStyle(c),t.appearance.showTooltips?c.setAttribute("title",i.tooltip||d):c.hasAttribute("title")&&c.removeAttribute("title")}else c.textContent=d}}if(c.className!==g&&(c.className=g),!t.appearance.displayLoadingIndicator||l.autoGenerated||t.dataSource.boundHierarchy?t.appearance.displayLoadingIndicator&&l.selectionColumn?e.removeAttribute("selected"):!l.autoGenerated&&c.firstChild&&c.firstChild.classList&&c.firstChild.classList.contains("smart-grid-cell-loading")&&(c.firstChild.classList.remove("smart-grid-cell-loading"),e.removeAttribute("selected")):(a.element.removeAttribute("focus"),e.removeAttribute("selected"),c.innerHTML='<div class="smart-grid-cell-loading"></div>'),l.formatFunction&&!a.data.isEmpty&&t.isInitialized&&!a.summaryRow){const t={row:a,column:l,cell:e.cell,oldValue:e.cell.oldValue,value:o,formattedValue:d,template:null};e.cell.canNotify=!1,a.canNotify=!1;const i=Object.assign({},{background:e.cell.background,color:e.cell.color,fontSize:e.cell.fontSize,fontFamily:e.cell.fontFamily,textDecoration:e.cell.textDecoration,fontWeight:e.cell.fontWeight,fontStyle:e.cell.fontStyle});await l.formatFunction(t),c.style.background===i.background&&c.style.color===i.color&&c.style.fontSize===i.fontSize&&c.style.fontFamily===i.fontFamily&&c.style.textDecoration===i.textDecoration&&c.style.fontWeight===i.fontWeight&&c.style.fontStyle===i.fontStyle||(e.cell._styleChanged=!0,e.cell._setStyle(c)),e.cell.background===i.background&&e.cell.color===i.color&&e.cell.fontSize===i.fontSize&&e.cell.fontWeight===i.fontWeight&&e.cell.textDecoration===i.textDecoration&&e.cell.fontFamily===i.fontFamily&&e.cell.fontStyle===i.fontStyle||(e.cell._styleChanged=!0,e.cell._setStyle(c));let n=!0;if(t.value!==o&&(e.toggleButton?c.children[1].children[2].innerHTML=t.value:c.innerHTML=t.value,n=!1),null!==t.template){if(e.toggleButton){const e=c.children[1].children[2];e.innerHTML!==t.template&&(e.innerHTML=t.template)}else if(c.innerHTML!==t.template){const e=document.createElement("div");e.innerHTML=t.template,e.innerHTML!==c.innerHTML&&(c.innerHTML=t.template)}n=!1}n&&(l.cellsFormat?c.textContent=d:c.textContent=o),e.cell.canNotify=!0,a.canNotify=!0}if(!a.data.isEmpty&&t.isInitialized&&e._applyConditionalFormattingToCell(e.cell,t,c),t.grouping.enabled&&t.dataSource&&t.dataSource.groupBy.length>0&&l===t._firstVisibleColumn&&t.rowDetail.enabled&&t.rowDetail.visible&&c.querySelector("[toggle-button]")){const e=c.querySelector("[toggle-button]");e.classList.remove("smart-visibility-hidden"),e.classList.add("row-detail"),a.element.toggleDetailButton=e,a.element.toggleDetailButton.setAttribute("title",t.localize(a.showDetail?"collapseRow":"expandRow",{elementType:"Grid"})),e.onpointerdown=function(e){a.showDetail=!a.showDetail,e.stopPropagation(),e.preventDefault()}}}_autoWrap(){const e=this,t=e.firstChild,l=e.cell.grid;l.layout.allowCellsWrapShortcut&&e.hasAttribute("focus")&&e.hasAttribute("selected")&&(t.offsetWidth<t.scrollWidth?e._popupCellContent(t.innerHTML,e.cell):l._cellContentPopup&&l._cellContentPopup.remove())}_popupCellContent(e,t){const l=this,a=t.grid;let i=a._cellContentPopup;if(!a._cellContentPopup){i=document.createElement("div");const t=document.createElement("span"),l=document.createElement("div"),n=document.createElement("div");i.style.minHeight="0px",i.style.minWidth="0px",i.setAttribute("theme",a.theme),i.classList.add("smart-grid-cell-content-popup"),n.appendChild(l),n.classList.add("smart-grid-text-area-container"),l.innerHTML=e,l.classList.add("smart-grid-cell-content-popup-content"),t.classList.add("smart-hidden"),t.classList.add("close-button"),t.classList.add("smart-grid-icon"),t.classList.add("smart-icon-cancel-circled"),t.onclick=function(){a._cellContentPopup.parentNode.removeChild(a._cellContentPopup)},i.classList.add("smart-grid-text-area-dialog"),i.appendChild(n),i.appendChild(t),a._cellContentPopup=i}i.querySelector(".smart-grid-cell-content-popup-content").innerHTML=e;const n=a.offset(a.$.scrollView);i.style.top=a._offsetTop(l)-n.top+"px",i.style.left=a._offsetLeft(l)-n.left+"px",i.style.width=l.offsetWidth-4+"px",a.$.scrollView.appendChild(i)}_applyConditionalFormattingToCell(e,t,l){const a=this,i=e.column.dataField,n=e.row,r=e.row.index,o=n._style;if(t._conditionalFormatting&&t._conditionalFormatting[i]){const e=t._conditionalFormatting[i][r];a.cell.canNotify=!1,n.canNotify=!1,e?(a.cell._styleChanged=!0,a.cell.background=e.background,a.cell.color=e.color,a.cell.fontFamily=e.fontFamily,a.cell.fontSize=e.fontSize,a.cell._setStyle(l)):a.cell._styleChanged||(o&&o._changed?(a.cell._styleChanged=!0,a.cell.background=o.background,a.cell.color=o.color,a.cell.fontFamily=o.fontFamily,a.cell.fontSize=o.fontSize,a.cell._setStyle(l)):(a.cell._styleChanged=!0,a.cell.background=null,a.cell.color=null,a.cell.fontFamily=null,a.cell.fontSize=null,a.cell._setStyle(l))),a.cell.canNotify=!0,n.canNotify=!0}else t._conditionalFormattingChanged&&!a.cell._styleChanged&&(a.cell.canNotify=!1,n.canNotify=!1,o&&o._changed?(a.cell._styleChanged=!0,a.cell.background=o.background,a.cell.color=o.color,a.cell.fontFamily=o.fontFamily,a.cell.fontSize=o.fontSize,a.cell._setStyle(l)):(a.cell._styleChanged=!0,a.cell.background=null,a.cell.color=null,a.cell.fontFamily=null,a.cell.fontSize=null,a.cell._setStyle(l)),a.cell.canNotify=!0,n.canNotify=!0)}_rotateCellContent(e,t,l){const a=document.createElement("span");return e.innerHTML="",a.innerHTML=l,e.appendChild(a),a.className="rotate",a.style.transform="rotate("+t.cellsRotationAngle+"deg)",this.grid._recycleRotate(e,a,t.cellsAlign,t.cellsVerticalAlign,l)}_getCellAlignment(e,t){const l=e["column_"+t.dataField],a=l&&l.verticalAlign||t.cellsVerticalAlign;let i=l&&l.align||t.cellsAlign;const n={align:"",verticalAlign:""};if(!l)return{align:"align-left",verticalAlign:"align-middle"};switch(l.grid.rightToLeft&&("left"===i?i="right":"right"===i&&(i="left")),i){case"left":n.align="align-left";break;case"center":case"middle":n.align="align-center";break;case"right":n.align="align-right"}switch(a){case"top":n.verticalAlign="align-top";break;case"center":case"middle":n.verticalAlign="align-middle";break;case"bottom":n.verticalAlign="align-bottom"}return n}template(){return""}_detach(){this.element=null,this.cell=null}onDetached(){this._detach()}});
@@ -1,5 +1,5 @@
1
1
 
2
- /* Smart UI v14.2.83 (2022-09-09)
2
+ /* Smart UI v14.3.0 (2022-09-27)
3
3
  Copyright (c) 2011-2021 jQWidgets.
4
4
  License: https://htmlelements.com/license/ */ //
5
5
 
@@ -1,5 +1,5 @@
1
1
 
2
- /* Smart UI v14.2.83 (2022-09-09)
2
+ /* Smart UI v14.3.0 (2022-09-27)
3
3
  Copyright (c) 2011-2021 jQWidgets.
4
4
  License: https://htmlelements.com/license/ */ //
5
5