ngwr 10.2.0 → 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 (471) 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 +38 -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 +15 -5
  19. package/fesm2022/ngwr-action-sheet.mjs.map +1 -1
  20. package/fesm2022/ngwr-affix.mjs +43 -16
  21. package/fesm2022/ngwr-affix.mjs.map +1 -1
  22. package/fesm2022/ngwr-alert.mjs +3 -3
  23. package/fesm2022/ngwr-anchor.mjs +20 -8
  24. package/fesm2022/ngwr-anchor.mjs.map +1 -1
  25. package/fesm2022/ngwr-aurora.mjs +4 -4
  26. package/fesm2022/ngwr-aurora.mjs.map +1 -1
  27. package/fesm2022/ngwr-avatar.mjs +33 -9
  28. package/fesm2022/ngwr-avatar.mjs.map +1 -1
  29. package/fesm2022/ngwr-back-top.mjs +8 -4
  30. package/fesm2022/ngwr-back-top.mjs.map +1 -1
  31. package/fesm2022/ngwr-badge.mjs +6 -6
  32. package/fesm2022/ngwr-badge.mjs.map +1 -1
  33. package/fesm2022/ngwr-bar-chart.mjs +32 -11
  34. package/fesm2022/ngwr-bar-chart.mjs.map +1 -1
  35. package/fesm2022/ngwr-blur-text.mjs +4 -4
  36. package/fesm2022/ngwr-blur-text.mjs.map +1 -1
  37. package/fesm2022/ngwr-border-glow.mjs +4 -4
  38. package/fesm2022/ngwr-border-glow.mjs.map +1 -1
  39. package/fesm2022/ngwr-breadcrumbs.mjs +9 -8
  40. package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
  41. package/fesm2022/ngwr-burger.mjs +11 -6
  42. package/fesm2022/ngwr-burger.mjs.map +1 -1
  43. package/fesm2022/ngwr-button-testing.mjs +96 -0
  44. package/fesm2022/ngwr-button-testing.mjs.map +1 -0
  45. package/fesm2022/ngwr-button.mjs +89 -24
  46. package/fesm2022/ngwr-button.mjs.map +1 -1
  47. package/fesm2022/ngwr-calendar-heatmap.mjs +42 -10
  48. package/fesm2022/ngwr-calendar-heatmap.mjs.map +1 -1
  49. package/fesm2022/ngwr-calendar.mjs +108 -9
  50. package/fesm2022/ngwr-calendar.mjs.map +1 -1
  51. package/fesm2022/ngwr-card.mjs +10 -10
  52. package/fesm2022/ngwr-card.mjs.map +1 -1
  53. package/fesm2022/ngwr-carousel-testing.mjs +377 -0
  54. package/fesm2022/ngwr-carousel-testing.mjs.map +1 -0
  55. package/fesm2022/ngwr-carousel.mjs +72 -18
  56. package/fesm2022/ngwr-carousel.mjs.map +1 -1
  57. package/fesm2022/ngwr-cascader-testing.mjs +534 -0
  58. package/fesm2022/ngwr-cascader-testing.mjs.map +1 -0
  59. package/fesm2022/ngwr-cascader.mjs +4 -4
  60. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  61. package/fesm2022/ngwr-checkbox-testing.mjs +90 -0
  62. package/fesm2022/ngwr-checkbox-testing.mjs.map +1 -0
  63. package/fesm2022/ngwr-checkbox.mjs +15 -9
  64. package/fesm2022/ngwr-checkbox.mjs.map +1 -1
  65. package/fesm2022/ngwr-circular-text.mjs +4 -4
  66. package/fesm2022/ngwr-circular-text.mjs.map +1 -1
  67. package/fesm2022/ngwr-click-spark.mjs +4 -4
  68. package/fesm2022/ngwr-click-spark.mjs.map +1 -1
  69. package/fesm2022/ngwr-clipboard.mjs +18 -4
  70. package/fesm2022/ngwr-clipboard.mjs.map +1 -1
  71. package/fesm2022/ngwr-collapse-testing.mjs +368 -0
  72. package/fesm2022/ngwr-collapse-testing.mjs.map +1 -0
  73. package/fesm2022/ngwr-collapse.mjs +9 -9
  74. package/fesm2022/ngwr-color-picker.mjs +139 -19
  75. package/fesm2022/ngwr-color-picker.mjs.map +1 -1
  76. package/fesm2022/ngwr-command-palette-testing.mjs +589 -0
  77. package/fesm2022/ngwr-command-palette-testing.mjs.map +1 -0
  78. package/fesm2022/ngwr-command-palette.mjs +60 -10
  79. package/fesm2022/ngwr-command-palette.mjs.map +1 -1
  80. package/fesm2022/ngwr-compare.mjs +105 -15
  81. package/fesm2022/ngwr-compare.mjs.map +1 -1
  82. package/fesm2022/ngwr-confetti.mjs +3 -3
  83. package/fesm2022/ngwr-config.mjs +106 -0
  84. package/fesm2022/ngwr-config.mjs.map +1 -0
  85. package/fesm2022/ngwr-context-menu-testing.mjs +631 -0
  86. package/fesm2022/ngwr-context-menu-testing.mjs.map +1 -0
  87. package/fesm2022/ngwr-context-menu.mjs +104 -18
  88. package/fesm2022/ngwr-context-menu.mjs.map +1 -1
  89. package/fesm2022/ngwr-cookie.mjs +8 -4
  90. package/fesm2022/ngwr-cookie.mjs.map +1 -1
  91. package/fesm2022/ngwr-counter.mjs +17 -9
  92. package/fesm2022/ngwr-counter.mjs.map +1 -1
  93. package/fesm2022/ngwr-date-adapter-fns.mjs +3 -3
  94. package/fesm2022/ngwr-date-adapter-luxon.mjs +55 -7
  95. package/fesm2022/ngwr-date-adapter-luxon.mjs.map +1 -1
  96. package/fesm2022/ngwr-date-adapter.mjs +57 -11
  97. package/fesm2022/ngwr-date-adapter.mjs.map +1 -1
  98. package/fesm2022/ngwr-date-picker-testing.mjs +766 -0
  99. package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -0
  100. package/fesm2022/ngwr-date-picker.mjs +409 -57
  101. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  102. package/fesm2022/ngwr-decrypt-text.mjs +30 -12
  103. package/fesm2022/ngwr-decrypt-text.mjs.map +1 -1
  104. package/fesm2022/ngwr-density.mjs +6 -6
  105. package/fesm2022/ngwr-descriptions.mjs +6 -6
  106. package/fesm2022/ngwr-dialog-testing.mjs +89 -0
  107. package/fesm2022/ngwr-dialog-testing.mjs.map +1 -0
  108. package/fesm2022/ngwr-dialog.mjs +33 -17
  109. package/fesm2022/ngwr-dialog.mjs.map +1 -1
  110. package/fesm2022/ngwr-directives.mjs +48 -24
  111. package/fesm2022/ngwr-directives.mjs.map +1 -1
  112. package/fesm2022/ngwr-divider.mjs +3 -3
  113. package/fesm2022/ngwr-donut-chart.mjs +24 -7
  114. package/fesm2022/ngwr-donut-chart.mjs.map +1 -1
  115. package/fesm2022/ngwr-drag-drop.mjs +7 -7
  116. package/fesm2022/ngwr-drag-drop.mjs.map +1 -1
  117. package/fesm2022/ngwr-drawer-testing.mjs +250 -0
  118. package/fesm2022/ngwr-drawer-testing.mjs.map +1 -0
  119. package/fesm2022/ngwr-drawer.mjs +37 -19
  120. package/fesm2022/ngwr-drawer.mjs.map +1 -1
  121. package/fesm2022/ngwr-dropdown-testing.mjs +291 -0
  122. package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -0
  123. package/fesm2022/ngwr-dropdown.mjs +19 -11
  124. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  125. package/fesm2022/ngwr-empty.mjs +26 -9
  126. package/fesm2022/ngwr-empty.mjs.map +1 -1
  127. package/fesm2022/ngwr-event-calendar.mjs +62 -15
  128. package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
  129. package/fesm2022/ngwr-falling-text.mjs +4 -4
  130. package/fesm2022/ngwr-falling-text.mjs.map +1 -1
  131. package/fesm2022/ngwr-file-upload-testing.mjs +332 -0
  132. package/fesm2022/ngwr-file-upload-testing.mjs.map +1 -0
  133. package/fesm2022/ngwr-file-upload.mjs +3 -3
  134. package/fesm2022/ngwr-form-testing.mjs +451 -0
  135. package/fesm2022/ngwr-form-testing.mjs.map +1 -0
  136. package/fesm2022/ngwr-form.mjs +28 -12
  137. package/fesm2022/ngwr-form.mjs.map +1 -1
  138. package/fesm2022/ngwr-fuzzy-text.mjs +11 -4
  139. package/fesm2022/ngwr-fuzzy-text.mjs.map +1 -1
  140. package/fesm2022/ngwr-gauge.mjs +21 -7
  141. package/fesm2022/ngwr-gauge.mjs.map +1 -1
  142. package/fesm2022/ngwr-glitch-text.mjs +4 -4
  143. package/fesm2022/ngwr-glitch-text.mjs.map +1 -1
  144. package/fesm2022/ngwr-gradient-text.mjs +4 -4
  145. package/fesm2022/ngwr-gradient-text.mjs.map +1 -1
  146. package/fesm2022/ngwr-hotkey.mjs +31 -10
  147. package/fesm2022/ngwr-hotkey.mjs.map +1 -1
  148. package/fesm2022/ngwr-i18n-en.mjs +61 -0
  149. package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
  150. package/fesm2022/ngwr-i18n-ru.mjs +59 -0
  151. package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
  152. package/fesm2022/ngwr-i18n.mjs +9 -9
  153. package/fesm2022/ngwr-icon.mjs +6 -6
  154. package/fesm2022/ngwr-image-cropper.mjs +26 -3
  155. package/fesm2022/ngwr-image-cropper.mjs.map +1 -1
  156. package/fesm2022/ngwr-input-number-testing.mjs +306 -0
  157. package/fesm2022/ngwr-input-number-testing.mjs.map +1 -0
  158. package/fesm2022/ngwr-input-number.mjs +37 -5
  159. package/fesm2022/ngwr-input-number.mjs.map +1 -1
  160. package/fesm2022/ngwr-input-otp-testing.mjs +419 -0
  161. package/fesm2022/ngwr-input-otp-testing.mjs.map +1 -0
  162. package/fesm2022/ngwr-input-otp.mjs +39 -8
  163. package/fesm2022/ngwr-input-otp.mjs.map +1 -1
  164. package/fesm2022/ngwr-input-testing.mjs +102 -0
  165. package/fesm2022/ngwr-input-testing.mjs.map +1 -0
  166. package/fesm2022/ngwr-input.mjs +62 -25
  167. package/fesm2022/ngwr-input.mjs.map +1 -1
  168. package/fesm2022/ngwr-keyboard.mjs +3 -3
  169. package/fesm2022/ngwr-knob.mjs +46 -10
  170. package/fesm2022/ngwr-knob.mjs.map +1 -1
  171. package/fesm2022/ngwr-layout.mjs +36 -20
  172. package/fesm2022/ngwr-layout.mjs.map +1 -1
  173. package/fesm2022/ngwr-lightbox.mjs +35 -8
  174. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  175. package/fesm2022/ngwr-line-chart.mjs +19 -6
  176. package/fesm2022/ngwr-line-chart.mjs.map +1 -1
  177. package/fesm2022/ngwr-list.mjs +14 -9
  178. package/fesm2022/ngwr-list.mjs.map +1 -1
  179. package/fesm2022/ngwr-loading-bar.mjs +71 -31
  180. package/fesm2022/ngwr-loading-bar.mjs.map +1 -1
  181. package/fesm2022/ngwr-markdown-testing.mjs +516 -0
  182. package/fesm2022/ngwr-markdown-testing.mjs.map +1 -0
  183. package/fesm2022/ngwr-markdown.mjs +1492 -0
  184. package/fesm2022/ngwr-markdown.mjs.map +1 -0
  185. package/fesm2022/ngwr-marquee.mjs +19 -8
  186. package/fesm2022/ngwr-marquee.mjs.map +1 -1
  187. package/fesm2022/ngwr-media.mjs +3 -3
  188. package/fesm2022/ngwr-mention-testing.mjs +513 -0
  189. package/fesm2022/ngwr-mention-testing.mjs.map +1 -0
  190. package/fesm2022/ngwr-mention.mjs +16 -7
  191. package/fesm2022/ngwr-mention.mjs.map +1 -1
  192. package/fesm2022/ngwr-meta.mjs +28 -13
  193. package/fesm2022/ngwr-meta.mjs.map +1 -1
  194. package/fesm2022/ngwr-meter-group.mjs +22 -8
  195. package/fesm2022/ngwr-meter-group.mjs.map +1 -1
  196. package/fesm2022/ngwr-overlay.mjs +57 -8
  197. package/fesm2022/ngwr-overlay.mjs.map +1 -1
  198. package/fesm2022/ngwr-page-header.mjs +3 -3
  199. package/fesm2022/ngwr-pagination-testing.mjs +389 -0
  200. package/fesm2022/ngwr-pagination-testing.mjs.map +1 -0
  201. package/fesm2022/ngwr-pagination.mjs +27 -11
  202. package/fesm2022/ngwr-pagination.mjs.map +1 -1
  203. package/fesm2022/ngwr-pipes.mjs +21 -21
  204. package/fesm2022/ngwr-platform.mjs +9 -9
  205. package/fesm2022/ngwr-popconfirm-testing.mjs +309 -0
  206. package/fesm2022/ngwr-popconfirm-testing.mjs.map +1 -0
  207. package/fesm2022/ngwr-popconfirm.mjs +99 -21
  208. package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
  209. package/fesm2022/ngwr-popover-testing.mjs +316 -0
  210. package/fesm2022/ngwr-popover-testing.mjs.map +1 -0
  211. package/fesm2022/ngwr-popover.mjs +48 -10
  212. package/fesm2022/ngwr-popover.mjs.map +1 -1
  213. package/fesm2022/ngwr-progress.mjs +3 -3
  214. package/fesm2022/ngwr-pull-to-refresh.mjs +19 -4
  215. package/fesm2022/ngwr-pull-to-refresh.mjs.map +1 -1
  216. package/fesm2022/ngwr-qr.mjs +15 -5
  217. package/fesm2022/ngwr-qr.mjs.map +1 -1
  218. package/fesm2022/ngwr-radio-testing.mjs +392 -0
  219. package/fesm2022/ngwr-radio-testing.mjs.map +1 -0
  220. package/fesm2022/ngwr-radio.mjs +16 -9
  221. package/fesm2022/ngwr-radio.mjs.map +1 -1
  222. package/fesm2022/ngwr-rating-testing.mjs +384 -0
  223. package/fesm2022/ngwr-rating-testing.mjs.map +1 -0
  224. package/fesm2022/ngwr-rating.mjs +40 -5
  225. package/fesm2022/ngwr-rating.mjs.map +1 -1
  226. package/fesm2022/ngwr-result.mjs +12 -12
  227. package/fesm2022/ngwr-rotating-text.mjs +3 -3
  228. package/fesm2022/ngwr-scroll.mjs +3 -3
  229. package/fesm2022/ngwr-segmented-testing.mjs +512 -0
  230. package/fesm2022/ngwr-segmented-testing.mjs.map +1 -0
  231. package/fesm2022/ngwr-segmented.mjs +3 -3
  232. package/fesm2022/ngwr-select-testing.mjs +268 -0
  233. package/fesm2022/ngwr-select-testing.mjs.map +1 -0
  234. package/fesm2022/ngwr-select.mjs +96 -25
  235. package/fesm2022/ngwr-select.mjs.map +1 -1
  236. package/fesm2022/ngwr-shiny-text.mjs +7 -7
  237. package/fesm2022/ngwr-shiny-text.mjs.map +1 -1
  238. package/fesm2022/ngwr-sidebar.mjs +67 -14
  239. package/fesm2022/ngwr-sidebar.mjs.map +1 -1
  240. package/fesm2022/ngwr-skeleton.mjs +3 -3
  241. package/fesm2022/ngwr-slider-testing.mjs +478 -0
  242. package/fesm2022/ngwr-slider-testing.mjs.map +1 -0
  243. package/fesm2022/ngwr-slider.mjs +59 -15
  244. package/fesm2022/ngwr-slider.mjs.map +1 -1
  245. package/fesm2022/ngwr-sparkline.mjs +28 -8
  246. package/fesm2022/ngwr-sparkline.mjs.map +1 -1
  247. package/fesm2022/ngwr-speed-dial.mjs +39 -6
  248. package/fesm2022/ngwr-speed-dial.mjs.map +1 -1
  249. package/fesm2022/ngwr-spinner.mjs +14 -5
  250. package/fesm2022/ngwr-spinner.mjs.map +1 -1
  251. package/fesm2022/ngwr-splash-cursor.mjs +4 -4
  252. package/fesm2022/ngwr-splash-cursor.mjs.map +1 -1
  253. package/fesm2022/ngwr-split-text.mjs +4 -4
  254. package/fesm2022/ngwr-split-text.mjs.map +1 -1
  255. package/fesm2022/ngwr-splitter.mjs +72 -11
  256. package/fesm2022/ngwr-splitter.mjs.map +1 -1
  257. package/fesm2022/ngwr-spotlight-card.mjs +7 -7
  258. package/fesm2022/ngwr-spotlight-card.mjs.map +1 -1
  259. package/fesm2022/ngwr-squircle.mjs +6 -6
  260. package/fesm2022/ngwr-star-border.mjs +4 -4
  261. package/fesm2022/ngwr-star-border.mjs.map +1 -1
  262. package/fesm2022/ngwr-statistic.mjs +33 -16
  263. package/fesm2022/ngwr-statistic.mjs.map +1 -1
  264. package/fesm2022/ngwr-stepper-testing.mjs +477 -0
  265. package/fesm2022/ngwr-stepper-testing.mjs.map +1 -0
  266. package/fesm2022/ngwr-stepper.mjs +6 -6
  267. package/fesm2022/ngwr-storage.mjs +27 -17
  268. package/fesm2022/ngwr-storage.mjs.map +1 -1
  269. package/fesm2022/ngwr-switch-testing.mjs +77 -0
  270. package/fesm2022/ngwr-switch-testing.mjs.map +1 -0
  271. package/fesm2022/ngwr-switch.mjs +12 -6
  272. package/fesm2022/ngwr-switch.mjs.map +1 -1
  273. package/fesm2022/ngwr-table-testing.mjs +580 -0
  274. package/fesm2022/ngwr-table-testing.mjs.map +1 -0
  275. package/fesm2022/ngwr-table.mjs +105 -44
  276. package/fesm2022/ngwr-table.mjs.map +1 -1
  277. package/fesm2022/ngwr-tabs-testing.mjs +617 -0
  278. package/fesm2022/ngwr-tabs-testing.mjs.map +1 -0
  279. package/fesm2022/ngwr-tabs.mjs +44 -12
  280. package/fesm2022/ngwr-tabs.mjs.map +1 -1
  281. package/fesm2022/ngwr-textarea-testing.mjs +238 -0
  282. package/fesm2022/ngwr-textarea-testing.mjs.map +1 -0
  283. package/fesm2022/ngwr-textarea.mjs +35 -7
  284. package/fesm2022/ngwr-textarea.mjs.map +1 -1
  285. package/fesm2022/ngwr-theme.mjs +3 -3
  286. package/fesm2022/ngwr-tilt-card.mjs +7 -7
  287. package/fesm2022/ngwr-tilt-card.mjs.map +1 -1
  288. package/fesm2022/ngwr-timeline.mjs +6 -6
  289. package/fesm2022/ngwr-toast-testing.mjs +101 -0
  290. package/fesm2022/ngwr-toast-testing.mjs.map +1 -0
  291. package/fesm2022/ngwr-toast.mjs +55 -21
  292. package/fesm2022/ngwr-toast.mjs.map +1 -1
  293. package/fesm2022/ngwr-toolbar.mjs +3 -3
  294. package/fesm2022/ngwr-tour.mjs +67 -15
  295. package/fesm2022/ngwr-tour.mjs.map +1 -1
  296. package/fesm2022/ngwr-transfer-testing.mjs +538 -0
  297. package/fesm2022/ngwr-transfer-testing.mjs.map +1 -0
  298. package/fesm2022/ngwr-transfer.mjs +47 -16
  299. package/fesm2022/ngwr-transfer.mjs.map +1 -1
  300. package/fesm2022/ngwr-tree-testing.mjs +734 -0
  301. package/fesm2022/ngwr-tree-testing.mjs.map +1 -0
  302. package/fesm2022/ngwr-tree.mjs +75 -9
  303. package/fesm2022/ngwr-tree.mjs.map +1 -1
  304. package/fesm2022/ngwr-typewriter.mjs +7 -5
  305. package/fesm2022/ngwr-typewriter.mjs.map +1 -1
  306. package/fesm2022/ngwr-typography.mjs +3 -3
  307. package/fesm2022/ngwr-version.mjs +1 -1
  308. package/fesm2022/ngwr-version.mjs.map +1 -1
  309. package/fesm2022/ngwr-virtual-scroll.mjs +33 -7
  310. package/fesm2022/ngwr-virtual-scroll.mjs.map +1 -1
  311. package/fesm2022/ngwr-waves.mjs +5 -5
  312. package/fesm2022/ngwr-waves.mjs.map +1 -1
  313. package/fesm2022/ngwr-window.mjs +88 -18
  314. package/fesm2022/ngwr-window.mjs.map +1 -1
  315. package/gauge/styles/_index.scss +1 -1
  316. package/glitch-text/styles/_index.scss +4 -0
  317. package/i18n/en.json +56 -0
  318. package/i18n/ru.json +56 -0
  319. package/image-cropper/styles/_index.scss +13 -1
  320. package/input/styles/_index.scss +2 -2
  321. package/input-number/styles/_index.scss +7 -2
  322. package/knob/styles/_index.scss +8 -1
  323. package/layout/styles/_index.scss +3 -3
  324. package/lightbox/styles/_index.scss +10 -2
  325. package/line-chart/styles/_index.scss +6 -0
  326. package/llms-full.txt +151 -4
  327. package/llms.txt +57 -8
  328. package/loading-bar/styles/_index.scss +1 -2
  329. package/markdown/styles/_index.scss +296 -0
  330. package/marquee/styles/_index.scss +12 -0
  331. package/mcp/api.js +512 -0
  332. package/mcp/catalog.js +157 -0
  333. package/mcp/server.js +273 -0
  334. package/mcp/tools.js +366 -0
  335. package/meter-group/styles/_index.scss +1 -1
  336. package/package.json +186 -35
  337. package/pagination/styles/_index.scss +6 -6
  338. package/popover/styles/_index.scss +37 -5
  339. package/rating/styles/_index.scss +10 -0
  340. package/schematics/use/symbol-map.json +2 -0
  341. package/segmented/styles/_index.scss +7 -0
  342. package/select/styles/_index.scss +29 -9
  343. package/sidebar/styles/_index.scss +30 -5
  344. package/slider/styles/_index.scss +15 -0
  345. package/speed-dial/styles/_index.scss +20 -0
  346. package/split-text/styles/_index.scss +13 -0
  347. package/star-border/styles/_index.scss +2 -0
  348. package/stepper/styles/_index.scss +1 -1
  349. package/styles/_grid.scss +4 -4
  350. package/styles.scss +1 -0
  351. package/switch/styles/_index.scss +5 -3
  352. package/table/styles/_index.scss +22 -11
  353. package/tabs/styles/_index.scss +11 -1
  354. package/textarea/styles/_index.scss +5 -0
  355. package/theme/styles/_colors.scss +29 -13
  356. package/theme/styles/_dark.scss +11 -3
  357. package/theme/styles/_mixins.scss +3 -0
  358. package/timeline/styles/_index.scss +2 -2
  359. package/toast/styles/_index.scss +17 -8
  360. package/toolbar/styles/_index.scss +3 -3
  361. package/tour/styles/_index.scss +7 -1
  362. package/tree/styles/_index.scss +5 -3
  363. package/types/ngwr-action-sheet.d.ts +9 -1
  364. package/types/ngwr-affix.d.ts +7 -1
  365. package/types/ngwr-anchor.d.ts +8 -1
  366. package/types/ngwr-avatar.d.ts +13 -3
  367. package/types/ngwr-bar-chart.d.ts +16 -0
  368. package/types/ngwr-burger.d.ts +6 -2
  369. package/types/ngwr-button-testing.d.ts +85 -0
  370. package/types/ngwr-button.d.ts +58 -10
  371. package/types/ngwr-calendar-heatmap.d.ts +16 -2
  372. package/types/ngwr-calendar.d.ts +37 -1
  373. package/types/ngwr-carousel-testing.d.ts +257 -0
  374. package/types/ngwr-carousel.d.ts +20 -4
  375. package/types/ngwr-cascader-testing.d.ts +392 -0
  376. package/types/ngwr-checkbox-testing.d.ts +77 -0
  377. package/types/ngwr-checkbox.d.ts +7 -2
  378. package/types/ngwr-clipboard.d.ts +8 -1
  379. package/types/ngwr-collapse-testing.d.ts +290 -0
  380. package/types/ngwr-color-picker.d.ts +20 -11
  381. package/types/ngwr-command-palette-testing.d.ts +437 -0
  382. package/types/ngwr-command-palette.d.ts +25 -2
  383. package/types/ngwr-compare.d.ts +50 -2
  384. package/types/ngwr-config.d.ts +176 -0
  385. package/types/ngwr-context-menu-testing.d.ts +401 -0
  386. package/types/ngwr-context-menu.d.ts +65 -17
  387. package/types/ngwr-counter.d.ts +6 -1
  388. package/types/ngwr-date-adapter-luxon.d.ts +26 -0
  389. package/types/ngwr-date-picker-testing.d.ts +518 -0
  390. package/types/ngwr-date-picker.d.ts +128 -8
  391. package/types/ngwr-dialog-testing.d.ts +79 -0
  392. package/types/ngwr-dialog.d.ts +13 -0
  393. package/types/ngwr-directives.d.ts +10 -1
  394. package/types/ngwr-donut-chart.d.ts +8 -1
  395. package/types/ngwr-drawer-testing.d.ts +196 -0
  396. package/types/ngwr-drawer.d.ts +15 -0
  397. package/types/ngwr-dropdown-testing.d.ts +202 -0
  398. package/types/ngwr-dropdown.d.ts +7 -1
  399. package/types/ngwr-empty.d.ts +19 -4
  400. package/types/ngwr-event-calendar.d.ts +26 -1
  401. package/types/ngwr-file-upload-testing.d.ts +194 -0
  402. package/types/ngwr-form-testing.d.ts +379 -0
  403. package/types/ngwr-form.d.ts +17 -0
  404. package/types/ngwr-gauge.d.ts +13 -1
  405. package/types/ngwr-hotkey.d.ts +2 -0
  406. package/types/ngwr-image-cropper.d.ts +10 -0
  407. package/types/ngwr-input-number-testing.d.ts +226 -0
  408. package/types/ngwr-input-number.d.ts +29 -1
  409. package/types/ngwr-input-otp-testing.d.ts +299 -0
  410. package/types/ngwr-input-otp.d.ts +23 -2
  411. package/types/ngwr-input-testing.d.ts +84 -0
  412. package/types/ngwr-input.d.ts +20 -6
  413. package/types/ngwr-knob.d.ts +18 -0
  414. package/types/ngwr-layout.d.ts +1 -0
  415. package/types/ngwr-lightbox.d.ts +17 -3
  416. package/types/ngwr-line-chart.d.ts +9 -2
  417. package/types/ngwr-list.d.ts +7 -2
  418. package/types/ngwr-loading-bar.d.ts +4 -7
  419. package/types/ngwr-markdown-testing.d.ts +462 -0
  420. package/types/ngwr-markdown.d.ts +534 -0
  421. package/types/ngwr-marquee.d.ts +12 -2
  422. package/types/ngwr-mention-testing.d.ts +359 -0
  423. package/types/ngwr-meta.d.ts +4 -2
  424. package/types/ngwr-meter-group.d.ts +11 -1
  425. package/types/ngwr-overlay.d.ts +33 -2
  426. package/types/ngwr-pagination-testing.d.ts +291 -0
  427. package/types/ngwr-pagination.d.ts +7 -1
  428. package/types/ngwr-popconfirm-testing.d.ts +235 -0
  429. package/types/ngwr-popconfirm.d.ts +31 -21
  430. package/types/ngwr-popover-testing.d.ts +221 -0
  431. package/types/ngwr-popover.d.ts +19 -2
  432. package/types/ngwr-pull-to-refresh.d.ts +7 -0
  433. package/types/ngwr-qr.d.ts +9 -1
  434. package/types/ngwr-radio-testing.d.ts +296 -0
  435. package/types/ngwr-radio.d.ts +8 -2
  436. package/types/ngwr-rating-testing.d.ts +291 -0
  437. package/types/ngwr-rating.d.ts +23 -0
  438. package/types/ngwr-segmented-testing.d.ts +401 -0
  439. package/types/ngwr-select-testing.d.ts +175 -0
  440. package/types/ngwr-select.d.ts +45 -4
  441. package/types/ngwr-sidebar.d.ts +17 -2
  442. package/types/ngwr-slider-testing.d.ts +329 -0
  443. package/types/ngwr-slider.d.ts +35 -1
  444. package/types/ngwr-sparkline.d.ts +12 -2
  445. package/types/ngwr-speed-dial.d.ts +17 -18
  446. package/types/ngwr-spinner.d.ts +8 -1
  447. package/types/ngwr-splitter.d.ts +24 -1
  448. package/types/ngwr-statistic.d.ts +12 -2
  449. package/types/ngwr-stepper-testing.d.ts +346 -0
  450. package/types/ngwr-storage.d.ts +10 -1
  451. package/types/ngwr-switch-testing.d.ts +66 -0
  452. package/types/ngwr-switch.d.ts +7 -2
  453. package/types/ngwr-table-testing.d.ts +423 -0
  454. package/types/ngwr-table.d.ts +42 -0
  455. package/types/ngwr-tabs-testing.d.ts +470 -0
  456. package/types/ngwr-tabs.d.ts +9 -0
  457. package/types/ngwr-textarea-testing.d.ts +184 -0
  458. package/types/ngwr-textarea.d.ts +7 -2
  459. package/types/ngwr-toast-testing.d.ts +80 -0
  460. package/types/ngwr-toast.d.ts +19 -4
  461. package/types/ngwr-tour.d.ts +27 -0
  462. package/types/ngwr-transfer-testing.d.ts +444 -0
  463. package/types/ngwr-transfer.d.ts +16 -1
  464. package/types/ngwr-tree-testing.d.ts +501 -0
  465. package/types/ngwr-tree.d.ts +33 -0
  466. package/types/ngwr-version.d.ts +1 -1
  467. package/types/ngwr-virtual-scroll.d.ts +13 -1
  468. package/types/ngwr-window.d.ts +23 -2
  469. package/typewriter/styles/_index.scss +1 -1
  470. package/typography/styles/_index.scss +1 -1
  471. package/window/styles/_index.scss +32 -9
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngwr-segmented-testing.mjs","sources":["../../../projects/lib/segmented/testing/wr-segmented-option-harness.ts","../../../projects/lib/segmented/testing/wr-segmented-harness.ts","../../../projects/lib/segmented/testing/ngwr-segmented-testing.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 { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport type { WrSegmentedOptionHarnessFilters } from './interfaces';\n\n/**\n * Test harness for one segment of a `<wr-segmented>` — an option, not a control.\n *\n * A segment is a real `<button type=\"button\">` carrying `aria-pressed`, so it is a\n * TOGGLE BUTTON to a screen reader: it announces its own pressed state and its own\n * name, and it is its own tab stop. That is why this exists as a harness of its own,\n * and why the questions below are worth asking per segment rather than in bulk on\n * `WrSegmentedHarness` — which is where the SELECTION lives.\n *\n * Three name-shaped methods, because a segment has three different names and only\n * one of them is what a person hears:\n *\n * - {@link getText} — the visible label, `null` for an icon-only segment.\n * - {@link getAccessibleName} — what is announced, `null` when nothing names it.\n * - {@link getLabel} — the same, but it refuses to answer `null`, so a spec\n * addressing segments by label fails where the mistake is rather than three\n * lines later.\n *\n * @example\n * ```ts\n * const segmented = await loader.getHarness(WrSegmentedHarness);\n * const [, week] = await segmented.getOptions();\n *\n * await week.select();\n * expect(await week.isSelected()).toBe(true);\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrSegmentedOptionHarness extends ComponentHarness {\n /** The segment is a plain `<button>` — the BEM class is what identifies it. */\n static hostSelector = '.wr-segmented__option';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrSegmentedOptionHarnessFilters = {}): HarnessPredicate<WrSegmentedOptionHarness> {\n return (\n new HarnessPredicate(WrSegmentedOptionHarness, options)\n // Matched on the nullable name, not on `getLabel()`: a predicate runs against\n // EVERY segment, so one unnamed sibling would otherwise throw a query for the\n // others out of the water.\n .addOption('label', options.label, (harness, label) =>\n HarnessPredicate.stringMatches(harness.getAccessibleName(), label)\n )\n .addOption('selected', options.selected, async (harness, selected) => (await harness.isSelected()) === selected)\n .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled)\n );\n }\n\n private readonly labelText = this.locatorForOptional('.wr-segmented__label');\n private readonly icon = this.locatorForOptional('.wr-segmented__icon');\n\n /**\n * The visible label, or `null` for an icon-only segment.\n *\n * `null` rather than `''`: the label element is only rendered when the option\n * carries a `label`, and \"no text at all\" and \"an empty label\" are different\n * mistakes to be looking at.\n */\n async getText(): Promise<string | null> {\n const label = await this.labelText();\n return label ? label.text() : null;\n }\n\n /**\n * The name a screen reader announces for this segment, or `null` when nothing\n * names it.\n *\n * The component's own fallback chain, read back off the page: a labelled segment\n * is named by its text and carries no `aria-label`; an icon-only one is named by\n * `aria-label`, which the template fills from the option's `ariaLabel` or — as a\n * last resort — from its stringified `value`.\n *\n * `null` is a finding, not a detail: an icon-only segment whose option supplied\n * neither an `ariaLabel` nor a stringifiable value is announced as a bare unnamed\n * button.\n */\n async getAccessibleName(): Promise<string | null> {\n const text = await this.getText();\n if (text !== null) return text;\n return (await this.host()).getAttribute('aria-label');\n }\n\n /**\n * The segment's accessible name, for addressing it — and a targeted failure when\n * it has none.\n *\n * {@link getAccessibleName} is the same answer without the refusal; use that one\n * when `null` is what a spec is checking for.\n */\n async getLabel(): Promise<string> {\n const name = await this.getAccessibleName();\n if (name === null) {\n throw new Error(\n 'WrSegmentedOptionHarness.getLabel(): this segment has no name — it renders no label and carries no ' +\n '`aria-label`, so a screen reader announces an unnamed button. Give the option a `label`, or an ' +\n '`ariaLabel` when it is icon-only.'\n );\n }\n return name;\n }\n\n /**\n * Whether this segment is the control's current answer.\n *\n * From `aria-pressed`, in preference to the `wr-segmented__option--selected`\n * class: both are public and they move together, but the class only recolours the\n * label while the attribute is the entire state a screen reader is given.\n */\n async isSelected(): Promise<boolean> {\n return (await (await this.host()).getAttribute('aria-pressed')) === 'true';\n }\n\n /**\n * Whether the segment refuses selection — for either reason.\n *\n * The native `disabled` PROPERTY, which is what actually blocks activation. The\n * option's own `disabled` and the whole control's land on it identically, and from\n * outside they are the same thing: this segment cannot be picked. Ask\n * `WrSegmentedHarness.isDisabled()` for which of the two it was.\n */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).getProperty<boolean>('disabled');\n }\n\n /** Whether the segment renders an icon beside (or instead of) its label. */\n async hasIcon(): Promise<boolean> {\n return (await this.icon()) !== null;\n }\n\n /**\n * The name of the segment's icon, or `null` when it renders none.\n *\n * From `data-icon`, which `<wr-icon>` reflects. The glyph itself is markup the\n * icon registry writes into the element, and an UNREGISTERED name leaves that\n * empty — so the attribute is the only place the wiring survives, and it is the\n * one that tells \"no icon asked for\" from \"icon asked for, never registered\".\n */\n async getIconName(): Promise<string | null> {\n const icon = await this.icon();\n return icon ? icon.getAttribute('data-icon') : null;\n }\n\n /**\n * Pick this segment.\n *\n * A click, and deliberately not a keypress: activating a `<button>` from the\n * keyboard is the BROWSER's default action for Enter / Space — the component\n * implements no key handling of its own — and jsdom implements none of it either,\n * so there is nothing here for a key to drive. A no-arg CDK click needs no\n * layout, which is the other half of why this is the drivable path.\n *\n * Nothing happens when the segment is already selected (a segmented control has no\n * untoggle), and nothing happens when it is disabled — but not for the reason the\n * `pointer-events: none` on a whole disabled control suggests, which is CSS a unit\n * test never applies. The CDK's own `click()` reads the native `disabled` PROPERTY\n * and dispatches the mouse sequence WITHOUT the final `click` event, so on a\n * disabled segment the component's handler is never reached at all (measured: zero\n * click events). Either way the value does not move and this resolves quietly, so\n * assert the result rather than assume it, or reach for\n * `WrSegmentedHarness.select()`, which says which of the two it was.\n */\n async select(): Promise<void> {\n return (await this.host()).click();\n }\n\n /** Move keyboard focus to the segment. Each segment is its own tab stop. */\n async focus(): Promise<void> {\n return (await this.host()).focus();\n }\n\n /** Take focus off the segment. */\n async blur(): Promise<void> {\n return (await this.host()).blur();\n }\n\n async isFocused(): Promise<boolean> {\n return (await this.host()).isFocused();\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 { WrSegmentedSize } from 'ngwr/segmented';\n\nimport type { WrSegmentedHarnessFilters, WrSegmentedOptionHarnessFilters } from './interfaces';\nimport { WrSegmentedOptionHarness } from './wr-segmented-option-harness';\n\n/** Sizes that earn a modifier class — `md` is the default and carries none. */\nconst SIZES: readonly WrSegmentedSize[] = ['sm', 'lg'];\n\n/**\n * Test harness for `<wr-segmented>` — the root of a two-class family with\n * {@link WrSegmentedOptionHarness}.\n *\n * **What the control actually is**, because it decides everything below: not a\n * `radiogroup`, not a `tablist` and not native radios. The host is a plain\n * `role=\"group\"` and each segment is a `<button aria-pressed>` — a row of toggle\n * buttons over one value. Three consequences a spec has to know about:\n *\n * - The selection is `aria-pressed`, on exactly one segment. There is no\n * `aria-checked`, no `aria-selected`, and no \"2 of 3\" position announced.\n * - **There is no roving tab stop.** The component authors no `tabindex` and no\n * arrow-key handler, so every enabled segment is its OWN tab stop —\n * {@link getTabStopLabels} returns a list where a radiogroup or a tablist would\n * have one entry. Focus and selection are therefore independent here:\n * {@link getFocusedLabel} implies nothing about {@link getSelectedIndex}, and\n * arrowing along the strip moves neither.\n * - Activation is the browser's own default action on a button, which jsdom does not\n * implement, so {@link select} clicks — see {@link WrSegmentedOptionHarness.select}.\n *\n * **There is deliberately no `getValue()` and no selection by value.** `options` is\n * a bound array of `{ value, label, … }` and the value is a generic `T` the component\n * writes nowhere — not on the host, not on a segment. The single exception is an\n * accident rather than an addressing scheme: an icon-only option with no `ariaLabel`\n * has its value stringified into the segment's `aria-label`, which for an object\n * value reads `[object Object]`. So address segments by their label\n * ({@link select}) or by position ({@link selectAt}), and assert the picked value on\n * the host's own model — the only place it exists, and the assertion that would have\n * caught the bug anyway.\n *\n * The sliding thumb is decoration (`aria-hidden`), and the four methods that mention\n * it read what the component PUBLISHES for the stylesheet — two custom properties and\n * two modifier classes — never painted geometry, which a DOM without layout does not\n * have. {@link getThumbIndex} in particular is not the selection; it is the trap that\n * method documents.\n *\n * @example\n * ```ts\n * const range = await loader.getHarness(WrSegmentedHarness.with({ label: 'Range' }));\n *\n * expect(await range.getOptionLabels()).toEqual(['Day', 'Week', 'Month']);\n * await range.select({ label: 'Week' });\n * expect(await range.getSelectedIndex()).toBe(1);\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrSegmentedHarness extends ComponentHarness {\n static hostSelector = 'wr-segmented';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrSegmentedHarnessFilters = {}): HarnessPredicate<WrSegmentedHarness> {\n return new HarnessPredicate(WrSegmentedHarness, options)\n .addOption('label', options.label, (harness, label) =>\n HarnessPredicate.stringMatches(harness.getAccessibleName(), label)\n )\n .addOption('size', options.size, async (harness, size) => (await harness.getSize()) === size)\n .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled);\n }\n\n /**\n * The role the host announces — `group`.\n *\n * Worth pinning precisely because it is the weaker of the shapes this component\n * could have had: a `group` of toggle buttons tells a screen reader that the\n * segments belong together, and nothing more. Were this to become a `radiogroup` or\n * a `tablist`, the keyboard contract would change with it (one tab stop, arrow keys\n * moving the selection), and every spec written against {@link getTabStopLabels}\n * would need to change too.\n */\n async getRole(): Promise<string | null> {\n return (await this.host()).getAttribute('role');\n }\n\n /**\n * The control's accessible name, resolved the way a screen reader resolves it: the\n * text of every element `aria-labelledby` points at, and `aria-label` only when\n * that named nothing. `null` when the consumer wired neither.\n *\n * The order is not interchangeable — `aria-labelledby` WINS in the accessible-name\n * computation — so a control carrying both is announced by the heading it points at,\n * and reporting the `aria-label` would describe a name nobody hears.\n *\n * The component ships no label input on purpose (the question is the consumer's own\n * heading), so this is the only way to check that wiring held, and a `null` on a\n * group of three unrelated-sounding buttons is a real finding.\n */\n async getAccessibleName(): Promise<string | null> {\n const host = await this.host();\n\n const labelledBy = await host.getAttribute('aria-labelledby');\n if (labelledBy !== null) {\n // Resolved from the document root: `aria-labelledby` may point anywhere on the\n // page, and the heading above a control is normally outside it.\n const root = this.documentRootLocatorFactory();\n const texts: string[] = [];\n for (const id of labelledBy.split(/\\s+/).filter(Boolean)) {\n const target = await root.locatorForOptional(`#${id}`)();\n if (target) texts.push(await target.text());\n }\n\n // A reference that resolves to nothing names nothing, and the computation falls\n // through to `aria-label` exactly as it does in a browser.\n if (texts.length) return texts.join(' ');\n }\n\n return host.getAttribute('aria-label');\n }\n\n /** This control's own segments, in DOM order. A sibling control's are not here. */\n async getOptions(filters: WrSegmentedOptionHarnessFilters = {}): Promise<WrSegmentedOptionHarness[]> {\n return this.locatorForAll(WrSegmentedOptionHarness.with(filters))();\n }\n\n /**\n * The accessible name of every segment, in DOM order — the visible labels, with an\n * icon-only segment answering with the `aria-label` that stands in for its text.\n *\n * Throws when a segment has no name at all, rather than leaving a hole in the list:\n * see {@link WrSegmentedOptionHarness.getLabel}.\n */\n async getOptionLabels(): Promise<string[]> {\n const options = await this.getOptions();\n return Promise.all(options.map(option => option.getLabel()));\n }\n\n /** The pressed segment, or `null` when nothing is selected. */\n async getSelectedOption(): Promise<WrSegmentedOptionHarness | null> {\n const [selected] = await this.getOptions({ selected: true });\n return selected ?? null;\n }\n\n /**\n * The accessible name of the pressed segment, or `null` when nothing is selected.\n *\n * `null` is also the answer for a bound value that matches no option — the control\n * holds it, no segment is pressed, and the page shows an unanswered control. See\n * {@link getThumbIndex}, which does NOT answer `null` in that state.\n */\n async getSelectedLabel(): Promise<string | null> {\n const selected = await this.getSelectedOption();\n return selected ? selected.getLabel() : null;\n }\n\n /**\n * The position of the pressed segment, or `-1` when nothing is selected.\n *\n * Derived from `aria-pressed`, which is the selection. The other index on the page —\n * the thumb's — is not; it clamps at 0 (see {@link getThumbIndex}).\n */\n async getSelectedIndex(): Promise<number> {\n const options = await this.getOptions();\n for (let index = 0; index < options.length; index++) {\n if (await options[index].isSelected()) return index;\n }\n return -1;\n }\n\n /**\n * Pick the first segment matching the filters — this is how the control's value\n * changes.\n *\n * Throws when nothing matches, naming the segments that do exist, and throws again\n * when the segment is still unpressed afterwards. That second failure has exactly\n * two causes and reports both, because a click that quietly did nothing surfaces as\n * an unrelated assertion three lines later.\n */\n async select(filters: WrSegmentedOptionHarnessFilters): Promise<void> {\n const [option] = await this.getOptions(filters);\n if (!option) {\n throw new Error(\n `WrSegmentedHarness.select(): no segment matched ${JSON.stringify(filters)}. This control offers: ` +\n `${(await this.describeOptions()).join(', ')}.`\n );\n }\n await this.pick(option, 'select');\n }\n\n /**\n * Pick the segment at a position, counting from zero — the addressing route for an\n * icon-only strip, or for one whose labels a spec would rather not hard-code.\n *\n * Throws on an index outside the control, saying how many segments there are: an\n * off-by-one that resolved to nothing would otherwise read as \"the click did not\n * take\".\n */\n async selectAt(index: number): Promise<void> {\n const options = await this.getOptions();\n const option = options[index];\n if (!option) {\n throw new Error(\n `WrSegmentedHarness.selectAt(): index ${index} is outside this control, which has ${options.length} ` +\n `segment(s): ${(await this.describeOptions()).join(', ')}.`\n );\n }\n await this.pick(option, 'selectAt');\n }\n\n /**\n * Whether the control was disabled AS A WHOLE, from the `wr-segmented--disabled`\n * modifier.\n *\n * Deliberately not \"every segment is disabled\": a control whose options each carry\n * their own `disabled` looks identical to a user, and the modifier is the only thing\n * on the page that tells the two apart. What actually blocks a click is the native\n * `disabled` each button gets either way — ask a segment\n * ({@link WrSegmentedOptionHarness.isDisabled}) for that.\n */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).hasClass('wr-segmented--disabled');\n }\n\n /**\n * The rendered control size.\n *\n * `md` is the component's own default and earns NO modifier class, so a bare host\n * IS `md` — the absence is the answer rather than a missing one. Read from the\n * class instead of the input, which is also why this reports what was rendered:\n * unlike the form controls, `<wr-segmented>` does not resolve its size through\n * `provideWrConfig()`, so an app-wide default set there does not reach it and this\n * will say so.\n */\n async getSize(): Promise<WrSegmentedSize> {\n const host = await this.host();\n for (const size of SIZES) {\n if (await host.hasClass(`wr-segmented--${size}`)) return size;\n }\n return 'md';\n }\n\n /**\n * The accessible name of every segment a Tab press can reach, in tab order.\n *\n * A LIST, not one label, and that is the shape worth pinning: the component authors\n * no roving `tabindex`, so each enabled segment is its own tab stop and reaching the\n * third one takes three Tabs. An all-disabled control is skipped over entirely and\n * answers `[]`.\n *\n * Unnamed segments are reported as `(unnamed)` rather than throwing — a tab order is\n * still a fact worth reading on a page that has that bug in it.\n */\n async getTabStopLabels(): Promise<string[]> {\n const enabled = await this.getOptions({ disabled: false });\n return this.describe(enabled);\n }\n\n /**\n * The accessible name of the segment that currently holds focus, or `null` when\n * focus is elsewhere.\n *\n * Independent of the selection here — see the note on the class. Reported as\n * `(unnamed)` for a segment with no name, for the reason\n * {@link getTabStopLabels} gives.\n */\n async getFocusedLabel(): Promise<string | null> {\n for (const option of await this.getOptions()) {\n if (await option.isFocused()) {\n return (await option.getAccessibleName()) ?? '(unnamed)';\n }\n }\n return null;\n }\n\n /**\n * The index the component publishes for the thumb, from the\n * `--wr-segmented-thumb-index` custom property it sets inline.\n *\n * **Not the selection, and this is the difference that bites.** The property is\n * `Math.max(0, selectedIndex)`, so a control holding a value that matches no option\n * publishes `0` — the thumb parks under the FIRST segment and is hidden by\n * {@link isThumbVisible} instead of being moved out of the way. A harness that read\n * this to answer \"which segment is selected\" would report segment one for a control\n * with no selection at all. {@link getSelectedIndex} is the selection.\n *\n * It is also not where the thumb IS: the stylesheet turns this into a `translateX`,\n * and no measurement of that survives a DOM without layout. This is the input to\n * that, which is the part a unit test can honestly check.\n */\n async getThumbIndex(): Promise<number> {\n return this.thumbVar('--wr-segmented-thumb-index');\n }\n\n /**\n * The segment count the component publishes for the thumb, from\n * `--wr-segmented-thumb-count` — the divisor the stylesheet computes the thumb's\n * width with.\n *\n * Should always equal the number of segments, and the reason to ask is that nothing\n * else notices when it does not: a count that fell out of step with the options\n * leaves the thumb the wrong width and sliding to the wrong place, while every ARIA\n * state on the page stays correct. It is clamped to a minimum of `1`, so an empty\n * control reports `1` rather than dividing by zero.\n */\n async getThumbCount(): Promise<number> {\n return this.thumbVar('--wr-segmented-thumb-count');\n }\n\n /**\n * Whether the thumb is being shown at all.\n *\n * Read from the ABSENCE of the `wr-segmented--unselected` modifier, which is the\n * hook the stylesheet zeroes the thumb's opacity through. The computed opacity is\n * not the answer here — a unit test applies no stylesheet — so the public modifier\n * is the contract, and it is what tells \"parked under segment one\" from \"hidden\n * because nothing is selected\".\n */\n async isThumbVisible(): Promise<boolean> {\n return !(await (await this.host()).hasClass('wr-segmented--unselected'));\n }\n\n /**\n * Whether the thumb will animate its next move, from the `wr-segmented--mounted`\n * modifier that gates the transition.\n *\n * Not \"the thumb is animating now\": nothing about a running animation is visible to\n * a unit test. What this pins is the deliberate asymmetry — the class is added in\n * `afterNextRender`, so the FIRST snap to the initial value is instant and every\n * user-driven move after it slides. Deferred work like that only lands once the\n * fixture is stable, which every harness read already waits for.\n */\n async isThumbTransitionEnabled(): Promise<boolean> {\n return (await this.host()).hasClass('wr-segmented--mounted');\n }\n\n /** Click a segment and turn a click that did nothing into a failure that says why. */\n private async pick(option: WrSegmentedOptionHarness, caller: 'select' | 'selectAt'): Promise<void> {\n await option.select();\n\n if (!(await option.isSelected())) {\n const name = (await option.getAccessibleName()) ?? '(unnamed)';\n throw new Error(\n `WrSegmentedHarness.${caller}(): \"${name}\" is still unpressed after being clicked — either that ` +\n 'option carries `disabled` or the whole control does.'\n );\n }\n }\n\n /** Segment names for an error message, which must not throw on its way out. */\n private async describeOptions(): Promise<string[]> {\n return this.describe(await this.getOptions());\n }\n\n private async describe(options: readonly WrSegmentedOptionHarness[]): Promise<string[]> {\n return Promise.all(options.map(async option => (await option.getAccessibleName()) ?? '(unnamed)'));\n }\n\n /** One of the thumb's inline custom properties, as a number. */\n private async thumbVar(property: string): Promise<number> {\n const raw = (await (await this.host()).getCssValue(property)).trim();\n const value = Number.parseInt(raw, 10);\n if (Number.isNaN(value)) {\n throw new Error(\n `WrSegmentedHarness: could not read \\`${property}\\`, which computed to \"${raw}\". The component sets it ` +\n 'inline on the host; an environment that drops custom properties cannot answer this.'\n );\n }\n return value;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;AAKG;AAMH;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BG;AACG,MAAO,wBAAyB,SAAQ,gBAAgB,CAAA;;AAE5D,IAAA,OAAO,YAAY,GAAG,uBAAuB;;AAG7C,IAAA,OAAO,IAAI,CAAC,OAAA,GAA2C,EAAE,EAAA;AACvD,QAAA,QACE,IAAI,gBAAgB,CAAC,wBAAwB,EAAE,OAAO;;;;aAInD,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,OAAO,EAAE,KAAK,KAChD,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,iBAAiB,EAAE,EAAE,KAAK,CAAC;aAEnE,SAAS,CAAC,UAAU,EAAE,OAAO,CAAC,QAAQ,EAAE,OAAO,OAAO,EAAE,QAAQ,KAAK,CAAC,MAAM,OAAO,CAAC,UAAU,EAAE,MAAM,QAAQ;aAC9G,SAAS,CAAC,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U,EAAE,CAAC,EAAE;YAChC,MAAM,IAAI,GAAG,CAAC,MAAM,MAAM,CAAC,iBAAiB,EAAE,KAAK,WAAW;AAC9D,YAAA,MAAM,IAAI,KAAK,CACb,sBAAsB,MAAM,CAAA,KAAA,EAAQ,IAAI,CAAA,uDAAA,CAAyD;AAC/F,gBAAA,sDAAsD,CACzD;QACH;IACF;;AAGQ,IAAA,MAAM,eAAe,GAAA;QAC3B,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC;IAC/C;IAEQ,MAAM,QAAQ,CAAC,OAA4C,EAAA;QACjE,OAAO,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,OAAM,MAAM,KAAI,CAAC,MAAM,MAAM,CAAC,iBAAiB,EAAE,KAAK,WAAW,CAAC,CAAC;IACpG;;IAGQ,MAAM,QAAQ,CAAC,QAAgB,EAAA;QACrC,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,WAAW,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE;QACpE,MAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,EAAE,CAAC;AACtC,QAAA,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;AACvB,YAAA,MAAM,IAAI,KAAK,CACb,wCAAwC,QAAQ,CAAA,uBAAA,EAA0B,GAAG,CAAA,yBAAA,CAA2B;AACtG,gBAAA,qFAAqF,CACxF;QACH;AACA,QAAA,OAAO,KAAK;IACd;;;ACtXF;;AAEG;;;;"}
@@ -68,10 +68,10 @@ class WrSegmented {
68
68
  trackByValue(_, option) {
69
69
  return option.value;
70
70
  }
71
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrSegmented, deps: [], target: i0.ɵɵFactoryTarget.Component });
72
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: WrSegmented, isStandalone: true, selector: "wr-segmented", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { attributes: { "role": "group" }, properties: { "class": "classes()", "style": "thumbStyle()" } }, ngImport: i0, template: "<span class=\"wr-segmented__thumb\" aria-hidden=\"true\"></span>\n\n@for (option of options(); track option.value) {\n <button\n type=\"button\"\n class=\"wr-segmented__option\"\n [class.wr-segmented__option--selected]=\"isSelected(option)\"\n [disabled]=\"disabled() || !!option.disabled\"\n [attr.aria-pressed]=\"isSelected(option)\"\n [attr.aria-label]=\"option.label ? null : (option.ariaLabel ?? option.value)\"\n (click)=\"select(option)\"\n >\n @if (option.icon) {\n <wr-icon class=\"wr-segmented__icon\" [name]=\"option.icon\" />\n }\n @if (option.label) {\n <span class=\"wr-segmented__label\">{{ option.label }}</span>\n }\n </button>\n}\n", dependencies: [{ kind: "component", type: WrIcon, selector: "wr-icon", inputs: ["name"] }], encapsulation: i0.ViewEncapsulation.None });
71
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: WrSegmented, deps: [], target: i0.ɵɵFactoryTarget.Component });
72
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: WrSegmented, isStandalone: true, selector: "wr-segmented", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { attributes: { "role": "group" }, properties: { "class": "classes()", "style": "thumbStyle()" } }, ngImport: i0, template: "<span class=\"wr-segmented__thumb\" aria-hidden=\"true\"></span>\n\n@for (option of options(); track option.value) {\n <button\n type=\"button\"\n class=\"wr-segmented__option\"\n [class.wr-segmented__option--selected]=\"isSelected(option)\"\n [disabled]=\"disabled() || !!option.disabled\"\n [attr.aria-pressed]=\"isSelected(option)\"\n [attr.aria-label]=\"option.label ? null : (option.ariaLabel ?? option.value)\"\n (click)=\"select(option)\"\n >\n @if (option.icon) {\n <wr-icon class=\"wr-segmented__icon\" [name]=\"option.icon\" />\n }\n @if (option.label) {\n <span class=\"wr-segmented__label\">{{ option.label }}</span>\n }\n </button>\n}\n", dependencies: [{ kind: "component", type: WrIcon, selector: "wr-icon", inputs: ["name"] }], encapsulation: i0.ViewEncapsulation.None });
73
73
  }
74
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrSegmented, decorators: [{
74
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: WrSegmented, decorators: [{
75
75
  type: Component,
76
76
  args: [{ selector: 'wr-segmented', encapsulation: ViewEncapsulation.None, host: { '[class]': 'classes()', '[style]': 'thumbStyle()', role: 'group' }, imports: [WrIcon], template: "<span class=\"wr-segmented__thumb\" aria-hidden=\"true\"></span>\n\n@for (option of options(); track option.value) {\n <button\n type=\"button\"\n class=\"wr-segmented__option\"\n [class.wr-segmented__option--selected]=\"isSelected(option)\"\n [disabled]=\"disabled() || !!option.disabled\"\n [attr.aria-pressed]=\"isSelected(option)\"\n [attr.aria-label]=\"option.label ? null : (option.ariaLabel ?? option.value)\"\n (click)=\"select(option)\"\n >\n @if (option.icon) {\n <wr-icon class=\"wr-segmented__icon\" [name]=\"option.icon\" />\n }\n @if (option.label) {\n <span class=\"wr-segmented__label\">{{ option.label }}</span>\n }\n </button>\n}\n" }]
77
77
  }], ctorParameters: () => [], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
@@ -0,0 +1,268 @@
1
+ import { ComponentHarness, HarnessPredicate, TestKey } 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
+ * Test harness for one option inside a `<wr-select>` panel.
11
+ *
12
+ * The selector is the CLASS, not the `wr-option` element: a select rendering a
13
+ * virtualized list emits plain `<div role="option" class="wr-option">` rows
14
+ * instead of components, and a spec should not have to care which one it got.
15
+ *
16
+ * @see https://ngwr.dev/guides/testing
17
+ */
18
+ class WrOptionHarness extends ComponentHarness {
19
+ /** The projected component and the virtualized row both carry this class. */
20
+ static hostSelector = '.wr-option';
21
+ /** Build a predicate that narrows the query. */
22
+ static with(options = {}) {
23
+ return new HarnessPredicate(WrOptionHarness, options)
24
+ .addOption('text', options.text, (harness, text) => HarnessPredicate.stringMatches(harness.getText(), text))
25
+ .addOption('selected', options.selected, async (harness, selected) => (await harness.isSelected()) === selected)
26
+ .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled);
27
+ }
28
+ /** The option's label, trimmed. */
29
+ async getText() {
30
+ return (await this.host()).text();
31
+ }
32
+ /** Whether the option is currently selected. */
33
+ async isSelected() {
34
+ return (await (await this.host()).getAttribute('aria-selected')) === 'true';
35
+ }
36
+ /** Whether the option refuses selection. */
37
+ async isDisabled() {
38
+ return (await (await this.host()).getAttribute('aria-disabled')) === 'true';
39
+ }
40
+ /** Whether the option is the keyboard cursor target. */
41
+ async isActive() {
42
+ return (await this.host()).hasClass('wr-option--active');
43
+ }
44
+ /**
45
+ * Whether a search query has filtered this option out.
46
+ *
47
+ * Filtered options stay in the DOM — registration order has to survive a
48
+ * query — and collapse via CSS, so a spec that counts options while a search
49
+ * is active gets them back unless it asks. `getOptions()` on the select
50
+ * harness already drops them.
51
+ */
52
+ async isHidden() {
53
+ return (await this.host()).hasClass('wr-option--hidden');
54
+ }
55
+ /** Click the option. */
56
+ async click() {
57
+ return (await this.host()).click();
58
+ }
59
+ }
60
+
61
+ /**
62
+ * @license
63
+ *
64
+ * Use of this source code is governed by an MIT-style license that can be
65
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
66
+ */
67
+ /**
68
+ * Test harness for `<wr-select>` — single, multi, tag and search modes.
69
+ *
70
+ * The panel is NOT inside the select: it is a template portal in the overlay
71
+ * container, a sibling of the whole app. So the options are reached through the
72
+ * document root, scoped by the `aria-controls` id the trigger already publishes
73
+ * — which is what keeps two selects on one page from reading each other's
74
+ * options.
75
+ *
76
+ * @example
77
+ * ```ts
78
+ * const select = await loader.getHarness(WrSelectHarness);
79
+ *
80
+ * await select.open();
81
+ * await select.selectOption({ text: 'Medium' });
82
+ *
83
+ * expect(await select.getValueText()).toBe('Medium');
84
+ * ```
85
+ *
86
+ * @see https://ngwr.dev/guides/testing
87
+ */
88
+ class WrSelectHarness extends ComponentHarness {
89
+ static hostSelector = 'wr-select';
90
+ /** Build a predicate that narrows the query. */
91
+ static with(options = {}) {
92
+ return new HarnessPredicate(WrSelectHarness, options)
93
+ .addOption('text', options.text, (harness, text) => HarnessPredicate.stringMatches(harness.getValueText(), text))
94
+ .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled)
95
+ .addOption('open', options.open, async (harness, open) => (await harness.isOpen()) === open);
96
+ }
97
+ /** Whether the panel is showing. */
98
+ async isOpen() {
99
+ return (await this.host()).hasClass('wr-select--open');
100
+ }
101
+ /** Whether the select refuses interaction. */
102
+ async isDisabled() {
103
+ return (await this.host()).hasClass('wr-select--disabled');
104
+ }
105
+ /** Whether the select takes more than one value (multi or tag mode). */
106
+ async isMultiple() {
107
+ return (await this.host()).hasClass('wr-select--multi');
108
+ }
109
+ /**
110
+ * What the trigger currently shows as the selection: the chip labels joined by
111
+ * `', '` in multi and tag modes, the label in single mode, the input's text in
112
+ * search mode, and `''` when nothing is selected (the placeholder is showing).
113
+ */
114
+ async getValueText() {
115
+ const chips = await this.getChipLabels();
116
+ if (chips.length > 0)
117
+ return chips.join(', ');
118
+ const value = await this.locatorForOptional('.wr-select__value')();
119
+ if (value)
120
+ return value.text();
121
+ // Search mode keeps the display text in the input's value, not in the DOM.
122
+ const search = await this.locatorForOptional('.wr-select__search-input')();
123
+ return search ? search.getProperty('value') : '';
124
+ }
125
+ /** The placeholder, or `null` when a selection is hiding it. */
126
+ async getPlaceholder() {
127
+ const placeholder = await this.locatorForOptional('.wr-select__placeholder')();
128
+ if (placeholder)
129
+ return placeholder.text();
130
+ const input = await this.searchInput();
131
+ return input ? input.getProperty('placeholder') : null;
132
+ }
133
+ /** The visible chip labels, in order. The `+N more` overflow chip is not one. */
134
+ async getChipLabels() {
135
+ const labels = await this.locatorForAll('.wr-select__chip-label')();
136
+ return Promise.all(labels.map(label => label.text()));
137
+ }
138
+ /**
139
+ * Open the panel.
140
+ *
141
+ * Throws rather than resolving quietly when the panel does not appear, because
142
+ * the two reasons it would not are both worth failing on: a tag-mode select
143
+ * has no panel at all, and a searchable one with `minChars` opens on the query
144
+ * rather than on focus.
145
+ */
146
+ async open() {
147
+ if (await this.isOpen())
148
+ return;
149
+ await (await this.locatorFor('.wr-select__trigger')()).click();
150
+ if (await this.isOpen())
151
+ return;
152
+ throw new Error('WrSelectHarness.open(): the panel did not open. A tag-mode select has no panel, and a ' +
153
+ 'searchable select with `minChars` opens on the query — call typeSearch() instead.');
154
+ }
155
+ /** Close the panel. A closed select is left alone. */
156
+ async close() {
157
+ if (!(await this.isOpen()))
158
+ return;
159
+ // Escape reaches the select through the CDK's keyboard dispatcher, so it
160
+ // works for the button trigger and the search input alike.
161
+ await (await this.locatorFor('.wr-select__trigger')()).sendKeys(TestKey.ESCAPE);
162
+ }
163
+ /**
164
+ * The options currently offered, in DOM order.
165
+ *
166
+ * Filtered-out options are dropped: a client-side search leaves them in the
167
+ * DOM (registration order has to survive a query) and collapses them with CSS,
168
+ * so counting raw elements would answer with the unfiltered list.
169
+ */
170
+ async getOptions(filters = {}) {
171
+ const loader = await this.panelLoader();
172
+ const all = await loader.getAllHarnesses(WrOptionHarness.with(filters));
173
+ const visible = [];
174
+ for (const option of all) {
175
+ if (!(await option.isHidden()))
176
+ visible.push(option);
177
+ }
178
+ return visible;
179
+ }
180
+ /** The labels of the options currently offered, in DOM order. */
181
+ async getOptionLabels() {
182
+ const options = await this.getOptions();
183
+ return Promise.all(options.map(option => option.getText()));
184
+ }
185
+ /** Open the panel if needed, then click the first option matching the filters. */
186
+ async selectOption(filters) {
187
+ await this.open();
188
+ const [option] = await this.getOptions(filters);
189
+ if (!option)
190
+ throw new Error(`WrSelectHarness.selectOption(): no option matched ${JSON.stringify(filters)}.`);
191
+ await option.click();
192
+ }
193
+ /** Type into a search or tag select's input, replacing whatever is there. */
194
+ async typeSearch(query) {
195
+ const input = await this.searchInput();
196
+ if (!input)
197
+ throw new Error('WrSelectHarness.typeSearch(): this select has no text input.');
198
+ await input.clear();
199
+ if (query)
200
+ await input.sendKeys(query);
201
+ }
202
+ /** Click the clear (×) control. It only exists on a `clearable` select with a selection. */
203
+ async clear() {
204
+ await (await this.locatorFor('.wr-select__clear')()).click();
205
+ }
206
+ /** Remove one chip by its label. */
207
+ async removeChip(label) {
208
+ const labels = await this.getChipLabels();
209
+ const index = labels.indexOf(label);
210
+ if (index < 0)
211
+ throw new Error(`WrSelectHarness.removeChip(): no chip labelled "${label}".`);
212
+ // Label and remove control are emitted once per chip by the same loop, so
213
+ // the two lists line up by index.
214
+ const removes = await this.locatorForAll('.wr-select__chip-remove')();
215
+ await removes[index].click();
216
+ }
217
+ /** The "no results" message, or `null` when the panel is showing options. */
218
+ async getNoResultsText() {
219
+ const empty = await this.inPanel('.wr-select-panel__empty');
220
+ return empty ? empty.text() : null;
221
+ }
222
+ /** Whether the panel is showing its async loading row. */
223
+ async isLoading() {
224
+ return (await this.inPanel('.wr-select-panel__loading')) !== null;
225
+ }
226
+ /** Move keyboard focus to the select. */
227
+ async focus() {
228
+ const input = await this.searchInput();
229
+ return (input ?? (await this.locatorFor('.wr-select__trigger')())).focus();
230
+ }
231
+ /** The text input of a search or tag select, or `null` for the button trigger. */
232
+ async searchInput() {
233
+ return this.locatorForOptional('.wr-select__search-input, .wr-select__tag-input')();
234
+ }
235
+ /** One element inside THIS select's panel, or `null`. */
236
+ async inPanel(selector) {
237
+ return this.documentRootLocatorFactory().locatorForOptional(`#${await this.panelId()} ${selector}`)();
238
+ }
239
+ /**
240
+ * A loader scoped to THIS select's panel.
241
+ *
242
+ * Scoped by the `aria-controls` id rather than by `.wr-select-panel`: the
243
+ * overlay container is shared, so a bare class query would happily return the
244
+ * options of a different select that happens to be open.
245
+ */
246
+ async panelLoader() {
247
+ return this.documentRootLocatorFactory().harnessLoaderFor(`#${await this.panelId()}`);
248
+ }
249
+ /** The id the trigger publishes as `aria-controls`, which the panel carries. */
250
+ async panelId() {
251
+ const combobox = await this.locatorForOptional('[role="combobox"]')();
252
+ const id = combobox ? await combobox.getAttribute('aria-controls') : null;
253
+ if (!id) {
254
+ throw new Error('WrSelectHarness: this select has no panel — tag mode renders its options inline.');
255
+ }
256
+ if (!(await this.isOpen())) {
257
+ throw new Error('WrSelectHarness: the panel is closed — call open() first.');
258
+ }
259
+ return id;
260
+ }
261
+ }
262
+
263
+ /**
264
+ * Generated bundle index. Do not edit.
265
+ */
266
+
267
+ export { WrOptionHarness, WrSelectHarness };
268
+ //# sourceMappingURL=ngwr-select-testing.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngwr-select-testing.mjs","sources":["../../../projects/lib/select/testing/wr-option-harness.ts","../../../projects/lib/select/testing/wr-select-harness.ts","../../../projects/lib/select/testing/ngwr-select-testing.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 { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport type { WrOptionHarnessFilters } from './interfaces';\n\n/**\n * Test harness for one option inside a `<wr-select>` panel.\n *\n * The selector is the CLASS, not the `wr-option` element: a select rendering a\n * virtualized list emits plain `<div role=\"option\" class=\"wr-option\">` rows\n * instead of components, and a spec should not have to care which one it got.\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrOptionHarness extends ComponentHarness {\n /** The projected component and the virtualized row both carry this class. */\n static hostSelector = '.wr-option';\n\n /** Build a predicate that narrows the query. */\n static with(options: WrOptionHarnessFilters = {}): HarnessPredicate<WrOptionHarness> {\n return new HarnessPredicate(WrOptionHarness, options)\n .addOption('text', options.text, (harness, text) => HarnessPredicate.stringMatches(harness.getText(), text))\n .addOption('selected', options.selected, async (harness, selected) => (await harness.isSelected()) === selected)\n .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled);\n }\n\n /** The option's label, trimmed. */\n async getText(): Promise<string> {\n return (await this.host()).text();\n }\n\n /** Whether the option is currently selected. */\n async isSelected(): Promise<boolean> {\n return (await (await this.host()).getAttribute('aria-selected')) === 'true';\n }\n\n /** Whether the option refuses selection. */\n async isDisabled(): Promise<boolean> {\n return (await (await this.host()).getAttribute('aria-disabled')) === 'true';\n }\n\n /** Whether the option is the keyboard cursor target. */\n async isActive(): Promise<boolean> {\n return (await this.host()).hasClass('wr-option--active');\n }\n\n /**\n * Whether a search query has filtered this option out.\n *\n * Filtered options stay in the DOM — registration order has to survive a\n * query — and collapse via CSS, so a spec that counts options while a search\n * is active gets them back unless it asks. `getOptions()` on the select\n * harness already drops them.\n */\n async isHidden(): Promise<boolean> {\n return (await this.host()).hasClass('wr-option--hidden');\n }\n\n /** Click the option. */\n async click(): Promise<void> {\n return (await this.host()).click();\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 TestKey,\n type TestElement,\n} from '@angular/cdk/testing';\n\nimport type { WrOptionHarnessFilters, WrSelectHarnessFilters } from './interfaces';\nimport { WrOptionHarness } from './wr-option-harness';\n\n/**\n * Test harness for `<wr-select>` — single, multi, tag and search modes.\n *\n * The panel is NOT inside the select: it is a template portal in the overlay\n * container, a sibling of the whole app. So the options are reached through the\n * document root, scoped by the `aria-controls` id the trigger already publishes\n * — which is what keeps two selects on one page from reading each other's\n * options.\n *\n * @example\n * ```ts\n * const select = await loader.getHarness(WrSelectHarness);\n *\n * await select.open();\n * await select.selectOption({ text: 'Medium' });\n *\n * expect(await select.getValueText()).toBe('Medium');\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrSelectHarness extends ComponentHarness {\n static hostSelector = 'wr-select';\n\n /** Build a predicate that narrows the query. */\n static with(options: WrSelectHarnessFilters = {}): HarnessPredicate<WrSelectHarness> {\n return new HarnessPredicate(WrSelectHarness, options)\n .addOption('text', options.text, (harness, text) => HarnessPredicate.stringMatches(harness.getValueText(), text))\n .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled)\n .addOption('open', options.open, async (harness, open) => (await harness.isOpen()) === open);\n }\n\n /** Whether the panel is showing. */\n async isOpen(): Promise<boolean> {\n return (await this.host()).hasClass('wr-select--open');\n }\n\n /** Whether the select refuses interaction. */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).hasClass('wr-select--disabled');\n }\n\n /** Whether the select takes more than one value (multi or tag mode). */\n async isMultiple(): Promise<boolean> {\n return (await this.host()).hasClass('wr-select--multi');\n }\n\n /**\n * What the trigger currently shows as the selection: the chip labels joined by\n * `', '` in multi and tag modes, the label in single mode, the input's text in\n * search mode, and `''` when nothing is selected (the placeholder is showing).\n */\n async getValueText(): Promise<string> {\n const chips = await this.getChipLabels();\n if (chips.length > 0) return chips.join(', ');\n\n const value = await this.locatorForOptional('.wr-select__value')();\n if (value) return value.text();\n\n // Search mode keeps the display text in the input's value, not in the DOM.\n const search = await this.locatorForOptional('.wr-select__search-input')();\n return search ? search.getProperty<string>('value') : '';\n }\n\n /** The placeholder, or `null` when a selection is hiding it. */\n async getPlaceholder(): Promise<string | null> {\n const placeholder = await this.locatorForOptional('.wr-select__placeholder')();\n if (placeholder) return placeholder.text();\n\n const input = await this.searchInput();\n return input ? input.getProperty<string>('placeholder') : null;\n }\n\n /** The visible chip labels, in order. The `+N more` overflow chip is not one. */\n async getChipLabels(): Promise<string[]> {\n const labels = await this.locatorForAll('.wr-select__chip-label')();\n return Promise.all(labels.map(label => label.text()));\n }\n\n /**\n * Open the panel.\n *\n * Throws rather than resolving quietly when the panel does not appear, because\n * the two reasons it would not are both worth failing on: a tag-mode select\n * has no panel at all, and a searchable one with `minChars` opens on the query\n * rather than on focus.\n */\n async open(): Promise<void> {\n if (await this.isOpen()) return;\n\n await (await this.locatorFor('.wr-select__trigger')()).click();\n if (await this.isOpen()) return;\n\n throw new Error(\n 'WrSelectHarness.open(): the panel did not open. A tag-mode select has no panel, and a ' +\n 'searchable select with `minChars` opens on the query — call typeSearch() instead.'\n );\n }\n\n /** Close the panel. A closed select is left alone. */\n async close(): Promise<void> {\n if (!(await this.isOpen())) return;\n // Escape reaches the select through the CDK's keyboard dispatcher, so it\n // works for the button trigger and the search input alike.\n await (await this.locatorFor('.wr-select__trigger')()).sendKeys(TestKey.ESCAPE);\n }\n\n /**\n * The options currently offered, in DOM order.\n *\n * Filtered-out options are dropped: a client-side search leaves them in the\n * DOM (registration order has to survive a query) and collapses them with CSS,\n * so counting raw elements would answer with the unfiltered list.\n */\n async getOptions(filters: WrOptionHarnessFilters = {}): Promise<WrOptionHarness[]> {\n const loader = await this.panelLoader();\n const all = await loader.getAllHarnesses(WrOptionHarness.with(filters));\n\n const visible: WrOptionHarness[] = [];\n for (const option of all) {\n if (!(await option.isHidden())) visible.push(option);\n }\n return visible;\n }\n\n /** The labels of the options currently offered, in DOM order. */\n async getOptionLabels(): Promise<string[]> {\n const options = await this.getOptions();\n return Promise.all(options.map(option => option.getText()));\n }\n\n /** Open the panel if needed, then click the first option matching the filters. */\n async selectOption(filters: WrOptionHarnessFilters): Promise<void> {\n await this.open();\n\n const [option] = await this.getOptions(filters);\n if (!option) throw new Error(`WrSelectHarness.selectOption(): no option matched ${JSON.stringify(filters)}.`);\n\n await option.click();\n }\n\n /** Type into a search or tag select's input, replacing whatever is there. */\n async typeSearch(query: string): Promise<void> {\n const input = await this.searchInput();\n if (!input) throw new Error('WrSelectHarness.typeSearch(): this select has no text input.');\n\n await input.clear();\n if (query) await input.sendKeys(query);\n }\n\n /** Click the clear (×) control. It only exists on a `clearable` select with a selection. */\n async clear(): Promise<void> {\n await (await this.locatorFor('.wr-select__clear')()).click();\n }\n\n /** Remove one chip by its label. */\n async removeChip(label: string): Promise<void> {\n const labels = await this.getChipLabels();\n const index = labels.indexOf(label);\n if (index < 0) throw new Error(`WrSelectHarness.removeChip(): no chip labelled \"${label}\".`);\n\n // Label and remove control are emitted once per chip by the same loop, so\n // the two lists line up by index.\n const removes = await this.locatorForAll('.wr-select__chip-remove')();\n await removes[index].click();\n }\n\n /** The \"no results\" message, or `null` when the panel is showing options. */\n async getNoResultsText(): Promise<string | null> {\n const empty = await this.inPanel('.wr-select-panel__empty');\n return empty ? empty.text() : null;\n }\n\n /** Whether the panel is showing its async loading row. */\n async isLoading(): Promise<boolean> {\n return (await this.inPanel('.wr-select-panel__loading')) !== null;\n }\n\n /** Move keyboard focus to the select. */\n async focus(): Promise<void> {\n const input = await this.searchInput();\n return (input ?? (await this.locatorFor('.wr-select__trigger')())).focus();\n }\n\n /** The text input of a search or tag select, or `null` for the button trigger. */\n private async searchInput(): Promise<TestElement | null> {\n return this.locatorForOptional('.wr-select__search-input, .wr-select__tag-input')();\n }\n\n /** One element inside THIS select's panel, or `null`. */\n private async inPanel(selector: string): Promise<TestElement | null> {\n return this.documentRootLocatorFactory().locatorForOptional(`#${await this.panelId()} ${selector}`)();\n }\n\n /**\n * A loader scoped to THIS select's panel.\n *\n * Scoped by the `aria-controls` id rather than by `.wr-select-panel`: the\n * overlay container is shared, so a bare class query would happily return the\n * options of a different select that happens to be open.\n */\n private async panelLoader(): Promise<HarnessLoader> {\n return this.documentRootLocatorFactory().harnessLoaderFor(`#${await this.panelId()}`);\n }\n\n /** The id the trigger publishes as `aria-controls`, which the panel carries. */\n private async panelId(): Promise<string> {\n const combobox = await this.locatorForOptional('[role=\"combobox\"]')();\n const id = combobox ? await combobox.getAttribute('aria-controls') : null;\n\n if (!id) {\n throw new Error('WrSelectHarness: this select has no panel — tag mode renders its options inline.');\n }\n if (!(await this.isOpen())) {\n throw new Error('WrSelectHarness: the panel is closed — call open() first.');\n }\n\n return id;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;AAKG;AAMH;;;;;;;;AAQG;AACG,MAAO,eAAgB,SAAQ,gBAAgB,CAAA;;AAEnD,IAAA,OAAO,YAAY,GAAG,YAAY;;AAGlC,IAAA,OAAO,IAAI,CAAC,OAAA,GAAkC,EAAE,EAAA;AAC9C,QAAA,OAAO,IAAI,gBAAgB,CAAC,eAAe,EAAE,OAAO;aACjD,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,OAAO,EAAE,IAAI,KAAK,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,IAAI,CAAC;aAC1G,SAAS,CAAC,UAAU,EAAE,OAAO,CAAC,QAAQ,EAAE,OAAO,OAAO,EAAE,QAAQ,KAAK,CAAC,MAAM,O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