@public-ui/components 3.0.0-rc.0 → 3.0.0-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 (566) hide show
  1. package/README.md +8 -0
  2. package/custom-elements.json +1 -1
  3. package/dist/cjs/{Alert-5272b50e.js → Alert-52cba055.js} +1 -1
  4. package/dist/cjs/{Alert-5272b50e.js.map → Alert-52cba055.js.map} +1 -1
  5. package/dist/cjs/Collapsible-af4ab103.js +4 -0
  6. package/dist/cjs/Collapsible-af4ab103.js.map +1 -0
  7. package/dist/cjs/FormFieldMsg-c7ea9101.js +4 -0
  8. package/dist/cjs/FormFieldMsg-c7ea9101.js.map +1 -0
  9. package/dist/cjs/Heading-5ab6ddeb.js +4 -0
  10. package/dist/cjs/Heading-5ab6ddeb.js.map +1 -0
  11. package/dist/cjs/{InternalUnderlinedBadgeText-1eab6f37.js → InternalUnderlinedBadgeText-6a5d3caa.js} +1 -1
  12. package/dist/cjs/{InternalUnderlinedBadgeText-1eab6f37.js.map → InternalUnderlinedBadgeText-6a5d3caa.js.map} +1 -1
  13. package/dist/cjs/{Span-9d8e4664.js → Span-e42fa129.js} +1 -1
  14. package/dist/cjs/Span-e42fa129.js.map +1 -0
  15. package/dist/cjs/{app-globals-63e1b69d.js → app-globals-0bc138e9.js} +1 -1
  16. package/dist/cjs/{app-globals-63e1b69d.js.map → app-globals-0bc138e9.js.map} +1 -1
  17. package/dist/cjs/{dev.utils-2bfc459d.js → dev.utils-dd5eab59.js} +1 -1
  18. package/dist/cjs/{dev.utils-2bfc459d.js.map → dev.utils-dd5eab59.js.map} +1 -1
  19. package/dist/cjs/{devtools-8c9e3519.js → devtools-1b7a5946.js} +1 -1
  20. package/dist/cjs/{devtools-8c9e3519.js.map → devtools-1b7a5946.js.map} +1 -1
  21. package/dist/cjs/{index-907ce00e.js → index-c048b81b.js} +1 -1
  22. package/dist/cjs/{index-907ce00e.js.map → index-c048b81b.js.map} +1 -1
  23. package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
  24. package/dist/cjs/kol-abbr.cjs.entry.js.map +1 -1
  25. package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
  26. package/dist/cjs/kol-accordion.cjs.entry.js.map +1 -1
  27. package/dist/cjs/kol-alert-wc.cjs.entry.js +1 -1
  28. package/dist/cjs/kol-alert.cjs.entry.js +1 -1
  29. package/dist/cjs/kol-alert.cjs.entry.js.map +1 -1
  30. package/dist/cjs/kol-avatar-wc.cjs.entry.js +1 -1
  31. package/dist/cjs/kol-avatar.cjs.entry.js +1 -1
  32. package/dist/cjs/kol-avatar.cjs.entry.js.map +1 -1
  33. package/dist/cjs/kol-badge.cjs.entry.js +1 -1
  34. package/dist/cjs/kol-badge.cjs.entry.js.map +1 -1
  35. package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
  36. package/dist/cjs/kol-breadcrumb.cjs.entry.js.map +1 -1
  37. package/dist/cjs/kol-button-group-wc.cjs.entry.js +1 -1
  38. package/dist/cjs/kol-button-group.cjs.entry.js +1 -1
  39. package/dist/cjs/kol-button-group.cjs.entry.js.map +1 -1
  40. package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
  41. package/dist/cjs/kol-button-link.cjs.entry.js.map +1 -1
  42. package/dist/cjs/kol-button-wc.cjs.entry.js +1 -1
  43. package/dist/cjs/kol-button.cjs.entry.js +1 -1
  44. package/dist/cjs/kol-button.cjs.entry.js.map +1 -1
  45. package/dist/cjs/kol-card.cjs.entry.js +1 -1
  46. package/dist/cjs/kol-card.cjs.entry.js.map +1 -1
  47. package/dist/cjs/kol-combobox.cjs.entry.js +1 -1
  48. package/dist/cjs/kol-combobox.cjs.entry.js.map +1 -1
  49. package/dist/cjs/kol-details.cjs.entry.js +1 -1
  50. package/dist/cjs/kol-details.cjs.entry.js.map +1 -1
  51. package/dist/cjs/kol-drawer.cjs.entry.js +1 -1
  52. package/dist/cjs/kol-drawer.cjs.entry.js.map +1 -1
  53. package/dist/cjs/kol-form.cjs.entry.js +1 -1
  54. package/dist/cjs/kol-form.cjs.entry.js.map +1 -1
  55. package/dist/cjs/kol-heading.cjs.entry.js +1 -1
  56. package/dist/cjs/kol-heading.cjs.entry.js.map +1 -1
  57. package/dist/cjs/kol-icon.cjs.entry.js +1 -1
  58. package/dist/cjs/kol-image.cjs.entry.js +1 -1
  59. package/dist/cjs/kol-image.cjs.entry.js.map +1 -1
  60. package/dist/cjs/kol-indented-text-wc.cjs.entry.js +1 -1
  61. package/dist/cjs/kol-indented-text.cjs.entry.js +1 -1
  62. package/dist/cjs/kol-indented-text.cjs.entry.js.map +1 -1
  63. package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
  64. package/dist/cjs/kol-input-checkbox.cjs.entry.js.map +1 -1
  65. package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
  66. package/dist/cjs/kol-input-color.cjs.entry.js.map +1 -1
  67. package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
  68. package/dist/cjs/kol-input-date.cjs.entry.js.map +1 -1
  69. package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
  70. package/dist/cjs/kol-input-email.cjs.entry.js.map +1 -1
  71. package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
  72. package/dist/cjs/kol-input-file.cjs.entry.js.map +1 -1
  73. package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
  74. package/dist/cjs/kol-input-number.cjs.entry.js.map +1 -1
  75. package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
  76. package/dist/cjs/kol-input-password.cjs.entry.js.map +1 -1
  77. package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
  78. package/dist/cjs/kol-input-radio.cjs.entry.js.map +1 -1
  79. package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
  80. package/dist/cjs/kol-input-range.cjs.entry.js.map +1 -1
  81. package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
  82. package/dist/cjs/kol-input-text.cjs.entry.js.map +1 -1
  83. package/dist/cjs/kol-input.cjs.entry.js +1 -1
  84. package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
  85. package/dist/cjs/kol-kolibri.cjs.entry.js.map +1 -1
  86. package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
  87. package/dist/cjs/kol-link-button.cjs.entry.js.map +1 -1
  88. package/dist/cjs/kol-link-group.cjs.entry.js +1 -1
  89. package/dist/cjs/kol-link-group.cjs.entry.js.map +1 -1
  90. package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
  91. package/dist/cjs/kol-link.cjs.entry.js +1 -1
  92. package/dist/cjs/kol-link.cjs.entry.js.map +1 -1
  93. package/dist/cjs/kol-logo.cjs.entry.js +1 -1
  94. package/dist/cjs/kol-logo.cjs.entry.js.map +1 -1
  95. package/dist/cjs/kol-modal.cjs.entry.js +1 -1
  96. package/dist/cjs/kol-modal.cjs.entry.js.map +1 -1
  97. package/dist/cjs/kol-nav.cjs.entry.js +1 -1
  98. package/dist/cjs/kol-nav.cjs.entry.js.map +1 -1
  99. package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
  100. package/dist/cjs/kol-pagination.cjs.entry.js.map +1 -1
  101. package/dist/cjs/kol-popover-wc.cjs.entry.js +1 -1
  102. package/dist/cjs/kol-progress.cjs.entry.js +1 -1
  103. package/dist/cjs/kol-progress.cjs.entry.js.map +1 -1
  104. package/dist/cjs/kol-quote.cjs.entry.js +1 -1
  105. package/dist/cjs/kol-quote.cjs.entry.js.map +1 -1
  106. package/dist/cjs/kol-select.cjs.entry.js +1 -1
  107. package/dist/cjs/kol-select.cjs.entry.js.map +1 -1
  108. package/dist/cjs/kol-single-select.cjs.entry.js +1 -1
  109. package/dist/cjs/kol-single-select.cjs.entry.js.map +1 -1
  110. package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
  111. package/dist/cjs/kol-skip-nav.cjs.entry.js.map +1 -1
  112. package/dist/cjs/kol-spin.cjs.entry.js +1 -1
  113. package/dist/cjs/kol-spin.cjs.entry.js.map +1 -1
  114. package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
  115. package/dist/cjs/kol-split-button.cjs.entry.js.map +1 -1
  116. package/dist/cjs/kol-symbol.cjs.entry.js +1 -1
  117. package/dist/cjs/kol-table-stateful.cjs.entry.js +1 -1
  118. package/dist/cjs/kol-table-stateful.cjs.entry.js.map +1 -1
  119. package/dist/cjs/kol-table-stateless-wc.cjs.entry.js +1 -1
  120. package/dist/cjs/kol-table-stateless.cjs.entry.js +1 -1
  121. package/dist/cjs/kol-table-stateless.cjs.entry.js.map +1 -1
  122. package/dist/cjs/kol-table.cjs.entry.js +1 -1
  123. package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
  124. package/dist/cjs/kol-tabs.cjs.entry.js.map +1 -1
  125. package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
  126. package/dist/cjs/kol-textarea.cjs.entry.js.map +1 -1
  127. package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
  128. package/dist/cjs/kol-toast-container.cjs.entry.js.map +1 -1
  129. package/dist/cjs/kol-toolbar.cjs.entry.js +1 -1
  130. package/dist/cjs/kol-toolbar.cjs.entry.js.map +1 -1
  131. package/dist/cjs/kol-tooltip-wc.cjs.entry.js +1 -1
  132. package/dist/cjs/kol-tree-item-wc.cjs.entry.js +1 -1
  133. package/dist/cjs/kol-tree-item.cjs.entry.js +1 -1
  134. package/dist/cjs/kol-tree-item.cjs.entry.js.map +1 -1
  135. package/dist/cjs/kol-tree-wc.cjs.entry.js +1 -1
  136. package/dist/cjs/kol-tree.cjs.entry.js +1 -1
  137. package/dist/cjs/kol-tree.cjs.entry.js.map +1 -1
  138. package/dist/cjs/kol-version.cjs.entry.js +1 -1
  139. package/dist/cjs/kol-version.cjs.entry.js.map +1 -1
  140. package/dist/cjs/kolibri.cjs.js +1 -1
  141. package/dist/cjs/loader.cjs.js +1 -1
  142. package/dist/cjs/test-component.cjs.entry.js +1 -1
  143. package/dist/components/Collapsible.js +1 -1
  144. package/dist/components/Collapsible.js.map +1 -1
  145. package/dist/components/FormFieldMsg.js +1 -1
  146. package/dist/components/FormFieldMsg.js.map +1 -1
  147. package/dist/components/Heading.js +1 -1
  148. package/dist/components/Heading.js.map +1 -1
  149. package/dist/components/Span.js +1 -1
  150. package/dist/components/Span.js.map +1 -1
  151. package/dist/components/kol-abbr.js +1 -1
  152. package/dist/components/kol-abbr.js.map +1 -1
  153. package/dist/components/kol-accordion.js +1 -1
  154. package/dist/components/kol-accordion.js.map +1 -1
  155. package/dist/components/kol-alert.js +1 -1
  156. package/dist/components/kol-alert.js.map +1 -1
  157. package/dist/components/kol-avatar.js +1 -1
  158. package/dist/components/kol-avatar.js.map +1 -1
  159. package/dist/components/kol-badge.js +1 -1
  160. package/dist/components/kol-badge.js.map +1 -1
  161. package/dist/components/kol-breadcrumb.js +1 -1
  162. package/dist/components/kol-breadcrumb.js.map +1 -1
  163. package/dist/components/kol-button-group.js +1 -1
  164. package/dist/components/kol-button-group.js.map +1 -1
  165. package/dist/components/kol-button-link.js +1 -1
  166. package/dist/components/kol-button-link.js.map +1 -1
  167. package/dist/components/kol-button.js +1 -1
  168. package/dist/components/kol-button.js.map +1 -1
  169. package/dist/components/kol-card.js +1 -1
  170. package/dist/components/kol-card.js.map +1 -1
  171. package/dist/components/kol-combobox.js +1 -1
  172. package/dist/components/kol-combobox.js.map +1 -1
  173. package/dist/components/kol-details.js +1 -1
  174. package/dist/components/kol-details.js.map +1 -1
  175. package/dist/components/kol-drawer.js +1 -1
  176. package/dist/components/kol-drawer.js.map +1 -1
  177. package/dist/components/kol-form.js +1 -1
  178. package/dist/components/kol-form.js.map +1 -1
  179. package/dist/components/kol-heading.js +1 -1
  180. package/dist/components/kol-heading.js.map +1 -1
  181. package/dist/components/kol-icon.js +1 -1
  182. package/dist/components/kol-image.js +1 -1
  183. package/dist/components/kol-image.js.map +1 -1
  184. package/dist/components/kol-indented-text-wc.js +1 -1
  185. package/dist/components/kol-indented-text.js +1 -1
  186. package/dist/components/kol-indented-text.js.map +1 -1
  187. package/dist/components/kol-input-checkbox.js +1 -1
  188. package/dist/components/kol-input-checkbox.js.map +1 -1
  189. package/dist/components/kol-input-color.js +1 -1
  190. package/dist/components/kol-input-color.js.map +1 -1
  191. package/dist/components/kol-input-date.js +1 -1
  192. package/dist/components/kol-input-date.js.map +1 -1
  193. package/dist/components/kol-input-email.js +1 -1
  194. package/dist/components/kol-input-email.js.map +1 -1
  195. package/dist/components/kol-input-file.js +1 -1
  196. package/dist/components/kol-input-file.js.map +1 -1
  197. package/dist/components/kol-input-number.js +1 -1
  198. package/dist/components/kol-input-number.js.map +1 -1
  199. package/dist/components/kol-input-password.js +1 -1
  200. package/dist/components/kol-input-password.js.map +1 -1
  201. package/dist/components/kol-input-radio.js +1 -1
  202. package/dist/components/kol-input-radio.js.map +1 -1
  203. package/dist/components/kol-input-range.js +1 -1
  204. package/dist/components/kol-input-range.js.map +1 -1
  205. package/dist/components/kol-input-text.js +1 -1
  206. package/dist/components/kol-input-text.js.map +1 -1
  207. package/dist/components/kol-input.js +1 -1
  208. package/dist/components/kol-kolibri.js +1 -1
  209. package/dist/components/kol-kolibri.js.map +1 -1
  210. package/dist/components/kol-link-button.js +1 -1
  211. package/dist/components/kol-link-button.js.map +1 -1
  212. package/dist/components/kol-link-group.js +1 -1
  213. package/dist/components/kol-link-group.js.map +1 -1
  214. package/dist/components/kol-link-wc.js +1 -1
  215. package/dist/components/kol-link.js +1 -1
  216. package/dist/components/kol-link.js.map +1 -1
  217. package/dist/components/kol-logo.js +1 -1
  218. package/dist/components/kol-logo.js.map +1 -1
  219. package/dist/components/kol-modal.js +1 -1
  220. package/dist/components/kol-modal.js.map +1 -1
  221. package/dist/components/kol-nav.js +1 -1
  222. package/dist/components/kol-nav.js.map +1 -1
  223. package/dist/components/kol-pagination.js +1 -1
  224. package/dist/components/kol-pagination.js.map +1 -1
  225. package/dist/components/kol-popover-wc.js +1 -1
  226. package/dist/components/kol-progress.js +1 -1
  227. package/dist/components/kol-progress.js.map +1 -1
  228. package/dist/components/kol-quote.js +1 -1
  229. package/dist/components/kol-quote.js.map +1 -1
  230. package/dist/components/kol-select.js +1 -1
  231. package/dist/components/kol-select.js.map +1 -1
  232. package/dist/components/kol-single-select.js +1 -1
  233. package/dist/components/kol-single-select.js.map +1 -1
  234. package/dist/components/kol-skip-nav.js +1 -1
  235. package/dist/components/kol-skip-nav.js.map +1 -1
  236. package/dist/components/kol-spin.js +1 -1
  237. package/dist/components/kol-spin.js.map +1 -1
  238. package/dist/components/kol-split-button.js +1 -1
  239. package/dist/components/kol-split-button.js.map +1 -1
  240. package/dist/components/kol-symbol.js +1 -1
  241. package/dist/components/kol-table-stateful.js +1 -1
  242. package/dist/components/kol-table-stateful.js.map +1 -1
  243. package/dist/components/kol-table-stateless-wc.js +1 -1
  244. package/dist/components/kol-table-stateless.js +1 -1
  245. package/dist/components/kol-table-stateless.js.map +1 -1
  246. package/dist/components/kol-table.js +1 -1
  247. package/dist/components/kol-tabs.js +1 -1
  248. package/dist/components/kol-tabs.js.map +1 -1
  249. package/dist/components/kol-textarea.js +1 -1
  250. package/dist/components/kol-textarea.js.map +1 -1
  251. package/dist/components/kol-toast-container.js +1 -1
  252. package/dist/components/kol-toast-container.js.map +1 -1
  253. package/dist/components/kol-toolbar.js +1 -1
  254. package/dist/components/kol-toolbar.js.map +1 -1
  255. package/dist/components/kol-tooltip-wc.js +1 -1
  256. package/dist/components/kol-tree-item-wc.js +1 -1
  257. package/dist/components/kol-tree-item.js +1 -1
  258. package/dist/components/kol-tree-item.js.map +1 -1
  259. package/dist/components/kol-tree-wc.js +1 -1
  260. package/dist/components/kol-tree.js +1 -1
  261. package/dist/components/kol-tree.js.map +1 -1
  262. package/dist/components/kol-version.js +1 -1
  263. package/dist/components/kol-version.js.map +1 -1
  264. package/dist/esm/{Alert-99d1ad26.js → Alert-7691addd.js} +1 -1
  265. package/dist/esm/{Alert-99d1ad26.js.map → Alert-7691addd.js.map} +1 -1
  266. package/dist/esm/Collapsible-8a747ce1.js +4 -0
  267. package/dist/esm/Collapsible-8a747ce1.js.map +1 -0
  268. package/dist/esm/FormFieldMsg-47200fd1.js +4 -0
  269. package/dist/esm/FormFieldMsg-47200fd1.js.map +1 -0
  270. package/dist/esm/Heading-459bb069.js +4 -0
  271. package/dist/esm/Heading-459bb069.js.map +1 -0
  272. package/dist/esm/InternalUnderlinedBadgeText-9ed66543.js +4 -0
  273. package/dist/esm/{InternalUnderlinedBadgeText-529a9dbb.js.map → InternalUnderlinedBadgeText-9ed66543.js.map} +1 -1
  274. package/dist/esm/{Span-facb30b0.js → Span-10295f84.js} +1 -1
  275. package/dist/esm/Span-10295f84.js.map +1 -0
  276. package/dist/esm/{app-globals-ab3a9d93.js → app-globals-8c84e8a4.js} +1 -1
  277. package/dist/esm/{app-globals-ab3a9d93.js.map → app-globals-8c84e8a4.js.map} +1 -1
  278. package/dist/esm/{dev.utils-4087c69c.js → dev.utils-945026e6.js} +1 -1
  279. package/dist/esm/{dev.utils-4087c69c.js.map → dev.utils-945026e6.js.map} +1 -1
  280. package/dist/esm/{devtools-23952fae.js → devtools-6829b25d.js} +1 -1
  281. package/dist/esm/{devtools-23952fae.js.map → devtools-6829b25d.js.map} +1 -1
  282. package/dist/esm/{index-ed42fc56.js → index-336d0fea.js} +1 -1
  283. package/dist/esm/{index-ed42fc56.js.map → index-336d0fea.js.map} +1 -1
  284. package/dist/esm/kol-abbr.entry.js +1 -1
  285. package/dist/esm/kol-abbr.entry.js.map +1 -1
  286. package/dist/esm/kol-accordion.entry.js +1 -1
  287. package/dist/esm/kol-accordion.entry.js.map +1 -1
  288. package/dist/esm/kol-alert-wc.entry.js +1 -1
  289. package/dist/esm/kol-alert.entry.js +1 -1
  290. package/dist/esm/kol-alert.entry.js.map +1 -1
  291. package/dist/esm/kol-avatar-wc.entry.js +1 -1
  292. package/dist/esm/kol-avatar.entry.js +1 -1
  293. package/dist/esm/kol-avatar.entry.js.map +1 -1
  294. package/dist/esm/kol-badge.entry.js +1 -1
  295. package/dist/esm/kol-badge.entry.js.map +1 -1
  296. package/dist/esm/kol-breadcrumb.entry.js +1 -1
  297. package/dist/esm/kol-breadcrumb.entry.js.map +1 -1
  298. package/dist/esm/kol-button-group-wc.entry.js +1 -1
  299. package/dist/esm/kol-button-group.entry.js +1 -1
  300. package/dist/esm/kol-button-group.entry.js.map +1 -1
  301. package/dist/esm/kol-button-link.entry.js +1 -1
  302. package/dist/esm/kol-button-link.entry.js.map +1 -1
  303. package/dist/esm/kol-button-wc.entry.js +1 -1
  304. package/dist/esm/kol-button.entry.js +1 -1
  305. package/dist/esm/kol-button.entry.js.map +1 -1
  306. package/dist/esm/kol-card.entry.js +1 -1
  307. package/dist/esm/kol-card.entry.js.map +1 -1
  308. package/dist/esm/kol-combobox.entry.js +1 -1
  309. package/dist/esm/kol-combobox.entry.js.map +1 -1
  310. package/dist/esm/kol-details.entry.js +1 -1
  311. package/dist/esm/kol-details.entry.js.map +1 -1
  312. package/dist/esm/kol-drawer.entry.js +1 -1
  313. package/dist/esm/kol-drawer.entry.js.map +1 -1
  314. package/dist/esm/kol-form.entry.js +1 -1
  315. package/dist/esm/kol-form.entry.js.map +1 -1
  316. package/dist/esm/kol-heading.entry.js +1 -1
  317. package/dist/esm/kol-heading.entry.js.map +1 -1
  318. package/dist/esm/kol-icon.entry.js +1 -1
  319. package/dist/esm/kol-image.entry.js +1 -1
  320. package/dist/esm/kol-image.entry.js.map +1 -1
  321. package/dist/esm/kol-indented-text-wc.entry.js +1 -1
  322. package/dist/esm/kol-indented-text.entry.js +1 -1
  323. package/dist/esm/kol-indented-text.entry.js.map +1 -1
  324. package/dist/esm/kol-input-checkbox.entry.js +1 -1
  325. package/dist/esm/kol-input-checkbox.entry.js.map +1 -1
  326. package/dist/esm/kol-input-color.entry.js +1 -1
  327. package/dist/esm/kol-input-color.entry.js.map +1 -1
  328. package/dist/esm/kol-input-date.entry.js +1 -1
  329. package/dist/esm/kol-input-date.entry.js.map +1 -1
  330. package/dist/esm/kol-input-email.entry.js +1 -1
  331. package/dist/esm/kol-input-email.entry.js.map +1 -1
  332. package/dist/esm/kol-input-file.entry.js +1 -1
  333. package/dist/esm/kol-input-file.entry.js.map +1 -1
  334. package/dist/esm/kol-input-number.entry.js +1 -1
  335. package/dist/esm/kol-input-number.entry.js.map +1 -1
  336. package/dist/esm/kol-input-password.entry.js +1 -1
  337. package/dist/esm/kol-input-password.entry.js.map +1 -1
  338. package/dist/esm/kol-input-radio.entry.js +1 -1
  339. package/dist/esm/kol-input-radio.entry.js.map +1 -1
  340. package/dist/esm/kol-input-range.entry.js +1 -1
  341. package/dist/esm/kol-input-range.entry.js.map +1 -1
  342. package/dist/esm/kol-input-text.entry.js +1 -1
  343. package/dist/esm/kol-input-text.entry.js.map +1 -1
  344. package/dist/esm/kol-input.entry.js +1 -1
  345. package/dist/esm/kol-kolibri.entry.js +1 -1
  346. package/dist/esm/kol-kolibri.entry.js.map +1 -1
  347. package/dist/esm/kol-link-button.entry.js +1 -1
  348. package/dist/esm/kol-link-button.entry.js.map +1 -1
  349. package/dist/esm/kol-link-group.entry.js +1 -1
  350. package/dist/esm/kol-link-group.entry.js.map +1 -1
  351. package/dist/esm/kol-link-wc.entry.js +1 -1
  352. package/dist/esm/kol-link.entry.js +1 -1
  353. package/dist/esm/kol-link.entry.js.map +1 -1
  354. package/dist/esm/kol-logo.entry.js +1 -1
  355. package/dist/esm/kol-logo.entry.js.map +1 -1
  356. package/dist/esm/kol-modal.entry.js +1 -1
  357. package/dist/esm/kol-modal.entry.js.map +1 -1
  358. package/dist/esm/kol-nav.entry.js +1 -1
  359. package/dist/esm/kol-nav.entry.js.map +1 -1
  360. package/dist/esm/kol-pagination.entry.js +1 -1
  361. package/dist/esm/kol-pagination.entry.js.map +1 -1
  362. package/dist/esm/kol-popover-wc.entry.js +1 -1
  363. package/dist/esm/kol-progress.entry.js +1 -1
  364. package/dist/esm/kol-progress.entry.js.map +1 -1
  365. package/dist/esm/kol-quote.entry.js +1 -1
  366. package/dist/esm/kol-quote.entry.js.map +1 -1
  367. package/dist/esm/kol-select.entry.js +1 -1
  368. package/dist/esm/kol-select.entry.js.map +1 -1
  369. package/dist/esm/kol-single-select.entry.js +1 -1
  370. package/dist/esm/kol-single-select.entry.js.map +1 -1
  371. package/dist/esm/kol-skip-nav.entry.js +1 -1
  372. package/dist/esm/kol-skip-nav.entry.js.map +1 -1
  373. package/dist/esm/kol-spin.entry.js +1 -1
  374. package/dist/esm/kol-spin.entry.js.map +1 -1
  375. package/dist/esm/kol-split-button.entry.js +1 -1
  376. package/dist/esm/kol-split-button.entry.js.map +1 -1
  377. package/dist/esm/kol-symbol.entry.js +1 -1
  378. package/dist/esm/kol-table-stateful.entry.js +1 -1
  379. package/dist/esm/kol-table-stateful.entry.js.map +1 -1
  380. package/dist/esm/kol-table-stateless-wc.entry.js +1 -1
  381. package/dist/esm/kol-table-stateless.entry.js +1 -1
  382. package/dist/esm/kol-table-stateless.entry.js.map +1 -1
  383. package/dist/esm/kol-table.entry.js +1 -1
  384. package/dist/esm/kol-tabs.entry.js +1 -1
  385. package/dist/esm/kol-tabs.entry.js.map +1 -1
  386. package/dist/esm/kol-textarea.entry.js +1 -1
  387. package/dist/esm/kol-textarea.entry.js.map +1 -1
  388. package/dist/esm/kol-toast-container.entry.js +1 -1
  389. package/dist/esm/kol-toast-container.entry.js.map +1 -1
  390. package/dist/esm/kol-toolbar.entry.js +1 -1
  391. package/dist/esm/kol-toolbar.entry.js.map +1 -1
  392. package/dist/esm/kol-tooltip-wc.entry.js +1 -1
  393. package/dist/esm/kol-tree-item-wc.entry.js +1 -1
  394. package/dist/esm/kol-tree-item.entry.js +1 -1
  395. package/dist/esm/kol-tree-item.entry.js.map +1 -1
  396. package/dist/esm/kol-tree-wc.entry.js +1 -1
  397. package/dist/esm/kol-tree.entry.js +1 -1
  398. package/dist/esm/kol-tree.entry.js.map +1 -1
  399. package/dist/esm/kol-version.entry.js +1 -1
  400. package/dist/esm/kol-version.entry.js.map +1 -1
  401. package/dist/esm/kolibri.js +1 -1
  402. package/dist/esm/loader.js +1 -1
  403. package/dist/esm/test-component.entry.js +1 -1
  404. package/dist/kolibri/{Alert-99d1ad26.js → Alert-7691addd.js} +1 -1
  405. package/dist/kolibri/Collapsible-8a747ce1.js +4 -0
  406. package/dist/kolibri/Collapsible-8a747ce1.js.map +1 -0
  407. package/dist/kolibri/FormFieldMsg-47200fd1.js +4 -0
  408. package/dist/kolibri/FormFieldMsg-47200fd1.js.map +1 -0
  409. package/dist/kolibri/Heading-459bb069.js +4 -0
  410. package/dist/kolibri/Heading-459bb069.js.map +1 -0
  411. package/dist/kolibri/{InternalUnderlinedBadgeText-529a9dbb.js → InternalUnderlinedBadgeText-9ed66543.js} +1 -1
  412. package/dist/kolibri/{Span-facb30b0.js → Span-10295f84.js} +1 -1
  413. package/dist/kolibri/{Span-facb30b0.js.map → Span-10295f84.js.map} +1 -1
  414. package/dist/kolibri/{app-globals-ab3a9d93.js → app-globals-8c84e8a4.js} +1 -1
  415. package/dist/kolibri/{dev.utils-4087c69c.js → dev.utils-945026e6.js} +1 -1
  416. package/dist/kolibri/devtools-6829b25d.js +4 -0
  417. package/dist/kolibri/{devtools-23952fae.js.map → devtools-6829b25d.js.map} +1 -1
  418. package/dist/kolibri/{index-ed42fc56.js → index-336d0fea.js} +1 -1
  419. package/dist/kolibri/{index-ed42fc56.js.map → index-336d0fea.js.map} +1 -1
  420. package/dist/kolibri/kol-abbr.entry.js +1 -1
  421. package/dist/kolibri/kol-abbr.entry.js.map +1 -1
  422. package/dist/kolibri/kol-accordion.entry.js +1 -1
  423. package/dist/kolibri/kol-accordion.entry.js.map +1 -1
  424. package/dist/kolibri/kol-alert-wc.entry.js +1 -1
  425. package/dist/kolibri/kol-alert.entry.js +1 -1
  426. package/dist/kolibri/kol-alert.entry.js.map +1 -1
  427. package/dist/kolibri/kol-avatar-wc.entry.js +1 -1
  428. package/dist/kolibri/kol-avatar.entry.js +1 -1
  429. package/dist/kolibri/kol-avatar.entry.js.map +1 -1
  430. package/dist/kolibri/kol-badge.entry.js +1 -1
  431. package/dist/kolibri/kol-badge.entry.js.map +1 -1
  432. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  433. package/dist/kolibri/kol-breadcrumb.entry.js.map +1 -1
  434. package/dist/kolibri/kol-button-group-wc.entry.js +1 -1
  435. package/dist/kolibri/kol-button-group.entry.js +1 -1
  436. package/dist/kolibri/kol-button-group.entry.js.map +1 -1
  437. package/dist/kolibri/kol-button-link.entry.js +1 -1
  438. package/dist/kolibri/kol-button-link.entry.js.map +1 -1
  439. package/dist/kolibri/kol-button-wc.entry.js +1 -1
  440. package/dist/kolibri/kol-button.entry.js +1 -1
  441. package/dist/kolibri/kol-button.entry.js.map +1 -1
  442. package/dist/kolibri/kol-card.entry.js +1 -1
  443. package/dist/kolibri/kol-card.entry.js.map +1 -1
  444. package/dist/kolibri/kol-combobox.entry.js +1 -1
  445. package/dist/kolibri/kol-combobox.entry.js.map +1 -1
  446. package/dist/kolibri/kol-details.entry.js +1 -1
  447. package/dist/kolibri/kol-details.entry.js.map +1 -1
  448. package/dist/kolibri/kol-drawer.entry.js +1 -1
  449. package/dist/kolibri/kol-drawer.entry.js.map +1 -1
  450. package/dist/kolibri/kol-form.entry.js +1 -1
  451. package/dist/kolibri/kol-form.entry.js.map +1 -1
  452. package/dist/kolibri/kol-heading.entry.js +1 -1
  453. package/dist/kolibri/kol-heading.entry.js.map +1 -1
  454. package/dist/kolibri/kol-icon.entry.js +1 -1
  455. package/dist/kolibri/kol-image.entry.js +1 -1
  456. package/dist/kolibri/kol-image.entry.js.map +1 -1
  457. package/dist/kolibri/kol-indented-text-wc.entry.js +1 -1
  458. package/dist/kolibri/kol-indented-text.entry.js +1 -1
  459. package/dist/kolibri/kol-indented-text.entry.js.map +1 -1
  460. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  461. package/dist/kolibri/kol-input-checkbox.entry.js.map +1 -1
  462. package/dist/kolibri/kol-input-color.entry.js +1 -1
  463. package/dist/kolibri/kol-input-color.entry.js.map +1 -1
  464. package/dist/kolibri/kol-input-date.entry.js +1 -1
  465. package/dist/kolibri/kol-input-date.entry.js.map +1 -1
  466. package/dist/kolibri/kol-input-email.entry.js +1 -1
  467. package/dist/kolibri/kol-input-email.entry.js.map +1 -1
  468. package/dist/kolibri/kol-input-file.entry.js +1 -1
  469. package/dist/kolibri/kol-input-file.entry.js.map +1 -1
  470. package/dist/kolibri/kol-input-number.entry.js +1 -1
  471. package/dist/kolibri/kol-input-number.entry.js.map +1 -1
  472. package/dist/kolibri/kol-input-password.entry.js +1 -1
  473. package/dist/kolibri/kol-input-password.entry.js.map +1 -1
  474. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  475. package/dist/kolibri/kol-input-radio.entry.js.map +1 -1
  476. package/dist/kolibri/kol-input-range.entry.js +1 -1
  477. package/dist/kolibri/kol-input-range.entry.js.map +1 -1
  478. package/dist/kolibri/kol-input-text.entry.js +1 -1
  479. package/dist/kolibri/kol-input-text.entry.js.map +1 -1
  480. package/dist/kolibri/kol-input.entry.js +1 -1
  481. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  482. package/dist/kolibri/kol-kolibri.entry.js.map +1 -1
  483. package/dist/kolibri/kol-link-button.entry.js +1 -1
  484. package/dist/kolibri/kol-link-button.entry.js.map +1 -1
  485. package/dist/kolibri/kol-link-group.entry.js +1 -1
  486. package/dist/kolibri/kol-link-group.entry.js.map +1 -1
  487. package/dist/kolibri/kol-link-wc.entry.js +1 -1
  488. package/dist/kolibri/kol-link-wc.entry.js.map +1 -1
  489. package/dist/kolibri/kol-link.entry.js +1 -1
  490. package/dist/kolibri/kol-link.entry.js.map +1 -1
  491. package/dist/kolibri/kol-logo.entry.js +1 -1
  492. package/dist/kolibri/kol-logo.entry.js.map +1 -1
  493. package/dist/kolibri/kol-modal.entry.js +1 -1
  494. package/dist/kolibri/kol-modal.entry.js.map +1 -1
  495. package/dist/kolibri/kol-nav.entry.js +1 -1
  496. package/dist/kolibri/kol-nav.entry.js.map +1 -1
  497. package/dist/kolibri/kol-pagination.entry.js +1 -1
  498. package/dist/kolibri/kol-pagination.entry.js.map +1 -1
  499. package/dist/kolibri/kol-popover-wc.entry.js +1 -1
  500. package/dist/kolibri/kol-progress.entry.js +1 -1
  501. package/dist/kolibri/kol-progress.entry.js.map +1 -1
  502. package/dist/kolibri/kol-quote.entry.js +1 -1
  503. package/dist/kolibri/kol-quote.entry.js.map +1 -1
  504. package/dist/kolibri/kol-select.entry.js +1 -1
  505. package/dist/kolibri/kol-select.entry.js.map +1 -1
  506. package/dist/kolibri/kol-single-select.entry.js +1 -1
  507. package/dist/kolibri/kol-single-select.entry.js.map +1 -1
  508. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  509. package/dist/kolibri/kol-skip-nav.entry.js.map +1 -1
  510. package/dist/kolibri/kol-spin.entry.js +1 -1
  511. package/dist/kolibri/kol-spin.entry.js.map +1 -1
  512. package/dist/kolibri/kol-split-button.entry.js +1 -1
  513. package/dist/kolibri/kol-split-button.entry.js.map +1 -1
  514. package/dist/kolibri/kol-symbol.entry.js +1 -1
  515. package/dist/kolibri/kol-table-stateful.entry.js +1 -1
  516. package/dist/kolibri/kol-table-stateful.entry.js.map +1 -1
  517. package/dist/kolibri/kol-table-stateless-wc.entry.js +1 -1
  518. package/dist/kolibri/kol-table-stateless.entry.js +1 -1
  519. package/dist/kolibri/kol-table-stateless.entry.js.map +1 -1
  520. package/dist/kolibri/kol-table.entry.js +1 -1
  521. package/dist/kolibri/kol-tabs.entry.js +1 -1
  522. package/dist/kolibri/kol-tabs.entry.js.map +1 -1
  523. package/dist/kolibri/kol-textarea.entry.js +1 -1
  524. package/dist/kolibri/kol-textarea.entry.js.map +1 -1
  525. package/dist/kolibri/kol-toast-container.entry.js +1 -1
  526. package/dist/kolibri/kol-toast-container.entry.js.map +1 -1
  527. package/dist/kolibri/kol-toolbar.entry.js +1 -1
  528. package/dist/kolibri/kol-toolbar.entry.js.map +1 -1
  529. package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
  530. package/dist/kolibri/kol-tree-item-wc.entry.js +1 -1
  531. package/dist/kolibri/kol-tree-item.entry.js +1 -1
  532. package/dist/kolibri/kol-tree-item.entry.js.map +1 -1
  533. package/dist/kolibri/kol-tree-wc.entry.js +1 -1
  534. package/dist/kolibri/kol-tree.entry.js +1 -1
  535. package/dist/kolibri/kol-tree.entry.js.map +1 -1
  536. package/dist/kolibri/kol-version.entry.js +1 -1
  537. package/dist/kolibri/kol-version.entry.js.map +1 -1
  538. package/dist/kolibri/kolibri.esm.js +1 -1
  539. package/dist/kolibri/test-component.entry.js +1 -1
  540. package/package.json +1 -1
  541. package/dist/cjs/Collapsible-fbb78a82.js +0 -4
  542. package/dist/cjs/Collapsible-fbb78a82.js.map +0 -1
  543. package/dist/cjs/FormFieldMsg-cdfee048.js +0 -4
  544. package/dist/cjs/FormFieldMsg-cdfee048.js.map +0 -1
  545. package/dist/cjs/Heading-f551ed31.js +0 -4
  546. package/dist/cjs/Heading-f551ed31.js.map +0 -1
  547. package/dist/cjs/Span-9d8e4664.js.map +0 -1
  548. package/dist/esm/Collapsible-de47cd81.js +0 -4
  549. package/dist/esm/Collapsible-de47cd81.js.map +0 -1
  550. package/dist/esm/FormFieldMsg-b9819240.js +0 -4
  551. package/dist/esm/FormFieldMsg-b9819240.js.map +0 -1
  552. package/dist/esm/Heading-fac772d4.js +0 -4
  553. package/dist/esm/Heading-fac772d4.js.map +0 -1
  554. package/dist/esm/InternalUnderlinedBadgeText-529a9dbb.js +0 -4
  555. package/dist/esm/Span-facb30b0.js.map +0 -1
  556. package/dist/kolibri/Collapsible-de47cd81.js +0 -4
  557. package/dist/kolibri/Collapsible-de47cd81.js.map +0 -1
  558. package/dist/kolibri/FormFieldMsg-b9819240.js +0 -4
  559. package/dist/kolibri/FormFieldMsg-b9819240.js.map +0 -1
  560. package/dist/kolibri/Heading-fac772d4.js +0 -4
  561. package/dist/kolibri/Heading-fac772d4.js.map +0 -1
  562. package/dist/kolibri/devtools-23952fae.js +0 -4
  563. /package/dist/kolibri/{Alert-99d1ad26.js.map → Alert-7691addd.js.map} +0 -0
  564. /package/dist/kolibri/{InternalUnderlinedBadgeText-529a9dbb.js.map → InternalUnderlinedBadgeText-9ed66543.js.map} +0 -0
  565. /package/dist/kolibri/{app-globals-ab3a9d93.js.map → app-globals-8c84e8a4.js.map} +0 -0
  566. /package/dist/kolibri/{dev.utils-4087c69c.js.map → dev.utils-945026e6.js.map} +0 -0
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{t as translate}from"./i18n2.js";import{p as KolPaginationTag,q as KolTableStatelessWcTag}from"./component-names.js";import{t as tryToDispatchKoliBriEvent}from"./events.js";import{v as validateTableData,a as validateTableDataFoot,b as validateTableSelection,c as validateTableStatefulCallbacks,E as Events}from"./events2.js";import{w as watchValidator,s as setState,z as emptyStringByArrayHandler,e as watchString,p as parseJson,o as objectObjectHandler,q as devHint}from"./prop.validators.js";import{v as validateLabel}from"./label.js";const paginationPositionPropTypeOptions=["top","bottom","both"],validatePaginationPosition=(t,e)=>{watchValidator(t,"_paginationPosition",(t=>"string"==typeof t&&paginationPositionPropTypeOptions.includes(t)),new Set([`PaginationPositionPropType {${paginationPositionPropTypeOptions.join(", ")}`]),e,{defaultValue:"bottom"})},defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\n/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip-wc {\n display: contents;\n }\n .kol-tooltip-wc .tooltip-floating {\n animation-duration: 0.5s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n box-sizing: border-box;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n /* Shared between content and arrow */\n .kol-tooltip-wc .tooltip-area {\n background-color: #fff;\n color: #000;\n }\n .kol-tooltip-wc .tooltip-arrow {\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip-wc .tooltip-content {\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n :root {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n div.pagination .kol-pagination {\n display: flex;\n flex-wrap: wrap;\n }\n div.pagination,\n div.pagination > div:last-child {\n display: grid;\n place-items: center;\n }\n @media (max-width: 1024px) {\n div.pagination .kol-pagination {\n flex-direction: column;\n }\n }\n @media (min-width: 1024px) {\n div.pagination,\n div.pagination > div:last-child {\n grid-auto-flow: column;\n }\n div.pagination .kol-pagination {\n display: flex;\n }\n }\n}\n@layer kol-component {\n :host,\n .kol-table-stateless-wc {\n display: block;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .table {\n max-width: 100%;\n overflow-x: auto;\n overflow-y: hidden;\n }\n table {\n width: 100%;\n }\n caption {\n text-align: start;\n }\n .focus-element {\n font-size: 0;\n }\n .focus-element:focus {\n outline: 0 !important;\n }\n .table:has(.focus-element:focus) {\n /* @see https://remysharp.com/til/css/focus-ring-default-styles */\n outline: calc(5rem / var(--kolibri-root-font-size, 16)) auto Highlight;\n outline: calc(5rem / var(--kolibri-root-font-size, 16)) auto -webkit-focus-ring-color;\n outline-offset: calc(2rem / var(--kolibri-root-font-size, 16));\n }\n .table-sort-button .kol-button {\n color: inherit;\n }\n tbody th,\n th.align-left {\n text-align: left;\n }\n tbody th .table-sort-button .kol-button__text,\n th.align-left .table-sort-button .kol-button__text {\n justify-items: start;\n }\n th.align-center {\n text-align: center;\n }\n th.align-center .table-sort-button .kol-button__text {\n justify-items: center;\n }\n th.align-right {\n text-align: right;\n }\n th.align-right .table-sort-button .kol-button__text {\n justify-items: end;\n }\n tr.foot-spacer,\n tr.head-spacer {\n display: none;\n }\n .selection-header-cell {\n width: 0;\n }\n .selection-cell {\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n white-space: nowrap;\n }\n .input label {\n align-items: center;\n cursor: pointer;\n display: flex;\n height: var(--a11y-min-size);\n justify-content: center;\n position: relative;\n width: var(--a11y-min-size);\n }\n .input .icon {\n display: block;\n inset: auto;\n position: absolute;\n z-index: 1;\n }\n .input input {\n appearance: none;\n border-style: solid;\n cursor: pointer;\n margin: 0;\n }\n .input input:before {\n content: \"\";\n }\n .input input[type=checkbox] {\n position: relative;\n display: flex;\n height: calc(var(--a11y-min-size) / 2);\n width: calc(var(--a11y-min-size) / 2);\n align-items: center;\n justify-content: center;\n background-color: rgb(255, 255, 255);\n border-width: calc(2rem / var(--kolibri-root-font-size, 16));\n line-height: 1.5;\n transition: all 0.5s ease 0s;\n }\n .input input[type=radio] {\n display: flex;\n border-width: calc(2rem / var(--kolibri-root-font-size, 16));\n border-radius: 100%;\n height: 1.5em;\n min-height: 1.5em;\n min-width: 1.5em;\n padding: 0;\n width: 1.5em;\n }\n .input input[type=radio]:before {\n border-radius: 100%;\n margin: auto;\n height: 0.75em;\n width: 0.75em;\n }\n .input input[type=radio]:checked:before {\n background-color: #000;\n }\n @media (forced-colors: active) {\n .input input[type=radio]:checked:before {\n /* Give it a visible background in forced colors mode */\n background-color: selectedItem !important;\n }\n }\n}",KolTableStatefulDefaultStyle0=defaultStyleCss,PAGINATION_OPTIONS=[10,20,50,100],paginationValidator=t=>!0===t||""===t||"object"==typeof t&&null!==t,KolTableStateful$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.catchRef=t=>{this.tableWcRef=t},this.sortDirections=new Map,this.sortData=[],this.showPagination=!1,this.pageStartSlice=0,this.pageEndSlice=10,this.disableSort=!1,this.sortedColumnHead={label:"",key:"",sortDirection:"NOS"},this.setSortDirection=(t,e)=>{this.sortDirections.clear(),this.sortDirections.set(t,e),this.sortFunction=t},this.handlePagination={onClick:(t,e)=>{var n;"function"==typeof(null===(n=this.state._pagination._on)||void 0===n?void 0:n.onClick)&&this.state._pagination._on.onClick(t,e),setState(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:e}))},onChangePage:(t,e)=>{var n;"function"==typeof(null===(n=this.state._pagination._on)||void 0===n?void 0:n.onChangePage)&&this.state._pagination._on.onChangePage(t,e),setState(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:e}))},onChangePageSize:(t,e)=>{var n;"function"==typeof(null===(n=this.state._pagination._on)||void 0===n?void 0:n.onChangePageSize)&&this.state._pagination._on.onChangePageSize(t,e),setState(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_pageSize:e})),setState(this,"_pageSize",e)}},this.onSelectionChange=t=>{t.stopPropagation()},this.updateSortedData=(t=this.sortedColumnHead)=>{if(this.disableSort)return void setState(this,"_sortedData",this.state._data);let e=this.state._data;if(this.sortData.length>0)e=this.state._data.sort(((t,e)=>{for(let n=0;n<this.sortData.length;n++){const i=this.sortData[n],a=i.compareFn(t,e);if(0!==a)return"ASC"===i.direction?a:-a}return 0}));else if("function"==typeof this.sortFunction)switch(this.sortDirections.get(this.sortFunction)){case"ASC":e=this.sortFunction([...this.state._data]),this.sortedColumnHead={label:t.label,key:t.key,sortDirection:"ASC"};break;case"DESC":e=this.sortFunction([...this.state._data]).reverse(),this.sortedColumnHead={label:t.label,key:t.key,sortDirection:"DESC"};break;default:e=[...this.state._data],this.sortedColumnHead={label:"",key:"",sortDirection:"NOS"}}setState(this,"_sortedData",e)},this._allowMultiSort=void 0,this._data=void 0,this._dataFoot=void 0,this._headers=void 0,this._label=void 0,this._minWidth=void 0,this._pagination=void 0,this._paginationPosition="bottom",this._selection=void 0,this._on=void 0,this.state={_allowMultiSort:!1,_data:[],_dataFoot:[],_headers:{horizontal:[],vertical:[]},_label:"",_pagination:{_page:1,_pageSize:10,_max:0},_sortedData:[],_paginationPosition:"bottom"}}validateAllowMultiSort(t){watchValidator(this,"_allowMultiSort",(()=>!0),new Set(["boolean"]),t,{defaultValue:!1})}validateData(t){validateTableData(this,t,{afterPatch:()=>{setTimeout(this.updateSortedData)}})}validateDataFoot(t){validateTableDataFoot(this,t,{afterPatch:()=>{setTimeout(this.updateSortedData)}})}validatePaginationPosition(t){validatePaginationPosition(this,t)}changeCellSort(t){var e;if("function"==typeof t.compareFn){this.state._allowMultiSort||t.key==(null===(e=this.sortData[0])||void 0===e?void 0:e.key)||(this.sortData=[]);const n=this.sortData.findIndex((e=>e.key===t.key));if(n>=0){const t=this.sortData[n];switch(t.direction){case"ASC":t.direction="DESC";break;case"DESC":this.sortData.splice(n,1);break;default:t.direction="ASC"}}else t.key&&this.sortData.push({label:t.label,key:t.key,compareFn:t.compareFn,direction:"ASC"});this.updateSortedData(t)}else if("function"==typeof t.sort){switch(this.sortFunction=t.sort,this.sortDirections.get(this.sortFunction)){case"ASC":this.setSortDirection(this.sortFunction,"DESC");break;case"DESC":this.setSortDirection(this.sortFunction,"NOS");break;default:this.setSortDirection(this.sortFunction,"ASC")}this.updateSortedData(t)}}validateHeaders(t){emptyStringByArrayHandler(t,(()=>{objectObjectHandler(t,(()=>{try{t=parseJson(t)}catch(t){}watchValidator(this,"_headers",(t=>"object"==typeof t&&null!==t),new Set(["KoliBriTableHeaders"]),t,{hooks:{beforePatch:t=>{var e,n,i,a;const o=t=>{let e=!1;t.forEach((t=>{const n=t.key;if(!n)return;const i=t.sortDirection;"ASC"!==i&&"DESC"!==i||("function"==typeof t.compareFn?((this.state._allowMultiSort||0===this.sortData.length)&&this.sortData.push({label:t.label,key:n,compareFn:t.compareFn,direction:i}),e=!0):"function"==typeof t.sort&&(this.setSortDirection(t.sort,i),setTimeout((()=>this.updateSortedData({key:n,label:t.label,sortDirection:i})))))})),e&&setTimeout((()=>this.updateSortedData()))},s=t;null===(e=s.horizontal)||void 0===e||e.forEach(o),null===(n=s.vertical)||void 0===n||n.forEach(o),s.horizontal&&s.vertical&&(null===(i=s.horizontal)||void 0===i?void 0:i.length)>0&&(null===(a=s.vertical)||void 0===a?void 0:a.length)>0&&(this.disableSort=!0,devHint("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)"))}}})}))}))}validateLabel(t){validateLabel(this,t,{required:!0})}validateMinWidth(t){watchString(this,"_minWidth",t,{defaultValue:void 0})}validateSelection(t){validateTableSelection(this,t)}validateOn(t){validateTableStatefulCallbacks(this,t)}validatePagination(t){try{t=parseJson(t)}catch(t){}this.showPagination=paginationValidator(t),watchValidator(this,"_pagination",paginationValidator,new Set(["boolean","KoliBriTablePagination"]),t,{defaultValue:{_page:1,_pageSize:10,_max:0}})}componentDidLoad(){var t;null===(t=this.tableWcRef)||void 0===t||t.addEventListener("kol-selection-change",this.onSelectionChange)}disconnectedCallback(){var t;null===(t=this.tableWcRef)||void 0===t||t.removeEventListener("kol-selection-change",this.onSelectionChange)}componentWillLoad(){this.validateAllowMultiSort(this._allowMultiSort),this.validateData(this._data),this.validateDataFoot(this._dataFoot),this.validateHeaders(this._headers),this.validateLabel(this._label),this.validateMinWidth(this._minWidth),this.validatePagination(this._pagination),this.validatePaginationPosition(this._paginationPosition),this.validateSelection(this._selection),this.validateOn(this._on)}selectDisplayedData(t,e,n){return"number"==typeof e&&e>0&&"number"==typeof n&&n>0?(this.pageStartSlice=e*(n-1),this.pageEndSlice=e*n>t.length?t.length:e*n,t.slice(this.pageStartSlice,this.pageEndSlice)):(this.pageStartSlice=0,this.pageEndSlice=t.length,t)}renderPagination(){return h("div",{class:"pagination"},h("span",null,translate("kol-table-visible-range",{placeholders:{start:this.pageEndSlice>0?(this.pageStartSlice+1).toString():"0",end:this.pageEndSlice.toString(),total:this.state._pagination&&this.state._pagination._max>0?this.state._pagination._max.toString():Array.isArray(this.state._data)?this.state._data.length.toString():"0"}})),h("div",null,h(KolPaginationTag,{_boundaryCount:this.state._pagination._boundaryCount,_customClass:this.state._pagination._customClass,_on:this.handlePagination,_page:this.state._pagination._page,_pageSize:this.state._pagination._pageSize,_pageSizeOptions:this.state._pagination._pageSizeOptions||PAGINATION_OPTIONS,_siblingCount:this.state._pagination._siblingCount,_tooltipAlign:"bottom",_max:this.state._pagination._max||this.state._pagination._max||this.state._data.length,_label:translate("kol-table-pagination-label",{placeholders:{label:this.state._label}})})))}getHeaderCellSortState(t){if(!this.disableSort&&("function"==typeof t.compareFn||"function"==typeof t.sort)){if(t.key===this.sortedColumnHead.key)return this.sortedColumnHead.sortDirection;if(t.key){const e=this.sortData.find((e=>e.key===t.key));if(null==e?void 0:e.direction)return e.direction}return"NOS"}}handleSort({key:t}){const e=[...(this.state._headers.horizontal||[]).flat(),...(this.state._headers.vertical||[]).flat()].find((e=>e.key===t));e&&this.changeCellSort(e)}getSelectedData(t){var e;const n=this.state._selection;if(n){const i=null!==(e=n.keyPropertyName)&&void 0!==e?e:"id",a=this.state._sortedData.filter((e=>t.includes(e[i])));if(!1===(null==n?void 0:n.multiple))return a[0];if(i)return a}return null}handleSelectionChange(t,e){var n;const i=this.state._selection;i&&(this.state=Object.assign(Object.assign({},this.state),{_selection:Object.assign(Object.assign({},i),{selectedKeys:"object"==typeof e?e:[e]})}));const a=this.getSelectedData(e);tryToDispatchKoliBriEvent("selection-change",this.host,a),"function"==typeof(null===(n=this.state._on)||void 0===n?void 0:n[Events.onSelectionChange])&&this.state._on[Events.onSelectionChange](t,a)}async getSelection(){var t;const e=(null===(t=this.state._selection)||void 0===t?void 0:t.selectedKeys)||[];return this.getSelectedData(e)}render(){var t,e,n,i;const a=this.selectDisplayedData(this.state._sortedData,this.showPagination?null!==(e=null===(t=this.state._pagination)||void 0===t?void 0:t._pageSize)&&void 0!==e?e:10:this.state._sortedData.length,this.state._pagination._page||1),o="top"===this._paginationPosition||"both"===this._paginationPosition?this.renderPagination():null,s="bottom"===this._paginationPosition||"both"===this._paginationPosition?this.renderPagination():null,l={horizontal:null===(n=this.state._headers.horizontal)||void 0===n?void 0:n.map((t=>t.map((t=>Object.assign(Object.assign({},t),{sortDirection:this.getHeaderCellSortState(t)}))))),vertical:null===(i=this.state._headers.vertical)||void 0===i?void 0:i.map((t=>t.map((t=>Object.assign(Object.assign({},t),{sortDirection:this.getHeaderCellSortState(t)})))))};return h(Host,{key:"e898cfc70f398d71426a9ca6fff58421ac512978",class:"kol-table-stateful"},this.pageEndSlice>0&&this.showPagination&&o,h(KolTableStatelessWcTag,{key:"771fbc08b5053a9a55158aa8c3a8370934d97063",ref:this.catchRef,_data:a,_headerCells:l,_label:this.state._label,_dataFoot:this.state._dataFoot,_minWidth:this.state._minWidth,_on:{onSort:(t,e)=>{this.handleSort(e)},onSelectionChange:(t,e)=>{this.handleSelectionChange(t,e)}},_selection:this.state._selection}),this.pageEndSlice>0&&this.showPagination&&s)}get host(){return this}static get watchers(){return{_allowMultiSort:["validateAllowMultiSort"],_data:["validateData"],_dataFoot:["validateDataFoot"],_paginationPosition:["validatePaginationPosition"],_headers:["validateHeaders"],_label:["validateLabel"],_minWidth:["validateMinWidth"],_selection:["validateSelection"],_on:["validateOn"],_pagination:["validatePagination"]}}static get style(){return{default:KolTableStatefulDefaultStyle0}}},[33,"kol-table-stateful",{_allowMultiSort:[4,"_allow-multi-sort"],_data:[1],_dataFoot:[1,"_data-foot"],_headers:[1],_label:[1],_minWidth:[1,"_min-width"],_pagination:[8],_paginationPosition:[1,"_pagination-position"],_selection:[1],_on:[16],state:[32],getSelection:[64]},void 0,{_allowMultiSort:["validateAllowMultiSort"],_data:["validateData"],_dataFoot:["validateDataFoot"],_paginationPosition:["validatePaginationPosition"],_headers:["validateHeaders"],_label:["validateLabel"],_minWidth:["validateMinWidth"],_selection:["validateSelection"],_on:["validateOn"],_pagination:["validatePagination"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-table-stateful"].forEach((t=>{if("kol-table-stateful"===t)customElements.get(t)||customElements.define(t,KolTableStateful$1)}))}const KolTableStateful=KolTableStateful$1,defineCustomElement=defineCustomElement$1;export{KolTableStateful,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{t as translate}from"./i18n2.js";import{p as KolPaginationTag,q as KolTableStatelessWcTag}from"./component-names.js";import{t as tryToDispatchKoliBriEvent}from"./events.js";import{v as validateTableData,a as validateTableDataFoot,b as validateTableSelection,c as validateTableStatefulCallbacks,E as Events}from"./events2.js";import{w as watchValidator,s as setState,z as emptyStringByArrayHandler,e as watchString,p as parseJson,o as objectObjectHandler,q as devHint}from"./prop.validators.js";import{v as validateLabel}from"./label.js";const paginationPositionPropTypeOptions=["top","bottom","both"],validatePaginationPosition=(t,e)=>{watchValidator(t,"_paginationPosition",(t=>"string"==typeof t&&paginationPositionPropTypeOptions.includes(t)),new Set([`PaginationPositionPropType {${paginationPositionPropTypeOptions.join(", ")}`]),e,{defaultValue:"bottom"})},defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\n/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip-wc {\n display: contents;\n }\n .kol-tooltip-wc .tooltip-floating {\n animation-duration: 0.5s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n box-sizing: border-box;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n /* Shared between content and arrow */\n .kol-tooltip-wc .tooltip-area {\n background-color: #fff;\n color: #000;\n }\n .kol-tooltip-wc .tooltip-arrow {\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip-wc .tooltip-content {\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n :root {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n div.pagination .kol-pagination {\n display: flex;\n flex-wrap: wrap;\n }\n div.pagination,\n div.pagination > div:last-child {\n display: grid;\n place-items: center;\n }\n @media (max-width: 1024px) {\n div.pagination .kol-pagination {\n flex-direction: column;\n }\n }\n @media (min-width: 1024px) {\n div.pagination,\n div.pagination > div:last-child {\n grid-auto-flow: column;\n }\n div.pagination .kol-pagination {\n display: flex;\n }\n }\n}\n@layer kol-component {\n :host,\n .kol-table-stateless-wc {\n display: block;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .table {\n max-width: 100%;\n overflow-x: auto;\n overflow-y: hidden;\n }\n table {\n width: 100%;\n }\n caption {\n text-align: start;\n }\n .focus-element {\n font-size: 0;\n }\n .focus-element:focus {\n outline: 0 !important;\n }\n .table:has(.focus-element:focus) {\n /* @see https://remysharp.com/til/css/focus-ring-default-styles */\n outline: calc(5rem / var(--kolibri-root-font-size, 16)) auto Highlight;\n outline: calc(5rem / var(--kolibri-root-font-size, 16)) auto -webkit-focus-ring-color;\n outline-offset: calc(2rem / var(--kolibri-root-font-size, 16));\n }\n .table-sort-button .kol-button {\n color: inherit;\n }\n tbody th,\n th.align-left {\n text-align: left;\n }\n tbody th .table-sort-button .kol-button__text,\n th.align-left .table-sort-button .kol-button__text {\n justify-items: start;\n }\n th.align-center {\n text-align: center;\n }\n th.align-center .table-sort-button .kol-button__text {\n justify-items: center;\n }\n th.align-right {\n text-align: right;\n }\n th.align-right .table-sort-button .kol-button__text {\n justify-items: end;\n }\n tr.foot-spacer,\n tr.head-spacer {\n display: none;\n }\n .selection-header-cell {\n width: 0;\n }\n .selection-cell {\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n white-space: nowrap;\n }\n .input label {\n align-items: center;\n cursor: pointer;\n display: flex;\n height: var(--a11y-min-size);\n justify-content: center;\n position: relative;\n width: var(--a11y-min-size);\n }\n .input .icon {\n display: block;\n inset: auto;\n position: absolute;\n z-index: 1;\n }\n .input input {\n appearance: none;\n border-style: solid;\n cursor: pointer;\n margin: 0;\n }\n .input input:before {\n content: \"\";\n }\n .input input[type=checkbox] {\n position: relative;\n display: flex;\n height: calc(var(--a11y-min-size) / 2);\n width: calc(var(--a11y-min-size) / 2);\n align-items: center;\n justify-content: center;\n background-color: rgb(255, 255, 255);\n border-width: calc(2rem / var(--kolibri-root-font-size, 16));\n line-height: 1.5;\n transition: all 0.5s ease 0s;\n }\n .input input[type=radio] {\n display: flex;\n border-width: calc(2rem / var(--kolibri-root-font-size, 16));\n border-radius: 100%;\n height: 1.5em;\n min-height: 1.5em;\n min-width: 1.5em;\n padding: 0;\n width: 1.5em;\n }\n .input input[type=radio]:before {\n border-radius: 100%;\n margin: auto;\n height: 0.75em;\n width: 0.75em;\n }\n .input input[type=radio]:checked:before {\n background-color: #000;\n }\n @media (forced-colors: active) {\n .input input[type=radio]:checked:before {\n /* Give it a visible background in forced colors mode */\n background-color: selectedItem !important;\n }\n }\n}",KolTableStatefulDefaultStyle0=defaultStyleCss,PAGINATION_OPTIONS=[10,20,50,100],paginationValidator=t=>!0===t||""===t||"object"==typeof t&&null!==t,KolTableStateful$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.catchRef=t=>{this.tableWcRef=t},this.sortDirections=new Map,this.sortData=[],this.showPagination=!1,this.pageStartSlice=0,this.pageEndSlice=10,this.disableSort=!1,this.sortedColumnHead={label:"",key:"",sortDirection:"NOS"},this.setSortDirection=(t,e)=>{this.sortDirections.clear(),this.sortDirections.set(t,e),this.sortFunction=t},this.handlePagination={onClick:(t,e)=>{var n;"function"==typeof(null===(n=this.state._pagination._on)||void 0===n?void 0:n.onClick)&&this.state._pagination._on.onClick(t,e),setState(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:e}))},onChangePage:(t,e)=>{var n;"function"==typeof(null===(n=this.state._pagination._on)||void 0===n?void 0:n.onChangePage)&&this.state._pagination._on.onChangePage(t,e),setState(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:e}))},onChangePageSize:(t,e)=>{var n;"function"==typeof(null===(n=this.state._pagination._on)||void 0===n?void 0:n.onChangePageSize)&&this.state._pagination._on.onChangePageSize(t,e),setState(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_pageSize:e})),setState(this,"_pageSize",e)}},this.onSelectionChange=t=>{t.stopPropagation()},this.updateSortedData=(t=this.sortedColumnHead)=>{if(this.disableSort)return void setState(this,"_sortedData",this.state._data);let e=this.state._data;if(this.sortData.length>0)e=this.state._data.sort(((t,e)=>{for(let n=0;n<this.sortData.length;n++){const i=this.sortData[n],a=i.compareFn(t,e);if(0!==a)return"ASC"===i.direction?a:-a}return 0}));else if("function"==typeof this.sortFunction)switch(this.sortDirections.get(this.sortFunction)){case"ASC":e=this.sortFunction([...this.state._data]),this.sortedColumnHead={label:t.label,key:t.key,sortDirection:"ASC"};break;case"DESC":e=this.sortFunction([...this.state._data]).reverse(),this.sortedColumnHead={label:t.label,key:t.key,sortDirection:"DESC"};break;default:e=[...this.state._data],this.sortedColumnHead={label:"",key:"",sortDirection:"NOS"}}setState(this,"_sortedData",e)},this._allowMultiSort=void 0,this._data=void 0,this._dataFoot=void 0,this._headers=void 0,this._label=void 0,this._minWidth=void 0,this._pagination=void 0,this._paginationPosition="bottom",this._selection=void 0,this._on=void 0,this.state={_allowMultiSort:!1,_data:[],_dataFoot:[],_headers:{horizontal:[],vertical:[]},_label:"",_pagination:{_page:1,_pageSize:10,_max:0},_sortedData:[],_paginationPosition:"bottom"}}validateAllowMultiSort(t){watchValidator(this,"_allowMultiSort",(()=>!0),new Set(["boolean"]),t,{defaultValue:!1})}validateData(t){validateTableData(this,t,{afterPatch:()=>{setTimeout(this.updateSortedData)}})}validateDataFoot(t){validateTableDataFoot(this,t,{afterPatch:()=>{setTimeout(this.updateSortedData)}})}validatePaginationPosition(t){validatePaginationPosition(this,t)}changeCellSort(t){var e;if("function"==typeof t.compareFn){this.state._allowMultiSort||t.key==(null===(e=this.sortData[0])||void 0===e?void 0:e.key)||(this.sortData=[]);const n=this.sortData.findIndex((e=>e.key===t.key));if(n>=0){const t=this.sortData[n];switch(t.direction){case"ASC":t.direction="DESC";break;case"DESC":this.sortData.splice(n,1);break;default:t.direction="ASC"}}else t.key&&this.sortData.push({label:t.label,key:t.key,compareFn:t.compareFn,direction:"ASC"});this.updateSortedData(t)}else if("function"==typeof t.sort){switch(this.sortFunction=t.sort,this.sortDirections.get(this.sortFunction)){case"ASC":this.setSortDirection(this.sortFunction,"DESC");break;case"DESC":this.setSortDirection(this.sortFunction,"NOS");break;default:this.setSortDirection(this.sortFunction,"ASC")}this.updateSortedData(t)}}validateHeaders(t){emptyStringByArrayHandler(t,(()=>{objectObjectHandler(t,(()=>{try{t=parseJson(t)}catch(t){}watchValidator(this,"_headers",(t=>"object"==typeof t&&null!==t),new Set(["KoliBriTableHeaders"]),t,{hooks:{beforePatch:t=>{var e,n,i,a;const o=t=>{let e=!1;t.forEach((t=>{const n=t.key;if(!n)return;const i=t.sortDirection;"ASC"!==i&&"DESC"!==i||("function"==typeof t.compareFn?((this.state._allowMultiSort||0===this.sortData.length)&&this.sortData.push({label:t.label,key:n,compareFn:t.compareFn,direction:i}),e=!0):"function"==typeof t.sort&&(this.setSortDirection(t.sort,i),setTimeout((()=>this.updateSortedData({key:n,label:t.label,sortDirection:i})))))})),e&&setTimeout((()=>this.updateSortedData()))},s=t;null===(e=s.horizontal)||void 0===e||e.forEach(o),null===(n=s.vertical)||void 0===n||n.forEach(o),s.horizontal&&s.vertical&&(null===(i=s.horizontal)||void 0===i?void 0:i.length)>0&&(null===(a=s.vertical)||void 0===a?void 0:a.length)>0&&(this.disableSort=!0,devHint("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)"))}}})}))}))}validateLabel(t){validateLabel(this,t,{required:!0})}validateMinWidth(t){watchString(this,"_minWidth",t,{defaultValue:void 0})}validateSelection(t){validateTableSelection(this,t)}validateOn(t){validateTableStatefulCallbacks(this,t)}validatePagination(t){try{t=parseJson(t)}catch(t){}this.showPagination=paginationValidator(t),watchValidator(this,"_pagination",paginationValidator,new Set(["boolean","KoliBriTablePagination"]),t,{defaultValue:{_page:1,_pageSize:10,_max:0}})}componentDidLoad(){var t;null===(t=this.tableWcRef)||void 0===t||t.addEventListener("kol-selection-change",this.onSelectionChange)}disconnectedCallback(){var t;null===(t=this.tableWcRef)||void 0===t||t.removeEventListener("kol-selection-change",this.onSelectionChange)}componentWillLoad(){this.validateAllowMultiSort(this._allowMultiSort),this.validateData(this._data),this.validateDataFoot(this._dataFoot),this.validateHeaders(this._headers),this.validateLabel(this._label),this.validateMinWidth(this._minWidth),this.validatePagination(this._pagination),this.validatePaginationPosition(this._paginationPosition),this.validateSelection(this._selection),this.validateOn(this._on)}selectDisplayedData(t,e,n){return"number"==typeof e&&e>0&&"number"==typeof n&&n>0?(this.pageStartSlice=e*(n-1),this.pageEndSlice=e*n>t.length?t.length:e*n,t.slice(this.pageStartSlice,this.pageEndSlice)):(this.pageStartSlice=0,this.pageEndSlice=t.length,t)}renderPagination(){return h("div",{class:"pagination"},h("span",null,translate("kol-table-visible-range",{placeholders:{start:this.pageEndSlice>0?(this.pageStartSlice+1).toString():"0",end:this.pageEndSlice.toString(),total:this.state._pagination&&this.state._pagination._max>0?this.state._pagination._max.toString():Array.isArray(this.state._data)?this.state._data.length.toString():"0"}})),h("div",null,h(KolPaginationTag,{_boundaryCount:this.state._pagination._boundaryCount,_customClass:this.state._pagination._customClass,_on:this.handlePagination,_page:this.state._pagination._page,_pageSize:this.state._pagination._pageSize,_pageSizeOptions:this.state._pagination._pageSizeOptions||PAGINATION_OPTIONS,_siblingCount:this.state._pagination._siblingCount,_tooltipAlign:"bottom",_max:this.state._pagination._max||this.state._pagination._max||this.state._data.length,_label:translate("kol-table-pagination-label",{placeholders:{label:this.state._label}})})))}getHeaderCellSortState(t){if(!this.disableSort&&("function"==typeof t.compareFn||"function"==typeof t.sort)){if(t.key===this.sortedColumnHead.key)return this.sortedColumnHead.sortDirection;if(t.key){const e=this.sortData.find((e=>e.key===t.key));if(null==e?void 0:e.direction)return e.direction}return"NOS"}}handleSort({key:t}){const e=[...(this.state._headers.horizontal||[]).flat(),...(this.state._headers.vertical||[]).flat()].find((e=>e.key===t));e&&this.changeCellSort(e)}getSelectedData(t){var e;const n=this.state._selection;if(n){const i=null!==(e=n.keyPropertyName)&&void 0!==e?e:"id",a=this.state._sortedData.filter((e=>t.includes(e[i])));if(!1===(null==n?void 0:n.multiple))return a[0];if(i)return a}return null}handleSelectionChange(t,e){var n;const i=this.state._selection;i&&(this.state=Object.assign(Object.assign({},this.state),{_selection:Object.assign(Object.assign({},i),{selectedKeys:"object"==typeof e?e:[e]})}));const a=this.getSelectedData(e);tryToDispatchKoliBriEvent("selection-change",this.host,a),"function"==typeof(null===(n=this.state._on)||void 0===n?void 0:n[Events.onSelectionChange])&&this.state._on[Events.onSelectionChange](t,a)}async getSelection(){var t;const e=(null===(t=this.state._selection)||void 0===t?void 0:t.selectedKeys)||[];return this.getSelectedData(e)}render(){var t,e,n,i;const a=this.selectDisplayedData(this.state._sortedData,this.showPagination?null!==(e=null===(t=this.state._pagination)||void 0===t?void 0:t._pageSize)&&void 0!==e?e:10:this.state._sortedData.length,this.state._pagination._page||1),o="top"===this._paginationPosition||"both"===this._paginationPosition?this.renderPagination():null,s="bottom"===this._paginationPosition||"both"===this._paginationPosition?this.renderPagination():null,l={horizontal:null===(n=this.state._headers.horizontal)||void 0===n?void 0:n.map((t=>t.map((t=>Object.assign(Object.assign({},t),{sortDirection:this.getHeaderCellSortState(t)}))))),vertical:null===(i=this.state._headers.vertical)||void 0===i?void 0:i.map((t=>t.map((t=>Object.assign(Object.assign({},t),{sortDirection:this.getHeaderCellSortState(t)})))))};return h(Host,{key:"c9d9fc88d49c60ae20f53d6fd8b66c3d2c95cd87",class:"kol-table-stateful"},this.pageEndSlice>0&&this.showPagination&&o,h(KolTableStatelessWcTag,{key:"ae6109149090b0d29a6b7251b19720544b30b5d4",ref:this.catchRef,_data:a,_headerCells:l,_label:this.state._label,_dataFoot:this.state._dataFoot,_minWidth:this.state._minWidth,_on:{onSort:(t,e)=>{this.handleSort(e)},onSelectionChange:(t,e)=>{this.handleSelectionChange(t,e)}},_selection:this.state._selection}),this.pageEndSlice>0&&this.showPagination&&s)}get host(){return this}static get watchers(){return{_allowMultiSort:["validateAllowMultiSort"],_data:["validateData"],_dataFoot:["validateDataFoot"],_paginationPosition:["validatePaginationPosition"],_headers:["validateHeaders"],_label:["validateLabel"],_minWidth:["validateMinWidth"],_selection:["validateSelection"],_on:["validateOn"],_pagination:["validatePagination"]}}static get style(){return{default:KolTableStatefulDefaultStyle0}}},[33,"kol-table-stateful",{_allowMultiSort:[4,"_allow-multi-sort"],_data:[1],_dataFoot:[1,"_data-foot"],_headers:[1],_label:[1],_minWidth:[1,"_min-width"],_pagination:[8],_paginationPosition:[1,"_pagination-position"],_selection:[1],_on:[16],state:[32],getSelection:[64]},void 0,{_allowMultiSort:["validateAllowMultiSort"],_data:["validateData"],_dataFoot:["validateDataFoot"],_paginationPosition:["validatePaginationPosition"],_headers:["validateHeaders"],_label:["validateLabel"],_minWidth:["validateMinWidth"],_selection:["validateSelection"],_on:["validateOn"],_pagination:["validatePagination"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-table-stateful"].forEach((t=>{if("kol-table-stateful"===t)customElements.get(t)||customElements.define(t,KolTableStateful$1)}))}const KolTableStateful=KolTableStateful$1,defineCustomElement=defineCustomElement$1;export{KolTableStateful,defineCustomElement};
@@ -1 +1 @@
1
- {"file":"kol-table-stateful.js","mappings":";;;;;;;;;;;AAIA,MAAM,iCAAiC,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAU,CAAC;AAWtE,MAAM,0BAA0B,GAAG,CAAC,SAAoC,EAAE,KAAkC;IAClH,cAAc,CACb,SAAS,EACT,qBAAqB,EACrB,CAAC,KAAK,KAAK,OAAO,KAAK,KAAK,QAAQ,IAAI,iCAAiC,CAAC,QAAQ,CAAC,KAAK,CAAC,EACzF,IAAI,GAAG,CAAC,CAAC,+BAA+B,iCAAiC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,EACxF,KAAK,EACL;QACC,YAAY,EAAE,QAAQ;KACtB,CACD,CAAC;AACH,CAAC;;AC1BD,MAAM,eAAe,GAAG,siSAAsiS,CAAC;AAC/jS,sCAAe,eAAe;;AC6C9B,MAAM,kBAAkB,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC;AAE7C,MAAM,mBAAmB,GAAG,CAAC,KAAc,KAAK,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,EAAE,KAAgB,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,CAAC,CAAC;MAgB9HA,kBAAgB;;;;;QAIX,aAAQ,GAAG,CAAC,GAAoC;YAChE,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC;SACtB,CAAC;QASM,mBAAc,GAAmD,IAAI,GAAG,EAAE,CAAC;QAC3E,aAAQ,GAAe,EAAE,CAAC;QAC1B,mBAAc,GAAG,KAAK,CAAC;QACvB,mBAAc,GAAG,CAAC,CAAC;QACnB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EAAE,CAAC,KAAY,EAAE,KAAwB;oBACzD,IAAI,CAAC,qBAAqB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;iBACzC;aACD,EACD,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,GAChC,EACD,IAAI,CAAC,YAAY,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","@import '../@shared/mixins';\n@import '../style';\n@import '../@shared/kol-table-stateless-mixin';\n\n@layer kol-component {\n\t:root {\n\t\tfont-size: rem(16);\n\t}\n\n\tdiv.pagination .kol-pagination {\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t}\n\n\tdiv.pagination,\n\tdiv.pagination > div:last-child {\n\t\tdisplay: grid;\n\t\tplace-items: center;\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\n\t\tdiv.pagination .kol-pagination {\n\t\t\tdisplay: flex;\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 */\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@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 = this.state._data.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\tsortedData = [...this.state._data];\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(): JSX.Element {\n\t\treturn (\n\t\t\t<div class=\"pagination\">\n\t\t\t\t<span>\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={translate('kol-table-pagination-label', { placeholders: { label: this.state._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@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() : null;\n\t\tconst paginationBottom = this._paginationPosition === 'bottom' || this._paginationPosition === 'both' ? this.renderPagination() : 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":";;;;;;;;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ACN;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","@import '../@shared/mixins';\n@import '../style';\n@import '../@shared/kol-table-stateless-mixin';\n\n@layer kol-component {\n\t:root {\n\t\tfont-size: rem(16);\n\t}\n\n\tdiv.pagination .kol-pagination {\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t}\n\n\tdiv.pagination,\n\tdiv.pagination > div:last-child {\n\t\tdisplay: grid;\n\t\tplace-items: center;\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\n\t\tdiv.pagination .kol-pagination {\n\t\t\tdisplay: flex;\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 */\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@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 = this.state._data.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\tsortedData = [...this.state._data];\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(): JSX.Element {\n\t\treturn (\n\t\t\t<div class=\"pagination\">\n\t\t\t\t<span>\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={translate('kol-table-pagination-label', { placeholders: { label: this.state._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@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() : null;\n\t\tconst paginationBottom = this._paginationPosition === 'bottom' || this._paginationPosition === 'both' ? this.renderPagination() : 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{c as KolIconTag,g as KolTooltipWcTag,a as KolButtonWcTag}from"./component-names.js";import{t as translate}from"./i18n2.js";import{n as nonce}from"./dev.utils2.js";import{t as tryToDispatchKoliBriEvent}from"./events.js";import{z as emptyStringByArrayHandler,o as objectObjectHandler,p as parseJson,w as watchValidator,e as watchString}from"./prop.validators.js";import{v as validateTableData,a as validateTableDataFoot,d as validateTableCallbacks,b as validateTableSelection,E as Events}from"./events2.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),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.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,"_minWidth",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}getThePrimaryHeadersWithKeysIfExists(e){const t=[];return e.forEach((e=>{e.forEach((e=>{"string"==typeof e.key&&t.push(e)}))})),t}getPrimaryHeaders(e){var t,a;let l=this.getThePrimaryHeadersWithKeysIfExists(null!==(t=e.horizontal)&&void 0!==t?t:[]);return this.horizontal=!0,0===l.length&&(l=this.getThePrimaryHeadersWithKeysIfExists(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 s=this.getNumberOfRows(t.vertical,e),n=0;a&&(n=s,s+=(null===(l=this.state._dataFoot)||void 0===l?void 0:l.length)||0);const r=[],d=[],c=[];t.vertical.forEach(((e,t)=>{d[t]=0,c[t]=[]}));for(let l=n;l<s;l++){const s=[];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){s.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-n]:e[l];"object"==typeof i[t]&&null!==i[t]&&"string"==typeof i[t].key&&"object"==typeof o&&null!==o&&s.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]&&"string"==typeof i[l].key&&"object"==typeof e[t]&&null!==e[t]&&s.push(Object.assign(Object.assign({},i[l]),{colSpan:void 0,data:e[t],label:e[t][i[l].key],rowSpan:void 0}));r.push(s)}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 s=null!==(a=o.keyPropertyName)&&void 0!==a?a:"id",n=null===(l=e[0])||void 0===l?void 0:l.data;if(!n)return"";const r=n[s],d=o.multiple||void 0===o.multiple,c=null===(i=null==o?void 0:o.selectedKeys)||void 0===i?void 0:i.includes(r),v=o.label(n),b={name:"selection",checked:c,id:r,"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!==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(!a||!a.multiple&&void 0!==a.multiple)return h("th",{key:"thead-0"});const l=null!==(e=a.keyPropertyName)&&void 0!==e?e:"id",i=null===(t=a.selectedKeys)||void 0===t?void 0:t.length,o=i===this.state._data.length,s=0!==i&&!o;let n="kol-table-selection-indeterminate";o&&!s&&(n="kol-table-selection-none"),0===i&&(n="kol-table-selection-all");const r=translate(n);return h("th",{key:"thead-0-selection",class:"selection-cell selection-control"},h("div",{class:"input "+(s?"indeterminate":o?"checked":"")},h("label",{class:"checkbox-container"},h(KolIconTag,{class:"icon",_icons:"codicon "+(s?"codicon-remove":o?"codicon-check":""),_label:""}),h("input",{ref:e=>e&&this.checkboxRefs.push(e),name:"selection",checked:o&&!s,"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:`${n}-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,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"}const s=l?"row":"number"==typeof e.colSpan&&e.colSpan>1?"colgroup":"col";return h("th",{key:`${t}-${a}-${e.label}`,class:e.textAlign?`align-${e.textAlign}`:void 0,scope:s,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,_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),s=this.state._selection?1:0;return h("tr",{"aria-hidden":"true",class:`${e}-spacer`},h("td",{colSpan:i+o+s}))}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:"4a01d08b67fa32cb98a9d92044bc6ac219838243",class:"kol-table-stateless-wc"},h("div",{key:"6daa90f7474c6e1602f1446a7852d769dd8e71b9",ref:e=>this.tableDivElement=e,class:"table",tabindex:this.tableDivElementHasScrollbar?"-1":void 0},h("table",{key:"9d604b2c5a57fddbacc85093c636dd4deae7b21d",style:{minWidth:this.state._minWidth}},h("div",{key:"8ad517ca9d73eddcda3334164c50cb5e5ff824eb",class:"focus-element",tabindex:this.tableDivElementHasScrollbar?"0":void 0,"aria-describedby":"caption"}," "),h("caption",{key:"c9feb58b3a5a51bf0f7b6d35785494989dfed8e4",id:"caption"},this.state._label),Array.isArray(this.state._headerCells.horizontal)&&h("thead",{key:"9c99834d9fbbd8ab12fee77e8ca33d6ad064390a"},[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:{[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.renderHeadingCell(e,t,a,!1)))))),this.renderSpacer("head",this.state._headerCells.horizontal)]),h("tbody",{key:"e52d4221c5cf7f445f1735428907c8a4b2cd5740"},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{c as KolIconTag,g as KolTooltipWcTag,a as KolButtonWcTag}from"./component-names.js";import{t as translate}from"./i18n2.js";import{n as nonce}from"./dev.utils2.js";import{t as tryToDispatchKoliBriEvent}from"./events.js";import{z as emptyStringByArrayHandler,o as objectObjectHandler,p as parseJson,w as watchValidator,e as watchString}from"./prop.validators.js";import{v as validateTableData,a as validateTableDataFoot,d as validateTableCallbacks,b as validateTableSelection,E as Events}from"./events2.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),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.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,"_minWidth",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}getThePrimaryHeadersWithKeysIfExists(e){const t=[];return e.forEach((e=>{e.forEach((e=>{"string"==typeof e.key&&t.push(e)}))})),t}getPrimaryHeaders(e){var t,a;let l=this.getThePrimaryHeadersWithKeysIfExists(null!==(t=e.horizontal)&&void 0!==t?t:[]);return this.horizontal=!0,0===l.length&&(l=this.getThePrimaryHeadersWithKeysIfExists(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 s=this.getNumberOfRows(t.vertical,e),n=0;a&&(n=s,s+=(null===(l=this.state._dataFoot)||void 0===l?void 0:l.length)||0);const r=[],c=[],h=[];t.vertical.forEach(((e,t)=>{c[t]=0,h[t]=[]}));for(let l=n;l<s;l++){const s=[];t.vertical.forEach(((e,t)=>{let a=0;if(h[t].forEach((e=>a+=e)),a<=l){const i=e[l-a+c[t]];if("object"==typeof i){s.push(Object.assign(Object.assign({},i),{asTd:!1,data:{}}));let e=1;if("number"==typeof i.rowSpan&&i.rowSpan>1&&(e=i.rowSpan),h[t].push(e),"number"==typeof i.colSpan&&i.colSpan>1)for(let a=1;a<i.colSpan;a++)h[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-n]:e[l];"object"==typeof i[t]&&null!==i[t]&&"string"==typeof i[t].key&&"object"==typeof o&&null!==o&&s.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]&&"string"==typeof i[l].key&&"object"==typeof e[t]&&null!==e[t]&&s.push(Object.assign(Object.assign({},i[l]),{colSpan:void 0,data:e[t],label:e[t][i[l].key],rowSpan:void 0}));r.push(s)}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 s=null!==(a=o.keyPropertyName)&&void 0!==a?a:"id",n=null===(l=e[0])||void 0===l?void 0:l.data;if(!n)return"";const r=n[s],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(n),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(!a||!a.multiple&&void 0!==a.multiple)return h("th",{key:"thead-0"});const l=null!==(e=a.keyPropertyName)&&void 0!==e?e:"id",i=null===(t=a.selectedKeys)||void 0===t?void 0:t.length,o=i===this.state._data.length,s=0!==i&&!o;let n="kol-table-selection-indeterminate";o&&!s&&(n="kol-table-selection-none"),0===i&&(n="kol-table-selection-all");const r=translate(n);return h("th",{key:"thead-0-selection",class:"selection-cell selection-control"},h("div",{class:"input "+(s?"indeterminate":o?"checked":"")},h("label",{class:"checkbox-container"},h(KolIconTag,{class:"icon",_icons:"codicon "+(s?"codicon-remove":o?"codicon-check":""),_label:""}),h("input",{ref:e=>e&&this.checkboxRefs.push(e),name:"selection",checked:o&&!s,"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:`${n}-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,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"}const s=l?"row":"number"==typeof e.colSpan&&e.colSpan>1?"colgroup":"col";return h("th",{key:`${t}-${a}-${e.label}`,class:e.textAlign?`align-${e.textAlign}`:void 0,scope:s,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,_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),s=this.state._selection?1:0;return h("tr",{"aria-hidden":"true",class:`${e}-spacer`},h("td",{colSpan:i+o+s}))}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:"b6a8e112f267d1daa6aad5cad3f0db28768ca0ac",class:"kol-table-stateless-wc"},h("div",{key:"a8e8b26858f09d4fbe70ee77c5e1408f93637fea",ref:e=>this.tableDivElement=e,class:"table",tabindex:this.tableDivElementHasScrollbar?"-1":void 0},h("table",{key:"c5f495df67d1b5746a6840ecc030b45db07f6624",style:{minWidth:this.state._minWidth}},h("div",{key:"4f320cd3a58b7f8ee66c2b61f341608cbc3cb771",class:"focus-element",tabindex:this.tableDivElementHasScrollbar?"0":void 0,"aria-describedby":"caption"}," "),h("caption",{key:"f7eb102966c9d0a1c45ef438ece503136f1b3fe9",id:"caption"},this.state._label),Array.isArray(this.state._headerCells.horizontal)&&h("thead",{key:"7fadcf80acaf5c6e0e6e22e7439b9c99f0da05bc"},[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:{[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.renderHeadingCell(e,t,a,!1)))))),this.renderSpacer("head",this.state._headerCells.horizontal)]),h("tbody",{key:"3d10c361ebcf490c662b33b12a8c274d18304c83"},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,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{q as KolTableStatelessWcTag}from"./component-names.js";const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\n/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip-wc {\n display: contents;\n }\n .kol-tooltip-wc .tooltip-floating {\n animation-duration: 0.5s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n box-sizing: border-box;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n /* Shared between content and arrow */\n .kol-tooltip-wc .tooltip-area {\n background-color: #fff;\n color: #000;\n }\n .kol-tooltip-wc .tooltip-arrow {\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip-wc .tooltip-content {\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n :host,\n .kol-table-stateless-wc {\n display: block;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .table {\n max-width: 100%;\n overflow-x: auto;\n overflow-y: hidden;\n }\n table {\n width: 100%;\n }\n caption {\n text-align: start;\n }\n .focus-element {\n font-size: 0;\n }\n .focus-element:focus {\n outline: 0 !important;\n }\n .table:has(.focus-element:focus) {\n /* @see https://remysharp.com/til/css/focus-ring-default-styles */\n outline: calc(5rem / var(--kolibri-root-font-size, 16)) auto Highlight;\n outline: calc(5rem / var(--kolibri-root-font-size, 16)) auto -webkit-focus-ring-color;\n outline-offset: calc(2rem / var(--kolibri-root-font-size, 16));\n }\n .table-sort-button .kol-button {\n color: inherit;\n }\n tbody th,\n th.align-left {\n text-align: left;\n }\n tbody th .table-sort-button .kol-button__text,\n th.align-left .table-sort-button .kol-button__text {\n justify-items: start;\n }\n th.align-center {\n text-align: center;\n }\n th.align-center .table-sort-button .kol-button__text {\n justify-items: center;\n }\n th.align-right {\n text-align: right;\n }\n th.align-right .table-sort-button .kol-button__text {\n justify-items: end;\n }\n tr.foot-spacer,\n tr.head-spacer {\n display: none;\n }\n .selection-header-cell {\n width: 0;\n }\n .selection-cell {\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n white-space: nowrap;\n }\n .input label {\n align-items: center;\n cursor: pointer;\n display: flex;\n height: var(--a11y-min-size);\n justify-content: center;\n position: relative;\n width: var(--a11y-min-size);\n }\n .input .icon {\n display: block;\n inset: auto;\n position: absolute;\n z-index: 1;\n }\n .input input {\n appearance: none;\n border-style: solid;\n cursor: pointer;\n margin: 0;\n }\n .input input:before {\n content: \"\";\n }\n .input input[type=checkbox] {\n position: relative;\n display: flex;\n height: calc(var(--a11y-min-size) / 2);\n width: calc(var(--a11y-min-size) / 2);\n align-items: center;\n justify-content: center;\n background-color: rgb(255, 255, 255);\n border-width: calc(2rem / var(--kolibri-root-font-size, 16));\n line-height: 1.5;\n transition: all 0.5s ease 0s;\n }\n .input input[type=radio] {\n display: flex;\n border-width: calc(2rem / var(--kolibri-root-font-size, 16));\n border-radius: 100%;\n height: 1.5em;\n min-height: 1.5em;\n min-width: 1.5em;\n padding: 0;\n width: 1.5em;\n }\n .input input[type=radio]:before {\n border-radius: 100%;\n margin: auto;\n height: 0.75em;\n width: 0.75em;\n }\n .input input[type=radio]:checked:before {\n background-color: #000;\n }\n @media (forced-colors: active) {\n .input input[type=radio]:checked:before {\n /* Give it a visible background in forced colors mode */\n background-color: selectedItem !important;\n }\n }\n}",KolTableStatelessDefaultStyle0=defaultStyleCss,KolTableStateless$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),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}render(){return h(Host,{key:"366a0fa7594af0080e834abf971334d4bf3c8dd7",class:"kol-table-stateless"},h(KolTableStatelessWcTag,{key:"e89610ae8cef7d8459435a0c13e14a4f5c2cd305",_data:this._data,_dataFoot:this._dataFoot,_headerCells:this._headerCells,_label:this._label,_minWidth:this._minWidth,_on:this._on,_selection:this._selection}))}static get style(){return{default:KolTableStatelessDefaultStyle0}}},[33,"kol-table-stateless",{_data:[1],_dataFoot:[1,"_data-foot"],_headerCells:[1,"_header-cells"],_label:[1],_minWidth:[1,"_min-width"],_on:[16],_selection:[1]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-table-stateless"].forEach((n=>{if("kol-table-stateless"===n)customElements.get(n)||customElements.define(n,KolTableStateless$1)}))}const KolTableStateless=KolTableStateless$1,defineCustomElement=defineCustomElement$1;export{KolTableStateless,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{q as KolTableStatelessWcTag}from"./component-names.js";const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\n/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip-wc {\n display: contents;\n }\n .kol-tooltip-wc .tooltip-floating {\n animation-duration: 0.5s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n box-sizing: border-box;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n /* Shared between content and arrow */\n .kol-tooltip-wc .tooltip-area {\n background-color: #fff;\n color: #000;\n }\n .kol-tooltip-wc .tooltip-arrow {\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip-wc .tooltip-content {\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n :host,\n .kol-table-stateless-wc {\n display: block;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .table {\n max-width: 100%;\n overflow-x: auto;\n overflow-y: hidden;\n }\n table {\n width: 100%;\n }\n caption {\n text-align: start;\n }\n .focus-element {\n font-size: 0;\n }\n .focus-element:focus {\n outline: 0 !important;\n }\n .table:has(.focus-element:focus) {\n /* @see https://remysharp.com/til/css/focus-ring-default-styles */\n outline: calc(5rem / var(--kolibri-root-font-size, 16)) auto Highlight;\n outline: calc(5rem / var(--kolibri-root-font-size, 16)) auto -webkit-focus-ring-color;\n outline-offset: calc(2rem / var(--kolibri-root-font-size, 16));\n }\n .table-sort-button .kol-button {\n color: inherit;\n }\n tbody th,\n th.align-left {\n text-align: left;\n }\n tbody th .table-sort-button .kol-button__text,\n th.align-left .table-sort-button .kol-button__text {\n justify-items: start;\n }\n th.align-center {\n text-align: center;\n }\n th.align-center .table-sort-button .kol-button__text {\n justify-items: center;\n }\n th.align-right {\n text-align: right;\n }\n th.align-right .table-sort-button .kol-button__text {\n justify-items: end;\n }\n tr.foot-spacer,\n tr.head-spacer {\n display: none;\n }\n .selection-header-cell {\n width: 0;\n }\n .selection-cell {\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n white-space: nowrap;\n }\n .input label {\n align-items: center;\n cursor: pointer;\n display: flex;\n height: var(--a11y-min-size);\n justify-content: center;\n position: relative;\n width: var(--a11y-min-size);\n }\n .input .icon {\n display: block;\n inset: auto;\n position: absolute;\n z-index: 1;\n }\n .input input {\n appearance: none;\n border-style: solid;\n cursor: pointer;\n margin: 0;\n }\n .input input:before {\n content: \"\";\n }\n .input input[type=checkbox] {\n position: relative;\n display: flex;\n height: calc(var(--a11y-min-size) / 2);\n width: calc(var(--a11y-min-size) / 2);\n align-items: center;\n justify-content: center;\n background-color: rgb(255, 255, 255);\n border-width: calc(2rem / var(--kolibri-root-font-size, 16));\n line-height: 1.5;\n transition: all 0.5s ease 0s;\n }\n .input input[type=radio] {\n display: flex;\n border-width: calc(2rem / var(--kolibri-root-font-size, 16));\n border-radius: 100%;\n height: 1.5em;\n min-height: 1.5em;\n min-width: 1.5em;\n padding: 0;\n width: 1.5em;\n }\n .input input[type=radio]:before {\n border-radius: 100%;\n margin: auto;\n height: 0.75em;\n width: 0.75em;\n }\n .input input[type=radio]:checked:before {\n background-color: #000;\n }\n @media (forced-colors: active) {\n .input input[type=radio]:checked:before {\n /* Give it a visible background in forced colors mode */\n background-color: selectedItem !important;\n }\n }\n}",KolTableStatelessDefaultStyle0=defaultStyleCss,KolTableStateless$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),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}render(){return h(Host,{key:"b62e412718a8160669343ee431d390e7ae424212",class:"kol-table-stateless"},h(KolTableStatelessWcTag,{key:"b281a0b303d32d92188961011a0ece6d15f1f913",_data:this._data,_dataFoot:this._dataFoot,_headerCells:this._headerCells,_label:this._label,_minWidth:this._minWidth,_on:this._on,_selection:this._selection}))}static get style(){return{default:KolTableStatelessDefaultStyle0}}},[33,"kol-table-stateless",{_data:[1],_dataFoot:[1,"_data-foot"],_headerCells:[1,"_header-cells"],_label:[1],_minWidth:[1,"_min-width"],_on:[16],_selection:[1]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-table-stateless"].forEach((n=>{if("kol-table-stateless"===n)customElements.get(n)||customElements.define(n,KolTableStateless$1)}))}const KolTableStateless=KolTableStateless$1,defineCustomElement=defineCustomElement$1;export{KolTableStateless,defineCustomElement};
@@ -1 +1 @@
1
- {"file":"kol-table-stateless.js","mappings":";;;;;;AAAA,MAAM,eAAe,GAAG,igRAAigR,CAAC;AAC1hR,uCAAe,eAAe;;MCmBjBA,mBAAiB;;;;;;;;;;;;;IAoCtB,MAAM;QACZ,QACC,EAAC,IAAI,qDAAC,KAAK,EAAC,qBAAqB,IAChC,EAAC,sBAAsB,qDACtB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,YAAY,EAAE,IAAI,CAAC,YAAY,EAC/B,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,UAAU,EAAE,IAAI,CAAC,UAAU,GAC1B,CACI,EACN;KACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolTableStateless"],"sources":["src/components/table-stateless/style.scss?tag=kol-table-stateless&mode=default&encapsulation=shadow","src/components/table-stateless/shadow.tsx"],"sourcesContent":["@import '../@shared/mixins';\n@import '../style';\n@import '../@shared/kol-table-stateless-mixin';\n@import '../host-display-block';\n\n@include kol-table-stateless-styles;\n","import type { JSX } from '@stencil/core';\nimport { Component, h, Host, Prop } from '@stencil/core';\n\nimport { KolTableStatelessWcTag } from '../../core/component-names';\nimport type {\n\tTableDataFootPropType,\n\tTableDataPropType,\n\tTableHeaderCellsPropType,\n\tTableStatelessProps,\n\tTableCallbacksPropType,\n\tTableSelectionPropType,\n} from '../../schema';\n\n@Component({\n\ttag: 'kol-table-stateless',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: true,\n})\nexport class KolTableStateless implements TableStatelessProps {\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 */\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\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host class=\"kol-table-stateless\">\n\t\t\t\t<KolTableStatelessWcTag\n\t\t\t\t\t_data={this._data}\n\t\t\t\t\t_dataFoot={this._dataFoot}\n\t\t\t\t\t_headerCells={this._headerCells}\n\t\t\t\t\t_label={this._label}\n\t\t\t\t\t_minWidth={this._minWidth}\n\t\t\t\t\t_on={this._on}\n\t\t\t\t\t_selection={this._selection}\n\t\t\t\t/>\n\t\t\t</Host>\n\t\t);\n\t}\n}\n"],"version":3}
1
+ {"file":"kol-table-stateless.js","mappings":";;;;;;AAAA,MAAM,eAAe,GAAG,2+QAA2+Q,CAAC;AACpgR,uCAAe,eAAe;;MCmBjBA,mBAAiB;;;;;;;;;;;;;IAoCtB,MAAM;QACZ,QACC,EAAC,IAAI,qDAAC,KAAK,EAAC,qBAAqB,IAChC,EAAC,sBAAsB,qDACtB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,YAAY,EAAE,IAAI,CAAC,YAAY,EAC/B,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,UAAU,EAAE,IAAI,CAAC,UAAU,GAC1B,CACI,EACN;KACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolTableStateless"],"sources":["src/components/table-stateless/style.scss?tag=kol-table-stateless&mode=default&encapsulation=shadow","src/components/table-stateless/shadow.tsx"],"sourcesContent":["@import '../@shared/mixins';\n@import '../style';\n@import '../@shared/kol-table-stateless-mixin';\n@import '../host-display-block';\n\n@include kol-table-stateless-styles;\n","import type { JSX } from '@stencil/core';\nimport { Component, h, Host, Prop } from '@stencil/core';\n\nimport { KolTableStatelessWcTag } from '../../core/component-names';\nimport type {\n\tTableDataFootPropType,\n\tTableDataPropType,\n\tTableHeaderCellsPropType,\n\tTableStatelessProps,\n\tTableCallbacksPropType,\n\tTableSelectionPropType,\n} from '../../schema';\n\n@Component({\n\ttag: 'kol-table-stateless',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: true,\n})\nexport class KolTableStateless implements TableStatelessProps {\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 */\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\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host class=\"kol-table-stateless\">\n\t\t\t\t<KolTableStatelessWcTag\n\t\t\t\t\t_data={this._data}\n\t\t\t\t\t_dataFoot={this._dataFoot}\n\t\t\t\t\t_headerCells={this._headerCells}\n\t\t\t\t\t_label={this._label}\n\t\t\t\t\t_minWidth={this._minWidth}\n\t\t\t\t\t_on={this._on}\n\t\t\t\t\t_selection={this._selection}\n\t\t\t\t/>\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}from"@stencil/core/internal/client";import{o as KolTableStatefulTag}from"./component-names.js";const KolTable$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this._allowMultiSort=void 0,this._data=void 0,this._dataFoot=void 0,this._headers=void 0,this._label=void 0,this._minWidth=void 0,this._pagination=void 0,this._paginationPosition="bottom",this._selection=void 0,this._on=void 0}render(){return h(KolTableStatefulTag,{key:"3aacf9146f821f2daaec1e89fe471ff350191879",_allowMultiSort:this._allowMultiSort,_data:this._data,_dataFoot:this._dataFoot,_headers:this._headers,_label:this._label,_minWidth:this._minWidth,_pagination:this._pagination,_paginationPosition:this._paginationPosition,_selection:this._selection,_on:this._on})}},[1,"kol-table",{_allowMultiSort:[4,"_allow-multi-sort"],_data:[1],_dataFoot:[1,"_data-foot"],_headers:[1],_label:[1],_minWidth:[1,"_min-width"],_pagination:[8],_paginationPosition:[1,"_pagination-position"],_selection:[1],_on:[16]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-table"].forEach((t=>{if("kol-table"===t)customElements.get(t)||customElements.define(t,KolTable$1)}))}const KolTable=KolTable$1,defineCustomElement=defineCustomElement$1;export{KolTable,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{o as KolTableStatefulTag}from"./component-names.js";const KolTable$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this._allowMultiSort=void 0,this._data=void 0,this._dataFoot=void 0,this._headers=void 0,this._label=void 0,this._minWidth=void 0,this._pagination=void 0,this._paginationPosition="bottom",this._selection=void 0,this._on=void 0}render(){return h(KolTableStatefulTag,{key:"034d0e2ae40ccb7b841795cac53ba1fed894fa8d",_allowMultiSort:this._allowMultiSort,_data:this._data,_dataFoot:this._dataFoot,_headers:this._headers,_label:this._label,_minWidth:this._minWidth,_pagination:this._pagination,_paginationPosition:this._paginationPosition,_selection:this._selection,_on:this._on})}},[1,"kol-table",{_allowMultiSort:[4,"_allow-multi-sort"],_data:[1],_dataFoot:[1,"_data-foot"],_headers:[1],_label:[1],_minWidth:[1,"_min-width"],_pagination:[8],_paginationPosition:[1,"_pagination-position"],_selection:[1],_on:[16]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-table"].forEach((t=>{if("kol-table"===t)customElements.get(t)||customElements.define(t,KolTable$1)}))}const KolTable=KolTable$1,defineCustomElement=defineCustomElement$1;export{KolTable,defineCustomElement};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{t as translate}from"./i18n2.js";import{a as KolButtonWcTag}from"./component-names.js";import{w as watchValidator,q as devHint,f as featureHint,s as setState,v as watchNumber,i as watchJsonArrayString,j as uiUxHintMillerscheZahl,A as koliBriQuerySelector}from"./prop.validators.js";import{a as validateAlign}from"./align.js";import{v as validateLabel}from"./label.js";import{L as Log}from"./dev.utils.js";const tabBehaviorPropTypeOptions=["select-automatic","select-manual"],validateTabBehavior=(t,e)=>{watchValidator(t,"_behavior",(t=>"string"==typeof t&&tabBehaviorPropTypeOptions.includes(t)),new Set([`KoliBriTabBehavior {${tabBehaviorPropTypeOptions.join(", ")}`]),e)};var KeyboardKey;!function(t){t.ArrowDown="ArrowDown",t.ArrowLeft="ArrowLeft",t.ArrowRight="ArrowRight",t.ArrowUp="ArrowUp",t.Enter="Enter",t.Space=" "}(KeyboardKey||(KeyboardKey={}));const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\n/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip-wc {\n display: contents;\n }\n .kol-tooltip-wc .tooltip-floating {\n animation-duration: 0.5s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n box-sizing: border-box;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n /* Shared between content and arrow */\n .kol-tooltip-wc .tooltip-area {\n background-color: #fff;\n color: #000;\n }\n .kol-tooltip-wc .tooltip-arrow {\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip-wc .tooltip-content {\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n :host > div {\n display: grid;\n }\n .tabs-content {\n overflow: auto;\n }\n .tabs-button-group {\n display: flex;\n flex-wrap: wrap;\n }\n .tabs-button-group button {\n border-bottom-color: transparent;\n border-bottom-style: solid;\n display: block;\n }\n div.grid,\n div[role=tabpanel] {\n height: 100%;\n }\n :host > .tabs-align-right {\n display: grid;\n grid-template-columns: 1fr auto;\n }\n :host > .tabs-align-right .tabs-button-group {\n flex-direction: column;\n order: 2;\n }\n :host > .tabs-align-right .tabs-button-group .kol-button-wc {\n width: 100%;\n }\n :host > .tabs-align-left {\n display: grid;\n grid-template-columns: auto 1fr;\n }\n :host > .tabs-align-left .tabs-button-group {\n flex-direction: column;\n order: 0;\n }\n :host > .tabs-align-left .tabs-button-group .kol-button-wc {\n width: 100%;\n }\n :host > .tabs-align-bottom {\n display: grid;\n grid-template-rows: 1fr auto;\n }\n :host > .tabs-align-bottom .tabs-button-group {\n order: 2;\n }\n :host > .tabs-align-bottom .tabs-button-group > div {\n display: flex;\n margin: 0 1em;\n }\n :host > .tabs-align-bottom .tabs-button-group > div > div:first-child {\n margin: 0 1em 0 0;\n }\n :host > .tabs-align-top {\n display: grid;\n grid-template-rows: auto 1fr;\n }\n :host > .tabs-align-top .tabs-button-group {\n order: 0;\n }\n :host > .tabs-align-top .tabs-button-group > div {\n display: flex;\n }\n :host > .tabs-align-top .tabs-button-group > div > div {\n margin: 0 1em;\n }\n :host > .tabs-align-top .tabs-button-group > div > div:first-child {\n margin: 0 1em 0 0;\n }\n}",KolTabsDefaultStyle0=defaultStyleCss,KolTabs$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.onCreateLabel=`${translate("kol-new")} …`,this.showCreateTab=!1,this.nextPossibleTabIndex=(t,e,n=1)=>{const a=e+n;return a<t.length?t[a]._disabled?this.nextPossibleTabIndex(t,e,n+1):a:e},this.prevPossibleTabIndex=(t,e,n=1)=>{const a=e-n;return a>=0?t[a]._disabled?this.prevPossibleTabIndex(t,e,n+1):a:e},this.onKeyDown=t=>{switch(t.key){case KeyboardKey.ArrowRight:this.goToNextTab(t);break;case KeyboardKey.ArrowLeft:this.goToPreviousTab(t);break;case KeyboardKey.Space:case KeyboardKey.Enter:this.activateFocusedTab(t)}},this.onClickSelect=(t,e)=>{this.selectNextTabEvent(t,e)},this.onMouseDown=t=>{t.preventDefault(),t.stopPropagation()},this.callbacks={onClick:this.onClickSelect,onMouseDown:this.onMouseDown},this.catchTabPanelHost=t=>{this.tabPanelHost=t},this.selectNextNotDisabledTab=(t,e,n=!0,a)=>{if(t>e.length-1&&(t=e.length-1),t<0&&(t=0),Array.isArray(e)&&e[t]&&e[t]._disabled){if(!0===n){if(t<e.length-1)return this.selectNextNotDisabledTab(t+1,e,!0,a||t);t=a||t,n=!1}if(!1===n){if(t>0)return this.selectNextNotDisabledTab(t-1,e,!1,a||t);devHint("[KolTabs] All tabs are disabled, and therefore no tab can be displayed.")}}return t},this.syncSelectedAndTabs=(t,e,n,a)=>{let o,i;o="_selected"===a?t:this.state._selected,i="_tabs"===a?t:this.state._tabs,i.length>0&&e.set("_selected",this.selectNextNotDisabledTab(o,i))},this.handleTabPanels=()=>{var t,e,n;if(this.tabPanelHost instanceof HTMLDivElement)for(let a=this.tabPanelHost.children.length;a<this.state._tabs.length;a++){const o=document.createElement("div");o.setAttribute("aria-labelledby",`${this.state._label.replace(/\s/g,"-")}-tab-${a}`),o.setAttribute("id",`tabpanel-${a}`),o.setAttribute("role","tabpanel"),o.setAttribute("hidden","");const i=document.createElement("slot");i.setAttribute("name",`tabpanel-slot-${a}`),o.appendChild(i),this.tabPanelHost.appendChild(o),(null===(t=this.host)||void 0===t?void 0:t.children)instanceof HTMLCollection&&(null===(e=this.host)||void 0===e?void 0:e.children[a])&&(null===(n=this.host)||void 0===n||n.children[a].setAttribute("slot",`tabpanel-slot-${a}`))}},this.onCreate=t=>{var e,n;t.preventDefault(),t.stopPropagation(),"function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e.onCreate)&&(null===(n=this.state._on)||void 0===n||n.onCreate(t))},this.onBlur=()=>{this.currentFocusIndex=void 0},this._align="top",this._behavior=void 0,this._label=void 0,this._on=void 0,this._selected=0,this._tabs=void 0,this.state={_align:"top",_label:"",_selected:0,_tabs:[]}}getCurrentFocusIndex(){return"number"==typeof this.currentFocusIndex?this.currentFocusIndex:this.state._selected}getKeyboardTabChangeMode(){return"select-manual"===this._behavior?"selectFocusOnly":"activateCompletely"}goToNextTab(t){const e=this.nextPossibleTabIndex(this.state._tabs,this.getCurrentFocusIndex());this.selectNextTabEvent(t,e,this.getKeyboardTabChangeMode())}goToPreviousTab(t){const e=this.prevPossibleTabIndex(this.state._tabs,this.getCurrentFocusIndex());this.selectNextTabEvent(t,e,this.getKeyboardTabChangeMode())}activateFocusedTab(t){"number"==typeof this.currentFocusIndex&&this.onSelect(t,this.currentFocusIndex)}selectNextTabEvent(t,e,n="activateCompletely"){var a,o;if(this.currentFocusIndex=e,this.focusTabById(e),"activateCompletely"===n){this._selected=e;null===(o=null===(a=this.state._tabs[e]._on)||void 0===a?void 0:a.onSelect)||void 0===o||o.call(a,t,e),this.onSelect(t,e)}}renderButtonGroup(){return h("div",{"aria-label":this.state._label,class:"tabs-button-group kol-button-group-wc",role:"tablist",onKeyDown:this.onKeyDown,onBlur:this.onBlur},this.state._tabs.map(((t,e)=>h(KolButtonWcTag,{_disabled:t._disabled,_icons:t._icons,_hideLabel:t._hideLabel,_label:t._label,_on:this.callbacks,_tabIndex:this.state._selected===e?0:-1,_tooltipAlign:t._tooltipAlign,_variant:this.state._selected===e?"custom":void 0,_customClass:this.state._selected===e?"selected":void 0,_ariaControls:`tabpanel-${e}`,_ariaSelected:this.state._selected===e,_id:`${this.state._label.replace(/\s/g,"-")}-tab-${e}`,_role:"tab",_value:e}))),this.showCreateTab&&h(KolButtonWcTag,{class:"create-button",_label:this.onCreateLabel,_on:{onClick:this.onCreate}}))}render(){return h(Host,{key:"fe001ba163daa992ac9062cfd422960c6b2c46e0",class:"kol-tabs"},h("div",{key:"c9ad7feee0211b8847e6fedd8cf1e0a84af1aeaa",ref:t=>{this.tabPanelsElement=t},class:{[`tabs-align-${this.state._align}`]:!0}},this.renderButtonGroup(),h("div",{key:"889a4c8fb229099df57ab143e6692273e26e698f",class:"tabs-content",ref:this.catchTabPanelHost})))}validateAlign(t){validateAlign(this,t)}validateBehavior(t){validateTabBehavior(this,t)}validateLabel(t){validateLabel(this,t,{required:!0})}validateOn(t){if("object"==typeof t&&null!==t){featureHint("[KolTabs] Prüfen, wie man auch einen EventCallback einzeln ändern kann.");const e={};"function"!=typeof t.onCreate&&"object"!=typeof t.onCreate||("object"==typeof t.onCreate?("string"==typeof t.onCreate.label&&t.onCreate.label.length>0?this.onCreateLabel=t.onCreate.label:Log.debug("[KolTabs] The label text for New in {\n onCreate: {\n label: string (!),\n callback: Function\n }\n} is not set correctly."),"function"==typeof t.onCreate.callback?e.onCreate=t.onCreate.callback:Log.debug("[KolTabs] The onCreate callback function for New in {\n onCreate: {\n label: string,\n callback: Function (!)\n }\n} is not set correctly.")):e.onCreate=t.onCreate,this.showCreateTab="function"==typeof e.onCreate),"function"==typeof t.onSelect&&(e.onSelect=t.onSelect),setState(this,"_on",e)}}validateSelected(t){watchNumber(this,"_selected",t,{hooks:{beforePatch:this.syncSelectedAndTabs}})}validateTabs(t){watchJsonArrayString(this,"_tabs",(t=>"object"==typeof t&&null!==t&&"string"==typeof t._label&&t._label.length>0),t,void 0,{hooks:{beforePatch:this.syncSelectedAndTabs}}),uiUxHintMillerscheZahl("KolTabs",this.state._tabs.length)}componentWillLoad(){this.validateAlign(this._align),this.validateLabel(this._label),this.validateOn(this._on),this.validateSelected(this._selected),this.validateTabs(this._tabs),this.validateBehavior(this._behavior)}componentDidRender(){if(this.handleTabPanels(),this.tabPanelHost instanceof HTMLDivElement)for(let t=0;t<this.tabPanelHost.children.length;t++)t!==this.state._selected?this.tabPanelHost.children[t].setAttribute("hidden",""):this.tabPanelHost.children[t].removeAttribute("hidden")}focusTabById(t){if(this.tabPanelsElement){const e=koliBriQuerySelector(`button#${this.state._label.replace(/\s/g,"-")}-tab-${t}`,this.tabPanelsElement);null==e||e.focus()}}onSelect(t,e){var n,a;null===(a=null===(n=this._on)||void 0===n?void 0:n.onSelect)||void 0===a||a.call(n,t,e),this.focusTabById(e)}get host(){return this}static get watchers(){return{_align:["validateAlign"],_behavior:["validateBehavior"],_label:["validateLabel"],_on:["validateOn"],_selected:["validateSelected"],_tabs:["validateTabs"]}}static get style(){return{default:KolTabsDefaultStyle0}}},[33,"kol-tabs",{_align:[1],_behavior:[1],_label:[1],_on:[16],_selected:[1538],_tabs:[1],state:[32]},void 0,{_align:["validateAlign"],_behavior:["validateBehavior"],_label:["validateLabel"],_on:["validateOn"],_selected:["validateSelected"],_tabs:["validateTabs"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-tabs"].forEach((t=>{if("kol-tabs"===t)customElements.get(t)||customElements.define(t,KolTabs$1)}))}const KolTabs=KolTabs$1,defineCustomElement=defineCustomElement$1;export{KolTabs,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{t as translate}from"./i18n2.js";import{a as KolButtonWcTag}from"./component-names.js";import{w as watchValidator,q as devHint,f as featureHint,s as setState,v as watchNumber,i as watchJsonArrayString,j as uiUxHintMillerscheZahl,A as koliBriQuerySelector}from"./prop.validators.js";import{a as validateAlign}from"./align.js";import{v as validateLabel}from"./label.js";import{L as Log}from"./dev.utils.js";const tabBehaviorPropTypeOptions=["select-automatic","select-manual"],validateTabBehavior=(t,e)=>{watchValidator(t,"_behavior",(t=>"string"==typeof t&&tabBehaviorPropTypeOptions.includes(t)),new Set([`KoliBriTabBehavior {${tabBehaviorPropTypeOptions.join(", ")}`]),e)};var KeyboardKey;!function(t){t.ArrowDown="ArrowDown",t.ArrowLeft="ArrowLeft",t.ArrowRight="ArrowRight",t.ArrowUp="ArrowUp",t.Enter="Enter",t.Space=" "}(KeyboardKey||(KeyboardKey={}));const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\n/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip-wc {\n display: contents;\n }\n .kol-tooltip-wc .tooltip-floating {\n animation-duration: 0.5s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n box-sizing: border-box;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n /* Shared between content and arrow */\n .kol-tooltip-wc .tooltip-area {\n background-color: #fff;\n color: #000;\n }\n .kol-tooltip-wc .tooltip-arrow {\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip-wc .tooltip-content {\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n :host > div {\n display: grid;\n }\n .tabs-content {\n overflow: auto;\n }\n .tabs-button-group {\n display: flex;\n flex-wrap: wrap;\n }\n .tabs-button-group button {\n border-bottom-color: transparent;\n border-bottom-style: solid;\n display: block;\n }\n div.grid,\n div[role=tabpanel] {\n height: 100%;\n }\n :host > .tabs-align-right {\n display: grid;\n grid-template-columns: 1fr auto;\n }\n :host > .tabs-align-right .tabs-button-group {\n flex-direction: column;\n order: 2;\n }\n :host > .tabs-align-right .tabs-button-group .kol-button-wc {\n width: 100%;\n }\n :host > .tabs-align-left {\n display: grid;\n grid-template-columns: auto 1fr;\n }\n :host > .tabs-align-left .tabs-button-group {\n flex-direction: column;\n order: 0;\n }\n :host > .tabs-align-left .tabs-button-group .kol-button-wc {\n width: 100%;\n }\n :host > .tabs-align-bottom {\n display: grid;\n grid-template-rows: 1fr auto;\n }\n :host > .tabs-align-bottom .tabs-button-group {\n order: 2;\n }\n :host > .tabs-align-bottom .tabs-button-group > div {\n display: flex;\n margin: 0 1em;\n }\n :host > .tabs-align-bottom .tabs-button-group > div > div:first-child {\n margin: 0 1em 0 0;\n }\n :host > .tabs-align-top {\n display: grid;\n grid-template-rows: auto 1fr;\n }\n :host > .tabs-align-top .tabs-button-group {\n order: 0;\n }\n :host > .tabs-align-top .tabs-button-group > div {\n display: flex;\n }\n :host > .tabs-align-top .tabs-button-group > div > div {\n margin: 0 1em;\n }\n :host > .tabs-align-top .tabs-button-group > div > div:first-child {\n margin: 0 1em 0 0;\n }\n}",KolTabsDefaultStyle0=defaultStyleCss,KolTabs$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.onCreateLabel=`${translate("kol-new")} …`,this.showCreateTab=!1,this.nextPossibleTabIndex=(t,e,n=1)=>{const a=e+n;return a<t.length?t[a]._disabled?this.nextPossibleTabIndex(t,e,n+1):a:e},this.prevPossibleTabIndex=(t,e,n=1)=>{const a=e-n;return a>=0?t[a]._disabled?this.prevPossibleTabIndex(t,e,n+1):a:e},this.onKeyDown=t=>{switch(t.key){case KeyboardKey.ArrowRight:this.goToNextTab(t);break;case KeyboardKey.ArrowLeft:this.goToPreviousTab(t);break;case KeyboardKey.Space:case KeyboardKey.Enter:this.activateFocusedTab(t)}},this.onClickSelect=(t,e)=>{this.selectNextTabEvent(t,e)},this.onMouseDown=t=>{t.preventDefault(),t.stopPropagation()},this.callbacks={onClick:this.onClickSelect,onMouseDown:this.onMouseDown},this.catchTabPanelHost=t=>{this.tabPanelHost=t},this.selectNextNotDisabledTab=(t,e,n=!0,a)=>{if(t>e.length-1&&(t=e.length-1),t<0&&(t=0),Array.isArray(e)&&e[t]&&e[t]._disabled){if(!0===n){if(t<e.length-1)return this.selectNextNotDisabledTab(t+1,e,!0,a||t);t=a||t,n=!1}if(!1===n){if(t>0)return this.selectNextNotDisabledTab(t-1,e,!1,a||t);devHint("[KolTabs] All tabs are disabled, and therefore no tab can be displayed.")}}return t},this.syncSelectedAndTabs=(t,e,n,a)=>{let o,i;o="_selected"===a?t:this.state._selected,i="_tabs"===a?t:this.state._tabs,i.length>0&&e.set("_selected",this.selectNextNotDisabledTab(o,i))},this.handleTabPanels=()=>{var t,e,n;if(this.tabPanelHost instanceof HTMLDivElement)for(let a=this.tabPanelHost.children.length;a<this.state._tabs.length;a++){const o=document.createElement("div");o.setAttribute("aria-labelledby",`${this.state._label.replace(/\s/g,"-")}-tab-${a}`),o.setAttribute("id",`tabpanel-${a}`),o.setAttribute("role","tabpanel"),o.setAttribute("hidden","");const i=document.createElement("slot");i.setAttribute("name",`tabpanel-slot-${a}`),o.appendChild(i),this.tabPanelHost.appendChild(o),(null===(t=this.host)||void 0===t?void 0:t.children)instanceof HTMLCollection&&(null===(e=this.host)||void 0===e?void 0:e.children[a])&&(null===(n=this.host)||void 0===n||n.children[a].setAttribute("slot",`tabpanel-slot-${a}`))}},this.onCreate=t=>{var e,n;t.preventDefault(),t.stopPropagation(),"function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e.onCreate)&&(null===(n=this.state._on)||void 0===n||n.onCreate(t))},this.onBlur=()=>{this.currentFocusIndex=void 0},this._align="top",this._behavior=void 0,this._label=void 0,this._on=void 0,this._selected=0,this._tabs=void 0,this.state={_align:"top",_label:"",_selected:0,_tabs:[]}}getCurrentFocusIndex(){return"number"==typeof this.currentFocusIndex?this.currentFocusIndex:this.state._selected}getKeyboardTabChangeMode(){return"select-manual"===this._behavior?"selectFocusOnly":"activateCompletely"}goToNextTab(t){const e=this.nextPossibleTabIndex(this.state._tabs,this.getCurrentFocusIndex());this.selectNextTabEvent(t,e,this.getKeyboardTabChangeMode())}goToPreviousTab(t){const e=this.prevPossibleTabIndex(this.state._tabs,this.getCurrentFocusIndex());this.selectNextTabEvent(t,e,this.getKeyboardTabChangeMode())}activateFocusedTab(t){"number"==typeof this.currentFocusIndex&&this.onSelect(t,this.currentFocusIndex)}selectNextTabEvent(t,e,n="activateCompletely"){var a,o;if(this.currentFocusIndex=e,this.focusTabById(e),"activateCompletely"===n){this._selected=e;null===(o=null===(a=this.state._tabs[e]._on)||void 0===a?void 0:a.onSelect)||void 0===o||o.call(a,t,e),this.onSelect(t,e)}}renderButtonGroup(){return h("div",{"aria-label":this.state._label,class:"tabs-button-group kol-button-group-wc",role:"tablist",onKeyDown:this.onKeyDown,onBlur:this.onBlur},this.state._tabs.map(((t,e)=>h(KolButtonWcTag,{_disabled:t._disabled,_icons:t._icons,_hideLabel:t._hideLabel,_label:t._label,_on:this.callbacks,_tabIndex:this.state._selected===e?0:-1,_tooltipAlign:t._tooltipAlign,_variant:this.state._selected===e?"custom":void 0,_customClass:this.state._selected===e?"selected":void 0,_ariaControls:`tabpanel-${e}`,_ariaSelected:this.state._selected===e,_id:`${this.state._label.replace(/\s/g,"-")}-tab-${e}`,_role:"tab",_value:e}))),this.showCreateTab&&h(KolButtonWcTag,{class:"create-button",_label:this.onCreateLabel,_on:{onClick:this.onCreate}}))}render(){return h(Host,{key:"05e341b7efd5d94dfa2fa0786d078c326b5c8640",class:"kol-tabs"},h("div",{key:"ca2924183169250379353c56cb8b63fc7e1fedc1",ref:t=>{this.tabPanelsElement=t},class:{[`tabs-align-${this.state._align}`]:!0}},this.renderButtonGroup(),h("div",{key:"cc9c77706531826192849a0c07a864781cc99081",class:"tabs-content",ref:this.catchTabPanelHost})))}validateAlign(t){validateAlign(this,t)}validateBehavior(t){validateTabBehavior(this,t)}validateLabel(t){validateLabel(this,t,{required:!0})}validateOn(t){if("object"==typeof t&&null!==t){featureHint("[KolTabs] Prüfen, wie man auch einen EventCallback einzeln ändern kann.");const e={};"function"!=typeof t.onCreate&&"object"!=typeof t.onCreate||("object"==typeof t.onCreate?("string"==typeof t.onCreate.label&&t.onCreate.label.length>0?this.onCreateLabel=t.onCreate.label:Log.debug("[KolTabs] The label text for New in {\n onCreate: {\n label: string (!),\n callback: Function\n }\n} is not set correctly."),"function"==typeof t.onCreate.callback?e.onCreate=t.onCreate.callback:Log.debug("[KolTabs] The onCreate callback function for New in {\n onCreate: {\n label: string,\n callback: Function (!)\n }\n} is not set correctly.")):e.onCreate=t.onCreate,this.showCreateTab="function"==typeof e.onCreate),"function"==typeof t.onSelect&&(e.onSelect=t.onSelect),setState(this,"_on",e)}}validateSelected(t){watchNumber(this,"_selected",t,{hooks:{beforePatch:this.syncSelectedAndTabs}})}validateTabs(t){watchJsonArrayString(this,"_tabs",(t=>"object"==typeof t&&null!==t&&"string"==typeof t._label&&t._label.length>0),t,void 0,{hooks:{beforePatch:this.syncSelectedAndTabs}}),uiUxHintMillerscheZahl("KolTabs",this.state._tabs.length)}componentWillLoad(){this.validateAlign(this._align),this.validateLabel(this._label),this.validateOn(this._on),this.validateSelected(this._selected),this.validateTabs(this._tabs),this.validateBehavior(this._behavior)}componentDidRender(){if(this.handleTabPanels(),this.tabPanelHost instanceof HTMLDivElement)for(let t=0;t<this.tabPanelHost.children.length;t++)t!==this.state._selected?this.tabPanelHost.children[t].setAttribute("hidden",""):this.tabPanelHost.children[t].removeAttribute("hidden")}focusTabById(t){if(this.tabPanelsElement){const e=koliBriQuerySelector(`button#${this.state._label.replace(/\s/g,"-")}-tab-${t}`,this.tabPanelsElement);null==e||e.focus()}}onSelect(t,e){var n,a;null===(a=null===(n=this._on)||void 0===n?void 0:n.onSelect)||void 0===a||a.call(n,t,e),this.focusTabById(e)}get host(){return this}static get watchers(){return{_align:["validateAlign"],_behavior:["validateBehavior"],_label:["validateLabel"],_on:["validateOn"],_selected:["validateSelected"],_tabs:["validateTabs"]}}static get style(){return{default:KolTabsDefaultStyle0}}},[33,"kol-tabs",{_align:[1],_behavior:[1],_label:[1],_on:[16],_selected:[1538],_tabs:[1],state:[32]},void 0,{_align:["validateAlign"],_behavior:["validateBehavior"],_label:["validateLabel"],_on:["validateOn"],_selected:["validateSelected"],_tabs:["validateTabs"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-tabs"].forEach((t=>{if("kol-tabs"===t)customElements.get(t)||customElements.define(t,KolTabs$1)}))}const KolTabs=KolTabs$1,defineCustomElement=defineCustomElement$1;export{KolTabs,defineCustomElement};