overview-components 1.1.0 → 1.1.11

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