ngwr 16.2.0 → 16.3.0

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 (398) hide show
  1. package/badge/styles/_tag.scss +73 -1
  2. package/calendar/styles/_index.scss +22 -0
  3. package/cascader/styles/_rules.scss +7 -0
  4. package/color-picker/styles/_index.scss +21 -0
  5. package/date-picker/styles/_index.scss +19 -0
  6. package/dropdown/styles/_index.scss +13 -19
  7. package/fesm2022/ngwr-affix.mjs +3 -3
  8. package/fesm2022/ngwr-alert-testing.mjs +70 -0
  9. package/fesm2022/ngwr-alert-testing.mjs.map +1 -0
  10. package/fesm2022/ngwr-alert.mjs +3 -3
  11. package/fesm2022/ngwr-anchor.mjs +17 -6
  12. package/fesm2022/ngwr-anchor.mjs.map +1 -1
  13. package/fesm2022/ngwr-animations-aurora.mjs +3 -3
  14. package/fesm2022/ngwr-animations-blur-reveal.mjs +3 -3
  15. package/fesm2022/ngwr-animations-click-sparks.mjs +3 -3
  16. package/fesm2022/ngwr-animations-confetti.mjs +3 -3
  17. package/fesm2022/ngwr-animations-decode.mjs +3 -3
  18. package/fesm2022/ngwr-animations-destruct.mjs +3 -3
  19. package/fesm2022/ngwr-animations-dot-grid.mjs +3 -3
  20. package/fesm2022/ngwr-animations-falling-letters.mjs +3 -3
  21. package/fesm2022/ngwr-animations-flow-lines.mjs +3 -3
  22. package/fesm2022/ngwr-animations-fluid-cursor.mjs +3 -3
  23. package/fesm2022/ngwr-animations-glitch.mjs +3 -3
  24. package/fesm2022/ngwr-animations-glow-border.mjs +3 -3
  25. package/fesm2022/ngwr-animations-gradient-flow.mjs +3 -3
  26. package/fesm2022/ngwr-animations-marquee.mjs +3 -3
  27. package/fesm2022/ngwr-animations-orbit.mjs +3 -3
  28. package/fesm2022/ngwr-animations-reveal.mjs +3 -3
  29. package/fesm2022/ngwr-animations-ripple-grid.mjs +3 -3
  30. package/fesm2022/ngwr-animations-rotate-reveal.mjs +3 -3
  31. package/fesm2022/ngwr-animations-shimmer.mjs +3 -3
  32. package/fesm2022/ngwr-animations-spotlight.mjs +3 -3
  33. package/fesm2022/ngwr-animations-thread-lines.mjs +3 -3
  34. package/fesm2022/ngwr-animations-tilt.mjs +3 -3
  35. package/fesm2022/ngwr-animations-typewriter.mjs +3 -3
  36. package/fesm2022/ngwr-avatar.mjs +3 -3
  37. package/fesm2022/ngwr-back-top.mjs +3 -3
  38. package/fesm2022/ngwr-badge.mjs +129 -11
  39. package/fesm2022/ngwr-badge.mjs.map +1 -1
  40. package/fesm2022/ngwr-breadcrumbs-testing.mjs +83 -0
  41. package/fesm2022/ngwr-breadcrumbs-testing.mjs.map +1 -0
  42. package/fesm2022/ngwr-breadcrumbs.mjs +8 -8
  43. package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
  44. package/fesm2022/ngwr-burger-testing.mjs +45 -0
  45. package/fesm2022/ngwr-burger-testing.mjs.map +1 -0
  46. package/fesm2022/ngwr-burger.mjs +3 -3
  47. package/fesm2022/ngwr-button.mjs +6 -6
  48. package/fesm2022/ngwr-calendar-testing.mjs +18 -0
  49. package/fesm2022/ngwr-calendar-testing.mjs.map +1 -1
  50. package/fesm2022/ngwr-calendar.mjs +500 -73
  51. package/fesm2022/ngwr-calendar.mjs.map +1 -1
  52. package/fesm2022/ngwr-card.mjs +9 -9
  53. package/fesm2022/ngwr-carousel.mjs +6 -6
  54. package/fesm2022/ngwr-cascader.mjs +37 -16
  55. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  56. package/fesm2022/ngwr-charts-bar-chart.mjs +5 -4
  57. package/fesm2022/ngwr-charts-bar-chart.mjs.map +1 -1
  58. package/fesm2022/ngwr-charts-boxplot-chart.mjs +3 -3
  59. package/fesm2022/ngwr-charts-bullet-chart.mjs +3 -3
  60. package/fesm2022/ngwr-charts-calendar-heatmap.mjs +3 -3
  61. package/fesm2022/ngwr-charts-candlestick-chart.mjs +3 -3
  62. package/fesm2022/ngwr-charts-chart-legend.mjs +26 -11
  63. package/fesm2022/ngwr-charts-chart-legend.mjs.map +1 -1
  64. package/fesm2022/ngwr-charts-core.mjs +3 -3
  65. package/fesm2022/ngwr-charts-donut-chart.mjs +5 -4
  66. package/fesm2022/ngwr-charts-donut-chart.mjs.map +1 -1
  67. package/fesm2022/ngwr-charts-funnel-chart.mjs +3 -3
  68. package/fesm2022/ngwr-charts-gauge.mjs +3 -3
  69. package/fesm2022/ngwr-charts-heatmap-chart.mjs +3 -3
  70. package/fesm2022/ngwr-charts-line-chart-testing.mjs +3 -2
  71. package/fesm2022/ngwr-charts-line-chart-testing.mjs.map +1 -1
  72. package/fesm2022/ngwr-charts-line-chart.mjs +17 -7
  73. package/fesm2022/ngwr-charts-line-chart.mjs.map +1 -1
  74. package/fesm2022/ngwr-charts-meter-group.mjs +5 -4
  75. package/fesm2022/ngwr-charts-meter-group.mjs.map +1 -1
  76. package/fesm2022/ngwr-charts-radar-chart.mjs +5 -4
  77. package/fesm2022/ngwr-charts-radar-chart.mjs.map +1 -1
  78. package/fesm2022/ngwr-charts-scatter-chart.mjs +5 -4
  79. package/fesm2022/ngwr-charts-scatter-chart.mjs.map +1 -1
  80. package/fesm2022/ngwr-charts-sparkline.mjs +3 -3
  81. package/fesm2022/ngwr-charts-treemap-chart.mjs +3 -3
  82. package/fesm2022/ngwr-charts-waterfall-chart.mjs +3 -3
  83. package/fesm2022/ngwr-checkbox.mjs +6 -6
  84. package/fesm2022/ngwr-clipboard.mjs +3 -3
  85. package/fesm2022/ngwr-collapse.mjs +9 -9
  86. package/fesm2022/ngwr-color-picker-testing.mjs +11 -1
  87. package/fesm2022/ngwr-color-picker-testing.mjs.map +1 -1
  88. package/fesm2022/ngwr-color-picker.mjs +153 -37
  89. package/fesm2022/ngwr-color-picker.mjs.map +1 -1
  90. package/fesm2022/ngwr-command-palette.mjs +3 -3
  91. package/fesm2022/ngwr-comment.mjs +10 -6
  92. package/fesm2022/ngwr-comment.mjs.map +1 -1
  93. package/fesm2022/ngwr-compare-testing.mjs +84 -0
  94. package/fesm2022/ngwr-compare-testing.mjs.map +1 -0
  95. package/fesm2022/ngwr-compare.mjs +3 -3
  96. package/fesm2022/ngwr-context-menu.mjs +12 -12
  97. package/fesm2022/ngwr-cookie.mjs +3 -3
  98. package/fesm2022/ngwr-copy-value.mjs +3 -3
  99. package/fesm2022/ngwr-counter.mjs +6 -6
  100. package/fesm2022/ngwr-date-picker-testing.mjs +30 -4
  101. package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
  102. package/fesm2022/ngwr-date-picker.mjs +342 -69
  103. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  104. package/fesm2022/ngwr-date-stamp.mjs +3 -3
  105. package/fesm2022/ngwr-date.mjs +59 -8
  106. package/fesm2022/ngwr-date.mjs.map +1 -1
  107. package/fesm2022/ngwr-density.mjs +6 -6
  108. package/fesm2022/ngwr-descriptions.mjs +6 -6
  109. package/fesm2022/ngwr-dialog.mjs +18 -18
  110. package/fesm2022/ngwr-directives.mjs +15 -15
  111. package/fesm2022/ngwr-divider.mjs +3 -3
  112. package/fesm2022/ngwr-drawer.mjs +51 -29
  113. package/fesm2022/ngwr-drawer.mjs.map +1 -1
  114. package/fesm2022/ngwr-dropdown-testing.mjs +11 -3
  115. package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -1
  116. package/fesm2022/ngwr-dropdown.mjs +52 -95
  117. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  118. package/fesm2022/ngwr-editor.mjs +4 -3
  119. package/fesm2022/ngwr-editor.mjs.map +1 -1
  120. package/fesm2022/ngwr-empty.mjs +3 -3
  121. package/fesm2022/ngwr-event-calendar.mjs +186 -33
  122. package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
  123. package/fesm2022/ngwr-file-upload-testing.mjs +34 -2
  124. package/fesm2022/ngwr-file-upload-testing.mjs.map +1 -1
  125. package/fesm2022/ngwr-file-upload.mjs +274 -15
  126. package/fesm2022/ngwr-file-upload.mjs.map +1 -1
  127. package/fesm2022/ngwr-form.mjs +9 -9
  128. package/fesm2022/ngwr-form.mjs.map +1 -1
  129. package/fesm2022/ngwr-graph-testing.mjs +3 -0
  130. package/fesm2022/ngwr-graph-testing.mjs.map +1 -1
  131. package/fesm2022/ngwr-graph.mjs +102 -42
  132. package/fesm2022/ngwr-graph.mjs.map +1 -1
  133. package/fesm2022/ngwr-hotkey.mjs +6 -6
  134. package/fesm2022/ngwr-i18n-ar.mjs +19 -4
  135. package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
  136. package/fesm2022/ngwr-i18n-cs.mjs +19 -4
  137. package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
  138. package/fesm2022/ngwr-i18n-de.mjs +19 -4
  139. package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
  140. package/fesm2022/ngwr-i18n-en.mjs +19 -4
  141. package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
  142. package/fesm2022/ngwr-i18n-es.mjs +19 -4
  143. package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
  144. package/fesm2022/ngwr-i18n-fr.mjs +19 -4
  145. package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
  146. package/fesm2022/ngwr-i18n-he.mjs +19 -4
  147. package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
  148. package/fesm2022/ngwr-i18n-hi.mjs +19 -4
  149. package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
  150. package/fesm2022/ngwr-i18n-id.mjs +19 -4
  151. package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
  152. package/fesm2022/ngwr-i18n-it.mjs +19 -4
  153. package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
  154. package/fesm2022/ngwr-i18n-ja.mjs +19 -4
  155. package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
  156. package/fesm2022/ngwr-i18n-ko.mjs +19 -4
  157. package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
  158. package/fesm2022/ngwr-i18n-nl.mjs +19 -4
  159. package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
  160. package/fesm2022/ngwr-i18n-pl.mjs +19 -4
  161. package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
  162. package/fesm2022/ngwr-i18n-pt.mjs +19 -4
  163. package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
  164. package/fesm2022/ngwr-i18n-ru.mjs +19 -4
  165. package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
  166. package/fesm2022/ngwr-i18n-sv.mjs +19 -4
  167. package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
  168. package/fesm2022/ngwr-i18n-tr.mjs +19 -4
  169. package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
  170. package/fesm2022/ngwr-i18n-uk.mjs +19 -4
  171. package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
  172. package/fesm2022/ngwr-i18n-vi.mjs +19 -4
  173. package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
  174. package/fesm2022/ngwr-i18n-zh-tw.mjs +19 -4
  175. package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
  176. package/fesm2022/ngwr-i18n-zh.mjs +19 -4
  177. package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
  178. package/fesm2022/ngwr-i18n.mjs +9 -9
  179. package/fesm2022/ngwr-icon.mjs +6 -6
  180. package/fesm2022/ngwr-image-cropper.mjs +3 -3
  181. package/fesm2022/ngwr-input-number-testing.mjs +11 -0
  182. package/fesm2022/ngwr-input-number-testing.mjs.map +1 -1
  183. package/fesm2022/ngwr-input-number.mjs +68 -7
  184. package/fesm2022/ngwr-input-number.mjs.map +1 -1
  185. package/fesm2022/ngwr-input-otp.mjs +23 -3
  186. package/fesm2022/ngwr-input-otp.mjs.map +1 -1
  187. package/fesm2022/ngwr-input-testing.mjs +24 -1
  188. package/fesm2022/ngwr-input-testing.mjs.map +1 -1
  189. package/fesm2022/ngwr-input.mjs +152 -36
  190. package/fesm2022/ngwr-input.mjs.map +1 -1
  191. package/fesm2022/ngwr-keyboard.mjs +3 -3
  192. package/fesm2022/ngwr-knob.mjs +3 -3
  193. package/fesm2022/ngwr-layout.mjs +15 -15
  194. package/fesm2022/ngwr-lightbox.mjs +8 -8
  195. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  196. package/fesm2022/ngwr-list.mjs +8 -8
  197. package/fesm2022/ngwr-list.mjs.map +1 -1
  198. package/fesm2022/ngwr-load-state.mjs +15 -15
  199. package/fesm2022/ngwr-loading-bar.mjs +6 -6
  200. package/fesm2022/ngwr-mention.mjs +6 -6
  201. package/fesm2022/ngwr-meta.mjs +6 -6
  202. package/fesm2022/ngwr-overlay.mjs +175 -13
  203. package/fesm2022/ngwr-overlay.mjs.map +1 -1
  204. package/fesm2022/ngwr-page-header.mjs +3 -3
  205. package/fesm2022/ngwr-pagination.mjs +5 -3
  206. package/fesm2022/ngwr-pagination.mjs.map +1 -1
  207. package/fesm2022/ngwr-pipes.mjs +31 -29
  208. package/fesm2022/ngwr-pipes.mjs.map +1 -1
  209. package/fesm2022/ngwr-platform.mjs +9 -9
  210. package/fesm2022/ngwr-popconfirm-testing.mjs +5 -2
  211. package/fesm2022/ngwr-popconfirm-testing.mjs.map +1 -1
  212. package/fesm2022/ngwr-popconfirm.mjs +44 -63
  213. package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
  214. package/fesm2022/ngwr-popover-testing.mjs +7 -1
  215. package/fesm2022/ngwr-popover-testing.mjs.map +1 -1
  216. package/fesm2022/ngwr-popover.mjs +58 -156
  217. package/fesm2022/ngwr-popover.mjs.map +1 -1
  218. package/fesm2022/ngwr-progress.mjs +50 -9
  219. package/fesm2022/ngwr-progress.mjs.map +1 -1
  220. package/fesm2022/ngwr-pull-to-refresh-testing.mjs +57 -0
  221. package/fesm2022/ngwr-pull-to-refresh-testing.mjs.map +1 -0
  222. package/fesm2022/ngwr-pull-to-refresh.mjs +3 -3
  223. package/fesm2022/ngwr-qr.mjs +3 -3
  224. package/fesm2022/ngwr-radio.mjs +6 -6
  225. package/fesm2022/ngwr-rating.mjs +3 -3
  226. package/fesm2022/ngwr-resizable-testing.mjs +113 -0
  227. package/fesm2022/ngwr-resizable-testing.mjs.map +1 -0
  228. package/fesm2022/ngwr-resizable.mjs +3 -3
  229. package/fesm2022/ngwr-result.mjs +12 -12
  230. package/fesm2022/ngwr-schema-form-testing.mjs +336 -0
  231. package/fesm2022/ngwr-schema-form-testing.mjs.map +1 -0
  232. package/fesm2022/ngwr-schema-form.mjs +415 -19
  233. package/fesm2022/ngwr-schema-form.mjs.map +1 -1
  234. package/fesm2022/ngwr-scroll.mjs +3 -3
  235. package/fesm2022/ngwr-segmented.mjs +3 -3
  236. package/fesm2022/ngwr-select-testing.mjs +19 -0
  237. package/fesm2022/ngwr-select-testing.mjs.map +1 -1
  238. package/fesm2022/ngwr-select.mjs +263 -83
  239. package/fesm2022/ngwr-select.mjs.map +1 -1
  240. package/fesm2022/ngwr-sidebar-testing.mjs +176 -0
  241. package/fesm2022/ngwr-sidebar-testing.mjs.map +1 -0
  242. package/fesm2022/ngwr-sidebar.mjs +3 -3
  243. package/fesm2022/ngwr-skeleton.mjs +3 -3
  244. package/fesm2022/ngwr-slider-testing.mjs +6 -0
  245. package/fesm2022/ngwr-slider-testing.mjs.map +1 -1
  246. package/fesm2022/ngwr-slider.mjs +21 -3
  247. package/fesm2022/ngwr-slider.mjs.map +1 -1
  248. package/fesm2022/ngwr-sortable-list.mjs +29 -12
  249. package/fesm2022/ngwr-sortable-list.mjs.map +1 -1
  250. package/fesm2022/ngwr-speed-dial.mjs +3 -3
  251. package/fesm2022/ngwr-spinner.mjs +3 -3
  252. package/fesm2022/ngwr-splitter.mjs +3 -3
  253. package/fesm2022/ngwr-statistic.mjs +9 -9
  254. package/fesm2022/ngwr-stepper.mjs +42 -11
  255. package/fesm2022/ngwr-stepper.mjs.map +1 -1
  256. package/fesm2022/ngwr-storage.mjs +3 -3
  257. package/fesm2022/ngwr-switch.mjs +3 -3
  258. package/fesm2022/ngwr-table-testing.mjs +88 -2
  259. package/fesm2022/ngwr-table-testing.mjs.map +1 -1
  260. package/fesm2022/ngwr-table.mjs +891 -74
  261. package/fesm2022/ngwr-table.mjs.map +1 -1
  262. package/fesm2022/ngwr-tabs-router.mjs +3 -3
  263. package/fesm2022/ngwr-tabs-testing.mjs +1 -1
  264. package/fesm2022/ngwr-tabs-testing.mjs.map +1 -1
  265. package/fesm2022/ngwr-tabs.mjs +15 -10
  266. package/fesm2022/ngwr-tabs.mjs.map +1 -1
  267. package/fesm2022/ngwr-textarea-testing.mjs +11 -0
  268. package/fesm2022/ngwr-textarea-testing.mjs.map +1 -1
  269. package/fesm2022/ngwr-textarea.mjs +128 -16
  270. package/fesm2022/ngwr-textarea.mjs.map +1 -1
  271. package/fesm2022/ngwr-theme.mjs +3 -3
  272. package/fesm2022/ngwr-timeline.mjs +6 -6
  273. package/fesm2022/ngwr-toast.mjs +40 -19
  274. package/fesm2022/ngwr-toast.mjs.map +1 -1
  275. package/fesm2022/ngwr-toolbar.mjs +3 -3
  276. package/fesm2022/ngwr-tour.mjs +6 -6
  277. package/fesm2022/ngwr-transfer-testing.mjs +6 -0
  278. package/fesm2022/ngwr-transfer-testing.mjs.map +1 -1
  279. package/fesm2022/ngwr-transfer.mjs +24 -5
  280. package/fesm2022/ngwr-transfer.mjs.map +1 -1
  281. package/fesm2022/ngwr-tree-testing.mjs +62 -2
  282. package/fesm2022/ngwr-tree-testing.mjs.map +1 -1
  283. package/fesm2022/ngwr-tree.mjs +966 -78
  284. package/fesm2022/ngwr-tree.mjs.map +1 -1
  285. package/fesm2022/ngwr-typography.mjs +3 -3
  286. package/fesm2022/ngwr-utils-router.mjs +3 -3
  287. package/fesm2022/ngwr-utils.mjs +34 -1
  288. package/fesm2022/ngwr-utils.mjs.map +1 -1
  289. package/fesm2022/ngwr-version.mjs +1 -1
  290. package/fesm2022/ngwr-version.mjs.map +1 -1
  291. package/fesm2022/ngwr-virtual-scroll.mjs +3 -3
  292. package/fesm2022/ngwr-window.mjs +33 -22
  293. package/fesm2022/ngwr-window.mjs.map +1 -1
  294. package/file-upload/styles/_index.scss +156 -0
  295. package/i18n/ar.json +21 -4
  296. package/i18n/cs.json +21 -4
  297. package/i18n/de.json +21 -4
  298. package/i18n/en.json +21 -4
  299. package/i18n/es.json +21 -4
  300. package/i18n/fr.json +21 -4
  301. package/i18n/he.json +21 -4
  302. package/i18n/hi.json +21 -4
  303. package/i18n/id.json +21 -4
  304. package/i18n/it.json +21 -4
  305. package/i18n/ja.json +21 -4
  306. package/i18n/ko.json +21 -4
  307. package/i18n/nl.json +21 -4
  308. package/i18n/pl.json +21 -4
  309. package/i18n/pt.json +21 -4
  310. package/i18n/ru.json +21 -4
  311. package/i18n/sv.json +21 -4
  312. package/i18n/tr.json +21 -4
  313. package/i18n/uk.json +21 -4
  314. package/i18n/vi.json +21 -4
  315. package/i18n/zh-TW.json +21 -4
  316. package/i18n/zh.json +21 -4
  317. package/input/styles/_index.scss +68 -1
  318. package/input-otp/styles/_index.scss +14 -0
  319. package/llms-full.txt +52 -20
  320. package/overlay/styles/_arrow.scss +4 -4
  321. package/package.json +33 -1
  322. package/popconfirm/styles/_index.scss +3 -11
  323. package/progress/styles/_index.scss +32 -0
  324. package/schema-form/styles/_index.scss +78 -0
  325. package/schematics/use/rule.js +2 -0
  326. package/schematics/use/symbol-map.json +4 -0
  327. package/select/styles/_index.scss +114 -22
  328. package/skills/ngwr/SKILL.md +1 -1
  329. package/skills/ngwr/references/catalog.md +9 -1
  330. package/slider/styles/_index.scss +22 -0
  331. package/table/styles/_index.scss +167 -3
  332. package/textarea/styles/_index.scss +80 -0
  333. package/theme/styles/_focus.scss +5 -0
  334. package/theme/styles/_motion.scss +5 -0
  335. package/transfer/styles/_index.scss +84 -0
  336. package/tree/styles/_index.scss +138 -5
  337. package/types/ngwr-alert-testing.d.ts +88 -0
  338. package/types/ngwr-badge.d.ts +72 -2
  339. package/types/ngwr-breadcrumbs-testing.d.ts +92 -0
  340. package/types/ngwr-burger-testing.d.ts +51 -0
  341. package/types/ngwr-calendar-testing.d.ts +18 -6
  342. package/types/ngwr-calendar.d.ts +272 -22
  343. package/types/ngwr-cascader.d.ts +10 -1
  344. package/types/ngwr-charts-chart-legend.d.ts +9 -4
  345. package/types/ngwr-charts-line-chart-testing.d.ts +4 -1
  346. package/types/ngwr-charts-line-chart.d.ts +7 -4
  347. package/types/ngwr-color-picker-testing.d.ts +15 -4
  348. package/types/ngwr-color-picker.d.ts +76 -6
  349. package/types/ngwr-compare-testing.d.ts +72 -0
  350. package/types/ngwr-date-picker-testing.d.ts +23 -8
  351. package/types/ngwr-date-picker.d.ts +100 -9
  352. package/types/ngwr-date.d.ts +71 -1
  353. package/types/ngwr-drawer.d.ts +9 -0
  354. package/types/ngwr-dropdown-testing.d.ts +20 -0
  355. package/types/ngwr-dropdown.d.ts +24 -6
  356. package/types/ngwr-event-calendar.d.ts +66 -8
  357. package/types/ngwr-file-upload-testing.d.ts +31 -2
  358. package/types/ngwr-file-upload.d.ts +148 -1
  359. package/types/ngwr-form.d.ts +47 -3
  360. package/types/ngwr-graph-testing.d.ts +8 -3
  361. package/types/ngwr-graph.d.ts +147 -7
  362. package/types/ngwr-input-number-testing.d.ts +10 -0
  363. package/types/ngwr-input-number.d.ts +30 -1
  364. package/types/ngwr-input-otp.d.ts +10 -0
  365. package/types/ngwr-input-testing.d.ts +30 -0
  366. package/types/ngwr-input.d.ts +54 -3
  367. package/types/ngwr-overlay.d.ts +84 -5
  368. package/types/ngwr-pipes.d.ts +2 -1
  369. package/types/ngwr-popconfirm-testing.d.ts +12 -3
  370. package/types/ngwr-popconfirm.d.ts +28 -3
  371. package/types/ngwr-popover-testing.d.ts +19 -2
  372. package/types/ngwr-popover.d.ts +22 -2
  373. package/types/ngwr-progress.d.ts +29 -1
  374. package/types/ngwr-pull-to-refresh-testing.d.ts +83 -0
  375. package/types/ngwr-resizable-testing.d.ts +116 -0
  376. package/types/ngwr-schema-form-testing.d.ts +260 -0
  377. package/types/ngwr-schema-form.d.ts +76 -6
  378. package/types/ngwr-select-testing.d.ts +20 -0
  379. package/types/ngwr-select.d.ts +112 -11
  380. package/types/ngwr-sidebar-testing.d.ts +176 -0
  381. package/types/ngwr-slider-testing.d.ts +3 -1
  382. package/types/ngwr-slider.d.ts +21 -1
  383. package/types/ngwr-sortable-list.d.ts +6 -0
  384. package/types/ngwr-stepper.d.ts +20 -11
  385. package/types/ngwr-table-testing.d.ts +70 -6
  386. package/types/ngwr-table.d.ts +480 -50
  387. package/types/ngwr-tabs-testing.d.ts +14 -17
  388. package/types/ngwr-tabs.d.ts +6 -0
  389. package/types/ngwr-textarea-testing.d.ts +10 -0
  390. package/types/ngwr-textarea.d.ts +48 -2
  391. package/types/ngwr-toast.d.ts +8 -1
  392. package/types/ngwr-transfer-testing.d.ts +3 -0
  393. package/types/ngwr-transfer.d.ts +24 -1
  394. package/types/ngwr-tree-testing.d.ts +65 -1
  395. package/types/ngwr-tree.d.ts +333 -12
  396. package/types/ngwr-utils.d.ts +28 -0
  397. package/types/ngwr-version.d.ts +1 -1
  398. package/types/ngwr-window.d.ts +7 -4
@@ -1,10 +1,11 @@
1
1
  import * as i0 from "@angular/core";
2
- import { Component, Directive, ElementRef, Injector, PLATFORM_ID, TemplateRef, ViewEncapsulation, afterNextRender, computed, contentChild, contentChildren, effect, inject, input, isDevMode, linkedSignal, model, output, signal, untracked, viewChild, viewChildren } from "@angular/core";
2
+ import { Component, DestroyRef, Directive, ElementRef, Injector, PLATFORM_ID, TemplateRef, ViewEncapsulation, afterNextRender, computed, contentChild, contentChildren, effect, inject, input, isDevMode, linkedSignal, model, output, signal, untracked, viewChild, viewChildren } from "@angular/core";
3
3
  import { coerceBooleanProperty, coerceNumberProperty } from "@angular/cdk/coercion";
4
- import { NgTemplateOutlet, isPlatformBrowser } from "@angular/common";
5
- import { WR_KEYS, wrCheckStyles, wrDecimal, wrDecimalAdd, wrDecimalCompare, wrDecimalDivide, wrDownloadBlob, wrIsComposing, wrToClassList } from "ngwr/utils";
4
+ import { DOCUMENT as DOCUMENT$1, NgTemplateOutlet, isPlatformBrowser } from "@angular/common";
5
+ import { WR_KEYS, wrCheckStyles, wrDecimal, wrDecimalAdd, wrDecimalCompare, wrDecimalDivide, wrDownloadBlob, wrIsComposing, wrIsPrintableKey, wrToClassList, wrWatchDragCancel } from "ngwr/utils";
6
6
  import { useI18nFormatter, useI18nText } from "ngwr/i18n";
7
7
  import { Directionality } from "@angular/cdk/bidi";
8
+ import { WrButton } from "ngwr/button";
8
9
  import { WrSpinner } from "ngwr/spinner";
9
10
  import { WrPopover } from "ngwr/popover";
10
11
  import { InputModalityDetector } from "@angular/cdk/a11y";
@@ -30,7 +31,7 @@ var WrTableCell = class WrTableCell {
30
31
  }
31
32
  static ɵfac = i0.ɵɵngDeclareFactory({
32
33
  minVersion: "12.0.0",
33
- version: "22.2.5",
34
+ version: "22.2.6",
34
35
  ngImport: i0,
35
36
  type: WrTableCell,
36
37
  deps: [],
@@ -38,7 +39,7 @@ var WrTableCell = class WrTableCell {
38
39
  });
39
40
  static ɵdir = i0.ɵɵngDeclareDirective({
40
41
  minVersion: "17.1.0",
41
- version: "22.2.5",
42
+ version: "22.2.6",
42
43
  type: WrTableCell,
43
44
  isStandalone: true,
44
45
  selector: "[wrTableCell]",
@@ -63,7 +64,7 @@ var WrTableCell = class WrTableCell {
63
64
  };
64
65
  i0.ɵɵngDeclareClassMetadata({
65
66
  minVersion: "12.0.0",
66
- version: "22.2.5",
67
+ version: "22.2.6",
67
68
  ngImport: i0,
68
69
  type: WrTableCell,
69
70
  decorators: [{
@@ -95,11 +96,88 @@ i0.ɵɵngDeclareClassMetadata({
95
96
  * Use of this source code is governed by an MIT-style license that can be
96
97
  * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
97
98
  */
99
+ var WrTableEditCell = class WrTableEditCell {
100
+ columnKey = input.required({
101
+ ...ngDevMode ? { debugName: "columnKey" } : /* istanbul ignore next */ {},
102
+ alias: "wrTableEditCell"
103
+ });
104
+ wrTableEditCellOf = input(void 0, ...ngDevMode ? [{ debugName: "wrTableEditCellOf" }] : /* istanbul ignore next */ []);
105
+ template = inject(TemplateRef);
106
+ static ngTemplateContextGuard(_dir, _ctx) {
107
+ return true;
108
+ }
109
+ static ɵfac = i0.ɵɵngDeclareFactory({
110
+ minVersion: "12.0.0",
111
+ version: "22.2.6",
112
+ ngImport: i0,
113
+ type: WrTableEditCell,
114
+ deps: [],
115
+ target: i0.ɵɵFactoryTarget.Directive
116
+ });
117
+ static ɵdir = i0.ɵɵngDeclareDirective({
118
+ minVersion: "17.1.0",
119
+ version: "22.2.6",
120
+ type: WrTableEditCell,
121
+ isStandalone: true,
122
+ selector: "[wrTableEditCell]",
123
+ inputs: {
124
+ columnKey: {
125
+ classPropertyName: "columnKey",
126
+ publicName: "wrTableEditCell",
127
+ isSignal: true,
128
+ isRequired: true,
129
+ transformFunction: null
130
+ },
131
+ wrTableEditCellOf: {
132
+ classPropertyName: "wrTableEditCellOf",
133
+ publicName: "wrTableEditCellOf",
134
+ isSignal: true,
135
+ isRequired: false,
136
+ transformFunction: null
137
+ }
138
+ },
139
+ ngImport: i0
140
+ });
141
+ };
142
+ i0.ɵɵngDeclareClassMetadata({
143
+ minVersion: "12.0.0",
144
+ version: "22.2.6",
145
+ ngImport: i0,
146
+ type: WrTableEditCell,
147
+ decorators: [{
148
+ type: Directive,
149
+ args: [{ selector: "[wrTableEditCell]" }]
150
+ }],
151
+ propDecorators: {
152
+ columnKey: [{
153
+ type: i0.Input,
154
+ args: [{
155
+ isSignal: true,
156
+ alias: "wrTableEditCell",
157
+ required: true
158
+ }]
159
+ }],
160
+ wrTableEditCellOf: [{
161
+ type: i0.Input,
162
+ args: [{
163
+ isSignal: true,
164
+ alias: "wrTableEditCellOf",
165
+ required: false
166
+ }]
167
+ }]
168
+ }
169
+ });
170
+ /**
171
+ * @license
172
+ *
173
+ * Use of this source code is governed by an MIT-style license that can be
174
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
175
+ */
98
176
  var WrTableExpand = class WrTableExpand {
99
177
  template = inject(TemplateRef);
100
178
  static ɵfac = i0.ɵɵngDeclareFactory({
101
179
  minVersion: "12.0.0",
102
- version: "22.2.5",
180
+ version: "22.2.6",
103
181
  ngImport: i0,
104
182
  type: WrTableExpand,
105
183
  deps: [],
@@ -107,7 +185,7 @@ var WrTableExpand = class WrTableExpand {
107
185
  });
108
186
  static ɵdir = i0.ɵɵngDeclareDirective({
109
187
  minVersion: "14.0.0",
110
- version: "22.2.5",
188
+ version: "22.2.6",
111
189
  type: WrTableExpand,
112
190
  isStandalone: true,
113
191
  selector: "ng-template[wrTableExpand]",
@@ -116,7 +194,7 @@ var WrTableExpand = class WrTableExpand {
116
194
  };
117
195
  i0.ɵɵngDeclareClassMetadata({
118
196
  minVersion: "12.0.0",
119
- version: "22.2.5",
197
+ version: "22.2.6",
120
198
  ngImport: i0,
121
199
  type: WrTableExpand,
122
200
  decorators: [{
@@ -131,6 +209,9 @@ i0.ɵɵngDeclareClassMetadata({
131
209
  * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
132
210
  */
133
211
  const selectionVersion = signal(0, ...ngDevMode ? [{ debugName: "selectionVersion" }] : /* istanbul ignore next */ []);
212
+ function markFilterSelectionChanged() {
213
+ selectionVersion.update((v) => v + 1);
214
+ }
134
215
  var WrTableFilter = class WrTableFilter {
135
216
  constructor() {
136
217
  if (typeof ngDevMode === "undefined" || ngDevMode) wrCheckStyles("table");
@@ -188,7 +269,7 @@ var WrTableFilter = class WrTableFilter {
188
269
  }
189
270
  static ɵfac = i0.ɵɵngDeclareFactory({
190
271
  minVersion: "12.0.0",
191
- version: "22.2.5",
272
+ version: "22.2.6",
192
273
  ngImport: i0,
193
274
  type: WrTableFilter,
194
275
  deps: [],
@@ -196,7 +277,7 @@ var WrTableFilter = class WrTableFilter {
196
277
  });
197
278
  static ɵcmp = i0.ɵɵngDeclareComponent({
198
279
  minVersion: "17.0.0",
199
- version: "22.2.5",
280
+ version: "22.2.6",
200
281
  type: WrTableFilter,
201
282
  isStandalone: true,
202
283
  selector: "wr-table-filter",
@@ -260,6 +341,7 @@ var WrTableFilter = class WrTableFilter {
260
341
  "trigger",
261
342
  "position",
262
343
  "arrow",
344
+ "wrDropdownDisabled",
263
345
  "panelClass"
264
346
  ],
265
347
  outputs: ["opened", "closed"],
@@ -275,7 +357,7 @@ var WrTableFilter = class WrTableFilter {
275
357
  };
276
358
  i0.ɵɵngDeclareClassMetadata({
277
359
  minVersion: "12.0.0",
278
- version: "22.2.5",
360
+ version: "22.2.6",
279
361
  ngImport: i0,
280
362
  type: WrTableFilter,
281
363
  decorators: [{
@@ -357,7 +439,7 @@ var WrTableGroupHeader = class WrTableGroupHeader {
357
439
  template = inject(TemplateRef);
358
440
  static ɵfac = i0.ɵɵngDeclareFactory({
359
441
  minVersion: "12.0.0",
360
- version: "22.2.5",
442
+ version: "22.2.6",
361
443
  ngImport: i0,
362
444
  type: WrTableGroupHeader,
363
445
  deps: [],
@@ -365,7 +447,7 @@ var WrTableGroupHeader = class WrTableGroupHeader {
365
447
  });
366
448
  static ɵdir = i0.ɵɵngDeclareDirective({
367
449
  minVersion: "14.0.0",
368
- version: "22.2.5",
450
+ version: "22.2.6",
369
451
  type: WrTableGroupHeader,
370
452
  isStandalone: true,
371
453
  selector: "ng-template[wrTableGroupHeader]",
@@ -374,7 +456,7 @@ var WrTableGroupHeader = class WrTableGroupHeader {
374
456
  };
375
457
  i0.ɵɵngDeclareClassMetadata({
376
458
  minVersion: "12.0.0",
377
- version: "22.2.5",
459
+ version: "22.2.6",
378
460
  ngImport: i0,
379
461
  type: WrTableGroupHeader,
380
462
  decorators: [{
@@ -388,6 +470,60 @@ i0.ɵɵngDeclareClassMetadata({
388
470
  * Use of this source code is governed by an MIT-style license that can be
389
471
  * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
390
472
  */
473
+ var WrTableSelectionBar = class WrTableSelectionBar {
474
+ wrTableSelectionBarOf = input(void 0, ...ngDevMode ? [{ debugName: "wrTableSelectionBarOf" }] : /* istanbul ignore next */ []);
475
+ template = inject(TemplateRef);
476
+ static ngTemplateContextGuard(_dir, _ctx) {
477
+ return true;
478
+ }
479
+ static ɵfac = i0.ɵɵngDeclareFactory({
480
+ minVersion: "12.0.0",
481
+ version: "22.2.6",
482
+ ngImport: i0,
483
+ type: WrTableSelectionBar,
484
+ deps: [],
485
+ target: i0.ɵɵFactoryTarget.Directive
486
+ });
487
+ static ɵdir = i0.ɵɵngDeclareDirective({
488
+ minVersion: "17.1.0",
489
+ version: "22.2.6",
490
+ type: WrTableSelectionBar,
491
+ isStandalone: true,
492
+ selector: "ng-template[wrTableSelectionBar]",
493
+ inputs: { wrTableSelectionBarOf: {
494
+ classPropertyName: "wrTableSelectionBarOf",
495
+ publicName: "wrTableSelectionBarOf",
496
+ isSignal: true,
497
+ isRequired: false,
498
+ transformFunction: null
499
+ } },
500
+ ngImport: i0
501
+ });
502
+ };
503
+ i0.ɵɵngDeclareClassMetadata({
504
+ minVersion: "12.0.0",
505
+ version: "22.2.6",
506
+ ngImport: i0,
507
+ type: WrTableSelectionBar,
508
+ decorators: [{
509
+ type: Directive,
510
+ args: [{ selector: "ng-template[wrTableSelectionBar]" }]
511
+ }],
512
+ propDecorators: { wrTableSelectionBarOf: [{
513
+ type: i0.Input,
514
+ args: [{
515
+ isSignal: true,
516
+ alias: "wrTableSelectionBarOf",
517
+ required: false
518
+ }]
519
+ }] }
520
+ });
521
+ /**
522
+ * @license
523
+ *
524
+ * Use of this source code is governed by an MIT-style license that can be
525
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
526
+ */
391
527
  var WrTableSort = class WrTableSort {
392
528
  constructor() {
393
529
  if (typeof ngDevMode === "undefined" || ngDevMode) wrCheckStyles("table");
@@ -401,7 +537,7 @@ var WrTableSort = class WrTableSort {
401
537
  }, ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
402
538
  static ɵfac = i0.ɵɵngDeclareFactory({
403
539
  minVersion: "12.0.0",
404
- version: "22.2.5",
540
+ version: "22.2.6",
405
541
  ngImport: i0,
406
542
  type: WrTableSort,
407
543
  deps: [],
@@ -409,7 +545,7 @@ var WrTableSort = class WrTableSort {
409
545
  });
410
546
  static ɵcmp = i0.ɵɵngDeclareComponent({
411
547
  minVersion: "17.0.0",
412
- version: "22.2.5",
548
+ version: "22.2.6",
413
549
  type: WrTableSort,
414
550
  isStandalone: true,
415
551
  selector: "wr-table-sort",
@@ -432,7 +568,7 @@ var WrTableSort = class WrTableSort {
432
568
  };
433
569
  i0.ɵɵngDeclareClassMetadata({
434
570
  minVersion: "12.0.0",
435
- version: "22.2.5",
571
+ version: "22.2.6",
436
572
  ngImport: i0,
437
573
  type: WrTableSort,
438
574
  decorators: [{
@@ -464,6 +600,28 @@ i0.ɵɵngDeclareClassMetadata({
464
600
  * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
465
601
  */
466
602
  const WR_TABLE_UNGROUPED = Symbol("wr-table-ungrouped");
603
+ var CellContext = class {
604
+ item;
605
+ column;
606
+ key;
607
+ constructor(item, column, key) {
608
+ this.item = item;
609
+ this.column = column;
610
+ this.key = key;
611
+ }
612
+ get $implicit() {
613
+ return this.item[this.key];
614
+ }
615
+ };
616
+ const EDITOR_FOCUSABLE = [
617
+ "input:not([disabled]):not([type=\"hidden\"])",
618
+ "select:not([disabled])",
619
+ "textarea:not([disabled])",
620
+ "button:not([disabled])",
621
+ "a[href]",
622
+ "[contenteditable]:not([contenteditable=\"false\"])",
623
+ "[tabindex]:not([tabindex=\"-1\"])"
624
+ ].join(", ");
467
625
  let tableUid = 0;
468
626
  const WR_TABLE_TOTAL_SCOPE = {
469
627
  scope: "total",
@@ -480,9 +638,13 @@ const ROW_CLICK_IGNORE = [
480
638
  "[contenteditable]:not([contenteditable=\"false\"])",
481
639
  "label",
482
640
  "[wrTableIgnoreRowClick]",
641
+ ".wr-table__td--editing",
483
642
  ".wr-table__td--select",
484
643
  ".wr-table__td--expand"
485
644
  ].join(", ");
645
+ function sameList(a, b) {
646
+ return a.length === b.length && a.every((value, i) => Object.is(value, b[i]));
647
+ }
486
648
  function noValue(value) {
487
649
  return value == null || value === "";
488
650
  }
@@ -549,6 +711,11 @@ var WrTable = class WrTable {
549
711
  transform: coerceBooleanProperty
550
712
  });
551
713
  columnOrder = model([], ...ngDevMode ? [{ debugName: "columnOrder" }] : /* istanbul ignore next */ []);
714
+ hiddenColumns = model([], ...ngDevMode ? [{ debugName: "hiddenColumns" }] : /* istanbul ignore next */ []);
715
+ columnChooser = input(false, {
716
+ ...ngDevMode ? { debugName: "columnChooser" } : /* istanbul ignore next */ {},
717
+ transform: coerceBooleanProperty
718
+ });
552
719
  rowSelection = input(null, ...ngDevMode ? [{ debugName: "rowSelection" }] : /* istanbul ignore next */ []);
553
720
  selectAllScope = input("page", ...ngDevMode ? [{ debugName: "selectAllScope" }] : /* istanbul ignore next */ []);
554
721
  rowClass = input(null, ...ngDevMode ? [{ debugName: "rowClass" }] : /* istanbul ignore next */ []);
@@ -577,8 +744,14 @@ var WrTable = class WrTable {
577
744
  selectGroupLabel = input(null, ...ngDevMode ? [{ debugName: "selectGroupLabel" }] : /* istanbul ignore next */ []);
578
745
  toggleGroupLabel = input(null, ...ngDevMode ? [{ debugName: "toggleGroupLabel" }] : /* istanbul ignore next */ []);
579
746
  loadingLabel = input(null, ...ngDevMode ? [{ debugName: "loadingLabel" }] : /* istanbul ignore next */ []);
747
+ selectedLabel = input(null, ...ngDevMode ? [{ debugName: "selectedLabel" }] : /* istanbul ignore next */ []);
748
+ clearSelectionLabel = input(null, ...ngDevMode ? [{ debugName: "clearSelectionLabel" }] : /* istanbul ignore next */ []);
749
+ columnsLabel = input(null, ...ngDevMode ? [{ debugName: "columnsLabel" }] : /* istanbul ignore next */ []);
580
750
  resolvedEmptyLabel = useI18nText(this.emptyLabel, "table.empty", "No data");
581
751
  resolvedLoadingLabel = useI18nText(this.loadingLabel, "table.loading", "Loading…");
752
+ resolvedColumnsLabel = useI18nText(this.columnsLabel, "table.columns", "Columns");
753
+ resolvedClearSelectionLabel = useI18nText(this.clearSelectionLabel, "table.clearSelection", "Clear selection");
754
+ selectedText = useI18nFormatter("table.selected", "{{count}} selected");
582
755
  sortText = useI18nFormatter("table.sort", "Sort {{column}}");
583
756
  sortLabelFor(column) {
584
757
  return this.sortLabel() ?? this.sortText({ column });
@@ -615,6 +788,49 @@ var WrTable = class WrTable {
615
788
  return `${this.actionId(action)} ${this.groupLabelId(groupId)}`;
616
789
  }
617
790
  filterChange = output();
791
+ state = input(null, ...ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []);
792
+ stateChange = output();
793
+ readerChanges = signal(0, ...ngDevMode ? [{ debugName: "readerChanges" }] : /* istanbul ignore next */ []);
794
+ emittedState = null;
795
+ currentState() {
796
+ const filters = {};
797
+ for (const [key, column] of Object.entries(this.columns())) {
798
+ const selected = column.filterItems?.filter((item) => item.selected).map((item) => item.value);
799
+ if (selected?.length) filters[key] = selected;
800
+ }
801
+ return {
802
+ sort: this.sort(),
803
+ filters,
804
+ page: this.page(),
805
+ pageSize: this.currentPageSize(),
806
+ columnOrder: this.columnOrder(),
807
+ hiddenColumns: this.hiddenColumns()
808
+ };
809
+ }
810
+ restoreState(state) {
811
+ const { sort, filters, page, pageSize, columnOrder, hiddenColumns } = state;
812
+ if (sort && !(sort.length === this.sort().length && sort.every((entry, i) => entry.key === this.sort()[i].key && entry.direction === this.sort()[i].direction))) this.sort.set(sort);
813
+ if (columnOrder && !sameList(columnOrder, this.columnOrder())) this.columnOrder.set(columnOrder);
814
+ if (hiddenColumns && !sameList(hiddenColumns, this.hiddenColumns())) this.hiddenColumns.set(hiddenColumns);
815
+ if (pageSize !== void 0 && pageSize !== this.currentPageSize()) {
816
+ this.currentPageSize.set(pageSize);
817
+ this.pageSizeChange.emit(pageSize);
818
+ }
819
+ if (page !== void 0 && page !== this.page()) this.page.set(page);
820
+ if (filters) {
821
+ let changed = false;
822
+ for (const [key, column] of Object.entries(this.columns())) {
823
+ const wanted = new Set(filters[key] ?? []);
824
+ for (const item of column.filterItems ?? []) {
825
+ const selected = wanted.has(item.value);
826
+ if (!!item.selected === selected) continue;
827
+ item.selected = selected;
828
+ changed = true;
829
+ }
830
+ }
831
+ if (changed) markFilterSelectionChanged();
832
+ }
833
+ }
618
834
  rowClick = output();
619
835
  onBodyClick(event) {
620
836
  const target = event.target;
@@ -686,6 +902,11 @@ var WrTable = class WrTable {
686
902
  this.currentPageSize.set(size);
687
903
  this.page.set(Math.floor(firstRow / size) + 1);
688
904
  this.pageSizeChange.emit(size);
905
+ this.readerChanges.update((n) => n + 1);
906
+ }
907
+ onPagerPage(page) {
908
+ this.page.set(page);
909
+ this.readerChanges.update((n) => n + 1);
689
910
  }
690
911
  cellTemplates = contentChildren(WrTableCell, ...ngDevMode ? [{ debugName: "cellTemplates" }] : /* istanbul ignore next */ []);
691
912
  cellMap = computed(() => {
@@ -693,13 +914,19 @@ var WrTable = class WrTable {
693
914
  for (const cell of this.cellTemplates()) map.set(cell.columnKey(), cell.template);
694
915
  return map;
695
916
  }, ...ngDevMode ? [{ debugName: "cellMap" }] : /* istanbul ignore next */ []);
917
+ editTemplates = contentChildren(WrTableEditCell, ...ngDevMode ? [{ debugName: "editTemplates" }] : /* istanbul ignore next */ []);
918
+ editMap = computed(() => {
919
+ const map = /* @__PURE__ */ new Map();
920
+ for (const cell of this.editTemplates()) map.set(cell.columnKey(), cell.template);
921
+ return map;
922
+ }, ...ngDevMode ? [{ debugName: "editMap" }] : /* istanbul ignore next */ []);
696
923
  platformId = inject(PLATFORM_ID);
697
924
  headerCells = viewChildren("thCell", ...ngDevMode ? [{ debugName: "headerCells" }] : /* istanbul ignore next */ []);
698
925
  dir = inject(Directionality, { optional: true });
699
926
  isRtl() {
700
927
  return this.dir?.value === "rtl";
701
928
  }
702
- displayColumns = computed(() => {
929
+ orderedColumns = computed(() => {
703
930
  const cols = this.columns();
704
931
  const seen = /* @__PURE__ */ new Set();
705
932
  const result = [];
@@ -718,7 +945,35 @@ var WrTable = class WrTable {
718
945
  seen.add(key);
719
946
  }
720
947
  return result;
948
+ }, ...ngDevMode ? [{ debugName: "orderedColumns" }] : /* istanbul ignore next */ []);
949
+ displayColumns = computed(() => {
950
+ const ordered = this.orderedColumns();
951
+ const hidden = new Set(this.hiddenColumns());
952
+ if (hidden.size === 0) return ordered;
953
+ const shown = ordered.filter((c) => c.column.hideable === false || !hidden.has(c.key));
954
+ if (shown.length === ordered.length) return ordered;
955
+ return shown.length > 0 ? shown : ordered.slice(0, 1);
721
956
  }, ...ngDevMode ? [{ debugName: "displayColumns" }] : /* istanbul ignore next */ []);
957
+ chooserColumns = computed(() => {
958
+ const shown = new Set(this.displayColumns().map((c) => c.key));
959
+ return this.orderedColumns().map(({ key, column }) => {
960
+ const visible = shown.has(key);
961
+ return {
962
+ key,
963
+ title: column.title || (column.headerHint ?? key),
964
+ visible,
965
+ locked: column.hideable === false || visible && shown.size === 1
966
+ };
967
+ });
968
+ }, ...ngDevMode ? [{ debugName: "chooserColumns" }] : /* istanbul ignore next */ []);
969
+ setColumnVisible(key, visible) {
970
+ const shown = this.displayColumns();
971
+ if (visible === shown.some((c) => c.key === key)) return;
972
+ if (!visible && shown.length === 1) return;
973
+ const hidden = this.hiddenColumns().filter((k) => k !== key);
974
+ this.hiddenColumns.set(visible ? hidden : [...hidden, key]);
975
+ this.readerChanges.update((n) => n + 1);
976
+ }
722
977
  pins = signal({
723
978
  left: /* @__PURE__ */ new Map(),
724
979
  right: /* @__PURE__ */ new Map(),
@@ -750,17 +1005,52 @@ var WrTable = class WrTable {
750
1005
  if (!tip.el.isConnected && untracked(this.tip) === tip) this.tip.set(null);
751
1006
  }, { injector: this.injector });
752
1007
  });
1008
+ effect(() => {
1009
+ const edit = this.editing();
1010
+ if (!edit) return;
1011
+ const column = this.cellColumns().some((c) => c.key === edit.key && c.editTemplate);
1012
+ if (column && this.dataRows().some((entry) => entry.row === edit.row)) return;
1013
+ const windowed = column && this.renderRows().some((entry) => entry.kind === "row" && entry.row === edit.row);
1014
+ untracked(() => this.endEdit(windowed, "inside"));
1015
+ });
1016
+ effect(() => {
1017
+ this.sort();
1018
+ untracked(() => this.endEdit(false, "inside"));
1019
+ });
1020
+ effect((onCleanup) => {
1021
+ const edit = this.editing();
1022
+ if (!edit || !isPlatformBrowser(this.platformId)) return;
1023
+ const doc = this.hostEl.nativeElement.ownerDocument;
1024
+ const inside = (target) => target instanceof Node && (edit.td.contains(target) || target instanceof Element && !!target.closest(".cdk-overlay-container"));
1025
+ let pressedInside = null;
1026
+ const onPress = (event) => {
1027
+ pressedInside = inside(event.target);
1028
+ };
1029
+ const onClick = (event) => {
1030
+ const within = pressedInside ?? inside(event.target);
1031
+ pressedInside = null;
1032
+ if (!within) this.endEdit(true, false);
1033
+ };
1034
+ doc.addEventListener("pointerdown", onPress, true);
1035
+ doc.addEventListener("click", onClick, true);
1036
+ onCleanup(() => {
1037
+ doc.removeEventListener("pointerdown", onPress, true);
1038
+ doc.removeEventListener("click", onClick, true);
1039
+ });
1040
+ });
753
1041
  if (typeof ngDevMode === "undefined" || ngDevMode) afterNextRender(() => {
754
1042
  const claimed = new Set([
755
1043
  ...this.cellTemplates(),
1044
+ ...this.editTemplates(),
756
1045
  this.expandTpl(),
757
- this.groupTpl()
1046
+ this.groupTpl(),
1047
+ this.selectionBarTpl()
758
1048
  ].map((dir) => dir?.template.elementRef.nativeElement));
759
1049
  const host = this.hostEl.nativeElement;
760
1050
  const declared = this.projectedTemplates().filter((tpl) => isNgTemplateElement(tpl) && !host.contains(tpl.elementRef.nativeElement));
761
1051
  const stray = declared.filter((tpl) => !claimed.has(tpl.elementRef.nativeElement)).length;
762
1052
  if (stray === 0) return;
763
- console.warn(`[NGWR] <wr-table>: ${stray} of ${declared.length} projected <ng-template>(s) registered with no table directive and will be ignored. Import \`WrTableCell\` (or \`WrTableExpand\` / \`WrTableGroupHeader\`) beside \`WrTable\` in the component that declares the template.`);
1053
+ console.warn(`[NGWR] <wr-table>: ${stray} of ${declared.length} projected <ng-template>(s) registered with no table directive and will be ignored. Import \`WrTableCell\` (or \`WrTableEditCell\` / \`WrTableExpand\` / \`WrTableGroupHeader\` / \`WrTableSelectionBar\`) beside \`WrTable\` in the component that declares the template.`);
764
1054
  });
765
1055
  if (isDevMode()) {
766
1056
  const warned = /* @__PURE__ */ new Set();
@@ -784,6 +1074,36 @@ var WrTable = class WrTable {
784
1074
  console.warn("[NGWR] <wr-table>: `selectAllScope=\"all\"` cannot be combined with `total` (the table holds one page in server mode, so the select-all covers that page).");
785
1075
  });
786
1076
  }
1077
+ effect(() => {
1078
+ if (this.readerChanges() === 0) return;
1079
+ untracked(() => {
1080
+ this.emittedState = this.currentState();
1081
+ this.stateChange.emit(this.emittedState);
1082
+ });
1083
+ });
1084
+ effect(() => {
1085
+ const state = this.state();
1086
+ if (!state || state === this.emittedState) return;
1087
+ untracked(() => this.restoreState(state));
1088
+ });
1089
+ effect((onCleanup) => {
1090
+ const head = this.headEl()?.nativeElement;
1091
+ if (!head || this.selectionBar() === null || !isPlatformBrowser(this.platformId) || typeof ResizeObserver === "undefined") {
1092
+ this.selectionBarHeight.set(null);
1093
+ return;
1094
+ }
1095
+ const measure = () => this.selectionBarHeight.set(head.offsetHeight > 0 ? head.offsetHeight : null);
1096
+ const observer = new ResizeObserver(measure);
1097
+ observer.observe(head);
1098
+ measure();
1099
+ onCleanup(() => observer.disconnect());
1100
+ });
1101
+ effect(() => {
1102
+ if (this.selectionBar() !== null || !isPlatformBrowser(this.platformId)) return;
1103
+ const bar = untracked(this.selectionBarEl)?.nativeElement;
1104
+ if (!bar?.contains(bar.ownerDocument.activeElement)) return;
1105
+ afterNextRender(() => this.focusTable(), { injector: this.injector });
1106
+ });
787
1107
  effect((onCleanup) => {
788
1108
  const cells = this.headerCells();
789
1109
  const cols = this.displayColumns();
@@ -812,6 +1132,8 @@ var WrTable = class WrTable {
812
1132
  this.resizeWidths.set(/* @__PURE__ */ new Map());
813
1133
  this.fixedLayout.set(false);
814
1134
  this.virtualFixed.set(false);
1135
+ this.editHold = null;
1136
+ this.editHeld.set(false);
815
1137
  });
816
1138
  effect(() => {
817
1139
  const active = this.virtualized();
@@ -941,31 +1263,52 @@ var WrTable = class WrTable {
941
1263
  rightEdge
942
1264
  });
943
1265
  }
944
- leftPin(key) {
945
- return this.pins().left.get(key) ?? null;
946
- }
947
- rightPin(key) {
948
- return this.pins().right.get(key) ?? null;
949
- }
1266
+ cellContexts = computed(() => {
1267
+ this.cellMap();
1268
+ return new Map(this.orderedColumns().map((c) => [c.key, /* @__PURE__ */ new WeakMap()]));
1269
+ }, ...ngDevMode ? [{ debugName: "cellContexts" }] : /* istanbul ignore next */ []);
1270
+ cellColumns = computed(() => {
1271
+ const contexts = this.cellContexts();
1272
+ const pins = this.pins();
1273
+ const resized = this.resizeWidths();
1274
+ const templates = this.cellMap();
1275
+ const editors = this.editMap();
1276
+ const tableTruncate = this.truncate();
1277
+ const labelKey = this.labelColumnKey();
1278
+ const treeKey = this.treeColumnKey();
1279
+ return this.displayColumns().map(({ key, column }) => {
1280
+ const { align, pin } = column;
1281
+ const truncates = (column.truncate === void 0 ? tableTruncate : column.truncate) === "tooltip";
1282
+ const tdClass = cellClasses("wr-table__td", column);
1283
+ return {
1284
+ key,
1285
+ column,
1286
+ thClass: cellClasses("wr-table__th", column),
1287
+ tdClass: truncates ? `${tdClass} wr-table__td--truncate` : tdClass,
1288
+ footClass: align ? `wr-table__foot-cell wr-table__td--align-${align}` : "wr-table__foot-cell",
1289
+ pinned: !!pin,
1290
+ pinLeft: pin === "left",
1291
+ pinRight: pin === "right",
1292
+ edgeLeft: pins.leftEdge === key,
1293
+ edgeRight: pins.rightEdge === key,
1294
+ start: pins.left.get(key) ?? null,
1295
+ end: pins.right.get(key) ?? null,
1296
+ width: resized.get(key) ?? column.width ?? null,
1297
+ maxWidth: truncates ? column.width ?? null : null,
1298
+ label: key === labelKey,
1299
+ tree: key === treeKey,
1300
+ template: templates.get(key),
1301
+ editTemplate: column.editable === false ? void 0 : editors.get(key),
1302
+ contexts: contexts.get(key)
1303
+ };
1304
+ });
1305
+ }, ...ngDevMode ? [{ debugName: "cellColumns" }] : /* istanbul ignore next */ []);
950
1306
  hasPins = computed(() => this.displayColumns().some((c) => c.column.pin), ...ngDevMode ? [{ debugName: "hasPins" }] : /* istanbul ignore next */ []);
951
1307
  overflow = signal({
952
1308
  start: false,
953
1309
  end: false
954
1310
  }, ...ngDevMode ? [{ debugName: "overflow" }] : /* istanbul ignore next */ []);
955
- isPinEdge(key, side) {
956
- return (side === "left" ? this.pins().leftEdge : this.pins().rightEdge) === key;
957
- }
958
- thClasses(column) {
959
- return cellClasses("wr-table__th", column);
960
- }
961
- tdClasses(column) {
962
- const own = cellClasses("wr-table__td", column);
963
- return this.truncates(column) ? `${own} wr-table__td--truncate` : own;
964
- }
965
1311
  truncate = input(null, ...ngDevMode ? [{ debugName: "truncate" }] : /* istanbul ignore next */ []);
966
- truncates(column) {
967
- return (column.truncate === void 0 ? this.truncate() : column.truncate) === "tooltip";
968
- }
969
1312
  headerName(column) {
970
1313
  const { title, headerHint } = column;
971
1314
  if (!headerHint) return title;
@@ -992,9 +1335,6 @@ var WrTable = class WrTable {
992
1335
  text
993
1336
  });
994
1337
  }
995
- footClasses(column) {
996
- return column.align ? `wr-table__foot-cell wr-table__td--align-${column.align}` : "wr-table__foot-cell";
997
- }
998
1338
  rowClasses(row, index) {
999
1339
  const extra = this.rowClass()?.(row, index);
1000
1340
  return extra ? wrToClassList("wr-table__tr", extra).join(" ") : "wr-table__tr";
@@ -1005,8 +1345,19 @@ var WrTable = class WrTable {
1005
1345
  resizeStartWidth = 0;
1006
1346
  lastColumnKeys = "";
1007
1347
  fixedLayout = signal(false, ...ngDevMode ? [{ debugName: "fixedLayout" }] : /* istanbul ignore next */ []);
1008
- colWidth(key) {
1009
- return this.resizeWidths().get(key) ?? this.columns()[key]?.width ?? null;
1348
+ editHeld = signal(false, ...ngDevMode ? [{ debugName: "editHeld" }] : /* istanbul ignore next */ []);
1349
+ editHold = null;
1350
+ holdWidthsForEdit() {
1351
+ if (this.fixedLayoutActive() || !isPlatformBrowser(this.platformId)) return;
1352
+ this.editHold = this.resizeWidths();
1353
+ this.freezeColumnWidths();
1354
+ this.editHeld.set(true);
1355
+ }
1356
+ releaseEditHold() {
1357
+ if (!this.editHeld()) return;
1358
+ this.editHeld.set(false);
1359
+ if (this.editHold && !this.fixedLayout()) this.resizeWidths.set(this.editHold);
1360
+ this.editHold = null;
1010
1361
  }
1011
1362
  freezeColumnWidths() {
1012
1363
  const cols = this.displayColumns();
@@ -1098,7 +1449,7 @@ var WrTable = class WrTable {
1098
1449
  const { start, end } = this.virtualWindow();
1099
1450
  return this.renderRows().slice(start, end);
1100
1451
  }, ...ngDevMode ? [{ debugName: "windowRows" }] : /* istanbul ignore next */ []);
1101
- fixedLayoutActive = computed(() => this.fixedLayout() || this.virtualFixed(), ...ngDevMode ? [{ debugName: "fixedLayoutActive" }] : /* istanbul ignore next */ []);
1452
+ fixedLayoutActive = computed(() => this.fixedLayout() || this.virtualFixed() || this.editHeld(), ...ngDevMode ? [{ debugName: "fixedLayoutActive" }] : /* istanbul ignore next */ []);
1102
1453
  scrollToRow(index, behavior = "auto") {
1103
1454
  if (!isPlatformBrowser(this.platformId) || !this.virtualized()) return;
1104
1455
  this.scrollEl()?.nativeElement.scrollTo({
@@ -1107,15 +1458,84 @@ var WrTable = class WrTable {
1107
1458
  });
1108
1459
  }
1109
1460
  onColumnDrop(event) {
1461
+ if (this.dragCancelled) {
1462
+ this.dragCancelled = false;
1463
+ return;
1464
+ }
1110
1465
  if (event.previousIndex === event.currentIndex) return;
1111
- const order = this.displayColumns().map((c) => c.key);
1112
- moveItemInArray(order, event.previousIndex, event.currentIndex);
1113
- this.columnOrder.set(order);
1114
- }
1115
- sortPredicate = (index) => {
1466
+ const shown = this.displayColumns().map((c) => c.key);
1467
+ const slots = new Set(shown);
1468
+ moveItemInArray(shown, event.previousIndex, event.currentIndex);
1469
+ let next = 0;
1470
+ this.columnOrder.set(this.orderedColumns().map((c) => slots.has(c.key) ? shown[next++] : c.key));
1471
+ this.readerChanges.update((n) => n + 1);
1472
+ }
1473
+ sortPredicate = (index) => this.slotOpen(index);
1474
+ slotOpen(index) {
1116
1475
  const cols = this.displayColumns();
1117
1476
  return !cols[this.isRtl() ? cols.length - 1 - index : index]?.column.pin;
1118
- };
1477
+ }
1478
+ doc = inject(DOCUMENT$1);
1479
+ destroyRef = inject(DestroyRef);
1480
+ dragSlots = [];
1481
+ dragInList = false;
1482
+ dragActive = false;
1483
+ dragCancelled = false;
1484
+ stopDragCancel = null;
1485
+ dragOwn = -1;
1486
+ clearDragCursor = this.destroyRef.onDestroy(() => {
1487
+ this.stopDragCancel?.();
1488
+ if (this.dragActive) this.setDragCursor(null);
1489
+ });
1490
+ setDragCursor(state) {
1491
+ const list = this.doc.documentElement.classList;
1492
+ list.toggle("wr-table-dragging", state !== null);
1493
+ list.toggle("wr-table-dragging--allowed", state === "allowed");
1494
+ list.toggle("wr-table-dragging--blocked", state === "blocked");
1495
+ }
1496
+ onColumnDragStart(event) {
1497
+ if (!isPlatformBrowser(this.platformId) || !this.reorderable()) return;
1498
+ const source = event.source.element.nativeElement;
1499
+ const rects = this.headerCells().map((ref) => {
1500
+ const { left, right } = (ref.nativeElement === source ? event.source.getPlaceholderElement() : ref.nativeElement).getBoundingClientRect();
1501
+ return [left, right];
1502
+ });
1503
+ this.dragSlots = rects.sort((a, b) => a[0] - b[0]);
1504
+ this.dragOwn = this.headerCells().findIndex((ref) => ref.nativeElement === source);
1505
+ this.dragInList = true;
1506
+ this.dragActive = true;
1507
+ this.dragCancelled = false;
1508
+ this.setDragCursor("blocked");
1509
+ this.stopDragCancel?.();
1510
+ this.stopDragCancel = wrWatchDragCancel(this.doc, event.event, () => {
1511
+ this.dragCancelled = true;
1512
+ this.onColumnDragEnd();
1513
+ });
1514
+ }
1515
+ onColumnDragMoved(event) {
1516
+ if (!this.dragActive || !this.dragInList) return;
1517
+ const x = event.pointerPosition.x;
1518
+ const slot = this.dragSlots.findIndex(([left, right]) => x >= left && x < right);
1519
+ const own = this.isRtl() ? this.dragSlots.length - 1 - this.dragOwn : this.dragOwn;
1520
+ this.setDragCursor(slot >= 0 && slot !== own && this.slotOpen(slot) ? "allowed" : "blocked");
1521
+ }
1522
+ onColumnListSorted(event) {
1523
+ this.dragOwn = event.currentIndex;
1524
+ }
1525
+ onColumnListEntered() {
1526
+ this.dragInList = true;
1527
+ }
1528
+ onColumnListExited() {
1529
+ if (!this.dragActive) return;
1530
+ this.dragInList = false;
1531
+ this.setDragCursor("blocked");
1532
+ }
1533
+ onColumnDragEnd() {
1534
+ this.stopDragCancel?.();
1535
+ this.stopDragCancel = null;
1536
+ this.dragActive = false;
1537
+ this.setDragCursor(null);
1538
+ }
1119
1539
  rowKeyOf(row) {
1120
1540
  const rk = this.rowKey();
1121
1541
  if (typeof rk === "function") return rk(row);
@@ -1171,10 +1591,37 @@ var WrTable = class WrTable {
1171
1591
  toggleAll(checked) {
1172
1592
  this.applySelection(this.selectAllKeys(), checked);
1173
1593
  }
1594
+ selectionBarTpl = contentChild(WrTableSelectionBar, ...ngDevMode ? [{ debugName: "selectionBarTpl" }] : /* istanbul ignore next */ []);
1595
+ selectionBarEl = viewChild("selectionBarEl", ...ngDevMode ? [{ debugName: "selectionBarEl" }] : /* istanbul ignore next */ []);
1596
+ hasSelectionBar = computed(() => !!this.selectionBarTpl(), ...ngDevMode ? [{ debugName: "hasSelectionBar" }] : /* istanbul ignore next */ []);
1597
+ selectionBar = computed(() => this.selection().length > 0 ? this.selectionBarTpl()?.template ?? null : null, ...ngDevMode ? [{ debugName: "selectionBar" }] : /* istanbul ignore next */ []);
1598
+ selectionBarHeight = signal(null, ...ngDevMode ? [{ debugName: "selectionBarHeight" }] : /* istanbul ignore next */ []);
1599
+ selectionCountText = computed(() => {
1600
+ const count = this.selection().length;
1601
+ const own = this.selectedLabel();
1602
+ return own === null ? this.selectedText({ count }) : own.replace(/\{\{\s*count\s*\}\}/g, String(count));
1603
+ }, ...ngDevMode ? [{ debugName: "selectionCountText" }] : /* istanbul ignore next */ []);
1604
+ selectionContext = computed(() => ({
1605
+ $implicit: this.selectedRows(),
1606
+ count: this.selection().length,
1607
+ clear: () => this.clearSelection(),
1608
+ scope: this.selectAllScope() === "all" && this.total() === null ? "all" : "page"
1609
+ }), ...ngDevMode ? [{ debugName: "selectionContext" }] : /* istanbul ignore next */ []);
1610
+ clearSelection() {
1611
+ this.selection.set([]);
1612
+ }
1613
+ focusTable() {
1614
+ (this.hostEl.nativeElement.querySelector(".wr-table__th--select input:not(:disabled), .wr-table__td--select input:not(:disabled)") ?? this.scrollEl()?.nativeElement)?.focus();
1615
+ }
1174
1616
  expandTpl = contentChild(WrTableExpand, ...ngDevMode ? [{ debugName: "expandTpl" }] : /* istanbul ignore next */ []);
1175
1617
  treeMode = computed(() => this.childrenKey() !== null && this.groupBy() === null, ...ngDevMode ? [{ debugName: "treeMode" }] : /* istanbul ignore next */ []);
1176
1618
  expandable = computed(() => !this.treeMode() && !!this.expandTpl(), ...ngDevMode ? [{ debugName: "expandable" }] : /* istanbul ignore next */ []);
1177
- treeColumnKey = computed(() => this.treeMode() ? this.treeColumn() ?? this.displayColumns()[0]?.key ?? null : null, ...ngDevMode ? [{ debugName: "treeColumnKey" }] : /* istanbul ignore next */ []);
1619
+ treeColumnKey = computed(() => {
1620
+ if (!this.treeMode()) return null;
1621
+ const shown = this.displayColumns();
1622
+ const named = this.treeColumn();
1623
+ return named !== null && shown.some((c) => c.key === named) ? named : shown[0]?.key ?? null;
1624
+ }, ...ngDevMode ? [{ debugName: "treeColumnKey" }] : /* istanbul ignore next */ []);
1178
1625
  childrenOf(row) {
1179
1626
  const ck = this.childrenKey();
1180
1627
  if (ck === null) return [];
@@ -1310,6 +1757,199 @@ var WrTable = class WrTable {
1310
1757
  this.activeRow.set({ key: this.rowKeyOf(entry.row) });
1311
1758
  this.rowEls()[index]?.nativeElement.focus();
1312
1759
  }
1760
+ editable = input(null, ...ngDevMode ? [{ debugName: "editable" }] : /* istanbul ignore next */ []);
1761
+ cellEdit = output();
1762
+ editing = signal(null, ...ngDevMode ? [{ debugName: "editing" }] : /* istanbul ignore next */ []);
1763
+ editGrid = computed(() => {
1764
+ const editors = this.editMap();
1765
+ return editors.size > 0 && this.orderedColumns().some((c) => c.column.editable !== false && editors.has(c.key));
1766
+ }, ...ngDevMode ? [{ debugName: "editGrid" }] : /* istanbul ignore next */ []);
1767
+ dataRows = computed(() => this.windowRows().filter((entry) => entry.kind === "row"), ...ngDevMode ? [{ debugName: "dataRows" }] : /* istanbul ignore next */ []);
1768
+ activeCell = signal(null, ...ngDevMode ? [{ debugName: "activeCell" }] : /* istanbul ignore next */ []);
1769
+ tabStopCell = computed(() => {
1770
+ if (!this.editGrid() || this.treeMode()) return null;
1771
+ const rows = this.dataRows();
1772
+ const columns = this.cellColumns();
1773
+ const active = this.activeCell();
1774
+ if (active && columns.some((c) => c.key === active.key)) {
1775
+ const hit = rows.find((entry) => this.rowKeyOf(entry.row) === active.row);
1776
+ if (hit) return {
1777
+ id: hit.id,
1778
+ key: active.key
1779
+ };
1780
+ }
1781
+ return rows.length && columns.length ? {
1782
+ id: rows[0].id,
1783
+ key: columns[0].key
1784
+ } : null;
1785
+ }, ...ngDevMode ? [{ debugName: "tabStopCell" }] : /* istanbul ignore next */ []);
1786
+ cellEditable(row, col) {
1787
+ return !!col.editTemplate && (this.editable()?.(row, col.key) ?? true);
1788
+ }
1789
+ cellTabindex(entry, col) {
1790
+ if (this.treeMode()) return entry.id === this.tabStopRowId() && this.cellEditable(entry.row, col) ? 0 : -1;
1791
+ const stop = this.tabStopCell();
1792
+ return stop?.id === entry.id && stop.key === col.key ? 0 : -1;
1793
+ }
1794
+ cellAt(target) {
1795
+ const td = target instanceof Element ? target.closest(".wr-table__td") : null;
1796
+ if (td?.closest(".wr-table") !== this.hostEl.nativeElement) return null;
1797
+ const index = this.rowEls().findIndex((el) => el.nativeElement === td.parentElement);
1798
+ const entry = this.dataRows()[index];
1799
+ const col = this.cellColumns()[td.cellIndex - this.leadingCols()];
1800
+ return entry && col ? {
1801
+ td,
1802
+ row: entry.row,
1803
+ col
1804
+ } : null;
1805
+ }
1806
+ onCellFocusin(event) {
1807
+ if (!this.editGrid()) return;
1808
+ const cell = this.cellAt(event.target);
1809
+ if (cell) this.activeCell.set({
1810
+ row: this.rowKeyOf(cell.row),
1811
+ key: cell.col.key
1812
+ });
1813
+ }
1814
+ onCellDblclick(event) {
1815
+ if (!this.editGrid()) return;
1816
+ const cell = this.cellAt(event.target);
1817
+ if (cell) this.startEdit(cell.row, cell.col, cell.td);
1818
+ }
1819
+ onCellKeydown(event) {
1820
+ if (!this.editGrid() || event.defaultPrevented || wrIsComposing(event)) return;
1821
+ const edit = this.editing();
1822
+ if (edit) {
1823
+ if (edit.td.contains(event.target)) this.onEditorKeydown(event, edit);
1824
+ return;
1825
+ }
1826
+ const cell = event.target.classList.contains("wr-table__td") ? this.cellAt(event.target) : null;
1827
+ if (!cell || event.altKey || event.metaKey) return;
1828
+ const key = this.inlineKey(event.key);
1829
+ if (!event.ctrlKey && !event.shiftKey && (key === WR_KEYS.ENTER || key === "F2")) {
1830
+ if (!this.startEdit(cell.row, cell.col, cell.td)) return;
1831
+ } else if (key !== WR_KEYS.SPACE && wrIsPrintableKey(event)) {
1832
+ if (!this.startEdit(cell.row, cell.col, cell.td, event.key)) return;
1833
+ } else if (event.shiftKey || !this.moveCellFocus(cell.td, key, event.ctrlKey)) return;
1834
+ event.preventDefault();
1835
+ }
1836
+ moveCellFocus(td, key, ctrl) {
1837
+ if (ctrl && key !== WR_KEYS.HOME && key !== WR_KEYS.END) return false;
1838
+ const rows = this.rowEls().map((el) => el.nativeElement);
1839
+ const tr = td.parentElement;
1840
+ const row = rows.indexOf(tr);
1841
+ const first = this.leadingCols();
1842
+ const last = tr.cells.length - 1;
1843
+ let target;
1844
+ switch (key) {
1845
+ case WR_KEYS.ARROW_RIGHT:
1846
+ target = tr.cells[Math.min(td.cellIndex + 1, last)];
1847
+ break;
1848
+ case WR_KEYS.ARROW_LEFT:
1849
+ target = tr.cells[Math.max(td.cellIndex - 1, first)];
1850
+ break;
1851
+ case WR_KEYS.ARROW_DOWN:
1852
+ target = rows[row + 1]?.cells[td.cellIndex];
1853
+ break;
1854
+ case WR_KEYS.ARROW_UP:
1855
+ target = rows[row - 1]?.cells[td.cellIndex];
1856
+ break;
1857
+ case WR_KEYS.HOME:
1858
+ target = (ctrl ? rows[0] : tr).cells[first];
1859
+ break;
1860
+ case WR_KEYS.END:
1861
+ target = (ctrl ? rows[rows.length - 1] : tr).cells[last];
1862
+ break;
1863
+ default: return false;
1864
+ }
1865
+ target?.focus();
1866
+ return true;
1867
+ }
1868
+ onEditorKeydown(event, edit) {
1869
+ if (event.altKey || event.metaKey || event.ctrlKey) return;
1870
+ const target = event.target;
1871
+ if (event.key !== WR_KEYS.TAB && !!target.closest("[aria-expanded=\"true\"]")) return;
1872
+ if (event.key === WR_KEYS.ESCAPE) this.endEdit(false, true);
1873
+ else if (event.key === WR_KEYS.ENTER) {
1874
+ if (event.shiftKey || target.tagName === "TEXTAREA" || target.isContentEditable) return;
1875
+ this.endEdit(true, true);
1876
+ } else if (event.key === WR_KEYS.TAB) {
1877
+ this.endEdit(true, true);
1878
+ this.editableSibling(edit, event.shiftKey ? -1 : 1)?.focus();
1879
+ } else return;
1880
+ event.preventDefault();
1881
+ event.stopPropagation();
1882
+ }
1883
+ editableSibling(edit, step) {
1884
+ const columns = this.cellColumns();
1885
+ const tr = edit.td.parentElement;
1886
+ let index = columns.findIndex((c) => c.key === edit.key) + step;
1887
+ while (columns[index] && !this.cellEditable(edit.row, columns[index])) index += step;
1888
+ return columns[index] ? tr.cells[index + this.leadingCols()] : void 0;
1889
+ }
1890
+ startEdit(row, col, td, typed) {
1891
+ if (!this.cellEditable(row, col)) return false;
1892
+ const current = untracked(this.editing);
1893
+ if (current?.row === row && current.key === col.key) return true;
1894
+ this.endEdit(true, false);
1895
+ this.holdWidthsForEdit();
1896
+ const previous = row[col.key];
1897
+ const pending = signal(previous, ...ngDevMode ? [{ debugName: "pending" }] : /* istanbul ignore next */ []);
1898
+ const live = () => untracked(this.editing) === edit;
1899
+ const edit = {
1900
+ row,
1901
+ key: col.key,
1902
+ td,
1903
+ previous,
1904
+ pending,
1905
+ context: {
1906
+ get $implicit() {
1907
+ return pending();
1908
+ },
1909
+ row,
1910
+ column: col.column,
1911
+ set: (value) => pending.set(value),
1912
+ commit: (value) => {
1913
+ if (!live()) return;
1914
+ pending.set(value);
1915
+ this.endEdit(true, true, false);
1916
+ },
1917
+ cancel: () => {
1918
+ if (live()) this.endEdit(false, true);
1919
+ }
1920
+ }
1921
+ };
1922
+ this.editing.set(edit);
1923
+ afterNextRender(() => {
1924
+ if (!live()) return;
1925
+ const field = td.querySelector(EDITOR_FOCUSABLE);
1926
+ field?.focus();
1927
+ if (typed === void 0) return;
1928
+ if (field instanceof HTMLInputElement || field instanceof HTMLTextAreaElement) {
1929
+ field.value = typed;
1930
+ field.dispatchEvent(new Event("input", { bubbles: true }));
1931
+ }
1932
+ }, { injector: this.injector });
1933
+ return true;
1934
+ }
1935
+ endEdit(commit, focus, flush = commit) {
1936
+ const edit = untracked(this.editing);
1937
+ if (!edit) return;
1938
+ const active = edit.td.ownerDocument.activeElement;
1939
+ const held = active instanceof HTMLElement && active !== edit.td && edit.td.contains(active);
1940
+ if (flush && held) active.blur();
1941
+ if (untracked(this.editing) !== edit) return;
1942
+ this.editing.set(null);
1943
+ this.releaseEditHold();
1944
+ if (focus === "inside" ? held && edit.td.isConnected : focus) edit.td.focus();
1945
+ const value = untracked(edit.pending);
1946
+ if (commit && !Object.is(value, edit.previous)) this.cellEdit.emit({
1947
+ row: edit.row,
1948
+ key: edit.key,
1949
+ value,
1950
+ previous: edit.previous
1951
+ });
1952
+ }
1313
1953
  leadingCols = computed(() => (this.rowSelection() ? 1 : 0) + (this.expandable() ? 1 : 0), ...ngDevMode ? [{ debugName: "leadingCols" }] : /* istanbul ignore next */ []);
1314
1954
  totalCols = computed(() => this.displayColumns().length + this.leadingCols(), ...ngDevMode ? [{ debugName: "totalCols" }] : /* istanbul ignore next */ []);
1315
1955
  expandTemplate() {
@@ -1324,13 +1964,19 @@ var WrTable = class WrTable {
1324
1964
  const set = this.expanded();
1325
1965
  this.expanded.set(set.includes(key) ? set.filter((k) => k !== key) : [...set, key]);
1326
1966
  }
1967
+ expandContexts = /* @__PURE__ */ new WeakMap();
1327
1968
  expandContext(row) {
1328
- return {
1329
- $implicit: row,
1330
- row
1331
- };
1969
+ let context = this.expandContexts.get(row);
1970
+ if (!context) {
1971
+ context = {
1972
+ $implicit: row,
1973
+ row
1974
+ };
1975
+ this.expandContexts.set(row, context);
1976
+ }
1977
+ return context;
1332
1978
  }
1333
- hasSummary = computed(() => Object.values(this.columns()).some((col) => col.summary !== void 0), ...ngDevMode ? [{ debugName: "hasSummary" }] : /* istanbul ignore next */ []);
1979
+ hasSummary = computed(() => this.displayColumns().some((c) => c.column.summary !== void 0), ...ngDevMode ? [{ debugName: "hasSummary" }] : /* istanbul ignore next */ []);
1334
1980
  summaries = computed(() => {
1335
1981
  const rows = this.datasetRows();
1336
1982
  const map = /* @__PURE__ */ new Map();
@@ -1534,31 +2180,31 @@ var WrTable = class WrTable {
1534
2180
  direction: next
1535
2181
  };
1536
2182
  this.sort.set(list);
2183
+ this.readerChanges.update((n) => n + 1);
1537
2184
  }
1538
2185
  onFilter(key, items) {
1539
2186
  this.filterChange.emit({
1540
2187
  key,
1541
2188
  items
1542
2189
  });
2190
+ this.readerChanges.update((n) => n + 1);
1543
2191
  }
1544
- cellContext(item, key, column) {
1545
- return {
1546
- $implicit: item[key],
1547
- item,
1548
- column
1549
- };
2192
+ cellContext(item, col) {
2193
+ let context = col.contexts.get(item);
2194
+ if (!context) {
2195
+ context = new CellContext(item, col.column, col.key);
2196
+ col.contexts.set(item, context);
2197
+ }
2198
+ return context;
1550
2199
  }
1551
2200
  cellText(item, key, column) {
1552
2201
  const value = item[key];
1553
2202
  if (noValue(value)) return column.empty ?? "";
1554
2203
  return column.format ? column.format(value, item) : value;
1555
2204
  }
1556
- templateFor(key) {
1557
- return this.cellMap().get(String(key));
1558
- }
1559
2205
  static ɵfac = i0.ɵɵngDeclareFactory({
1560
2206
  minVersion: "12.0.0",
1561
- version: "22.2.5",
2207
+ version: "22.2.6",
1562
2208
  ngImport: i0,
1563
2209
  type: WrTable,
1564
2210
  deps: [],
@@ -1566,7 +2212,7 @@ var WrTable = class WrTable {
1566
2212
  });
1567
2213
  static ɵcmp = i0.ɵɵngDeclareComponent({
1568
2214
  minVersion: "17.0.0",
1569
- version: "22.2.5",
2215
+ version: "22.2.6",
1570
2216
  type: WrTable,
1571
2217
  isStandalone: true,
1572
2218
  selector: "wr-table",
@@ -1620,6 +2266,20 @@ var WrTable = class WrTable {
1620
2266
  isRequired: false,
1621
2267
  transformFunction: null
1622
2268
  },
2269
+ hiddenColumns: {
2270
+ classPropertyName: "hiddenColumns",
2271
+ publicName: "hiddenColumns",
2272
+ isSignal: true,
2273
+ isRequired: false,
2274
+ transformFunction: null
2275
+ },
2276
+ columnChooser: {
2277
+ classPropertyName: "columnChooser",
2278
+ publicName: "columnChooser",
2279
+ isSignal: true,
2280
+ isRequired: false,
2281
+ transformFunction: null
2282
+ },
1623
2283
  rowSelection: {
1624
2284
  classPropertyName: "rowSelection",
1625
2285
  publicName: "rowSelection",
@@ -1774,6 +2434,34 @@ var WrTable = class WrTable {
1774
2434
  isRequired: false,
1775
2435
  transformFunction: null
1776
2436
  },
2437
+ selectedLabel: {
2438
+ classPropertyName: "selectedLabel",
2439
+ publicName: "selectedLabel",
2440
+ isSignal: true,
2441
+ isRequired: false,
2442
+ transformFunction: null
2443
+ },
2444
+ clearSelectionLabel: {
2445
+ classPropertyName: "clearSelectionLabel",
2446
+ publicName: "clearSelectionLabel",
2447
+ isSignal: true,
2448
+ isRequired: false,
2449
+ transformFunction: null
2450
+ },
2451
+ columnsLabel: {
2452
+ classPropertyName: "columnsLabel",
2453
+ publicName: "columnsLabel",
2454
+ isSignal: true,
2455
+ isRequired: false,
2456
+ transformFunction: null
2457
+ },
2458
+ state: {
2459
+ classPropertyName: "state",
2460
+ publicName: "state",
2461
+ isSignal: true,
2462
+ isRequired: false,
2463
+ transformFunction: null
2464
+ },
1777
2465
  pageSize: {
1778
2466
  classPropertyName: "pageSize",
1779
2467
  publicName: "pageSize",
@@ -1850,18 +2538,28 @@ var WrTable = class WrTable {
1850
2538
  isSignal: true,
1851
2539
  isRequired: false,
1852
2540
  transformFunction: null
2541
+ },
2542
+ editable: {
2543
+ classPropertyName: "editable",
2544
+ publicName: "editable",
2545
+ isSignal: true,
2546
+ isRequired: false,
2547
+ transformFunction: null
1853
2548
  }
1854
2549
  },
1855
2550
  outputs: {
1856
2551
  columnOrder: "columnOrderChange",
2552
+ hiddenColumns: "hiddenColumnsChange",
1857
2553
  selection: "selectionChange",
1858
2554
  expanded: "expandedChange",
1859
2555
  collapsedGroups: "collapsedGroupsChange",
1860
2556
  sort: "sortChange",
1861
2557
  filterChange: "filterChange",
2558
+ stateChange: "stateChange",
1862
2559
  rowClick: "rowClick",
1863
2560
  pageSizeChange: "pageSizeChange",
1864
- page: "pageChange"
2561
+ page: "pageChange",
2562
+ cellEdit: "cellEdit"
1865
2563
  },
1866
2564
  host: {
1867
2565
  listeners: {
@@ -1875,6 +2573,7 @@ var WrTable = class WrTable {
1875
2573
  "class.wr-table--fill": "fillsParent()",
1876
2574
  "class.wr-table--overflow-start": "overflow().start",
1877
2575
  "class.wr-table--overflow-end": "overflow().end",
2576
+ "class.wr-table--selection-bar": "selectionBar() !== null",
1878
2577
  "attr.aria-busy": "loading() ? true : null"
1879
2578
  },
1880
2579
  classAttribute: "wr-table"
@@ -1885,11 +2584,23 @@ var WrTable = class WrTable {
1885
2584
  predicate: WrTableCell,
1886
2585
  isSignal: true
1887
2586
  },
2587
+ {
2588
+ propertyName: "editTemplates",
2589
+ predicate: WrTableEditCell,
2590
+ isSignal: true
2591
+ },
1888
2592
  {
1889
2593
  propertyName: "projectedTemplates",
1890
2594
  predicate: TemplateRef,
1891
2595
  isSignal: true
1892
2596
  },
2597
+ {
2598
+ propertyName: "selectionBarTpl",
2599
+ first: true,
2600
+ predicate: WrTableSelectionBar,
2601
+ descendants: true,
2602
+ isSignal: true
2603
+ },
1893
2604
  {
1894
2605
  propertyName: "expandTpl",
1895
2606
  first: true,
@@ -1933,6 +2644,13 @@ var WrTable = class WrTable {
1933
2644
  descendants: true,
1934
2645
  isSignal: true
1935
2646
  },
2647
+ {
2648
+ propertyName: "selectionBarEl",
2649
+ first: true,
2650
+ predicate: ["selectionBarEl"],
2651
+ descendants: true,
2652
+ isSignal: true
2653
+ },
1936
2654
  {
1937
2655
  propertyName: "rowEls",
1938
2656
  predicate: ["rowEl"],
@@ -1941,7 +2659,7 @@ var WrTable = class WrTable {
1941
2659
  }
1942
2660
  ],
1943
2661
  ngImport: i0,
1944
- template: "@switch (loadingForm()) {\n @case ('overlay') {\n <div class=\"wr-table__loading\" role=\"status\" [attr.aria-label]=\"resolvedLoadingLabel()\">\n <wr-spinner size=\"lg\" />\n </div>\n }\n @case ('bar') {\n <div class=\"wr-table__loading-bar\" role=\"status\" [attr.aria-label]=\"resolvedLoadingLabel()\"></div>\n }\n}\n\n<div\n class=\"wr-table__scroll\"\n #scroll\n [style.--wr-table-scroll-height]=\"scrollHeight()\"\n [style.--wr-table-head-height.px]=\"stickyEdges().head\"\n [style.--wr-table-foot-height.px]=\"stickyEdges().foot\"\n [attr.tabindex]=\"scrollable() ? 0 : null\"\n>\n <table\n class=\"wr-table__table\"\n [class.wr-table__table--fixed]=\"fixedLayoutActive()\"\n [style.--wr-table-row-h.px]=\"virtualized() ? effRowH() : null\"\n [attr.aria-rowcount]=\"virtualized() ? renderRows().length + 1 + (hasSummary() && items()?.length ? 1 : 0) : null\"\n [attr.role]=\"treeMode() ? 'treegrid' : null\"\n [attr.aria-multiselectable]=\"treeMode() && rowSelection() === 'multiple' ? true : null\"\n >\n <colgroup>\n @if (rowSelection()) {\n <col class=\"wr-table__col--lead\" />\n }\n @if (expandable()) {\n <col class=\"wr-table__col--lead\" />\n }\n @for (col of displayColumns(); track col.key) {\n <col [style.width.px]=\"colWidth(col.key)\" />\n }\n </colgroup>\n <thead #head>\n <tr\n cdkDropList\n cdkDropListOrientation=\"horizontal\"\n [cdkDropListSortPredicate]=\"sortPredicate\"\n (cdkDropListDropped)=\"onColumnDrop($event)\"\n >\n @if (rowSelection()) {\n <th class=\"wr-table__th wr-table__th--select\">\n @if (rowSelection() === 'multiple') {\n <!-- Disabled with nothing to sweep, the way `wr-transfer` guards its\n own select-all. `[checked]` is a one-way binding over a checkbox\n that owns its state, and on zero rows `allSelected()` answers\n `false` before and after the click — an unchanged input is never\n written back, so the box latched CHECKED over an empty table and\n stayed that way when rows returned. -->\n <wr-checkbox\n size=\"sm\"\n [checked]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n [disabled]=\"selectAllKeys().size === 0\"\n (checkedChange)=\"toggleAll($event)\"\n [ariaLabel]=\"resolvedSelectAllLabel()\"\n />\n }\n </th>\n }\n @if (expandable()) {\n <th class=\"wr-table__th wr-table__th--expand\"></th>\n }\n @for (col of displayColumns(); track col.key) {\n <th\n #thCell\n cdkDrag\n [cdkDragDisabled]=\"!reorderable() || !!col.column.pin\"\n [class]=\"thClasses(col.column)\"\n [attr.aria-sort]=\"ariaSortFor(col.key, col.column.sortable)\"\n [attr.aria-label]=\"col.column.title ? null : (col.column.headerHint ?? null)\"\n [class.wr-table__th--draggable]=\"reorderable() && !col.column.pin\"\n [class.wr-table__th--pin-left]=\"col.column.pin === 'left'\"\n [class.wr-table__th--pin-right]=\"col.column.pin === 'right'\"\n [class.wr-table__th--pin-edge-left]=\"isPinEdge(col.key, 'left')\"\n [class.wr-table__th--pin-edge-right]=\"isPinEdge(col.key, 'right')\"\n [style.inset-inline-start.px]=\"leftPin(col.key)\"\n [style.inset-inline-end.px]=\"rightPin(col.key)\"\n >\n <div class=\"wr-table__th-inner\">\n <span class=\"wr-table__title\">{{ col.column.title }}</span>\n\n @if (col.column.sortable) {\n <button\n type=\"button\"\n class=\"wr-table__sort-btn\"\n [attr.aria-label]=\"sortLabelFor(headerName(col.column))\"\n (click)=\"cycleSort(col.key)\"\n >\n <wr-table-sort [direction]=\"directionFor(col.key)\" />\n </button>\n <!-- A column's place in a multi-column sort. Drawn, because only the\n primary key announces `aria-sort` (see ariaSortFor). Beside the\n button rather than in it: inside, the digit is visible text the\n button's name (\"Sort Role\") does not contain, which is a WCAG\n 2.5.3 label-in-name failure. Hidden, so the column header's own\n name stays its title. -->\n @if (sortOrderFor(col.key); as order) {\n <span class=\"wr-table__sort-order\" aria-hidden=\"true\">{{ order }}</span>\n }\n }\n\n @if (col.column.filterItems; as filterItems) {\n @if (filterItems.length) {\n <wr-table-filter\n [items]=\"filterItems\"\n [column]=\"headerName(col.column)\"\n (selectionChange)=\"onFilter(col.key, $event)\"\n />\n }\n }\n </div>\n\n @if (col.column.resizable) {\n <span\n class=\"wr-table__resize-handle\"\n aria-hidden=\"true\"\n (pointerdown)=\"onResizeStart($event, col.key, thCell)\"\n (pointermove)=\"onResizeMove($event)\"\n (pointerup)=\"onResizeEnd($event)\"\n (pointercancel)=\"onResizeEnd($event)\"\n (mousedown)=\"$event.stopPropagation()\"\n (touchstart)=\"$event.stopPropagation()\"\n ></span>\n }\n </th>\n }\n </tr>\n </thead>\n\n <!-- One delegated listener for `rowClick`, which is pointer only by contract:\n the body is no control, and a row's keyboard path is the consumer's own\n button or link in a cell. -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events,@angular-eslint/template/interactive-supports-focus -->\n <tbody (click)=\"onBodyClick($event)\">\n @if (visibleItems()) {\n @if (virtualized() && virtualWindow().padTop > 0) {\n <tr class=\"wr-table__spacer\" aria-hidden=\"true\">\n <td [attr.colspan]=\"totalCols()\" [style.height.px]=\"virtualWindow().padTop\"></td>\n </tr>\n }\n @for (entry of windowRows(); track entry.id; let i = $index) {\n @if (entry.kind === 'group') {\n <tr class=\"wr-table__group-row\" [class.wr-table__group-row--collapsed]=\"entry.group.collapsed\">\n <td class=\"wr-table__group-cell\" [attr.colspan]=\"totalCols()\">\n <!-- The cell spans the full table width; this inner box is what sticks. -->\n <div class=\"wr-table__group-inner\">\n @if (rowSelection() === 'multiple') {\n <wr-checkbox\n class=\"wr-table__group-select\"\n size=\"sm\"\n [checked]=\"groupChecked(entry.group.rows)\"\n [indeterminate]=\"groupIndeterminate(entry.group.rows)\"\n (checkedChange)=\"toggleGroupSelection(entry.group.rows, $event)\"\n [ariaLabelledby]=\"groupControlLabelledby('select-group', entry.id)\"\n />\n }\n @if (groupTemplate(); as tpl) {\n <button\n type=\"button\"\n class=\"wr-table__group-toggle wr-table__group-toggle--icon\"\n [attr.aria-expanded]=\"!entry.group.collapsed\"\n [attr.aria-labelledby]=\"groupControlLabelledby('toggle-group', entry.id)\"\n (click)=\"toggleGroupCollapse(entry.group.value)\"\n >\n <svg\n class=\"wr-icon__svg wr-table__group-icon\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n </button>\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"entry.group\" />\n <!-- The group's name for the two controls above. A custom header\n is the consumer's markup, with nothing in it to point at. -->\n <span hidden [id]=\"groupLabelId(entry.id)\">{{ entry.group.label }}</span>\n } @else {\n <button\n type=\"button\"\n class=\"wr-table__group-toggle\"\n [attr.aria-expanded]=\"!entry.group.collapsed\"\n [attr.aria-labelledby]=\"groupToggleLabelledby(entry.id)\"\n (click)=\"toggleGroupCollapse(entry.group.value)\"\n >\n <svg\n class=\"wr-icon__svg wr-table__group-icon\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n <span class=\"wr-table__group-label\" [id]=\"groupLabelId(entry.id)\">{{ entry.group.label }}</span>\n @if (showGroupCount()) {\n <!-- A real space between the label and the count. Whitespace\n alone draws nothing in a flex row, and without it the\n button's text reads \"admin2\" — which the name\n \"Toggle group admin 2\" does not contain, a label-in-name\n mismatch for any tool that compares the two. -->\n &ngsp;<span class=\"wr-table__group-count\" [id]=\"groupCountId(entry.id)\">{{\n entry.group.count\n }}</span>\n }\n </button>\n }\n </div>\n </td>\n </tr>\n } @else if (entry.kind === 'group-foot') {\n <tr class=\"wr-table__group-foot-row\">\n @if (rowSelection()) {\n <td class=\"wr-table__foot-cell wr-table__foot-cell--lead\"></td>\n }\n @if (expandable()) {\n <td class=\"wr-table__foot-cell wr-table__foot-cell--lead\"></td>\n }\n @for (col of displayColumns(); track col.key) {\n <td\n [class]=\"footClasses(col.column)\"\n [class.wr-table__td--pin-left]=\"col.column.pin === 'left'\"\n [class.wr-table__td--pin-right]=\"col.column.pin === 'right'\"\n [class.wr-table__td--pin-edge-left]=\"isPinEdge(col.key, 'left')\"\n [class.wr-table__td--pin-edge-right]=\"isPinEdge(col.key, 'right')\"\n [style.inset-inline-start.px]=\"leftPin(col.key)\"\n [style.inset-inline-end.px]=\"rightPin(col.key)\"\n >\n {{ entry.summaries.get(col.key) ?? '' }}\n </td>\n }\n </tr>\n } @else {\n <tr\n #rowEl\n [class]=\"rowClasses(entry.row, i)\"\n [class.wr-table__tr--selected]=\"rowSelection() && isRowSelected(entry.row)\"\n [class.wr-table__tr--child]=\"entry.depth > 0\"\n [attr.aria-rowindex]=\"virtualized() ? windowStart() + i + 2 : null\"\n [attr.aria-level]=\"treeMode() ? entry.depth + 1 : null\"\n [attr.aria-posinset]=\"treeMode() ? entry.posinset : null\"\n [attr.aria-setsize]=\"treeMode() ? entry.setsize : null\"\n [attr.aria-expanded]=\"entry.open\"\n [attr.aria-selected]=\"treeMode() && rowSelection() ? isRowSelected(entry.row) : null\"\n [attr.tabindex]=\"treeMode() ? (entry.id === tabStopRowId() ? 0 : -1) : null\"\n [style.--wr-table-depth]=\"treeMode() ? entry.depth : null\"\n >\n @if (rowSelection()) {\n <td class=\"wr-table__td wr-table__td--select\">\n <wr-checkbox\n size=\"sm\"\n [checked]=\"isRowSelected(entry.row)\"\n (checkedChange)=\"toggleRow(entry.row, $event)\"\n [ariaLabelledby]=\"rowControlLabelledby('select-row', entry.id)\"\n />\n </td>\n }\n @if (expandable()) {\n <td class=\"wr-table__td wr-table__td--expand\">\n <button\n type=\"button\"\n class=\"wr-table__expand-btn\"\n [class.wr-table__expand-btn--open]=\"isExpanded(entry.row)\"\n [attr.aria-expanded]=\"isExpanded(entry.row)\"\n [attr.aria-labelledby]=\"rowControlLabelledby('expand-row', entry.id)\"\n (click)=\"toggleExpand(entry.row)\"\n >\n <svg\n class=\"wr-icon__svg wr-table__expand-icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n </button>\n </td>\n }\n @for (col of displayColumns(); track col.key) {\n <td\n [class]=\"tdClasses(col.column)\"\n [class.wr-table__td--pin-left]=\"col.column.pin === 'left'\"\n [class.wr-table__td--pin-right]=\"col.column.pin === 'right'\"\n [class.wr-table__td--pin-edge-left]=\"isPinEdge(col.key, 'left')\"\n [class.wr-table__td--pin-edge-right]=\"isPinEdge(col.key, 'right')\"\n [style.inset-inline-start.px]=\"leftPin(col.key)\"\n [style.inset-inline-end.px]=\"rightPin(col.key)\"\n [style.max-width.px]=\"truncates(col.column) ? (col.column.width ?? null) : null\"\n [attr.data-label]=\"col.column.title\"\n [attr.id]=\"col.key === labelColumnKey() ? rowLabelId(entry.id) : null\"\n >\n @if (treeMode() && col.key === treeColumnKey()) {\n <span class=\"wr-table__tree-lead\">\n @if (entry.parent) {\n <button\n type=\"button\"\n class=\"wr-table__tree-toggle\"\n [class.wr-table__tree-toggle--open]=\"entry.open\"\n [attr.aria-expanded]=\"entry.open\"\n [attr.aria-labelledby]=\"rowControlLabelledby('toggle-row', entry.id)\"\n (click)=\"toggleTreeRow(entry.row)\"\n >\n <svg\n class=\"wr-icon__svg wr-table__tree-icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n </button>\n } @else {\n <span class=\"wr-table__tree-toggle wr-table__tree-toggle--leaf\" aria-hidden=\"true\"></span>\n }\n </span>\n }\n @if (templateFor(col.key); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"cellContext(entry.row, col.key, col.column)\"\n />\n } @else {\n {{ cellText(entry.row, col.key, col.column) }}\n }\n </td>\n }\n </tr>\n @if (expandable() && isExpanded(entry.row)) {\n <tr class=\"wr-table__detail-row\">\n <td class=\"wr-table__detail\" [attr.colspan]=\"totalCols()\">\n <ng-container\n [ngTemplateOutlet]=\"expandTemplate() ?? null\"\n [ngTemplateOutletContext]=\"expandContext(entry.row)\"\n />\n </td>\n </tr>\n }\n }\n }\n @if (virtualized() && virtualWindow().padBottom > 0) {\n <tr class=\"wr-table__spacer\" aria-hidden=\"true\">\n <td [attr.colspan]=\"totalCols()\" [style.height.px]=\"virtualWindow().padBottom\"></td>\n </tr>\n }\n }\n <!-- Sibling of the row loop rather than its `@empty` branch, and gated on\n `loading()`. As the `@empty` branch it lived INSIDE `@if (visibleItems())`,\n which passes a nullish `[items]` straight through — so the input's own\n default rendered a header over a blank body with no \"No data\" anywhere,\n the opposite of what `items`'s docs promise. And the veil is translucent,\n so on the documented `[items]=\"[]\" [loading]=\"true\"` pair the row read\n \"No data\" through the spinner. -->\n @if (!loading() && !renderRows().length) {\n <tr>\n <td class=\"wr-table__empty\" [attr.colspan]=\"totalCols()\">{{ resolvedEmptyLabel() }}</td>\n </tr>\n }\n </tbody>\n\n @if (hasSummary() && items()?.length) {\n <tfoot #foot>\n <tr class=\"wr-table__foot-row\">\n @if (rowSelection()) {\n <td class=\"wr-table__foot-cell wr-table__foot-cell--lead\"></td>\n }\n @if (expandable()) {\n <td class=\"wr-table__foot-cell wr-table__foot-cell--lead\"></td>\n }\n @for (col of displayColumns(); track col.key) {\n <td\n [class]=\"footClasses(col.column)\"\n [class.wr-table__td--pin-left]=\"col.column.pin === 'left'\"\n [class.wr-table__td--pin-right]=\"col.column.pin === 'right'\"\n [class.wr-table__td--pin-edge-left]=\"isPinEdge(col.key, 'left')\"\n [class.wr-table__td--pin-edge-right]=\"isPinEdge(col.key, 'right')\"\n [style.inset-inline-start.px]=\"leftPin(col.key)\"\n [style.inset-inline-end.px]=\"rightPin(col.key)\"\n >\n {{ summaryFor(col.key) }}\n </td>\n }\n </tr>\n </tfoot>\n }\n </table>\n</div>\n\n@if (showPager()) {\n <div class=\"wr-table__pager\">\n <wr-pagination\n [(page)]=\"page\"\n [pageSize]=\"currentPageSize()\"\n (pageSizeChange)=\"onPageSizeChange($event)\"\n [total]=\"resolvedTotal()\"\n [size]=\"paginationSize()\"\n [showSizeChanger]=\"pageSizeOptions().length > 0\"\n [pageSizeOptions]=\"pageSizeOptions()\"\n />\n </div>\n}\n\n<!-- The table's one tooltip, for a header hint or a cut cell (see `tip`). -->\n@if (tip(); as shown) {\n <span hidden [wrPopover]=\"shown.text\" mode=\"tooltip\" [wrPopoverOrigin]=\"shown.el\"></span>\n}\n\n<!-- The action words the row and group controls are named with, once per table.\n `aria-labelledby` reads a hidden element it points at, so each control joins\n one of these to its own row's (or group's) label. Only the words a control\n in this table uses are rendered. -->\n@if (rowSelection() || expandable() || treeMode() || groupBy() !== null) {\n <div hidden>\n @if (rowSelection()) {\n <span [id]=\"actionId('select-row')\">{{ resolvedSelectRowLabel() }}</span>\n }\n @if (expandable()) {\n <span [id]=\"actionId('expand-row')\">{{ resolvedExpandRowLabel() }}</span>\n }\n @if (treeMode()) {\n <span [id]=\"actionId('toggle-row')\">{{ resolvedToggleRowLabel() }}</span>\n }\n @if (groupBy() !== null) {\n @if (rowSelection() === 'multiple') {\n <span [id]=\"actionId('select-group')\">{{ resolvedSelectGroupLabel() }}</span>\n }\n <span [id]=\"actionId('toggle-group')\">{{ resolvedToggleGroupLabel() }}</span>\n }\n </div>\n}\n",
2662
+ template: "@switch (loadingForm()) {\n @case ('overlay') {\n <div class=\"wr-table__loading\" role=\"status\" [attr.aria-label]=\"resolvedLoadingLabel()\">\n <wr-spinner size=\"lg\" />\n </div>\n }\n @case ('bar') {\n <div class=\"wr-table__loading-bar\" role=\"status\" [attr.aria-label]=\"resolvedLoadingLabel()\"></div>\n }\n}\n\n@if (columnChooser()) {\n <div class=\"wr-table__toolbar\">\n <button\n wr-btn\n type=\"button\"\n size=\"sm\"\n outlined\n class=\"wr-table__columns-btn\"\n position=\"bottom-end\"\n [wrPopover]=\"chooser\"\n [ariaLabel]=\"resolvedColumnsLabel()\"\n >\n {{ resolvedColumnsLabel() }}\n </button>\n <ng-template #chooser>\n <div class=\"wr-table__columns\">\n @for (entry of chooserColumns(); track entry.key) {\n <wr-checkbox\n class=\"wr-table__columns-item\"\n size=\"sm\"\n [checked]=\"entry.visible\"\n [disabled]=\"entry.locked\"\n (checkedChange)=\"setColumnVisible(entry.key, $event)\"\n >{{ entry.title }}</wr-checkbox\n >\n }\n </div>\n </ng-template>\n </div>\n}\n\n<!-- The selection bar lies over the header: a box of no height in front of\n the scroll area, so the bar stays put while the columns scroll under it.\n The count is announced from a region that is in the DOM before it has\n anything to say, and the drawn copy is hidden from it. -->\n@if (hasSelectionBar()) {\n <div class=\"wr-table__selection\">\n <span class=\"wr-table__selection-status\" role=\"status\">{{ selectionBar() ? selectionCountText() : '' }}</span>\n @if (selectionBar(); as tpl) {\n <div\n #selectionBarEl\n class=\"wr-table__selection-bar\"\n [class.wr-table__selection-bar--inset]=\"rowSelection() === 'multiple'\"\n [style.--wr-table-selection-bar-height.px]=\"selectionBarHeight()\"\n >\n <span class=\"wr-table__selection-count\" aria-hidden=\"true\">{{ selectionCountText() }}</span>\n <button wr-btn type=\"button\" size=\"sm\" class=\"wr-table__selection-clear\" (click)=\"clearSelection()\">\n {{ resolvedClearSelectionLabel() }}\n </button>\n <div class=\"wr-table__selection-actions\">\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"selectionContext()\" />\n </div>\n </div>\n }\n </div>\n}\n\n<!-- With a selection bar the scroll area takes focus from script, for the bar\n to hand it to when it leaves a table that has no checkbox to take it. -->\n<div\n class=\"wr-table__scroll\"\n #scroll\n [style.--wr-table-scroll-height]=\"scrollHeight()\"\n [style.--wr-table-head-height.px]=\"stickyEdges().head\"\n [style.--wr-table-foot-height.px]=\"stickyEdges().foot\"\n [attr.tabindex]=\"scrollable() ? 0 : hasSelectionBar() ? -1 : null\"\n>\n <table\n class=\"wr-table__table\"\n [class.wr-table__table--fixed]=\"fixedLayoutActive()\"\n [style.--wr-table-row-h.px]=\"virtualized() ? effRowH() : null\"\n [attr.aria-rowcount]=\"virtualized() ? renderRows().length + 1 + (hasSummary() && items()?.length ? 1 : 0) : null\"\n [attr.role]=\"treeMode() ? 'treegrid' : editGrid() ? 'grid' : null\"\n [attr.aria-multiselectable]=\"treeMode() && rowSelection() === 'multiple' ? true : null\"\n >\n <colgroup>\n @if (rowSelection()) {\n <col class=\"wr-table__col--lead\" />\n }\n @if (expandable()) {\n <col class=\"wr-table__col--lead\" />\n }\n @for (col of cellColumns(); track col.key) {\n <col [style.width.px]=\"col.width\" />\n }\n </colgroup>\n <thead #head>\n <tr\n cdkDropList\n cdkDropListOrientation=\"horizontal\"\n [cdkDropListSortPredicate]=\"sortPredicate\"\n (cdkDropListDropped)=\"onColumnDrop($event)\"\n (cdkDropListSorted)=\"onColumnListSorted($event)\"\n (cdkDropListEntered)=\"onColumnListEntered()\"\n (cdkDropListExited)=\"onColumnListExited()\"\n >\n @if (rowSelection()) {\n <th class=\"wr-table__th wr-table__th--select\">\n @if (rowSelection() === 'multiple') {\n <!-- Disabled with nothing to sweep, the way `wr-transfer` guards its\n own select-all. `[checked]` is a one-way binding over a checkbox\n that owns its state, and on zero rows `allSelected()` answers\n `false` before and after the click — an unchanged input is never\n written back, so the box latched CHECKED over an empty table and\n stayed that way when rows returned. -->\n <wr-checkbox\n size=\"sm\"\n [checked]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n [disabled]=\"selectAllKeys().size === 0\"\n (checkedChange)=\"toggleAll($event)\"\n [ariaLabel]=\"resolvedSelectAllLabel()\"\n />\n }\n </th>\n }\n @if (expandable()) {\n <th class=\"wr-table__th wr-table__th--expand\"></th>\n }\n <!-- `inert` under the selection bar: a control the bar covers takes no\n focus and no click. The select-all cell stays out from under it. -->\n @for (col of cellColumns(); track col.key) {\n <th\n #thCell\n cdkDrag\n [attr.inert]=\"selectionBar() ? '' : null\"\n [cdkDragDisabled]=\"!reorderable() || col.pinned\"\n (cdkDragStarted)=\"onColumnDragStart($event)\"\n (cdkDragMoved)=\"onColumnDragMoved($event)\"\n (cdkDragEnded)=\"onColumnDragEnd()\"\n [class]=\"col.thClass\"\n [attr.aria-sort]=\"ariaSortFor(col.key, col.column.sortable)\"\n [attr.aria-label]=\"col.column.title ? null : (col.column.headerHint ?? null)\"\n [class.wr-table__th--draggable]=\"reorderable() && !col.pinned\"\n [class.wr-table__th--pin-left]=\"col.pinLeft\"\n [class.wr-table__th--pin-right]=\"col.pinRight\"\n [class.wr-table__th--pin-edge-left]=\"col.edgeLeft\"\n [class.wr-table__th--pin-edge-right]=\"col.edgeRight\"\n [style.inset-inline-start.px]=\"col.start\"\n [style.inset-inline-end.px]=\"col.end\"\n >\n <div class=\"wr-table__th-inner\">\n <span class=\"wr-table__title\">{{ col.column.title }}</span>\n\n @if (col.column.sortable) {\n <button\n type=\"button\"\n class=\"wr-table__sort-btn\"\n [attr.aria-label]=\"sortLabelFor(headerName(col.column))\"\n (click)=\"cycleSort(col.key)\"\n >\n <wr-table-sort [direction]=\"directionFor(col.key)\" />\n </button>\n <!-- A column's place in a multi-column sort. Drawn, because only the\n primary key announces `aria-sort` (see ariaSortFor). Beside the\n button rather than in it: inside, the digit is visible text the\n button's name (\"Sort Role\") does not contain, which is a WCAG\n 2.5.3 label-in-name failure. Hidden, so the column header's own\n name stays its title. -->\n @if (sortOrderFor(col.key); as order) {\n <span class=\"wr-table__sort-order\" aria-hidden=\"true\">{{ order }}</span>\n }\n }\n\n @if (col.column.filterItems; as filterItems) {\n @if (filterItems.length) {\n <wr-table-filter\n [items]=\"filterItems\"\n [column]=\"headerName(col.column)\"\n (selectionChange)=\"onFilter(col.key, $event)\"\n />\n }\n }\n </div>\n\n @if (col.column.resizable) {\n <span\n class=\"wr-table__resize-handle\"\n aria-hidden=\"true\"\n (pointerdown)=\"onResizeStart($event, col.key, thCell)\"\n (pointermove)=\"onResizeMove($event)\"\n (pointerup)=\"onResizeEnd($event)\"\n (pointercancel)=\"onResizeEnd($event)\"\n (mousedown)=\"$event.stopPropagation()\"\n (touchstart)=\"$event.stopPropagation()\"\n ></span>\n }\n </th>\n }\n </tr>\n </thead>\n\n <!-- One delegated listener for `rowClick`, which is pointer only by contract:\n the body is no control, and a row's keyboard path is the consumer's own\n button or link in a cell. The other three serve inline editing and\n return at once in a table with no edit template. -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <tbody\n (click)=\"onBodyClick($event)\"\n (dblclick)=\"onCellDblclick($event)\"\n (keydown)=\"onCellKeydown($event)\"\n (focusin)=\"onCellFocusin($event)\"\n >\n @if (visibleItems()) {\n @if (virtualized() && virtualWindow().padTop > 0) {\n <tr class=\"wr-table__spacer\" aria-hidden=\"true\">\n <td [attr.colspan]=\"totalCols()\" [style.height.px]=\"virtualWindow().padTop\"></td>\n </tr>\n }\n @let edit = editing();\n @for (entry of windowRows(); track entry.id; let i = $index) {\n @if (entry.kind === 'group') {\n <tr class=\"wr-table__group-row\" [class.wr-table__group-row--collapsed]=\"entry.group.collapsed\">\n <td class=\"wr-table__group-cell\" [attr.colspan]=\"totalCols()\">\n <!-- The cell spans the full table width; this inner box is what sticks. -->\n <div class=\"wr-table__group-inner\">\n @if (rowSelection() === 'multiple') {\n <wr-checkbox\n class=\"wr-table__group-select\"\n size=\"sm\"\n [checked]=\"groupChecked(entry.group.rows)\"\n [indeterminate]=\"groupIndeterminate(entry.group.rows)\"\n (checkedChange)=\"toggleGroupSelection(entry.group.rows, $event)\"\n [ariaLabelledby]=\"groupControlLabelledby('select-group', entry.id)\"\n />\n }\n @if (groupTemplate(); as tpl) {\n <button\n type=\"button\"\n class=\"wr-table__group-toggle wr-table__group-toggle--icon\"\n [attr.aria-expanded]=\"!entry.group.collapsed\"\n [attr.aria-labelledby]=\"groupControlLabelledby('toggle-group', entry.id)\"\n (click)=\"toggleGroupCollapse(entry.group.value)\"\n >\n <svg\n class=\"wr-icon__svg wr-table__group-icon\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n </button>\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"entry.group\" />\n <!-- The group's name for the two controls above. A custom header\n is the consumer's markup, with nothing in it to point at. -->\n <span hidden [id]=\"groupLabelId(entry.id)\">{{ entry.group.label }}</span>\n } @else {\n <button\n type=\"button\"\n class=\"wr-table__group-toggle\"\n [attr.aria-expanded]=\"!entry.group.collapsed\"\n [attr.aria-labelledby]=\"groupToggleLabelledby(entry.id)\"\n (click)=\"toggleGroupCollapse(entry.group.value)\"\n >\n <svg\n class=\"wr-icon__svg wr-table__group-icon\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n <span class=\"wr-table__group-label\" [id]=\"groupLabelId(entry.id)\">{{ entry.group.label }}</span>\n @if (showGroupCount()) {\n <!-- A real space between the label and the count. Whitespace\n alone draws nothing in a flex row, and without it the\n button's text reads \"admin2\" — which the name\n \"Toggle group admin 2\" does not contain, a label-in-name\n mismatch for any tool that compares the two. -->\n &ngsp;<span class=\"wr-table__group-count\" [id]=\"groupCountId(entry.id)\">{{\n entry.group.count\n }}</span>\n }\n </button>\n }\n </div>\n </td>\n </tr>\n } @else if (entry.kind === 'group-foot') {\n <tr class=\"wr-table__group-foot-row\">\n @if (rowSelection()) {\n <td class=\"wr-table__foot-cell wr-table__foot-cell--lead\"></td>\n }\n @if (expandable()) {\n <td class=\"wr-table__foot-cell wr-table__foot-cell--lead\"></td>\n }\n @for (col of cellColumns(); track col.key) {\n <td\n [class]=\"col.footClass\"\n [class.wr-table__td--pin-left]=\"col.pinLeft\"\n [class.wr-table__td--pin-right]=\"col.pinRight\"\n [class.wr-table__td--pin-edge-left]=\"col.edgeLeft\"\n [class.wr-table__td--pin-edge-right]=\"col.edgeRight\"\n [style.inset-inline-start.px]=\"col.start\"\n [style.inset-inline-end.px]=\"col.end\"\n >\n {{ entry.summaries.get(col.key) ?? '' }}\n </td>\n }\n </tr>\n } @else {\n <tr\n #rowEl\n [class]=\"rowClasses(entry.row, i)\"\n [class.wr-table__tr--selected]=\"rowSelection() && isRowSelected(entry.row)\"\n [class.wr-table__tr--child]=\"entry.depth > 0\"\n [attr.aria-rowindex]=\"virtualized() ? windowStart() + i + 2 : null\"\n [attr.aria-level]=\"treeMode() ? entry.depth + 1 : null\"\n [attr.aria-posinset]=\"treeMode() ? entry.posinset : null\"\n [attr.aria-setsize]=\"treeMode() ? entry.setsize : null\"\n [attr.aria-expanded]=\"entry.open\"\n [attr.aria-selected]=\"treeMode() && rowSelection() ? isRowSelected(entry.row) : null\"\n [attr.tabindex]=\"treeMode() ? (entry.id === tabStopRowId() ? 0 : -1) : null\"\n [style.--wr-table-depth]=\"treeMode() ? entry.depth : null\"\n >\n @if (rowSelection()) {\n <td class=\"wr-table__td wr-table__td--select\">\n <wr-checkbox\n size=\"sm\"\n [checked]=\"isRowSelected(entry.row)\"\n (checkedChange)=\"toggleRow(entry.row, $event)\"\n [ariaLabelledby]=\"rowControlLabelledby('select-row', entry.id)\"\n />\n </td>\n }\n @if (expandable()) {\n <td class=\"wr-table__td wr-table__td--expand\">\n <button\n type=\"button\"\n class=\"wr-table__expand-btn\"\n [class.wr-table__expand-btn--open]=\"isExpanded(entry.row)\"\n [attr.aria-expanded]=\"isExpanded(entry.row)\"\n [attr.aria-labelledby]=\"rowControlLabelledby('expand-row', entry.id)\"\n (click)=\"toggleExpand(entry.row)\"\n >\n <svg\n class=\"wr-icon__svg wr-table__expand-icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n </button>\n </td>\n }\n @for (col of cellColumns(); track col.key) {\n @let cellEdit = edit !== null && edit.row === entry.row && edit.key === col.key ? edit : null;\n <td\n [class]=\"col.tdClass\"\n [class.wr-table__td--pin-left]=\"col.pinLeft\"\n [class.wr-table__td--pin-right]=\"col.pinRight\"\n [class.wr-table__td--pin-edge-left]=\"col.edgeLeft\"\n [class.wr-table__td--pin-edge-right]=\"col.edgeRight\"\n [style.inset-inline-start.px]=\"col.start\"\n [style.inset-inline-end.px]=\"col.end\"\n [style.max-width.px]=\"col.maxWidth\"\n [attr.data-label]=\"col.column.title\"\n [attr.id]=\"col.label ? rowLabelId(entry.id) : null\"\n [attr.tabindex]=\"editGrid() ? cellTabindex(entry, col) : null\"\n [class.wr-table__td--editable]=\"col.editTemplate ? cellEditable(entry.row, col) : false\"\n [class.wr-table__td--editing]=\"cellEdit !== null\"\n >\n @if (col.tree) {\n <span class=\"wr-table__tree-lead\">\n @if (entry.parent) {\n <button\n type=\"button\"\n class=\"wr-table__tree-toggle\"\n [class.wr-table__tree-toggle--open]=\"entry.open\"\n [attr.aria-expanded]=\"entry.open\"\n [attr.aria-labelledby]=\"rowControlLabelledby('toggle-row', entry.id)\"\n (click)=\"toggleTreeRow(entry.row)\"\n >\n <svg\n class=\"wr-icon__svg wr-table__tree-icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n </button>\n } @else {\n <span class=\"wr-table__tree-toggle wr-table__tree-toggle--leaf\" aria-hidden=\"true\"></span>\n }\n </span>\n }\n @if (cellEdit) {\n <ng-container\n [ngTemplateOutlet]=\"col.editTemplate ?? null\"\n [ngTemplateOutletContext]=\"cellEdit.context\"\n />\n } @else if (col.template; as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"cellContext(entry.row, col)\" />\n } @else {\n {{ cellText(entry.row, col.key, col.column) }}\n }\n </td>\n }\n </tr>\n @if (expandable() && isExpanded(entry.row)) {\n <tr class=\"wr-table__detail-row\">\n <td class=\"wr-table__detail\" [attr.colspan]=\"totalCols()\">\n <ng-container\n [ngTemplateOutlet]=\"expandTemplate() ?? null\"\n [ngTemplateOutletContext]=\"expandContext(entry.row)\"\n />\n </td>\n </tr>\n }\n }\n }\n @if (virtualized() && virtualWindow().padBottom > 0) {\n <tr class=\"wr-table__spacer\" aria-hidden=\"true\">\n <td [attr.colspan]=\"totalCols()\" [style.height.px]=\"virtualWindow().padBottom\"></td>\n </tr>\n }\n }\n <!-- Sibling of the row loop rather than its `@empty` branch, and gated on\n `loading()`. As the `@empty` branch it lived INSIDE `@if (visibleItems())`,\n which passes a nullish `[items]` straight through — so the input's own\n default rendered a header over a blank body with no \"No data\" anywhere,\n the opposite of what `items`'s docs promise. And the veil is translucent,\n so on the documented `[items]=\"[]\" [loading]=\"true\"` pair the row read\n \"No data\" through the spinner. -->\n @if (!loading() && !renderRows().length) {\n <tr>\n <td class=\"wr-table__empty\" [attr.colspan]=\"totalCols()\">{{ resolvedEmptyLabel() }}</td>\n </tr>\n }\n </tbody>\n\n @if (hasSummary() && items()?.length) {\n <tfoot #foot>\n <tr class=\"wr-table__foot-row\">\n @if (rowSelection()) {\n <td class=\"wr-table__foot-cell wr-table__foot-cell--lead\"></td>\n }\n @if (expandable()) {\n <td class=\"wr-table__foot-cell wr-table__foot-cell--lead\"></td>\n }\n @for (col of cellColumns(); track col.key) {\n <td\n [class]=\"col.footClass\"\n [class.wr-table__td--pin-left]=\"col.pinLeft\"\n [class.wr-table__td--pin-right]=\"col.pinRight\"\n [class.wr-table__td--pin-edge-left]=\"col.edgeLeft\"\n [class.wr-table__td--pin-edge-right]=\"col.edgeRight\"\n [style.inset-inline-start.px]=\"col.start\"\n [style.inset-inline-end.px]=\"col.end\"\n >\n {{ summaryFor(col.key) }}\n </td>\n }\n </tr>\n </tfoot>\n }\n </table>\n</div>\n\n@if (showPager()) {\n <div class=\"wr-table__pager\">\n <wr-pagination\n [page]=\"page()\"\n (pageChange)=\"onPagerPage($event)\"\n [pageSize]=\"currentPageSize()\"\n (pageSizeChange)=\"onPageSizeChange($event)\"\n [total]=\"resolvedTotal()\"\n [size]=\"paginationSize()\"\n [showSizeChanger]=\"pageSizeOptions().length > 0\"\n [pageSizeOptions]=\"pageSizeOptions()\"\n />\n </div>\n}\n\n<!-- The table's one tooltip, for a header hint or a cut cell (see `tip`). -->\n@if (tip(); as shown) {\n <span hidden [wrPopover]=\"shown.text\" mode=\"tooltip\" [wrPopoverOrigin]=\"shown.el\"></span>\n}\n\n<!-- The action words the row and group controls are named with, once per table.\n `aria-labelledby` reads a hidden element it points at, so each control joins\n one of these to its own row's (or group's) label. Only the words a control\n in this table uses are rendered. -->\n@if (rowSelection() || expandable() || treeMode() || groupBy() !== null) {\n <div hidden>\n @if (rowSelection()) {\n <span [id]=\"actionId('select-row')\">{{ resolvedSelectRowLabel() }}</span>\n }\n @if (expandable()) {\n <span [id]=\"actionId('expand-row')\">{{ resolvedExpandRowLabel() }}</span>\n }\n @if (treeMode()) {\n <span [id]=\"actionId('toggle-row')\">{{ resolvedToggleRowLabel() }}</span>\n }\n @if (groupBy() !== null) {\n @if (rowSelection() === 'multiple') {\n <span [id]=\"actionId('select-group')\">{{ resolvedSelectGroupLabel() }}</span>\n }\n <span [id]=\"actionId('toggle-group')\">{{ resolvedToggleGroupLabel() }}</span>\n }\n </div>\n}\n",
1945
2663
  dependencies: [
1946
2664
  {
1947
2665
  kind: "directive",
@@ -2008,6 +2726,23 @@ var WrTable = class WrTable {
2008
2726
  ],
2009
2727
  exportAs: ["cdkDrag"]
2010
2728
  },
2729
+ {
2730
+ kind: "component",
2731
+ type: WrButton,
2732
+ selector: "wr-btn, button[wr-btn], a[wr-btn]",
2733
+ inputs: [
2734
+ "color",
2735
+ "size",
2736
+ "shape",
2737
+ "icon",
2738
+ "iconPosition",
2739
+ "disabled",
2740
+ "outlined",
2741
+ "block",
2742
+ "loading",
2743
+ "disabledWhenLoading"
2744
+ ]
2745
+ },
2011
2746
  {
2012
2747
  kind: "component",
2013
2748
  type: WrCheckbox,
@@ -2061,6 +2796,7 @@ var WrTable = class WrTable {
2061
2796
  "showDelay",
2062
2797
  "hideDelay",
2063
2798
  "wrPopoverOrigin",
2799
+ "wrPopoverDisabled",
2064
2800
  "ariaLabel",
2065
2801
  "panelClass"
2066
2802
  ],
@@ -2099,7 +2835,7 @@ var WrTable = class WrTable {
2099
2835
  };
2100
2836
  i0.ɵɵngDeclareClassMetadata({
2101
2837
  minVersion: "12.0.0",
2102
- version: "22.2.5",
2838
+ version: "22.2.6",
2103
2839
  ngImport: i0,
2104
2840
  type: WrTable,
2105
2841
  decorators: [{
@@ -2115,6 +2851,7 @@ i0.ɵɵngDeclareClassMetadata({
2115
2851
  "[class.wr-table--fill]": "fillsParent()",
2116
2852
  "[class.wr-table--overflow-start]": "overflow().start",
2117
2853
  "[class.wr-table--overflow-end]": "overflow().end",
2854
+ "[class.wr-table--selection-bar]": "selectionBar() !== null",
2118
2855
  "[attr.aria-busy]": "loading() ? true : null",
2119
2856
  "(keydown)": "onTreeKeydown($event)",
2120
2857
  "(focusin)": "onTreeFocusin($event)"
@@ -2123,6 +2860,7 @@ i0.ɵɵngDeclareClassMetadata({
2123
2860
  NgTemplateOutlet,
2124
2861
  CdkDropList,
2125
2862
  CdkDrag,
2863
+ WrButton,
2126
2864
  WrCheckbox,
2127
2865
  WrPagination,
2128
2866
  WrPopover,
@@ -2130,7 +2868,7 @@ i0.ɵɵngDeclareClassMetadata({
2130
2868
  WrTableSort,
2131
2869
  WrTableFilter
2132
2870
  ],
2133
- template: "@switch (loadingForm()) {\n @case ('overlay') {\n <div class=\"wr-table__loading\" role=\"status\" [attr.aria-label]=\"resolvedLoadingLabel()\">\n <wr-spinner size=\"lg\" />\n </div>\n }\n @case ('bar') {\n <div class=\"wr-table__loading-bar\" role=\"status\" [attr.aria-label]=\"resolvedLoadingLabel()\"></div>\n }\n}\n\n<div\n class=\"wr-table__scroll\"\n #scroll\n [style.--wr-table-scroll-height]=\"scrollHeight()\"\n [style.--wr-table-head-height.px]=\"stickyEdges().head\"\n [style.--wr-table-foot-height.px]=\"stickyEdges().foot\"\n [attr.tabindex]=\"scrollable() ? 0 : null\"\n>\n <table\n class=\"wr-table__table\"\n [class.wr-table__table--fixed]=\"fixedLayoutActive()\"\n [style.--wr-table-row-h.px]=\"virtualized() ? effRowH() : null\"\n [attr.aria-rowcount]=\"virtualized() ? renderRows().length + 1 + (hasSummary() && items()?.length ? 1 : 0) : null\"\n [attr.role]=\"treeMode() ? 'treegrid' : null\"\n [attr.aria-multiselectable]=\"treeMode() && rowSelection() === 'multiple' ? true : null\"\n >\n <colgroup>\n @if (rowSelection()) {\n <col class=\"wr-table__col--lead\" />\n }\n @if (expandable()) {\n <col class=\"wr-table__col--lead\" />\n }\n @for (col of displayColumns(); track col.key) {\n <col [style.width.px]=\"colWidth(col.key)\" />\n }\n </colgroup>\n <thead #head>\n <tr\n cdkDropList\n cdkDropListOrientation=\"horizontal\"\n [cdkDropListSortPredicate]=\"sortPredicate\"\n (cdkDropListDropped)=\"onColumnDrop($event)\"\n >\n @if (rowSelection()) {\n <th class=\"wr-table__th wr-table__th--select\">\n @if (rowSelection() === 'multiple') {\n <!-- Disabled with nothing to sweep, the way `wr-transfer` guards its\n own select-all. `[checked]` is a one-way binding over a checkbox\n that owns its state, and on zero rows `allSelected()` answers\n `false` before and after the click — an unchanged input is never\n written back, so the box latched CHECKED over an empty table and\n stayed that way when rows returned. -->\n <wr-checkbox\n size=\"sm\"\n [checked]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n [disabled]=\"selectAllKeys().size === 0\"\n (checkedChange)=\"toggleAll($event)\"\n [ariaLabel]=\"resolvedSelectAllLabel()\"\n />\n }\n </th>\n }\n @if (expandable()) {\n <th class=\"wr-table__th wr-table__th--expand\"></th>\n }\n @for (col of displayColumns(); track col.key) {\n <th\n #thCell\n cdkDrag\n [cdkDragDisabled]=\"!reorderable() || !!col.column.pin\"\n [class]=\"thClasses(col.column)\"\n [attr.aria-sort]=\"ariaSortFor(col.key, col.column.sortable)\"\n [attr.aria-label]=\"col.column.title ? null : (col.column.headerHint ?? null)\"\n [class.wr-table__th--draggable]=\"reorderable() && !col.column.pin\"\n [class.wr-table__th--pin-left]=\"col.column.pin === 'left'\"\n [class.wr-table__th--pin-right]=\"col.column.pin === 'right'\"\n [class.wr-table__th--pin-edge-left]=\"isPinEdge(col.key, 'left')\"\n [class.wr-table__th--pin-edge-right]=\"isPinEdge(col.key, 'right')\"\n [style.inset-inline-start.px]=\"leftPin(col.key)\"\n [style.inset-inline-end.px]=\"rightPin(col.key)\"\n >\n <div class=\"wr-table__th-inner\">\n <span class=\"wr-table__title\">{{ col.column.title }}</span>\n\n @if (col.column.sortable) {\n <button\n type=\"button\"\n class=\"wr-table__sort-btn\"\n [attr.aria-label]=\"sortLabelFor(headerName(col.column))\"\n (click)=\"cycleSort(col.key)\"\n >\n <wr-table-sort [direction]=\"directionFor(col.key)\" />\n </button>\n <!-- A column's place in a multi-column sort. Drawn, because only the\n primary key announces `aria-sort` (see ariaSortFor). Beside the\n button rather than in it: inside, the digit is visible text the\n button's name (\"Sort Role\") does not contain, which is a WCAG\n 2.5.3 label-in-name failure. Hidden, so the column header's own\n name stays its title. -->\n @if (sortOrderFor(col.key); as order) {\n <span class=\"wr-table__sort-order\" aria-hidden=\"true\">{{ order }}</span>\n }\n }\n\n @if (col.column.filterItems; as filterItems) {\n @if (filterItems.length) {\n <wr-table-filter\n [items]=\"filterItems\"\n [column]=\"headerName(col.column)\"\n (selectionChange)=\"onFilter(col.key, $event)\"\n />\n }\n }\n </div>\n\n @if (col.column.resizable) {\n <span\n class=\"wr-table__resize-handle\"\n aria-hidden=\"true\"\n (pointerdown)=\"onResizeStart($event, col.key, thCell)\"\n (pointermove)=\"onResizeMove($event)\"\n (pointerup)=\"onResizeEnd($event)\"\n (pointercancel)=\"onResizeEnd($event)\"\n (mousedown)=\"$event.stopPropagation()\"\n (touchstart)=\"$event.stopPropagation()\"\n ></span>\n }\n </th>\n }\n </tr>\n </thead>\n\n <!-- One delegated listener for `rowClick`, which is pointer only by contract:\n the body is no control, and a row's keyboard path is the consumer's own\n button or link in a cell. -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events,@angular-eslint/template/interactive-supports-focus -->\n <tbody (click)=\"onBodyClick($event)\">\n @if (visibleItems()) {\n @if (virtualized() && virtualWindow().padTop > 0) {\n <tr class=\"wr-table__spacer\" aria-hidden=\"true\">\n <td [attr.colspan]=\"totalCols()\" [style.height.px]=\"virtualWindow().padTop\"></td>\n </tr>\n }\n @for (entry of windowRows(); track entry.id; let i = $index) {\n @if (entry.kind === 'group') {\n <tr class=\"wr-table__group-row\" [class.wr-table__group-row--collapsed]=\"entry.group.collapsed\">\n <td class=\"wr-table__group-cell\" [attr.colspan]=\"totalCols()\">\n <!-- The cell spans the full table width; this inner box is what sticks. -->\n <div class=\"wr-table__group-inner\">\n @if (rowSelection() === 'multiple') {\n <wr-checkbox\n class=\"wr-table__group-select\"\n size=\"sm\"\n [checked]=\"groupChecked(entry.group.rows)\"\n [indeterminate]=\"groupIndeterminate(entry.group.rows)\"\n (checkedChange)=\"toggleGroupSelection(entry.group.rows, $event)\"\n [ariaLabelledby]=\"groupControlLabelledby('select-group', entry.id)\"\n />\n }\n @if (groupTemplate(); as tpl) {\n <button\n type=\"button\"\n class=\"wr-table__group-toggle wr-table__group-toggle--icon\"\n [attr.aria-expanded]=\"!entry.group.collapsed\"\n [attr.aria-labelledby]=\"groupControlLabelledby('toggle-group', entry.id)\"\n (click)=\"toggleGroupCollapse(entry.group.value)\"\n >\n <svg\n class=\"wr-icon__svg wr-table__group-icon\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n </button>\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"entry.group\" />\n <!-- The group's name for the two controls above. A custom header\n is the consumer's markup, with nothing in it to point at. -->\n <span hidden [id]=\"groupLabelId(entry.id)\">{{ entry.group.label }}</span>\n } @else {\n <button\n type=\"button\"\n class=\"wr-table__group-toggle\"\n [attr.aria-expanded]=\"!entry.group.collapsed\"\n [attr.aria-labelledby]=\"groupToggleLabelledby(entry.id)\"\n (click)=\"toggleGroupCollapse(entry.group.value)\"\n >\n <svg\n class=\"wr-icon__svg wr-table__group-icon\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n <span class=\"wr-table__group-label\" [id]=\"groupLabelId(entry.id)\">{{ entry.group.label }}</span>\n @if (showGroupCount()) {\n <!-- A real space between the label and the count. Whitespace\n alone draws nothing in a flex row, and without it the\n button's text reads \"admin2\" — which the name\n \"Toggle group admin 2\" does not contain, a label-in-name\n mismatch for any tool that compares the two. -->\n &ngsp;<span class=\"wr-table__group-count\" [id]=\"groupCountId(entry.id)\">{{\n entry.group.count\n }}</span>\n }\n </button>\n }\n </div>\n </td>\n </tr>\n } @else if (entry.kind === 'group-foot') {\n <tr class=\"wr-table__group-foot-row\">\n @if (rowSelection()) {\n <td class=\"wr-table__foot-cell wr-table__foot-cell--lead\"></td>\n }\n @if (expandable()) {\n <td class=\"wr-table__foot-cell wr-table__foot-cell--lead\"></td>\n }\n @for (col of displayColumns(); track col.key) {\n <td\n [class]=\"footClasses(col.column)\"\n [class.wr-table__td--pin-left]=\"col.column.pin === 'left'\"\n [class.wr-table__td--pin-right]=\"col.column.pin === 'right'\"\n [class.wr-table__td--pin-edge-left]=\"isPinEdge(col.key, 'left')\"\n [class.wr-table__td--pin-edge-right]=\"isPinEdge(col.key, 'right')\"\n [style.inset-inline-start.px]=\"leftPin(col.key)\"\n [style.inset-inline-end.px]=\"rightPin(col.key)\"\n >\n {{ entry.summaries.get(col.key) ?? '' }}\n </td>\n }\n </tr>\n } @else {\n <tr\n #rowEl\n [class]=\"rowClasses(entry.row, i)\"\n [class.wr-table__tr--selected]=\"rowSelection() && isRowSelected(entry.row)\"\n [class.wr-table__tr--child]=\"entry.depth > 0\"\n [attr.aria-rowindex]=\"virtualized() ? windowStart() + i + 2 : null\"\n [attr.aria-level]=\"treeMode() ? entry.depth + 1 : null\"\n [attr.aria-posinset]=\"treeMode() ? entry.posinset : null\"\n [attr.aria-setsize]=\"treeMode() ? entry.setsize : null\"\n [attr.aria-expanded]=\"entry.open\"\n [attr.aria-selected]=\"treeMode() && rowSelection() ? isRowSelected(entry.row) : null\"\n [attr.tabindex]=\"treeMode() ? (entry.id === tabStopRowId() ? 0 : -1) : null\"\n [style.--wr-table-depth]=\"treeMode() ? entry.depth : null\"\n >\n @if (rowSelection()) {\n <td class=\"wr-table__td wr-table__td--select\">\n <wr-checkbox\n size=\"sm\"\n [checked]=\"isRowSelected(entry.row)\"\n (checkedChange)=\"toggleRow(entry.row, $event)\"\n [ariaLabelledby]=\"rowControlLabelledby('select-row', entry.id)\"\n />\n </td>\n }\n @if (expandable()) {\n <td class=\"wr-table__td wr-table__td--expand\">\n <button\n type=\"button\"\n class=\"wr-table__expand-btn\"\n [class.wr-table__expand-btn--open]=\"isExpanded(entry.row)\"\n [attr.aria-expanded]=\"isExpanded(entry.row)\"\n [attr.aria-labelledby]=\"rowControlLabelledby('expand-row', entry.id)\"\n (click)=\"toggleExpand(entry.row)\"\n >\n <svg\n class=\"wr-icon__svg wr-table__expand-icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n </button>\n </td>\n }\n @for (col of displayColumns(); track col.key) {\n <td\n [class]=\"tdClasses(col.column)\"\n [class.wr-table__td--pin-left]=\"col.column.pin === 'left'\"\n [class.wr-table__td--pin-right]=\"col.column.pin === 'right'\"\n [class.wr-table__td--pin-edge-left]=\"isPinEdge(col.key, 'left')\"\n [class.wr-table__td--pin-edge-right]=\"isPinEdge(col.key, 'right')\"\n [style.inset-inline-start.px]=\"leftPin(col.key)\"\n [style.inset-inline-end.px]=\"rightPin(col.key)\"\n [style.max-width.px]=\"truncates(col.column) ? (col.column.width ?? null) : null\"\n [attr.data-label]=\"col.column.title\"\n [attr.id]=\"col.key === labelColumnKey() ? rowLabelId(entry.id) : null\"\n >\n @if (treeMode() && col.key === treeColumnKey()) {\n <span class=\"wr-table__tree-lead\">\n @if (entry.parent) {\n <button\n type=\"button\"\n class=\"wr-table__tree-toggle\"\n [class.wr-table__tree-toggle--open]=\"entry.open\"\n [attr.aria-expanded]=\"entry.open\"\n [attr.aria-labelledby]=\"rowControlLabelledby('toggle-row', entry.id)\"\n (click)=\"toggleTreeRow(entry.row)\"\n >\n <svg\n class=\"wr-icon__svg wr-table__tree-icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n </button>\n } @else {\n <span class=\"wr-table__tree-toggle wr-table__tree-toggle--leaf\" aria-hidden=\"true\"></span>\n }\n </span>\n }\n @if (templateFor(col.key); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"cellContext(entry.row, col.key, col.column)\"\n />\n } @else {\n {{ cellText(entry.row, col.key, col.column) }}\n }\n </td>\n }\n </tr>\n @if (expandable() && isExpanded(entry.row)) {\n <tr class=\"wr-table__detail-row\">\n <td class=\"wr-table__detail\" [attr.colspan]=\"totalCols()\">\n <ng-container\n [ngTemplateOutlet]=\"expandTemplate() ?? null\"\n [ngTemplateOutletContext]=\"expandContext(entry.row)\"\n />\n </td>\n </tr>\n }\n }\n }\n @if (virtualized() && virtualWindow().padBottom > 0) {\n <tr class=\"wr-table__spacer\" aria-hidden=\"true\">\n <td [attr.colspan]=\"totalCols()\" [style.height.px]=\"virtualWindow().padBottom\"></td>\n </tr>\n }\n }\n <!-- Sibling of the row loop rather than its `@empty` branch, and gated on\n `loading()`. As the `@empty` branch it lived INSIDE `@if (visibleItems())`,\n which passes a nullish `[items]` straight through — so the input's own\n default rendered a header over a blank body with no \"No data\" anywhere,\n the opposite of what `items`'s docs promise. And the veil is translucent,\n so on the documented `[items]=\"[]\" [loading]=\"true\"` pair the row read\n \"No data\" through the spinner. -->\n @if (!loading() && !renderRows().length) {\n <tr>\n <td class=\"wr-table__empty\" [attr.colspan]=\"totalCols()\">{{ resolvedEmptyLabel() }}</td>\n </tr>\n }\n </tbody>\n\n @if (hasSummary() && items()?.length) {\n <tfoot #foot>\n <tr class=\"wr-table__foot-row\">\n @if (rowSelection()) {\n <td class=\"wr-table__foot-cell wr-table__foot-cell--lead\"></td>\n }\n @if (expandable()) {\n <td class=\"wr-table__foot-cell wr-table__foot-cell--lead\"></td>\n }\n @for (col of displayColumns(); track col.key) {\n <td\n [class]=\"footClasses(col.column)\"\n [class.wr-table__td--pin-left]=\"col.column.pin === 'left'\"\n [class.wr-table__td--pin-right]=\"col.column.pin === 'right'\"\n [class.wr-table__td--pin-edge-left]=\"isPinEdge(col.key, 'left')\"\n [class.wr-table__td--pin-edge-right]=\"isPinEdge(col.key, 'right')\"\n [style.inset-inline-start.px]=\"leftPin(col.key)\"\n [style.inset-inline-end.px]=\"rightPin(col.key)\"\n >\n {{ summaryFor(col.key) }}\n </td>\n }\n </tr>\n </tfoot>\n }\n </table>\n</div>\n\n@if (showPager()) {\n <div class=\"wr-table__pager\">\n <wr-pagination\n [(page)]=\"page\"\n [pageSize]=\"currentPageSize()\"\n (pageSizeChange)=\"onPageSizeChange($event)\"\n [total]=\"resolvedTotal()\"\n [size]=\"paginationSize()\"\n [showSizeChanger]=\"pageSizeOptions().length > 0\"\n [pageSizeOptions]=\"pageSizeOptions()\"\n />\n </div>\n}\n\n<!-- The table's one tooltip, for a header hint or a cut cell (see `tip`). -->\n@if (tip(); as shown) {\n <span hidden [wrPopover]=\"shown.text\" mode=\"tooltip\" [wrPopoverOrigin]=\"shown.el\"></span>\n}\n\n<!-- The action words the row and group controls are named with, once per table.\n `aria-labelledby` reads a hidden element it points at, so each control joins\n one of these to its own row's (or group's) label. Only the words a control\n in this table uses are rendered. -->\n@if (rowSelection() || expandable() || treeMode() || groupBy() !== null) {\n <div hidden>\n @if (rowSelection()) {\n <span [id]=\"actionId('select-row')\">{{ resolvedSelectRowLabel() }}</span>\n }\n @if (expandable()) {\n <span [id]=\"actionId('expand-row')\">{{ resolvedExpandRowLabel() }}</span>\n }\n @if (treeMode()) {\n <span [id]=\"actionId('toggle-row')\">{{ resolvedToggleRowLabel() }}</span>\n }\n @if (groupBy() !== null) {\n @if (rowSelection() === 'multiple') {\n <span [id]=\"actionId('select-group')\">{{ resolvedSelectGroupLabel() }}</span>\n }\n <span [id]=\"actionId('toggle-group')\">{{ resolvedToggleGroupLabel() }}</span>\n }\n </div>\n}\n"
2871
+ template: "@switch (loadingForm()) {\n @case ('overlay') {\n <div class=\"wr-table__loading\" role=\"status\" [attr.aria-label]=\"resolvedLoadingLabel()\">\n <wr-spinner size=\"lg\" />\n </div>\n }\n @case ('bar') {\n <div class=\"wr-table__loading-bar\" role=\"status\" [attr.aria-label]=\"resolvedLoadingLabel()\"></div>\n }\n}\n\n@if (columnChooser()) {\n <div class=\"wr-table__toolbar\">\n <button\n wr-btn\n type=\"button\"\n size=\"sm\"\n outlined\n class=\"wr-table__columns-btn\"\n position=\"bottom-end\"\n [wrPopover]=\"chooser\"\n [ariaLabel]=\"resolvedColumnsLabel()\"\n >\n {{ resolvedColumnsLabel() }}\n </button>\n <ng-template #chooser>\n <div class=\"wr-table__columns\">\n @for (entry of chooserColumns(); track entry.key) {\n <wr-checkbox\n class=\"wr-table__columns-item\"\n size=\"sm\"\n [checked]=\"entry.visible\"\n [disabled]=\"entry.locked\"\n (checkedChange)=\"setColumnVisible(entry.key, $event)\"\n >{{ entry.title }}</wr-checkbox\n >\n }\n </div>\n </ng-template>\n </div>\n}\n\n<!-- The selection bar lies over the header: a box of no height in front of\n the scroll area, so the bar stays put while the columns scroll under it.\n The count is announced from a region that is in the DOM before it has\n anything to say, and the drawn copy is hidden from it. -->\n@if (hasSelectionBar()) {\n <div class=\"wr-table__selection\">\n <span class=\"wr-table__selection-status\" role=\"status\">{{ selectionBar() ? selectionCountText() : '' }}</span>\n @if (selectionBar(); as tpl) {\n <div\n #selectionBarEl\n class=\"wr-table__selection-bar\"\n [class.wr-table__selection-bar--inset]=\"rowSelection() === 'multiple'\"\n [style.--wr-table-selection-bar-height.px]=\"selectionBarHeight()\"\n >\n <span class=\"wr-table__selection-count\" aria-hidden=\"true\">{{ selectionCountText() }}</span>\n <button wr-btn type=\"button\" size=\"sm\" class=\"wr-table__selection-clear\" (click)=\"clearSelection()\">\n {{ resolvedClearSelectionLabel() }}\n </button>\n <div class=\"wr-table__selection-actions\">\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"selectionContext()\" />\n </div>\n </div>\n }\n </div>\n}\n\n<!-- With a selection bar the scroll area takes focus from script, for the bar\n to hand it to when it leaves a table that has no checkbox to take it. -->\n<div\n class=\"wr-table__scroll\"\n #scroll\n [style.--wr-table-scroll-height]=\"scrollHeight()\"\n [style.--wr-table-head-height.px]=\"stickyEdges().head\"\n [style.--wr-table-foot-height.px]=\"stickyEdges().foot\"\n [attr.tabindex]=\"scrollable() ? 0 : hasSelectionBar() ? -1 : null\"\n>\n <table\n class=\"wr-table__table\"\n [class.wr-table__table--fixed]=\"fixedLayoutActive()\"\n [style.--wr-table-row-h.px]=\"virtualized() ? effRowH() : null\"\n [attr.aria-rowcount]=\"virtualized() ? renderRows().length + 1 + (hasSummary() && items()?.length ? 1 : 0) : null\"\n [attr.role]=\"treeMode() ? 'treegrid' : editGrid() ? 'grid' : null\"\n [attr.aria-multiselectable]=\"treeMode() && rowSelection() === 'multiple' ? true : null\"\n >\n <colgroup>\n @if (rowSelection()) {\n <col class=\"wr-table__col--lead\" />\n }\n @if (expandable()) {\n <col class=\"wr-table__col--lead\" />\n }\n @for (col of cellColumns(); track col.key) {\n <col [style.width.px]=\"col.width\" />\n }\n </colgroup>\n <thead #head>\n <tr\n cdkDropList\n cdkDropListOrientation=\"horizontal\"\n [cdkDropListSortPredicate]=\"sortPredicate\"\n (cdkDropListDropped)=\"onColumnDrop($event)\"\n (cdkDropListSorted)=\"onColumnListSorted($event)\"\n (cdkDropListEntered)=\"onColumnListEntered()\"\n (cdkDropListExited)=\"onColumnListExited()\"\n >\n @if (rowSelection()) {\n <th class=\"wr-table__th wr-table__th--select\">\n @if (rowSelection() === 'multiple') {\n <!-- Disabled with nothing to sweep, the way `wr-transfer` guards its\n own select-all. `[checked]` is a one-way binding over a checkbox\n that owns its state, and on zero rows `allSelected()` answers\n `false` before and after the click — an unchanged input is never\n written back, so the box latched CHECKED over an empty table and\n stayed that way when rows returned. -->\n <wr-checkbox\n size=\"sm\"\n [checked]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n [disabled]=\"selectAllKeys().size === 0\"\n (checkedChange)=\"toggleAll($event)\"\n [ariaLabel]=\"resolvedSelectAllLabel()\"\n />\n }\n </th>\n }\n @if (expandable()) {\n <th class=\"wr-table__th wr-table__th--expand\"></th>\n }\n <!-- `inert` under the selection bar: a control the bar covers takes no\n focus and no click. The select-all cell stays out from under it. -->\n @for (col of cellColumns(); track col.key) {\n <th\n #thCell\n cdkDrag\n [attr.inert]=\"selectionBar() ? '' : null\"\n [cdkDragDisabled]=\"!reorderable() || col.pinned\"\n (cdkDragStarted)=\"onColumnDragStart($event)\"\n (cdkDragMoved)=\"onColumnDragMoved($event)\"\n (cdkDragEnded)=\"onColumnDragEnd()\"\n [class]=\"col.thClass\"\n [attr.aria-sort]=\"ariaSortFor(col.key, col.column.sortable)\"\n [attr.aria-label]=\"col.column.title ? null : (col.column.headerHint ?? null)\"\n [class.wr-table__th--draggable]=\"reorderable() && !col.pinned\"\n [class.wr-table__th--pin-left]=\"col.pinLeft\"\n [class.wr-table__th--pin-right]=\"col.pinRight\"\n [class.wr-table__th--pin-edge-left]=\"col.edgeLeft\"\n [class.wr-table__th--pin-edge-right]=\"col.edgeRight\"\n [style.inset-inline-start.px]=\"col.start\"\n [style.inset-inline-end.px]=\"col.end\"\n >\n <div class=\"wr-table__th-inner\">\n <span class=\"wr-table__title\">{{ col.column.title }}</span>\n\n @if (col.column.sortable) {\n <button\n type=\"button\"\n class=\"wr-table__sort-btn\"\n [attr.aria-label]=\"sortLabelFor(headerName(col.column))\"\n (click)=\"cycleSort(col.key)\"\n >\n <wr-table-sort [direction]=\"directionFor(col.key)\" />\n </button>\n <!-- A column's place in a multi-column sort. Drawn, because only the\n primary key announces `aria-sort` (see ariaSortFor). Beside the\n button rather than in it: inside, the digit is visible text the\n button's name (\"Sort Role\") does not contain, which is a WCAG\n 2.5.3 label-in-name failure. Hidden, so the column header's own\n name stays its title. -->\n @if (sortOrderFor(col.key); as order) {\n <span class=\"wr-table__sort-order\" aria-hidden=\"true\">{{ order }}</span>\n }\n }\n\n @if (col.column.filterItems; as filterItems) {\n @if (filterItems.length) {\n <wr-table-filter\n [items]=\"filterItems\"\n [column]=\"headerName(col.column)\"\n (selectionChange)=\"onFilter(col.key, $event)\"\n />\n }\n }\n </div>\n\n @if (col.column.resizable) {\n <span\n class=\"wr-table__resize-handle\"\n aria-hidden=\"true\"\n (pointerdown)=\"onResizeStart($event, col.key, thCell)\"\n (pointermove)=\"onResizeMove($event)\"\n (pointerup)=\"onResizeEnd($event)\"\n (pointercancel)=\"onResizeEnd($event)\"\n (mousedown)=\"$event.stopPropagation()\"\n (touchstart)=\"$event.stopPropagation()\"\n ></span>\n }\n </th>\n }\n </tr>\n </thead>\n\n <!-- One delegated listener for `rowClick`, which is pointer only by contract:\n the body is no control, and a row's keyboard path is the consumer's own\n button or link in a cell. The other three serve inline editing and\n return at once in a table with no edit template. -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <tbody\n (click)=\"onBodyClick($event)\"\n (dblclick)=\"onCellDblclick($event)\"\n (keydown)=\"onCellKeydown($event)\"\n (focusin)=\"onCellFocusin($event)\"\n >\n @if (visibleItems()) {\n @if (virtualized() && virtualWindow().padTop > 0) {\n <tr class=\"wr-table__spacer\" aria-hidden=\"true\">\n <td [attr.colspan]=\"totalCols()\" [style.height.px]=\"virtualWindow().padTop\"></td>\n </tr>\n }\n @let edit = editing();\n @for (entry of windowRows(); track entry.id; let i = $index) {\n @if (entry.kind === 'group') {\n <tr class=\"wr-table__group-row\" [class.wr-table__group-row--collapsed]=\"entry.group.collapsed\">\n <td class=\"wr-table__group-cell\" [attr.colspan]=\"totalCols()\">\n <!-- The cell spans the full table width; this inner box is what sticks. -->\n <div class=\"wr-table__group-inner\">\n @if (rowSelection() === 'multiple') {\n <wr-checkbox\n class=\"wr-table__group-select\"\n size=\"sm\"\n [checked]=\"groupChecked(entry.group.rows)\"\n [indeterminate]=\"groupIndeterminate(entry.group.rows)\"\n (checkedChange)=\"toggleGroupSelection(entry.group.rows, $event)\"\n [ariaLabelledby]=\"groupControlLabelledby('select-group', entry.id)\"\n />\n }\n @if (groupTemplate(); as tpl) {\n <button\n type=\"button\"\n class=\"wr-table__group-toggle wr-table__group-toggle--icon\"\n [attr.aria-expanded]=\"!entry.group.collapsed\"\n [attr.aria-labelledby]=\"groupControlLabelledby('toggle-group', entry.id)\"\n (click)=\"toggleGroupCollapse(entry.group.value)\"\n >\n <svg\n class=\"wr-icon__svg wr-table__group-icon\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n </button>\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"entry.group\" />\n <!-- The group's name for the two controls above. A custom header\n is the consumer's markup, with nothing in it to point at. -->\n <span hidden [id]=\"groupLabelId(entry.id)\">{{ entry.group.label }}</span>\n } @else {\n <button\n type=\"button\"\n class=\"wr-table__group-toggle\"\n [attr.aria-expanded]=\"!entry.group.collapsed\"\n [attr.aria-labelledby]=\"groupToggleLabelledby(entry.id)\"\n (click)=\"toggleGroupCollapse(entry.group.value)\"\n >\n <svg\n class=\"wr-icon__svg wr-table__group-icon\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n <span class=\"wr-table__group-label\" [id]=\"groupLabelId(entry.id)\">{{ entry.group.label }}</span>\n @if (showGroupCount()) {\n <!-- A real space between the label and the count. Whitespace\n alone draws nothing in a flex row, and without it the\n button's text reads \"admin2\" — which the name\n \"Toggle group admin 2\" does not contain, a label-in-name\n mismatch for any tool that compares the two. -->\n &ngsp;<span class=\"wr-table__group-count\" [id]=\"groupCountId(entry.id)\">{{\n entry.group.count\n }}</span>\n }\n </button>\n }\n </div>\n </td>\n </tr>\n } @else if (entry.kind === 'group-foot') {\n <tr class=\"wr-table__group-foot-row\">\n @if (rowSelection()) {\n <td class=\"wr-table__foot-cell wr-table__foot-cell--lead\"></td>\n }\n @if (expandable()) {\n <td class=\"wr-table__foot-cell wr-table__foot-cell--lead\"></td>\n }\n @for (col of cellColumns(); track col.key) {\n <td\n [class]=\"col.footClass\"\n [class.wr-table__td--pin-left]=\"col.pinLeft\"\n [class.wr-table__td--pin-right]=\"col.pinRight\"\n [class.wr-table__td--pin-edge-left]=\"col.edgeLeft\"\n [class.wr-table__td--pin-edge-right]=\"col.edgeRight\"\n [style.inset-inline-start.px]=\"col.start\"\n [style.inset-inline-end.px]=\"col.end\"\n >\n {{ entry.summaries.get(col.key) ?? '' }}\n </td>\n }\n </tr>\n } @else {\n <tr\n #rowEl\n [class]=\"rowClasses(entry.row, i)\"\n [class.wr-table__tr--selected]=\"rowSelection() && isRowSelected(entry.row)\"\n [class.wr-table__tr--child]=\"entry.depth > 0\"\n [attr.aria-rowindex]=\"virtualized() ? windowStart() + i + 2 : null\"\n [attr.aria-level]=\"treeMode() ? entry.depth + 1 : null\"\n [attr.aria-posinset]=\"treeMode() ? entry.posinset : null\"\n [attr.aria-setsize]=\"treeMode() ? entry.setsize : null\"\n [attr.aria-expanded]=\"entry.open\"\n [attr.aria-selected]=\"treeMode() && rowSelection() ? isRowSelected(entry.row) : null\"\n [attr.tabindex]=\"treeMode() ? (entry.id === tabStopRowId() ? 0 : -1) : null\"\n [style.--wr-table-depth]=\"treeMode() ? entry.depth : null\"\n >\n @if (rowSelection()) {\n <td class=\"wr-table__td wr-table__td--select\">\n <wr-checkbox\n size=\"sm\"\n [checked]=\"isRowSelected(entry.row)\"\n (checkedChange)=\"toggleRow(entry.row, $event)\"\n [ariaLabelledby]=\"rowControlLabelledby('select-row', entry.id)\"\n />\n </td>\n }\n @if (expandable()) {\n <td class=\"wr-table__td wr-table__td--expand\">\n <button\n type=\"button\"\n class=\"wr-table__expand-btn\"\n [class.wr-table__expand-btn--open]=\"isExpanded(entry.row)\"\n [attr.aria-expanded]=\"isExpanded(entry.row)\"\n [attr.aria-labelledby]=\"rowControlLabelledby('expand-row', entry.id)\"\n (click)=\"toggleExpand(entry.row)\"\n >\n <svg\n class=\"wr-icon__svg wr-table__expand-icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n </button>\n </td>\n }\n @for (col of cellColumns(); track col.key) {\n @let cellEdit = edit !== null && edit.row === entry.row && edit.key === col.key ? edit : null;\n <td\n [class]=\"col.tdClass\"\n [class.wr-table__td--pin-left]=\"col.pinLeft\"\n [class.wr-table__td--pin-right]=\"col.pinRight\"\n [class.wr-table__td--pin-edge-left]=\"col.edgeLeft\"\n [class.wr-table__td--pin-edge-right]=\"col.edgeRight\"\n [style.inset-inline-start.px]=\"col.start\"\n [style.inset-inline-end.px]=\"col.end\"\n [style.max-width.px]=\"col.maxWidth\"\n [attr.data-label]=\"col.column.title\"\n [attr.id]=\"col.label ? rowLabelId(entry.id) : null\"\n [attr.tabindex]=\"editGrid() ? cellTabindex(entry, col) : null\"\n [class.wr-table__td--editable]=\"col.editTemplate ? cellEditable(entry.row, col) : false\"\n [class.wr-table__td--editing]=\"cellEdit !== null\"\n >\n @if (col.tree) {\n <span class=\"wr-table__tree-lead\">\n @if (entry.parent) {\n <button\n type=\"button\"\n class=\"wr-table__tree-toggle\"\n [class.wr-table__tree-toggle--open]=\"entry.open\"\n [attr.aria-expanded]=\"entry.open\"\n [attr.aria-labelledby]=\"rowControlLabelledby('toggle-row', entry.id)\"\n (click)=\"toggleTreeRow(entry.row)\"\n >\n <svg\n class=\"wr-icon__svg wr-table__tree-icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n </button>\n } @else {\n <span class=\"wr-table__tree-toggle wr-table__tree-toggle--leaf\" aria-hidden=\"true\"></span>\n }\n </span>\n }\n @if (cellEdit) {\n <ng-container\n [ngTemplateOutlet]=\"col.editTemplate ?? null\"\n [ngTemplateOutletContext]=\"cellEdit.context\"\n />\n } @else if (col.template; as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"cellContext(entry.row, col)\" />\n } @else {\n {{ cellText(entry.row, col.key, col.column) }}\n }\n </td>\n }\n </tr>\n @if (expandable() && isExpanded(entry.row)) {\n <tr class=\"wr-table__detail-row\">\n <td class=\"wr-table__detail\" [attr.colspan]=\"totalCols()\">\n <ng-container\n [ngTemplateOutlet]=\"expandTemplate() ?? null\"\n [ngTemplateOutletContext]=\"expandContext(entry.row)\"\n />\n </td>\n </tr>\n }\n }\n }\n @if (virtualized() && virtualWindow().padBottom > 0) {\n <tr class=\"wr-table__spacer\" aria-hidden=\"true\">\n <td [attr.colspan]=\"totalCols()\" [style.height.px]=\"virtualWindow().padBottom\"></td>\n </tr>\n }\n }\n <!-- Sibling of the row loop rather than its `@empty` branch, and gated on\n `loading()`. As the `@empty` branch it lived INSIDE `@if (visibleItems())`,\n which passes a nullish `[items]` straight through — so the input's own\n default rendered a header over a blank body with no \"No data\" anywhere,\n the opposite of what `items`'s docs promise. And the veil is translucent,\n so on the documented `[items]=\"[]\" [loading]=\"true\"` pair the row read\n \"No data\" through the spinner. -->\n @if (!loading() && !renderRows().length) {\n <tr>\n <td class=\"wr-table__empty\" [attr.colspan]=\"totalCols()\">{{ resolvedEmptyLabel() }}</td>\n </tr>\n }\n </tbody>\n\n @if (hasSummary() && items()?.length) {\n <tfoot #foot>\n <tr class=\"wr-table__foot-row\">\n @if (rowSelection()) {\n <td class=\"wr-table__foot-cell wr-table__foot-cell--lead\"></td>\n }\n @if (expandable()) {\n <td class=\"wr-table__foot-cell wr-table__foot-cell--lead\"></td>\n }\n @for (col of cellColumns(); track col.key) {\n <td\n [class]=\"col.footClass\"\n [class.wr-table__td--pin-left]=\"col.pinLeft\"\n [class.wr-table__td--pin-right]=\"col.pinRight\"\n [class.wr-table__td--pin-edge-left]=\"col.edgeLeft\"\n [class.wr-table__td--pin-edge-right]=\"col.edgeRight\"\n [style.inset-inline-start.px]=\"col.start\"\n [style.inset-inline-end.px]=\"col.end\"\n >\n {{ summaryFor(col.key) }}\n </td>\n }\n </tr>\n </tfoot>\n }\n </table>\n</div>\n\n@if (showPager()) {\n <div class=\"wr-table__pager\">\n <wr-pagination\n [page]=\"page()\"\n (pageChange)=\"onPagerPage($event)\"\n [pageSize]=\"currentPageSize()\"\n (pageSizeChange)=\"onPageSizeChange($event)\"\n [total]=\"resolvedTotal()\"\n [size]=\"paginationSize()\"\n [showSizeChanger]=\"pageSizeOptions().length > 0\"\n [pageSizeOptions]=\"pageSizeOptions()\"\n />\n </div>\n}\n\n<!-- The table's one tooltip, for a header hint or a cut cell (see `tip`). -->\n@if (tip(); as shown) {\n <span hidden [wrPopover]=\"shown.text\" mode=\"tooltip\" [wrPopoverOrigin]=\"shown.el\"></span>\n}\n\n<!-- The action words the row and group controls are named with, once per table.\n `aria-labelledby` reads a hidden element it points at, so each control joins\n one of these to its own row's (or group's) label. Only the words a control\n in this table uses are rendered. -->\n@if (rowSelection() || expandable() || treeMode() || groupBy() !== null) {\n <div hidden>\n @if (rowSelection()) {\n <span [id]=\"actionId('select-row')\">{{ resolvedSelectRowLabel() }}</span>\n }\n @if (expandable()) {\n <span [id]=\"actionId('expand-row')\">{{ resolvedExpandRowLabel() }}</span>\n }\n @if (treeMode()) {\n <span [id]=\"actionId('toggle-row')\">{{ resolvedToggleRowLabel() }}</span>\n }\n @if (groupBy() !== null) {\n @if (rowSelection() === 'multiple') {\n <span [id]=\"actionId('select-group')\">{{ resolvedSelectGroupLabel() }}</span>\n }\n <span [id]=\"actionId('toggle-group')\">{{ resolvedToggleGroupLabel() }}</span>\n }\n </div>\n}\n"
2134
2872
  }]
2135
2873
  }],
2136
2874
  ctorParameters: () => [],
@@ -2194,6 +2932,25 @@ i0.ɵɵngDeclareClassMetadata({
2194
2932
  type: i0.Output,
2195
2933
  args: ["columnOrderChange"]
2196
2934
  }],
2935
+ hiddenColumns: [{
2936
+ type: i0.Input,
2937
+ args: [{
2938
+ isSignal: true,
2939
+ alias: "hiddenColumns",
2940
+ required: false
2941
+ }]
2942
+ }, {
2943
+ type: i0.Output,
2944
+ args: ["hiddenColumnsChange"]
2945
+ }],
2946
+ columnChooser: [{
2947
+ type: i0.Input,
2948
+ args: [{
2949
+ isSignal: true,
2950
+ alias: "columnChooser",
2951
+ required: false
2952
+ }]
2953
+ }],
2197
2954
  rowSelection: [{
2198
2955
  type: i0.Input,
2199
2956
  args: [{
@@ -2382,10 +3139,46 @@ i0.ɵɵngDeclareClassMetadata({
2382
3139
  required: false
2383
3140
  }]
2384
3141
  }],
3142
+ selectedLabel: [{
3143
+ type: i0.Input,
3144
+ args: [{
3145
+ isSignal: true,
3146
+ alias: "selectedLabel",
3147
+ required: false
3148
+ }]
3149
+ }],
3150
+ clearSelectionLabel: [{
3151
+ type: i0.Input,
3152
+ args: [{
3153
+ isSignal: true,
3154
+ alias: "clearSelectionLabel",
3155
+ required: false
3156
+ }]
3157
+ }],
3158
+ columnsLabel: [{
3159
+ type: i0.Input,
3160
+ args: [{
3161
+ isSignal: true,
3162
+ alias: "columnsLabel",
3163
+ required: false
3164
+ }]
3165
+ }],
2385
3166
  filterChange: [{
2386
3167
  type: i0.Output,
2387
3168
  args: ["filterChange"]
2388
3169
  }],
3170
+ state: [{
3171
+ type: i0.Input,
3172
+ args: [{
3173
+ isSignal: true,
3174
+ alias: "state",
3175
+ required: false
3176
+ }]
3177
+ }],
3178
+ stateChange: [{
3179
+ type: i0.Output,
3180
+ args: ["stateChange"]
3181
+ }],
2389
3182
  rowClick: [{
2390
3183
  type: i0.Output,
2391
3184
  args: ["rowClick"]
@@ -2481,6 +3274,10 @@ i0.ɵɵngDeclareClassMetadata({
2481
3274
  type: i0.ContentChildren,
2482
3275
  args: [i0.forwardRef(() => WrTableCell), { isSignal: true }]
2483
3276
  }],
3277
+ editTemplates: [{
3278
+ type: i0.ContentChildren,
3279
+ args: [i0.forwardRef(() => WrTableEditCell), { isSignal: true }]
3280
+ }],
2484
3281
  headerCells: [{
2485
3282
  type: i0.ViewChildren,
2486
3283
  args: ["thCell", { isSignal: true }]
@@ -2509,6 +3306,14 @@ i0.ɵɵngDeclareClassMetadata({
2509
3306
  type: i0.ViewChild,
2510
3307
  args: ["foot", { isSignal: true }]
2511
3308
  }],
3309
+ selectionBarTpl: [{
3310
+ type: i0.ContentChild,
3311
+ args: [i0.forwardRef(() => WrTableSelectionBar), { isSignal: true }]
3312
+ }],
3313
+ selectionBarEl: [{
3314
+ type: i0.ViewChild,
3315
+ args: ["selectionBarEl", { isSignal: true }]
3316
+ }],
2512
3317
  expandTpl: [{
2513
3318
  type: i0.ContentChild,
2514
3319
  args: [i0.forwardRef(() => WrTableExpand), { isSignal: true }]
@@ -2517,6 +3322,18 @@ i0.ɵɵngDeclareClassMetadata({
2517
3322
  type: i0.ViewChildren,
2518
3323
  args: ["rowEl", { isSignal: true }]
2519
3324
  }],
3325
+ editable: [{
3326
+ type: i0.Input,
3327
+ args: [{
3328
+ isSignal: true,
3329
+ alias: "editable",
3330
+ required: false
3331
+ }]
3332
+ }],
3333
+ cellEdit: [{
3334
+ type: i0.Output,
3335
+ args: ["cellEdit"]
3336
+ }],
2520
3337
  groupTpl: [{
2521
3338
  type: i0.ContentChild,
2522
3339
  args: [i0.forwardRef(() => WrTableGroupHeader), { isSignal: true }]
@@ -2567,6 +3384,6 @@ function wrSortRows(rows, sort, accessor = wrReadField) {
2567
3384
  return 0;
2568
3385
  });
2569
3386
  }
2570
- export { WrTable, WrTableCell, WrTableExpand, WrTableFilter, WrTableGroupHeader, WrTableSort, wrReadField, wrSortRows };
3387
+ export { WrTable, WrTableCell, WrTableEditCell, WrTableExpand, WrTableFilter, WrTableGroupHeader, WrTableSelectionBar, WrTableSort, wrReadField, wrSortRows };
2571
3388
 
2572
3389
  //# sourceMappingURL=ngwr-table.mjs.map