@ids-group-ltd/ids-design-system 0.11.4 → 0.12.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 (266) hide show
  1. package/CHANGELOG.md +373 -53
  2. package/components/README.md +86 -0
  3. package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs +85 -0
  4. package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs.map +1 -0
  5. package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs +70 -0
  6. package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs.map +1 -0
  7. package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs +573 -0
  8. package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs.map +1 -0
  9. package/fesm2022/ids-group-ltd-ids-design-system-components-auth-layout.mjs +86 -0
  10. package/fesm2022/ids-group-ltd-ids-design-system-components-auth-layout.mjs.map +1 -0
  11. package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs +615 -0
  12. package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs.map +1 -0
  13. package/fesm2022/ids-group-ltd-ids-design-system-components-avatar-group.mjs +30 -0
  14. package/fesm2022/ids-group-ltd-ids-design-system-components-avatar-group.mjs.map +1 -0
  15. package/fesm2022/ids-group-ltd-ids-design-system-components-avatar.mjs +188 -0
  16. package/fesm2022/ids-group-ltd-ids-design-system-components-avatar.mjs.map +1 -0
  17. package/fesm2022/ids-group-ltd-ids-design-system-components-badge.mjs +59 -0
  18. package/fesm2022/ids-group-ltd-ids-design-system-components-badge.mjs.map +1 -0
  19. package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs +92 -0
  20. package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs.map +1 -0
  21. package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs +204 -0
  22. package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs.map +1 -0
  23. package/fesm2022/ids-group-ltd-ids-design-system-components-breadcrumbs.mjs +100 -0
  24. package/fesm2022/ids-group-ltd-ids-design-system-components-breadcrumbs.mjs.map +1 -0
  25. package/fesm2022/ids-group-ltd-ids-design-system-components-button-group.mjs +23 -0
  26. package/fesm2022/ids-group-ltd-ids-design-system-components-button-group.mjs.map +1 -0
  27. package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs +180 -0
  28. package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs.map +1 -0
  29. package/fesm2022/ids-group-ltd-ids-design-system-components-calendar-day.mjs +78 -0
  30. package/fesm2022/ids-group-ltd-ids-design-system-components-calendar-day.mjs.map +1 -0
  31. package/fesm2022/ids-group-ltd-ids-design-system-components-card.mjs +49 -0
  32. package/fesm2022/ids-group-ltd-ids-design-system-components-card.mjs.map +1 -0
  33. package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs +73 -0
  34. package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs.map +1 -0
  35. package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs +397 -0
  36. package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs.map +1 -0
  37. package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs +1231 -0
  38. package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs.map +1 -0
  39. package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs +51 -0
  40. package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs.map +1 -0
  41. package/fesm2022/ids-group-ltd-ids-design-system-components-divider.mjs +35 -0
  42. package/fesm2022/ids-group-ltd-ids-design-system-components-divider.mjs.map +1 -0
  43. package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs +109 -0
  44. package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs.map +1 -0
  45. package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs +111 -0
  46. package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs.map +1 -0
  47. package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs +52 -0
  48. package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs.map +1 -0
  49. package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs +92 -0
  50. package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs.map +1 -0
  51. package/fesm2022/ids-group-ltd-ids-design-system-components-field-message.mjs +62 -0
  52. package/fesm2022/ids-group-ltd-ids-design-system-components-field-message.mjs.map +1 -0
  53. package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs +164 -0
  54. package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs.map +1 -0
  55. package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs +85 -0
  56. package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs.map +1 -0
  57. package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs +223 -0
  58. package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs.map +1 -0
  59. package/fesm2022/ids-group-ltd-ids-design-system-components-layout.mjs +63 -0
  60. package/fesm2022/ids-group-ltd-ids-design-system-components-layout.mjs.map +1 -0
  61. package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs +53 -0
  62. package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs.map +1 -0
  63. package/fesm2022/ids-group-ltd-ids-design-system-components-loading-overlay.mjs +43 -0
  64. package/fesm2022/ids-group-ltd-ids-design-system-components-loading-overlay.mjs.map +1 -0
  65. package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs +293 -0
  66. package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs.map +1 -0
  67. package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs +329 -0
  68. package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs.map +1 -0
  69. package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs +612 -0
  70. package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -0
  71. package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs +69 -0
  72. package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs.map +1 -0
  73. package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs +191 -0
  74. package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs.map +1 -0
  75. package/fesm2022/ids-group-ltd-ids-design-system-components-page-footer.mjs +23 -0
  76. package/fesm2022/ids-group-ltd-ids-design-system-components-page-footer.mjs.map +1 -0
  77. package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs +43 -0
  78. package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs.map +1 -0
  79. package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs +85 -0
  80. package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs.map +1 -0
  81. package/fesm2022/ids-group-ltd-ids-design-system-components-password-rules.mjs +95 -0
  82. package/fesm2022/ids-group-ltd-ids-design-system-components-password-rules.mjs.map +1 -0
  83. package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs +240 -0
  84. package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs.map +1 -0
  85. package/fesm2022/ids-group-ltd-ids-design-system-components-progress.mjs +41 -0
  86. package/fesm2022/ids-group-ltd-ids-design-system-components-progress.mjs.map +1 -0
  87. package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs +248 -0
  88. package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs.map +1 -0
  89. package/fesm2022/ids-group-ltd-ids-design-system-components-reserve-messages.mjs +62 -0
  90. package/fesm2022/ids-group-ltd-ids-design-system-components-reserve-messages.mjs.map +1 -0
  91. package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs +173 -0
  92. package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs.map +1 -0
  93. package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs +123 -0
  94. package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs.map +1 -0
  95. package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs +461 -0
  96. package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs.map +1 -0
  97. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav-footer.mjs +107 -0
  98. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav-footer.mjs.map +1 -0
  99. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs +185 -0
  100. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs.map +1 -0
  101. package/fesm2022/ids-group-ltd-ids-design-system-components-skeleton.mjs +32 -0
  102. package/fesm2022/ids-group-ltd-ids-design-system-components-skeleton.mjs.map +1 -0
  103. package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs +204 -0
  104. package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs.map +1 -0
  105. package/fesm2022/ids-group-ltd-ids-design-system-components-spinner.mjs +25 -0
  106. package/fesm2022/ids-group-ltd-ids-design-system-components-spinner.mjs.map +1 -0
  107. package/fesm2022/ids-group-ltd-ids-design-system-components-split-button.mjs +63 -0
  108. package/fesm2022/ids-group-ltd-ids-design-system-components-split-button.mjs.map +1 -0
  109. package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs +99 -0
  110. package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs.map +1 -0
  111. package/fesm2022/ids-group-ltd-ids-design-system-components-status-dot.mjs +26 -0
  112. package/fesm2022/ids-group-ltd-ids-design-system-components-status-dot.mjs.map +1 -0
  113. package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs +74 -0
  114. package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs.map +1 -0
  115. package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs +76 -0
  116. package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs.map +1 -0
  117. package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.mjs +440 -0
  118. package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.mjs.map +1 -0
  119. package/fesm2022/ids-group-ltd-ids-design-system-components-table-export.mjs +186 -0
  120. package/fesm2022/ids-group-ltd-ids-design-system-components-table-export.mjs.map +1 -0
  121. package/fesm2022/ids-group-ltd-ids-design-system-components-table-resize.mjs +227 -0
  122. package/fesm2022/ids-group-ltd-ids-design-system-components-table-resize.mjs.map +1 -0
  123. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +1593 -0
  124. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -0
  125. package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs +381 -0
  126. package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs.map +1 -0
  127. package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs +44 -0
  128. package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs.map +1 -0
  129. package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs +158 -0
  130. package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs.map +1 -0
  131. package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +671 -0
  132. package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -0
  133. package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.mjs +41 -0
  134. package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.mjs.map +1 -0
  135. package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs +549 -0
  136. package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs.map +1 -0
  137. package/fesm2022/ids-group-ltd-ids-design-system-components-toggle-button.mjs +34 -0
  138. package/fesm2022/ids-group-ltd-ids-design-system-components-toggle-button.mjs.map +1 -0
  139. package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs +218 -0
  140. package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs.map +1 -0
  141. package/fesm2022/ids-group-ltd-ids-design-system-components-topbar.mjs +18 -0
  142. package/fesm2022/ids-group-ltd-ids-design-system-components-topbar.mjs.map +1 -0
  143. package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs +153 -0
  144. package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs.map +1 -0
  145. package/fesm2022/ids-group-ltd-ids-design-system-components-w3w.mjs +48 -0
  146. package/fesm2022/ids-group-ltd-ids-design-system-components-w3w.mjs.map +1 -0
  147. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +1338 -0
  148. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -0
  149. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +333 -0
  150. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -0
  151. package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs +65 -0
  152. package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs.map +1 -0
  153. package/fesm2022/ids-group-ltd-ids-design-system-overlay.mjs +56 -0
  154. package/fesm2022/ids-group-ltd-ids-design-system-overlay.mjs.map +1 -0
  155. package/fesm2022/ids-group-ltd-ids-design-system-theme.mjs +37 -0
  156. package/fesm2022/ids-group-ltd-ids-design-system-theme.mjs.map +1 -0
  157. package/fesm2022/ids-group-ltd-ids-design-system.mjs +75 -14267
  158. package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
  159. package/migrations/0.10.0.json +1 -1
  160. package/migrations/0.10.1.json +1 -1
  161. package/migrations/0.10.2.json +1 -30
  162. package/migrations/0.11.0.json +0 -2
  163. package/migrations/0.11.1.json +2 -24
  164. package/migrations/0.11.2.json +2 -1
  165. package/migrations/0.11.3.json +3 -2
  166. package/migrations/0.11.4.json +32 -6
  167. package/migrations/0.12.0.json +22 -0
  168. package/migrations/0.12.1.json +215 -0
  169. package/migrations/0.4.0.json +2 -1
  170. package/migrations/0.5.0.json +0 -54
  171. package/migrations/0.5.1.json +3 -1
  172. package/migrations/0.7.0.json +0 -11
  173. package/migrations/0.7.1.json +2 -1
  174. package/migrations/0.9.0.json +22 -3
  175. package/migrations/0.9.1.json +1 -1
  176. package/package.json +597 -1
  177. package/styles/_check-box.scss +84 -0
  178. package/styles/_check-mark.scss +59 -0
  179. package/styles/_dropdown-overlay.scss +12 -2
  180. package/styles/_field-group-segment.scss +4 -1
  181. package/styles/_focus.scss +103 -50
  182. package/styles/_link.scss +4 -2
  183. package/styles/_tokens.scss +20 -0
  184. package/styles/_typography.scss +6 -0
  185. package/themes/README.md +4 -4
  186. package/themes/_semantic.scss +7 -8
  187. package/types/ids-group-ltd-ids-design-system-components-accordion.d.ts +48 -0
  188. package/types/ids-group-ltd-ids-design-system-components-alert.d.ts +32 -0
  189. package/types/ids-group-ltd-ids-design-system-components-app-layout.d.ts +260 -0
  190. package/types/ids-group-ltd-ids-design-system-components-auth-layout.d.ts +75 -0
  191. package/types/ids-group-ltd-ids-design-system-components-autocomplete.d.ts +226 -0
  192. package/types/ids-group-ltd-ids-design-system-components-avatar-group.d.ts +13 -0
  193. package/types/ids-group-ltd-ids-design-system-components-avatar.d.ts +99 -0
  194. package/types/ids-group-ltd-ids-design-system-components-badge.d.ts +25 -0
  195. package/types/ids-group-ltd-ids-design-system-components-banner.d.ts +41 -0
  196. package/types/ids-group-ltd-ids-design-system-components-bottom-sheet.d.ts +61 -0
  197. package/types/ids-group-ltd-ids-design-system-components-breadcrumbs.d.ts +66 -0
  198. package/types/ids-group-ltd-ids-design-system-components-button-group.d.ts +10 -0
  199. package/types/ids-group-ltd-ids-design-system-components-button.d.ts +90 -0
  200. package/types/ids-group-ltd-ids-design-system-components-calendar-day.d.ts +41 -0
  201. package/types/ids-group-ltd-ids-design-system-components-card.d.ts +24 -0
  202. package/types/ids-group-ltd-ids-design-system-components-checkbox.d.ts +41 -0
  203. package/types/ids-group-ltd-ids-design-system-components-color-picker.d.ts +79 -0
  204. package/types/ids-group-ltd-ids-design-system-components-date-picker.d.ts +251 -0
  205. package/types/ids-group-ltd-ids-design-system-components-description-list.d.ts +25 -0
  206. package/types/ids-group-ltd-ids-design-system-components-divider.d.ts +22 -0
  207. package/types/ids-group-ltd-ids-design-system-components-drawer.d.ts +38 -0
  208. package/types/ids-group-ltd-ids-design-system-components-dropzone.d.ts +45 -0
  209. package/types/ids-group-ltd-ids-design-system-components-empty-state.d.ts +22 -0
  210. package/types/ids-group-ltd-ids-design-system-components-field-group.d.ts +73 -0
  211. package/types/ids-group-ltd-ids-design-system-components-field-message.d.ts +36 -0
  212. package/types/ids-group-ltd-ids-design-system-components-filter-bar.d.ts +83 -0
  213. package/types/ids-group-ltd-ids-design-system-components-icon-button.d.ts +56 -0
  214. package/types/ids-group-ltd-ids-design-system-components-input.d.ts +121 -0
  215. package/types/ids-group-ltd-ids-design-system-components-layout.d.ts +39 -0
  216. package/types/ids-group-ltd-ids-design-system-components-list.d.ts +29 -0
  217. package/types/ids-group-ltd-ids-design-system-components-loading-overlay.d.ts +31 -0
  218. package/types/ids-group-ltd-ids-design-system-components-menu.d.ts +85 -0
  219. package/types/ids-group-ltd-ids-design-system-components-modal.d.ts +124 -0
  220. package/types/ids-group-ltd-ids-design-system-components-multi-select.d.ts +213 -0
  221. package/types/ids-group-ltd-ids-design-system-components-number-stepper.d.ts +31 -0
  222. package/types/ids-group-ltd-ids-design-system-components-otp-input.d.ts +52 -0
  223. package/types/ids-group-ltd-ids-design-system-components-page-footer.d.ts +13 -0
  224. package/types/ids-group-ltd-ids-design-system-components-page-header.d.ts +21 -0
  225. package/types/ids-group-ltd-ids-design-system-components-pagination.d.ts +32 -0
  226. package/types/ids-group-ltd-ids-design-system-components-password-rules.d.ts +80 -0
  227. package/types/ids-group-ltd-ids-design-system-components-popover.d.ts +48 -0
  228. package/types/ids-group-ltd-ids-design-system-components-progress.d.ts +22 -0
  229. package/types/ids-group-ltd-ids-design-system-components-radio-group.d.ts +110 -0
  230. package/types/ids-group-ltd-ids-design-system-components-reserve-messages.d.ts +33 -0
  231. package/types/ids-group-ltd-ids-design-system-components-search.d.ts +82 -0
  232. package/types/ids-group-ltd-ids-design-system-components-segmented.d.ts +40 -0
  233. package/types/ids-group-ltd-ids-design-system-components-select.d.ts +152 -0
  234. package/types/ids-group-ltd-ids-design-system-components-sidenav-footer.d.ts +92 -0
  235. package/types/ids-group-ltd-ids-design-system-components-sidenav.d.ts +131 -0
  236. package/types/ids-group-ltd-ids-design-system-components-skeleton.d.ts +16 -0
  237. package/types/ids-group-ltd-ids-design-system-components-slider.d.ts +51 -0
  238. package/types/ids-group-ltd-ids-design-system-components-spinner.d.ts +11 -0
  239. package/types/ids-group-ltd-ids-design-system-components-split-button.d.ts +39 -0
  240. package/types/ids-group-ltd-ids-design-system-components-stat.d.ts +44 -0
  241. package/types/ids-group-ltd-ids-design-system-components-status-dot.d.ts +12 -0
  242. package/types/ids-group-ltd-ids-design-system-components-stepper.d.ts +32 -0
  243. package/types/ids-group-ltd-ids-design-system-components-switch.d.ts +40 -0
  244. package/types/ids-group-ltd-ids-design-system-components-table-columns.d.ts +43 -0
  245. package/types/ids-group-ltd-ids-design-system-components-table-export.d.ts +48 -0
  246. package/types/ids-group-ltd-ids-design-system-components-table-resize.d.ts +79 -0
  247. package/types/ids-group-ltd-ids-design-system-components-table.d.ts +815 -0
  248. package/types/ids-group-ltd-ids-design-system-components-tabs.d.ts +118 -0
  249. package/types/ids-group-ltd-ids-design-system-components-tag.d.ts +26 -0
  250. package/types/ids-group-ltd-ids-design-system-components-textarea.d.ts +85 -0
  251. package/types/ids-group-ltd-ids-design-system-components-time-picker.d.ts +188 -0
  252. package/types/ids-group-ltd-ids-design-system-components-timeline.d.ts +24 -0
  253. package/types/ids-group-ltd-ids-design-system-components-toast.d.ts +167 -0
  254. package/types/ids-group-ltd-ids-design-system-components-toggle-button.d.ts +18 -0
  255. package/types/ids-group-ltd-ids-design-system-components-tooltip.d.ts +66 -0
  256. package/types/ids-group-ltd-ids-design-system-components-topbar.d.ts +8 -0
  257. package/types/ids-group-ltd-ids-design-system-components-tree.d.ts +46 -0
  258. package/types/ids-group-ltd-ids-design-system-components-w3w.d.ts +18 -0
  259. package/types/ids-group-ltd-ids-design-system-components.d.ts +604 -0
  260. package/types/ids-group-ltd-ids-design-system-core.d.ts +436 -0
  261. package/types/ids-group-ltd-ids-design-system-icons.d.ts +52 -0
  262. package/types/ids-group-ltd-ids-design-system-overlay.d.ts +32 -0
  263. package/types/ids-group-ltd-ids-design-system-theme.d.ts +29 -0
  264. package/types/ids-group-ltd-ids-design-system.d.ts +75 -5594
  265. package/LICENSE +0 -21
  266. package/README.md +0 -73
@@ -0,0 +1,1593 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, inject, TemplateRef, Directive, signal, Injectable, booleanAttribute, computed, model, output, linkedSignal, contentChildren, viewChild, ViewContainerRef, Injector, DestroyRef, afterNextRender, ElementRef, effect, ViewEncapsulation, Component } from '@angular/core';
3
+ import { RouterLink } from '@angular/router';
4
+ import { resolveWithConfig, devWarn } from '@ids-group-ltd/ids-design-system/core';
5
+ import { NgTemplateOutlet } from '@angular/common';
6
+ import { IconComponent } from '@ids-group-ltd/ids-design-system/icons';
7
+ import { SkeletonComponent } from '@ids-group-ltd/ids-design-system/components/skeleton';
8
+ import { PaginationComponent } from '@ids-group-ltd/ids-design-system/components/pagination';
9
+ import { LoadingOverlayComponent } from '@ids-group-ltd/ids-design-system/components/loading-overlay';
10
+ import { PopoverComponent } from '@ids-group-ltd/ids-design-system/components/popover';
11
+ import { MenuComponent, MenuItemComponent } from '@ids-group-ltd/ids-design-system/components/menu';
12
+
13
+ /**
14
+ * Projects a custom cell template into <ds-table> for a specific column.
15
+ *
16
+ * Usage:
17
+ * <ds-table [data]="rows" [columns]="cols">
18
+ * <ng-template dsCellTemplate="product" let-row>
19
+ * <div>{{ asRule(row).product }}</div>
20
+ * </ng-template>
21
+ * </ds-table>
22
+ *
23
+ * The template context type is `unknown` because Angular cannot propagate
24
+ * the parent <ds-table>'s row type to projected templates. Consumers should
25
+ * narrow the row with a typed helper method on the host component.
26
+ *
27
+ * Context shape:
28
+ * - $implicit: the row object (typed `unknown`)
29
+ * - row: alias for the row object (typed `unknown`)
30
+ */
31
+ class CellTemplateDirective {
32
+ /** The `key` of the column this template replaces, matched against the table's
33
+ * `columns`. A key no column declares renders nothing and warns nowhere. */
34
+ dsCellTemplate = input.required(...(ngDevMode ? [{ debugName: "dsCellTemplate" }] : /* istanbul ignore next */ []));
35
+ template = inject((TemplateRef));
36
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: CellTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
37
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.22", type: CellTemplateDirective, isStandalone: true, selector: "[dsCellTemplate]", inputs: { dsCellTemplate: { classPropertyName: "dsCellTemplate", publicName: "dsCellTemplate", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 });
38
+ }
39
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: CellTemplateDirective, decorators: [{
40
+ type: Directive,
41
+ args: [{
42
+ selector: '[dsCellTemplate]',
43
+ standalone: true,
44
+ }]
45
+ }], propDecorators: { dsCellTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "dsCellTemplate", required: true }] }] } });
46
+
47
+ /**
48
+ * Projects a custom filter into a `ds-table` header popover, for a criterion the
49
+ * built-in checklist cannot express: a date range, a numeric threshold, an async
50
+ * option list.
51
+ *
52
+ * ```html
53
+ * <ds-table [data]="rows" [columns]="cols">
54
+ * <ng-template
55
+ * dsHeaderFilter="opened"
56
+ * [active]="!!range()"
57
+ * let-close="close"
58
+ * >
59
+ * <ds-date-picker mode="range" [(value)]="range" />
60
+ * <ds-button size="sm" (pressed)="apply(); close()">Apply</ds-button>
61
+ * </ng-template>
62
+ * </ds-table>
63
+ * ```
64
+ *
65
+ * The table still owns the header button, the popover and the active-filter
66
+ * styling — only the panel's contents change. It cannot know whether YOUR
67
+ * criterion is set, though, so `active` is how the highlight gets told; without
68
+ * it a custom filter renders but the header never marks itself filtered.
69
+ *
70
+ * The column is typed `unknown` for the same reason `dsCellTemplate`'s row is:
71
+ * Angular cannot propagate the parent table's row type into a projected
72
+ * template. Narrow it with a typed helper on the host.
73
+ */
74
+ class HeaderFilterDirective {
75
+ /** Key of the column this filter belongs to. */
76
+ dsHeaderFilter = input.required(...(ngDevMode ? [{ debugName: "dsHeaderFilter" }] : /* istanbul ignore next */ []));
77
+ /** Whether YOUR criterion is currently set, which drives the header's
78
+ * active-filter styling. */
79
+ active = input(false, ...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
80
+ template = inject((TemplateRef));
81
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HeaderFilterDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
82
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.22", type: HeaderFilterDirective, isStandalone: true, selector: "ng-template[dsHeaderFilter]", inputs: { dsHeaderFilter: { classPropertyName: "dsHeaderFilter", publicName: "dsHeaderFilter", isSignal: true, isRequired: true, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
83
+ }
84
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HeaderFilterDirective, decorators: [{
85
+ type: Directive,
86
+ args: [{
87
+ selector: 'ng-template[dsHeaderFilter]',
88
+ standalone: true,
89
+ }]
90
+ }], propDecorators: { dsHeaderFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "dsHeaderFilter", required: true }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }] } });
91
+
92
+ /**
93
+ * The seam an opt-in table feature writes into, so the table never names the feature.
94
+ *
95
+ * The ablation that priced this split (`docs/basic-advanced-split-audit.md` §9) kept hitting the
96
+ * same shape: the table owns a derived value and a feature wants to contribute to it —
97
+ * `visibleColumns` is the chain the column picker writes to, `filteredData` folds the set filters
98
+ * into the substring search, the live region folds in the export state. Moving methods out one at a
99
+ * time cannot express that; a registry of contributions can.
100
+ *
101
+ * @internal Not API. Provided by `ds-table` on itself, so a directive on the same element injects
102
+ * the instance it belongs to and two tables on one screen stay independent.
103
+ */
104
+ class DsTableLayout {
105
+ columnStages = signal([], ...(ngDevMode ? [{ debugName: "columnStages" }] : /* istanbul ignore next */ []));
106
+ rowStages = signal([], ...(ngDevMode ? [{ debugName: "rowStages" }] : /* istanbul ignore next */ []));
107
+ statusFragments = signal([], ...(ngDevMode ? [{ debugName: "statusFragments" }] : /* istanbul ignore next */ []));
108
+ /** Registered once, at the contributing directive's construction — never per change
109
+ * detection. A stage may read signals of its own: the fold runs inside the table's
110
+ * `computed`, so whatever the stage touches is tracked by that computed rather than by
111
+ * this service, which is what lets a feature stay reactive without the table knowing it
112
+ * exists. */
113
+ addColumnStage(stage) {
114
+ this.columnStages.update((stages) => [...stages, stage]);
115
+ }
116
+ addRowStage(stage) {
117
+ this.rowStages.update((stages) => [...stages, stage]);
118
+ }
119
+ utilityColumnWanted = signal(false, ...(ngDevMode ? [{ debugName: "utilityColumnWanted" }] : /* istanbul ignore next */ []));
120
+ /** The utility column carries the row-action kebab and the picker trigger. The table knows
121
+ * about the first and must be told about the second, or the cell it anchors into is never
122
+ * rendered and the feature has nowhere to go. */
123
+ requestUtilityColumn() {
124
+ this.utilityColumnWanted.set(true);
125
+ }
126
+ wantsUtilityColumn() {
127
+ return this.utilityColumnWanted();
128
+ }
129
+ slices = signal([], ...(ngDevMode ? [{ debugName: "slices" }] : /* istanbul ignore next */ []));
130
+ addPersistedSlice(slice) {
131
+ this.slices.update((registered) => [...registered, slice]);
132
+ }
133
+ persistedSlices() {
134
+ return this.slices();
135
+ }
136
+ resetPersisted() {
137
+ for (const slice of this.slices()) {
138
+ slice.reset();
139
+ }
140
+ }
141
+ rowTemplate = signal(null, ...(ngDevMode ? [{ debugName: "rowTemplate" }] : /* istanbul ignore next */ []));
142
+ /** A per-column control in the column panel, for a feature the panel must not name - resize
143
+ * puts its width buttons there. */
144
+ registerPanelRowTemplate(template) {
145
+ this.rowTemplate.set(template);
146
+ }
147
+ panelRowTemplate() {
148
+ return this.rowTemplate();
149
+ }
150
+ /** A line for the live region, folded in ahead of the table's own events. */
151
+ addStatusFragment(fragment) {
152
+ this.statusFragments.update((fragments) => [...fragments, fragment]);
153
+ }
154
+ foldColumns(columns) {
155
+ return this.columnStages().reduce((carried, stage) => stage(carried), columns);
156
+ }
157
+ foldRows(rows) {
158
+ return this.rowStages().reduce((carried, stage) => stage(carried), rows);
159
+ }
160
+ /** Empty when nothing contributes, so the table's own message is unchanged. */
161
+ status() {
162
+ return this.statusFragments()
163
+ .map((fragment) => fragment())
164
+ .filter(Boolean)
165
+ .join('. ');
166
+ }
167
+ published = null;
168
+ exportContribution = signal(null, ...(ngDevMode ? [{ debugName: "exportContribution" }] : /* istanbul ignore next */ []));
169
+ /** Called by the table itself, before any directive can ask for it: a directive on the same
170
+ * element is constructed after the component that provides this service. */
171
+ publish(view) {
172
+ this.published = view;
173
+ }
174
+ view() {
175
+ if (!this.published) {
176
+ throw new Error('DsTableLayout was read before ds-table published its view — a feature directive must sit on the ds-table element.');
177
+ }
178
+ return this.published;
179
+ }
180
+ /** The table keeps `runExport()` and `exporting()` as public API, because their docblocks
181
+ * promise a button outside the table can drive them. The implementation is the feature's, so
182
+ * the table asks here and can tell the difference between "no export directive" and "nothing
183
+ * to export" — which is the one silent failure this whole shape is prone to. */
184
+ setExport(contribution) {
185
+ this.exportContribution.set(contribution);
186
+ }
187
+ runExport() {
188
+ return this.exportContribution()?.run() ?? null;
189
+ }
190
+ /** True when it ran, so the caller can tell "no feature" from "nothing to export". */
191
+ exportCsv(filename, rows) {
192
+ const contribution = this.exportContribution();
193
+ contribution?.csv(filename, rows);
194
+ return contribution !== null;
195
+ }
196
+ exporting() {
197
+ return this.exportContribution()?.exporting() ?? false;
198
+ }
199
+ resizeContribution = signal(null, ...(ngDevMode ? [{ debugName: "resizeContribution" }] : /* istanbul ignore next */ []));
200
+ setResize(contribution) {
201
+ this.resizeContribution.set(contribution);
202
+ }
203
+ /** Null when no resize feature is present, which is what the header's `@if` reads. */
204
+ resize() {
205
+ return this.resizeContribution();
206
+ }
207
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DsTableLayout, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
208
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DsTableLayout });
209
+ }
210
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DsTableLayout, decorators: [{
211
+ type: Injectable
212
+ }] });
213
+
214
+ const NUMERIC = /^-?\d+(\.\d+)?$/;
215
+ // Assumed viewport until the scroller has been measured. Tall enough to fill a
216
+ // laptop screen, so the first paint is not visibly short, and nowhere near the
217
+ // row count a virtualized table is reached for.
218
+ const VIRTUAL_FALLBACK_HEIGHT = 720;
219
+ // Rows kept rendered past each edge of the viewport, so a flick does not expose
220
+ // blank space before the next range lands.
221
+ const VIRTUAL_OVERSCAN = 6;
222
+ /** Rendered values that read as "no data", matched case-insensitively. Wider
223
+ * than the empty string because consumers render placeholders. */
224
+ const BLANK_CELL = new Set(['', '—', '-', '–', 'n/a', 'never', 'none']);
225
+ /** Normalises "no data" to a single `null`, so the comparator has one blank
226
+ * case to test and TypeScript narrows the rest without a cast. */
227
+ function sortableOf(value) {
228
+ if (value === null || value === undefined) {
229
+ return null;
230
+ }
231
+ if (typeof value === 'string' && BLANK_CELL.has(value.trim().toLowerCase())) {
232
+ return null;
233
+ }
234
+ return value;
235
+ }
236
+ /** Both sides are known non-blank here. `numeric: true` keeps "item 10" after
237
+ * "item 9" instead of before it. */
238
+ function compareSortValues(first, second) {
239
+ if (first instanceof Date && second instanceof Date) {
240
+ return first.getTime() - second.getTime();
241
+ }
242
+ if (typeof first === 'number' && typeof second === 'number') {
243
+ return first - second;
244
+ }
245
+ const firstText = String(first);
246
+ const secondText = String(second);
247
+ if (NUMERIC.test(firstText) && NUMERIC.test(secondText)) {
248
+ return Number(firstText) - Number(secondText);
249
+ }
250
+ // `sensitivity: 'base'` so "Ångström" sorts next to "Angstrom" and casing does
251
+ // not split a column into two runs.
252
+ return firstText.localeCompare(secondText, undefined, {
253
+ numeric: true,
254
+ sensitivity: 'base',
255
+ });
256
+ }
257
+ class TableComponent {
258
+ /** Rows to render. */
259
+ data = input.required(...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
260
+ /** Row identity used for tracking, selection, expansion and the active-row
261
+ * highlight. Defaults to `row.id`; pass an accessor for display-only data
262
+ * with no natural key (`[rowId]="row => row.channel + row.sentAt"`), which
263
+ * beats mapping synthetic ids into the data just to satisfy the table. */
264
+ rowId = input(null, ...(ngDevMode ? [{ debugName: "rowId" }] : /* istanbul ignore next */ []));
265
+ /** Column definitions driving headers, cells and sorting. */
266
+ columns = input.required(...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
267
+ /** Adds a checkbox column for row/select-all selection. */
268
+ selectable = input(false, { ...(ngDevMode ? { debugName: "selectable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
269
+ /** Opt-in outer border + radius. Off by default so tables flush inside a
270
+ * `<ds-card padding="none">` don't double-border.
271
+ * When `true`, the scroll-wrap gets a `var(--border-default)` outline and
272
+ * `var(--radius-md)` radius — useful when the table stands alone in a padded card.
273
+ * Unset falls back to `DS_CONFIG.table.bordered`, then `false`. */
274
+ bordered = input(null, { ...(ngDevMode ? { debugName: "bordered" } : /* istanbul ignore next */ {}), transform: (value) => (value == null ? null : booleanAttribute(value)) });
275
+ /** false — no loading state.
276
+ * `true` — the table picks: skeleton rows while it has nothing to show, overlay
277
+ * once rows are on screen. Prefer it; the right choice is a function of the row
278
+ * count, which only the table holds.
279
+ * 'skeleton' — first-load placeholder; rows are replaced with shimmer rows.
280
+ * 'overlay' — re-fetch indicator; existing rows stay visible behind
281
+ * a translucent overlay with a centred spinner. Pin either one only to
282
+ * override the rule deliberately. */
283
+ loading = input(false, ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
284
+ /** The mode actually rendered. Skeletons replace what the reader is looking at and
285
+ * an overlay on an empty card says nothing, so `true` resolves per state rather
286
+ * than picking a favourite. */
287
+ loadingMode = computed(() => {
288
+ const loading = this.loading();
289
+ if (loading === false) {
290
+ return false;
291
+ }
292
+ if (loading === true) {
293
+ return this.filteredData().length ? 'overlay' : 'skeleton';
294
+ }
295
+ return loading;
296
+ }, ...(ngDevMode ? [{ debugName: "loadingMode" }] : /* istanbul ignore next */ []));
297
+ /** Keeps the header row pinned while the body scrolls. */
298
+ stickyHeader = input(true, { ...(ngDevMode ? { debugName: "stickyHeader" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
299
+ /** Caps the scroll body height (any CSS length, e.g. `'320px'`) and scrolls it
300
+ * vertically — pair with `stickyHeader` for a self-contained scroll region.
301
+ * `null` (default) lets the table grow to its content. */
302
+ maxHeight = input(null, ...(ngDevMode ? [{ debugName: "maxHeight" }] : /* istanbul ignore next */ []));
303
+ /** Row density — `'compact'` tightens cell padding for spreadsheet-dense lists. */
304
+ density = input('default', ...(ngDevMode ? [{ debugName: "density" }] : /* istanbul ignore next */ []));
305
+ /** Tints odd rows for easier row-tracking across wide tables. */
306
+ zebra = input(false, { ...(ngDevMode ? { debugName: "zebra" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
307
+ /** Animate the body height when the row set changes (page/filter) instead of
308
+ * snapping. Opt-in; instant under reduced-motion (the DS zeroes the token). */
309
+ animateHeight = input(false, { ...(ngDevMode ? { debugName: "animateHeight" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
310
+ /** Two-way set of currently selected row ids. */
311
+ selectedIds = model(new Set(), ...(ngDevMode ? [{ debugName: "selectedIds" }] : /* istanbul ignore next */ []));
312
+ /** Column key currently sorted by; `null` when unsorted. Two-way bindable
313
+ * (`[(sortKey)]`) or one-way from your own state with `(sortChange)`. */
314
+ sortKey = input(null, ...(ngDevMode ? [{ debugName: "sortKey" }] : /* istanbul ignore next */ []));
315
+ /** Emitted for `[(sortKey)]`. `sortChange` carries the same click with both
316
+ * halves at once, which is usually the one to listen to. */
317
+ sortKeyChange = output();
318
+ /** Sort direction for `sortKey`. */
319
+ sortDir = input(null, ...(ngDevMode ? [{ debugName: "sortDir" }] : /* istanbul ignore next */ []));
320
+ /** Emitted for `[(sortDir)]`. */
321
+ sortDirChange = output();
322
+ /**
323
+ * What the header marks, and what a client sort reads.
324
+ *
325
+ * `linkedSignal` over BOTH inputs, not a `model`: Angular writes an input only
326
+ * when the bound expression changed, diffing against the value IT last wrote, and
327
+ * an internal `.set()` never updates that slot. Seeding from both means a host
328
+ * answering with its own default re-seeds the pair even when one half of that
329
+ * default equals what it last bound. A host that binds neither never re-seeds, so
330
+ * the optimistic state survives.
331
+ */
332
+ sortState = linkedSignal(() => ({ key: this.sortKey(), dir: this.sortDir() }), ...(ngDevMode ? [{ debugName: "sortState" }] : /* istanbul ignore next */ []));
333
+ activeSortKey = computed(() => this.sortState().key, ...(ngDevMode ? [{ debugName: "activeSortKey" }] : /* istanbul ignore next */ []));
334
+ activeSortDir = computed(() => this.sortState().dir, ...(ngDevMode ? [{ debugName: "activeSortDir" }] : /* istanbul ignore next */ []));
335
+ /** Sort states a column cycles through on click. Default includes null
336
+ * (unsorted); pass ['asc','desc'] to forbid the unsorted state (e.g.
337
+ * server-paged lists). */
338
+ sortingOrder = input(['asc', 'desc', null], ...(ngDevMode ? [{ debugName: "sortingOrder" }] : /* istanbul ignore next */ []));
339
+ /**
340
+ * Wording for the sort announcement, so it can be translated. Receives the
341
+ * column's label and the new direction; return an empty string to say nothing.
342
+ */
343
+ sortAnnouncement = input((label, dir) => dir
344
+ ? `Sorted by ${label}, ${dir === 'asc' ? 'ascending' : 'descending'}`
345
+ : `Sorting cleared`, ...(ngDevMode ? [{ debugName: "sortAnnouncement" }] : /* istanbul ignore next */ []));
346
+ /**
347
+ * Wording for the row-range announcement, so it can be translated. Receives
348
+ * the 1-based first and last row on screen and the total; return an empty
349
+ * string to say nothing.
350
+ */
351
+ rangeAnnouncement = input((first, last, total) => `Showing ${first}–${last} of ${total}`, ...(ngDevMode ? [{ debugName: "rangeAnnouncement" }] : /* istanbul ignore next */ []));
352
+ /** Number of shimmer rows rendered while `loading` is `'skeleton'`. */
353
+ skeletonRows = input(5, ...(ngDevMode ? [{ debugName: "skeletonRows" }] : /* istanbul ignore next */ []));
354
+ /** Accessible name for the table (rendered as a visually-hidden caption).
355
+ * Without it, screen-reader users get an unlabelled table. */
356
+ caption = input('', ...(ngDevMode ? [{ debugName: "caption" }] : /* istanbul ignore next */ []));
357
+ /** When true, each row becomes a keyboard-operable control (role=button,
358
+ * tabindex, Enter/Space → rowClicked) with an accessible name from the first
359
+ * column. Off by default so non-navigating tables don't advertise a false
360
+ * click affordance. Also the gate for the hover/pressed row tints. */
361
+ rowInteractive = input(false, { ...(ngDevMode ? { debugName: "rowInteractive" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
362
+ /** Id of the row rendered as current (highlight + `aria-current`) — e.g. the
363
+ * row whose detail drawer or side panel is open. `null` — none. */
364
+ activeRowId = input(null, ...(ngDevMode ? [{ debugName: "activeRowId" }] : /* istanbul ignore next */ []));
365
+ /** Client-side row filter — case-insensitive substring match against cell
366
+ * text. Columns with `filterable: true` restrict the match set (none
367
+ * marked — every column matches, hidden ones included). '' — no filtering. */
368
+ filterQuery = input('', ...(ngDevMode ? [{ debugName: "filterQuery" }] : /* istanbul ignore next */ []));
369
+ /** Two-way per-column set-filters: column key → the still-checked values.
370
+ * A column absent from the map (or with every value checked) is unfiltered. */
371
+ columnFilters = model(new Map(), ...(ngDevMode ? [{ debugName: "columnFilters" }] : /* istanbul ignore next */ []));
372
+ /** Round-trip whatever the column features persist (order, widths, hidden keys) through
373
+ * `localStorage`, so a reader's column layout survives a reload. Needs
374
+ * `storageKey` — without one there is nothing to key a screen by, and two
375
+ * tables would overwrite each other. Off by default. */
376
+ persistLayout = input(false, { ...(ngDevMode ? { debugName: "persistLayout" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
377
+ /** Screen id the persisted layout is stored under. Pick something stable per
378
+ * table, not per route instance. */
379
+ storageKey = input('', ...(ngDevMode ? [{ debugName: "storageKey" }] : /* istanbul ignore next */ []));
380
+ /** True while an export is in flight. Public so a button OUTSIDE the table can show the same
381
+ * state as the built-in one. `false` when no export directive is present. */
382
+ exporting = computed(() => this.layout.exporting(), ...(ngDevMode ? [{ debugName: "exporting" }] : /* istanbul ignore next */ []));
383
+ /** Keeps the horizontal scrollbar reachable on tall tables: the scroll
384
+ * container's native bar is hidden and a proxy stuck to the bottom of the
385
+ * nearest scroll ancestor mirrors it both ways. Off by default. Unset falls
386
+ * back to `DS_CONFIG.table.stickyScrollbar`, then `false`. */
387
+ stickyScrollbar = input(null, { ...(ngDevMode ? { debugName: "stickyScrollbar" } : /* istanbul ignore next */ {}), transform: (value) => (value == null ? null : booleanAttribute(value)) });
388
+ /** Rows per page. `null` (default) disables pagination — all rows render. */
389
+ pageSize = model(null, ...(ngDevMode ? [{ debugName: "pageSize" }] : /* istanbul ignore next */ []));
390
+ /** Current 1-based page. Only meaningful when `pageSize()` is set. */
391
+ page = model(1, ...(ngDevMode ? [{ debugName: "page" }] : /* istanbul ignore next */ []));
392
+ /** Selectable page-size choices shown in the pagination control. */
393
+ pageSizeOptions = input([10, 25, 50, 100], ...(ngDevMode ? [{ debugName: "pageSizeOptions" }] : /* istanbul ignore next */ []));
394
+ /** Shows the page-size picker in the footer pager. Set false for a table whose
395
+ * page size is fixed — the standalone `ds-pagination` has always taken this. */
396
+ showPageSize = input(true, { ...(ngDevMode ? { debugName: "showPageSize" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
397
+ /** Shows the "N of M" range label in the footer pager. */
398
+ showLabel = input(true, { ...(ngDevMode ? { debugName: "showLabel" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
399
+ /** Server-side total row count. `null` (default) = client paging: the table
400
+ * slices `data()` itself and the pager counts the rows in hand. When set, the
401
+ * host has already sliced to one page — the pager uses this count and the
402
+ * table renders `data()` as-is (no internal slice). */
403
+ total = input(null, ...(ngDevMode ? [{ debugName: "total" }] : /* istanbul ignore next */ []));
404
+ /** Scroll the table into view on a page change (opt-in) — keeps a bottom
405
+ * pager from leaving the viewport on the previous page's last rows. */
406
+ scrollToTopOnPageChange = input(false, { ...(ngDevMode ? { debugName: "scrollToTopOnPageChange" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
407
+ /** Who sorts — see `TableSortMode`. Unset resolves to `'server'`: the table
408
+ * emits `(sortChange)` and reorders nothing, which is what a paged table
409
+ * needs. Declare `'client'` when the table holds every row, or `'none'` to
410
+ * drop the affordance entirely. */
411
+ sortMode = input(null, ...(ngDevMode ? [{ debugName: "sortMode" }] : /* istanbul ignore next */ []));
412
+ /** Who filters — see `TableFilterMode`. Unset resolves to `'server'`: the
413
+ * table tracks the selection in `columnFilters` for the host to turn into a
414
+ * request, and runs no local pass. Declare `'client'` when the table holds
415
+ * every row and should filter them itself. */
416
+ filterMode = input(null, ...(ngDevMode ? [{ debugName: "filterMode" }] : /* istanbul ignore next */ []));
417
+ /**
418
+ * The full value domain per column key, for a header filter the table cannot
419
+ * derive itself. Without it the checklist is built from the rows in hand,
420
+ * which on a server-paged table offers only the values that happen to be on
421
+ * the current page.
422
+ */
423
+ columnFilterOptions = input(new Map(), ...(ngDevMode ? [{ debugName: "columnFilterOptions" }] : /* istanbul ignore next */ []));
424
+ filterModeResolved = computed(() => this.filterMode() ?? 'server', ...(ngDevMode ? [{ debugName: "filterModeResolved" }] : /* istanbul ignore next */ []));
425
+ sortModeResolved = computed(() => this.sortMode() ?? 'server', ...(ngDevMode ? [{ debugName: "sortModeResolved" }] : /* istanbul ignore next */ []));
426
+ borderedResolved = resolveWithConfig(this.bordered, (config) => config.table?.bordered, false);
427
+ stickyScrollbarResolved = resolveWithConfig(this.stickyScrollbar, (config) => config.table?.stickyScrollbar, false);
428
+ /** Pin the first data column (and the select column) on horizontal scroll. */
429
+ stickyFirstColumn = input(false, { ...(ngDevMode ? { debugName: "stickyFirstColumn" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
430
+ /**
431
+ * Render only the rows in view, padding the rest with two spacer rows. Opt-in,
432
+ * and it needs `maxHeight` — without a bounded scroller there is no viewport to
433
+ * window against, so nothing is virtualized (dev-warned).
434
+ *
435
+ * Every row must be the same height, which is `virtualRowSize`: the arithmetic
436
+ * that decides what is in view has no other way to know where a row starts. So
437
+ * virtual mode forces `table-layout: fixed` and single-line cells, and the
438
+ * expansion panel is suppressed — a row that can grow breaks the maths.
439
+ */
440
+ virtualScroll = input(false, { ...(ngDevMode ? { debugName: "virtualScroll" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
441
+ /** Row height in px in virtual mode. Must match what the rows actually
442
+ * measure, so it drives the CSS height rather than merely describing it. */
443
+ virtualRowSize = input(44, ...(ngDevMode ? [{ debugName: "virtualRowSize" }] : /* istanbul ignore next */ []));
444
+ /**
445
+ * Fetch rows as they scroll into view instead of receiving them all.
446
+ *
447
+ * `data` becomes a SPARSE array `total` long: put each fetched row at its
448
+ * absolute index and leave the rest empty. Every gap inside the window
449
+ * renders a skeleton row, and `(lazyLoad)` asks for the range covering it.
450
+ *
451
+ * Needs `virtualScroll` — without a window there is nothing to load
452
+ * lazily AGAINST — and `total`, which is what the scrollbar is sized from.
453
+ */
454
+ lazy = input(false, { ...(ngDevMode ? { debugName: "lazy" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
455
+ /** The range now on screen that `data` has gaps in — fetch it and write the
456
+ * rows back at their absolute indices. Re-emits only when the range moves. */
457
+ lazyLoad = output();
458
+ /** Fires with the row on click (or Enter/Space when `rowInteractive`). */
459
+ rowClicked = output();
460
+ /** Fires whenever sort key/direction changes, in every `sortMode` but `'none'`. */
461
+ sortChange = output();
462
+ /** Row-action menu items rendered as a trailing kebab (⋮) column.
463
+ * Empty (default) — no column. Menu clicks never trigger `rowClicked`. */
464
+ rowActions = input([], ...(ngDevMode ? [{ debugName: "rowActions" }] : /* istanbul ignore next */ []));
465
+ /** Fires with the chosen action and its row when a kebab menu item is selected. */
466
+ rowActionSelected = output();
467
+ /** Fires when an `editable` cell is committed (Enter or blur) with the new value. */
468
+ cellEdited = output();
469
+ /** Cell templates supplied as an explicit map instead of (or in addition to)
470
+ * projected `dsCellTemplate` directives. Lets a wrapper component collect
471
+ * the directives itself and pass them down, since content projected through
472
+ * a wrapper's `<ng-content>` is not seen by this component's content query.
473
+ * Entries here override projected ones. */
474
+ cellTemplateMap = input({}, ...(ngDevMode ? [{ debugName: "cellTemplateMap" }] : /* istanbul ignore next */ []));
475
+ /** Empty-state template, as an alternative to the `[empty]` content slot —
476
+ * again for wrappers that can't rely on slot re-projection. */
477
+ emptyTemplate = input(null, ...(ngDevMode ? [{ debugName: "emptyTemplate" }] : /* istanbul ignore next */ []));
478
+ /** When true, each row renders a leading chevron button that toggles an
479
+ * inline expansion panel below it. */
480
+ expandableRows = input(false, { ...(ngDevMode ? { debugName: "expandableRows" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
481
+ /** Two-way set of currently expanded row ids. */
482
+ expandedIds = model(new Set(), ...(ngDevMode ? [{ debugName: "expandedIds" }] : /* istanbul ignore next */ []));
483
+ /** `'single'` collapses the open row when another expander is clicked.
484
+ * Enforced on interaction only: a set seeded with several ids is left alone
485
+ * (and warned about in dev) rather than silently rewritten under the host. */
486
+ expandMode = input('multiple', ...(ngDevMode ? [{ debugName: "expandMode" }] : /* istanbul ignore next */ []));
487
+ /** Renders an expand-all/collapse-all chevron in the expander column header,
488
+ * page-scoped when paginating, like select-all. Suppressed under
489
+ * `expandMode="single"`, which it would contradict. */
490
+ expandAllToggle = input(false, { ...(ngDevMode ? { debugName: "expandAllToggle" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
491
+ /** Fires with the row when an expander opens it — including each row opened
492
+ * by expand-all, so a host lazy-loading panel content sees every one. */
493
+ rowExpanded = output();
494
+ /** Fires with the row when an expander closes it, the row auto-closed by
495
+ * `expandMode="single"` included. It carries a row, so it cannot speak for an
496
+ * id whose row is no longer in `data()` — under server-side paging that id is
497
+ * cleared silently. `expandedIds` is the complete signal; this one is the
498
+ * convenient one. */
499
+ rowCollapsed = output();
500
+ /** Template rendered inside an expanded row's panel.
501
+ * Context: `$implicit` = row, `row` = row. */
502
+ rowExpandTemplate = input(null, ...(ngDevMode ? [{ debugName: "rowExpandTemplate" }] : /* istanbul ignore next */ []));
503
+ cellTemplateDirectives = contentChildren(CellTemplateDirective, ...(ngDevMode ? [{ debugName: "cellTemplateDirectives" }] : /* istanbul ignore next */ []));
504
+ cellTemplates = computed(() => {
505
+ const map = {};
506
+ for (const dir of this.cellTemplateDirectives()) {
507
+ map[dir.dsCellTemplate()] = dir.template;
508
+ }
509
+ return { ...map, ...this.cellTemplateMap() };
510
+ }, ...(ngDevMode ? [{ debugName: "cellTemplates" }] : /* istanbul ignore next */ []));
511
+ cellTemplate(col) {
512
+ return this.cellTemplates()[col.key] ?? null;
513
+ }
514
+ tableClasses = computed(() => {
515
+ const parts = ['table'];
516
+ if (this.stickyHeader()) {
517
+ parts.push('sticky-header');
518
+ }
519
+ if (this.density() === 'compact') {
520
+ parts.push('compact');
521
+ }
522
+ if (this.zebra()) {
523
+ parts.push('zebra');
524
+ }
525
+ if (this.virtualizing()) {
526
+ parts.push('virtual');
527
+ }
528
+ return parts.join(' ');
529
+ }, ...(ngDevMode ? [{ debugName: "tableClasses" }] : /* istanbul ignore next */ []));
530
+ isSkeletonLoading = computed(() => this.loadingMode() === 'skeleton', ...(ngDevMode ? [{ debugName: "isSkeletonLoading" }] : /* istanbul ignore next */ []));
531
+ isOverlayLoading = computed(() => this.loadingMode() === 'overlay', ...(ngDevMode ? [{ debugName: "isOverlayLoading" }] : /* istanbul ignore next */ []));
532
+ /** The empty row is a CLAIM about the data — "there are none" — so it must not
533
+ * appear while the table is still asking, in EITHER loading mode. `overlay` is
534
+ * what a list uses on every read after the first, so suppressing only under
535
+ * `skeleton` paints "No rows yet" under the spinner on a zero-row reload. */
536
+ showsEmptyRow = computed(() => this.loadingMode() === false && !this.filteredData().length, ...(ngDevMode ? [{ debugName: "showsEmptyRow" }] : /* istanbul ignore next */ []));
537
+ layout = inject(DsTableLayout);
538
+ toolbarAnchor = viewChild('toolbarAnchor', { ...(ngDevMode ? { debugName: "toolbarAnchor" } : /* istanbul ignore next */ {}), read: ViewContainerRef });
539
+ headerUtilityAnchor = viewChild('headerUtilityAnchor', { ...(ngDevMode ? { debugName: "headerUtilityAnchor" } : /* istanbul ignore next */ {}), read: ViewContainerRef });
540
+ overlaysAnchor = viewChild('overlaysAnchor', { ...(ngDevMode ? { debugName: "overlaysAnchor" } : /* istanbul ignore next */ {}), read: ViewContainerRef });
541
+ columnWidthControls = viewChild('columnWidthControls', ...(ngDevMode ? [{ debugName: "columnWidthControls" }] : /* istanbul ignore next */ []));
542
+ // Ordering and hiding are stages a feature contributes, so this is the whole chain: the
543
+ // declared list folded through whatever registered.
544
+ visibleColumns = computed(() => this.layout.foldColumns(this.columns()), ...(ngDevMode ? [{ debugName: "visibleColumns" }] : /* istanbul ignore next */ []));
545
+ /** `'content'` is not a pixel value — it is carried by a class instead, see `fitsContent`. */
546
+ columnWidth(col) {
547
+ const dragged = this.layout.resize()?.widthOverride(col.key);
548
+ if (dragged !== undefined) {
549
+ return dragged;
550
+ }
551
+ return typeof col.width === 'number' ? col.width : null;
552
+ }
553
+ /** Shrink-to-content mode, unless the reader has dragged this column — a drag is a deliberate
554
+ * pixel width and must win over the declared intent. */
555
+ fitsContent(col) {
556
+ return (col.width === 'content' &&
557
+ this.layout.resize()?.widthOverride(col.key) === undefined);
558
+ }
559
+ hasUtilityColumn = computed(() => this.hasRowActions() || this.layout.wantsUtilityColumn(), ...(ngDevMode ? [{ debugName: "hasUtilityColumn" }] : /* istanbul ignore next */ []));
560
+ columnFilterPopover = viewChild('columnFilterPopover', ...(ngDevMode ? [{ debugName: "columnFilterPopover" }] : /* istanbul ignore next */ []));
561
+ /** The column whose filter menu is open — drives the distinct-value list. */
562
+ filterColumn = signal(null, ...(ngDevMode ? [{ debugName: "filterColumn" }] : /* istanbul ignore next */ []));
563
+ filterSearch = signal('', ...(ngDevMode ? [{ debugName: "filterSearch" }] : /* istanbul ignore next */ []));
564
+ headerFilters = contentChildren(HeaderFilterDirective, ...(ngDevMode ? [{ debugName: "headerFilters" }] : /* istanbul ignore next */ []));
565
+ headerFilterByKey = computed(() => {
566
+ const map = new Map();
567
+ for (const filter of this.headerFilters()) {
568
+ map.set(filter.dsHeaderFilter(), filter);
569
+ }
570
+ return map;
571
+ }, ...(ngDevMode ? [{ debugName: "headerFilterByKey" }] : /* istanbul ignore next */ []));
572
+ headerFilterFor(col) {
573
+ return this.headerFilterByKey().get(col.key);
574
+ }
575
+ hasColumnFilter(col) {
576
+ if (this.filterModeResolved() === 'none') {
577
+ return false;
578
+ }
579
+ return col.filter === 'set' || !!this.headerFilterFor(col);
580
+ }
581
+ isColumnFiltered(col) {
582
+ // A projected filter owns its own criterion, so only the host can say
583
+ // whether it is set; the table still draws the highlight.
584
+ const projected = this.headerFilterFor(col);
585
+ if (projected) {
586
+ return projected.active();
587
+ }
588
+ const allowed = this.columnFilters().get(col.key);
589
+ return !!allowed && allowed.size < this.optionsFor(col).length;
590
+ }
591
+ optionsFor(col) {
592
+ const supplied = this.columnFilterOptions().get(col.key);
593
+ if (supplied) {
594
+ return supplied;
595
+ }
596
+ const seen = new Set();
597
+ for (const row of this.data()) {
598
+ seen.add(this.cellValue(row, col));
599
+ }
600
+ return [...seen].sort((a, b) => a.localeCompare(b));
601
+ }
602
+ filterValues = computed(() => {
603
+ const col = this.filterColumn();
604
+ if (!col) {
605
+ return [];
606
+ }
607
+ const needle = this.filterSearch().trim().toLowerCase();
608
+ const values = this.optionsFor(col);
609
+ return needle
610
+ ? values.filter((value) => value.toLowerCase().includes(needle))
611
+ : values;
612
+ }, ...(ngDevMode ? [{ debugName: "filterValues" }] : /* istanbul ignore next */ []));
613
+ filterSelectedCount = computed(() => {
614
+ const col = this.filterColumn();
615
+ if (!col) {
616
+ return 0;
617
+ }
618
+ const allowed = this.columnFilters().get(col.key);
619
+ return allowed ? allowed.size : this.optionsFor(col).length;
620
+ }, ...(ngDevMode ? [{ debugName: "filterSelectedCount" }] : /* istanbul ignore next */ []));
621
+ isFilterValueChecked(value) {
622
+ const col = this.filterColumn();
623
+ if (!col) {
624
+ return false;
625
+ }
626
+ const allowed = this.columnFilters().get(col.key);
627
+ return !allowed || allowed.has(value);
628
+ }
629
+ onColumnFilterClick(col, event) {
630
+ event.stopPropagation();
631
+ this.filterColumn.set(col);
632
+ this.filterSearch.set('');
633
+ this.columnFilterPopover()?.toggle(event.currentTarget);
634
+ }
635
+ onFilterSearch(event) {
636
+ this.filterSearch.set(event.target.value);
637
+ }
638
+ toggleFilterValue(value) {
639
+ const col = this.filterColumn();
640
+ if (!col) {
641
+ return;
642
+ }
643
+ const distinct = this.optionsFor(col);
644
+ const current = new Set(this.columnFilters().get(col.key) ?? distinct);
645
+ if (current.has(value)) {
646
+ current.delete(value);
647
+ }
648
+ else {
649
+ current.add(value);
650
+ }
651
+ const next = new Map(this.columnFilters());
652
+ // Every value checked again → drop the entry so the column reads unfiltered.
653
+ if (current.size >= distinct.length) {
654
+ next.delete(col.key);
655
+ }
656
+ else {
657
+ next.set(col.key, current);
658
+ }
659
+ this.columnFilters.set(next);
660
+ }
661
+ headerFilterContext(col) {
662
+ return {
663
+ $implicit: col,
664
+ column: col,
665
+ close: () => this.columnFilterPopover()?.close(),
666
+ };
667
+ }
668
+ clearColumnFilter() {
669
+ const col = this.filterColumn();
670
+ if (!col) {
671
+ return;
672
+ }
673
+ const next = new Map(this.columnFilters());
674
+ next.delete(col.key);
675
+ this.columnFilters.set(next);
676
+ }
677
+ injector = inject(Injector);
678
+ destroyRef = inject(DestroyRef);
679
+ editInput = viewChild('editInput', ...(ngDevMode ? [{ debugName: "editInput" }] : /* istanbul ignore next */ []));
680
+ editingCell = signal(null, ...(ngDevMode ? [{ debugName: "editingCell" }] : /* istanbul ignore next */ []));
681
+ editDraft = signal('', ...(ngDevMode ? [{ debugName: "editDraft" }] : /* istanbul ignore next */ []));
682
+ isEditing(row, col) {
683
+ const cell = this.editingCell();
684
+ return !!cell && cell.rowId === this.rowKey(row) && cell.key === col.key;
685
+ }
686
+ startEdit(row, col, event) {
687
+ if (!col.editable) {
688
+ return;
689
+ }
690
+ event.stopPropagation();
691
+ this.editDraft.set(this.cellValue(row, col));
692
+ this.editingCell.set({ rowId: this.rowKey(row), key: col.key });
693
+ afterNextRender(() => {
694
+ const input = this.editInput()?.nativeElement;
695
+ input?.focus();
696
+ input?.select();
697
+ }, { injector: this.injector });
698
+ }
699
+ onEditInput(event) {
700
+ this.editDraft.set(event.target.value);
701
+ }
702
+ commitEdit(row, col) {
703
+ if (!this.isEditing(row, col)) {
704
+ return;
705
+ }
706
+ this.editingCell.set(null);
707
+ this.cellEdited.emit({ row, key: col.key, value: this.editDraft() });
708
+ }
709
+ cancelEdit() {
710
+ this.editingCell.set(null);
711
+ }
712
+ /** Clip width for `truncate`. `'content'` has no clip width — the column is as
713
+ * wide as its widest cell, so there is nothing to ellipsis against. */
714
+ clipWidth(col) {
715
+ return typeof col.width === 'number'
716
+ ? col.width
717
+ : col.width === 'content'
718
+ ? null
719
+ : 240;
720
+ }
721
+ filteredData = computed(() => {
722
+ const query = this.filterQuery().trim().toLowerCase();
723
+ // In 'server' mode the host has already filtered; running the set filters
724
+ // again here would filter the filtered. `filterQuery` is deliberately left
725
+ // alone — it is a separate input with its own client/server story.
726
+ const setFilters = this.filterModeResolved() === 'client'
727
+ ? this.columnFilters()
728
+ : new Map();
729
+ const columns = this.columns();
730
+ if (!query && setFilters.size === 0) {
731
+ return this.layout.foldRows(this.data());
732
+ }
733
+ const marked = columns.filter((col) => col.filterable);
734
+ const scope = marked.length ? marked : columns;
735
+ const activeSetFilters = [...setFilters]
736
+ .map(([key, allowed]) => ({
737
+ col: columns.find((col) => col.key === key),
738
+ allowed,
739
+ }))
740
+ .filter((entry) => !!entry.col);
741
+ return this.data().filter((row) => {
742
+ if (query &&
743
+ !scope.some((col) => this.cellValue(row, col).toLowerCase().includes(query))) {
744
+ return false;
745
+ }
746
+ return activeSetFilters.every(({ col, allowed }) => allowed.has(this.cellValue(row, col)));
747
+ });
748
+ }, ...(ngDevMode ? [{ debugName: "filteredData" }] : /* istanbul ignore next */ []));
749
+ sortedData = computed(() => {
750
+ const rows = this.filteredData();
751
+ if (this.sortModeResolved() !== 'client') {
752
+ return rows;
753
+ }
754
+ const key = this.activeSortKey();
755
+ const dir = this.activeSortDir();
756
+ if (!key || !dir) {
757
+ return rows;
758
+ }
759
+ const column = this.columns().find((col) => col.key === key);
760
+ if (!column) {
761
+ return rows;
762
+ }
763
+ const direction = dir === 'asc' ? 1 : -1;
764
+ const sortValue = column.sortValue;
765
+ return rows.slice().sort((a, b) => {
766
+ const aValue = sortableOf(sortValue ? sortValue(a) : this.cellValue(a, column));
767
+ const bValue = sortableOf(sortValue ? sortValue(b) : this.cellValue(b, column));
768
+ // Blanks sink in BOTH directions, so `direction` is deliberately not
769
+ // applied to this branch — a descending sort must not open with a screen
770
+ // of empty rows.
771
+ if (aValue === null || bValue === null) {
772
+ if (aValue === null && bValue === null) {
773
+ return 0;
774
+ }
775
+ return aValue === null ? 1 : -1;
776
+ }
777
+ return compareSortValues(aValue, bValue) * direction;
778
+ });
779
+ }, ...(ngDevMode ? [{ debugName: "sortedData" }] : /* istanbul ignore next */ []));
780
+ pagedData = computed(() => {
781
+ const size = this.pageSize();
782
+ // Server-side paging (`total` set): the host already sliced to one page.
783
+ if (size === null || this.total() !== null) {
784
+ return this.sortedData();
785
+ }
786
+ const start = (this.page() - 1) * size;
787
+ return this.sortedData().slice(start, start + size);
788
+ }, ...(ngDevMode ? [{ debugName: "pagedData" }] : /* istanbul ignore next */ []));
789
+ /** Virtual mode windows this further; `rowSlots` is what the loop walks. */
790
+ displayData = computed(() => this.pageSize() !== null ? this.pagedData() : this.sortedData(), ...(ngDevMode ? [{ debugName: "displayData" }] : /* istanbul ignore next */ []));
791
+ /**
792
+ * The single live-region line. Loading wins while it lasts — a sort
793
+ * announcement over rows that are being replaced tells the reader about a
794
+ * state they cannot inspect yet.
795
+ *
796
+ * `aria-live="polite"` does not announce a region's INITIAL content, so the
797
+ * unsorted first render is silent; only real changes speak.
798
+ */
799
+ statusMessage = computed(() => {
800
+ if (this.loadingMode() !== false) {
801
+ return 'Loading…';
802
+ }
803
+ // A contributed line wins while it has one: an "Export failed" has to survive until the
804
+ // reader moves on, and the feature that raised it is what clears it.
805
+ return this.layout.status() || this.eventMessages();
806
+ }, ...(ngDevMode ? [{ debugName: "statusMessage" }] : /* istanbul ignore next */ []));
807
+ eventMessages = computed(() => [this.sortMessage(), this.rangeMessage(), this.expansionMessage()]
808
+ .filter(Boolean)
809
+ .join('. '), ...(ngDevMode ? [{ debugName: "eventMessages" }] : /* istanbul ignore next */ []));
810
+ /** Only from two rows up: a single expander announces itself through its own
811
+ * `aria-expanded`, and repeating that here would say everything twice. */
812
+ expansionMessage = computed(() => {
813
+ const open = this.expandedIds();
814
+ if (open.size < 2) {
815
+ return '';
816
+ }
817
+ const onPage = this.displayData().filter((row) => open.has(this.rowKey(row))).length;
818
+ return onPage < 2 ? '' : `${onPage} rows expanded`;
819
+ }, ...(ngDevMode ? [{ debugName: "expansionMessage" }] : /* istanbul ignore next */ []));
820
+ sortMessage = computed(() => {
821
+ const key = this.activeSortKey();
822
+ const dir = this.activeSortDir();
823
+ if (!key) {
824
+ return '';
825
+ }
826
+ const label = this.columns().find((col) => col.key === key)?.label ?? key;
827
+ return this.sortAnnouncement()(label, dir);
828
+ }, ...(ngDevMode ? [{ debugName: "sortMessage" }] : /* istanbul ignore next */ []));
829
+ rangeMessage = computed(() => {
830
+ const size = this.pageSize();
831
+ if (size === null) {
832
+ return '';
833
+ }
834
+ const rows = this.displayData().length;
835
+ if (rows === 0) {
836
+ return '';
837
+ }
838
+ const first = (this.page() - 1) * size + 1;
839
+ const total = this.total() ?? this.filteredData().length;
840
+ return this.rangeAnnouncement()(first, first + rows - 1, total);
841
+ }, ...(ngDevMode ? [{ debugName: "rangeMessage" }] : /* istanbul ignore next */ []));
842
+ /** Virtual mode needs a bounded scroller to window against. */
843
+ virtualizing = computed(() => this.virtualScroll() && !!this.maxHeight(), ...(ngDevMode ? [{ debugName: "virtualizing" }] : /* istanbul ignore next */ []));
844
+ /** Drives the CSS row height from the same number the arithmetic uses, so the
845
+ * two cannot drift — which would make every offset progressively wrong. */
846
+ virtualRowHeight = computed(() => `${this.virtualRowSize()}px`, ...(ngDevMode ? [{ debugName: "virtualRowHeight" }] : /* istanbul ignore next */ []));
847
+ /** How many rows the scroller spans. Lazy counts the rows that EXIST, not the
848
+ * ones that have arrived — otherwise the spacers shrink to the loaded slice
849
+ * and the scrollbar lies about the length of the list. */
850
+ virtualCount = computed(() => this.lazy()
851
+ ? (this.total() ?? this.displayData().length)
852
+ : this.displayData().length, ...(ngDevMode ? [{ debugName: "virtualCount" }] : /* istanbul ignore next */ []));
853
+ virtualWindow = computed(() => {
854
+ if (!this.virtualizing()) {
855
+ return null;
856
+ }
857
+ const rowSize = Math.max(1, this.virtualRowSize());
858
+ const count = this.virtualCount();
859
+ const height = this.viewportHeight() || VIRTUAL_FALLBACK_HEIGHT;
860
+ const firstVisible = Math.floor(this.scrollTop() / rowSize);
861
+ const start = Math.max(0, firstVisible - VIRTUAL_OVERSCAN);
862
+ const end = Math.min(count, firstVisible + Math.ceil(height / rowSize) + VIRTUAL_OVERSCAN);
863
+ return {
864
+ start,
865
+ end,
866
+ padTop: start * rowSize,
867
+ padBottom: Math.max(0, count - end) * rowSize,
868
+ };
869
+ }, ...(ngDevMode ? [{ debugName: "virtualWindow" }] : /* istanbul ignore next */ []));
870
+ /**
871
+ * What the row loop walks: each slot carries its ABSOLUTE index, and a `null`
872
+ * row is a gap the host has not filled yet.
873
+ *
874
+ * Absolute rather than loop-relative because everything downstream needs it —
875
+ * striping parity, the skeleton's width seed, and the range `(lazyLoad)` asks
876
+ * for. Outside lazy mode every slot is filled, so the extra object per visible
877
+ * row buys uniformity for the ~25 rows windowing keeps in the DOM.
878
+ */
879
+ rowSlots = computed(() => {
880
+ const window = this.virtualWindow();
881
+ const data = this.displayData();
882
+ const start = window ? window.start : 0;
883
+ const end = window ? window.end : data.length;
884
+ const slots = [];
885
+ for (let index = start; index < end; index++) {
886
+ slots.push({ row: data[index] ?? null, index });
887
+ }
888
+ return slots;
889
+ }, ...(ngDevMode ? [{ debugName: "rowSlots" }] : /* istanbul ignore next */ []));
890
+ /** Zebra striping cannot come from `:nth-child` while windowing — the parity
891
+ * of a rendered row depends on its ABSOLUTE index, and the spacer rows are
892
+ * children too. Matches `:nth-child(odd)`, which is 1-based. */
893
+ isStriped(absoluteIndex) {
894
+ return !!this.virtualWindow() && absoluteIndex % 2 === 0;
895
+ }
896
+ allSelected = computed(() => {
897
+ const data = this.displayData();
898
+ if (data.length === 0) {
899
+ return false;
900
+ }
901
+ const sel = this.selectedIds();
902
+ return data.every((row) => sel.has(this.rowKey(row)));
903
+ }, ...(ngDevMode ? [{ debugName: "allSelected" }] : /* istanbul ignore next */ []));
904
+ // PART of the page selected, and deliberately false when ALL of it is: this is the header
905
+ // checkbox's indeterminate predicate and nothing else. Anything asking "is a selection live"
906
+ // wants `anySelected` — gating the bulk bar on this one hid it at full selection, which is
907
+ // exactly when a bulk action is most likely.
908
+ someSelected = computed(() => {
909
+ const data = this.displayData();
910
+ const sel = this.selectedIds();
911
+ return data.some((row) => sel.has(this.rowKey(row))) && !this.allSelected();
912
+ }, ...(ngDevMode ? [{ debugName: "someSelected" }] : /* istanbul ignore next */ []));
913
+ anySelected = computed(() => this.selectedIds().size > 0, ...(ngDevMode ? [{ debugName: "anySelected" }] : /* istanbul ignore next */ []));
914
+ selectAllLabel = computed(() => this.pageSize() !== null
915
+ ? 'Select all rows on this page'
916
+ : 'Select all rows', ...(ngDevMode ? [{ debugName: "selectAllLabel" }] : /* istanbul ignore next */ []));
917
+ allExpanded = computed(() => {
918
+ const data = this.displayData();
919
+ if (data.length === 0) {
920
+ return false;
921
+ }
922
+ const open = this.expandedIds();
923
+ return data.every((row) => open.has(this.rowKey(row)));
924
+ }, ...(ngDevMode ? [{ debugName: "allExpanded" }] : /* istanbul ignore next */ []));
925
+ expandAllVisible = computed(() => this.expandAllToggle() && this.expandMode() !== 'single', ...(ngDevMode ? [{ debugName: "expandAllVisible" }] : /* istanbul ignore next */ []));
926
+ expandAllLabel = computed(() => {
927
+ const scope = this.pageSize() !== null ? ' on this page' : '';
928
+ return this.allExpanded()
929
+ ? `Collapse all rows${scope}`
930
+ : `Expand all rows${scope}`;
931
+ }, ...(ngDevMode ? [{ debugName: "expandAllLabel" }] : /* istanbul ignore next */ []));
932
+ skeletonArray = computed(() => Array(this.skeletonRows()).fill(0), ...(ngDevMode ? [{ debugName: "skeletonArray" }] : /* istanbul ignore next */ []));
933
+ expandedColspan = computed(() => {
934
+ let count = this.visibleColumns().length;
935
+ if (this.selectable()) {
936
+ count += 1;
937
+ }
938
+ if (this.expandableRows()) {
939
+ count += 1;
940
+ }
941
+ if (this.hasUtilityColumn()) {
942
+ count += 1;
943
+ }
944
+ return count;
945
+ }, ...(ngDevMode ? [{ debugName: "expandedColspan" }] : /* istanbul ignore next */ []));
946
+ hasRowActions = computed(() => this.rowActions().length > 0, ...(ngDevMode ? [{ debugName: "hasRowActions" }] : /* istanbul ignore next */ []));
947
+ menuRow = signal(null, ...(ngDevMode ? [{ debugName: "menuRow" }] : /* istanbul ignore next */ []));
948
+ rowMenuPopover = viewChild('rowMenuPopover', ...(ngDevMode ? [{ debugName: "rowMenuPopover" }] : /* istanbul ignore next */ []));
949
+ columnPickerPopover = viewChild('columnPickerPopover', ...(ngDevMode ? [{ debugName: "columnPickerPopover" }] : /* istanbul ignore next */ []));
950
+ hasTruncate = computed(() => this.columns().some((col) => col.truncate), ...(ngDevMode ? [{ debugName: "hasTruncate" }] : /* istanbul ignore next */ []));
951
+ cellTextPopover = viewChild('cellTextPopover', ...(ngDevMode ? [{ debugName: "cellTextPopover" }] : /* istanbul ignore next */ []));
952
+ cellPopoverText = signal('', ...(ngDevMode ? [{ debugName: "cellPopoverText" }] : /* istanbul ignore next */ []));
953
+ onCellClipClick(row, col, event) {
954
+ const element = event.currentTarget;
955
+ if (!TableComponent.isClipped(element)) {
956
+ return;
957
+ }
958
+ event.stopPropagation();
959
+ this.cellPopoverText.set(this.cellValue(row, col));
960
+ this.cellTextPopover()?.toggle(element);
961
+ }
962
+ /** Clipped horizontally — itself or anything it renders. A `dsCellTemplate`
963
+ * puts the ellipsis on a descendant, so testing only the wrapper misses it. */
964
+ static isClipped(element) {
965
+ if (element.scrollWidth > element.clientWidth) {
966
+ return true;
967
+ }
968
+ return [...element.querySelectorAll('*')].some((child) => child.scrollWidth > child.clientWidth);
969
+ }
970
+ /**
971
+ * A header narrowed by resizing clips its own label, and the label is the only
972
+ * thing naming the column — so the full text has to stay reachable. Set on
973
+ * enter rather than always, because a `title` on every header would fire a
974
+ * tooltip on hover for text that is perfectly readable.
975
+ */
976
+ onHeaderEnter(event, col) {
977
+ const element = event.currentTarget;
978
+ const label = element.querySelector('.th-label') ?? element;
979
+ if (TableComponent.isClipped(label)) {
980
+ element.setAttribute('title', col.label);
981
+ }
982
+ else {
983
+ element.removeAttribute('title');
984
+ }
985
+ }
986
+ scrollWrap = viewChild.required('scrollWrap');
987
+ hscrollProxy = viewChild('hscrollProxy', ...(ngDevMode ? [{ debugName: "hscrollProxy" }] : /* istanbul ignore next */ []));
988
+ tableHead = viewChild('tableHead', ...(ngDevMode ? [{ debugName: "tableHead" }] : /* istanbul ignore next */ []));
989
+ hostElement = inject(ElementRef);
990
+ hscrollContentWidth = signal(0, ...(ngDevMode ? [{ debugName: "hscrollContentWidth" }] : /* istanbul ignore next */ []));
991
+ hscrollNeeded = signal(false, ...(ngDevMode ? [{ debugName: "hscrollNeeded" }] : /* istanbul ignore next */ []));
992
+ scrollTop = signal(0, ...(ngDevMode ? [{ debugName: "scrollTop" }] : /* istanbul ignore next */ []));
993
+ viewportHeight = signal(0, ...(ngDevMode ? [{ debugName: "viewportHeight" }] : /* istanbul ignore next */ []));
994
+ lastLazyRequest = null;
995
+ constructor() {
996
+ // The width buttons the column panel renders are still declared in this template, because a
997
+ // directive has no view to declare an ng-template in — so the table hands the template over
998
+ // and the resize feature owns everything the buttons DO.
999
+ effect(() => {
1000
+ const template = this.columnWidthControls();
1001
+ if (template) {
1002
+ this.layout.registerPanelRowTemplate(template);
1003
+ }
1004
+ });
1005
+ // Published here rather than from an init hook: a directive on the same element is
1006
+ // constructed after this component, so by the time a feature asks, the view is here. The
1007
+ // anchor goes over as a signal — a viewChild is undefined until the view exists, and a
1008
+ // feature that renders a control of its own has to wait for it.
1009
+ this.layout.publish({
1010
+ visibleColumns: this.visibleColumns,
1011
+ sortedRows: this.sortedData,
1012
+ declaredColumns: this.columns,
1013
+ scrollViewport: computed(() => this.scrollWrap()?.nativeElement),
1014
+ cellText: (row, column) => this.cellValue(row, column),
1015
+ anchor: (name) => name === 'toolbar'
1016
+ ? this.toolbarAnchor
1017
+ : name === 'header-utility'
1018
+ ? this.headerUtilityAnchor
1019
+ : this.overlaysAnchor,
1020
+ });
1021
+ // The scrim starts below the header, so it needs the header's height. Measured, not summed
1022
+ // from padding and line-height: `vertical-align: middle` on the inline-flex label extends
1023
+ // the line box past the strut by a font-metric amount no calc() can carry, and a sum is
1024
+ // blind to a taller control in the header.
1025
+ effect(() => {
1026
+ if (!this.isOverlayLoading()) {
1027
+ return;
1028
+ }
1029
+ const head = this.tableHead()?.nativeElement;
1030
+ if (!head) {
1031
+ return;
1032
+ }
1033
+ this.hostElement.nativeElement.style.setProperty('--_table-head-h', `${head.getBoundingClientRect().height}px`);
1034
+ });
1035
+ // One effect for both halves, because the restore CANNOT run in the
1036
+ // constructor: input signals are not set yet there, so storageKey() is still
1037
+ // '' and the restore silently no-ops. The first run with a usable key
1038
+ // restores; every later run saves.
1039
+ effect(() => {
1040
+ const key = this.layoutKey();
1041
+ // Read every slice so the effect tracks them, whichever feature owns them.
1042
+ const stored = Object.fromEntries(this.layout.persistedSlices().map((slice) => [slice.key, slice.read()]));
1043
+ if (!key) {
1044
+ return;
1045
+ }
1046
+ if (!this.layoutRestored) {
1047
+ this.layoutRestored = true;
1048
+ this.restoreLayout(key);
1049
+ return;
1050
+ }
1051
+ this.saveLayout(key, stored);
1052
+ });
1053
+ // A table holding ALL its rows is the exception, and `total` unbound is how
1054
+ // it says so — so that is where the reminder goes.
1055
+ if (typeof ngDevMode === 'undefined' || ngDevMode) {
1056
+ devWarn(() => this.sortMode() === null &&
1057
+ this.total() === null &&
1058
+ this.columns().some((col) => col.sortable)
1059
+ ? '[ds-table] sortable columns default to sortMode="server", so a header click only emits (sortChange) and the table reorders nothing itself. This table binds no `total`, which usually means it holds every row — declare sortMode="client" to sort them in place.'
1060
+ : null);
1061
+ devWarn(() => this.filterMode() === null &&
1062
+ this.total() === null &&
1063
+ this.columns().some((col) => col.filter === 'set')
1064
+ ? '[ds-table] a header filter defaults to filterMode="server", so ticking a value only updates `columnFilters` and filters nothing locally. This table binds no `total`, which usually means it holds every row — declare filterMode="client" to filter them in place.'
1065
+ : null);
1066
+ }
1067
+ effect((onCleanup) => {
1068
+ if (!this.virtualizing()) {
1069
+ return;
1070
+ }
1071
+ const wrap = this.scrollWrap().nativeElement;
1072
+ const onScroll = () => this.scrollTop.set(wrap.scrollTop);
1073
+ const measure = () => this.viewportHeight.set(wrap.clientHeight);
1074
+ wrap.addEventListener('scroll', onScroll, { passive: true });
1075
+ const resizeObserver = new ResizeObserver(measure);
1076
+ resizeObserver.observe(wrap);
1077
+ measure();
1078
+ onScroll();
1079
+ onCleanup(() => {
1080
+ wrap.removeEventListener('scroll', onScroll);
1081
+ resizeObserver.disconnect();
1082
+ });
1083
+ });
1084
+ // Ask for the visible range whenever it has gaps. Keyed on the range itself,
1085
+ // so scrolling within an already-requested window stays quiet and a request
1086
+ // in flight is not repeated every frame — the host is free to answer slowly.
1087
+ effect(() => {
1088
+ if (!this.lazy()) {
1089
+ return;
1090
+ }
1091
+ const slots = this.rowSlots();
1092
+ const gaps = slots.filter((slot) => slot.row === null);
1093
+ if (gaps.length === 0) {
1094
+ return;
1095
+ }
1096
+ const first = gaps[0].index;
1097
+ const rows = gaps[gaps.length - 1].index - first + 1;
1098
+ // Contained, not equal: the viewport is measured after the first paint, so
1099
+ // the window grows by an overscan or two right after opening and an
1100
+ // exact-match guard would fetch the same rows twice.
1101
+ const covered = this.lastLazyRequest &&
1102
+ first >= this.lastLazyRequest.first &&
1103
+ first + rows <= this.lastLazyRequest.first + this.lastLazyRequest.rows;
1104
+ if (covered) {
1105
+ return;
1106
+ }
1107
+ this.lastLazyRequest = { first, rows };
1108
+ this.lazyLoad.emit({ first, rows });
1109
+ });
1110
+ if (typeof ngDevMode === 'undefined' || ngDevMode) {
1111
+ devWarn(() => this.lazy() && !this.virtualScroll()
1112
+ ? '[ds-table] lazy needs virtualScroll: without a window there is no range to fetch, so every gap in `data` renders a skeleton row and (lazyLoad) never narrows. Set virtualScroll (and maxHeight), or hand the table its rows outright.'
1113
+ : null);
1114
+ devWarn(() => this.lazy() && this.total() === null
1115
+ ? '[ds-table] lazy needs `total`: the scroller is sized from the rows that EXIST, and without it the spacers collapse to the slice that has arrived — the scrollbar then lies about the length of the list.'
1116
+ : null);
1117
+ devWarn(() => this.lazy() && this.sortMode() === 'client'
1118
+ ? '[ds-table] lazy with sortMode="client" sorts only the rows that happen to have arrived, which is a different order every time a window loads. The server owns the order here — drop sortMode or declare "server".'
1119
+ : null);
1120
+ devWarn(() => this.virtualScroll() && !this.maxHeight()
1121
+ ? '[ds-table] virtualScroll needs maxHeight — without a bounded scroller there is no viewport to window against, so every row renders and nothing is virtualized. Set maxHeight (e.g. "480px").'
1122
+ : null);
1123
+ devWarn(() => this.virtualScroll() && this.expandableRows()
1124
+ ? '[ds-table] virtualScroll and expandableRows do not combine: an expanded row is taller than virtualRowSize, and every offset after it would be wrong. The expander renders but the panel is suppressed — move the detail into a modal or a drawer, or drop virtualScroll.'
1125
+ : null);
1126
+ devWarn(() => this.expandAllToggle() && this.expandMode() === 'single'
1127
+ ? '[ds-table] expandAllToggle contradicts expandMode="single" — expanding every row is the one thing single mode exists to prevent. The header toggle is suppressed; drop one of the two.'
1128
+ : null);
1129
+ devWarn(() => this.expandAllToggle() && !this.expandableRows()
1130
+ ? '[ds-table] expandAllToggle needs expandableRows — without it there is no expander column to put the toggle in, so it renders nothing. Set expandableRows.'
1131
+ : null);
1132
+ devWarn(() => this.expandMode() === 'single' && this.expandedIds().size > 1
1133
+ ? '[ds-table] expandMode="single" was given expandedIds holding several rows. A two-way model is the host\'s to write, so it is left as passed rather than rewritten — the next expander click collapses back to one.'
1134
+ : null);
1135
+ devWarn(() => this.virtualScroll() && this.pageSize() !== null
1136
+ ? '[ds-table] virtualScroll with pageSize paginates a window of a page. Virtual scrolling is what pagination was for on a long list — pick one.'
1137
+ : null);
1138
+ }
1139
+ // Assigning an equal scrollLeft fires no scroll event, so the two mirrors
1140
+ // can't loop.
1141
+ effect((onCleanup) => {
1142
+ const proxy = this.hscrollProxy()?.nativeElement;
1143
+ if (!proxy) {
1144
+ return;
1145
+ }
1146
+ const wrap = this.scrollWrap().nativeElement;
1147
+ const fromWrap = () => {
1148
+ proxy.scrollLeft = wrap.scrollLeft;
1149
+ };
1150
+ const fromProxy = () => {
1151
+ wrap.scrollLeft = proxy.scrollLeft;
1152
+ };
1153
+ wrap.addEventListener('scroll', fromWrap, { passive: true });
1154
+ proxy.addEventListener('scroll', fromProxy, { passive: true });
1155
+ const measure = () => {
1156
+ this.hscrollContentWidth.set(wrap.scrollWidth);
1157
+ // Both are rounded integers, so a fractional layout width makes an
1158
+ // unscrollable wrap report one px more than it holds.
1159
+ this.hscrollNeeded.set(wrap.scrollWidth > wrap.clientWidth + 1);
1160
+ };
1161
+ // The wrap's own box never changes with content — watch the table too
1162
+ // (column toggles, data swaps change its width).
1163
+ const resizeObserver = new ResizeObserver(measure);
1164
+ resizeObserver.observe(wrap);
1165
+ const table = wrap.querySelector('table');
1166
+ if (table) {
1167
+ resizeObserver.observe(table);
1168
+ }
1169
+ measure();
1170
+ onCleanup(() => {
1171
+ wrap.removeEventListener('scroll', fromWrap);
1172
+ proxy.removeEventListener('scroll', fromProxy);
1173
+ resizeObserver.disconnect();
1174
+ });
1175
+ });
1176
+ // Opt-in height tween. Observer fires pre-paint: freezing the old height
1177
+ // here stops the jump being painted; disconnect during the anim so its own
1178
+ // resizes don't re-trigger it; clip (not hidden) avoids a scroll container.
1179
+ effect((onCleanup) => {
1180
+ if (!this.animateHeight()) {
1181
+ return;
1182
+ }
1183
+ const wrap = this.scrollWrap().nativeElement;
1184
+ let previousHeight = null;
1185
+ let previousWidth = null;
1186
+ let heightAnim = null;
1187
+ const observer = new ResizeObserver((entries) => {
1188
+ const entry = entries[0];
1189
+ const box = entry.borderBoxSize?.[0];
1190
+ const nextHeight = box ? box.blockSize : entry.contentRect.height;
1191
+ const nextWidth = box ? box.inlineSize : entry.contentRect.width;
1192
+ const fromHeight = previousHeight;
1193
+ const widthChanged = nextWidth !== previousWidth;
1194
+ previousHeight = nextHeight;
1195
+ previousWidth = nextWidth;
1196
+ // Only a height change at a stable width is a row-set swap; skip the
1197
+ // first measure and width-driven reflows (window/column resize) so the
1198
+ // tween doesn't chase a resize.
1199
+ if (fromHeight === null || widthChanged || nextHeight === fromHeight) {
1200
+ return;
1201
+ }
1202
+ const styles = getComputedStyle(wrap);
1203
+ const duration = this.parseDurationMs(styles.getPropertyValue('--duration-base'));
1204
+ if (duration <= 0) {
1205
+ return;
1206
+ }
1207
+ observer.disconnect();
1208
+ heightAnim?.cancel();
1209
+ wrap.style.height = `${fromHeight}px`;
1210
+ wrap.style.overflowY = 'clip';
1211
+ heightAnim = wrap.animate([{ height: `${fromHeight}px` }, { height: `${nextHeight}px` }], {
1212
+ duration,
1213
+ easing: styles.getPropertyValue('--ease-standard').trim() || 'ease-out',
1214
+ });
1215
+ heightAnim.onfinish = heightAnim.oncancel = () => {
1216
+ heightAnim = null;
1217
+ wrap.style.height = '';
1218
+ wrap.style.overflowY = '';
1219
+ observer.observe(wrap);
1220
+ };
1221
+ });
1222
+ observer.observe(wrap);
1223
+ onCleanup(() => {
1224
+ if (heightAnim) {
1225
+ heightAnim.onfinish = heightAnim.oncancel = null;
1226
+ heightAnim.cancel();
1227
+ heightAnim = null;
1228
+ }
1229
+ wrap.style.height = '';
1230
+ wrap.style.overflowY = '';
1231
+ observer.disconnect();
1232
+ });
1233
+ });
1234
+ // Client-side paging only (with `total` set the host owns the clamp): when a
1235
+ // filter shrinks the result set below the current page, pull `page` back to
1236
+ // the last page that still has rows so the body never renders empty.
1237
+ effect(() => {
1238
+ const size = this.pageSize();
1239
+ if (size === null || this.total() !== null) {
1240
+ return;
1241
+ }
1242
+ const lastPage = Math.max(1, Math.ceil(this.filteredData().length / size));
1243
+ if (this.page() > lastPage) {
1244
+ this.page.set(lastPage);
1245
+ }
1246
+ });
1247
+ let previousPage = this.page();
1248
+ effect(() => {
1249
+ const current = this.page();
1250
+ const enabled = this.scrollToTopOnPageChange();
1251
+ if (current !== previousPage && enabled) {
1252
+ this.scrollWrap().nativeElement.scrollIntoView({ block: 'start' });
1253
+ }
1254
+ previousPage = current;
1255
+ });
1256
+ }
1257
+ parseDurationMs(raw) {
1258
+ const value = raw.trim();
1259
+ if (value.endsWith('ms')) {
1260
+ return parseFloat(value);
1261
+ }
1262
+ if (value.endsWith('s')) {
1263
+ return parseFloat(value) * 1000;
1264
+ }
1265
+ return parseFloat(value) || 0;
1266
+ }
1267
+ onRowMenuClick(row, event) {
1268
+ event.stopPropagation();
1269
+ this.menuRow.set(row);
1270
+ this.rowMenuPopover()?.toggle(event.currentTarget);
1271
+ }
1272
+ isMenuOpenFor(row) {
1273
+ return this.menuRow() === row && !!this.rowMenuPopover()?.opened();
1274
+ }
1275
+ isActionDisabled(action) {
1276
+ const row = this.menuRow();
1277
+ return row !== null && !!action.disabled?.(row);
1278
+ }
1279
+ /** Items that apply to `row`. Called from the trigger's own gate as well as the
1280
+ * menu, so a row with nothing applicable shows no kebab instead of an empty one. */
1281
+ actionsFor(row) {
1282
+ return this.rowActions().filter((action) => !action.hidden?.(row));
1283
+ }
1284
+ hasActionsFor(row) {
1285
+ return this.actionsFor(row).length > 0;
1286
+ }
1287
+ visibleRowActions = computed(() => {
1288
+ const row = this.menuRow();
1289
+ return row === null ? [] : this.actionsFor(row);
1290
+ }, ...(ngDevMode ? [{ debugName: "visibleRowActions" }] : /* istanbul ignore next */ []));
1291
+ /** Empty unless the item is actually disabled for this row: a reason on a live
1292
+ * item would read as a caveat on something that works. */
1293
+ actionReason(action) {
1294
+ const row = this.menuRow();
1295
+ if (row === null || !action.disabled?.(row)) {
1296
+ return '';
1297
+ }
1298
+ const reason = action.disabledReason;
1299
+ return typeof reason === 'function' ? reason(row) : (reason ?? '');
1300
+ }
1301
+ onRowAction(action) {
1302
+ const row = this.menuRow();
1303
+ if (row === null) {
1304
+ return;
1305
+ }
1306
+ this.rowActionSelected.emit({ action, row });
1307
+ }
1308
+ isExpanded(row) {
1309
+ return this.expandedIds().has(this.rowKey(row));
1310
+ }
1311
+ onToggleExpand(row, event) {
1312
+ event.stopPropagation();
1313
+ const key = this.rowKey(row);
1314
+ const open = this.expandedIds();
1315
+ if (open.has(key)) {
1316
+ const next = new Set(open);
1317
+ next.delete(key);
1318
+ this.expandedIds.set(next);
1319
+ this.rowCollapsed.emit(row);
1320
+ return;
1321
+ }
1322
+ if (this.expandMode() === 'single') {
1323
+ // `data()` rather than `displayData()` so a row left open on another page
1324
+ // is reported too — but an event carries a row, so an id whose row is not
1325
+ // loaded at all is dropped without one. Documented on `rowCollapsed`.
1326
+ const closing = open.size > 0
1327
+ ? this.data().filter((other) => open.has(this.rowKey(other)))
1328
+ : [];
1329
+ this.expandedIds.set(new Set([key]));
1330
+ closing.forEach((other) => this.rowCollapsed.emit(other));
1331
+ this.rowExpanded.emit(row);
1332
+ return;
1333
+ }
1334
+ const next = new Set(open);
1335
+ next.add(key);
1336
+ this.expandedIds.set(next);
1337
+ this.rowExpanded.emit(row);
1338
+ }
1339
+ onToggleExpandAll() {
1340
+ const rows = this.displayData();
1341
+ const open = this.expandedIds();
1342
+ const collapsing = this.allExpanded();
1343
+ const changed = rows.filter((row) => open.has(this.rowKey(row)) === collapsing);
1344
+ if (changed.length === 0) {
1345
+ return;
1346
+ }
1347
+ const next = new Set(open);
1348
+ rows.forEach((row) => {
1349
+ if (collapsing) {
1350
+ next.delete(this.rowKey(row));
1351
+ }
1352
+ else {
1353
+ next.add(this.rowKey(row));
1354
+ }
1355
+ });
1356
+ this.expandedIds.set(next);
1357
+ changed.forEach((row) => collapsing ? this.rowCollapsed.emit(row) : this.rowExpanded.emit(row));
1358
+ }
1359
+ isSelected(row) {
1360
+ return this.selectedIds().has(this.rowKey(row));
1361
+ }
1362
+ onToggleAll(event) {
1363
+ const checked = event.target.checked;
1364
+ const next = new Set(this.selectedIds());
1365
+ if (checked) {
1366
+ this.displayData().forEach((row) => next.add(this.rowKey(row)));
1367
+ }
1368
+ else {
1369
+ this.displayData().forEach((row) => next.delete(this.rowKey(row)));
1370
+ }
1371
+ this.selectedIds.set(next);
1372
+ }
1373
+ onToggleRow(row, event) {
1374
+ event.stopPropagation();
1375
+ const checked = event.target.checked;
1376
+ const next = new Set(this.selectedIds());
1377
+ if (checked) {
1378
+ next.add(this.rowKey(row));
1379
+ }
1380
+ else {
1381
+ next.delete(this.rowKey(row));
1382
+ }
1383
+ this.selectedIds.set(next);
1384
+ }
1385
+ selectionBeforeGesture = '';
1386
+ onRowMousedown() {
1387
+ this.selectionBeforeGesture = window.getSelection()?.toString() ?? '';
1388
+ }
1389
+ onRowClick(row, event) {
1390
+ if (event.target.closest('input')) {
1391
+ return;
1392
+ }
1393
+ // Only a selection created by this gesture blocks the click — a stale one
1394
+ // mousedown can't collapse (user-select:none content) must not wedge rows.
1395
+ const selection = window.getSelection()?.toString() ?? '';
1396
+ if (selection && selection !== this.selectionBeforeGesture) {
1397
+ return;
1398
+ }
1399
+ this.rowClicked.emit(row);
1400
+ }
1401
+ onRowKey(row, event) {
1402
+ // Only the row's own key opens the row: a key pressed on a control inside a
1403
+ // cell belongs to that control (Space on the select box, Enter on a button).
1404
+ if (!this.rowInteractive() || event.target !== event.currentTarget) {
1405
+ return;
1406
+ }
1407
+ event.preventDefault();
1408
+ this.rowClicked.emit(row);
1409
+ }
1410
+ rowAriaLabel(row) {
1411
+ const first = this.visibleColumns()[0];
1412
+ return first ? this.cellValue(row, first) : '';
1413
+ }
1414
+ /** Row identity — the `rowId` accessor when given, else `row.id`. Public so a
1415
+ * host reading `selectedIds`/`expandedIds` can compute the same keys. */
1416
+ rowKey(row) {
1417
+ const accessor = this.rowId();
1418
+ if (accessor) {
1419
+ return accessor(row);
1420
+ }
1421
+ return String(row.id ?? '');
1422
+ }
1423
+ sortableCol(col) {
1424
+ return !!col.sortable && this.sortModeResolved() !== 'none';
1425
+ }
1426
+ ariaSort(col) {
1427
+ if (!this.sortableCol(col)) {
1428
+ return null;
1429
+ }
1430
+ if (this.activeSortKey() === col.key && this.activeSortDir()) {
1431
+ return this.activeSortDir() === 'asc' ? 'ascending' : 'descending';
1432
+ }
1433
+ return 'none';
1434
+ }
1435
+ onSort(col) {
1436
+ if (!this.sortableCol(col)) {
1437
+ return;
1438
+ }
1439
+ const order = this.sortingOrder();
1440
+ const currentKey = this.activeSortKey();
1441
+ let dir;
1442
+ if (currentKey !== col.key) {
1443
+ dir = order[0] ?? null;
1444
+ }
1445
+ else {
1446
+ const currentIndex = order.indexOf(this.activeSortDir());
1447
+ dir = order[(currentIndex + 1) % order.length] ?? null;
1448
+ }
1449
+ // The key survives "unsorted" — `dir === null` alone means that. Nulling it too
1450
+ // desynced a host that maps off `sortKey` back to its own default sort.
1451
+ this.sortState.set({ key: col.key, dir });
1452
+ this.sortKeyChange.emit(col.key);
1453
+ this.sortDirChange.emit(dir);
1454
+ this.sortChange.emit({ key: col.key, dir });
1455
+ }
1456
+ headerClasses(col) {
1457
+ const parts = [];
1458
+ if (this.sortableCol(col)) {
1459
+ parts.push('sortable');
1460
+ }
1461
+ if (this.activeSortKey() === col.key && this.activeSortDir()) {
1462
+ parts.push(`sorted-${this.activeSortDir()}`);
1463
+ }
1464
+ return parts.join(' ');
1465
+ }
1466
+ sortIcon(col) {
1467
+ if (this.activeSortKey() !== col.key || !this.activeSortDir()) {
1468
+ return 'sort';
1469
+ }
1470
+ return this.activeSortDir() === 'asc' ? 'sortAsc' : 'sortDesc';
1471
+ }
1472
+ cellValue(row, col) {
1473
+ if (col.cell) {
1474
+ return col.cell(row);
1475
+ }
1476
+ return String(row[col.key] ?? '');
1477
+ }
1478
+ cellLink(row, col) {
1479
+ return col.link?.(row) ?? null;
1480
+ }
1481
+ // localStorage, not session: a column layout the reader arranged should still
1482
+ // be there tomorrow. Every access is guarded — Safari private mode throws on
1483
+ // write, and a quota error must not take the table down with it.
1484
+ layoutKey() {
1485
+ const key = this.storageKey().trim();
1486
+ return this.persistLayout() && key ? `ds-table:${key}` : null;
1487
+ }
1488
+ layoutRestored = false;
1489
+ restoreLayout(key) {
1490
+ try {
1491
+ const raw = localStorage.getItem(key);
1492
+ if (!raw) {
1493
+ return;
1494
+ }
1495
+ const saved = JSON.parse(raw);
1496
+ // Only apply what was actually stored, and only what something owns: a table that has
1497
+ // never been rearranged must keep its declaration order and `hidden` flags, and a layout
1498
+ // saved when a feature was present must not be forced on a table that no longer has it.
1499
+ for (const slice of this.layout.persistedSlices()) {
1500
+ const value = saved[slice.key];
1501
+ if (value !== undefined && value !== null) {
1502
+ slice.write(value);
1503
+ }
1504
+ }
1505
+ }
1506
+ catch {
1507
+ // Unreadable or from an older shape: fall back to the declared layout.
1508
+ }
1509
+ }
1510
+ saveLayout(key, stored) {
1511
+ try {
1512
+ localStorage.setItem(key, JSON.stringify(stored));
1513
+ }
1514
+ catch {
1515
+ // Full or blocked: a lost column layout is not worth an error.
1516
+ }
1517
+ }
1518
+ /** Serialises the visible columns as a CSV download, through whichever export feature is on the
1519
+ * table. Pass `rows` to serialise a set you fetched yourself. Needs `dsTableExport`. */
1520
+ exportCsv(filename = 'table.csv', rows) {
1521
+ if (!this.layout.exportCsv(filename, rows)) {
1522
+ this.warnNoExport('exportCsv');
1523
+ }
1524
+ }
1525
+ /** Runs the export: awaits the feature's `exportFetcher` when one is given, downloads the
1526
+ * result, drives `exporting()` and emits its `exportFailed`. Public so the button can live
1527
+ * anywhere: `<ds-button [loading]="table.exporting()" (pressed)="table.runExport()">`. */
1528
+ async runExport() {
1529
+ const running = this.layout.runExport();
1530
+ if (!running) {
1531
+ this.warnNoExport('runExport');
1532
+ return;
1533
+ }
1534
+ await running;
1535
+ }
1536
+ // The one failure this shape is prone to: a call that finds no feature is a silent no-op, and
1537
+ // the table is the only place that knows whether one registered.
1538
+ warnNoExport(called) {
1539
+ devWarn(() => `ds-table: ${called}() found no export feature. Add the dsTableExport directive to the table.`);
1540
+ }
1541
+ /** Deterministic per-cell width so skeleton rows look organic but stable
1542
+ * across re-renders. */
1543
+ skeletonWidth(col, rowIndex) {
1544
+ const seed = `${col.key}-${rowIndex}`;
1545
+ let hash = 0;
1546
+ for (let charIndex = 0; charIndex < seed.length; charIndex++) {
1547
+ hash = (hash + seed.charCodeAt(charIndex)) | 0;
1548
+ }
1549
+ const widths = ['45%', '55%', '65%', '75%', '85%'];
1550
+ return widths[Math.abs(hash) % widths.length] ?? '70%';
1551
+ }
1552
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1553
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: TableComponent, isStandalone: true, selector: "ds-table", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, rowId: { classPropertyName: "rowId", publicName: "rowId", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, bordered: { classPropertyName: "bordered", publicName: "bordered", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, stickyHeader: { classPropertyName: "stickyHeader", publicName: "stickyHeader", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: false, transformFunction: null }, density: { classPropertyName: "density", publicName: "density", isSignal: true, isRequired: false, transformFunction: null }, zebra: { classPropertyName: "zebra", publicName: "zebra", isSignal: true, isRequired: false, transformFunction: null }, animateHeight: { classPropertyName: "animateHeight", publicName: "animateHeight", isSignal: true, isRequired: false, transformFunction: null }, selectedIds: { classPropertyName: "selectedIds", publicName: "selectedIds", isSignal: true, isRequired: false, transformFunction: null }, sortKey: { classPropertyName: "sortKey", publicName: "sortKey", isSignal: true, isRequired: false, transformFunction: null }, sortDir: { classPropertyName: "sortDir", publicName: "sortDir", isSignal: true, isRequired: false, transformFunction: null }, sortingOrder: { classPropertyName: "sortingOrder", publicName: "sortingOrder", isSignal: true, isRequired: false, transformFunction: null }, sortAnnouncement: { classPropertyName: "sortAnnouncement", publicName: "sortAnnouncement", isSignal: true, isRequired: false, transformFunction: null }, rangeAnnouncement: { classPropertyName: "rangeAnnouncement", publicName: "rangeAnnouncement", isSignal: true, isRequired: false, transformFunction: null }, skeletonRows: { classPropertyName: "skeletonRows", publicName: "skeletonRows", isSignal: true, isRequired: false, transformFunction: null }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: true, isRequired: false, transformFunction: null }, rowInteractive: { classPropertyName: "rowInteractive", publicName: "rowInteractive", isSignal: true, isRequired: false, transformFunction: null }, activeRowId: { classPropertyName: "activeRowId", publicName: "activeRowId", isSignal: true, isRequired: false, transformFunction: null }, filterQuery: { classPropertyName: "filterQuery", publicName: "filterQuery", isSignal: true, isRequired: false, transformFunction: null }, columnFilters: { classPropertyName: "columnFilters", publicName: "columnFilters", isSignal: true, isRequired: false, transformFunction: null }, persistLayout: { classPropertyName: "persistLayout", publicName: "persistLayout", isSignal: true, isRequired: false, transformFunction: null }, storageKey: { classPropertyName: "storageKey", publicName: "storageKey", isSignal: true, isRequired: false, transformFunction: null }, stickyScrollbar: { classPropertyName: "stickyScrollbar", publicName: "stickyScrollbar", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, page: { classPropertyName: "page", publicName: "page", isSignal: true, isRequired: false, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, showPageSize: { classPropertyName: "showPageSize", publicName: "showPageSize", isSignal: true, isRequired: false, transformFunction: null }, showLabel: { classPropertyName: "showLabel", publicName: "showLabel", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: false, transformFunction: null }, scrollToTopOnPageChange: { classPropertyName: "scrollToTopOnPageChange", publicName: "scrollToTopOnPageChange", isSignal: true, isRequired: false, transformFunction: null }, sortMode: { classPropertyName: "sortMode", publicName: "sortMode", isSignal: true, isRequired: false, transformFunction: null }, filterMode: { classPropertyName: "filterMode", publicName: "filterMode", isSignal: true, isRequired: false, transformFunction: null }, columnFilterOptions: { classPropertyName: "columnFilterOptions", publicName: "columnFilterOptions", isSignal: true, isRequired: false, transformFunction: null }, stickyFirstColumn: { classPropertyName: "stickyFirstColumn", publicName: "stickyFirstColumn", isSignal: true, isRequired: false, transformFunction: null }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: true, isRequired: false, transformFunction: null }, virtualRowSize: { classPropertyName: "virtualRowSize", publicName: "virtualRowSize", isSignal: true, isRequired: false, transformFunction: null }, lazy: { classPropertyName: "lazy", publicName: "lazy", isSignal: true, isRequired: false, transformFunction: null }, rowActions: { classPropertyName: "rowActions", publicName: "rowActions", isSignal: true, isRequired: false, transformFunction: null }, cellTemplateMap: { classPropertyName: "cellTemplateMap", publicName: "cellTemplateMap", isSignal: true, isRequired: false, transformFunction: null }, emptyTemplate: { classPropertyName: "emptyTemplate", publicName: "emptyTemplate", isSignal: true, isRequired: false, transformFunction: null }, expandableRows: { classPropertyName: "expandableRows", publicName: "expandableRows", isSignal: true, isRequired: false, transformFunction: null }, expandedIds: { classPropertyName: "expandedIds", publicName: "expandedIds", isSignal: true, isRequired: false, transformFunction: null }, expandMode: { classPropertyName: "expandMode", publicName: "expandMode", isSignal: true, isRequired: false, transformFunction: null }, expandAllToggle: { classPropertyName: "expandAllToggle", publicName: "expandAllToggle", isSignal: true, isRequired: false, transformFunction: null }, rowExpandTemplate: { classPropertyName: "rowExpandTemplate", publicName: "rowExpandTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedIds: "selectedIdsChange", sortKeyChange: "sortKeyChange", sortDirChange: "sortDirChange", columnFilters: "columnFiltersChange", pageSize: "pageSizeChange", page: "pageChange", lazyLoad: "lazyLoad", rowClicked: "rowClicked", sortChange: "sortChange", rowActionSelected: "rowActionSelected", cellEdited: "cellEdited", expandedIds: "expandedIdsChange", rowExpanded: "rowExpanded", rowCollapsed: "rowCollapsed" }, host: { properties: { "class.bordered": "borderedResolved()", "class.selectable": "selectable()", "class.pinned": "stickyFirstColumn()", "class.expandable": "expandableRows()", "class.sticky-scrollbar": "stickyScrollbarResolved()", "class.resizable": "layout.resize() !== null" } }, providers: [DsTableLayout], queries: [{ propertyName: "cellTemplateDirectives", predicate: CellTemplateDirective, isSignal: true }, { propertyName: "headerFilters", predicate: HeaderFilterDirective, isSignal: true }], viewQueries: [{ propertyName: "toolbarAnchor", first: true, predicate: ["toolbarAnchor"], descendants: true, read: ViewContainerRef, isSignal: true }, { propertyName: "headerUtilityAnchor", first: true, predicate: ["headerUtilityAnchor"], descendants: true, read: ViewContainerRef, isSignal: true }, { propertyName: "overlaysAnchor", first: true, predicate: ["overlaysAnchor"], descendants: true, read: ViewContainerRef, isSignal: true }, { propertyName: "columnWidthControls", first: true, predicate: ["columnWidthControls"], descendants: true, isSignal: true }, { propertyName: "columnFilterPopover", first: true, predicate: ["columnFilterPopover"], descendants: true, isSignal: true }, { propertyName: "editInput", first: true, predicate: ["editInput"], descendants: true, isSignal: true }, { propertyName: "rowMenuPopover", first: true, predicate: ["rowMenuPopover"], descendants: true, isSignal: true }, { propertyName: "columnPickerPopover", first: true, predicate: ["columnPickerPopover"], descendants: true, isSignal: true }, { propertyName: "cellTextPopover", first: true, predicate: ["cellTextPopover"], descendants: true, isSignal: true }, { propertyName: "scrollWrap", first: true, predicate: ["scrollWrap"], descendants: true, isSignal: true }, { propertyName: "hscrollProxy", first: true, predicate: ["hscrollProxy"], descendants: true, isSignal: true }, { propertyName: "tableHead", first: true, predicate: ["tableHead"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"table-toolbar\">\n <div class=\"toolbar-slot\">\n <ng-content select=\"[toolbar]\"></ng-content>\n </div>\n\n <ng-container #toolbarAnchor />\n</div>\n\n<!-- Wraps the SCROLL CONTAINER, not the table inside it: the scrim is\n `position: absolute; inset: 0`, so from in there it is sized to one viewport of\n the table and scrolls away with the content. -->\n<ds-loading-overlay\n [loading]=\"isOverlayLoading()\"\n [blur]=\"true\"\n [insetTop]=\"'var(--ds-table-head-h, var(--_table-head-h, 40px))'\"\n [inertContent]=\"false\">\n <div\n #scrollWrap\n class=\"scroll-wrap\"\n [class.scroll-y]=\"maxHeight()\"\n [style.max-height]=\"maxHeight()\">\n <div\n class=\"visually-hidden\"\n role=\"status\"\n aria-live=\"polite\">\n {{ statusMessage() }}\n </div>\n\n <table\n [class]=\"tableClasses()\"\n [style.--_table-virtual-row-h]=\"virtualRowHeight()\"\n [attr.role]=\"rowInteractive() ? 'grid' : null\"\n [attr.aria-busy]=\"loading() !== false ? 'true' : null\">\n @if (caption()) {\n <caption class=\"visually-hidden\">\n {{\n caption()\n }}\n </caption>\n }\n\n <thead #tableHead>\n <tr>\n @if (selectable()) {\n <th\n scope=\"col\"\n class=\"select-col pin-select\">\n <input\n type=\"checkbox\"\n class=\"check\"\n [attr.aria-label]=\"selectAllLabel()\"\n [checked]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n (change)=\"onToggleAll($event)\" />\n </th>\n }\n\n @if (expandableRows()) {\n <th\n scope=\"col\"\n class=\"expand-col\"\n [class.pin-expand]=\"stickyFirstColumn()\">\n @if (expandAllVisible()) {\n <button\n type=\"button\"\n class=\"expand-btn\"\n [attr.aria-label]=\"expandAllLabel()\"\n (click)=\"onToggleExpandAll()\">\n <ds-icon\n class=\"expand-chev\"\n name=\"chevronRight\"\n [class.is-expanded]=\"allExpanded()\"\n [size]=\"16\" />\n </button>\n }\n </th>\n }\n\n @for (col of visibleColumns(); track col.key; let first = $first) {\n <th\n scope=\"col\"\n [class]=\"headerClasses(col)\"\n [class.numeric]=\"col.align === 'right'\"\n [class.pin-first]=\"first && stickyFirstColumn()\"\n [class.fit-content]=\"fitsContent(col)\"\n [style.width.px]=\"columnWidth(col)\"\n [style.min-width.px]=\"columnWidth(col)\"\n [style.max-width.px]=\"columnWidth(col)\"\n [attr.aria-sort]=\"ariaSort(col)\"\n [attr.data-col-key]=\"col.key\"\n (pointerenter)=\"onHeaderEnter($event, col)\">\n @if (sortableCol(col)) {\n <button\n type=\"button\"\n class=\"th-label\"\n (click)=\"onSort(col)\">\n @if (col.label) {\n {{ col.label }}\n } @else if (col.srLabel) {\n <span class=\"visually-hidden\">\n {{ col.srLabel }}\n </span>\n }\n\n <ds-icon\n class=\"sort-icon\"\n [name]=\"sortIcon(col)\"\n [size]=\"12\">\n </ds-icon>\n </button>\n } @else {\n <span class=\"th-label\">\n @if (col.label) {\n {{ col.label }}\n } @else if (col.srLabel) {\n <span class=\"visually-hidden\">\n {{ col.srLabel }}\n </span>\n }\n </span>\n }\n\n @if (hasColumnFilter(col)) {\n <button\n type=\"button\"\n class=\"col-filter-btn\"\n aria-haspopup=\"dialog\"\n [class.active]=\"isColumnFiltered(col)\"\n [attr.aria-label]=\"'Filter ' + col.label\"\n (click)=\"onColumnFilterClick(col, $event)\">\n <ds-icon\n name=\"filter\"\n [size]=\"12\" />\n </button>\n }\n\n @if (layout.resize(); as resize) {\n @let range = resize.range(col);\n\n <span\n class=\"col-resize\"\n role=\"separator\"\n tabindex=\"0\"\n aria-orientation=\"vertical\"\n [attr.aria-label]=\"'Resize ' + col.label\"\n [attr.aria-valuenow]=\"range?.now ?? null\"\n [attr.aria-valuemin]=\"range?.min ?? null\"\n [attr.aria-valuemax]=\"range?.max ?? null\"\n (focus)=\"resize.onFocus(col, $event)\"\n (blur)=\"resize.onBlur()\"\n (pointerdown)=\"resize.onStart(col, $event)\"\n (pointermove)=\"resize.onMove($event)\"\n (pointerup)=\"resize.onEnd()\"\n (pointercancel)=\"resize.onEnd()\"\n (keydown)=\"resize.onKey(col, $event)\">\n </span>\n }\n </th>\n }\n\n @if (hasUtilityColumn()) {\n <th\n scope=\"col\"\n class=\"actions-col\">\n <ng-container #headerUtilityAnchor />\n\n @if (!layout.wantsUtilityColumn()) {\n <span class=\"visually-hidden\">\n Actions\n </span>\n }\n </th>\n }\n </tr>\n </thead>\n\n <!-- Matches what the scrim covers, which is everything below the header:\n a row keeps its tabindex and its Enter handler otherwise, so a keyboard\n user could open a row whose data is mid-replacement while the pointer\n was stopped by the scrim. The header stays live on purpose \u2014 re-sorting\n is what puts the scrim up in the first place. -->\n <tbody [attr.inert]=\"isOverlayLoading() ? '' : null\">\n @if (isSkeletonLoading()) {\n @for (_ of skeletonArray(); track $index; let rowIndex = $index) {\n <ng-container\n [ngTemplateOutlet]=\"skeletonRow\"\n [ngTemplateOutletContext]=\"{ $implicit: rowIndex }\">\n </ng-container>\n }\n } @else if (showsEmptyRow()) {\n <tr>\n <td\n class=\"empty\"\n [attr.colspan]=\"expandedColspan()\">\n @if (emptyTemplate()) {\n <ng-container [ngTemplateOutlet]=\"emptyTemplate()!\">\n </ng-container>\n } @else {\n <ng-content select=\"[empty]\"></ng-content>\n }\n </td>\n </tr>\n } @else {\n @if (virtualWindow(); as window) {\n <tr\n class=\"spacer\"\n aria-hidden=\"true\"\n [style.height.px]=\"window.padTop\">\n </tr>\n }\n\n @for (slot of rowSlots(); track slot.index) {\n @if (slot.row; as row) {\n <tr\n [class.selected]=\"isSelected(row)\"\n [class.expanded]=\"isExpanded(row)\"\n [class.clickable]=\"rowInteractive()\"\n [class.stripe]=\"isStriped(slot.index)\"\n [class.active]=\"rowKey(row) === activeRowId()\"\n [attr.aria-current]=\"\n rowKey(row) === activeRowId() ? 'true' : null\n \"\n [attr.tabindex]=\"rowInteractive() ? 0 : null\"\n [attr.aria-label]=\"rowInteractive() ? rowAriaLabel(row) : null\"\n (mousedown)=\"onRowMousedown()\"\n (click)=\"onRowClick(row, $event)\"\n (keydown.enter)=\"onRowKey(row, $event)\"\n (keydown.space)=\"onRowKey(row, $event)\">\n @if (selectable()) {\n <td class=\"select-col pin-select\">\n <input\n type=\"checkbox\"\n class=\"check\"\n [attr.aria-label]=\"'Select ' + rowAriaLabel(row)\"\n [checked]=\"isSelected(row)\"\n (change)=\"onToggleRow(row, $event)\"\n (click)=\"$event.stopPropagation()\" />\n </td>\n }\n\n @if (expandableRows()) {\n <td\n class=\"expand-col\"\n [class.pin-expand]=\"stickyFirstColumn()\">\n <button\n type=\"button\"\n class=\"expand-btn\"\n [attr.aria-expanded]=\"isExpanded(row)\"\n [attr.aria-label]=\"\n isExpanded(row) ? 'Collapse row' : 'Expand row'\n \"\n (click)=\"onToggleExpand(row, $event)\">\n <ds-icon\n class=\"expand-chev\"\n name=\"chevronRight\"\n [class.is-expanded]=\"isExpanded(row)\"\n [size]=\"16\" />\n </button>\n </td>\n }\n\n @for (\n col of visibleColumns();\n track col.key;\n let first = $first\n ) {\n <td\n [class.numeric]=\"col.align === 'right'\"\n [class.pin-first]=\"first && stickyFirstColumn()\"\n [class.editable-cell]=\"col.editable\"\n [class.interactive-cell]=\"col.interactive\"\n [class.fit-content]=\"fitsContent(col)\"\n (dblclick)=\"startEdit(row, col, $event)\">\n @if (isEditing(row, col)) {\n <input\n #editInput\n type=\"text\"\n class=\"cell-edit\"\n [value]=\"editDraft()\"\n (input)=\"onEditInput($event)\"\n (click)=\"$event.stopPropagation()\"\n (keydown.enter)=\"commitEdit(row, col)\"\n (keydown.escape)=\"cancelEdit()\"\n (blur)=\"commitEdit(row, col)\" />\n } @else if (cellTemplate(col); as tpl) {\n @if (col.truncate) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- same pointer-only enhancement as the plain truncate branch below; the value stays in the DOM for AT -->\n <span\n class=\"cell-clip\"\n [style.max-width.px]=\"clipWidth(col)\"\n [attr.title]=\"cellValue(row, col)\"\n (click)=\"onCellClipClick(row, col, $event)\">\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: row,\n row: row,\n }\">\n </ng-container>\n </span>\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: row,\n row: row,\n }\">\n </ng-container>\n }\n } @else if (col.truncate) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- pointer-only enhancement: the clip is visual (CSS ellipsis), keyboard/AT users already get the full DOM text + title; a tab stop per cell would wreck keyboard traversal -->\n <span\n class=\"cell-clip\"\n [style.max-width.px]=\"clipWidth(col)\"\n [attr.title]=\"cellValue(row, col)\"\n (click)=\"onCellClipClick(row, col, $event)\">\n @if (cellLink(row, col); as target) {\n <a\n class=\"cell-link\"\n [routerLink]=\"target\"\n (click)=\"$event.stopPropagation()\">\n {{ cellValue(row, col) }}\n </a>\n } @else {\n {{ cellValue(row, col) }}\n }\n </span>\n } @else if (cellLink(row, col); as target) {\n <a\n class=\"cell-link\"\n [routerLink]=\"target\"\n (click)=\"$event.stopPropagation()\">\n {{ cellValue(row, col) }}\n </a>\n } @else {\n {{ cellValue(row, col) }}\n }\n </td>\n }\n\n @if (hasUtilityColumn()) {\n <td class=\"actions-col\">\n @if (hasRowActions() && hasActionsFor(row)) {\n <button\n type=\"button\"\n class=\"row-actions-btn\"\n aria-haspopup=\"menu\"\n [attr.aria-expanded]=\"isMenuOpenFor(row)\"\n [attr.aria-label]=\"'Actions for ' + rowAriaLabel(row)\"\n (click)=\"onRowMenuClick(row, $event)\"\n (keydown.enter)=\"$event.stopPropagation()\"\n (keydown.space)=\"$event.stopPropagation()\">\n <ds-icon\n name=\"moreV\"\n [size]=\"16\" />\n </button>\n }\n </td>\n }\n </tr>\n\n @if (\n expandableRows() &&\n isExpanded(row) &&\n rowExpandTemplate() &&\n !virtualizing()\n ) {\n <tr class=\"expand-panel-row\">\n <td\n class=\"expand-panel-cell\"\n [attr.colspan]=\"expandedColspan()\">\n <ng-container\n [ngTemplateOutlet]=\"rowExpandTemplate()!\"\n [ngTemplateOutletContext]=\"{ $implicit: row, row: row }\">\n </ng-container>\n </td>\n </tr>\n }\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"skeletonRow\"\n [ngTemplateOutletContext]=\"{ $implicit: slot.index }\">\n </ng-container>\n }\n }\n\n @if (virtualWindow(); as window) {\n <tr\n class=\"spacer\"\n aria-hidden=\"true\"\n [style.height.px]=\"window.padBottom\">\n </tr>\n }\n }\n </tbody>\n </table>\n </div>\n</ds-loading-overlay>\n\n@if (stickyScrollbarResolved()) {\n <div\n #hscrollProxy\n class=\"hscroll-proxy\"\n aria-hidden=\"true\"\n [class.hscroll-hidden]=\"!hscrollNeeded()\">\n <div\n class=\"hscroll-spacer\"\n [style.width.px]=\"hscrollContentWidth()\">\n </div>\n </div>\n}\n\n@if (pageSize(); as size) {\n <div class=\"pagination-footer\">\n <ds-pagination\n [total]=\"total() ?? filteredData().length\"\n [pageSize]=\"size\"\n [pageSizeOptions]=\"pageSizeOptions()\"\n [showPageSize]=\"showPageSize()\"\n [showLabel]=\"showLabel()\"\n [(currentPage)]=\"page\"\n (pageSizeChange)=\"pageSize.set($event)\" />\n </div>\n}\n\n@if (hasTruncate()) {\n <ds-popover #cellTextPopover>\n <div class=\"cell-text-pop\">\n {{ cellPopoverText() }}\n </div>\n </ds-popover>\n}\n\n@if (filterColumn()) {\n <ds-popover\n #columnFilterPopover\n align=\"start\"\n panelRole=\"dialog\"\n panelLabel=\"Filter values\">\n @if (headerFilterFor(filterColumn()!); as projected) {\n <div class=\"col-filter col-filter-custom\">\n <ng-container\n [ngTemplateOutlet]=\"projected.template\"\n [ngTemplateOutletContext]=\"headerFilterContext(filterColumn()!)\" />\n </div>\n } @else {\n <div class=\"col-filter\">\n <input\n type=\"text\"\n class=\"col-filter-search\"\n placeholder=\"Search\u2026\"\n [value]=\"filterSearch()\"\n (input)=\"onFilterSearch($event)\"\n (click)=\"$event.stopPropagation()\" />\n\n <div class=\"col-filter-list\">\n @for (value of filterValues(); track value) {\n <label class=\"col-filter-option\">\n <input\n type=\"checkbox\"\n class=\"check\"\n [checked]=\"isFilterValueChecked(value)\"\n (change)=\"toggleFilterValue(value)\" />\n {{ value || '(empty)' }}\n </label>\n } @empty {\n <div class=\"col-filter-empty\">\n No matches\n </div>\n }\n </div>\n\n <div class=\"col-filter-footer\">\n <span class=\"col-filter-count\">\n {{ filterSelectedCount() }} selected\n </span>\n\n <button\n type=\"button\"\n class=\"col-reset\"\n (click)=\"clearColumnFilter()\">\n Clear\n </button>\n </div>\n </div>\n }\n </ds-popover>\n}\n\n<ng-container #overlaysAnchor />\n\n<ng-template\n #columnWidthControls\n let-col>\n @if (layout.resize(); as resize) {\n <span class=\"col-width\">\n <button\n type=\"button\"\n class=\"col-width-btn\"\n [attr.aria-label]=\"'Narrow ' + col.label\"\n (click)=\"resize.step(col, -16)\">\n <ds-icon\n name=\"minus\"\n [size]=\"14\" />\n </button>\n\n <button\n type=\"button\"\n class=\"col-width-btn\"\n [attr.aria-label]=\"'Widen ' + col.label\"\n (click)=\"resize.step(col, 16)\">\n <ds-icon\n name=\"plus\"\n [size]=\"14\" />\n </button>\n\n <button\n type=\"button\"\n class=\"col-width-btn col-width-auto\"\n [attr.aria-label]=\"'Fit ' + col.label + ' to its content'\"\n (click)=\"resize.step(col, 'auto')\">\n Fit\n </button>\n </span>\n }\n</ng-template>\n\n@if (hasRowActions()) {\n <ds-popover\n #rowMenuPopover\n align=\"end\">\n <ds-menu>\n @for (action of visibleRowActions(); track action.id) {\n <ds-menu-item\n [icon]=\"action.icon ?? null\"\n [error]=\"action.error ?? false\"\n [disabled]=\"isActionDisabled(action)\"\n [description]=\"actionReason(action)\"\n (pressed)=\"onRowAction(action)\">\n {{ action.label }}\n </ds-menu-item>\n }\n </ds-menu>\n </ds-popover>\n}\n\n@if (selectable() && anySelected()) {\n <div class=\"bulk-bar\">\n <span class=\"count\">\n {{ selectedIds().size }} selected\n </span>\n\n <span class=\"sep\"></span>\n\n <ng-content select=\"[bulk-actions]\"></ng-content>\n </div>\n}\n\n<!-- One skeleton row, shared by loading=\"skeleton\" and the gaps a lazy\n window has not filled yet. `$implicit` is the row's index: skeletonWidth\n varies the bar lengths from it, so a block of them does not read as a grid. -->\n<ng-template\n #skeletonRow\n let-rowIndex>\n <tr>\n @if (selectable()) {\n <td class=\"select-col pin-select\">\n <ds-skeleton\n width=\"14px\"\n height=\"14px\"\n [inline]=\"true\" />\n </td>\n }\n\n @if (expandableRows()) {\n <td\n class=\"expand-col\"\n [class.pin-expand]=\"stickyFirstColumn()\">\n </td>\n }\n\n @for (col of visibleColumns(); track col.key; let first = $first) {\n <td\n [class.numeric]=\"col.align === 'right'\"\n [class.pin-first]=\"first && stickyFirstColumn()\">\n <ds-skeleton\n height=\"14px\"\n [width]=\"skeletonWidth(col, rowIndex)\"\n [inline]=\"true\" />\n </td>\n }\n\n @if (hasUtilityColumn()) {\n <td class=\"actions-col\"></td>\n }\n </tr>\n</ng-template>\n", styles: ["@charset \"UTF-8\";:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_checkbox-bg: var(--ds-checkbox-bg-color, var(--surface-default));--_checkbox-border: var(--ds-checkbox-border-color, var(--border-strong));--_checkbox-hover-border: var(--ds-checkbox-hover-border-color, var(--accent));--_checkbox-selected-bg: var(--ds-checkbox-selected-bg-color, var(--accent));--_checkbox-selected-border: var(--ds-checkbox-selected-border-color, var(--accent));--_checkbox-radius: var(--ds-checkbox-radius, var(--ds-radius-inner));--_checkbox-glyph: var(--check-size);display:block;position:relative}.check{appearance:none;width:var(--_checkbox-glyph, var(--check-size));height:var(--_checkbox-glyph, var(--check-size));border:var(--check-bw) solid var(--_checkbox-border, var(--ds-checkbox-border-color, var(--border-strong)));background:var(--_checkbox-bg, var(--ds-checkbox-bg-color, var(--surface-default)));cursor:pointer;display:inline-grid;place-items:center;flex-shrink:0;margin:0;border-radius:var(--_checkbox-radius, var(--ds-checkbox-radius, var(--ds-radius-inner)));transition:background-color var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard)}.check:hover:not(:disabled){border-color:var(--_checkbox-hover-border, var(--ds-checkbox-hover-border-color, var(--accent)))}.check:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.check:disabled{background:var(--surface-disabled);border-color:var(--border-disabled);cursor:not-allowed}.check{color:var(--icon-on-primary)}.check:after{content:\"\";--_check-mark-enter-duration: var(--ds-check-mark-enter-duration, var(--ds-motion-check-enter-duration));--_check-mark-enter-easing: var(--ds-check-mark-enter-easing, var(--ds-motion-check-enter-easing));--_check-mark-exit-duration: var(--ds-check-mark-exit-duration, var(--ds-motion-check-exit-duration));--_check-mark-exit-easing: var(--ds-check-mark-exit-easing, var(--ds-motion-check-exit-easing));width:var(--check-tick-size);height:var(--check-tick-size);transform:scale(.6);opacity:0;transform-origin:center;transition:transform var(--_check-mark-exit-duration) var(--_check-mark-exit-easing),opacity var(--_check-mark-exit-duration) var(--_check-mark-exit-easing);background-color:currentcolor}@media(forced-colors:active){.check:after{background-color:CanvasText}}.check:after{-webkit-mask:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'><path d='M2 6.5l2.5 2.5L10 3.5' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>\") center/contain no-repeat;mask:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'><path d='M2 6.5l2.5 2.5L10 3.5' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>\") center/contain no-repeat}.check:checked{background:var(--_checkbox-selected-bg, var(--ds-checkbox-selected-bg-color, var(--accent)));border-color:var(--_checkbox-selected-border, var(--ds-checkbox-selected-border-color, var(--accent)))}.check:checked:after{transform:scale(1);opacity:1;transition:transform var(--_check-mark-enter-duration) var(--_check-mark-enter-easing),opacity var(--_check-mark-enter-duration) var(--_check-mark-enter-easing)}.check:indeterminate{background:var(--_checkbox-selected-bg, var(--ds-checkbox-selected-bg-color, var(--accent)));border-color:var(--_checkbox-selected-border, var(--ds-checkbox-selected-border-color, var(--accent)))}.check:indeterminate:after{transform:scale(1);opacity:1;transition:transform var(--_check-mark-enter-duration) var(--_check-mark-enter-easing),opacity var(--_check-mark-enter-duration) var(--_check-mark-enter-easing);width:var(--check-indet-w);height:var(--check-indet-h);border-radius:var(--ds-radius-inner);-webkit-mask:none;mask:none}.check:focus-visible{outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host(.bordered) .scroll-wrap{border:var(--border-width-default) solid var(--_table-border);border-radius:var(--_table-radius)}.scroll-wrap{--_table-border: var(--ds-table-border, var(--border-default));--_table-radius: var(--ds-table-radius, var(--ds-radius-control));--_table-bg-color: var(--ds-table-bg-color, var(--surface-default));width:100%;overflow:auto hidden;--focus-ring-offset: calc(-1 * var(--focus-ring-width));-webkit-overflow-scrolling:touch;background:var(--surface-default);box-sizing:border-box}.scroll-wrap.scroll-y{overflow-y:auto}:host(.sticky-scrollbar) .scroll-wrap{scrollbar-width:none}:host(.sticky-scrollbar) .scroll-wrap::-webkit-scrollbar{display:none}:host(.resizable) thead th{position:relative;overflow:hidden}@media(hover:none)and (pointer:coarse){.col-resize{display:none}}.col-resize{position:absolute;inset-block:0;right:0;width:var(--space-2);cursor:col-resize;touch-action:none;-webkit-user-select:none;user-select:none}.col-resize:after{content:\"\";position:absolute;inset-block:var(--space-2);right:0;width:var(--border-width-default);background-color:transparent;transition:background-color var(--duration-fast) var(--ease-standard)}.col-resize:hover:after,.col-resize:active:after,.col-resize:focus-visible:after{background-color:var(--_table-sort-active-icon-color)}@media not (forced-colors:active){.col-resize:focus-visible{outline:none}}.col-resize:focus-visible:after{width:var(--border-width-strong)}.hscroll-proxy{position:sticky;bottom:var(--ds-table-hscroll-bottom, 0);overflow:auto hidden}.hscroll-spacer{height:1px}.hscroll-hidden{display:none}.table{--_table-min-width: var(--ds-table-min-width, 0);--_table-bg-color: var(--ds-table-bg-color, var(--surface-default));--_table-row-hover-bg-color: var(--ds-table-row-hover-bg-color, var(--surface-secondary));--_table-row-selected-bg-color: var(--ds-table-row-selected-bg-color, var(--accent-subtitle));--_table-row-pressed-bg-color: var(--ds-table-row-pressed-bg-color, var(--surface-muted));--_table-row-active-bg-color: var(--ds-table-row-active-bg-color, var(--accent-subtitle));--_table-row-stripe-bg-color: var(--ds-table-row-stripe-bg-color, var(--surface-secondary));--_table-cell-link-color: var(--ds-table-cell-link-color, var(--accent));--_table-cell-link-decoration: var(--ds-table-cell-link-decoration, underline);--_table-head-text-color: var(--ds-table-head-text-color, var(--text-secondary));--_table-head-bg-color: var(--ds-table-head-bg-color, var(--surface-secondary));--_table-head-fs: var(--ds-table-head-fs, var(--font-size-xs));--_table-divider: var(--ds-table-divider, var(--border-divider));--_table-sort-active-icon-color: var(--ds-table-sort-active-icon-color, var(--accent));--_table-icon-btn-color: var(--ds-table-icon-btn-color, var(--icon-default));--_table-icon-btn-color-hover: var(--ds-table-icon-btn-color-hover, var(--icon-strong));--_table-icon-btn-focus-color: var(--ds-table-icon-btn-focus-color, var(--accent));--_table-cell-pad-x: var(--ds-table-cell-pad-x, var(--table-cell-pad-x));--_table-cell-pad-y: var(--ds-table-cell-pad-y, var(--table-cell-pad-y));--_table-cell-pad-top: var(--ds-table-cell-pad-top, var(--_table-cell-pad-y));--_table-cell-pad-right: var(--ds-table-cell-pad-right, var(--_table-cell-pad-x));--_table-cell-pad-bottom: var(--ds-table-cell-pad-bottom, var(--_table-cell-pad-y));--_table-cell-pad-left: var(--ds-table-cell-pad-left, var(--_table-cell-pad-x));--_table-head-pad-top: var(--ds-table-head-pad-top, var(--table-head-pad-y));--_table-head-pad-bottom: var(--ds-table-head-pad-bottom, var(--table-head-pad-y));--_table-head-border-color: var(--ds-table-head-border-color, var(--_table-divider));--_table-head-weight: var(--ds-table-head-weight, var(--font-weight-bold));--_table-head-tracking: var(--ds-table-head-tracking, var(--letter-spacing-wider));width:100%;border-collapse:collapse;font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary);background-color:var(--_table-bg-color)}.table th.fit-content,.table td.fit-content{width:1%;white-space:nowrap}.table thead th{text-align:left;padding:var(--_table-head-pad-top) var(--_table-cell-pad-right) var(--_table-head-pad-bottom) var(--_table-cell-pad-left);font:var(--_table-head-weight) var(--_table-head-fs)/var(--line-height-base) var(--font-sans);letter-spacing:var(--_table-head-tracking);text-transform:uppercase;color:var(--_table-head-text-color);background-color:var(--_table-head-bg-color);border-bottom:var(--border-width-default) solid var(--_table-head-border-color);white-space:nowrap}.table thead th .th-label{display:inline-flex;align-items:center;vertical-align:middle;appearance:none;background:none;border:0;margin:0;padding:0;font:inherit;letter-spacing:inherit;text-transform:inherit;color:inherit;text-align:left}.table thead th button.th-label{cursor:pointer;-webkit-user-select:none;user-select:none;transition:color var(--duration-fast) var(--ease-standard)}.table thead th button.th-label:hover{color:var(--text-secondary)}.table thead th button.th-label:focus-visible{outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--radius-sm)}.table thead th .sort-icon{display:inline-block;width:var(--sort-ic-size);height:var(--sort-ic-size);margin-left:var(--sort-ic-gap);vertical-align:middle;transform:translateY(-1px);color:var(--icon-default);opacity:var(--sort-ic-opacity-idle);transition:opacity var(--duration-fast) var(--ease-standard),color var(--duration-fast) var(--ease-standard)}.table thead th .sort-icon .icon{width:var(--sort-ic-size);height:var(--sort-ic-size);display:block}.table thead th.sorted-asc .sort-icon,.table thead th.sorted-desc .sort-icon{opacity:1;color:var(--_table-sort-active-icon-color)}.table thead th.numeric{text-align:right}.table thead th.select-col,.table thead th.expand-col,.table thead th.actions-col{width:var(--space-10)}.table.sticky-header thead th{position:sticky;top:0}.table.sticky-header thead th:not(.pin-select,.pin-first,.pin-expand){z-index:var(--table-sticky-header-z)}.table tbody td{padding:var(--_table-cell-pad-top) var(--_table-cell-pad-right) var(--_table-cell-pad-bottom) var(--_table-cell-pad-left);line-height:var(--line-height-flat);transition:background-color var(--duration-fast) var(--ease-standard);box-shadow:inset 0 calc(-1 * var(--border-width-default)) 0 var(--_table-divider);vertical-align:middle}.table tbody td.numeric{text-align:right}.table tbody td.empty{text-align:center;color:var(--text-tertiary);padding:var(--space-4)}.table tbody tr:last-child td{box-shadow:none}.table tbody tr.clickable:not(.active):hover td{background-color:var(--_table-row-hover-bg-color)}.table tbody tr.clickable:hover td.interactive-cell,.table tbody tr td .cell-link{color:var(--_table-cell-link-color);text-decoration:var(--_table-cell-link-decoration)}.table tbody tr.selected td{background-color:var(--_table-row-selected-bg-color)}.table tbody tr.active td{background-color:var(--_table-row-active-bg-color)}.table tbody tr.clickable:active td{background-color:var(--_table-row-pressed-bg-color)}.table tbody tr.clickable{cursor:pointer}.table tbody tr.clickable:focus-visible{outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:calc(-1 * var(--focus-ring-width));animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}.table tbody .expand-col,.table tbody .actions-col{width:var(--space-10)}.table tbody .expand-panel-cell{padding:var(--_table-cell-pad-top) var(--_table-cell-pad-right) var(--_table-cell-pad-bottom) var(--_table-cell-pad-left)}.table tbody .cell-clip{display:block;overflow:clip;overflow-clip-margin:var(--space-1);text-overflow:ellipsis;white-space:nowrap}.table .expand-chev{display:block;transition:transform var(--duration-base) var(--ease-standard)}@media(prefers-reduced-motion:reduce){.table .expand-chev{transition:none}}.table .expand-chev.is-expanded{transform:rotate(90deg)}.table .expand-btn,.table .row-actions-btn,.table .col-picker-btn{display:flex;align-items:center;justify-content:center;width:var(--space-6);height:var(--space-6);padding:0;border:0;background:none;cursor:pointer;color:var(--_table-icon-btn-color);border-radius:var(--ds-radius-inner);transition:color var(--duration-fast) var(--ease-standard)}.table .expand-btn:hover,.table .row-actions-btn:hover,.table .col-picker-btn:hover{color:var(--_table-icon-btn-color-hover)}.table .expand-btn:focus-visible,.table .row-actions-btn:focus-visible,.table .col-picker-btn:focus-visible{--focus-ring-color: var(--_table-icon-btn-focus-color);outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}.table.compact{--table-cell-pad-x: var(--space-3);--table-cell-pad-y: var(--space-2);--table-head-pad-y: var(--space-2)}.table{min-width:var(--_table-min-width)}.table.zebra:not(.virtual) tbody tr:nth-child(odd) td{background-color:var(--_table-row-stripe-bg-color)}.table.zebra.virtual tbody tr.stripe td{background-color:var(--_table-row-stripe-bg-color)}.table.virtual{table-layout:fixed}.table.virtual tbody tr:not(.spacer){height:var(--_table-virtual-row-h)}.table.virtual tbody td{overflow:clip;overflow-clip-margin:var(--space-1);text-overflow:ellipsis;white-space:nowrap}.table tbody tr.spacer{padding:0;border:0;background:none}.table tbody tr.spacer:hover td{background-color:transparent}.col-picker{display:grid;gap:var(--space-2);min-width:160px}.col-picker-row{display:flex;align-items:center;gap:var(--space-2)}.col-picker-row.cdk-drag-preview{background-color:var(--surface-default);border-radius:var(--ds-radius-inner);box-shadow:var(--shadow-popover);padding:var(--space-1) var(--space-2)}.col-picker-row.cdk-drag-placeholder{opacity:.4}.col-picker.cdk-drop-list-dragging .col-picker-row:not(.cdk-drag-placeholder){transition:transform var(--duration-fast) var(--ease-standard)}.col-drag{display:inline-flex;color:var(--icon-default);cursor:grab}.col-drag:active{cursor:grabbing}.col-picker-option{display:flex;align-items:center;gap:var(--space-2);flex:1;font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary);cursor:pointer}.col-picker-option:has(input:disabled){color:var(--text-tertiary);cursor:default}.col-width{display:inline-flex;gap:var(--space-1);align-items:center;margin-left:auto}.col-width-auto{width:auto;padding-inline:var(--space-2);font:var(--font-weight-medium) var(--font-size-xs)/var(--line-height-base) var(--font-sans)}.col-move{display:inline-flex;gap:var(--space-1)}.col-width-btn,.col-move-btn{display:inline-flex;padding:0;border:0;background:none;color:var(--icon-default);cursor:pointer}.col-width-btn:hover:not(:disabled),.col-move-btn:hover:not(:disabled){color:var(--icon-strong)}.col-width-btn:disabled,.col-move-btn:disabled{color:var(--text-disabled);cursor:default}.col-reset{margin-top:var(--space-1);padding:0;border:0;background:none;color:var(--accent);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);cursor:pointer;text-align:left}.col-reset:hover{text-decoration:underline}.col-filter-btn{display:inline-flex;margin-left:var(--space-1);padding:0;border:0;background:none;color:var(--icon-default);opacity:.5;cursor:pointer;vertical-align:middle;transition:color var(--duration-fast) var(--ease-standard),opacity var(--duration-fast) var(--ease-standard)}.col-filter-btn:hover{opacity:1;color:var(--icon-strong)}.col-filter-btn.active{opacity:1;color:var(--_table-sort-active-icon-color)}.col-filter{display:grid;gap:var(--space-2);min-width:180px}.col-filter-search{width:100%;box-sizing:border-box;padding:var(--space-1) var(--space-2);border:var(--border-width-default) solid var(--border-default);border-radius:var(--ds-radius-inner);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary);background-color:var(--surface-default)}.col-filter-search:focus-visible{border-color:var(--accent);outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}.col-filter-list{display:grid;gap:var(--space-1);max-height:240px;overflow-y:auto}.col-filter-option{display:flex;align-items:center;gap:var(--space-2);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary);cursor:pointer}.col-filter-empty{color:var(--text-tertiary);font-size:var(--font-size-s);padding:var(--space-1) 0}.col-filter-footer{display:flex;align-items:center;justify-content:space-between;padding-top:var(--space-1);border-top:var(--border-width-default) solid var(--border-divider)}.col-filter-count{color:var(--text-tertiary);font-size:var(--font-size-xs)}.col-filter-footer .col-reset{margin-top:0}.editable-cell{cursor:text}.cell-edit{width:100%;box-sizing:border-box;margin:calc(-1 * var(--space-1)) 0;padding:var(--space-1) var(--space-2);border:var(--border-width-default) solid var(--accent);border-radius:var(--ds-radius-inner);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary);background-color:var(--surface-default)}.cell-edit:focus-visible{outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}.cell-text-pop{max-width:360px;overflow-wrap:anywhere;font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary)}:host(.pinned){--_table-select-w: var(--ds-table-select-col-w, var(--space-10))}:host(.pinned) .table{border-collapse:separate;border-spacing:0}:host(.pinned) .table tbody td{box-shadow:none;border-bottom:var(--border-width-default) solid var(--_table-divider)}:host(.pinned) .table tbody tr:last-child td{border-bottom:0}:host(.pinned) .pin-select,:host(.pinned) .pin-first{position:sticky;left:0;z-index:var(--table-sticky-col-z);background-color:var(--_table-bg-color)}:host(.pinned) thead .pin-select,:host(.pinned) thead .pin-first{z-index:var(--table-sticky-corner-z);background-color:var(--_table-head-bg-color)}:host(.pinned) tbody tr.clickable:not(.active):hover .pin-first,:host(.pinned) tbody tr.clickable:not(.active):hover .pin-select{background-color:var(--_table-row-hover-bg-color)}:host(.pinned) tbody tr.selected .pin-first,:host(.pinned) tbody tr.selected .pin-select{background-color:var(--_table-row-selected-bg-color)}:host(.pinned) tbody tr.active .pin-first,:host(.pinned) tbody tr.active .pin-select{background-color:var(--_table-row-active-bg-color)}:host(.pinned) tbody tr.clickable:active .pin-first,:host(.pinned) tbody tr.clickable:active .pin-select{background-color:var(--_table-row-pressed-bg-color)}:host(.pinned.selectable) .pin-first{left:var(--_table-select-w)}:host(.pinned.expandable){--_table-expand-w: var(--ds-table-expand-col-w, var(--space-10))}:host(.pinned.expandable) .pin-expand{position:sticky;left:0;z-index:var(--table-sticky-col-z);background-color:var(--_table-bg-color)}:host(.pinned.expandable) thead .pin-expand{z-index:var(--table-sticky-corner-z);background-color:var(--_table-head-bg-color)}:host(.pinned.expandable) tbody tr.clickable:not(.active):hover .pin-expand{background-color:var(--_table-row-hover-bg-color)}:host(.pinned.expandable) tbody tr.selected .pin-expand{background-color:var(--_table-row-selected-bg-color)}:host(.pinned.expandable) tbody tr.active .pin-expand{background-color:var(--_table-row-active-bg-color)}:host(.pinned.expandable) tbody tr.clickable:active .pin-expand{background-color:var(--_table-row-pressed-bg-color)}:host(.pinned.expandable) .pin-first{left:var(--_table-expand-w)}:host(.pinned.selectable.expandable) .pin-expand{left:var(--_table-select-w)}:host(.pinned.selectable.expandable) .pin-first{left:calc(var(--_table-select-w) + var(--_table-expand-w))}.pagination-footer{padding:var(--space-3) var(--ds-table-cell-pad-x, var(--table-cell-pad-x)) var(--space-3);border-top:var(--border-width-default) solid var(--ds-table-divider, var(--border-divider))}.bulk-bar{position:sticky;bottom:var(--bulk-bar-offset);display:flex;align-items:center;gap:var(--space-3);padding:var(--space-3) var(--space-4);background:var(--surface-inverted);color:var(--text-inverted);border-radius:var(--radius-lg);box-shadow:var(--shadow-toast);margin:var(--space-4) auto 0;width:fit-content}.bulk-bar .count{font:var(--font-weight-bold) var(--font-size-s)/var(--line-height-flat) var(--font-sans)}.bulk-bar .sep{width:var(--border-width-default);height:var(--space-4);background:var(--border-inverted)}.bulk-bar{--ds-button-label-color: var(--text-inverted);--ds-button-bg-color: transparent;--ds-button-bg-color-hover: var(--surface-inverted-hover);--ds-button-bg-color-active: var(--surface-inverted-hover)}.table-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-2);margin-bottom:var(--space-2)}.table-toolbar:not(:has(.toolbar-slot>*,>ds-button)){display:none}.toolbar-slot{display:flex;flex:1 1 auto;flex-wrap:wrap;align-items:center;gap:var(--space-2);min-width:0}.toolbar-slot ::ng-deep>:only-child{flex:1 1 auto;min-width:0}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SkeletonComponent, selector: "ds-skeleton", inputs: ["width", "height", "circle", "inline"] }, { kind: "component", type: PaginationComponent, selector: "ds-pagination", inputs: ["total", "pageSize", "currentPage", "pageSizeOptions", "showLabel", "showPageSize"], outputs: ["pageSizeChange", "currentPageChange"] }, { kind: "component", type: LoadingOverlayComponent, selector: "ds-loading-overlay", inputs: ["loading", "label", "blur", "spinnerSize", "insetTop", "inertContent"] }, { kind: "component", type: PopoverComponent, selector: "ds-popover", inputs: ["align", "placement", "arrow", "panelRole", "panelLabel"] }, { kind: "component", type: MenuComponent, selector: "ds-menu" }, { kind: "component", type: MenuItemComponent, selector: "ds-menu-item", inputs: ["icon", "disabled", "error", "quiet", "description", "submenu"], outputs: ["pressed"] }, { kind: "directive", type:
1554
+ // Only instantiated when a column sets `link`, so a consumer app with no router
1555
+ // provided still renders the table — the directive is never constructed.
1556
+ RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] });
1557
+ }
1558
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: TableComponent, decorators: [{
1559
+ type: Component,
1560
+ args: [{ selector: 'ds-table', standalone: true, imports: [
1561
+ IconComponent,
1562
+ NgTemplateOutlet,
1563
+ SkeletonComponent,
1564
+ PaginationComponent,
1565
+ LoadingOverlayComponent,
1566
+ PopoverComponent,
1567
+ MenuComponent,
1568
+ MenuItemComponent,
1569
+ // Only instantiated when a column sets `link`, so a consumer app with no router
1570
+ // provided still renders the table — the directive is never constructed.
1571
+ RouterLink,
1572
+ ], encapsulation: ViewEncapsulation.Emulated, host: {
1573
+ '[class.bordered]': 'borderedResolved()',
1574
+ '[class.selectable]': 'selectable()',
1575
+ '[class.pinned]': 'stickyFirstColumn()',
1576
+ '[class.expandable]': 'expandableRows()',
1577
+ '[class.sticky-scrollbar]': 'stickyScrollbarResolved()',
1578
+ '[class.resizable]': 'layout.resize() !== null',
1579
+ }, providers: [DsTableLayout], template: "<div class=\"table-toolbar\">\n <div class=\"toolbar-slot\">\n <ng-content select=\"[toolbar]\"></ng-content>\n </div>\n\n <ng-container #toolbarAnchor />\n</div>\n\n<!-- Wraps the SCROLL CONTAINER, not the table inside it: the scrim is\n `position: absolute; inset: 0`, so from in there it is sized to one viewport of\n the table and scrolls away with the content. -->\n<ds-loading-overlay\n [loading]=\"isOverlayLoading()\"\n [blur]=\"true\"\n [insetTop]=\"'var(--ds-table-head-h, var(--_table-head-h, 40px))'\"\n [inertContent]=\"false\">\n <div\n #scrollWrap\n class=\"scroll-wrap\"\n [class.scroll-y]=\"maxHeight()\"\n [style.max-height]=\"maxHeight()\">\n <div\n class=\"visually-hidden\"\n role=\"status\"\n aria-live=\"polite\">\n {{ statusMessage() }}\n </div>\n\n <table\n [class]=\"tableClasses()\"\n [style.--_table-virtual-row-h]=\"virtualRowHeight()\"\n [attr.role]=\"rowInteractive() ? 'grid' : null\"\n [attr.aria-busy]=\"loading() !== false ? 'true' : null\">\n @if (caption()) {\n <caption class=\"visually-hidden\">\n {{\n caption()\n }}\n </caption>\n }\n\n <thead #tableHead>\n <tr>\n @if (selectable()) {\n <th\n scope=\"col\"\n class=\"select-col pin-select\">\n <input\n type=\"checkbox\"\n class=\"check\"\n [attr.aria-label]=\"selectAllLabel()\"\n [checked]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n (change)=\"onToggleAll($event)\" />\n </th>\n }\n\n @if (expandableRows()) {\n <th\n scope=\"col\"\n class=\"expand-col\"\n [class.pin-expand]=\"stickyFirstColumn()\">\n @if (expandAllVisible()) {\n <button\n type=\"button\"\n class=\"expand-btn\"\n [attr.aria-label]=\"expandAllLabel()\"\n (click)=\"onToggleExpandAll()\">\n <ds-icon\n class=\"expand-chev\"\n name=\"chevronRight\"\n [class.is-expanded]=\"allExpanded()\"\n [size]=\"16\" />\n </button>\n }\n </th>\n }\n\n @for (col of visibleColumns(); track col.key; let first = $first) {\n <th\n scope=\"col\"\n [class]=\"headerClasses(col)\"\n [class.numeric]=\"col.align === 'right'\"\n [class.pin-first]=\"first && stickyFirstColumn()\"\n [class.fit-content]=\"fitsContent(col)\"\n [style.width.px]=\"columnWidth(col)\"\n [style.min-width.px]=\"columnWidth(col)\"\n [style.max-width.px]=\"columnWidth(col)\"\n [attr.aria-sort]=\"ariaSort(col)\"\n [attr.data-col-key]=\"col.key\"\n (pointerenter)=\"onHeaderEnter($event, col)\">\n @if (sortableCol(col)) {\n <button\n type=\"button\"\n class=\"th-label\"\n (click)=\"onSort(col)\">\n @if (col.label) {\n {{ col.label }}\n } @else if (col.srLabel) {\n <span class=\"visually-hidden\">\n {{ col.srLabel }}\n </span>\n }\n\n <ds-icon\n class=\"sort-icon\"\n [name]=\"sortIcon(col)\"\n [size]=\"12\">\n </ds-icon>\n </button>\n } @else {\n <span class=\"th-label\">\n @if (col.label) {\n {{ col.label }}\n } @else if (col.srLabel) {\n <span class=\"visually-hidden\">\n {{ col.srLabel }}\n </span>\n }\n </span>\n }\n\n @if (hasColumnFilter(col)) {\n <button\n type=\"button\"\n class=\"col-filter-btn\"\n aria-haspopup=\"dialog\"\n [class.active]=\"isColumnFiltered(col)\"\n [attr.aria-label]=\"'Filter ' + col.label\"\n (click)=\"onColumnFilterClick(col, $event)\">\n <ds-icon\n name=\"filter\"\n [size]=\"12\" />\n </button>\n }\n\n @if (layout.resize(); as resize) {\n @let range = resize.range(col);\n\n <span\n class=\"col-resize\"\n role=\"separator\"\n tabindex=\"0\"\n aria-orientation=\"vertical\"\n [attr.aria-label]=\"'Resize ' + col.label\"\n [attr.aria-valuenow]=\"range?.now ?? null\"\n [attr.aria-valuemin]=\"range?.min ?? null\"\n [attr.aria-valuemax]=\"range?.max ?? null\"\n (focus)=\"resize.onFocus(col, $event)\"\n (blur)=\"resize.onBlur()\"\n (pointerdown)=\"resize.onStart(col, $event)\"\n (pointermove)=\"resize.onMove($event)\"\n (pointerup)=\"resize.onEnd()\"\n (pointercancel)=\"resize.onEnd()\"\n (keydown)=\"resize.onKey(col, $event)\">\n </span>\n }\n </th>\n }\n\n @if (hasUtilityColumn()) {\n <th\n scope=\"col\"\n class=\"actions-col\">\n <ng-container #headerUtilityAnchor />\n\n @if (!layout.wantsUtilityColumn()) {\n <span class=\"visually-hidden\">\n Actions\n </span>\n }\n </th>\n }\n </tr>\n </thead>\n\n <!-- Matches what the scrim covers, which is everything below the header:\n a row keeps its tabindex and its Enter handler otherwise, so a keyboard\n user could open a row whose data is mid-replacement while the pointer\n was stopped by the scrim. The header stays live on purpose \u2014 re-sorting\n is what puts the scrim up in the first place. -->\n <tbody [attr.inert]=\"isOverlayLoading() ? '' : null\">\n @if (isSkeletonLoading()) {\n @for (_ of skeletonArray(); track $index; let rowIndex = $index) {\n <ng-container\n [ngTemplateOutlet]=\"skeletonRow\"\n [ngTemplateOutletContext]=\"{ $implicit: rowIndex }\">\n </ng-container>\n }\n } @else if (showsEmptyRow()) {\n <tr>\n <td\n class=\"empty\"\n [attr.colspan]=\"expandedColspan()\">\n @if (emptyTemplate()) {\n <ng-container [ngTemplateOutlet]=\"emptyTemplate()!\">\n </ng-container>\n } @else {\n <ng-content select=\"[empty]\"></ng-content>\n }\n </td>\n </tr>\n } @else {\n @if (virtualWindow(); as window) {\n <tr\n class=\"spacer\"\n aria-hidden=\"true\"\n [style.height.px]=\"window.padTop\">\n </tr>\n }\n\n @for (slot of rowSlots(); track slot.index) {\n @if (slot.row; as row) {\n <tr\n [class.selected]=\"isSelected(row)\"\n [class.expanded]=\"isExpanded(row)\"\n [class.clickable]=\"rowInteractive()\"\n [class.stripe]=\"isStriped(slot.index)\"\n [class.active]=\"rowKey(row) === activeRowId()\"\n [attr.aria-current]=\"\n rowKey(row) === activeRowId() ? 'true' : null\n \"\n [attr.tabindex]=\"rowInteractive() ? 0 : null\"\n [attr.aria-label]=\"rowInteractive() ? rowAriaLabel(row) : null\"\n (mousedown)=\"onRowMousedown()\"\n (click)=\"onRowClick(row, $event)\"\n (keydown.enter)=\"onRowKey(row, $event)\"\n (keydown.space)=\"onRowKey(row, $event)\">\n @if (selectable()) {\n <td class=\"select-col pin-select\">\n <input\n type=\"checkbox\"\n class=\"check\"\n [attr.aria-label]=\"'Select ' + rowAriaLabel(row)\"\n [checked]=\"isSelected(row)\"\n (change)=\"onToggleRow(row, $event)\"\n (click)=\"$event.stopPropagation()\" />\n </td>\n }\n\n @if (expandableRows()) {\n <td\n class=\"expand-col\"\n [class.pin-expand]=\"stickyFirstColumn()\">\n <button\n type=\"button\"\n class=\"expand-btn\"\n [attr.aria-expanded]=\"isExpanded(row)\"\n [attr.aria-label]=\"\n isExpanded(row) ? 'Collapse row' : 'Expand row'\n \"\n (click)=\"onToggleExpand(row, $event)\">\n <ds-icon\n class=\"expand-chev\"\n name=\"chevronRight\"\n [class.is-expanded]=\"isExpanded(row)\"\n [size]=\"16\" />\n </button>\n </td>\n }\n\n @for (\n col of visibleColumns();\n track col.key;\n let first = $first\n ) {\n <td\n [class.numeric]=\"col.align === 'right'\"\n [class.pin-first]=\"first && stickyFirstColumn()\"\n [class.editable-cell]=\"col.editable\"\n [class.interactive-cell]=\"col.interactive\"\n [class.fit-content]=\"fitsContent(col)\"\n (dblclick)=\"startEdit(row, col, $event)\">\n @if (isEditing(row, col)) {\n <input\n #editInput\n type=\"text\"\n class=\"cell-edit\"\n [value]=\"editDraft()\"\n (input)=\"onEditInput($event)\"\n (click)=\"$event.stopPropagation()\"\n (keydown.enter)=\"commitEdit(row, col)\"\n (keydown.escape)=\"cancelEdit()\"\n (blur)=\"commitEdit(row, col)\" />\n } @else if (cellTemplate(col); as tpl) {\n @if (col.truncate) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- same pointer-only enhancement as the plain truncate branch below; the value stays in the DOM for AT -->\n <span\n class=\"cell-clip\"\n [style.max-width.px]=\"clipWidth(col)\"\n [attr.title]=\"cellValue(row, col)\"\n (click)=\"onCellClipClick(row, col, $event)\">\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: row,\n row: row,\n }\">\n </ng-container>\n </span>\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: row,\n row: row,\n }\">\n </ng-container>\n }\n } @else if (col.truncate) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- pointer-only enhancement: the clip is visual (CSS ellipsis), keyboard/AT users already get the full DOM text + title; a tab stop per cell would wreck keyboard traversal -->\n <span\n class=\"cell-clip\"\n [style.max-width.px]=\"clipWidth(col)\"\n [attr.title]=\"cellValue(row, col)\"\n (click)=\"onCellClipClick(row, col, $event)\">\n @if (cellLink(row, col); as target) {\n <a\n class=\"cell-link\"\n [routerLink]=\"target\"\n (click)=\"$event.stopPropagation()\">\n {{ cellValue(row, col) }}\n </a>\n } @else {\n {{ cellValue(row, col) }}\n }\n </span>\n } @else if (cellLink(row, col); as target) {\n <a\n class=\"cell-link\"\n [routerLink]=\"target\"\n (click)=\"$event.stopPropagation()\">\n {{ cellValue(row, col) }}\n </a>\n } @else {\n {{ cellValue(row, col) }}\n }\n </td>\n }\n\n @if (hasUtilityColumn()) {\n <td class=\"actions-col\">\n @if (hasRowActions() && hasActionsFor(row)) {\n <button\n type=\"button\"\n class=\"row-actions-btn\"\n aria-haspopup=\"menu\"\n [attr.aria-expanded]=\"isMenuOpenFor(row)\"\n [attr.aria-label]=\"'Actions for ' + rowAriaLabel(row)\"\n (click)=\"onRowMenuClick(row, $event)\"\n (keydown.enter)=\"$event.stopPropagation()\"\n (keydown.space)=\"$event.stopPropagation()\">\n <ds-icon\n name=\"moreV\"\n [size]=\"16\" />\n </button>\n }\n </td>\n }\n </tr>\n\n @if (\n expandableRows() &&\n isExpanded(row) &&\n rowExpandTemplate() &&\n !virtualizing()\n ) {\n <tr class=\"expand-panel-row\">\n <td\n class=\"expand-panel-cell\"\n [attr.colspan]=\"expandedColspan()\">\n <ng-container\n [ngTemplateOutlet]=\"rowExpandTemplate()!\"\n [ngTemplateOutletContext]=\"{ $implicit: row, row: row }\">\n </ng-container>\n </td>\n </tr>\n }\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"skeletonRow\"\n [ngTemplateOutletContext]=\"{ $implicit: slot.index }\">\n </ng-container>\n }\n }\n\n @if (virtualWindow(); as window) {\n <tr\n class=\"spacer\"\n aria-hidden=\"true\"\n [style.height.px]=\"window.padBottom\">\n </tr>\n }\n }\n </tbody>\n </table>\n </div>\n</ds-loading-overlay>\n\n@if (stickyScrollbarResolved()) {\n <div\n #hscrollProxy\n class=\"hscroll-proxy\"\n aria-hidden=\"true\"\n [class.hscroll-hidden]=\"!hscrollNeeded()\">\n <div\n class=\"hscroll-spacer\"\n [style.width.px]=\"hscrollContentWidth()\">\n </div>\n </div>\n}\n\n@if (pageSize(); as size) {\n <div class=\"pagination-footer\">\n <ds-pagination\n [total]=\"total() ?? filteredData().length\"\n [pageSize]=\"size\"\n [pageSizeOptions]=\"pageSizeOptions()\"\n [showPageSize]=\"showPageSize()\"\n [showLabel]=\"showLabel()\"\n [(currentPage)]=\"page\"\n (pageSizeChange)=\"pageSize.set($event)\" />\n </div>\n}\n\n@if (hasTruncate()) {\n <ds-popover #cellTextPopover>\n <div class=\"cell-text-pop\">\n {{ cellPopoverText() }}\n </div>\n </ds-popover>\n}\n\n@if (filterColumn()) {\n <ds-popover\n #columnFilterPopover\n align=\"start\"\n panelRole=\"dialog\"\n panelLabel=\"Filter values\">\n @if (headerFilterFor(filterColumn()!); as projected) {\n <div class=\"col-filter col-filter-custom\">\n <ng-container\n [ngTemplateOutlet]=\"projected.template\"\n [ngTemplateOutletContext]=\"headerFilterContext(filterColumn()!)\" />\n </div>\n } @else {\n <div class=\"col-filter\">\n <input\n type=\"text\"\n class=\"col-filter-search\"\n placeholder=\"Search\u2026\"\n [value]=\"filterSearch()\"\n (input)=\"onFilterSearch($event)\"\n (click)=\"$event.stopPropagation()\" />\n\n <div class=\"col-filter-list\">\n @for (value of filterValues(); track value) {\n <label class=\"col-filter-option\">\n <input\n type=\"checkbox\"\n class=\"check\"\n [checked]=\"isFilterValueChecked(value)\"\n (change)=\"toggleFilterValue(value)\" />\n {{ value || '(empty)' }}\n </label>\n } @empty {\n <div class=\"col-filter-empty\">\n No matches\n </div>\n }\n </div>\n\n <div class=\"col-filter-footer\">\n <span class=\"col-filter-count\">\n {{ filterSelectedCount() }} selected\n </span>\n\n <button\n type=\"button\"\n class=\"col-reset\"\n (click)=\"clearColumnFilter()\">\n Clear\n </button>\n </div>\n </div>\n }\n </ds-popover>\n}\n\n<ng-container #overlaysAnchor />\n\n<ng-template\n #columnWidthControls\n let-col>\n @if (layout.resize(); as resize) {\n <span class=\"col-width\">\n <button\n type=\"button\"\n class=\"col-width-btn\"\n [attr.aria-label]=\"'Narrow ' + col.label\"\n (click)=\"resize.step(col, -16)\">\n <ds-icon\n name=\"minus\"\n [size]=\"14\" />\n </button>\n\n <button\n type=\"button\"\n class=\"col-width-btn\"\n [attr.aria-label]=\"'Widen ' + col.label\"\n (click)=\"resize.step(col, 16)\">\n <ds-icon\n name=\"plus\"\n [size]=\"14\" />\n </button>\n\n <button\n type=\"button\"\n class=\"col-width-btn col-width-auto\"\n [attr.aria-label]=\"'Fit ' + col.label + ' to its content'\"\n (click)=\"resize.step(col, 'auto')\">\n Fit\n </button>\n </span>\n }\n</ng-template>\n\n@if (hasRowActions()) {\n <ds-popover\n #rowMenuPopover\n align=\"end\">\n <ds-menu>\n @for (action of visibleRowActions(); track action.id) {\n <ds-menu-item\n [icon]=\"action.icon ?? null\"\n [error]=\"action.error ?? false\"\n [disabled]=\"isActionDisabled(action)\"\n [description]=\"actionReason(action)\"\n (pressed)=\"onRowAction(action)\">\n {{ action.label }}\n </ds-menu-item>\n }\n </ds-menu>\n </ds-popover>\n}\n\n@if (selectable() && anySelected()) {\n <div class=\"bulk-bar\">\n <span class=\"count\">\n {{ selectedIds().size }} selected\n </span>\n\n <span class=\"sep\"></span>\n\n <ng-content select=\"[bulk-actions]\"></ng-content>\n </div>\n}\n\n<!-- One skeleton row, shared by loading=\"skeleton\" and the gaps a lazy\n window has not filled yet. `$implicit` is the row's index: skeletonWidth\n varies the bar lengths from it, so a block of them does not read as a grid. -->\n<ng-template\n #skeletonRow\n let-rowIndex>\n <tr>\n @if (selectable()) {\n <td class=\"select-col pin-select\">\n <ds-skeleton\n width=\"14px\"\n height=\"14px\"\n [inline]=\"true\" />\n </td>\n }\n\n @if (expandableRows()) {\n <td\n class=\"expand-col\"\n [class.pin-expand]=\"stickyFirstColumn()\">\n </td>\n }\n\n @for (col of visibleColumns(); track col.key; let first = $first) {\n <td\n [class.numeric]=\"col.align === 'right'\"\n [class.pin-first]=\"first && stickyFirstColumn()\">\n <ds-skeleton\n height=\"14px\"\n [width]=\"skeletonWidth(col, rowIndex)\"\n [inline]=\"true\" />\n </td>\n }\n\n @if (hasUtilityColumn()) {\n <td class=\"actions-col\"></td>\n }\n </tr>\n</ng-template>\n", styles: ["@charset \"UTF-8\";:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_checkbox-bg: var(--ds-checkbox-bg-color, var(--surface-default));--_checkbox-border: var(--ds-checkbox-border-color, var(--border-strong));--_checkbox-hover-border: var(--ds-checkbox-hover-border-color, var(--accent));--_checkbox-selected-bg: var(--ds-checkbox-selected-bg-color, var(--accent));--_checkbox-selected-border: var(--ds-checkbox-selected-border-color, var(--accent));--_checkbox-radius: var(--ds-checkbox-radius, var(--ds-radius-inner));--_checkbox-glyph: var(--check-size);display:block;position:relative}.check{appearance:none;width:var(--_checkbox-glyph, var(--check-size));height:var(--_checkbox-glyph, var(--check-size));border:var(--check-bw) solid var(--_checkbox-border, var(--ds-checkbox-border-color, var(--border-strong)));background:var(--_checkbox-bg, var(--ds-checkbox-bg-color, var(--surface-default)));cursor:pointer;display:inline-grid;place-items:center;flex-shrink:0;margin:0;border-radius:var(--_checkbox-radius, var(--ds-checkbox-radius, var(--ds-radius-inner)));transition:background-color var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard)}.check:hover:not(:disabled){border-color:var(--_checkbox-hover-border, var(--ds-checkbox-hover-border-color, var(--accent)))}.check:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.check:disabled{background:var(--surface-disabled);border-color:var(--border-disabled);cursor:not-allowed}.check{color:var(--icon-on-primary)}.check:after{content:\"\";--_check-mark-enter-duration: var(--ds-check-mark-enter-duration, var(--ds-motion-check-enter-duration));--_check-mark-enter-easing: var(--ds-check-mark-enter-easing, var(--ds-motion-check-enter-easing));--_check-mark-exit-duration: var(--ds-check-mark-exit-duration, var(--ds-motion-check-exit-duration));--_check-mark-exit-easing: var(--ds-check-mark-exit-easing, var(--ds-motion-check-exit-easing));width:var(--check-tick-size);height:var(--check-tick-size);transform:scale(.6);opacity:0;transform-origin:center;transition:transform var(--_check-mark-exit-duration) var(--_check-mark-exit-easing),opacity var(--_check-mark-exit-duration) var(--_check-mark-exit-easing);background-color:currentcolor}@media(forced-colors:active){.check:after{background-color:CanvasText}}.check:after{-webkit-mask:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'><path d='M2 6.5l2.5 2.5L10 3.5' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>\") center/contain no-repeat;mask:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'><path d='M2 6.5l2.5 2.5L10 3.5' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>\") center/contain no-repeat}.check:checked{background:var(--_checkbox-selected-bg, var(--ds-checkbox-selected-bg-color, var(--accent)));border-color:var(--_checkbox-selected-border, var(--ds-checkbox-selected-border-color, var(--accent)))}.check:checked:after{transform:scale(1);opacity:1;transition:transform var(--_check-mark-enter-duration) var(--_check-mark-enter-easing),opacity var(--_check-mark-enter-duration) var(--_check-mark-enter-easing)}.check:indeterminate{background:var(--_checkbox-selected-bg, var(--ds-checkbox-selected-bg-color, var(--accent)));border-color:var(--_checkbox-selected-border, var(--ds-checkbox-selected-border-color, var(--accent)))}.check:indeterminate:after{transform:scale(1);opacity:1;transition:transform var(--_check-mark-enter-duration) var(--_check-mark-enter-easing),opacity var(--_check-mark-enter-duration) var(--_check-mark-enter-easing);width:var(--check-indet-w);height:var(--check-indet-h);border-radius:var(--ds-radius-inner);-webkit-mask:none;mask:none}.check:focus-visible{outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host(.bordered) .scroll-wrap{border:var(--border-width-default) solid var(--_table-border);border-radius:var(--_table-radius)}.scroll-wrap{--_table-border: var(--ds-table-border, var(--border-default));--_table-radius: var(--ds-table-radius, var(--ds-radius-control));--_table-bg-color: var(--ds-table-bg-color, var(--surface-default));width:100%;overflow:auto hidden;--focus-ring-offset: calc(-1 * var(--focus-ring-width));-webkit-overflow-scrolling:touch;background:var(--surface-default);box-sizing:border-box}.scroll-wrap.scroll-y{overflow-y:auto}:host(.sticky-scrollbar) .scroll-wrap{scrollbar-width:none}:host(.sticky-scrollbar) .scroll-wrap::-webkit-scrollbar{display:none}:host(.resizable) thead th{position:relative;overflow:hidden}@media(hover:none)and (pointer:coarse){.col-resize{display:none}}.col-resize{position:absolute;inset-block:0;right:0;width:var(--space-2);cursor:col-resize;touch-action:none;-webkit-user-select:none;user-select:none}.col-resize:after{content:\"\";position:absolute;inset-block:var(--space-2);right:0;width:var(--border-width-default);background-color:transparent;transition:background-color var(--duration-fast) var(--ease-standard)}.col-resize:hover:after,.col-resize:active:after,.col-resize:focus-visible:after{background-color:var(--_table-sort-active-icon-color)}@media not (forced-colors:active){.col-resize:focus-visible{outline:none}}.col-resize:focus-visible:after{width:var(--border-width-strong)}.hscroll-proxy{position:sticky;bottom:var(--ds-table-hscroll-bottom, 0);overflow:auto hidden}.hscroll-spacer{height:1px}.hscroll-hidden{display:none}.table{--_table-min-width: var(--ds-table-min-width, 0);--_table-bg-color: var(--ds-table-bg-color, var(--surface-default));--_table-row-hover-bg-color: var(--ds-table-row-hover-bg-color, var(--surface-secondary));--_table-row-selected-bg-color: var(--ds-table-row-selected-bg-color, var(--accent-subtitle));--_table-row-pressed-bg-color: var(--ds-table-row-pressed-bg-color, var(--surface-muted));--_table-row-active-bg-color: var(--ds-table-row-active-bg-color, var(--accent-subtitle));--_table-row-stripe-bg-color: var(--ds-table-row-stripe-bg-color, var(--surface-secondary));--_table-cell-link-color: var(--ds-table-cell-link-color, var(--accent));--_table-cell-link-decoration: var(--ds-table-cell-link-decoration, underline);--_table-head-text-color: var(--ds-table-head-text-color, var(--text-secondary));--_table-head-bg-color: var(--ds-table-head-bg-color, var(--surface-secondary));--_table-head-fs: var(--ds-table-head-fs, var(--font-size-xs));--_table-divider: var(--ds-table-divider, var(--border-divider));--_table-sort-active-icon-color: var(--ds-table-sort-active-icon-color, var(--accent));--_table-icon-btn-color: var(--ds-table-icon-btn-color, var(--icon-default));--_table-icon-btn-color-hover: var(--ds-table-icon-btn-color-hover, var(--icon-strong));--_table-icon-btn-focus-color: var(--ds-table-icon-btn-focus-color, var(--accent));--_table-cell-pad-x: var(--ds-table-cell-pad-x, var(--table-cell-pad-x));--_table-cell-pad-y: var(--ds-table-cell-pad-y, var(--table-cell-pad-y));--_table-cell-pad-top: var(--ds-table-cell-pad-top, var(--_table-cell-pad-y));--_table-cell-pad-right: var(--ds-table-cell-pad-right, var(--_table-cell-pad-x));--_table-cell-pad-bottom: var(--ds-table-cell-pad-bottom, var(--_table-cell-pad-y));--_table-cell-pad-left: var(--ds-table-cell-pad-left, var(--_table-cell-pad-x));--_table-head-pad-top: var(--ds-table-head-pad-top, var(--table-head-pad-y));--_table-head-pad-bottom: var(--ds-table-head-pad-bottom, var(--table-head-pad-y));--_table-head-border-color: var(--ds-table-head-border-color, var(--_table-divider));--_table-head-weight: var(--ds-table-head-weight, var(--font-weight-bold));--_table-head-tracking: var(--ds-table-head-tracking, var(--letter-spacing-wider));width:100%;border-collapse:collapse;font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary);background-color:var(--_table-bg-color)}.table th.fit-content,.table td.fit-content{width:1%;white-space:nowrap}.table thead th{text-align:left;padding:var(--_table-head-pad-top) var(--_table-cell-pad-right) var(--_table-head-pad-bottom) var(--_table-cell-pad-left);font:var(--_table-head-weight) var(--_table-head-fs)/var(--line-height-base) var(--font-sans);letter-spacing:var(--_table-head-tracking);text-transform:uppercase;color:var(--_table-head-text-color);background-color:var(--_table-head-bg-color);border-bottom:var(--border-width-default) solid var(--_table-head-border-color);white-space:nowrap}.table thead th .th-label{display:inline-flex;align-items:center;vertical-align:middle;appearance:none;background:none;border:0;margin:0;padding:0;font:inherit;letter-spacing:inherit;text-transform:inherit;color:inherit;text-align:left}.table thead th button.th-label{cursor:pointer;-webkit-user-select:none;user-select:none;transition:color var(--duration-fast) var(--ease-standard)}.table thead th button.th-label:hover{color:var(--text-secondary)}.table thead th button.th-label:focus-visible{outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--radius-sm)}.table thead th .sort-icon{display:inline-block;width:var(--sort-ic-size);height:var(--sort-ic-size);margin-left:var(--sort-ic-gap);vertical-align:middle;transform:translateY(-1px);color:var(--icon-default);opacity:var(--sort-ic-opacity-idle);transition:opacity var(--duration-fast) var(--ease-standard),color var(--duration-fast) var(--ease-standard)}.table thead th .sort-icon .icon{width:var(--sort-ic-size);height:var(--sort-ic-size);display:block}.table thead th.sorted-asc .sort-icon,.table thead th.sorted-desc .sort-icon{opacity:1;color:var(--_table-sort-active-icon-color)}.table thead th.numeric{text-align:right}.table thead th.select-col,.table thead th.expand-col,.table thead th.actions-col{width:var(--space-10)}.table.sticky-header thead th{position:sticky;top:0}.table.sticky-header thead th:not(.pin-select,.pin-first,.pin-expand){z-index:var(--table-sticky-header-z)}.table tbody td{padding:var(--_table-cell-pad-top) var(--_table-cell-pad-right) var(--_table-cell-pad-bottom) var(--_table-cell-pad-left);line-height:var(--line-height-flat);transition:background-color var(--duration-fast) var(--ease-standard);box-shadow:inset 0 calc(-1 * var(--border-width-default)) 0 var(--_table-divider);vertical-align:middle}.table tbody td.numeric{text-align:right}.table tbody td.empty{text-align:center;color:var(--text-tertiary);padding:var(--space-4)}.table tbody tr:last-child td{box-shadow:none}.table tbody tr.clickable:not(.active):hover td{background-color:var(--_table-row-hover-bg-color)}.table tbody tr.clickable:hover td.interactive-cell,.table tbody tr td .cell-link{color:var(--_table-cell-link-color);text-decoration:var(--_table-cell-link-decoration)}.table tbody tr.selected td{background-color:var(--_table-row-selected-bg-color)}.table tbody tr.active td{background-color:var(--_table-row-active-bg-color)}.table tbody tr.clickable:active td{background-color:var(--_table-row-pressed-bg-color)}.table tbody tr.clickable{cursor:pointer}.table tbody tr.clickable:focus-visible{outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:calc(-1 * var(--focus-ring-width));animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}.table tbody .expand-col,.table tbody .actions-col{width:var(--space-10)}.table tbody .expand-panel-cell{padding:var(--_table-cell-pad-top) var(--_table-cell-pad-right) var(--_table-cell-pad-bottom) var(--_table-cell-pad-left)}.table tbody .cell-clip{display:block;overflow:clip;overflow-clip-margin:var(--space-1);text-overflow:ellipsis;white-space:nowrap}.table .expand-chev{display:block;transition:transform var(--duration-base) var(--ease-standard)}@media(prefers-reduced-motion:reduce){.table .expand-chev{transition:none}}.table .expand-chev.is-expanded{transform:rotate(90deg)}.table .expand-btn,.table .row-actions-btn,.table .col-picker-btn{display:flex;align-items:center;justify-content:center;width:var(--space-6);height:var(--space-6);padding:0;border:0;background:none;cursor:pointer;color:var(--_table-icon-btn-color);border-radius:var(--ds-radius-inner);transition:color var(--duration-fast) var(--ease-standard)}.table .expand-btn:hover,.table .row-actions-btn:hover,.table .col-picker-btn:hover{color:var(--_table-icon-btn-color-hover)}.table .expand-btn:focus-visible,.table .row-actions-btn:focus-visible,.table .col-picker-btn:focus-visible{--focus-ring-color: var(--_table-icon-btn-focus-color);outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}.table.compact{--table-cell-pad-x: var(--space-3);--table-cell-pad-y: var(--space-2);--table-head-pad-y: var(--space-2)}.table{min-width:var(--_table-min-width)}.table.zebra:not(.virtual) tbody tr:nth-child(odd) td{background-color:var(--_table-row-stripe-bg-color)}.table.zebra.virtual tbody tr.stripe td{background-color:var(--_table-row-stripe-bg-color)}.table.virtual{table-layout:fixed}.table.virtual tbody tr:not(.spacer){height:var(--_table-virtual-row-h)}.table.virtual tbody td{overflow:clip;overflow-clip-margin:var(--space-1);text-overflow:ellipsis;white-space:nowrap}.table tbody tr.spacer{padding:0;border:0;background:none}.table tbody tr.spacer:hover td{background-color:transparent}.col-picker{display:grid;gap:var(--space-2);min-width:160px}.col-picker-row{display:flex;align-items:center;gap:var(--space-2)}.col-picker-row.cdk-drag-preview{background-color:var(--surface-default);border-radius:var(--ds-radius-inner);box-shadow:var(--shadow-popover);padding:var(--space-1) var(--space-2)}.col-picker-row.cdk-drag-placeholder{opacity:.4}.col-picker.cdk-drop-list-dragging .col-picker-row:not(.cdk-drag-placeholder){transition:transform var(--duration-fast) var(--ease-standard)}.col-drag{display:inline-flex;color:var(--icon-default);cursor:grab}.col-drag:active{cursor:grabbing}.col-picker-option{display:flex;align-items:center;gap:var(--space-2);flex:1;font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary);cursor:pointer}.col-picker-option:has(input:disabled){color:var(--text-tertiary);cursor:default}.col-width{display:inline-flex;gap:var(--space-1);align-items:center;margin-left:auto}.col-width-auto{width:auto;padding-inline:var(--space-2);font:var(--font-weight-medium) var(--font-size-xs)/var(--line-height-base) var(--font-sans)}.col-move{display:inline-flex;gap:var(--space-1)}.col-width-btn,.col-move-btn{display:inline-flex;padding:0;border:0;background:none;color:var(--icon-default);cursor:pointer}.col-width-btn:hover:not(:disabled),.col-move-btn:hover:not(:disabled){color:var(--icon-strong)}.col-width-btn:disabled,.col-move-btn:disabled{color:var(--text-disabled);cursor:default}.col-reset{margin-top:var(--space-1);padding:0;border:0;background:none;color:var(--accent);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);cursor:pointer;text-align:left}.col-reset:hover{text-decoration:underline}.col-filter-btn{display:inline-flex;margin-left:var(--space-1);padding:0;border:0;background:none;color:var(--icon-default);opacity:.5;cursor:pointer;vertical-align:middle;transition:color var(--duration-fast) var(--ease-standard),opacity var(--duration-fast) var(--ease-standard)}.col-filter-btn:hover{opacity:1;color:var(--icon-strong)}.col-filter-btn.active{opacity:1;color:var(--_table-sort-active-icon-color)}.col-filter{display:grid;gap:var(--space-2);min-width:180px}.col-filter-search{width:100%;box-sizing:border-box;padding:var(--space-1) var(--space-2);border:var(--border-width-default) solid var(--border-default);border-radius:var(--ds-radius-inner);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary);background-color:var(--surface-default)}.col-filter-search:focus-visible{border-color:var(--accent);outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}.col-filter-list{display:grid;gap:var(--space-1);max-height:240px;overflow-y:auto}.col-filter-option{display:flex;align-items:center;gap:var(--space-2);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary);cursor:pointer}.col-filter-empty{color:var(--text-tertiary);font-size:var(--font-size-s);padding:var(--space-1) 0}.col-filter-footer{display:flex;align-items:center;justify-content:space-between;padding-top:var(--space-1);border-top:var(--border-width-default) solid var(--border-divider)}.col-filter-count{color:var(--text-tertiary);font-size:var(--font-size-xs)}.col-filter-footer .col-reset{margin-top:0}.editable-cell{cursor:text}.cell-edit{width:100%;box-sizing:border-box;margin:calc(-1 * var(--space-1)) 0;padding:var(--space-1) var(--space-2);border:var(--border-width-default) solid var(--accent);border-radius:var(--ds-radius-inner);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary);background-color:var(--surface-default)}.cell-edit:focus-visible{outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}.cell-text-pop{max-width:360px;overflow-wrap:anywhere;font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary)}:host(.pinned){--_table-select-w: var(--ds-table-select-col-w, var(--space-10))}:host(.pinned) .table{border-collapse:separate;border-spacing:0}:host(.pinned) .table tbody td{box-shadow:none;border-bottom:var(--border-width-default) solid var(--_table-divider)}:host(.pinned) .table tbody tr:last-child td{border-bottom:0}:host(.pinned) .pin-select,:host(.pinned) .pin-first{position:sticky;left:0;z-index:var(--table-sticky-col-z);background-color:var(--_table-bg-color)}:host(.pinned) thead .pin-select,:host(.pinned) thead .pin-first{z-index:var(--table-sticky-corner-z);background-color:var(--_table-head-bg-color)}:host(.pinned) tbody tr.clickable:not(.active):hover .pin-first,:host(.pinned) tbody tr.clickable:not(.active):hover .pin-select{background-color:var(--_table-row-hover-bg-color)}:host(.pinned) tbody tr.selected .pin-first,:host(.pinned) tbody tr.selected .pin-select{background-color:var(--_table-row-selected-bg-color)}:host(.pinned) tbody tr.active .pin-first,:host(.pinned) tbody tr.active .pin-select{background-color:var(--_table-row-active-bg-color)}:host(.pinned) tbody tr.clickable:active .pin-first,:host(.pinned) tbody tr.clickable:active .pin-select{background-color:var(--_table-row-pressed-bg-color)}:host(.pinned.selectable) .pin-first{left:var(--_table-select-w)}:host(.pinned.expandable){--_table-expand-w: var(--ds-table-expand-col-w, var(--space-10))}:host(.pinned.expandable) .pin-expand{position:sticky;left:0;z-index:var(--table-sticky-col-z);background-color:var(--_table-bg-color)}:host(.pinned.expandable) thead .pin-expand{z-index:var(--table-sticky-corner-z);background-color:var(--_table-head-bg-color)}:host(.pinned.expandable) tbody tr.clickable:not(.active):hover .pin-expand{background-color:var(--_table-row-hover-bg-color)}:host(.pinned.expandable) tbody tr.selected .pin-expand{background-color:var(--_table-row-selected-bg-color)}:host(.pinned.expandable) tbody tr.active .pin-expand{background-color:var(--_table-row-active-bg-color)}:host(.pinned.expandable) tbody tr.clickable:active .pin-expand{background-color:var(--_table-row-pressed-bg-color)}:host(.pinned.expandable) .pin-first{left:var(--_table-expand-w)}:host(.pinned.selectable.expandable) .pin-expand{left:var(--_table-select-w)}:host(.pinned.selectable.expandable) .pin-first{left:calc(var(--_table-select-w) + var(--_table-expand-w))}.pagination-footer{padding:var(--space-3) var(--ds-table-cell-pad-x, var(--table-cell-pad-x)) var(--space-3);border-top:var(--border-width-default) solid var(--ds-table-divider, var(--border-divider))}.bulk-bar{position:sticky;bottom:var(--bulk-bar-offset);display:flex;align-items:center;gap:var(--space-3);padding:var(--space-3) var(--space-4);background:var(--surface-inverted);color:var(--text-inverted);border-radius:var(--radius-lg);box-shadow:var(--shadow-toast);margin:var(--space-4) auto 0;width:fit-content}.bulk-bar .count{font:var(--font-weight-bold) var(--font-size-s)/var(--line-height-flat) var(--font-sans)}.bulk-bar .sep{width:var(--border-width-default);height:var(--space-4);background:var(--border-inverted)}.bulk-bar{--ds-button-label-color: var(--text-inverted);--ds-button-bg-color: transparent;--ds-button-bg-color-hover: var(--surface-inverted-hover);--ds-button-bg-color-active: var(--surface-inverted-hover)}.table-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-2);margin-bottom:var(--space-2)}.table-toolbar:not(:has(.toolbar-slot>*,>ds-button)){display:none}.toolbar-slot{display:flex;flex:1 1 auto;flex-wrap:wrap;align-items:center;gap:var(--space-2);min-width:0}.toolbar-slot ::ng-deep>:only-child{flex:1 1 auto;min-width:0}\n"] }]
1580
+ }], ctorParameters: () => [], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], rowId: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowId", required: false }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: true }] }], selectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectable", required: false }] }], bordered: [{ type: i0.Input, args: [{ isSignal: true, alias: "bordered", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], stickyHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "stickyHeader", required: false }] }], maxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxHeight", required: false }] }], density: [{ type: i0.Input, args: [{ isSignal: true, alias: "density", required: false }] }], zebra: [{ type: i0.Input, args: [{ isSignal: true, alias: "zebra", required: false }] }], animateHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "animateHeight", required: false }] }], selectedIds: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedIds", required: false }] }, { type: i0.Output, args: ["selectedIdsChange"] }], sortKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortKey", required: false }] }], sortKeyChange: [{ type: i0.Output, args: ["sortKeyChange"] }], sortDir: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortDir", required: false }] }], sortDirChange: [{ type: i0.Output, args: ["sortDirChange"] }], sortingOrder: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortingOrder", required: false }] }], sortAnnouncement: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortAnnouncement", required: false }] }], rangeAnnouncement: [{ type: i0.Input, args: [{ isSignal: true, alias: "rangeAnnouncement", required: false }] }], skeletonRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "skeletonRows", required: false }] }], caption: [{ type: i0.Input, args: [{ isSignal: true, alias: "caption", required: false }] }], rowInteractive: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowInteractive", required: false }] }], activeRowId: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeRowId", required: false }] }], filterQuery: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterQuery", required: false }] }], columnFilters: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnFilters", required: false }] }, { type: i0.Output, args: ["columnFiltersChange"] }], persistLayout: [{ type: i0.Input, args: [{ isSignal: true, alias: "persistLayout", required: false }] }], storageKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "storageKey", required: false }] }], stickyScrollbar: [{ type: i0.Input, args: [{ isSignal: true, alias: "stickyScrollbar", required: false }] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }, { type: i0.Output, args: ["pageSizeChange"] }], page: [{ type: i0.Input, args: [{ isSignal: true, alias: "page", required: false }] }, { type: i0.Output, args: ["pageChange"] }], pageSizeOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSizeOptions", required: false }] }], showPageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPageSize", required: false }] }], showLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLabel", required: false }] }], total: [{ type: i0.Input, args: [{ isSignal: true, alias: "total", required: false }] }], scrollToTopOnPageChange: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollToTopOnPageChange", required: false }] }], sortMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortMode", required: false }] }], filterMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterMode", required: false }] }], columnFilterOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnFilterOptions", required: false }] }], stickyFirstColumn: [{ type: i0.Input, args: [{ isSignal: true, alias: "stickyFirstColumn", required: false }] }], virtualScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScroll", required: false }] }], virtualRowSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualRowSize", required: false }] }], lazy: [{ type: i0.Input, args: [{ isSignal: true, alias: "lazy", required: false }] }], lazyLoad: [{ type: i0.Output, args: ["lazyLoad"] }], rowClicked: [{ type: i0.Output, args: ["rowClicked"] }], sortChange: [{ type: i0.Output, args: ["sortChange"] }], rowActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowActions", required: false }] }], rowActionSelected: [{ type: i0.Output, args: ["rowActionSelected"] }], cellEdited: [{ type: i0.Output, args: ["cellEdited"] }], cellTemplateMap: [{ type: i0.Input, args: [{ isSignal: true, alias: "cellTemplateMap", required: false }] }], emptyTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyTemplate", required: false }] }], expandableRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandableRows", required: false }] }], expandedIds: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandedIds", required: false }] }, { type: i0.Output, args: ["expandedIdsChange"] }], expandMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandMode", required: false }] }], expandAllToggle: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandAllToggle", required: false }] }], rowExpanded: [{ type: i0.Output, args: ["rowExpanded"] }], rowCollapsed: [{ type: i0.Output, args: ["rowCollapsed"] }], rowExpandTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowExpandTemplate", required: false }] }], cellTemplateDirectives: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => CellTemplateDirective), { isSignal: true }] }], toolbarAnchor: [{ type: i0.ViewChild, args: ['toolbarAnchor', { ...{
1581
+ read: ViewContainerRef,
1582
+ }, isSignal: true }] }], headerUtilityAnchor: [{ type: i0.ViewChild, args: ['headerUtilityAnchor', { ...{
1583
+ read: ViewContainerRef,
1584
+ }, isSignal: true }] }], overlaysAnchor: [{ type: i0.ViewChild, args: ['overlaysAnchor', { ...{
1585
+ read: ViewContainerRef,
1586
+ }, isSignal: true }] }], columnWidthControls: [{ type: i0.ViewChild, args: ['columnWidthControls', { isSignal: true }] }], columnFilterPopover: [{ type: i0.ViewChild, args: ['columnFilterPopover', { isSignal: true }] }], headerFilters: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => HeaderFilterDirective), { isSignal: true }] }], editInput: [{ type: i0.ViewChild, args: ['editInput', { isSignal: true }] }], rowMenuPopover: [{ type: i0.ViewChild, args: ['rowMenuPopover', { isSignal: true }] }], columnPickerPopover: [{ type: i0.ViewChild, args: ['columnPickerPopover', { isSignal: true }] }], cellTextPopover: [{ type: i0.ViewChild, args: ['cellTextPopover', { isSignal: true }] }], scrollWrap: [{ type: i0.ViewChild, args: ['scrollWrap', { isSignal: true }] }], hscrollProxy: [{ type: i0.ViewChild, args: ['hscrollProxy', { isSignal: true }] }], tableHead: [{ type: i0.ViewChild, args: ['tableHead', { isSignal: true }] }] } });
1587
+
1588
+ /**
1589
+ * Generated bundle index. Do not edit.
1590
+ */
1591
+
1592
+ export { CellTemplateDirective, DsTableLayout, HeaderFilterDirective, TableComponent };
1593
+ //# sourceMappingURL=ids-group-ltd-ids-design-system-components-table.mjs.map