ngwr 10.2.1 → 11.0.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 (425) hide show
  1. package/README.md +39 -19
  2. package/anchor/styles/_index.scss +4 -4
  3. package/back-top/styles/_index.scss +6 -1
  4. package/blur-text/styles/_index.scss +13 -0
  5. package/button/styles/_index.scss +11 -6
  6. package/carousel/styles/_index.scss +13 -2
  7. package/cascader/styles/_index.scss +2 -2
  8. package/circular-text/styles/_index.scss +2 -0
  9. package/collapse/styles/_index.scss +1 -1
  10. package/color-picker/styles/_index.scss +6 -1
  11. package/compare/styles/_index.scss +1 -2
  12. package/context-menu/styles/_index.scss +6 -1
  13. package/descriptions/styles/_index.scss +2 -2
  14. package/dialog/styles/_index.scss +7 -0
  15. package/drawer/styles/_index.scss +20 -1
  16. package/dropdown/styles/_index.scss +19 -5
  17. package/empty/styles/_index.scss +10 -0
  18. package/fesm2022/ngwr-action-sheet.mjs +13 -3
  19. package/fesm2022/ngwr-action-sheet.mjs.map +1 -1
  20. package/fesm2022/ngwr-affix.mjs +40 -13
  21. package/fesm2022/ngwr-affix.mjs.map +1 -1
  22. package/fesm2022/ngwr-anchor.mjs +18 -6
  23. package/fesm2022/ngwr-anchor.mjs.map +1 -1
  24. package/fesm2022/ngwr-aurora.mjs +2 -2
  25. package/fesm2022/ngwr-aurora.mjs.map +1 -1
  26. package/fesm2022/ngwr-avatar.mjs +31 -7
  27. package/fesm2022/ngwr-avatar.mjs.map +1 -1
  28. package/fesm2022/ngwr-back-top.mjs +6 -2
  29. package/fesm2022/ngwr-back-top.mjs.map +1 -1
  30. package/fesm2022/ngwr-badge.mjs +1 -1
  31. package/fesm2022/ngwr-badge.mjs.map +1 -1
  32. package/fesm2022/ngwr-bar-chart.mjs +30 -9
  33. package/fesm2022/ngwr-bar-chart.mjs.map +1 -1
  34. package/fesm2022/ngwr-blur-text.mjs +2 -2
  35. package/fesm2022/ngwr-blur-text.mjs.map +1 -1
  36. package/fesm2022/ngwr-border-glow.mjs +2 -2
  37. package/fesm2022/ngwr-border-glow.mjs.map +1 -1
  38. package/fesm2022/ngwr-breadcrumbs.mjs +2 -2
  39. package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
  40. package/fesm2022/ngwr-burger.mjs +9 -4
  41. package/fesm2022/ngwr-burger.mjs.map +1 -1
  42. package/fesm2022/ngwr-button-testing.mjs +96 -0
  43. package/fesm2022/ngwr-button-testing.mjs.map +1 -0
  44. package/fesm2022/ngwr-button.mjs +31 -14
  45. package/fesm2022/ngwr-button.mjs.map +1 -1
  46. package/fesm2022/ngwr-calendar-heatmap.mjs +40 -8
  47. package/fesm2022/ngwr-calendar-heatmap.mjs.map +1 -1
  48. package/fesm2022/ngwr-calendar.mjs +20 -1
  49. package/fesm2022/ngwr-calendar.mjs.map +1 -1
  50. package/fesm2022/ngwr-card.mjs +2 -2
  51. package/fesm2022/ngwr-card.mjs.map +1 -1
  52. package/fesm2022/ngwr-carousel-testing.mjs +377 -0
  53. package/fesm2022/ngwr-carousel-testing.mjs.map +1 -0
  54. package/fesm2022/ngwr-carousel.mjs +67 -13
  55. package/fesm2022/ngwr-carousel.mjs.map +1 -1
  56. package/fesm2022/ngwr-cascader-testing.mjs +534 -0
  57. package/fesm2022/ngwr-cascader-testing.mjs.map +1 -0
  58. package/fesm2022/ngwr-cascader.mjs +2 -2
  59. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  60. package/fesm2022/ngwr-checkbox-testing.mjs +90 -0
  61. package/fesm2022/ngwr-checkbox-testing.mjs.map +1 -0
  62. package/fesm2022/ngwr-checkbox.mjs +9 -3
  63. package/fesm2022/ngwr-checkbox.mjs.map +1 -1
  64. package/fesm2022/ngwr-circular-text.mjs +2 -2
  65. package/fesm2022/ngwr-circular-text.mjs.map +1 -1
  66. package/fesm2022/ngwr-click-spark.mjs +2 -2
  67. package/fesm2022/ngwr-click-spark.mjs.map +1 -1
  68. package/fesm2022/ngwr-collapse-testing.mjs +368 -0
  69. package/fesm2022/ngwr-collapse-testing.mjs.map +1 -0
  70. package/fesm2022/ngwr-color-picker.mjs +134 -14
  71. package/fesm2022/ngwr-color-picker.mjs.map +1 -1
  72. package/fesm2022/ngwr-command-palette-testing.mjs +589 -0
  73. package/fesm2022/ngwr-command-palette-testing.mjs.map +1 -0
  74. package/fesm2022/ngwr-command-palette.mjs +58 -8
  75. package/fesm2022/ngwr-command-palette.mjs.map +1 -1
  76. package/fesm2022/ngwr-compare.mjs +103 -13
  77. package/fesm2022/ngwr-compare.mjs.map +1 -1
  78. package/fesm2022/ngwr-config.mjs +106 -0
  79. package/fesm2022/ngwr-config.mjs.map +1 -0
  80. package/fesm2022/ngwr-context-menu-testing.mjs +631 -0
  81. package/fesm2022/ngwr-context-menu-testing.mjs.map +1 -0
  82. package/fesm2022/ngwr-context-menu.mjs +94 -8
  83. package/fesm2022/ngwr-context-menu.mjs.map +1 -1
  84. package/fesm2022/ngwr-cookie.mjs +5 -1
  85. package/fesm2022/ngwr-cookie.mjs.map +1 -1
  86. package/fesm2022/ngwr-counter.mjs +11 -3
  87. package/fesm2022/ngwr-counter.mjs.map +1 -1
  88. package/fesm2022/ngwr-date-adapter-luxon.mjs +52 -4
  89. package/fesm2022/ngwr-date-adapter-luxon.mjs.map +1 -1
  90. package/fesm2022/ngwr-date-adapter.mjs +54 -8
  91. package/fesm2022/ngwr-date-adapter.mjs.map +1 -1
  92. package/fesm2022/ngwr-date-picker-testing.mjs +766 -0
  93. package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -0
  94. package/fesm2022/ngwr-date-picker.mjs +73 -3
  95. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  96. package/fesm2022/ngwr-decrypt-text.mjs +27 -9
  97. package/fesm2022/ngwr-decrypt-text.mjs.map +1 -1
  98. package/fesm2022/ngwr-dialog-testing.mjs +89 -0
  99. package/fesm2022/ngwr-dialog-testing.mjs.map +1 -0
  100. package/fesm2022/ngwr-directives.mjs +36 -12
  101. package/fesm2022/ngwr-directives.mjs.map +1 -1
  102. package/fesm2022/ngwr-donut-chart.mjs +22 -5
  103. package/fesm2022/ngwr-donut-chart.mjs.map +1 -1
  104. package/fesm2022/ngwr-drag-drop.mjs +2 -2
  105. package/fesm2022/ngwr-drag-drop.mjs.map +1 -1
  106. package/fesm2022/ngwr-drawer-testing.mjs +250 -0
  107. package/fesm2022/ngwr-drawer-testing.mjs.map +1 -0
  108. package/fesm2022/ngwr-dropdown-testing.mjs +291 -0
  109. package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -0
  110. package/fesm2022/ngwr-dropdown.mjs +10 -2
  111. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  112. package/fesm2022/ngwr-empty.mjs +24 -7
  113. package/fesm2022/ngwr-empty.mjs.map +1 -1
  114. package/fesm2022/ngwr-event-calendar.mjs +57 -10
  115. package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
  116. package/fesm2022/ngwr-falling-text.mjs +2 -2
  117. package/fesm2022/ngwr-falling-text.mjs.map +1 -1
  118. package/fesm2022/ngwr-file-upload-testing.mjs +332 -0
  119. package/fesm2022/ngwr-file-upload-testing.mjs.map +1 -0
  120. package/fesm2022/ngwr-form-testing.mjs +451 -0
  121. package/fesm2022/ngwr-form-testing.mjs.map +1 -0
  122. package/fesm2022/ngwr-form.mjs +19 -3
  123. package/fesm2022/ngwr-form.mjs.map +1 -1
  124. package/fesm2022/ngwr-fuzzy-text.mjs +9 -2
  125. package/fesm2022/ngwr-fuzzy-text.mjs.map +1 -1
  126. package/fesm2022/ngwr-gauge.mjs +19 -5
  127. package/fesm2022/ngwr-gauge.mjs.map +1 -1
  128. package/fesm2022/ngwr-glitch-text.mjs +2 -2
  129. package/fesm2022/ngwr-glitch-text.mjs.map +1 -1
  130. package/fesm2022/ngwr-gradient-text.mjs +2 -2
  131. package/fesm2022/ngwr-gradient-text.mjs.map +1 -1
  132. package/fesm2022/ngwr-i18n-en.mjs +50 -0
  133. package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
  134. package/fesm2022/ngwr-i18n-ru.mjs +48 -0
  135. package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
  136. package/fesm2022/ngwr-image-cropper.mjs +23 -0
  137. package/fesm2022/ngwr-image-cropper.mjs.map +1 -1
  138. package/fesm2022/ngwr-input-number-testing.mjs +306 -0
  139. package/fesm2022/ngwr-input-number-testing.mjs.map +1 -0
  140. package/fesm2022/ngwr-input-number.mjs +35 -3
  141. package/fesm2022/ngwr-input-number.mjs.map +1 -1
  142. package/fesm2022/ngwr-input-otp-testing.mjs +419 -0
  143. package/fesm2022/ngwr-input-otp-testing.mjs.map +1 -0
  144. package/fesm2022/ngwr-input-otp.mjs +36 -5
  145. package/fesm2022/ngwr-input-otp.mjs.map +1 -1
  146. package/fesm2022/ngwr-input-testing.mjs +102 -0
  147. package/fesm2022/ngwr-input-testing.mjs.map +1 -0
  148. package/fesm2022/ngwr-input.mjs +47 -10
  149. package/fesm2022/ngwr-input.mjs.map +1 -1
  150. package/fesm2022/ngwr-knob.mjs +44 -8
  151. package/fesm2022/ngwr-knob.mjs.map +1 -1
  152. package/fesm2022/ngwr-layout.mjs +21 -5
  153. package/fesm2022/ngwr-layout.mjs.map +1 -1
  154. package/fesm2022/ngwr-lightbox.mjs +33 -6
  155. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  156. package/fesm2022/ngwr-line-chart.mjs +17 -4
  157. package/fesm2022/ngwr-line-chart.mjs.map +1 -1
  158. package/fesm2022/ngwr-list.mjs +2 -2
  159. package/fesm2022/ngwr-list.mjs.map +1 -1
  160. package/fesm2022/ngwr-loading-bar.mjs +2 -2
  161. package/fesm2022/ngwr-loading-bar.mjs.map +1 -1
  162. package/fesm2022/ngwr-markdown-testing.mjs +516 -0
  163. package/fesm2022/ngwr-markdown-testing.mjs.map +1 -0
  164. package/fesm2022/ngwr-markdown.mjs +1492 -0
  165. package/fesm2022/ngwr-markdown.mjs.map +1 -0
  166. package/fesm2022/ngwr-marquee.mjs +17 -6
  167. package/fesm2022/ngwr-marquee.mjs.map +1 -1
  168. package/fesm2022/ngwr-mention-testing.mjs +513 -0
  169. package/fesm2022/ngwr-mention-testing.mjs.map +1 -0
  170. package/fesm2022/ngwr-mention.mjs +10 -1
  171. package/fesm2022/ngwr-mention.mjs.map +1 -1
  172. package/fesm2022/ngwr-meta.mjs +22 -7
  173. package/fesm2022/ngwr-meta.mjs.map +1 -1
  174. package/fesm2022/ngwr-meter-group.mjs +19 -5
  175. package/fesm2022/ngwr-meter-group.mjs.map +1 -1
  176. package/fesm2022/ngwr-overlay.mjs +41 -1
  177. package/fesm2022/ngwr-overlay.mjs.map +1 -1
  178. package/fesm2022/ngwr-pagination-testing.mjs +389 -0
  179. package/fesm2022/ngwr-pagination-testing.mjs.map +1 -0
  180. package/fesm2022/ngwr-pagination.mjs +14 -2
  181. package/fesm2022/ngwr-pagination.mjs.map +1 -1
  182. package/fesm2022/ngwr-popconfirm-testing.mjs +309 -0
  183. package/fesm2022/ngwr-popconfirm-testing.mjs.map +1 -0
  184. package/fesm2022/ngwr-popconfirm.mjs +95 -17
  185. package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
  186. package/fesm2022/ngwr-popover-testing.mjs +316 -0
  187. package/fesm2022/ngwr-popover-testing.mjs.map +1 -0
  188. package/fesm2022/ngwr-popover.mjs +21 -3
  189. package/fesm2022/ngwr-popover.mjs.map +1 -1
  190. package/fesm2022/ngwr-pull-to-refresh.mjs +17 -2
  191. package/fesm2022/ngwr-pull-to-refresh.mjs.map +1 -1
  192. package/fesm2022/ngwr-qr.mjs +13 -3
  193. package/fesm2022/ngwr-qr.mjs.map +1 -1
  194. package/fesm2022/ngwr-radio-testing.mjs +392 -0
  195. package/fesm2022/ngwr-radio-testing.mjs.map +1 -0
  196. package/fesm2022/ngwr-radio.mjs +10 -3
  197. package/fesm2022/ngwr-radio.mjs.map +1 -1
  198. package/fesm2022/ngwr-rating-testing.mjs +384 -0
  199. package/fesm2022/ngwr-rating-testing.mjs.map +1 -0
  200. package/fesm2022/ngwr-rating.mjs +37 -2
  201. package/fesm2022/ngwr-rating.mjs.map +1 -1
  202. package/fesm2022/ngwr-segmented-testing.mjs +512 -0
  203. package/fesm2022/ngwr-segmented-testing.mjs.map +1 -0
  204. package/fesm2022/ngwr-select-testing.mjs +268 -0
  205. package/fesm2022/ngwr-select-testing.mjs.map +1 -0
  206. package/fesm2022/ngwr-select.mjs +87 -16
  207. package/fesm2022/ngwr-select.mjs.map +1 -1
  208. package/fesm2022/ngwr-shiny-text.mjs +2 -2
  209. package/fesm2022/ngwr-shiny-text.mjs.map +1 -1
  210. package/fesm2022/ngwr-sidebar.mjs +65 -12
  211. package/fesm2022/ngwr-sidebar.mjs.map +1 -1
  212. package/fesm2022/ngwr-slider-testing.mjs +478 -0
  213. package/fesm2022/ngwr-slider-testing.mjs.map +1 -0
  214. package/fesm2022/ngwr-slider.mjs +57 -13
  215. package/fesm2022/ngwr-slider.mjs.map +1 -1
  216. package/fesm2022/ngwr-sparkline.mjs +26 -6
  217. package/fesm2022/ngwr-sparkline.mjs.map +1 -1
  218. package/fesm2022/ngwr-speed-dial.mjs +37 -4
  219. package/fesm2022/ngwr-speed-dial.mjs.map +1 -1
  220. package/fesm2022/ngwr-spinner.mjs +12 -3
  221. package/fesm2022/ngwr-spinner.mjs.map +1 -1
  222. package/fesm2022/ngwr-splash-cursor.mjs +2 -2
  223. package/fesm2022/ngwr-splash-cursor.mjs.map +1 -1
  224. package/fesm2022/ngwr-split-text.mjs +2 -2
  225. package/fesm2022/ngwr-split-text.mjs.map +1 -1
  226. package/fesm2022/ngwr-splitter.mjs +70 -9
  227. package/fesm2022/ngwr-splitter.mjs.map +1 -1
  228. package/fesm2022/ngwr-spotlight-card.mjs +2 -2
  229. package/fesm2022/ngwr-spotlight-card.mjs.map +1 -1
  230. package/fesm2022/ngwr-star-border.mjs +2 -2
  231. package/fesm2022/ngwr-star-border.mjs.map +1 -1
  232. package/fesm2022/ngwr-statistic.mjs +24 -7
  233. package/fesm2022/ngwr-statistic.mjs.map +1 -1
  234. package/fesm2022/ngwr-stepper-testing.mjs +477 -0
  235. package/fesm2022/ngwr-stepper-testing.mjs.map +1 -0
  236. package/fesm2022/ngwr-switch-testing.mjs +77 -0
  237. package/fesm2022/ngwr-switch-testing.mjs.map +1 -0
  238. package/fesm2022/ngwr-switch.mjs +9 -3
  239. package/fesm2022/ngwr-switch.mjs.map +1 -1
  240. package/fesm2022/ngwr-table-testing.mjs +580 -0
  241. package/fesm2022/ngwr-table-testing.mjs.map +1 -0
  242. package/fesm2022/ngwr-table.mjs +87 -14
  243. package/fesm2022/ngwr-table.mjs.map +1 -1
  244. package/fesm2022/ngwr-tabs-testing.mjs +617 -0
  245. package/fesm2022/ngwr-tabs-testing.mjs.map +1 -0
  246. package/fesm2022/ngwr-tabs.mjs +38 -6
  247. package/fesm2022/ngwr-tabs.mjs.map +1 -1
  248. package/fesm2022/ngwr-textarea-testing.mjs +238 -0
  249. package/fesm2022/ngwr-textarea-testing.mjs.map +1 -0
  250. package/fesm2022/ngwr-textarea.mjs +32 -4
  251. package/fesm2022/ngwr-textarea.mjs.map +1 -1
  252. package/fesm2022/ngwr-tilt-card.mjs +2 -2
  253. package/fesm2022/ngwr-tilt-card.mjs.map +1 -1
  254. package/fesm2022/ngwr-toast-testing.mjs +101 -0
  255. package/fesm2022/ngwr-toast-testing.mjs.map +1 -0
  256. package/fesm2022/ngwr-toast.mjs +2 -2
  257. package/fesm2022/ngwr-toast.mjs.map +1 -1
  258. package/fesm2022/ngwr-tour.mjs +61 -9
  259. package/fesm2022/ngwr-tour.mjs.map +1 -1
  260. package/fesm2022/ngwr-transfer-testing.mjs +538 -0
  261. package/fesm2022/ngwr-transfer-testing.mjs.map +1 -0
  262. package/fesm2022/ngwr-transfer.mjs +45 -14
  263. package/fesm2022/ngwr-transfer.mjs.map +1 -1
  264. package/fesm2022/ngwr-tree-testing.mjs +734 -0
  265. package/fesm2022/ngwr-tree-testing.mjs.map +1 -0
  266. package/fesm2022/ngwr-tree.mjs +73 -7
  267. package/fesm2022/ngwr-tree.mjs.map +1 -1
  268. package/fesm2022/ngwr-typewriter.mjs +5 -3
  269. package/fesm2022/ngwr-typewriter.mjs.map +1 -1
  270. package/fesm2022/ngwr-version.mjs +1 -1
  271. package/fesm2022/ngwr-version.mjs.map +1 -1
  272. package/fesm2022/ngwr-virtual-scroll.mjs +31 -5
  273. package/fesm2022/ngwr-virtual-scroll.mjs.map +1 -1
  274. package/fesm2022/ngwr-waves.mjs +3 -3
  275. package/fesm2022/ngwr-waves.mjs.map +1 -1
  276. package/fesm2022/ngwr-window.mjs +8 -0
  277. package/fesm2022/ngwr-window.mjs.map +1 -1
  278. package/gauge/styles/_index.scss +1 -1
  279. package/glitch-text/styles/_index.scss +4 -0
  280. package/i18n/en.json +48 -0
  281. package/i18n/ru.json +48 -0
  282. package/image-cropper/styles/_index.scss +13 -1
  283. package/input/styles/_index.scss +2 -2
  284. package/input-number/styles/_index.scss +7 -2
  285. package/knob/styles/_index.scss +8 -1
  286. package/layout/styles/_index.scss +3 -3
  287. package/lightbox/styles/_index.scss +10 -2
  288. package/line-chart/styles/_index.scss +6 -0
  289. package/llms-full.txt +151 -4
  290. package/llms.txt +57 -8
  291. package/loading-bar/styles/_index.scss +1 -2
  292. package/markdown/styles/_index.scss +296 -0
  293. package/marquee/styles/_index.scss +12 -0
  294. package/mcp/api.js +512 -0
  295. package/mcp/catalog.js +157 -0
  296. package/mcp/server.js +273 -0
  297. package/mcp/tools.js +366 -0
  298. package/meter-group/styles/_index.scss +1 -1
  299. package/package.json +186 -35
  300. package/pagination/styles/_index.scss +6 -6
  301. package/popover/styles/_index.scss +37 -5
  302. package/rating/styles/_index.scss +10 -0
  303. package/schematics/use/symbol-map.json +2 -0
  304. package/segmented/styles/_index.scss +7 -0
  305. package/select/styles/_index.scss +29 -9
  306. package/sidebar/styles/_index.scss +30 -5
  307. package/slider/styles/_index.scss +15 -0
  308. package/speed-dial/styles/_index.scss +20 -0
  309. package/split-text/styles/_index.scss +13 -0
  310. package/star-border/styles/_index.scss +2 -0
  311. package/stepper/styles/_index.scss +1 -1
  312. package/styles/_grid.scss +4 -4
  313. package/styles.scss +1 -0
  314. package/switch/styles/_index.scss +5 -3
  315. package/table/styles/_index.scss +22 -11
  316. package/tabs/styles/_index.scss +11 -1
  317. package/textarea/styles/_index.scss +5 -0
  318. package/theme/styles/_colors.scss +29 -13
  319. package/theme/styles/_dark.scss +11 -3
  320. package/theme/styles/_mixins.scss +3 -0
  321. package/timeline/styles/_index.scss +2 -2
  322. package/toast/styles/_index.scss +17 -8
  323. package/toolbar/styles/_index.scss +3 -3
  324. package/tour/styles/_index.scss +7 -1
  325. package/tree/styles/_index.scss +5 -3
  326. package/types/ngwr-action-sheet.d.ts +9 -1
  327. package/types/ngwr-affix.d.ts +7 -1
  328. package/types/ngwr-anchor.d.ts +8 -1
  329. package/types/ngwr-avatar.d.ts +13 -3
  330. package/types/ngwr-bar-chart.d.ts +16 -0
  331. package/types/ngwr-burger.d.ts +6 -2
  332. package/types/ngwr-button-testing.d.ts +85 -0
  333. package/types/ngwr-button.d.ts +26 -10
  334. package/types/ngwr-calendar-heatmap.d.ts +16 -2
  335. package/types/ngwr-calendar.d.ts +10 -0
  336. package/types/ngwr-carousel-testing.d.ts +257 -0
  337. package/types/ngwr-carousel.d.ts +20 -4
  338. package/types/ngwr-cascader-testing.d.ts +392 -0
  339. package/types/ngwr-checkbox-testing.d.ts +77 -0
  340. package/types/ngwr-checkbox.d.ts +7 -2
  341. package/types/ngwr-collapse-testing.d.ts +290 -0
  342. package/types/ngwr-color-picker.d.ts +20 -11
  343. package/types/ngwr-command-palette-testing.d.ts +437 -0
  344. package/types/ngwr-command-palette.d.ts +25 -2
  345. package/types/ngwr-compare.d.ts +50 -2
  346. package/types/ngwr-config.d.ts +176 -0
  347. package/types/ngwr-context-menu-testing.d.ts +401 -0
  348. package/types/ngwr-context-menu.d.ts +65 -17
  349. package/types/ngwr-counter.d.ts +6 -1
  350. package/types/ngwr-date-adapter-luxon.d.ts +26 -0
  351. package/types/ngwr-date-picker-testing.d.ts +518 -0
  352. package/types/ngwr-date-picker.d.ts +4 -0
  353. package/types/ngwr-dialog-testing.d.ts +79 -0
  354. package/types/ngwr-directives.d.ts +10 -1
  355. package/types/ngwr-donut-chart.d.ts +8 -1
  356. package/types/ngwr-drawer-testing.d.ts +196 -0
  357. package/types/ngwr-dropdown-testing.d.ts +202 -0
  358. package/types/ngwr-dropdown.d.ts +7 -1
  359. package/types/ngwr-empty.d.ts +19 -4
  360. package/types/ngwr-event-calendar.d.ts +26 -1
  361. package/types/ngwr-file-upload-testing.d.ts +194 -0
  362. package/types/ngwr-form-testing.d.ts +379 -0
  363. package/types/ngwr-form.d.ts +17 -0
  364. package/types/ngwr-gauge.d.ts +13 -1
  365. package/types/ngwr-image-cropper.d.ts +10 -0
  366. package/types/ngwr-input-number-testing.d.ts +226 -0
  367. package/types/ngwr-input-number.d.ts +29 -1
  368. package/types/ngwr-input-otp-testing.d.ts +299 -0
  369. package/types/ngwr-input-otp.d.ts +23 -2
  370. package/types/ngwr-input-testing.d.ts +84 -0
  371. package/types/ngwr-input.d.ts +20 -6
  372. package/types/ngwr-knob.d.ts +18 -0
  373. package/types/ngwr-layout.d.ts +1 -0
  374. package/types/ngwr-lightbox.d.ts +17 -3
  375. package/types/ngwr-line-chart.d.ts +9 -2
  376. package/types/ngwr-markdown-testing.d.ts +462 -0
  377. package/types/ngwr-markdown.d.ts +534 -0
  378. package/types/ngwr-marquee.d.ts +12 -2
  379. package/types/ngwr-mention-testing.d.ts +359 -0
  380. package/types/ngwr-meta.d.ts +4 -2
  381. package/types/ngwr-meter-group.d.ts +11 -1
  382. package/types/ngwr-overlay.d.ts +33 -2
  383. package/types/ngwr-pagination-testing.d.ts +291 -0
  384. package/types/ngwr-pagination.d.ts +1 -0
  385. package/types/ngwr-popconfirm-testing.d.ts +235 -0
  386. package/types/ngwr-popconfirm.d.ts +31 -21
  387. package/types/ngwr-popover-testing.d.ts +221 -0
  388. package/types/ngwr-popover.d.ts +9 -0
  389. package/types/ngwr-pull-to-refresh.d.ts +7 -0
  390. package/types/ngwr-qr.d.ts +9 -1
  391. package/types/ngwr-radio-testing.d.ts +296 -0
  392. package/types/ngwr-radio.d.ts +8 -2
  393. package/types/ngwr-rating-testing.d.ts +291 -0
  394. package/types/ngwr-rating.d.ts +23 -0
  395. package/types/ngwr-segmented-testing.d.ts +401 -0
  396. package/types/ngwr-select-testing.d.ts +175 -0
  397. package/types/ngwr-select.d.ts +45 -4
  398. package/types/ngwr-sidebar.d.ts +17 -2
  399. package/types/ngwr-slider-testing.d.ts +329 -0
  400. package/types/ngwr-slider.d.ts +35 -1
  401. package/types/ngwr-sparkline.d.ts +12 -2
  402. package/types/ngwr-speed-dial.d.ts +17 -18
  403. package/types/ngwr-spinner.d.ts +8 -1
  404. package/types/ngwr-splitter.d.ts +24 -1
  405. package/types/ngwr-statistic.d.ts +12 -2
  406. package/types/ngwr-stepper-testing.d.ts +346 -0
  407. package/types/ngwr-switch-testing.d.ts +66 -0
  408. package/types/ngwr-switch.d.ts +7 -2
  409. package/types/ngwr-table-testing.d.ts +423 -0
  410. package/types/ngwr-table.d.ts +42 -0
  411. package/types/ngwr-tabs-testing.d.ts +470 -0
  412. package/types/ngwr-tabs.d.ts +9 -0
  413. package/types/ngwr-textarea-testing.d.ts +184 -0
  414. package/types/ngwr-textarea.d.ts +7 -2
  415. package/types/ngwr-toast-testing.d.ts +80 -0
  416. package/types/ngwr-tour.d.ts +27 -0
  417. package/types/ngwr-transfer-testing.d.ts +444 -0
  418. package/types/ngwr-transfer.d.ts +16 -1
  419. package/types/ngwr-tree-testing.d.ts +501 -0
  420. package/types/ngwr-tree.d.ts +33 -0
  421. package/types/ngwr-version.d.ts +1 -1
  422. package/types/ngwr-virtual-scroll.d.ts +13 -1
  423. package/typewriter/styles/_index.scss +1 -1
  424. package/typography/styles/_index.scss +1 -1
  425. package/window/styles/_index.scss +32 -9
@@ -1,6 +1,7 @@
1
1
  import { coerceBooleanProperty } from '@angular/cdk/coercion';
2
2
  import * as i0 from '@angular/core';
3
3
  import { input, model, output, computed, ViewEncapsulation, Component } from '@angular/core';
4
+ import { useConfigValue } from 'ngwr/config';
4
5
  import { randomId } from 'ngwr/utils';
5
6
 
6
7
  /**
@@ -27,9 +28,14 @@ class WrSwitch {
27
28
  * @default false
28
29
  */
29
30
  disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: coerceBooleanProperty });
30
- /** Control size — shares the `--wr-control-*` contract. @default 'md' */
31
- size = input('md', /* @ts-ignore */
31
+ /**
32
+ * Control size — shares the `--wr-control-*` contract. Unset falls back to the
33
+ * `switch.size` app default from `provideWrConfig()`. @default 'md'
34
+ */
35
+ size = input(null, /* @ts-ignore */
32
36
  ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
37
+ /** `size`, then the app config, then `md`. @internal */
38
+ resolvedSize = useConfigValue(this.size, c => c.switch?.size, 'md');
33
39
  /** On / off state. Bound by `[formField]`, or two-way via `[(checked)]`. */
34
40
  checked = model(false, /* @ts-ignore */
35
41
  ...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
@@ -37,7 +43,7 @@ class WrSwitch {
37
43
  touch = output();
38
44
  classes = computed(() => {
39
45
  const parts = ['wr-switch'];
40
- const size = this.size();
46
+ const size = this.resolvedSize();
41
47
  if (size !== 'md')
42
48
  parts.push(`wr-switch--${size}`);
43
49
  if (this.checked())
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-switch.mjs","sources":["../../../projects/lib/switch/switch.ts","../../../projects/lib/switch/switch.html","../../../projects/lib/switch/ngwr-switch.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\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Component, ViewEncapsulation, computed, input, model, output } from '@angular/core';\nimport type { FormCheckboxControl } from '@angular/forms/signals';\n\nimport { randomId } from 'ngwr/utils';\n\n/**\n * Boolean toggle with an iOS-style slider.\n *\n * A signal-forms native control: it implements `FormCheckboxControl`, so\n * `[formField]` binds straight to its `checked` model — no\n * `ControlValueAccessor` in between. `[(checked)]` works standalone.\n *\n * @example\n * ```html\n * <!-- signal forms -->\n * <wr-switch [formField]=\"form.notifications\">Notifications</wr-switch>\n *\n * <!-- standalone two-way binding -->\n * <wr-switch [(checked)]=\"enabled\">Notifications</wr-switch>\n * ```\n *\n * @see https://ngwr.dev/reference/components/switch\n */\nexport type WrSwitchSize = 'sm' | 'md' | 'lg';\n\n@Component({\n selector: 'wr-switch',\n templateUrl: './switch.html',\n encapsulation: ViewEncapsulation.None,\n host: { '[class]': 'classes()' },\n})\nexport class WrSwitch implements FormCheckboxControl {\n /**\n * Accessible name for a switch used WITHOUT projected text. The wrapping\n * `<label>` names the control whenever content is projected; with none, the\n * label is empty and the input has no name at all.\n */\n readonly ariaLabel = input<string | null>(null);\n\n /** Stable id used to associate the native input with its label. */\n readonly id = input<string>(randomId('wr-switch'));\n\n /**\n * Disable the switch. Bound automatically from the field's disabled state\n * when used with `[formField]`.\n *\n * @default false\n */\n readonly disabled = input(false, { transform: coerceBooleanProperty });\n\n /** Control size — shares the `--wr-control-*` contract. @default 'md' */\n readonly size = input<WrSwitchSize>('md');\n\n /** On / off state. Bound by `[formField]`, or two-way via `[(checked)]`. */\n readonly checked = model<boolean>(false);\n\n /** Emitted on blur so a bound field can mark itself touched. */\n readonly touch = output<void>();\n\n protected readonly classes = computed(() => {\n const parts = ['wr-switch'];\n const size = this.size();\n if (size !== 'md') parts.push(`wr-switch--${size}`);\n if (this.checked()) parts.push('wr-switch--checked');\n if (this.disabled()) parts.push('wr-switch--disabled');\n return parts.join(' ');\n });\n\n // Template handlers\n\n protected onInputChange(event: Event): void {\n this.checked.set((event.target as HTMLInputElement).checked);\n }\n\n protected onInputBlur(): void {\n this.touch.emit();\n }\n}\n","<label class=\"wr-switch__label\" [for]=\"id()\">\n <input\n class=\"wr-switch__input\"\n type=\"checkbox\"\n role=\"switch\"\n [id]=\"id()\"\n [attr.aria-label]=\"ariaLabel()\"\n [checked]=\"checked()\"\n [disabled]=\"disabled()\"\n (change)=\"onInputChange($event)\"\n (blur)=\"onInputBlur()\"\n />\n\n <span class=\"wr-switch__track\" aria-hidden=\"true\">\n <span class=\"wr-switch__thumb\"></span>\n </span>\n\n <span class=\"wr-switch__text\">\n <ng-content />\n </span>\n</label>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAAA;;;;;AAKG;MAkCU,QAAQ,CAAA;AACnB;;;;AAIG;IACM,SAAS,GAAG,KAAK,CAAgB,IAAI;kFAAC;;AAGtC,IAAA,EAAE,GAAG,KAAK,CAAS,QAAQ,CAAC,WAAW,CAAC;2EAAC;AAElD;;;;;AAKG;IACM,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,qBAAqB,EAAA,CAAG;;IAG7D,IAAI,GAAG,KAAK,CAAe,IAAI;6EAAC;;IAGhC,OAAO,GAAG,KAAK,CAAU,KAAK;gFAAC;;IAG/B,KAAK,GAAG,MAAM,EAAQ;AAEZ,IAAA,OAAO,GAAG,QAAQ,CAAC,MAAK;AACzC,QAAA,MAAM,KAAK,GAAG,CAAC,WAAW,CAAC;AAC3B,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE;QACxB,IAAI,IAAI,KAAK,IAAI;AAAE,YAAA,KAAK,CAAC,IAAI,CAAC,cAAc,IAAI,CAAA,CAAE,CAAC;QACnD,IAAI,IAAI,CAAC,OAAO,EAAE;AAAE,YAAA,KAAK,CAAC,IAAI,CAAC,oBAAoB,CAAC;QACpD,IAAI,IAAI,CAAC,QAAQ,EAAE;AAAE,YAAA,KAAK,CAAC,IAAI,CAAC,qBAAqB,CAAC;AACtD,QAAA,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;IACxB,CAAC;gFAAC;;AAIQ,IAAA,aAAa,CAAC,KAAY,EAAA;QAClC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAE,KAAK,CAAC,MAA2B,CAAC,OAAO,CAAC;IAC9D;IAEU,WAAW,GAAA;AACnB,QAAA,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE;IACnB;uGA7CW,QAAQ,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAR,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,QAAQ,+xBCvCrB,ihBAqBA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FDkBa,QAAQ,EAAA,UAAA,EAAA,CAAA;kBANpB,SAAS;+BACE,WAAW,EAAA,aAAA,EAEN,iBAAiB,CAAC,IAAI,QAC/B,EAAE,SAAS,EAAE,WAAW,EAAE,EAAA,QAAA,EAAA,ihBAAA,EAAA;;;AErClC;;AAEG;;;;"}
1
+ {"version":3,"file":"ngwr-switch.mjs","sources":["../../../projects/lib/switch/switch.ts","../../../projects/lib/switch/switch.html","../../../projects/lib/switch/ngwr-switch.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\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Component, ViewEncapsulation, computed, input, model, output } from '@angular/core';\nimport type { FormCheckboxControl } from '@angular/forms/signals';\n\nimport { useConfigValue } from 'ngwr/config';\nimport { randomId } from 'ngwr/utils';\n\n/**\n * Boolean toggle with an iOS-style slider.\n *\n * A signal-forms native control: it implements `FormCheckboxControl`, so\n * `[formField]` binds straight to its `checked` model — no\n * `ControlValueAccessor` in between. `[(checked)]` works standalone.\n *\n * @example\n * ```html\n * <!-- signal forms -->\n * <wr-switch [formField]=\"form.notifications\">Notifications</wr-switch>\n *\n * <!-- standalone two-way binding -->\n * <wr-switch [(checked)]=\"enabled\">Notifications</wr-switch>\n * ```\n *\n * @see https://ngwr.dev/reference/components/switch\n */\nexport type WrSwitchSize = 'sm' | 'md' | 'lg';\n\n@Component({\n selector: 'wr-switch',\n templateUrl: './switch.html',\n encapsulation: ViewEncapsulation.None,\n host: { '[class]': 'classes()' },\n})\nexport class WrSwitch implements FormCheckboxControl {\n /**\n * Accessible name for a switch used WITHOUT projected text. The wrapping\n * `<label>` names the control whenever content is projected; with none, the\n * label is empty and the input has no name at all.\n */\n readonly ariaLabel = input<string | null>(null);\n\n /** Stable id used to associate the native input with its label. */\n readonly id = input<string>(randomId('wr-switch'));\n\n /**\n * Disable the switch. Bound automatically from the field's disabled state\n * when used with `[formField]`.\n *\n * @default false\n */\n readonly disabled = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Control size — shares the `--wr-control-*` contract. Unset falls back to the\n * `switch.size` app default from `provideWrConfig()`. @default 'md'\n */\n readonly size = input<WrSwitchSize | null>(null);\n\n /** `size`, then the app config, then `md`. @internal */\n protected readonly resolvedSize = useConfigValue(this.size, c => c.switch?.size, 'md');\n\n /** On / off state. Bound by `[formField]`, or two-way via `[(checked)]`. */\n readonly checked = model<boolean>(false);\n\n /** Emitted on blur so a bound field can mark itself touched. */\n readonly touch = output<void>();\n\n protected readonly classes = computed(() => {\n const parts = ['wr-switch'];\n const size = this.resolvedSize();\n if (size !== 'md') parts.push(`wr-switch--${size}`);\n if (this.checked()) parts.push('wr-switch--checked');\n if (this.disabled()) parts.push('wr-switch--disabled');\n return parts.join(' ');\n });\n\n // Template handlers\n\n protected onInputChange(event: Event): void {\n this.checked.set((event.target as HTMLInputElement).checked);\n }\n\n protected onInputBlur(): void {\n this.touch.emit();\n }\n}\n","<label class=\"wr-switch__label\" [for]=\"id()\">\n <input\n class=\"wr-switch__input\"\n type=\"checkbox\"\n role=\"switch\"\n [id]=\"id()\"\n [attr.aria-label]=\"ariaLabel()\"\n [checked]=\"checked()\"\n [disabled]=\"disabled()\"\n (change)=\"onInputChange($event)\"\n (blur)=\"onInputBlur()\"\n />\n\n <span class=\"wr-switch__track\" aria-hidden=\"true\">\n <span class=\"wr-switch__thumb\"></span>\n </span>\n\n <span class=\"wr-switch__text\">\n <ng-content />\n </span>\n</label>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAAA;;;;;AAKG;MAmCU,QAAQ,CAAA;AACnB;;;;AAIG;IACM,SAAS,GAAG,KAAK,CAAgB,IAAI;kFAAC;;AAGtC,IAAA,EAAE,GAAG,KAAK,CAAS,QAAQ,CAAC,WAAW,CAAC;2EAAC;AAElD;;;;;AAKG;IACM,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,qBAAqB,EAAA,CAAG;AAEtE;;;AAGG;IACM,IAAI,GAAG,KAAK,CAAsB,IAAI;6EAAC;;AAG7B,IAAA,YAAY,GAAG,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC;;IAG7E,OAAO,GAAG,KAAK,CAAU,KAAK;gFAAC;;IAG/B,KAAK,GAAG,MAAM,EAAQ;AAEZ,IAAA,OAAO,GAAG,QAAQ,CAAC,MAAK;AACzC,QAAA,MAAM,KAAK,GAAG,CAAC,WAAW,CAAC;AAC3B,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,YAAY,EAAE;QAChC,IAAI,IAAI,KAAK,IAAI;AAAE,YAAA,KAAK,CAAC,IAAI,CAAC,cAAc,IAAI,CAAA,CAAE,CAAC;QACnD,IAAI,IAAI,CAAC,OAAO,EAAE;AAAE,YAAA,KAAK,CAAC,IAAI,CAAC,oBAAoB,CAAC;QACpD,IAAI,IAAI,CAAC,QAAQ,EAAE;AAAE,YAAA,KAAK,CAAC,IAAI,CAAC,qBAAqB,CAAC;AACtD,QAAA,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;IACxB,CAAC;gFAAC;;AAIQ,IAAA,aAAa,CAAC,KAAY,EAAA;QAClC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAE,KAAK,CAAC,MAA2B,CAAC,OAAO,CAAC;IAC9D;IAEU,WAAW,GAAA;AACnB,QAAA,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE;IACnB;uGAnDW,QAAQ,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAR,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,QAAQ,+xBCxCrB,ihBAqBA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FDmBa,QAAQ,EAAA,UAAA,EAAA,CAAA;kBANpB,SAAS;+BACE,WAAW,EAAA,aAAA,EAEN,iBAAiB,CAAC,IAAI,QAC/B,EAAE,SAAS,EAAE,WAAW,EAAE,EAAA,QAAA,EAAA,ihBAAA,EAAA;;;AEtClC;;AAEG;;;;"}
@@ -0,0 +1,580 @@
1
+ import { ContentContainerComponentHarness, HarnessPredicate, ComponentHarness } from '@angular/cdk/testing';
2
+
3
+ /**
4
+ * @license
5
+ *
6
+ * Use of this source code is governed by an MIT-style license that can be
7
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
8
+ */
9
+ /**
10
+ * Collapse the whitespace inside a table cell to what a user reads on one line.
11
+ *
12
+ * `TestElement.text()` only trims the ends, and a `<td>` is rarely one text node:
13
+ * the tree column puts a toggle in front of the value, a `[wrTableExpand]` detail
14
+ * cell holds whatever the consumer projected. The template's own indentation is
15
+ * NOT the problem — Angular's default `preserveWhitespaces: false` drops
16
+ * whitespace-only text nodes at compile time, so `'\n Ada\n'` never reaches
17
+ * `textContent`. What does reach it is whitespace inside a VALUE (`'first\n\n
18
+ * programmer'` out of a textarea or an API) and, in a consumer app compiled with
19
+ * `preserveWhitespaces: true`, the indentation after all. Every run becomes one
20
+ * space so a spec can assert the rendered line either way.
21
+ */
22
+ function wrTableHarnessText(text) {
23
+ return text.replace(/\s+/g, ' ').trim();
24
+ }
25
+
26
+ /**
27
+ * @license
28
+ *
29
+ * Use of this source code is governed by an MIT-style license that can be
30
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
31
+ */
32
+ /**
33
+ * Test harness for one data cell of a `<wr-table>` row.
34
+ *
35
+ * A CONTENT CONTAINER, because a cell is where a consumer's own components end
36
+ * up: a `[wrTableCell]` template can render a `<wr-tag>`, a button, an input, and
37
+ * `cell.getHarness(WrButtonHarness…)` resolves those INSIDE this cell — so the
38
+ * "Delete" button of row 3 cannot be mistaken for the one in row 1.
39
+ *
40
+ * @example
41
+ * ```ts
42
+ * const [row] = await table.getRows({ cellText: 'Ada' });
43
+ * const [status] = await row.getCells({ columnTitle: 'Status' });
44
+ *
45
+ * expect(await status.getText()).toBe('active');
46
+ * ```
47
+ *
48
+ * @see https://ngwr.dev/guides/testing
49
+ */
50
+ class WrTableCellHarness extends ContentContainerComponentHarness {
51
+ /**
52
+ * Data cells only. The lead selection and expand cells carry the same
53
+ * `.wr-table__td` class — they hold the row's controls, not its data — so a cell
54
+ * list that swept them in would no longer line up with the header list.
55
+ */
56
+ static hostSelector = '.wr-table__td:not(.wr-table__td--select):not(.wr-table__td--expand)';
57
+ /** Build a predicate that narrows the query. */
58
+ static with(options = {}) {
59
+ return new HarnessPredicate(WrTableCellHarness, options)
60
+ .addOption('text', options.text, (harness, text) => HarnessPredicate.stringMatches(harness.getText(), text))
61
+ .addOption('columnTitle', options.columnTitle, (harness, title) => HarnessPredicate.stringMatches(harness.getColumnTitle(), title));
62
+ }
63
+ /** The cell's text, with the template's indentation collapsed to single spaces. */
64
+ async getText() {
65
+ return wrTableHarnessText(await (await this.host()).text());
66
+ }
67
+ /**
68
+ * The title of the column this cell belongs to.
69
+ *
70
+ * Read from `data-label` — the attribute responsive card mode prints in front of
71
+ * each value — because it is the only place a cell says which column it is in.
72
+ * The column KEY is never in the DOM at all.
73
+ */
74
+ async getColumnTitle() {
75
+ return (await this.host()).getAttribute('data-label');
76
+ }
77
+ /** Which edge the cell's column is frozen against, or `null` when it scrolls. */
78
+ async getPin() {
79
+ const host = await this.host();
80
+ if (await host.hasClass('wr-table__td--pin-left'))
81
+ return 'left';
82
+ if (await host.hasClass('wr-table__td--pin-right'))
83
+ return 'right';
84
+ return null;
85
+ }
86
+ }
87
+
88
+ /**
89
+ * @license
90
+ *
91
+ * Use of this source code is governed by an MIT-style license that can be
92
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
93
+ */
94
+ /**
95
+ * Test harness for one column header of a `<wr-table>`.
96
+ *
97
+ * The selector deliberately skips the two LEAD headers — selection and expand —
98
+ * which carry the same `.wr-table__th` class but hold a checkbox or nothing at
99
+ * all. What is left lines up index-for-index with the data columns, so a header's
100
+ * position is its column's position.
101
+ *
102
+ * Columns are addressed by their TITLE here and everywhere else in this harness
103
+ * family, never by their `columns` key: the key never reaches the DOM. Only the
104
+ * title does — in this header and in every cell's `data-label` — so it is the one
105
+ * handle a spec and the rendered table share.
106
+ *
107
+ * @see https://ngwr.dev/guides/testing
108
+ */
109
+ class WrTableHeaderCellHarness extends ComponentHarness {
110
+ static hostSelector = '.wr-table__th:not(.wr-table__th--select):not(.wr-table__th--expand)';
111
+ /** Build a predicate that narrows the query. */
112
+ static with(options = {}) {
113
+ return new HarnessPredicate(WrTableHeaderCellHarness, options)
114
+ .addOption('text', options.text, (harness, text) => HarnessPredicate.stringMatches(harness.getText(), text))
115
+ .addOption('sortable', options.sortable, async (harness, sortable) => (await harness.isSortable()) === sortable);
116
+ }
117
+ /** The column title, trimmed. The sort and filter controls are not part of it. */
118
+ async getText() {
119
+ return (await this.locatorFor('.wr-table__title')()).text();
120
+ }
121
+ /**
122
+ * The direction this column announces, exactly as `aria-sort` puts it — or
123
+ * `null` when the column does not sort.
124
+ *
125
+ * `null` is not "unsorted": a sortable column with no direction announces
126
+ * `'none'`, and only a plain column omits the attribute entirely. Claiming
127
+ * sortability a column does not have is the bug that distinction prevents.
128
+ */
129
+ async getSortDirection() {
130
+ const sort = await (await this.host()).getAttribute('aria-sort');
131
+ return sort;
132
+ }
133
+ /** Whether the column offers sorting at all. */
134
+ async isSortable() {
135
+ return (await this.getSortDirection()) !== null;
136
+ }
137
+ /**
138
+ * Advance the sort one step — none → ascending → descending → none, the cycle a
139
+ * click on the indicator drives.
140
+ *
141
+ * Throws on a column with no sort control rather than doing nothing: the quiet
142
+ * version of this leaves a spec asserting an unchanged direction and passing.
143
+ */
144
+ async sort() {
145
+ const button = await this.locatorForOptional('.wr-table__sort-btn')();
146
+ if (!button) {
147
+ throw new Error(`WrTableHeaderCellHarness.sort(): the "${await this.getText()}" column has no sort control — ` +
148
+ 'its column definition needs `sortable: true`.');
149
+ }
150
+ await button.click();
151
+ }
152
+ /** Whether the column offers a filter dropdown (its definition carries a NON-EMPTY `filterItems`). */
153
+ async isFilterable() {
154
+ return (await this.locatorForOptional('wr-table-filter')()) !== null;
155
+ }
156
+ /** Which edge the column is frozen against, or `null` when it scrolls with the rest. */
157
+ async getPin() {
158
+ const host = await this.host();
159
+ if (await host.hasClass('wr-table__th--pin-left'))
160
+ return 'left';
161
+ if (await host.hasClass('wr-table__th--pin-right'))
162
+ return 'right';
163
+ return null;
164
+ }
165
+ }
166
+
167
+ /**
168
+ * @license
169
+ *
170
+ * Use of this source code is governed by an MIT-style license that can be
171
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
172
+ */
173
+ /**
174
+ * Test harness for one body row of a `<wr-table>` — flat, grouped or tree.
175
+ *
176
+ * Also a CONTENT CONTAINER, so `row.getHarness(WrButtonHarness…)` reaches the
177
+ * consumer's own components anywhere in the row without leaving this row.
178
+ *
179
+ * @example
180
+ * ```ts
181
+ * const [ada] = await table.getRows({ cellText: 'Ada' });
182
+ *
183
+ * await ada.select();
184
+ * await (await ada.getHarness(WrButtonHarness.with({ text: 'Edit' }))).click();
185
+ * ```
186
+ *
187
+ * @see https://ngwr.dev/guides/testing
188
+ */
189
+ class WrTableRowHarness extends ContentContainerComponentHarness {
190
+ /**
191
+ * `.wr-table__tr` is the DATA row and nothing else.
192
+ *
193
+ * Everything else a `<tbody>` can hold is a `<tr>` too: the group band
194
+ * (`.wr-table__group-row`), its subtotal row, the detail row a `[wrTableExpand]`
195
+ * template renders, the two virtual spacers, and the "no data" row. Querying
196
+ * `tbody tr` would hand every one of those back as a row with no cells.
197
+ */
198
+ static hostSelector = '.wr-table__tr';
199
+ /** Build a predicate that narrows the query. */
200
+ static with(options = {}) {
201
+ return new HarnessPredicate(WrTableRowHarness, options)
202
+ .addOption('cellText', options.cellText, async (harness, text) => {
203
+ for (const cell of await harness.getCellTexts()) {
204
+ if (await HarnessPredicate.stringMatches(cell, text))
205
+ return true;
206
+ }
207
+ return false;
208
+ })
209
+ .addOption('selected', options.selected, async (harness, selected) => (await harness.isSelected()) === selected)
210
+ .addOption('expanded', options.expanded, async (harness, expanded) => (await harness.isExpanded()) === expanded)
211
+ .addOption('level', options.level, async (harness, level) => (await harness.getLevel()) === level);
212
+ }
213
+ selectBox = this.locatorForOptional('.wr-table__td--select input.wr-checkbox__input');
214
+ /**
215
+ * The row's disclosure control, whichever of the two the table gave it: the lead
216
+ * button of a `[wrTableExpand]` table, or the tree toggle inside the tree column.
217
+ * The two never coexist — a tree row owns its own disclosure, so the component
218
+ * refuses the pair.
219
+ *
220
+ * `button` in the tree selector is load-bearing. A leaf renders a `<span>` with
221
+ * the same `.wr-table__tree-toggle` class purely to hold the indent, and taking
222
+ * that for a control would report every leaf as expandable.
223
+ */
224
+ disclosure = this.locatorForOptional('.wr-table__expand-btn, button.wr-table__tree-toggle');
225
+ /** The row's data cells, in DOM order. The lead control cells are not cells. */
226
+ async getCells(filters = {}) {
227
+ return this.locatorForAll(WrTableCellHarness.with(filters))();
228
+ }
229
+ /** The text of every data cell, in DOM order. */
230
+ async getCellTexts() {
231
+ const cells = await this.getCells();
232
+ return Promise.all(cells.map(cell => cell.getText()));
233
+ }
234
+ /**
235
+ * Whether the row is selected.
236
+ *
237
+ * Read from the `--selected` modifier, which is what the row looks like and what
238
+ * a consumer styles against. It also means a row is not "selected" while
239
+ * `rowSelection` is off, however many keys the `selection` model holds — nothing
240
+ * on screen says otherwise.
241
+ */
242
+ async isSelected() {
243
+ return (await this.host()).hasClass('wr-table__tr--selected');
244
+ }
245
+ /** Whether the row offers a selection checkbox at all. */
246
+ async isSelectable() {
247
+ return (await this.selectBox()) !== null;
248
+ }
249
+ /** Flip the row's checkbox. Throws when the table has no selection column. */
250
+ async toggleSelection() {
251
+ const box = await this.selectBox();
252
+ if (!box) {
253
+ throw new Error('WrTableRowHarness.toggleSelection(): this row has no checkbox — the table needs ' +
254
+ "`rowSelection` set to 'single' or 'multiple'.");
255
+ }
256
+ await box.click();
257
+ }
258
+ /** Select the row if it is not already selected. */
259
+ async select() {
260
+ if (!(await this.isSelected()))
261
+ await this.toggleSelection();
262
+ }
263
+ /** Deselect the row if it is selected. */
264
+ async deselect() {
265
+ if (await this.isSelected())
266
+ await this.toggleSelection();
267
+ }
268
+ /**
269
+ * Whether the row has something to open — a detail template's disclosure, or
270
+ * children in a tree. A tree leaf answers `false`.
271
+ */
272
+ async isExpandable() {
273
+ return (await this.disclosure()) !== null;
274
+ }
275
+ /** Whether the row is open, from the disclosure's `aria-expanded`. */
276
+ async isExpanded() {
277
+ const toggle = await this.disclosure();
278
+ return toggle !== null && (await toggle.getAttribute('aria-expanded')) === 'true';
279
+ }
280
+ /** Open or close the row. Throws when it has nothing to open. */
281
+ async toggleExpand() {
282
+ const toggle = await this.disclosure();
283
+ if (!toggle) {
284
+ throw new Error('WrTableRowHarness.toggleExpand(): this row has no disclosure control — a flat table needs a ' +
285
+ '`[wrTableExpand]` template, and a tree row with no children is a leaf.');
286
+ }
287
+ await toggle.click();
288
+ }
289
+ /**
290
+ * The row's depth as the table announces it — 1-based `aria-level`, `null` in a
291
+ * flat table, where depth is not a thing that exists.
292
+ */
293
+ async getLevel() {
294
+ return this.numericAttribute('aria-level');
295
+ }
296
+ /** The row's 1-based position among its siblings (`aria-posinset`), or `null` when flat. */
297
+ async getPosInSet() {
298
+ return this.numericAttribute('aria-posinset');
299
+ }
300
+ /** How many rows are in the row's sibling set, itself included (`aria-setsize`); `null` when flat. */
301
+ async getSetSize() {
302
+ return this.numericAttribute('aria-setsize');
303
+ }
304
+ /**
305
+ * The row's 1-based index in the FULL dataset (`aria-rowindex`, header included),
306
+ * or `null` when the table is not virtualized.
307
+ *
308
+ * Only a windowed table publishes it, and that is precisely when it matters: the
309
+ * rows in the DOM are a slice, so their DOM order says nothing about where they
310
+ * sit in the data.
311
+ */
312
+ async getRowIndex() {
313
+ return this.numericAttribute('aria-rowindex');
314
+ }
315
+ async numericAttribute(name) {
316
+ const value = await (await this.host()).getAttribute(name);
317
+ return value === null ? null : Number.parseInt(value, 10);
318
+ }
319
+ }
320
+
321
+ /**
322
+ * @license
323
+ *
324
+ * Use of this source code is governed by an MIT-style license that can be
325
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
326
+ */
327
+ /**
328
+ * Test harness for `<wr-table>` — the root of a small family, since a table is a
329
+ * tree and not one control: {@link WrTableHeaderCellHarness} for a column header,
330
+ * {@link WrTableRowHarness} for a body row, and `WrTableCellHarness` for a cell.
331
+ *
332
+ * Columns are addressed by their header TITLE, never by their `columns` key: the
333
+ * key never reaches the DOM.
334
+ *
335
+ * What this harness deliberately does NOT do:
336
+ * - open a column's filter dropdown. The panel is a `wr-dropdown` in the overlay
337
+ * container, and driving it belongs to a dropdown harness rather than this one;
338
+ * {@link WrTableHeaderCellHarness.isFilterable} reports that a column offers one.
339
+ * - scroll a virtualized body. See {@link getRows}.
340
+ *
341
+ * @example
342
+ * ```ts
343
+ * const table = await loader.getHarness(WrTableHarness);
344
+ *
345
+ * expect(await table.getHeaderTexts()).toEqual(['Name', 'Role']);
346
+ * await table.sortByColumn('Name');
347
+ * expect(await table.getSortDirection('Name')).toBe('ascending');
348
+ * ```
349
+ *
350
+ * @see https://ngwr.dev/guides/testing
351
+ */
352
+ class WrTableHarness extends ComponentHarness {
353
+ static hostSelector = 'wr-table';
354
+ /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */
355
+ static with(options = {}) {
356
+ return new HarnessPredicate(WrTableHarness, options)
357
+ .addOption('columnTitle', options.columnTitle, async (harness, title) => {
358
+ for (const header of await harness.getHeaderTexts()) {
359
+ if (await HarnessPredicate.stringMatches(header, title))
360
+ return true;
361
+ }
362
+ return false;
363
+ })
364
+ .addOption('tree', options.tree, async (harness, tree) => (await harness.isTree()) === tree);
365
+ }
366
+ tableEl = this.locatorFor('table.wr-table__table');
367
+ selectAllBox = this.locatorForOptional('.wr-table__th--select input.wr-checkbox__input');
368
+ /**
369
+ * The role the table announces.
370
+ *
371
+ * A flat table sets no `role` at all, so it announces the native `table` role —
372
+ * NOT `grid`, which would promise cell-by-cell keyboard navigation it does not
373
+ * implement. `childrenKey` turns it into a `treegrid`, and that role is the only
374
+ * place the hierarchy exists for a screen-reader user: the indent is decoration.
375
+ */
376
+ async getRole() {
377
+ return (await (await this.tableEl()).getAttribute('role')) === 'treegrid' ? 'treegrid' : 'table';
378
+ }
379
+ /** Whether the rows are a hierarchy rather than a flat list. */
380
+ async isTree() {
381
+ return (await this.getRole()) === 'treegrid';
382
+ }
383
+ /**
384
+ * Whether the body is WINDOWED right now.
385
+ *
386
+ * Read from the host modifier rather than from the input, and that is the point:
387
+ * `virtualScroll` is a request, not a promise. The table falls back to rendering
388
+ * every row whenever the layout stops being uniform — grouping, a detail
389
+ * template, responsive card mode, a visible pager, a tree — so this answers what
390
+ * actually happened.
391
+ */
392
+ async isVirtual() {
393
+ return (await this.host()).hasClass('wr-table--virtual');
394
+ }
395
+ /** Whether the loading spinner is covering the table. */
396
+ async isLoading() {
397
+ return (await this.locatorForOptional('.wr-table__loading')()) !== null;
398
+ }
399
+ /** The column headers, in render order — which `columnOrder` and a drag can change. */
400
+ async getHeaderCells(filters = {}) {
401
+ return this.locatorForAll(WrTableHeaderCellHarness.with(filters))();
402
+ }
403
+ /**
404
+ * The column titles, in render order.
405
+ *
406
+ * The selection and expand headers are not columns and are not here, so this
407
+ * list stays as wide as every row from {@link getCellTexts}.
408
+ */
409
+ async getHeaderTexts() {
410
+ const headers = await this.getHeaderCells();
411
+ return Promise.all(headers.map(header => header.getText()));
412
+ }
413
+ /** The direction a column announces via `aria-sort`, or `null` when it does not sort. */
414
+ async getSortDirection(columnTitle) {
415
+ return (await this.headerCellFor(columnTitle)).getSortDirection();
416
+ }
417
+ /**
418
+ * Advance a column's sort one step — none → ascending → descending → none.
419
+ *
420
+ * Sorting is the host's job: `<wr-table>` publishes the intent through its `sort`
421
+ * model and never reorders `items` itself, so a spec that expects the rows to
422
+ * move has to sort the data the way the app does.
423
+ */
424
+ async sortByColumn(columnTitle) {
425
+ await (await this.headerCellFor(columnTitle)).sort();
426
+ }
427
+ /**
428
+ * The body rows currently rendered, in DOM order.
429
+ *
430
+ * "Currently rendered" is the whole caveat of a virtualized table: while
431
+ * {@link isVirtual} is true the `<tbody>` holds only the window around the scroll
432
+ * offset, padded by a spacer row at each end that still has rows to stand in for
433
+ * (one of them, at the top or the bottom of the list), so this returns the
434
+ * WINDOW — not the dataset.
435
+ * {@link getAriaRowCount} is the total the table announces and
436
+ * {@link WrTableRowHarness.getRowIndex} says where a row sits in it. Nothing here
437
+ * scrolls that window on purpose: the viewport has no layout in a unit test, so a
438
+ * `scrollTo` would silently do nothing. Reach for `WrTable.scrollToRow()` in a
439
+ * real browser, or narrow the data instead.
440
+ *
441
+ * Group bands, per-group subtotals, detail rows and the "no data" row are not
442
+ * rows and never appear here.
443
+ */
444
+ async getRows(filters = {}) {
445
+ return this.locatorForAll(WrTableRowHarness.with(filters))();
446
+ }
447
+ /** The whole body as a matrix of cell text — one array per row, one entry per column. */
448
+ async getCellTexts() {
449
+ const rows = await this.getRows();
450
+ return Promise.all(rows.map(row => row.getCellTexts()));
451
+ }
452
+ /**
453
+ * The `<tfoot>` summary cells, one per column and `''` for a column with no
454
+ * `summary`. Empty when no column defines one.
455
+ *
456
+ * The lead cells are dropped so this lines up with {@link getHeaderTexts}. A
457
+ * per-group subtotal row is NOT here — it lives in the body, under its band.
458
+ */
459
+ async getFooterTexts() {
460
+ const cells = await this.locatorForAll('tfoot .wr-table__foot-cell:not(.wr-table__foot-cell--lead)')();
461
+ return Promise.all(cells.map(async (cell) => wrTableHarnessText(await cell.text())));
462
+ }
463
+ /** The "no data" message, or `null` while the table has rows to show. */
464
+ async getEmptyText() {
465
+ const empty = await this.locatorForOptional('.wr-table__empty')();
466
+ return empty ? wrTableHarnessText(await empty.text()) : null;
467
+ }
468
+ /**
469
+ * The row count the table announces (`aria-rowcount` — header and summary row
470
+ * included), or `null` when it is not virtualized and every row is in the DOM.
471
+ */
472
+ async getAriaRowCount() {
473
+ const count = await (await this.tableEl()).getAttribute('aria-rowcount');
474
+ return count === null ? null : Number.parseInt(count, 10);
475
+ }
476
+ /** Whether the header offers a select-all box — only `rowSelection="multiple"` does. */
477
+ async hasSelectAll() {
478
+ return (await this.selectAllBox()) !== null;
479
+ }
480
+ /** Whether every row in the select-all scope is selected — see {@link toggleSelectAll}. */
481
+ async isAllSelected() {
482
+ return (await this.selectAllHost()).getProperty('checked');
483
+ }
484
+ /**
485
+ * Whether some rows are selected and others are not — the box's third state.
486
+ *
487
+ * `indeterminate` is a DOM PROPERTY, not an attribute: reading the attribute
488
+ * reports `null` for a box that is visibly dashed.
489
+ */
490
+ async isPartiallySelected() {
491
+ return (await this.selectAllHost()).getProperty('indeterminate');
492
+ }
493
+ /**
494
+ * Click the select-all box, once.
495
+ *
496
+ * Its scope is the rows the table RENDERS — the current page, and a collapsed
497
+ * group's rows are out because collapsing drops them from that list. A
498
+ * virtualized table's off-window rows are IN, though: the window is a slice
499
+ * taken after the list is built, so one click selects the whole dataset and not
500
+ * just what is in the DOM. And the third state is worth knowing about before
501
+ * asserting: while the selection is partial the box reads unchecked, so one
502
+ * click selects everything rather than clearing it.
503
+ */
504
+ async toggleSelectAll() {
505
+ await (await this.selectAllHost()).click();
506
+ }
507
+ /**
508
+ * The text of each open detail row, in row order.
509
+ *
510
+ * A detail row is a full-width `<tr>` NEXT TO the row it belongs to, not inside
511
+ * it — which is why it is neither one of {@link getRows} nor one of a row's
512
+ * cells.
513
+ */
514
+ async getDetailTexts() {
515
+ const details = await this.locatorForAll('.wr-table__detail')();
516
+ return Promise.all(details.map(async (detail) => wrTableHarnessText(await detail.text())));
517
+ }
518
+ /**
519
+ * The group band labels, in order.
520
+ *
521
+ * Empty when `groupBy` is off — and also when a `[wrTableGroupHeader]` template
522
+ * replaced the built-in band, since the label is then the consumer's own markup.
523
+ * Reach for that through {@link getRows}' siblings or your own component's
524
+ * harness.
525
+ */
526
+ async getGroupLabels() {
527
+ const labels = await this.locatorForAll('.wr-table__group-label')();
528
+ return Promise.all(labels.map(label => label.text()));
529
+ }
530
+ /** Whether the band with this label is collapsed. */
531
+ async isGroupCollapsed(label) {
532
+ const toggle = await this.groupToggleFor(label);
533
+ return (await toggle.getAttribute('aria-expanded')) === 'false';
534
+ }
535
+ /** Collapse or expand the band with this label. */
536
+ async toggleGroup(label) {
537
+ await (await this.groupToggleFor(label)).click();
538
+ }
539
+ /** The header for a column title, or a failure that says which titles do exist. */
540
+ async headerCellFor(columnTitle) {
541
+ const [header] = await this.getHeaderCells({ text: columnTitle });
542
+ if (!header) {
543
+ const titles = await this.getHeaderTexts();
544
+ throw new Error(`WrTableHarness: no column headed "${columnTitle}". Columns are addressed by their title, ` +
545
+ `not by their key — this table shows [${titles.join(', ')}].`);
546
+ }
547
+ return header;
548
+ }
549
+ /**
550
+ * The collapse toggle of one band.
551
+ *
552
+ * Paired by index rather than by containment: both lists are emitted once per
553
+ * band by the same loop, in the same order, and a `TestElement` cannot be
554
+ * queried into.
555
+ */
556
+ async groupToggleFor(label) {
557
+ const index = (await this.getGroupLabels()).indexOf(label);
558
+ if (index < 0) {
559
+ throw new Error(`WrTableHarness: no group band labelled "${label}" — is \`groupBy\` set, and is the band the ` +
560
+ 'built-in one rather than a `[wrTableGroupHeader]` template?');
561
+ }
562
+ return (await this.locatorForAll('.wr-table__group-toggle')())[index];
563
+ }
564
+ /** The select-all input, or a failure naming both reasons it is missing. */
565
+ async selectAllHost() {
566
+ const box = await this.selectAllBox();
567
+ if (!box) {
568
+ throw new Error('WrTableHarness: this table has no select-all box — `rowSelection` is off, or it is ' +
569
+ "'single', which has no select-all by design.");
570
+ }
571
+ return box;
572
+ }
573
+ }
574
+
575
+ /**
576
+ * Generated bundle index. Do not edit.
577
+ */
578
+
579
+ export { WrTableCellHarness, WrTableHarness, WrTableHeaderCellHarness, WrTableRowHarness };
580
+ //# sourceMappingURL=ngwr-table-testing.mjs.map