overview-components 1.1.0 → 1.1.10

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 (355) hide show
  1. package/dist/assets/generated/locales/de.d.ts +43 -17
  2. package/dist/assets/generated/locales/de.d.ts.map +1 -1
  3. package/dist/assets/generated/locales/de.js +68 -42
  4. package/dist/assets/generated/locales/de.js.map +1 -1
  5. package/dist/assets/generated/locales/en.d.ts +40 -14
  6. package/dist/assets/generated/locales/en.d.ts.map +1 -1
  7. package/dist/assets/generated/locales/en.js +41 -15
  8. package/dist/assets/generated/locales/en.js.map +1 -1
  9. package/dist/assets/generated/locales/fr.d.ts +71 -0
  10. package/dist/assets/generated/locales/fr.d.ts.map +1 -0
  11. package/dist/assets/generated/locales/fr.js +71 -0
  12. package/dist/assets/generated/locales/fr.js.map +1 -0
  13. package/dist/assets/generated/locales/hr.d.ts +71 -0
  14. package/dist/assets/generated/locales/hr.d.ts.map +1 -0
  15. package/dist/assets/generated/locales/hr.js +71 -0
  16. package/dist/assets/generated/locales/hr.js.map +1 -0
  17. package/dist/assets/generated/locales/it.d.ts +71 -0
  18. package/dist/assets/generated/locales/it.d.ts.map +1 -0
  19. package/dist/assets/generated/locales/it.js +71 -0
  20. package/dist/assets/generated/locales/it.js.map +1 -0
  21. package/dist/assets/generated/locales/pl.d.ts +43 -17
  22. package/dist/assets/generated/locales/pl.d.ts.map +1 -1
  23. package/dist/assets/generated/locales/pl.js +44 -18
  24. package/dist/assets/generated/locales/pl.js.map +1 -1
  25. package/dist/assets/generated/locales/ro.d.ts +71 -0
  26. package/dist/assets/generated/locales/ro.d.ts.map +1 -0
  27. package/dist/assets/generated/locales/ro.js +71 -0
  28. package/dist/assets/generated/locales/ro.js.map +1 -0
  29. package/dist/assets/generated/locales/sk.d.ts +43 -17
  30. package/dist/assets/generated/locales/sk.d.ts.map +1 -1
  31. package/dist/assets/generated/locales/sk.js +68 -42
  32. package/dist/assets/generated/locales/sk.js.map +1 -1
  33. package/dist/assets/generated/locales/sr.d.ts +71 -0
  34. package/dist/assets/generated/locales/sr.d.ts.map +1 -0
  35. package/dist/assets/generated/locales/sr.js +71 -0
  36. package/dist/assets/generated/locales/sr.js.map +1 -0
  37. package/dist/assets/icons/iconGlyphs.d.ts +674 -873
  38. package/dist/assets/icons/iconGlyphs.d.ts.map +1 -1
  39. package/dist/assets/icons/iconGlyphs.js +338 -322
  40. package/dist/assets/icons/iconGlyphs.js.map +1 -1
  41. package/dist/assets/illustration/delete-illustration.d.ts +6 -0
  42. package/dist/assets/illustration/delete-illustration.d.ts.map +1 -0
  43. package/dist/assets/illustration/delete-illustration.js +96 -0
  44. package/dist/assets/illustration/delete-illustration.js.map +1 -0
  45. package/dist/assets/illustration/no-content.d.ts.map +1 -0
  46. package/dist/assets/illustration/no-content.js.map +1 -0
  47. package/dist/assets/illustration/no-preview.d.ts.map +1 -0
  48. package/dist/assets/illustration/no-preview.js.map +1 -0
  49. package/dist/assets/illustration/not-found.d.ts.map +1 -0
  50. package/dist/assets/{ilustration → illustration}/not-found.js +15 -15
  51. package/dist/assets/illustration/not-found.js.map +1 -0
  52. package/dist/assets/illustration/settings-illustration.d.ts +6 -0
  53. package/dist/assets/illustration/settings-illustration.d.ts.map +1 -0
  54. package/dist/assets/illustration/settings-illustration.js +176 -0
  55. package/dist/assets/illustration/settings-illustration.js.map +1 -0
  56. package/dist/components/components-settings/attachments-tab-settings.d.ts +39 -0
  57. package/dist/components/components-settings/attachments-tab-settings.d.ts.map +1 -0
  58. package/dist/components/components-settings/attachments-tab-settings.js +218 -0
  59. package/dist/components/components-settings/attachments-tab-settings.js.map +1 -0
  60. package/dist/components/components-settings/data-grid-settings.d.ts +53 -0
  61. package/dist/components/components-settings/data-grid-settings.d.ts.map +1 -0
  62. package/dist/components/components-settings/data-grid-settings.js +318 -0
  63. package/dist/components/components-settings/data-grid-settings.js.map +1 -0
  64. package/dist/components/components-settings/section-tab-settings.d.ts +48 -0
  65. package/dist/components/components-settings/section-tab-settings.d.ts.map +1 -0
  66. package/dist/components/components-settings/section-tab-settings.js +262 -0
  67. package/dist/components/components-settings/section-tab-settings.js.map +1 -0
  68. package/dist/components/components-settings/tabs-overview-settings.d.ts +53 -0
  69. package/dist/components/components-settings/tabs-overview-settings.d.ts.map +1 -0
  70. package/dist/components/components-settings/tabs-overview-settings.js +431 -0
  71. package/dist/components/components-settings/tabs-overview-settings.js.map +1 -0
  72. package/dist/components/index.d.ts +22 -0
  73. package/dist/components/index.d.ts.map +1 -0
  74. package/dist/components/index.js +22 -0
  75. package/dist/components/index.js.map +1 -0
  76. package/dist/components/lit-attachments-tab.d.ts +15 -25
  77. package/dist/components/lit-attachments-tab.d.ts.map +1 -1
  78. package/dist/components/lit-attachments-tab.js +400 -268
  79. package/dist/components/lit-attachments-tab.js.map +1 -1
  80. package/dist/components/lit-badge.d.ts +1 -1
  81. package/dist/components/lit-badge.d.ts.map +1 -1
  82. package/dist/components/lit-badge.js +60 -55
  83. package/dist/components/lit-badge.js.map +1 -1
  84. package/dist/components/lit-case-variables-tab.d.ts +46 -32
  85. package/dist/components/lit-case-variables-tab.d.ts.map +1 -1
  86. package/dist/components/lit-case-variables-tab.js +722 -154
  87. package/dist/components/lit-case-variables-tab.js.map +1 -1
  88. package/dist/components/lit-chart.d.ts +4 -2
  89. package/dist/components/lit-chart.d.ts.map +1 -1
  90. package/dist/components/lit-chart.js +7 -7
  91. package/dist/components/lit-chart.js.map +1 -1
  92. package/dist/components/lit-data-grid-tanstack.d.ts +75 -99
  93. package/dist/components/lit-data-grid-tanstack.d.ts.map +1 -1
  94. package/dist/components/lit-data-grid-tanstack.js +1305 -808
  95. package/dist/components/lit-data-grid-tanstack.js.map +1 -1
  96. package/dist/components/lit-filter-modal.d.ts +4 -11
  97. package/dist/components/lit-filter-modal.d.ts.map +1 -1
  98. package/dist/components/lit-filter-modal.js +161 -152
  99. package/dist/components/lit-filter-modal.js.map +1 -1
  100. package/dist/components/lit-multiselect-item.d.ts +70 -0
  101. package/dist/components/lit-multiselect-item.d.ts.map +1 -0
  102. package/dist/components/lit-multiselect-item.js +706 -0
  103. package/dist/components/lit-multiselect-item.js.map +1 -0
  104. package/dist/components/lit-section-tab.d.ts +26 -5
  105. package/dist/components/lit-section-tab.d.ts.map +1 -1
  106. package/dist/components/lit-section-tab.js +114 -39
  107. package/dist/components/lit-section-tab.js.map +1 -1
  108. package/dist/components/lit-tabs-overview.d.ts +27 -11
  109. package/dist/components/lit-tabs-overview.d.ts.map +1 -1
  110. package/dist/components/lit-tabs-overview.js +277 -74
  111. package/dist/components/lit-tabs-overview.js.map +1 -1
  112. package/dist/components/modals/lit-confirm-modal.d.ts +25 -0
  113. package/dist/components/modals/lit-confirm-modal.d.ts.map +1 -0
  114. package/dist/components/modals/lit-confirm-modal.js +120 -0
  115. package/dist/components/modals/lit-confirm-modal.js.map +1 -0
  116. package/dist/components/modals/lit-delete-modal.d.ts +25 -0
  117. package/dist/components/modals/lit-delete-modal.d.ts.map +1 -0
  118. package/dist/components/modals/lit-delete-modal.js +128 -0
  119. package/dist/components/modals/lit-delete-modal.js.map +1 -0
  120. package/dist/components/react-wrappers/button.d.ts +3 -0
  121. package/dist/components/react-wrappers/button.d.ts.map +1 -0
  122. package/dist/components/react-wrappers/button.js +9 -0
  123. package/dist/components/react-wrappers/button.js.map +1 -0
  124. package/dist/components/react-wrappers/index.d.ts +22 -0
  125. package/dist/components/react-wrappers/index.d.ts.map +1 -0
  126. package/dist/components/react-wrappers/index.js +22 -0
  127. package/dist/components/react-wrappers/index.js.map +1 -0
  128. package/dist/components/react-wrappers/progress-bar.d.ts +3 -0
  129. package/dist/components/react-wrappers/progress-bar.d.ts.map +1 -0
  130. package/dist/components/react-wrappers/progress-bar.js +9 -0
  131. package/dist/components/react-wrappers/progress-bar.js.map +1 -0
  132. package/dist/index.d.ts +3 -24
  133. package/dist/index.d.ts.map +1 -1
  134. package/dist/index.js +4 -24
  135. package/dist/index.js.map +1 -1
  136. package/dist/libs/xlsx.mini.min.js +10 -0
  137. package/dist/schemas/index.d.ts +17 -0
  138. package/dist/schemas/index.d.ts.map +1 -0
  139. package/dist/schemas/index.js +17 -0
  140. package/dist/schemas/index.js.map +1 -0
  141. package/dist/schemas/lit-attachments-tab-document.schema.d.ts +20 -0
  142. package/dist/schemas/lit-attachments-tab-document.schema.d.ts.map +1 -0
  143. package/dist/schemas/lit-attachments-tab-document.schema.js +20 -0
  144. package/dist/schemas/lit-attachments-tab-document.schema.js.map +1 -0
  145. package/dist/schemas/lit-attachments-tab-settings-value.schema.d.ts +15 -0
  146. package/dist/schemas/lit-attachments-tab-settings-value.schema.d.ts.map +1 -0
  147. package/dist/schemas/lit-attachments-tab-settings-value.schema.js +15 -0
  148. package/dist/schemas/lit-attachments-tab-settings-value.schema.js.map +1 -0
  149. package/dist/schemas/lit-attachments-tab.schema.d.ts +49 -0
  150. package/dist/schemas/lit-attachments-tab.schema.d.ts.map +1 -0
  151. package/dist/schemas/lit-attachments-tab.schema.js +32 -0
  152. package/dist/schemas/lit-attachments-tab.schema.js.map +1 -0
  153. package/dist/schemas/lit-case-variables-tab-cell.schema.d.ts +99 -0
  154. package/dist/schemas/lit-case-variables-tab-cell.schema.d.ts.map +1 -0
  155. package/dist/schemas/lit-case-variables-tab-cell.schema.js +43 -0
  156. package/dist/schemas/lit-case-variables-tab-cell.schema.js.map +1 -0
  157. package/dist/schemas/lit-case-variables-tab-rows.schema.d.ts +102 -0
  158. package/dist/schemas/lit-case-variables-tab-rows.schema.d.ts.map +1 -0
  159. package/dist/schemas/lit-case-variables-tab-rows.schema.js +6 -0
  160. package/dist/schemas/lit-case-variables-tab-rows.schema.js.map +1 -0
  161. package/dist/schemas/lit-case-variables-tab.schema.d.ts +133 -0
  162. package/dist/schemas/lit-case-variables-tab.schema.d.ts.map +1 -0
  163. package/dist/schemas/lit-case-variables-tab.schema.js +25 -0
  164. package/dist/schemas/lit-case-variables-tab.schema.js.map +1 -0
  165. package/dist/schemas/lit-data-grid-tanstack-column-array.schema.d.ts +90 -0
  166. package/dist/schemas/lit-data-grid-tanstack-column-array.schema.d.ts.map +1 -0
  167. package/dist/schemas/lit-data-grid-tanstack-column-array.schema.js +6 -0
  168. package/dist/schemas/lit-data-grid-tanstack-column-array.schema.js.map +1 -0
  169. package/dist/schemas/lit-data-grid-tanstack-column-custom-filter-array.schema.d.ts +20 -0
  170. package/dist/schemas/lit-data-grid-tanstack-column-custom-filter-array.schema.d.ts.map +1 -0
  171. package/dist/schemas/lit-data-grid-tanstack-column-custom-filter-array.schema.js +6 -0
  172. package/dist/schemas/lit-data-grid-tanstack-column-custom-filter-array.schema.js.map +1 -0
  173. package/dist/schemas/lit-data-grid-tanstack-column-custom-filter.schema.d.ts +17 -0
  174. package/dist/schemas/lit-data-grid-tanstack-column-custom-filter.schema.d.ts.map +1 -0
  175. package/dist/schemas/lit-data-grid-tanstack-column-custom-filter.schema.js +11 -0
  176. package/dist/schemas/lit-data-grid-tanstack-column-custom-filter.schema.js.map +1 -0
  177. package/dist/schemas/lit-data-grid-tanstack-column.schema.d.ts +87 -0
  178. package/dist/schemas/lit-data-grid-tanstack-column.schema.d.ts.map +1 -0
  179. package/dist/schemas/lit-data-grid-tanstack-column.schema.js +55 -0
  180. package/dist/schemas/lit-data-grid-tanstack-column.schema.js.map +1 -0
  181. package/dist/schemas/lit-data-grid-tanstack.schema.d.ts +264 -0
  182. package/dist/schemas/lit-data-grid-tanstack.schema.d.ts.map +1 -0
  183. package/dist/schemas/lit-data-grid-tanstack.schema.js +99 -0
  184. package/dist/schemas/lit-data-grid-tanstack.schema.js.map +1 -0
  185. package/dist/schemas/lit-section-tab-schema.d.ts +23 -0
  186. package/dist/schemas/lit-section-tab-schema.d.ts.map +1 -0
  187. package/dist/schemas/lit-section-tab-schema.js +24 -0
  188. package/dist/schemas/lit-section-tab-schema.js.map +1 -0
  189. package/dist/schemas/lit-tabs-overview-tab-array.schema.d.ts +43 -0
  190. package/dist/schemas/lit-tabs-overview-tab-array.schema.d.ts.map +1 -0
  191. package/dist/schemas/lit-tabs-overview-tab-array.schema.js +6 -0
  192. package/dist/schemas/lit-tabs-overview-tab-array.schema.js.map +1 -0
  193. package/dist/schemas/lit-tabs-overview-tab.schema.d.ts +40 -0
  194. package/dist/schemas/lit-tabs-overview-tab.schema.d.ts.map +1 -0
  195. package/dist/schemas/lit-tabs-overview-tab.schema.js +32 -0
  196. package/dist/schemas/lit-tabs-overview-tab.schema.js.map +1 -0
  197. package/dist/schemas/lit-tabs-overview.schema.d.ts +66 -0
  198. package/dist/schemas/lit-tabs-overview.schema.d.ts.map +1 -0
  199. package/dist/schemas/lit-tabs-overview.schema.js +29 -0
  200. package/dist/schemas/lit-tabs-overview.schema.js.map +1 -0
  201. package/dist/scripts/translate-locales.js +4 -2
  202. package/dist/scripts/translate-locales.js.map +1 -1
  203. package/dist/shared/filter-inputs.d.ts +11 -12
  204. package/dist/shared/filter-inputs.d.ts.map +1 -1
  205. package/dist/shared/filter-inputs.js +202 -200
  206. package/dist/shared/filter-inputs.js.map +1 -1
  207. package/dist/shared/index.d.ts +36 -0
  208. package/dist/shared/index.d.ts.map +1 -0
  209. package/dist/shared/index.js +38 -0
  210. package/dist/shared/index.js.map +1 -0
  211. package/dist/shared/lit-button.d.ts +3 -3
  212. package/dist/shared/lit-button.d.ts.map +1 -1
  213. package/dist/shared/lit-button.js +85 -55
  214. package/dist/shared/lit-button.js.map +1 -1
  215. package/dist/shared/lit-case-variables-tab-cell.js +112 -112
  216. package/dist/shared/lit-checkbox.d.ts +13 -3
  217. package/dist/shared/lit-checkbox.d.ts.map +1 -1
  218. package/dist/shared/lit-checkbox.js +132 -78
  219. package/dist/shared/lit-checkbox.js.map +1 -1
  220. package/dist/shared/lit-custom-popper.js +31 -31
  221. package/dist/shared/lit-data-grid-density-popover.js +38 -38
  222. package/dist/shared/lit-data-grid-export-popover.js +26 -26
  223. package/dist/shared/lit-data-grid-operators-popover.d.ts +2 -1
  224. package/dist/shared/lit-data-grid-operators-popover.d.ts.map +1 -1
  225. package/dist/shared/lit-data-grid-operators-popover.js +32 -33
  226. package/dist/shared/lit-data-grid-operators-popover.js.map +1 -1
  227. package/dist/shared/lit-data-grid-row-actions.d.ts +2 -1
  228. package/dist/shared/lit-data-grid-row-actions.d.ts.map +1 -1
  229. package/dist/shared/lit-data-grid-row-actions.js +38 -37
  230. package/dist/shared/lit-data-grid-row-actions.js.map +1 -1
  231. package/dist/shared/lit-date-picker.d.ts +40 -9
  232. package/dist/shared/lit-date-picker.d.ts.map +1 -1
  233. package/dist/shared/lit-date-picker.js +430 -168
  234. package/dist/shared/lit-date-picker.js.map +1 -1
  235. package/dist/shared/lit-icon-button.d.ts +12 -2
  236. package/dist/shared/lit-icon-button.d.ts.map +1 -1
  237. package/dist/shared/lit-icon-button.js +51 -31
  238. package/dist/shared/lit-icon-button.js.map +1 -1
  239. package/dist/shared/lit-icon.d.ts +1 -1
  240. package/dist/shared/lit-icon.d.ts.map +1 -1
  241. package/dist/shared/lit-icon.js +17 -17
  242. package/dist/shared/lit-icon.js.map +1 -1
  243. package/dist/shared/lit-input.d.ts +6 -0
  244. package/dist/shared/lit-input.d.ts.map +1 -1
  245. package/dist/shared/lit-input.js +130 -93
  246. package/dist/shared/lit-input.js.map +1 -1
  247. package/dist/shared/lit-label.d.ts +13 -0
  248. package/dist/shared/lit-label.d.ts.map +1 -0
  249. package/dist/shared/lit-label.js +104 -0
  250. package/dist/shared/lit-label.js.map +1 -0
  251. package/dist/shared/lit-loader.d.ts +1 -1
  252. package/dist/shared/lit-loader.d.ts.map +1 -1
  253. package/dist/shared/lit-loader.js +10 -8
  254. package/dist/shared/lit-loader.js.map +1 -1
  255. package/dist/shared/lit-loading-bar.d.ts +3 -3
  256. package/dist/shared/lit-loading-bar.d.ts.map +1 -1
  257. package/dist/shared/lit-loading-bar.js +73 -73
  258. package/dist/shared/lit-loading-bar.js.map +1 -1
  259. package/dist/shared/lit-menu-item.d.ts +5 -3
  260. package/dist/shared/lit-menu-item.d.ts.map +1 -1
  261. package/dist/shared/lit-menu-item.js +57 -44
  262. package/dist/shared/lit-menu-item.js.map +1 -1
  263. package/dist/shared/lit-menu.d.ts.map +1 -1
  264. package/dist/shared/lit-menu.js +18 -19
  265. package/dist/shared/lit-menu.js.map +1 -1
  266. package/dist/shared/lit-modal-body.d.ts +6 -0
  267. package/dist/shared/lit-modal-body.d.ts.map +1 -0
  268. package/dist/shared/lit-modal-body.js +22 -0
  269. package/dist/shared/lit-modal-body.js.map +1 -0
  270. package/dist/shared/lit-modal-footer.d.ts +6 -0
  271. package/dist/shared/lit-modal-footer.d.ts.map +1 -0
  272. package/dist/shared/lit-modal-footer.js +29 -0
  273. package/dist/shared/lit-modal-footer.js.map +1 -0
  274. package/dist/shared/lit-modal-header.d.ts +7 -0
  275. package/dist/shared/lit-modal-header.d.ts.map +1 -0
  276. package/dist/shared/lit-modal-header.js +36 -0
  277. package/dist/shared/lit-modal-header.js.map +1 -0
  278. package/dist/shared/lit-modal.d.ts +14 -22
  279. package/dist/shared/lit-modal.d.ts.map +1 -1
  280. package/dist/shared/lit-modal.js +122 -107
  281. package/dist/shared/lit-modal.js.map +1 -1
  282. package/dist/shared/lit-overflow-tooltip.d.ts +7 -3
  283. package/dist/shared/lit-overflow-tooltip.d.ts.map +1 -1
  284. package/dist/shared/lit-overflow-tooltip.js +67 -42
  285. package/dist/shared/lit-overflow-tooltip.js.map +1 -1
  286. package/dist/shared/lit-pill.js +50 -50
  287. package/dist/shared/lit-progress-bar.d.ts +17 -0
  288. package/dist/shared/lit-progress-bar.d.ts.map +1 -0
  289. package/dist/shared/lit-progress-bar.js +81 -0
  290. package/dist/shared/lit-progress-bar.js.map +1 -0
  291. package/dist/shared/lit-select-field.d.ts +42 -0
  292. package/dist/shared/lit-select-field.d.ts.map +1 -0
  293. package/dist/shared/lit-select-field.js +459 -0
  294. package/dist/shared/lit-select-field.js.map +1 -0
  295. package/dist/shared/lit-select.d.ts +6 -1
  296. package/dist/shared/lit-select.d.ts.map +1 -1
  297. package/dist/shared/lit-select.js +211 -187
  298. package/dist/shared/lit-select.js.map +1 -1
  299. package/dist/shared/lit-settings.d.ts +25 -0
  300. package/dist/shared/lit-settings.d.ts.map +1 -0
  301. package/dist/shared/lit-settings.js +77 -0
  302. package/dist/shared/lit-settings.js.map +1 -0
  303. package/dist/shared/lit-text-field.d.ts +23 -0
  304. package/dist/shared/lit-text-field.d.ts.map +1 -0
  305. package/dist/shared/lit-text-field.js +222 -0
  306. package/dist/shared/lit-text-field.js.map +1 -0
  307. package/dist/shared/lit-toggle.d.ts +17 -0
  308. package/dist/shared/lit-toggle.d.ts.map +1 -0
  309. package/dist/shared/lit-toggle.js +222 -0
  310. package/dist/shared/lit-toggle.js.map +1 -0
  311. package/dist/shared/lit-tooltip.d.ts +19 -0
  312. package/dist/shared/lit-tooltip.d.ts.map +1 -0
  313. package/dist/shared/lit-tooltip.js +166 -0
  314. package/dist/shared/lit-tooltip.js.map +1 -0
  315. package/dist/shared/simple-popper.d.ts +3 -1
  316. package/dist/shared/simple-popper.d.ts.map +1 -1
  317. package/dist/shared/simple-popper.js +113 -74
  318. package/dist/shared/simple-popper.js.map +1 -1
  319. package/dist/shared/simple-tooltip.d.ts +14 -23
  320. package/dist/shared/simple-tooltip.d.ts.map +1 -1
  321. package/dist/shared/simple-tooltip.js +197 -148
  322. package/dist/shared/simple-tooltip.js.map +1 -1
  323. package/dist/shared/styles/button-shared-styles.d.ts.map +1 -1
  324. package/dist/shared/styles/button-shared-styles.js +197 -64
  325. package/dist/shared/styles/button-shared-styles.js.map +1 -1
  326. package/dist/style.css +1 -0
  327. package/dist/styles.js +166 -166
  328. package/dist/utils/currency.d.ts +2 -0
  329. package/dist/utils/currency.d.ts.map +1 -0
  330. package/dist/utils/currency.js +16 -0
  331. package/dist/utils/currency.js.map +1 -0
  332. package/dist/utils/custom-filters.js +3 -7
  333. package/dist/utils/custom-filters.js.map +1 -1
  334. package/dist/utils/date.js +1 -1
  335. package/dist/utils/date.js.map +1 -1
  336. package/dist/utils/localization.d.ts.map +1 -1
  337. package/dist/utils/localization.js +209 -2
  338. package/dist/utils/localization.js.map +1 -1
  339. package/dist/utils/utils.d.ts +2 -0
  340. package/dist/utils/utils.d.ts.map +1 -0
  341. package/dist/utils/utils.js +13 -0
  342. package/dist/utils/utils.js.map +1 -0
  343. package/dist/vite.svg +1 -0
  344. package/package.json +77 -59
  345. package/dist/assets/ilustration/no-content.d.ts.map +0 -1
  346. package/dist/assets/ilustration/no-content.js.map +0 -1
  347. package/dist/assets/ilustration/no-preview.d.ts.map +0 -1
  348. package/dist/assets/ilustration/no-preview.js.map +0 -1
  349. package/dist/assets/ilustration/not-found.d.ts.map +0 -1
  350. package/dist/assets/ilustration/not-found.js.map +0 -1
  351. /package/dist/assets/{ilustration → illustration}/no-content.d.ts +0 -0
  352. /package/dist/assets/{ilustration → illustration}/no-content.js +0 -0
  353. /package/dist/assets/{ilustration → illustration}/no-preview.d.ts +0 -0
  354. /package/dist/assets/{ilustration → illustration}/no-preview.js +0 -0
  355. /package/dist/assets/{ilustration → illustration}/not-found.d.ts +0 -0
@@ -5,15 +5,16 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
7
  import { css, html, LitElement } from 'lit';
8
- import _ from 'lodash';
8
+ import _, { isEqual } from 'lodash';
9
9
  import { msg } from '@lit/localize';
10
- import { customElement, property, state } from 'lit/decorators.js';
10
+ import { customElement, property, state, query } from 'lit/decorators.js';
11
11
  import { unsafeHTML } from 'lit/directives/unsafe-html.js';
12
12
  import { TableController, getCoreRowModel, flexRender, getSortedRowModel, getFilteredRowModel, getFacetedRowModel, getFacetedUniqueValues, getGroupedRowModel, getExpandedRowModel, filterFns, } from '@tanstack/lit-table';
13
13
  import { repeat } from 'lit/directives/repeat.js';
14
14
  import { VirtualizerController } from '@tanstack/lit-virtual';
15
15
  import { createRef, ref } from 'lit/directives/ref.js';
16
16
  import { styleMap } from 'lit/directives/style-map.js';
17
+ import Sortable from 'sortablejs';
17
18
  // components
18
19
  import '../shared/filter-inputs.js';
19
20
  import '../shared/lit-icon.js';
@@ -22,19 +23,20 @@ import '../shared/lit-button.js';
22
23
  import '../shared/lit-responsive-button.js';
23
24
  import '../shared/lit-data-grid-export-popover.js';
24
25
  import '../shared/lit-data-grid-action-buttons-popover.js';
25
- import '../assets/ilustration/not-found.js';
26
- import '../shared/lit-overflow-tooltip.js';
26
+ import '../assets/illustration/not-found.js';
27
27
  import '../shared/lit-data-grid-density-popover.js';
28
28
  import '../shared/lit-loading-bar.js';
29
29
  import '../shared/lit-data-grid-row-actions.js';
30
30
  import '../shared/simple-tooltip.js';
31
31
  import '../shared/lit-checkbox.js';
32
32
  import '../shared/lit-overflow-tooltip.js';
33
+ import './components-settings/data-grid-settings.js';
33
34
  // utils
34
35
  import { formatDate } from '../utils/date.js';
36
+ import { formatCurrency } from '../utils/currency.js';
35
37
  import { dateFilterFn, multiselectFilterFn, dateRangeFilterFn } from '../utils/custom-filters.js';
36
38
  import { setLocale, getLocale } from '../utils/localization.js';
37
- import { getDefaultOperator, isAllowedType } from '../utils/getOperatorByType.js';
39
+ import { getOperatorsByColumnType } from '../utils/getOperatorByType.js';
38
40
  let LitDataGridTanstack = class LitDataGridTanstack extends LitElement {
39
41
  constructor() {
40
42
  super(...arguments);
@@ -43,7 +45,9 @@ let LitDataGridTanstack = class LitDataGridTanstack extends LitElement {
43
45
  this.enableRowVirtualization = true;
44
46
  this.enableColumnVirtualization = false;
45
47
  this.enableColumnPinning = true;
48
+ this.enableColumnOrdering = false;
46
49
  this.enableGrouping = true;
50
+ this.enablePinning = true;
47
51
  this.exportData = true;
48
52
  this.actionButtonsInMenu = false;
49
53
  this.id = '';
@@ -53,13 +57,10 @@ let LitDataGridTanstack = class LitDataGridTanstack extends LitElement {
53
57
  this.leftPinnedColumns = [];
54
58
  this.rightPinnedColumns = [];
55
59
  this.enableFiltering = true;
60
+ this.enableSorting = true;
56
61
  this.userLang = 'cs';
57
62
  this.dateFormat = null;
58
63
  this.isLoading = false;
59
- this.onColumnResize = () => { };
60
- this.onColumnFiltersChanged = (table, filterModel) => { };
61
- this.onColumnSortChanged = (table, sortModel) => { };
62
- this.onRowSelectionChanged = (table, selectedRows) => { };
63
64
  this.enableRowSelection = false;
64
65
  this.initialFiltering = [];
65
66
  this.server = false;
@@ -69,21 +70,34 @@ let LitDataGridTanstack = class LitDataGridTanstack extends LitElement {
69
70
  this.minFilterCharacters = 3;
70
71
  this.localizeDate = true;
71
72
  this.rowsSelected = {};
73
+ this.enableSettings = false;
74
+ this.onSettingsChanged = () => { };
75
+ this.onCellKeyDown = (event, row) => { };
76
+ this.onColumnResize = () => { };
77
+ this.onColumnFiltersChanged = (table, filterModel) => { };
78
+ this.onColumnSortChanged = (table, sortModel) => { };
79
+ this.onRowSelectionChanged = (table, selectedRows) => { };
80
+ this.onColumnOrderChanged = (table, columnOrder) => { };
81
+ this.hideFooter = false;
82
+ this.columnVisibility = {};
83
+ this.onColumnVisibilityChanged = (table, columnVisibility) => { };
84
+ this.onMouseDown = (e, row) => { };
85
+ this.onRowFocusChanged = (table, rowIndex) => { };
86
+ this.focusedRowIndex = null;
87
+ this.autoFocus = false;
72
88
  this.rowsCount = 0;
73
89
  this.isScrollable = false;
74
90
  this.disableScrollLeft = true;
75
91
  this.disableScrollRight = false;
76
- this.filters = [];
77
- this.filtersServer = [];
78
- this.sorting = [];
79
- this.rowExpanded = {};
80
- this.rowHeight = 31;
92
+ this.columnOrder = [];
93
+ this.isOpen = false;
94
+ this.filterText = '';
95
+ this.isOpenModal = false;
81
96
  this.scrollToEnd = false;
82
97
  this.tableContainerRef = createRef();
83
98
  this.scrollInterval = null;
84
99
  this.currentScrollTop = 0;
85
100
  this.lastSelectedIndex = null;
86
- this.operatorMap = new Map();
87
101
  this.getCellBackgroundColor = (cell) => {
88
102
  if (cell.getIsGrouped()) {
89
103
  return this.columnGroupedColor ?? `var(--color-primary-light, #f0fadf)`;
@@ -118,81 +132,128 @@ let LitDataGridTanstack = class LitDataGridTanstack extends LitElement {
118
132
  }
119
133
  // lifecycle
120
134
  connectedCallback() {
121
- super.connectedCallback();
122
- if (this.server && this.initialFiltering) {
123
- for (const filter of this.initialFiltering) {
124
- if (typeof filter.operator === 'string') {
125
- this.operatorMap.set(filter.id, filter.operator);
126
- }
127
- }
128
- }
129
- if (this.server) {
130
- this.columns.forEach((column) => {
131
- if (!this.operatorMap.has(column.field)) {
132
- const columnType = column.type;
133
- if (isAllowedType(columnType)) {
134
- const defaultOperator = getDefaultOperator(columnType);
135
- this.operatorMap.set(column.field, defaultOperator);
136
- }
137
- }
138
- });
139
- }
140
135
  this.initRowVirtualizer();
141
136
  this.initColumnVirtualizer();
142
137
  this.initTable();
143
138
  window.addEventListener('resize', this.updateScrollState);
144
- document.addEventListener('keydown', this.handleKeyDown.bind(this));
139
+ super.connectedCallback();
145
140
  }
146
141
  disconnectedCallback() {
147
142
  super.disconnectedCallback();
148
143
  window.removeEventListener('resize', this.updateScrollState);
149
- document.removeEventListener('keydown', this.handleKeyDown.bind(this));
150
144
  }
151
145
  updated(changedProperties) {
152
- if ((changedProperties.has('rowsCount') || changedProperties.has('rowDensity')) &&
153
- this.enableRowVirtualization) {
146
+ if (changedProperties.has('rowsCount') && this.enableRowVirtualization) {
154
147
  this.scrollToEnd = false;
155
- this.initRowVirtualizer();
156
- this.requestUpdate();
157
- }
158
- if (changedProperties.has('columns') && this.enableColumnVirtualization) {
159
- this.initColumnVirtualizer();
148
+ const virtualizer = this.rowVirtualizerController?.getVirtualizer();
149
+ if (virtualizer) {
150
+ virtualizer.setOptions({
151
+ ...virtualizer.options,
152
+ count: this.table?.getRowModel()?.rows.length,
153
+ });
154
+ }
160
155
  this.requestUpdate();
161
156
  }
162
- if (changedProperties.has('initialFiltering')) {
163
- if (this.server && this.initialFiltering) {
164
- for (const filter of this.initialFiltering) {
165
- if (typeof filter.operator === 'string') {
166
- this.operatorMap.set(filter.id, filter.operator);
167
- }
168
- }
169
- this.filtersServer = [...(this.initialFiltering || [])];
170
- }
171
- else {
172
- this.filters = [...(this.initialFiltering || [])];
157
+ if ((changedProperties.has('columns') || changedProperties.has('columnVisibility')) &&
158
+ this.enableColumnVirtualization) {
159
+ const virtualizer = this.columnVirtualizerController?.getVirtualizer();
160
+ if (virtualizer) {
161
+ virtualizer.setOptions({
162
+ ...virtualizer.options,
163
+ count: this.table?.getVisibleLeafColumns().length,
164
+ });
173
165
  }
174
166
  }
175
- if (changedProperties.has('initialSorting')) {
176
- this.sorting = [...(this.initialSorting || [])];
177
- }
178
- if (changedProperties.has('rowDensity')) {
179
- this.rowHeight = this.getRowHeight();
180
- }
181
- if (changedProperties.has('initialRowExpanded')) {
182
- this.rowExpanded = this.initialRowExpanded;
183
- }
184
167
  if (changedProperties.has('row') || changedProperties.has('columns')) {
185
168
  this.initTable();
186
169
  this.requestUpdate();
187
170
  }
171
+ if (changedProperties.has('rowDensity') && this.enableRowVirtualization) {
172
+ const virtualizer = this.rowVirtualizerController?.getVirtualizer();
173
+ if (virtualizer) {
174
+ virtualizer.setOptions({
175
+ ...virtualizer.options,
176
+ estimateSize: () => this.getRowHeight(),
177
+ });
178
+ // Force full re-measure of all rows with new height
179
+ virtualizer.measure();
180
+ }
181
+ this.requestUpdate();
182
+ }
188
183
  }
189
184
  firstUpdated() {
190
- this.addEventListener('filter-operator-change', (e) => this.handleOperatorChange(e));
191
185
  const grid = this.tableContainerRef.value;
192
186
  if (grid) {
193
187
  grid.addEventListener('scroll', this.updateScrollState);
194
188
  }
195
189
  this.updateScrollState();
190
+ this.initSortable();
191
+ this._container.addEventListener('scroll', this.handleScroll.bind(this));
192
+ // focus row by index
193
+ if (this.autoFocus) {
194
+ setTimeout(() => {
195
+ if (this.focusedRowIndex !== null && this.focusedRowIndex !== undefined) {
196
+ this.focusRow?.(this.focusedRowIndex);
197
+ }
198
+ else {
199
+ // first selected row if exists
200
+ const selectedRows = this.table.getSelectedRowModel().rows;
201
+ if (selectedRows.length > 0) {
202
+ this.focusRow?.(selectedRows[0].index);
203
+ }
204
+ }
205
+ }, 0);
206
+ }
207
+ }
208
+ toggleModal() {
209
+ this.isOpenModal = !this.isOpenModal;
210
+ }
211
+ async initSortable() {
212
+ if (!this.enableColumnOrdering)
213
+ return;
214
+ const headerRow = this.shadowRoot?.querySelector('thead tr.head');
215
+ if (!headerRow)
216
+ return;
217
+ Sortable.create(headerRow, {
218
+ animation: 150,
219
+ direction: 'horizontal',
220
+ handle: '.drag-handle',
221
+ filter: 'th[data-index="checkbox"], th[data-index="actions"]',
222
+ preventOnFilter: false,
223
+ onMove: (evt) => {
224
+ const dragged = evt.dragged.getAttribute('data-index');
225
+ const target = evt.related.getAttribute('data-index');
226
+ const disallowed = ['checkbox', 'actions'];
227
+ if (disallowed.includes(dragged) || disallowed.includes(target)) {
228
+ return false;
229
+ }
230
+ const headers = this.table.getHeaderGroups()[0].headers;
231
+ const draggedHeader = headers.find((header) => header.id === dragged);
232
+ const targetHeader = headers.find((header) => header.id === target);
233
+ if (!draggedHeader || !targetHeader)
234
+ return false;
235
+ const isDraggedPinned = draggedHeader.column.getIsPinned?.();
236
+ const isTargetPinned = targetHeader.column.getIsPinned?.();
237
+ const isDraggedGrouped = draggedHeader.column.getIsGrouped?.();
238
+ const isTargetGrouped = targetHeader.column.getIsGrouped?.();
239
+ return !(isDraggedPinned || isTargetPinned || isDraggedGrouped || isTargetGrouped);
240
+ },
241
+ onEnd: () => {
242
+ const newOrder = Array.from(headerRow.querySelectorAll('th'))
243
+ .map((th) => th.getAttribute('data-index'))
244
+ .filter((id) => {
245
+ if (!id || id === 'checkbox' || id === 'actions')
246
+ return false;
247
+ const header = this.table
248
+ .getHeaderGroups()[0]
249
+ .headers.find((h) => h.id === id);
250
+ if (!header)
251
+ return false;
252
+ return !header.column.getIsPinned?.() && !header.column.getIsGrouped?.();
253
+ });
254
+ this.table.setColumnOrder(newOrder);
255
+ },
256
+ });
196
257
  }
197
258
  async loadXLSX() {
198
259
  if (!window.XLSX && !this.server) {
@@ -235,6 +296,11 @@ let LitDataGridTanstack = class LitDataGridTanstack extends LitElement {
235
296
  this.rowDensityChange(this.table, density);
236
297
  }
237
298
  }
299
+ handleMouseDown(event, row) {
300
+ if (this.onMouseDown) {
301
+ this.onMouseDown(event, row);
302
+ }
303
+ }
238
304
  handleFilterTabNavigation(event) {
239
305
  const { direction, currentFilter } = event.detail;
240
306
  // Získajte všetky filter-inputs elementy z DOM
@@ -287,39 +353,15 @@ let LitDataGridTanstack = class LitDataGridTanstack extends LitElement {
287
353
  // Nastav focus na ďalší filter podľa smeru
288
354
  filterInputs[nextIndex].focus();
289
355
  }
290
- // scroll by keyboard arrows
291
- handleKeyDown(event) {
292
- if (_.isEmpty(this.rowsSelected) && this.enableMultiRowSelection)
293
- return;
294
- const rows = this.table.getRowModel().rows;
295
- const selectedRowId = Object.keys(this.rowsSelected).find((key) => this.rowsSelected[key]);
296
- const currentIndex = selectedRowId
297
- ? this.table.getSelectedRowModel().rowsById[selectedRowId].index
298
- : {};
299
- if (event.key === 'ArrowDown') {
300
- const nextIndex = Math.min(currentIndex + 1, (rows.length ?? 0) - 1);
301
- this.rowsSelected = { [rows[nextIndex].id]: true };
302
- this.lastSelectedIndex = nextIndex;
303
- }
304
- else if (event.key === 'ArrowUp') {
305
- const prevIndex = Math.max(currentIndex - 1, 0);
306
- this.rowsSelected = { [rows[prevIndex].id]: true };
307
- this.lastSelectedIndex = prevIndex;
308
- }
309
- else if (event.key === 'Enter' && this.rowsSelected) {
310
- if (selectedRowId) {
311
- this.handleRowDoubleClick(this.table.getSelectedRowModel().rowsById[selectedRowId].original);
312
- }
313
- }
314
- }
315
356
  // virtualization
316
357
  initRowVirtualizer() {
317
358
  this.rowVirtualizerController = new VirtualizerController(this, {
318
359
  count: this.table?.getRowModel()?.rows.length || this.row?.length || 1,
319
360
  getScrollElement: () => this.tableContainerRef.value,
320
- estimateSize: () => this.rowHeight,
361
+ estimateSize: () => this.getRowHeight(),
321
362
  overscan: 5,
322
363
  initialOffset: this.currentScrollTop,
364
+ enabled: this.enableRowVirtualization,
323
365
  });
324
366
  }
325
367
  initTable() {
@@ -330,40 +372,126 @@ let LitDataGridTanstack = class LitDataGridTanstack extends LitElement {
330
372
  horizontal: true,
331
373
  count: this.table?.getVisibleLeafColumns().length || this.columns.length || 1,
332
374
  getScrollElement: () => this.tableContainerRef.value,
333
- estimateSize: (index) => this.table.getVisibleLeafColumns()[index].getSize() || 200,
375
+ estimateSize: (index) => this.table.getVisibleLeafColumns()[index]?.getSize() || 200,
334
376
  overscan: 5,
377
+ enabled: this.enableColumnVirtualization,
335
378
  });
336
379
  }
337
380
  handleRowClick(event, row) {
338
- const isShiftPressed = event.shiftKey;
339
- if (this.onRowClick) {
340
- this.onRowClick(this.table, row);
341
- }
342
- if (this.enableRowSelection && !this.enableMultiRowSelection) {
343
- this.rowsSelected = { [row.id]: true };
344
- }
345
- if (this.enableMultiRowSelection && this.enableRowSelection) {
346
- if (isShiftPressed && this.lastSelectedIndex !== null) {
347
- const selectedRows = this.table
348
- .getRowModel()
349
- .rows.slice(Math.min(this.lastSelectedIndex, row.index), Math.max(this.lastSelectedIndex, row.index) + 1);
350
- const selectedRowsIds = selectedRows.map((r) => r.id);
351
- this.rowsSelected = {
352
- ...this.rowsSelected,
353
- ...selectedRowsIds.reduce((acc, id) => ({ ...acc, [id]: true }), {}),
354
- };
381
+ this.onRowClick?.(event, this.table, row);
382
+ this.onRowFocusChanged?.(this.table, row.index);
383
+ const isShift = event.shiftKey;
384
+ const isCtrlOrMeta = event.ctrlKey || event.metaKey;
385
+ if (this.enableRowSelection && row.getCanSelect() && (isCtrlOrMeta || isShift)) {
386
+ const { rows } = this.table.getRowModel();
387
+ if (this.enableMultiRowSelection &&
388
+ isShift &&
389
+ this.focusedRowIndex !== null &&
390
+ this.focusedRowIndex !== undefined) {
391
+ const [start, end] = [
392
+ Math.min(this.focusedRowIndex, row.index),
393
+ Math.max(this.focusedRowIndex, row.index),
394
+ ];
395
+ const ids = rows.slice(start, end + 1).map((r) => r.id);
396
+ const selected = { ...this.rowsSelected };
397
+ ids.forEach((id) => (selected[id] = true));
398
+ this.table.setRowSelection(selected);
399
+ }
400
+ else if (isCtrlOrMeta && this.enableMultiRowSelection) {
401
+ // Ctrl/Cmd+Click: toggle row selection
402
+ const selected = { ...this.rowsSelected };
403
+ if (selected[row.id]) {
404
+ delete selected[row.id];
405
+ }
406
+ else {
407
+ selected[row.id] = true;
408
+ }
409
+ this.table.setRowSelection(selected);
355
410
  }
356
411
  else {
357
- row.toggleSelected();
358
- this.lastSelectedIndex = row.index;
412
+ // Single click: select only this row
413
+ const selected = { [row.id]: true };
414
+ this.table.setRowSelection(selected);
359
415
  }
360
416
  }
417
+ this.focusedRowIndex = row.index;
361
418
  }
362
419
  handleRowDoubleClick(row) {
363
420
  if (this.onRowDoubleClick) {
364
421
  this.onRowDoubleClick(this.table, row);
365
422
  }
366
423
  }
424
+ handleKeyDown(e) {
425
+ const rows = this.table.getRowModel().rows;
426
+ if (!rows.length)
427
+ return;
428
+ let index = this.focusedRowIndex ?? rows.findIndex((row) => this.rowsSelected[row.id]);
429
+ if (this.enableRowSelection) {
430
+ if (index === -1)
431
+ index = 0;
432
+ if (e.key === 'ArrowDown' && e.shiftKey && this.enableMultiRowSelection) {
433
+ e.preventDefault();
434
+ const nextIndex = index + 1;
435
+ if (nextIndex < rows.length) {
436
+ const nextRowId = rows[nextIndex].id;
437
+ this.table.setRowSelection((prev) => ({
438
+ ...prev,
439
+ [nextRowId]: !prev[nextRowId],
440
+ }));
441
+ this.focusRow(nextIndex);
442
+ }
443
+ }
444
+ else if (e.key === 'ArrowUp' && e.shiftKey && this.enableMultiRowSelection) {
445
+ e.preventDefault();
446
+ const prevIndex = index - 1;
447
+ if (prevIndex >= 0) {
448
+ const prevRowId = rows[prevIndex].id;
449
+ this.table.setRowSelection((prev) => ({
450
+ ...prev,
451
+ [prevRowId]: !prev[prevRowId],
452
+ }));
453
+ this.focusRow(prevIndex);
454
+ }
455
+ }
456
+ else if (e.key === 'ArrowDown' && index < rows.length - 1) {
457
+ e.preventDefault();
458
+ const nextIndex = index + 1;
459
+ this.focusRow(nextIndex);
460
+ }
461
+ else if (e.key === 'ArrowUp' && index > 0) {
462
+ e.preventDefault();
463
+ const prevIndex = index - 1;
464
+ this.focusRow(prevIndex);
465
+ }
466
+ }
467
+ this.onCellKeyDown?.(e, rows[index]);
468
+ }
469
+ focusRow(index) {
470
+ const rowIndex = index ?? this.focusedRowIndex;
471
+ // Scroll to the row using virtualizer if available
472
+ this.rowVirtualizerController
473
+ ?.getVirtualizer()
474
+ .scrollToIndex(rowIndex ?? 0, { align: 'auto' });
475
+ setTimeout(() => {
476
+ const row = this.shadowRoot?.querySelector(`[data-row-index="${rowIndex}"]`);
477
+ // Find the row element in the shadow DOM
478
+ if (this.enableRowVirtualization) {
479
+ if (row) {
480
+ setTimeout(() => {
481
+ row.focus();
482
+ }, 0);
483
+ }
484
+ }
485
+ else {
486
+ if (row) {
487
+ row.focus();
488
+ row.scrollIntoView({ block: 'nearest' });
489
+ }
490
+ }
491
+ }, 100);
492
+ this.onRowFocusChanged?.(this.table, rowIndex);
493
+ this.focusedRowIndex = rowIndex;
494
+ }
367
495
  getTanstackColumns(columns) {
368
496
  return columns.map((column) => {
369
497
  return {
@@ -390,12 +518,15 @@ let LitDataGridTanstack = class LitDataGridTanstack extends LitElement {
390
518
  cell: (props) => {
391
519
  const value = props.getValue();
392
520
  if (column.type === 'actions') {
393
- return html `
394
- <lit-data-grid-row-actions
395
- .buttons=${column.getActions?.(props) || []}
396
- ></lit-data-grid-row-actions>
521
+ return html `
522
+ <lit-data-grid-row-actions
523
+ .buttons=${column.getActions?.(props) || []}
524
+ ></lit-data-grid-row-actions>
397
525
  `;
398
526
  }
527
+ if (column.type === 'currency') {
528
+ return formatCurrency(value, this.userLang || 'cs');
529
+ }
399
530
  return column.cell ? column.cell(props, html, unsafeHTML) : value;
400
531
  },
401
532
  filterFn: (() => {
@@ -407,6 +538,7 @@ let LitDataGridTanstack = class LitDataGridTanstack extends LitElement {
407
538
  case 'multiselect':
408
539
  return multiselectFilterFn;
409
540
  case 'number':
541
+ case 'currency':
410
542
  return filterFns.weakEquals;
411
543
  case 'dateRange':
412
544
  case 'dateTimeRange':
@@ -427,12 +559,13 @@ let LitDataGridTanstack = class LitDataGridTanstack extends LitElement {
427
559
  meta: {
428
560
  filterVariant: column.type ?? 'string',
429
561
  valueOptions: column.valueOptions,
562
+ filterOperators: column.filterOperators,
430
563
  },
431
564
  aggregationFn: column.columnAggregation ?? undefined,
432
565
  enableGrouping: column.enableGrouping ?? true,
433
566
  sortDescFirst: column.sortDescFirst || true,
434
567
  enableResizing: column.enableResizing ?? true,
435
- enablePinning: column.enablePinning ?? true,
568
+ enablePinning: this.enablePinning && (column.enablePinning ?? true),
436
569
  aggregatedCell: (props) => {
437
570
  const value = props.getValue();
438
571
  return column.aggregatedCell
@@ -601,10 +734,15 @@ let LitDataGridTanstack = class LitDataGridTanstack extends LitElement {
601
734
  this.scrollInterval = null;
602
735
  }
603
736
  }
604
- handleScroll(event) {
605
- const container = event.target;
606
- if (container.scrollTop + container.clientHeight >=
607
- container.scrollHeight - (this.scrollEndThreshold || 100) &&
737
+ // centralize your “at end” logic
738
+ _atScrollEnd(container) {
739
+ const thresh = this.scrollEndThreshold ?? 100;
740
+ // if not scrollable OR within threshold of bottom
741
+ return (container.scrollHeight <= container.clientHeight ||
742
+ container.scrollTop + container.clientHeight >= container.scrollHeight - thresh);
743
+ }
744
+ _maybeTriggerScrollEnd() {
745
+ if (this._atScrollEnd(this._container) &&
608
746
  this.onRowsScrollEnd &&
609
747
  !this.isLoading &&
610
748
  !this.scrollToEnd) {
@@ -612,76 +750,147 @@ let LitDataGridTanstack = class LitDataGridTanstack extends LitElement {
612
750
  this.onRowsScrollEnd();
613
751
  }
614
752
  }
753
+ handleScroll(_event) {
754
+ // every scroll, re‑test
755
+ this._maybeTriggerScrollEnd();
756
+ }
757
+ // handleScroll(event: Event) {
758
+ // const container = event.target as HTMLElement;
759
+ // if (
760
+ // container.scrollTop + container.clientHeight >=
761
+ // container.scrollHeight - (this.scrollEndThreshold || 100) &&
762
+ // this.onRowsScrollEnd &&
763
+ // !this.isLoading &&
764
+ // !this.scrollToEnd
765
+ // ) {
766
+ // this.scrollToEnd = true;
767
+ // this.onRowsScrollEnd();
768
+ // }
769
+ // }
615
770
  handleGetTotalNumber() {
616
771
  if (this.getTotalNumberFn) {
617
772
  this.getTotalNumberFn();
618
773
  }
619
774
  }
620
- handleOperatorChange(e) {
621
- if (!this.server)
622
- return;
623
- const { columnId, operator } = e.detail;
624
- this.operatorMap.set(columnId, operator);
625
- const filtersState = this.filtersServer;
626
- const filter = filtersState.find((f) => f.id === columnId);
627
- const Operator = operator === 'isEmpty' || operator === 'isNotEmpty';
628
- if (!Operator && !filter?.value) {
629
- return;
775
+ toggleCustomPopover() {
776
+ this.isOpen = !this.isOpen;
777
+ }
778
+ closePopover() {
779
+ this.isOpen = false;
780
+ }
781
+ toggleColumn(field) {
782
+ this.columnVisibility = {
783
+ ...this.columnVisibility,
784
+ [field]: !(this.columnVisibility?.[field] ?? true),
785
+ };
786
+ this.table.setColumnVisibility(this.columnVisibility);
787
+ }
788
+ onSettingsChangedCallback(value) {
789
+ if (value?.enableSorting !== undefined) {
790
+ this.enableSorting = value.enableSorting;
630
791
  }
631
- const filtersServer = [];
632
- for (const filter of filtersState) {
633
- const operator = this.operatorMap.get(filter.id);
634
- filtersServer.push({
635
- id: filter.id,
636
- value: filter.value,
637
- operator: operator,
638
- });
792
+ if (value?.enableFiltering !== undefined) {
793
+ this.enableFiltering = value.enableFiltering;
639
794
  }
640
- for (const [columnId, operator] of this.operatorMap.entries()) {
641
- if (operator === 'isEmpty' || operator === 'isNotEmpty') {
642
- filtersServer.push({
643
- id: columnId,
644
- value: undefined,
645
- operator: operator,
646
- });
647
- }
795
+ if (value?.columnDefaultSize !== undefined) {
796
+ this.columnDefaultSize = value.columnDefaultSize;
797
+ }
798
+ if (value?.columnGroupedColor !== undefined) {
799
+ this.columnGroupedColor = value.columnGroupedColor;
800
+ }
801
+ if (value?.rowAggregationColor !== undefined) {
802
+ this.rowAggregationColor = value.rowAggregationColor;
803
+ }
804
+ if (value?.enableGrouping !== undefined) {
805
+ this.enableGrouping = value.enableGrouping;
648
806
  }
649
- this.filtersServer = filtersServer;
650
- if (this.onColumnFiltersChanged) {
651
- this.onColumnFiltersChanged(this.table, this.filtersServer);
807
+ if (value?.exportData !== undefined) {
808
+ this.exportData = value.exportData;
652
809
  }
810
+ if (value?.actionButtonsInMenu !== undefined) {
811
+ this.actionButtonsInMenu = value.actionButtonsInMenu;
812
+ }
813
+ if (value?.hideFooter !== undefined) {
814
+ this.hideFooter = value.hideFooter;
815
+ }
816
+ if (value?.enableColumnPinning !== undefined) {
817
+ this.enableColumnPinning = value.enableColumnPinning;
818
+ }
819
+ this.initTable();
820
+ this.requestUpdate();
821
+ if (this.onSettingsChanged) {
822
+ this.dispatchEvent(new CustomEvent('onSettingsChanged', {
823
+ bubbles: true,
824
+ composed: true,
825
+ detail: value,
826
+ }));
827
+ this.onSettingsChanged?.(value);
828
+ }
829
+ }
830
+ _onRowMouseDown(event, row) {
831
+ this.handleMouseDown(event, row);
832
+ // do not highlight cell text if multirow selection is enabled and shift key is pressed
833
+ if (event.shiftKey) {
834
+ if (event.currentTarget) {
835
+ event.currentTarget.classList.add('no-select');
836
+ }
837
+ // Optionally, clear existing selection:
838
+ const selection = window.getSelection();
839
+ if (selection) {
840
+ selection.removeAllRanges();
841
+ }
842
+ }
843
+ }
844
+ _onRowMouseUp(event) {
845
+ event.currentTarget.classList.remove('no-select');
846
+ }
847
+ _rowUnselectAll(table) {
848
+ table.resetRowSelection();
849
+ this.focusedRowIndex = 0;
653
850
  }
654
851
  render() {
655
- console.log('columns', this.columns);
852
+ const filteredColumns = this.columns?.filter((col) => {
853
+ const name = col.headerName?.toLowerCase() || col.field.toLowerCase();
854
+ return name.includes(this.filterText);
855
+ }) || [];
856
+ // checbox column for multiple selection
656
857
  const checkboxColumn = this.enableMultiRowSelection
657
858
  ? [
658
859
  {
659
- id: 'checkbox',
860
+ id: 'checkboxForMultiselect',
660
861
  type: 'checkbox',
661
862
  minSize: 30,
662
863
  size: 30,
663
864
  enablePinning: false,
664
865
  enableResizing: false,
665
- header: ({ table }) => html `
666
- <div style="position: absolute; left: 0; bottom: 0; margin: 0.65rem 0;">
667
- <lit-checkbox
668
- type="checkbox"
669
- .onChange="${table.getToggleAllRowsSelectedHandler()}"
670
- .checked="${table.getIsAllRowsSelected()}"
671
- .indeterminate="${table.getIsSomeRowsSelected()}"
672
- ></lit-checkbox>
673
- </div>
866
+ header: ({ table }) => html `
867
+ <div style="position: absolute; left: 0; bottom: 0; margin: 0.65rem 0;">
868
+ <lit-checkbox
869
+ type="checkbox"
870
+ .onChange="${() => table.getIsSomeRowsSelected()
871
+ ? this._rowUnselectAll(table)
872
+ : table.toggleAllRowsSelected()}"
873
+ .checked="${table.getIsAllRowsSelected()}"
874
+ .indeterminate="${table.getIsSomeRowsSelected()}"
875
+ ></lit-checkbox>
876
+ </div>
674
877
  `,
675
- cell: ({ row }) => html `
676
- <div style="padding: 0.1875rem 0px 0px 0px">
677
- <lit-checkbox
678
- type="checkbox"
679
- .onChange="${row.getToggleSelectedHandler()}"
680
- .checked="${row.getIsSelected()}"
681
- ?disabled="${!row.getCanSelect()}"
682
- .indeterminate="${row.getIsSomeSelected()}"
683
- ></lit-checkbox>
684
- </div>
878
+ cell: ({ table, row }) => html `
879
+ <div
880
+ style="padding: 0.1875rem 0px 0px 0px"
881
+ @click=${(e) => e.stopPropagation()}
882
+ >
883
+ <lit-checkbox
884
+ type="checkbox"
885
+ .onChange="${(e) => {
886
+ e.stopPropagation();
887
+ row.toggleSelected(e.target.checked);
888
+ }}"
889
+ .checked="${row.getIsSelected()}"
890
+ ?disabled="${!row.getCanSelect()}"
891
+ .indeterminate="${row.getIsSomeSelected()}"
892
+ ></lit-checkbox>
893
+ </div>
685
894
  `,
686
895
  },
687
896
  ]
@@ -706,16 +915,19 @@ let LitDataGridTanstack = class LitDataGridTanstack extends LitElement {
706
915
  grouping: [...(this.initialGroups || [])],
707
916
  columnVisibility: { ...this.initialColumnVisibility },
708
917
  columnPinning: {
709
- left: [...(this.leftPinnedColumns || []), 'checkbox'],
918
+ left: [...(this.leftPinnedColumns || []), 'checkboxForMultiselect'],
710
919
  right: ['actions'],
711
920
  },
712
921
  },
713
922
  state: {
714
- columnFilters: this.server ? this.filtersServer : this.filters,
715
- sorting: this.sorting,
923
+ columnVisibility: this.columnVisibility,
924
+ // columnFilters: this.server ? this.filtersServer : this.filters,
925
+ columnFilters: this.initialFiltering,
926
+ sorting: this.initialSorting,
716
927
  rowSelection: this.rowsSelected,
717
928
  columnSizing: this.columnSizing,
718
- expanded: this.rowExpanded,
929
+ expanded: this.initialRowExpanded,
930
+ columnOrder: this.columnOrder,
719
931
  },
720
932
  filterFns: {
721
933
  dateRangeFilterFn: dateRangeFilterFn,
@@ -729,6 +941,7 @@ let LitDataGridTanstack = class LitDataGridTanstack extends LitElement {
729
941
  enableGrouping: this.enableGrouping,
730
942
  manualFiltering: this.server,
731
943
  manualSorting: this.server,
944
+ enableSorting: this.enableSorting,
732
945
  getRowId: (row, index) => this.getRowId ? this.getRowId(row, index) : index.toString(),
733
946
  // groupedColumnMode: 'reorder',
734
947
  getCoreRowModel: getCoreRowModel(),
@@ -747,35 +960,9 @@ let LitDataGridTanstack = class LitDataGridTanstack extends LitElement {
747
960
  const filtersState = typeof updaterOrValue === 'function'
748
961
  ? updaterOrValue(this.table.getState().columnFilters)
749
962
  : updaterOrValue;
750
- this.filters = filtersState;
751
- if (this.server) {
752
- const filtersServer = [];
753
- for (const filter of filtersState) {
754
- const operator = this.operatorMap.get(filter.id);
755
- filtersServer.push({
756
- id: filter.id,
757
- value: filter.value,
758
- operator: operator,
759
- });
760
- }
761
- for (const [columnId, operator] of this.operatorMap.entries()) {
762
- if (operator === 'isEmpty' || operator === 'isNotEmpty') {
763
- filtersServer.push({
764
- id: columnId,
765
- value: undefined,
766
- operator: operator,
767
- });
768
- }
769
- }
770
- this.filtersServer = [...filtersServer];
771
- if (this.onColumnFiltersChanged) {
772
- this.onColumnFiltersChanged(this.table, this.filtersServer);
773
- }
774
- }
775
- else {
776
- if (this.onColumnFiltersChanged) {
777
- this.onColumnFiltersChanged(this.table, filtersState);
778
- }
963
+ this.initialFiltering = filtersState;
964
+ if (this.onColumnFiltersChanged) {
965
+ this.onColumnFiltersChanged(this.table, filtersState);
779
966
  }
780
967
  },
781
968
  onSortingChange: (updaterOrValue) => {
@@ -787,17 +974,15 @@ let LitDataGridTanstack = class LitDataGridTanstack extends LitElement {
787
974
  const sortingState = typeof updaterOrValue === 'function'
788
975
  ? updaterOrValue(this.table.getState().sorting)
789
976
  : updaterOrValue;
790
- this.sorting = sortingState;
977
+ this.initialSorting = sortingState;
791
978
  if (this.onColumnSortChanged) {
792
979
  this.onColumnSortChanged(this.table, sortingState);
793
980
  }
794
981
  },
795
982
  onRowSelectionChange: (updaterOrValue) => {
796
- const rowSelection = this.enableRowSelection && this.enableMultiRowSelection
797
- ? typeof updaterOrValue === 'function'
798
- ? updaterOrValue(this.rowsSelected)
799
- : updaterOrValue
800
- : this.rowsSelected;
983
+ const rowSelection = typeof updaterOrValue === 'function'
984
+ ? updaterOrValue(this.rowsSelected)
985
+ : updaterOrValue;
801
986
  this.rowsSelected = rowSelection;
802
987
  if (this.onRowSelectionChanged) {
803
988
  this.onRowSelectionChanged(this.table, rowSelection);
@@ -814,17 +999,40 @@ let LitDataGridTanstack = class LitDataGridTanstack extends LitElement {
814
999
  },
815
1000
  onExpandedChange: (updaterOrValue) => {
816
1001
  const rowExpanded = typeof updaterOrValue === 'function'
817
- ? updaterOrValue(this.rowExpanded)
1002
+ ? updaterOrValue(this.initialRowExpanded)
818
1003
  : updaterOrValue;
819
- this.rowExpanded = _.isEmpty(rowExpanded) ? this.rowExpanded : rowExpanded;
1004
+ this.initialRowExpanded = _.isEmpty(rowExpanded)
1005
+ ? this.initialRowExpanded
1006
+ : rowExpanded;
820
1007
  this.requestUpdate();
821
1008
  // if (this.onColumnResize) {
822
1009
  // this.onColumnResize(this.table, columnSizingState);
823
1010
  // }
824
1011
  },
1012
+ onColumnOrderChange: (updaterOrValue) => {
1013
+ const newOrder = typeof updaterOrValue === 'function'
1014
+ ? updaterOrValue(this.columnOrder)
1015
+ : updaterOrValue;
1016
+ this.columnOrder = newOrder;
1017
+ this.render();
1018
+ if (this.onColumnOrderChanged) {
1019
+ this.onColumnOrderChanged(this.table, newOrder);
1020
+ }
1021
+ },
1022
+ onColumnVisibilityChange: (updaterOrValue) => {
1023
+ const columnVisibility = typeof updaterOrValue === 'function'
1024
+ ? updaterOrValue(this.table.getState().columnVisibility)
1025
+ : updaterOrValue;
1026
+ this.columnVisibility = columnVisibility;
1027
+ if (this.onColumnVisibilityChanged) {
1028
+ this.onColumnVisibilityChanged(this.table, columnVisibility);
1029
+ }
1030
+ },
825
1031
  });
826
- this.rowsCount = this.table.getRowModel().rows.length;
827
- // Ak virtualizácia nie je povolená, použijeme celý zoznam riadkov alebo stĺpcov
1032
+ const rowModel = this.table.getRowModel();
1033
+ const { rows } = rowModel;
1034
+ this.rowsCount = rows.length;
1035
+ // Cache expensive calls to avoid recalculation on every render
828
1036
  const rowVirtualizer = this.enableRowVirtualization
829
1037
  ? this.rowVirtualizerController?.getVirtualizer()
830
1038
  : null;
@@ -832,16 +1040,14 @@ let LitDataGridTanstack = class LitDataGridTanstack extends LitElement {
832
1040
  ? this.columnVirtualizerController?.getVirtualizer()
833
1041
  : null;
834
1042
  const virtualColumns = columnVirtualizer?.getVirtualItems() ?? [];
835
- // Get table rows (either virtualized or all)
836
- const { rows } = this.table.getRowModel();
837
1043
  const rowItems = rowVirtualizer
838
1044
  ? rowVirtualizer.getVirtualItems()
839
1045
  : rows.map((_, index) => ({
840
1046
  key: index,
841
1047
  index,
842
- start: index * this.rowHeight,
843
- end: (index + 1) * this.rowHeight,
844
- size: this.rowHeight,
1048
+ start: index * this.getRowHeight(),
1049
+ end: (index + 1) * this.getRowHeight(),
1050
+ size: this.getRowHeight(),
845
1051
  lane: 0,
846
1052
  }));
847
1053
  // Calculate padding for virtualization
@@ -854,37 +1060,44 @@ let LitDataGridTanstack = class LitDataGridTanstack extends LitElement {
854
1060
  (virtualColumns[virtualColumns.length - 1]?.end ?? 0);
855
1061
  }
856
1062
  let isMobile = window.matchMedia('(max-width: 600px)').matches;
857
- return html `
858
- <div class="data-grid__wrapper">
1063
+ return html `
1064
+ <div class="data-grid__wrapper">
859
1065
  ${this.isScrollable && !isMobile
860
- ? html `
861
- <lit-icon-button
862
- class="scroll-button left"
863
- .disabled="${this.disableScrollLeft}"
864
- @pointerdown="${() => this.startScroll('left')}"
865
- @pointerup="${this.stopScroll}"
866
- @pointerleave="${this.stopScroll}"
867
- size="small"
868
- variant="contained"
869
- icon="arrowLeft"
870
- >
871
- </lit-icon-button>
872
- <lit-icon-button
873
- class="scroll-button right"
874
- .disabled="${this.disableScrollRight}"
875
- @pointerdown="${() => this.startScroll('right')}"
876
- @pointerup="${this.stopScroll}"
877
- @pointerleave="${this.stopScroll}"
878
- size="small"
879
- variant="contained"
880
- icon="arrowRight"
881
- >
882
- </lit-icon-button>
1066
+ ? html `
1067
+ <lit-icon-button
1068
+ class="scroll-button left"
1069
+ .disabled="${this.disableScrollLeft}"
1070
+ @pointerdown="${() => this.startScroll('left')}"
1071
+ @pointerup="${this.stopScroll}"
1072
+ @pointerleave="${this.stopScroll}"
1073
+ size="small"
1074
+ variant="contained"
1075
+ icon="arrowLeft"
1076
+ >
1077
+ </lit-icon-button>
1078
+ <lit-icon-button
1079
+ class="scroll-button right"
1080
+ .disabled="${this.disableScrollRight}"
1081
+ @pointerdown="${() => this.startScroll('right')}"
1082
+ @pointerup="${this.stopScroll}"
1083
+ @pointerleave="${this.stopScroll}"
1084
+ size="small"
1085
+ variant="contained"
1086
+ icon="arrowRight"
1087
+ >
1088
+ </lit-icon-button>
883
1089
  `
884
- : null}
885
- <div class="grid" ${ref(this.tableContainerRef)} @scroll="${this.handleScroll}">
886
- <table style="width: ${this.table.getCenterTotalSize()}px">
887
- <thead style="height: ${this.enableFiltering ? '4rem' : '1.625rem'};">
1090
+ : null}
1091
+
1092
+ <div class="grid" ${ref(this.tableContainerRef)}>
1093
+ <table
1094
+ part="dataGrid-table"
1095
+ style="width: ${this.table.getCenterTotalSize()}px"
1096
+ >
1097
+ <thead
1098
+ part="dataGrid-header"
1099
+ style="height: ${this.enableFiltering ? '4rem' : '1.625rem'};"
1100
+ >
888
1101
  ${repeat(this.table.getHeaderGroups(), (headerGroup) => headerGroup.id, (headerGroup) => {
889
1102
  const headerColumns = this.enableColumnVirtualization
890
1103
  ? virtualColumns.map((vc) => headerGroup.headers[vc.index])
@@ -895,15 +1108,15 @@ let LitDataGridTanstack = class LitDataGridTanstack extends LitElement {
895
1108
  ...headerColumns.filter((hc) => !hc.column.getIsPinned()),
896
1109
  ]
897
1110
  : headerColumns;
898
- return html `
899
- <tr class="head" data-index="${headerGroup.id}">
1111
+ return html `
1112
+ <tr class="head" data-index="${headerGroup.id}">
900
1113
  ${virtualPaddingLeft
901
- ? html `
902
- <th
903
- style=" display: flex; width: ${virtualPaddingLeft}px;"
904
- ></th>
1114
+ ? html `
1115
+ <th
1116
+ style=" display: flex; width: ${virtualPaddingLeft}px;"
1117
+ ></th>
905
1118
  `
906
- : ''}
1119
+ : ''}
907
1120
  ${repeat(newHeaderColumns, (header) => header.id, (header, index) => {
908
1121
  const column = header.column;
909
1122
  const style = {
@@ -911,25 +1124,54 @@ let LitDataGridTanstack = class LitDataGridTanstack extends LitElement {
911
1124
  ? 'hidden'
912
1125
  : 'visible',
913
1126
  ...this.getCommonPinningStyles(header.column),
914
- width: `${column.getSize()}px`,
1127
+ width: `${column?.getSize()}px`,
915
1128
  flexGrow: `${column.columnDef.size === undefined ? 1 : 'unset'}`,
916
1129
  };
917
- return html `
918
- <th
919
- class="head"
920
- style="${styleMap(style)}"
921
- colspan="${header.colSpan}"
922
- data-index="${header.id}"
923
- >
1130
+ const filterVariant = column.columnDef.meta?.filterVariant;
1131
+ const filterOperators = column?.columnDef?.meta?.filterOperators ||
1132
+ getOperatorsByColumnType(filterVariant);
1133
+ const value = column?.getFilterValue()?.value ||
1134
+ column?.getFilterValue() ||
1135
+ '';
1136
+ const operator = column?.getFilterValue()?.operator ||
1137
+ filterOperators[0]?.value;
1138
+ let valueOptions = [];
1139
+ if (filterVariant === 'select' ||
1140
+ filterVariant === 'multiselect') {
1141
+ if (column?.columnDef?.meta.valueOptions ||
1142
+ this.server) {
1143
+ valueOptions =
1144
+ column?.columnDef?.meta
1145
+ .valueOptions || [];
1146
+ }
1147
+ else {
1148
+ const sortedUniqueValues = Array.from(column
1149
+ ?.getFacetedUniqueValues()
1150
+ .keys())
1151
+ .sort()
1152
+ .slice(0, 5000);
1153
+ valueOptions = sortedUniqueValues.map((value) => ({
1154
+ value,
1155
+ label: value,
1156
+ }));
1157
+ }
1158
+ }
1159
+ return html `
1160
+ <th
1161
+ class="head"
1162
+ style="${styleMap(style)}"
1163
+ colspan="${header.colSpan}"
1164
+ data-index="${header.id}"
1165
+ >
924
1166
  ${header.isPlaceholder
925
1167
  ? ''
926
- : html `
927
- <div
1168
+ : html `
1169
+ <div
928
1170
  class="resizer ${this
929
1171
  .table.options
930
1172
  .columnResizeDirection} ${header.column.getIsResizing()
931
1173
  ? 'is-resizing'
932
- : ''}"
1174
+ : ''}"
933
1175
  style="transform: ${this
934
1176
  .table.options
935
1177
  .columnResizeMode ===
@@ -945,184 +1187,225 @@ let LitDataGridTanstack = class LitDataGridTanstack extends LitElement {
945
1187
  .columnSizingInfo
946
1188
  .deltaOffset ??
947
1189
  0)}px)`
948
- : ''}"
949
- >
950
- <div class="header">
951
- <div
952
- class="column-header"
953
- @click=${header.column.getToggleSortingHandler()}
954
- >
955
- <lit-overflow-tooltip
1190
+ : ''}"
1191
+ >
1192
+ <div class="header">
1193
+ ${header.column.getIsFiltered()
1194
+ ? html `
1195
+ <div
1196
+ class="filterCirclePoint"
1197
+ ></div>
1198
+ `
1199
+ : ''}
1200
+ <div
1201
+ class="column-header"
1202
+ @click=${header.column.getToggleSortingHandler()}
1203
+ >
1204
+ <lit-overflow-tooltip
956
1205
  label="${header
957
1206
  .column
958
1207
  .columnDef
959
- .header}"
960
- >
1208
+ .header}"
1209
+ >
961
1210
  ${flexRender(header
962
1211
  .column
963
1212
  .columnDef
964
- .header, header.getContext())}
965
- </lit-overflow-tooltip>
966
- </div>
967
-
968
- <div
969
- class="icons-group-pin"
970
- >
1213
+ .header, header.getContext())}
1214
+ </lit-overflow-tooltip>
1215
+ </div>
1216
+
1217
+ <div
1218
+ class="icons-group-pin"
1219
+ >
971
1220
  ${header.column.getCanSort()
972
1221
  ? header.column.getIsSorted()
973
1222
  ? header.column.getIsSorted() ===
974
1223
  'asc'
975
- ? html `<slot
976
- name="iconSortUp"
977
- ><lit-icon
978
- @click=${header.column.getToggleSortingHandler()}
979
- size="0.75rem"
980
- icon="chevronUpFilled"
981
- ></lit-icon
1224
+ ? html `<slot
1225
+ name="iconSortUp"
1226
+ ><lit-icon
1227
+ class="cursor"
1228
+ @click=${header.column.getToggleSortingHandler()}
1229
+ size="0.75rem"
1230
+ icon="chevronUpFilled"
1231
+ ></lit-icon
982
1232
  ></slot>`
983
- : html `<slot
984
- name="iconSortDown"
985
- >
986
- <lit-icon
987
- @click=${header.column.getToggleSortingHandler()}
988
- size="0.75rem"
989
- icon="chevronDownFilled"
990
- ></lit-icon>
1233
+ : html `<slot
1234
+ name="iconSortDown"
1235
+ >
1236
+ <lit-icon
1237
+ class="cursor"
1238
+ @click=${header.column.getToggleSortingHandler()}
1239
+ size="0.75rem"
1240
+ icon="chevronDownFilled"
1241
+ ></lit-icon>
991
1242
  </slot>`
992
- : html `<div
993
- class="sortFilled"
994
- >
995
- <lit-icon
996
- @click=${header.column.getToggleSortingHandler()}
997
- size="0.75rem"
998
- icon="sortFilled"
999
- ></lit-icon>
1243
+ : html `<div
1244
+ class="sortFilled"
1245
+ >
1246
+ <lit-icon
1247
+ class="cursor"
1248
+ @click=${header.column.getToggleSortingHandler()}
1249
+ size="0.75rem"
1250
+ icon="sortFilled"
1251
+ ></lit-icon>
1000
1252
  </div>`
1001
- : html `<div></div>`}
1002
- <div class="flex">
1253
+ : html `<div></div>`}
1254
+ <div class="flex">
1003
1255
  ${!this
1004
1256
  .actionButtonsInMenu
1005
- ? html `
1257
+ ? html `
1006
1258
  ${header.column.getCanPin()
1007
- ? html `
1008
- <lit-icon-button
1009
- @click="${() => this.togglePin(header)}"
1010
- size="small"
1011
- variant="text"
1012
- icon="pin"
1013
- .active="${header.column.getIsPinned()}"
1014
- >
1015
- </lit-icon-button>
1016
- <simple-tooltip
1017
- placement="bottom"
1259
+ ? html `
1260
+ <lit-icon-button
1261
+ @click="${() => this.togglePin(header)}"
1262
+ size="small"
1263
+ variant="text"
1264
+ icon="pin"
1265
+ .active="${header.column.getIsPinned()}"
1266
+ >
1267
+ </lit-icon-button>
1268
+ <simple-tooltip
1269
+ placement="bottom"
1018
1270
  >${header.column.getIsPinned()
1019
1271
  ? msg('Zrušit připnutí sloupce')
1020
- : msg('Připnout sloupec vlevo')}
1021
- </simple-tooltip>
1272
+ : msg('Připnout sloupec vlevo')}
1273
+ </simple-tooltip>
1022
1274
  `
1023
- : ''}
1275
+ : ''}
1024
1276
  ${header.column.getCanGroup()
1025
- ? html `
1026
- <lit-icon-button
1027
- @click="${header.column.getToggleGroupingHandler()}"
1028
- size="small"
1029
- variant="text"
1030
- .active="${header.column.getIsGrouped()}"
1031
- icon="agregation"
1032
- >
1033
- </lit-icon-button>
1034
- <simple-tooltip
1035
- placement="bottom"
1036
- >
1277
+ ? html `
1278
+ <lit-icon-button
1279
+ @click="${header.column.getToggleGroupingHandler()}"
1280
+ size="small"
1281
+ variant="text"
1282
+ .active="${header.column.getIsGrouped()}"
1283
+ icon="agregation"
1284
+ >
1285
+ </lit-icon-button>
1286
+ <simple-tooltip
1287
+ placement="bottom"
1288
+ >
1037
1289
  ${header.column.getIsGrouped()
1038
1290
  ? msg('Zrušit seskupení')
1039
- : msg('Seskupit sloupec')}</simple-tooltip
1040
- >
1291
+ : msg('Seskupit sloupec')}</simple-tooltip
1292
+ >
1041
1293
  `
1042
- : ''}
1294
+ : ''}
1043
1295
  `
1044
- : html `
1045
- <lit-data-grid-action-buttons-popover
1046
- .group="${header.column.getToggleGroupingHandler()}"
1047
- .pin="${() => this.togglePin(header)}"
1048
- .header="${header}"
1296
+ : html `
1297
+ <lit-data-grid-action-buttons-popover
1298
+ .group="${header.column.getToggleGroupingHandler()}"
1299
+ .pin="${() => this.togglePin(header)}"
1300
+ .header="${header}"
1049
1301
  .table="${this
1050
- .table}"
1051
- ></lit-data-grid-action-buttons-popover>
1052
- `}
1053
- </div>
1054
- </div>
1055
- </div>
1056
- </div>
1302
+ .table}"
1303
+ ></lit-data-grid-action-buttons-popover>
1304
+ `}
1305
+ ${this
1306
+ .enableColumnOrdering &&
1307
+ !header.column.getIsPinned() &&
1308
+ !header.column.getIsGrouped() &&
1309
+ ![
1310
+ 'checkbox',
1311
+ 'actions',
1312
+ ].includes(header
1313
+ .column
1314
+ .id)
1315
+ ? html `<div
1316
+ class="drag-handle"
1317
+ >
1318
+ <lit-icon
1319
+ icon="hamburger"
1320
+ size="1rem"
1321
+ ></lit-icon>
1322
+ </div>
1323
+ <simple-tooltip
1324
+ placement="bottom"
1325
+ >${msg('Přesunout sloupec')}</simple-tooltip
1326
+ > `
1327
+ : null}
1328
+ </div>
1329
+ </div>
1330
+ </div>
1331
+ </div>
1057
1332
  ${header.column.getCanFilter()
1058
- ? html `
1059
- <div>
1060
- <filter-inputs
1333
+ ? html `
1334
+ <div>
1335
+ <filter-inputs
1061
1336
  .minFilterCharacters=${this
1062
- .minFilterCharacters}
1063
- .column=${header.column}
1337
+ .minFilterCharacters}
1338
+ .column=${header.column}
1064
1339
  .dateFormat=${this
1065
- .dateFormat}
1340
+ .dateFormat}
1066
1341
  .userLang=${this
1067
- .userLang}
1342
+ .userLang}
1068
1343
  @filter-tab=${this
1069
- .handleFilterTabNavigation}
1344
+ .handleFilterTabNavigation}
1070
1345
  .server=${this
1071
- .server}
1072
- .operator=${this.operatorMap.get(header
1073
- .column
1074
- .id)}
1075
- ></filter-inputs>
1076
- </div>
1346
+ .server}
1347
+ .value="${value}"
1348
+ .operator="${operator}"
1349
+ .filterVariant="${filterVariant}"
1350
+ .filterOperators="${filterOperators}"
1351
+ ></filter-inputs>
1352
+ </div>
1077
1353
  `
1078
- : null}
1079
- `}
1080
- <div
1081
- class="resize-handle"
1354
+ : null}
1355
+ `}
1356
+ <div
1357
+ class="resize-handle"
1082
1358
  @dblclick="${(event) => {
1083
1359
  if (event.target.classList.contains('resize-handle')) {
1084
1360
  header.column.resetSize();
1085
1361
  }
1086
- }}"
1362
+ }}"
1087
1363
  @mousedown="${(event) => {
1364
+ event.preventDefault();
1365
+ event.stopPropagation();
1088
1366
  if (event.target.classList.contains('resize-handle')) {
1089
1367
  header.getResizeHandler()(event);
1090
1368
  }
1091
- }}"
1369
+ }}"
1092
1370
  @touchstart="${(event) => {
1371
+ event.preventDefault();
1372
+ event.stopPropagation();
1093
1373
  if (event.target.classList.contains('resize-handle')) {
1094
1374
  header.getResizeHandler()(event);
1095
1375
  }
1096
- }}"
1097
- ></div>
1098
- </th>
1376
+ }}"
1377
+ ></div>
1378
+ </th>
1099
1379
  `;
1100
- })}
1380
+ })}
1101
1381
  ${virtualPaddingRight
1102
- ? html `
1103
- <th
1104
- style=" display: flex; width: ${virtualPaddingRight}px;"
1105
- ></th>
1382
+ ? html `
1383
+ <th
1384
+ style=" display: flex; width: ${virtualPaddingRight}px;"
1385
+ ></th>
1106
1386
  `
1107
- : ''}
1108
- </tr>
1387
+ : ''}
1388
+ </tr>
1109
1389
  `;
1110
- })}
1390
+ })}
1111
1391
  ${this.isLoading
1112
- ? html `
1113
- <div style="position: absolute; bottom: 0px; width: 100%;">
1114
- <lit-loading-bar></lit-loading-bar>
1115
- </div>
1392
+ ? html `
1393
+ <div style="position: absolute; bottom: 0px; width: 100%;">
1394
+ <lit-loading-bar></lit-loading-bar>
1395
+ </div>
1116
1396
  `
1117
- : ''}
1118
- </thead>
1119
-
1120
- <tbody
1397
+ : ''}
1398
+ </thead>
1399
+
1400
+ <tbody
1401
+ @keydown=${this.handleKeyDown}
1402
+ tabindex="0"
1403
+ part="dataGrid-body"
1121
1404
  style="height: ${rowVirtualizer &&
1122
- this.table.getRowModel().rows.length > 0
1405
+ rows.length > 0
1123
1406
  ? rowVirtualizer.getTotalSize() + 'px'
1124
- : 'auto'};"
1125
- >
1407
+ : 'auto'};"
1408
+ >
1126
1409
  ${rows.length > 0
1127
1410
  ? repeat(rowItems, (item) => item.key, (item) => {
1128
1411
  const row = rows[item.index];
@@ -1138,48 +1421,51 @@ let LitDataGridTanstack = class LitDataGridTanstack extends LitElement {
1138
1421
  transform: rowVirtualizer
1139
1422
  ? `translateY(${item.start}px)`
1140
1423
  : 'none',
1141
- height: `${this.rowHeight}px`,
1142
- lineHeight: `${this.rowHeight}px`,
1424
+ height: `${this.getRowHeight()}px`,
1425
+ lineHeight: `${this.getRowHeight()}px`,
1143
1426
  position: rowVirtualizer ? 'absolute' : 'relative',
1144
1427
  };
1145
1428
  return row
1146
- ? html `
1147
- <tr
1429
+ ? html `
1430
+ <tr
1431
+ tabindex=${this.enableRowSelection
1432
+ ? '0'
1433
+ : undefined}
1434
+ data-row-index="${row.index}"
1148
1435
  class="${this.rowsSelected[row.id]
1149
1436
  ? 'selected body'
1150
- : 'body'}"
1151
- data-index="${item.index}"
1437
+ : 'body'}"
1438
+ data-index="${item.index}"
1152
1439
  @click="${row.getIsGrouped()
1153
1440
  ? row.getToggleExpandedHandler()
1154
- : (e) => this.handleRowClick(e, row)}"
1155
- @dblclick="${() => this.handleRowDoubleClick(row)}"
1156
- style="${styleMap(rowStyle)}"
1157
- ${ref((node) => {
1158
- if (node &&
1159
- this.enableRowVirtualization &&
1160
- rowVirtualizer) {
1161
- // Only measure element if virtualization is enabled
1162
- rowVirtualizer.measureElement(node);
1163
- }
1164
- })}
1165
- >
1441
+ : (e) => this.handleRowClick(e, row)}"
1442
+ @mousedown=${(e) => this._onRowMouseDown(e, row)}
1443
+ @mouseup=${this._onRowMouseUp}
1444
+ @mouseleave=${this._onRowMouseUp}
1445
+ @contextmenu=${(e) => e.preventDefault()}
1446
+ @dblclick="${() => this.handleRowDoubleClick(row)}"
1447
+ style="${styleMap(rowStyle)}"
1448
+ ${ref(() => {
1449
+ // No measurement needed - using fixed row heights
1450
+ })}
1451
+ >
1166
1452
  ${virtualPaddingLeft
1167
- ? html `
1168
- <th
1169
- style=" display: flex; width: ${virtualPaddingLeft}px;"
1170
- ></th>
1453
+ ? html `
1454
+ <th
1455
+ style=" display: flex; width: ${virtualPaddingLeft}px;"
1456
+ ></th>
1171
1457
  `
1172
- : ''}
1173
- <!-- Cells for each row -->
1458
+ : ''}
1459
+ <!-- Cells for each row -->
1174
1460
  ${repeat(newBodyColumns, (cell) => cell.key, (cell) => {
1175
1461
  const buttonSize = this.getButtonSize();
1176
1462
  const { column } = cell;
1177
1463
  const style = {
1178
1464
  ...this.getCommonPinningStyles(cell.column),
1179
- width: `${cell.column.getSize()}px`,
1465
+ width: `${cell.column?.getSize()}px`,
1180
1466
  flexGrow: `${column.columnDef.size === undefined ? 1 : 'unset'}`,
1181
1467
  background: this.getCellBackgroundColor(cell),
1182
- lineHeight: `${this.rowHeight}px`,
1468
+ lineHeight: `${this.getRowHeight()}px`,
1183
1469
  padding: column.columnDef.type ===
1184
1470
  'actions' ||
1185
1471
  column.columnDef.type ===
@@ -1187,41 +1473,41 @@ let LitDataGridTanstack = class LitDataGridTanstack extends LitElement {
1187
1473
  ? '0'
1188
1474
  : '0px 14px',
1189
1475
  };
1190
- return html `
1191
- <td style="${styleMap(style)}">
1476
+ return html `
1477
+ <td style="${styleMap(style)}">
1192
1478
  ${cell.getIsGrouped()
1193
- ? html `<div
1194
- class="grouped-column"
1195
- >
1196
- <lit-icon
1197
- class="grouped-column--icon-button"
1198
- size="1.25rem"
1479
+ ? html `<div
1480
+ class="grouped-column"
1481
+ >
1482
+ <lit-icon
1483
+ class="grouped-column--icon-button"
1484
+ size="1.25rem"
1199
1485
  icon="${row.getIsExpanded()
1200
1486
  ? 'chevronDownFilled'
1201
- : 'chevron'}"
1202
- ></lit-icon>
1203
- <div
1204
- class="grouped-column--label"
1205
- >
1206
- <lit-overflow-tooltip
1207
- label=${cell.getValue()}
1208
- >
1209
- ${cell.getValue()}
1210
- </lit-overflow-tooltip>
1211
- </div>
1212
- <lit-pill
1213
- class="grouped-column--pill"
1214
- style="margin-left: 0.5rem"
1487
+ : 'chevron'}"
1488
+ ></lit-icon>
1489
+ <div
1490
+ class="grouped-column--label"
1491
+ >
1492
+ <lit-overflow-tooltip
1493
+ label=${cell.getValue()}
1494
+ >
1495
+ ${cell.getValue()}
1496
+ </lit-overflow-tooltip>
1497
+ </div>
1498
+ <lit-pill
1499
+ class="grouped-column--pill"
1500
+ style="margin-left: 0.5rem"
1215
1501
  count="${row
1216
1502
  .subRows
1217
- .length}"
1218
- ></lit-pill>
1503
+ .length}"
1504
+ ></lit-pill>
1219
1505
  </div> `
1220
1506
  : cell.getIsAggregated()
1221
- ? html `
1222
- <div
1223
- style="flex-grow:1"
1224
- >
1507
+ ? html `
1508
+ <div
1509
+ style="flex-grow:1"
1510
+ >
1225
1511
  ${flexRender(cell
1226
1512
  .column
1227
1513
  .columnDef
@@ -1229,350 +1515,519 @@ let LitDataGridTanstack = class LitDataGridTanstack extends LitElement {
1229
1515
  cell
1230
1516
  .column
1231
1517
  .columnDef
1232
- .cell, cell.getContext())}
1233
- </div>
1518
+ .cell, cell.getContext())}
1519
+ </div>
1234
1520
  `
1235
1521
  : cell.getIsPlaceholder()
1236
1522
  ? null
1237
- : html `<lit-overflow-tooltip
1238
- placement="right"
1239
- label=${cell.getValue()}
1523
+ : html `<lit-overflow-tooltip
1524
+ placement="right"
1525
+ label=${cell.getValue()}
1240
1526
  >${flexRender(cell
1241
1527
  .column
1242
1528
  .columnDef
1243
- .cell, cell.getContext())}</lit-overflow-tooltip
1244
- >`}
1245
- </td>
1529
+ .cell, cell.getContext())}</lit-overflow-tooltip
1530
+ >`}
1531
+ </td>
1246
1532
  `;
1247
- })}
1533
+ })}
1248
1534
  ${virtualPaddingRight
1249
- ? html `
1250
- <th
1251
- style=" display: flex; width: ${virtualPaddingRight}px;"
1252
- ></th>
1535
+ ? html `
1536
+ <th
1537
+ style=" display: flex; width: ${virtualPaddingRight}px;"
1538
+ ></th>
1253
1539
  `
1254
- : ''}
1255
- </tr>
1540
+ : ''}
1541
+ </tr>
1256
1542
  `
1257
1543
  : null;
1258
1544
  })
1259
- : null}
1260
- </tbody>
1261
- </table>
1262
- <div class="footer-container">
1263
- <div class="numberCount">
1264
- ${msg('Počet záznamů')}: ${this.table.getRowModel().rows.length}
1265
- <pre>/</pre>
1266
- ${this.server
1267
- ? this.totalNumberRows
1545
+ : null}
1546
+ </tbody>
1547
+ </table>
1548
+ ${!this.hideFooter
1549
+ ? html `
1550
+ <slot
1551
+ part="dataGrid-footer"
1552
+ name="dataGridFooter"
1553
+ class="footer-container"
1554
+ >
1555
+ <div class="numberCount">
1556
+ ${msg('Počet záznamů')}:
1557
+ ${rows.length}
1558
+ <pre>/</pre>
1559
+ ${this.server
1268
1560
  ? this.totalNumberRows
1269
- : '?'
1270
- : this.table.getRowModel().rows.length}
1271
- ${this.server
1272
- ? html `<lit-icon-button
1273
- icon="reload"
1274
- size="small"
1275
- variant="text"
1276
- @click="${() => this.handleGetTotalNumber()}"
1277
- ></lit-icon-button>`
1278
- : ''}
1279
- </div>
1280
- <div class="right-actions">
1281
- <lit-data-grid-density-popover
1282
- .density="${this.rowDensity}"
1283
- .setDensity="${(density) => this.handleSetDensity(density)}"
1284
- >
1285
- </lit-data-grid-density-popover>
1286
- <lit-responsive-button
1287
- size="small"
1288
- variant="text"
1289
- label=${msg('Přizpůsobit sloupce')}
1290
- icon="columns"
1291
- @click=${() => this.table.resetColumnSizing()}
1292
- ></lit-responsive-button>
1293
- ${this.exportData
1294
- ? html `
1295
- <lit-data-grid-export-popover
1296
- .exportToCsv="${typeof this.exportExcelFn === 'function'
1297
- ? () => this.exportCsvFn && this.exportCsvFn()
1298
- : () => this.exportDataToCsv()}"
1299
- .exportToExcel="${typeof this.exportExcelFn === 'function'
1300
- ? () => this.exportExcelFn && this.exportExcelFn()
1301
- : () => this.exportDataToExcel()}"
1302
- .disabledButtons="${this.isLoading}"
1303
- >
1304
- </lit-data-grid-export-popover>
1305
- `
1306
- : null}
1307
- </div>
1308
- </div>
1309
- </div>
1310
- ${this.table.getRowModel().rows.length < 1 && !this.isLoading
1311
- ? html ` <div class="data-grid__empty">
1312
- <div style="max-height: 7.125rem; max-width: 7.125rem">
1313
- <not-found></not-found>
1314
- </div>
1315
- ${msg('Nic dalšího tu není')}
1561
+ ? this.totalNumberRows
1562
+ : '?'
1563
+ : rows.length}
1564
+ ${this.server
1565
+ ? html `<lit-icon-button
1566
+ icon="reload"
1567
+ size="mini"
1568
+ variant="text"
1569
+ @click="${() => this.handleGetTotalNumber()}"
1570
+ style="margin-left: 0.2rem; margin-top: -0.1rem"
1571
+ ></lit-icon-button>`
1572
+ : ''}
1573
+ </div>
1574
+ <div class="right-actions">
1575
+ <lit-data-grid-density-popover
1576
+ .density="${this.rowDensity}"
1577
+ .setDensity="${(density) => this.handleSetDensity(density)}"
1578
+ >
1579
+ </lit-data-grid-density-popover>
1580
+ <lit-responsive-button
1581
+ size="medium"
1582
+ variant="text"
1583
+ label=${msg('Přizpůsobit sloupce')}
1584
+ icon="columns"
1585
+ @click=${() => this.table.resetColumnSizing()}
1586
+ ></lit-responsive-button>
1587
+ ${this.exportData
1588
+ ? html `
1589
+ <lit-data-grid-export-popover
1590
+ .exportToCsv="${typeof this.exportExcelFn ===
1591
+ 'function'
1592
+ ? () => this.exportCsvFn && this.exportCsvFn()
1593
+ : () => this.exportDataToCsv()}"
1594
+ .exportToExcel="${typeof this.exportExcelFn ===
1595
+ 'function'
1596
+ ? () => this.exportExcelFn &&
1597
+ this.exportExcelFn()
1598
+ : () => this.exportDataToExcel()}"
1599
+ .disabledButtons="${this.isLoading}"
1600
+ >
1601
+ </lit-data-grid-export-popover>
1602
+ `
1603
+ : null}
1604
+ ${this.enableSettings
1605
+ ? html `
1606
+ <div>
1607
+ <lit-responsive-button
1608
+ variant="dashed"
1609
+ label="${msg('Přiřadit sloupec')}"
1610
+ icon="add"
1611
+ style="display: inline-block"
1612
+ @click="${this.toggleCustomPopover}"
1613
+ ></lit-responsive-button>
1614
+
1615
+ <simple-popper
1616
+ .showing=${this.isOpen}
1617
+ .placement=${'top-end'}
1618
+ .manualOpening=${true}
1619
+ .maxWidthAsTarget=${false}
1620
+ .onClose=${() => this.closePopover()}
1621
+ >
1622
+ <div
1623
+ class="popper-input"
1624
+ style="position: sticky; top: 0; z-index: 1;"
1625
+ >
1626
+ <lit-input
1627
+ .value=${this.filterText}
1628
+ .onInput=${(value) => {
1629
+ this.filterText =
1630
+ value?.toLowerCase?.() ||
1631
+ '';
1632
+ }}
1633
+ .onClear=${() => {
1634
+ this.filterText = '';
1635
+ }}
1636
+ placeholder="${msg('Zadejte název sloupce')}"
1637
+ ></lit-input>
1638
+ </div>
1639
+ <lit-menu tabindex="0">
1640
+ ${this.columns
1641
+ .filter((col) => {
1642
+ const name = col?.headerName?.toLowerCase() ||
1643
+ col?.field.toLowerCase();
1644
+ return name.includes(this.filterText);
1645
+ })
1646
+ .sort((a, b) => {
1647
+ const aUnderscore = a.field.startsWith('_');
1648
+ const bUnderscore = b.field.startsWith('_');
1649
+ if (aUnderscore && !bUnderscore)
1650
+ return 1;
1651
+ if (!aUnderscore && bUnderscore)
1652
+ return -1;
1653
+ return (a.headerName || a.field).localeCompare(b.headerName || b.field);
1654
+ })
1655
+ .map((col) => html `
1656
+ <lit-menu-item
1657
+ .onClick=${() => this.toggleColumn(col?.field)}
1658
+ .isActive=${!(this
1659
+ .columnVisibility?.[col?.field] === false)}
1660
+ >
1661
+ <span
1662
+ class="menu-item--multiple"
1663
+ >
1664
+ <lit-checkbox
1665
+ class="cursor"
1666
+ .checked=${!(this
1667
+ .columnVisibility?.[col
1668
+ ?.field] === false)}
1669
+ ></lit-checkbox>
1670
+ ${col?.headerName ||
1671
+ col?.field}
1672
+ </span>
1673
+ </lit-menu-item>
1674
+ `)}
1675
+ </lit-menu>
1676
+
1677
+ ${isEqual(filteredColumns.length, 0)
1678
+ ? html `
1679
+ <div
1680
+ style="display: flex; flex-direction: column; align-items: center; padding: 1rem;"
1681
+ >
1682
+ <div
1683
+ style="max-height: 6rem; max-width: 6rem;"
1684
+ >
1685
+ <not-found></not-found>
1686
+ </div>
1687
+ <div>
1688
+ ${msg('Nenalezeno')}
1689
+ </div>
1690
+ </div>
1691
+ `
1692
+ : null}
1693
+ </simple-popper>
1694
+
1695
+ <lit-icon-button
1696
+ icon="administration"
1697
+ @click="${this.toggleModal}"
1698
+ variant="dashed"
1699
+ style="display: inline-block"
1700
+ ></lit-icon-button>
1701
+ <data-grid-settings
1702
+ .onClose="${() => {
1703
+ this.isOpenModal = false;
1704
+ }}"
1705
+ .isOpenModal="${this.isOpenModal}"
1706
+ .enableFiltering="${this.enableFiltering}"
1707
+ .enableSorting="${this.enableSorting}"
1708
+ .columnDefaultSize="${this
1709
+ .columnDefaultSize}"
1710
+ .columnGroupedColor="${this
1711
+ .columnGroupedColor}"
1712
+ .rowAggregationColor="${this
1713
+ .rowAggregationColor}"
1714
+ .enableGrouping="${this.enableGrouping}"
1715
+ .enableColumnPinning="${this
1716
+ .enableColumnPinning}"
1717
+ .exportData="${this.exportData}"
1718
+ .actionButtonsInMenu="${this
1719
+ .actionButtonsInMenu}"
1720
+ .hideFooter="${this.hideFooter}"
1721
+ .onSettingsChangedModal="${this.onSettingsChangedCallback.bind(this)}"
1722
+ ></data-grid-settings>
1723
+ </div>
1724
+ `
1725
+ : null}
1726
+ </div>
1727
+ </slot>
1728
+ `
1729
+ : ''}
1730
+ </div>
1731
+ ${rows.length < 1 && !this.isLoading
1732
+ ? html ` <div class="data-grid__empty">
1733
+ <div style="max-height: 7.125rem; max-width: 7.125rem">
1734
+ <not-found></not-found>
1735
+ </div>
1736
+ <div class="data-grid__empty-text">${msg('Nic dalšího tu není')}</div>
1316
1737
  </div>`
1317
- : null}
1318
- </div>
1738
+ : null}
1739
+ </div>
1319
1740
  `;
1320
1741
  }
1321
1742
  };
1322
1743
  LitDataGridTanstack.styles = [
1323
1744
  // styles,
1324
- css `
1325
- *,
1326
- *::before,
1327
- *::after {
1328
- margin: 0;
1329
- padding: 0;
1330
- box-sizing: border-box;
1331
- }
1332
-
1333
- display: block;
1334
- font-family: 'Inter', sans-serif;
1335
- box-sizing: border-box;
1336
-
1337
- td {
1338
- padding: 0px;
1339
- }
1340
-
1341
- .data-grid__wrapper {
1342
- position: relative;
1343
- background-color: var(--background-paper, #fff);
1344
- height: 100%;
1345
- z-index: 1;
1346
- }
1347
-
1348
- .grid {
1349
- overflow: auto;
1350
- position: relative;
1351
- height: 100%;
1352
- }
1353
-
1354
- .data-grid__empty {
1355
- position: absolute;
1356
- top: 30%;
1357
- left: 50%;
1358
- transform: translate(-50%, -50%);
1359
- font-size: 0.875rem;
1360
- text-align: center;
1361
- }
1362
-
1363
- table {
1364
- border-collapse: collapse;
1365
- border-spacing: 0;
1366
- width: 100% !important;
1367
- height: calc(100% - 38px);
1368
- }
1369
-
1370
- thead {
1371
- display: flex;
1372
- position: sticky;
1373
- top: 0;
1374
- z-index: 10;
1375
- background-color: var(--background-paper, #fff);
1376
- border-bottom: 1px solid var(--color-divider, #d0d3db);
1377
- }
1378
-
1379
- tr.head {
1380
- display: flex;
1381
- width: 100%;
1382
- }
1383
-
1384
- th.head {
1385
- display: block;
1386
- position: relative;
1387
- padding: 0px 6px;
1388
- gap: 0.25rem;
1389
- //z-index: auto !important;
1390
- }
1391
-
1392
- tbody {
1393
- display: grid;
1394
- position: relative;
1395
- }
1396
-
1397
- tr.body {
1398
- width: 100%;
1399
- border-bottom: 1px solid var(--color-divider, #d0d3db);
1400
- display: flex;
1401
- overflow: visible;
1402
- }
1403
-
1404
- tr.body:hover {
1405
- cursor: pointer;
1406
- background-color: var(--background-default, #eff3f4);
1407
- }
1408
-
1409
- td {
1410
- display: table-cell;
1411
- white-space: nowrap;
1412
- overflow: hidden;
1413
- padding: 0px 14px;
1414
- font-weight: 500;
1415
- font-size: 12px;
1416
- color: var(--text-primary, #111827);
1417
- display: flex;
1418
- align-items: center;
1419
- }
1420
-
1421
- .column-header {
1422
- font-size: 11px;
1423
- font-weight: 600;
1424
- color: var(--text-secondary, #5d6371);
1425
- cursor: pointer;
1426
- gap: 0.25rem;
1427
- justify-content: center;
1428
- align-items: center;
1429
- margin: 0 0.25rem;
1430
- overflow: hidden;
1431
- white-space: nowrap;
1432
- text-overflow: ellipsis;
1433
- height: inherit;
1434
- display: flex;
1435
- }
1436
-
1437
- .ellipsis {
1438
- overflow: hidden;
1439
- white-space: nowrap;
1440
- text-overflow: ellipsis;
1441
- }
1442
-
1443
- .icons-group-pin {
1444
- display: flex;
1445
- height: 100%;
1446
- justify-content: space-between;
1447
- flex-grow: 1;
1448
- }
1449
-
1450
- .flex {
1451
- display: flex;
1452
- }
1453
-
1454
- .resizer {
1455
- height: 23px;
1456
- padding: 0 0 0 6px;
1457
- text-align: start;
1458
- //cursor: col-resize;
1459
- user-select: none;
1460
- touch-action: none;
1461
- }
1462
-
1463
- .resize-handle {
1464
- position: absolute;
1465
- top: 0;
1466
- right: 0px;
1467
- width: 6px;
1468
- height: 100%;
1469
- background: transparent;
1470
- cursor: col-resize;
1471
- transition: background-color 0.2s ease-in-out;
1472
- // border-radius: 5px;
1473
- // padding-bottom: 5px;
1474
- }
1475
-
1476
- .resize-handle:hover {
1477
- border-right: 2px solid var(--color-primary-main, #75b603);
1478
- }
1479
-
1480
- .resizer.ltr {
1481
- right: 0;
1482
- }
1483
-
1484
- .resizer.rtl {
1485
- left: 0;
1486
- }
1487
-
1488
- .resizer.is-resizing {
1489
- opacity: 1;
1490
- }
1491
-
1492
- .footer-container {
1493
- position: sticky;
1494
- left: 0;
1495
- bottom: 0;
1496
- background-color: var(--background-paper, #fff);
1497
- width: auto;
1498
- border-top: 1px solid var(--color-divider, #d0d3db);
1499
- height: 2.375rem;
1500
- display: flex;
1501
- flex-direction: row;
1502
- justify-content: space-between;
1503
- align-items: center;
1504
- // padding: 0 16px;
1505
- z-index: 10;
1506
- }
1507
-
1508
- .right-actions {
1509
- position: absolute;
1510
- right: 0;
1511
- display: flex;
1512
- }
1513
-
1514
- .numberCount {
1515
- margin: 0.375rem 0;
1516
- font-size: 12px;
1517
- font-weight: 400;
1518
- color: var(--text-primary, #111827);
1519
- display: flex;
1520
- align-items: center;
1521
- }
1522
-
1523
- .scroll-button {
1524
- position: absolute;
1525
- top: 50%;
1526
- transform: translateY(-50%);
1527
- z-index: 1000;
1528
- cursor: pointer;
1529
- }
1530
-
1531
- .scroll-button.left {
1532
- left: 3rem;
1533
- }
1534
-
1535
- .scroll-button.right {
1536
- right: 3rem;
1537
- }
1538
-
1539
- .selected {
1540
- background-color: var(--color-primary-light, #f0fadf);
1541
- }
1542
-
1543
- .sortFilled {
1544
- visibility: hidden;
1545
- }
1546
- .header {
1547
- display: flex;
1548
- align-items: center;
1549
- height: 100%;
1550
- }
1551
- .header:hover .sortFilled {
1552
- visibility: visible;
1553
- }
1554
- .grouped-column {
1555
- display: flex;
1556
- align-items: center;
1557
- justify-content: space-between;
1558
- width: 100%;
1559
- gap: 0.25rem;
1560
- }
1561
- .grouped-column--icon-button {
1562
- display: flex;
1563
- align-items: center;
1564
- position: relative;
1565
- top: -1.5px;
1566
- }
1567
- .grouped-column--label {
1568
- display: flex;
1569
- align-items: center;
1570
- overflow: hidden;
1571
- flex-grow: 1;
1572
- }
1573
- .grouped-column--pill {
1574
- margin-left: 0.5rem;
1575
- }
1745
+ css `
1746
+ *,
1747
+ *::before,
1748
+ *::after {
1749
+ margin: 0;
1750
+ padding: 0;
1751
+ box-sizing: border-box;
1752
+ }
1753
+
1754
+ display: block;
1755
+ font-family: 'Inter', sans-serif;
1756
+ box-sizing: border-box;
1757
+
1758
+ td {
1759
+ padding: 0px;
1760
+ }
1761
+ .data-grid__wrapper {
1762
+ position: relative;
1763
+ background-color: var(--background-paper, #fff);
1764
+ height: 100%;
1765
+ z-index: 1;
1766
+ }
1767
+
1768
+ .grid {
1769
+ overflow: auto;
1770
+ position: relative;
1771
+ height: 100%;
1772
+ }
1773
+
1774
+ .data-grid__empty {
1775
+ position: absolute;
1776
+ top: 50%;
1777
+ left: 50%;
1778
+ transform: translate(-50%, -50%);
1779
+ font-size: 0.875rem;
1780
+ text-align: center;
1781
+ }
1782
+
1783
+ table {
1784
+ border-collapse: collapse;
1785
+ border-spacing: 0;
1786
+ width: 99% !important;
1787
+ height: calc(100% - 38px);
1788
+ }
1789
+
1790
+ thead {
1791
+ display: flex;
1792
+ position: sticky;
1793
+ top: 0;
1794
+ z-index: 10;
1795
+ background-color: var(--background-paper, #fff);
1796
+ border-bottom: 1px solid var(--color-divider, #d0d3db);
1797
+ }
1798
+
1799
+ tr.head {
1800
+ display: flex;
1801
+ width: 100%;
1802
+ }
1803
+
1804
+ th.head {
1805
+ display: block;
1806
+ position: relative;
1807
+ padding: 0 6px;
1808
+ gap: 0.25rem;
1809
+ //z-index: auto !important;
1810
+ }
1811
+
1812
+ tbody {
1813
+ display: grid;
1814
+ position: relative;
1815
+ outline: none;
1816
+ }
1817
+
1818
+ tr.body {
1819
+ width: 100%;
1820
+ border-bottom: 1px solid var(--color-divider, #d0d3db);
1821
+ display: flex;
1822
+ overflow: visible;
1823
+ }
1824
+ tr:focus {
1825
+ background-color: var(--color-primary-light, #f0fadf);
1826
+ outline: none;
1827
+ }
1828
+ // tr.selected:focus {
1829
+ // background-color: var(--color-primary-main, #f0fadf);
1830
+ // outline: none;
1831
+ // }
1832
+
1833
+ tr.body:hover:not(.selected):not(:focus) {
1834
+ cursor: pointer;
1835
+ background-color: var(--background-default, #eff3f4);
1836
+ }
1837
+
1838
+ td {
1839
+ display: table-cell;
1840
+ white-space: nowrap;
1841
+ overflow: hidden;
1842
+ padding: 0px 14px;
1843
+ font-weight: 500;
1844
+ font-size: 12px;
1845
+ color: var(--text-primary, #111827);
1846
+ display: flex;
1847
+ align-items: center;
1848
+ }
1849
+
1850
+ .column-header {
1851
+ font-size: 11px;
1852
+ font-weight: 600;
1853
+ color: var(--text-secondary, #5d6371);
1854
+ cursor: pointer;
1855
+ gap: 0.25rem;
1856
+ justify-content: center;
1857
+ align-items: center;
1858
+ margin: 0 0.25rem;
1859
+ overflow: hidden;
1860
+ white-space: nowrap;
1861
+ text-overflow: ellipsis;
1862
+ height: inherit;
1863
+ display: flex;
1864
+ }
1865
+ .no-select,
1866
+ .no-select * {
1867
+ user-select: none !important;
1868
+ }
1869
+ .ellipsis {
1870
+ overflow: hidden;
1871
+ white-space: nowrap;
1872
+ text-overflow: ellipsis;
1873
+ }
1874
+
1875
+ .icons-group-pin {
1876
+ display: flex;
1877
+ height: 100%;
1878
+ justify-content: space-between;
1879
+ flex-grow: 1;
1880
+ }
1881
+
1882
+ .flex {
1883
+ display: flex;
1884
+ }
1885
+
1886
+ .drag-handle {
1887
+ display: flex;
1888
+ align-items: center;
1889
+ justify-content: center;
1890
+ padding: 1px 6px;
1891
+ cursor: grab;
1892
+ }
1893
+
1894
+ .resizer {
1895
+ height: 23px;
1896
+ padding: 0 0 0 6px;
1897
+ text-align: start;
1898
+ //cursor: col-resize;
1899
+ user-select: none;
1900
+ touch-action: none;
1901
+ }
1902
+
1903
+ .resize-handle {
1904
+ position: absolute;
1905
+ top: 0;
1906
+ right: 0px;
1907
+ width: 6px;
1908
+ height: 100%;
1909
+ background: transparent;
1910
+ cursor: col-resize;
1911
+ transition: background-color 0.2s ease-in-out;
1912
+ // border-radius: 5px;
1913
+ // padding-bottom: 5px;
1914
+ }
1915
+
1916
+ .resize-handle:hover {
1917
+ border-right: 2px solid var(--color-primary-main, #75b603);
1918
+ }
1919
+
1920
+ .resizer.ltr {
1921
+ right: 0;
1922
+ }
1923
+
1924
+ .resizer.rtl {
1925
+ left: 0;
1926
+ }
1927
+
1928
+ .resizer.is-resizing {
1929
+ opacity: 1;
1930
+ }
1931
+
1932
+ .footer-container {
1933
+ position: sticky;
1934
+ left: 0;
1935
+ bottom: 0;
1936
+ background-color: var(--background-paper, #fff);
1937
+ width: auto;
1938
+ border-top: 1px solid var(--color-divider, #d0d3db);
1939
+ height: 2.375rem;
1940
+ display: flex;
1941
+ flex-direction: row;
1942
+ justify-content: space-between;
1943
+ align-items: center;
1944
+ // padding: 0 16px;
1945
+ z-index: 10;
1946
+ }
1947
+
1948
+ .right-actions {
1949
+ position: absolute;
1950
+ right: 0;
1951
+ display: flex;
1952
+ }
1953
+
1954
+ .numberCount {
1955
+ margin: 0.375rem 0;
1956
+ font-size: 12px;
1957
+ font-weight: 400;
1958
+ color: var(--text-primary, #111827);
1959
+ display: flex;
1960
+ align-items: center;
1961
+ }
1962
+
1963
+ .scroll-button {
1964
+ position: absolute;
1965
+ top: 50%;
1966
+ transform: translateY(-50%);
1967
+ z-index: 1000;
1968
+ cursor: pointer;
1969
+ }
1970
+
1971
+ .scroll-button.left {
1972
+ left: 3rem;
1973
+ }
1974
+
1975
+ .scroll-button.right {
1976
+ right: 3rem;
1977
+ }
1978
+
1979
+ .selected {
1980
+ background-color: var(--color-primary-light, #f0fadf);
1981
+ }
1982
+
1983
+ .sortFilled {
1984
+ visibility: hidden;
1985
+ }
1986
+ .header {
1987
+ display: flex;
1988
+ align-items: center;
1989
+ height: 100%;
1990
+ }
1991
+ .header:hover .sortFilled {
1992
+ visibility: visible;
1993
+ }
1994
+ .grouped-column {
1995
+ display: flex;
1996
+ align-items: center;
1997
+ justify-content: space-between;
1998
+ width: 100%;
1999
+ gap: 0.25rem;
2000
+ }
2001
+ .grouped-column--icon-button {
2002
+ display: flex;
2003
+ align-items: center;
2004
+ position: relative;
2005
+ top: -1.5px;
2006
+ }
2007
+ .grouped-column--label {
2008
+ display: flex;
2009
+ align-items: center;
2010
+ overflow: hidden;
2011
+ flex-grow: 1;
2012
+ }
2013
+ .grouped-column--pill {
2014
+ margin-left: 0.5rem;
2015
+ }
2016
+ .filterCirclePoint {
2017
+ width: 8px;
2018
+ height: 8px;
2019
+ border-radius: 50%;
2020
+ background-color: var(--color-primary-main, #75b603);
2021
+ display: inline-block;
2022
+ vertical-align: middle;
2023
+ }
2024
+ .cursor {
2025
+ cursor: pointer;
2026
+ color: var(--text-secondary, #5d6371);
2027
+ }
2028
+ .data-grid__empty-text {
2029
+ color: var(--text-primary, #5d6371);
2030
+ }
1576
2031
  `,
1577
2032
  ];
1578
2033
  __decorate([
@@ -1605,9 +2060,15 @@ __decorate([
1605
2060
  __decorate([
1606
2061
  property({ type: Boolean })
1607
2062
  ], LitDataGridTanstack.prototype, "enableColumnPinning", void 0);
2063
+ __decorate([
2064
+ property({ type: Boolean })
2065
+ ], LitDataGridTanstack.prototype, "enableColumnOrdering", void 0);
1608
2066
  __decorate([
1609
2067
  property({ type: Boolean })
1610
2068
  ], LitDataGridTanstack.prototype, "enableGrouping", void 0);
2069
+ __decorate([
2070
+ property({ type: Boolean })
2071
+ ], LitDataGridTanstack.prototype, "enablePinning", void 0);
1611
2072
  __decorate([
1612
2073
  property({ type: Boolean })
1613
2074
  ], LitDataGridTanstack.prototype, "exportData", void 0);
@@ -1632,9 +2093,6 @@ __decorate([
1632
2093
  __decorate([
1633
2094
  property({ type: Object })
1634
2095
  ], LitDataGridTanstack.prototype, "columnSizing", void 0);
1635
- __decorate([
1636
- property({ type: String })
1637
- ], LitDataGridTanstack.prototype, "requestUrl", void 0);
1638
2096
  __decorate([
1639
2097
  property({ type: Array })
1640
2098
  ], LitDataGridTanstack.prototype, "leftPinnedColumns", void 0);
@@ -1644,6 +2102,9 @@ __decorate([
1644
2102
  __decorate([
1645
2103
  property({ type: Boolean })
1646
2104
  ], LitDataGridTanstack.prototype, "enableFiltering", void 0);
2105
+ __decorate([
2106
+ property({ type: Boolean })
2107
+ ], LitDataGridTanstack.prototype, "enableSorting", void 0);
1647
2108
  __decorate([
1648
2109
  property({ type: String })
1649
2110
  ], LitDataGridTanstack.prototype, "userLang", void 0);
@@ -1653,6 +2114,42 @@ __decorate([
1653
2114
  __decorate([
1654
2115
  property({ type: Boolean })
1655
2116
  ], LitDataGridTanstack.prototype, "isLoading", void 0);
2117
+ __decorate([
2118
+ property({ type: Boolean })
2119
+ ], LitDataGridTanstack.prototype, "enableRowSelection", void 0);
2120
+ __decorate([
2121
+ property({ type: Array })
2122
+ ], LitDataGridTanstack.prototype, "initialFiltering", void 0);
2123
+ __decorate([
2124
+ property({ type: Boolean })
2125
+ ], LitDataGridTanstack.prototype, "server", void 0);
2126
+ __decorate([
2127
+ property({ type: Number })
2128
+ ], LitDataGridTanstack.prototype, "scrollEndThreshold", void 0);
2129
+ __decorate([
2130
+ property({ type: String })
2131
+ ], LitDataGridTanstack.prototype, "rowDensity", void 0);
2132
+ __decorate([
2133
+ property({ type: Boolean })
2134
+ ], LitDataGridTanstack.prototype, "enableMultiRowSelection", void 0);
2135
+ __decorate([
2136
+ property({ type: Number })
2137
+ ], LitDataGridTanstack.prototype, "totalNumberRows", void 0);
2138
+ __decorate([
2139
+ property({ type: Number })
2140
+ ], LitDataGridTanstack.prototype, "minFilterCharacters", void 0);
2141
+ __decorate([
2142
+ property({ type: Boolean })
2143
+ ], LitDataGridTanstack.prototype, "localizeDate", void 0);
2144
+ __decorate([
2145
+ property({ type: Boolean })
2146
+ ], LitDataGridTanstack.prototype, "rowsSelected", void 0);
2147
+ __decorate([
2148
+ property({ type: Boolean })
2149
+ ], LitDataGridTanstack.prototype, "enableSettings", void 0);
2150
+ __decorate([
2151
+ property({ attribute: false })
2152
+ ], LitDataGridTanstack.prototype, "onSettingsChanged", void 0);
1656
2153
  __decorate([
1657
2154
  property({ type: Function })
1658
2155
  ], LitDataGridTanstack.prototype, "onRowClick", void 0);
@@ -1667,58 +2164,55 @@ __decorate([
1667
2164
  ], LitDataGridTanstack.prototype, "rowDensityChange", void 0);
1668
2165
  __decorate([
1669
2166
  property({ type: Function })
1670
- ], LitDataGridTanstack.prototype, "onColumnResize", void 0);
2167
+ ], LitDataGridTanstack.prototype, "exportExcelFn", void 0);
1671
2168
  __decorate([
1672
- property({ type: Boolean })
1673
- ], LitDataGridTanstack.prototype, "onColumnFiltersChanged", void 0);
2169
+ property({ type: Function })
2170
+ ], LitDataGridTanstack.prototype, "exportCsvFn", void 0);
1674
2171
  __decorate([
1675
- property({ type: Boolean })
1676
- ], LitDataGridTanstack.prototype, "onColumnSortChanged", void 0);
2172
+ property({ type: Function })
2173
+ ], LitDataGridTanstack.prototype, "getTotalNumberFn", void 0);
1677
2174
  __decorate([
1678
2175
  property({ type: Function })
1679
- ], LitDataGridTanstack.prototype, "onRowSelectionChanged", void 0);
2176
+ ], LitDataGridTanstack.prototype, "onCellKeyDown", void 0);
1680
2177
  __decorate([
1681
2178
  property({ type: Function })
1682
- ], LitDataGridTanstack.prototype, "exportExcelFn", void 0);
2179
+ ], LitDataGridTanstack.prototype, "getRowId", void 0);
1683
2180
  __decorate([
1684
2181
  property({ type: Function })
1685
- ], LitDataGridTanstack.prototype, "exportCsvFn", void 0);
2182
+ ], LitDataGridTanstack.prototype, "onColumnResize", void 0);
1686
2183
  __decorate([
1687
2184
  property({ type: Boolean })
1688
- ], LitDataGridTanstack.prototype, "enableRowSelection", void 0);
1689
- __decorate([
1690
- property({ type: Array })
1691
- ], LitDataGridTanstack.prototype, "initialFiltering", void 0);
2185
+ ], LitDataGridTanstack.prototype, "onColumnFiltersChanged", void 0);
1692
2186
  __decorate([
1693
2187
  property({ type: Boolean })
1694
- ], LitDataGridTanstack.prototype, "server", void 0);
2188
+ ], LitDataGridTanstack.prototype, "onColumnSortChanged", void 0);
1695
2189
  __decorate([
1696
- property({ type: Number })
1697
- ], LitDataGridTanstack.prototype, "scrollEndThreshold", void 0);
2190
+ property({ type: Function })
2191
+ ], LitDataGridTanstack.prototype, "onRowSelectionChanged", void 0);
1698
2192
  __decorate([
1699
- property({ type: String })
1700
- ], LitDataGridTanstack.prototype, "rowDensity", void 0);
2193
+ property({ type: Function })
2194
+ ], LitDataGridTanstack.prototype, "onColumnOrderChanged", void 0);
1701
2195
  __decorate([
1702
2196
  property({ type: Boolean })
1703
- ], LitDataGridTanstack.prototype, "enableMultiRowSelection", void 0);
2197
+ ], LitDataGridTanstack.prototype, "hideFooter", void 0);
2198
+ __decorate([
2199
+ property({ type: Object })
2200
+ ], LitDataGridTanstack.prototype, "columnVisibility", void 0);
1704
2201
  __decorate([
1705
2202
  property({ type: Function })
1706
- ], LitDataGridTanstack.prototype, "getTotalNumberFn", void 0);
2203
+ ], LitDataGridTanstack.prototype, "onColumnVisibilityChanged", void 0);
1707
2204
  __decorate([
1708
- property({ type: Number })
1709
- ], LitDataGridTanstack.prototype, "totalNumberRows", void 0);
2205
+ property({ type: Function })
2206
+ ], LitDataGridTanstack.prototype, "onMouseDown", void 0);
1710
2207
  __decorate([
1711
- property({ type: Number })
1712
- ], LitDataGridTanstack.prototype, "minFilterCharacters", void 0);
2208
+ property({ type: Function })
2209
+ ], LitDataGridTanstack.prototype, "onRowFocusChanged", void 0);
1713
2210
  __decorate([
1714
- property({ type: Boolean })
1715
- ], LitDataGridTanstack.prototype, "localizeDate", void 0);
2211
+ property({ type: Number })
2212
+ ], LitDataGridTanstack.prototype, "focusedRowIndex", void 0);
1716
2213
  __decorate([
1717
2214
  property({ type: Boolean })
1718
- ], LitDataGridTanstack.prototype, "rowsSelected", void 0);
1719
- __decorate([
1720
- property({ type: Function })
1721
- ], LitDataGridTanstack.prototype, "getRowId", void 0);
2215
+ ], LitDataGridTanstack.prototype, "autoFocus", void 0);
1722
2216
  __decorate([
1723
2217
  state()
1724
2218
  ], LitDataGridTanstack.prototype, "rowsCount", void 0);
@@ -1733,22 +2227,25 @@ __decorate([
1733
2227
  ], LitDataGridTanstack.prototype, "disableScrollRight", void 0);
1734
2228
  __decorate([
1735
2229
  state()
1736
- ], LitDataGridTanstack.prototype, "filters", void 0);
2230
+ ], LitDataGridTanstack.prototype, "columnOrder", void 0);
1737
2231
  __decorate([
1738
2232
  state()
1739
- ], LitDataGridTanstack.prototype, "filtersServer", void 0);
2233
+ ], LitDataGridTanstack.prototype, "table", void 0);
1740
2234
  __decorate([
1741
2235
  state()
1742
- ], LitDataGridTanstack.prototype, "sorting", void 0);
2236
+ ], LitDataGridTanstack.prototype, "isOpen", void 0);
1743
2237
  __decorate([
1744
2238
  state()
1745
- ], LitDataGridTanstack.prototype, "rowExpanded", void 0);
2239
+ ], LitDataGridTanstack.prototype, "filterText", void 0);
1746
2240
  __decorate([
1747
2241
  state()
1748
- ], LitDataGridTanstack.prototype, "table", void 0);
2242
+ ], LitDataGridTanstack.prototype, "isOpenModal", void 0);
1749
2243
  __decorate([
1750
- state()
1751
- ], LitDataGridTanstack.prototype, "rowHeight", void 0);
2244
+ query('tbody')
2245
+ ], LitDataGridTanstack.prototype, "tableBody", void 0);
2246
+ __decorate([
2247
+ query('.grid')
2248
+ ], LitDataGridTanstack.prototype, "_container", void 0);
1752
2249
  LitDataGridTanstack = __decorate([
1753
2250
  customElement('lit-data-grid-tanstack')
1754
2251
  ], LitDataGridTanstack);