ngwr 16.2.0 → 16.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (398) hide show
  1. package/badge/styles/_tag.scss +73 -1
  2. package/calendar/styles/_index.scss +22 -0
  3. package/cascader/styles/_rules.scss +7 -0
  4. package/color-picker/styles/_index.scss +21 -0
  5. package/date-picker/styles/_index.scss +19 -0
  6. package/dropdown/styles/_index.scss +13 -19
  7. package/fesm2022/ngwr-affix.mjs +3 -3
  8. package/fesm2022/ngwr-alert-testing.mjs +70 -0
  9. package/fesm2022/ngwr-alert-testing.mjs.map +1 -0
  10. package/fesm2022/ngwr-alert.mjs +3 -3
  11. package/fesm2022/ngwr-anchor.mjs +17 -6
  12. package/fesm2022/ngwr-anchor.mjs.map +1 -1
  13. package/fesm2022/ngwr-animations-aurora.mjs +3 -3
  14. package/fesm2022/ngwr-animations-blur-reveal.mjs +3 -3
  15. package/fesm2022/ngwr-animations-click-sparks.mjs +3 -3
  16. package/fesm2022/ngwr-animations-confetti.mjs +3 -3
  17. package/fesm2022/ngwr-animations-decode.mjs +3 -3
  18. package/fesm2022/ngwr-animations-destruct.mjs +3 -3
  19. package/fesm2022/ngwr-animations-dot-grid.mjs +3 -3
  20. package/fesm2022/ngwr-animations-falling-letters.mjs +3 -3
  21. package/fesm2022/ngwr-animations-flow-lines.mjs +3 -3
  22. package/fesm2022/ngwr-animations-fluid-cursor.mjs +3 -3
  23. package/fesm2022/ngwr-animations-glitch.mjs +3 -3
  24. package/fesm2022/ngwr-animations-glow-border.mjs +3 -3
  25. package/fesm2022/ngwr-animations-gradient-flow.mjs +3 -3
  26. package/fesm2022/ngwr-animations-marquee.mjs +3 -3
  27. package/fesm2022/ngwr-animations-orbit.mjs +3 -3
  28. package/fesm2022/ngwr-animations-reveal.mjs +3 -3
  29. package/fesm2022/ngwr-animations-ripple-grid.mjs +3 -3
  30. package/fesm2022/ngwr-animations-rotate-reveal.mjs +3 -3
  31. package/fesm2022/ngwr-animations-shimmer.mjs +3 -3
  32. package/fesm2022/ngwr-animations-spotlight.mjs +3 -3
  33. package/fesm2022/ngwr-animations-thread-lines.mjs +3 -3
  34. package/fesm2022/ngwr-animations-tilt.mjs +3 -3
  35. package/fesm2022/ngwr-animations-typewriter.mjs +3 -3
  36. package/fesm2022/ngwr-avatar.mjs +3 -3
  37. package/fesm2022/ngwr-back-top.mjs +3 -3
  38. package/fesm2022/ngwr-badge.mjs +129 -11
  39. package/fesm2022/ngwr-badge.mjs.map +1 -1
  40. package/fesm2022/ngwr-breadcrumbs-testing.mjs +83 -0
  41. package/fesm2022/ngwr-breadcrumbs-testing.mjs.map +1 -0
  42. package/fesm2022/ngwr-breadcrumbs.mjs +8 -8
  43. package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
  44. package/fesm2022/ngwr-burger-testing.mjs +45 -0
  45. package/fesm2022/ngwr-burger-testing.mjs.map +1 -0
  46. package/fesm2022/ngwr-burger.mjs +3 -3
  47. package/fesm2022/ngwr-button.mjs +6 -6
  48. package/fesm2022/ngwr-calendar-testing.mjs +18 -0
  49. package/fesm2022/ngwr-calendar-testing.mjs.map +1 -1
  50. package/fesm2022/ngwr-calendar.mjs +500 -73
  51. package/fesm2022/ngwr-calendar.mjs.map +1 -1
  52. package/fesm2022/ngwr-card.mjs +9 -9
  53. package/fesm2022/ngwr-carousel.mjs +6 -6
  54. package/fesm2022/ngwr-cascader.mjs +37 -16
  55. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  56. package/fesm2022/ngwr-charts-bar-chart.mjs +5 -4
  57. package/fesm2022/ngwr-charts-bar-chart.mjs.map +1 -1
  58. package/fesm2022/ngwr-charts-boxplot-chart.mjs +3 -3
  59. package/fesm2022/ngwr-charts-bullet-chart.mjs +3 -3
  60. package/fesm2022/ngwr-charts-calendar-heatmap.mjs +3 -3
  61. package/fesm2022/ngwr-charts-candlestick-chart.mjs +3 -3
  62. package/fesm2022/ngwr-charts-chart-legend.mjs +26 -11
  63. package/fesm2022/ngwr-charts-chart-legend.mjs.map +1 -1
  64. package/fesm2022/ngwr-charts-core.mjs +3 -3
  65. package/fesm2022/ngwr-charts-donut-chart.mjs +5 -4
  66. package/fesm2022/ngwr-charts-donut-chart.mjs.map +1 -1
  67. package/fesm2022/ngwr-charts-funnel-chart.mjs +3 -3
  68. package/fesm2022/ngwr-charts-gauge.mjs +3 -3
  69. package/fesm2022/ngwr-charts-heatmap-chart.mjs +3 -3
  70. package/fesm2022/ngwr-charts-line-chart-testing.mjs +3 -2
  71. package/fesm2022/ngwr-charts-line-chart-testing.mjs.map +1 -1
  72. package/fesm2022/ngwr-charts-line-chart.mjs +17 -7
  73. package/fesm2022/ngwr-charts-line-chart.mjs.map +1 -1
  74. package/fesm2022/ngwr-charts-meter-group.mjs +5 -4
  75. package/fesm2022/ngwr-charts-meter-group.mjs.map +1 -1
  76. package/fesm2022/ngwr-charts-radar-chart.mjs +5 -4
  77. package/fesm2022/ngwr-charts-radar-chart.mjs.map +1 -1
  78. package/fesm2022/ngwr-charts-scatter-chart.mjs +5 -4
  79. package/fesm2022/ngwr-charts-scatter-chart.mjs.map +1 -1
  80. package/fesm2022/ngwr-charts-sparkline.mjs +3 -3
  81. package/fesm2022/ngwr-charts-treemap-chart.mjs +3 -3
  82. package/fesm2022/ngwr-charts-waterfall-chart.mjs +3 -3
  83. package/fesm2022/ngwr-checkbox.mjs +6 -6
  84. package/fesm2022/ngwr-clipboard.mjs +3 -3
  85. package/fesm2022/ngwr-collapse.mjs +9 -9
  86. package/fesm2022/ngwr-color-picker-testing.mjs +11 -1
  87. package/fesm2022/ngwr-color-picker-testing.mjs.map +1 -1
  88. package/fesm2022/ngwr-color-picker.mjs +153 -37
  89. package/fesm2022/ngwr-color-picker.mjs.map +1 -1
  90. package/fesm2022/ngwr-command-palette.mjs +3 -3
  91. package/fesm2022/ngwr-comment.mjs +10 -6
  92. package/fesm2022/ngwr-comment.mjs.map +1 -1
  93. package/fesm2022/ngwr-compare-testing.mjs +84 -0
  94. package/fesm2022/ngwr-compare-testing.mjs.map +1 -0
  95. package/fesm2022/ngwr-compare.mjs +3 -3
  96. package/fesm2022/ngwr-context-menu.mjs +12 -12
  97. package/fesm2022/ngwr-cookie.mjs +3 -3
  98. package/fesm2022/ngwr-copy-value.mjs +3 -3
  99. package/fesm2022/ngwr-counter.mjs +6 -6
  100. package/fesm2022/ngwr-date-picker-testing.mjs +30 -4
  101. package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
  102. package/fesm2022/ngwr-date-picker.mjs +342 -69
  103. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  104. package/fesm2022/ngwr-date-stamp.mjs +3 -3
  105. package/fesm2022/ngwr-date.mjs +59 -8
  106. package/fesm2022/ngwr-date.mjs.map +1 -1
  107. package/fesm2022/ngwr-density.mjs +6 -6
  108. package/fesm2022/ngwr-descriptions.mjs +6 -6
  109. package/fesm2022/ngwr-dialog.mjs +18 -18
  110. package/fesm2022/ngwr-directives.mjs +15 -15
  111. package/fesm2022/ngwr-divider.mjs +3 -3
  112. package/fesm2022/ngwr-drawer.mjs +51 -29
  113. package/fesm2022/ngwr-drawer.mjs.map +1 -1
  114. package/fesm2022/ngwr-dropdown-testing.mjs +11 -3
  115. package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -1
  116. package/fesm2022/ngwr-dropdown.mjs +52 -95
  117. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  118. package/fesm2022/ngwr-editor.mjs +4 -3
  119. package/fesm2022/ngwr-editor.mjs.map +1 -1
  120. package/fesm2022/ngwr-empty.mjs +3 -3
  121. package/fesm2022/ngwr-event-calendar.mjs +186 -33
  122. package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
  123. package/fesm2022/ngwr-file-upload-testing.mjs +34 -2
  124. package/fesm2022/ngwr-file-upload-testing.mjs.map +1 -1
  125. package/fesm2022/ngwr-file-upload.mjs +274 -15
  126. package/fesm2022/ngwr-file-upload.mjs.map +1 -1
  127. package/fesm2022/ngwr-form.mjs +9 -9
  128. package/fesm2022/ngwr-form.mjs.map +1 -1
  129. package/fesm2022/ngwr-graph-testing.mjs +3 -0
  130. package/fesm2022/ngwr-graph-testing.mjs.map +1 -1
  131. package/fesm2022/ngwr-graph.mjs +102 -42
  132. package/fesm2022/ngwr-graph.mjs.map +1 -1
  133. package/fesm2022/ngwr-hotkey.mjs +6 -6
  134. package/fesm2022/ngwr-i18n-ar.mjs +19 -4
  135. package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
  136. package/fesm2022/ngwr-i18n-cs.mjs +19 -4
  137. package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
  138. package/fesm2022/ngwr-i18n-de.mjs +19 -4
  139. package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
  140. package/fesm2022/ngwr-i18n-en.mjs +19 -4
  141. package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
  142. package/fesm2022/ngwr-i18n-es.mjs +19 -4
  143. package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
  144. package/fesm2022/ngwr-i18n-fr.mjs +19 -4
  145. package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
  146. package/fesm2022/ngwr-i18n-he.mjs +19 -4
  147. package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
  148. package/fesm2022/ngwr-i18n-hi.mjs +19 -4
  149. package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
  150. package/fesm2022/ngwr-i18n-id.mjs +19 -4
  151. package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
  152. package/fesm2022/ngwr-i18n-it.mjs +19 -4
  153. package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
  154. package/fesm2022/ngwr-i18n-ja.mjs +19 -4
  155. package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
  156. package/fesm2022/ngwr-i18n-ko.mjs +19 -4
  157. package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
  158. package/fesm2022/ngwr-i18n-nl.mjs +19 -4
  159. package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
  160. package/fesm2022/ngwr-i18n-pl.mjs +19 -4
  161. package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
  162. package/fesm2022/ngwr-i18n-pt.mjs +19 -4
  163. package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
  164. package/fesm2022/ngwr-i18n-ru.mjs +19 -4
  165. package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
  166. package/fesm2022/ngwr-i18n-sv.mjs +19 -4
  167. package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
  168. package/fesm2022/ngwr-i18n-tr.mjs +19 -4
  169. package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
  170. package/fesm2022/ngwr-i18n-uk.mjs +19 -4
  171. package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
  172. package/fesm2022/ngwr-i18n-vi.mjs +19 -4
  173. package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
  174. package/fesm2022/ngwr-i18n-zh-tw.mjs +19 -4
  175. package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
  176. package/fesm2022/ngwr-i18n-zh.mjs +19 -4
  177. package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
  178. package/fesm2022/ngwr-i18n.mjs +9 -9
  179. package/fesm2022/ngwr-icon.mjs +6 -6
  180. package/fesm2022/ngwr-image-cropper.mjs +3 -3
  181. package/fesm2022/ngwr-input-number-testing.mjs +11 -0
  182. package/fesm2022/ngwr-input-number-testing.mjs.map +1 -1
  183. package/fesm2022/ngwr-input-number.mjs +68 -7
  184. package/fesm2022/ngwr-input-number.mjs.map +1 -1
  185. package/fesm2022/ngwr-input-otp.mjs +23 -3
  186. package/fesm2022/ngwr-input-otp.mjs.map +1 -1
  187. package/fesm2022/ngwr-input-testing.mjs +24 -1
  188. package/fesm2022/ngwr-input-testing.mjs.map +1 -1
  189. package/fesm2022/ngwr-input.mjs +152 -36
  190. package/fesm2022/ngwr-input.mjs.map +1 -1
  191. package/fesm2022/ngwr-keyboard.mjs +3 -3
  192. package/fesm2022/ngwr-knob.mjs +3 -3
  193. package/fesm2022/ngwr-layout.mjs +15 -15
  194. package/fesm2022/ngwr-lightbox.mjs +8 -8
  195. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  196. package/fesm2022/ngwr-list.mjs +8 -8
  197. package/fesm2022/ngwr-list.mjs.map +1 -1
  198. package/fesm2022/ngwr-load-state.mjs +15 -15
  199. package/fesm2022/ngwr-loading-bar.mjs +6 -6
  200. package/fesm2022/ngwr-mention.mjs +6 -6
  201. package/fesm2022/ngwr-meta.mjs +6 -6
  202. package/fesm2022/ngwr-overlay.mjs +175 -13
  203. package/fesm2022/ngwr-overlay.mjs.map +1 -1
  204. package/fesm2022/ngwr-page-header.mjs +3 -3
  205. package/fesm2022/ngwr-pagination.mjs +5 -3
  206. package/fesm2022/ngwr-pagination.mjs.map +1 -1
  207. package/fesm2022/ngwr-pipes.mjs +31 -29
  208. package/fesm2022/ngwr-pipes.mjs.map +1 -1
  209. package/fesm2022/ngwr-platform.mjs +9 -9
  210. package/fesm2022/ngwr-popconfirm-testing.mjs +5 -2
  211. package/fesm2022/ngwr-popconfirm-testing.mjs.map +1 -1
  212. package/fesm2022/ngwr-popconfirm.mjs +44 -63
  213. package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
  214. package/fesm2022/ngwr-popover-testing.mjs +7 -1
  215. package/fesm2022/ngwr-popover-testing.mjs.map +1 -1
  216. package/fesm2022/ngwr-popover.mjs +58 -156
  217. package/fesm2022/ngwr-popover.mjs.map +1 -1
  218. package/fesm2022/ngwr-progress.mjs +50 -9
  219. package/fesm2022/ngwr-progress.mjs.map +1 -1
  220. package/fesm2022/ngwr-pull-to-refresh-testing.mjs +57 -0
  221. package/fesm2022/ngwr-pull-to-refresh-testing.mjs.map +1 -0
  222. package/fesm2022/ngwr-pull-to-refresh.mjs +3 -3
  223. package/fesm2022/ngwr-qr.mjs +3 -3
  224. package/fesm2022/ngwr-radio.mjs +6 -6
  225. package/fesm2022/ngwr-rating.mjs +3 -3
  226. package/fesm2022/ngwr-resizable-testing.mjs +113 -0
  227. package/fesm2022/ngwr-resizable-testing.mjs.map +1 -0
  228. package/fesm2022/ngwr-resizable.mjs +3 -3
  229. package/fesm2022/ngwr-result.mjs +12 -12
  230. package/fesm2022/ngwr-schema-form-testing.mjs +336 -0
  231. package/fesm2022/ngwr-schema-form-testing.mjs.map +1 -0
  232. package/fesm2022/ngwr-schema-form.mjs +415 -19
  233. package/fesm2022/ngwr-schema-form.mjs.map +1 -1
  234. package/fesm2022/ngwr-scroll.mjs +3 -3
  235. package/fesm2022/ngwr-segmented.mjs +3 -3
  236. package/fesm2022/ngwr-select-testing.mjs +19 -0
  237. package/fesm2022/ngwr-select-testing.mjs.map +1 -1
  238. package/fesm2022/ngwr-select.mjs +263 -83
  239. package/fesm2022/ngwr-select.mjs.map +1 -1
  240. package/fesm2022/ngwr-sidebar-testing.mjs +176 -0
  241. package/fesm2022/ngwr-sidebar-testing.mjs.map +1 -0
  242. package/fesm2022/ngwr-sidebar.mjs +3 -3
  243. package/fesm2022/ngwr-skeleton.mjs +3 -3
  244. package/fesm2022/ngwr-slider-testing.mjs +6 -0
  245. package/fesm2022/ngwr-slider-testing.mjs.map +1 -1
  246. package/fesm2022/ngwr-slider.mjs +21 -3
  247. package/fesm2022/ngwr-slider.mjs.map +1 -1
  248. package/fesm2022/ngwr-sortable-list.mjs +29 -12
  249. package/fesm2022/ngwr-sortable-list.mjs.map +1 -1
  250. package/fesm2022/ngwr-speed-dial.mjs +3 -3
  251. package/fesm2022/ngwr-spinner.mjs +3 -3
  252. package/fesm2022/ngwr-splitter.mjs +3 -3
  253. package/fesm2022/ngwr-statistic.mjs +9 -9
  254. package/fesm2022/ngwr-stepper.mjs +42 -11
  255. package/fesm2022/ngwr-stepper.mjs.map +1 -1
  256. package/fesm2022/ngwr-storage.mjs +3 -3
  257. package/fesm2022/ngwr-switch.mjs +3 -3
  258. package/fesm2022/ngwr-table-testing.mjs +88 -2
  259. package/fesm2022/ngwr-table-testing.mjs.map +1 -1
  260. package/fesm2022/ngwr-table.mjs +891 -74
  261. package/fesm2022/ngwr-table.mjs.map +1 -1
  262. package/fesm2022/ngwr-tabs-router.mjs +3 -3
  263. package/fesm2022/ngwr-tabs-testing.mjs +1 -1
  264. package/fesm2022/ngwr-tabs-testing.mjs.map +1 -1
  265. package/fesm2022/ngwr-tabs.mjs +15 -10
  266. package/fesm2022/ngwr-tabs.mjs.map +1 -1
  267. package/fesm2022/ngwr-textarea-testing.mjs +11 -0
  268. package/fesm2022/ngwr-textarea-testing.mjs.map +1 -1
  269. package/fesm2022/ngwr-textarea.mjs +128 -16
  270. package/fesm2022/ngwr-textarea.mjs.map +1 -1
  271. package/fesm2022/ngwr-theme.mjs +3 -3
  272. package/fesm2022/ngwr-timeline.mjs +6 -6
  273. package/fesm2022/ngwr-toast.mjs +40 -19
  274. package/fesm2022/ngwr-toast.mjs.map +1 -1
  275. package/fesm2022/ngwr-toolbar.mjs +3 -3
  276. package/fesm2022/ngwr-tour.mjs +6 -6
  277. package/fesm2022/ngwr-transfer-testing.mjs +6 -0
  278. package/fesm2022/ngwr-transfer-testing.mjs.map +1 -1
  279. package/fesm2022/ngwr-transfer.mjs +24 -5
  280. package/fesm2022/ngwr-transfer.mjs.map +1 -1
  281. package/fesm2022/ngwr-tree-testing.mjs +62 -2
  282. package/fesm2022/ngwr-tree-testing.mjs.map +1 -1
  283. package/fesm2022/ngwr-tree.mjs +966 -78
  284. package/fesm2022/ngwr-tree.mjs.map +1 -1
  285. package/fesm2022/ngwr-typography.mjs +3 -3
  286. package/fesm2022/ngwr-utils-router.mjs +3 -3
  287. package/fesm2022/ngwr-utils.mjs +34 -1
  288. package/fesm2022/ngwr-utils.mjs.map +1 -1
  289. package/fesm2022/ngwr-version.mjs +1 -1
  290. package/fesm2022/ngwr-version.mjs.map +1 -1
  291. package/fesm2022/ngwr-virtual-scroll.mjs +3 -3
  292. package/fesm2022/ngwr-window.mjs +33 -22
  293. package/fesm2022/ngwr-window.mjs.map +1 -1
  294. package/file-upload/styles/_index.scss +156 -0
  295. package/i18n/ar.json +21 -4
  296. package/i18n/cs.json +21 -4
  297. package/i18n/de.json +21 -4
  298. package/i18n/en.json +21 -4
  299. package/i18n/es.json +21 -4
  300. package/i18n/fr.json +21 -4
  301. package/i18n/he.json +21 -4
  302. package/i18n/hi.json +21 -4
  303. package/i18n/id.json +21 -4
  304. package/i18n/it.json +21 -4
  305. package/i18n/ja.json +21 -4
  306. package/i18n/ko.json +21 -4
  307. package/i18n/nl.json +21 -4
  308. package/i18n/pl.json +21 -4
  309. package/i18n/pt.json +21 -4
  310. package/i18n/ru.json +21 -4
  311. package/i18n/sv.json +21 -4
  312. package/i18n/tr.json +21 -4
  313. package/i18n/uk.json +21 -4
  314. package/i18n/vi.json +21 -4
  315. package/i18n/zh-TW.json +21 -4
  316. package/i18n/zh.json +21 -4
  317. package/input/styles/_index.scss +68 -1
  318. package/input-otp/styles/_index.scss +14 -0
  319. package/llms-full.txt +52 -20
  320. package/overlay/styles/_arrow.scss +4 -4
  321. package/package.json +33 -1
  322. package/popconfirm/styles/_index.scss +3 -11
  323. package/progress/styles/_index.scss +32 -0
  324. package/schema-form/styles/_index.scss +78 -0
  325. package/schematics/use/rule.js +2 -0
  326. package/schematics/use/symbol-map.json +4 -0
  327. package/select/styles/_index.scss +114 -22
  328. package/skills/ngwr/SKILL.md +1 -1
  329. package/skills/ngwr/references/catalog.md +9 -1
  330. package/slider/styles/_index.scss +22 -0
  331. package/table/styles/_index.scss +167 -3
  332. package/textarea/styles/_index.scss +80 -0
  333. package/theme/styles/_focus.scss +5 -0
  334. package/theme/styles/_motion.scss +5 -0
  335. package/transfer/styles/_index.scss +84 -0
  336. package/tree/styles/_index.scss +138 -5
  337. package/types/ngwr-alert-testing.d.ts +88 -0
  338. package/types/ngwr-badge.d.ts +72 -2
  339. package/types/ngwr-breadcrumbs-testing.d.ts +92 -0
  340. package/types/ngwr-burger-testing.d.ts +51 -0
  341. package/types/ngwr-calendar-testing.d.ts +18 -6
  342. package/types/ngwr-calendar.d.ts +272 -22
  343. package/types/ngwr-cascader.d.ts +10 -1
  344. package/types/ngwr-charts-chart-legend.d.ts +9 -4
  345. package/types/ngwr-charts-line-chart-testing.d.ts +4 -1
  346. package/types/ngwr-charts-line-chart.d.ts +7 -4
  347. package/types/ngwr-color-picker-testing.d.ts +15 -4
  348. package/types/ngwr-color-picker.d.ts +76 -6
  349. package/types/ngwr-compare-testing.d.ts +72 -0
  350. package/types/ngwr-date-picker-testing.d.ts +23 -8
  351. package/types/ngwr-date-picker.d.ts +100 -9
  352. package/types/ngwr-date.d.ts +71 -1
  353. package/types/ngwr-drawer.d.ts +9 -0
  354. package/types/ngwr-dropdown-testing.d.ts +20 -0
  355. package/types/ngwr-dropdown.d.ts +24 -6
  356. package/types/ngwr-event-calendar.d.ts +66 -8
  357. package/types/ngwr-file-upload-testing.d.ts +31 -2
  358. package/types/ngwr-file-upload.d.ts +148 -1
  359. package/types/ngwr-form.d.ts +47 -3
  360. package/types/ngwr-graph-testing.d.ts +8 -3
  361. package/types/ngwr-graph.d.ts +147 -7
  362. package/types/ngwr-input-number-testing.d.ts +10 -0
  363. package/types/ngwr-input-number.d.ts +30 -1
  364. package/types/ngwr-input-otp.d.ts +10 -0
  365. package/types/ngwr-input-testing.d.ts +30 -0
  366. package/types/ngwr-input.d.ts +54 -3
  367. package/types/ngwr-overlay.d.ts +84 -5
  368. package/types/ngwr-pipes.d.ts +2 -1
  369. package/types/ngwr-popconfirm-testing.d.ts +12 -3
  370. package/types/ngwr-popconfirm.d.ts +28 -3
  371. package/types/ngwr-popover-testing.d.ts +19 -2
  372. package/types/ngwr-popover.d.ts +22 -2
  373. package/types/ngwr-progress.d.ts +29 -1
  374. package/types/ngwr-pull-to-refresh-testing.d.ts +83 -0
  375. package/types/ngwr-resizable-testing.d.ts +116 -0
  376. package/types/ngwr-schema-form-testing.d.ts +260 -0
  377. package/types/ngwr-schema-form.d.ts +76 -6
  378. package/types/ngwr-select-testing.d.ts +20 -0
  379. package/types/ngwr-select.d.ts +112 -11
  380. package/types/ngwr-sidebar-testing.d.ts +176 -0
  381. package/types/ngwr-slider-testing.d.ts +3 -1
  382. package/types/ngwr-slider.d.ts +21 -1
  383. package/types/ngwr-sortable-list.d.ts +6 -0
  384. package/types/ngwr-stepper.d.ts +20 -11
  385. package/types/ngwr-table-testing.d.ts +70 -6
  386. package/types/ngwr-table.d.ts +480 -50
  387. package/types/ngwr-tabs-testing.d.ts +14 -17
  388. package/types/ngwr-tabs.d.ts +6 -0
  389. package/types/ngwr-textarea-testing.d.ts +10 -0
  390. package/types/ngwr-textarea.d.ts +48 -2
  391. package/types/ngwr-toast.d.ts +8 -1
  392. package/types/ngwr-transfer-testing.d.ts +3 -0
  393. package/types/ngwr-transfer.d.ts +24 -1
  394. package/types/ngwr-tree-testing.d.ts +65 -1
  395. package/types/ngwr-tree.d.ts +333 -12
  396. package/types/ngwr-utils.d.ts +28 -0
  397. package/types/ngwr-version.d.ts +1 -1
  398. package/types/ngwr-window.d.ts +7 -4
@@ -208,7 +208,7 @@ var WrStorage = class WrStorage {
208
208
  }
209
209
  static ɵfac = i0.ɵɵngDeclareFactory({
210
210
  minVersion: "12.0.0",
211
- version: "22.2.5",
211
+ version: "22.2.6",
212
212
  ngImport: i0,
213
213
  type: WrStorage,
214
214
  deps: [],
@@ -216,14 +216,14 @@ var WrStorage = class WrStorage {
216
216
  });
217
217
  static ɵprov = i0.ɵɵngDeclareService({
218
218
  minVersion: "22.0.0",
219
- version: "22.2.5",
219
+ version: "22.2.6",
220
220
  ngImport: i0,
221
221
  type: WrStorage
222
222
  });
223
223
  };
224
224
  i0.ɵɵngDeclareClassMetadata({
225
225
  minVersion: "12.0.0",
226
- version: "22.2.5",
226
+ version: "22.2.6",
227
227
  ngImport: i0,
228
228
  type: WrStorage,
229
229
  decorators: [{ type: Service }]
@@ -55,7 +55,7 @@ var WrSwitch = class WrSwitch {
55
55
  }
56
56
  static ɵfac = i0.ɵɵngDeclareFactory({
57
57
  minVersion: "12.0.0",
58
- version: "22.2.5",
58
+ version: "22.2.6",
59
59
  ngImport: i0,
60
60
  type: WrSwitch,
61
61
  deps: [],
@@ -63,7 +63,7 @@ var WrSwitch = class WrSwitch {
63
63
  });
64
64
  static ɵcmp = i0.ɵɵngDeclareComponent({
65
65
  minVersion: "17.2.0",
66
- version: "22.2.5",
66
+ version: "22.2.6",
67
67
  type: WrSwitch,
68
68
  isStandalone: true,
69
69
  selector: "wr-switch",
@@ -136,7 +136,7 @@ var WrSwitch = class WrSwitch {
136
136
  };
137
137
  i0.ɵɵngDeclareClassMetadata({
138
138
  minVersion: "12.0.0",
139
- version: "22.2.5",
139
+ version: "22.2.6",
140
140
  ngImport: i0,
141
141
  type: WrSwitch,
142
142
  decorators: [{
@@ -1,4 +1,4 @@
1
- import { ComponentHarness, ContentContainerComponentHarness, HarnessPredicate } from "@angular/cdk/testing";
1
+ import { ComponentHarness, ContentContainerComponentHarness, HarnessPredicate, TestKey } from "@angular/cdk/testing";
2
2
  /**
3
3
  * @license
4
4
  *
@@ -25,6 +25,12 @@ var WrTableCellHarness = class WrTableCellHarness extends ContentContainerCompon
25
25
  async getColumnTitle() {
26
26
  return (await this.host()).getAttribute("data-label");
27
27
  }
28
+ async isEditable() {
29
+ return (await this.host()).hasClass("wr-table__td--editable");
30
+ }
31
+ async isEditing() {
32
+ return (await this.host()).hasClass("wr-table__td--editing");
33
+ }
28
34
  async getPin() {
29
35
  const host = await this.host();
30
36
  if (await host.hasClass("wr-table__td--pin-left")) return "left";
@@ -164,8 +170,10 @@ var WrTableHarness = class WrTableHarness extends ComponentHarness {
164
170
  }
165
171
  tableEl = this.locatorFor("table.wr-table__table");
166
172
  selectAllBox = this.locatorForOptional(".wr-table__th--select input.wr-checkbox__input");
173
+ chooserButton = this.locatorForOptional(".wr-table__columns-btn");
167
174
  async getRole() {
168
- return await (await this.tableEl()).getAttribute("role") === "treegrid" ? "treegrid" : "table";
175
+ const role = await (await this.tableEl()).getAttribute("role");
176
+ return role === "treegrid" || role === "grid" ? role : "table";
169
177
  }
170
178
  async isTree() {
171
179
  return await this.getRole() === "treegrid";
@@ -244,6 +252,84 @@ var WrTableHarness = class WrTableHarness extends ComponentHarness {
244
252
  async toggleGroup(label) {
245
253
  await (await this.groupToggleFor(label)).click();
246
254
  }
255
+ async hasSelectionBar() {
256
+ return await this.locatorForOptional(".wr-table__selection-bar")() !== null;
257
+ }
258
+ async getSelectionBarText() {
259
+ const count = await this.locatorForOptional(".wr-table__selection-count")();
260
+ return count ? wrTableHarnessText(await count.text()) : null;
261
+ }
262
+ async clearSelection() {
263
+ await (await this.selectionBarPart(".wr-table__selection-clear")).click();
264
+ }
265
+ async getSelectionBarLoader() {
266
+ await this.selectionBarPart(".wr-table__selection-actions");
267
+ return this.locatorFactory.harnessLoaderFor(".wr-table__selection-actions");
268
+ }
269
+ async selectionBarPart(selector) {
270
+ const part = await this.locatorForOptional(selector)();
271
+ if (!part) throw new Error("WrTableHarness: this table shows no selection bar — it has no `[wrTableSelectionBar]` template, or no row is selected.");
272
+ return part;
273
+ }
274
+ async editCell(row, columnTitle) {
275
+ const rows = await this.getRows();
276
+ if (!rows[row]) throw new Error(`WrTableHarness: no row ${row} — the table renders ${rows.length} row(s).`);
277
+ const [cell] = await rows[row].getCells({ columnTitle });
278
+ if (!cell) throw new Error(`WrTableHarness: row ${row} has no cell under "${columnTitle}".`);
279
+ await (await cell.host()).sendKeys(TestKey.ENTER);
280
+ if (!await cell.isEditing()) throw new Error(`WrTableHarness: the cell under "${columnTitle}" in row ${row} is not editable — its column has no \`[wrTableEditCell]\` template or says \`editable: false\`, or the \`editable\` predicate refused the row.`);
281
+ return cell;
282
+ }
283
+ async isEditing() {
284
+ return await this.locatorForOptional(".wr-table__td--editing")() !== null;
285
+ }
286
+ async commitEdit() {
287
+ await (await this.editingCell()).sendKeys(TestKey.ENTER);
288
+ }
289
+ async cancelEdit() {
290
+ await (await this.editingCell()).sendKeys(TestKey.ESCAPE);
291
+ }
292
+ async editingCell() {
293
+ const cell = await this.locatorForOptional(".wr-table__td--editing")();
294
+ if (!cell) throw new Error("WrTableHarness: no cell is being edited — call `editCell()` first.");
295
+ return cell;
296
+ }
297
+ async hasColumnChooser() {
298
+ return await this.chooserButton() !== null;
299
+ }
300
+ async getHiddenColumns() {
301
+ const entries = await this.chooserEntries();
302
+ const hidden = [];
303
+ for (const entry of entries) if (!await entry.box.getProperty("checked")) hidden.push(entry.title);
304
+ return hidden;
305
+ }
306
+ async isColumnLocked(columnTitle) {
307
+ return (await this.chooserEntryFor(columnTitle)).box.getProperty("disabled");
308
+ }
309
+ async toggleColumn(columnTitle) {
310
+ const entry = await this.chooserEntryFor(columnTitle);
311
+ if (await entry.box.getProperty("disabled")) throw new Error(`WrTableHarness: the column "${columnTitle}" cannot be toggled — it is \`hideable: false\`, or it is the last column shown.`);
312
+ await entry.box.click();
313
+ }
314
+ async chooserEntries() {
315
+ const button = await this.chooserButton();
316
+ if (!button) throw new Error("WrTableHarness: this table has no column chooser — set `columnChooser`.");
317
+ if (await button.getAttribute("aria-expanded") !== "true") await button.click();
318
+ const panelId = await button.getAttribute("aria-controls");
319
+ const root = this.documentRootLocatorFactory();
320
+ const items = await root.locatorForAll(`#${panelId} .wr-table__columns-item`)();
321
+ const boxes = await root.locatorForAll(`#${panelId} .wr-table__columns-item input.wr-checkbox__input`)();
322
+ return Promise.all(items.map(async (item, i) => ({
323
+ title: wrTableHarnessText(await item.text()),
324
+ box: boxes[i]
325
+ })));
326
+ }
327
+ async chooserEntryFor(columnTitle) {
328
+ const entries = await this.chooserEntries();
329
+ const entry = entries.find((candidate) => candidate.title === columnTitle);
330
+ if (!entry) throw new Error(`WrTableHarness: the column chooser lists no "${columnTitle}" — it lists [${entries.map((candidate) => candidate.title).join(", ")}].`);
331
+ return entry;
332
+ }
247
333
  async headerCellFor(columnTitle) {
248
334
  const [header] = await this.getHeaderCells({ text: columnTitle });
249
335
  if (!header) {
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-table-testing.mjs","names":[],"sources":["../../../projects/lib/table/testing/wr-table-harness-text.ts","../../../projects/lib/table/testing/wr-table-cell-harness.ts","../../../projects/lib/table/testing/wr-table-header-cell-harness.ts","../../../projects/lib/table/testing/wr-table-row-harness.ts","../../../projects/lib/table/testing/wr-table-harness.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\n/**\n * Collapse the whitespace inside a table cell to what a user reads on one line.\n *\n * `TestElement.text()` only trims the ends, and a `<td>` is rarely one text node:\n * the tree column puts a toggle in front of the value, a `[wrTableExpand]` detail\n * cell holds whatever the consumer projected. The template's own indentation is\n * NOT the problem — Angular's default `preserveWhitespaces: false` drops\n * whitespace-only text nodes at compile time, so `'\\n Ada\\n'` never reaches\n * `textContent`. What does reach it is whitespace inside a VALUE (`'first\\n\\n\n * programmer'` out of a textarea or an API) and, in a consumer app compiled with\n * `preserveWhitespaces: true`, the indentation after all. Every run becomes one\n * space so a spec can assert the rendered line either way.\n */\nexport function wrTableHarnessText(text: string): string {\n return text.replace(/\\s+/g, ' ').trim();\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ContentContainerComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport type { WrTableCellHarnessFilters } from './types';\nimport { wrTableHarnessText } from './wr-table-harness-text';\n\n/**\n * Test harness for one data cell of a `<wr-table>` row.\n *\n * A CONTENT CONTAINER, because a cell is where a consumer's own components end\n * up: a `[wrTableCell]` template can render a `<wr-tag>`, a button, an input, and\n * `cell.getHarness(WrButtonHarness…)` resolves those INSIDE this cell — so the\n * \"Delete\" button of row 3 cannot be mistaken for the one in row 1.\n *\n * @example\n * ```ts\n * const [row] = await table.getRows({ cellText: 'Ada' });\n * const [status] = await row.getCells({ columnTitle: 'Status' });\n *\n * expect(await status.getText()).toBe('active');\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrTableCellHarness extends ContentContainerComponentHarness {\n /**\n * Data cells only. The lead selection and expand cells carry the same\n * `.wr-table__td` class — they hold the row's controls, not its data — so a cell\n * list that swept them in would no longer line up with the header list.\n */\n static hostSelector = '.wr-table__td:not(.wr-table__td--select):not(.wr-table__td--expand)';\n\n /** Build a predicate that narrows the query. */\n static with(options: WrTableCellHarnessFilters = {}): HarnessPredicate<WrTableCellHarness> {\n return new HarnessPredicate(WrTableCellHarness, options)\n .addOption('text', options.text, (harness, text) => HarnessPredicate.stringMatches(harness.getText(), text))\n .addOption('columnTitle', options.columnTitle, (harness, title) =>\n HarnessPredicate.stringMatches(harness.getColumnTitle(), title)\n );\n }\n\n /** The cell's text, with the template's indentation collapsed to single spaces. */\n async getText(): Promise<string> {\n return wrTableHarnessText(await (await this.host()).text());\n }\n\n /**\n * The title of the column this cell belongs to.\n *\n * Read from `data-label` — the attribute responsive card mode prints in front of\n * each value — because it is the only place a cell says which column it is in.\n * The column KEY is never in the DOM at all.\n */\n async getColumnTitle(): Promise<string | null> {\n return (await this.host()).getAttribute('data-label');\n }\n\n /** Which edge the cell's column is frozen against, or `null` when it scrolls. */\n async getPin(): Promise<'left' | 'right' | null> {\n const host = await this.host();\n if (await host.hasClass('wr-table__td--pin-left')) return 'left';\n if (await host.hasClass('wr-table__td--pin-right')) return 'right';\n return null;\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport type { WrTableHeaderCellHarnessFilters } from './types';\n\n/**\n * Test harness for one column header of a `<wr-table>`.\n *\n * The selector deliberately skips the two LEAD headers — selection and expand —\n * which carry the same `.wr-table__th` class but hold a checkbox or nothing at\n * all. What is left lines up index-for-index with the data columns, so a header's\n * position is its column's position.\n *\n * Columns are addressed by their TITLE here and everywhere else in this harness\n * family, never by their `columns` key: the key never reaches the DOM. Only the\n * title does — in this header and in every cell's `data-label` — so it is the one\n * handle a spec and the rendered table share.\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrTableHeaderCellHarness extends ComponentHarness {\n static hostSelector = '.wr-table__th:not(.wr-table__th--select):not(.wr-table__th--expand)';\n\n /** Build a predicate that narrows the query. */\n static with(options: WrTableHeaderCellHarnessFilters = {}): HarnessPredicate<WrTableHeaderCellHarness> {\n return new HarnessPredicate(WrTableHeaderCellHarness, options)\n .addOption('text', options.text, (harness, text) => HarnessPredicate.stringMatches(harness.getText(), text))\n .addOption('sortable', options.sortable, async (harness, sortable) => (await harness.isSortable()) === sortable);\n }\n\n /** The column title, trimmed. The sort and filter controls are not part of it. */\n async getText(): Promise<string> {\n return (await this.locatorFor('.wr-table__title')()).text();\n }\n\n /**\n * The direction this column announces, exactly as `aria-sort` puts it — or\n * `null` when the column does not sort.\n *\n * `null` is not \"unsorted\": a sortable column with no direction announces\n * `'none'`, and only a plain column omits the attribute entirely. Claiming\n * sortability a column does not have is the bug that distinction prevents.\n *\n * Only the PRIMARY sort key announces a direction (ARIA puts `aria-sort` on one\n * header at a time), so a secondary key of a multi-column sort answers\n * `'none'` here while its arrow says otherwise. Read that one through\n * {@link getSortIndicator} and {@link getSortOrder}.\n */\n async getSortDirection(): Promise<'ascending' | 'descending' | 'none' | null> {\n const sort = await (await this.host()).getAttribute('aria-sort');\n return sort as 'ascending' | 'descending' | 'none' | null;\n }\n\n /**\n * The direction the header's indicator DRAWS — `'ascending'`, `'descending'`,\n * or `null` while the column is not sorted (or does not sort at all).\n *\n * The drawn half of the sort state, and the only half a secondary key has:\n * read from the indicator's own `--asc` / `--desc` modifier, so it answers for\n * every sorted column, where {@link getSortDirection} answers for the primary\n * one alone.\n */\n async getSortIndicator(): Promise<'ascending' | 'descending' | null> {\n const indicator = await this.locatorForOptional('wr-table-sort')();\n if (!indicator) return null;\n if (await indicator.hasClass('wr-table-sort--asc')) return 'ascending';\n if (await indicator.hasClass('wr-table-sort--desc')) return 'descending';\n return null;\n }\n\n /**\n * This column's 1-based place in the sort, or `null` when it does not sort by\n * anything right now.\n *\n * Read from the number drawn after the indicator while several columns sort.\n * A lone sorted column draws no number — a \"1\" would say nothing its arrow does\n * not — so it answers `1` from its indicator alone, and that is the one case\n * this method infers rather than reads.\n */\n async getSortOrder(): Promise<number | null> {\n const badge = await this.locatorForOptional('.wr-table__sort-order')();\n if (badge) return Number.parseInt(await badge.text(), 10);\n return (await this.getSortIndicator()) === null ? null : 1;\n }\n\n /** Whether the column offers sorting at all. */\n async isSortable(): Promise<boolean> {\n return (await this.getSortDirection()) !== null;\n }\n\n /**\n * Advance the sort one step — none → ascending → descending → none, the cycle a\n * click on the indicator drives.\n *\n * Throws on a column with no sort control rather than doing nothing: the quiet\n * version of this leaves a spec asserting an unchanged direction and passing.\n */\n async sort(): Promise<void> {\n const button = await this.locatorForOptional('.wr-table__sort-btn')();\n if (!button) {\n throw new Error(\n `WrTableHeaderCellHarness.sort(): the \"${await this.getText()}\" column has no sort control — ` +\n 'its column definition needs `sortable: true`.'\n );\n }\n await button.click();\n }\n\n /** Whether the column offers a filter dropdown (its definition carries a NON-EMPTY `filterItems`). */\n async isFilterable(): Promise<boolean> {\n return (await this.locatorForOptional('wr-table-filter')()) !== null;\n }\n\n /** Which edge the column is frozen against, or `null` when it scrolls with the rest. */\n async getPin(): Promise<'left' | 'right' | null> {\n const host = await this.host();\n if (await host.hasClass('wr-table__th--pin-left')) return 'left';\n if (await host.hasClass('wr-table__th--pin-right')) return 'right';\n return null;\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ContentContainerComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport type { WrTableCellHarnessFilters, WrTableRowHarnessFilters } from './types';\nimport { WrTableCellHarness } from './wr-table-cell-harness';\n\n/**\n * Test harness for one body row of a `<wr-table>` — flat, grouped or tree.\n *\n * Also a CONTENT CONTAINER, so `row.getHarness(WrButtonHarness…)` reaches the\n * consumer's own components anywhere in the row without leaving this row.\n *\n * @example\n * ```ts\n * const [ada] = await table.getRows({ cellText: 'Ada' });\n *\n * await ada.select();\n * await (await ada.getHarness(WrButtonHarness.with({ text: 'Edit' }))).click();\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrTableRowHarness extends ContentContainerComponentHarness {\n /**\n * `.wr-table__tr` is the DATA row and nothing else.\n *\n * Everything else a `<tbody>` can hold is a `<tr>` too: the group band\n * (`.wr-table__group-row`), its subtotal row, the detail row a `[wrTableExpand]`\n * template renders, the two virtual spacers, and the \"no data\" row. Querying\n * `tbody tr` would hand every one of those back as a row with no cells.\n */\n static hostSelector = '.wr-table__tr';\n\n /** Build a predicate that narrows the query. */\n static with(options: WrTableRowHarnessFilters = {}): HarnessPredicate<WrTableRowHarness> {\n return new HarnessPredicate(WrTableRowHarness, options)\n .addOption('cellText', options.cellText, async (harness, text) => {\n for (const cell of await harness.getCellTexts()) {\n if (await HarnessPredicate.stringMatches(cell, text)) return true;\n }\n return false;\n })\n .addOption('selected', options.selected, async (harness, selected) => (await harness.isSelected()) === selected)\n .addOption('expanded', options.expanded, async (harness, expanded) => (await harness.isExpanded()) === expanded)\n .addOption('level', options.level, async (harness, level) => (await harness.getLevel()) === level);\n }\n\n private readonly selectBox = this.locatorForOptional('.wr-table__td--select input.wr-checkbox__input');\n\n /**\n * The row's disclosure control, whichever of the two the table gave it: the lead\n * button of a `[wrTableExpand]` table, or the tree toggle inside the tree column.\n * The two never coexist — a tree row owns its own disclosure, so the component\n * refuses the pair.\n *\n * `button` in the tree selector is load-bearing. A leaf renders a `<span>` with\n * the same `.wr-table__tree-toggle` class purely to hold the indent, and taking\n * that for a control would report every leaf as expandable.\n */\n private readonly disclosure = this.locatorForOptional('.wr-table__expand-btn, button.wr-table__tree-toggle');\n\n /** The row's data cells, in DOM order. The lead control cells are not cells. */\n async getCells(filters: WrTableCellHarnessFilters = {}): Promise<WrTableCellHarness[]> {\n return this.locatorForAll(WrTableCellHarness.with(filters))();\n }\n\n /** The text of every data cell, in DOM order. */\n async getCellTexts(): Promise<string[]> {\n const cells = await this.getCells();\n return Promise.all(cells.map(cell => cell.getText()));\n }\n\n /**\n * Whether the row is selected.\n *\n * Read from the `--selected` modifier, which is what the row looks like and what\n * a consumer styles against. It also means a row is not \"selected\" while\n * `rowSelection` is off, however many keys the `selection` model holds — nothing\n * on screen says otherwise.\n */\n async isSelected(): Promise<boolean> {\n return (await this.host()).hasClass('wr-table__tr--selected');\n }\n\n /** Whether the row offers a selection checkbox at all. */\n async isSelectable(): Promise<boolean> {\n return (await this.selectBox()) !== null;\n }\n\n /** Flip the row's checkbox. Throws when the table has no selection column. */\n async toggleSelection(): Promise<void> {\n const box = await this.selectBox();\n if (!box) {\n throw new Error(\n 'WrTableRowHarness.toggleSelection(): this row has no checkbox — the table needs ' +\n \"`rowSelection` set to 'single' or 'multiple'.\"\n );\n }\n await box.click();\n }\n\n /** Select the row if it is not already selected. */\n async select(): Promise<void> {\n if (!(await this.isSelected())) await this.toggleSelection();\n }\n\n /** Deselect the row if it is selected. */\n async deselect(): Promise<void> {\n if (await this.isSelected()) await this.toggleSelection();\n }\n\n /**\n * Whether the row has something to open — a detail template's disclosure, or\n * children in a tree. A tree leaf answers `false`.\n */\n async isExpandable(): Promise<boolean> {\n return (await this.disclosure()) !== null;\n }\n\n /** Whether the row is open, from the disclosure's `aria-expanded`. */\n async isExpanded(): Promise<boolean> {\n const toggle = await this.disclosure();\n return toggle !== null && (await toggle.getAttribute('aria-expanded')) === 'true';\n }\n\n /** Open or close the row. Throws when it has nothing to open. */\n async toggleExpand(): Promise<void> {\n const toggle = await this.disclosure();\n if (!toggle) {\n throw new Error(\n 'WrTableRowHarness.toggleExpand(): this row has no disclosure control — a flat table needs a ' +\n '`[wrTableExpand]` template, and a tree row with no children is a leaf.'\n );\n }\n await toggle.click();\n }\n\n /**\n * The row's depth as the table announces it — 1-based `aria-level`, `null` in a\n * flat table, where depth is not a thing that exists.\n */\n async getLevel(): Promise<number | null> {\n return this.numericAttribute('aria-level');\n }\n\n /** The row's 1-based position among its siblings (`aria-posinset`), or `null` when flat. */\n async getPosInSet(): Promise<number | null> {\n return this.numericAttribute('aria-posinset');\n }\n\n /** How many rows are in the row's sibling set, itself included (`aria-setsize`); `null` when flat. */\n async getSetSize(): Promise<number | null> {\n return this.numericAttribute('aria-setsize');\n }\n\n /**\n * The row's 1-based index in the FULL dataset (`aria-rowindex`, header included),\n * or `null` when the table is not virtualized.\n *\n * Only a windowed table publishes it, and that is precisely when it matters: the\n * rows in the DOM are a slice, so their DOM order says nothing about where they\n * sit in the data.\n */\n async getRowIndex(): Promise<number | null> {\n return this.numericAttribute('aria-rowindex');\n }\n\n private async numericAttribute(name: string): Promise<number | null> {\n const value = await (await this.host()).getAttribute(name);\n return value === null ? null : Number.parseInt(value, 10);\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, HarnessPredicate, type TestElement } from '@angular/cdk/testing';\n\nimport type { WrTableHarnessFilters, WrTableHeaderCellHarnessFilters, WrTableRowHarnessFilters } from './types';\nimport { wrTableHarnessText } from './wr-table-harness-text';\nimport { WrTableHeaderCellHarness } from './wr-table-header-cell-harness';\nimport { WrTableRowHarness } from './wr-table-row-harness';\n\n/**\n * Test harness for `<wr-table>` — the root of a small family, since a table is a\n * tree and not one control: {@link WrTableHeaderCellHarness} for a column header,\n * {@link WrTableRowHarness} for a body row, and `WrTableCellHarness` for a cell.\n *\n * Columns are addressed by their header TITLE, never by their `columns` key: the\n * key never reaches the DOM.\n *\n * What this harness deliberately does NOT do:\n * - open a column's filter dropdown. The panel is a `wr-dropdown` in the overlay\n * container, and driving it belongs to a dropdown harness rather than this one;\n * {@link WrTableHeaderCellHarness.isFilterable} reports that a column offers one.\n * - scroll a virtualized body. See {@link getRows}.\n *\n * @example\n * ```ts\n * const table = await loader.getHarness(WrTableHarness);\n *\n * expect(await table.getHeaderTexts()).toEqual(['Name', 'Role']);\n * await table.sortByColumn('Name');\n * expect(await table.getSortDirection('Name')).toBe('ascending');\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrTableHarness extends ComponentHarness {\n static hostSelector = 'wr-table';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrTableHarnessFilters = {}): HarnessPredicate<WrTableHarness> {\n return new HarnessPredicate(WrTableHarness, options)\n .addOption('columnTitle', options.columnTitle, async (harness, title) => {\n for (const header of await harness.getHeaderTexts()) {\n if (await HarnessPredicate.stringMatches(header, title)) return true;\n }\n return false;\n })\n .addOption('tree', options.tree, async (harness, tree) => (await harness.isTree()) === tree);\n }\n\n private readonly tableEl = this.locatorFor('table.wr-table__table');\n private readonly selectAllBox = this.locatorForOptional('.wr-table__th--select input.wr-checkbox__input');\n\n /**\n * The role the table announces.\n *\n * A flat table sets no `role` at all, so it announces the native `table` role —\n * NOT `grid`, which would promise cell-by-cell keyboard navigation it does not\n * implement. `childrenKey` turns it into a `treegrid`, and that role is the only\n * place the hierarchy exists for a screen-reader user: the indent is decoration.\n */\n async getRole(): Promise<'treegrid' | 'table'> {\n return (await (await this.tableEl()).getAttribute('role')) === 'treegrid' ? 'treegrid' : 'table';\n }\n\n /** Whether the rows are a hierarchy rather than a flat list. */\n async isTree(): Promise<boolean> {\n return (await this.getRole()) === 'treegrid';\n }\n\n /**\n * Whether the body is WINDOWED right now.\n *\n * Read from the host modifier rather than from the input, and that is the point:\n * `virtualScroll` is a request, not a promise. The table falls back to rendering\n * every row whenever the layout stops being uniform — grouping, a detail\n * template, responsive card mode, a visible pager, a tree — so this answers what\n * actually happened.\n */\n async isVirtual(): Promise<boolean> {\n return (await this.host()).hasClass('wr-table--virtual');\n }\n\n /** Whether the table is loading, as the overlay or as the bar: the host's `aria-busy`. */\n async isLoading(): Promise<boolean> {\n return (await (await this.host()).getAttribute('aria-busy')) === 'true';\n }\n\n /** Which form `loading` takes: the overlay with the spinner, the bar, or `null` while idle. */\n async getLoadingForm(): Promise<'overlay' | 'bar' | null> {\n if ((await this.locatorForOptional('.wr-table__loading')()) !== null) return 'overlay';\n return (await this.locatorForOptional('.wr-table__loading-bar')()) !== null ? 'bar' : null;\n }\n\n /** The column headers, in render order — which `columnOrder` and a drag can change. */\n async getHeaderCells(filters: WrTableHeaderCellHarnessFilters = {}): Promise<WrTableHeaderCellHarness[]> {\n return this.locatorForAll(WrTableHeaderCellHarness.with(filters))();\n }\n\n /**\n * The column titles, in render order.\n *\n * The selection and expand headers are not columns and are not here, so this\n * list stays as wide as every row from {@link getCellTexts}.\n */\n async getHeaderTexts(): Promise<string[]> {\n const headers = await this.getHeaderCells();\n return Promise.all(headers.map(header => header.getText()));\n }\n\n /**\n * The direction a column announces via `aria-sort`, or `null` when it does not\n * sort. Only the primary key of a multi-column sort announces one; see\n * {@link getSortIndicator} for the rest.\n */\n async getSortDirection(columnTitle: string): Promise<'ascending' | 'descending' | 'none' | null> {\n return (await this.headerCellFor(columnTitle)).getSortDirection();\n }\n\n /**\n * The direction a column's indicator draws, for every sorted column — a\n * secondary key included — or `null` when the column is not sorted.\n */\n async getSortIndicator(columnTitle: string): Promise<'ascending' | 'descending' | null> {\n return (await this.headerCellFor(columnTitle)).getSortIndicator();\n }\n\n /** A column's 1-based place in the sort (`1` is the primary key), or `null` when it is not sorted. */\n async getSortOrder(columnTitle: string): Promise<number | null> {\n return (await this.headerCellFor(columnTitle)).getSortOrder();\n }\n\n /**\n * Advance a column's sort one step — none → ascending → descending → none.\n *\n * Sorting is the host's job: `<wr-table>` publishes the intent through its `sort`\n * model and never reorders `items` itself, so a spec that expects the rows to\n * move has to sort the data the way the app does.\n */\n async sortByColumn(columnTitle: string): Promise<void> {\n await (await this.headerCellFor(columnTitle)).sort();\n }\n\n /**\n * The body rows currently rendered, in DOM order.\n *\n * \"Currently rendered\" is the whole caveat of a virtualized table: while\n * {@link isVirtual} is true the `<tbody>` holds only the window around the scroll\n * offset, padded by a spacer row at each end that still has rows to stand in for\n * (one of them, at the top or the bottom of the list), so this returns the\n * WINDOW — not the dataset.\n * {@link getAriaRowCount} is the total the table announces and\n * {@link WrTableRowHarness.getRowIndex} says where a row sits in it. Nothing here\n * scrolls that window on purpose: the viewport has no layout in a unit test, so a\n * `scrollTo` would silently do nothing. Reach for `WrTable.scrollToRow()` in a\n * real browser, or narrow the data instead.\n *\n * Group bands, per-group subtotals, detail rows and the \"no data\" row are not\n * rows and never appear here.\n */\n async getRows(filters: WrTableRowHarnessFilters = {}): Promise<WrTableRowHarness[]> {\n return this.locatorForAll(WrTableRowHarness.with(filters))();\n }\n\n /** The whole body as a matrix of cell text — one array per row, one entry per column. */\n async getCellTexts(): Promise<string[][]> {\n const rows = await this.getRows();\n return Promise.all(rows.map(row => row.getCellTexts()));\n }\n\n /**\n * The `<tfoot>` summary cells, one per column and `''` for a column with no\n * `summary`. Empty when no column defines one.\n *\n * The lead cells are dropped so this lines up with {@link getHeaderTexts}. A\n * per-group subtotal row is NOT here — it lives in the body, under its band.\n */\n async getFooterTexts(): Promise<string[]> {\n const cells = await this.locatorForAll('tfoot .wr-table__foot-cell:not(.wr-table__foot-cell--lead)')();\n return Promise.all(cells.map(async cell => wrTableHarnessText(await cell.text())));\n }\n\n /** The \"no data\" message, or `null` while the table has rows to show. */\n async getEmptyText(): Promise<string | null> {\n const empty = await this.locatorForOptional('.wr-table__empty')();\n return empty ? wrTableHarnessText(await empty.text()) : null;\n }\n\n /**\n * The row count the table announces (`aria-rowcount` — header and summary row\n * included), or `null` when it is not virtualized and every row is in the DOM.\n */\n async getAriaRowCount(): Promise<number | null> {\n const count = await (await this.tableEl()).getAttribute('aria-rowcount');\n return count === null ? null : Number.parseInt(count, 10);\n }\n\n /** Whether the header offers a select-all box — only `rowSelection=\"multiple\"` does. */\n async hasSelectAll(): Promise<boolean> {\n return (await this.selectAllBox()) !== null;\n }\n\n /** Whether every row in the select-all scope is selected — see {@link toggleSelectAll}. */\n async isAllSelected(): Promise<boolean> {\n return (await this.selectAllHost()).getProperty<boolean>('checked');\n }\n\n /**\n * Whether some rows are selected and others are not — the box's third state.\n *\n * `indeterminate` is a DOM PROPERTY, not an attribute: reading the attribute\n * reports `null` for a box that is visibly dashed.\n */\n async isPartiallySelected(): Promise<boolean> {\n return (await this.selectAllHost()).getProperty<boolean>('indeterminate');\n }\n\n /**\n * Click the select-all box, once.\n *\n * Under `selectAllScope=\"all\"` its scope is every page of `items`. Otherwise\n * its scope is the rows the table RENDERS — the current page, and a collapsed\n * group's rows are out because collapsing drops them from that list. A\n * virtualized table's off-window rows are IN, though: the window is a slice\n * taken after the list is built, so one click selects the whole dataset and not\n * just what is in the DOM. And the third state is worth knowing about before\n * asserting: while the selection is partial the box reads unchecked, so one\n * click selects everything rather than clearing it.\n */\n async toggleSelectAll(): Promise<void> {\n await (await this.selectAllHost()).click();\n }\n\n /**\n * The text of each open detail row, in row order.\n *\n * A detail row is a full-width `<tr>` NEXT TO the row it belongs to, not inside\n * it — which is why it is neither one of {@link getRows} nor one of a row's\n * cells.\n */\n async getDetailTexts(): Promise<string[]> {\n const details = await this.locatorForAll('.wr-table__detail')();\n return Promise.all(details.map(async detail => wrTableHarnessText(await detail.text())));\n }\n\n /**\n * The group band labels, in order.\n *\n * Empty when `groupBy` is off — and also when a `[wrTableGroupHeader]` template\n * replaced the built-in band, since the label is then the consumer's own markup.\n * Reach for that through {@link getRows}' siblings or your own component's\n * harness.\n */\n async getGroupLabels(): Promise<string[]> {\n const labels = await this.locatorForAll('.wr-table__group-label')();\n return Promise.all(labels.map(label => label.text()));\n }\n\n /** Whether the band with this label is collapsed. */\n async isGroupCollapsed(label: string): Promise<boolean> {\n const toggle = await this.groupToggleFor(label);\n return (await toggle.getAttribute('aria-expanded')) === 'false';\n }\n\n /** Collapse or expand the band with this label. */\n async toggleGroup(label: string): Promise<void> {\n await (await this.groupToggleFor(label)).click();\n }\n\n /** The header for a column title, or a failure that says which titles do exist. */\n private async headerCellFor(columnTitle: string): Promise<WrTableHeaderCellHarness> {\n const [header] = await this.getHeaderCells({ text: columnTitle });\n if (!header) {\n const titles = await this.getHeaderTexts();\n throw new Error(\n `WrTableHarness: no column headed \"${columnTitle}\". Columns are addressed by their title, ` +\n `not by their key — this table shows [${titles.join(', ')}].`\n );\n }\n return header;\n }\n\n /**\n * The collapse toggle of one band.\n *\n * Paired by index rather than by containment: both lists are emitted once per\n * band by the same loop, in the same order, and a `TestElement` cannot be\n * queried into.\n */\n private async groupToggleFor(label: string): Promise<TestElement> {\n const index = (await this.getGroupLabels()).indexOf(label);\n if (index < 0) {\n throw new Error(\n `WrTableHarness: no group band labelled \"${label}\" — is \\`groupBy\\` set, and is the band the ` +\n 'built-in one rather than a `[wrTableGroupHeader]` template?'\n );\n }\n return (await this.locatorForAll('.wr-table__group-toggle')())[index];\n }\n\n /** The select-all input, or a failure naming both reasons it is missing. */\n private async selectAllHost(): Promise<TestElement> {\n const box = await this.selectAllBox();\n if (!box) {\n throw new Error(\n 'WrTableHarness: this table has no select-all box — `rowSelection` is off, or it is ' +\n \"'single', which has no select-all by design.\"\n );\n }\n return box;\n }\n}\n"],"mappings":";;;;;;;AAoBA,SAAgB,mBAAmB,MAAY;CAC7C,OAAO,KAAK,QAAQ,QAAQ,GAAG,CAAC,CAAC,KAAI;AACvC;;;;;;;ACQA,IAAa,qBAAb,MAAa,2BAA2B,iCAAgC;CAMtE,OAAO,eAAe;CAGtB,OAAO,KAAK,UAAqC,CAAA,GAAE;EACjD,OAAO,IAAI,iBAAiB,oBAAoB,OAAO,CAAC,CACrD,UAAU,QAAQ,QAAQ,OAAO,SAAS,SAA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;CACT;CASQ,MAAM,eAAe,OAAa;EACxC,MAAM,SAAS,MAAM,KAAK,eAAc,EAAA,CAAI,QAAQ,KAAK;EACzD,IAAI,QAAQ,GACV,MAAM,IAAI,MACR,2CAA2C,MAAK,0GACe;EAGnE,QAAQ,MAAM,KAAK,cAAc,yBAAyB,CAAC,CAAA,EAAA,CAAI;CACjE;CAGQ,MAAM,gBAAa;EACzB,MAAM,MAAM,MAAM,KAAK,aAAY;EACnC,IAAI,CAAC,KACH,MAAM,IAAI,MACR,iIACgD;EAGpD,OAAO;CACT"}
1
+ {"version":3,"file":"ngwr-table-testing.mjs","names":[],"sources":["../../../projects/lib/table/testing/wr-table-harness-text.ts","../../../projects/lib/table/testing/wr-table-cell-harness.ts","../../../projects/lib/table/testing/wr-table-header-cell-harness.ts","../../../projects/lib/table/testing/wr-table-row-harness.ts","../../../projects/lib/table/testing/wr-table-harness.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\n/**\n * Collapse the whitespace inside a table cell to what a user reads on one line.\n *\n * `TestElement.text()` only trims the ends, and a `<td>` is rarely one text node:\n * the tree column puts a toggle in front of the value, a `[wrTableExpand]` detail\n * cell holds whatever the consumer projected. The template's own indentation is\n * NOT the problem — Angular's default `preserveWhitespaces: false` drops\n * whitespace-only text nodes at compile time, so `'\\n Ada\\n'` never reaches\n * `textContent`. What does reach it is whitespace inside a VALUE (`'first\\n\\n\n * programmer'` out of a textarea or an API) and, in a consumer app compiled with\n * `preserveWhitespaces: true`, the indentation after all. Every run becomes one\n * space so a spec can assert the rendered line either way.\n */\nexport function wrTableHarnessText(text: string): string {\n return text.replace(/\\s+/g, ' ').trim();\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ContentContainerComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport type { WrTableCellHarnessFilters } from './types';\nimport { wrTableHarnessText } from './wr-table-harness-text';\n\n/**\n * Test harness for one data cell of a `<wr-table>` row.\n *\n * A CONTENT CONTAINER, because a cell is where a consumer's own components end\n * up: a `[wrTableCell]` template can render a `<wr-tag>`, a button, an input, and\n * `cell.getHarness(WrButtonHarness…)` resolves those INSIDE this cell — so the\n * \"Delete\" button of row 3 cannot be mistaken for the one in row 1.\n *\n * @example\n * ```ts\n * const [row] = await table.getRows({ cellText: 'Ada' });\n * const [status] = await row.getCells({ columnTitle: 'Status' });\n *\n * expect(await status.getText()).toBe('active');\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrTableCellHarness extends ContentContainerComponentHarness {\n /**\n * Data cells only. The lead selection and expand cells carry the same\n * `.wr-table__td` class — they hold the row's controls, not its data — so a cell\n * list that swept them in would no longer line up with the header list.\n */\n static hostSelector = '.wr-table__td:not(.wr-table__td--select):not(.wr-table__td--expand)';\n\n /** Build a predicate that narrows the query. */\n static with(options: WrTableCellHarnessFilters = {}): HarnessPredicate<WrTableCellHarness> {\n return new HarnessPredicate(WrTableCellHarness, options)\n .addOption('text', options.text, (harness, text) => HarnessPredicate.stringMatches(harness.getText(), text))\n .addOption('columnTitle', options.columnTitle, (harness, title) =>\n HarnessPredicate.stringMatches(harness.getColumnTitle(), title)\n );\n }\n\n /** The cell's text, with the template's indentation collapsed to single spaces. */\n async getText(): Promise<string> {\n return wrTableHarnessText(await (await this.host()).text());\n }\n\n /**\n * The title of the column this cell belongs to.\n *\n * Read from `data-label` — the attribute responsive card mode prints in front of\n * each value — because it is the only place a cell says which column it is in.\n * The column KEY is never in the DOM at all.\n */\n async getColumnTitle(): Promise<string | null> {\n return (await this.host()).getAttribute('data-label');\n }\n\n /**\n * Whether the cell opens an editor: its column has a `[wrTableEditCell]`\n * template and neither `editable: false` nor the `editable` predicate\n * refused it.\n */\n async isEditable(): Promise<boolean> {\n return (await this.host()).hasClass('wr-table__td--editable');\n }\n\n /** Whether the cell shows its editor right now. */\n async isEditing(): Promise<boolean> {\n return (await this.host()).hasClass('wr-table__td--editing');\n }\n\n /** Which edge the cell's column is frozen against, or `null` when it scrolls. */\n async getPin(): Promise<'left' | 'right' | null> {\n const host = await this.host();\n if (await host.hasClass('wr-table__td--pin-left')) return 'left';\n if (await host.hasClass('wr-table__td--pin-right')) return 'right';\n return null;\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport type { WrTableHeaderCellHarnessFilters } from './types';\n\n/**\n * Test harness for one column header of a `<wr-table>`.\n *\n * The selector deliberately skips the two LEAD headers — selection and expand —\n * which carry the same `.wr-table__th` class but hold a checkbox or nothing at\n * all. What is left lines up index-for-index with the data columns, so a header's\n * position is its column's position.\n *\n * Columns are addressed by their TITLE here and everywhere else in this harness\n * family, never by their `columns` key: the key never reaches the DOM. Only the\n * title does — in this header and in every cell's `data-label` — so it is the one\n * handle a spec and the rendered table share.\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrTableHeaderCellHarness extends ComponentHarness {\n static hostSelector = '.wr-table__th:not(.wr-table__th--select):not(.wr-table__th--expand)';\n\n /** Build a predicate that narrows the query. */\n static with(options: WrTableHeaderCellHarnessFilters = {}): HarnessPredicate<WrTableHeaderCellHarness> {\n return new HarnessPredicate(WrTableHeaderCellHarness, options)\n .addOption('text', options.text, (harness, text) => HarnessPredicate.stringMatches(harness.getText(), text))\n .addOption('sortable', options.sortable, async (harness, sortable) => (await harness.isSortable()) === sortable);\n }\n\n /** The column title, trimmed. The sort and filter controls are not part of it. */\n async getText(): Promise<string> {\n return (await this.locatorFor('.wr-table__title')()).text();\n }\n\n /**\n * The direction this column announces, exactly as `aria-sort` puts it — or\n * `null` when the column does not sort.\n *\n * `null` is not \"unsorted\": a sortable column with no direction announces\n * `'none'`, and only a plain column omits the attribute entirely. Claiming\n * sortability a column does not have is the bug that distinction prevents.\n *\n * Only the PRIMARY sort key announces a direction (ARIA puts `aria-sort` on one\n * header at a time), so a secondary key of a multi-column sort answers\n * `'none'` here while its arrow says otherwise. Read that one through\n * {@link getSortIndicator} and {@link getSortOrder}.\n */\n async getSortDirection(): Promise<'ascending' | 'descending' | 'none' | null> {\n const sort = await (await this.host()).getAttribute('aria-sort');\n return sort as 'ascending' | 'descending' | 'none' | null;\n }\n\n /**\n * The direction the header's indicator DRAWS — `'ascending'`, `'descending'`,\n * or `null` while the column is not sorted (or does not sort at all).\n *\n * The drawn half of the sort state, and the only half a secondary key has:\n * read from the indicator's own `--asc` / `--desc` modifier, so it answers for\n * every sorted column, where {@link getSortDirection} answers for the primary\n * one alone.\n */\n async getSortIndicator(): Promise<'ascending' | 'descending' | null> {\n const indicator = await this.locatorForOptional('wr-table-sort')();\n if (!indicator) return null;\n if (await indicator.hasClass('wr-table-sort--asc')) return 'ascending';\n if (await indicator.hasClass('wr-table-sort--desc')) return 'descending';\n return null;\n }\n\n /**\n * This column's 1-based place in the sort, or `null` when it does not sort by\n * anything right now.\n *\n * Read from the number drawn after the indicator while several columns sort.\n * A lone sorted column draws no number — a \"1\" would say nothing its arrow does\n * not — so it answers `1` from its indicator alone, and that is the one case\n * this method infers rather than reads.\n */\n async getSortOrder(): Promise<number | null> {\n const badge = await this.locatorForOptional('.wr-table__sort-order')();\n if (badge) return Number.parseInt(await badge.text(), 10);\n return (await this.getSortIndicator()) === null ? null : 1;\n }\n\n /** Whether the column offers sorting at all. */\n async isSortable(): Promise<boolean> {\n return (await this.getSortDirection()) !== null;\n }\n\n /**\n * Advance the sort one step — none → ascending → descending → none, the cycle a\n * click on the indicator drives.\n *\n * Throws on a column with no sort control rather than doing nothing: the quiet\n * version of this leaves a spec asserting an unchanged direction and passing.\n */\n async sort(): Promise<void> {\n const button = await this.locatorForOptional('.wr-table__sort-btn')();\n if (!button) {\n throw new Error(\n `WrTableHeaderCellHarness.sort(): the \"${await this.getText()}\" column has no sort control — ` +\n 'its column definition needs `sortable: true`.'\n );\n }\n await button.click();\n }\n\n /** Whether the column offers a filter dropdown (its definition carries a NON-EMPTY `filterItems`). */\n async isFilterable(): Promise<boolean> {\n return (await this.locatorForOptional('wr-table-filter')()) !== null;\n }\n\n /** Which edge the column is frozen against, or `null` when it scrolls with the rest. */\n async getPin(): Promise<'left' | 'right' | null> {\n const host = await this.host();\n if (await host.hasClass('wr-table__th--pin-left')) return 'left';\n if (await host.hasClass('wr-table__th--pin-right')) return 'right';\n return null;\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ContentContainerComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport type { WrTableCellHarnessFilters, WrTableRowHarnessFilters } from './types';\nimport { WrTableCellHarness } from './wr-table-cell-harness';\n\n/**\n * Test harness for one body row of a `<wr-table>` — flat, grouped or tree.\n *\n * Also a CONTENT CONTAINER, so `row.getHarness(WrButtonHarness…)` reaches the\n * consumer's own components anywhere in the row without leaving this row.\n *\n * @example\n * ```ts\n * const [ada] = await table.getRows({ cellText: 'Ada' });\n *\n * await ada.select();\n * await (await ada.getHarness(WrButtonHarness.with({ text: 'Edit' }))).click();\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrTableRowHarness extends ContentContainerComponentHarness {\n /**\n * `.wr-table__tr` is the DATA row and nothing else.\n *\n * Everything else a `<tbody>` can hold is a `<tr>` too: the group band\n * (`.wr-table__group-row`), its subtotal row, the detail row a `[wrTableExpand]`\n * template renders, the two virtual spacers, and the \"no data\" row. Querying\n * `tbody tr` would hand every one of those back as a row with no cells.\n */\n static hostSelector = '.wr-table__tr';\n\n /** Build a predicate that narrows the query. */\n static with(options: WrTableRowHarnessFilters = {}): HarnessPredicate<WrTableRowHarness> {\n return new HarnessPredicate(WrTableRowHarness, options)\n .addOption('cellText', options.cellText, async (harness, text) => {\n for (const cell of await harness.getCellTexts()) {\n if (await HarnessPredicate.stringMatches(cell, text)) return true;\n }\n return false;\n })\n .addOption('selected', options.selected, async (harness, selected) => (await harness.isSelected()) === selected)\n .addOption('expanded', options.expanded, async (harness, expanded) => (await harness.isExpanded()) === expanded)\n .addOption('level', options.level, async (harness, level) => (await harness.getLevel()) === level);\n }\n\n private readonly selectBox = this.locatorForOptional('.wr-table__td--select input.wr-checkbox__input');\n\n /**\n * The row's disclosure control, whichever of the two the table gave it: the lead\n * button of a `[wrTableExpand]` table, or the tree toggle inside the tree column.\n * The two never coexist — a tree row owns its own disclosure, so the component\n * refuses the pair.\n *\n * `button` in the tree selector is load-bearing. A leaf renders a `<span>` with\n * the same `.wr-table__tree-toggle` class purely to hold the indent, and taking\n * that for a control would report every leaf as expandable.\n */\n private readonly disclosure = this.locatorForOptional('.wr-table__expand-btn, button.wr-table__tree-toggle');\n\n /** The row's data cells, in DOM order. The lead control cells are not cells. */\n async getCells(filters: WrTableCellHarnessFilters = {}): Promise<WrTableCellHarness[]> {\n return this.locatorForAll(WrTableCellHarness.with(filters))();\n }\n\n /** The text of every data cell, in DOM order. */\n async getCellTexts(): Promise<string[]> {\n const cells = await this.getCells();\n return Promise.all(cells.map(cell => cell.getText()));\n }\n\n /**\n * Whether the row is selected.\n *\n * Read from the `--selected` modifier, which is what the row looks like and what\n * a consumer styles against. It also means a row is not \"selected\" while\n * `rowSelection` is off, however many keys the `selection` model holds — nothing\n * on screen says otherwise.\n */\n async isSelected(): Promise<boolean> {\n return (await this.host()).hasClass('wr-table__tr--selected');\n }\n\n /** Whether the row offers a selection checkbox at all. */\n async isSelectable(): Promise<boolean> {\n return (await this.selectBox()) !== null;\n }\n\n /** Flip the row's checkbox. Throws when the table has no selection column. */\n async toggleSelection(): Promise<void> {\n const box = await this.selectBox();\n if (!box) {\n throw new Error(\n 'WrTableRowHarness.toggleSelection(): this row has no checkbox — the table needs ' +\n \"`rowSelection` set to 'single' or 'multiple'.\"\n );\n }\n await box.click();\n }\n\n /** Select the row if it is not already selected. */\n async select(): Promise<void> {\n if (!(await this.isSelected())) await this.toggleSelection();\n }\n\n /** Deselect the row if it is selected. */\n async deselect(): Promise<void> {\n if (await this.isSelected()) await this.toggleSelection();\n }\n\n /**\n * Whether the row has something to open — a detail template's disclosure, or\n * children in a tree. A tree leaf answers `false`.\n */\n async isExpandable(): Promise<boolean> {\n return (await this.disclosure()) !== null;\n }\n\n /** Whether the row is open, from the disclosure's `aria-expanded`. */\n async isExpanded(): Promise<boolean> {\n const toggle = await this.disclosure();\n return toggle !== null && (await toggle.getAttribute('aria-expanded')) === 'true';\n }\n\n /** Open or close the row. Throws when it has nothing to open. */\n async toggleExpand(): Promise<void> {\n const toggle = await this.disclosure();\n if (!toggle) {\n throw new Error(\n 'WrTableRowHarness.toggleExpand(): this row has no disclosure control — a flat table needs a ' +\n '`[wrTableExpand]` template, and a tree row with no children is a leaf.'\n );\n }\n await toggle.click();\n }\n\n /**\n * The row's depth as the table announces it — 1-based `aria-level`, `null` in a\n * flat table, where depth is not a thing that exists.\n */\n async getLevel(): Promise<number | null> {\n return this.numericAttribute('aria-level');\n }\n\n /** The row's 1-based position among its siblings (`aria-posinset`), or `null` when flat. */\n async getPosInSet(): Promise<number | null> {\n return this.numericAttribute('aria-posinset');\n }\n\n /** How many rows are in the row's sibling set, itself included (`aria-setsize`); `null` when flat. */\n async getSetSize(): Promise<number | null> {\n return this.numericAttribute('aria-setsize');\n }\n\n /**\n * The row's 1-based index in the FULL dataset (`aria-rowindex`, header included),\n * or `null` when the table is not virtualized.\n *\n * Only a windowed table publishes it, and that is precisely when it matters: the\n * rows in the DOM are a slice, so their DOM order says nothing about where they\n * sit in the data.\n */\n async getRowIndex(): Promise<number | null> {\n return this.numericAttribute('aria-rowindex');\n }\n\n private async numericAttribute(name: string): Promise<number | null> {\n const value = await (await this.host()).getAttribute(name);\n return value === null ? null : Number.parseInt(value, 10);\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport {\n ComponentHarness,\n type HarnessLoader,\n HarnessPredicate,\n type TestElement,\n TestKey,\n} from '@angular/cdk/testing';\n\nimport type { WrTableHarnessFilters, WrTableHeaderCellHarnessFilters, WrTableRowHarnessFilters } from './types';\nimport type { WrTableCellHarness } from './wr-table-cell-harness';\nimport { wrTableHarnessText } from './wr-table-harness-text';\nimport { WrTableHeaderCellHarness } from './wr-table-header-cell-harness';\nimport { WrTableRowHarness } from './wr-table-row-harness';\n\n/**\n * Test harness for `<wr-table>` — the root of a small family, since a table is a\n * tree and not one control: {@link WrTableHeaderCellHarness} for a column header,\n * {@link WrTableRowHarness} for a body row, and `WrTableCellHarness` for a cell.\n *\n * Columns are addressed by their header TITLE, never by their `columns` key: the\n * key never reaches the DOM.\n *\n * What this harness deliberately does NOT do:\n * - open a column's filter dropdown. The panel is a `wr-dropdown` in the overlay\n * container, and driving it belongs to a dropdown harness rather than this one;\n * {@link WrTableHeaderCellHarness.isFilterable} reports that a column offers one.\n * - scroll a virtualized body. See {@link getRows}.\n *\n * @example\n * ```ts\n * const table = await loader.getHarness(WrTableHarness);\n *\n * expect(await table.getHeaderTexts()).toEqual(['Name', 'Role']);\n * await table.sortByColumn('Name');\n * expect(await table.getSortDirection('Name')).toBe('ascending');\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrTableHarness extends ComponentHarness {\n static hostSelector = 'wr-table';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrTableHarnessFilters = {}): HarnessPredicate<WrTableHarness> {\n return new HarnessPredicate(WrTableHarness, options)\n .addOption('columnTitle', options.columnTitle, async (harness, title) => {\n for (const header of await harness.getHeaderTexts()) {\n if (await HarnessPredicate.stringMatches(header, title)) return true;\n }\n return false;\n })\n .addOption('tree', options.tree, async (harness, tree) => (await harness.isTree()) === tree);\n }\n\n private readonly tableEl = this.locatorFor('table.wr-table__table');\n private readonly selectAllBox = this.locatorForOptional('.wr-table__th--select input.wr-checkbox__input');\n private readonly chooserButton = this.locatorForOptional('.wr-table__columns-btn');\n\n /**\n * The role the table announces.\n *\n * A flat table sets no `role` at all, so it announces the native `table` role.\n * A `[wrTableEditCell]` template makes it a `grid`, whose data cells take focus\n * and the arrow keys. `childrenKey` turns it into a `treegrid`, and that role is\n * the only place the hierarchy exists for a screen-reader user: the indent is\n * decoration.\n */\n async getRole(): Promise<'treegrid' | 'grid' | 'table'> {\n const role = await (await this.tableEl()).getAttribute('role');\n return role === 'treegrid' || role === 'grid' ? role : 'table';\n }\n\n /** Whether the rows are a hierarchy rather than a flat list. */\n async isTree(): Promise<boolean> {\n return (await this.getRole()) === 'treegrid';\n }\n\n /**\n * Whether the body is WINDOWED right now.\n *\n * Read from the host modifier rather than from the input, and that is the point:\n * `virtualScroll` is a request, not a promise. The table falls back to rendering\n * every row whenever the layout stops being uniform — grouping, a detail\n * template, responsive card mode, a visible pager, a tree — so this answers what\n * actually happened.\n */\n async isVirtual(): Promise<boolean> {\n return (await this.host()).hasClass('wr-table--virtual');\n }\n\n /** Whether the table is loading, as the overlay or as the bar: the host's `aria-busy`. */\n async isLoading(): Promise<boolean> {\n return (await (await this.host()).getAttribute('aria-busy')) === 'true';\n }\n\n /** Which form `loading` takes: the overlay with the spinner, the bar, or `null` while idle. */\n async getLoadingForm(): Promise<'overlay' | 'bar' | null> {\n if ((await this.locatorForOptional('.wr-table__loading')()) !== null) return 'overlay';\n return (await this.locatorForOptional('.wr-table__loading-bar')()) !== null ? 'bar' : null;\n }\n\n /** The column headers, in render order — which `columnOrder` and a drag can change. */\n async getHeaderCells(filters: WrTableHeaderCellHarnessFilters = {}): Promise<WrTableHeaderCellHarness[]> {\n return this.locatorForAll(WrTableHeaderCellHarness.with(filters))();\n }\n\n /**\n * The column titles, in render order.\n *\n * The selection and expand headers are not columns and are not here, so this\n * list stays as wide as every row from {@link getCellTexts}.\n */\n async getHeaderTexts(): Promise<string[]> {\n const headers = await this.getHeaderCells();\n return Promise.all(headers.map(header => header.getText()));\n }\n\n /**\n * The direction a column announces via `aria-sort`, or `null` when it does not\n * sort. Only the primary key of a multi-column sort announces one; see\n * {@link getSortIndicator} for the rest.\n */\n async getSortDirection(columnTitle: string): Promise<'ascending' | 'descending' | 'none' | null> {\n return (await this.headerCellFor(columnTitle)).getSortDirection();\n }\n\n /**\n * The direction a column's indicator draws, for every sorted column — a\n * secondary key included — or `null` when the column is not sorted.\n */\n async getSortIndicator(columnTitle: string): Promise<'ascending' | 'descending' | null> {\n return (await this.headerCellFor(columnTitle)).getSortIndicator();\n }\n\n /** A column's 1-based place in the sort (`1` is the primary key), or `null` when it is not sorted. */\n async getSortOrder(columnTitle: string): Promise<number | null> {\n return (await this.headerCellFor(columnTitle)).getSortOrder();\n }\n\n /**\n * Advance a column's sort one step — none → ascending → descending → none.\n *\n * Sorting is the host's job: `<wr-table>` publishes the intent through its `sort`\n * model and never reorders `items` itself, so a spec that expects the rows to\n * move has to sort the data the way the app does.\n */\n async sortByColumn(columnTitle: string): Promise<void> {\n await (await this.headerCellFor(columnTitle)).sort();\n }\n\n /**\n * The body rows currently rendered, in DOM order.\n *\n * \"Currently rendered\" is the whole caveat of a virtualized table: while\n * {@link isVirtual} is true the `<tbody>` holds only the window around the scroll\n * offset, padded by a spacer row at each end that still has rows to stand in for\n * (one of them, at the top or the bottom of the list), so this returns the\n * WINDOW — not the dataset.\n * {@link getAriaRowCount} is the total the table announces and\n * {@link WrTableRowHarness.getRowIndex} says where a row sits in it. Nothing here\n * scrolls that window on purpose: the viewport has no layout in a unit test, so a\n * `scrollTo` would silently do nothing. Reach for `WrTable.scrollToRow()` in a\n * real browser, or narrow the data instead.\n *\n * Group bands, per-group subtotals, detail rows and the \"no data\" row are not\n * rows and never appear here.\n */\n async getRows(filters: WrTableRowHarnessFilters = {}): Promise<WrTableRowHarness[]> {\n return this.locatorForAll(WrTableRowHarness.with(filters))();\n }\n\n /** The whole body as a matrix of cell text — one array per row, one entry per column. */\n async getCellTexts(): Promise<string[][]> {\n const rows = await this.getRows();\n return Promise.all(rows.map(row => row.getCellTexts()));\n }\n\n /**\n * The `<tfoot>` summary cells, one per column and `''` for a column with no\n * `summary`. Empty when no column defines one.\n *\n * The lead cells are dropped so this lines up with {@link getHeaderTexts}. A\n * per-group subtotal row is NOT here — it lives in the body, under its band.\n */\n async getFooterTexts(): Promise<string[]> {\n const cells = await this.locatorForAll('tfoot .wr-table__foot-cell:not(.wr-table__foot-cell--lead)')();\n return Promise.all(cells.map(async cell => wrTableHarnessText(await cell.text())));\n }\n\n /** The \"no data\" message, or `null` while the table has rows to show. */\n async getEmptyText(): Promise<string | null> {\n const empty = await this.locatorForOptional('.wr-table__empty')();\n return empty ? wrTableHarnessText(await empty.text()) : null;\n }\n\n /**\n * The row count the table announces (`aria-rowcount` — header and summary row\n * included), or `null` when it is not virtualized and every row is in the DOM.\n */\n async getAriaRowCount(): Promise<number | null> {\n const count = await (await this.tableEl()).getAttribute('aria-rowcount');\n return count === null ? null : Number.parseInt(count, 10);\n }\n\n /** Whether the header offers a select-all box — only `rowSelection=\"multiple\"` does. */\n async hasSelectAll(): Promise<boolean> {\n return (await this.selectAllBox()) !== null;\n }\n\n /** Whether every row in the select-all scope is selected — see {@link toggleSelectAll}. */\n async isAllSelected(): Promise<boolean> {\n return (await this.selectAllHost()).getProperty<boolean>('checked');\n }\n\n /**\n * Whether some rows are selected and others are not — the box's third state.\n *\n * `indeterminate` is a DOM PROPERTY, not an attribute: reading the attribute\n * reports `null` for a box that is visibly dashed.\n */\n async isPartiallySelected(): Promise<boolean> {\n return (await this.selectAllHost()).getProperty<boolean>('indeterminate');\n }\n\n /**\n * Click the select-all box, once.\n *\n * Under `selectAllScope=\"all\"` its scope is every page of `items`. Otherwise\n * its scope is the rows the table RENDERS — the current page, and a collapsed\n * group's rows are out because collapsing drops them from that list. A\n * virtualized table's off-window rows are IN, though: the window is a slice\n * taken after the list is built, so one click selects the whole dataset and not\n * just what is in the DOM. And the third state is worth knowing about before\n * asserting: while the selection is partial the box reads unchecked, so one\n * click selects everything rather than clearing it.\n */\n async toggleSelectAll(): Promise<void> {\n await (await this.selectAllHost()).click();\n }\n\n /**\n * The text of each open detail row, in row order.\n *\n * A detail row is a full-width `<tr>` NEXT TO the row it belongs to, not inside\n * it — which is why it is neither one of {@link getRows} nor one of a row's\n * cells.\n */\n async getDetailTexts(): Promise<string[]> {\n const details = await this.locatorForAll('.wr-table__detail')();\n return Promise.all(details.map(async detail => wrTableHarnessText(await detail.text())));\n }\n\n /**\n * The group band labels, in order.\n *\n * Empty when `groupBy` is off — and also when a `[wrTableGroupHeader]` template\n * replaced the built-in band, since the label is then the consumer's own markup.\n * Reach for that through {@link getRows}' siblings or your own component's\n * harness.\n */\n async getGroupLabels(): Promise<string[]> {\n const labels = await this.locatorForAll('.wr-table__group-label')();\n return Promise.all(labels.map(label => label.text()));\n }\n\n /** Whether the band with this label is collapsed. */\n async isGroupCollapsed(label: string): Promise<boolean> {\n const toggle = await this.groupToggleFor(label);\n return (await toggle.getAttribute('aria-expanded')) === 'false';\n }\n\n /** Collapse or expand the band with this label. */\n async toggleGroup(label: string): Promise<void> {\n await (await this.groupToggleFor(label)).click();\n }\n\n /** Whether the selection bar is over the header: a `[wrTableSelectionBar]` template and a selection. */\n async hasSelectionBar(): Promise<boolean> {\n return (await this.locatorForOptional('.wr-table__selection-bar')()) !== null;\n }\n\n /** The selection bar's count as drawn (\"3 selected\"), or `null` while the bar is away. */\n async getSelectionBarText(): Promise<string | null> {\n const count = await this.locatorForOptional('.wr-table__selection-count')();\n return count ? wrTableHarnessText(await count.text()) : null;\n }\n\n /** Click the selection bar's clear button, which empties the selection and takes the bar away. */\n async clearSelection(): Promise<void> {\n await (await this.selectionBarPart('.wr-table__selection-clear')).click();\n }\n\n /**\n * A loader over the `[wrTableSelectionBar]` template's own content, for the\n * harnesses of the actions it holds.\n */\n async getSelectionBarLoader(): Promise<HarnessLoader> {\n await this.selectionBarPart('.wr-table__selection-actions');\n return this.locatorFactory.harnessLoaderFor('.wr-table__selection-actions');\n }\n\n /** A part of the selection bar, or a failure naming both reasons the bar is away. */\n private async selectionBarPart(selector: string): Promise<TestElement> {\n const part = await this.locatorForOptional(selector)();\n if (!part) {\n throw new Error(\n 'WrTableHarness: this table shows no selection bar — it has no `[wrTableSelectionBar]` ' +\n 'template, or no row is selected.'\n );\n }\n return part;\n }\n\n /**\n * Start editing a cell the way the keyboard does: focus it and press Enter.\n * `row` is the 0-based position among {@link getRows}, `columnTitle` the\n * column's header. Hands back the cell, whose loader reaches the editor's own\n * harnesses: `cell.getHarness(WrInputNumberHarness)`.\n *\n * Throws when the cell does not open an editor: it has no `[wrTableEditCell]`\n * template, its column says `editable: false`, or the `editable` predicate\n * refused the row.\n */\n async editCell(row: number, columnTitle: string): Promise<WrTableCellHarness> {\n const rows = await this.getRows();\n if (!rows[row]) {\n throw new Error(`WrTableHarness: no row ${row} — the table renders ${rows.length} row(s).`);\n }\n const [cell] = await rows[row].getCells({ columnTitle });\n if (!cell) {\n throw new Error(`WrTableHarness: row ${row} has no cell under \"${columnTitle}\".`);\n }\n await (await cell.host()).sendKeys(TestKey.ENTER);\n if (!(await cell.isEditing())) {\n throw new Error(\n `WrTableHarness: the cell under \"${columnTitle}\" in row ${row} is not editable — its column has no ` +\n '`[wrTableEditCell]` template or says `editable: false`, or the `editable` predicate refused the row.'\n );\n }\n return cell;\n }\n\n /** Whether a cell is being edited. One cell edits at a time. */\n async isEditing(): Promise<boolean> {\n return (await this.locatorForOptional('.wr-table__td--editing')()) !== null;\n }\n\n /**\n * Commit the edit in flight the way Enter does: the table emits `cellEdit`\n * with the value the editor last kept, when it differs from the cell's.\n * Focus goes to the cell first, so a control that publishes on blur has\n * published.\n */\n async commitEdit(): Promise<void> {\n await (await this.editingCell()).sendKeys(TestKey.ENTER);\n }\n\n /** Drop the edit in flight the way Escape does. */\n async cancelEdit(): Promise<void> {\n await (await this.editingCell()).sendKeys(TestKey.ESCAPE);\n }\n\n private async editingCell(): Promise<TestElement> {\n const cell = await this.locatorForOptional('.wr-table__td--editing')();\n if (!cell) throw new Error('WrTableHarness: no cell is being edited — call `editCell()` first.');\n return cell;\n }\n\n /** Whether the table shows the column chooser's button (`columnChooser`). */\n async hasColumnChooser(): Promise<boolean> {\n return (await this.chooserButton()) !== null;\n }\n\n /**\n * The titles of the hidden columns, in column order, read from the column\n * chooser: a hidden column is nowhere else in the DOM. Opens the chooser and\n * leaves it open.\n */\n async getHiddenColumns(): Promise<string[]> {\n const entries = await this.chooserEntries();\n const hidden: string[] = [];\n for (const entry of entries) {\n if (!(await entry.box.getProperty<boolean>('checked'))) hidden.push(entry.title);\n }\n return hidden;\n }\n\n /** Whether the chooser refuses to hide a column: `hideable: false`, or the last one shown. */\n async isColumnLocked(columnTitle: string): Promise<boolean> {\n return (await this.chooserEntryFor(columnTitle)).box.getProperty<boolean>('disabled');\n }\n\n /** Hide a shown column or show a hidden one through the column chooser, which stays open. */\n async toggleColumn(columnTitle: string): Promise<void> {\n const entry = await this.chooserEntryFor(columnTitle);\n if (await entry.box.getProperty<boolean>('disabled')) {\n throw new Error(\n `WrTableHarness: the column \"${columnTitle}\" cannot be toggled — it is \\`hideable: false\\`, ` +\n 'or it is the last column shown.'\n );\n }\n await entry.box.click();\n }\n\n /**\n * The chooser's rows, opening it first. The panel is a popover in the overlay\n * container, found through the id its trigger publishes while open.\n */\n private async chooserEntries(): Promise<{ title: string; box: TestElement }[]> {\n const button = await this.chooserButton();\n if (!button) {\n throw new Error('WrTableHarness: this table has no column chooser — set `columnChooser`.');\n }\n if ((await button.getAttribute('aria-expanded')) !== 'true') await button.click();\n const panelId = await button.getAttribute('aria-controls');\n const root = this.documentRootLocatorFactory();\n const items = await root.locatorForAll(`#${panelId} .wr-table__columns-item`)();\n const boxes = await root.locatorForAll(`#${panelId} .wr-table__columns-item input.wr-checkbox__input`)();\n return Promise.all(items.map(async (item, i) => ({ title: wrTableHarnessText(await item.text()), box: boxes[i] })));\n }\n\n private async chooserEntryFor(columnTitle: string): Promise<{ title: string; box: TestElement }> {\n const entries = await this.chooserEntries();\n const entry = entries.find(candidate => candidate.title === columnTitle);\n if (!entry) {\n throw new Error(\n `WrTableHarness: the column chooser lists no \"${columnTitle}\" — it lists ` +\n `[${entries.map(candidate => candidate.title).join(', ')}].`\n );\n }\n return entry;\n }\n\n /** The header for a column title, or a failure that says which titles do exist. */\n private async headerCellFor(columnTitle: string): Promise<WrTableHeaderCellHarness> {\n const [header] = await this.getHeaderCells({ text: columnTitle });\n if (!header) {\n const titles = await this.getHeaderTexts();\n throw new Error(\n `WrTableHarness: no column headed \"${columnTitle}\". Columns are addressed by their title, ` +\n `not by their key — this table shows [${titles.join(', ')}].`\n );\n }\n return header;\n }\n\n /**\n * The collapse toggle of one band.\n *\n * Paired by index rather than by containment: both lists are emitted once per\n * band by the same loop, in the same order, and a `TestElement` cannot be\n * queried into.\n */\n private async groupToggleFor(label: string): Promise<TestElement> {\n const index = (await this.getGroupLabels()).indexOf(label);\n if (index < 0) {\n throw new Error(\n `WrTableHarness: no group band labelled \"${label}\" — is \\`groupBy\\` set, and is the band the ` +\n 'built-in one rather than a `[wrTableGroupHeader]` template?'\n );\n }\n return (await this.locatorForAll('.wr-table__group-toggle')())[index];\n }\n\n /** The select-all input, or a failure naming both reasons it is missing. */\n private async selectAllHost(): Promise<TestElement> {\n const box = await this.selectAllBox();\n if (!box) {\n throw new Error(\n 'WrTableHarness: this table has no select-all box — `rowSelection` is off, or it is ' +\n \"'single', which has no select-all by design.\"\n );\n }\n return box;\n }\n}\n"],"mappings":";;;;;;;AAoBA,SAAgB,mBAAmB,MAAY;CAC7C,OAAO,KAAK,QAAQ,QAAQ,GAAG,CAAC,CAAC,KAAI;AACvC;;;;;;;ACQA,IAAa,qBAAb,MAAa,2BAA2B,iCAAgC;CAMtE,OAAO,eAAe;CAGtB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