@public-ui/components 2.2.17 → 2.2.18-rc.1

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 (498) hide show
  1. package/custom-elements.json +8 -2
  2. package/dist/cjs/{Alert-5355afb4.js → Alert-7fb72f0d.js} +1 -1
  3. package/dist/cjs/{Alert-5355afb4.js.map → Alert-7fb72f0d.js.map} +1 -1
  4. package/dist/cjs/{Collapsible-a9d6be83.js → Collapsible-3dadde56.js} +1 -1
  5. package/dist/cjs/{Collapsible-a9d6be83.js.map → Collapsible-3dadde56.js.map} +1 -1
  6. package/dist/cjs/{FormFieldMsg-fb5ab6b5.js → FormFieldMsg-9236530e.js} +1 -1
  7. package/dist/cjs/{FormFieldMsg-fb5ab6b5.js.map → FormFieldMsg-9236530e.js.map} +1 -1
  8. package/dist/cjs/{InternalUnderlinedBadgeText-7a1738c2.js → InternalUnderlinedBadgeText-c0988135.js} +1 -1
  9. package/dist/cjs/{InternalUnderlinedBadgeText-7a1738c2.js.map → InternalUnderlinedBadgeText-c0988135.js.map} +1 -1
  10. package/dist/cjs/{app-globals-13afb628.js → app-globals-c663f717.js} +1 -1
  11. package/dist/cjs/{app-globals-13afb628.js.map → app-globals-c663f717.js.map} +1 -1
  12. package/dist/cjs/{controller-2c0ad426.js → controller-54a1c7fe.js} +1 -1
  13. package/dist/cjs/{controller-2c0ad426.js.map → controller-54a1c7fe.js.map} +1 -1
  14. package/dist/cjs/controller-8de3ece4.js +4 -0
  15. package/dist/cjs/controller-8de3ece4.js.map +1 -0
  16. package/dist/cjs/{controller-ebeee174.js → controller-c43af365.js} +1 -1
  17. package/dist/cjs/{controller-ebeee174.js.map → controller-c43af365.js.map} +1 -1
  18. package/dist/cjs/{controller-29a09082.js → controller-d5e3c3cf.js} +1 -1
  19. package/dist/cjs/{controller-29a09082.js.map → controller-d5e3c3cf.js.map} +1 -1
  20. package/dist/cjs/{controller-icon-8ee41f8b.js → controller-icon-ae06d8fb.js} +1 -1
  21. package/dist/cjs/{controller-icon-8ee41f8b.js.map → controller-icon-ae06d8fb.js.map} +1 -1
  22. package/dist/cjs/{dev.utils-027c58f7.js → dev.utils-d143bc0f.js} +1 -1
  23. package/dist/cjs/{dev.utils-027c58f7.js.map → dev.utils-d143bc0f.js.map} +1 -1
  24. package/dist/cjs/{devtools-e921df7a.js → devtools-3f8fc08e.js} +1 -1
  25. package/dist/cjs/{devtools-e921df7a.js.map → devtools-3f8fc08e.js.map} +1 -1
  26. package/dist/cjs/index-bab815ae.js +4 -0
  27. package/dist/cjs/index-bab815ae.js.map +1 -0
  28. package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
  29. package/dist/cjs/kol-abbr.cjs.entry.js.map +1 -1
  30. package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
  31. package/dist/cjs/kol-alert-wc.cjs.entry.js +1 -1
  32. package/dist/cjs/kol-alert.cjs.entry.js +1 -1
  33. package/dist/cjs/kol-alert.cjs.entry.js.map +1 -1
  34. package/dist/cjs/kol-avatar-wc.cjs.entry.js +1 -1
  35. package/dist/cjs/kol-avatar.cjs.entry.js +1 -1
  36. package/dist/cjs/kol-badge.cjs.entry.js +1 -1
  37. package/dist/cjs/kol-badge.cjs.entry.js.map +1 -1
  38. package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
  39. package/dist/cjs/kol-button-group-wc.cjs.entry.js +1 -1
  40. package/dist/cjs/kol-button-group.cjs.entry.js +1 -1
  41. package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
  42. package/dist/cjs/kol-button-link.cjs.entry.js.map +1 -1
  43. package/dist/cjs/kol-button-wc.cjs.entry.js +1 -1
  44. package/dist/cjs/kol-button.cjs.entry.js +1 -1
  45. package/dist/cjs/kol-button.cjs.entry.js.map +1 -1
  46. package/dist/cjs/kol-card.cjs.entry.js +1 -1
  47. package/dist/cjs/kol-card.cjs.entry.js.map +1 -1
  48. package/dist/cjs/kol-combobox.cjs.entry.js +1 -1
  49. package/dist/cjs/kol-combobox.cjs.entry.js.map +1 -1
  50. package/dist/cjs/kol-details.cjs.entry.js +1 -1
  51. package/dist/cjs/kol-drawer.cjs.entry.js +1 -1
  52. package/dist/cjs/kol-form.cjs.entry.js +1 -1
  53. package/dist/cjs/kol-form.cjs.entry.js.map +1 -1
  54. package/dist/cjs/kol-heading-wc.cjs.entry.js +1 -1
  55. package/dist/cjs/kol-heading.cjs.entry.js +1 -1
  56. package/dist/cjs/kol-icon.cjs.entry.js +1 -1
  57. package/dist/cjs/kol-image.cjs.entry.js +1 -1
  58. package/dist/cjs/kol-indented-text-wc.cjs.entry.js +1 -1
  59. package/dist/cjs/kol-indented-text.cjs.entry.js +1 -1
  60. package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
  61. package/dist/cjs/kol-input-checkbox.cjs.entry.js.map +1 -1
  62. package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
  63. package/dist/cjs/kol-input-color.cjs.entry.js.map +1 -1
  64. package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
  65. package/dist/cjs/kol-input-date.cjs.entry.js.map +1 -1
  66. package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
  67. package/dist/cjs/kol-input-email.cjs.entry.js.map +1 -1
  68. package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
  69. package/dist/cjs/kol-input-file.cjs.entry.js.map +1 -1
  70. package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
  71. package/dist/cjs/kol-input-number.cjs.entry.js.map +1 -1
  72. package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
  73. package/dist/cjs/kol-input-password.cjs.entry.js.map +1 -1
  74. package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
  75. package/dist/cjs/kol-input-radio.cjs.entry.js.map +1 -1
  76. package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
  77. package/dist/cjs/kol-input-range.cjs.entry.js.map +1 -1
  78. package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
  79. package/dist/cjs/kol-input-text.cjs.entry.js.map +1 -1
  80. package/dist/cjs/kol-input.cjs.entry.js +1 -1
  81. package/dist/cjs/kol-input.cjs.entry.js.map +1 -1
  82. package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
  83. package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
  84. package/dist/cjs/kol-link-button.cjs.entry.js.map +1 -1
  85. package/dist/cjs/kol-link-group.cjs.entry.js +1 -1
  86. package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
  87. package/dist/cjs/kol-link.cjs.entry.js +1 -1
  88. package/dist/cjs/kol-link.cjs.entry.js.map +1 -1
  89. package/dist/cjs/kol-logo.cjs.entry.js +1 -1
  90. package/dist/cjs/kol-modal.cjs.entry.js +1 -1
  91. package/dist/cjs/kol-nav.cjs.entry.js +1 -1
  92. package/dist/cjs/kol-nav.cjs.entry.js.map +1 -1
  93. package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
  94. package/dist/cjs/kol-pagination.cjs.entry.js.map +1 -1
  95. package/dist/cjs/kol-popover-button.cjs.entry.js +1 -1
  96. package/dist/cjs/kol-popover-button.cjs.entry.js.map +1 -1
  97. package/dist/cjs/kol-popover-wc.cjs.entry.js +1 -1
  98. package/dist/cjs/kol-progress.cjs.entry.js +1 -1
  99. package/dist/cjs/kol-quote.cjs.entry.js +1 -1
  100. package/dist/cjs/kol-select.cjs.entry.js +1 -1
  101. package/dist/cjs/kol-select.cjs.entry.js.map +1 -1
  102. package/dist/cjs/kol-single-select.cjs.entry.js +1 -1
  103. package/dist/cjs/kol-single-select.cjs.entry.js.map +1 -1
  104. package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
  105. package/dist/cjs/kol-skip-nav.cjs.entry.js.map +1 -1
  106. package/dist/cjs/kol-span-wc.cjs.entry.js +1 -1
  107. package/dist/cjs/kol-spin.cjs.entry.js +1 -1
  108. package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
  109. package/dist/cjs/kol-split-button.cjs.entry.js.map +1 -1
  110. package/dist/cjs/kol-symbol.cjs.entry.js +1 -1
  111. package/dist/cjs/kol-table-stateful.cjs.entry.js +1 -1
  112. package/dist/cjs/kol-table-stateful.cjs.entry.js.map +1 -1
  113. package/dist/cjs/kol-table-stateless-wc.cjs.entry.js +1 -1
  114. package/dist/cjs/kol-table-stateless-wc.cjs.entry.js.map +1 -1
  115. package/dist/cjs/kol-table-stateless.cjs.entry.js +1 -1
  116. package/dist/cjs/kol-table-stateless.cjs.entry.js.map +1 -1
  117. package/dist/cjs/kol-table.cjs.entry.js +1 -1
  118. package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
  119. package/dist/cjs/kol-tabs.cjs.entry.js.map +1 -1
  120. package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
  121. package/dist/cjs/kol-textarea.cjs.entry.js.map +1 -1
  122. package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
  123. package/dist/cjs/kol-toast-container.cjs.entry.js.map +1 -1
  124. package/dist/cjs/kol-toolbar.cjs.entry.js +1 -1
  125. package/dist/cjs/kol-toolbar.cjs.entry.js.map +1 -1
  126. package/dist/cjs/kol-tooltip-wc.cjs.entry.js +1 -1
  127. package/dist/cjs/kol-tooltip-wc.cjs.entry.js.map +1 -1
  128. package/dist/cjs/kol-tree-item-wc.cjs.entry.js +1 -1
  129. package/dist/cjs/kol-tree-item.cjs.entry.js +1 -1
  130. package/dist/cjs/kol-tree-wc.cjs.entry.js +1 -1
  131. package/dist/cjs/kol-tree.cjs.entry.js +1 -1
  132. package/dist/cjs/kol-version.cjs.entry.js +1 -1
  133. package/dist/cjs/kolibri.cjs.js +1 -1
  134. package/dist/cjs/loader.cjs.js +1 -1
  135. package/dist/cjs/test-component.cjs.entry.js +1 -1
  136. package/dist/components/controller2.js +1 -1
  137. package/dist/components/controller2.js.map +1 -1
  138. package/dist/components/kol-abbr.js +1 -1
  139. package/dist/components/kol-abbr.js.map +1 -1
  140. package/dist/components/kol-alert.js +1 -1
  141. package/dist/components/kol-alert.js.map +1 -1
  142. package/dist/components/kol-badge.js +1 -1
  143. package/dist/components/kol-badge.js.map +1 -1
  144. package/dist/components/kol-button-link.js +1 -1
  145. package/dist/components/kol-button-link.js.map +1 -1
  146. package/dist/components/kol-button.js +1 -1
  147. package/dist/components/kol-button.js.map +1 -1
  148. package/dist/components/kol-card.js +1 -1
  149. package/dist/components/kol-card.js.map +1 -1
  150. package/dist/components/kol-combobox.js +1 -1
  151. package/dist/components/kol-combobox.js.map +1 -1
  152. package/dist/components/kol-form.js +1 -1
  153. package/dist/components/kol-form.js.map +1 -1
  154. package/dist/components/kol-input-checkbox.js +1 -1
  155. package/dist/components/kol-input-checkbox.js.map +1 -1
  156. package/dist/components/kol-input-color.js +1 -1
  157. package/dist/components/kol-input-color.js.map +1 -1
  158. package/dist/components/kol-input-date.js +1 -1
  159. package/dist/components/kol-input-date.js.map +1 -1
  160. package/dist/components/kol-input-email.js +1 -1
  161. package/dist/components/kol-input-email.js.map +1 -1
  162. package/dist/components/kol-input-file.js +1 -1
  163. package/dist/components/kol-input-file.js.map +1 -1
  164. package/dist/components/kol-input-number.js +1 -1
  165. package/dist/components/kol-input-number.js.map +1 -1
  166. package/dist/components/kol-input-password.js +1 -1
  167. package/dist/components/kol-input-password.js.map +1 -1
  168. package/dist/components/kol-input-radio.js +1 -1
  169. package/dist/components/kol-input-radio.js.map +1 -1
  170. package/dist/components/kol-input-range.js +1 -1
  171. package/dist/components/kol-input-range.js.map +1 -1
  172. package/dist/components/kol-input-text.js +1 -1
  173. package/dist/components/kol-input-text.js.map +1 -1
  174. package/dist/components/kol-input.js +1 -1
  175. package/dist/components/kol-input.js.map +1 -1
  176. package/dist/components/kol-link-button.js +1 -1
  177. package/dist/components/kol-link-button.js.map +1 -1
  178. package/dist/components/kol-link.js +1 -1
  179. package/dist/components/kol-link.js.map +1 -1
  180. package/dist/components/kol-nav.js +1 -1
  181. package/dist/components/kol-nav.js.map +1 -1
  182. package/dist/components/kol-pagination.js +1 -1
  183. package/dist/components/kol-pagination.js.map +1 -1
  184. package/dist/components/kol-popover-button.js +1 -1
  185. package/dist/components/kol-popover-button.js.map +1 -1
  186. package/dist/components/kol-select.js +1 -1
  187. package/dist/components/kol-select.js.map +1 -1
  188. package/dist/components/kol-single-select.js +1 -1
  189. package/dist/components/kol-single-select.js.map +1 -1
  190. package/dist/components/kol-skip-nav.js +1 -1
  191. package/dist/components/kol-skip-nav.js.map +1 -1
  192. package/dist/components/kol-split-button.js +1 -1
  193. package/dist/components/kol-split-button.js.map +1 -1
  194. package/dist/components/kol-table-stateful.js +1 -1
  195. package/dist/components/kol-table-stateful.js.map +1 -1
  196. package/dist/components/kol-table-stateless-wc.js +1 -1
  197. package/dist/components/kol-table-stateless-wc.js.map +1 -1
  198. package/dist/components/kol-table-stateless.js +1 -1
  199. package/dist/components/kol-table-stateless.js.map +1 -1
  200. package/dist/components/kol-tabs.js +1 -1
  201. package/dist/components/kol-tabs.js.map +1 -1
  202. package/dist/components/kol-textarea.js +1 -1
  203. package/dist/components/kol-textarea.js.map +1 -1
  204. package/dist/components/kol-toast-container.js +1 -1
  205. package/dist/components/kol-toast-container.js.map +1 -1
  206. package/dist/components/kol-toolbar.js +1 -1
  207. package/dist/components/kol-toolbar.js.map +1 -1
  208. package/dist/components/kol-tooltip-wc.js +1 -1
  209. package/dist/components/kol-tooltip-wc.js.map +1 -1
  210. package/dist/esm/{Alert-0e712d66.js → Alert-e1b49bee.js} +1 -1
  211. package/dist/esm/{Alert-0e712d66.js.map → Alert-e1b49bee.js.map} +1 -1
  212. package/dist/esm/{Collapsible-18d9607a.js → Collapsible-bb08ff2a.js} +1 -1
  213. package/dist/esm/{Collapsible-18d9607a.js.map → Collapsible-bb08ff2a.js.map} +1 -1
  214. package/dist/esm/{FormFieldMsg-c5be4e2c.js → FormFieldMsg-a8373529.js} +1 -1
  215. package/dist/esm/{FormFieldMsg-c5be4e2c.js.map → FormFieldMsg-a8373529.js.map} +1 -1
  216. package/dist/esm/InternalUnderlinedBadgeText-c3028ba9.js +4 -0
  217. package/dist/esm/{InternalUnderlinedBadgeText-1fac598e.js.map → InternalUnderlinedBadgeText-c3028ba9.js.map} +1 -1
  218. package/dist/esm/{app-globals-0ef160dd.js → app-globals-903fd1e0.js} +1 -1
  219. package/dist/esm/{app-globals-0ef160dd.js.map → app-globals-903fd1e0.js.map} +1 -1
  220. package/dist/esm/controller-6852ec73.js +4 -0
  221. package/dist/esm/controller-6852ec73.js.map +1 -0
  222. package/dist/esm/{controller-b19ef5c0.js → controller-7a8fe823.js} +1 -1
  223. package/dist/esm/{controller-b19ef5c0.js.map → controller-7a8fe823.js.map} +1 -1
  224. package/dist/esm/{controller-fa5508b8.js → controller-b80ab45c.js} +1 -1
  225. package/dist/esm/{controller-fa5508b8.js.map → controller-b80ab45c.js.map} +1 -1
  226. package/dist/esm/{controller-06c08e87.js → controller-f2ec3fe1.js} +1 -1
  227. package/dist/esm/{controller-06c08e87.js.map → controller-f2ec3fe1.js.map} +1 -1
  228. package/dist/esm/{controller-icon-b3eb5a58.js → controller-icon-cfb10b73.js} +1 -1
  229. package/dist/esm/{controller-icon-b3eb5a58.js.map → controller-icon-cfb10b73.js.map} +1 -1
  230. package/dist/esm/{dev.utils-e0ebaf6c.js → dev.utils-0183c4e9.js} +1 -1
  231. package/dist/esm/{dev.utils-e0ebaf6c.js.map → dev.utils-0183c4e9.js.map} +1 -1
  232. package/dist/esm/{devtools-9fd2762f.js → devtools-58e36ed4.js} +1 -1
  233. package/dist/esm/{devtools-9fd2762f.js.map → devtools-58e36ed4.js.map} +1 -1
  234. package/dist/esm/index-16f448fe.js +4 -0
  235. package/dist/esm/index-16f448fe.js.map +1 -0
  236. package/dist/esm/kol-abbr.entry.js +1 -1
  237. package/dist/esm/kol-abbr.entry.js.map +1 -1
  238. package/dist/esm/kol-accordion.entry.js +1 -1
  239. package/dist/esm/kol-alert-wc.entry.js +1 -1
  240. package/dist/esm/kol-alert.entry.js +1 -1
  241. package/dist/esm/kol-alert.entry.js.map +1 -1
  242. package/dist/esm/kol-avatar-wc.entry.js +1 -1
  243. package/dist/esm/kol-avatar.entry.js +1 -1
  244. package/dist/esm/kol-badge.entry.js +1 -1
  245. package/dist/esm/kol-badge.entry.js.map +1 -1
  246. package/dist/esm/kol-breadcrumb.entry.js +1 -1
  247. package/dist/esm/kol-button-group-wc.entry.js +1 -1
  248. package/dist/esm/kol-button-group.entry.js +1 -1
  249. package/dist/esm/kol-button-link.entry.js +1 -1
  250. package/dist/esm/kol-button-link.entry.js.map +1 -1
  251. package/dist/esm/kol-button-wc.entry.js +1 -1
  252. package/dist/esm/kol-button.entry.js +1 -1
  253. package/dist/esm/kol-button.entry.js.map +1 -1
  254. package/dist/esm/kol-card.entry.js +1 -1
  255. package/dist/esm/kol-card.entry.js.map +1 -1
  256. package/dist/esm/kol-combobox.entry.js +1 -1
  257. package/dist/esm/kol-combobox.entry.js.map +1 -1
  258. package/dist/esm/kol-details.entry.js +1 -1
  259. package/dist/esm/kol-drawer.entry.js +1 -1
  260. package/dist/esm/kol-form.entry.js +1 -1
  261. package/dist/esm/kol-form.entry.js.map +1 -1
  262. package/dist/esm/kol-heading-wc.entry.js +1 -1
  263. package/dist/esm/kol-heading.entry.js +1 -1
  264. package/dist/esm/kol-icon.entry.js +1 -1
  265. package/dist/esm/kol-image.entry.js +1 -1
  266. package/dist/esm/kol-indented-text-wc.entry.js +1 -1
  267. package/dist/esm/kol-indented-text.entry.js +1 -1
  268. package/dist/esm/kol-input-checkbox.entry.js +1 -1
  269. package/dist/esm/kol-input-checkbox.entry.js.map +1 -1
  270. package/dist/esm/kol-input-color.entry.js +1 -1
  271. package/dist/esm/kol-input-color.entry.js.map +1 -1
  272. package/dist/esm/kol-input-date.entry.js +1 -1
  273. package/dist/esm/kol-input-date.entry.js.map +1 -1
  274. package/dist/esm/kol-input-email.entry.js +1 -1
  275. package/dist/esm/kol-input-email.entry.js.map +1 -1
  276. package/dist/esm/kol-input-file.entry.js +1 -1
  277. package/dist/esm/kol-input-file.entry.js.map +1 -1
  278. package/dist/esm/kol-input-number.entry.js +1 -1
  279. package/dist/esm/kol-input-number.entry.js.map +1 -1
  280. package/dist/esm/kol-input-password.entry.js +1 -1
  281. package/dist/esm/kol-input-password.entry.js.map +1 -1
  282. package/dist/esm/kol-input-radio.entry.js +1 -1
  283. package/dist/esm/kol-input-radio.entry.js.map +1 -1
  284. package/dist/esm/kol-input-range.entry.js +1 -1
  285. package/dist/esm/kol-input-range.entry.js.map +1 -1
  286. package/dist/esm/kol-input-text.entry.js +1 -1
  287. package/dist/esm/kol-input-text.entry.js.map +1 -1
  288. package/dist/esm/kol-input.entry.js +1 -1
  289. package/dist/esm/kol-input.entry.js.map +1 -1
  290. package/dist/esm/kol-kolibri.entry.js +1 -1
  291. package/dist/esm/kol-link-button.entry.js +1 -1
  292. package/dist/esm/kol-link-button.entry.js.map +1 -1
  293. package/dist/esm/kol-link-group.entry.js +1 -1
  294. package/dist/esm/kol-link-wc.entry.js +1 -1
  295. package/dist/esm/kol-link.entry.js +1 -1
  296. package/dist/esm/kol-link.entry.js.map +1 -1
  297. package/dist/esm/kol-logo.entry.js +1 -1
  298. package/dist/esm/kol-modal.entry.js +1 -1
  299. package/dist/esm/kol-nav.entry.js +1 -1
  300. package/dist/esm/kol-nav.entry.js.map +1 -1
  301. package/dist/esm/kol-pagination.entry.js +1 -1
  302. package/dist/esm/kol-pagination.entry.js.map +1 -1
  303. package/dist/esm/kol-popover-button.entry.js +1 -1
  304. package/dist/esm/kol-popover-button.entry.js.map +1 -1
  305. package/dist/esm/kol-popover-wc.entry.js +1 -1
  306. package/dist/esm/kol-progress.entry.js +1 -1
  307. package/dist/esm/kol-quote.entry.js +1 -1
  308. package/dist/esm/kol-select.entry.js +1 -1
  309. package/dist/esm/kol-select.entry.js.map +1 -1
  310. package/dist/esm/kol-single-select.entry.js +1 -1
  311. package/dist/esm/kol-single-select.entry.js.map +1 -1
  312. package/dist/esm/kol-skip-nav.entry.js +1 -1
  313. package/dist/esm/kol-skip-nav.entry.js.map +1 -1
  314. package/dist/esm/kol-span-wc.entry.js +1 -1
  315. package/dist/esm/kol-spin.entry.js +1 -1
  316. package/dist/esm/kol-split-button.entry.js +1 -1
  317. package/dist/esm/kol-split-button.entry.js.map +1 -1
  318. package/dist/esm/kol-symbol.entry.js +1 -1
  319. package/dist/esm/kol-table-stateful.entry.js +1 -1
  320. package/dist/esm/kol-table-stateful.entry.js.map +1 -1
  321. package/dist/esm/kol-table-stateless-wc.entry.js +1 -1
  322. package/dist/esm/kol-table-stateless-wc.entry.js.map +1 -1
  323. package/dist/esm/kol-table-stateless.entry.js +1 -1
  324. package/dist/esm/kol-table-stateless.entry.js.map +1 -1
  325. package/dist/esm/kol-table.entry.js +1 -1
  326. package/dist/esm/kol-tabs.entry.js +1 -1
  327. package/dist/esm/kol-tabs.entry.js.map +1 -1
  328. package/dist/esm/kol-textarea.entry.js +1 -1
  329. package/dist/esm/kol-textarea.entry.js.map +1 -1
  330. package/dist/esm/kol-toast-container.entry.js +1 -1
  331. package/dist/esm/kol-toast-container.entry.js.map +1 -1
  332. package/dist/esm/kol-toolbar.entry.js +1 -1
  333. package/dist/esm/kol-toolbar.entry.js.map +1 -1
  334. package/dist/esm/kol-tooltip-wc.entry.js +1 -1
  335. package/dist/esm/kol-tooltip-wc.entry.js.map +1 -1
  336. package/dist/esm/kol-tree-item-wc.entry.js +1 -1
  337. package/dist/esm/kol-tree-item.entry.js +1 -1
  338. package/dist/esm/kol-tree-wc.entry.js +1 -1
  339. package/dist/esm/kol-tree.entry.js +1 -1
  340. package/dist/esm/kol-version.entry.js +1 -1
  341. package/dist/esm/kolibri.js +1 -1
  342. package/dist/esm/loader.js +1 -1
  343. package/dist/esm/test-component.entry.js +1 -1
  344. package/dist/kolibri/Alert-e1b49bee.js +4 -0
  345. package/dist/kolibri/{Collapsible-18d9607a.js → Collapsible-bb08ff2a.js} +1 -1
  346. package/dist/kolibri/{FormFieldMsg-c5be4e2c.js → FormFieldMsg-a8373529.js} +1 -1
  347. package/dist/kolibri/{InternalUnderlinedBadgeText-1fac598e.js → InternalUnderlinedBadgeText-c3028ba9.js} +1 -1
  348. package/dist/kolibri/app-globals-903fd1e0.js +4 -0
  349. package/dist/kolibri/{app-globals-0ef160dd.js.map → app-globals-903fd1e0.js.map} +1 -1
  350. package/dist/kolibri/controller-6852ec73.js +4 -0
  351. package/dist/kolibri/{controller-c87b8bd9.js.map → controller-6852ec73.js.map} +1 -1
  352. package/dist/kolibri/{controller-b19ef5c0.js → controller-7a8fe823.js} +1 -1
  353. package/dist/kolibri/{controller-fa5508b8.js → controller-b80ab45c.js} +1 -1
  354. package/dist/kolibri/{controller-06c08e87.js → controller-f2ec3fe1.js} +1 -1
  355. package/dist/kolibri/{controller-icon-b3eb5a58.js → controller-icon-cfb10b73.js} +1 -1
  356. package/dist/kolibri/{dev.utils-e0ebaf6c.js → dev.utils-0183c4e9.js} +1 -1
  357. package/dist/kolibri/{devtools-9fd2762f.js → devtools-58e36ed4.js} +1 -1
  358. package/dist/kolibri/{index-25e94a16.js → index-16f448fe.js} +2 -2
  359. package/dist/kolibri/index-16f448fe.js.map +1 -0
  360. package/dist/kolibri/kol-abbr.entry.js +1 -1
  361. package/dist/kolibri/kol-abbr.entry.js.map +1 -1
  362. package/dist/kolibri/kol-accordion.entry.js +1 -1
  363. package/dist/kolibri/kol-alert-wc.entry.js +1 -1
  364. package/dist/kolibri/kol-alert.entry.js +1 -1
  365. package/dist/kolibri/kol-alert.entry.js.map +1 -1
  366. package/dist/kolibri/kol-avatar-wc.entry.js +1 -1
  367. package/dist/kolibri/kol-avatar.entry.js +1 -1
  368. package/dist/kolibri/kol-badge.entry.js +1 -1
  369. package/dist/kolibri/kol-badge.entry.js.map +1 -1
  370. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  371. package/dist/kolibri/kol-button-group-wc.entry.js +1 -1
  372. package/dist/kolibri/kol-button-group.entry.js +1 -1
  373. package/dist/kolibri/kol-button-link.entry.js +1 -1
  374. package/dist/kolibri/kol-button-link.entry.js.map +1 -1
  375. package/dist/kolibri/kol-button-wc.entry.js +1 -1
  376. package/dist/kolibri/kol-button.entry.js +1 -1
  377. package/dist/kolibri/kol-button.entry.js.map +1 -1
  378. package/dist/kolibri/kol-card.entry.js +1 -1
  379. package/dist/kolibri/kol-card.entry.js.map +1 -1
  380. package/dist/kolibri/kol-combobox.entry.js +1 -1
  381. package/dist/kolibri/kol-combobox.entry.js.map +1 -1
  382. package/dist/kolibri/kol-details.entry.js +1 -1
  383. package/dist/kolibri/kol-drawer.entry.js +1 -1
  384. package/dist/kolibri/kol-form.entry.js +1 -1
  385. package/dist/kolibri/kol-form.entry.js.map +1 -1
  386. package/dist/kolibri/kol-heading-wc.entry.js +1 -1
  387. package/dist/kolibri/kol-heading.entry.js +1 -1
  388. package/dist/kolibri/kol-icon.entry.js +1 -1
  389. package/dist/kolibri/kol-image.entry.js +1 -1
  390. package/dist/kolibri/kol-indented-text-wc.entry.js +1 -1
  391. package/dist/kolibri/kol-indented-text.entry.js +1 -1
  392. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  393. package/dist/kolibri/kol-input-checkbox.entry.js.map +1 -1
  394. package/dist/kolibri/kol-input-color.entry.js +1 -1
  395. package/dist/kolibri/kol-input-color.entry.js.map +1 -1
  396. package/dist/kolibri/kol-input-date.entry.js +1 -1
  397. package/dist/kolibri/kol-input-date.entry.js.map +1 -1
  398. package/dist/kolibri/kol-input-email.entry.js +1 -1
  399. package/dist/kolibri/kol-input-email.entry.js.map +1 -1
  400. package/dist/kolibri/kol-input-file.entry.js +1 -1
  401. package/dist/kolibri/kol-input-file.entry.js.map +1 -1
  402. package/dist/kolibri/kol-input-number.entry.js +1 -1
  403. package/dist/kolibri/kol-input-number.entry.js.map +1 -1
  404. package/dist/kolibri/kol-input-password.entry.js +1 -1
  405. package/dist/kolibri/kol-input-password.entry.js.map +1 -1
  406. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  407. package/dist/kolibri/kol-input-radio.entry.js.map +1 -1
  408. package/dist/kolibri/kol-input-range.entry.js +1 -1
  409. package/dist/kolibri/kol-input-range.entry.js.map +1 -1
  410. package/dist/kolibri/kol-input-text.entry.js +1 -1
  411. package/dist/kolibri/kol-input-text.entry.js.map +1 -1
  412. package/dist/kolibri/kol-input.entry.js +1 -1
  413. package/dist/kolibri/kol-input.entry.js.map +1 -1
  414. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  415. package/dist/kolibri/kol-link-button.entry.js +1 -1
  416. package/dist/kolibri/kol-link-button.entry.js.map +1 -1
  417. package/dist/kolibri/kol-link-group.entry.js +1 -1
  418. package/dist/kolibri/kol-link-wc.entry.js +1 -1
  419. package/dist/kolibri/kol-link.entry.js +1 -1
  420. package/dist/kolibri/kol-link.entry.js.map +1 -1
  421. package/dist/kolibri/kol-logo.entry.js +1 -1
  422. package/dist/kolibri/kol-modal.entry.js +1 -1
  423. package/dist/kolibri/kol-nav.entry.js +1 -1
  424. package/dist/kolibri/kol-nav.entry.js.map +1 -1
  425. package/dist/kolibri/kol-pagination.entry.js +1 -1
  426. package/dist/kolibri/kol-pagination.entry.js.map +1 -1
  427. package/dist/kolibri/kol-popover-button.entry.js +1 -1
  428. package/dist/kolibri/kol-popover-button.entry.js.map +1 -1
  429. package/dist/kolibri/kol-popover-wc.entry.js +1 -1
  430. package/dist/kolibri/kol-progress.entry.js +1 -1
  431. package/dist/kolibri/kol-quote.entry.js +1 -1
  432. package/dist/kolibri/kol-select.entry.js +1 -1
  433. package/dist/kolibri/kol-select.entry.js.map +1 -1
  434. package/dist/kolibri/kol-single-select.entry.js +1 -1
  435. package/dist/kolibri/kol-single-select.entry.js.map +1 -1
  436. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  437. package/dist/kolibri/kol-skip-nav.entry.js.map +1 -1
  438. package/dist/kolibri/kol-span-wc.entry.js +1 -1
  439. package/dist/kolibri/kol-spin.entry.js +1 -1
  440. package/dist/kolibri/kol-split-button.entry.js +1 -1
  441. package/dist/kolibri/kol-split-button.entry.js.map +1 -1
  442. package/dist/kolibri/kol-symbol.entry.js +1 -1
  443. package/dist/kolibri/kol-table-stateful.entry.js +1 -1
  444. package/dist/kolibri/kol-table-stateful.entry.js.map +1 -1
  445. package/dist/kolibri/kol-table-stateless-wc.entry.js +1 -1
  446. package/dist/kolibri/kol-table-stateless-wc.entry.js.map +1 -1
  447. package/dist/kolibri/kol-table-stateless.entry.js +1 -1
  448. package/dist/kolibri/kol-table-stateless.entry.js.map +1 -1
  449. package/dist/kolibri/kol-table.entry.js +1 -1
  450. package/dist/kolibri/kol-tabs.entry.js +1 -1
  451. package/dist/kolibri/kol-tabs.entry.js.map +1 -1
  452. package/dist/kolibri/kol-textarea.entry.js +1 -1
  453. package/dist/kolibri/kol-textarea.entry.js.map +1 -1
  454. package/dist/kolibri/kol-toast-container.entry.js +1 -1
  455. package/dist/kolibri/kol-toast-container.entry.js.map +1 -1
  456. package/dist/kolibri/kol-toolbar.entry.js +1 -1
  457. package/dist/kolibri/kol-toolbar.entry.js.map +1 -1
  458. package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
  459. package/dist/kolibri/kol-tooltip-wc.entry.js.map +1 -1
  460. package/dist/kolibri/kol-tree-item-wc.entry.js +1 -1
  461. package/dist/kolibri/kol-tree-item.entry.js +1 -1
  462. package/dist/kolibri/kol-tree-wc.entry.js +1 -1
  463. package/dist/kolibri/kol-tree.entry.js +1 -1
  464. package/dist/kolibri/kol-version.entry.js +1 -1
  465. package/dist/kolibri/kolibri.esm.js +1 -1
  466. package/dist/kolibri/kolibri.esm.js.map +1 -1
  467. package/dist/kolibri/test-component.entry.js +1 -1
  468. package/dist/types/components/input/controller.d.ts +1 -0
  469. package/dist/types/components/skip-nav/shadow.d.ts +2 -0
  470. package/dist/types/components/table-stateless/component.d.ts +1 -0
  471. package/dist/types/components.d.ts +1 -0
  472. package/dist/types/schema/components/table.d.ts +4 -4
  473. package/doc/skip-nav.md +13 -0
  474. package/doc/tooltip.md +11 -0
  475. package/package.json +3 -3
  476. package/dist/cjs/controller-2dbf0e02.js +0 -4
  477. package/dist/cjs/controller-2dbf0e02.js.map +0 -1
  478. package/dist/cjs/index-4d27d353.js +0 -4
  479. package/dist/cjs/index-4d27d353.js.map +0 -1
  480. package/dist/esm/InternalUnderlinedBadgeText-1fac598e.js +0 -4
  481. package/dist/esm/controller-c87b8bd9.js +0 -4
  482. package/dist/esm/controller-c87b8bd9.js.map +0 -1
  483. package/dist/esm/index-25e94a16.js +0 -4
  484. package/dist/esm/index-25e94a16.js.map +0 -1
  485. package/dist/kolibri/Alert-0e712d66.js +0 -4
  486. package/dist/kolibri/app-globals-0ef160dd.js +0 -4
  487. package/dist/kolibri/controller-c87b8bd9.js +0 -4
  488. package/dist/kolibri/index-25e94a16.js.map +0 -1
  489. /package/dist/kolibri/{Alert-0e712d66.js.map → Alert-e1b49bee.js.map} +0 -0
  490. /package/dist/kolibri/{Collapsible-18d9607a.js.map → Collapsible-bb08ff2a.js.map} +0 -0
  491. /package/dist/kolibri/{FormFieldMsg-c5be4e2c.js.map → FormFieldMsg-a8373529.js.map} +0 -0
  492. /package/dist/kolibri/{InternalUnderlinedBadgeText-1fac598e.js.map → InternalUnderlinedBadgeText-c3028ba9.js.map} +0 -0
  493. /package/dist/kolibri/{controller-b19ef5c0.js.map → controller-7a8fe823.js.map} +0 -0
  494. /package/dist/kolibri/{controller-fa5508b8.js.map → controller-b80ab45c.js.map} +0 -0
  495. /package/dist/kolibri/{controller-06c08e87.js.map → controller-f2ec3fe1.js.map} +0 -0
  496. /package/dist/kolibri/{controller-icon-b3eb5a58.js.map → controller-icon-cfb10b73.js.map} +0 -0
  497. /package/dist/kolibri/{dev.utils-e0ebaf6c.js.map → dev.utils-0183c4e9.js.map} +0 -0
  498. /package/dist/kolibri/{devtools-9fd2762f.js.map → devtools-58e36ed4.js.map} +0 -0
@@ -1 +1 @@
1
- {"file":"kol-table-stateful.js","mappings":";;;;;;;;;;;;AAIA,MAAM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AAY,GAAG,CAAC,IAAI,IAAI,CAAC,cAAc,IAAI,gBAAgB,CAC3D,EACN;KACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolTableStateful"],"sources":["src/schema/props/pagination-position.ts","src/components/table-stateful/style.scss?tag=kol-table-stateful&mode=default&encapsulation=shadow","src/components/table-stateful/shadow.tsx"],"sourcesContent":["/* types */\nimport type { Generic } from 'adopted-style-sheets';\nimport { watchValidator } from '../utils/prop.validators';\n\nconst paginationPositionPropTypeOptions = ['top', 'bottom', 'both'] as const;\nexport type PaginationPositionPropType = (typeof paginationPositionPropTypeOptions)[number];\n\n/**\n * Defines which position should be used for presentation.\n */\nexport type PropPaginationPosition = {\n\tpaginationPosition: PaginationPositionPropType;\n};\n\n/* validator */\nexport const validatePaginationPosition = (component: Generic.Element.Component, value?: PaginationPositionPropType): void => {\n\twatchValidator(\n\t\tcomponent,\n\t\t`_paginationPosition`,\n\t\t(value) => typeof value === 'string' && paginationPositionPropTypeOptions.includes(value),\n\t\tnew Set([`PaginationPositionPropType {${paginationPositionPropTypeOptions.join(', ')}`]),\n\t\tvalue,\n\t\t{\n\t\t\tdefaultValue: 'bottom',\n\t\t},\n\t);\n};\n","@use '../style' as *;\n@use '../@shared/kol-table-stateless-mixin' as *;\n\n@layer kol-component {\n\tdiv.pagination {\n\t\tdisplay: grid;\n\t\tplace-items: center;\n\n\t\t.kol-pagination {\n\t\t\tdisplay: flex;\n\t\t\tflex-wrap: wrap;\n\t\t}\n\n\t\t> div:last-child {\n\t\t\tdisplay: grid;\n\t\t\tplace-items: center;\n\t\t}\n\t}\n\n\t@media (max-width: 1024px) {\n\t\tdiv.pagination .kol-pagination {\n\t\t\tflex-direction: column;\n\t\t}\n\t}\n\n\t@media (min-width: 1024px) {\n\t\tdiv.pagination,\n\t\tdiv.pagination > div:last-child {\n\t\t\tgrid-auto-flow: column;\n\t\t}\n\t}\n}\n\n@include kol-table-stateless-styles;\n","/* eslint-disable jsx-a11y/no-noninteractive-tabindex */\nimport type {\n\tKoliBriDataCompareFn,\n\tKoliBriPaginationButtonCallbacks,\n\tKoliBriSortDirection,\n\tKoliBriSortFunction,\n\tKoliBriTableDataType,\n\tKoliBriTableHeaderCellWithLogic,\n\tKoliBriTableHeaders,\n\tKoliBriTablePaginationProps,\n\tKoliBriTableSelectedHead,\n\tLabelPropType,\n\tPaginationPositionPropType,\n\tStringified,\n\tTableAPI,\n\tTableStatefulCallbacksPropType,\n\tTableDataFootPropType,\n\tTableDataPropType,\n\tTableHeaderCells,\n\tTableSelectionPropType,\n\tTableStates,\n} from '../../schema';\nimport {\n\tdevHint,\n\temptyStringByArrayHandler,\n\tobjectObjectHandler,\n\tparseJson,\n\tsetState,\n\tvalidateLabel,\n\tvalidatePaginationPosition,\n\tvalidateTableData,\n\tvalidateTableDataFoot,\n\tvalidateTableSelection,\n\tvalidateTableStatefulCallbacks,\n\twatchString,\n\twatchValidator,\n} from '../../schema';\nimport type { JSX } from '@stencil/core';\nimport { Component, h, Host, Method, Prop, State, Watch, Element } from '@stencil/core';\n\nimport { translate } from '../../i18n';\nimport { KolPaginationTag, KolTableStatelessWcTag } from '../../core/component-names';\nimport type { SortEventPayload } from '../../schema';\nimport { tryToDispatchKoliBriEvent } from '../../utils/events';\nimport { Events } from '../../schema/enums';\n\nconst PAGINATION_OPTIONS = [10, 20, 50, 100];\n\nconst paginationValidator = (value: unknown) => value === true || value === '' /* true */ || (typeof value === 'object' && value !== null);\n\ntype SortData = {\n\tlabel: string;\n\tkey: string;\n\tcompareFn: KoliBriDataCompareFn;\n\tdirection: KoliBriSortDirection;\n};\n\n@Component({\n\ttag: 'kol-table-stateful',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: true,\n})\nexport class KolTableStateful implements TableAPI {\n\t@Element() private readonly host?: HTMLKolTableStatelessWcElement;\n\tprivate tableWcRef?: HTMLKolTableStatelessWcElement;\n\n\tprivate readonly catchRef = (ref?: HTMLKolTableStatelessWcElement) => {\n\t\tthis.tableWcRef = ref;\n\t};\n\n\t/**\n\t * @deprecated only for backward compatibility\n\t */\n\tprivate sortFunction?: KoliBriSortFunction;\n\t/**\n\t * @deprecated only for backward compatibility\n\t */\n\tprivate sortDirections: Map<KoliBriSortFunction, KoliBriSortDirection> = new Map();\n\tprivate sortData: SortData[] = [];\n\tprivate showPagination = false;\n\tprivate pageStartSlice = 0;\n\tprivate pageEndSlice = 10;\n\tprivate disableSort = false;\n\n\t/**\n\t * @deprecated only for backward compatibility\n\t */\n\tprivate sortedColumnHead: KoliBriTableSelectedHead = { label: '', key: '', sortDirection: 'NOS' };\n\n\t/**\n\t * Defines whether to allow multi sort.\n\t */\n\t@Prop() public _allowMultiSort?: boolean;\n\n\t/**\n\t * Defines the primary table data.\n\t */\n\t@Prop() public _data!: Stringified<KoliBriTableDataType[]>;\n\n\t/**\n\t * Defines the data for the table footer.\n\t */\n\t@Prop() public _dataFoot?: Stringified<KoliBriTableDataType[]>;\n\n\t/**\n\t * Defines the horizontal and vertical table headers.\n\t */\n\t@Prop() public _headers!: Stringified<KoliBriTableHeaders>;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop() public _label!: string;\n\n\t/**\n\t * Defines the table min-width.\n\t * @deprecated This property is deprecated and will be removed in the next major release.\n\t */\n\t@Prop() public _minWidth?: string;\n\n\t/**\n\t * Defines whether to show the data distributed over multiple pages.\n\t */\n\t@Prop() public _pagination?: boolean | Stringified<KoliBriTablePaginationProps>;\n\t/**\n\t * Controls the position of the pagination.\n\t */\n\t@Prop() public _paginationPosition?: PaginationPositionPropType = 'bottom';\n\t/**\n\t * Defines how rows can be selected and the current selection.\n\t */\n\t@Prop() public _selection?: TableSelectionPropType;\n\t/**\n\t * Defines the callback functions for table events.\n\t */\n\t@Prop() public _on?: TableStatefulCallbacksPropType;\n\n\t@State() public state: TableStates = {\n\t\t_allowMultiSort: false,\n\t\t_data: [],\n\t\t_dataFoot: [],\n\t\t_headers: {\n\t\t\thorizontal: [],\n\t\t\tvertical: [],\n\t\t},\n\t\t_label: '', // ⚠ required\n\t\t_pagination: {\n\t\t\t_page: 1,\n\t\t\t_pageSize: 10,\n\t\t\t_max: 0,\n\t\t},\n\t\t_sortedData: [],\n\t\t_paginationPosition: 'bottom',\n\t};\n\n\t@Watch('_allowMultiSort')\n\tpublic validateAllowMultiSort(value?: boolean): void {\n\t\twatchValidator(this, '_allowMultiSort', () => true, new Set(['boolean']), value, {\n\t\t\tdefaultValue: false,\n\t\t});\n\t}\n\n\t@Watch('_data')\n\tpublic validateData(value?: TableDataPropType): void {\n\t\tvalidateTableData(this, value, {\n\t\t\tafterPatch: () => {\n\t\t\t\t// TODO: kein guter Hack (endless loop)\n\t\t\t\tsetTimeout(this.updateSortedData);\n\t\t\t},\n\t\t});\n\t}\n\n\t@Watch('_dataFoot')\n\tpublic validateDataFoot(value?: TableDataFootPropType): void {\n\t\tvalidateTableDataFoot(this, value, {\n\t\t\tafterPatch: () => {\n\t\t\t\tsetTimeout(this.updateSortedData);\n\t\t\t},\n\t\t});\n\t}\n\n\t@Watch('_paginationPosition')\n\tpublic validatePaginationPosition(value?: PaginationPositionPropType): void {\n\t\tvalidatePaginationPosition(this, value);\n\t}\n\n\t/**\n\t * @deprecated only for backward compatibility\n\t */\n\tprivate setSortDirection = (sort: KoliBriSortFunction, direction: KoliBriSortDirection) => {\n\t\t/**\n\t\t * Durch des Clearen, ist es nicht möglich eine Mehr-Spalten-Sortierung\n\t\t * darzustellen. Das wäre der Fall, wenn man ggf. Daten in außerhalb der\n\t\t * Komponente sortiert und diese sortiert von außen rein gibt und der\n\t\t * Sortierungsalgorithmus mehrere Spalten zusammen sortierte.\n\t\t *\n\t\t * Beachte auch col.sort !== this.sortFunction\n\t\t */\n\t\tthis.sortDirections.clear();\n\t\tthis.sortDirections.set(sort, direction);\n\t\tthis.sortFunction = sort;\n\t};\n\n\t/**\n\t * Handles sorting logic for table columns.\n\t * If multi-sort is enabled (`_allowMultiSort`), multiple columns can be sorted at once.\n\t * Otherwise, sorting is cleared when switching between columns.\n\t */\n\n\tprivate changeCellSort(headerCell: KoliBriTableHeaderCellWithLogic) {\n\t\tif (typeof headerCell.compareFn === 'function') {\n\t\t\tif (!this.state._allowMultiSort && headerCell.key !== this.sortData[0]?.key) {\n\t\t\t\t// clear when another column is sorted and multi sort is not allowed\n\t\t\t\tthis.sortData = [];\n\t\t\t}\n\n\t\t\tconst index = this.sortData.findIndex((value) => value.key === headerCell.key);\n\t\t\tif (index >= 0) {\n\t\t\t\tconst settings = this.sortData[index];\n\t\t\t\tswitch (settings.direction) {\n\t\t\t\t\tcase 'ASC':\n\t\t\t\t\t\tsettings.direction = 'DESC';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'DESC':\n\t\t\t\t\t\tthis.sortData.splice(index, 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tsettings.direction = 'ASC';\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else if (headerCell.key) {\n\t\t\t\tthis.sortData.push({\n\t\t\t\t\tlabel: headerCell.label,\n\t\t\t\t\tkey: headerCell.key,\n\t\t\t\t\tcompareFn: headerCell.compareFn,\n\t\t\t\t\tdirection: 'ASC',\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tthis.updateSortedData(headerCell as KoliBriTableSelectedHead);\n\t\t} else if (typeof headerCell.sort === 'function') {\n\t\t\tthis.sortFunction = headerCell.sort;\n\t\t\tswitch (this.sortDirections.get(this.sortFunction)) {\n\t\t\t\tcase 'ASC':\n\t\t\t\t\tthis.setSortDirection(this.sortFunction, 'DESC');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'DESC':\n\t\t\t\t\tthis.setSortDirection(this.sortFunction, 'NOS');\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthis.setSortDirection(this.sortFunction, 'ASC');\n\t\t\t}\n\t\t\tthis.updateSortedData(headerCell as KoliBriTableSelectedHead);\n\t\t}\n\t}\n\n\t@Watch('_headers')\n\tpublic validateHeaders(value?: Stringified<KoliBriTableHeaders>): void {\n\t\t/**\n\t\t * - es darf maximal ein Header als primary markiert werden (last win)\n\t\t * - der primary-Header entscheidet implizit über _order und _orientation\n\t\t * - primary-Headers müssen das key-Property setzen\n\t\t * - nicht primary-Headers müssen das key-Property nicht setzen (wird ignoriert)\n\t\t * - _order: wird durch den primary-Header geregelt\n\t\t * - _orientation: wird durch den primary-Header geregelt\n\t\t * - sobald ein Header sortierbar ist, darf es nur noch entweder horizontale\n\t\t * oder vertikale Header geben, aber nicht mehr beides\n\t\t */\n\t\temptyStringByArrayHandler(value, () => {\n\t\t\tobjectObjectHandler(value, () => {\n\t\t\t\ttry {\n\t\t\t\t\tvalue = parseJson<KoliBriTableHeaders>(value);\n\t\t\t\t\t// eslint-disable-next-line no-empty\n\t\t\t\t} catch (e) {\n\t\t\t\t\t// value behält den ursprünglichen Wert\n\t\t\t\t}\n\t\t\t\twatchValidator(this, '_headers', (value): boolean => typeof value === 'object' && value !== null, new Set(['KoliBriTableHeaders']), value, {\n\t\t\t\t\thooks: {\n\t\t\t\t\t\tbeforePatch: (nextValue: unknown) => {\n\t\t\t\t\t\t\tconst applySort = (headers: KoliBriTableHeaderCellWithLogic[]) => {\n\t\t\t\t\t\t\t\tlet hasSortedCells = false;\n\t\t\t\t\t\t\t\theaders.forEach((cell) => {\n\t\t\t\t\t\t\t\t\tconst key = cell.key;\n\t\t\t\t\t\t\t\t\tif (!key) {\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tconst sortDirection = cell.sortDirection;\n\t\t\t\t\t\t\t\t\tif (sortDirection === 'ASC' || sortDirection === 'DESC') {\n\t\t\t\t\t\t\t\t\t\tif (typeof cell.compareFn === 'function') {\n\t\t\t\t\t\t\t\t\t\t\tif (this.state._allowMultiSort || this.sortData.length === 0) {\n\t\t\t\t\t\t\t\t\t\t\t\tthis.sortData.push({ label: cell.label, key, compareFn: cell.compareFn, direction: sortDirection });\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\thasSortedCells = true;\n\t\t\t\t\t\t\t\t\t\t} else if (typeof cell.sort === 'function') {\n\t\t\t\t\t\t\t\t\t\t\tthis.setSortDirection(cell.sort, sortDirection);\n\t\t\t\t\t\t\t\t\t\t\tsetTimeout(() => this.updateSortedData({ key, label: cell.label, sortDirection }));\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tif (hasSortedCells) {\n\t\t\t\t\t\t\t\t\tsetTimeout(() => this.updateSortedData());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\tconst headers: KoliBriTableHeaders = nextValue as KoliBriTableHeaders;\n\t\t\t\t\t\t\theaders.horizontal?.forEach(applySort);\n\t\t\t\t\t\t\theaders.vertical?.forEach(applySort);\n\n\t\t\t\t\t\t\tif (headers.horizontal && headers.vertical && headers.horizontal?.length > 0 && headers.vertical?.length > 0) {\n\t\t\t\t\t\t\t\tthis.disableSort = true;\n\t\t\t\t\t\t\t\tdevHint(\n\t\t\t\t\t\t\t\t\t`Table: You can not sort the table data, if horizontal and vertical headers are defined at the same time. (https://github.com/public-ui/kolibri/issues/2372)`,\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t}\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelPropType): void {\n\t\tvalidateLabel(this, value, {\n\t\t\trequired: true,\n\t\t});\n\t}\n\n\t/**\n\t * @deprecated This property is deprecated and will be removed in the next major release.\n\t */\n\t@Watch('_minWidth')\n\tpublic validateMinWidth(value?: string): void {\n\t\twatchString(this, '_minWidth', value, {\n\t\t\tdefaultValue: undefined,\n\t\t});\n\t}\n\n\t@Watch('_selection')\n\tpublic validateSelection(value?: TableSelectionPropType): void {\n\t\tvalidateTableSelection(this, value);\n\t}\n\t@Watch('_on')\n\tpublic validateOn(value?: TableStatefulCallbacksPropType): void {\n\t\tvalidateTableStatefulCallbacks(this, value);\n\t}\n\n\tprivate readonly handlePagination: KoliBriPaginationButtonCallbacks = {\n\t\tonClick: (event: Event, page: number) => {\n\t\t\tif (typeof this.state._pagination._on?.onClick === 'function') {\n\t\t\t\tthis.state._pagination._on.onClick(event, page);\n\t\t\t}\n\t\t\tsetState(this, '_pagination', {\n\t\t\t\t...this.state._pagination,\n\t\t\t\t_page: page,\n\t\t\t});\n\t\t},\n\t\tonChangePage: (event: Event, page: number) => {\n\t\t\tif (typeof this.state._pagination._on?.onChangePage === 'function') {\n\t\t\t\tthis.state._pagination._on.onChangePage(event, page);\n\t\t\t}\n\t\t\tsetState(this, '_pagination', {\n\t\t\t\t...this.state._pagination,\n\t\t\t\t_page: page,\n\t\t\t});\n\t\t},\n\t\tonChangePageSize: (event: Event, pageSize: number) => {\n\t\t\tif (typeof this.state._pagination._on?.onChangePageSize === 'function') {\n\t\t\t\tthis.state._pagination._on.onChangePageSize(event, pageSize);\n\t\t\t}\n\t\t\tsetState(this, '_pagination', {\n\t\t\t\t...this.state._pagination,\n\t\t\t\t_pageSize: pageSize,\n\t\t\t});\n\t\t\tsetState(this, '_pageSize', pageSize);\n\t\t},\n\t};\n\n\t@Watch('_pagination')\n\tpublic validatePagination(value?: boolean | Stringified<KoliBriTablePaginationProps>): void {\n\t\ttry {\n\t\t\tvalue = parseJson<boolean | KoliBriTablePaginationProps>(value);\n\t\t\t// eslint-disable-next-line no-empty\n\t\t} catch (e) {\n\t\t\t// value behält den ursprünglichen Wert\n\t\t}\n\n\t\tthis.showPagination = paginationValidator(value);\n\n\t\twatchValidator<boolean | Stringified<KoliBriTablePaginationProps>>(\n\t\t\tthis,\n\t\t\t'_pagination',\n\t\t\tpaginationValidator,\n\t\t\tnew Set(['boolean', 'KoliBriTablePagination']),\n\t\t\tvalue,\n\t\t\t{\n\t\t\t\tdefaultValue: {\n\t\t\t\t\t_page: 1,\n\t\t\t\t\t_pageSize: 10,\n\t\t\t\t\t_max: 0,\n\t\t\t\t},\n\t\t\t},\n\t\t);\n\t}\n\n\tprivate onSelectionChange = (event: Event): void => {\n\t\tevent.stopPropagation();\n\t};\n\n\tpublic componentDidLoad(): void {\n\t\tthis.tableWcRef?.addEventListener('kol-selection-change', this.onSelectionChange);\n\t}\n\n\tpublic disconnectedCallback(): void {\n\t\tthis.tableWcRef?.removeEventListener('kol-selection-change', this.onSelectionChange);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateAllowMultiSort(this._allowMultiSort);\n\t\tthis.validateData(this._data);\n\t\tthis.validateDataFoot(this._dataFoot);\n\t\tthis.validateHeaders(this._headers);\n\t\tthis.validateLabel(this._label);\n\t\tthis.validateMinWidth(this._minWidth);\n\t\tthis.validatePagination(this._pagination);\n\t\tthis.validatePaginationPosition(this._paginationPosition);\n\t\tthis.validateSelection(this._selection);\n\t\tthis.validateOn(this._on);\n\t}\n\n\tprivate selectDisplayedData(data: KoliBriTableDataType[], pageSize: number, page: number): KoliBriTableDataType[] {\n\t\tif (typeof pageSize === 'number' && pageSize > 0 && typeof page === 'number' && page > 0) {\n\t\t\tthis.pageStartSlice = pageSize * (page - 1);\n\t\t\tthis.pageEndSlice = pageSize * page > data.length ? data.length : pageSize * page;\n\t\t\treturn data.slice(this.pageStartSlice, this.pageEndSlice);\n\t\t} else {\n\t\t\tthis.pageStartSlice = 0;\n\t\t\tthis.pageEndSlice = data.length;\n\t\t\treturn data;\n\t\t}\n\t}\n\n\t/**\n\t *\n\t * @param cell only used for old single sort. Can be removed when sort is removed.\n\t */\n\tprivate updateSortedData = (cell: KoliBriTableSelectedHead = this.sortedColumnHead) => {\n\t\tif (this.disableSort) {\n\t\t\tsetState(this, '_sortedData', this.state._data);\n\t\t\treturn;\n\t\t}\n\n\t\tlet sortedData: KoliBriTableDataType[] = [...this.state._data];\n\t\tif (this.sortData.length > 0) {\n\t\t\tsortedData.sort((a: KoliBriTableDataType, b: KoliBriTableDataType) => {\n\t\t\t\tfor (let index = 0; index < this.sortData.length; index++) {\n\t\t\t\t\tconst data = this.sortData[index];\n\t\t\t\t\tconst result = data.compareFn(a, b);\n\t\t\t\t\tif (result !== 0) {\n\t\t\t\t\t\treturn data.direction === 'ASC' ? result : -result;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t});\n\t\t} else if (typeof this.sortFunction === 'function') {\n\t\t\tswitch (this.sortDirections.get(this.sortFunction)) {\n\t\t\t\tcase 'ASC':\n\t\t\t\t\tsortedData = this.sortFunction([...this.state._data]);\n\t\t\t\t\tthis.sortedColumnHead = { label: cell.label, key: cell.key, sortDirection: 'ASC' };\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'DESC':\n\t\t\t\t\tsortedData = this.sortFunction([...this.state._data]).reverse();\n\t\t\t\t\tthis.sortedColumnHead = { label: cell.label, key: cell.key, sortDirection: 'DESC' };\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'NOS':\n\t\t\t\tdefault:\n\t\t\t\t\tthis.sortedColumnHead = { label: '', key: '', sortDirection: 'NOS' };\n\t\t\t}\n\t\t}\n\t\tsetState(this, '_sortedData', sortedData);\n\t};\n\n\t/**\n\t * Renders the pagination controls for the table, showing the current visible data range\n\t * and providing navigation between different pages.\n\t *\n\t * @returns {JSX.Element} The rendered pagination controls including page range and navigation.\n\t */\n\tprivate renderPagination(position: 'top' | 'bottom'): JSX.Element {\n\t\tconst label = translate('kol-table-pagination-label', {\n\t\t\tplaceholders: {\n\t\t\t\tlabel: `${this.state._label} (${translate(`kol-pagination-position-${position}`)})`,\n\t\t\t},\n\t\t});\n\n\t\treturn (\n\t\t\t<div class=\"pagination\">\n\t\t\t\t<span role=\"status\" aria-live=\"polite\">\n\t\t\t\t\t{translate('kol-table-visible-range', {\n\t\t\t\t\t\tplaceholders: {\n\t\t\t\t\t\t\tstart: this.pageEndSlice > 0 ? (this.pageStartSlice + 1).toString() : '0',\n\t\t\t\t\t\t\tend: this.pageEndSlice.toString(),\n\t\t\t\t\t\t\ttotal:\n\t\t\t\t\t\t\t\tthis.state._pagination && this.state._pagination._max > 0\n\t\t\t\t\t\t\t\t\t? this.state._pagination._max.toString()\n\t\t\t\t\t\t\t\t\t: Array.isArray(this.state._data)\n\t\t\t\t\t\t\t\t\t\t? this.state._data.length.toString()\n\t\t\t\t\t\t\t\t\t\t: '0',\n\t\t\t\t\t\t},\n\t\t\t\t\t})}\n\t\t\t\t</span>\n\t\t\t\t<div>\n\t\t\t\t\t<KolPaginationTag\n\t\t\t\t\t\t_boundaryCount={this.state._pagination._boundaryCount}\n\t\t\t\t\t\t_customClass={this.state._pagination._customClass}\n\t\t\t\t\t\t_on={this.handlePagination}\n\t\t\t\t\t\t_page={this.state._pagination._page}\n\t\t\t\t\t\t_pageSize={this.state._pagination._pageSize}\n\t\t\t\t\t\t_pageSizeOptions={this.state._pagination._pageSizeOptions || PAGINATION_OPTIONS}\n\t\t\t\t\t\t_siblingCount={this.state._pagination._siblingCount}\n\t\t\t\t\t\t_tooltipAlign=\"bottom\"\n\t\t\t\t\t\t_max={this.state._pagination._max || this.state._pagination._max || this.state._data.length}\n\t\t\t\t\t\t_label={label}\n\t\t\t\t\t></KolPaginationTag>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n\n\tprivate getHeaderCellSortState(headerCell: KoliBriTableHeaderCellWithLogic): KoliBriSortDirection | undefined {\n\t\tif (!this.disableSort && (typeof headerCell.compareFn === 'function' || typeof headerCell.sort === 'function')) {\n\t\t\tif (headerCell.key === this.sortedColumnHead.key) {\n\t\t\t\treturn this.sortedColumnHead.sortDirection;\n\t\t\t}\n\t\t\tif (headerCell.key) {\n\t\t\t\tconst data = this.sortData.find((value) => value.key === headerCell.key);\n\t\t\t\tif (data?.direction) {\n\t\t\t\t\treturn data.direction;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn 'NOS';\n\t\t}\n\t}\n\n\tprivate handleSort({ key }: SortEventPayload) {\n\t\tconst headerCell = [...(this.state._headers.horizontal || []).flat(), ...(this.state._headers.vertical || []).flat()].find((cell) => cell.key === key);\n\t\tif (headerCell) {\n\t\t\tthis.changeCellSort(headerCell);\n\t\t}\n\t}\n\n\tprivate getSelectedData(selectedKeys: string[] | string): null | KoliBriTableDataType | KoliBriTableDataType[] {\n\t\tconst selection = this.state._selection;\n\t\tif (selection) {\n\t\t\tconst keyPropertyName = selection.keyPropertyName ?? 'id';\n\t\t\tconst data = this.state._sortedData.filter((item) => selectedKeys.includes(item[keyPropertyName] as string));\n\t\t\tif (selection?.multiple === false) {\n\t\t\t\treturn data[0];\n\t\t\t}\n\n\t\t\tif (keyPropertyName) return data;\n\t\t}\n\t\treturn null;\n\t}\n\tprivate handleSelectionChange(event: Event, value: string[] | string): void {\n\t\tconst selection = this.state._selection;\n\t\tif (selection)\n\t\t\tthis.state = {\n\t\t\t\t...this.state,\n\t\t\t\t_selection: {\n\t\t\t\t\t...selection,\n\t\t\t\t\tselectedKeys: typeof value === 'object' ? value : [value],\n\t\t\t\t},\n\t\t\t};\n\t\tconst selectedData = this.getSelectedData(value);\n\n\t\ttryToDispatchKoliBriEvent('selection-change', this.host, selectedData);\n\n\t\tif (typeof this.state._on?.[Events.onSelectionChange] === 'function') {\n\t\t\tthis.state._on[Events.onSelectionChange](event, selectedData);\n\t\t}\n\t}\n\n\t/**\n\t * Returns the data for the currently selected rows.\n\t */\n\t@Method()\n\t// eslint-disable-next-line @typescript-eslint/require-await\n\tpublic async getSelection(): Promise<KoliBriTableDataType[] | KoliBriTableDataType | null> {\n\t\tconst selectedKeys: string[] = this.state._selection?.selectedKeys || [];\n\t\treturn this.getSelectedData(selectedKeys);\n\t}\n\n\tpublic render(): JSX.Element {\n\t\tconst displayedData: KoliBriTableDataType[] = this.selectDisplayedData(\n\t\t\tthis.state._sortedData,\n\t\t\tthis.showPagination ? (this.state._pagination?._pageSize ?? 10) : this.state._sortedData.length,\n\t\t\tthis.state._pagination._page || 1,\n\t\t);\n\t\tconst paginationTop = this._paginationPosition === 'top' || this._paginationPosition === 'both' ? this.renderPagination('top') : null;\n\t\tconst paginationBottom = this._paginationPosition === 'bottom' || this._paginationPosition === 'both' ? this.renderPagination('bottom') : null;\n\n\t\tconst headerCells: TableHeaderCells = {\n\t\t\thorizontal: this.state._headers.horizontal?.map((row) => row.map((cell) => ({ ...cell, sortDirection: this.getHeaderCellSortState(cell) }))),\n\t\t\tvertical: this.state._headers.vertical?.map((column) => column.map((cell) => ({ ...cell, sortDirection: this.getHeaderCellSortState(cell) }))),\n\t\t};\n\t\treturn (\n\t\t\t<Host class=\"kol-table-stateful\">\n\t\t\t\t{this.pageEndSlice > 0 && this.showPagination && paginationTop}\n\t\t\t\t<KolTableStatelessWcTag\n\t\t\t\t\tref={this.catchRef}\n\t\t\t\t\t_data={displayedData}\n\t\t\t\t\t_headerCells={headerCells}\n\t\t\t\t\t_label={this.state._label}\n\t\t\t\t\t_dataFoot={this.state._dataFoot}\n\t\t\t\t\t_minWidth={this.state._minWidth}\n\t\t\t\t\t_on={{\n\t\t\t\t\t\tonSort: (_: MouseEvent, payload: SortEventPayload) => {\n\t\t\t\t\t\t\tthis.handleSort(payload);\n\t\t\t\t\t\t},\n\t\t\t\t\t\tonSelectionChange: (event: Event, value: string[] | string) => {\n\t\t\t\t\t\t\tthis.handleSelectionChange(event, value);\n\t\t\t\t\t\t},\n\t\t\t\t\t}}\n\t\t\t\t\t_selection={this.state._selection}\n\t\t\t\t/>\n\t\t\t\t{this.pageEndSlice > 0 && this.showPagination && paginationBottom}\n\t\t\t</Host>\n\t\t);\n\t}\n}\n"],"version":3}
1
+ {"file":"kol-table-stateful.js","mappings":";;;;;;;;;;;;AAIA,MAAM,iCA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AAG,CAAC,IAAI,IAAI,CAAC,cAAc,IAAI,gBAAgB,CAC3D,EACN;KACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolTableStateful"],"sources":["src/schema/props/pagination-position.ts","src/components/table-stateful/style.scss?tag=kol-table-stateful&mode=default&encapsulation=shadow","src/components/table-stateful/shadow.tsx"],"sourcesContent":["/* types */\nimport type { Generic } from 'adopted-style-sheets';\nimport { watchValidator } from '../utils/prop.validators';\n\nconst paginationPositionPropTypeOptions = ['top', 'bottom', 'both'] as const;\nexport type PaginationPositionPropType = (typeof paginationPositionPropTypeOptions)[number];\n\n/**\n * Defines which position should be used for presentation.\n */\nexport type PropPaginationPosition = {\n\tpaginationPosition: PaginationPositionPropType;\n};\n\n/* validator */\nexport const validatePaginationPosition = (component: Generic.Element.Component, value?: PaginationPositionPropType): void => {\n\twatchValidator(\n\t\tcomponent,\n\t\t`_paginationPosition`,\n\t\t(value) => typeof value === 'string' && paginationPositionPropTypeOptions.includes(value),\n\t\tnew Set([`PaginationPositionPropType {${paginationPositionPropTypeOptions.join(', ')}`]),\n\t\tvalue,\n\t\t{\n\t\t\tdefaultValue: 'bottom',\n\t\t},\n\t);\n};\n","@use '../style' as *;\n@use '../@shared/kol-table-stateless-mixin' as *;\n\n@layer kol-component {\n\tdiv.pagination {\n\t\tdisplay: grid;\n\t\tplace-items: center;\n\n\t\t.kol-pagination {\n\t\t\tdisplay: flex;\n\t\t\tflex-wrap: wrap;\n\t\t}\n\n\t\t> div:last-child {\n\t\t\tdisplay: grid;\n\t\t\tplace-items: center;\n\t\t}\n\t}\n\n\t@media (max-width: 1024px) {\n\t\tdiv.pagination .kol-pagination {\n\t\t\tflex-direction: column;\n\t\t}\n\t}\n\n\t@media (min-width: 1024px) {\n\t\tdiv.pagination,\n\t\tdiv.pagination > div:last-child {\n\t\t\tgrid-auto-flow: column;\n\t\t}\n\t}\n}\n\n@include kol-table-stateless-styles;\n","/* eslint-disable jsx-a11y/no-noninteractive-tabindex */\nimport type {\n\tKoliBriDataCompareFn,\n\tKoliBriPaginationButtonCallbacks,\n\tKoliBriSortDirection,\n\tKoliBriSortFunction,\n\tKoliBriTableDataType,\n\tKoliBriTableHeaderCellWithLogic,\n\tKoliBriTableHeaders,\n\tKoliBriTablePaginationProps,\n\tKoliBriTableSelectedHead,\n\tLabelPropType,\n\tPaginationPositionPropType,\n\tStringified,\n\tTableAPI,\n\tTableStatefulCallbacksPropType,\n\tTableDataFootPropType,\n\tTableDataPropType,\n\tTableHeaderCells,\n\tTableSelectionPropType,\n\tTableStates,\n} from '../../schema';\nimport {\n\tdevHint,\n\temptyStringByArrayHandler,\n\tobjectObjectHandler,\n\tparseJson,\n\tsetState,\n\tvalidateLabel,\n\tvalidatePaginationPosition,\n\tvalidateTableData,\n\tvalidateTableDataFoot,\n\tvalidateTableSelection,\n\tvalidateTableStatefulCallbacks,\n\twatchString,\n\twatchValidator,\n} from '../../schema';\nimport type { JSX } from '@stencil/core';\nimport { Component, h, Host, Method, Prop, State, Watch, Element } from '@stencil/core';\n\nimport { translate } from '../../i18n';\nimport { KolPaginationTag, KolTableStatelessWcTag } from '../../core/component-names';\nimport type { SortEventPayload } from '../../schema';\nimport { tryToDispatchKoliBriEvent } from '../../utils/events';\nimport { Events } from '../../schema/enums';\n\nconst PAGINATION_OPTIONS = [10, 20, 50, 100];\n\nconst paginationValidator = (value: unknown) => value === true || value === '' /* true */ || (typeof value === 'object' && value !== null);\n\ntype SortData = {\n\tlabel: string;\n\tkey: string;\n\tcompareFn: KoliBriDataCompareFn;\n\tdirection: KoliBriSortDirection;\n};\n\n@Component({\n\ttag: 'kol-table-stateful',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: true,\n})\nexport class KolTableStateful implements TableAPI {\n\t@Element() private readonly host?: HTMLKolTableStatelessWcElement;\n\tprivate tableWcRef?: HTMLKolTableStatelessWcElement;\n\n\tprivate readonly catchRef = (ref?: HTMLKolTableStatelessWcElement) => {\n\t\tthis.tableWcRef = ref;\n\t};\n\n\t/**\n\t * @deprecated only for backward compatibility\n\t */\n\tprivate sortFunction?: KoliBriSortFunction;\n\t/**\n\t * @deprecated only for backward compatibility\n\t */\n\tprivate sortDirections: Map<KoliBriSortFunction, KoliBriSortDirection> = new Map();\n\tprivate sortData: SortData[] = [];\n\tprivate showPagination = false;\n\tprivate pageStartSlice = 0;\n\tprivate pageEndSlice = 10;\n\tprivate disableSort = false;\n\n\t/**\n\t * @deprecated only for backward compatibility\n\t */\n\tprivate sortedColumnHead: KoliBriTableSelectedHead = { label: '', key: '', sortDirection: 'NOS' };\n\n\t/**\n\t * Defines whether to allow multi sort.\n\t */\n\t@Prop() public _allowMultiSort?: boolean;\n\n\t/**\n\t * Defines the primary table data.\n\t */\n\t@Prop() public _data!: Stringified<KoliBriTableDataType[]>;\n\n\t/**\n\t * Defines the data for the table footer.\n\t */\n\t@Prop() public _dataFoot?: Stringified<KoliBriTableDataType[]>;\n\n\t/**\n\t * Defines the horizontal and vertical table headers.\n\t */\n\t@Prop() public _headers!: Stringified<KoliBriTableHeaders>;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop() public _label!: string;\n\n\t/**\n\t * Defines the table min-width.\n\t * @deprecated This property is deprecated and will be removed in the next major release.\n\t */\n\t@Prop() public _minWidth?: string;\n\n\t/**\n\t * Defines whether to show the data distributed over multiple pages.\n\t */\n\t@Prop() public _pagination?: boolean | Stringified<KoliBriTablePaginationProps>;\n\t/**\n\t * Controls the position of the pagination.\n\t */\n\t@Prop() public _paginationPosition?: PaginationPositionPropType = 'bottom';\n\t/**\n\t * Defines how rows can be selected and the current selection.\n\t */\n\t@Prop() public _selection?: TableSelectionPropType;\n\t/**\n\t * Defines the callback functions for table events.\n\t */\n\t@Prop() public _on?: TableStatefulCallbacksPropType;\n\n\t@State() public state: TableStates = {\n\t\t_allowMultiSort: false,\n\t\t_data: [],\n\t\t_dataFoot: [],\n\t\t_headers: {\n\t\t\thorizontal: [],\n\t\t\tvertical: [],\n\t\t},\n\t\t_label: '', // ⚠ required\n\t\t_pagination: {\n\t\t\t_page: 1,\n\t\t\t_pageSize: 10,\n\t\t\t_max: 0,\n\t\t},\n\t\t_sortedData: [],\n\t\t_paginationPosition: 'bottom',\n\t};\n\n\t@Watch('_allowMultiSort')\n\tpublic validateAllowMultiSort(value?: boolean): void {\n\t\twatchValidator(this, '_allowMultiSort', () => true, new Set(['boolean']), value, {\n\t\t\tdefaultValue: false,\n\t\t});\n\t}\n\n\t@Watch('_data')\n\tpublic validateData(value?: TableDataPropType): void {\n\t\tvalidateTableData(this, value, {\n\t\t\tafterPatch: () => {\n\t\t\t\t// TODO: kein guter Hack (endless loop)\n\t\t\t\tsetTimeout(this.updateSortedData);\n\t\t\t},\n\t\t});\n\t}\n\n\t@Watch('_dataFoot')\n\tpublic validateDataFoot(value?: TableDataFootPropType): void {\n\t\tvalidateTableDataFoot(this, value, {\n\t\t\tafterPatch: () => {\n\t\t\t\tsetTimeout(this.updateSortedData);\n\t\t\t},\n\t\t});\n\t}\n\n\t@Watch('_paginationPosition')\n\tpublic validatePaginationPosition(value?: PaginationPositionPropType): void {\n\t\tvalidatePaginationPosition(this, value);\n\t}\n\n\t/**\n\t * @deprecated only for backward compatibility\n\t */\n\tprivate setSortDirection = (sort: KoliBriSortFunction, direction: KoliBriSortDirection) => {\n\t\t/**\n\t\t * Durch des Clearen, ist es nicht möglich eine Mehr-Spalten-Sortierung\n\t\t * darzustellen. Das wäre der Fall, wenn man ggf. Daten in außerhalb der\n\t\t * Komponente sortiert und diese sortiert von außen rein gibt und der\n\t\t * Sortierungsalgorithmus mehrere Spalten zusammen sortierte.\n\t\t *\n\t\t * Beachte auch col.sort !== this.sortFunction\n\t\t */\n\t\tthis.sortDirections.clear();\n\t\tthis.sortDirections.set(sort, direction);\n\t\tthis.sortFunction = sort;\n\t};\n\n\t/**\n\t * Handles sorting logic for table columns.\n\t * If multi-sort is enabled (`_allowMultiSort`), multiple columns can be sorted at once.\n\t * Otherwise, sorting is cleared when switching between columns.\n\t */\n\n\tprivate changeCellSort(headerCell: KoliBriTableHeaderCellWithLogic) {\n\t\tif (typeof headerCell.compareFn === 'function') {\n\t\t\tif (!this.state._allowMultiSort && headerCell.key !== this.sortData[0]?.key) {\n\t\t\t\t// clear when another column is sorted and multi sort is not allowed\n\t\t\t\tthis.sortData = [];\n\t\t\t}\n\n\t\t\tconst index = this.sortData.findIndex((value) => value.key === headerCell.key);\n\t\t\tif (index >= 0) {\n\t\t\t\tconst settings = this.sortData[index];\n\t\t\t\tswitch (settings.direction) {\n\t\t\t\t\tcase 'ASC':\n\t\t\t\t\t\tsettings.direction = 'DESC';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'DESC':\n\t\t\t\t\t\tthis.sortData.splice(index, 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tsettings.direction = 'ASC';\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else if (headerCell.key) {\n\t\t\t\tthis.sortData.push({\n\t\t\t\t\tlabel: headerCell.label,\n\t\t\t\t\tkey: headerCell.key,\n\t\t\t\t\tcompareFn: headerCell.compareFn,\n\t\t\t\t\tdirection: 'ASC',\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tthis.updateSortedData(headerCell as KoliBriTableSelectedHead);\n\t\t} else if (typeof headerCell.sort === 'function') {\n\t\t\tthis.sortFunction = headerCell.sort;\n\t\t\tswitch (this.sortDirections.get(this.sortFunction)) {\n\t\t\t\tcase 'ASC':\n\t\t\t\t\tthis.setSortDirection(this.sortFunction, 'DESC');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'DESC':\n\t\t\t\t\tthis.setSortDirection(this.sortFunction, 'NOS');\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthis.setSortDirection(this.sortFunction, 'ASC');\n\t\t\t}\n\t\t\tthis.updateSortedData(headerCell as KoliBriTableSelectedHead);\n\t\t}\n\t}\n\n\t@Watch('_headers')\n\tpublic validateHeaders(value?: Stringified<KoliBriTableHeaders>): void {\n\t\t/**\n\t\t * - es darf maximal ein Header als primary markiert werden (last win)\n\t\t * - der primary-Header entscheidet implizit über _order und _orientation\n\t\t * - primary-Headers müssen das key-Property setzen\n\t\t * - nicht primary-Headers müssen das key-Property nicht setzen (wird ignoriert)\n\t\t * - _order: wird durch den primary-Header geregelt\n\t\t * - _orientation: wird durch den primary-Header geregelt\n\t\t * - sobald ein Header sortierbar ist, darf es nur noch entweder horizontale\n\t\t * oder vertikale Header geben, aber nicht mehr beides\n\t\t */\n\t\temptyStringByArrayHandler(value, () => {\n\t\t\tobjectObjectHandler(value, () => {\n\t\t\t\ttry {\n\t\t\t\t\tvalue = parseJson<KoliBriTableHeaders>(value);\n\t\t\t\t\t// eslint-disable-next-line no-empty\n\t\t\t\t} catch (e) {\n\t\t\t\t\t// value behält den ursprünglichen Wert\n\t\t\t\t}\n\t\t\t\twatchValidator(this, '_headers', (value): boolean => typeof value === 'object' && value !== null, new Set(['KoliBriTableHeaders']), value, {\n\t\t\t\t\thooks: {\n\t\t\t\t\t\tbeforePatch: (nextValue: unknown) => {\n\t\t\t\t\t\t\tconst applySort = (headers: KoliBriTableHeaderCellWithLogic[]) => {\n\t\t\t\t\t\t\t\tlet hasSortedCells = false;\n\t\t\t\t\t\t\t\theaders.forEach((cell) => {\n\t\t\t\t\t\t\t\t\tconst key = cell.key;\n\t\t\t\t\t\t\t\t\tif (!key) {\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tconst sortDirection = cell.sortDirection;\n\t\t\t\t\t\t\t\t\tif (sortDirection === 'ASC' || sortDirection === 'DESC') {\n\t\t\t\t\t\t\t\t\t\tif (typeof cell.compareFn === 'function') {\n\t\t\t\t\t\t\t\t\t\t\tif (this.state._allowMultiSort || this.sortData.length === 0) {\n\t\t\t\t\t\t\t\t\t\t\t\tthis.sortData.push({ label: cell.label, key, compareFn: cell.compareFn, direction: sortDirection });\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\thasSortedCells = true;\n\t\t\t\t\t\t\t\t\t\t} else if (typeof cell.sort === 'function') {\n\t\t\t\t\t\t\t\t\t\t\tthis.setSortDirection(cell.sort, sortDirection);\n\t\t\t\t\t\t\t\t\t\t\tsetTimeout(() => this.updateSortedData({ key, label: cell.label, sortDirection }));\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tif (hasSortedCells) {\n\t\t\t\t\t\t\t\t\tsetTimeout(() => this.updateSortedData());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\tconst headers: KoliBriTableHeaders = nextValue as KoliBriTableHeaders;\n\t\t\t\t\t\t\theaders.horizontal?.forEach(applySort);\n\t\t\t\t\t\t\theaders.vertical?.forEach(applySort);\n\n\t\t\t\t\t\t\tif (headers.horizontal && headers.vertical && headers.horizontal?.length > 0 && headers.vertical?.length > 0) {\n\t\t\t\t\t\t\t\tthis.disableSort = true;\n\t\t\t\t\t\t\t\tdevHint(\n\t\t\t\t\t\t\t\t\t`Table: You can not sort the table data, if horizontal and vertical headers are defined at the same time. (https://github.com/public-ui/kolibri/issues/2372)`,\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t}\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelPropType): void {\n\t\tvalidateLabel(this, value, {\n\t\t\trequired: true,\n\t\t});\n\t}\n\n\t/**\n\t * @deprecated This property is deprecated and will be removed in the next major release.\n\t */\n\t@Watch('_minWidth')\n\tpublic validateMinWidth(value?: string): void {\n\t\twatchString(this, '_minWidth', value, {\n\t\t\tdefaultValue: undefined,\n\t\t});\n\t}\n\n\t@Watch('_selection')\n\tpublic validateSelection(value?: TableSelectionPropType): void {\n\t\tvalidateTableSelection(this, value);\n\t}\n\t@Watch('_on')\n\tpublic validateOn(value?: TableStatefulCallbacksPropType): void {\n\t\tvalidateTableStatefulCallbacks(this, value);\n\t}\n\n\tprivate readonly handlePagination: KoliBriPaginationButtonCallbacks = {\n\t\tonClick: (event: Event, page: number) => {\n\t\t\tif (typeof this.state._pagination._on?.onClick === 'function') {\n\t\t\t\tthis.state._pagination._on.onClick(event, page);\n\t\t\t}\n\t\t\tsetState(this, '_pagination', {\n\t\t\t\t...this.state._pagination,\n\t\t\t\t_page: page,\n\t\t\t});\n\t\t},\n\t\tonChangePage: (event: Event, page: number) => {\n\t\t\tif (typeof this.state._pagination._on?.onChangePage === 'function') {\n\t\t\t\tthis.state._pagination._on.onChangePage(event, page);\n\t\t\t}\n\t\t\tsetState(this, '_pagination', {\n\t\t\t\t...this.state._pagination,\n\t\t\t\t_page: page,\n\t\t\t});\n\t\t},\n\t\tonChangePageSize: (event: Event, pageSize: number) => {\n\t\t\tif (typeof this.state._pagination._on?.onChangePageSize === 'function') {\n\t\t\t\tthis.state._pagination._on.onChangePageSize(event, pageSize);\n\t\t\t}\n\t\t\tsetState(this, '_pagination', {\n\t\t\t\t...this.state._pagination,\n\t\t\t\t_pageSize: pageSize,\n\t\t\t});\n\t\t\tsetState(this, '_pageSize', pageSize);\n\t\t},\n\t};\n\n\t@Watch('_pagination')\n\tpublic validatePagination(value?: boolean | Stringified<KoliBriTablePaginationProps>): void {\n\t\ttry {\n\t\t\tvalue = parseJson<boolean | KoliBriTablePaginationProps>(value);\n\t\t\t// eslint-disable-next-line no-empty\n\t\t} catch (e) {\n\t\t\t// value behält den ursprünglichen Wert\n\t\t}\n\n\t\tthis.showPagination = paginationValidator(value);\n\n\t\twatchValidator<boolean | Stringified<KoliBriTablePaginationProps>>(\n\t\t\tthis,\n\t\t\t'_pagination',\n\t\t\tpaginationValidator,\n\t\t\tnew Set(['boolean', 'KoliBriTablePagination']),\n\t\t\tvalue,\n\t\t\t{\n\t\t\t\tdefaultValue: {\n\t\t\t\t\t_page: 1,\n\t\t\t\t\t_pageSize: 10,\n\t\t\t\t\t_max: 0,\n\t\t\t\t},\n\t\t\t},\n\t\t);\n\t}\n\n\tprivate onSelectionChange = (event: Event): void => {\n\t\tevent.stopPropagation();\n\t};\n\n\tpublic componentDidLoad(): void {\n\t\tthis.tableWcRef?.addEventListener('kol-selection-change', this.onSelectionChange);\n\t}\n\n\tpublic disconnectedCallback(): void {\n\t\tthis.tableWcRef?.removeEventListener('kol-selection-change', this.onSelectionChange);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateAllowMultiSort(this._allowMultiSort);\n\t\tthis.validateData(this._data);\n\t\tthis.validateDataFoot(this._dataFoot);\n\t\tthis.validateHeaders(this._headers);\n\t\tthis.validateLabel(this._label);\n\t\tthis.validateMinWidth(this._minWidth);\n\t\tthis.validatePagination(this._pagination);\n\t\tthis.validatePaginationPosition(this._paginationPosition);\n\t\tthis.validateSelection(this._selection);\n\t\tthis.validateOn(this._on);\n\t}\n\n\tprivate selectDisplayedData(data: KoliBriTableDataType[], pageSize: number, page: number): KoliBriTableDataType[] {\n\t\tif (typeof pageSize === 'number' && pageSize > 0 && typeof page === 'number' && page > 0) {\n\t\t\tthis.pageStartSlice = pageSize * (page - 1);\n\t\t\tthis.pageEndSlice = pageSize * page > data.length ? data.length : pageSize * page;\n\t\t\treturn data.slice(this.pageStartSlice, this.pageEndSlice);\n\t\t} else {\n\t\t\tthis.pageStartSlice = 0;\n\t\t\tthis.pageEndSlice = data.length;\n\t\t\treturn data;\n\t\t}\n\t}\n\n\t/**\n\t *\n\t * @param cell only used for old single sort. Can be removed when sort is removed.\n\t */\n\tprivate updateSortedData = (cell: KoliBriTableSelectedHead = this.sortedColumnHead) => {\n\t\tif (this.disableSort) {\n\t\t\tsetState(this, '_sortedData', this.state._data);\n\t\t\treturn;\n\t\t}\n\n\t\tlet sortedData: KoliBriTableDataType[] = [...this.state._data];\n\t\tif (this.sortData.length > 0) {\n\t\t\tsortedData.sort((a: KoliBriTableDataType, b: KoliBriTableDataType) => {\n\t\t\t\tfor (let index = 0; index < this.sortData.length; index++) {\n\t\t\t\t\tconst data = this.sortData[index];\n\t\t\t\t\tconst result = data.compareFn(a, b);\n\t\t\t\t\tif (result !== 0) {\n\t\t\t\t\t\treturn data.direction === 'ASC' ? result : -result;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t});\n\t\t} else if (typeof this.sortFunction === 'function') {\n\t\t\tswitch (this.sortDirections.get(this.sortFunction)) {\n\t\t\t\tcase 'ASC':\n\t\t\t\t\tsortedData = this.sortFunction([...this.state._data]);\n\t\t\t\t\tthis.sortedColumnHead = { label: cell.label, key: cell.key, sortDirection: 'ASC' };\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'DESC':\n\t\t\t\t\tsortedData = this.sortFunction([...this.state._data]).reverse();\n\t\t\t\t\tthis.sortedColumnHead = { label: cell.label, key: cell.key, sortDirection: 'DESC' };\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'NOS':\n\t\t\t\tdefault:\n\t\t\t\t\tthis.sortedColumnHead = { label: '', key: '', sortDirection: 'NOS' };\n\t\t\t}\n\t\t}\n\t\tsetState(this, '_sortedData', sortedData);\n\t};\n\n\t/**\n\t * Renders the pagination controls for the table, showing the current visible data range\n\t * and providing navigation between different pages.\n\t *\n\t * @returns {JSX.Element} The rendered pagination controls including page range and navigation.\n\t */\n\tprivate renderPagination(position: 'top' | 'bottom'): JSX.Element {\n\t\tconst label = translate('kol-table-pagination-label', {\n\t\t\tplaceholders: {\n\t\t\t\tlabel: `${this.state._label} (${translate(`kol-pagination-position-${position}`)})`,\n\t\t\t},\n\t\t});\n\n\t\treturn (\n\t\t\t<div class=\"pagination\">\n\t\t\t\t<span role=\"status\" aria-live=\"polite\">\n\t\t\t\t\t{translate('kol-table-visible-range', {\n\t\t\t\t\t\tplaceholders: {\n\t\t\t\t\t\t\tstart: this.pageEndSlice > 0 ? (this.pageStartSlice + 1).toString() : '0',\n\t\t\t\t\t\t\tend: this.pageEndSlice.toString(),\n\t\t\t\t\t\t\ttotal:\n\t\t\t\t\t\t\t\tthis.state._pagination && this.state._pagination._max > 0\n\t\t\t\t\t\t\t\t\t? this.state._pagination._max.toString()\n\t\t\t\t\t\t\t\t\t: Array.isArray(this.state._data)\n\t\t\t\t\t\t\t\t\t\t? this.state._data.length.toString()\n\t\t\t\t\t\t\t\t\t\t: '0',\n\t\t\t\t\t\t},\n\t\t\t\t\t})}\n\t\t\t\t</span>\n\t\t\t\t<div>\n\t\t\t\t\t<KolPaginationTag\n\t\t\t\t\t\t_boundaryCount={this.state._pagination._boundaryCount}\n\t\t\t\t\t\t_customClass={this.state._pagination._customClass}\n\t\t\t\t\t\t_on={this.handlePagination}\n\t\t\t\t\t\t_page={this.state._pagination._page}\n\t\t\t\t\t\t_pageSize={this.state._pagination._pageSize}\n\t\t\t\t\t\t_pageSizeOptions={this.state._pagination._pageSizeOptions || PAGINATION_OPTIONS}\n\t\t\t\t\t\t_siblingCount={this.state._pagination._siblingCount}\n\t\t\t\t\t\t_tooltipAlign=\"bottom\"\n\t\t\t\t\t\t_max={this.state._pagination._max || this.state._pagination._max || this.state._data.length}\n\t\t\t\t\t\t_label={label}\n\t\t\t\t\t></KolPaginationTag>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n\n\tprivate getHeaderCellSortState(headerCell: KoliBriTableHeaderCellWithLogic): KoliBriSortDirection | undefined {\n\t\tif (!this.disableSort && (typeof headerCell.compareFn === 'function' || typeof headerCell.sort === 'function')) {\n\t\t\tif (headerCell.key === this.sortedColumnHead.key) {\n\t\t\t\treturn this.sortedColumnHead.sortDirection;\n\t\t\t}\n\t\t\tif (headerCell.key) {\n\t\t\t\tconst data = this.sortData.find((value) => value.key === headerCell.key);\n\t\t\t\tif (data?.direction) {\n\t\t\t\t\treturn data.direction;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn 'NOS';\n\t\t}\n\t}\n\n\tprivate handleSort({ key }: SortEventPayload) {\n\t\tconst headerCell = [...(this.state._headers.horizontal || []).flat(), ...(this.state._headers.vertical || []).flat()].find((cell) => cell.key === key);\n\t\tif (headerCell) {\n\t\t\tthis.changeCellSort(headerCell);\n\t\t}\n\t}\n\n\tprivate getSelectedData(selectedKeys: string[] | string): null | KoliBriTableDataType | KoliBriTableDataType[] {\n\t\tconst selection = this.state._selection;\n\t\tif (selection) {\n\t\t\tconst keyPropertyName = selection.keyPropertyName ?? 'id';\n\t\t\tconst data = this.state._sortedData.filter((item) => selectedKeys.includes(item[keyPropertyName] as string));\n\t\t\tif (selection?.multiple === false) {\n\t\t\t\treturn data[0];\n\t\t\t}\n\n\t\t\tif (keyPropertyName) return data;\n\t\t}\n\t\treturn null;\n\t}\n\tprivate handleSelectionChange(event: Event, value: string[] | string): void {\n\t\tconst selection = this.state._selection;\n\t\tif (selection)\n\t\t\tthis.state = {\n\t\t\t\t...this.state,\n\t\t\t\t_selection: {\n\t\t\t\t\t...selection,\n\t\t\t\t\tselectedKeys: typeof value === 'object' ? value : [value],\n\t\t\t\t},\n\t\t\t};\n\t\tconst selectedData = this.getSelectedData(value);\n\n\t\ttryToDispatchKoliBriEvent('selection-change', this.host, selectedData);\n\n\t\tif (typeof this.state._on?.[Events.onSelectionChange] === 'function') {\n\t\t\tthis.state._on[Events.onSelectionChange](event, selectedData);\n\t\t}\n\t}\n\n\t/**\n\t * Returns the data for the currently selected rows.\n\t */\n\t@Method()\n\t// eslint-disable-next-line @typescript-eslint/require-await\n\tpublic async getSelection(): Promise<KoliBriTableDataType[] | KoliBriTableDataType | null> {\n\t\tconst selectedKeys: string[] = this.state._selection?.selectedKeys || [];\n\t\treturn this.getSelectedData(selectedKeys);\n\t}\n\n\tpublic render(): JSX.Element {\n\t\tconst displayedData: KoliBriTableDataType[] = this.selectDisplayedData(\n\t\t\tthis.state._sortedData,\n\t\t\tthis.showPagination ? (this.state._pagination?._pageSize ?? 10) : this.state._sortedData.length,\n\t\t\tthis.state._pagination._page || 1,\n\t\t);\n\t\tconst paginationTop = this._paginationPosition === 'top' || this._paginationPosition === 'both' ? this.renderPagination('top') : null;\n\t\tconst paginationBottom = this._paginationPosition === 'bottom' || this._paginationPosition === 'both' ? this.renderPagination('bottom') : null;\n\n\t\tconst headerCells: TableHeaderCells = {\n\t\t\thorizontal: this.state._headers.horizontal?.map((row) => row.map((cell) => ({ ...cell, sortDirection: this.getHeaderCellSortState(cell) }))),\n\t\t\tvertical: this.state._headers.vertical?.map((column) => column.map((cell) => ({ ...cell, sortDirection: this.getHeaderCellSortState(cell) }))),\n\t\t};\n\t\treturn (\n\t\t\t<Host class=\"kol-table-stateful\">\n\t\t\t\t{this.pageEndSlice > 0 && this.showPagination && paginationTop}\n\t\t\t\t<KolTableStatelessWcTag\n\t\t\t\t\tref={this.catchRef}\n\t\t\t\t\t_data={displayedData}\n\t\t\t\t\t_headerCells={headerCells}\n\t\t\t\t\t_label={this.state._label}\n\t\t\t\t\t_dataFoot={this.state._dataFoot}\n\t\t\t\t\t_minWidth={this.state._minWidth}\n\t\t\t\t\t_on={{\n\t\t\t\t\t\tonSort: (_: MouseEvent, payload: SortEventPayload) => {\n\t\t\t\t\t\t\tthis.handleSort(payload);\n\t\t\t\t\t\t},\n\t\t\t\t\t\tonSelectionChange: (event: Event, value: string[] | string) => {\n\t\t\t\t\t\t\tthis.handleSelectionChange(event, value);\n\t\t\t\t\t\t},\n\t\t\t\t\t}}\n\t\t\t\t\t_selection={this.state._selection}\n\t\t\t\t/>\n\t\t\t\t{this.pageEndSlice > 0 && this.showPagination && paginationBottom}\n\t\t\t</Host>\n\t\t);\n\t}\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h,Fragment,Host}from"@stencil/core/internal/client";import{e as KolIconTag,a as KolTooltipWcTag,c as KolButtonWcTag}from"./component-names.js";import{t as translate}from"./i18n2.js";import{P as emptyStringByArrayHandler,o as objectObjectHandler,q as parseJson,w as watchValidator,m as watchString}from"./index2.js";import{E as Events}from"./keyboard.js";import{n as nonce}from"./dev.utils.js";import{t as tryToDispatchKoliBriEvent}from"./events.js";import{v as validateTableData,a as validateTableDataFoot,d as validateTableCallbacks,b as validateTableSelection}from"./table-selection.js";import{v as validateLabel}from"./label.js";const validateTableHeaderCells=(e,t)=>{emptyStringByArrayHandler(t,()=>{objectObjectHandler(t,()=>{try{t=parseJson(t)}catch(e){}watchValidator(e,"_headerCells",e=>"object"==typeof e&&null!==e&&(void 0===e.horizontal||Array.isArray(e.horizontal)&&void 0===e.horizontal.find(e=>!Array.isArray(e)))&&(void 0===e.vertical||Array.isArray(e.vertical)&&void 0===e.vertical.find(e=>!Array.isArray(e)))&&!0,new Set(["TableHeaderCellsPropType"]),t)})})},KolTableStateless=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.horizontal=!0,this.cellsToRenderTimeouts=new Map,this.dataToKeyMap=new Map,this.checkboxRefs=[],this.translateSort=translate("kol-sort"),this.renderTableRow=(e,t,a)=>{var l,i;let o=String(t);return this.horizontal&&(null===(l=e[0])||void 0===l?void 0:l.data)&&(o=null!==(i=this.getDataKey(e[0].data))&&void 0!==i?i:o),h("tr",{key:`row-${o}`},this.renderSelectionCell(e,t),e.map((e,l)=>this.renderTableCell(e,t,l,a)))},this.renderTableCell=(e,t,a,l)=>{let i=`${t}-${a}-${e.label}`;if(e.data){const l=this.getDataKey(e.data);i=l?`${l}-${this.horizontal?a:t}`:i}return!1===e.asTd?this.renderHeadingCell(e,t,a,l):h("td",{key:`cell-${i}`,class:{[e.textAlign]:"string"==typeof e.textAlign&&e.textAlign.length>0},colSpan:e.colSpan,rowSpan:e.rowSpan,style:{textAlign:e.textAlign,width:e.width},ref:"function"==typeof e.render?t=>{this.cellRender(e,t)}:void 0},"function"!=typeof e.render?e.label:"")},this.state={_data:[],_label:"",_headerCells:{horizontal:[],vertical:[]}},this.tableDivElementHasScrollbar=!1,this._data=void 0,this._dataFoot=void 0,this._headerCells=void 0,this._label=void 0,this._minWidth=void 0,this._on=void 0,this._selection=void 0}validateData(e){validateTableData(this,e,{beforePatch:e=>{this.updateDataToKeyMap(e)}})}validateDataFoot(e){validateTableDataFoot(this,e)}validateHeaderCells(e){validateTableHeaderCells(this,e)}validateLabel(e){validateLabel(this,e,{required:!0})}validateMinWidth(e){watchString(this,"_deprecatedMinWidth",e,{defaultValue:void 0})}validateOn(e){validateTableCallbacks(this,e)}validateSelection(e){validateTableSelection(this,e)}handleKeyDown(e){var t;if("ArrowUp"===e.key||"ArrowDown"===e.key){const a=null===(t=this.tableDivElement)||void 0===t?void 0:t.querySelector(":focus");let l=this.checkboxRefs.indexOf(a);l>-1&&(e.preventDefault(),"ArrowDown"===e.key?(l=(l+1)%this.checkboxRefs.length,this.checkboxRefs[l].focus()):"ArrowUp"===e.key&&(e.preventDefault(),l=(l+this.checkboxRefs.length-1)%this.checkboxRefs.length,this.checkboxRefs[l].focus()))}}componentDidRender(){this.checkDivElementScrollbar()}componentDidLoad(){this.tableDivElement&&ResizeObserver&&(this.tableDivElementResizeObserver=new ResizeObserver(this.checkDivElementScrollbar.bind(this)),this.tableDivElementResizeObserver.observe(this.tableDivElement))}disconnectedCallback(){var e;null===(e=this.tableDivElementResizeObserver)||void 0===e||e.disconnect()}checkDivElementScrollbar(){this.tableDivElement&&(this.tableDivElementHasScrollbar=this.tableDivElement.scrollWidth>this.tableDivElement.clientWidth)}updateDataToKeyMap(e){e.forEach(e=>{this.dataToKeyMap.has(e)||this.dataToKeyMap.set(e,nonce())}),this.dataToKeyMap.forEach((t,a)=>{e.includes(a)||this.dataToKeyMap.delete(a)})}getDataKey(e){return this.dataToKeyMap.get(e)}cellRender(e,t){t&&(clearTimeout(this.cellsToRenderTimeouts.get(t)),this.cellsToRenderTimeouts.set(t,setTimeout(()=>{if("function"==typeof e.render){const a=e.render(t,e,e.data,this.state._data);"string"==typeof a&&(t.textContent=a)}})))}getNumberOfCols(e,t){let a=0;return e.forEach(e=>{let t=0;Array.isArray(e)&&e.forEach(e=>{var a;return t+=null!==(a=e.colSpan)&&void 0!==a?a:1}),a<t&&(a=t)}),0===a&&(a=t.length),a}getNumberOfRows(e,t){var a;let l=0;return e.forEach(e=>{let t=0;Array.isArray(e)&&e.forEach(e=>{var a;return t+=null!==(a=e.rowSpan)&&void 0!==a?a:1}),l<t&&(l=t)}),0===l?l=t.length:l-=(null===(a=this.state._dataFoot)||void 0===a?void 0:a.length)||0,l}getThePrimaryHeadersWithKeyOrRenderFunction(e){const t=[];return e.forEach(e=>{e.forEach(e=>{"string"!=typeof e.key&&"function"!=typeof e.render||t.push(e)})}),t}getPrimaryHeaders(e){var t,a;let l=this.getThePrimaryHeadersWithKeyOrRenderFunction(null!==(t=e.horizontal)&&void 0!==t?t:[]);return this.horizontal=!0,0===l.length&&(l=this.getThePrimaryHeadersWithKeyOrRenderFunction(null!==(a=e.vertical)&&void 0!==a?a:[]),l.length>0&&(this.horizontal=!1)),l}createDataField(e,t,a){var l;t.horizontal=Array.isArray(null==t?void 0:t.horizontal)?t.horizontal:[],t.vertical=Array.isArray(null==t?void 0:t.vertical)?t.vertical:[];const i=this.getPrimaryHeaders(t),o=this.getNumberOfCols(t.horizontal,e);let n=this.getNumberOfRows(t.vertical,e),s=0;a&&(s=n,n+=(null===(l=this.state._dataFoot)||void 0===l?void 0:l.length)||0);const r=[],c=[],d=[];t.vertical.forEach((e,t)=>{c[t]=0,d[t]=[]});for(let l=s;l<n;l++){const n=[];t.vertical.forEach((e,t)=>{let a=0;if(d[t].forEach(e=>a+=e),a<=l){const i=e[l-a+c[t]];if("object"==typeof i){n.push(Object.assign(Object.assign({},i),{asTd:!1,data:{}}));let e=1;if("number"==typeof i.rowSpan&&i.rowSpan>1&&(e=i.rowSpan),d[t].push(e),"number"==typeof i.colSpan&&i.colSpan>1)for(let a=1;a<i.colSpan;a++)d[t+a].push(e);c[t]++}}});for(let t=0;t<o;t++)if(!0===this.horizontal){const o=a&&this.state._dataFoot?this.state._dataFoot[l-s]:e[l];"object"!=typeof i[t]||null===i[t]||"object"!=typeof o||null===o||"string"!=typeof i[t].key&&"function"!=typeof i[t].render||n.push(Object.assign(Object.assign({},i[t]),{colSpan:void 0,data:o,label:o[i[t].key],rowSpan:void 0}))}else"object"!=typeof i[l]||null===i[l]||"object"!=typeof e[t]||null===e[t]||"string"!=typeof i[l].key&&"function"!=typeof i[l].render||n.push(Object.assign(Object.assign({},i[l]),{colSpan:void 0,data:e[t],label:e[t][i[l].key],rowSpan:void 0}));r.push(n)}if(0===e.length){let e=0,a=0;Array.isArray(t.horizontal)&&t.horizontal.length>0&&t.horizontal[0].forEach(t=>{e+=t.colSpan||1}),Array.isArray(t.vertical)&&t.vertical.length>0&&(e-=t.vertical.length,t.vertical[0].forEach(e=>{a+=e.rowSpan||1}));const l={colSpan:e,label:translate("kol-no-entries"),render:void 0,rowSpan:Math.max(a,1)};0===r.length?r.push([l]):r[0].push(l)}return r}componentWillLoad(){this.validateData(this._data),this.validateDataFoot(this._dataFoot),this.validateHeaderCells(this._headerCells),this.validateLabel(this._label),this.validateMinWidth(this._minWidth),this.validateOn(this._on),this.validateSelection(this._selection)}renderSelectionCell(e,t){var a,l,i;const o=this.state._selection;if(!o)return"";const n=null!==(a=o.keyPropertyName)&&void 0!==a?a:"id",s=null===(l=e[0])||void 0===l?void 0:l.data;if(!s)return"";const r=s[n],c=o.multiple||void 0===o.multiple,d=null===(i=null==o?void 0:o.selectedKeys)||void 0===i?void 0:i.includes(r),v=o.label(s),b={name:"selection",checked:d,id:r,"aria-label":v};return h("td",{key:`tbody-${t}-selection`,class:"selection-cell"},h("div",{class:"input "+(d?"checked":"")},c?h("label",{class:"checkbox-container"},h(KolIconTag,{class:"icon",_icons:"codicon "+(d?"codicon-check":""),_label:""}),h("input",Object.assign({ref:e=>e&&this.checkboxRefs.push(e)},b,{type:"checkbox",onInput:e=>{var t,a,l;const i=d?null===(a=null==o?void 0:o.selectedKeys)||void 0===a?void 0:a.filter(e=>e!==r):[...null!==(t=null==o?void 0:o.selectedKeys)&&void 0!==t?t:[],r];tryToDispatchKoliBriEvent("selection-change",this.host,i),"function"==typeof(null===(l=this.state._on)||void 0===l?void 0:l[Events.onSelectionChange])&&this.state._on[Events.onSelectionChange](e,null!=i?i:[])}}))):h("label",{class:"radio-container"},h("input",Object.assign({},b,{type:"radio",onInput:e=>{var t;tryToDispatchKoliBriEvent("selection-change",this.host,r),"function"==typeof(null===(t=this.state._on)||void 0===t?void 0:t[Events.onSelectionChange])&&this.state._on[Events.onSelectionChange](e,r)}}))),h(KolTooltipWcTag,{"aria-hidden":"true",class:"input-tooltip",_align:"right",_id:`${r}-label`,_label:v})))}renderHeadingSelectionCell(){var e,t;const a=this.state._selection;if(!1===(null==a?void 0:a.multiple))return h("td",{key:"thead-0-selection",class:"table__header-cell table__header-cell--horizontal selection-cell"});const l=null!==(e=null==a?void 0:a.keyPropertyName)&&void 0!==e?e:"id",i=null===(t=null==a?void 0:a.selectedKeys)||void 0===t?void 0:t.length,o=i===this.state._data.length,n=0!==i&&!o;let s="kol-table-selection-indeterminate";o&&!n&&(s="kol-table-selection-none"),0===i&&(s="kol-table-selection-all");const r=translate(s);return h("th",{key:"thead-0-selection",class:"table__header-cell table__header-cell--horizontal selection-cell selection-control"},h("div",{class:"input "+(n?"indeterminate":o?"checked":"")},h("label",{class:"checkbox-container"},h(KolIconTag,{class:"icon",_icons:"codicon "+(n?"codicon-remove":o?"codicon-check":""),_label:""}),h("input",{ref:e=>e&&this.checkboxRefs.push(e),name:"selection",checked:o&&!n,"aria-label":r,type:"checkbox",onInput:e=>{var t;const a=o?[]:this.state._data.map(e=>null==e?void 0:e[l]);tryToDispatchKoliBriEvent("selection-change",this.host,a),"function"==typeof(null===(t=this.state._on)||void 0===t?void 0:t[Events.onSelectionChange])&&this.state._on[Events.onSelectionChange](e,a)}})),h(KolTooltipWcTag,{"aria-hidden":"true",class:"input-tooltip",_align:"right",_id:`${s}-label`,_label:r})))}renderHeaderTdCell(){return h(Fragment,null,Array.isArray(this.state._headerCells.horizontal)&&this.state._headerCells.horizontal.length>0&&Array.isArray(this.state._headerCells.vertical)&&this.state._headerCells.vertical.length>0&&Array.isArray(this.state._headerCells.horizontal)&&h("td",{"aria-hidden":"true",colSpan:this.state._headerCells.vertical.length,rowSpan:this.state._headerCells.horizontal.length}))}renderHeadingCell(e,t,a,l){let i="none",o="codicon codicon-fold";if(e.sortDirection)switch(e.sortDirection){case"ASC":o="codicon codicon-chevron-up",i="ascending";break;case"DESC":o="codicon codicon-chevron-down",i="descending";break;default:i="none"}const n=l?"row":"number"==typeof e.colSpan&&e.colSpan>1?"colgroup":"col",s=["table__header-cell",l?"table__header-cell--vertical":"table__header-cell--horizontal"];return"string"==typeof e.textAlign&&e.textAlign.length>0&&s.push(`table__header-cell--align-${e.textAlign}`,`align-${e.textAlign}`),h("th",{key:`${t}-${a}-${e.label}`,class:s.join(" "),scope:n,colSpan:e.colSpan,rowSpan:e.rowSpan,style:{width:e.width},"aria-sort":i,"data-sort":`sort-${e.sortDirection}`},e.sortDirection?h(KolButtonWcTag,{class:"table-sort-button",exportparts:"icon",_icons:{right:o},_label:e.label,_ariaDescription:this.translateSort,_on:{onClick:t=>{var a;"function"==typeof(null===(a=this.state._on)||void 0===a?void 0:a.onSort)&&e.key&&e.sortDirection&&this.state._on.onSort(t,{key:e.key,currentSortDirection:e.sortDirection})}}}):e.label)}renderSpacer(e,t){var a,l;const i=(null===(a=this.state._headerCells.vertical)||void 0===a?void 0:a.length)||0,o=null===(l=null==t?void 0:t[0])||void 0===l?void 0:l.reduce((e,t)=>e+(t.colSpan||1),0),n=this.state._selection?1:0;return h("tr",{"aria-hidden":"true",class:`${e}-spacer`},h("td",{colSpan:i+o+n}))}renderFoot(){if(!this.state._dataFoot||0===this.state._dataFoot.length)return null;const e=this.createDataField(this.state._dataFoot,this.state._headerCells,!0);return h("tfoot",null,[this.renderSpacer("foot",e),e.map((e,t)=>this.renderTableRow(e,t,!0))])}render(){const e=this.createDataField(this.state._data,this.state._headerCells);return this.checkboxRefs=[],h(Host,{key:"0a5d97fb01c3164f1ed19cc4a2d0f906f15d222c",class:"kol-table-stateless-wc"},h("div",{key:"ebf859eb25e79cd3d77c574681e9a5450e957dad",ref:e=>this.tableDivElement=e,class:"table",tabindex:this.tableDivElementHasScrollbar?"-1":void 0},h("table",{key:"0c500843586f5c8b6c825ff4b1b841c24d2e0977",style:{minWidth:this.state._deprecatedMinWidth||this.state._minWidth}},h("caption",{key:"3426c150695ee2dbd27144a9ee5659bd381c4f2f",id:"caption",tabindex:this.tableDivElementHasScrollbar?"0":void 0},this.state._label),Array.isArray(this.state._headerCells.horizontal)&&h("thead",{key:"bc52da142f702612205b82a4c68732bfbd7c8352"},[this.state._headerCells.horizontal.map((e,t)=>h("tr",{key:`thead-${t}`},this.state._selection&&this.renderHeadingSelectionCell(),0===t&&this.renderHeaderTdCell(),Array.isArray(e)&&e.map((e,a)=>!0===e.asTd?h("td",{key:`thead-${t}-${a}-${e.label}`,class:["table__header-cell","table__header-cell--horizontal","string"==typeof e.textAlign&&e.textAlign.length>0?`table__header-cell--align-${e.textAlign}`:void 0,"string"==typeof e.textAlign&&e.textAlign.length>0?`align-${e.textAlign}`:void 0,"string"==typeof e.textAlign&&e.textAlign.length>0?e.textAlign:void 0].filter(Boolean).join(" "),colSpan:e.colSpan,rowSpan:e.rowSpan,style:{textAlign:e.textAlign,width:e.width},ref:"function"==typeof e.render?t=>{this.cellRender(e,t)}:void 0},"function"!=typeof e.render?e.label:""):this.renderHeadingCell(e,t,a,!1)))),this.renderSpacer("head",this.state._headerCells.horizontal)]),h("tbody",{key:"c96ce64cba502b8693c5371a058430245cd42a07"},e.map((e,t)=>this.renderTableRow(e,t,!0))),this.renderFoot())))}get host(){return this}static get watchers(){return{_data:["validateData"],_dataFoot:["validateDataFoot"],_headerCells:["validateHeaderCells"],_label:["validateLabel"],_minWidth:["validateMinWidth"],_on:["validateOn"],_selection:["validateSelection"]}}},[0,"kol-table-stateless-wc",{_data:[1],_dataFoot:[1,"_data-foot"],_headerCells:[1,"_header-cells"],_label:[1],_minWidth:[1,"_min-width"],_on:[16],_selection:[1],state:[32],tableDivElementHasScrollbar:[32]},[[0,"keydown","handleKeyDown"]],{_data:["validateData"],_dataFoot:["validateDataFoot"],_headerCells:["validateHeaderCells"],_label:["validateLabel"],_minWidth:["validateMinWidth"],_on:["validateOn"],_selection:["validateSelection"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-table-stateless-wc"].forEach(e=>{if("kol-table-stateless-wc"===e)customElements.get(e)||customElements.define(e,KolTableStateless)})}const KolTableStatelessWc=KolTableStateless,defineCustomElement=defineCustomElement$1;export{KolTableStatelessWc,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h,Fragment,Host}from"@stencil/core/internal/client";import{e as KolIconTag,a as KolTooltipWcTag,c as KolButtonWcTag}from"./component-names.js";import{t as translate}from"./i18n2.js";import{P as emptyStringByArrayHandler,o as objectObjectHandler,q as parseJson,w as watchValidator,m as watchString}from"./index2.js";import{E as Events}from"./keyboard.js";import{n as nonce}from"./dev.utils.js";import{t as tryToDispatchKoliBriEvent}from"./events.js";import{v as validateTableData,a as validateTableDataFoot,d as validateTableCallbacks,b as validateTableSelection}from"./table-selection.js";import{v as validateLabel}from"./label.js";const validateTableHeaderCells=(e,t)=>{emptyStringByArrayHandler(t,()=>{objectObjectHandler(t,()=>{try{t=parseJson(t)}catch(e){}watchValidator(e,"_headerCells",e=>"object"==typeof e&&null!==e&&(void 0===e.horizontal||Array.isArray(e.horizontal)&&void 0===e.horizontal.find(e=>!Array.isArray(e)))&&(void 0===e.vertical||Array.isArray(e.vertical)&&void 0===e.vertical.find(e=>!Array.isArray(e)))&&!0,new Set(["TableHeaderCellsPropType"]),t)})})},KolTableStateless=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.horizontal=!0,this.cellsToRenderTimeouts=new Map,this.dataToKeyMap=new Map,this.checkboxRefs=[],this.translateSort=translate("kol-sort"),this.translateNoEntries=translate("kol-no-entries"),this.renderTableRow=(e,t,a)=>{var l,i;let o=String(t);return this.horizontal&&(null===(l=e[0])||void 0===l?void 0:l.data)&&(o=null!==(i=this.getDataKey(e[0].data))&&void 0!==i?i:o),h("tr",{key:`row-${o}`},this.renderSelectionCell(e,t),e.map((e,l)=>this.renderTableCell(e,t,l,a)))},this.renderTableCell=(e,t,a,l)=>{let i=`${t}-${a}-${e.label}`;if(e.data){const l=this.getDataKey(e.data);i=l?`${l}-${this.horizontal?a:t}`:i}if(!1===e.asTd)return this.renderHeadingCell(e,t,a,l);{const t="function"!=typeof e.render&&e.label===this.translateNoEntries;return h("td",{key:`cell-${i}`,class:{[e.textAlign]:"string"==typeof e.textAlign&&e.textAlign.length>0},"aria-atomic":t?"false":void 0,"aria-live":t?"polite":void 0,"aria-relevant":t?"text":void 0,colSpan:e.colSpan,rowSpan:e.rowSpan,style:{textAlign:e.textAlign,width:e.width},ref:"function"==typeof e.render?t=>{this.cellRender(e,t)}:void 0},"function"!=typeof e.render?e.label:"")}},this.state={_data:[],_label:"",_headerCells:{horizontal:[],vertical:[]}},this.tableDivElementHasScrollbar=!1,this._data=void 0,this._dataFoot=void 0,this._headerCells=void 0,this._label=void 0,this._minWidth=void 0,this._on=void 0,this._selection=void 0}validateData(e){validateTableData(this,e,{beforePatch:e=>{this.updateDataToKeyMap(e)}})}validateDataFoot(e){validateTableDataFoot(this,e)}validateHeaderCells(e){validateTableHeaderCells(this,e)}validateLabel(e){validateLabel(this,e,{required:!0})}validateMinWidth(e){watchString(this,"_deprecatedMinWidth",e,{defaultValue:void 0})}validateOn(e){validateTableCallbacks(this,e)}validateSelection(e){validateTableSelection(this,e)}handleKeyDown(e){var t;if("ArrowUp"===e.key||"ArrowDown"===e.key){const a=null===(t=this.tableDivElement)||void 0===t?void 0:t.querySelector(":focus");let l=this.checkboxRefs.indexOf(a);l>-1&&(e.preventDefault(),"ArrowDown"===e.key?(l=(l+1)%this.checkboxRefs.length,this.checkboxRefs[l].focus()):"ArrowUp"===e.key&&(e.preventDefault(),l=(l+this.checkboxRefs.length-1)%this.checkboxRefs.length,this.checkboxRefs[l].focus()))}}componentDidRender(){this.checkDivElementScrollbar()}componentDidLoad(){this.tableDivElement&&ResizeObserver&&(this.tableDivElementResizeObserver=new ResizeObserver(this.checkDivElementScrollbar.bind(this)),this.tableDivElementResizeObserver.observe(this.tableDivElement))}disconnectedCallback(){var e;null===(e=this.tableDivElementResizeObserver)||void 0===e||e.disconnect()}checkDivElementScrollbar(){this.tableDivElement&&(this.tableDivElementHasScrollbar=this.tableDivElement.scrollWidth>this.tableDivElement.clientWidth)}updateDataToKeyMap(e){e.forEach(e=>{this.dataToKeyMap.has(e)||this.dataToKeyMap.set(e,nonce())}),this.dataToKeyMap.forEach((t,a)=>{e.includes(a)||this.dataToKeyMap.delete(a)})}getDataKey(e){return this.dataToKeyMap.get(e)}cellRender(e,t){t&&(clearTimeout(this.cellsToRenderTimeouts.get(t)),this.cellsToRenderTimeouts.set(t,setTimeout(()=>{if("function"==typeof e.render){const a=e.render(t,e,e.data,this.state._data);"string"==typeof a&&(t.textContent=a)}})))}getNumberOfCols(e,t){let a=0;return e.forEach(e=>{let t=0;Array.isArray(e)&&e.forEach(e=>{var a;return t+=null!==(a=e.colSpan)&&void 0!==a?a:1}),a<t&&(a=t)}),0===a&&(a=t.length),a}getNumberOfRows(e,t){var a;let l=0;return e.forEach(e=>{let t=0;Array.isArray(e)&&e.forEach(e=>{var a;return t+=null!==(a=e.rowSpan)&&void 0!==a?a:1}),l<t&&(l=t)}),0===l?l=t.length:l-=(null===(a=this.state._dataFoot)||void 0===a?void 0:a.length)||0,l}getThePrimaryHeadersWithKeyOrRenderFunction(e){const t=[];return e.forEach(e=>{e.forEach(e=>{"string"!=typeof e.key&&"function"!=typeof e.render||t.push(e)})}),t}getPrimaryHeaders(e){var t,a;let l=this.getThePrimaryHeadersWithKeyOrRenderFunction(null!==(t=e.horizontal)&&void 0!==t?t:[]);return this.horizontal=!0,0===l.length&&(l=this.getThePrimaryHeadersWithKeyOrRenderFunction(null!==(a=e.vertical)&&void 0!==a?a:[]),l.length>0&&(this.horizontal=!1)),l}createDataField(e,t,a){var l;t.horizontal=Array.isArray(null==t?void 0:t.horizontal)?t.horizontal:[],t.vertical=Array.isArray(null==t?void 0:t.vertical)?t.vertical:[];const i=this.getPrimaryHeaders(t),o=this.getNumberOfCols(t.horizontal,e);let n=this.getNumberOfRows(t.vertical,e),r=0;a&&(r=n,n+=(null===(l=this.state._dataFoot)||void 0===l?void 0:l.length)||0);const s=[],d=[],c=[];t.vertical.forEach((e,t)=>{d[t]=0,c[t]=[]});for(let l=r;l<n;l++){const n=[];t.vertical.forEach((e,t)=>{let a=0;if(c[t].forEach(e=>a+=e),a<=l){const i=e[l-a+d[t]];if("object"==typeof i){n.push(Object.assign(Object.assign({},i),{asTd:!1,data:{}}));let e=1;if("number"==typeof i.rowSpan&&i.rowSpan>1&&(e=i.rowSpan),c[t].push(e),"number"==typeof i.colSpan&&i.colSpan>1)for(let a=1;a<i.colSpan;a++)c[t+a].push(e);d[t]++}}});for(let t=0;t<o;t++)if(!0===this.horizontal){const o=a&&this.state._dataFoot?this.state._dataFoot[l-r]:e[l];"object"!=typeof i[t]||null===i[t]||"object"!=typeof o||null===o||"string"!=typeof i[t].key&&"function"!=typeof i[t].render||n.push(Object.assign(Object.assign({},i[t]),{colSpan:void 0,data:o,label:o[i[t].key],rowSpan:void 0}))}else"object"!=typeof i[l]||null===i[l]||"object"!=typeof e[t]||null===e[t]||"string"!=typeof i[l].key&&"function"!=typeof i[l].render||n.push(Object.assign(Object.assign({},i[l]),{colSpan:void 0,data:e[t],label:e[t][i[l].key],rowSpan:void 0}));s.push(n)}if(0===e.length){let e=0,a=0;Array.isArray(t.horizontal)&&t.horizontal.length>0&&t.horizontal[0].forEach(t=>{e+=t.colSpan||1}),Array.isArray(t.vertical)&&t.vertical.length>0&&(e-=t.vertical.length,t.vertical[0].forEach(e=>{a+=e.rowSpan||1}));const l={colSpan:e,label:translate("kol-no-entries"),render:void 0,rowSpan:Math.max(a,1)};0===s.length?s.push([l]):s[0].push(l)}return s}componentWillLoad(){this.validateData(this._data),this.validateDataFoot(this._dataFoot),this.validateHeaderCells(this._headerCells),this.validateLabel(this._label),this.validateMinWidth(this._minWidth),this.validateOn(this._on),this.validateSelection(this._selection)}renderSelectionCell(e,t){var a,l,i;const o=this.state._selection;if(!o)return"";const n=null!==(a=o.keyPropertyName)&&void 0!==a?a:"id",r=null===(l=e[0])||void 0===l?void 0:l.data;if(!r)return"";const s=r[n],d=o.multiple||void 0===o.multiple,c=null===(i=null==o?void 0:o.selectedKeys)||void 0===i?void 0:i.includes(s),v=o.label(r),b={name:"selection",checked:c,id:s,"aria-label":v};return h("td",{key:`tbody-${t}-selection`,class:"selection-cell"},h("div",{class:"input "+(c?"checked":"")},d?h("label",{class:"checkbox-container"},h(KolIconTag,{class:"icon",_icons:"codicon "+(c?"codicon-check":""),_label:""}),h("input",Object.assign({ref:e=>e&&this.checkboxRefs.push(e)},b,{type:"checkbox",onInput:e=>{var t,a,l;const i=c?null===(a=null==o?void 0:o.selectedKeys)||void 0===a?void 0:a.filter(e=>e!==s):[...null!==(t=null==o?void 0:o.selectedKeys)&&void 0!==t?t:[],s];tryToDispatchKoliBriEvent("selection-change",this.host,i),"function"==typeof(null===(l=this.state._on)||void 0===l?void 0:l[Events.onSelectionChange])&&this.state._on[Events.onSelectionChange](e,null!=i?i:[])}}))):h("label",{class:"radio-container"},h("input",Object.assign({},b,{type:"radio",onInput:e=>{var t;tryToDispatchKoliBriEvent("selection-change",this.host,s),"function"==typeof(null===(t=this.state._on)||void 0===t?void 0:t[Events.onSelectionChange])&&this.state._on[Events.onSelectionChange](e,s)}}))),h(KolTooltipWcTag,{"aria-hidden":"true",class:"input-tooltip",_align:"right",_id:`${s}-label`,_label:v})))}renderHeadingSelectionCell(){var e,t;const a=this.state._selection;if(!1===(null==a?void 0:a.multiple))return h("td",{key:"thead-0-selection",class:"table__header-cell table__header-cell--horizontal selection-cell"});const l=null!==(e=null==a?void 0:a.keyPropertyName)&&void 0!==e?e:"id",i=null===(t=null==a?void 0:a.selectedKeys)||void 0===t?void 0:t.length,o=i===this.state._data.length,n=0!==i&&!o;let r="kol-table-selection-indeterminate";o&&!n&&(r="kol-table-selection-none"),0===i&&(r="kol-table-selection-all");const s=translate(r);return h("th",{key:"thead-0-selection",class:"table__header-cell table__header-cell--horizontal selection-cell selection-control"},h("div",{class:"input "+(n?"indeterminate":o?"checked":"")},h("label",{class:"checkbox-container"},h(KolIconTag,{class:"icon",_icons:"codicon "+(n?"codicon-remove":o?"codicon-check":""),_label:""}),h("input",{ref:e=>e&&this.checkboxRefs.push(e),name:"selection",checked:o&&!n,"aria-label":s,type:"checkbox",onInput:e=>{var t;const a=o?[]:this.state._data.map(e=>null==e?void 0:e[l]);tryToDispatchKoliBriEvent("selection-change",this.host,a),"function"==typeof(null===(t=this.state._on)||void 0===t?void 0:t[Events.onSelectionChange])&&this.state._on[Events.onSelectionChange](e,a)}})),h(KolTooltipWcTag,{"aria-hidden":"true",class:"input-tooltip",_align:"right",_id:`${r}-label`,_label:s})))}renderHeaderTdCell(){return h(Fragment,null,Array.isArray(this.state._headerCells.horizontal)&&this.state._headerCells.horizontal.length>0&&Array.isArray(this.state._headerCells.vertical)&&this.state._headerCells.vertical.length>0&&Array.isArray(this.state._headerCells.horizontal)&&h("td",{"aria-hidden":"true",colSpan:this.state._headerCells.vertical.length,rowSpan:this.state._headerCells.horizontal.length}))}renderHeadingCell(e,t,a,l){let i="none",o="codicon codicon-fold";if(e.sortDirection)switch(e.sortDirection){case"ASC":o="codicon codicon-chevron-up",i="ascending";break;case"DESC":o="codicon codicon-chevron-down",i="descending";break;default:i="none"}const n=l?"row":"number"==typeof e.colSpan&&e.colSpan>1?"colgroup":"col",r=["table__header-cell",l?"table__header-cell--vertical":"table__header-cell--horizontal"];return"string"==typeof e.textAlign&&e.textAlign.length>0&&r.push(`table__header-cell--align-${e.textAlign}`,`align-${e.textAlign}`),h("th",{key:`${t}-${a}-${e.label}`,class:r.join(" "),scope:n,colSpan:e.colSpan,rowSpan:e.rowSpan,style:{width:e.width},"aria-sort":i,"data-sort":`sort-${e.sortDirection}`},e.sortDirection?h(KolButtonWcTag,{class:"table-sort-button",exportparts:"icon",_icons:{right:o},_label:e.label,_ariaDescription:this.translateSort,_on:{onClick:t=>{var a;"function"==typeof(null===(a=this.state._on)||void 0===a?void 0:a.onSort)&&e.key&&e.sortDirection&&this.state._on.onSort(t,{key:e.key,currentSortDirection:e.sortDirection})}}}):e.label)}renderSpacer(e,t){var a,l;const i=(null===(a=this.state._headerCells.vertical)||void 0===a?void 0:a.length)||0,o=null===(l=null==t?void 0:t[0])||void 0===l?void 0:l.reduce((e,t)=>e+(t.colSpan||1),0),n=this.state._selection?1:0;return h("tr",{"aria-hidden":"true",class:`${e}-spacer`},h("td",{colSpan:i+o+n}))}renderFoot(){if(!this.state._dataFoot||0===this.state._dataFoot.length)return null;const e=this.createDataField(this.state._dataFoot,this.state._headerCells,!0);return h("tfoot",null,[this.renderSpacer("foot",e),e.map((e,t)=>this.renderTableRow(e,t,!0))])}render(){const e=this.createDataField(this.state._data,this.state._headerCells);return this.checkboxRefs=[],h(Host,{key:"d4e9d9eb3d6c582fa91fc5c2810ffb567bb203cf",class:"kol-table-stateless-wc"},h("div",{key:"2d2096201437601307c592db1c2d9e26a8c43f9f",ref:e=>this.tableDivElement=e,class:"table",tabindex:this.tableDivElementHasScrollbar?"-1":void 0},h("table",{key:"a984d2d87a344a8a2f2552fb27d33f79c681c85b",style:{minWidth:this.state._deprecatedMinWidth||this.state._minWidth}},h("caption",{key:"ecbf27a633df06c21134a269ae4c8731df6e661a",id:"caption",tabindex:this.tableDivElementHasScrollbar?"0":void 0},this.state._label),Array.isArray(this.state._headerCells.horizontal)&&h("thead",{key:"17ff8eb5a844f09c7e2a4f43db4a6a88ace9aac4"},[this.state._headerCells.horizontal.map((e,t)=>h("tr",{key:`thead-${t}`},this.state._selection&&this.renderHeadingSelectionCell(),0===t&&this.renderHeaderTdCell(),Array.isArray(e)&&e.map((e,a)=>!0===e.asTd?h("td",{key:`thead-${t}-${a}-${e.label}`,class:["table__header-cell","table__header-cell--horizontal","string"==typeof e.textAlign&&e.textAlign.length>0?`table__header-cell--align-${e.textAlign}`:void 0,"string"==typeof e.textAlign&&e.textAlign.length>0?`align-${e.textAlign}`:void 0,"string"==typeof e.textAlign&&e.textAlign.length>0?e.textAlign:void 0].filter(Boolean).join(" "),colSpan:e.colSpan,rowSpan:e.rowSpan,style:{textAlign:e.textAlign,width:e.width},ref:"function"==typeof e.render?t=>{this.cellRender(e,t)}:void 0},"function"!=typeof e.render?e.label:""):this.renderHeadingCell(e,t,a,!1)))),this.renderSpacer("head",this.state._headerCells.horizontal)]),h("tbody",{key:"95350a0c1dc0fdad38585eedbabd3c3646919813"},e.map((e,t)=>this.renderTableRow(e,t,!0))),this.renderFoot())))}get host(){return this}static get watchers(){return{_data:["validateData"],_dataFoot:["validateDataFoot"],_headerCells:["validateHeaderCells"],_label:["validateLabel"],_minWidth:["validateMinWidth"],_on:["validateOn"],_selection:["validateSelection"]}}},[0,"kol-table-stateless-wc",{_data:[1],_dataFoot:[1,"_data-foot"],_headerCells:[1,"_header-cells"],_label:[1],_minWidth:[1,"_min-width"],_on:[16],_selection:[1],state:[32],tableDivElementHasScrollbar:[32]},[[0,"keydown","handleKeyDown"]],{_data:["validateData"],_dataFoot:["validateDataFoot"],_headerCells:["validateHeaderCells"],_label:["validateLabel"],_minWidth:["validateMinWidth"],_on:["validateOn"],_selection:["validateSelection"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-table-stateless-wc"].forEach(e=>{if("kol-table-stateless-wc"===e)customElements.get(e)||customElements.define(e,KolTableStateless)})}const KolTableStatelessWc=KolTableStateless,defineCustomElement=defineCustomElement$1;export{KolTableStatelessWc,defineCustomElement};
@@ -1 +1 @@
1
- {"file":"kol-table-stateless-wc.js","mappings":";;;;;;;;;;;;;AAoBO,MAAM,wBAAwB,GAAG,CAAC,SAAoC,EAAE,KAAgC;IAC9G,yBAAyB,CAAC,KAAK,EAAE;QAChC,mBAAmB,CAAC,KAAK,EAAE;YAC1B,IAAI;gBACH,KAAK,GAAG,SAAS,CAAmB,KAAK,CAAC,CAAC;aAC3C;YAAC,OAAO,CAAC,EAAE;aAEX;YACD,cAAc,CACb,SAAS,EACT,cAAc,EACd,CAAC,KAAK,KACL,OAAO,KAAK,KAAK,QAAQ;gBACzB,KAAK,KAAK,IAAI;iBACb,KAAK,CAAC,UAAU,KAAK,SAAS;qBAC7B,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,SAAS,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC;iBACnH,KAAK,CAAC,QAAQ,KAAK,SAAS,KAAK,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,SAAS,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC;gBAChJ,IAAI,EACL,IAAI,GAAG,CAAC,CAAC,0BAA0B,CAAC,CAAC,EACrC,KAAK,CACL,CAAC;SACF,CAAC,CAAC;KACH,CAAC,CAAC;AACJ,CAAC;;MCAY,iBAAiB;;;;QAcrB,eAAU,GAAG,IAAI,CAAC;QAClB,0BAAqB,GAAG,IAAI,GAAG,EAA8C,CAAC;Q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Y,CAAC,UAAU,CAAC;SAC7D,CACM,CACR,EACD,gEAAQ,SAAS,CAAC,GAAG,CAAC,CAAC,GAAgD,EAAE,QAAgB,KAAK,IAAI,CAAC,cAAc,CAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAS,EAC/I,IAAI,CAAC,UAAU,EAAE,CACX,CACH,CACA,EACN;KACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/schema/props/table-header-cells.ts","src/components/table-stateless/component.tsx"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\nimport type { KoliBriTableHeaderCell, Stringified } from '../types';\nimport { emptyStringByArrayHandler, objectObjectHandler, parseJson, watchValidator } from '../utils';\n\n/* types */\nexport type TableHeaderCells = {\n\thorizontal?: KoliBriTableHeaderCell[][];\n\tvertical?: KoliBriTableHeaderCell[][];\n};\n\nexport type TableHeaderCellsPropType = Stringified<TableHeaderCells>;\n\n/**\n * Defines the horizontal and vertical table header cells.\n */\nexport type PropTableHeaderCells = {\n\theaderCells: TableHeaderCellsPropType;\n};\n\n/* validator */\nexport const validateTableHeaderCells = (component: Generic.Element.Component, value?: TableHeaderCellsPropType): void => {\n\temptyStringByArrayHandler(value, () => {\n\t\tobjectObjectHandler(value, () => {\n\t\t\ttry {\n\t\t\t\tvalue = parseJson<TableHeaderCells>(value);\n\t\t\t} catch (e) {\n\t\t\t\tvoid e;\n\t\t\t}\n\t\t\twatchValidator(\n\t\t\t\tcomponent,\n\t\t\t\t'_headerCells',\n\t\t\t\t(value): boolean =>\n\t\t\t\t\ttypeof value === 'object' &&\n\t\t\t\t\tvalue !== null &&\n\t\t\t\t\t(value.horizontal === undefined ||\n\t\t\t\t\t\t(Array.isArray(value.horizontal) && value.horizontal.find((headerRow) => !Array.isArray(headerRow)) === undefined)) &&\n\t\t\t\t\t(value.vertical === undefined || (Array.isArray(value.vertical) && value.vertical.find((headerCol) => !Array.isArray(headerCol)) === undefined)) &&\n\t\t\t\t\ttrue,\n\t\t\t\tnew Set(['TableHeaderCellsPropType']),\n\t\t\t\tvalue,\n\t\t\t);\n\t\t});\n\t});\n};\n","import type { JSX } from '@stencil/core';\nimport { Component, Element, Fragment, h, Host, Listen, Prop, State, Watch } from '@stencil/core';\n\nimport { KolButtonWcTag, KolIconTag, KolTooltipWcTag } from '../../core/component-names';\nimport type { TranslationKey } from '../../i18n';\nimport { translate } from '../../i18n';\nimport type {\n\tAriaSort,\n\tKoliBriTableCell,\n\tKoliBriTableDataType,\n\tKoliBriTableHeaderCell,\n\tKoliBriTableHeaderCellWithLogic,\n\tKoliBriTableHeaders,\n\tKoliBriTableRender,\n\tLabelPropType,\n\tTableCallbacksPropType,\n\tTableDataFootPropType,\n\tTableDataPropType,\n\tTableHeaderCellsPropType,\n\tTableSelectionPropType,\n\tTableStatelessAPI,\n\tTableStatelessStates,\n} from '../../schema';\nimport {\n\tvalidateLabel,\n\tvalidateTableCallbacks,\n\tvalidateTableData,\n\tvalidateTableDataFoot,\n\tvalidateTableHeaderCells,\n\tvalidateTableSelection,\n\twatchString,\n} from '../../schema';\nimport { Events } from '../../schema/enums';\nimport { nonce } from '../../utils/dev.utils';\nimport { tryToDispatchKoliBriEvent } from '../../utils/events';\n\n/**\n * @internal\n */\n@Component({\n\ttag: 'kol-table-stateless-wc',\n\tshadow: false,\n})\nexport class KolTableStateless implements TableStatelessAPI {\n\t@Element() private readonly host?: HTMLKolTableStatelessWcElement;\n\n\t@State() public state: TableStatelessStates = {\n\t\t_data: [],\n\t\t_label: '',\n\t\t_headerCells: {\n\t\t\thorizontal: [],\n\t\t\tvertical: [],\n\t\t},\n\t};\n\n\tprivate tableDivElement?: HTMLDivElement;\n\tprivate tableDivElementResizeObserver?: ResizeObserver;\n\tprivate horizontal = true;\n\tprivate cellsToRenderTimeouts = new Map<HTMLElement, ReturnType<typeof setTimeout>>();\n\tprivate dataToKeyMap = new Map<KoliBriTableDataType, string>();\n\n\tprivate checkboxRefs: HTMLInputElement[] = [];\n\n\tprivate translateSort = translate('kol-sort');\n\n\t@State()\n\tprivate tableDivElementHasScrollbar = false;\n\n\t/**\n\t * Defines the primary table data.\n\t */\n\t@Prop() public _data!: TableDataPropType;\n\n\t/**\n\t * Defines the data for the table footer.\n\t */\n\t@Prop() public _dataFoot?: TableDataFootPropType;\n\n\t/**\n\t * Defines the horizontal and vertical table headers.\n\t */\n\t@Prop() public _headerCells!: TableHeaderCellsPropType;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop() public _label!: string;\n\n\t/**\n\t * Defines the table min-width.\n\t * @deprecated This property is deprecated and will be removed in the next major release.\n\t */\n\t@Prop() public _minWidth?: string;\n\n\t/**\n\t * Defines the callback functions for table events.\n\t */\n\t@Prop() public _on?: TableCallbacksPropType;\n\n\t/**\n\t * Defines how rows can be selected and the current selection.\n\t */\n\t@Prop() public _selection?: TableSelectionPropType;\n\n\t@Watch('_data')\n\tpublic validateData(value?: TableDataPropType) {\n\t\tvalidateTableData(this, value, {\n\t\t\tbeforePatch: (nextValue) => {\n\t\t\t\tthis.updateDataToKeyMap(nextValue as KoliBriTableDataType[]);\n\t\t\t},\n\t\t});\n\t}\n\n\t@Watch('_dataFoot')\n\tpublic validateDataFoot(value?: TableDataFootPropType) {\n\t\tvalidateTableDataFoot(this, value);\n\t}\n\n\t@Watch('_headerCells')\n\tpublic validateHeaderCells(value?: TableHeaderCellsPropType) {\n\t\tvalidateTableHeaderCells(this, value);\n\t}\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelPropType): void {\n\t\tvalidateLabel(this, value, {\n\t\t\trequired: true,\n\t\t});\n\t}\n\n\t/**\n\t * @deprecated This property is deprecated and will be removed in the next major release.\n\t */\n\t@Watch('_minWidth')\n\tpublic validateMinWidth(value?: string): void {\n\t\twatchString(this, '_deprecatedMinWidth', value, {\n\t\t\tdefaultValue: undefined,\n\t\t});\n\t}\n\n\t@Watch('_on')\n\tpublic validateOn(value?: TableCallbacksPropType): void {\n\t\tvalidateTableCallbacks(this, value);\n\t}\n\n\t@Watch('_selection')\n\tpublic validateSelection(value?: TableSelectionPropType): void {\n\t\tvalidateTableSelection(this, value);\n\t}\n\n\t@Listen('keydown')\n\tpublic handleKeyDown(event: KeyboardEvent) {\n\t\tif (event.key === 'ArrowUp' || event.key === 'ArrowDown') {\n\t\t\tconst focusedElement = this.tableDivElement?.querySelector(':focus') as HTMLInputElement;\n\t\t\tlet index = this.checkboxRefs.indexOf(focusedElement);\n\n\t\t\tif (index > -1) {\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\tif (event.key === 'ArrowDown') {\n\t\t\t\t\tindex = (index + 1) % this.checkboxRefs.length;\n\t\t\t\t\tthis.checkboxRefs[index].focus();\n\t\t\t\t} else if (event.key === 'ArrowUp') {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tindex = (index + this.checkboxRefs.length - 1) % this.checkboxRefs.length;\n\t\t\t\t\tthis.checkboxRefs[index].focus();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic componentDidRender(): void {\n\t\tthis.checkDivElementScrollbar();\n\t}\n\n\tpublic componentDidLoad() {\n\t\tif (this.tableDivElement && ResizeObserver) {\n\t\t\tthis.tableDivElementResizeObserver = new ResizeObserver(this.checkDivElementScrollbar.bind(this));\n\t\t\tthis.tableDivElementResizeObserver.observe(this.tableDivElement);\n\t\t}\n\t}\n\n\tpublic disconnectedCallback() {\n\t\tthis.tableDivElementResizeObserver?.disconnect();\n\t}\n\n\tprivate checkDivElementScrollbar() {\n\t\tif (this.tableDivElement) {\n\t\t\tthis.tableDivElementHasScrollbar = this.tableDivElement.scrollWidth > this.tableDivElement.clientWidth;\n\t\t}\n\t}\n\n\tprivate updateDataToKeyMap(data: KoliBriTableDataType[]) {\n\t\tdata.forEach((data) => {\n\t\t\tif (!this.dataToKeyMap.has(data)) {\n\t\t\t\tthis.dataToKeyMap.set(data, nonce());\n\t\t\t}\n\t\t});\n\n\t\t/* Cleanup old values from map */\n\t\tthis.dataToKeyMap.forEach((_, key) => {\n\t\t\tif (!data.includes(key)) {\n\t\t\t\tthis.dataToKeyMap.delete(key);\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate getDataKey(data: KoliBriTableDataType) {\n\t\treturn this.dataToKeyMap.get(data);\n\t}\n\n\t/**\n\t * Applies a custom render function to a specific table cell if provided.\n\t * Ensures that the content is updated after a delay to avoid excessive re-renders.\n\t *\n\t * @param {KoliBriTableCell} cell The cell to be rendered, with a possible custom `render` function.\n\t * @param {HTMLElement} el The HTML element where the cell is rendered.\n\t */\n\tprivate cellRender(cell: KoliBriTableCell, el?: HTMLElement): void {\n\t\tif (el) {\n\t\t\tclearTimeout(this.cellsToRenderTimeouts.get(el));\n\t\t\tthis.cellsToRenderTimeouts.set(\n\t\t\t\tel,\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tif (typeof cell.render === 'function') {\n\t\t\t\t\t\tconst renderContent = cell.render(el, cell, cell.data, this.state._data);\n\t\t\t\t\t\tif (typeof renderContent === 'string') {\n\t\t\t\t\t\t\tel.textContent = renderContent;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t);\n\t\t}\n\t}\n\n\tprivate getNumberOfCols(horizontalHeaders: KoliBriTableHeaderCell[][], data: KoliBriTableDataType[]): number {\n\t\tlet max = 0;\n\t\thorizontalHeaders.forEach((row) => {\n\t\t\tlet count = 0;\n\t\t\tArray.isArray(row) && row.forEach((col) => (count += col.colSpan ?? 1));\n\t\t\tif (max < count) {\n\t\t\t\tmax = count;\n\t\t\t}\n\t\t});\n\t\tif (max === 0) {\n\t\t\tmax = data.length;\n\t\t}\n\t\treturn max;\n\t}\n\n\tprivate getNumberOfRows(verticalHeaders: KoliBriTableHeaderCell[][], data: KoliBriTableDataType[]): number {\n\t\tlet max = 0;\n\t\tverticalHeaders.forEach((col) => {\n\t\t\tlet count = 0;\n\t\t\tArray.isArray(col) && col.forEach((row) => (count += row.rowSpan ?? 1));\n\t\t\tif (max < count) {\n\t\t\t\tmax = count;\n\t\t\t}\n\t\t});\n\t\tif (max === 0) {\n\t\t\tmax = data.length;\n\t\t} else {\n\t\t\tmax -= this.state._dataFoot?.length || 0;\n\t\t}\n\t\treturn max;\n\t}\n\n\tprivate getThePrimaryHeadersWithKeyOrRenderFunction(headers: KoliBriTableHeaderCell[][]): KoliBriTableHeaderCell[] {\n\t\tconst primaryHeaders: KoliBriTableHeaderCell[] = [];\n\n\t\theaders.forEach((cells) => {\n\t\t\tcells.forEach((cell) => {\n\t\t\t\tif (typeof cell.key === 'string' || typeof cell.render === 'function') {\n\t\t\t\t\tprimaryHeaders.push(cell);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\n\t\treturn primaryHeaders;\n\t}\n\n\tprivate getPrimaryHeaders(headers: KoliBriTableHeaders): KoliBriTableHeaderCell[] {\n\t\tlet primaryHeaders: KoliBriTableHeaderCell[] = this.getThePrimaryHeadersWithKeyOrRenderFunction(headers.horizontal ?? []);\n\n\t\t/**\n\t\t * It is important to note that the rendering direction of the data is implicitly set,\n\t\t * if either the horizontal or vertical header cells have keys.\n\t\t */\n\t\tthis.horizontal = true;\n\t\tif (primaryHeaders.length === 0) {\n\t\t\tprimaryHeaders = this.getThePrimaryHeadersWithKeyOrRenderFunction(headers.vertical ?? []);\n\t\t\tif (primaryHeaders.length > 0) {\n\t\t\t\tthis.horizontal = false;\n\t\t\t}\n\t\t}\n\t\treturn primaryHeaders;\n\t}\n\n\tprivate createDataField(data: KoliBriTableDataType[], headers: KoliBriTableHeaders, isFoot?: boolean): (KoliBriTableCell & KoliBriTableDataType)[][] {\n\t\theaders.horizontal = Array.isArray(headers?.horizontal) ? headers.horizontal : [];\n\t\theaders.vertical = Array.isArray(headers?.vertical) ? headers.vertical : [];\n\t\tconst primaryHeader = this.getPrimaryHeaders(headers);\n\t\tconst maxCols = this.getNumberOfCols(headers.horizontal, data);\n\t\tlet maxRows = this.getNumberOfRows(headers.vertical, data);\n\t\tlet startRow = 0;\n\t\tif (isFoot) {\n\t\t\tstartRow = maxRows;\n\t\t\tmaxRows += this.state._dataFoot?.length || 0;\n\t\t}\n\t\tconst dataField: KoliBriTableCell[][] = [];\n\n\t\tconst rowCount: number[] = [];\n\t\tconst rowSpans: number[][] = [];\n\t\theaders.vertical.forEach((_row, index) => {\n\t\t\trowCount[index] = 0;\n\t\t\trowSpans[index] = [];\n\t\t});\n\n\t\tfor (let i = startRow; i < maxRows; i++) {\n\t\t\tconst dataRow: KoliBriTableHeaderCellWithLogic[] = [];\n\t\t\theaders.vertical.forEach((headerCells, index) => {\n\t\t\t\tlet rowsTotal = 0;\n\t\t\t\trowSpans[index].forEach((value) => (rowsTotal += value));\n\t\t\t\tif (rowsTotal <= i) {\n\t\t\t\t\tconst rows = headerCells[i - rowsTotal + rowCount[index]];\n\t\t\t\t\tif (typeof rows === 'object') {\n\t\t\t\t\t\tdataRow.push({\n\t\t\t\t\t\t\t...rows,\n\t\t\t\t\t\t\tasTd: false,\n\t\t\t\t\t\t\tdata: {},\n\t\t\t\t\t\t});\n\t\t\t\t\t\tlet rowSpan = 1;\n\t\t\t\t\t\tif (typeof rows.rowSpan === 'number' && rows.rowSpan > 1) {\n\t\t\t\t\t\t\trowSpan = rows.rowSpan;\n\t\t\t\t\t\t}\n\t\t\t\t\t\trowSpans[index].push(rowSpan);\n\t\t\t\t\t\tif (typeof rows.colSpan === 'number' && rows.colSpan > 1) {\n\t\t\t\t\t\t\tfor (let k = 1; k < rows.colSpan; k++) {\n\t\t\t\t\t\t\t\trowSpans[index + k].push(rowSpan);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\trowCount[index]++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\tfor (let j = 0; j < maxCols; j++) {\n\t\t\t\tif (this.horizontal === true) {\n\t\t\t\t\tconst row = isFoot && this.state._dataFoot ? this.state._dataFoot[i - startRow] : data[i];\n\t\t\t\t\tif (\n\t\t\t\t\t\ttypeof primaryHeader[j] === 'object' &&\n\t\t\t\t\t\tprimaryHeader[j] !== null &&\n\t\t\t\t\t\ttypeof row === 'object' &&\n\t\t\t\t\t\trow !== null &&\n\t\t\t\t\t\t(typeof primaryHeader[j].key === 'string' || typeof primaryHeader[j].render === 'function')\n\t\t\t\t\t) {\n\t\t\t\t\t\tdataRow.push({\n\t\t\t\t\t\t\t...primaryHeader[j],\n\t\t\t\t\t\t\tcolSpan: undefined,\n\t\t\t\t\t\t\tdata: row,\n\t\t\t\t\t\t\tlabel: row[primaryHeader[j].key as unknown as string] as string,\n\t\t\t\t\t\t\trowSpan: undefined,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (\n\t\t\t\t\t\ttypeof primaryHeader[i] === 'object' &&\n\t\t\t\t\t\tprimaryHeader[i] !== null &&\n\t\t\t\t\t\ttypeof data[j] === 'object' &&\n\t\t\t\t\t\tdata[j] !== null &&\n\t\t\t\t\t\t(typeof primaryHeader[i].key === 'string' || typeof primaryHeader[i].render === 'function')\n\t\t\t\t\t) {\n\t\t\t\t\t\tdataRow.push({\n\t\t\t\t\t\t\t...primaryHeader[i],\n\t\t\t\t\t\t\tcolSpan: undefined,\n\t\t\t\t\t\t\tdata: data[j],\n\t\t\t\t\t\t\tlabel: data[j][primaryHeader[i].key as unknown as number] as string,\n\t\t\t\t\t\t\trowSpan: undefined,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tdataField.push(dataRow);\n\t\t}\n\t\tif (data.length === 0) {\n\t\t\tlet colspan = 0;\n\t\t\tlet rowspan = 0;\n\t\t\tif (Array.isArray(headers.horizontal) && headers.horizontal.length > 0) {\n\t\t\t\theaders.horizontal[0].forEach((col) => {\n\t\t\t\t\tcolspan += col.colSpan || 1;\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (Array.isArray(headers.vertical) && headers.vertical.length > 0) {\n\t\t\t\tcolspan -= headers.vertical.length;\n\t\t\t\theaders.vertical[0].forEach((row) => {\n\t\t\t\t\trowspan += row.rowSpan || 1;\n\t\t\t\t});\n\t\t\t}\n\t\t\tconst emptyCell = {\n\t\t\t\tcolSpan: colspan,\n\t\t\t\tlabel: translate('kol-no-entries'),\n\t\t\t\trender: undefined,\n\t\t\t\trowSpan: Math.max(rowspan, 1),\n\t\t\t};\n\t\t\tif (dataField.length === 0) {\n\t\t\t\tdataField.push([emptyCell]);\n\t\t\t} else {\n\t\t\t\tdataField[0].push(emptyCell);\n\t\t\t}\n\t\t}\n\t\treturn dataField;\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateData(this._data);\n\t\tthis.validateDataFoot(this._dataFoot);\n\t\tthis.validateHeaderCells(this._headerCells);\n\t\tthis.validateLabel(this._label);\n\t\tthis.validateMinWidth(this._minWidth);\n\t\tthis.validateOn(this._on);\n\t\tthis.validateSelection(this._selection);\n\t}\n\n\t/**\n\t * Renders the selection cell for a row, either as a checkbox (for multiple selection)\n\t * or as a radio button (for single selection). It handles selection states and dispatches\n\t * events for selection changes.\n\t *\n\t * @param {KoliBriTableCell[]} row The row data containing the cell with selection properties.\n\t * @param {number} rowIndex The index of the row.\n\t * @returns {JSX.Element} The rendered selection cell, either with a checkbox or radio input.\n\t */\n\tprivate renderSelectionCell(row: (KoliBriTableCell & KoliBriTableDataType)[], rowIndex: number): JSX.Element {\n\t\tconst selection = this.state._selection;\n\t\tif (!selection) return '';\n\t\tconst keyPropertyName = selection.keyPropertyName ?? 'id';\n\t\tconst firstCellData = row[0]?.data;\n\n\t\tif (!firstCellData) return '';\n\t\tconst keyProperty = firstCellData[keyPropertyName] as string;\n\t\tconst isMultiple = selection.multiple || selection.multiple === undefined;\n\t\tconst selected = selection?.selectedKeys?.includes(keyProperty);\n\t\tconst label = selection.label(firstCellData);\n\t\tconst props = {\n\t\t\tname: 'selection',\n\t\t\tchecked: selected,\n\t\t\tid: keyProperty,\n\t\t\t['aria-label']: label,\n\t\t};\n\t\treturn (\n\t\t\t<td key={`tbody-${rowIndex}-selection`} class=\"selection-cell\">\n\t\t\t\t<div class={`input ${selected ? 'checked' : ''}`}>\n\t\t\t\t\t{isMultiple ? (\n\t\t\t\t\t\t<label class=\"checkbox-container\">\n\t\t\t\t\t\t\t<KolIconTag class=\"icon\" _icons={`codicon ${selected ? 'codicon-check' : ''}`} _label=\"\" />\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\tref={(el) => el && this.checkboxRefs.push(el)}\n\t\t\t\t\t\t\t\t{...props}\n\t\t\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\t\t\tonInput={(event: Event) => {\n\t\t\t\t\t\t\t\t\tconst updatedSelectedKeys = !selected\n\t\t\t\t\t\t\t\t\t\t? [...(selection?.selectedKeys ?? []), keyProperty]\n\t\t\t\t\t\t\t\t\t\t: selection?.selectedKeys?.filter((key) => key !== keyProperty);\n\t\t\t\t\t\t\t\t\ttryToDispatchKoliBriEvent('selection-change', this.host, updatedSelectedKeys);\n\t\t\t\t\t\t\t\t\tif (typeof this.state._on?.[Events.onSelectionChange] === 'function') {\n\t\t\t\t\t\t\t\t\t\tthis.state._on[Events.onSelectionChange](event, updatedSelectedKeys ?? []);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</label>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<label class=\"radio-container\">\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t{...props}\n\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\tonInput={(event: Event) => {\n\t\t\t\t\t\t\t\t\ttryToDispatchKoliBriEvent('selection-change', this.host, keyProperty);\n\t\t\t\t\t\t\t\t\tif (typeof this.state._on?.[Events.onSelectionChange] === 'function') {\n\t\t\t\t\t\t\t\t\t\tthis.state._on[Events.onSelectionChange](event, keyProperty);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</label>\n\t\t\t\t\t)}\n\t\t\t\t\t<KolTooltipWcTag aria-hidden=\"true\" class=\"input-tooltip\" _align=\"right\" _id={`${keyProperty}-label`} _label={label}></KolTooltipWcTag>\n\t\t\t\t</div>\n\t\t\t</td>\n\t\t);\n\t}\n\n\t/**\n\t * Renders a full table row by mapping over each cell and calling `renderTableCell`.\n\t * It also handles the row's unique key generation and selection functionality.\n\t *\n\t * @param {KoliBriTableCell[]} row The data for the current row.\n\t * @param {number} rowIndex The index of the current row being rendered.\n\t * @returns {JSX.Element} The rendered row with its cells.\n\t */\n\tprivate readonly renderTableRow = (row: (KoliBriTableCell & KoliBriTableDataType)[], rowIndex: number, isVertical: boolean): JSX.Element => {\n\t\tlet key = String(rowIndex);\n\t\tif (this.horizontal && row[0]?.data) {\n\t\t\tkey = this.getDataKey(row[0].data) ?? key;\n\t\t}\n\n\t\treturn (\n\t\t\t<tr key={`row-${key}`}>\n\t\t\t\t{this.renderSelectionCell(row, rowIndex)}\n\t\t\t\t{row.map((cell, colIndex) => this.renderTableCell(cell, rowIndex, colIndex, isVertical))}\n\t\t\t</tr>\n\t\t);\n\t};\n\n\t/**\n\t * Renders a table cell, either as a data cell (`<td>`) or a header cell (`<th>`).\n\t * If a custom `render` function is provided in the cell, it will be used to display content.\n\t *\n\t * @param {KoliBriTableCell} cell The cell data, containing label, colSpan, rowSpan, and potential render function.\n\t * @param {number} rowIndex The current row index.\n\t * @param {number} colIndex The current column index.\n\t * @returns {JSX.Element} The rendered table cell (either `<td>` or `<th>`).\n\t */\n\tprivate readonly renderTableCell = (cell: KoliBriTableCell, rowIndex: number, colIndex: number, isVertical: boolean): JSX.Element => {\n\t\tlet key = `${rowIndex}-${colIndex}-${cell.label}`;\n\t\tif (cell.data) {\n\t\t\tconst dataKey = this.getDataKey(cell.data);\n\t\t\tkey = dataKey ? `${dataKey}-${this.horizontal ? colIndex : rowIndex}` : key;\n\t\t}\n\n\t\tif (cell.asTd === false) {\n\t\t\treturn this.renderHeadingCell(cell, rowIndex, colIndex, isVertical);\n\t\t} else {\n\t\t\treturn (\n\t\t\t\t<td\n\t\t\t\t\tkey={`cell-${key}`}\n\t\t\t\t\tclass={{\n\t\t\t\t\t\t[cell.textAlign as string]: typeof cell.textAlign === 'string' && cell.textAlign.length > 0,\n\t\t\t\t\t}}\n\t\t\t\t\tcolSpan={cell.colSpan}\n\t\t\t\t\trowSpan={cell.rowSpan}\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\ttextAlign: cell.textAlign,\n\t\t\t\t\t\twidth: cell.width,\n\t\t\t\t\t}}\n\t\t\t\t\tref={\n\t\t\t\t\t\ttypeof cell.render === 'function'\n\t\t\t\t\t\t\t? (el) => {\n\t\t\t\t\t\t\t\t\tthis.cellRender(cell as KoliBriTableHeaderCellWithLogic & { render: KoliBriTableRender }, el);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t{typeof cell.render !== 'function' ? cell.label : ''}\n\t\t\t\t</td>\n\t\t\t);\n\t\t}\n\t};\n\n\t/**\n\t * Renders the header cell for row selection. This cell contains a checkbox for selecting\n\t * all rows when selection is enabled. If multiple selection is allowed, the checkbox allows\n\t * selecting/deselecting all rows at once. It also supports an indeterminate state\n\t * if only some rows are selected.\n\t *\n\t * @returns {JSX.Element} - The rendered header cell containing the selection checkbox.\n\t */\n\tprivate renderHeadingSelectionCell(): JSX.Element {\n\t\tconst selection = this.state._selection;\n\n\t\tif (selection?.multiple === false) {\n\t\t\treturn <td key={`thead-0-selection`} class=\"table__header-cell table__header-cell--horizontal selection-cell\"></td>;\n\t\t}\n\n\t\tconst keyPropertyName = selection?.keyPropertyName ?? 'id';\n\t\tconst selectedKeyLength = selection?.selectedKeys?.length;\n\t\tconst dataLength = this.state._data.length;\n\t\tconst isChecked = selectedKeyLength === dataLength;\n\t\tconst indeterminate = selectedKeyLength !== 0 && !isChecked;\n\t\tlet translationKey = 'kol-table-selection-indeterminate' as TranslationKey;\n\t\tif (isChecked && !indeterminate) {\n\t\t\ttranslationKey = 'kol-table-selection-none';\n\t\t}\n\t\tif (selectedKeyLength === 0) {\n\t\t\ttranslationKey = 'kol-table-selection-all';\n\t\t}\n\t\tconst label = translate(translationKey);\n\t\treturn (\n\t\t\t<th key={`thead-0-selection`} class=\"table__header-cell table__header-cell--horizontal selection-cell selection-control\">\n\t\t\t\t<div class={`input ${indeterminate ? 'indeterminate' : isChecked ? 'checked' : ''}`}>\n\t\t\t\t\t<label class=\"checkbox-container\">\n\t\t\t\t\t\t<KolIconTag class=\"icon\" _icons={`codicon ${indeterminate ? 'codicon-remove' : isChecked ? 'codicon-check' : ''}`} _label=\"\" />\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tref={(el) => el && this.checkboxRefs.push(el)}\n\t\t\t\t\t\t\tname=\"selection\"\n\t\t\t\t\t\t\tchecked={isChecked && !indeterminate}\n\t\t\t\t\t\t\taria-label={label}\n\t\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\t\tonInput={(event: Event) => {\n\t\t\t\t\t\t\t\tconst selections = !isChecked ? this.state._data.map((el) => el?.[keyPropertyName] as string) : [];\n\t\t\t\t\t\t\t\ttryToDispatchKoliBriEvent('selection-change', this.host, selections);\n\t\t\t\t\t\t\t\tif (typeof this.state._on?.[Events.onSelectionChange] === 'function') {\n\t\t\t\t\t\t\t\t\tthis.state._on[Events.onSelectionChange](event, selections);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</label>\n\t\t\t\t\t<KolTooltipWcTag aria-hidden=\"true\" class=\"input-tooltip\" _align=\"right\" _id={`${translationKey}-label`} _label={label}></KolTooltipWcTag>\n\t\t\t\t</div>\n\t\t\t</th>\n\t\t);\n\t}\n\n\t/**\n\t * This header cell is rendered as a TD element when in addition to the horizontal header rows\n\t * there are also vertical header columns. In this case, the cell is rendered blank above the\n\t * vertical header columns.\n\t */\n\tprivate renderHeaderTdCell(): JSX.Element {\n\t\treturn (\n\t\t\t<Fragment>\n\t\t\t\t{Array.isArray(this.state._headerCells.horizontal) &&\n\t\t\t\t\tthis.state._headerCells.horizontal.length > 0 &&\n\t\t\t\t\tArray.isArray(this.state._headerCells.vertical) &&\n\t\t\t\t\tthis.state._headerCells.vertical.length > 0 &&\n\t\t\t\t\tArray.isArray(this.state._headerCells.horizontal) && (\n\t\t\t\t\t\t<td aria-hidden=\"true\" colSpan={this.state._headerCells.vertical.length} rowSpan={this.state._headerCells.horizontal.length}></td>\n\t\t\t\t\t)}\n\t\t\t</Fragment>\n\t\t);\n\t}\n\n\t/**\n\t * Renders a table header cell (`<th>`), with optional sorting functionality.\n\t * If the cell has a `sortDirection` property, a sort button is rendered within the header.\n\t *\n\t * @param {KoliBriTableHeaderCell} cell The header cell data, containing label, colSpan, rowSpan, and possible sort direction.\n\t * @param {number} rowIndex The index of the current row in the table.\n\t * @param {number} colIndex The index of the current column in the row.\n\t * @returns {JSX.Element} The rendered header cell with possible sorting controls.\n\t */\n\tprivate renderHeadingCell(cell: KoliBriTableHeaderCell, rowIndex: number, colIndex: number, isVertical: boolean): JSX.Element {\n\t\tlet ariaSort: AriaSort = 'none';\n\t\tlet sortButtonIcon = 'codicon codicon-fold';\n\n\t\tif (cell.sortDirection) {\n\t\t\tswitch (cell.sortDirection) {\n\t\t\t\tcase 'ASC':\n\t\t\t\t\tsortButtonIcon = 'codicon codicon-chevron-up';\n\t\t\t\t\tariaSort = 'ascending';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'DESC':\n\t\t\t\t\tsortButtonIcon = 'codicon codicon-chevron-down';\n\t\t\t\t\tariaSort = 'descending';\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tariaSort = 'none';\n\t\t\t}\n\t\t}\n\n\t\tconst scope = isVertical ? 'row' : typeof cell.colSpan === 'number' && cell.colSpan > 1 ? 'colgroup' : 'col';\n\n\t\tconst classNames = ['table__header-cell', isVertical ? 'table__header-cell--vertical' : 'table__header-cell--horizontal'];\n\t\tif (typeof cell.textAlign === 'string' && cell.textAlign.length > 0) {\n\t\t\tclassNames.push(`table__header-cell--align-${cell.textAlign}`, `align-${cell.textAlign}`);\n\t\t}\n\n\t\treturn (\n\t\t\t<th\n\t\t\t\tkey={`${rowIndex}-${colIndex}-${cell.label}`}\n\t\t\t\tclass={classNames.join(' ')}\n\t\t\t\tscope={scope}\n\t\t\t\tcolSpan={cell.colSpan}\n\t\t\t\trowSpan={cell.rowSpan}\n\t\t\t\tstyle={{\n\t\t\t\t\twidth: cell.width,\n\t\t\t\t}}\n\t\t\t\taria-sort={ariaSort}\n\t\t\t\tdata-sort={`sort-${cell.sortDirection}`}\n\t\t\t>\n\t\t\t\t{cell.sortDirection ? (\n\t\t\t\t\t<KolButtonWcTag\n\t\t\t\t\t\tclass=\"table-sort-button\"\n\t\t\t\t\t\texportparts=\"icon\"\n\t\t\t\t\t\t_icons={{ right: sortButtonIcon }}\n\t\t\t\t\t\t_label={cell.label}\n\t\t\t\t\t\t_ariaDescription={this.translateSort}\n\t\t\t\t\t\t_on={{\n\t\t\t\t\t\t\tonClick: (event: MouseEvent) => {\n\t\t\t\t\t\t\t\tif (typeof this.state._on?.onSort === 'function' && cell.key && cell.sortDirection) {\n\t\t\t\t\t\t\t\t\tthis.state._on.onSort(event, {\n\t\t\t\t\t\t\t\t\t\tkey: cell.key,\n\t\t\t\t\t\t\t\t\t\tcurrentSortDirection: cell.sortDirection,\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}}\n\t\t\t\t\t></KolButtonWcTag>\n\t\t\t\t) : (\n\t\t\t\t\tcell.label\n\t\t\t\t)}\n\t\t\t</th>\n\t\t);\n\t}\n\n\tprivate renderSpacer(variant: 'foot' | 'head', cellDefs: KoliBriTableHeaderCell[][] | KoliBriTableCell[][]): JSX.Element {\n\t\tconst verticalHeaderColpan = this.state._headerCells.vertical?.length || 0;\n\t\tconst colspan = cellDefs?.[0]?.reduce((acc, row) => acc + (row.colSpan || 1), 0);\n\t\tconst selectionCell = this.state._selection ? 1 : 0;\n\n\t\treturn (\n\t\t\t<tr aria-hidden=\"true\" class={`${variant}-spacer`}>\n\t\t\t\t<td colSpan={verticalHeaderColpan + colspan + selectionCell}></td>\n\t\t\t</tr>\n\t\t);\n\t}\n\n\tprivate renderFoot(): JSX.Element[] | null {\n\t\tif (!this.state._dataFoot || this.state._dataFoot.length === 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst rows: KoliBriTableCell[][] = this.createDataField(this.state._dataFoot, this.state._headerCells, true);\n\t\treturn (\n\t\t\t<tfoot>\n\t\t\t\t{[\n\t\t\t\t\tthis.renderSpacer('foot', rows),\n\t\t\t\t\trows.map((row: (KoliBriTableCell & KoliBriTableDataType)[], rowIndex: number) => this.renderTableRow(row, rowIndex, true)),\n\t\t\t\t]}\n\t\t\t</tfoot>\n\t\t);\n\t}\n\n\tpublic render(): JSX.Element {\n\t\tconst dataField = this.createDataField(this.state._data, this.state._headerCells);\n\t\tthis.checkboxRefs = [];\n\n\t\treturn (\n\t\t\t<Host class=\"kol-table-stateless-wc\">\n\t\t\t\t{/* Firefox automatically makes the following div focusable when it has a scrollbar. We implement a similar behavior cross-browser by allowing the\n\t\t\t\t * <div class=\"focus-element\"> to receive focus. Hence, we disable focus for the div to avoid having two focusable elements by setting `tabindex=\"-1\"`\n\t\t\t\t */}\n\t\t\t\t{/* eslint-disable-next-line jsx-a11y/no-static-element-interactions */}\n\t\t\t\t<div ref={(element) => (this.tableDivElement = element)} class=\"table\" tabindex={this.tableDivElementHasScrollbar ? '-1' : undefined}>\n\t\t\t\t\t<table\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tminWidth: this.state._deprecatedMinWidth || this.state._minWidth,\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{/* eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex */}\n\t\t\t\t\t\t<caption id=\"caption\" tabindex={this.tableDivElementHasScrollbar ? '0' : undefined}>\n\t\t\t\t\t\t\t{this.state._label}\n\t\t\t\t\t\t</caption>\n\n\t\t\t\t\t\t{Array.isArray(this.state._headerCells.horizontal) && (\n\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t{[\n\t\t\t\t\t\t\t\t\tthis.state._headerCells.horizontal.map((cols, rowIndex) => (\n\t\t\t\t\t\t\t\t\t\t<tr key={`thead-${rowIndex}`}>\n\t\t\t\t\t\t\t\t\t\t\t{this.state._selection && this.renderHeadingSelectionCell()}\n\t\t\t\t\t\t\t\t\t\t\t{rowIndex === 0 && this.renderHeaderTdCell()}\n\t\t\t\t\t\t\t\t\t\t\t{Array.isArray(cols) &&\n\t\t\t\t\t\t\t\t\t\t\t\tcols.map((cell, colIndex) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (cell.asTd === true) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={`thead-${rowIndex}-${colIndex}-${cell.label}`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclass={[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'table__header-cell',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'table__header-cell--horizontal',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttypeof cell.textAlign === 'string' && cell.textAlign.length > 0 ? `table__header-cell--align-${cell.textAlign}` : undefined,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttypeof cell.textAlign === 'string' && cell.textAlign.length > 0 ? `align-${cell.textAlign}` : undefined,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttypeof cell.textAlign === 'string' && cell.textAlign.length > 0 ? cell.textAlign : undefined,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.filter(Boolean)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.join(' ')}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolSpan={cell.colSpan}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trowSpan={cell.rowSpan}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextAlign: cell.textAlign,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: cell.width,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tref={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttypeof cell.render === 'function'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? (el) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.cellRender(cell, el);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{typeof cell.render !== 'function' ? cell.label : ''}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn this.renderHeadingCell(cell, rowIndex, colIndex, false);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t)),\n\t\t\t\t\t\t\t\t\tthis.renderSpacer('head', this.state._headerCells.horizontal),\n\t\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<tbody>{dataField.map((row: (KoliBriTableCell & KoliBriTableDataType)[], rowIndex: number) => this.renderTableRow(row, rowIndex, true))}</tbody>\n\t\t\t\t\t\t{this.renderFoot()}\n\t\t\t\t\t</table>\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t);\n\t}\n}\n"],"version":3}
1
+ {"file":"kol-table-stateless-wc.js","mappings":";;;;;;;;;;;;;AAoBO,MAAM,wBAAwB,GAAG,CAAC,SAAoC,EAAE,KAAgC;IAC9G,yBAAyB,CAAC,KAAK,EAAE;QAChC,mBAAmB,CAAC,KAAK,EAAE;YAC1B,IAAI;gBACH,KAAK,GAAG,SAAS,CAAmB,KAAK,CAAC,CAAC;aAC3C;YAAC,OAAO,CAAC,EAAE;aAEX;YACD,cAAc,CACb,SAAS,EACT,cAAc,EACd,CAAC,KAAK,KACL,OAAO,KAAK,KAAK,QAAQ;gBACzB,KAAK,KAAK,IAAI;iBACb,KAAK,CAAC,UAAU,KAAK,SAAS;qBAC7B,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,SAAS,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC;iBACnH,KAAK,CAAC,QAAQ,KAAK,SAAS,KAAK,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,SAAS,KAAK,CAAC,KAAK,CAAC,OAA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IAAI,CAAC,OAAO,EACrB,KAAK,EAAE;gCACN,SAAS,EAAE,IAAI,CAAC,SAAS;gCACzB,KAAK,EAAE,IAAI,CAAC,KAAK;6BACjB,EACD,GAAG,EACF,OAAO,IAAI,CAAC,MAAM,KAAK,UAAU;kCAC9B,CAAC,EAAE;oCACH,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;iCAC1B;kCACA,SAAS,IAGZ,OAAO,IAAI,CAAC,MAAM,KAAK,UAAU,GAAG,IAAI,CAAC,KAAK,GAAG,EAAE,CAChD,EACJ;qBACF;yBAAM;wBACN,OAAO,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;qBAC/D;iBACD,CAAC,CACC,CACL,CAAC;YACF,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,UAAU,CAAC;SAC7D,CACM,CACR,EACD,gEAAQ,SAAS,CAAC,GAAG,CAAC,CAAC,GAAgD,EAAE,QAAgB,KAAK,IAAI,CAAC,cAAc,CAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAS,EAC/I,IAAI,CAAC,UAAU,EAAE,CACX,CACH,CACA,EACN;KACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/schema/props/table-header-cells.ts","src/components/table-stateless/component.tsx"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\nimport type { KoliBriTableHeaderCell, Stringified } from '../types';\nimport { emptyStringByArrayHandler, objectObjectHandler, parseJson, watchValidator } from '../utils';\n\n/* types */\nexport type TableHeaderCells = {\n\thorizontal?: KoliBriTableHeaderCell[][];\n\tvertical?: KoliBriTableHeaderCell[][];\n};\n\nexport type TableHeaderCellsPropType = Stringified<TableHeaderCells>;\n\n/**\n * Defines the horizontal and vertical table header cells.\n */\nexport type PropTableHeaderCells = {\n\theaderCells: TableHeaderCellsPropType;\n};\n\n/* validator */\nexport const validateTableHeaderCells = (component: Generic.Element.Component, value?: TableHeaderCellsPropType): void => {\n\temptyStringByArrayHandler(value, () => {\n\t\tobjectObjectHandler(value, () => {\n\t\t\ttry {\n\t\t\t\tvalue = parseJson<TableHeaderCells>(value);\n\t\t\t} catch (e) {\n\t\t\t\tvoid e;\n\t\t\t}\n\t\t\twatchValidator(\n\t\t\t\tcomponent,\n\t\t\t\t'_headerCells',\n\t\t\t\t(value): boolean =>\n\t\t\t\t\ttypeof value === 'object' &&\n\t\t\t\t\tvalue !== null &&\n\t\t\t\t\t(value.horizontal === undefined ||\n\t\t\t\t\t\t(Array.isArray(value.horizontal) && value.horizontal.find((headerRow) => !Array.isArray(headerRow)) === undefined)) &&\n\t\t\t\t\t(value.vertical === undefined || (Array.isArray(value.vertical) && value.vertical.find((headerCol) => !Array.isArray(headerCol)) === undefined)) &&\n\t\t\t\t\ttrue,\n\t\t\t\tnew Set(['TableHeaderCellsPropType']),\n\t\t\t\tvalue,\n\t\t\t);\n\t\t});\n\t});\n};\n","import type { JSX } from '@stencil/core';\nimport { Component, Element, Fragment, h, Host, Listen, Prop, State, Watch } from '@stencil/core';\n\nimport { KolButtonWcTag, KolIconTag, KolTooltipWcTag } from '../../core/component-names';\nimport type { TranslationKey } from '../../i18n';\nimport { translate } from '../../i18n';\nimport type {\n\tAriaSort,\n\tKoliBriTableCell,\n\tKoliBriTableDataType,\n\tKoliBriTableHeaderCell,\n\tKoliBriTableHeaderCellWithLogic,\n\tKoliBriTableHeaders,\n\tKoliBriTableRender,\n\tLabelPropType,\n\tTableCallbacksPropType,\n\tTableDataFootPropType,\n\tTableDataPropType,\n\tTableHeaderCellsPropType,\n\tTableSelectionPropType,\n\tTableStatelessAPI,\n\tTableStatelessStates,\n} from '../../schema';\nimport {\n\tvalidateLabel,\n\tvalidateTableCallbacks,\n\tvalidateTableData,\n\tvalidateTableDataFoot,\n\tvalidateTableHeaderCells,\n\tvalidateTableSelection,\n\twatchString,\n} from '../../schema';\nimport { Events } from '../../schema/enums';\nimport { nonce } from '../../utils/dev.utils';\nimport { tryToDispatchKoliBriEvent } from '../../utils/events';\n\n/**\n * @internal\n */\n@Component({\n\ttag: 'kol-table-stateless-wc',\n\tshadow: false,\n})\nexport class KolTableStateless implements TableStatelessAPI {\n\t@Element() private readonly host?: HTMLKolTableStatelessWcElement;\n\n\t@State() public state: TableStatelessStates = {\n\t\t_data: [],\n\t\t_label: '',\n\t\t_headerCells: {\n\t\t\thorizontal: [],\n\t\t\tvertical: [],\n\t\t},\n\t};\n\n\tprivate tableDivElement?: HTMLDivElement;\n\tprivate tableDivElementResizeObserver?: ResizeObserver;\n\tprivate horizontal = true;\n\tprivate cellsToRenderTimeouts = new Map<HTMLElement, ReturnType<typeof setTimeout>>();\n\tprivate dataToKeyMap = new Map<KoliBriTableDataType, string>();\n\n\tprivate checkboxRefs: HTMLInputElement[] = [];\n\n\tprivate translateSort = translate('kol-sort');\n\tprivate translateNoEntries = translate('kol-no-entries');\n\n\t@State()\n\tprivate tableDivElementHasScrollbar = false;\n\n\t/**\n\t * Defines the primary table data.\n\t */\n\t@Prop() public _data!: TableDataPropType;\n\n\t/**\n\t * Defines the data for the table footer.\n\t */\n\t@Prop() public _dataFoot?: TableDataFootPropType;\n\n\t/**\n\t * Defines the horizontal and vertical table headers.\n\t */\n\t@Prop() public _headerCells!: TableHeaderCellsPropType;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop() public _label!: string;\n\n\t/**\n\t * Defines the table min-width.\n\t * @deprecated This property is deprecated and will be removed in the next major release.\n\t */\n\t@Prop() public _minWidth?: string;\n\n\t/**\n\t * Defines the callback functions for table events.\n\t */\n\t@Prop() public _on?: TableCallbacksPropType;\n\n\t/**\n\t * Defines how rows can be selected and the current selection.\n\t */\n\t@Prop() public _selection?: TableSelectionPropType;\n\n\t@Watch('_data')\n\tpublic validateData(value?: TableDataPropType) {\n\t\tvalidateTableData(this, value, {\n\t\t\tbeforePatch: (nextValue) => {\n\t\t\t\tthis.updateDataToKeyMap(nextValue as KoliBriTableDataType[]);\n\t\t\t},\n\t\t});\n\t}\n\n\t@Watch('_dataFoot')\n\tpublic validateDataFoot(value?: TableDataFootPropType) {\n\t\tvalidateTableDataFoot(this, value);\n\t}\n\n\t@Watch('_headerCells')\n\tpublic validateHeaderCells(value?: TableHeaderCellsPropType) {\n\t\tvalidateTableHeaderCells(this, value);\n\t}\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelPropType): void {\n\t\tvalidateLabel(this, value, {\n\t\t\trequired: true,\n\t\t});\n\t}\n\n\t/**\n\t * @deprecated This property is deprecated and will be removed in the next major release.\n\t */\n\t@Watch('_minWidth')\n\tpublic validateMinWidth(value?: string): void {\n\t\twatchString(this, '_deprecatedMinWidth', value, {\n\t\t\tdefaultValue: undefined,\n\t\t});\n\t}\n\n\t@Watch('_on')\n\tpublic validateOn(value?: TableCallbacksPropType): void {\n\t\tvalidateTableCallbacks(this, value);\n\t}\n\n\t@Watch('_selection')\n\tpublic validateSelection(value?: TableSelectionPropType): void {\n\t\tvalidateTableSelection(this, value);\n\t}\n\n\t@Listen('keydown')\n\tpublic handleKeyDown(event: KeyboardEvent) {\n\t\tif (event.key === 'ArrowUp' || event.key === 'ArrowDown') {\n\t\t\tconst focusedElement = this.tableDivElement?.querySelector(':focus') as HTMLInputElement;\n\t\t\tlet index = this.checkboxRefs.indexOf(focusedElement);\n\n\t\t\tif (index > -1) {\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\tif (event.key === 'ArrowDown') {\n\t\t\t\t\tindex = (index + 1) % this.checkboxRefs.length;\n\t\t\t\t\tthis.checkboxRefs[index].focus();\n\t\t\t\t} else if (event.key === 'ArrowUp') {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tindex = (index + this.checkboxRefs.length - 1) % this.checkboxRefs.length;\n\t\t\t\t\tthis.checkboxRefs[index].focus();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic componentDidRender(): void {\n\t\tthis.checkDivElementScrollbar();\n\t}\n\n\tpublic componentDidLoad() {\n\t\tif (this.tableDivElement && ResizeObserver) {\n\t\t\tthis.tableDivElementResizeObserver = new ResizeObserver(this.checkDivElementScrollbar.bind(this));\n\t\t\tthis.tableDivElementResizeObserver.observe(this.tableDivElement);\n\t\t}\n\t}\n\n\tpublic disconnectedCallback() {\n\t\tthis.tableDivElementResizeObserver?.disconnect();\n\t}\n\n\tprivate checkDivElementScrollbar() {\n\t\tif (this.tableDivElement) {\n\t\t\tthis.tableDivElementHasScrollbar = this.tableDivElement.scrollWidth > this.tableDivElement.clientWidth;\n\t\t}\n\t}\n\n\tprivate updateDataToKeyMap(data: KoliBriTableDataType[]) {\n\t\tdata.forEach((data) => {\n\t\t\tif (!this.dataToKeyMap.has(data)) {\n\t\t\t\tthis.dataToKeyMap.set(data, nonce());\n\t\t\t}\n\t\t});\n\n\t\t/* Cleanup old values from map */\n\t\tthis.dataToKeyMap.forEach((_, key) => {\n\t\t\tif (!data.includes(key)) {\n\t\t\t\tthis.dataToKeyMap.delete(key);\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate getDataKey(data: KoliBriTableDataType) {\n\t\treturn this.dataToKeyMap.get(data);\n\t}\n\n\t/**\n\t * Applies a custom render function to a specific table cell if provided.\n\t * Ensures that the content is updated after a delay to avoid excessive re-renders.\n\t *\n\t * @param {KoliBriTableCell} cell The cell to be rendered, with a possible custom `render` function.\n\t * @param {HTMLElement} el The HTML element where the cell is rendered.\n\t */\n\tprivate cellRender(cell: KoliBriTableCell, el?: HTMLElement): void {\n\t\tif (el) {\n\t\t\tclearTimeout(this.cellsToRenderTimeouts.get(el));\n\t\t\tthis.cellsToRenderTimeouts.set(\n\t\t\t\tel,\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tif (typeof cell.render === 'function') {\n\t\t\t\t\t\tconst renderContent = cell.render(el, cell, cell.data, this.state._data);\n\t\t\t\t\t\tif (typeof renderContent === 'string') {\n\t\t\t\t\t\t\tel.textContent = renderContent;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t);\n\t\t}\n\t}\n\n\tprivate getNumberOfCols(horizontalHeaders: KoliBriTableHeaderCell[][], data: KoliBriTableDataType[]): number {\n\t\tlet max = 0;\n\t\thorizontalHeaders.forEach((row) => {\n\t\t\tlet count = 0;\n\t\t\tArray.isArray(row) && row.forEach((col) => (count += col.colSpan ?? 1));\n\t\t\tif (max < count) {\n\t\t\t\tmax = count;\n\t\t\t}\n\t\t});\n\t\tif (max === 0) {\n\t\t\tmax = data.length;\n\t\t}\n\t\treturn max;\n\t}\n\n\tprivate getNumberOfRows(verticalHeaders: KoliBriTableHeaderCell[][], data: KoliBriTableDataType[]): number {\n\t\tlet max = 0;\n\t\tverticalHeaders.forEach((col) => {\n\t\t\tlet count = 0;\n\t\t\tArray.isArray(col) && col.forEach((row) => (count += row.rowSpan ?? 1));\n\t\t\tif (max < count) {\n\t\t\t\tmax = count;\n\t\t\t}\n\t\t});\n\t\tif (max === 0) {\n\t\t\tmax = data.length;\n\t\t} else {\n\t\t\tmax -= this.state._dataFoot?.length || 0;\n\t\t}\n\t\treturn max;\n\t}\n\n\tprivate getThePrimaryHeadersWithKeyOrRenderFunction(headers: KoliBriTableHeaderCell[][]): KoliBriTableHeaderCell[] {\n\t\tconst primaryHeaders: KoliBriTableHeaderCell[] = [];\n\n\t\theaders.forEach((cells) => {\n\t\t\tcells.forEach((cell) => {\n\t\t\t\tif (typeof cell.key === 'string' || typeof cell.render === 'function') {\n\t\t\t\t\tprimaryHeaders.push(cell);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\n\t\treturn primaryHeaders;\n\t}\n\n\tprivate getPrimaryHeaders(headers: KoliBriTableHeaders): KoliBriTableHeaderCell[] {\n\t\tlet primaryHeaders: KoliBriTableHeaderCell[] = this.getThePrimaryHeadersWithKeyOrRenderFunction(headers.horizontal ?? []);\n\n\t\t/**\n\t\t * It is important to note that the rendering direction of the data is implicitly set,\n\t\t * if either the horizontal or vertical header cells have keys.\n\t\t */\n\t\tthis.horizontal = true;\n\t\tif (primaryHeaders.length === 0) {\n\t\t\tprimaryHeaders = this.getThePrimaryHeadersWithKeyOrRenderFunction(headers.vertical ?? []);\n\t\t\tif (primaryHeaders.length > 0) {\n\t\t\t\tthis.horizontal = false;\n\t\t\t}\n\t\t}\n\t\treturn primaryHeaders;\n\t}\n\n\tprivate createDataField(data: KoliBriTableDataType[], headers: KoliBriTableHeaders, isFoot?: boolean): (KoliBriTableCell & KoliBriTableDataType)[][] {\n\t\theaders.horizontal = Array.isArray(headers?.horizontal) ? headers.horizontal : [];\n\t\theaders.vertical = Array.isArray(headers?.vertical) ? headers.vertical : [];\n\t\tconst primaryHeader = this.getPrimaryHeaders(headers);\n\t\tconst maxCols = this.getNumberOfCols(headers.horizontal, data);\n\t\tlet maxRows = this.getNumberOfRows(headers.vertical, data);\n\t\tlet startRow = 0;\n\t\tif (isFoot) {\n\t\t\tstartRow = maxRows;\n\t\t\tmaxRows += this.state._dataFoot?.length || 0;\n\t\t}\n\t\tconst dataField: KoliBriTableCell[][] = [];\n\n\t\tconst rowCount: number[] = [];\n\t\tconst rowSpans: number[][] = [];\n\t\theaders.vertical.forEach((_row, index) => {\n\t\t\trowCount[index] = 0;\n\t\t\trowSpans[index] = [];\n\t\t});\n\n\t\tfor (let i = startRow; i < maxRows; i++) {\n\t\t\tconst dataRow: KoliBriTableHeaderCellWithLogic[] = [];\n\t\t\theaders.vertical.forEach((headerCells, index) => {\n\t\t\t\tlet rowsTotal = 0;\n\t\t\t\trowSpans[index].forEach((value) => (rowsTotal += value));\n\t\t\t\tif (rowsTotal <= i) {\n\t\t\t\t\tconst rows = headerCells[i - rowsTotal + rowCount[index]];\n\t\t\t\t\tif (typeof rows === 'object') {\n\t\t\t\t\t\tdataRow.push({\n\t\t\t\t\t\t\t...rows,\n\t\t\t\t\t\t\tasTd: false,\n\t\t\t\t\t\t\tdata: {},\n\t\t\t\t\t\t});\n\t\t\t\t\t\tlet rowSpan = 1;\n\t\t\t\t\t\tif (typeof rows.rowSpan === 'number' && rows.rowSpan > 1) {\n\t\t\t\t\t\t\trowSpan = rows.rowSpan;\n\t\t\t\t\t\t}\n\t\t\t\t\t\trowSpans[index].push(rowSpan);\n\t\t\t\t\t\tif (typeof rows.colSpan === 'number' && rows.colSpan > 1) {\n\t\t\t\t\t\t\tfor (let k = 1; k < rows.colSpan; k++) {\n\t\t\t\t\t\t\t\trowSpans[index + k].push(rowSpan);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\trowCount[index]++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\tfor (let j = 0; j < maxCols; j++) {\n\t\t\t\tif (this.horizontal === true) {\n\t\t\t\t\tconst row = isFoot && this.state._dataFoot ? this.state._dataFoot[i - startRow] : data[i];\n\t\t\t\t\tif (\n\t\t\t\t\t\ttypeof primaryHeader[j] === 'object' &&\n\t\t\t\t\t\tprimaryHeader[j] !== null &&\n\t\t\t\t\t\ttypeof row === 'object' &&\n\t\t\t\t\t\trow !== null &&\n\t\t\t\t\t\t(typeof primaryHeader[j].key === 'string' || typeof primaryHeader[j].render === 'function')\n\t\t\t\t\t) {\n\t\t\t\t\t\tdataRow.push({\n\t\t\t\t\t\t\t...primaryHeader[j],\n\t\t\t\t\t\t\tcolSpan: undefined,\n\t\t\t\t\t\t\tdata: row,\n\t\t\t\t\t\t\tlabel: row[primaryHeader[j].key as unknown as string] as string,\n\t\t\t\t\t\t\trowSpan: undefined,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (\n\t\t\t\t\t\ttypeof primaryHeader[i] === 'object' &&\n\t\t\t\t\t\tprimaryHeader[i] !== null &&\n\t\t\t\t\t\ttypeof data[j] === 'object' &&\n\t\t\t\t\t\tdata[j] !== null &&\n\t\t\t\t\t\t(typeof primaryHeader[i].key === 'string' || typeof primaryHeader[i].render === 'function')\n\t\t\t\t\t) {\n\t\t\t\t\t\tdataRow.push({\n\t\t\t\t\t\t\t...primaryHeader[i],\n\t\t\t\t\t\t\tcolSpan: undefined,\n\t\t\t\t\t\t\tdata: data[j],\n\t\t\t\t\t\t\tlabel: data[j][primaryHeader[i].key as unknown as number] as string,\n\t\t\t\t\t\t\trowSpan: undefined,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tdataField.push(dataRow);\n\t\t}\n\t\tif (data.length === 0) {\n\t\t\tlet colspan = 0;\n\t\t\tlet rowspan = 0;\n\t\t\tif (Array.isArray(headers.horizontal) && headers.horizontal.length > 0) {\n\t\t\t\theaders.horizontal[0].forEach((col) => {\n\t\t\t\t\tcolspan += col.colSpan || 1;\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (Array.isArray(headers.vertical) && headers.vertical.length > 0) {\n\t\t\t\tcolspan -= headers.vertical.length;\n\t\t\t\theaders.vertical[0].forEach((row) => {\n\t\t\t\t\trowspan += row.rowSpan || 1;\n\t\t\t\t});\n\t\t\t}\n\t\t\tconst emptyCell = {\n\t\t\t\tcolSpan: colspan,\n\t\t\t\tlabel: translate('kol-no-entries'),\n\t\t\t\trender: undefined,\n\t\t\t\trowSpan: Math.max(rowspan, 1),\n\t\t\t};\n\t\t\tif (dataField.length === 0) {\n\t\t\t\tdataField.push([emptyCell]);\n\t\t\t} else {\n\t\t\t\tdataField[0].push(emptyCell);\n\t\t\t}\n\t\t}\n\t\treturn dataField;\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateData(this._data);\n\t\tthis.validateDataFoot(this._dataFoot);\n\t\tthis.validateHeaderCells(this._headerCells);\n\t\tthis.validateLabel(this._label);\n\t\tthis.validateMinWidth(this._minWidth);\n\t\tthis.validateOn(this._on);\n\t\tthis.validateSelection(this._selection);\n\t}\n\n\t/**\n\t * Renders the selection cell for a row, either as a checkbox (for multiple selection)\n\t * or as a radio button (for single selection). It handles selection states and dispatches\n\t * events for selection changes.\n\t *\n\t * @param {KoliBriTableCell[]} row The row data containing the cell with selection properties.\n\t * @param {number} rowIndex The index of the row.\n\t * @returns {JSX.Element} The rendered selection cell, either with a checkbox or radio input.\n\t */\n\tprivate renderSelectionCell(row: (KoliBriTableCell & KoliBriTableDataType)[], rowIndex: number): JSX.Element {\n\t\tconst selection = this.state._selection;\n\t\tif (!selection) return '';\n\t\tconst keyPropertyName = selection.keyPropertyName ?? 'id';\n\t\tconst firstCellData = row[0]?.data;\n\n\t\tif (!firstCellData) return '';\n\t\tconst keyProperty = firstCellData[keyPropertyName] as string;\n\t\tconst isMultiple = selection.multiple || selection.multiple === undefined;\n\t\tconst selected = selection?.selectedKeys?.includes(keyProperty);\n\t\tconst label = selection.label(firstCellData);\n\t\tconst props = {\n\t\t\tname: 'selection',\n\t\t\tchecked: selected,\n\t\t\tid: keyProperty,\n\t\t\t['aria-label']: label,\n\t\t};\n\t\treturn (\n\t\t\t<td key={`tbody-${rowIndex}-selection`} class=\"selection-cell\">\n\t\t\t\t<div class={`input ${selected ? 'checked' : ''}`}>\n\t\t\t\t\t{isMultiple ? (\n\t\t\t\t\t\t<label class=\"checkbox-container\">\n\t\t\t\t\t\t\t<KolIconTag class=\"icon\" _icons={`codicon ${selected ? 'codicon-check' : ''}`} _label=\"\" />\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\tref={(el) => el && this.checkboxRefs.push(el)}\n\t\t\t\t\t\t\t\t{...props}\n\t\t\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\t\t\tonInput={(event: Event) => {\n\t\t\t\t\t\t\t\t\tconst updatedSelectedKeys = !selected\n\t\t\t\t\t\t\t\t\t\t? [...(selection?.selectedKeys ?? []), keyProperty]\n\t\t\t\t\t\t\t\t\t\t: selection?.selectedKeys?.filter((key) => key !== keyProperty);\n\t\t\t\t\t\t\t\t\ttryToDispatchKoliBriEvent('selection-change', this.host, updatedSelectedKeys);\n\t\t\t\t\t\t\t\t\tif (typeof this.state._on?.[Events.onSelectionChange] === 'function') {\n\t\t\t\t\t\t\t\t\t\tthis.state._on[Events.onSelectionChange](event, updatedSelectedKeys ?? []);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</label>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<label class=\"radio-container\">\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t{...props}\n\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\tonInput={(event: Event) => {\n\t\t\t\t\t\t\t\t\ttryToDispatchKoliBriEvent('selection-change', this.host, keyProperty);\n\t\t\t\t\t\t\t\t\tif (typeof this.state._on?.[Events.onSelectionChange] === 'function') {\n\t\t\t\t\t\t\t\t\t\tthis.state._on[Events.onSelectionChange](event, keyProperty);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</label>\n\t\t\t\t\t)}\n\t\t\t\t\t<KolTooltipWcTag aria-hidden=\"true\" class=\"input-tooltip\" _align=\"right\" _id={`${keyProperty}-label`} _label={label}></KolTooltipWcTag>\n\t\t\t\t</div>\n\t\t\t</td>\n\t\t);\n\t}\n\n\t/**\n\t * Renders a full table row by mapping over each cell and calling `renderTableCell`.\n\t * It also handles the row's unique key generation and selection functionality.\n\t *\n\t * @param {KoliBriTableCell[]} row The data for the current row.\n\t * @param {number} rowIndex The index of the current row being rendered.\n\t * @returns {JSX.Element} The rendered row with its cells.\n\t */\n\tprivate readonly renderTableRow = (row: (KoliBriTableCell & KoliBriTableDataType)[], rowIndex: number, isVertical: boolean): JSX.Element => {\n\t\tlet key = String(rowIndex);\n\t\tif (this.horizontal && row[0]?.data) {\n\t\t\tkey = this.getDataKey(row[0].data) ?? key;\n\t\t}\n\n\t\treturn (\n\t\t\t<tr key={`row-${key}`}>\n\t\t\t\t{this.renderSelectionCell(row, rowIndex)}\n\t\t\t\t{row.map((cell, colIndex) => this.renderTableCell(cell, rowIndex, colIndex, isVertical))}\n\t\t\t</tr>\n\t\t);\n\t};\n\n\t/**\n\t * Renders a table cell, either as a data cell (`<td>`) or a header cell (`<th>`).\n\t * If a custom `render` function is provided in the cell, it will be used to display content.\n\t *\n\t * @param {KoliBriTableCell} cell The cell data, containing label, colSpan, rowSpan, and potential render function.\n\t * @param {number} rowIndex The current row index.\n\t * @param {number} colIndex The current column index.\n\t * @returns {JSX.Element} The rendered table cell (either `<td>` or `<th>`).\n\t */\n\tprivate readonly renderTableCell = (cell: KoliBriTableCell, rowIndex: number, colIndex: number, isVertical: boolean): JSX.Element => {\n\t\tlet key = `${rowIndex}-${colIndex}-${cell.label}`;\n\t\tif (cell.data) {\n\t\t\tconst dataKey = this.getDataKey(cell.data);\n\t\t\tkey = dataKey ? `${dataKey}-${this.horizontal ? colIndex : rowIndex}` : key;\n\t\t}\n\n\t\tif (cell.asTd === false) {\n\t\t\treturn this.renderHeadingCell(cell, rowIndex, colIndex, isVertical);\n\t\t} else {\n\t\t\tconst isNoEntriesHintCell = typeof cell.render !== 'function' && cell.label === this.translateNoEntries;\n\n\t\t\treturn (\n\t\t\t\t<td\n\t\t\t\t\tkey={`cell-${key}`}\n\t\t\t\t\tclass={{\n\t\t\t\t\t\t[cell.textAlign as string]: typeof cell.textAlign === 'string' && cell.textAlign.length > 0,\n\t\t\t\t\t}}\n\t\t\t\t\taria-atomic={isNoEntriesHintCell ? 'false' : undefined}\n\t\t\t\t\taria-live={isNoEntriesHintCell ? 'polite' : undefined}\n\t\t\t\t\taria-relevant={isNoEntriesHintCell ? 'text' : undefined}\n\t\t\t\t\tcolSpan={cell.colSpan}\n\t\t\t\t\trowSpan={cell.rowSpan}\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\ttextAlign: cell.textAlign,\n\t\t\t\t\t\twidth: cell.width,\n\t\t\t\t\t}}\n\t\t\t\t\tref={\n\t\t\t\t\t\ttypeof cell.render === 'function'\n\t\t\t\t\t\t\t? (el) => {\n\t\t\t\t\t\t\t\t\tthis.cellRender(cell as KoliBriTableHeaderCellWithLogic & { render: KoliBriTableRender }, el);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t{typeof cell.render !== 'function' ? cell.label : ''}\n\t\t\t\t</td>\n\t\t\t);\n\t\t}\n\t};\n\n\t/**\n\t * Renders the header cell for row selection. This cell contains a checkbox for selecting\n\t * all rows when selection is enabled. If multiple selection is allowed, the checkbox allows\n\t * selecting/deselecting all rows at once. It also supports an indeterminate state\n\t * if only some rows are selected.\n\t *\n\t * @returns {JSX.Element} - The rendered header cell containing the selection checkbox.\n\t */\n\tprivate renderHeadingSelectionCell(): JSX.Element {\n\t\tconst selection = this.state._selection;\n\n\t\tif (selection?.multiple === false) {\n\t\t\treturn <td key={`thead-0-selection`} class=\"table__header-cell table__header-cell--horizontal selection-cell\"></td>;\n\t\t}\n\n\t\tconst keyPropertyName = selection?.keyPropertyName ?? 'id';\n\t\tconst selectedKeyLength = selection?.selectedKeys?.length;\n\t\tconst dataLength = this.state._data.length;\n\t\tconst isChecked = selectedKeyLength === dataLength;\n\t\tconst indeterminate = selectedKeyLength !== 0 && !isChecked;\n\t\tlet translationKey = 'kol-table-selection-indeterminate' as TranslationKey;\n\t\tif (isChecked && !indeterminate) {\n\t\t\ttranslationKey = 'kol-table-selection-none';\n\t\t}\n\t\tif (selectedKeyLength === 0) {\n\t\t\ttranslationKey = 'kol-table-selection-all';\n\t\t}\n\t\tconst label = translate(translationKey);\n\t\treturn (\n\t\t\t<th key={`thead-0-selection`} class=\"table__header-cell table__header-cell--horizontal selection-cell selection-control\">\n\t\t\t\t<div class={`input ${indeterminate ? 'indeterminate' : isChecked ? 'checked' : ''}`}>\n\t\t\t\t\t<label class=\"checkbox-container\">\n\t\t\t\t\t\t<KolIconTag class=\"icon\" _icons={`codicon ${indeterminate ? 'codicon-remove' : isChecked ? 'codicon-check' : ''}`} _label=\"\" />\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tref={(el) => el && this.checkboxRefs.push(el)}\n\t\t\t\t\t\t\tname=\"selection\"\n\t\t\t\t\t\t\tchecked={isChecked && !indeterminate}\n\t\t\t\t\t\t\taria-label={label}\n\t\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\t\tonInput={(event: Event) => {\n\t\t\t\t\t\t\t\tconst selections = !isChecked ? this.state._data.map((el) => el?.[keyPropertyName] as string) : [];\n\t\t\t\t\t\t\t\ttryToDispatchKoliBriEvent('selection-change', this.host, selections);\n\t\t\t\t\t\t\t\tif (typeof this.state._on?.[Events.onSelectionChange] === 'function') {\n\t\t\t\t\t\t\t\t\tthis.state._on[Events.onSelectionChange](event, selections);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</label>\n\t\t\t\t\t<KolTooltipWcTag aria-hidden=\"true\" class=\"input-tooltip\" _align=\"right\" _id={`${translationKey}-label`} _label={label}></KolTooltipWcTag>\n\t\t\t\t</div>\n\t\t\t</th>\n\t\t);\n\t}\n\n\t/**\n\t * This header cell is rendered as a TD element when in addition to the horizontal header rows\n\t * there are also vertical header columns. In this case, the cell is rendered blank above the\n\t * vertical header columns.\n\t */\n\tprivate renderHeaderTdCell(): JSX.Element {\n\t\treturn (\n\t\t\t<Fragment>\n\t\t\t\t{Array.isArray(this.state._headerCells.horizontal) &&\n\t\t\t\t\tthis.state._headerCells.horizontal.length > 0 &&\n\t\t\t\t\tArray.isArray(this.state._headerCells.vertical) &&\n\t\t\t\t\tthis.state._headerCells.vertical.length > 0 &&\n\t\t\t\t\tArray.isArray(this.state._headerCells.horizontal) && (\n\t\t\t\t\t\t<td aria-hidden=\"true\" colSpan={this.state._headerCells.vertical.length} rowSpan={this.state._headerCells.horizontal.length}></td>\n\t\t\t\t\t)}\n\t\t\t</Fragment>\n\t\t);\n\t}\n\n\t/**\n\t * Renders a table header cell (`<th>`), with optional sorting functionality.\n\t * If the cell has a `sortDirection` property, a sort button is rendered within the header.\n\t *\n\t * @param {KoliBriTableHeaderCell} cell The header cell data, containing label, colSpan, rowSpan, and possible sort direction.\n\t * @param {number} rowIndex The index of the current row in the table.\n\t * @param {number} colIndex The index of the current column in the row.\n\t * @returns {JSX.Element} The rendered header cell with possible sorting controls.\n\t */\n\tprivate renderHeadingCell(cell: KoliBriTableHeaderCell, rowIndex: number, colIndex: number, isVertical: boolean): JSX.Element {\n\t\tlet ariaSort: AriaSort = 'none';\n\t\tlet sortButtonIcon = 'codicon codicon-fold';\n\n\t\tif (cell.sortDirection) {\n\t\t\tswitch (cell.sortDirection) {\n\t\t\t\tcase 'ASC':\n\t\t\t\t\tsortButtonIcon = 'codicon codicon-chevron-up';\n\t\t\t\t\tariaSort = 'ascending';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'DESC':\n\t\t\t\t\tsortButtonIcon = 'codicon codicon-chevron-down';\n\t\t\t\t\tariaSort = 'descending';\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tariaSort = 'none';\n\t\t\t}\n\t\t}\n\n\t\tconst scope = isVertical ? 'row' : typeof cell.colSpan === 'number' && cell.colSpan > 1 ? 'colgroup' : 'col';\n\n\t\tconst classNames = ['table__header-cell', isVertical ? 'table__header-cell--vertical' : 'table__header-cell--horizontal'];\n\t\tif (typeof cell.textAlign === 'string' && cell.textAlign.length > 0) {\n\t\t\tclassNames.push(`table__header-cell--align-${cell.textAlign}`, `align-${cell.textAlign}`);\n\t\t}\n\n\t\treturn (\n\t\t\t<th\n\t\t\t\tkey={`${rowIndex}-${colIndex}-${cell.label}`}\n\t\t\t\tclass={classNames.join(' ')}\n\t\t\t\tscope={scope}\n\t\t\t\tcolSpan={cell.colSpan}\n\t\t\t\trowSpan={cell.rowSpan}\n\t\t\t\tstyle={{\n\t\t\t\t\twidth: cell.width,\n\t\t\t\t}}\n\t\t\t\taria-sort={ariaSort}\n\t\t\t\tdata-sort={`sort-${cell.sortDirection}`}\n\t\t\t>\n\t\t\t\t{cell.sortDirection ? (\n\t\t\t\t\t<KolButtonWcTag\n\t\t\t\t\t\tclass=\"table-sort-button\"\n\t\t\t\t\t\texportparts=\"icon\"\n\t\t\t\t\t\t_icons={{ right: sortButtonIcon }}\n\t\t\t\t\t\t_label={cell.label}\n\t\t\t\t\t\t_ariaDescription={this.translateSort}\n\t\t\t\t\t\t_on={{\n\t\t\t\t\t\t\tonClick: (event: MouseEvent) => {\n\t\t\t\t\t\t\t\tif (typeof this.state._on?.onSort === 'function' && cell.key && cell.sortDirection) {\n\t\t\t\t\t\t\t\t\tthis.state._on.onSort(event, {\n\t\t\t\t\t\t\t\t\t\tkey: cell.key,\n\t\t\t\t\t\t\t\t\t\tcurrentSortDirection: cell.sortDirection,\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}}\n\t\t\t\t\t></KolButtonWcTag>\n\t\t\t\t) : (\n\t\t\t\t\tcell.label\n\t\t\t\t)}\n\t\t\t</th>\n\t\t);\n\t}\n\n\tprivate renderSpacer(variant: 'foot' | 'head', cellDefs: KoliBriTableHeaderCell[][] | KoliBriTableCell[][]): JSX.Element {\n\t\tconst verticalHeaderColpan = this.state._headerCells.vertical?.length || 0;\n\t\tconst colspan = cellDefs?.[0]?.reduce((acc, row) => acc + (row.colSpan || 1), 0);\n\t\tconst selectionCell = this.state._selection ? 1 : 0;\n\n\t\treturn (\n\t\t\t<tr aria-hidden=\"true\" class={`${variant}-spacer`}>\n\t\t\t\t<td colSpan={verticalHeaderColpan + colspan + selectionCell}></td>\n\t\t\t</tr>\n\t\t);\n\t}\n\n\tprivate renderFoot(): JSX.Element[] | null {\n\t\tif (!this.state._dataFoot || this.state._dataFoot.length === 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst rows: KoliBriTableCell[][] = this.createDataField(this.state._dataFoot, this.state._headerCells, true);\n\t\treturn (\n\t\t\t<tfoot>\n\t\t\t\t{[\n\t\t\t\t\tthis.renderSpacer('foot', rows),\n\t\t\t\t\trows.map((row: (KoliBriTableCell & KoliBriTableDataType)[], rowIndex: number) => this.renderTableRow(row, rowIndex, true)),\n\t\t\t\t]}\n\t\t\t</tfoot>\n\t\t);\n\t}\n\n\tpublic render(): JSX.Element {\n\t\tconst dataField = this.createDataField(this.state._data, this.state._headerCells);\n\t\tthis.checkboxRefs = [];\n\n\t\treturn (\n\t\t\t<Host class=\"kol-table-stateless-wc\">\n\t\t\t\t{/* Firefox automatically makes the following div focusable when it has a scrollbar. We implement a similar behavior cross-browser by allowing the\n\t\t\t\t * <div class=\"focus-element\"> to receive focus. Hence, we disable focus for the div to avoid having two focusable elements by setting `tabindex=\"-1\"`\n\t\t\t\t */}\n\t\t\t\t{/* eslint-disable-next-line jsx-a11y/no-static-element-interactions */}\n\t\t\t\t<div ref={(element) => (this.tableDivElement = element)} class=\"table\" tabindex={this.tableDivElementHasScrollbar ? '-1' : undefined}>\n\t\t\t\t\t<table\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tminWidth: this.state._deprecatedMinWidth || this.state._minWidth,\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{/* eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex */}\n\t\t\t\t\t\t<caption id=\"caption\" tabindex={this.tableDivElementHasScrollbar ? '0' : undefined}>\n\t\t\t\t\t\t\t{this.state._label}\n\t\t\t\t\t\t</caption>\n\n\t\t\t\t\t\t{Array.isArray(this.state._headerCells.horizontal) && (\n\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t{[\n\t\t\t\t\t\t\t\t\tthis.state._headerCells.horizontal.map((cols, rowIndex) => (\n\t\t\t\t\t\t\t\t\t\t<tr key={`thead-${rowIndex}`}>\n\t\t\t\t\t\t\t\t\t\t\t{this.state._selection && this.renderHeadingSelectionCell()}\n\t\t\t\t\t\t\t\t\t\t\t{rowIndex === 0 && this.renderHeaderTdCell()}\n\t\t\t\t\t\t\t\t\t\t\t{Array.isArray(cols) &&\n\t\t\t\t\t\t\t\t\t\t\t\tcols.map((cell, colIndex) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (cell.asTd === true) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={`thead-${rowIndex}-${colIndex}-${cell.label}`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclass={[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'table__header-cell',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'table__header-cell--horizontal',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttypeof cell.textAlign === 'string' && cell.textAlign.length > 0 ? `table__header-cell--align-${cell.textAlign}` : undefined,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttypeof cell.textAlign === 'string' && cell.textAlign.length > 0 ? `align-${cell.textAlign}` : undefined,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttypeof cell.textAlign === 'string' && cell.textAlign.length > 0 ? cell.textAlign : undefined,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.filter(Boolean)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.join(' ')}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolSpan={cell.colSpan}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trowSpan={cell.rowSpan}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextAlign: cell.textAlign,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: cell.width,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tref={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttypeof cell.render === 'function'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? (el) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.cellRender(cell, el);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{typeof cell.render !== 'function' ? cell.label : ''}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn this.renderHeadingCell(cell, rowIndex, colIndex, false);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t)),\n\t\t\t\t\t\t\t\t\tthis.renderSpacer('head', this.state._headerCells.horizontal),\n\t\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<tbody>{dataField.map((row: (KoliBriTableCell & KoliBriTableDataType)[], rowIndex: number) => this.renderTableRow(row, rowIndex, true))}</tbody>\n\t\t\t\t\t\t{this.renderFoot()}\n\t\t\t\t\t</table>\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t);\n\t}\n}\n"],"version":3}