ngwr 9.1.0 → 10.1.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 (276) hide show
  1. package/README.md +23 -8
  2. package/action-sheet/styles/_index.scss +6 -1
  3. package/badge/styles/_index.scss +17 -7
  4. package/badge/styles/_tag.scss +12 -3
  5. package/border-glow/styles/_index.scss +5 -0
  6. package/button/styles/_index.scss +48 -1
  7. package/calendar/styles/_index.scss +9 -1
  8. package/circular-text/styles/_index.scss +6 -1
  9. package/density/styles/_index.scss +3 -1
  10. package/dialog/styles/_index.scss +66 -2
  11. package/drag-drop/styles/_index.scss +20 -7
  12. package/drawer/styles/_index.scss +61 -1
  13. package/event-calendar/styles/_index.scss +284 -0
  14. package/falling-text/styles/_index.scss +5 -0
  15. package/fesm2022/ngwr-action-sheet.mjs +1 -1
  16. package/fesm2022/ngwr-action-sheet.mjs.map +1 -1
  17. package/fesm2022/ngwr-alert.mjs +8 -3
  18. package/fesm2022/ngwr-alert.mjs.map +1 -1
  19. package/fesm2022/ngwr-back-top.mjs +6 -4
  20. package/fesm2022/ngwr-back-top.mjs.map +1 -1
  21. package/fesm2022/ngwr-border-glow.mjs +12 -9
  22. package/fesm2022/ngwr-border-glow.mjs.map +1 -1
  23. package/fesm2022/ngwr-breadcrumbs.mjs +2 -2
  24. package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
  25. package/fesm2022/ngwr-calendar.mjs +5 -3
  26. package/fesm2022/ngwr-calendar.mjs.map +1 -1
  27. package/fesm2022/ngwr-card.mjs +2 -2
  28. package/fesm2022/ngwr-card.mjs.map +1 -1
  29. package/fesm2022/ngwr-carousel.mjs +17 -4
  30. package/fesm2022/ngwr-carousel.mjs.map +1 -1
  31. package/fesm2022/ngwr-cascader.mjs +35 -7
  32. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  33. package/fesm2022/ngwr-checkbox.mjs +12 -3
  34. package/fesm2022/ngwr-checkbox.mjs.map +1 -1
  35. package/fesm2022/ngwr-circular-text.mjs +2 -2
  36. package/fesm2022/ngwr-circular-text.mjs.map +1 -1
  37. package/fesm2022/ngwr-color-picker.mjs +6 -5
  38. package/fesm2022/ngwr-color-picker.mjs.map +1 -1
  39. package/fesm2022/ngwr-command-palette.mjs +7 -3
  40. package/fesm2022/ngwr-command-palette.mjs.map +1 -1
  41. package/fesm2022/ngwr-context-menu.mjs +7 -7
  42. package/fesm2022/ngwr-context-menu.mjs.map +1 -1
  43. package/fesm2022/ngwr-counter.mjs +9 -1
  44. package/fesm2022/ngwr-counter.mjs.map +1 -1
  45. package/fesm2022/ngwr-date-picker.mjs +37 -15
  46. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  47. package/fesm2022/ngwr-density.mjs +10 -2
  48. package/fesm2022/ngwr-density.mjs.map +1 -1
  49. package/fesm2022/ngwr-descriptions.mjs +5 -4
  50. package/fesm2022/ngwr-descriptions.mjs.map +1 -1
  51. package/fesm2022/ngwr-dialog.mjs +10 -1
  52. package/fesm2022/ngwr-dialog.mjs.map +1 -1
  53. package/fesm2022/ngwr-drag-drop.mjs +2 -2
  54. package/fesm2022/ngwr-drag-drop.mjs.map +1 -1
  55. package/fesm2022/ngwr-drawer.mjs +37 -16
  56. package/fesm2022/ngwr-drawer.mjs.map +1 -1
  57. package/fesm2022/ngwr-dropdown.mjs +8 -3
  58. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  59. package/fesm2022/ngwr-event-calendar.mjs +723 -0
  60. package/fesm2022/ngwr-event-calendar.mjs.map +1 -0
  61. package/fesm2022/ngwr-falling-text.mjs +2 -2
  62. package/fesm2022/ngwr-falling-text.mjs.map +1 -1
  63. package/fesm2022/ngwr-file-upload.mjs +2 -2
  64. package/fesm2022/ngwr-file-upload.mjs.map +1 -1
  65. package/fesm2022/ngwr-form.mjs +258 -42
  66. package/fesm2022/ngwr-form.mjs.map +1 -1
  67. package/fesm2022/ngwr-fuzzy-text.mjs +15 -1
  68. package/fesm2022/ngwr-fuzzy-text.mjs.map +1 -1
  69. package/fesm2022/ngwr-gauge.mjs +8 -3
  70. package/fesm2022/ngwr-gauge.mjs.map +1 -1
  71. package/fesm2022/ngwr-glitch-text.mjs +2 -2
  72. package/fesm2022/ngwr-glitch-text.mjs.map +1 -1
  73. package/fesm2022/ngwr-gradient-text.mjs +2 -2
  74. package/fesm2022/ngwr-gradient-text.mjs.map +1 -1
  75. package/fesm2022/ngwr-i18n-en.mjs +89 -5
  76. package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
  77. package/fesm2022/ngwr-i18n-ru.mjs +90 -5
  78. package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
  79. package/fesm2022/ngwr-i18n.mjs +94 -3
  80. package/fesm2022/ngwr-i18n.mjs.map +1 -1
  81. package/fesm2022/ngwr-icon.mjs +79 -35
  82. package/fesm2022/ngwr-icon.mjs.map +1 -1
  83. package/fesm2022/ngwr-input-number.mjs +19 -3
  84. package/fesm2022/ngwr-input-number.mjs.map +1 -1
  85. package/fesm2022/ngwr-input.mjs +48 -6
  86. package/fesm2022/ngwr-input.mjs.map +1 -1
  87. package/fesm2022/ngwr-knob.mjs +8 -3
  88. package/fesm2022/ngwr-knob.mjs.map +1 -1
  89. package/fesm2022/ngwr-lightbox.mjs +32 -3
  90. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  91. package/fesm2022/ngwr-line-chart.mjs +3 -3
  92. package/fesm2022/ngwr-line-chart.mjs.map +1 -1
  93. package/fesm2022/ngwr-list.mjs +2 -2
  94. package/fesm2022/ngwr-list.mjs.map +1 -1
  95. package/fesm2022/ngwr-loading-bar.mjs +2 -2
  96. package/fesm2022/ngwr-loading-bar.mjs.map +1 -1
  97. package/fesm2022/ngwr-marquee.mjs +2 -2
  98. package/fesm2022/ngwr-marquee.mjs.map +1 -1
  99. package/fesm2022/ngwr-media.mjs +3 -0
  100. package/fesm2022/ngwr-media.mjs.map +1 -1
  101. package/fesm2022/ngwr-mention.mjs +166 -10
  102. package/fesm2022/ngwr-mention.mjs.map +1 -1
  103. package/fesm2022/ngwr-meter-group.mjs +14 -3
  104. package/fesm2022/ngwr-meter-group.mjs.map +1 -1
  105. package/fesm2022/ngwr-overlay.mjs +173 -3
  106. package/fesm2022/ngwr-overlay.mjs.map +1 -1
  107. package/fesm2022/ngwr-page-header.mjs +2 -2
  108. package/fesm2022/ngwr-page-header.mjs.map +1 -1
  109. package/fesm2022/ngwr-pagination.mjs +17 -4
  110. package/fesm2022/ngwr-pagination.mjs.map +1 -1
  111. package/fesm2022/ngwr-popconfirm.mjs +4 -3
  112. package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
  113. package/fesm2022/ngwr-popover.mjs +10 -3
  114. package/fesm2022/ngwr-popover.mjs.map +1 -1
  115. package/fesm2022/ngwr-progress.mjs +8 -2
  116. package/fesm2022/ngwr-progress.mjs.map +1 -1
  117. package/fesm2022/ngwr-qr.mjs.map +1 -1
  118. package/fesm2022/ngwr-rating.mjs +6 -4
  119. package/fesm2022/ngwr-rating.mjs.map +1 -1
  120. package/fesm2022/ngwr-result.mjs +19 -12
  121. package/fesm2022/ngwr-result.mjs.map +1 -1
  122. package/fesm2022/ngwr-segmented.mjs +2 -2
  123. package/fesm2022/ngwr-segmented.mjs.map +1 -1
  124. package/fesm2022/ngwr-select.mjs +40 -13
  125. package/fesm2022/ngwr-select.mjs.map +1 -1
  126. package/fesm2022/ngwr-shiny-text.mjs +4 -6
  127. package/fesm2022/ngwr-shiny-text.mjs.map +1 -1
  128. package/fesm2022/ngwr-speed-dial.mjs +11 -3
  129. package/fesm2022/ngwr-speed-dial.mjs.map +1 -1
  130. package/fesm2022/ngwr-spotlight-card.mjs +2 -2
  131. package/fesm2022/ngwr-spotlight-card.mjs.map +1 -1
  132. package/fesm2022/ngwr-squircle.mjs +1 -1
  133. package/fesm2022/ngwr-squircle.mjs.map +1 -1
  134. package/fesm2022/ngwr-star-border.mjs +2 -2
  135. package/fesm2022/ngwr-star-border.mjs.map +1 -1
  136. package/fesm2022/ngwr-switch.mjs +10 -3
  137. package/fesm2022/ngwr-switch.mjs.map +1 -1
  138. package/fesm2022/ngwr-table.mjs +233 -19
  139. package/fesm2022/ngwr-table.mjs.map +1 -1
  140. package/fesm2022/ngwr-tabs.mjs +21 -4
  141. package/fesm2022/ngwr-tabs.mjs.map +1 -1
  142. package/fesm2022/ngwr-textarea.mjs +20 -4
  143. package/fesm2022/ngwr-textarea.mjs.map +1 -1
  144. package/fesm2022/ngwr-theme.mjs +13 -3
  145. package/fesm2022/ngwr-theme.mjs.map +1 -1
  146. package/fesm2022/ngwr-tilt-card.mjs +2 -2
  147. package/fesm2022/ngwr-tilt-card.mjs.map +1 -1
  148. package/fesm2022/ngwr-toolbar.mjs +2 -2
  149. package/fesm2022/ngwr-toolbar.mjs.map +1 -1
  150. package/fesm2022/ngwr-tour.mjs +264 -0
  151. package/fesm2022/ngwr-tour.mjs.map +1 -0
  152. package/fesm2022/ngwr-transfer.mjs +184 -0
  153. package/fesm2022/ngwr-transfer.mjs.map +1 -0
  154. package/fesm2022/ngwr-tree.mjs +27 -9
  155. package/fesm2022/ngwr-tree.mjs.map +1 -1
  156. package/fesm2022/ngwr-typewriter.mjs +2 -2
  157. package/fesm2022/ngwr-typewriter.mjs.map +1 -1
  158. package/fesm2022/ngwr-validators.mjs +118 -2
  159. package/fesm2022/ngwr-validators.mjs.map +1 -1
  160. package/fesm2022/ngwr-version.mjs +2 -2
  161. package/fesm2022/ngwr-version.mjs.map +1 -1
  162. package/fesm2022/ngwr-virtual-scroll.mjs +2 -2
  163. package/fesm2022/ngwr-virtual-scroll.mjs.map +1 -1
  164. package/fesm2022/ngwr-waves.mjs +25 -3
  165. package/fesm2022/ngwr-waves.mjs.map +1 -1
  166. package/form/styles/_index.scss +8 -4
  167. package/glitch-text/styles/_index.scss +5 -0
  168. package/gradient-text/styles/_index.scss +5 -0
  169. package/i18n/en.json +233 -0
  170. package/i18n/ru.json +233 -0
  171. package/icon/styles/_index.scss +15 -1
  172. package/input/styles/_index.scss +16 -0
  173. package/input-number/styles/_index.scss +8 -1
  174. package/keyboard/styles/_index.scss +15 -3
  175. package/llms-full.txt +124 -63
  176. package/llms.txt +29 -8
  177. package/loading-bar/styles/_index.scss +5 -0
  178. package/marquee/styles/_index.scss +7 -2
  179. package/mention/styles/_index.scss +23 -0
  180. package/overlay/styles/_index.scss +5 -0
  181. package/package.json +15 -1
  182. package/pagination/styles/_index.scss +12 -0
  183. package/popover/styles/_index.scss +165 -45
  184. package/pull-to-refresh/styles/_index.scss +5 -0
  185. package/result/styles/_index.scss +3 -3
  186. package/schematics/icon-set/index.js +80 -34
  187. package/schematics/icon-set/schema.json +8 -3
  188. package/schematics/ng-add/index.js +23 -6
  189. package/schematics/package.json +3 -0
  190. package/schematics/page/templates.js +17 -21
  191. package/schematics/provider/index.js +31 -13
  192. package/schematics/provider/schema.json +40 -24
  193. package/schematics/use/index.js +5 -1
  194. package/schematics/use/schema.json +8 -3
  195. package/schematics/use/symbol-map.json +7 -176
  196. package/segmented/styles/_index.scss +1 -1
  197. package/select/styles/_index.scss +20 -3
  198. package/shiny-text/styles/_index.scss +5 -0
  199. package/speed-dial/styles/_index.scss +12 -1
  200. package/splitter/styles/_index.scss +7 -1
  201. package/spotlight-card/styles/_index.scss +5 -0
  202. package/squircle/styles/_index.scss +5 -0
  203. package/star-border/styles/_index.scss +5 -0
  204. package/statistic/styles/_index.scss +2 -2
  205. package/styles/_animations.scss +6 -0
  206. package/styles.scss +3 -0
  207. package/table/styles/_index.scss +128 -12
  208. package/theme/styles/_box-model.scss +29 -0
  209. package/theme/styles/_colors.scss +116 -15
  210. package/theme/styles/_dark.scss +65 -7
  211. package/theme/styles/_focus.scss +2 -8
  212. package/theme/styles/_index.scss +1 -0
  213. package/tilt-card/styles/_index.scss +5 -0
  214. package/toast/styles/_index.scss +6 -3
  215. package/tour/styles/_index.scss +63 -0
  216. package/transfer/styles/_index.scss +105 -0
  217. package/types/ngwr-alert.d.ts +4 -1
  218. package/types/ngwr-avatar.d.ts +1 -1
  219. package/types/ngwr-back-top.d.ts +3 -2
  220. package/types/ngwr-badge.d.ts +1 -1
  221. package/types/ngwr-border-glow.d.ts +0 -1
  222. package/types/ngwr-carousel.d.ts +10 -1
  223. package/types/ngwr-cascader.d.ts +13 -1
  224. package/types/ngwr-checkbox.d.ts +9 -1
  225. package/types/ngwr-color-picker.d.ts +1 -0
  226. package/types/ngwr-command-palette.d.ts +4 -1
  227. package/types/ngwr-context-menu.d.ts +1 -0
  228. package/types/ngwr-date-picker.d.ts +14 -4
  229. package/types/ngwr-density.d.ts +9 -2
  230. package/types/ngwr-dialog.d.ts +9 -0
  231. package/types/ngwr-divider.d.ts +1 -1
  232. package/types/ngwr-drawer.d.ts +20 -4
  233. package/types/ngwr-dropdown.d.ts +1 -0
  234. package/types/ngwr-event-calendar.d.ts +358 -0
  235. package/types/ngwr-form.d.ts +177 -20
  236. package/types/ngwr-fuzzy-text.d.ts +8 -0
  237. package/types/ngwr-gauge.d.ts +4 -1
  238. package/types/ngwr-i18n.d.ts +80 -2
  239. package/types/ngwr-icon.d.ts +11 -19
  240. package/types/ngwr-input-number.d.ts +8 -1
  241. package/types/ngwr-input.d.ts +50 -20
  242. package/types/ngwr-knob.d.ts +4 -1
  243. package/types/ngwr-lightbox.d.ts +7 -1
  244. package/types/ngwr-line-chart.d.ts +1 -1
  245. package/types/ngwr-media.d.ts +1 -1
  246. package/types/ngwr-mention.d.ts +45 -1
  247. package/types/ngwr-meter-group.d.ts +9 -1
  248. package/types/ngwr-overlay.d.ts +80 -2
  249. package/types/ngwr-page-header.d.ts +2 -2
  250. package/types/ngwr-pagination.d.ts +15 -2
  251. package/types/ngwr-popconfirm.d.ts +1 -0
  252. package/types/ngwr-popover.d.ts +1 -0
  253. package/types/ngwr-progress.d.ts +4 -1
  254. package/types/ngwr-rating.d.ts +3 -2
  255. package/types/ngwr-result.d.ts +12 -6
  256. package/types/ngwr-segmented.d.ts +6 -0
  257. package/types/ngwr-select.d.ts +19 -7
  258. package/types/ngwr-shiny-text.d.ts +2 -4
  259. package/types/ngwr-speed-dial.d.ts +7 -1
  260. package/types/ngwr-squircle.d.ts +1 -1
  261. package/types/ngwr-switch.d.ts +7 -1
  262. package/types/ngwr-table.d.ts +126 -6
  263. package/types/ngwr-tabs.d.ts +1 -4
  264. package/types/ngwr-textarea.d.ts +8 -1
  265. package/types/ngwr-theme.d.ts +8 -1
  266. package/types/ngwr-toolbar.d.ts +2 -2
  267. package/types/ngwr-tour.d.ts +132 -0
  268. package/types/ngwr-transfer.d.ts +118 -0
  269. package/types/ngwr-tree.d.ts +11 -2
  270. package/types/ngwr-validators.d.ts +62 -2
  271. package/types/ngwr-version.d.ts +2 -2
  272. package/types/ngwr-waves.d.ts +10 -0
  273. package/typewriter/styles/_index.scss +5 -0
  274. package/typography/styles/_index.scss +3 -3
  275. package/virtual-scroll/styles/_index.scss +6 -1
  276. package/waves/styles/_index.scss +26 -0
@@ -6,6 +6,7 @@ import { input, inject, TemplateRef, Directive, output, signal, computed, ViewEn
6
6
  import * as i1 from '@angular/forms';
7
7
  import { FormsModule } from '@angular/forms';
8
8
  import { WrCheckbox } from 'ngwr/checkbox';
9
+ import { useI18nText } from 'ngwr/i18n';
9
10
  import { WrPagination } from 'ngwr/pagination';
10
11
  import { WrSpinner } from 'ngwr/spinner';
11
12
  import { WrDropdown, WrDropdownMenu } from 'ngwr/dropdown';
@@ -87,6 +88,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
87
88
  */
88
89
  class WrTableFilter {
89
90
  /** Available filter options. */
91
+ /** Accessible name of the filter trigger. Falls back to `table.filter`. */
92
+ filterLabel = input(null, /* @ts-ignore */
93
+ ...(ngDevMode ? [{ debugName: "filterLabel" }] : /* istanbul ignore next */ []));
94
+ /** Text shown when the search finds nothing. Falls back to `table.noMatches`. */
95
+ noMatchesLabel = input(null, /* @ts-ignore */
96
+ ...(ngDevMode ? [{ debugName: "noMatchesLabel" }] : /* istanbul ignore next */ []));
97
+ resolvedFilterLabel = useI18nText(this.filterLabel, 'table.filter', 'Filter column');
98
+ resolvedNoMatchesLabel = useI18nText(this.noMatchesLabel, 'table.noMatches', 'No matches');
90
99
  items = input.required(/* @ts-ignore */
91
100
  ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
92
101
  /** Fires whenever the selection changes. */
@@ -127,12 +136,12 @@ class WrTableFilter {
127
136
  this.selectionChange.emit(this.items().filter(i => i.selected));
128
137
  }
129
138
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrTableFilter, deps: [], target: i0.ɵɵFactoryTarget.Component });
130
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: WrTableFilter, isStandalone: true, selector: "wr-table-filter", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { selectionChange: "selectionChange" }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: "<button type=\"button\" class=\"wr-table-filter__trigger\" [wrDropdown]=\"menu\" aria-label=\"Filter column\">\n <svg\n class=\"wr-icon__svg\"\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\n d=\"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z\"\n />\n </svg>\n @if (selectedCount() > 0) {\n <span class=\"wr-table-filter__count\">{{ selectedCount() }}</span>\n }\n</button>\n\n<wr-dropdown-menu #menu>\n <div class=\"wr-table-filter__panel\">\n <input\n class=\"wr-table-filter__search\"\n type=\"search\"\n placeholder=\"Search\"\n [value]=\"query()\"\n (input)=\"onSearchInput($event)\"\n />\n\n <div class=\"wr-table-filter__list\">\n @for (item of visible(); track item.value) {\n <button\n type=\"button\"\n class=\"wr-table-filter__item\"\n [class.wr-table-filter__item--selected]=\"item.selected\"\n (click)=\"onToggle(item)\"\n >\n <span class=\"wr-table-filter__check\">\n <svg\n class=\"wr-icon__svg\"\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=\"M20 6 9 17l-5-5\" />\n </svg>\n </span>\n <span class=\"wr-table-filter__title\">{{ item.title }}</span>\n </button>\n } @empty {\n <div class=\"wr-table-filter__empty\">No matches</div>\n }\n </div>\n\n @if (selectedCount() > 0) {\n <button type=\"button\" class=\"wr-table-filter__reset\" (click)=\"onReset()\">Reset</button>\n }\n </div>\n</wr-dropdown-menu>\n", dependencies: [{ kind: "directive", type: WrDropdown, selector: "[wrDropdown]", inputs: ["wrDropdown", "trigger", "position", "responsive"], outputs: ["opened", "closed"] }, { kind: "component", type: WrDropdownMenu, selector: "wr-dropdown-menu", exportAs: ["wrDropdownMenu"] }], encapsulation: i0.ViewEncapsulation.None });
139
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: WrTableFilter, isStandalone: true, selector: "wr-table-filter", inputs: { filterLabel: { classPropertyName: "filterLabel", publicName: "filterLabel", isSignal: true, isRequired: false, transformFunction: null }, noMatchesLabel: { classPropertyName: "noMatchesLabel", publicName: "noMatchesLabel", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { selectionChange: "selectionChange" }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: "<button type=\"button\" class=\"wr-table-filter__trigger\" [wrDropdown]=\"menu\" [attr.aria-label]=\"resolvedFilterLabel()\">\n <svg\n class=\"wr-icon__svg\"\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\n d=\"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z\"\n />\n </svg>\n @if (selectedCount() > 0) {\n <span class=\"wr-table-filter__count\">{{ selectedCount() }}</span>\n }\n</button>\n\n<wr-dropdown-menu #menu>\n <div class=\"wr-table-filter__panel\">\n <input\n class=\"wr-table-filter__search\"\n type=\"search\"\n placeholder=\"Search\"\n [value]=\"query()\"\n (input)=\"onSearchInput($event)\"\n />\n\n <div class=\"wr-table-filter__list\">\n @for (item of visible(); track item.value) {\n <button\n type=\"button\"\n class=\"wr-table-filter__item\"\n [class.wr-table-filter__item--selected]=\"item.selected\"\n (click)=\"onToggle(item)\"\n >\n <span class=\"wr-table-filter__check\">\n <svg\n class=\"wr-icon__svg\"\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=\"M20 6 9 17l-5-5\" />\n </svg>\n </span>\n <span class=\"wr-table-filter__title\">{{ item.title }}</span>\n </button>\n } @empty {\n <div class=\"wr-table-filter__empty\">{{ resolvedNoMatchesLabel() }}</div>\n }\n </div>\n\n @if (selectedCount() > 0) {\n <button type=\"button\" class=\"wr-table-filter__reset\" (click)=\"onReset()\">Reset</button>\n }\n </div>\n</wr-dropdown-menu>\n", dependencies: [{ kind: "directive", type: WrDropdown, selector: "[wrDropdown]", inputs: ["wrDropdown", "trigger", "position", "responsive"], outputs: ["opened", "closed"] }, { kind: "component", type: WrDropdownMenu, selector: "wr-dropdown-menu", exportAs: ["wrDropdownMenu"] }], encapsulation: i0.ViewEncapsulation.None });
131
140
  }
132
141
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrTableFilter, decorators: [{
133
142
  type: Component,
134
- args: [{ selector: 'wr-table-filter', encapsulation: ViewEncapsulation.None, host: { '[class]': 'classes()' }, imports: [WrDropdown, WrDropdownMenu], template: "<button type=\"button\" class=\"wr-table-filter__trigger\" [wrDropdown]=\"menu\" aria-label=\"Filter column\">\n <svg\n class=\"wr-icon__svg\"\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\n d=\"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z\"\n />\n </svg>\n @if (selectedCount() > 0) {\n <span class=\"wr-table-filter__count\">{{ selectedCount() }}</span>\n }\n</button>\n\n<wr-dropdown-menu #menu>\n <div class=\"wr-table-filter__panel\">\n <input\n class=\"wr-table-filter__search\"\n type=\"search\"\n placeholder=\"Search\"\n [value]=\"query()\"\n (input)=\"onSearchInput($event)\"\n />\n\n <div class=\"wr-table-filter__list\">\n @for (item of visible(); track item.value) {\n <button\n type=\"button\"\n class=\"wr-table-filter__item\"\n [class.wr-table-filter__item--selected]=\"item.selected\"\n (click)=\"onToggle(item)\"\n >\n <span class=\"wr-table-filter__check\">\n <svg\n class=\"wr-icon__svg\"\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=\"M20 6 9 17l-5-5\" />\n </svg>\n </span>\n <span class=\"wr-table-filter__title\">{{ item.title }}</span>\n </button>\n } @empty {\n <div class=\"wr-table-filter__empty\">No matches</div>\n }\n </div>\n\n @if (selectedCount() > 0) {\n <button type=\"button\" class=\"wr-table-filter__reset\" (click)=\"onReset()\">Reset</button>\n }\n </div>\n</wr-dropdown-menu>\n" }]
135
- }], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: true }] }], selectionChange: [{ type: i0.Output, args: ["selectionChange"] }] } });
143
+ args: [{ selector: 'wr-table-filter', encapsulation: ViewEncapsulation.None, host: { '[class]': 'classes()' }, imports: [WrDropdown, WrDropdownMenu], template: "<button type=\"button\" class=\"wr-table-filter__trigger\" [wrDropdown]=\"menu\" [attr.aria-label]=\"resolvedFilterLabel()\">\n <svg\n class=\"wr-icon__svg\"\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\n d=\"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z\"\n />\n </svg>\n @if (selectedCount() > 0) {\n <span class=\"wr-table-filter__count\">{{ selectedCount() }}</span>\n }\n</button>\n\n<wr-dropdown-menu #menu>\n <div class=\"wr-table-filter__panel\">\n <input\n class=\"wr-table-filter__search\"\n type=\"search\"\n placeholder=\"Search\"\n [value]=\"query()\"\n (input)=\"onSearchInput($event)\"\n />\n\n <div class=\"wr-table-filter__list\">\n @for (item of visible(); track item.value) {\n <button\n type=\"button\"\n class=\"wr-table-filter__item\"\n [class.wr-table-filter__item--selected]=\"item.selected\"\n (click)=\"onToggle(item)\"\n >\n <span class=\"wr-table-filter__check\">\n <svg\n class=\"wr-icon__svg\"\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=\"M20 6 9 17l-5-5\" />\n </svg>\n </span>\n <span class=\"wr-table-filter__title\">{{ item.title }}</span>\n </button>\n } @empty {\n <div class=\"wr-table-filter__empty\">{{ resolvedNoMatchesLabel() }}</div>\n }\n </div>\n\n @if (selectedCount() > 0) {\n <button type=\"button\" class=\"wr-table-filter__reset\" (click)=\"onReset()\">Reset</button>\n }\n </div>\n</wr-dropdown-menu>\n" }]
144
+ }], propDecorators: { filterLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterLabel", required: false }] }], noMatchesLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "noMatchesLabel", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: true }] }], selectionChange: [{ type: i0.Output, args: ["selectionChange"] }] } });
136
145
 
137
146
  /**
138
147
  * @license
@@ -210,6 +219,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
210
219
  */
211
220
  /** Sentinel value for the single synthetic bucket used when grouping is off. */
212
221
  const WR_TABLE_UNGROUPED = Symbol('wr-table-ungrouped');
222
+ /** A flat row descriptor with the tree fields at their flat-table defaults. */
223
+ function flatRow(row, id, posinset, setsize) {
224
+ return { kind: 'row', id, row, depth: 0, parent: false, open: null, posinset, setsize };
225
+ }
213
226
  /**
214
227
  * Data table with sortable / filterable headers and custom cell templates.
215
228
  *
@@ -237,7 +250,7 @@ class WrTable {
237
250
  /** Column definitions, keyed by row property name. */
238
251
  columns = input.required(/* @ts-ignore */
239
252
  ...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
240
- /** Row items. `null`/`undefined` → loading skeleton. */
253
+ /** Row items. `null`/`undefined` renders the empty state; use `[loading]` for the spinner. */
241
254
  items = input(null, /* @ts-ignore */
242
255
  ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
243
256
  /** Show the loading spinner overlay. @default false */
@@ -293,6 +306,47 @@ class WrTable {
293
306
  */
294
307
  groupBy = input(null, /* @ts-ignore */
295
308
  ...(ngDevMode ? [{ debugName: "groupBy" }] : /* istanbul ignore next */ []));
309
+ /**
310
+ * Render the rows as a hierarchy: names the property (or computes the array)
311
+ * holding each row's children. `items` then means the ROOTS, and the forest is
312
+ * flattened depth-first into the same `<tbody>` — child rows are ordinary
313
+ * `<tr>`s going through the same cell loop, so column pin / resize /
314
+ * drag-reorder and `[wrTableCell]` templates keep working at every depth.
315
+ *
316
+ * Open state reuses the `expanded` model and row identity reuses `rowKey`, so
317
+ * a tree needs no second key space. Everything collapsed is the default.
318
+ *
319
+ * **Mutually exclusive with `groupBy`** — a forest has no flat list to bucket,
320
+ * so grouping wins and the hierarchy is ignored while it is set. Also
321
+ * mutually exclusive with `[wrTableExpand]` detail rows: both own the row's
322
+ * disclosure affordance.
323
+ *
324
+ * `pageSize` pages the ROOTS; a root brings its open descendants with it.
325
+ *
326
+ * @example
327
+ * ```html
328
+ * <wr-table
329
+ * rowKey="id"
330
+ * childrenKey="reports"
331
+ * treeColumn="name"
332
+ * [columns]="columns"
333
+ * [items]="org"
334
+ * [(expanded)]="open"
335
+ * />
336
+ * ```
337
+ */
338
+ childrenKey = input(null, /* @ts-ignore */
339
+ ...(ngDevMode ? [{ debugName: "childrenKey" }] : /* istanbul ignore next */ []));
340
+ /**
341
+ * Which column carries the indent and the expand toggle. Keyed, not
342
+ * positional, so it survives a `columnOrder` drag. Defaults to whichever
343
+ * column renders first.
344
+ */
345
+ treeColumn = input(null, /* @ts-ignore */
346
+ ...(ngDevMode ? [{ debugName: "treeColumn" }] : /* istanbul ignore next */ []));
347
+ /** Accessible name of a parent row's expand toggle. Falls back to `table.toggleRow`. */
348
+ toggleRowLabel = input(null, /* @ts-ignore */
349
+ ...(ngDevMode ? [{ debugName: "toggleRowLabel" }] : /* istanbul ignore next */ []));
296
350
  /**
297
351
  * Two-way bindable collapsed group values (the values `groupBy` returns).
298
352
  * Keyed by value, so a collapsed group stays collapsed across page changes and
@@ -314,6 +368,35 @@ class WrTable {
314
368
  /** Two-way bindable sort array. Order in array = application order. */
315
369
  sort = model([], /* @ts-ignore */
316
370
  ...(ngDevMode ? [{ debugName: "sort" }] : /* istanbul ignore next */ []));
371
+ /** Text shown when there are no rows. Falls back to `table.empty`. */
372
+ emptyLabel = input(null, /* @ts-ignore */
373
+ ...(ngDevMode ? [{ debugName: "emptyLabel" }] : /* istanbul ignore next */ []));
374
+ /** Accessible name of a column's sort button. Falls back to `table.sort`. */
375
+ sortLabel = input(null, /* @ts-ignore */
376
+ ...(ngDevMode ? [{ debugName: "sortLabel" }] : /* istanbul ignore next */ []));
377
+ /** Accessible name of the select-all checkbox. Falls back to `table.selectAll`. */
378
+ selectAllLabel = input(null, /* @ts-ignore */
379
+ ...(ngDevMode ? [{ debugName: "selectAllLabel" }] : /* istanbul ignore next */ []));
380
+ /** Accessible name of a row's select checkbox. Falls back to `table.selectRow`. */
381
+ selectRowLabel = input(null, /* @ts-ignore */
382
+ ...(ngDevMode ? [{ debugName: "selectRowLabel" }] : /* istanbul ignore next */ []));
383
+ /** Accessible name of a row's expand toggle. Falls back to `table.expandRow`. */
384
+ expandRowLabel = input(null, /* @ts-ignore */
385
+ ...(ngDevMode ? [{ debugName: "expandRowLabel" }] : /* istanbul ignore next */ []));
386
+ /** Accessible name of a group band's select checkbox. Falls back to `table.selectGroup`. */
387
+ selectGroupLabel = input(null, /* @ts-ignore */
388
+ ...(ngDevMode ? [{ debugName: "selectGroupLabel" }] : /* istanbul ignore next */ []));
389
+ /** Accessible name of a group band's collapse toggle. Falls back to `table.toggleGroup`. */
390
+ toggleGroupLabel = input(null, /* @ts-ignore */
391
+ ...(ngDevMode ? [{ debugName: "toggleGroupLabel" }] : /* istanbul ignore next */ []));
392
+ resolvedEmptyLabel = useI18nText(this.emptyLabel, 'table.empty', 'No data');
393
+ resolvedSortLabel = useI18nText(this.sortLabel, 'table.sort', 'Sort column');
394
+ resolvedSelectAllLabel = useI18nText(this.selectAllLabel, 'table.selectAll', 'Select all rows');
395
+ resolvedSelectRowLabel = useI18nText(this.selectRowLabel, 'table.selectRow', 'Select row');
396
+ resolvedExpandRowLabel = useI18nText(this.expandRowLabel, 'table.expandRow', 'Toggle row details');
397
+ resolvedToggleRowLabel = useI18nText(this.toggleRowLabel, 'table.toggleRow', 'Toggle child rows');
398
+ resolvedSelectGroupLabel = useI18nText(this.selectGroupLabel, 'table.selectGroup', 'Select group');
399
+ resolvedToggleGroupLabel = useI18nText(this.toggleGroupLabel, 'table.toggleGroup', 'Toggle group');
317
400
  /** Fires whenever a column's filter selection changes. */
318
401
  filterChange = output();
319
402
  /**
@@ -642,6 +725,7 @@ class WrTable {
642
725
  /** `virtualScroll` requested AND the data shape is safe to window. SSR-deterministic. */
643
726
  virtualized = computed(() => this.virtualScroll() &&
644
727
  this.groupBy() === null && // group bands / subtotals are variable height
728
+ !this.treeMode() && // expanding re-anchors the window; needs scroll anchoring first
645
729
  !this.expandable() && // an injected detail <tr> desyncs uniform offsets
646
730
  !this.responsive() && // card mode has no uniform row height
647
731
  this.pageSize() === 0 && // a visible pager owns chunking — the pager wins
@@ -671,8 +755,15 @@ class WrTable {
671
755
  const h = this.effRowH();
672
756
  const vp = this.viewportPx() || this.fallbackViewportPx();
673
757
  const over = this.overscan();
674
- const first = Math.floor(this.scrollTop() / h);
675
- const count = Math.ceil(vp / h);
758
+ // Clamp `first` to the last row: the window is a pure function of a pixel
759
+ // offset, so if the row list shrinks while the user is scrolled deep — a
760
+ // consumer filtering `items`, or a future hierarchy collapsing — `start`
761
+ // overshoots `end` and `slice` returns nothing, leaving a blank body under a
762
+ // spacer the old length's worth of pixels tall.
763
+ const first = Math.min(Math.floor(this.scrollTop() / h), total - 1);
764
+ // `+ 1` covers the partial row at the viewport's bottom edge: at overscan 0
765
+ // with the scroll resting mid-row, `ceil(vp / h)` alone stops one row short.
766
+ const count = Math.ceil(vp / h) + 1;
676
767
  const start = Math.max(0, first - over);
677
768
  const end = Math.min(total, first + count + over);
678
769
  return { start, end, padTop: start * h, padBottom: (total - end) * h };
@@ -720,7 +811,19 @@ class WrTable {
720
811
  return row;
721
812
  }
722
813
  /** Keys of the rows on the current page — the select-all scope. */
723
- pageRowKeys = computed(() => (this.visibleItems() ?? []).map(row => this.rowKeyOf(row)), /* @ts-ignore */
814
+ /**
815
+ * Scope of the header select-all: the rows currently ON SCREEN. In tree mode
816
+ * that is every VISIBLE node — a collapsed subtree is not on screen and is not
817
+ * swept in, which keeps the checkbox honest about what it just did.
818
+ */
819
+ pageRowKeys = computed(() => {
820
+ if (this.treeMode()) {
821
+ return this.renderRows()
822
+ .filter((entry) => entry.kind === 'row')
823
+ .map(entry => this.rowKeyOf(entry.row));
824
+ }
825
+ return (this.visibleItems() ?? []).map(row => this.rowKeyOf(row));
826
+ }, /* @ts-ignore */
724
827
  ...(ngDevMode ? [{ debugName: "pageRowKeys" }] : /* istanbul ignore next */ []));
725
828
  isRowSelected(row) {
726
829
  return this.selectionSet().has(this.rowKeyOf(row));
@@ -770,8 +873,94 @@ class WrTable {
770
873
  expandTpl = contentChild(WrTableExpand, /* @ts-ignore */
771
874
  ...(ngDevMode ? [{ debugName: "expandTpl" }] : /* istanbul ignore next */ []));
772
875
  /** Whether the expand column shows (a `[wrTableExpand]` template was projected). */
773
- expandable = computed(() => !!this.expandTpl(), /* @ts-ignore */
876
+ /**
877
+ * Tree mode is on when `childrenKey` is set AND grouping is not. Grouping wins
878
+ * deliberately: `groupBy` buckets a flat list and a forest has none, so rather
879
+ * than half-support the pair the hierarchy is ignored while a group is set.
880
+ */
881
+ treeMode = computed(() => this.childrenKey() !== null && this.groupBy() === null, /* @ts-ignore */
882
+ ...(ngDevMode ? [{ debugName: "treeMode" }] : /* istanbul ignore next */ []));
883
+ /** Detail rows and tree rows both own the row's disclosure — tree mode wins. */
884
+ expandable = computed(() => !this.treeMode() && !!this.expandTpl(), /* @ts-ignore */
774
885
  ...(ngDevMode ? [{ debugName: "expandable" }] : /* istanbul ignore next */ []));
886
+ /** The column that carries the indent + toggle — named, else whichever renders first. */
887
+ treeColumnKey = computed(() => this.treeMode() ? (this.treeColumn() ?? this.displayColumns()[0]?.key ?? null) : null, /* @ts-ignore */
888
+ ...(ngDevMode ? [{ debugName: "treeColumnKey" }] : /* istanbul ignore next */ []));
889
+ /** This row's children, whatever shape `childrenKey` names. */
890
+ childrenOf(row) {
891
+ const ck = this.childrenKey();
892
+ if (ck === null)
893
+ return [];
894
+ const raw = typeof ck === 'function' ? ck(row) : row[ck];
895
+ return Array.isArray(raw) ? raw : [];
896
+ }
897
+ /**
898
+ * Depth-first flatten of the forest, descending only into open parents.
899
+ * `seen` is path-scoped rather than global: the same row legitimately appearing
900
+ * under two parents is fine, a row appearing under itself is a cycle and would
901
+ * otherwise hang the walk.
902
+ */
903
+ flattenForest(roots) {
904
+ const open = new Set(this.expanded());
905
+ const out = [];
906
+ const walk = (rows, depth, prefix, seen) => {
907
+ rows.forEach((row, i) => {
908
+ const key = this.rowKeyOf(row);
909
+ if (seen.has(key))
910
+ return;
911
+ const children = this.childrenOf(row);
912
+ const parent = children.length > 0;
913
+ const isOpen = parent && open.has(key);
914
+ out.push({
915
+ kind: 'row',
916
+ id: `${prefix}r${i}`,
917
+ row,
918
+ depth,
919
+ parent,
920
+ open: parent ? isOpen : null,
921
+ posinset: i + 1,
922
+ setsize: rows.length,
923
+ });
924
+ if (isOpen)
925
+ walk(children, depth + 1, `${prefix}r${i}-`, new Set(seen).add(key));
926
+ });
927
+ };
928
+ walk(roots, 0, '', new Set());
929
+ return out;
930
+ }
931
+ /** Every node in the forest, depth-first — what selection and CSV must see. */
932
+ allTreeRows() {
933
+ const out = [];
934
+ const walk = (rows, seen) => {
935
+ for (const row of rows) {
936
+ const key = this.rowKeyOf(row);
937
+ if (seen.has(key))
938
+ continue;
939
+ out.push(row);
940
+ const children = this.childrenOf(row);
941
+ if (children.length > 0)
942
+ walk(children, new Set(seen).add(key));
943
+ }
944
+ };
945
+ walk(this.items() ?? [], new Set());
946
+ return out;
947
+ }
948
+ /** Open / close one parent row. */
949
+ toggleTreeRow(row) {
950
+ const key = this.rowKeyOf(row);
951
+ const open = this.expanded();
952
+ this.expanded.set(open.includes(key) ? open.filter(k => k !== key) : [...open, key]);
953
+ }
954
+ /** Open every parent in the forest. */
955
+ expandAllRows() {
956
+ this.expanded.set(this.allTreeRows()
957
+ .filter(row => this.childrenOf(row).length > 0)
958
+ .map(row => this.rowKeyOf(row)));
959
+ }
960
+ /** Close every parent. */
961
+ collapseAllRows() {
962
+ this.expanded.set([]);
963
+ }
775
964
  /** Leading control columns — selection + expand. */
776
965
  leadingCols = computed(() => (this.rowSelection() ? 1 : 0) + (this.expandable() ? 1 : 0), /* @ts-ignore */
777
966
  ...(ngDevMode ? [{ debugName: "leadingCols" }] : /* istanbul ignore next */ []));
@@ -798,7 +987,9 @@ class WrTable {
798
987
  ...(ngDevMode ? [{ debugName: "hasSummary" }] : /* istanbul ignore next */ []));
799
988
  /** Per-column footer values, computed over `items` (the current page in server mode). */
800
989
  summaries = computed(() => {
801
- const rows = this.items() ?? [];
990
+ // Every node in tree mode, not just the roots — a headcount that ignored
991
+ // children would be wrong in the obvious way.
992
+ const rows = this.datasetRows();
802
993
  const map = new Map();
803
994
  for (const [key, col] of Object.entries(this.columns())) {
804
995
  if (col.summary !== undefined)
@@ -852,7 +1043,10 @@ class WrTable {
852
1043
  return [];
853
1044
  const buckets = this.groupBuckets();
854
1045
  if (this.groupBy() === null) {
855
- return buckets[0].rows.map((row, i) => ({ kind: 'row', id: `r${i}`, row }));
1046
+ const roots = buckets[0].rows;
1047
+ if (this.treeMode())
1048
+ return this.flattenForest(roots);
1049
+ return roots.map((row, i) => flatRow(row, `r${i}`, i + 1, roots.length));
856
1050
  }
857
1051
  const collapsed = new Set(this.collapsedGroups());
858
1052
  const summaryCols = this.groupSummary() && this.hasSummary()
@@ -875,7 +1069,7 @@ class WrTable {
875
1069
  out.push({ kind: 'group', id: `g${gi}`, group });
876
1070
  if (isCollapsed)
877
1071
  return;
878
- bucket.rows.forEach((row, ri) => out.push({ kind: 'row', id: `g${gi}r${ri}`, row }));
1072
+ bucket.rows.forEach((row, ri) => out.push(flatRow(row, `g${gi}r${ri}`, ri + 1, bucket.rows.length)));
879
1073
  if (summaryCols.length) {
880
1074
  const summaries = new Map();
881
1075
  for (const [key, col] of summaryCols)
@@ -944,17 +1138,18 @@ class WrTable {
944
1138
  * Covers the current `items`, so in server-side mode (`totalItems` set) it
945
1139
  * exports the current page, while client-side pagination exports every page.
946
1140
  *
1141
+ * Returns the string; use `exportCsv()` when you want it downloaded as a file.
1142
+ *
947
1143
  * @example
948
- * ```html
949
- * <wr-table #table [columns]="columns" [items]="rows" />
950
- * <wr-btn (click)="table.exportCsv({ filename: 'users.csv' })">Export</wr-btn>
1144
+ * ```ts
1145
+ * const csv = this.table().toCsv({ delimiter: ';' });
951
1146
  * ```
952
1147
  */
953
1148
  toCsv(options = {}) {
954
1149
  const delimiter = options.delimiter ?? ',';
955
1150
  const escapeFormulas = options.escapeFormulas ?? true;
956
1151
  const cols = this.displayColumns();
957
- const rows = options.selectedOnly ? this.selectedRows() : (this.items() ?? []);
1152
+ const rows = options.selectedOnly ? this.selectedRows() : this.datasetRows();
958
1153
  const text = (value) => {
959
1154
  if (value == null)
960
1155
  return '';
@@ -997,9 +1192,17 @@ class WrTable {
997
1192
  link.click();
998
1193
  setTimeout(() => URL.revokeObjectURL(url));
999
1194
  }
1195
+ /**
1196
+ * Every row of the dataset. Flat that is `items`; in tree mode it is the whole
1197
+ * forest depth-first, so selection, CSV and the grand summary count children
1198
+ * instead of silently reporting roots only.
1199
+ */
1200
+ datasetRows() {
1201
+ return this.treeMode() ? this.allTreeRows() : (this.items() ?? []);
1202
+ }
1000
1203
  selectedRows() {
1001
1204
  const keys = new Set(this.selection());
1002
- return (this.items() ?? []).filter(row => keys.has(this.rowKeyOf(row)));
1205
+ return this.datasetRows().filter(row => keys.has(this.rowKeyOf(row)));
1003
1206
  }
1004
1207
  computeSummary(kind, rows, key) {
1005
1208
  if (typeof kind === 'function')
@@ -1029,6 +1232,17 @@ class WrTable {
1029
1232
  directionFor(key) {
1030
1233
  return this.sort().find(s => s.key === key)?.direction ?? null;
1031
1234
  }
1235
+ /**
1236
+ * `aria-sort` for a column header, per the WAI-ARIA table pattern. Only a
1237
+ * sortable column gets the attribute at all: on a plain column it would claim
1238
+ * the header is sortable when it is not.
1239
+ */
1240
+ ariaSortFor(key, sortable) {
1241
+ if (!sortable)
1242
+ return null;
1243
+ const dir = this.directionFor(key);
1244
+ return dir === 'asc' ? 'ascending' : dir === 'desc' ? 'descending' : 'none';
1245
+ }
1032
1246
  cycleSort(key) {
1033
1247
  const current = this.directionFor(key);
1034
1248
  const next = current === null ? 'asc' : current === 'asc' ? 'desc' : null;
@@ -1050,7 +1264,7 @@ class WrTable {
1050
1264
  return this.cellMap().get(String(key));
1051
1265
  }
1052
1266
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrTable, deps: [], target: i0.ɵɵFactoryTarget.Component });
1053
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: WrTable, isStandalone: true, selector: "wr-table", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, responsive: { classPropertyName: "responsive", publicName: "responsive", isSignal: true, isRequired: false, transformFunction: null }, reorderable: { classPropertyName: "reorderable", publicName: "reorderable", isSignal: true, isRequired: false, transformFunction: null }, columnOrder: { classPropertyName: "columnOrder", publicName: "columnOrder", isSignal: true, isRequired: false, transformFunction: null }, rowSelection: { classPropertyName: "rowSelection", publicName: "rowSelection", isSignal: true, isRequired: false, transformFunction: null }, rowKey: { classPropertyName: "rowKey", publicName: "rowKey", isSignal: true, isRequired: false, transformFunction: null }, selection: { classPropertyName: "selection", publicName: "selection", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, groupBy: { classPropertyName: "groupBy", publicName: "groupBy", isSignal: true, isRequired: false, transformFunction: null }, collapsedGroups: { classPropertyName: "collapsedGroups", publicName: "collapsedGroups", isSignal: true, isRequired: false, transformFunction: null }, groupSummary: { classPropertyName: "groupSummary", publicName: "groupSummary", isSignal: true, isRequired: false, transformFunction: null }, showGroupCount: { classPropertyName: "showGroupCount", publicName: "showGroupCount", isSignal: true, isRequired: false, transformFunction: null }, sort: { classPropertyName: "sort", publicName: "sort", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, page: { classPropertyName: "page", publicName: "page", isSignal: true, isRequired: false, transformFunction: null }, totalItems: { classPropertyName: "totalItems", publicName: "totalItems", isSignal: true, isRequired: false, transformFunction: null }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: true, isRequired: false, transformFunction: null }, rowHeight: { classPropertyName: "rowHeight", publicName: "rowHeight", isSignal: true, isRequired: false, transformFunction: null }, viewportHeight: { classPropertyName: "viewportHeight", publicName: "viewportHeight", isSignal: true, isRequired: false, transformFunction: null }, overscan: { classPropertyName: "overscan", publicName: "overscan", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { columnOrder: "columnOrderChange", selection: "selectionChange", expanded: "expandedChange", collapsedGroups: "collapsedGroupsChange", sort: "sortChange", filterChange: "filterChange", page: "pageChange" }, host: { properties: { "class.wr-table--responsive": "responsive()", "class.wr-table--virtual": "virtualized()" }, classAttribute: "wr-table" }, queries: [{ propertyName: "cellTemplates", predicate: WrTableCell, isSignal: true }, { propertyName: "expandTpl", first: true, predicate: WrTableExpand, descendants: true, isSignal: true }, { propertyName: "groupTpl", first: true, predicate: WrTableGroupHeader, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "headerCells", predicate: ["thCell"], descendants: true, isSignal: true }, { propertyName: "scrollEl", first: true, predicate: ["scroll"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (loading()) {\n <div class=\"wr-table__loading\">\n <wr-spinner size=\"lg\" />\n </div>\n}\n\n<div\n class=\"wr-table__scroll\"\n #scroll\n [style.max-height]=\"virtualized() ? resolvedViewportHeight() : null\"\n [attr.tabindex]=\"virtualized() ? 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 >\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>\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 <wr-checkbox\n size=\"sm\"\n [ngModel]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n (ngModelChange)=\"toggleAll($event)\"\n aria-label=\"Select all rows\"\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=\"wr-table__th\"\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.left.px]=\"leftPin(col.key)\"\n [style.right.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 type=\"button\" class=\"wr-table__sort-btn\" aria-label=\"Sort column\" (click)=\"cycleSort(col.key)\">\n <wr-table-sort [direction]=\"directionFor(col.key)\" />\n </button>\n }\n\n @if (col.column.filterItems; as filterItems) {\n @if (filterItems.length) {\n <wr-table-filter [items]=\"filterItems\" (selectionChange)=\"onFilter(col.key, $event)\" />\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 <tbody>\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 [ngModel]=\"groupChecked(entry.group.rows)\"\n [indeterminate]=\"groupIndeterminate(entry.group.rows)\"\n (ngModelChange)=\"toggleGroupSelection(entry.group.rows, $event)\"\n aria-label=\"Select group\"\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 aria-label=\"Toggle group\"\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 } @else {\n <button\n type=\"button\"\n class=\"wr-table__group-toggle\"\n [attr.aria-expanded]=\"!entry.group.collapsed\"\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\">{{ entry.group.label }}</span>\n @if (showGroupCount()) {\n <span class=\"wr-table__group-count\">{{ entry.group.count }}</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=\"wr-table__foot-cell\"\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.left.px]=\"leftPin(col.key)\"\n [style.right.px]=\"rightPin(col.key)\"\n >\n {{ entry.summaries.get(col.key) ?? '' }}\n </td>\n }\n </tr>\n } @else {\n <tr\n class=\"wr-table__tr\"\n [class.wr-table__tr--selected]=\"rowSelection() && isRowSelected(entry.row)\"\n [attr.aria-rowindex]=\"virtualized() ? windowStart() + i + 2 : null\"\n >\n @if (rowSelection()) {\n <td class=\"wr-table__td wr-table__td--select\">\n <wr-checkbox\n size=\"sm\"\n [ngModel]=\"isRowSelected(entry.row)\"\n (ngModelChange)=\"toggleRow(entry.row, $event)\"\n aria-label=\"Select row\"\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 aria-label=\"Toggle row details\"\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=\"wr-table__td\"\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.left.px]=\"leftPin(col.key)\"\n [style.right.px]=\"rightPin(col.key)\"\n [attr.data-label]=\"col.column.title\"\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 {{ getValue(entry.row, col.key) }}\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 } @empty {\n <tr>\n <td class=\"wr-table__empty\" [attr.colspan]=\"totalCols()\">No data</td>\n </tr>\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 </tbody>\n\n @if (hasSummary() && items()?.length) {\n <tfoot>\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=\"wr-table__foot-cell\"\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.left.px]=\"leftPin(col.key)\"\n [style.right.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 [(currentPage)]=\"page\" [pageSize]=\"pageSize()\" [total]=\"resolvedTotal()\" />\n </div>\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: WrCheckbox, selector: "wr-checkbox", inputs: ["id", "checkboxValue", "checked", "disabled", "size", "icon", "indeterminate"], outputs: ["checkedChange", "touch"] }, { kind: "component", type: WrPagination, selector: "wr-pagination", inputs: ["currentPage", "pageSize", "total", "pageSizeOptions", "showSizeChanger", "showTotal", "align", "size", "shape", "disabled", "responsive", "ofLabel", "prevLabel", "nextLabel", "itemsPerPageLabel"], outputs: ["currentPageChange", "pageSizeChange"] }, { kind: "component", type: WrSpinner, selector: "wr-spinner", inputs: ["size"] }, { kind: "component", type: WrTableSort, selector: "wr-table-sort", inputs: ["direction"] }, { kind: "component", type: WrTableFilter, selector: "wr-table-filter", inputs: ["items"], outputs: ["selectionChange"] }], encapsulation: i0.ViewEncapsulation.None });
1267
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: WrTable, isStandalone: true, selector: "wr-table", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, responsive: { classPropertyName: "responsive", publicName: "responsive", isSignal: true, isRequired: false, transformFunction: null }, reorderable: { classPropertyName: "reorderable", publicName: "reorderable", isSignal: true, isRequired: false, transformFunction: null }, columnOrder: { classPropertyName: "columnOrder", publicName: "columnOrder", isSignal: true, isRequired: false, transformFunction: null }, rowSelection: { classPropertyName: "rowSelection", publicName: "rowSelection", isSignal: true, isRequired: false, transformFunction: null }, rowKey: { classPropertyName: "rowKey", publicName: "rowKey", isSignal: true, isRequired: false, transformFunction: null }, selection: { classPropertyName: "selection", publicName: "selection", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, groupBy: { classPropertyName: "groupBy", publicName: "groupBy", isSignal: true, isRequired: false, transformFunction: null }, childrenKey: { classPropertyName: "childrenKey", publicName: "childrenKey", isSignal: true, isRequired: false, transformFunction: null }, treeColumn: { classPropertyName: "treeColumn", publicName: "treeColumn", isSignal: true, isRequired: false, transformFunction: null }, toggleRowLabel: { classPropertyName: "toggleRowLabel", publicName: "toggleRowLabel", isSignal: true, isRequired: false, transformFunction: null }, collapsedGroups: { classPropertyName: "collapsedGroups", publicName: "collapsedGroups", isSignal: true, isRequired: false, transformFunction: null }, groupSummary: { classPropertyName: "groupSummary", publicName: "groupSummary", isSignal: true, isRequired: false, transformFunction: null }, showGroupCount: { classPropertyName: "showGroupCount", publicName: "showGroupCount", isSignal: true, isRequired: false, transformFunction: null }, sort: { classPropertyName: "sort", publicName: "sort", isSignal: true, isRequired: false, transformFunction: null }, emptyLabel: { classPropertyName: "emptyLabel", publicName: "emptyLabel", isSignal: true, isRequired: false, transformFunction: null }, sortLabel: { classPropertyName: "sortLabel", publicName: "sortLabel", isSignal: true, isRequired: false, transformFunction: null }, selectAllLabel: { classPropertyName: "selectAllLabel", publicName: "selectAllLabel", isSignal: true, isRequired: false, transformFunction: null }, selectRowLabel: { classPropertyName: "selectRowLabel", publicName: "selectRowLabel", isSignal: true, isRequired: false, transformFunction: null }, expandRowLabel: { classPropertyName: "expandRowLabel", publicName: "expandRowLabel", isSignal: true, isRequired: false, transformFunction: null }, selectGroupLabel: { classPropertyName: "selectGroupLabel", publicName: "selectGroupLabel", isSignal: true, isRequired: false, transformFunction: null }, toggleGroupLabel: { classPropertyName: "toggleGroupLabel", publicName: "toggleGroupLabel", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, page: { classPropertyName: "page", publicName: "page", isSignal: true, isRequired: false, transformFunction: null }, totalItems: { classPropertyName: "totalItems", publicName: "totalItems", isSignal: true, isRequired: false, transformFunction: null }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: true, isRequired: false, transformFunction: null }, rowHeight: { classPropertyName: "rowHeight", publicName: "rowHeight", isSignal: true, isRequired: false, transformFunction: null }, viewportHeight: { classPropertyName: "viewportHeight", publicName: "viewportHeight", isSignal: true, isRequired: false, transformFunction: null }, overscan: { classPropertyName: "overscan", publicName: "overscan", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { columnOrder: "columnOrderChange", selection: "selectionChange", expanded: "expandedChange", collapsedGroups: "collapsedGroupsChange", sort: "sortChange", filterChange: "filterChange", page: "pageChange" }, host: { properties: { "class.wr-table--responsive": "responsive()", "class.wr-table--virtual": "virtualized()" }, classAttribute: "wr-table" }, queries: [{ propertyName: "cellTemplates", predicate: WrTableCell, isSignal: true }, { propertyName: "expandTpl", first: true, predicate: WrTableExpand, descendants: true, isSignal: true }, { propertyName: "groupTpl", first: true, predicate: WrTableGroupHeader, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "headerCells", predicate: ["thCell"], descendants: true, isSignal: true }, { propertyName: "scrollEl", first: true, predicate: ["scroll"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (loading()) {\n <div class=\"wr-table__loading\">\n <wr-spinner size=\"lg\" />\n </div>\n}\n\n<div\n class=\"wr-table__scroll\"\n #scroll\n [style.max-height]=\"virtualized() ? resolvedViewportHeight() : null\"\n [attr.tabindex]=\"virtualized() ? 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 >\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>\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 <wr-checkbox\n size=\"sm\"\n [ngModel]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n (ngModelChange)=\"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=\"wr-table__th\"\n [attr.aria-sort]=\"ariaSortFor(col.key, col.column.sortable)\"\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.left.px]=\"leftPin(col.key)\"\n [style.right.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]=\"resolvedSortLabel()\"\n (click)=\"cycleSort(col.key)\"\n >\n <wr-table-sort [direction]=\"directionFor(col.key)\" />\n </button>\n }\n\n @if (col.column.filterItems; as filterItems) {\n @if (filterItems.length) {\n <wr-table-filter [items]=\"filterItems\" (selectionChange)=\"onFilter(col.key, $event)\" />\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 <tbody>\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 [ngModel]=\"groupChecked(entry.group.rows)\"\n [indeterminate]=\"groupIndeterminate(entry.group.rows)\"\n (ngModelChange)=\"toggleGroupSelection(entry.group.rows, $event)\"\n [ariaLabel]=\"resolvedSelectGroupLabel()\"\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-label]=\"resolvedToggleGroupLabel()\"\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 } @else {\n <button\n type=\"button\"\n class=\"wr-table__group-toggle\"\n [attr.aria-expanded]=\"!entry.group.collapsed\"\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\">{{ entry.group.label }}</span>\n @if (showGroupCount()) {\n <span class=\"wr-table__group-count\">{{ entry.group.count }}</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=\"wr-table__foot-cell\"\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.left.px]=\"leftPin(col.key)\"\n [style.right.px]=\"rightPin(col.key)\"\n >\n {{ entry.summaries.get(col.key) ?? '' }}\n </td>\n }\n </tr>\n } @else {\n <tr\n class=\"wr-table__tr\"\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 [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 [ngModel]=\"isRowSelected(entry.row)\"\n (ngModelChange)=\"toggleRow(entry.row, $event)\"\n [ariaLabel]=\"resolvedSelectRowLabel()\"\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-label]=\"resolvedExpandRowLabel()\"\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=\"wr-table__td\"\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.left.px]=\"leftPin(col.key)\"\n [style.right.px]=\"rightPin(col.key)\"\n [attr.data-label]=\"col.column.title\"\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-label]=\"resolvedToggleRowLabel()\"\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 {{ getValue(entry.row, col.key) }}\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 } @empty {\n <tr>\n <td class=\"wr-table__empty\" [attr.colspan]=\"totalCols()\">{{ resolvedEmptyLabel() }}</td>\n </tr>\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 </tbody>\n\n @if (hasSummary() && items()?.length) {\n <tfoot>\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=\"wr-table__foot-cell\"\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.left.px]=\"leftPin(col.key)\"\n [style.right.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 [(currentPage)]=\"page\" [pageSize]=\"pageSize()\" [total]=\"resolvedTotal()\" />\n </div>\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: WrCheckbox, selector: "wr-checkbox", inputs: ["id", "checkboxValue", "ariaLabel", "checked", "disabled", "size", "icon", "indeterminate"], outputs: ["checkedChange", "touch"] }, { kind: "component", type: WrPagination, selector: "wr-pagination", inputs: ["currentPage", "pageSize", "total", "pageSizeOptions", "showSizeChanger", "showTotal", "align", "size", "shape", "disabled", "responsive", "ofLabel", "prevLabel", "nextLabel", "itemsPerPageLabel", "label"], outputs: ["currentPageChange", "pageSizeChange"] }, { kind: "component", type: WrSpinner, selector: "wr-spinner", inputs: ["size"] }, { kind: "component", type: WrTableSort, selector: "wr-table-sort", inputs: ["direction"] }, { kind: "component", type: WrTableFilter, selector: "wr-table-filter", inputs: ["filterLabel", "noMatchesLabel", "items"], outputs: ["selectionChange"] }], encapsulation: i0.ViewEncapsulation.None });
1054
1268
  }
1055
1269
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrTable, decorators: [{
1056
1270
  type: Component,
@@ -1068,8 +1282,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
1068
1282
  WrSpinner,
1069
1283
  WrTableSort,
1070
1284
  WrTableFilter,
1071
- ], template: "@if (loading()) {\n <div class=\"wr-table__loading\">\n <wr-spinner size=\"lg\" />\n </div>\n}\n\n<div\n class=\"wr-table__scroll\"\n #scroll\n [style.max-height]=\"virtualized() ? resolvedViewportHeight() : null\"\n [attr.tabindex]=\"virtualized() ? 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 >\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>\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 <wr-checkbox\n size=\"sm\"\n [ngModel]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n (ngModelChange)=\"toggleAll($event)\"\n aria-label=\"Select all rows\"\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=\"wr-table__th\"\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.left.px]=\"leftPin(col.key)\"\n [style.right.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 type=\"button\" class=\"wr-table__sort-btn\" aria-label=\"Sort column\" (click)=\"cycleSort(col.key)\">\n <wr-table-sort [direction]=\"directionFor(col.key)\" />\n </button>\n }\n\n @if (col.column.filterItems; as filterItems) {\n @if (filterItems.length) {\n <wr-table-filter [items]=\"filterItems\" (selectionChange)=\"onFilter(col.key, $event)\" />\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 <tbody>\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 [ngModel]=\"groupChecked(entry.group.rows)\"\n [indeterminate]=\"groupIndeterminate(entry.group.rows)\"\n (ngModelChange)=\"toggleGroupSelection(entry.group.rows, $event)\"\n aria-label=\"Select group\"\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 aria-label=\"Toggle group\"\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 } @else {\n <button\n type=\"button\"\n class=\"wr-table__group-toggle\"\n [attr.aria-expanded]=\"!entry.group.collapsed\"\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\">{{ entry.group.label }}</span>\n @if (showGroupCount()) {\n <span class=\"wr-table__group-count\">{{ entry.group.count }}</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=\"wr-table__foot-cell\"\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.left.px]=\"leftPin(col.key)\"\n [style.right.px]=\"rightPin(col.key)\"\n >\n {{ entry.summaries.get(col.key) ?? '' }}\n </td>\n }\n </tr>\n } @else {\n <tr\n class=\"wr-table__tr\"\n [class.wr-table__tr--selected]=\"rowSelection() && isRowSelected(entry.row)\"\n [attr.aria-rowindex]=\"virtualized() ? windowStart() + i + 2 : null\"\n >\n @if (rowSelection()) {\n <td class=\"wr-table__td wr-table__td--select\">\n <wr-checkbox\n size=\"sm\"\n [ngModel]=\"isRowSelected(entry.row)\"\n (ngModelChange)=\"toggleRow(entry.row, $event)\"\n aria-label=\"Select row\"\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 aria-label=\"Toggle row details\"\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=\"wr-table__td\"\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.left.px]=\"leftPin(col.key)\"\n [style.right.px]=\"rightPin(col.key)\"\n [attr.data-label]=\"col.column.title\"\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 {{ getValue(entry.row, col.key) }}\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 } @empty {\n <tr>\n <td class=\"wr-table__empty\" [attr.colspan]=\"totalCols()\">No data</td>\n </tr>\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 </tbody>\n\n @if (hasSummary() && items()?.length) {\n <tfoot>\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=\"wr-table__foot-cell\"\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.left.px]=\"leftPin(col.key)\"\n [style.right.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 [(currentPage)]=\"page\" [pageSize]=\"pageSize()\" [total]=\"resolvedTotal()\" />\n </div>\n}\n" }]
1072
- }], ctorParameters: () => [], propDecorators: { columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: true }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], responsive: [{ type: i0.Input, args: [{ isSignal: true, alias: "responsive", required: false }] }], reorderable: [{ type: i0.Input, args: [{ isSignal: true, alias: "reorderable", required: false }] }], columnOrder: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnOrder", required: false }] }, { type: i0.Output, args: ["columnOrderChange"] }], rowSelection: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowSelection", required: false }] }], rowKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowKey", required: false }] }], selection: [{ type: i0.Input, args: [{ isSignal: true, alias: "selection", required: false }] }, { type: i0.Output, args: ["selectionChange"] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }, { type: i0.Output, args: ["expandedChange"] }], groupBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupBy", required: false }] }], collapsedGroups: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsedGroups", required: false }] }, { type: i0.Output, args: ["collapsedGroupsChange"] }], groupSummary: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupSummary", required: false }] }], showGroupCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "showGroupCount", required: false }] }], sort: [{ type: i0.Input, args: [{ isSignal: true, alias: "sort", required: false }] }, { type: i0.Output, args: ["sortChange"] }], filterChange: [{ type: i0.Output, args: ["filterChange"] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }], page: [{ type: i0.Input, args: [{ isSignal: true, alias: "page", required: false }] }, { type: i0.Output, args: ["pageChange"] }], totalItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalItems", required: false }] }], virtualScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScroll", required: false }] }], rowHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowHeight", required: false }] }], viewportHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewportHeight", required: false }] }], overscan: [{ type: i0.Input, args: [{ isSignal: true, alias: "overscan", required: false }] }], cellTemplates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => WrTableCell), { isSignal: true }] }], headerCells: [{ type: i0.ViewChildren, args: ['thCell', { isSignal: true }] }], scrollEl: [{ type: i0.ViewChild, args: ['scroll', { isSignal: true }] }], expandTpl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => WrTableExpand), { isSignal: true }] }], groupTpl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => WrTableGroupHeader), { isSignal: true }] }] } });
1285
+ ], template: "@if (loading()) {\n <div class=\"wr-table__loading\">\n <wr-spinner size=\"lg\" />\n </div>\n}\n\n<div\n class=\"wr-table__scroll\"\n #scroll\n [style.max-height]=\"virtualized() ? resolvedViewportHeight() : null\"\n [attr.tabindex]=\"virtualized() ? 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 >\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>\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 <wr-checkbox\n size=\"sm\"\n [ngModel]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n (ngModelChange)=\"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=\"wr-table__th\"\n [attr.aria-sort]=\"ariaSortFor(col.key, col.column.sortable)\"\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.left.px]=\"leftPin(col.key)\"\n [style.right.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]=\"resolvedSortLabel()\"\n (click)=\"cycleSort(col.key)\"\n >\n <wr-table-sort [direction]=\"directionFor(col.key)\" />\n </button>\n }\n\n @if (col.column.filterItems; as filterItems) {\n @if (filterItems.length) {\n <wr-table-filter [items]=\"filterItems\" (selectionChange)=\"onFilter(col.key, $event)\" />\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 <tbody>\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 [ngModel]=\"groupChecked(entry.group.rows)\"\n [indeterminate]=\"groupIndeterminate(entry.group.rows)\"\n (ngModelChange)=\"toggleGroupSelection(entry.group.rows, $event)\"\n [ariaLabel]=\"resolvedSelectGroupLabel()\"\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-label]=\"resolvedToggleGroupLabel()\"\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 } @else {\n <button\n type=\"button\"\n class=\"wr-table__group-toggle\"\n [attr.aria-expanded]=\"!entry.group.collapsed\"\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\">{{ entry.group.label }}</span>\n @if (showGroupCount()) {\n <span class=\"wr-table__group-count\">{{ entry.group.count }}</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=\"wr-table__foot-cell\"\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.left.px]=\"leftPin(col.key)\"\n [style.right.px]=\"rightPin(col.key)\"\n >\n {{ entry.summaries.get(col.key) ?? '' }}\n </td>\n }\n </tr>\n } @else {\n <tr\n class=\"wr-table__tr\"\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 [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 [ngModel]=\"isRowSelected(entry.row)\"\n (ngModelChange)=\"toggleRow(entry.row, $event)\"\n [ariaLabel]=\"resolvedSelectRowLabel()\"\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-label]=\"resolvedExpandRowLabel()\"\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=\"wr-table__td\"\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.left.px]=\"leftPin(col.key)\"\n [style.right.px]=\"rightPin(col.key)\"\n [attr.data-label]=\"col.column.title\"\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-label]=\"resolvedToggleRowLabel()\"\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 {{ getValue(entry.row, col.key) }}\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 } @empty {\n <tr>\n <td class=\"wr-table__empty\" [attr.colspan]=\"totalCols()\">{{ resolvedEmptyLabel() }}</td>\n </tr>\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 </tbody>\n\n @if (hasSummary() && items()?.length) {\n <tfoot>\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=\"wr-table__foot-cell\"\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.left.px]=\"leftPin(col.key)\"\n [style.right.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 [(currentPage)]=\"page\" [pageSize]=\"pageSize()\" [total]=\"resolvedTotal()\" />\n </div>\n}\n" }]
1286
+ }], ctorParameters: () => [], propDecorators: { columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: true }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], responsive: [{ type: i0.Input, args: [{ isSignal: true, alias: "responsive", required: false }] }], reorderable: [{ type: i0.Input, args: [{ isSignal: true, alias: "reorderable", required: false }] }], columnOrder: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnOrder", required: false }] }, { type: i0.Output, args: ["columnOrderChange"] }], rowSelection: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowSelection", required: false }] }], rowKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowKey", required: false }] }], selection: [{ type: i0.Input, args: [{ isSignal: true, alias: "selection", required: false }] }, { type: i0.Output, args: ["selectionChange"] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }, { type: i0.Output, args: ["expandedChange"] }], groupBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupBy", required: false }] }], childrenKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "childrenKey", required: false }] }], treeColumn: [{ type: i0.Input, args: [{ isSignal: true, alias: "treeColumn", required: false }] }], toggleRowLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "toggleRowLabel", required: false }] }], collapsedGroups: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsedGroups", required: false }] }, { type: i0.Output, args: ["collapsedGroupsChange"] }], groupSummary: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupSummary", required: false }] }], showGroupCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "showGroupCount", required: false }] }], sort: [{ type: i0.Input, args: [{ isSignal: true, alias: "sort", required: false }] }, { type: i0.Output, args: ["sortChange"] }], emptyLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyLabel", required: false }] }], sortLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortLabel", required: false }] }], selectAllLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectAllLabel", required: false }] }], selectRowLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectRowLabel", required: false }] }], expandRowLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandRowLabel", required: false }] }], selectGroupLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectGroupLabel", required: false }] }], toggleGroupLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "toggleGroupLabel", required: false }] }], filterChange: [{ type: i0.Output, args: ["filterChange"] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }], page: [{ type: i0.Input, args: [{ isSignal: true, alias: "page", required: false }] }, { type: i0.Output, args: ["pageChange"] }], totalItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalItems", required: false }] }], virtualScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScroll", required: false }] }], rowHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowHeight", required: false }] }], viewportHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewportHeight", required: false }] }], overscan: [{ type: i0.Input, args: [{ isSignal: true, alias: "overscan", required: false }] }], cellTemplates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => WrTableCell), { isSignal: true }] }], headerCells: [{ type: i0.ViewChildren, args: ['thCell', { isSignal: true }] }], scrollEl: [{ type: i0.ViewChild, args: ['scroll', { isSignal: true }] }], expandTpl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => WrTableExpand), { isSignal: true }] }], groupTpl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => WrTableGroupHeader), { isSignal: true }] }] } });
1073
1287
 
1074
1288
  /**
1075
1289
  * Generated bundle index. Do not edit.