ngwr 16.2.0 → 16.4.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 (418) hide show
  1. package/badge/styles/_tag.scss +73 -1
  2. package/calendar/styles/_index.scss +22 -0
  3. package/carousel/styles/_index.scss +53 -1
  4. package/cascader/styles/_rules.scss +7 -0
  5. package/color-picker/styles/_index.scss +21 -0
  6. package/date-picker/styles/_index.scss +19 -0
  7. package/dropdown/styles/_index.scss +13 -19
  8. package/fesm2022/ngwr-affix.mjs +3 -3
  9. package/fesm2022/ngwr-alert-testing.mjs +70 -0
  10. package/fesm2022/ngwr-alert-testing.mjs.map +1 -0
  11. package/fesm2022/ngwr-alert.mjs +3 -3
  12. package/fesm2022/ngwr-anchor.mjs +17 -6
  13. package/fesm2022/ngwr-anchor.mjs.map +1 -1
  14. package/fesm2022/ngwr-animations-aurora.mjs +3 -3
  15. package/fesm2022/ngwr-animations-blur-reveal.mjs +3 -3
  16. package/fesm2022/ngwr-animations-click-sparks.mjs +3 -3
  17. package/fesm2022/ngwr-animations-confetti.mjs +3 -3
  18. package/fesm2022/ngwr-animations-decode.mjs +3 -3
  19. package/fesm2022/ngwr-animations-destruct.mjs +3 -3
  20. package/fesm2022/ngwr-animations-dot-grid.mjs +3 -3
  21. package/fesm2022/ngwr-animations-falling-letters.mjs +3 -3
  22. package/fesm2022/ngwr-animations-flow-lines.mjs +3 -3
  23. package/fesm2022/ngwr-animations-fluid-cursor.mjs +3 -3
  24. package/fesm2022/ngwr-animations-glitch.mjs +3 -3
  25. package/fesm2022/ngwr-animations-glow-border.mjs +3 -3
  26. package/fesm2022/ngwr-animations-gradient-flow.mjs +3 -3
  27. package/fesm2022/ngwr-animations-marquee.mjs +3 -3
  28. package/fesm2022/ngwr-animations-orbit.mjs +3 -3
  29. package/fesm2022/ngwr-animations-reveal.mjs +3 -3
  30. package/fesm2022/ngwr-animations-ripple-grid.mjs +3 -3
  31. package/fesm2022/ngwr-animations-rotate-reveal.mjs +3 -3
  32. package/fesm2022/ngwr-animations-shimmer.mjs +3 -3
  33. package/fesm2022/ngwr-animations-spotlight.mjs +3 -3
  34. package/fesm2022/ngwr-animations-thread-lines.mjs +3 -3
  35. package/fesm2022/ngwr-animations-tilt.mjs +3 -3
  36. package/fesm2022/ngwr-animations-typewriter.mjs +3 -3
  37. package/fesm2022/ngwr-avatar.mjs +3 -3
  38. package/fesm2022/ngwr-back-top.mjs +3 -3
  39. package/fesm2022/ngwr-badge.mjs +129 -11
  40. package/fesm2022/ngwr-badge.mjs.map +1 -1
  41. package/fesm2022/ngwr-breadcrumbs-testing.mjs +83 -0
  42. package/fesm2022/ngwr-breadcrumbs-testing.mjs.map +1 -0
  43. package/fesm2022/ngwr-breadcrumbs.mjs +8 -8
  44. package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
  45. package/fesm2022/ngwr-burger-testing.mjs +45 -0
  46. package/fesm2022/ngwr-burger-testing.mjs.map +1 -0
  47. package/fesm2022/ngwr-burger.mjs +3 -3
  48. package/fesm2022/ngwr-button.mjs +6 -6
  49. package/fesm2022/ngwr-calendar-testing.mjs +18 -0
  50. package/fesm2022/ngwr-calendar-testing.mjs.map +1 -1
  51. package/fesm2022/ngwr-calendar.mjs +500 -73
  52. package/fesm2022/ngwr-calendar.mjs.map +1 -1
  53. package/fesm2022/ngwr-card.mjs +9 -9
  54. package/fesm2022/ngwr-carousel-testing.mjs +24 -1
  55. package/fesm2022/ngwr-carousel-testing.mjs.map +1 -1
  56. package/fesm2022/ngwr-carousel.mjs +73 -10
  57. package/fesm2022/ngwr-carousel.mjs.map +1 -1
  58. package/fesm2022/ngwr-cascader.mjs +45 -37
  59. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  60. package/fesm2022/ngwr-charts-bar-chart.mjs +5 -4
  61. package/fesm2022/ngwr-charts-bar-chart.mjs.map +1 -1
  62. package/fesm2022/ngwr-charts-boxplot-chart.mjs +3 -3
  63. package/fesm2022/ngwr-charts-bullet-chart.mjs +3 -3
  64. package/fesm2022/ngwr-charts-calendar-heatmap.mjs +3 -3
  65. package/fesm2022/ngwr-charts-candlestick-chart.mjs +3 -3
  66. package/fesm2022/ngwr-charts-chart-legend.mjs +26 -11
  67. package/fesm2022/ngwr-charts-chart-legend.mjs.map +1 -1
  68. package/fesm2022/ngwr-charts-core.mjs +3 -3
  69. package/fesm2022/ngwr-charts-donut-chart.mjs +5 -4
  70. package/fesm2022/ngwr-charts-donut-chart.mjs.map +1 -1
  71. package/fesm2022/ngwr-charts-funnel-chart.mjs +3 -3
  72. package/fesm2022/ngwr-charts-gauge.mjs +3 -3
  73. package/fesm2022/ngwr-charts-heatmap-chart.mjs +3 -3
  74. package/fesm2022/ngwr-charts-line-chart-testing.mjs +3 -2
  75. package/fesm2022/ngwr-charts-line-chart-testing.mjs.map +1 -1
  76. package/fesm2022/ngwr-charts-line-chart.mjs +17 -7
  77. package/fesm2022/ngwr-charts-line-chart.mjs.map +1 -1
  78. package/fesm2022/ngwr-charts-meter-group.mjs +5 -4
  79. package/fesm2022/ngwr-charts-meter-group.mjs.map +1 -1
  80. package/fesm2022/ngwr-charts-radar-chart.mjs +5 -4
  81. package/fesm2022/ngwr-charts-radar-chart.mjs.map +1 -1
  82. package/fesm2022/ngwr-charts-scatter-chart.mjs +5 -4
  83. package/fesm2022/ngwr-charts-scatter-chart.mjs.map +1 -1
  84. package/fesm2022/ngwr-charts-sparkline.mjs +3 -3
  85. package/fesm2022/ngwr-charts-treemap-chart.mjs +3 -3
  86. package/fesm2022/ngwr-charts-waterfall-chart.mjs +3 -3
  87. package/fesm2022/ngwr-checkbox.mjs +6 -6
  88. package/fesm2022/ngwr-clipboard.mjs +3 -3
  89. package/fesm2022/ngwr-collapse.mjs +9 -9
  90. package/fesm2022/ngwr-color-picker-testing.mjs +11 -1
  91. package/fesm2022/ngwr-color-picker-testing.mjs.map +1 -1
  92. package/fesm2022/ngwr-color-picker.mjs +153 -37
  93. package/fesm2022/ngwr-color-picker.mjs.map +1 -1
  94. package/fesm2022/ngwr-command-palette.mjs +3 -3
  95. package/fesm2022/ngwr-comment.mjs +10 -6
  96. package/fesm2022/ngwr-comment.mjs.map +1 -1
  97. package/fesm2022/ngwr-compare-testing.mjs +84 -0
  98. package/fesm2022/ngwr-compare-testing.mjs.map +1 -0
  99. package/fesm2022/ngwr-compare.mjs +3 -3
  100. package/fesm2022/ngwr-context-menu.mjs +28 -13
  101. package/fesm2022/ngwr-context-menu.mjs.map +1 -1
  102. package/fesm2022/ngwr-cookie.mjs +3 -3
  103. package/fesm2022/ngwr-copy-value.mjs +3 -3
  104. package/fesm2022/ngwr-counter.mjs +6 -6
  105. package/fesm2022/ngwr-date-picker-testing.mjs +30 -4
  106. package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
  107. package/fesm2022/ngwr-date-picker.mjs +342 -69
  108. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  109. package/fesm2022/ngwr-date-stamp.mjs +3 -3
  110. package/fesm2022/ngwr-date.mjs +59 -8
  111. package/fesm2022/ngwr-date.mjs.map +1 -1
  112. package/fesm2022/ngwr-density.mjs +6 -6
  113. package/fesm2022/ngwr-descriptions.mjs +6 -6
  114. package/fesm2022/ngwr-dialog.mjs +18 -18
  115. package/fesm2022/ngwr-directives.mjs +15 -15
  116. package/fesm2022/ngwr-divider.mjs +3 -3
  117. package/fesm2022/ngwr-drawer.mjs +51 -29
  118. package/fesm2022/ngwr-drawer.mjs.map +1 -1
  119. package/fesm2022/ngwr-dropdown-testing.mjs +11 -3
  120. package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -1
  121. package/fesm2022/ngwr-dropdown.mjs +70 -99
  122. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  123. package/fesm2022/ngwr-editor.mjs +4 -3
  124. package/fesm2022/ngwr-editor.mjs.map +1 -1
  125. package/fesm2022/ngwr-empty.mjs +3 -3
  126. package/fesm2022/ngwr-event-calendar.mjs +186 -33
  127. package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
  128. package/fesm2022/ngwr-file-upload-testing.mjs +34 -2
  129. package/fesm2022/ngwr-file-upload-testing.mjs.map +1 -1
  130. package/fesm2022/ngwr-file-upload.mjs +279 -16
  131. package/fesm2022/ngwr-file-upload.mjs.map +1 -1
  132. package/fesm2022/ngwr-form.mjs +9 -9
  133. package/fesm2022/ngwr-form.mjs.map +1 -1
  134. package/fesm2022/ngwr-graph-testing.mjs +30 -0
  135. package/fesm2022/ngwr-graph-testing.mjs.map +1 -1
  136. package/fesm2022/ngwr-graph.mjs +664 -43
  137. package/fesm2022/ngwr-graph.mjs.map +1 -1
  138. package/fesm2022/ngwr-hotkey.mjs +6 -6
  139. package/fesm2022/ngwr-i18n-ar.mjs +27 -8
  140. package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
  141. package/fesm2022/ngwr-i18n-cs.mjs +27 -8
  142. package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
  143. package/fesm2022/ngwr-i18n-de.mjs +27 -8
  144. package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
  145. package/fesm2022/ngwr-i18n-en.mjs +27 -8
  146. package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
  147. package/fesm2022/ngwr-i18n-es.mjs +27 -8
  148. package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
  149. package/fesm2022/ngwr-i18n-fr.mjs +27 -8
  150. package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
  151. package/fesm2022/ngwr-i18n-he.mjs +27 -8
  152. package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
  153. package/fesm2022/ngwr-i18n-hi.mjs +27 -8
  154. package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
  155. package/fesm2022/ngwr-i18n-id.mjs +27 -8
  156. package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
  157. package/fesm2022/ngwr-i18n-it.mjs +27 -8
  158. package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
  159. package/fesm2022/ngwr-i18n-ja.mjs +27 -8
  160. package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
  161. package/fesm2022/ngwr-i18n-ko.mjs +27 -8
  162. package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
  163. package/fesm2022/ngwr-i18n-nl.mjs +27 -8
  164. package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
  165. package/fesm2022/ngwr-i18n-pl.mjs +27 -8
  166. package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
  167. package/fesm2022/ngwr-i18n-pt.mjs +27 -8
  168. package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
  169. package/fesm2022/ngwr-i18n-ru.mjs +27 -8
  170. package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
  171. package/fesm2022/ngwr-i18n-sv.mjs +27 -8
  172. package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
  173. package/fesm2022/ngwr-i18n-tr.mjs +27 -8
  174. package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
  175. package/fesm2022/ngwr-i18n-uk.mjs +27 -8
  176. package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
  177. package/fesm2022/ngwr-i18n-vi.mjs +27 -8
  178. package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
  179. package/fesm2022/ngwr-i18n-zh-tw.mjs +27 -8
  180. package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
  181. package/fesm2022/ngwr-i18n-zh.mjs +27 -8
  182. package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
  183. package/fesm2022/ngwr-i18n.mjs +9 -9
  184. package/fesm2022/ngwr-icon.mjs +6 -6
  185. package/fesm2022/ngwr-image-cropper.mjs +3 -3
  186. package/fesm2022/ngwr-input-number-testing.mjs +11 -0
  187. package/fesm2022/ngwr-input-number-testing.mjs.map +1 -1
  188. package/fesm2022/ngwr-input-number.mjs +68 -7
  189. package/fesm2022/ngwr-input-number.mjs.map +1 -1
  190. package/fesm2022/ngwr-input-otp.mjs +23 -3
  191. package/fesm2022/ngwr-input-otp.mjs.map +1 -1
  192. package/fesm2022/ngwr-input-testing.mjs +24 -1
  193. package/fesm2022/ngwr-input-testing.mjs.map +1 -1
  194. package/fesm2022/ngwr-input.mjs +152 -36
  195. package/fesm2022/ngwr-input.mjs.map +1 -1
  196. package/fesm2022/ngwr-keyboard.mjs +3 -3
  197. package/fesm2022/ngwr-knob.mjs +3 -3
  198. package/fesm2022/ngwr-layout.mjs +15 -15
  199. package/fesm2022/ngwr-lightbox.mjs +8 -8
  200. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  201. package/fesm2022/ngwr-list.mjs +8 -8
  202. package/fesm2022/ngwr-list.mjs.map +1 -1
  203. package/fesm2022/ngwr-load-state.mjs +15 -15
  204. package/fesm2022/ngwr-loading-bar.mjs +6 -6
  205. package/fesm2022/ngwr-mention.mjs +6 -6
  206. package/fesm2022/ngwr-meta.mjs +6 -6
  207. package/fesm2022/ngwr-overlay.mjs +175 -13
  208. package/fesm2022/ngwr-overlay.mjs.map +1 -1
  209. package/fesm2022/ngwr-page-header.mjs +3 -3
  210. package/fesm2022/ngwr-pagination.mjs +6 -3
  211. package/fesm2022/ngwr-pagination.mjs.map +1 -1
  212. package/fesm2022/ngwr-pipes.mjs +31 -29
  213. package/fesm2022/ngwr-pipes.mjs.map +1 -1
  214. package/fesm2022/ngwr-platform.mjs +9 -9
  215. package/fesm2022/ngwr-popconfirm-testing.mjs +5 -2
  216. package/fesm2022/ngwr-popconfirm-testing.mjs.map +1 -1
  217. package/fesm2022/ngwr-popconfirm.mjs +44 -63
  218. package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
  219. package/fesm2022/ngwr-popover-testing.mjs +7 -1
  220. package/fesm2022/ngwr-popover-testing.mjs.map +1 -1
  221. package/fesm2022/ngwr-popover.mjs +58 -156
  222. package/fesm2022/ngwr-popover.mjs.map +1 -1
  223. package/fesm2022/ngwr-progress.mjs +50 -9
  224. package/fesm2022/ngwr-progress.mjs.map +1 -1
  225. package/fesm2022/ngwr-pull-to-refresh-testing.mjs +57 -0
  226. package/fesm2022/ngwr-pull-to-refresh-testing.mjs.map +1 -0
  227. package/fesm2022/ngwr-pull-to-refresh.mjs +3 -3
  228. package/fesm2022/ngwr-qr.mjs +3 -3
  229. package/fesm2022/ngwr-radio.mjs +6 -6
  230. package/fesm2022/ngwr-rating.mjs +3 -3
  231. package/fesm2022/ngwr-resizable-testing.mjs +113 -0
  232. package/fesm2022/ngwr-resizable-testing.mjs.map +1 -0
  233. package/fesm2022/ngwr-resizable.mjs +3 -3
  234. package/fesm2022/ngwr-result.mjs +12 -12
  235. package/fesm2022/ngwr-schema-form-testing.mjs +336 -0
  236. package/fesm2022/ngwr-schema-form-testing.mjs.map +1 -0
  237. package/fesm2022/ngwr-schema-form.mjs +416 -19
  238. package/fesm2022/ngwr-schema-form.mjs.map +1 -1
  239. package/fesm2022/ngwr-scroll.mjs +3 -3
  240. package/fesm2022/ngwr-segmented.mjs +3 -3
  241. package/fesm2022/ngwr-select-testing.mjs +19 -0
  242. package/fesm2022/ngwr-select-testing.mjs.map +1 -1
  243. package/fesm2022/ngwr-select.mjs +361 -84
  244. package/fesm2022/ngwr-select.mjs.map +1 -1
  245. package/fesm2022/ngwr-sidebar-testing.mjs +176 -0
  246. package/fesm2022/ngwr-sidebar-testing.mjs.map +1 -0
  247. package/fesm2022/ngwr-sidebar.mjs +3 -3
  248. package/fesm2022/ngwr-skeleton.mjs +3 -3
  249. package/fesm2022/ngwr-slider-testing.mjs +6 -0
  250. package/fesm2022/ngwr-slider-testing.mjs.map +1 -1
  251. package/fesm2022/ngwr-slider.mjs +21 -3
  252. package/fesm2022/ngwr-slider.mjs.map +1 -1
  253. package/fesm2022/ngwr-sortable-list.mjs +29 -12
  254. package/fesm2022/ngwr-sortable-list.mjs.map +1 -1
  255. package/fesm2022/ngwr-speed-dial.mjs +3 -3
  256. package/fesm2022/ngwr-spinner.mjs +3 -3
  257. package/fesm2022/ngwr-splitter.mjs +3 -3
  258. package/fesm2022/ngwr-statistic.mjs +9 -9
  259. package/fesm2022/ngwr-stepper.mjs +42 -11
  260. package/fesm2022/ngwr-stepper.mjs.map +1 -1
  261. package/fesm2022/ngwr-storage.mjs +3 -3
  262. package/fesm2022/ngwr-switch.mjs +3 -3
  263. package/fesm2022/ngwr-table-testing.mjs +157 -3
  264. package/fesm2022/ngwr-table-testing.mjs.map +1 -1
  265. package/fesm2022/ngwr-table.mjs +1051 -74
  266. package/fesm2022/ngwr-table.mjs.map +1 -1
  267. package/fesm2022/ngwr-tabs-router.mjs +3 -3
  268. package/fesm2022/ngwr-tabs-testing.mjs +1 -1
  269. package/fesm2022/ngwr-tabs-testing.mjs.map +1 -1
  270. package/fesm2022/ngwr-tabs.mjs +15 -10
  271. package/fesm2022/ngwr-tabs.mjs.map +1 -1
  272. package/fesm2022/ngwr-textarea-testing.mjs +11 -0
  273. package/fesm2022/ngwr-textarea-testing.mjs.map +1 -1
  274. package/fesm2022/ngwr-textarea.mjs +128 -16
  275. package/fesm2022/ngwr-textarea.mjs.map +1 -1
  276. package/fesm2022/ngwr-theme.mjs +3 -3
  277. package/fesm2022/ngwr-timeline.mjs +6 -6
  278. package/fesm2022/ngwr-toast.mjs +40 -19
  279. package/fesm2022/ngwr-toast.mjs.map +1 -1
  280. package/fesm2022/ngwr-toolbar.mjs +3 -3
  281. package/fesm2022/ngwr-tour-testing.mjs +13 -1
  282. package/fesm2022/ngwr-tour-testing.mjs.map +1 -1
  283. package/fesm2022/ngwr-tour.mjs +19 -15
  284. package/fesm2022/ngwr-tour.mjs.map +1 -1
  285. package/fesm2022/ngwr-transfer-testing.mjs +6 -0
  286. package/fesm2022/ngwr-transfer-testing.mjs.map +1 -1
  287. package/fesm2022/ngwr-transfer.mjs +24 -5
  288. package/fesm2022/ngwr-transfer.mjs.map +1 -1
  289. package/fesm2022/ngwr-tree-testing.mjs +62 -2
  290. package/fesm2022/ngwr-tree-testing.mjs.map +1 -1
  291. package/fesm2022/ngwr-tree.mjs +978 -79
  292. package/fesm2022/ngwr-tree.mjs.map +1 -1
  293. package/fesm2022/ngwr-typography.mjs +3 -3
  294. package/fesm2022/ngwr-utils-router.mjs +3 -3
  295. package/fesm2022/ngwr-utils.mjs +97 -1
  296. package/fesm2022/ngwr-utils.mjs.map +1 -1
  297. package/fesm2022/ngwr-version.mjs +1 -1
  298. package/fesm2022/ngwr-version.mjs.map +1 -1
  299. package/fesm2022/ngwr-virtual-scroll.mjs +3 -3
  300. package/fesm2022/ngwr-window.mjs +33 -22
  301. package/fesm2022/ngwr-window.mjs.map +1 -1
  302. package/file-upload/styles/_index.scss +156 -0
  303. package/graph/styles/_index.scss +87 -0
  304. package/i18n/ar.json +29 -8
  305. package/i18n/cs.json +29 -8
  306. package/i18n/de.json +29 -8
  307. package/i18n/en.json +29 -8
  308. package/i18n/es.json +29 -8
  309. package/i18n/fr.json +29 -8
  310. package/i18n/he.json +29 -8
  311. package/i18n/hi.json +29 -8
  312. package/i18n/id.json +29 -8
  313. package/i18n/it.json +29 -8
  314. package/i18n/ja.json +29 -8
  315. package/i18n/ko.json +29 -8
  316. package/i18n/nl.json +29 -8
  317. package/i18n/pl.json +29 -8
  318. package/i18n/pt.json +29 -8
  319. package/i18n/ru.json +29 -8
  320. package/i18n/sv.json +29 -8
  321. package/i18n/tr.json +29 -8
  322. package/i18n/uk.json +29 -8
  323. package/i18n/vi.json +29 -8
  324. package/i18n/zh-TW.json +29 -8
  325. package/i18n/zh.json +29 -8
  326. package/input/styles/_index.scss +68 -1
  327. package/input-otp/styles/_index.scss +14 -0
  328. package/llms-full.txt +53 -21
  329. package/llms.txt +57 -24
  330. package/overlay/styles/_arrow.scss +4 -4
  331. package/package.json +33 -1
  332. package/popconfirm/styles/_index.scss +3 -11
  333. package/progress/styles/_index.scss +32 -0
  334. package/schema-form/styles/_index.scss +78 -0
  335. package/schematics/collection.json +5 -0
  336. package/schematics/eject/index.js +158 -0
  337. package/schematics/eject/schema.js +8 -0
  338. package/schematics/eject/schema.json +24 -0
  339. package/schematics/eject/source.js +295 -0
  340. package/schematics/use/rule.js +2 -0
  341. package/schematics/use/symbol-map.json +5 -0
  342. package/select/styles/_index.scss +127 -22
  343. package/skills/ngwr/SKILL.md +31 -4
  344. package/skills/ngwr/references/catalog.md +9 -1
  345. package/slider/styles/_index.scss +22 -0
  346. package/table/styles/_index.scss +191 -3
  347. package/textarea/styles/_index.scss +80 -0
  348. package/theme/styles/_focus.scss +16 -1
  349. package/theme/styles/_motion.scss +5 -0
  350. package/transfer/styles/_index.scss +84 -0
  351. package/tree/styles/_index.scss +138 -5
  352. package/types/ngwr-alert-testing.d.ts +88 -0
  353. package/types/ngwr-badge.d.ts +72 -2
  354. package/types/ngwr-breadcrumbs-testing.d.ts +92 -0
  355. package/types/ngwr-burger-testing.d.ts +51 -0
  356. package/types/ngwr-calendar-testing.d.ts +18 -6
  357. package/types/ngwr-calendar.d.ts +272 -22
  358. package/types/ngwr-carousel-testing.d.ts +27 -6
  359. package/types/ngwr-carousel.d.ts +42 -6
  360. package/types/ngwr-cascader.d.ts +13 -6
  361. package/types/ngwr-charts-chart-legend.d.ts +9 -4
  362. package/types/ngwr-charts-line-chart-testing.d.ts +4 -1
  363. package/types/ngwr-charts-line-chart.d.ts +7 -4
  364. package/types/ngwr-color-picker-testing.d.ts +15 -4
  365. package/types/ngwr-color-picker.d.ts +76 -6
  366. package/types/ngwr-compare-testing.d.ts +72 -0
  367. package/types/ngwr-context-menu.d.ts +2 -0
  368. package/types/ngwr-date-picker-testing.d.ts +23 -8
  369. package/types/ngwr-date-picker.d.ts +100 -9
  370. package/types/ngwr-date.d.ts +71 -1
  371. package/types/ngwr-drawer.d.ts +9 -0
  372. package/types/ngwr-dropdown-testing.d.ts +20 -0
  373. package/types/ngwr-dropdown.d.ts +26 -6
  374. package/types/ngwr-event-calendar.d.ts +66 -8
  375. package/types/ngwr-file-upload-testing.d.ts +31 -2
  376. package/types/ngwr-file-upload.d.ts +156 -3
  377. package/types/ngwr-form.d.ts +47 -3
  378. package/types/ngwr-graph-testing.d.ts +36 -3
  379. package/types/ngwr-graph.d.ts +309 -13
  380. package/types/ngwr-input-number-testing.d.ts +10 -0
  381. package/types/ngwr-input-number.d.ts +30 -1
  382. package/types/ngwr-input-otp.d.ts +10 -0
  383. package/types/ngwr-input-testing.d.ts +30 -0
  384. package/types/ngwr-input.d.ts +54 -3
  385. package/types/ngwr-overlay.d.ts +84 -5
  386. package/types/ngwr-pipes.d.ts +2 -1
  387. package/types/ngwr-popconfirm-testing.d.ts +12 -3
  388. package/types/ngwr-popconfirm.d.ts +28 -3
  389. package/types/ngwr-popover-testing.d.ts +19 -2
  390. package/types/ngwr-popover.d.ts +22 -2
  391. package/types/ngwr-progress.d.ts +29 -1
  392. package/types/ngwr-pull-to-refresh-testing.d.ts +83 -0
  393. package/types/ngwr-resizable-testing.d.ts +116 -0
  394. package/types/ngwr-schema-form-testing.d.ts +260 -0
  395. package/types/ngwr-schema-form.d.ts +76 -6
  396. package/types/ngwr-select-testing.d.ts +20 -0
  397. package/types/ngwr-select.d.ts +149 -11
  398. package/types/ngwr-sidebar-testing.d.ts +176 -0
  399. package/types/ngwr-slider-testing.d.ts +3 -1
  400. package/types/ngwr-slider.d.ts +21 -1
  401. package/types/ngwr-sortable-list.d.ts +6 -0
  402. package/types/ngwr-stepper.d.ts +20 -11
  403. package/types/ngwr-table-testing.d.ts +122 -7
  404. package/types/ngwr-table.d.ts +572 -50
  405. package/types/ngwr-tabs-testing.d.ts +14 -17
  406. package/types/ngwr-tabs.d.ts +6 -0
  407. package/types/ngwr-textarea-testing.d.ts +10 -0
  408. package/types/ngwr-textarea.d.ts +48 -2
  409. package/types/ngwr-toast.d.ts +8 -1
  410. package/types/ngwr-tour-testing.d.ts +10 -0
  411. package/types/ngwr-tour.d.ts +11 -2
  412. package/types/ngwr-transfer-testing.d.ts +3 -0
  413. package/types/ngwr-transfer.d.ts +24 -1
  414. package/types/ngwr-tree-testing.d.ts +65 -1
  415. package/types/ngwr-tree.d.ts +335 -12
  416. package/types/ngwr-utils.d.ts +107 -1
  417. package/types/ngwr-version.d.ts +1 -1
  418. 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,228 @@ 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 WrTableColumnChooser = class WrTableColumnChooser {
100
+ constructor() {
101
+ if (typeof ngDevMode === "undefined" || ngDevMode) wrCheckStyles("table");
102
+ }
103
+ table = input.required(...ngDevMode ? [{ debugName: "table" }] : /* istanbul ignore next */ []);
104
+ showAllLabel = input(null, ...ngDevMode ? [{ debugName: "showAllLabel" }] : /* istanbul ignore next */ []);
105
+ ariaLabel = input(null, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
106
+ resolvedShowAll = useI18nText(this.showAllLabel, "table.showAllColumns", "Show all");
107
+ resolvedLabel = useI18nText(this.ariaLabel, "table.columns", "Columns");
108
+ columns = computed(() => this.table().chooserColumns(), ...ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []);
109
+ showAllState = computed(() => {
110
+ const hideable = this.columns().filter((c) => c.hideable);
111
+ const hidden = hideable.filter((c) => c.hidden).length;
112
+ if (hidden === 0) return "all";
113
+ return hidden === hideable.length ? "none" : "some";
114
+ }, ...ngDevMode ? [{ debugName: "showAllState" }] : /* istanbul ignore next */ []);
115
+ showAllDisabled = computed(() => this.columns().every((c) => c.locked), ...ngDevMode ? [{ debugName: "showAllDisabled" }] : /* istanbul ignore next */ []);
116
+ toggleShowAll() {
117
+ const table = this.table();
118
+ if (this.showAllState() !== "all") return table.setHiddenColumns([]);
119
+ table.setHiddenColumns(this.columns().filter((c) => c.hideable).map((c) => c.key));
120
+ }
121
+ static ɵfac = i0.ɵɵngDeclareFactory({
122
+ minVersion: "12.0.0",
123
+ version: "22.2.6",
124
+ ngImport: i0,
125
+ type: WrTableColumnChooser,
126
+ deps: [],
127
+ target: i0.ɵɵFactoryTarget.Component
128
+ });
129
+ static ɵcmp = i0.ɵɵngDeclareComponent({
130
+ minVersion: "17.0.0",
131
+ version: "22.2.6",
132
+ type: WrTableColumnChooser,
133
+ isStandalone: true,
134
+ selector: "wr-table-column-chooser",
135
+ inputs: {
136
+ table: {
137
+ classPropertyName: "table",
138
+ publicName: "table",
139
+ isSignal: true,
140
+ isRequired: true,
141
+ transformFunction: null
142
+ },
143
+ showAllLabel: {
144
+ classPropertyName: "showAllLabel",
145
+ publicName: "showAllLabel",
146
+ isSignal: true,
147
+ isRequired: false,
148
+ transformFunction: null
149
+ },
150
+ ariaLabel: {
151
+ classPropertyName: "ariaLabel",
152
+ publicName: "ariaLabel",
153
+ isSignal: true,
154
+ isRequired: false,
155
+ transformFunction: null
156
+ }
157
+ },
158
+ host: {
159
+ attributes: { "role": "group" },
160
+ properties: { "attr.aria-label": "resolvedLabel()" },
161
+ classAttribute: "wr-table-column-chooser"
162
+ },
163
+ ngImport: i0,
164
+ template: "@if (columns().length > 0) {\n <wr-checkbox\n class=\"wr-table-column-chooser__all\"\n size=\"sm\"\n [checked]=\"showAllState() === 'all'\"\n [indeterminate]=\"showAllState() === 'some'\"\n [disabled]=\"showAllDisabled()\"\n (checkedChange)=\"toggleShowAll()\"\n >{{ resolvedShowAll() }}</wr-checkbox\n >\n}\n@for (entry of columns(); track entry.key) {\n <wr-checkbox\n class=\"wr-table-column-chooser__item wr-table__columns-item\"\n size=\"sm\"\n [checked]=\"!entry.hidden\"\n [disabled]=\"entry.locked\"\n (checkedChange)=\"table().toggleColumn(entry.key)\"\n >{{ entry.title }}</wr-checkbox\n >\n}\n",
165
+ dependencies: [{
166
+ kind: "component",
167
+ type: WrCheckbox,
168
+ selector: "wr-checkbox",
169
+ inputs: [
170
+ "id",
171
+ "checkboxValue",
172
+ "ariaLabel",
173
+ "ariaLabelledby",
174
+ "checked",
175
+ "disabled",
176
+ "readonly",
177
+ "size",
178
+ "icon",
179
+ "indeterminate"
180
+ ],
181
+ outputs: ["checkedChange", "touch"]
182
+ }],
183
+ encapsulation: i0.ViewEncapsulation.None
184
+ });
185
+ };
186
+ i0.ɵɵngDeclareClassMetadata({
187
+ minVersion: "12.0.0",
188
+ version: "22.2.6",
189
+ ngImport: i0,
190
+ type: WrTableColumnChooser,
191
+ decorators: [{
192
+ type: Component,
193
+ args: [{
194
+ selector: "wr-table-column-chooser",
195
+ encapsulation: ViewEncapsulation.None,
196
+ host: {
197
+ class: "wr-table-column-chooser",
198
+ role: "group",
199
+ "[attr.aria-label]": "resolvedLabel()"
200
+ },
201
+ imports: [WrCheckbox],
202
+ template: "@if (columns().length > 0) {\n <wr-checkbox\n class=\"wr-table-column-chooser__all\"\n size=\"sm\"\n [checked]=\"showAllState() === 'all'\"\n [indeterminate]=\"showAllState() === 'some'\"\n [disabled]=\"showAllDisabled()\"\n (checkedChange)=\"toggleShowAll()\"\n >{{ resolvedShowAll() }}</wr-checkbox\n >\n}\n@for (entry of columns(); track entry.key) {\n <wr-checkbox\n class=\"wr-table-column-chooser__item wr-table__columns-item\"\n size=\"sm\"\n [checked]=\"!entry.hidden\"\n [disabled]=\"entry.locked\"\n (checkedChange)=\"table().toggleColumn(entry.key)\"\n >{{ entry.title }}</wr-checkbox\n >\n}\n"
203
+ }]
204
+ }],
205
+ ctorParameters: () => [],
206
+ propDecorators: {
207
+ table: [{
208
+ type: i0.Input,
209
+ args: [{
210
+ isSignal: true,
211
+ alias: "table",
212
+ required: true
213
+ }]
214
+ }],
215
+ showAllLabel: [{
216
+ type: i0.Input,
217
+ args: [{
218
+ isSignal: true,
219
+ alias: "showAllLabel",
220
+ required: false
221
+ }]
222
+ }],
223
+ ariaLabel: [{
224
+ type: i0.Input,
225
+ args: [{
226
+ isSignal: true,
227
+ alias: "ariaLabel",
228
+ required: false
229
+ }]
230
+ }]
231
+ }
232
+ });
233
+ /**
234
+ * @license
235
+ *
236
+ * Use of this source code is governed by an MIT-style license that can be
237
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
238
+ */
239
+ var WrTableEditCell = class WrTableEditCell {
240
+ columnKey = input.required({
241
+ ...ngDevMode ? { debugName: "columnKey" } : /* istanbul ignore next */ {},
242
+ alias: "wrTableEditCell"
243
+ });
244
+ wrTableEditCellOf = input(void 0, ...ngDevMode ? [{ debugName: "wrTableEditCellOf" }] : /* istanbul ignore next */ []);
245
+ template = inject(TemplateRef);
246
+ static ngTemplateContextGuard(_dir, _ctx) {
247
+ return true;
248
+ }
249
+ static ɵfac = i0.ɵɵngDeclareFactory({
250
+ minVersion: "12.0.0",
251
+ version: "22.2.6",
252
+ ngImport: i0,
253
+ type: WrTableEditCell,
254
+ deps: [],
255
+ target: i0.ɵɵFactoryTarget.Directive
256
+ });
257
+ static ɵdir = i0.ɵɵngDeclareDirective({
258
+ minVersion: "17.1.0",
259
+ version: "22.2.6",
260
+ type: WrTableEditCell,
261
+ isStandalone: true,
262
+ selector: "[wrTableEditCell]",
263
+ inputs: {
264
+ columnKey: {
265
+ classPropertyName: "columnKey",
266
+ publicName: "wrTableEditCell",
267
+ isSignal: true,
268
+ isRequired: true,
269
+ transformFunction: null
270
+ },
271
+ wrTableEditCellOf: {
272
+ classPropertyName: "wrTableEditCellOf",
273
+ publicName: "wrTableEditCellOf",
274
+ isSignal: true,
275
+ isRequired: false,
276
+ transformFunction: null
277
+ }
278
+ },
279
+ ngImport: i0
280
+ });
281
+ };
282
+ i0.ɵɵngDeclareClassMetadata({
283
+ minVersion: "12.0.0",
284
+ version: "22.2.6",
285
+ ngImport: i0,
286
+ type: WrTableEditCell,
287
+ decorators: [{
288
+ type: Directive,
289
+ args: [{ selector: "[wrTableEditCell]" }]
290
+ }],
291
+ propDecorators: {
292
+ columnKey: [{
293
+ type: i0.Input,
294
+ args: [{
295
+ isSignal: true,
296
+ alias: "wrTableEditCell",
297
+ required: true
298
+ }]
299
+ }],
300
+ wrTableEditCellOf: [{
301
+ type: i0.Input,
302
+ args: [{
303
+ isSignal: true,
304
+ alias: "wrTableEditCellOf",
305
+ required: false
306
+ }]
307
+ }]
308
+ }
309
+ });
310
+ /**
311
+ * @license
312
+ *
313
+ * Use of this source code is governed by an MIT-style license that can be
314
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
315
+ */
98
316
  var WrTableExpand = class WrTableExpand {
99
317
  template = inject(TemplateRef);
100
318
  static ɵfac = i0.ɵɵngDeclareFactory({
101
319
  minVersion: "12.0.0",
102
- version: "22.2.5",
320
+ version: "22.2.6",
103
321
  ngImport: i0,
104
322
  type: WrTableExpand,
105
323
  deps: [],
@@ -107,7 +325,7 @@ var WrTableExpand = class WrTableExpand {
107
325
  });
108
326
  static ɵdir = i0.ɵɵngDeclareDirective({
109
327
  minVersion: "14.0.0",
110
- version: "22.2.5",
328
+ version: "22.2.6",
111
329
  type: WrTableExpand,
112
330
  isStandalone: true,
113
331
  selector: "ng-template[wrTableExpand]",
@@ -116,7 +334,7 @@ var WrTableExpand = class WrTableExpand {
116
334
  };
117
335
  i0.ɵɵngDeclareClassMetadata({
118
336
  minVersion: "12.0.0",
119
- version: "22.2.5",
337
+ version: "22.2.6",
120
338
  ngImport: i0,
121
339
  type: WrTableExpand,
122
340
  decorators: [{
@@ -131,6 +349,9 @@ i0.ɵɵngDeclareClassMetadata({
131
349
  * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
132
350
  */
133
351
  const selectionVersion = signal(0, ...ngDevMode ? [{ debugName: "selectionVersion" }] : /* istanbul ignore next */ []);
352
+ function markFilterSelectionChanged() {
353
+ selectionVersion.update((v) => v + 1);
354
+ }
134
355
  var WrTableFilter = class WrTableFilter {
135
356
  constructor() {
136
357
  if (typeof ngDevMode === "undefined" || ngDevMode) wrCheckStyles("table");
@@ -188,7 +409,7 @@ var WrTableFilter = class WrTableFilter {
188
409
  }
189
410
  static ɵfac = i0.ɵɵngDeclareFactory({
190
411
  minVersion: "12.0.0",
191
- version: "22.2.5",
412
+ version: "22.2.6",
192
413
  ngImport: i0,
193
414
  type: WrTableFilter,
194
415
  deps: [],
@@ -196,7 +417,7 @@ var WrTableFilter = class WrTableFilter {
196
417
  });
197
418
  static ɵcmp = i0.ɵɵngDeclareComponent({
198
419
  minVersion: "17.0.0",
199
- version: "22.2.5",
420
+ version: "22.2.6",
200
421
  type: WrTableFilter,
201
422
  isStandalone: true,
202
423
  selector: "wr-table-filter",
@@ -260,6 +481,7 @@ var WrTableFilter = class WrTableFilter {
260
481
  "trigger",
261
482
  "position",
262
483
  "arrow",
484
+ "wrDropdownDisabled",
263
485
  "panelClass"
264
486
  ],
265
487
  outputs: ["opened", "closed"],
@@ -275,7 +497,7 @@ var WrTableFilter = class WrTableFilter {
275
497
  };
276
498
  i0.ɵɵngDeclareClassMetadata({
277
499
  minVersion: "12.0.0",
278
- version: "22.2.5",
500
+ version: "22.2.6",
279
501
  ngImport: i0,
280
502
  type: WrTableFilter,
281
503
  decorators: [{
@@ -357,7 +579,7 @@ var WrTableGroupHeader = class WrTableGroupHeader {
357
579
  template = inject(TemplateRef);
358
580
  static ɵfac = i0.ɵɵngDeclareFactory({
359
581
  minVersion: "12.0.0",
360
- version: "22.2.5",
582
+ version: "22.2.6",
361
583
  ngImport: i0,
362
584
  type: WrTableGroupHeader,
363
585
  deps: [],
@@ -365,7 +587,7 @@ var WrTableGroupHeader = class WrTableGroupHeader {
365
587
  });
366
588
  static ɵdir = i0.ɵɵngDeclareDirective({
367
589
  minVersion: "14.0.0",
368
- version: "22.2.5",
590
+ version: "22.2.6",
369
591
  type: WrTableGroupHeader,
370
592
  isStandalone: true,
371
593
  selector: "ng-template[wrTableGroupHeader]",
@@ -374,7 +596,7 @@ var WrTableGroupHeader = class WrTableGroupHeader {
374
596
  };
375
597
  i0.ɵɵngDeclareClassMetadata({
376
598
  minVersion: "12.0.0",
377
- version: "22.2.5",
599
+ version: "22.2.6",
378
600
  ngImport: i0,
379
601
  type: WrTableGroupHeader,
380
602
  decorators: [{
@@ -388,6 +610,60 @@ i0.ɵɵngDeclareClassMetadata({
388
610
  * Use of this source code is governed by an MIT-style license that can be
389
611
  * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
390
612
  */
613
+ var WrTableSelectionBar = class WrTableSelectionBar {
614
+ wrTableSelectionBarOf = input(void 0, ...ngDevMode ? [{ debugName: "wrTableSelectionBarOf" }] : /* istanbul ignore next */ []);
615
+ template = inject(TemplateRef);
616
+ static ngTemplateContextGuard(_dir, _ctx) {
617
+ return true;
618
+ }
619
+ static ɵfac = i0.ɵɵngDeclareFactory({
620
+ minVersion: "12.0.0",
621
+ version: "22.2.6",
622
+ ngImport: i0,
623
+ type: WrTableSelectionBar,
624
+ deps: [],
625
+ target: i0.ɵɵFactoryTarget.Directive
626
+ });
627
+ static ɵdir = i0.ɵɵngDeclareDirective({
628
+ minVersion: "17.1.0",
629
+ version: "22.2.6",
630
+ type: WrTableSelectionBar,
631
+ isStandalone: true,
632
+ selector: "ng-template[wrTableSelectionBar]",
633
+ inputs: { wrTableSelectionBarOf: {
634
+ classPropertyName: "wrTableSelectionBarOf",
635
+ publicName: "wrTableSelectionBarOf",
636
+ isSignal: true,
637
+ isRequired: false,
638
+ transformFunction: null
639
+ } },
640
+ ngImport: i0
641
+ });
642
+ };
643
+ i0.ɵɵngDeclareClassMetadata({
644
+ minVersion: "12.0.0",
645
+ version: "22.2.6",
646
+ ngImport: i0,
647
+ type: WrTableSelectionBar,
648
+ decorators: [{
649
+ type: Directive,
650
+ args: [{ selector: "ng-template[wrTableSelectionBar]" }]
651
+ }],
652
+ propDecorators: { wrTableSelectionBarOf: [{
653
+ type: i0.Input,
654
+ args: [{
655
+ isSignal: true,
656
+ alias: "wrTableSelectionBarOf",
657
+ required: false
658
+ }]
659
+ }] }
660
+ });
661
+ /**
662
+ * @license
663
+ *
664
+ * Use of this source code is governed by an MIT-style license that can be
665
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
666
+ */
391
667
  var WrTableSort = class WrTableSort {
392
668
  constructor() {
393
669
  if (typeof ngDevMode === "undefined" || ngDevMode) wrCheckStyles("table");
@@ -401,7 +677,7 @@ var WrTableSort = class WrTableSort {
401
677
  }, ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
402
678
  static ɵfac = i0.ɵɵngDeclareFactory({
403
679
  minVersion: "12.0.0",
404
- version: "22.2.5",
680
+ version: "22.2.6",
405
681
  ngImport: i0,
406
682
  type: WrTableSort,
407
683
  deps: [],
@@ -409,7 +685,7 @@ var WrTableSort = class WrTableSort {
409
685
  });
410
686
  static ɵcmp = i0.ɵɵngDeclareComponent({
411
687
  minVersion: "17.0.0",
412
- version: "22.2.5",
688
+ version: "22.2.6",
413
689
  type: WrTableSort,
414
690
  isStandalone: true,
415
691
  selector: "wr-table-sort",
@@ -432,7 +708,7 @@ var WrTableSort = class WrTableSort {
432
708
  };
433
709
  i0.ɵɵngDeclareClassMetadata({
434
710
  minVersion: "12.0.0",
435
- version: "22.2.5",
711
+ version: "22.2.6",
436
712
  ngImport: i0,
437
713
  type: WrTableSort,
438
714
  decorators: [{
@@ -464,6 +740,28 @@ i0.ɵɵngDeclareClassMetadata({
464
740
  * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
465
741
  */
466
742
  const WR_TABLE_UNGROUPED = Symbol("wr-table-ungrouped");
743
+ var CellContext = class {
744
+ item;
745
+ column;
746
+ key;
747
+ constructor(item, column, key) {
748
+ this.item = item;
749
+ this.column = column;
750
+ this.key = key;
751
+ }
752
+ get $implicit() {
753
+ return this.item[this.key];
754
+ }
755
+ };
756
+ const EDITOR_FOCUSABLE = [
757
+ "input:not([disabled]):not([type=\"hidden\"])",
758
+ "select:not([disabled])",
759
+ "textarea:not([disabled])",
760
+ "button:not([disabled])",
761
+ "a[href]",
762
+ "[contenteditable]:not([contenteditable=\"false\"])",
763
+ "[tabindex]:not([tabindex=\"-1\"])"
764
+ ].join(", ");
467
765
  let tableUid = 0;
468
766
  const WR_TABLE_TOTAL_SCOPE = {
469
767
  scope: "total",
@@ -480,9 +778,13 @@ const ROW_CLICK_IGNORE = [
480
778
  "[contenteditable]:not([contenteditable=\"false\"])",
481
779
  "label",
482
780
  "[wrTableIgnoreRowClick]",
781
+ ".wr-table__td--editing",
483
782
  ".wr-table__td--select",
484
783
  ".wr-table__td--expand"
485
784
  ].join(", ");
785
+ function sameList(a, b) {
786
+ return a.length === b.length && a.every((value, i) => Object.is(value, b[i]));
787
+ }
486
788
  function noValue(value) {
487
789
  return value == null || value === "";
488
790
  }
@@ -549,6 +851,11 @@ var WrTable = class WrTable {
549
851
  transform: coerceBooleanProperty
550
852
  });
551
853
  columnOrder = model([], ...ngDevMode ? [{ debugName: "columnOrder" }] : /* istanbul ignore next */ []);
854
+ hiddenColumns = model([], ...ngDevMode ? [{ debugName: "hiddenColumns" }] : /* istanbul ignore next */ []);
855
+ columnChooser = input(false, {
856
+ ...ngDevMode ? { debugName: "columnChooser" } : /* istanbul ignore next */ {},
857
+ transform: coerceBooleanProperty
858
+ });
552
859
  rowSelection = input(null, ...ngDevMode ? [{ debugName: "rowSelection" }] : /* istanbul ignore next */ []);
553
860
  selectAllScope = input("page", ...ngDevMode ? [{ debugName: "selectAllScope" }] : /* istanbul ignore next */ []);
554
861
  rowClass = input(null, ...ngDevMode ? [{ debugName: "rowClass" }] : /* istanbul ignore next */ []);
@@ -577,8 +884,14 @@ var WrTable = class WrTable {
577
884
  selectGroupLabel = input(null, ...ngDevMode ? [{ debugName: "selectGroupLabel" }] : /* istanbul ignore next */ []);
578
885
  toggleGroupLabel = input(null, ...ngDevMode ? [{ debugName: "toggleGroupLabel" }] : /* istanbul ignore next */ []);
579
886
  loadingLabel = input(null, ...ngDevMode ? [{ debugName: "loadingLabel" }] : /* istanbul ignore next */ []);
887
+ selectedLabel = input(null, ...ngDevMode ? [{ debugName: "selectedLabel" }] : /* istanbul ignore next */ []);
888
+ clearSelectionLabel = input(null, ...ngDevMode ? [{ debugName: "clearSelectionLabel" }] : /* istanbul ignore next */ []);
889
+ columnsLabel = input(null, ...ngDevMode ? [{ debugName: "columnsLabel" }] : /* istanbul ignore next */ []);
580
890
  resolvedEmptyLabel = useI18nText(this.emptyLabel, "table.empty", "No data");
581
891
  resolvedLoadingLabel = useI18nText(this.loadingLabel, "table.loading", "Loading…");
892
+ resolvedColumnsLabel = useI18nText(this.columnsLabel, "table.columns", "Columns");
893
+ resolvedClearSelectionLabel = useI18nText(this.clearSelectionLabel, "table.clearSelection", "Clear selection");
894
+ selectedText = useI18nFormatter("table.selected", "{{count}} selected");
582
895
  sortText = useI18nFormatter("table.sort", "Sort {{column}}");
583
896
  sortLabelFor(column) {
584
897
  return this.sortLabel() ?? this.sortText({ column });
@@ -615,6 +928,49 @@ var WrTable = class WrTable {
615
928
  return `${this.actionId(action)} ${this.groupLabelId(groupId)}`;
616
929
  }
617
930
  filterChange = output();
931
+ state = input(null, ...ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []);
932
+ stateChange = output();
933
+ readerChanges = signal(0, ...ngDevMode ? [{ debugName: "readerChanges" }] : /* istanbul ignore next */ []);
934
+ emittedState = null;
935
+ currentState() {
936
+ const filters = {};
937
+ for (const [key, column] of Object.entries(this.columns())) {
938
+ const selected = column.filterItems?.filter((item) => item.selected).map((item) => item.value);
939
+ if (selected?.length) filters[key] = selected;
940
+ }
941
+ return {
942
+ sort: this.sort(),
943
+ filters,
944
+ page: this.page(),
945
+ pageSize: this.currentPageSize(),
946
+ columnOrder: this.columnOrder(),
947
+ hiddenColumns: this.hiddenColumns()
948
+ };
949
+ }
950
+ restoreState(state) {
951
+ const { sort, filters, page, pageSize, columnOrder, hiddenColumns } = state;
952
+ 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);
953
+ if (columnOrder && !sameList(columnOrder, this.columnOrder())) this.columnOrder.set(columnOrder);
954
+ if (hiddenColumns && !sameList(hiddenColumns, this.hiddenColumns())) this.hiddenColumns.set(hiddenColumns);
955
+ if (pageSize !== void 0 && pageSize !== this.currentPageSize()) {
956
+ this.currentPageSize.set(pageSize);
957
+ this.pageSizeChange.emit(pageSize);
958
+ }
959
+ if (page !== void 0 && page !== this.page()) this.page.set(page);
960
+ if (filters) {
961
+ let changed = false;
962
+ for (const [key, column] of Object.entries(this.columns())) {
963
+ const wanted = new Set(filters[key] ?? []);
964
+ for (const item of column.filterItems ?? []) {
965
+ const selected = wanted.has(item.value);
966
+ if (!!item.selected === selected) continue;
967
+ item.selected = selected;
968
+ changed = true;
969
+ }
970
+ }
971
+ if (changed) markFilterSelectionChanged();
972
+ }
973
+ }
618
974
  rowClick = output();
619
975
  onBodyClick(event) {
620
976
  const target = event.target;
@@ -686,6 +1042,11 @@ var WrTable = class WrTable {
686
1042
  this.currentPageSize.set(size);
687
1043
  this.page.set(Math.floor(firstRow / size) + 1);
688
1044
  this.pageSizeChange.emit(size);
1045
+ this.readerChanges.update((n) => n + 1);
1046
+ }
1047
+ onPagerPage(page) {
1048
+ this.page.set(page);
1049
+ this.readerChanges.update((n) => n + 1);
689
1050
  }
690
1051
  cellTemplates = contentChildren(WrTableCell, ...ngDevMode ? [{ debugName: "cellTemplates" }] : /* istanbul ignore next */ []);
691
1052
  cellMap = computed(() => {
@@ -693,13 +1054,19 @@ var WrTable = class WrTable {
693
1054
  for (const cell of this.cellTemplates()) map.set(cell.columnKey(), cell.template);
694
1055
  return map;
695
1056
  }, ...ngDevMode ? [{ debugName: "cellMap" }] : /* istanbul ignore next */ []);
1057
+ editTemplates = contentChildren(WrTableEditCell, ...ngDevMode ? [{ debugName: "editTemplates" }] : /* istanbul ignore next */ []);
1058
+ editMap = computed(() => {
1059
+ const map = /* @__PURE__ */ new Map();
1060
+ for (const cell of this.editTemplates()) map.set(cell.columnKey(), cell.template);
1061
+ return map;
1062
+ }, ...ngDevMode ? [{ debugName: "editMap" }] : /* istanbul ignore next */ []);
696
1063
  platformId = inject(PLATFORM_ID);
697
1064
  headerCells = viewChildren("thCell", ...ngDevMode ? [{ debugName: "headerCells" }] : /* istanbul ignore next */ []);
698
1065
  dir = inject(Directionality, { optional: true });
699
1066
  isRtl() {
700
1067
  return this.dir?.value === "rtl";
701
1068
  }
702
- displayColumns = computed(() => {
1069
+ orderedColumns = computed(() => {
703
1070
  const cols = this.columns();
704
1071
  const seen = /* @__PURE__ */ new Set();
705
1072
  const result = [];
@@ -718,7 +1085,44 @@ var WrTable = class WrTable {
718
1085
  seen.add(key);
719
1086
  }
720
1087
  return result;
1088
+ }, ...ngDevMode ? [{ debugName: "orderedColumns" }] : /* istanbul ignore next */ []);
1089
+ displayColumns = computed(() => {
1090
+ const ordered = this.orderedColumns();
1091
+ const hidden = new Set(this.hiddenColumns());
1092
+ if (hidden.size === 0) return ordered;
1093
+ const shown = ordered.filter((c) => c.column.hideable === false || !hidden.has(c.key));
1094
+ if (shown.length === ordered.length) return ordered;
1095
+ return shown.length > 0 ? shown : ordered.slice(0, 1);
721
1096
  }, ...ngDevMode ? [{ debugName: "displayColumns" }] : /* istanbul ignore next */ []);
1097
+ chooserColumns = computed(() => {
1098
+ const shown = new Set(this.displayColumns().map((c) => c.key));
1099
+ return this.orderedColumns().map(({ key, column }) => {
1100
+ const hidden = !shown.has(key);
1101
+ return {
1102
+ key,
1103
+ title: column.title || (column.headerHint ?? key),
1104
+ hidden,
1105
+ hideable: column.hideable !== false,
1106
+ locked: column.hideable === false || !hidden && shown.size === 1
1107
+ };
1108
+ });
1109
+ }, ...ngDevMode ? [{ debugName: "chooserColumns" }] : /* istanbul ignore next */ []);
1110
+ toggleColumn(key) {
1111
+ const entry = this.chooserColumns().find((c) => c.key === key);
1112
+ if (!entry || entry.locked) return;
1113
+ const hidden = this.hiddenColumns().filter((k) => k !== key);
1114
+ this.hiddenColumns.set(entry.hidden ? hidden : [...hidden, key]);
1115
+ this.readerChanges.update((n) => n + 1);
1116
+ }
1117
+ setHiddenColumns(keys) {
1118
+ const asked = new Set(keys);
1119
+ const ordered = this.orderedColumns();
1120
+ const next = ordered.filter((c) => c.column.hideable !== false).filter((c) => asked.has(c.key)).map((c) => c.key);
1121
+ if (ordered.length > 0 && next.length === ordered.length) next.shift();
1122
+ if (sameList(next, this.hiddenColumns())) return;
1123
+ this.hiddenColumns.set(next);
1124
+ this.readerChanges.update((n) => n + 1);
1125
+ }
722
1126
  pins = signal({
723
1127
  left: /* @__PURE__ */ new Map(),
724
1128
  right: /* @__PURE__ */ new Map(),
@@ -750,17 +1154,52 @@ var WrTable = class WrTable {
750
1154
  if (!tip.el.isConnected && untracked(this.tip) === tip) this.tip.set(null);
751
1155
  }, { injector: this.injector });
752
1156
  });
1157
+ effect(() => {
1158
+ const edit = this.editing();
1159
+ if (!edit) return;
1160
+ const column = this.cellColumns().some((c) => c.key === edit.key && c.editTemplate);
1161
+ if (column && this.dataRows().some((entry) => entry.row === edit.row)) return;
1162
+ const windowed = column && this.renderRows().some((entry) => entry.kind === "row" && entry.row === edit.row);
1163
+ untracked(() => this.endEdit(windowed, "inside"));
1164
+ });
1165
+ effect(() => {
1166
+ this.sort();
1167
+ untracked(() => this.endEdit(false, "inside"));
1168
+ });
1169
+ effect((onCleanup) => {
1170
+ const edit = this.editing();
1171
+ if (!edit || !isPlatformBrowser(this.platformId)) return;
1172
+ const doc = this.hostEl.nativeElement.ownerDocument;
1173
+ const inside = (target) => target instanceof Node && (edit.td.contains(target) || target instanceof Element && !!target.closest(".cdk-overlay-container"));
1174
+ let pressedInside = null;
1175
+ const onPress = (event) => {
1176
+ pressedInside = inside(event.target);
1177
+ };
1178
+ const onClick = (event) => {
1179
+ const within = pressedInside ?? inside(event.target);
1180
+ pressedInside = null;
1181
+ if (!within) this.endEdit(true, false);
1182
+ };
1183
+ doc.addEventListener("pointerdown", onPress, true);
1184
+ doc.addEventListener("click", onClick, true);
1185
+ onCleanup(() => {
1186
+ doc.removeEventListener("pointerdown", onPress, true);
1187
+ doc.removeEventListener("click", onClick, true);
1188
+ });
1189
+ });
753
1190
  if (typeof ngDevMode === "undefined" || ngDevMode) afterNextRender(() => {
754
1191
  const claimed = new Set([
755
1192
  ...this.cellTemplates(),
1193
+ ...this.editTemplates(),
756
1194
  this.expandTpl(),
757
- this.groupTpl()
1195
+ this.groupTpl(),
1196
+ this.selectionBarTpl()
758
1197
  ].map((dir) => dir?.template.elementRef.nativeElement));
759
1198
  const host = this.hostEl.nativeElement;
760
1199
  const declared = this.projectedTemplates().filter((tpl) => isNgTemplateElement(tpl) && !host.contains(tpl.elementRef.nativeElement));
761
1200
  const stray = declared.filter((tpl) => !claimed.has(tpl.elementRef.nativeElement)).length;
762
1201
  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.`);
1202
+ 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
1203
  });
765
1204
  if (isDevMode()) {
766
1205
  const warned = /* @__PURE__ */ new Set();
@@ -784,6 +1223,36 @@ var WrTable = class WrTable {
784
1223
  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
1224
  });
786
1225
  }
1226
+ effect(() => {
1227
+ if (this.readerChanges() === 0) return;
1228
+ untracked(() => {
1229
+ this.emittedState = this.currentState();
1230
+ this.stateChange.emit(this.emittedState);
1231
+ });
1232
+ });
1233
+ effect(() => {
1234
+ const state = this.state();
1235
+ if (!state || state === this.emittedState) return;
1236
+ untracked(() => this.restoreState(state));
1237
+ });
1238
+ effect((onCleanup) => {
1239
+ const head = this.headEl()?.nativeElement;
1240
+ if (!head || this.selectionBar() === null || !isPlatformBrowser(this.platformId) || typeof ResizeObserver === "undefined") {
1241
+ this.selectionBarHeight.set(null);
1242
+ return;
1243
+ }
1244
+ const measure = () => this.selectionBarHeight.set(head.offsetHeight > 0 ? head.offsetHeight : null);
1245
+ const observer = new ResizeObserver(measure);
1246
+ observer.observe(head);
1247
+ measure();
1248
+ onCleanup(() => observer.disconnect());
1249
+ });
1250
+ effect(() => {
1251
+ if (this.selectionBar() !== null || !isPlatformBrowser(this.platformId)) return;
1252
+ const bar = untracked(this.selectionBarEl)?.nativeElement;
1253
+ if (!bar?.contains(bar.ownerDocument.activeElement)) return;
1254
+ afterNextRender(() => this.focusTable(), { injector: this.injector });
1255
+ });
787
1256
  effect((onCleanup) => {
788
1257
  const cells = this.headerCells();
789
1258
  const cols = this.displayColumns();
@@ -812,6 +1281,8 @@ var WrTable = class WrTable {
812
1281
  this.resizeWidths.set(/* @__PURE__ */ new Map());
813
1282
  this.fixedLayout.set(false);
814
1283
  this.virtualFixed.set(false);
1284
+ this.editHold = null;
1285
+ this.editHeld.set(false);
815
1286
  });
816
1287
  effect(() => {
817
1288
  const active = this.virtualized();
@@ -941,31 +1412,52 @@ var WrTable = class WrTable {
941
1412
  rightEdge
942
1413
  });
943
1414
  }
944
- leftPin(key) {
945
- return this.pins().left.get(key) ?? null;
946
- }
947
- rightPin(key) {
948
- return this.pins().right.get(key) ?? null;
949
- }
1415
+ cellContexts = computed(() => {
1416
+ this.cellMap();
1417
+ return new Map(this.orderedColumns().map((c) => [c.key, /* @__PURE__ */ new WeakMap()]));
1418
+ }, ...ngDevMode ? [{ debugName: "cellContexts" }] : /* istanbul ignore next */ []);
1419
+ cellColumns = computed(() => {
1420
+ const contexts = this.cellContexts();
1421
+ const pins = this.pins();
1422
+ const resized = this.resizeWidths();
1423
+ const templates = this.cellMap();
1424
+ const editors = this.editMap();
1425
+ const tableTruncate = this.truncate();
1426
+ const labelKey = this.labelColumnKey();
1427
+ const treeKey = this.treeColumnKey();
1428
+ return this.displayColumns().map(({ key, column }) => {
1429
+ const { align, pin } = column;
1430
+ const truncates = (column.truncate === void 0 ? tableTruncate : column.truncate) === "tooltip";
1431
+ const tdClass = cellClasses("wr-table__td", column);
1432
+ return {
1433
+ key,
1434
+ column,
1435
+ thClass: cellClasses("wr-table__th", column),
1436
+ tdClass: truncates ? `${tdClass} wr-table__td--truncate` : tdClass,
1437
+ footClass: align ? `wr-table__foot-cell wr-table__td--align-${align}` : "wr-table__foot-cell",
1438
+ pinned: !!pin,
1439
+ pinLeft: pin === "left",
1440
+ pinRight: pin === "right",
1441
+ edgeLeft: pins.leftEdge === key,
1442
+ edgeRight: pins.rightEdge === key,
1443
+ start: pins.left.get(key) ?? null,
1444
+ end: pins.right.get(key) ?? null,
1445
+ width: resized.get(key) ?? column.width ?? null,
1446
+ maxWidth: truncates ? column.width ?? null : null,
1447
+ label: key === labelKey,
1448
+ tree: key === treeKey,
1449
+ template: templates.get(key),
1450
+ editTemplate: column.editable === false ? void 0 : editors.get(key),
1451
+ contexts: contexts.get(key)
1452
+ };
1453
+ });
1454
+ }, ...ngDevMode ? [{ debugName: "cellColumns" }] : /* istanbul ignore next */ []);
950
1455
  hasPins = computed(() => this.displayColumns().some((c) => c.column.pin), ...ngDevMode ? [{ debugName: "hasPins" }] : /* istanbul ignore next */ []);
951
1456
  overflow = signal({
952
1457
  start: false,
953
1458
  end: false
954
1459
  }, ...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
1460
  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
1461
  headerName(column) {
970
1462
  const { title, headerHint } = column;
971
1463
  if (!headerHint) return title;
@@ -992,9 +1484,6 @@ var WrTable = class WrTable {
992
1484
  text
993
1485
  });
994
1486
  }
995
- footClasses(column) {
996
- return column.align ? `wr-table__foot-cell wr-table__td--align-${column.align}` : "wr-table__foot-cell";
997
- }
998
1487
  rowClasses(row, index) {
999
1488
  const extra = this.rowClass()?.(row, index);
1000
1489
  return extra ? wrToClassList("wr-table__tr", extra).join(" ") : "wr-table__tr";
@@ -1005,8 +1494,19 @@ var WrTable = class WrTable {
1005
1494
  resizeStartWidth = 0;
1006
1495
  lastColumnKeys = "";
1007
1496
  fixedLayout = signal(false, ...ngDevMode ? [{ debugName: "fixedLayout" }] : /* istanbul ignore next */ []);
1008
- colWidth(key) {
1009
- return this.resizeWidths().get(key) ?? this.columns()[key]?.width ?? null;
1497
+ editHeld = signal(false, ...ngDevMode ? [{ debugName: "editHeld" }] : /* istanbul ignore next */ []);
1498
+ editHold = null;
1499
+ holdWidthsForEdit() {
1500
+ if (this.fixedLayoutActive() || !isPlatformBrowser(this.platformId)) return;
1501
+ this.editHold = this.resizeWidths();
1502
+ this.freezeColumnWidths();
1503
+ this.editHeld.set(true);
1504
+ }
1505
+ releaseEditHold() {
1506
+ if (!this.editHeld()) return;
1507
+ this.editHeld.set(false);
1508
+ if (this.editHold && !this.fixedLayout()) this.resizeWidths.set(this.editHold);
1509
+ this.editHold = null;
1010
1510
  }
1011
1511
  freezeColumnWidths() {
1012
1512
  const cols = this.displayColumns();
@@ -1098,7 +1598,7 @@ var WrTable = class WrTable {
1098
1598
  const { start, end } = this.virtualWindow();
1099
1599
  return this.renderRows().slice(start, end);
1100
1600
  }, ...ngDevMode ? [{ debugName: "windowRows" }] : /* istanbul ignore next */ []);
1101
- fixedLayoutActive = computed(() => this.fixedLayout() || this.virtualFixed(), ...ngDevMode ? [{ debugName: "fixedLayoutActive" }] : /* istanbul ignore next */ []);
1601
+ fixedLayoutActive = computed(() => this.fixedLayout() || this.virtualFixed() || this.editHeld(), ...ngDevMode ? [{ debugName: "fixedLayoutActive" }] : /* istanbul ignore next */ []);
1102
1602
  scrollToRow(index, behavior = "auto") {
1103
1603
  if (!isPlatformBrowser(this.platformId) || !this.virtualized()) return;
1104
1604
  this.scrollEl()?.nativeElement.scrollTo({
@@ -1107,15 +1607,84 @@ var WrTable = class WrTable {
1107
1607
  });
1108
1608
  }
1109
1609
  onColumnDrop(event) {
1610
+ if (this.dragCancelled) {
1611
+ this.dragCancelled = false;
1612
+ return;
1613
+ }
1110
1614
  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) => {
1615
+ const shown = this.displayColumns().map((c) => c.key);
1616
+ const slots = new Set(shown);
1617
+ moveItemInArray(shown, event.previousIndex, event.currentIndex);
1618
+ let next = 0;
1619
+ this.columnOrder.set(this.orderedColumns().map((c) => slots.has(c.key) ? shown[next++] : c.key));
1620
+ this.readerChanges.update((n) => n + 1);
1621
+ }
1622
+ sortPredicate = (index) => this.slotOpen(index);
1623
+ slotOpen(index) {
1116
1624
  const cols = this.displayColumns();
1117
1625
  return !cols[this.isRtl() ? cols.length - 1 - index : index]?.column.pin;
1118
- };
1626
+ }
1627
+ doc = inject(DOCUMENT$1);
1628
+ destroyRef = inject(DestroyRef);
1629
+ dragSlots = [];
1630
+ dragInList = false;
1631
+ dragActive = false;
1632
+ dragCancelled = false;
1633
+ stopDragCancel = null;
1634
+ dragOwn = -1;
1635
+ clearDragCursor = this.destroyRef.onDestroy(() => {
1636
+ this.stopDragCancel?.();
1637
+ if (this.dragActive) this.setDragCursor(null);
1638
+ });
1639
+ setDragCursor(state) {
1640
+ const list = this.doc.documentElement.classList;
1641
+ list.toggle("wr-table-dragging", state !== null);
1642
+ list.toggle("wr-table-dragging--allowed", state === "allowed");
1643
+ list.toggle("wr-table-dragging--blocked", state === "blocked");
1644
+ }
1645
+ onColumnDragStart(event) {
1646
+ if (!isPlatformBrowser(this.platformId) || !this.reorderable()) return;
1647
+ const source = event.source.element.nativeElement;
1648
+ const rects = this.headerCells().map((ref) => {
1649
+ const { left, right } = (ref.nativeElement === source ? event.source.getPlaceholderElement() : ref.nativeElement).getBoundingClientRect();
1650
+ return [left, right];
1651
+ });
1652
+ this.dragSlots = rects.sort((a, b) => a[0] - b[0]);
1653
+ this.dragOwn = this.headerCells().findIndex((ref) => ref.nativeElement === source);
1654
+ this.dragInList = true;
1655
+ this.dragActive = true;
1656
+ this.dragCancelled = false;
1657
+ this.setDragCursor("blocked");
1658
+ this.stopDragCancel?.();
1659
+ this.stopDragCancel = wrWatchDragCancel(this.doc, event.event, () => {
1660
+ this.dragCancelled = true;
1661
+ this.onColumnDragEnd();
1662
+ });
1663
+ }
1664
+ onColumnDragMoved(event) {
1665
+ if (!this.dragActive || !this.dragInList) return;
1666
+ const x = event.pointerPosition.x;
1667
+ const slot = this.dragSlots.findIndex(([left, right]) => x >= left && x < right);
1668
+ const own = this.isRtl() ? this.dragSlots.length - 1 - this.dragOwn : this.dragOwn;
1669
+ this.setDragCursor(slot >= 0 && slot !== own && this.slotOpen(slot) ? "allowed" : "blocked");
1670
+ }
1671
+ onColumnListSorted(event) {
1672
+ this.dragOwn = event.currentIndex;
1673
+ }
1674
+ onColumnListEntered() {
1675
+ this.dragInList = true;
1676
+ }
1677
+ onColumnListExited() {
1678
+ if (!this.dragActive) return;
1679
+ this.dragInList = false;
1680
+ this.setDragCursor("blocked");
1681
+ }
1682
+ onColumnDragEnd() {
1683
+ this.stopDragCancel?.();
1684
+ this.stopDragCancel = null;
1685
+ this.dragActive = false;
1686
+ this.setDragCursor(null);
1687
+ }
1119
1688
  rowKeyOf(row) {
1120
1689
  const rk = this.rowKey();
1121
1690
  if (typeof rk === "function") return rk(row);
@@ -1171,10 +1740,37 @@ var WrTable = class WrTable {
1171
1740
  toggleAll(checked) {
1172
1741
  this.applySelection(this.selectAllKeys(), checked);
1173
1742
  }
1743
+ selectionBarTpl = contentChild(WrTableSelectionBar, ...ngDevMode ? [{ debugName: "selectionBarTpl" }] : /* istanbul ignore next */ []);
1744
+ selectionBarEl = viewChild("selectionBarEl", ...ngDevMode ? [{ debugName: "selectionBarEl" }] : /* istanbul ignore next */ []);
1745
+ hasSelectionBar = computed(() => !!this.selectionBarTpl(), ...ngDevMode ? [{ debugName: "hasSelectionBar" }] : /* istanbul ignore next */ []);
1746
+ selectionBar = computed(() => this.selection().length > 0 ? this.selectionBarTpl()?.template ?? null : null, ...ngDevMode ? [{ debugName: "selectionBar" }] : /* istanbul ignore next */ []);
1747
+ selectionBarHeight = signal(null, ...ngDevMode ? [{ debugName: "selectionBarHeight" }] : /* istanbul ignore next */ []);
1748
+ selectionCountText = computed(() => {
1749
+ const count = this.selection().length;
1750
+ const own = this.selectedLabel();
1751
+ return own === null ? this.selectedText({ count }) : own.replace(/\{\{\s*count\s*\}\}/g, String(count));
1752
+ }, ...ngDevMode ? [{ debugName: "selectionCountText" }] : /* istanbul ignore next */ []);
1753
+ selectionContext = computed(() => ({
1754
+ $implicit: this.selectedRows(),
1755
+ count: this.selection().length,
1756
+ clear: () => this.clearSelection(),
1757
+ scope: this.selectAllScope() === "all" && this.total() === null ? "all" : "page"
1758
+ }), ...ngDevMode ? [{ debugName: "selectionContext" }] : /* istanbul ignore next */ []);
1759
+ clearSelection() {
1760
+ this.selection.set([]);
1761
+ }
1762
+ focusTable() {
1763
+ (this.hostEl.nativeElement.querySelector(".wr-table__th--select input:not(:disabled), .wr-table__td--select input:not(:disabled)") ?? this.scrollEl()?.nativeElement)?.focus();
1764
+ }
1174
1765
  expandTpl = contentChild(WrTableExpand, ...ngDevMode ? [{ debugName: "expandTpl" }] : /* istanbul ignore next */ []);
1175
1766
  treeMode = computed(() => this.childrenKey() !== null && this.groupBy() === null, ...ngDevMode ? [{ debugName: "treeMode" }] : /* istanbul ignore next */ []);
1176
1767
  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 */ []);
1768
+ treeColumnKey = computed(() => {
1769
+ if (!this.treeMode()) return null;
1770
+ const shown = this.displayColumns();
1771
+ const named = this.treeColumn();
1772
+ return named !== null && shown.some((c) => c.key === named) ? named : shown[0]?.key ?? null;
1773
+ }, ...ngDevMode ? [{ debugName: "treeColumnKey" }] : /* istanbul ignore next */ []);
1178
1774
  childrenOf(row) {
1179
1775
  const ck = this.childrenKey();
1180
1776
  if (ck === null) return [];
@@ -1310,6 +1906,199 @@ var WrTable = class WrTable {
1310
1906
  this.activeRow.set({ key: this.rowKeyOf(entry.row) });
1311
1907
  this.rowEls()[index]?.nativeElement.focus();
1312
1908
  }
1909
+ editable = input(null, ...ngDevMode ? [{ debugName: "editable" }] : /* istanbul ignore next */ []);
1910
+ cellEdit = output();
1911
+ editing = signal(null, ...ngDevMode ? [{ debugName: "editing" }] : /* istanbul ignore next */ []);
1912
+ editGrid = computed(() => {
1913
+ const editors = this.editMap();
1914
+ return editors.size > 0 && this.orderedColumns().some((c) => c.column.editable !== false && editors.has(c.key));
1915
+ }, ...ngDevMode ? [{ debugName: "editGrid" }] : /* istanbul ignore next */ []);
1916
+ dataRows = computed(() => this.windowRows().filter((entry) => entry.kind === "row"), ...ngDevMode ? [{ debugName: "dataRows" }] : /* istanbul ignore next */ []);
1917
+ activeCell = signal(null, ...ngDevMode ? [{ debugName: "activeCell" }] : /* istanbul ignore next */ []);
1918
+ tabStopCell = computed(() => {
1919
+ if (!this.editGrid() || this.treeMode()) return null;
1920
+ const rows = this.dataRows();
1921
+ const columns = this.cellColumns();
1922
+ const active = this.activeCell();
1923
+ if (active && columns.some((c) => c.key === active.key)) {
1924
+ const hit = rows.find((entry) => this.rowKeyOf(entry.row) === active.row);
1925
+ if (hit) return {
1926
+ id: hit.id,
1927
+ key: active.key
1928
+ };
1929
+ }
1930
+ return rows.length && columns.length ? {
1931
+ id: rows[0].id,
1932
+ key: columns[0].key
1933
+ } : null;
1934
+ }, ...ngDevMode ? [{ debugName: "tabStopCell" }] : /* istanbul ignore next */ []);
1935
+ cellEditable(row, col) {
1936
+ return !!col.editTemplate && (this.editable()?.(row, col.key) ?? true);
1937
+ }
1938
+ cellTabindex(entry, col) {
1939
+ if (this.treeMode()) return entry.id === this.tabStopRowId() && this.cellEditable(entry.row, col) ? 0 : -1;
1940
+ const stop = this.tabStopCell();
1941
+ return stop?.id === entry.id && stop.key === col.key ? 0 : -1;
1942
+ }
1943
+ cellAt(target) {
1944
+ const td = target instanceof Element ? target.closest(".wr-table__td") : null;
1945
+ if (td?.closest(".wr-table") !== this.hostEl.nativeElement) return null;
1946
+ const index = this.rowEls().findIndex((el) => el.nativeElement === td.parentElement);
1947
+ const entry = this.dataRows()[index];
1948
+ const col = this.cellColumns()[td.cellIndex - this.leadingCols()];
1949
+ return entry && col ? {
1950
+ td,
1951
+ row: entry.row,
1952
+ col
1953
+ } : null;
1954
+ }
1955
+ onCellFocusin(event) {
1956
+ if (!this.editGrid()) return;
1957
+ const cell = this.cellAt(event.target);
1958
+ if (cell) this.activeCell.set({
1959
+ row: this.rowKeyOf(cell.row),
1960
+ key: cell.col.key
1961
+ });
1962
+ }
1963
+ onCellDblclick(event) {
1964
+ if (!this.editGrid()) return;
1965
+ const cell = this.cellAt(event.target);
1966
+ if (cell) this.startEdit(cell.row, cell.col, cell.td);
1967
+ }
1968
+ onCellKeydown(event) {
1969
+ if (!this.editGrid() || event.defaultPrevented || wrIsComposing(event)) return;
1970
+ const edit = this.editing();
1971
+ if (edit) {
1972
+ if (edit.td.contains(event.target)) this.onEditorKeydown(event, edit);
1973
+ return;
1974
+ }
1975
+ const cell = event.target.classList.contains("wr-table__td") ? this.cellAt(event.target) : null;
1976
+ if (!cell || event.altKey || event.metaKey) return;
1977
+ const key = this.inlineKey(event.key);
1978
+ if (!event.ctrlKey && !event.shiftKey && (key === WR_KEYS.ENTER || key === "F2")) {
1979
+ if (!this.startEdit(cell.row, cell.col, cell.td)) return;
1980
+ } else if (key !== WR_KEYS.SPACE && wrIsPrintableKey(event)) {
1981
+ if (!this.startEdit(cell.row, cell.col, cell.td, event.key)) return;
1982
+ } else if (event.shiftKey || !this.moveCellFocus(cell.td, key, event.ctrlKey)) return;
1983
+ event.preventDefault();
1984
+ }
1985
+ moveCellFocus(td, key, ctrl) {
1986
+ if (ctrl && key !== WR_KEYS.HOME && key !== WR_KEYS.END) return false;
1987
+ const rows = this.rowEls().map((el) => el.nativeElement);
1988
+ const tr = td.parentElement;
1989
+ const row = rows.indexOf(tr);
1990
+ const first = this.leadingCols();
1991
+ const last = tr.cells.length - 1;
1992
+ let target;
1993
+ switch (key) {
1994
+ case WR_KEYS.ARROW_RIGHT:
1995
+ target = tr.cells[Math.min(td.cellIndex + 1, last)];
1996
+ break;
1997
+ case WR_KEYS.ARROW_LEFT:
1998
+ target = tr.cells[Math.max(td.cellIndex - 1, first)];
1999
+ break;
2000
+ case WR_KEYS.ARROW_DOWN:
2001
+ target = rows[row + 1]?.cells[td.cellIndex];
2002
+ break;
2003
+ case WR_KEYS.ARROW_UP:
2004
+ target = rows[row - 1]?.cells[td.cellIndex];
2005
+ break;
2006
+ case WR_KEYS.HOME:
2007
+ target = (ctrl ? rows[0] : tr).cells[first];
2008
+ break;
2009
+ case WR_KEYS.END:
2010
+ target = (ctrl ? rows[rows.length - 1] : tr).cells[last];
2011
+ break;
2012
+ default: return false;
2013
+ }
2014
+ target?.focus();
2015
+ return true;
2016
+ }
2017
+ onEditorKeydown(event, edit) {
2018
+ if (event.altKey || event.metaKey || event.ctrlKey) return;
2019
+ const target = event.target;
2020
+ if (event.key !== WR_KEYS.TAB && !!target.closest("[aria-expanded=\"true\"]")) return;
2021
+ if (event.key === WR_KEYS.ESCAPE) this.endEdit(false, true);
2022
+ else if (event.key === WR_KEYS.ENTER) {
2023
+ if (event.shiftKey || target.tagName === "TEXTAREA" || target.isContentEditable) return;
2024
+ this.endEdit(true, true);
2025
+ } else if (event.key === WR_KEYS.TAB) {
2026
+ this.endEdit(true, true);
2027
+ this.editableSibling(edit, event.shiftKey ? -1 : 1)?.focus();
2028
+ } else return;
2029
+ event.preventDefault();
2030
+ event.stopPropagation();
2031
+ }
2032
+ editableSibling(edit, step) {
2033
+ const columns = this.cellColumns();
2034
+ const tr = edit.td.parentElement;
2035
+ let index = columns.findIndex((c) => c.key === edit.key) + step;
2036
+ while (columns[index] && !this.cellEditable(edit.row, columns[index])) index += step;
2037
+ return columns[index] ? tr.cells[index + this.leadingCols()] : void 0;
2038
+ }
2039
+ startEdit(row, col, td, typed) {
2040
+ if (!this.cellEditable(row, col)) return false;
2041
+ const current = untracked(this.editing);
2042
+ if (current?.row === row && current.key === col.key) return true;
2043
+ this.endEdit(true, false);
2044
+ this.holdWidthsForEdit();
2045
+ const previous = row[col.key];
2046
+ const pending = signal(previous, ...ngDevMode ? [{ debugName: "pending" }] : /* istanbul ignore next */ []);
2047
+ const live = () => untracked(this.editing) === edit;
2048
+ const edit = {
2049
+ row,
2050
+ key: col.key,
2051
+ td,
2052
+ previous,
2053
+ pending,
2054
+ context: {
2055
+ get $implicit() {
2056
+ return pending();
2057
+ },
2058
+ row,
2059
+ column: col.column,
2060
+ set: (value) => pending.set(value),
2061
+ commit: (value) => {
2062
+ if (!live()) return;
2063
+ pending.set(value);
2064
+ this.endEdit(true, true, false);
2065
+ },
2066
+ cancel: () => {
2067
+ if (live()) this.endEdit(false, true);
2068
+ }
2069
+ }
2070
+ };
2071
+ this.editing.set(edit);
2072
+ afterNextRender(() => {
2073
+ if (!live()) return;
2074
+ const field = td.querySelector(EDITOR_FOCUSABLE);
2075
+ field?.focus();
2076
+ if (typed === void 0) return;
2077
+ if (field instanceof HTMLInputElement || field instanceof HTMLTextAreaElement) {
2078
+ field.value = typed;
2079
+ field.dispatchEvent(new Event("input", { bubbles: true }));
2080
+ }
2081
+ }, { injector: this.injector });
2082
+ return true;
2083
+ }
2084
+ endEdit(commit, focus, flush = commit) {
2085
+ const edit = untracked(this.editing);
2086
+ if (!edit) return;
2087
+ const active = edit.td.ownerDocument.activeElement;
2088
+ const held = active instanceof HTMLElement && active !== edit.td && edit.td.contains(active);
2089
+ if (flush && held) active.blur();
2090
+ if (untracked(this.editing) !== edit) return;
2091
+ this.editing.set(null);
2092
+ this.releaseEditHold();
2093
+ if (focus === "inside" ? held && edit.td.isConnected : focus) edit.td.focus();
2094
+ const value = untracked(edit.pending);
2095
+ if (commit && !Object.is(value, edit.previous)) this.cellEdit.emit({
2096
+ row: edit.row,
2097
+ key: edit.key,
2098
+ value,
2099
+ previous: edit.previous
2100
+ });
2101
+ }
1313
2102
  leadingCols = computed(() => (this.rowSelection() ? 1 : 0) + (this.expandable() ? 1 : 0), ...ngDevMode ? [{ debugName: "leadingCols" }] : /* istanbul ignore next */ []);
1314
2103
  totalCols = computed(() => this.displayColumns().length + this.leadingCols(), ...ngDevMode ? [{ debugName: "totalCols" }] : /* istanbul ignore next */ []);
1315
2104
  expandTemplate() {
@@ -1324,13 +2113,19 @@ var WrTable = class WrTable {
1324
2113
  const set = this.expanded();
1325
2114
  this.expanded.set(set.includes(key) ? set.filter((k) => k !== key) : [...set, key]);
1326
2115
  }
2116
+ expandContexts = /* @__PURE__ */ new WeakMap();
1327
2117
  expandContext(row) {
1328
- return {
1329
- $implicit: row,
1330
- row
1331
- };
2118
+ let context = this.expandContexts.get(row);
2119
+ if (!context) {
2120
+ context = {
2121
+ $implicit: row,
2122
+ row
2123
+ };
2124
+ this.expandContexts.set(row, context);
2125
+ }
2126
+ return context;
1332
2127
  }
1333
- hasSummary = computed(() => Object.values(this.columns()).some((col) => col.summary !== void 0), ...ngDevMode ? [{ debugName: "hasSummary" }] : /* istanbul ignore next */ []);
2128
+ hasSummary = computed(() => this.displayColumns().some((c) => c.column.summary !== void 0), ...ngDevMode ? [{ debugName: "hasSummary" }] : /* istanbul ignore next */ []);
1334
2129
  summaries = computed(() => {
1335
2130
  const rows = this.datasetRows();
1336
2131
  const map = /* @__PURE__ */ new Map();
@@ -1534,31 +2329,31 @@ var WrTable = class WrTable {
1534
2329
  direction: next
1535
2330
  };
1536
2331
  this.sort.set(list);
2332
+ this.readerChanges.update((n) => n + 1);
1537
2333
  }
1538
2334
  onFilter(key, items) {
1539
2335
  this.filterChange.emit({
1540
2336
  key,
1541
2337
  items
1542
2338
  });
2339
+ this.readerChanges.update((n) => n + 1);
1543
2340
  }
1544
- cellContext(item, key, column) {
1545
- return {
1546
- $implicit: item[key],
1547
- item,
1548
- column
1549
- };
2341
+ cellContext(item, col) {
2342
+ let context = col.contexts.get(item);
2343
+ if (!context) {
2344
+ context = new CellContext(item, col.column, col.key);
2345
+ col.contexts.set(item, context);
2346
+ }
2347
+ return context;
1550
2348
  }
1551
2349
  cellText(item, key, column) {
1552
2350
  const value = item[key];
1553
2351
  if (noValue(value)) return column.empty ?? "";
1554
2352
  return column.format ? column.format(value, item) : value;
1555
2353
  }
1556
- templateFor(key) {
1557
- return this.cellMap().get(String(key));
1558
- }
1559
2354
  static ɵfac = i0.ɵɵngDeclareFactory({
1560
2355
  minVersion: "12.0.0",
1561
- version: "22.2.5",
2356
+ version: "22.2.6",
1562
2357
  ngImport: i0,
1563
2358
  type: WrTable,
1564
2359
  deps: [],
@@ -1566,7 +2361,7 @@ var WrTable = class WrTable {
1566
2361
  });
1567
2362
  static ɵcmp = i0.ɵɵngDeclareComponent({
1568
2363
  minVersion: "17.0.0",
1569
- version: "22.2.5",
2364
+ version: "22.2.6",
1570
2365
  type: WrTable,
1571
2366
  isStandalone: true,
1572
2367
  selector: "wr-table",
@@ -1620,6 +2415,20 @@ var WrTable = class WrTable {
1620
2415
  isRequired: false,
1621
2416
  transformFunction: null
1622
2417
  },
2418
+ hiddenColumns: {
2419
+ classPropertyName: "hiddenColumns",
2420
+ publicName: "hiddenColumns",
2421
+ isSignal: true,
2422
+ isRequired: false,
2423
+ transformFunction: null
2424
+ },
2425
+ columnChooser: {
2426
+ classPropertyName: "columnChooser",
2427
+ publicName: "columnChooser",
2428
+ isSignal: true,
2429
+ isRequired: false,
2430
+ transformFunction: null
2431
+ },
1623
2432
  rowSelection: {
1624
2433
  classPropertyName: "rowSelection",
1625
2434
  publicName: "rowSelection",
@@ -1774,6 +2583,34 @@ var WrTable = class WrTable {
1774
2583
  isRequired: false,
1775
2584
  transformFunction: null
1776
2585
  },
2586
+ selectedLabel: {
2587
+ classPropertyName: "selectedLabel",
2588
+ publicName: "selectedLabel",
2589
+ isSignal: true,
2590
+ isRequired: false,
2591
+ transformFunction: null
2592
+ },
2593
+ clearSelectionLabel: {
2594
+ classPropertyName: "clearSelectionLabel",
2595
+ publicName: "clearSelectionLabel",
2596
+ isSignal: true,
2597
+ isRequired: false,
2598
+ transformFunction: null
2599
+ },
2600
+ columnsLabel: {
2601
+ classPropertyName: "columnsLabel",
2602
+ publicName: "columnsLabel",
2603
+ isSignal: true,
2604
+ isRequired: false,
2605
+ transformFunction: null
2606
+ },
2607
+ state: {
2608
+ classPropertyName: "state",
2609
+ publicName: "state",
2610
+ isSignal: true,
2611
+ isRequired: false,
2612
+ transformFunction: null
2613
+ },
1777
2614
  pageSize: {
1778
2615
  classPropertyName: "pageSize",
1779
2616
  publicName: "pageSize",
@@ -1850,18 +2687,28 @@ var WrTable = class WrTable {
1850
2687
  isSignal: true,
1851
2688
  isRequired: false,
1852
2689
  transformFunction: null
2690
+ },
2691
+ editable: {
2692
+ classPropertyName: "editable",
2693
+ publicName: "editable",
2694
+ isSignal: true,
2695
+ isRequired: false,
2696
+ transformFunction: null
1853
2697
  }
1854
2698
  },
1855
2699
  outputs: {
1856
2700
  columnOrder: "columnOrderChange",
2701
+ hiddenColumns: "hiddenColumnsChange",
1857
2702
  selection: "selectionChange",
1858
2703
  expanded: "expandedChange",
1859
2704
  collapsedGroups: "collapsedGroupsChange",
1860
2705
  sort: "sortChange",
1861
2706
  filterChange: "filterChange",
2707
+ stateChange: "stateChange",
1862
2708
  rowClick: "rowClick",
1863
2709
  pageSizeChange: "pageSizeChange",
1864
- page: "pageChange"
2710
+ page: "pageChange",
2711
+ cellEdit: "cellEdit"
1865
2712
  },
1866
2713
  host: {
1867
2714
  listeners: {
@@ -1875,6 +2722,7 @@ var WrTable = class WrTable {
1875
2722
  "class.wr-table--fill": "fillsParent()",
1876
2723
  "class.wr-table--overflow-start": "overflow().start",
1877
2724
  "class.wr-table--overflow-end": "overflow().end",
2725
+ "class.wr-table--selection-bar": "selectionBar() !== null",
1878
2726
  "attr.aria-busy": "loading() ? true : null"
1879
2727
  },
1880
2728
  classAttribute: "wr-table"
@@ -1885,11 +2733,23 @@ var WrTable = class WrTable {
1885
2733
  predicate: WrTableCell,
1886
2734
  isSignal: true
1887
2735
  },
2736
+ {
2737
+ propertyName: "editTemplates",
2738
+ predicate: WrTableEditCell,
2739
+ isSignal: true
2740
+ },
1888
2741
  {
1889
2742
  propertyName: "projectedTemplates",
1890
2743
  predicate: TemplateRef,
1891
2744
  isSignal: true
1892
2745
  },
2746
+ {
2747
+ propertyName: "selectionBarTpl",
2748
+ first: true,
2749
+ predicate: WrTableSelectionBar,
2750
+ descendants: true,
2751
+ isSignal: true
2752
+ },
1893
2753
  {
1894
2754
  propertyName: "expandTpl",
1895
2755
  first: true,
@@ -1933,6 +2793,13 @@ var WrTable = class WrTable {
1933
2793
  descendants: true,
1934
2794
  isSignal: true
1935
2795
  },
2796
+ {
2797
+ propertyName: "selectionBarEl",
2798
+ first: true,
2799
+ predicate: ["selectionBarEl"],
2800
+ descendants: true,
2801
+ isSignal: true
2802
+ },
1936
2803
  {
1937
2804
  propertyName: "rowEls",
1938
2805
  predicate: ["rowEl"],
@@ -1941,7 +2808,7 @@ var WrTable = class WrTable {
1941
2808
  }
1942
2809
  ],
1943
2810
  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",
2811
+ 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 <wr-table-column-chooser [table]=\"this\" [ariaLabel]=\"resolvedColumnsLabel()\" />\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
2812
  dependencies: [
1946
2813
  {
1947
2814
  kind: "directive",
@@ -2008,6 +2875,23 @@ var WrTable = class WrTable {
2008
2875
  ],
2009
2876
  exportAs: ["cdkDrag"]
2010
2877
  },
2878
+ {
2879
+ kind: "component",
2880
+ type: WrButton,
2881
+ selector: "wr-btn, button[wr-btn], a[wr-btn]",
2882
+ inputs: [
2883
+ "color",
2884
+ "size",
2885
+ "shape",
2886
+ "icon",
2887
+ "iconPosition",
2888
+ "disabled",
2889
+ "outlined",
2890
+ "block",
2891
+ "loading",
2892
+ "disabledWhenLoading"
2893
+ ]
2894
+ },
2011
2895
  {
2012
2896
  kind: "component",
2013
2897
  type: WrCheckbox,
@@ -2049,6 +2933,16 @@ var WrTable = class WrTable {
2049
2933
  ],
2050
2934
  outputs: ["pageChange", "pageSizeChange"]
2051
2935
  },
2936
+ {
2937
+ kind: "component",
2938
+ type: WrTableColumnChooser,
2939
+ selector: "wr-table-column-chooser",
2940
+ inputs: [
2941
+ "table",
2942
+ "showAllLabel",
2943
+ "ariaLabel"
2944
+ ]
2945
+ },
2052
2946
  {
2053
2947
  kind: "directive",
2054
2948
  type: WrPopover,
@@ -2061,6 +2955,7 @@ var WrTable = class WrTable {
2061
2955
  "showDelay",
2062
2956
  "hideDelay",
2063
2957
  "wrPopoverOrigin",
2958
+ "wrPopoverDisabled",
2064
2959
  "ariaLabel",
2065
2960
  "panelClass"
2066
2961
  ],
@@ -2099,7 +2994,7 @@ var WrTable = class WrTable {
2099
2994
  };
2100
2995
  i0.ɵɵngDeclareClassMetadata({
2101
2996
  minVersion: "12.0.0",
2102
- version: "22.2.5",
2997
+ version: "22.2.6",
2103
2998
  ngImport: i0,
2104
2999
  type: WrTable,
2105
3000
  decorators: [{
@@ -2115,6 +3010,7 @@ i0.ɵɵngDeclareClassMetadata({
2115
3010
  "[class.wr-table--fill]": "fillsParent()",
2116
3011
  "[class.wr-table--overflow-start]": "overflow().start",
2117
3012
  "[class.wr-table--overflow-end]": "overflow().end",
3013
+ "[class.wr-table--selection-bar]": "selectionBar() !== null",
2118
3014
  "[attr.aria-busy]": "loading() ? true : null",
2119
3015
  "(keydown)": "onTreeKeydown($event)",
2120
3016
  "(focusin)": "onTreeFocusin($event)"
@@ -2123,14 +3019,16 @@ i0.ɵɵngDeclareClassMetadata({
2123
3019
  NgTemplateOutlet,
2124
3020
  CdkDropList,
2125
3021
  CdkDrag,
3022
+ WrButton,
2126
3023
  WrCheckbox,
2127
3024
  WrPagination,
3025
+ WrTableColumnChooser,
2128
3026
  WrPopover,
2129
3027
  WrSpinner,
2130
3028
  WrTableSort,
2131
3029
  WrTableFilter
2132
3030
  ],
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"
3031
+ 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 <wr-table-column-chooser [table]=\"this\" [ariaLabel]=\"resolvedColumnsLabel()\" />\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
3032
  }]
2135
3033
  }],
2136
3034
  ctorParameters: () => [],
@@ -2194,6 +3092,25 @@ i0.ɵɵngDeclareClassMetadata({
2194
3092
  type: i0.Output,
2195
3093
  args: ["columnOrderChange"]
2196
3094
  }],
3095
+ hiddenColumns: [{
3096
+ type: i0.Input,
3097
+ args: [{
3098
+ isSignal: true,
3099
+ alias: "hiddenColumns",
3100
+ required: false
3101
+ }]
3102
+ }, {
3103
+ type: i0.Output,
3104
+ args: ["hiddenColumnsChange"]
3105
+ }],
3106
+ columnChooser: [{
3107
+ type: i0.Input,
3108
+ args: [{
3109
+ isSignal: true,
3110
+ alias: "columnChooser",
3111
+ required: false
3112
+ }]
3113
+ }],
2197
3114
  rowSelection: [{
2198
3115
  type: i0.Input,
2199
3116
  args: [{
@@ -2382,10 +3299,46 @@ i0.ɵɵngDeclareClassMetadata({
2382
3299
  required: false
2383
3300
  }]
2384
3301
  }],
3302
+ selectedLabel: [{
3303
+ type: i0.Input,
3304
+ args: [{
3305
+ isSignal: true,
3306
+ alias: "selectedLabel",
3307
+ required: false
3308
+ }]
3309
+ }],
3310
+ clearSelectionLabel: [{
3311
+ type: i0.Input,
3312
+ args: [{
3313
+ isSignal: true,
3314
+ alias: "clearSelectionLabel",
3315
+ required: false
3316
+ }]
3317
+ }],
3318
+ columnsLabel: [{
3319
+ type: i0.Input,
3320
+ args: [{
3321
+ isSignal: true,
3322
+ alias: "columnsLabel",
3323
+ required: false
3324
+ }]
3325
+ }],
2385
3326
  filterChange: [{
2386
3327
  type: i0.Output,
2387
3328
  args: ["filterChange"]
2388
3329
  }],
3330
+ state: [{
3331
+ type: i0.Input,
3332
+ args: [{
3333
+ isSignal: true,
3334
+ alias: "state",
3335
+ required: false
3336
+ }]
3337
+ }],
3338
+ stateChange: [{
3339
+ type: i0.Output,
3340
+ args: ["stateChange"]
3341
+ }],
2389
3342
  rowClick: [{
2390
3343
  type: i0.Output,
2391
3344
  args: ["rowClick"]
@@ -2481,6 +3434,10 @@ i0.ɵɵngDeclareClassMetadata({
2481
3434
  type: i0.ContentChildren,
2482
3435
  args: [i0.forwardRef(() => WrTableCell), { isSignal: true }]
2483
3436
  }],
3437
+ editTemplates: [{
3438
+ type: i0.ContentChildren,
3439
+ args: [i0.forwardRef(() => WrTableEditCell), { isSignal: true }]
3440
+ }],
2484
3441
  headerCells: [{
2485
3442
  type: i0.ViewChildren,
2486
3443
  args: ["thCell", { isSignal: true }]
@@ -2509,6 +3466,14 @@ i0.ɵɵngDeclareClassMetadata({
2509
3466
  type: i0.ViewChild,
2510
3467
  args: ["foot", { isSignal: true }]
2511
3468
  }],
3469
+ selectionBarTpl: [{
3470
+ type: i0.ContentChild,
3471
+ args: [i0.forwardRef(() => WrTableSelectionBar), { isSignal: true }]
3472
+ }],
3473
+ selectionBarEl: [{
3474
+ type: i0.ViewChild,
3475
+ args: ["selectionBarEl", { isSignal: true }]
3476
+ }],
2512
3477
  expandTpl: [{
2513
3478
  type: i0.ContentChild,
2514
3479
  args: [i0.forwardRef(() => WrTableExpand), { isSignal: true }]
@@ -2517,6 +3482,18 @@ i0.ɵɵngDeclareClassMetadata({
2517
3482
  type: i0.ViewChildren,
2518
3483
  args: ["rowEl", { isSignal: true }]
2519
3484
  }],
3485
+ editable: [{
3486
+ type: i0.Input,
3487
+ args: [{
3488
+ isSignal: true,
3489
+ alias: "editable",
3490
+ required: false
3491
+ }]
3492
+ }],
3493
+ cellEdit: [{
3494
+ type: i0.Output,
3495
+ args: ["cellEdit"]
3496
+ }],
2520
3497
  groupTpl: [{
2521
3498
  type: i0.ContentChild,
2522
3499
  args: [i0.forwardRef(() => WrTableGroupHeader), { isSignal: true }]
@@ -2567,6 +3544,6 @@ function wrSortRows(rows, sort, accessor = wrReadField) {
2567
3544
  return 0;
2568
3545
  });
2569
3546
  }
2570
- export { WrTable, WrTableCell, WrTableExpand, WrTableFilter, WrTableGroupHeader, WrTableSort, wrReadField, wrSortRows };
3547
+ export { WrTable, WrTableCell, WrTableColumnChooser, WrTableEditCell, WrTableExpand, WrTableFilter, WrTableGroupHeader, WrTableSelectionBar, WrTableSort, wrReadField, wrSortRows };
2571
3548
 
2572
3549
  //# sourceMappingURL=ngwr-table.mjs.map