ngwr 16.2.0 → 16.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (418) hide show
  1. package/badge/styles/_tag.scss +73 -1
  2. package/calendar/styles/_index.scss +22 -0
  3. package/carousel/styles/_index.scss +53 -1
  4. package/cascader/styles/_rules.scss +7 -0
  5. package/color-picker/styles/_index.scss +21 -0
  6. package/date-picker/styles/_index.scss +19 -0
  7. package/dropdown/styles/_index.scss +13 -19
  8. package/fesm2022/ngwr-affix.mjs +3 -3
  9. package/fesm2022/ngwr-alert-testing.mjs +70 -0
  10. package/fesm2022/ngwr-alert-testing.mjs.map +1 -0
  11. package/fesm2022/ngwr-alert.mjs +3 -3
  12. package/fesm2022/ngwr-anchor.mjs +17 -6
  13. package/fesm2022/ngwr-anchor.mjs.map +1 -1
  14. package/fesm2022/ngwr-animations-aurora.mjs +3 -3
  15. package/fesm2022/ngwr-animations-blur-reveal.mjs +3 -3
  16. package/fesm2022/ngwr-animations-click-sparks.mjs +3 -3
  17. package/fesm2022/ngwr-animations-confetti.mjs +3 -3
  18. package/fesm2022/ngwr-animations-decode.mjs +3 -3
  19. package/fesm2022/ngwr-animations-destruct.mjs +3 -3
  20. package/fesm2022/ngwr-animations-dot-grid.mjs +3 -3
  21. package/fesm2022/ngwr-animations-falling-letters.mjs +3 -3
  22. package/fesm2022/ngwr-animations-flow-lines.mjs +3 -3
  23. package/fesm2022/ngwr-animations-fluid-cursor.mjs +3 -3
  24. package/fesm2022/ngwr-animations-glitch.mjs +3 -3
  25. package/fesm2022/ngwr-animations-glow-border.mjs +3 -3
  26. package/fesm2022/ngwr-animations-gradient-flow.mjs +3 -3
  27. package/fesm2022/ngwr-animations-marquee.mjs +3 -3
  28. package/fesm2022/ngwr-animations-orbit.mjs +3 -3
  29. package/fesm2022/ngwr-animations-reveal.mjs +3 -3
  30. package/fesm2022/ngwr-animations-ripple-grid.mjs +3 -3
  31. package/fesm2022/ngwr-animations-rotate-reveal.mjs +3 -3
  32. package/fesm2022/ngwr-animations-shimmer.mjs +3 -3
  33. package/fesm2022/ngwr-animations-spotlight.mjs +3 -3
  34. package/fesm2022/ngwr-animations-thread-lines.mjs +3 -3
  35. package/fesm2022/ngwr-animations-tilt.mjs +3 -3
  36. package/fesm2022/ngwr-animations-typewriter.mjs +3 -3
  37. package/fesm2022/ngwr-avatar.mjs +3 -3
  38. package/fesm2022/ngwr-back-top.mjs +3 -3
  39. package/fesm2022/ngwr-badge.mjs +129 -11
  40. package/fesm2022/ngwr-badge.mjs.map +1 -1
  41. package/fesm2022/ngwr-breadcrumbs-testing.mjs +83 -0
  42. package/fesm2022/ngwr-breadcrumbs-testing.mjs.map +1 -0
  43. package/fesm2022/ngwr-breadcrumbs.mjs +8 -8
  44. package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
  45. package/fesm2022/ngwr-burger-testing.mjs +45 -0
  46. package/fesm2022/ngwr-burger-testing.mjs.map +1 -0
  47. package/fesm2022/ngwr-burger.mjs +3 -3
  48. package/fesm2022/ngwr-button.mjs +6 -6
  49. package/fesm2022/ngwr-calendar-testing.mjs +18 -0
  50. package/fesm2022/ngwr-calendar-testing.mjs.map +1 -1
  51. package/fesm2022/ngwr-calendar.mjs +500 -73
  52. package/fesm2022/ngwr-calendar.mjs.map +1 -1
  53. package/fesm2022/ngwr-card.mjs +9 -9
  54. package/fesm2022/ngwr-carousel-testing.mjs +24 -1
  55. package/fesm2022/ngwr-carousel-testing.mjs.map +1 -1
  56. package/fesm2022/ngwr-carousel.mjs +73 -10
  57. package/fesm2022/ngwr-carousel.mjs.map +1 -1
  58. package/fesm2022/ngwr-cascader.mjs +45 -37
  59. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  60. package/fesm2022/ngwr-charts-bar-chart.mjs +5 -4
  61. package/fesm2022/ngwr-charts-bar-chart.mjs.map +1 -1
  62. package/fesm2022/ngwr-charts-boxplot-chart.mjs +3 -3
  63. package/fesm2022/ngwr-charts-bullet-chart.mjs +3 -3
  64. package/fesm2022/ngwr-charts-calendar-heatmap.mjs +3 -3
  65. package/fesm2022/ngwr-charts-candlestick-chart.mjs +3 -3
  66. package/fesm2022/ngwr-charts-chart-legend.mjs +26 -11
  67. package/fesm2022/ngwr-charts-chart-legend.mjs.map +1 -1
  68. package/fesm2022/ngwr-charts-core.mjs +3 -3
  69. package/fesm2022/ngwr-charts-donut-chart.mjs +5 -4
  70. package/fesm2022/ngwr-charts-donut-chart.mjs.map +1 -1
  71. package/fesm2022/ngwr-charts-funnel-chart.mjs +3 -3
  72. package/fesm2022/ngwr-charts-gauge.mjs +3 -3
  73. package/fesm2022/ngwr-charts-heatmap-chart.mjs +3 -3
  74. package/fesm2022/ngwr-charts-line-chart-testing.mjs +3 -2
  75. package/fesm2022/ngwr-charts-line-chart-testing.mjs.map +1 -1
  76. package/fesm2022/ngwr-charts-line-chart.mjs +17 -7
  77. package/fesm2022/ngwr-charts-line-chart.mjs.map +1 -1
  78. package/fesm2022/ngwr-charts-meter-group.mjs +5 -4
  79. package/fesm2022/ngwr-charts-meter-group.mjs.map +1 -1
  80. package/fesm2022/ngwr-charts-radar-chart.mjs +5 -4
  81. package/fesm2022/ngwr-charts-radar-chart.mjs.map +1 -1
  82. package/fesm2022/ngwr-charts-scatter-chart.mjs +5 -4
  83. package/fesm2022/ngwr-charts-scatter-chart.mjs.map +1 -1
  84. package/fesm2022/ngwr-charts-sparkline.mjs +3 -3
  85. package/fesm2022/ngwr-charts-treemap-chart.mjs +3 -3
  86. package/fesm2022/ngwr-charts-waterfall-chart.mjs +3 -3
  87. package/fesm2022/ngwr-checkbox.mjs +6 -6
  88. package/fesm2022/ngwr-clipboard.mjs +3 -3
  89. package/fesm2022/ngwr-collapse.mjs +9 -9
  90. package/fesm2022/ngwr-color-picker-testing.mjs +11 -1
  91. package/fesm2022/ngwr-color-picker-testing.mjs.map +1 -1
  92. package/fesm2022/ngwr-color-picker.mjs +153 -37
  93. package/fesm2022/ngwr-color-picker.mjs.map +1 -1
  94. package/fesm2022/ngwr-command-palette.mjs +3 -3
  95. package/fesm2022/ngwr-comment.mjs +10 -6
  96. package/fesm2022/ngwr-comment.mjs.map +1 -1
  97. package/fesm2022/ngwr-compare-testing.mjs +84 -0
  98. package/fesm2022/ngwr-compare-testing.mjs.map +1 -0
  99. package/fesm2022/ngwr-compare.mjs +3 -3
  100. package/fesm2022/ngwr-context-menu.mjs +28 -13
  101. package/fesm2022/ngwr-context-menu.mjs.map +1 -1
  102. package/fesm2022/ngwr-cookie.mjs +3 -3
  103. package/fesm2022/ngwr-copy-value.mjs +3 -3
  104. package/fesm2022/ngwr-counter.mjs +6 -6
  105. package/fesm2022/ngwr-date-picker-testing.mjs +30 -4
  106. package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
  107. package/fesm2022/ngwr-date-picker.mjs +342 -69
  108. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  109. package/fesm2022/ngwr-date-stamp.mjs +3 -3
  110. package/fesm2022/ngwr-date.mjs +59 -8
  111. package/fesm2022/ngwr-date.mjs.map +1 -1
  112. package/fesm2022/ngwr-density.mjs +6 -6
  113. package/fesm2022/ngwr-descriptions.mjs +6 -6
  114. package/fesm2022/ngwr-dialog.mjs +18 -18
  115. package/fesm2022/ngwr-directives.mjs +15 -15
  116. package/fesm2022/ngwr-divider.mjs +3 -3
  117. package/fesm2022/ngwr-drawer.mjs +51 -29
  118. package/fesm2022/ngwr-drawer.mjs.map +1 -1
  119. package/fesm2022/ngwr-dropdown-testing.mjs +11 -3
  120. package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -1
  121. package/fesm2022/ngwr-dropdown.mjs +70 -99
  122. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  123. package/fesm2022/ngwr-editor.mjs +4 -3
  124. package/fesm2022/ngwr-editor.mjs.map +1 -1
  125. package/fesm2022/ngwr-empty.mjs +3 -3
  126. package/fesm2022/ngwr-event-calendar.mjs +186 -33
  127. package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
  128. package/fesm2022/ngwr-file-upload-testing.mjs +34 -2
  129. package/fesm2022/ngwr-file-upload-testing.mjs.map +1 -1
  130. package/fesm2022/ngwr-file-upload.mjs +279 -16
  131. package/fesm2022/ngwr-file-upload.mjs.map +1 -1
  132. package/fesm2022/ngwr-form.mjs +9 -9
  133. package/fesm2022/ngwr-form.mjs.map +1 -1
  134. package/fesm2022/ngwr-graph-testing.mjs +30 -0
  135. package/fesm2022/ngwr-graph-testing.mjs.map +1 -1
  136. package/fesm2022/ngwr-graph.mjs +664 -43
  137. package/fesm2022/ngwr-graph.mjs.map +1 -1
  138. package/fesm2022/ngwr-hotkey.mjs +6 -6
  139. package/fesm2022/ngwr-i18n-ar.mjs +27 -8
  140. package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
  141. package/fesm2022/ngwr-i18n-cs.mjs +27 -8
  142. package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
  143. package/fesm2022/ngwr-i18n-de.mjs +27 -8
  144. package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
  145. package/fesm2022/ngwr-i18n-en.mjs +27 -8
  146. package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
  147. package/fesm2022/ngwr-i18n-es.mjs +27 -8
  148. package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
  149. package/fesm2022/ngwr-i18n-fr.mjs +27 -8
  150. package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
  151. package/fesm2022/ngwr-i18n-he.mjs +27 -8
  152. package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
  153. package/fesm2022/ngwr-i18n-hi.mjs +27 -8
  154. package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
  155. package/fesm2022/ngwr-i18n-id.mjs +27 -8
  156. package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
  157. package/fesm2022/ngwr-i18n-it.mjs +27 -8
  158. package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
  159. package/fesm2022/ngwr-i18n-ja.mjs +27 -8
  160. package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
  161. package/fesm2022/ngwr-i18n-ko.mjs +27 -8
  162. package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
  163. package/fesm2022/ngwr-i18n-nl.mjs +27 -8
  164. package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
  165. package/fesm2022/ngwr-i18n-pl.mjs +27 -8
  166. package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
  167. package/fesm2022/ngwr-i18n-pt.mjs +27 -8
  168. package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
  169. package/fesm2022/ngwr-i18n-ru.mjs +27 -8
  170. package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
  171. package/fesm2022/ngwr-i18n-sv.mjs +27 -8
  172. package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
  173. package/fesm2022/ngwr-i18n-tr.mjs +27 -8
  174. package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
  175. package/fesm2022/ngwr-i18n-uk.mjs +27 -8
  176. package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
  177. package/fesm2022/ngwr-i18n-vi.mjs +27 -8
  178. package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
  179. package/fesm2022/ngwr-i18n-zh-tw.mjs +27 -8
  180. package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
  181. package/fesm2022/ngwr-i18n-zh.mjs +27 -8
  182. package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
  183. package/fesm2022/ngwr-i18n.mjs +9 -9
  184. package/fesm2022/ngwr-icon.mjs +6 -6
  185. package/fesm2022/ngwr-image-cropper.mjs +3 -3
  186. package/fesm2022/ngwr-input-number-testing.mjs +11 -0
  187. package/fesm2022/ngwr-input-number-testing.mjs.map +1 -1
  188. package/fesm2022/ngwr-input-number.mjs +68 -7
  189. package/fesm2022/ngwr-input-number.mjs.map +1 -1
  190. package/fesm2022/ngwr-input-otp.mjs +23 -3
  191. package/fesm2022/ngwr-input-otp.mjs.map +1 -1
  192. package/fesm2022/ngwr-input-testing.mjs +24 -1
  193. package/fesm2022/ngwr-input-testing.mjs.map +1 -1
  194. package/fesm2022/ngwr-input.mjs +152 -36
  195. package/fesm2022/ngwr-input.mjs.map +1 -1
  196. package/fesm2022/ngwr-keyboard.mjs +3 -3
  197. package/fesm2022/ngwr-knob.mjs +3 -3
  198. package/fesm2022/ngwr-layout.mjs +15 -15
  199. package/fesm2022/ngwr-lightbox.mjs +8 -8
  200. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  201. package/fesm2022/ngwr-list.mjs +8 -8
  202. package/fesm2022/ngwr-list.mjs.map +1 -1
  203. package/fesm2022/ngwr-load-state.mjs +15 -15
  204. package/fesm2022/ngwr-loading-bar.mjs +6 -6
  205. package/fesm2022/ngwr-mention.mjs +6 -6
  206. package/fesm2022/ngwr-meta.mjs +6 -6
  207. package/fesm2022/ngwr-overlay.mjs +175 -13
  208. package/fesm2022/ngwr-overlay.mjs.map +1 -1
  209. package/fesm2022/ngwr-page-header.mjs +3 -3
  210. package/fesm2022/ngwr-pagination.mjs +6 -3
  211. package/fesm2022/ngwr-pagination.mjs.map +1 -1
  212. package/fesm2022/ngwr-pipes.mjs +31 -29
  213. package/fesm2022/ngwr-pipes.mjs.map +1 -1
  214. package/fesm2022/ngwr-platform.mjs +9 -9
  215. package/fesm2022/ngwr-popconfirm-testing.mjs +5 -2
  216. package/fesm2022/ngwr-popconfirm-testing.mjs.map +1 -1
  217. package/fesm2022/ngwr-popconfirm.mjs +44 -63
  218. package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
  219. package/fesm2022/ngwr-popover-testing.mjs +7 -1
  220. package/fesm2022/ngwr-popover-testing.mjs.map +1 -1
  221. package/fesm2022/ngwr-popover.mjs +58 -156
  222. package/fesm2022/ngwr-popover.mjs.map +1 -1
  223. package/fesm2022/ngwr-progress.mjs +50 -9
  224. package/fesm2022/ngwr-progress.mjs.map +1 -1
  225. package/fesm2022/ngwr-pull-to-refresh-testing.mjs +57 -0
  226. package/fesm2022/ngwr-pull-to-refresh-testing.mjs.map +1 -0
  227. package/fesm2022/ngwr-pull-to-refresh.mjs +3 -3
  228. package/fesm2022/ngwr-qr.mjs +3 -3
  229. package/fesm2022/ngwr-radio.mjs +6 -6
  230. package/fesm2022/ngwr-rating.mjs +3 -3
  231. package/fesm2022/ngwr-resizable-testing.mjs +113 -0
  232. package/fesm2022/ngwr-resizable-testing.mjs.map +1 -0
  233. package/fesm2022/ngwr-resizable.mjs +3 -3
  234. package/fesm2022/ngwr-result.mjs +12 -12
  235. package/fesm2022/ngwr-schema-form-testing.mjs +336 -0
  236. package/fesm2022/ngwr-schema-form-testing.mjs.map +1 -0
  237. package/fesm2022/ngwr-schema-form.mjs +416 -19
  238. package/fesm2022/ngwr-schema-form.mjs.map +1 -1
  239. package/fesm2022/ngwr-scroll.mjs +3 -3
  240. package/fesm2022/ngwr-segmented.mjs +3 -3
  241. package/fesm2022/ngwr-select-testing.mjs +19 -0
  242. package/fesm2022/ngwr-select-testing.mjs.map +1 -1
  243. package/fesm2022/ngwr-select.mjs +361 -84
  244. package/fesm2022/ngwr-select.mjs.map +1 -1
  245. package/fesm2022/ngwr-sidebar-testing.mjs +176 -0
  246. package/fesm2022/ngwr-sidebar-testing.mjs.map +1 -0
  247. package/fesm2022/ngwr-sidebar.mjs +3 -3
  248. package/fesm2022/ngwr-skeleton.mjs +3 -3
  249. package/fesm2022/ngwr-slider-testing.mjs +6 -0
  250. package/fesm2022/ngwr-slider-testing.mjs.map +1 -1
  251. package/fesm2022/ngwr-slider.mjs +21 -3
  252. package/fesm2022/ngwr-slider.mjs.map +1 -1
  253. package/fesm2022/ngwr-sortable-list.mjs +29 -12
  254. package/fesm2022/ngwr-sortable-list.mjs.map +1 -1
  255. package/fesm2022/ngwr-speed-dial.mjs +3 -3
  256. package/fesm2022/ngwr-spinner.mjs +3 -3
  257. package/fesm2022/ngwr-splitter.mjs +3 -3
  258. package/fesm2022/ngwr-statistic.mjs +9 -9
  259. package/fesm2022/ngwr-stepper.mjs +42 -11
  260. package/fesm2022/ngwr-stepper.mjs.map +1 -1
  261. package/fesm2022/ngwr-storage.mjs +3 -3
  262. package/fesm2022/ngwr-switch.mjs +3 -3
  263. package/fesm2022/ngwr-table-testing.mjs +157 -3
  264. package/fesm2022/ngwr-table-testing.mjs.map +1 -1
  265. package/fesm2022/ngwr-table.mjs +1051 -74
  266. package/fesm2022/ngwr-table.mjs.map +1 -1
  267. package/fesm2022/ngwr-tabs-router.mjs +3 -3
  268. package/fesm2022/ngwr-tabs-testing.mjs +1 -1
  269. package/fesm2022/ngwr-tabs-testing.mjs.map +1 -1
  270. package/fesm2022/ngwr-tabs.mjs +15 -10
  271. package/fesm2022/ngwr-tabs.mjs.map +1 -1
  272. package/fesm2022/ngwr-textarea-testing.mjs +11 -0
  273. package/fesm2022/ngwr-textarea-testing.mjs.map +1 -1
  274. package/fesm2022/ngwr-textarea.mjs +128 -16
  275. package/fesm2022/ngwr-textarea.mjs.map +1 -1
  276. package/fesm2022/ngwr-theme.mjs +3 -3
  277. package/fesm2022/ngwr-timeline.mjs +6 -6
  278. package/fesm2022/ngwr-toast.mjs +40 -19
  279. package/fesm2022/ngwr-toast.mjs.map +1 -1
  280. package/fesm2022/ngwr-toolbar.mjs +3 -3
  281. package/fesm2022/ngwr-tour-testing.mjs +13 -1
  282. package/fesm2022/ngwr-tour-testing.mjs.map +1 -1
  283. package/fesm2022/ngwr-tour.mjs +19 -15
  284. package/fesm2022/ngwr-tour.mjs.map +1 -1
  285. package/fesm2022/ngwr-transfer-testing.mjs +6 -0
  286. package/fesm2022/ngwr-transfer-testing.mjs.map +1 -1
  287. package/fesm2022/ngwr-transfer.mjs +24 -5
  288. package/fesm2022/ngwr-transfer.mjs.map +1 -1
  289. package/fesm2022/ngwr-tree-testing.mjs +62 -2
  290. package/fesm2022/ngwr-tree-testing.mjs.map +1 -1
  291. package/fesm2022/ngwr-tree.mjs +978 -79
  292. package/fesm2022/ngwr-tree.mjs.map +1 -1
  293. package/fesm2022/ngwr-typography.mjs +3 -3
  294. package/fesm2022/ngwr-utils-router.mjs +3 -3
  295. package/fesm2022/ngwr-utils.mjs +97 -1
  296. package/fesm2022/ngwr-utils.mjs.map +1 -1
  297. package/fesm2022/ngwr-version.mjs +1 -1
  298. package/fesm2022/ngwr-version.mjs.map +1 -1
  299. package/fesm2022/ngwr-virtual-scroll.mjs +3 -3
  300. package/fesm2022/ngwr-window.mjs +33 -22
  301. package/fesm2022/ngwr-window.mjs.map +1 -1
  302. package/file-upload/styles/_index.scss +156 -0
  303. package/graph/styles/_index.scss +87 -0
  304. package/i18n/ar.json +29 -8
  305. package/i18n/cs.json +29 -8
  306. package/i18n/de.json +29 -8
  307. package/i18n/en.json +29 -8
  308. package/i18n/es.json +29 -8
  309. package/i18n/fr.json +29 -8
  310. package/i18n/he.json +29 -8
  311. package/i18n/hi.json +29 -8
  312. package/i18n/id.json +29 -8
  313. package/i18n/it.json +29 -8
  314. package/i18n/ja.json +29 -8
  315. package/i18n/ko.json +29 -8
  316. package/i18n/nl.json +29 -8
  317. package/i18n/pl.json +29 -8
  318. package/i18n/pt.json +29 -8
  319. package/i18n/ru.json +29 -8
  320. package/i18n/sv.json +29 -8
  321. package/i18n/tr.json +29 -8
  322. package/i18n/uk.json +29 -8
  323. package/i18n/vi.json +29 -8
  324. package/i18n/zh-TW.json +29 -8
  325. package/i18n/zh.json +29 -8
  326. package/input/styles/_index.scss +68 -1
  327. package/input-otp/styles/_index.scss +14 -0
  328. package/llms-full.txt +53 -21
  329. package/llms.txt +57 -24
  330. package/overlay/styles/_arrow.scss +4 -4
  331. package/package.json +33 -1
  332. package/popconfirm/styles/_index.scss +3 -11
  333. package/progress/styles/_index.scss +32 -0
  334. package/schema-form/styles/_index.scss +78 -0
  335. package/schematics/collection.json +5 -0
  336. package/schematics/eject/index.js +158 -0
  337. package/schematics/eject/schema.js +8 -0
  338. package/schematics/eject/schema.json +24 -0
  339. package/schematics/eject/source.js +295 -0
  340. package/schematics/use/rule.js +2 -0
  341. package/schematics/use/symbol-map.json +5 -0
  342. package/select/styles/_index.scss +127 -22
  343. package/skills/ngwr/SKILL.md +31 -4
  344. package/skills/ngwr/references/catalog.md +9 -1
  345. package/slider/styles/_index.scss +22 -0
  346. package/table/styles/_index.scss +191 -3
  347. package/textarea/styles/_index.scss +80 -0
  348. package/theme/styles/_focus.scss +16 -1
  349. package/theme/styles/_motion.scss +5 -0
  350. package/transfer/styles/_index.scss +84 -0
  351. package/tree/styles/_index.scss +138 -5
  352. package/types/ngwr-alert-testing.d.ts +88 -0
  353. package/types/ngwr-badge.d.ts +72 -2
  354. package/types/ngwr-breadcrumbs-testing.d.ts +92 -0
  355. package/types/ngwr-burger-testing.d.ts +51 -0
  356. package/types/ngwr-calendar-testing.d.ts +18 -6
  357. package/types/ngwr-calendar.d.ts +272 -22
  358. package/types/ngwr-carousel-testing.d.ts +27 -6
  359. package/types/ngwr-carousel.d.ts +42 -6
  360. package/types/ngwr-cascader.d.ts +13 -6
  361. package/types/ngwr-charts-chart-legend.d.ts +9 -4
  362. package/types/ngwr-charts-line-chart-testing.d.ts +4 -1
  363. package/types/ngwr-charts-line-chart.d.ts +7 -4
  364. package/types/ngwr-color-picker-testing.d.ts +15 -4
  365. package/types/ngwr-color-picker.d.ts +76 -6
  366. package/types/ngwr-compare-testing.d.ts +72 -0
  367. package/types/ngwr-context-menu.d.ts +2 -0
  368. package/types/ngwr-date-picker-testing.d.ts +23 -8
  369. package/types/ngwr-date-picker.d.ts +100 -9
  370. package/types/ngwr-date.d.ts +71 -1
  371. package/types/ngwr-drawer.d.ts +9 -0
  372. package/types/ngwr-dropdown-testing.d.ts +20 -0
  373. package/types/ngwr-dropdown.d.ts +26 -6
  374. package/types/ngwr-event-calendar.d.ts +66 -8
  375. package/types/ngwr-file-upload-testing.d.ts +31 -2
  376. package/types/ngwr-file-upload.d.ts +156 -3
  377. package/types/ngwr-form.d.ts +47 -3
  378. package/types/ngwr-graph-testing.d.ts +36 -3
  379. package/types/ngwr-graph.d.ts +309 -13
  380. package/types/ngwr-input-number-testing.d.ts +10 -0
  381. package/types/ngwr-input-number.d.ts +30 -1
  382. package/types/ngwr-input-otp.d.ts +10 -0
  383. package/types/ngwr-input-testing.d.ts +30 -0
  384. package/types/ngwr-input.d.ts +54 -3
  385. package/types/ngwr-overlay.d.ts +84 -5
  386. package/types/ngwr-pipes.d.ts +2 -1
  387. package/types/ngwr-popconfirm-testing.d.ts +12 -3
  388. package/types/ngwr-popconfirm.d.ts +28 -3
  389. package/types/ngwr-popover-testing.d.ts +19 -2
  390. package/types/ngwr-popover.d.ts +22 -2
  391. package/types/ngwr-progress.d.ts +29 -1
  392. package/types/ngwr-pull-to-refresh-testing.d.ts +83 -0
  393. package/types/ngwr-resizable-testing.d.ts +116 -0
  394. package/types/ngwr-schema-form-testing.d.ts +260 -0
  395. package/types/ngwr-schema-form.d.ts +76 -6
  396. package/types/ngwr-select-testing.d.ts +20 -0
  397. package/types/ngwr-select.d.ts +149 -11
  398. package/types/ngwr-sidebar-testing.d.ts +176 -0
  399. package/types/ngwr-slider-testing.d.ts +3 -1
  400. package/types/ngwr-slider.d.ts +21 -1
  401. package/types/ngwr-sortable-list.d.ts +6 -0
  402. package/types/ngwr-stepper.d.ts +20 -11
  403. package/types/ngwr-table-testing.d.ts +122 -7
  404. package/types/ngwr-table.d.ts +572 -50
  405. package/types/ngwr-tabs-testing.d.ts +14 -17
  406. package/types/ngwr-tabs.d.ts +6 -0
  407. package/types/ngwr-textarea-testing.d.ts +10 -0
  408. package/types/ngwr-textarea.d.ts +48 -2
  409. package/types/ngwr-toast.d.ts +8 -1
  410. package/types/ngwr-tour-testing.d.ts +10 -0
  411. package/types/ngwr-tour.d.ts +11 -2
  412. package/types/ngwr-transfer-testing.d.ts +3 -0
  413. package/types/ngwr-transfer.d.ts +24 -1
  414. package/types/ngwr-tree-testing.d.ts +65 -1
  415. package/types/ngwr-tree.d.ts +335 -12
  416. package/types/ngwr-utils.d.ts +107 -1
  417. package/types/ngwr-version.d.ts +1 -1
  418. package/types/ngwr-window.d.ts +7 -4
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-calendar.mjs","names":[],"sources":["../../../projects/lib/calendar/calendar.ts","../../../projects/lib/calendar/calendar.html"],"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 { Directionality } from '@angular/cdk/bidi';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport {\n Component,\n ElementRef,\n Injector,\n ViewEncapsulation,\n afterNextRender,\n computed,\n effect,\n inject,\n input,\n model,\n signal,\n untracked,\n} from '@angular/core';\n\nimport { WrDateAdapter } from 'ngwr/date';\nimport { useI18nFormatter, useI18nText } from 'ngwr/i18n';\nimport { wrCheckStyles } from 'ngwr/utils';\n\nimport type { WrCalendarMode, WrCalendarRange } from './types';\n\n/**\n * Stands in for the consumer input `useI18nText` expects, for labels the calendar\n * exposes no input for. Constant and read-only, so one instance is safe to share.\n */\nconst NO_OVERRIDE = signal<string | null>(null).asReadonly();\n\nconst ROWS = 6;\nconst COLS = 7;\n\n/**\n * Chips per row in the month and year views — the vertical arrows step by one\n * of these, so they have to agree with `grid-template-columns` in\n * `styles/_index.scss`. Two numbers because the two grids differ: twelve months\n * read as four rows of three, twelve years as three rows of four.\n */\nconst MONTH_COLS = 3;\nconst YEAR_COLS = 4;\n\n/**\n * Month-view calendar. Supports single-date selection (`mode=\"single\"`) or\n * date-range selection (`mode=\"range\"`). Reusable on its own; consumed by\n * `<wr-date-picker>` inside an overlay.\n *\n * Uses {@link WrDateAdapter} for all date math and formatting — the native\n * one unless `provideWr(withDates(...))` registers another.\n *\n * @example\n * ```html\n * <wr-calendar [(date)]=\"picked\" [min]=\"minDate\" />\n *\n * <wr-calendar mode=\"range\" [(range)]=\"[start, end]\" />\n * ```\n *\n * @see https://ngwr.dev/reference/components/calendar\n */\n@Component({\n selector: 'wr-calendar',\n templateUrl: './calendar.html',\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-calendar',\n '[class]': 'classes()',\n // No `role=\"grid\"` here: the host also wraps the nav header, and a grid may\n // only own rows. The role sits on `.wr-calendar__body`, which is the day\n // matrix and nothing else.\n '(keydown)': 'onKeyDown($event)',\n },\n})\nexport class WrCalendar {\n /** Selection mode. @default 'single' */\n readonly mode = input<WrCalendarMode>('single');\n\n /** Two-way bindable single value (used when `mode === 'single'`). */\n readonly date = model<Date | null>(null);\n\n /** Two-way bindable `[start, end]` (used when `mode === 'range'`). */\n readonly range = model<WrCalendarRange>([null, null]);\n\n /** Min selectable date (inclusive). */\n readonly min = input<Date | null>(null);\n\n /** Max selectable date (inclusive). */\n readonly max = input<Date | null>(null);\n\n /** Predicate — return `false` to disable specific dates (e.g. weekends only). */\n readonly dateFilter = input<((date: Date) => boolean) | null>(null);\n\n /**\n * Move real focus onto the roving cell as soon as the grid is on screen.\n *\n * Off by default: a standalone `<wr-calendar>` sitting in a page must not\n * steal focus on load. `wr-date-picker` turns it on for the popup it opens\n * from its trigger, where the user asked to be taken to the calendar.\n * @default false\n */\n readonly autoFocus = input(false, { transform: coerceBooleanProperty });\n\n /** Disable interaction entirely. @default false */\n readonly disabled = input(false, { transform: coerceBooleanProperty });\n\n private readonly adapter = inject<WrDateAdapter<Date>>(WrDateAdapter);\n private readonly dir = inject(Directionality, { optional: true });\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly injector = inject(Injector);\n\n /**\n * Today as this adapter's day. With `withDates({ timeZone })` it is the day\n * the display zone is in, which near midnight is not the browser's.\n */\n private zoneToday(): Date {\n const zoned = this.adapter.zoned();\n const now = zoned.today();\n if (zoned === this.adapter) return now;\n return this.adapter.createDate(zoned.getYear(now), zoned.getMonth(now), zoned.getDate(now));\n }\n\n /** Currently displayed month (any date inside it). */\n protected readonly viewDate = signal(this.zoneToday());\n\n /** Date currently focused by keyboard (single roving tabindex). */\n protected readonly focusedDate = signal(this.zoneToday());\n\n /** Hovered date during range-mode end-pick — drives the preview highlight. */\n protected readonly hoverDate = signal<Date | null>(null);\n\n /** Which sub-view is currently shown. Cycles `day → month → year` on header click. */\n protected readonly viewMode = signal<'day' | 'month' | 'year'>('day');\n\n /**\n * Chip the month / year listbox has moved its ring to, as an index into\n * `monthsView()` / `yearsView()`. `null` means \"nobody has pressed an arrow\n * yet\", which resolves to the month or year on screen — see {@link activeChip}.\n *\n * Reset on every view change rather than remembered: coming back to the month\n * list should ring the month you are looking at, not the one an earlier visit\n * happened to leave the ring on.\n */\n private readonly rovedChip = signal<number | null>(null);\n\n // The four month/year strings have been in both catalogs since they were written\n // and nothing read them: the template hard-coded the same English beside them, so a\n // localized app announced its calendar's arrows in English. `nullSignal()` is the\n // shim for exactly this — a label with no consumer input to forward.\n private readonly prevMonthLabel = useI18nText(NO_OVERRIDE, 'calendar.prevMonth', 'Previous month');\n private readonly nextMonthLabel = useI18nText(NO_OVERRIDE, 'calendar.nextMonth', 'Next month');\n protected readonly monthListLabel = useI18nText(NO_OVERRIDE, 'calendar.monthList', 'Months');\n protected readonly yearListLabel = useI18nText(NO_OVERRIDE, 'calendar.yearList', 'Years');\n private readonly prevYearLabel = useI18nText(NO_OVERRIDE, 'calendar.prevYear', 'Previous year');\n private readonly nextYearLabel = useI18nText(NO_OVERRIDE, 'calendar.nextYear', 'Next year');\n private readonly prevYearsLabel = useI18nText(NO_OVERRIDE, 'calendar.prevYears', 'Previous 12 years');\n private readonly nextYearsLabel = useI18nText(NO_OVERRIDE, 'calendar.nextYears', 'Next 12 years');\n\n /** What the ← button does from here — a month, a year, or a 12-year page. */\n protected readonly prevLabel = computed(() => {\n switch (this.viewMode()) {\n case 'year':\n return this.prevYearsLabel();\n case 'month':\n return this.prevYearLabel();\n default:\n return this.prevMonthLabel();\n }\n });\n\n /** What the → button does from here. */\n protected readonly nextLabel = computed(() => {\n switch (this.viewMode()) {\n case 'year':\n return this.nextYearsLabel();\n case 'month':\n return this.nextYearLabel();\n default:\n return this.nextMonthLabel();\n }\n });\n\n protected readonly today = computed(() => this.zoneToday());\n\n protected readonly weekdayNames = computed(() => this.adapter.getDayOfWeekNames('short'));\n\n protected readonly monthsView = computed(() => this.adapter.getMonthNames('short'));\n\n /** 12-year window centered on the floor-aligned decade containing `viewDate`. */\n protected readonly yearsView = computed<readonly number[]>(() => {\n const y = this.adapter.getYear(this.viewDate());\n const start = Math.floor(y / 12) * 12;\n return Array.from({ length: 12 }, (_, i) => start + i);\n });\n\n /**\n * The header above the grid.\n *\n * Both templated strings used to be assembled here: `${month} ${year}` and\n * `${first} – ${last}`. That is English word order with an English separator\n * baked into TypeScript, and no catalog could move either — ja-JP writes\n * 2026年3月, which is not a translation of any word in `March 2026` but a\n * different arrangement of the same two values. So the arrangement is the\n * translatable unit, and `calendar.header` / `calendar.yearRange` are it.\n */\n protected readonly headerLabel = computed(() => {\n const v = this.viewDate();\n switch (this.viewMode()) {\n case 'day': {\n const monthNames = this.adapter.getMonthNames('long');\n return this.headerText({\n month: monthNames[this.adapter.getMonth(v)],\n year: this.adapter.getYear(v),\n });\n }\n case 'month':\n return `${this.adapter.getYear(v)}`;\n case 'year': {\n const years = this.yearsView();\n return this.yearRangeText({ from: years[0], to: years[years.length - 1] });\n }\n }\n });\n\n private readonly headerText = useI18nFormatter('calendar.header', '{{month}} {{year}}');\n private readonly yearRangeText = useI18nFormatter('calendar.yearRange', '{{from}} – {{to}}');\n private readonly dayLabelText = useI18nFormatter('calendar.dayLabel', '{{weekday}}, {{date}}');\n\n /**\n * Long weekday names for the cell names.\n *\n * `getDayOfWeekNames` returns them in COLUMN order — index 0 is\n * `getFirstDayOfWeek()`, not Sunday — which is what the header strip wants and\n * what a `getDayOfWeek()` result (0 = Sunday) must be rotated into. Indexing\n * it directly reads Monday's name for a Sunday in every locale that starts its\n * week on Monday, which is most of them.\n */\n private readonly longWeekdays = computed(() => this.adapter.getDayOfWeekNames('long'));\n\n /**\n * A day cell's accessible name — \"Sunday, March 15, 2026\".\n *\n * The cell had none. Its only content is the day NUMBER, and `role=\"gridcell\"`\n * does not inherit a name from the grid's header or from the column header\n * above it, so every date in the month announced as a bare number: the month,\n * the year and the weekday were all on screen and none of them reachable.\n *\n * `{{date}}` is the adapter's `longDate`, so its field order, its separators\n * and its digits are `Intl`'s — the catalog decides only where the weekday\n * goes. Building it from `getMonthNames('long')` instead would have hard-coded\n * the nominative month, which Russian and Finnish inflect inside a date.\n */\n protected dayLabel(date: Date): string {\n return this.dayLabelText({\n weekday: this.longWeekdays()[(this.adapter.getDayOfWeek(date) - this.adapter.getFirstDayOfWeek() + 7) % 7],\n date: this.adapter.format(date, 'longDate'),\n });\n }\n\n /** 6×7 day grid covering the current month plus spillover. */\n protected readonly weeks = computed<readonly (readonly Date[])[]>(() => {\n const view = this.viewDate();\n const year = this.adapter.getYear(view);\n const month = this.adapter.getMonth(view);\n const firstOfMonth = this.adapter.createDate(year, month, 1);\n const firstWeekday = this.adapter.getDayOfWeek(firstOfMonth);\n const firstDayOfWeek = this.adapter.getFirstDayOfWeek();\n const lead = (firstWeekday - firstDayOfWeek + 7) % 7;\n const gridStart = this.adapter.addDays(firstOfMonth, -lead);\n\n const out: Date[][] = [];\n for (let w = 0; w < ROWS; w++) {\n const row: Date[] = [];\n for (let d = 0; d < COLS; d++) {\n row.push(this.adapter.addDays(gridStart, w * COLS + d));\n }\n out.push(row);\n }\n return out;\n });\n\n /**\n * The chip carrying the listbox's only `tabindex=\"0\"` — where the ring is, and\n * where Tab lands.\n *\n * A listbox owns its arrows, and these two did not: twelve months were twelve\n * tab stops, so the role promised an interaction model the component never\n * implemented. One tab stop plus arrow keys is the roving-tabindex half of the\n * pattern the day grid already uses.\n *\n * Routed through {@link nearestEnabledChip} on BOTH paths — the seed and every\n * arrow — for the reason the grid learned first: `.focus()` on a\n * `<button disabled>` is a no-op, so parking the sole tab stop on a month a\n * `[min]` has closed off leaves the whole view unreachable by keyboard.\n * `-1` on the day view, where there are no chips at all.\n */\n protected readonly activeChip = computed(() => {\n if (this.viewMode() === 'day') return -1;\n return this.nearestEnabledChip(this.rovedChip() ?? this.currentChip());\n });\n\n protected readonly classes = computed(() => {\n const parts = [`wr-calendar--${this.mode()}`];\n if (this.disabled()) parts.push('wr-calendar--disabled');\n return parts.join(' ');\n });\n\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('calendar');\n // Initial focus: selected date if any, else today. Also snap viewDate to\n // that month.\n //\n // Stepped onto an ENABLED day, because the roving tabindex puts the grid's\n // only `tabindex=\"0\"` on this cell: seed it on a disabled one — which is\n // exactly what a `min` in the future does to \"today\" — and the sole tab\n // stop is an unfocusable button, leaving the grid unreachable by keyboard.\n afterNextRender(() => {\n const initial = this.nearestEnabled(this.date() ?? this.range()[0] ?? this.zoneToday());\n this.focusedDate.set(initial);\n this.viewDate.set(initial);\n\n // A second, NESTED hook: the lines above only SET the signals, which\n // schedules another change-detection pass — the `--focused` class and the\n // `tabindex` are not in the DOM until that one has run.\n if (this.autoFocus()) {\n afterNextRender(() => this.focusActiveCell(), { injector: this.injector });\n }\n });\n\n // Keep viewDate in sync when date / range changes externally to a\n // different month. The viewDate read must stay untracked — otherwise\n // the effect re-runs on every internal navigation (month stepping,\n // year picking) and snaps the view back to the selected month.\n effect(() => {\n const candidate = this.mode() === 'single' ? this.date() : this.range()[0];\n if (!candidate) return;\n untracked(() => {\n if (!this.adapter.isSameMonth(candidate, this.viewDate())) {\n this.viewDate.set(candidate);\n }\n });\n });\n }\n\n // Navigation\n\n /** Header `‹` button — steps by month / year / decade based on the active view. */\n protected prev(): void {\n this.viewDate.set(this.stepViewDate(-1));\n this.carryCursorIntoView();\n }\n\n /** Header `›` button — steps by month / year / decade based on the active view. */\n protected next(): void {\n this.viewDate.set(this.stepViewDate(1));\n this.carryCursorIntoView();\n }\n\n /**\n * Keeps the roving cursor inside the month the grid is showing.\n *\n * The day grid marks its one tab stop by comparing each cell against\n * `focusedDate` — `[attr.tabindex]=\"isFocused(day) ? 0 : -1\"` — and `weeks()`\n * renders a fixed 42-day window around `viewDate`. Stepping the header moved\n * the window and left the cursor behind, so after two clicks no rendered cell\n * matched and all 42 buttons were `tabindex=\"-1\"`: the grid dropped out of\n * the tab order entirely and could not be reached by keyboard again without\n * navigating back. `onMonthSelect` already did this for its own path and says\n * why at the line; this is the same move for the header arrows.\n *\n * The day-of-month is kept where the new month is long enough for it, so\n * paging through March from the 31st does not silently walk the cursor back\n * to the 1st, and the landing is routed through `nearestEnabled` like every\n * other cursor write.\n */\n private carryCursorIntoView(): void {\n if (this.viewMode() !== 'day') return;\n\n const view = this.viewDate();\n const focused = this.focusedDate();\n if (this.adapter.isSameMonth(focused, view)) return;\n\n const day = Math.min(this.adapter.getDate(focused), this.adapter.getDaysInMonth(view));\n const landing = this.adapter.createDate(this.adapter.getYear(view), this.adapter.getMonth(view), day);\n this.focusedDate.set(this.nearestEnabled(landing));\n }\n\n /** Header label click — zooms out (`day → month → year`). No-op at year view. */\n protected onLabelClick(): void {\n if (this.disabled()) return;\n if (this.viewMode() === 'day') {\n this.setViewMode('month');\n } else if (this.viewMode() === 'month') {\n this.setViewMode('year');\n // The label is disabled on the year page, and disabling the button that\n // holds focus drops it to `<body>`. The page that opened takes it instead.\n afterNextRender(() => this.focusActiveChip(), { injector: this.injector });\n }\n }\n\n /**\n * Picking a month drops to the day grid — and takes real focus with it.\n *\n * The `@switch (viewMode())` in the template destroys the chip that holds DOM\n * focus, so without the two lines below `document.activeElement` became\n * `<body>`: the ring appeared on the new view and focus did not, the arrow\n * keys went dead (the keydown handler is a HOST binding, so nothing reaches\n * the component from `<body>`), and the next Tab restarted from the top of the\n * document — out of the calendar entirely. It is the same trap the two\n * keyboard paths in this file already fix, and for the same reason\n * `afterNextRender` rather than `queueMicrotask`: under zoneless CD the\n * microtask runs before the new view is in the DOM.\n *\n * `focusedDate` has to move too, and that half is easy to miss. The grid marks\n * its focusable cell by comparing against `focusedDate`, not `viewDate`, so\n * choosing a DIFFERENT month rendered a grid with no `--focused` cell and no\n * `tabindex=\"0\"` at all — unreachable by keyboard from either direction. The\n * day is preserved when the month already holds it and otherwise falls to the\n * first, which is where `viewDate` lands anyway.\n */\n protected onMonthSelect(monthIdx: number): void {\n if (this.isMonthDisabled(monthIdx)) return;\n const v = this.viewDate();\n const year = this.adapter.getYear(v);\n this.viewDate.set(this.adapter.createDate(year, monthIdx, 1));\n\n const focused = this.focusedDate();\n const alreadyThere = this.adapter.getYear(focused) === year && this.adapter.getMonth(focused) === monthIdx;\n if (!alreadyThere) this.focusedDate.set(this.adapter.createDate(year, monthIdx, 1));\n\n this.setViewMode('day');\n afterNextRender(() => this.focusActiveCell(), { injector: this.injector });\n }\n\n /** Year → month view, with the same focus restoration; the landing view is chips. */\n protected onYearSelect(year: number): void {\n if (this.isYearDisabled(year)) return;\n const v = this.viewDate();\n this.viewDate.set(this.adapter.createDate(year, this.adapter.getMonth(v), 1));\n this.setViewMode('month');\n afterNextRender(() => this.focusActiveChip(), { injector: this.injector });\n }\n\n /**\n * Switch views and drop the chip ring with them.\n *\n * Every view change is the only thing that changes what the chips MEAN, so it\n * is the one place the ring has to forget where it was — otherwise a year\n * picked at index 7 rings the eighth MONTH on the way back down.\n */\n private setViewMode(view: 'day' | 'month' | 'year'): void {\n this.rovedChip.set(null);\n this.viewMode.set(view);\n }\n\n private stepViewDate(direction: -1 | 1): Date {\n const v = this.viewDate();\n switch (this.viewMode()) {\n case 'day':\n return this.adapter.addMonths(v, direction);\n case 'month':\n return this.adapter.addYears(v, direction);\n case 'year':\n return this.adapter.addYears(v, direction * 12);\n }\n }\n\n // Cell state predicates (used by template)\n\n /** Through the adapter, not `Date#getDate`: a zoned adapter's day is not the browser's. */\n protected dayOfMonth(date: Date): number {\n return this.adapter.getDate(date);\n }\n\n protected isToday(date: Date): boolean {\n return this.adapter.isSameDay(date, this.today());\n }\n\n protected isOutOfMonth(date: Date): boolean {\n return !this.adapter.isSameMonth(date, this.viewDate());\n }\n\n protected isSelected(date: Date): boolean {\n if (this.mode() === 'single') {\n const v = this.date();\n return v ? this.adapter.isSameDay(date, v) : false;\n }\n const [start, end] = this.range();\n if (start && this.adapter.isSameDay(date, start)) return true;\n if (end && this.adapter.isSameDay(date, end)) return true;\n return false;\n }\n\n protected isInRange(date: Date): boolean {\n if (this.mode() !== 'range') return false;\n const [start, end] = this.range();\n if (!start || !end) return false;\n return this.adapter.compareDate(date, start) > 0 && this.adapter.compareDate(date, end) < 0;\n }\n\n protected isInRangePreview(date: Date): boolean {\n if (this.mode() !== 'range') return false;\n const [start, end] = this.range();\n const hover = this.hoverDate();\n if (!start || end || !hover) return false;\n const before = this.adapter.compareDate(start, hover) <= 0;\n const lo = before ? start : hover;\n const hi = before ? hover : start;\n return this.adapter.compareDate(date, lo) > 0 && this.adapter.compareDate(date, hi) < 0;\n }\n\n protected isFocused(date: Date): boolean {\n return this.adapter.isSameDay(date, this.focusedDate());\n }\n\n protected isDisabled(date: Date): boolean {\n if (this.disabled()) return true;\n const min = this.min();\n if (min && this.adapter.compareDate(date, min) < 0) return true;\n const max = this.max();\n if (max && this.adapter.compareDate(date, max) > 0) return true;\n const filter = this.dateFilter();\n if (filter && !filter(date)) return true;\n return false;\n }\n\n // Month / year view predicates\n\n protected isMonthCurrent(monthIdx: number): boolean {\n return this.adapter.getMonth(this.viewDate()) === monthIdx;\n }\n\n protected isMonthSelected(monthIdx: number): boolean {\n const v = this.mode() === 'single' ? this.date() : this.range()[0];\n if (!v) return false;\n return this.adapter.getYear(v) === this.adapter.getYear(this.viewDate()) && this.adapter.getMonth(v) === monthIdx;\n }\n\n protected isMonthDisabled(monthIdx: number): boolean {\n if (this.disabled()) return true;\n const year = this.adapter.getYear(this.viewDate());\n const monthStart = this.adapter.createDate(year, monthIdx, 1);\n const monthEnd = this.adapter.createDate(year, monthIdx, this.adapter.getDaysInMonth(monthStart));\n const min = this.min();\n if (min && this.adapter.compareDate(monthEnd, min) < 0) return true;\n const max = this.max();\n if (max && this.adapter.compareDate(monthStart, max) > 0) return true;\n return false;\n }\n\n protected isYearCurrent(year: number): boolean {\n return this.adapter.getYear(this.viewDate()) === year;\n }\n\n protected isYearSelected(year: number): boolean {\n const v = this.mode() === 'single' ? this.date() : this.range()[0];\n return v ? this.adapter.getYear(v) === year : false;\n }\n\n protected isYearDisabled(year: number): boolean {\n if (this.disabled()) return true;\n const min = this.min();\n if (min && year < this.adapter.getYear(min)) return true;\n const max = this.max();\n if (max && year > this.adapter.getYear(max)) return true;\n return false;\n }\n\n // Interaction\n\n protected onCellClick(date: Date): void {\n if (this.isDisabled(date)) return;\n if (this.mode() === 'single') {\n this.date.set(this.adapter.clone(date));\n } else {\n this.applyRangeClick(date);\n }\n this.focusedDate.set(date);\n if (!this.adapter.isSameMonth(date, this.viewDate())) {\n this.viewDate.set(date);\n }\n }\n\n protected onCellEnter(date: Date): void {\n if (this.mode() === 'range') this.hoverDate.set(date);\n }\n\n protected onCellLeave(): void {\n if (this.mode() === 'range') this.hoverDate.set(null);\n }\n\n private applyRangeClick(date: Date): void {\n const [start, end] = this.range();\n if (!start || (start && end)) {\n this.range.set([this.adapter.clone(date), null]);\n return;\n }\n if (this.adapter.compareDate(date, start) < 0) {\n this.range.set([this.adapter.clone(date), start]);\n } else {\n this.range.set([start, this.adapter.clone(date)]);\n }\n this.hoverDate.set(null);\n }\n\n // Keyboard\n\n protected onKeyDown(event: KeyboardEvent): void {\n if (this.disabled()) return;\n\n // The listener sits on the HOST, which also wraps the nav header — so\n // without this every key aimed at a `‹` button drove the day grid instead,\n // and the `preventDefault()` below cancelled the button's own activation:\n // Enter on `‹` picked a day the user never touched, ArrowDown on the header\n // yanked real focus into the grid. The host element itself is deliberately\n // let through: `WrCalendarHarness` sends its keys to `<wr-calendar>` rather\n // than to a cell, because the calendar moves focus in an `afterNextRender`\n // and jsdom often has focus nowhere at all.\n const target = event.target as Element | null;\n if (target !== this.host.nativeElement && target?.closest('.wr-calendar__header')) return;\n\n // The month and year views are listboxes, and the arrows belong to them\n // while they are up — there is no day grid on screen to drive. Their chips\n // are real `<button>`s, so Enter and Space fall through to the browser's own\n // activation and must not be swallowed here.\n if (this.viewMode() !== 'day') {\n this.onChipKeyDown(event);\n return;\n }\n\n const current = this.focusedDate();\n let next: Date | null = null;\n // Which way the key travels, so a landing on a closed-off day can keep\n // going instead of stopping on it. See `nearestEnabledToward`.\n let dir: 1 | -1 = 1;\n\n switch (this.inlineKey(event.key)) {\n case 'ArrowLeft':\n next = this.adapter.addDays(current, -1);\n dir = -1;\n break;\n case 'ArrowRight':\n next = this.adapter.addDays(current, 1);\n break;\n case 'ArrowUp':\n next = this.adapter.addDays(current, -7);\n dir = -1;\n break;\n case 'ArrowDown':\n next = this.adapter.addDays(current, 7);\n break;\n case 'Home': {\n const dow = this.adapter.getDayOfWeek(current);\n const first = this.adapter.getFirstDayOfWeek();\n next = this.adapter.addDays(current, -((dow - first + 7) % 7));\n dir = -1;\n break;\n }\n case 'End': {\n const dow = this.adapter.getDayOfWeek(current);\n const first = this.adapter.getFirstDayOfWeek();\n next = this.adapter.addDays(current, 6 - ((dow - first + 7) % 7));\n break;\n }\n case 'PageUp':\n next = event.shiftKey ? this.adapter.addYears(current, -1) : this.adapter.addMonths(current, -1);\n dir = -1;\n break;\n case 'PageDown':\n next = event.shiftKey ? this.adapter.addYears(current, 1) : this.adapter.addMonths(current, 1);\n break;\n case 'Enter':\n case ' ':\n event.preventDefault();\n this.onCellClick(current);\n return;\n }\n\n if (!next) return;\n event.preventDefault();\n\n // The seed is routed through `nearestEnabled` for a reason, and navigation\n // needs the same care: a cell renders `disabled` AND carries the grid's only\n // `tabindex=\"0\"`, so parking the ring on a closed-off day leaves zero\n // tabbable cells — the user tabs out of the calendar and can never tab back\n // in. Real focus splits from the ring too, because `.focus()` on a disabled\n // button is a no-op. Reached by nothing more exotic than `[minDate]`.\n const landing = this.nearestEnabledToward(next, dir);\n if (!landing) return;\n next = landing;\n\n this.focusedDate.set(next);\n if (!this.adapter.isSameMonth(next, this.viewDate())) {\n this.viewDate.set(next);\n }\n // `afterNextRender`, NOT `queueMicrotask`. Under zoneless CD the scheduler\n // runs change detection in a macrotask, so a microtask fires FIRST — the\n // `--focused` class is still on the cell we just left, and this focuses\n // that one. The ring moved and real focus did not, permanently: a screen\n // reader kept announcing the previous day.\n afterNextRender(() => this.focusActiveCell(), { injector: this.injector });\n }\n\n /**\n * Arrow / Home / End inside the month or year listbox — the roving half of the\n * pattern their `role` has always claimed.\n *\n * Steps by one along the row and by a full row vertically, and the inline pair\n * mirrors under `dir=\"rtl\"` for the same reason the grid's does: those two keys\n * name a side of the screen. The page does NOT wrap or spill into the next\n * one — a month list is twelve fixed cells, and the header's `‹` / `›` are what\n * change which twelve. Anything else (Enter, Space, Tab, Escape) is left to the\n * button and to whatever owns the calendar.\n */\n private onChipKeyDown(event: KeyboardEvent): void {\n const cols = this.viewMode() === 'month' ? MONTH_COLS : YEAR_COLS;\n const count = this.chipCount();\n const current = this.activeChip();\n // Assigned on every branch that does not return, so it needs no placeholder.\n let next: number;\n // Which way to keep looking when the landing chip is closed off, exactly as\n // `nearestEnabledToward` does for days.\n let dir: 1 | -1 = 1;\n\n switch (this.inlineKey(event.key)) {\n case 'ArrowLeft':\n next = current - 1;\n dir = -1;\n break;\n case 'ArrowRight':\n next = current + 1;\n break;\n case 'ArrowUp':\n next = current - cols;\n dir = -1;\n break;\n case 'ArrowDown':\n next = current + cols;\n break;\n case 'Home':\n next = 0;\n break;\n case 'End':\n next = count - 1;\n dir = -1;\n break;\n default:\n return;\n }\n\n const landing = this.enabledChipToward(next, dir);\n if (landing === null) return;\n\n event.preventDefault();\n this.rovedChip.set(landing);\n // `afterNextRender`, not `queueMicrotask` — same trap as the grid: under\n // zoneless CD the microtask runs before the new `tabindex` is in the DOM, so\n // the focus call would land on the chip the ring just left.\n afterNextRender(() => this.focusActiveChip(), { injector: this.injector });\n }\n\n /** How many chips the current view renders — twelve either way, read rather than assumed. */\n private chipCount(): number {\n return this.viewMode() === 'month' ? this.monthsView().length : this.yearsView().length;\n }\n\n /** Whether the chip at `index` refuses selection in the current view. */\n private isChipDisabled(index: number): boolean {\n if (this.viewMode() === 'month') return this.isMonthDisabled(index);\n const year = this.yearsView()[index];\n return year === undefined || this.isYearDisabled(year);\n }\n\n /** The chip the view itself points at: the month or year currently on screen. */\n private currentChip(): number {\n if (this.viewMode() === 'month') return this.adapter.getMonth(this.viewDate());\n const index = this.yearsView().indexOf(this.adapter.getYear(this.viewDate()));\n return index === -1 ? 0 : index;\n }\n\n /**\n * The first selectable chip at or after `from`, else the first before it, else\n * `from` unchanged when the whole page is closed off — the chip version of\n * {@link nearestEnabled}, and it exists for the same reason: the ring carries\n * the only `tabindex=\"0\"`, and a disabled button cannot hold it.\n */\n private nearestEnabledChip(from: number): number {\n const count = this.chipCount();\n const start = Math.min(Math.max(from, 0), count - 1);\n if (!this.isChipDisabled(start)) return start;\n\n for (const step of [1, -1] as const) {\n const found = this.enabledChipToward(start + step, step);\n if (found !== null) return found;\n }\n return start;\n }\n\n /**\n * The first selectable chip at `from` or beyond it in `step`'s direction, else\n * null when that whole direction is closed off — which is the answer for an\n * ArrowLeft on the first chip: stay put.\n */\n private enabledChipToward(from: number, step: 1 | -1): number | null {\n for (let i = from; i >= 0 && i < this.chipCount(); i += step) {\n if (!this.isChipDisabled(i)) return i;\n }\n return null;\n }\n\n private focusActiveChip(): void {\n // By the tab stop, not by index: it is the same element the ring is on, and\n // asking for it this way cannot drift out of step with the template.\n this.host.nativeElement.querySelector<HTMLElement>('.wr-calendar__chip[tabindex=\"0\"]')?.focus();\n }\n\n /**\n * The first selectable day at or after `candidate`, else the first before it,\n * else `candidate` unchanged when everything nearby is closed off. Bounded at\n * a year each way so a pathological `dateFilter` cannot spin.\n */\n private nearestEnabled(candidate: Date): Date {\n if (!this.isDisabled(candidate)) return candidate;\n\n for (const step of [1, -1] as const) {\n let probe = candidate;\n for (let i = 0; i < 366; i++) {\n probe = this.adapter.addDays(probe, step);\n if (!this.isDisabled(probe)) return probe;\n }\n }\n return candidate;\n }\n\n /**\n * The first selectable day at `candidate` or beyond it in `step`'s direction,\n * else null when that whole direction is closed off — which is the answer for\n * an ArrowLeft that would cross `min`: stay put.\n *\n * Direction matters. Reusing `nearestEnabled`, which probes forward first,\n * would send an ArrowLeft over a disabled weekend straight back to the day it\n * started from, so the ring could never cross the hole.\n */\n private nearestEnabledToward(candidate: Date, step: 1 | -1): Date | null {\n let probe = candidate;\n for (let i = 0; i < 366; i++) {\n if (!this.isDisabled(probe)) return probe;\n probe = this.adapter.addDays(probe, step);\n }\n return null;\n }\n\n private focusActiveCell(): void {\n const el = this.host.nativeElement.querySelector('.wr-calendar__day--focused');\n (el as HTMLElement | null)?.focus();\n }\n\n /** Used by the template's `track` expression. */\n protected trackByTime(_: number, date: Date): number {\n return date.getTime();\n }\n\n /**\n * The key as the GRID sees it.\n *\n * Arrow keys follow visual order, and a calendar grid mirrors under\n * `dir=\"rtl\"`: the day to the visual right of today is yesterday. Only the\n * inline pair swaps — Up/Down step a week either way, and PageUp/PageDown and\n * Home/End are semantic rather than physical.\n */\n private inlineKey(key: string): string {\n if (this.dir?.value !== 'rtl') return key;\n if (key === 'ArrowRight') return 'ArrowLeft';\n if (key === 'ArrowLeft') return 'ArrowRight';\n return key;\n }\n}\n","<div class=\"wr-calendar__header\">\n <button\n type=\"button\"\n class=\"wr-calendar__nav wr-calendar__nav--prev\"\n [attr.aria-label]=\"prevLabel()\"\n [disabled]=\"disabled()\"\n (click)=\"prev()\"\n >\n <svg\n width=\"18\"\n height=\"18\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m15 18-6-6 6-6\" />\n </svg>\n </button>\n <button\n type=\"button\"\n class=\"wr-calendar__label\"\n [disabled]=\"disabled() || viewMode() === 'year'\"\n (click)=\"onLabelClick()\"\n >\n {{ headerLabel() }}\n </button>\n <button\n type=\"button\"\n class=\"wr-calendar__nav wr-calendar__nav--next\"\n [attr.aria-label]=\"nextLabel()\"\n [disabled]=\"disabled()\"\n (click)=\"next()\"\n >\n <svg\n width=\"18\"\n height=\"18\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n </button>\n</div>\n\n@switch (viewMode()) {\n @case ('day') {\n <!--\n The weekday strip and the week rows are one grid, so they share a wrapper:\n `role=\"grid\"` may only own rows, and as siblings the header row had no grid\n parent at all. `.wr-calendar__body` repeats the host's column gap, so the\n rendered spacing is unchanged.\n -->\n <div class=\"wr-calendar__body\" role=\"grid\">\n <div class=\"wr-calendar__weekdays\" role=\"row\">\n @for (name of weekdayNames(); track name) {\n <span class=\"wr-calendar__weekday\" role=\"columnheader\">{{ name }}</span>\n }\n </div>\n\n <div class=\"wr-calendar__grid\" role=\"rowgroup\" (mouseleave)=\"onCellLeave()\">\n @for (week of weeks(); track $index) {\n <div class=\"wr-calendar__week\" role=\"row\">\n @for (day of week; track trackByTime($index, day)) {\n <button\n type=\"button\"\n class=\"wr-calendar__day\"\n role=\"gridcell\"\n [class.wr-calendar__day--today]=\"isToday(day)\"\n [class.wr-calendar__day--out-of-month]=\"isOutOfMonth(day)\"\n [class.wr-calendar__day--selected]=\"isSelected(day)\"\n [class.wr-calendar__day--in-range]=\"isInRange(day)\"\n [class.wr-calendar__day--range-preview]=\"isInRangePreview(day)\"\n [class.wr-calendar__day--focused]=\"isFocused(day)\"\n [disabled]=\"isDisabled(day)\"\n [attr.tabindex]=\"isFocused(day) ? 0 : -1\"\n [attr.aria-label]=\"dayLabel(day)\"\n [attr.aria-selected]=\"isSelected(day)\"\n [attr.aria-disabled]=\"isDisabled(day)\"\n (click)=\"onCellClick(day)\"\n (mouseenter)=\"onCellEnter(day)\"\n >\n {{ dayOfMonth(day) }}\n </button>\n }\n </div>\n }\n </div>\n </div>\n }\n\n @case ('month') {\n <!--\n A listbox owns its arrows, so its options share ONE tab stop: twelve months\n that were each tabbable announced a keyboard model — arrow to a month, Tab\n out of the list — that the component did not have. `activeChip()` is where\n the ring is, and it is always an enabled chip.\n -->\n <div class=\"wr-calendar__months\" role=\"listbox\" [attr.aria-label]=\"monthListLabel()\">\n @for (name of monthsView(); track name) {\n <button\n type=\"button\"\n class=\"wr-calendar__chip\"\n role=\"option\"\n [class.wr-calendar__chip--current]=\"isMonthCurrent($index)\"\n [class.wr-calendar__chip--selected]=\"isMonthSelected($index)\"\n [disabled]=\"isMonthDisabled($index)\"\n [attr.tabindex]=\"activeChip() === $index ? 0 : -1\"\n [attr.aria-selected]=\"isMonthSelected($index)\"\n [attr.aria-disabled]=\"isMonthDisabled($index)\"\n (click)=\"onMonthSelect($index)\"\n >\n {{ name }}\n </button>\n }\n </div>\n }\n\n @case ('year') {\n <div class=\"wr-calendar__years\" role=\"listbox\" [attr.aria-label]=\"yearListLabel()\">\n @for (year of yearsView(); track year) {\n <button\n type=\"button\"\n class=\"wr-calendar__chip\"\n role=\"option\"\n [class.wr-calendar__chip--current]=\"isYearCurrent(year)\"\n [class.wr-calendar__chip--selected]=\"isYearSelected(year)\"\n [disabled]=\"isYearDisabled(year)\"\n [attr.tabindex]=\"activeChip() === $index ? 0 : -1\"\n [attr.aria-selected]=\"isYearSelected(year)\"\n [attr.aria-disabled]=\"isYearDisabled(year)\"\n (click)=\"onYearSelect(year)\"\n >\n {{ year }}\n </button>\n }\n </div>\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAkCA,MAAM,cAAc,OAAsB,IAAI,CAAC,CAAC,WAAU;AAE1D,MAAM,OAAO;AACb,MAAM,OAAO;AAQb,MAAM,aAAa;AACnB,MAAM,YAAY;AAgClB,IAAa,aAAb,MAAa,WAA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AAA,YAAA;IAAA,mBAAA;GAAA;GAAA,KAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,KAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,YAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,WAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,UAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;EAAA;EAAA,SAAA;GAAA,MAAA;GAAA,OAAA;EAAA;EAAA,MAAA;GAAA,WAAA,EAAA,WAAA,oBAAA;GAAA,YAAA,EAAA,SAAA,YAAA;GAAA,gBAAA;EAAA;EAAA,UAAA;EAAA,UC9EvB;EAmJA,eAAA,GAAA,kBAAA;CAAA,CAAA;;ADrEa,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAU,YAAA,CAAA;EAbtB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAa,eAER,kBAAkB;GAAI,MAC/B;IACJ,OAAO;IACP,WAAW;IAIX,aAAa;GACd;GAAA,UAAA;EAAA,CAAA"}
1
+ {"version":3,"file":"ngwr-calendar.mjs","names":[],"sources":["../../../projects/lib/calendar/calendar.ts","../../../projects/lib/calendar/calendar.html"],"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 { Directionality } from '@angular/cdk/bidi';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport {\n Component,\n ElementRef,\n Injector,\n ViewEncapsulation,\n afterNextRender,\n computed,\n effect,\n inject,\n input,\n model,\n output,\n signal,\n untracked,\n} from '@angular/core';\nimport type { FormValueControl } from '@angular/forms/signals';\n\nimport { WrDateAdapter, type WrDatePeriod, wrPeriodEnd, wrPeriodStart } from 'ngwr/date';\nimport { useFormFieldAria } from 'ngwr/form';\nimport { useI18nFormatter, useI18nText } from 'ngwr/i18n';\nimport { wrCheckStyles } from 'ngwr/utils';\n\nimport type { WrCalendarGranularity, WrCalendarMode, WrCalendarRange, WrCalendarValue } from './types';\n\nconst EMPTY_RANGE: WrCalendarRange = [null, null];\n\n/** A `min` / `max` binding as the calendar reads it: a date, or no bound. */\nfunction asBound(value: unknown): Date | undefined {\n return value instanceof Date ? value : undefined;\n}\n\nconst ROWS = 6;\nconst COLS = 7;\n\n/**\n * Chips per row in the month and year views — the vertical arrows step by one\n * of these, so they have to agree with `grid-template-columns` in\n * `styles/_index.scss`. Two numbers because the two grids differ: twelve months\n * read as four rows of three, twelve years as three rows of four.\n */\nconst MONTH_COLS = 3;\nconst YEAR_COLS = 4;\n/** Four quarters read as two rows of two, which leaves a chip room for a spelled-out label. */\nconst QUARTER_COLS = 2;\n\n/** The views behind the header. `quarter` is reached only under `granularity=\"quarter\"`. */\ntype WrCalendarViewMode = 'day' | 'month' | 'quarter' | 'year';\n\nconst CHIP_COLS: Readonly<Record<Exclude<WrCalendarViewMode, 'day'>, number>> = {\n month: MONTH_COLS,\n quarter: QUARTER_COLS,\n year: YEAR_COLS,\n};\n\n/**\n * Month-view calendar. Supports single-date selection (`mode=\"single\"`) or\n * date-range selection (`mode=\"range\"`). Reusable on its own; consumed by\n * `<wr-date-picker>` inside an overlay.\n *\n * Uses {@link WrDateAdapter} for all date math and formatting — the native\n * one unless `provideWr(withDates(...))` registers another.\n *\n * A signal-forms native control: it implements\n * `FormValueControl<WrCalendarValue>`, so `[formField]` binds straight to its\n * `value` model: a `Date | null` in `single` mode, a `[start, end]` tuple or\n * `null` in `range` mode. `[(date)]` and `[(range)]` stay the standalone\n * bindings, and each mirrors `value` in its own mode.\n *\n * @example\n * ```html\n * <wr-calendar [(date)]=\"picked\" [min]=\"minDate\" />\n *\n * <wr-calendar mode=\"range\" [(range)]=\"[start, end]\" />\n *\n * <!-- signal forms -->\n * <wr-calendar [formField]=\"form.due\" />\n * ```\n *\n * @see https://ngwr.dev/reference/components/calendar\n */\n@Component({\n selector: 'wr-calendar',\n templateUrl: './calendar.html',\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-calendar',\n '[class]': 'classes()',\n // No `role=\"grid\"` here: the host also wraps the nav header, and a grid may\n // only own rows. The role sits on `.wr-calendar__body`, which is the day\n // matrix and nothing else.\n '(keydown)': 'onKeyDown($event)',\n '(focusout)': 'onFocusOut($event)',\n },\n})\nexport class WrCalendar implements FormValueControl<WrCalendarValue> {\n /** Selection mode. @default 'single' */\n readonly mode = input<WrCalendarMode>('single');\n\n /**\n * What one pick names. `'week'` keeps the day grid, where hovering and\n * picking take the whole week; `'month'`, `'quarter'` and `'year'` open on\n * that view and pick there, with no day grid to drop to.\n *\n * A period is held as its first day. In `range` mode the end is the last day\n * of the end period, so the range stays an inclusive run of days. `min`,\n * `max` and `dateFilter` close a period only when they close every day in it.\n * A week starts on the adapter's first day of the week.\n *\n * @default 'day'\n */\n readonly granularity = input<WrCalendarGranularity>('day');\n\n /** Two-way bindable single value (used when `mode === 'single'`). */\n readonly date = model<Date | null>(null);\n\n /** Two-way bindable `[start, end]` (used when `mode === 'range'`). */\n readonly range = model<WrCalendarRange>([null, null]);\n\n /**\n * The selection as one value, whatever the mode: a `Date` in `single` mode, a\n * `[start, end]` tuple in `range` mode, `null` while nothing is picked. Bound\n * by `[formField]`, or two-way via `[(value)]`. Kept in step with `date` and\n * `range`: a write to either side reaches the other.\n */\n readonly value = model<WrCalendarValue>(null);\n\n /** Emitted when focus leaves the calendar, so a bound field can mark itself touched. */\n readonly touch = output<void>();\n\n // `FormUiControl` reserves `min` / `max`, keyed to the control's value type:\n // `[formField]` type-checks the field's value against them and writes the\n // schema's bound here. So they are typed by the value, take anything and keep\n // only a date, which leaves `null` working as \"no bound\". `wr-slider` does the same.\n /** Min selectable date (inclusive). Takes a `Date`; `null` or `undefined` is no bound. */\n readonly min = input<NonNullable<WrCalendarValue> | undefined, unknown>(undefined, { transform: asBound });\n\n /** Max selectable date (inclusive). Takes a `Date`; `null` or `undefined` is no bound. */\n readonly max = input<NonNullable<WrCalendarValue> | undefined, unknown>(undefined, { transform: asBound });\n\n /** Predicate — return `false` to disable specific dates (e.g. weekends only). */\n readonly dateFilter = input<((date: Date) => boolean) | null>(null);\n\n /**\n * Move real focus onto the roving cell as soon as the grid is on screen.\n *\n * Off by default: a standalone `<wr-calendar>` sitting in a page must not\n * steal focus on load. `wr-date-picker` turns it on for the popup it opens\n * from its trigger, where the user asked to be taken to the calendar.\n * @default false\n */\n readonly autoFocus = input(false, { transform: coerceBooleanProperty });\n\n /** Disable interaction entirely. @default false */\n readonly disabled = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Read-only: the grid keeps its tab stop, the arrows still move the cursor and\n * the header still pages through months and years, but picking a day writes\n * nothing. Bound automatically from the field's readonly state when used with\n * `[formField]`. Mirrored as `aria-readonly` on the day grid.\n * @default false\n */\n readonly readonly = input(false, { transform: coerceBooleanProperty });\n\n protected readonly fieldAria = useFormFieldAria();\n\n private readonly adapter = inject<WrDateAdapter<Date>>(WrDateAdapter);\n private readonly dir = inject(Directionality, { optional: true });\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly injector = inject(Injector);\n\n /**\n * Today as this adapter's day. With `withDates({ timeZone })` it is the day\n * the display zone is in, which near midnight is not the browser's.\n */\n private zoneToday(): Date {\n const zoned = this.adapter.zoned();\n const now = zoned.today();\n if (zoned === this.adapter) return now;\n return this.adapter.createDate(zoned.getYear(now), zoned.getMonth(now), zoned.getDate(now));\n }\n\n /** Currently displayed month (any date inside it). */\n protected readonly viewDate = signal(this.zoneToday());\n\n /** Date currently focused by keyboard (single roving tabindex). */\n protected readonly focusedDate = signal(this.zoneToday());\n\n /** Hovered date during range-mode end-pick — drives the preview highlight. */\n protected readonly hoverDate = signal<Date | null>(null);\n\n /** Which sub-view is currently shown. Cycles `day → month → year` on header click. */\n protected readonly viewMode = signal<WrCalendarViewMode>('day');\n\n /** The period a pick names, or `null` while a pick names a day. */\n private readonly period = computed<WrDatePeriod | null>(() => {\n const granularity = this.granularity();\n return granularity === 'day' ? null : granularity;\n });\n\n /** The view a pick is made on: the one the calendar opens on and returns to. */\n private readonly homeView = computed<WrCalendarViewMode>(() => {\n const granularity = this.granularity();\n return granularity === 'day' || granularity === 'week' ? 'day' : granularity;\n });\n\n /** Whether the chips on screen are what a click picks, rather than a step towards a finer view. */\n private readonly picksChips = computed(() => this.viewMode() !== 'day' && this.viewMode() === this.homeView());\n\n /** The week a single `granularity=\"week\"` calendar holds, as its first and last day. */\n private readonly pickedWeek = computed<readonly [Date, Date] | null>(() => {\n if (this.period() !== 'week' || this.mode() !== 'single') return null;\n const picked = this.date();\n return picked ? this.weekOf(picked) : null;\n });\n\n /** The week under the pointer, while `granularity=\"week\"`. */\n private readonly hoverWeek = computed<readonly [Date, Date] | null>(() => {\n if (this.period() !== 'week') return null;\n const hover = this.hoverDate();\n return hover ? this.weekOf(hover) : null;\n });\n\n /**\n * Chip the month / year listbox has moved its ring to, as an index into\n * `monthsView()` / `yearsView()`. `null` means \"nobody has pressed an arrow\n * yet\", which resolves to the month or year on screen — see {@link activeChip}.\n *\n * Reset on every view change rather than remembered: coming back to the month\n * list should ring the month you are looking at, not the one an earlier visit\n * happened to leave the ring on.\n */\n private readonly rovedChip = signal<number | null>(null);\n\n /**\n * Accessible name of the day grid, for a calendar that stands alone: a\n * `role=\"grid\"` has no name of its own. Inside a `<wr-form-field>` the field's\n * label names the grid instead.\n */\n readonly ariaLabel = input<string | null>(null);\n\n /** Accessible name of the back arrow on the day view. Falls back to `calendar.prevMonth`, then `'Previous month'`. */\n readonly prevMonthLabel = input<string | null>(null);\n\n /** Accessible name of the forward arrow on the day view. Falls back to `calendar.nextMonth`, then `'Next month'`. */\n readonly nextMonthLabel = input<string | null>(null);\n\n /** Accessible name of the month list. Falls back to `calendar.monthList`, then `'Months'`. */\n readonly monthListLabel = input<string | null>(null);\n\n /** Accessible name of the year list. Falls back to `calendar.yearList`, then `'Years'`. */\n readonly yearListLabel = input<string | null>(null);\n\n /** Accessible name of the quarter list. Falls back to `calendar.quarterList`, then `'Quarters'`. */\n readonly quarterListLabel = input<string | null>(null);\n\n /** Accessible name of the back arrow on the month view. Falls back to `calendar.prevYear`, then `'Previous year'`. */\n readonly prevYearLabel = input<string | null>(null);\n\n /** Accessible name of the forward arrow on the month view. Falls back to `calendar.nextYear`, then `'Next year'`. */\n readonly nextYearLabel = input<string | null>(null);\n\n /** Accessible name of the back arrow on the year view. Falls back to `calendar.prevYears`, then `'Previous 12 years'`. */\n readonly prevYearsLabel = input<string | null>(null);\n\n /** Accessible name of the forward arrow on the year view. Falls back to `calendar.nextYears`, then `'Next 12 years'`. */\n readonly nextYearsLabel = input<string | null>(null);\n\n private readonly resolvedPrevMonthLabel = useI18nText(this.prevMonthLabel, 'calendar.prevMonth', 'Previous month');\n private readonly resolvedNextMonthLabel = useI18nText(this.nextMonthLabel, 'calendar.nextMonth', 'Next month');\n protected readonly resolvedMonthListLabel = useI18nText(this.monthListLabel, 'calendar.monthList', 'Months');\n protected readonly resolvedYearListLabel = useI18nText(this.yearListLabel, 'calendar.yearList', 'Years');\n protected readonly resolvedQuarterListLabel = useI18nText(this.quarterListLabel, 'calendar.quarterList', 'Quarters');\n private readonly resolvedPrevYearLabel = useI18nText(this.prevYearLabel, 'calendar.prevYear', 'Previous year');\n private readonly resolvedNextYearLabel = useI18nText(this.nextYearLabel, 'calendar.nextYear', 'Next year');\n private readonly resolvedPrevYearsLabel = useI18nText(this.prevYearsLabel, 'calendar.prevYears', 'Previous 12 years');\n private readonly resolvedNextYearsLabel = useI18nText(this.nextYearsLabel, 'calendar.nextYears', 'Next 12 years');\n\n /** What the ← button does from here — a month, a year, or a 12-year page. */\n protected readonly prevLabel = computed(() => {\n switch (this.viewMode()) {\n case 'year':\n return this.resolvedPrevYearsLabel();\n case 'month':\n case 'quarter':\n return this.resolvedPrevYearLabel();\n default:\n return this.resolvedPrevMonthLabel();\n }\n });\n\n /** What the → button does from here. */\n protected readonly nextLabel = computed(() => {\n switch (this.viewMode()) {\n case 'year':\n return this.resolvedNextYearsLabel();\n case 'month':\n case 'quarter':\n return this.resolvedNextYearLabel();\n default:\n return this.resolvedNextMonthLabel();\n }\n });\n\n protected readonly today = computed(() => this.zoneToday());\n\n protected readonly weekdayNames = computed(() => this.adapter.getDayOfWeekNames('short'));\n\n protected readonly monthsView = computed(() => this.adapter.getMonthNames('short'));\n\n /** 12-year window centered on the floor-aligned decade containing `viewDate`. */\n protected readonly yearsView = computed<readonly number[]>(() => {\n const y = this.adapter.getYear(this.viewDate());\n const start = Math.floor(y / 12) * 12;\n return Array.from({ length: 12 }, (_, i) => start + i);\n });\n\n /**\n * The header above the grid.\n *\n * Both templated strings used to be assembled here: `${month} ${year}` and\n * `${first} – ${last}`. That is English word order with an English separator\n * baked into TypeScript, and no catalog could move either — ja-JP writes\n * 2026年3月, which is not a translation of any word in `March 2026` but a\n * different arrangement of the same two values. So the arrangement is the\n * translatable unit, and `calendar.header` / `calendar.yearRange` are it.\n */\n protected readonly headerLabel = computed(() => {\n const v = this.viewDate();\n switch (this.viewMode()) {\n case 'day': {\n const monthNames = this.adapter.getMonthNames('long');\n return this.headerText({\n month: monthNames[this.adapter.getMonth(v)],\n year: this.adapter.getYear(v),\n });\n }\n case 'month':\n case 'quarter':\n return `${this.adapter.getYear(v)}`;\n case 'year': {\n const years = this.yearsView();\n return this.yearRangeText({ from: years[0], to: years[years.length - 1] });\n }\n }\n });\n\n private readonly headerText = useI18nFormatter('calendar.header', '{{month}} {{year}}');\n private readonly yearRangeText = useI18nFormatter('calendar.yearRange', '{{from}} – {{to}}');\n private readonly dayLabelText = useI18nFormatter('calendar.dayLabel', '{{weekday}}, {{date}}');\n private readonly quarterText = useI18nFormatter('calendar.quarter', 'Q{{quarter}}');\n\n /** The four quarters of the year on screen, by number. */\n protected readonly quartersView: readonly number[] = [1, 2, 3, 4];\n\n /** A quarter chip's text: the arrangement is the catalog's, as the header's is. */\n protected quarterLabel(quarter: number): string {\n return this.quarterText({ quarter });\n }\n\n /**\n * Long weekday names for the cell names.\n *\n * `getDayOfWeekNames` returns them in COLUMN order — index 0 is\n * `getFirstDayOfWeek()`, not Sunday — which is what the header strip wants and\n * what a `getDayOfWeek()` result (0 = Sunday) must be rotated into. Indexing\n * it directly reads Monday's name for a Sunday in every locale that starts its\n * week on Monday, which is most of them.\n */\n private readonly longWeekdays = computed(() => this.adapter.getDayOfWeekNames('long'));\n\n /**\n * A day cell's accessible name — \"Sunday, March 15, 2026\".\n *\n * The cell had none. Its only content is the day NUMBER, and `role=\"gridcell\"`\n * does not inherit a name from the grid's header or from the column header\n * above it, so every date in the month announced as a bare number: the month,\n * the year and the weekday were all on screen and none of them reachable.\n *\n * `{{date}}` is the adapter's `longDate`, so its field order, its separators\n * and its digits are `Intl`'s — the catalog decides only where the weekday\n * goes. Building it from `getMonthNames('long')` instead would have hard-coded\n * the nominative month, which Russian and Finnish inflect inside a date.\n */\n protected dayLabel(date: Date): string {\n return this.dayLabelText({\n weekday: this.longWeekdays()[(this.adapter.getDayOfWeek(date) - this.adapter.getFirstDayOfWeek() + 7) % 7],\n date: this.adapter.format(date, 'longDate'),\n });\n }\n\n /** 6×7 day grid covering the current month plus spillover. */\n protected readonly weeks = computed<readonly (readonly Date[])[]>(() => {\n const view = this.viewDate();\n const year = this.adapter.getYear(view);\n const month = this.adapter.getMonth(view);\n const firstOfMonth = this.adapter.createDate(year, month, 1);\n const firstWeekday = this.adapter.getDayOfWeek(firstOfMonth);\n const firstDayOfWeek = this.adapter.getFirstDayOfWeek();\n const lead = (firstWeekday - firstDayOfWeek + 7) % 7;\n const gridStart = this.adapter.addDays(firstOfMonth, -lead);\n\n const out: Date[][] = [];\n for (let w = 0; w < ROWS; w++) {\n const row: Date[] = [];\n for (let d = 0; d < COLS; d++) {\n row.push(this.adapter.addDays(gridStart, w * COLS + d));\n }\n out.push(row);\n }\n return out;\n });\n\n /**\n * The chip carrying the listbox's only `tabindex=\"0\"` — where the ring is, and\n * where Tab lands.\n *\n * A listbox owns its arrows, and these two did not: twelve months were twelve\n * tab stops, so the role promised an interaction model the component never\n * implemented. One tab stop plus arrow keys is the roving-tabindex half of the\n * pattern the day grid already uses.\n *\n * Routed through {@link nearestEnabledChip} on BOTH paths — the seed and every\n * arrow — for the reason the grid learned first: `.focus()` on a\n * `<button disabled>` is a no-op, so parking the sole tab stop on a month a\n * `[min]` has closed off leaves the whole view unreachable by keyboard.\n * `-1` on the day view, where there are no chips at all.\n */\n protected readonly activeChip = computed(() => {\n if (this.viewMode() === 'day') return -1;\n return this.nearestEnabledChip(this.rovedChip() ?? this.currentChip());\n });\n\n protected readonly classes = computed(() => {\n const parts = [`wr-calendar--${this.mode()}`];\n const period = this.period();\n if (period) parts.push(`wr-calendar--${period}`);\n if (this.disabled()) parts.push('wr-calendar--disabled');\n if (this.readonly()) parts.push('wr-calendar--readonly');\n return parts.join(' ');\n });\n\n /** What the sync effect last saw on each side, so it can tell which one was written. */\n private seenValue: WrCalendarValue = null;\n private seenOwn: Date | WrCalendarRange | null | undefined;\n\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('calendar');\n\n // `value` and the mode's own model (`date` or `range`) are one selection\n // under two names. Whichever was written since the last run is copied onto\n // the other; when both were, `value` wins, since it is what a form owns.\n // Declared first, so the effect below already reads the settled `date` / `range`.\n // The default tuple, by identity: how a range nobody has bound is told apart.\n const unboundRange = this.range();\n effect(() => {\n const isRange = this.mode() === 'range';\n const value = this.value();\n const own = isRange ? this.range() : this.date();\n untracked(() => {\n if (this.seenOwn === undefined) this.seenOwn = isRange ? unboundRange : null;\n\n if (value !== this.seenValue) {\n this.seenValue = value;\n if (isRange) {\n const next = this.asRange(value);\n const [start, end] = own as WrCalendarRange;\n // Same two ends: the tuple the consumer bound stays the one it reads.\n if (next[0] !== start || next[1] !== end) this.range.set(next);\n this.seenOwn = this.range();\n } else {\n const next = value instanceof Date ? value : null;\n this.date.set(next);\n this.seenOwn = next;\n }\n } else if (own !== this.seenOwn) {\n this.seenOwn = own;\n this.mirrorToValue(own);\n }\n });\n });\n\n // A calendar opens on the view its picks are made on, and goes back to it\n // when the granularity moves.\n effect(() => {\n const home = this.homeView();\n untracked(() => this.setViewMode(home));\n });\n\n // Initial focus: selected date if any, else today. Also snap viewDate to\n // that month.\n //\n // Stepped onto an ENABLED day, because the roving tabindex puts the grid's\n // only `tabindex=\"0\"` on this cell: seed it on a disabled one — which is\n // exactly what a `min` in the future does to \"today\" — and the sole tab\n // stop is an unfocusable button, leaving the grid unreachable by keyboard.\n afterNextRender(() => {\n const initial = this.nearestEnabled(this.date() ?? this.range()[0] ?? this.zoneToday());\n this.focusedDate.set(initial);\n this.viewDate.set(initial);\n\n // A second, NESTED hook: the lines above only SET the signals, which\n // schedules another change-detection pass — the `--focused` class and the\n // `tabindex` are not in the DOM until that one has run.\n if (this.autoFocus()) {\n afterNextRender(() => (this.viewMode() === 'day' ? this.focusActiveCell() : this.focusActiveChip()), {\n injector: this.injector,\n });\n }\n });\n\n // Keep viewDate in sync when date / range changes externally to a\n // different month. The viewDate read must stay untracked — otherwise\n // the effect re-runs on every internal navigation (month stepping,\n // year picking) and snaps the view back to the selected month.\n effect(() => {\n const candidate = this.mode() === 'single' ? this.date() : this.range()[0];\n if (!candidate) return;\n untracked(() => {\n if (!this.isInViewMonth(candidate)) {\n this.viewDate.set(candidate);\n // Only the tab stop moves, never real focus: nobody asked to be taken\n // here. A cursor still in the grid is one a click just placed, on the\n // end of a range whose start is what this effect follows.\n if (!this.isRendered(this.focusedDate())) {\n this.focusedDate.set(this.nearestEnabled(candidate));\n }\n }\n });\n });\n }\n\n // Navigation\n\n /** Header `‹` button — steps by month / year / decade based on the active view. */\n protected prev(): void {\n this.viewDate.set(this.stepViewDate(-1));\n this.carryCursorIntoView();\n }\n\n /** Header `›` button — steps by month / year / decade based on the active view. */\n protected next(): void {\n this.viewDate.set(this.stepViewDate(1));\n this.carryCursorIntoView();\n }\n\n /**\n * Keeps the roving cursor inside the month the grid is showing.\n *\n * The day grid marks its one tab stop by comparing each cell against\n * `focusedDate` — `[attr.tabindex]=\"isFocused(day) ? 0 : -1\"` — and `weeks()`\n * renders a fixed 42-day window around `viewDate`. Stepping the header moved\n * the window and left the cursor behind, so after two clicks no rendered cell\n * matched and all 42 buttons were `tabindex=\"-1\"`: the grid dropped out of\n * the tab order entirely and could not be reached by keyboard again without\n * navigating back. `onMonthSelect` already did this for its own path and says\n * why at the line; this is the same move for the header arrows.\n *\n * The day-of-month is kept where the new month is long enough for it, so\n * paging through March from the 31st does not silently walk the cursor back\n * to the 1st, and the landing is routed through `nearestEnabled` like every\n * other cursor write.\n */\n private carryCursorIntoView(): void {\n if (this.viewMode() !== 'day') return;\n\n const view = this.viewDate();\n const focused = this.focusedDate();\n if (this.adapter.isSameMonth(focused, view)) return;\n\n const day = Math.min(this.adapter.getDate(focused), this.adapter.getDaysInMonth(view));\n const landing = this.adapter.createDate(this.adapter.getYear(view), this.adapter.getMonth(view), day);\n this.focusedDate.set(this.nearestEnabled(landing));\n }\n\n /**\n * Whether the month on screen already shows the selection. A week that\n * straddles two months is on show in both, so picking it from the later one\n * does not page the grid back to where its first day is.\n */\n private isInViewMonth(selected: Date): boolean {\n const view = this.viewDate();\n if (this.adapter.isSameMonth(selected, view)) return true;\n return this.period() === 'week' && this.adapter.isSameMonth(this.weekOf(selected)[1], view);\n }\n\n /** The first and last day of the week `date` is in. */\n private weekOf(date: Date): readonly [Date, Date] {\n return [wrPeriodStart(this.adapter, date, 'week'), wrPeriodEnd(this.adapter, date, 'week')];\n }\n\n /** Whether `date` is one of the 42 days the grid is showing. */\n private isRendered(date: Date): boolean {\n const weeks = this.weeks();\n return (\n this.adapter.compareDate(date, weeks[0][0]) >= 0 && this.adapter.compareDate(date, weeks[ROWS - 1][COLS - 1]) <= 0\n );\n }\n\n /** Header label click — zooms out (`day → month → year`). No-op at year view. */\n protected onLabelClick(): void {\n if (this.disabled()) return;\n if (this.viewMode() === 'day') {\n this.setViewMode('month');\n } else if (this.viewMode() !== 'year') {\n this.setViewMode('year');\n // The label is disabled on the year page, and disabling the button that\n // holds focus drops it to `<body>`. The page that opened takes it instead.\n afterNextRender(() => this.focusActiveChip(), { injector: this.injector });\n }\n }\n\n /**\n * Picking a month drops to the day grid — and takes real focus with it.\n *\n * The `@switch (viewMode())` in the template destroys the chip that holds DOM\n * focus, so without the two lines below `document.activeElement` became\n * `<body>`: the ring appeared on the new view and focus did not, the arrow\n * keys went dead (the keydown handler is a HOST binding, so nothing reaches\n * the component from `<body>`), and the next Tab restarted from the top of the\n * document — out of the calendar entirely. It is the same trap the two\n * keyboard paths in this file already fix, and for the same reason\n * `afterNextRender` rather than `queueMicrotask`: under zoneless CD the\n * microtask runs before the new view is in the DOM.\n *\n * `focusedDate` has to move too, and that half is easy to miss. The grid marks\n * its focusable cell by comparing against `focusedDate`, not `viewDate`, so\n * choosing a DIFFERENT month rendered a grid with no `--focused` cell and no\n * `tabindex=\"0\"` at all — unreachable by keyboard from either direction. The\n * day is preserved when the month already holds it and otherwise falls to the\n * first, which is where `viewDate` lands anyway.\n */\n protected onMonthSelect(monthIdx: number): void {\n if (this.isMonthDisabled(monthIdx)) return;\n const v = this.viewDate();\n const year = this.adapter.getYear(v);\n if (this.picksChips()) {\n this.pickChip(monthIdx, this.adapter.createDate(year, monthIdx, 1));\n return;\n }\n this.viewDate.set(this.adapter.createDate(year, monthIdx, 1));\n\n const focused = this.focusedDate();\n const alreadyThere = this.adapter.getYear(focused) === year && this.adapter.getMonth(focused) === monthIdx;\n if (!alreadyThere) this.focusedDate.set(this.adapter.createDate(year, monthIdx, 1));\n\n this.setViewMode('day');\n afterNextRender(() => this.focusActiveCell(), { injector: this.injector });\n }\n\n /**\n * From the year view to the month view, with the same focus restoration; the landing view is chips.\n * Under `granularity=\"quarter\"` the landing view is the quarters, and under\n * `granularity=\"year\"` the year is the pick.\n */\n protected onYearSelect(year: number): void {\n if (this.isYearDisabled(year)) return;\n if (this.picksChips()) {\n this.pickChip(this.yearsView().indexOf(year), this.adapter.createDate(year, 0, 1));\n return;\n }\n const v = this.viewDate();\n this.viewDate.set(this.adapter.createDate(year, this.adapter.getMonth(v), 1));\n this.setViewMode(this.homeView() === 'quarter' ? 'quarter' : 'month');\n afterNextRender(() => this.focusActiveChip(), { injector: this.injector });\n }\n\n /** A quarter chip, which only `granularity=\"quarter\"` renders: always a pick. */\n protected onQuarterSelect(index: number): void {\n if (this.isQuarterDisabled(index)) return;\n this.pickChip(index, this.chipStart(index));\n }\n\n /**\n * A chip that IS the pick. The view stays, so the chip keeps real focus, and\n * the ring is moved onto it: a click is a navigation too.\n */\n private pickChip(index: number, start: Date): void {\n if (this.readonly()) return;\n this.rovedChip.set(index);\n this.pick(start);\n }\n\n /**\n * Switch views and drop the chip ring with them.\n *\n * Every view change is the only thing that changes what the chips MEAN, so it\n * is the one place the ring has to forget where it was — otherwise a year\n * picked at index 7 rings the eighth MONTH on the way back down.\n */\n private setViewMode(view: WrCalendarViewMode): void {\n this.rovedChip.set(null);\n this.viewMode.set(view);\n }\n\n private stepViewDate(direction: -1 | 1): Date {\n const v = this.viewDate();\n switch (this.viewMode()) {\n case 'day':\n return this.adapter.addMonths(v, direction);\n case 'month':\n case 'quarter':\n return this.adapter.addYears(v, direction);\n case 'year':\n return this.adapter.addYears(v, direction * 12);\n }\n }\n\n // Cell state predicates (used by template)\n\n /** Through the adapter, not `Date#getDate`: a zoned adapter's day is not the browser's. */\n protected dayOfMonth(date: Date): number {\n return this.adapter.getDate(date);\n }\n\n protected isToday(date: Date): boolean {\n return this.adapter.isSameDay(date, this.today());\n }\n\n protected isOutOfMonth(date: Date): boolean {\n return !this.adapter.isSameMonth(date, this.viewDate());\n }\n\n protected isSelected(date: Date): boolean {\n // A picked week reads as a band: its two ends filled, the days between tinted.\n const week = this.pickedWeek();\n if (week) return this.adapter.isSameDay(date, week[0]) || this.adapter.isSameDay(date, week[1]);\n if (this.mode() === 'single') {\n const v = this.date();\n return v ? this.adapter.isSameDay(date, v) : false;\n }\n const [start, end] = this.range();\n if (start && this.adapter.isSameDay(date, start)) return true;\n if (end && this.adapter.isSameDay(date, end)) return true;\n return false;\n }\n\n /**\n * What `aria-selected` says. Every day of a picked week is selected, though\n * only its two ends are drawn filled.\n */\n protected isAriaSelected(date: Date): boolean {\n return this.isSelected(date) || (!!this.pickedWeek() && this.isInRange(date));\n }\n\n protected isInRange(date: Date): boolean {\n const week = this.pickedWeek();\n if (week) return this.adapter.compareDate(date, week[0]) > 0 && this.adapter.compareDate(date, week[1]) < 0;\n if (this.mode() !== 'range') return false;\n const [start, end] = this.range();\n if (!start || !end) return false;\n return this.adapter.compareDate(date, start) > 0 && this.adapter.compareDate(date, end) < 0;\n }\n\n protected isInRangePreview(date: Date): boolean {\n const hoverWeek = this.hoverWeek();\n if (this.mode() !== 'range') {\n // The week a click would pick, whole, unless it is the one already picked.\n if (!hoverWeek || this.isAriaSelected(date)) return false;\n return this.adapter.compareDate(date, hoverWeek[0]) >= 0 && this.adapter.compareDate(date, hoverWeek[1]) <= 0;\n }\n const [start, end] = this.range();\n const hover = this.hoverDate();\n if (!start || end || !hover) return false;\n const before = this.adapter.compareDate(start, hover) <= 0;\n if (hoverWeek) {\n // The hovered week is part of what a click would take, up to its far end.\n return before\n ? this.adapter.compareDate(date, start) > 0 && this.adapter.compareDate(date, hoverWeek[1]) <= 0\n : this.adapter.compareDate(date, hoverWeek[0]) >= 0 && this.adapter.compareDate(date, start) < 0;\n }\n const lo = before ? start : hover;\n const hi = before ? hover : start;\n return this.adapter.compareDate(date, lo) > 0 && this.adapter.compareDate(date, hi) < 0;\n }\n\n protected isFocused(date: Date): boolean {\n return this.adapter.isSameDay(date, this.focusedDate());\n }\n\n protected isDisabled(date: Date): boolean {\n if (this.disabled()) return true;\n const min = asBound(this.min());\n if (min && this.adapter.compareDate(date, min) < 0) return true;\n const max = asBound(this.max());\n if (max && this.adapter.compareDate(date, max) > 0) return true;\n const filter = this.dateFilter();\n if (filter && !filter(date)) return true;\n return false;\n }\n\n // Month / quarter / year view predicates\n\n /**\n * The first day of the period the chip at `index` names, in the view on\n * screen: a month or a quarter of the year in the header, or a year of the\n * twelve on the page.\n */\n private chipStart(index: number): Date {\n const year = this.adapter.getYear(this.viewDate());\n switch (this.viewMode()) {\n case 'quarter':\n return this.adapter.createDate(year, index * 3, 1);\n case 'year':\n return this.adapter.createDate(this.yearsView()[index] ?? year, 0, 1);\n default:\n return this.adapter.createDate(year, index, 1);\n }\n }\n\n /** Whether `date` falls in the period the chip at `index` names. */\n private isInChip(date: Date, index: number): boolean {\n const chip = this.chipStart(index);\n if (this.adapter.getYear(date) !== this.adapter.getYear(chip)) return false;\n switch (this.viewMode()) {\n case 'quarter':\n return Math.floor(this.adapter.getMonth(date) / 3) === index;\n case 'year':\n return true;\n default:\n return this.adapter.getMonth(date) === index;\n }\n }\n\n /** The chip the view itself points at: see {@link currentChip}. */\n protected isChipCurrent(index: number): boolean {\n return this.currentChip() === index;\n }\n\n /**\n * Whether the chip holds the selection. On the way to a finer view it marks\n * where the selection is; where the chip is the pick, both ends of a range\n * count.\n */\n protected isChipSelected(index: number): boolean {\n if (this.mode() === 'single') {\n const v = this.date();\n return !!v && this.isInChip(v, index);\n }\n const [start, end] = this.range();\n if (start && this.isInChip(start, index)) return true;\n return this.picksChips() && !!end && this.isInChip(end, index);\n }\n\n /** A chip strictly between the two ends of a picked range of periods. */\n protected isChipInRange(index: number): boolean {\n if (this.mode() !== 'range' || !this.picksChips()) return false;\n const [start, end] = this.range();\n if (!start || !end || this.isChipSelected(index)) return false;\n const chip = this.chipStart(index);\n return this.adapter.compareDate(chip, start) > 0 && this.adapter.compareDate(chip, end) < 0;\n }\n\n /** A chip the range would take if the hovered one were clicked. */\n protected isChipRangePreview(index: number): boolean {\n if (this.mode() !== 'range' || !this.picksChips()) return false;\n const [start, end] = this.range();\n const hover = this.hoverDate();\n if (!start || end || !hover || this.isChipSelected(index)) return false;\n const before = this.adapter.compareDate(start, hover) <= 0;\n const chip = this.chipStart(index);\n return (\n this.adapter.compareDate(chip, before ? start : hover) >= 0 &&\n this.adapter.compareDate(chip, before ? hover : start) <= 0\n );\n }\n\n protected onChipEnter(index: number): void {\n if (this.mode() === 'range' && this.picksChips() && !this.readonly()) this.hoverDate.set(this.chipStart(index));\n }\n\n /**\n * Whether `min`, `max` or, where the span is what a click picks, `dateFilter`\n * closes every day from `start` to `end`. A filter is asked only about a\n * period that can be picked: on the way to the day grid a month stays open,\n * as it always has, and its days say which of them are closed.\n */\n private isSpanClosed(start: Date, end: Date): boolean {\n if (this.disabled()) return true;\n const min = asBound(this.min());\n if (min && this.adapter.compareDate(end, min) < 0) return true;\n const max = asBound(this.max());\n if (max && this.adapter.compareDate(start, max) > 0) return true;\n const filter = this.dateFilter();\n if (!filter || !this.picksChips()) return false;\n for (let day = start; this.adapter.compareDate(day, end) <= 0; day = this.adapter.addDays(day, 1)) {\n if (filter(day)) return false;\n }\n return true;\n }\n\n protected isMonthDisabled(monthIdx: number): boolean {\n const year = this.adapter.getYear(this.viewDate());\n const monthStart = this.adapter.createDate(year, monthIdx, 1);\n return this.isSpanClosed(monthStart, wrPeriodEnd(this.adapter, monthStart, 'month'));\n }\n\n protected isQuarterDisabled(index: number): boolean {\n const year = this.adapter.getYear(this.viewDate());\n const quarterStart = this.adapter.createDate(year, index * 3, 1);\n return this.isSpanClosed(quarterStart, wrPeriodEnd(this.adapter, quarterStart, 'quarter'));\n }\n\n protected isYearDisabled(year: number): boolean {\n return this.isSpanClosed(this.adapter.createDate(year, 0, 1), this.adapter.createDate(year, 11, 31));\n }\n\n // Interaction\n\n protected onCellClick(date: Date): void {\n // The one way a pick reaches the models, so the one place `readonly` guards.\n if (this.readonly() || this.isDisabled(date)) return;\n this.pick(date);\n this.focusedDate.set(date);\n if (!this.adapter.isSameMonth(date, this.viewDate())) {\n this.viewDate.set(date);\n }\n }\n\n /**\n * Writes a pick to the models: the day itself, or under a `granularity` the\n * first day of the period it is in.\n */\n private pick(date: Date): void {\n if (this.mode() === 'single') {\n const period = this.period();\n const picked = period ? wrPeriodStart(this.adapter, date, period) : this.adapter.clone(date);\n this.date.set(picked);\n this.seenOwn = picked;\n this.mirrorToValue(picked);\n } else {\n this.applyRangeClick(date);\n this.seenOwn = this.range();\n this.mirrorToValue(this.seenOwn);\n }\n }\n\n protected onCellEnter(date: Date): void {\n // No preview while read-only: it draws the range a click would not make.\n if ((this.mode() === 'range' || this.period() === 'week') && !this.readonly()) this.hoverDate.set(date);\n }\n\n /**\n * Focus the calendar, which is what Signal Forms calls to focus this control.\n * Focus goes where Tab would put it: the day or the chip holding the roving\n * tab stop, since the host has none of its own.\n */\n focus(options?: FocusOptions): void {\n this.host.nativeElement\n .querySelector<HTMLElement>('.wr-calendar__day[tabindex=\"0\"], .wr-calendar__chip[tabindex=\"0\"]')\n ?.focus(options);\n }\n\n /**\n * Leaving the calendar marks a bound field touched. A `relatedTarget` inside\n * the host is focus moving between cells, chips and the header, which is not\n * leaving.\n */\n protected onFocusOut(event: FocusEvent): void {\n const next = event.relatedTarget;\n if (next instanceof Node && this.host.nativeElement.contains(next)) return;\n this.touch.emit();\n }\n\n /** Mirrors the mode's own model onto `value`. An empty range is `null`, as a form reads \"nothing picked\". */\n private mirrorToValue(own: Date | WrCalendarRange | null): void {\n const next = Array.isArray(own) && !own[0] && !own[1] ? null : own;\n this.seenValue = next;\n this.value.set(next);\n }\n\n /** `value` as the `range` model holds it. A lone `Date` is not a range and reads as empty. */\n private asRange(value: WrCalendarValue): WrCalendarRange {\n return Array.isArray(value) ? (value as WrCalendarRange) : EMPTY_RANGE;\n }\n\n protected onCellLeave(): void {\n this.hoverDate.set(null);\n }\n\n /**\n * Under a `granularity` each end is widened to its period: the start to the\n * period's first day and the end to its last, so the range is still an\n * inclusive run of days.\n */\n private applyRangeClick(date: Date): void {\n const period = this.period();\n const [start, end] = this.range();\n const from = period ? wrPeriodStart(this.adapter, date, period) : this.adapter.clone(date);\n if (!start || (start && end)) {\n this.range.set([from, null]);\n return;\n }\n if (this.adapter.compareDate(date, start) < 0) {\n this.range.set([from, period ? wrPeriodEnd(this.adapter, start, period) : start]);\n } else {\n this.range.set([start, period ? wrPeriodEnd(this.adapter, date, period) : this.adapter.clone(date)]);\n }\n this.hoverDate.set(null);\n }\n\n // Keyboard\n\n protected onKeyDown(event: KeyboardEvent): void {\n if (this.disabled()) return;\n\n // The listener sits on the HOST, which also wraps the nav header — so\n // without this every key aimed at a `‹` button drove the day grid instead,\n // and the `preventDefault()` below cancelled the button's own activation:\n // Enter on `‹` picked a day the user never touched, ArrowDown on the header\n // yanked real focus into the grid. The host element itself is deliberately\n // let through: `WrCalendarHarness` sends its keys to `<wr-calendar>` rather\n // than to a cell, because the calendar moves focus in an `afterNextRender`\n // and jsdom often has focus nowhere at all.\n const target = event.target as Element | null;\n if (target !== this.host.nativeElement && target?.closest('.wr-calendar__header')) return;\n\n // The month and year views are listboxes, and the arrows belong to them\n // while they are up — there is no day grid on screen to drive. Their chips\n // are real `<button>`s, so Enter and Space fall through to the browser's own\n // activation and must not be swallowed here.\n if (this.viewMode() !== 'day') {\n this.onChipKeyDown(event);\n return;\n }\n\n const current = this.focusedDate();\n let next: Date | null = null;\n // Which way the key travels, so a landing on a closed-off day can keep\n // going instead of stopping on it. See `nearestEnabledToward`.\n let dir: 1 | -1 = 1;\n\n switch (this.inlineKey(event.key)) {\n case 'ArrowLeft':\n next = this.adapter.addDays(current, -1);\n dir = -1;\n break;\n case 'ArrowRight':\n next = this.adapter.addDays(current, 1);\n break;\n case 'ArrowUp':\n next = this.adapter.addDays(current, -7);\n dir = -1;\n break;\n case 'ArrowDown':\n next = this.adapter.addDays(current, 7);\n break;\n case 'Home': {\n const dow = this.adapter.getDayOfWeek(current);\n const first = this.adapter.getFirstDayOfWeek();\n next = this.adapter.addDays(current, -((dow - first + 7) % 7));\n dir = -1;\n break;\n }\n case 'End': {\n const dow = this.adapter.getDayOfWeek(current);\n const first = this.adapter.getFirstDayOfWeek();\n next = this.adapter.addDays(current, 6 - ((dow - first + 7) % 7));\n break;\n }\n case 'PageUp':\n next = event.shiftKey ? this.adapter.addYears(current, -1) : this.adapter.addMonths(current, -1);\n dir = -1;\n break;\n case 'PageDown':\n next = event.shiftKey ? this.adapter.addYears(current, 1) : this.adapter.addMonths(current, 1);\n break;\n case 'Enter':\n case ' ':\n event.preventDefault();\n this.onCellClick(current);\n return;\n }\n\n if (!next) return;\n event.preventDefault();\n\n // The seed is routed through `nearestEnabled` for a reason, and navigation\n // needs the same care: a cell renders `disabled` AND carries the grid's only\n // `tabindex=\"0\"`, so parking the ring on a closed-off day leaves zero\n // tabbable cells — the user tabs out of the calendar and can never tab back\n // in. Real focus splits from the ring too, because `.focus()` on a disabled\n // button is a no-op. Reached by nothing more exotic than `[minDate]`.\n const landing = this.nearestEnabledToward(next, dir);\n if (!landing) return;\n next = landing;\n\n this.focusedDate.set(next);\n if (!this.adapter.isSameMonth(next, this.viewDate())) {\n this.viewDate.set(next);\n }\n // `afterNextRender`, NOT `queueMicrotask`. Under zoneless CD the scheduler\n // runs change detection in a macrotask, so a microtask fires FIRST — the\n // `--focused` class is still on the cell we just left, and this focuses\n // that one. The ring moved and real focus did not, permanently: a screen\n // reader kept announcing the previous day.\n afterNextRender(() => this.focusActiveCell(), { injector: this.injector });\n }\n\n /**\n * Arrow / Home / End inside the month or year listbox — the roving half of the\n * pattern their `role` has always claimed.\n *\n * Steps by one along the row and by a full row vertically, and the inline pair\n * mirrors under `dir=\"rtl\"` for the same reason the grid's does: those two keys\n * name a side of the screen. The page does NOT wrap or spill into the next\n * one — a month list is twelve fixed cells, and the header's `‹` / `›` are what\n * change which twelve. Anything else (Enter, Space, Tab, Escape) is left to the\n * button and to whatever owns the calendar.\n */\n private onChipKeyDown(event: KeyboardEvent): void {\n const view = this.viewMode();\n if (view === 'day') return;\n const cols = CHIP_COLS[view];\n const count = this.chipCount();\n const current = this.activeChip();\n // Assigned on every branch that does not return, so it needs no placeholder.\n let next: number;\n // Which way to keep looking when the landing chip is closed off, exactly as\n // `nearestEnabledToward` does for days.\n let dir: 1 | -1 = 1;\n\n switch (this.inlineKey(event.key)) {\n case 'ArrowLeft':\n next = current - 1;\n dir = -1;\n break;\n case 'ArrowRight':\n next = current + 1;\n break;\n case 'ArrowUp':\n next = current - cols;\n dir = -1;\n break;\n case 'ArrowDown':\n next = current + cols;\n break;\n case 'Home':\n next = 0;\n break;\n case 'End':\n next = count - 1;\n dir = -1;\n break;\n default:\n return;\n }\n\n const landing = this.enabledChipToward(next, dir);\n if (landing === null) return;\n\n event.preventDefault();\n this.rovedChip.set(landing);\n // `afterNextRender`, not `queueMicrotask` — same trap as the grid: under\n // zoneless CD the microtask runs before the new `tabindex` is in the DOM, so\n // the focus call would land on the chip the ring just left.\n afterNextRender(() => this.focusActiveChip(), { injector: this.injector });\n }\n\n /** How many chips the current view renders, read rather than assumed. */\n private chipCount(): number {\n switch (this.viewMode()) {\n case 'month':\n return this.monthsView().length;\n case 'quarter':\n return this.quartersView.length;\n default:\n return this.yearsView().length;\n }\n }\n\n /** Whether the chip at `index` refuses selection in the current view. */\n private isChipDisabled(index: number): boolean {\n if (this.viewMode() === 'month') return this.isMonthDisabled(index);\n if (this.viewMode() === 'quarter') return this.isQuarterDisabled(index);\n const year = this.yearsView()[index];\n return year === undefined || this.isYearDisabled(year);\n }\n\n /** The chip the view itself points at: the month, quarter or year currently on screen. */\n private currentChip(): number {\n if (this.viewMode() === 'month') return this.adapter.getMonth(this.viewDate());\n if (this.viewMode() === 'quarter') return Math.floor(this.adapter.getMonth(this.viewDate()) / 3);\n const index = this.yearsView().indexOf(this.adapter.getYear(this.viewDate()));\n return index === -1 ? 0 : index;\n }\n\n /**\n * The first selectable chip at or after `from`, else the first before it, else\n * `from` unchanged when the whole page is closed off — the chip version of\n * {@link nearestEnabled}, and it exists for the same reason: the ring carries\n * the only `tabindex=\"0\"`, and a disabled button cannot hold it.\n */\n private nearestEnabledChip(from: number): number {\n const count = this.chipCount();\n const start = Math.min(Math.max(from, 0), count - 1);\n if (!this.isChipDisabled(start)) return start;\n\n for (const step of [1, -1] as const) {\n const found = this.enabledChipToward(start + step, step);\n if (found !== null) return found;\n }\n return start;\n }\n\n /**\n * The first selectable chip at `from` or beyond it in `step`'s direction, else\n * null when that whole direction is closed off — which is the answer for an\n * ArrowLeft on the first chip: stay put.\n */\n private enabledChipToward(from: number, step: 1 | -1): number | null {\n for (let i = from; i >= 0 && i < this.chipCount(); i += step) {\n if (!this.isChipDisabled(i)) return i;\n }\n return null;\n }\n\n private focusActiveChip(): void {\n // By the tab stop, not by index: it is the same element the ring is on, and\n // asking for it this way cannot drift out of step with the template.\n this.host.nativeElement.querySelector<HTMLElement>('.wr-calendar__chip[tabindex=\"0\"]')?.focus();\n }\n\n /**\n * The first selectable day at or after `candidate`, else the first before it,\n * else `candidate` unchanged when everything nearby is closed off. Bounded at\n * a year each way so a pathological `dateFilter` cannot spin.\n */\n private nearestEnabled(candidate: Date): Date {\n if (!this.isDisabled(candidate)) return candidate;\n\n for (const step of [1, -1] as const) {\n let probe = candidate;\n for (let i = 0; i < 366; i++) {\n probe = this.adapter.addDays(probe, step);\n if (!this.isDisabled(probe)) return probe;\n }\n }\n return candidate;\n }\n\n /**\n * The first selectable day at `candidate` or beyond it in `step`'s direction,\n * else null when that whole direction is closed off — which is the answer for\n * an ArrowLeft that would cross `min`: stay put.\n *\n * Direction matters. Reusing `nearestEnabled`, which probes forward first,\n * would send an ArrowLeft over a disabled weekend straight back to the day it\n * started from, so the ring could never cross the hole.\n */\n private nearestEnabledToward(candidate: Date, step: 1 | -1): Date | null {\n let probe = candidate;\n for (let i = 0; i < 366; i++) {\n if (!this.isDisabled(probe)) return probe;\n probe = this.adapter.addDays(probe, step);\n }\n return null;\n }\n\n private focusActiveCell(): void {\n const el = this.host.nativeElement.querySelector('.wr-calendar__day--focused');\n (el as HTMLElement | null)?.focus();\n }\n\n /** Used by the template's `track` expression. */\n protected trackByTime(_: number, date: Date): number {\n return date.getTime();\n }\n\n /**\n * The key as the GRID sees it.\n *\n * Arrow keys follow visual order, and a calendar grid mirrors under\n * `dir=\"rtl\"`: the day to the visual right of today is yesterday. Only the\n * inline pair swaps — Up/Down step a week either way, and PageUp/PageDown and\n * Home/End are semantic rather than physical.\n */\n private inlineKey(key: string): string {\n if (this.dir?.value !== 'rtl') return key;\n if (key === 'ArrowRight') return 'ArrowLeft';\n if (key === 'ArrowLeft') return 'ArrowRight';\n return key;\n }\n}\n","<div class=\"wr-calendar__header\">\n <button\n type=\"button\"\n class=\"wr-calendar__nav wr-calendar__nav--prev\"\n [attr.aria-label]=\"prevLabel()\"\n [disabled]=\"disabled()\"\n (click)=\"prev()\"\n >\n <svg\n width=\"18\"\n height=\"18\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m15 18-6-6 6-6\" />\n </svg>\n </button>\n <button\n type=\"button\"\n class=\"wr-calendar__label\"\n [disabled]=\"disabled() || viewMode() === 'year'\"\n (click)=\"onLabelClick()\"\n >\n {{ headerLabel() }}\n </button>\n <button\n type=\"button\"\n class=\"wr-calendar__nav wr-calendar__nav--next\"\n [attr.aria-label]=\"nextLabel()\"\n [disabled]=\"disabled()\"\n (click)=\"next()\"\n >\n <svg\n width=\"18\"\n height=\"18\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n </button>\n</div>\n\n@switch (viewMode()) {\n @case ('day') {\n <!--\n The weekday strip and the week rows are one grid, so they share a wrapper:\n `role=\"grid\"` may only own rows, and as siblings the header row had no grid\n parent at all. `.wr-calendar__body` repeats the host's column gap, so the\n rendered spacing is unchanged.\n -->\n <div\n class=\"wr-calendar__body\"\n role=\"grid\"\n [attr.aria-label]=\"fieldAria.labelledBy() ? null : ariaLabel()\"\n [attr.aria-labelledby]=\"fieldAria.labelledBy()\"\n [attr.aria-readonly]=\"readonly() ? 'true' : null\"\n [attr.aria-invalid]=\"fieldAria.ariaInvalid()\"\n [attr.aria-describedby]=\"fieldAria.describedBy()\"\n >\n <div class=\"wr-calendar__weekdays\" role=\"row\">\n @for (name of weekdayNames(); track name) {\n <span class=\"wr-calendar__weekday\" role=\"columnheader\">{{ name }}</span>\n }\n </div>\n\n <div class=\"wr-calendar__grid\" role=\"rowgroup\" (mouseleave)=\"onCellLeave()\">\n @for (week of weeks(); track $index) {\n <div class=\"wr-calendar__week\" role=\"row\">\n @for (day of week; track trackByTime($index, day)) {\n <button\n type=\"button\"\n class=\"wr-calendar__day\"\n role=\"gridcell\"\n [class.wr-calendar__day--today]=\"isToday(day)\"\n [class.wr-calendar__day--out-of-month]=\"isOutOfMonth(day)\"\n [class.wr-calendar__day--selected]=\"isSelected(day)\"\n [class.wr-calendar__day--in-range]=\"isInRange(day)\"\n [class.wr-calendar__day--range-preview]=\"isInRangePreview(day)\"\n [class.wr-calendar__day--focused]=\"isFocused(day)\"\n [disabled]=\"isDisabled(day)\"\n [attr.tabindex]=\"isFocused(day) ? 0 : -1\"\n [attr.aria-label]=\"dayLabel(day)\"\n [attr.aria-selected]=\"isAriaSelected(day)\"\n [attr.aria-disabled]=\"isDisabled(day)\"\n (click)=\"onCellClick(day)\"\n (mouseenter)=\"onCellEnter(day)\"\n >\n {{ dayOfMonth(day) }}\n </button>\n }\n </div>\n }\n </div>\n </div>\n }\n\n @case ('month') {\n <!--\n A listbox owns its arrows, so its options share ONE tab stop: twelve months\n that were each tabbable announced a keyboard model — arrow to a month, Tab\n out of the list — that the component did not have. `activeChip()` is where\n the ring is, and it is always an enabled chip.\n -->\n <div\n class=\"wr-calendar__months\"\n role=\"listbox\"\n [attr.aria-label]=\"resolvedMonthListLabel()\"\n [attr.aria-invalid]=\"fieldAria.ariaInvalid()\"\n [attr.aria-describedby]=\"fieldAria.describedBy()\"\n (mouseleave)=\"onCellLeave()\"\n >\n @for (name of monthsView(); track name) {\n <button\n type=\"button\"\n class=\"wr-calendar__chip\"\n role=\"option\"\n [class.wr-calendar__chip--current]=\"isChipCurrent($index)\"\n [class.wr-calendar__chip--selected]=\"isChipSelected($index)\"\n [class.wr-calendar__chip--in-range]=\"isChipInRange($index)\"\n [class.wr-calendar__chip--range-preview]=\"isChipRangePreview($index)\"\n [disabled]=\"isMonthDisabled($index)\"\n [attr.tabindex]=\"activeChip() === $index ? 0 : -1\"\n [attr.aria-selected]=\"isChipSelected($index)\"\n [attr.aria-disabled]=\"isMonthDisabled($index)\"\n (click)=\"onMonthSelect($index)\"\n (mouseenter)=\"onChipEnter($index)\"\n >\n {{ name }}\n </button>\n }\n </div>\n }\n\n @case ('quarter') {\n <!-- Only under `granularity=\"quarter\"`, where a chip is the pick itself. -->\n <div\n class=\"wr-calendar__quarters\"\n role=\"listbox\"\n [attr.aria-label]=\"resolvedQuarterListLabel()\"\n [attr.aria-invalid]=\"fieldAria.ariaInvalid()\"\n [attr.aria-describedby]=\"fieldAria.describedBy()\"\n (mouseleave)=\"onCellLeave()\"\n >\n @for (quarter of quartersView; track quarter) {\n <button\n type=\"button\"\n class=\"wr-calendar__chip\"\n role=\"option\"\n [class.wr-calendar__chip--current]=\"isChipCurrent($index)\"\n [class.wr-calendar__chip--selected]=\"isChipSelected($index)\"\n [class.wr-calendar__chip--in-range]=\"isChipInRange($index)\"\n [class.wr-calendar__chip--range-preview]=\"isChipRangePreview($index)\"\n [disabled]=\"isQuarterDisabled($index)\"\n [attr.tabindex]=\"activeChip() === $index ? 0 : -1\"\n [attr.aria-selected]=\"isChipSelected($index)\"\n [attr.aria-disabled]=\"isQuarterDisabled($index)\"\n (click)=\"onQuarterSelect($index)\"\n (mouseenter)=\"onChipEnter($index)\"\n >\n {{ quarterLabel(quarter) }}\n </button>\n }\n </div>\n }\n\n @case ('year') {\n <div\n class=\"wr-calendar__years\"\n role=\"listbox\"\n [attr.aria-label]=\"resolvedYearListLabel()\"\n [attr.aria-invalid]=\"fieldAria.ariaInvalid()\"\n [attr.aria-describedby]=\"fieldAria.describedBy()\"\n (mouseleave)=\"onCellLeave()\"\n >\n @for (year of yearsView(); track year) {\n <button\n type=\"button\"\n class=\"wr-calendar__chip\"\n role=\"option\"\n [class.wr-calendar__chip--current]=\"isChipCurrent($index)\"\n [class.wr-calendar__chip--selected]=\"isChipSelected($index)\"\n [class.wr-calendar__chip--in-range]=\"isChipInRange($index)\"\n [class.wr-calendar__chip--range-preview]=\"isChipRangePreview($index)\"\n [disabled]=\"isYearDisabled(year)\"\n [attr.tabindex]=\"activeChip() === $index ? 0 : -1\"\n [attr.aria-selected]=\"isChipSelected($index)\"\n [attr.aria-disabled]=\"isYearDisabled(year)\"\n (click)=\"onYearSelect(year)\"\n (mouseenter)=\"onChipEnter($index)\"\n >\n {{ year }}\n </button>\n }\n </div>\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAiCA,MAAM,cAA+B,CAAC,MAAM,IAAI;AAGhD,SAAS,QAAQ,OAAc;CAC7B,OAAO,iBAAiB,OAAO,QAAQ;AACzC;AAEA,MAAM,OAAO;AACb,MAAM,OAAO;AAgBb,MAAM,YAA0E;CAC9E,OAAO;CACP,SAAS;CACT,MAAM;AACP;AA0CD,IAAa,aAAb,MAAa,WAAU;CAEZ,OAAO,MAAsB,UAAS,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CActC,cAAc,MAA6B,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CA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AAA,kBAAA;CAAA,CAAA;;ADxGa,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAU,YAAA,CAAA;EAdtB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAa,eAER,kBAAkB;GAAI,MAC/B;IACJ,OAAO;IACP,WAAW;IAIX,aAAa;IACb,cAAc;GACf;GAAA,UAAA;EAAA,CAAA"}
@@ -35,7 +35,7 @@ var WrCard = class WrCard {
35
35
  }, ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
36
36
  static ɵfac = i0.ɵɵngDeclareFactory({
37
37
  minVersion: "12.0.0",
38
- version: "22.2.5",
38
+ version: "22.2.6",
39
39
  ngImport: i0,
40
40
  type: WrCard,
41
41
  deps: [],
@@ -43,7 +43,7 @@ var WrCard = class WrCard {
43
43
  });
44
44
  static ɵcmp = i0.ɵɵngDeclareComponent({
45
45
  minVersion: "17.0.0",
46
- version: "22.2.5",
46
+ version: "22.2.6",
47
47
  type: WrCard,
48
48
  isStandalone: true,
49
49
  selector: "wr-card",
@@ -92,7 +92,7 @@ var WrCard = class WrCard {
92
92
  };
93
93
  i0.ɵɵngDeclareClassMetadata({
94
94
  minVersion: "12.0.0",
95
- version: "22.2.5",
95
+ version: "22.2.6",
96
96
  ngImport: i0,
97
97
  type: WrCard,
98
98
  decorators: [{
@@ -150,7 +150,7 @@ var WrCardHeader = class WrCardHeader {
150
150
  }
151
151
  static ɵfac = i0.ɵɵngDeclareFactory({
152
152
  minVersion: "12.0.0",
153
- version: "22.2.5",
153
+ version: "22.2.6",
154
154
  ngImport: i0,
155
155
  type: WrCardHeader,
156
156
  deps: [],
@@ -158,7 +158,7 @@ var WrCardHeader = class WrCardHeader {
158
158
  });
159
159
  static ɵcmp = i0.ɵɵngDeclareComponent({
160
160
  minVersion: "14.0.0",
161
- version: "22.2.5",
161
+ version: "22.2.6",
162
162
  type: WrCardHeader,
163
163
  isStandalone: true,
164
164
  selector: "wr-card-header",
@@ -171,7 +171,7 @@ var WrCardHeader = class WrCardHeader {
171
171
  };
172
172
  i0.ɵɵngDeclareClassMetadata({
173
173
  minVersion: "12.0.0",
174
- version: "22.2.5",
174
+ version: "22.2.6",
175
175
  ngImport: i0,
176
176
  type: WrCardHeader,
177
177
  decorators: [{
@@ -191,7 +191,7 @@ var WrCardFooter = class WrCardFooter {
191
191
  }
192
192
  static ɵfac = i0.ɵɵngDeclareFactory({
193
193
  minVersion: "12.0.0",
194
- version: "22.2.5",
194
+ version: "22.2.6",
195
195
  ngImport: i0,
196
196
  type: WrCardFooter,
197
197
  deps: [],
@@ -199,7 +199,7 @@ var WrCardFooter = class WrCardFooter {
199
199
  });
200
200
  static ɵcmp = i0.ɵɵngDeclareComponent({
201
201
  minVersion: "14.0.0",
202
- version: "22.2.5",
202
+ version: "22.2.6",
203
203
  type: WrCardFooter,
204
204
  isStandalone: true,
205
205
  selector: "wr-card-footer",
@@ -212,7 +212,7 @@ var WrCardFooter = class WrCardFooter {
212
212
  };
213
213
  i0.ɵɵngDeclareClassMetadata({
214
214
  minVersion: "12.0.0",
215
- version: "22.2.5",
215
+ version: "22.2.6",
216
216
  ngImport: i0,
217
217
  type: WrCardFooter,
218
218
  decorators: [{
@@ -89,6 +89,18 @@ var WrCarouselHarness = class WrCarouselHarness extends ComponentHarness {
89
89
  if (!Number.isInteger(index) || index < 0 || index >= dots.length) throw new Error(`WrCarouselHarness.goTo(${index}): out of range — this carousel has ${dots.length} slides, so the index must be a whole number between 0 and ${dots.length - 1}.`);
90
90
  return dots[index].click();
91
91
  }
92
+ async getAnnouncement() {
93
+ return (await (await this.locatorFor(".wr-carousel__live")()).text()).trim();
94
+ }
95
+ async getLivePoliteness() {
96
+ return (await this.locatorFor(".wr-carousel__live")()).getAttribute("aria-live");
97
+ }
98
+ async getAutoplayLabel() {
99
+ return (await this.autoplayButton("getAutoplayLabel")).getAttribute("aria-label");
100
+ }
101
+ async toggleAutoplay() {
102
+ return (await this.autoplayButton("toggleAutoplay")).click();
103
+ }
92
104
  async hover() {
93
105
  return (await this.host()).hover();
94
106
  }
@@ -121,7 +133,18 @@ var WrCarouselHarness = class WrCarouselHarness extends ComponentHarness {
121
133
  return this.locatorForAll(".wr-carousel__dot")();
122
134
  }
123
135
  async controls() {
124
- return [...await this.locatorForAll(".wr-carousel__nav")(), ...await this.dots()];
136
+ const toggle = await this.locatorForAll(".wr-carousel__toggle")();
137
+ const navs = await this.locatorForAll(".wr-carousel__nav")();
138
+ return [
139
+ ...toggle,
140
+ ...navs,
141
+ ...await this.dots()
142
+ ];
143
+ }
144
+ async autoplayButton(method) {
145
+ const button = await this.locatorForOptional(".wr-carousel__toggle")();
146
+ if (!button) throw new Error(`WrCarouselHarness.${method}(): this carousel renders no pause button, which it does only with [autoplay] on and two slides or more.`);
147
+ return button;
125
148
  }
126
149
  async nav(side, caller) {
127
150
  const button = await this.locatorForOptional(`.wr-carousel__nav--${side}`)();
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-carousel-testing.mjs","names":[],"sources":["../../../projects/lib/carousel/testing/wr-carousel-harness.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, HarnessPredicate, type TestElement } from '@angular/cdk/testing';\n\nimport type { WrCarouselHarnessFilters } from './types';\n\n/**\n * The settled percentage out of `translateX(-100%)`, and out of the mid-drag\n * `translateX(calc(-100% + 12px))` — the pixel half is the finger, not the slide.\n */\nconst TRACK_OFFSET = /translateX\\(\\s*(?:calc\\(\\s*)?(-?[\\d.]+)%/;\n\n/**\n * Test harness for `<wr-carousel>` — drive the strip the way someone on the page\n * drives it.\n *\n * Everything it reads is public API: the `.wr-carousel__*` elements, the dots'\n * `aria-current`, and the `aria-roledescription` the viewport and each slide\n * publish. Two things are worth knowing before writing an assertion against it:\n *\n * - **The slides do not say which one is showing.** A `<wr-carousel-slide>` carries\n * `role=\"group\"` and `aria-roledescription=\"slide\"` and nothing else — no\n * `aria-current`, no `aria-hidden` on the ones off-screen. The current slide is\n * published in exactly two places, the dot carrying `aria-current=\"true\"` and the\n * track's own offset, and {@link getActiveIndex} reads them in that order. There\n * is likewise no live region: the component announces a move to nobody, so a\n * harness cannot report one.\n * - **It never drags.** The swipe the component supports is a touch gesture\n * measured against the viewport's own width, and jsdom has no layout — that width\n * is 0, so the \"20% of the viewport\" threshold is 0 too and EVERY drag clears it,\n * a 1px twitch included. The result says nothing about a real finger, and the spec\n * pins that artifact rather than pretending otherwise. Every move here goes\n * through the arrow buttons and the dots instead, which is the accessible path\n * anyway. `carousel.spec.ts` is where the gesture itself is pinned, by staging the\n * touch events and declaring an `offsetWidth`.\n *\n * @example\n * ```ts\n * const loader = TestbedHarnessEnvironment.loader(fixture);\n * const gallery = await loader.getHarness(WrCarouselHarness.with({ ariaLabel: 'Gallery' }));\n *\n * expect(await gallery.getSlideCount()).toBe(3);\n * await gallery.next();\n * expect(await gallery.getActiveIndex()).toBe(1);\n *\n * await gallery.goTo(2);\n * expect(await gallery.getActiveSlideText()).toBe('Dunes');\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrCarouselHarness extends ComponentHarness {\n static hostSelector = 'wr-carousel';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrCarouselHarnessFilters = {}): HarnessPredicate<WrCarouselHarness> {\n return new HarnessPredicate(WrCarouselHarness, options)\n .addOption('ariaLabel', options.ariaLabel, (harness, label) =>\n HarnessPredicate.stringMatches(harness.getAccessibleName(), label)\n )\n .addOption('slideCount', options.slideCount, async (harness, count) => (await harness.getSlideCount()) === count)\n .addOption('slideText', options.slideText, async (harness, text) => {\n for (const slide of await harness.getSlideTexts()) {\n if (await HarnessPredicate.stringMatches(slide, text)) return true;\n }\n return false;\n });\n }\n\n // What the carousel announces\n\n /**\n * The role the strip announces — `group`, which is what lets\n * `aria-roledescription` mean anything.\n *\n * Read off the VIEWPORT rather than the host, and that is the whole point of the\n * pairing: `aria-roledescription` is dropped on an element with no semantic role,\n * and the host element (`<wr-carousel>`) has none.\n */\n async getRole(): Promise<string | null> {\n return (await this.viewport()).getAttribute('role');\n }\n\n /** How the strip describes itself to a screen reader — `carousel`. */\n async getRoleDescription(): Promise<string | null> {\n return (await this.viewport()).getAttribute('aria-roledescription');\n }\n\n /**\n * The carousel's accessible name.\n *\n * The RESOLVED one, which is the only one the page has: the `ariaLabel` input\n * defaults to `null` and the component runs it through the `ngwr/i18n` catalog\n * (`carousel.label`, falling back to `'Carousel'`), so a consumer who passed\n * nothing still gets a named group and this still answers. Reporting the raw\n * input would say `null` about a carousel that announces itself perfectly well.\n */\n async getAccessibleName(): Promise<string | null> {\n return (await this.viewport()).getAttribute('aria-label');\n }\n\n /** The accessible name of the previous-slide button. Throws when the arrows are not rendered. */\n async getPreviousLabel(): Promise<string | null> {\n return (await this.nav('prev', 'getPreviousLabel')).getAttribute('aria-label');\n }\n\n /** The accessible name of the next-slide button. Throws when the arrows are not rendered. */\n async getNextLabel(): Promise<string | null> {\n return (await this.nav('next', 'getNextLabel')).getAttribute('aria-label');\n }\n\n /**\n * The accessible name of the dot group — what names the row of dots as a set\n * rather than leaving a screen reader with N unexplained buttons.\n *\n * Throws when the dots are not rendered: there is no group to name then, and a\n * `null` would read like a group that lost its label.\n */\n async getPaginationLabel(): Promise<string | null> {\n const dots = await this.locatorForOptional('.wr-carousel__dots')();\n if (!dots) {\n throw new Error(\n 'WrCarouselHarness.getPaginationLabel(): this carousel renders no dot group — the dots are dropped ' +\n 'when [showDots] is false or when there are fewer than two slides.'\n );\n }\n return dots.getAttribute('aria-label');\n }\n\n /**\n * What each slide announces itself as — `slide`, on every one of them, in DOM\n * order.\n *\n * The one piece of ARIA the slides carry, and the reason it is worth asking: it\n * is set on the slide component's own host, so a slide reaching the page through\n * some other element would come back `null` here while the carousel kept working.\n */\n async getSlideRoleDescriptions(): Promise<(string | null)[]> {\n const slides = await this.slides();\n return Promise.all(slides.map(slide => slide.getAttribute('aria-roledescription')));\n }\n\n // What the carousel is showing\n\n /** How many slides the carousel holds. */\n async getSlideCount(): Promise<number> {\n return (await this.slides()).length;\n }\n\n /** The text of every slide, in DOM order. */\n async getSlideTexts(): Promise<string[]> {\n const slides = await this.slides();\n return Promise.all(slides.map(slide => slide.text()));\n }\n\n /**\n * Which slide is showing, as a zero-based index.\n *\n * Taken from the dot carrying `aria-current=\"true\"` whenever the dots are\n * rendered — that attribute is the only thing on the page that tells a screen\n * reader where in the strip it has got to, so it is the answer that matters —\n * and derived from the track's rendered offset when they are not, `[showDots]`\n * being off and a single-slide carousel both dropping the strip entirely.\n *\n * That fallback takes the MAGNITUDE of the offset on purpose. The transform is\n * physical while the slides sit on the inline axis, so a mirrored carousel paints\n * `translateX(100%)` for the very slide an LTR one paints `translateX(-100%)`\n * for; signed, this reported slide -1 for a perfectly healthy RTL carousel.\n *\n * Throws on a carousel with no slides at all — nothing is showing there, and `0`\n * would read like the first slide.\n */\n async getActiveIndex(): Promise<number> {\n const count = await this.getSlideCount();\n if (count === 0) {\n throw new Error(\n 'WrCarouselHarness.getActiveIndex(): this carousel has no <wr-carousel-slide> children, so no slide is ' +\n 'current — 0 would read like the first one.'\n );\n }\n\n const dots = await this.dots();\n if (dots.length) {\n for (let index = 0; index < dots.length; index++) {\n if ((await dots[index].getAttribute('aria-current')) === 'true') return index;\n }\n throw new Error(\n 'WrCarouselHarness.getActiveIndex(): the dots are rendered but none of them carries aria-current, so the ' +\n 'page tells a screen reader that no slide is current. The component clamps `active` into range, so look ' +\n 'for a lost aria-current binding rather than an out-of-range index — the `--active` class alone is paint.'\n );\n }\n\n return Math.round(Math.abs(await this.getTrackOffsetPercent()) / 100);\n }\n\n /** The text of the slide that is showing. Throws on a carousel with no slides. */\n async getActiveSlideText(): Promise<string> {\n const index = await this.getActiveIndex();\n return (await this.slides())[index].text();\n }\n\n /**\n * The track's rendered offset, as a percentage of one viewport: `-100` for the\n * second slide of an LTR carousel, `+100` for the second slide of a mirrored one.\n *\n * Read off the inline `style` attribute rather than through `getCssValue()`,\n * because the percentage only survives where the component wrote it. jsdom hands\n * a declared `transform` straight back through `getComputedStyle`, so\n * `getCssValue()` answers correctly HERE and would stop the moment the same\n * harness ran against a real browser, which resolves the property to a pixel\n * matrix — a green unit test would be hiding it. Mid-drag the component writes\n * `translateX(calc(-100% + 12px))` and this reports the settled `-100`: the pixel\n * half is the finger's own displacement, which is physical in both directions and\n * belongs to no slide.\n *\n * Worth asserting next to {@link getActiveIndex}: it is the same fact painted\n * instead of announced, and a carousel that lights the right dot while parking\n * the track in blank space is exactly the failure nobody sees in a spec.\n */\n async getTrackOffsetPercent(): Promise<number> {\n const style = (await (await this.track()).getAttribute('style')) ?? '';\n const match = TRACK_OFFSET.exec(style);\n if (!match) {\n throw new Error(\n `WrCarouselHarness.getTrackOffsetPercent(): the track carries no translateX() offset (style: \"${style}\"). ` +\n 'That transform is how the carousel moves at all, so it should always be there.'\n );\n }\n return Number(match[1]);\n }\n\n // The controls the carousel renders\n\n /** Whether the prev / next arrows are on the page. Both are dropped together. */\n async hasArrows(): Promise<boolean> {\n return (await this.locatorForOptional('.wr-carousel__nav--next')()) !== null;\n }\n\n /** Whether the dot strip is on the page. */\n async hasDots(): Promise<boolean> {\n return (await this.locatorForOptional('.wr-carousel__dots')()) !== null;\n }\n\n /** How many dots are rendered — one per slide, or `0` while the strip is hidden. */\n async getDotCount(): Promise<number> {\n return (await this.dots()).length;\n }\n\n /**\n * The accessible name of every dot, in order — `'Go to slide 1'`, … resolved\n * through the `ngwr/i18n` catalog.\n *\n * A dot is a bare button with no text of its own, so this label is all a screen\n * reader has to tell one from another. `[]` when the strip is hidden, matching\n * {@link getDotCount}.\n */\n async getDotLabels(): Promise<(string | null)[]> {\n const dots = await this.dots();\n return Promise.all(dots.map(dot => dot.getAttribute('aria-label')));\n }\n\n // Moving the carousel\n\n /**\n * Click the next-slide arrow.\n *\n * \"Next\" is the next SLIDE, not the next thing on the right: the buttons keep\n * their semantics under `dir=\"rtl\"` and only the travel under them turns around.\n * At the last slide this wraps to the first one, unless `[loop]` is off — in\n * which case the arrow is `disabled` and nothing moves, so nothing is asserted\n * about the move.\n */\n async next(): Promise<void> {\n return (await this.nav('next', 'next')).click();\n }\n\n /** Click the previous-slide arrow. Wraps to the last slide unless `[loop]` is off. */\n async previous(): Promise<void> {\n return (await this.nav('prev', 'previous')).click();\n }\n\n /**\n * Jump to a slide by clicking its dot — the only way the page offers to reach a\n * slide directly.\n *\n * Throws when the dots are hidden (the component's own `goTo()` is still there\n * for a spec holding the instance, but nothing on the page can be clicked) and\n * throws on an index no slide has, rather than clicking nothing and leaving the\n * carousel where it was.\n */\n async goTo(index: number): Promise<void> {\n const dots = await this.dots();\n if (!dots.length) {\n throw new Error(\n `WrCarouselHarness.goTo(${index}): this carousel renders no dots, and they are the only way to reach a ` +\n 'slide directly from the page — they are dropped when [showDots] is false or when there are fewer than ' +\n 'two slides. Use next() / previous(), or write the active index from the host.'\n );\n }\n if (!Number.isInteger(index) || index < 0 || index >= dots.length) {\n throw new Error(\n `WrCarouselHarness.goTo(${index}): out of range — this carousel has ${dots.length} slides, so the index ` +\n `must be a whole number between 0 and ${dots.length - 1}.`\n );\n }\n return dots[index].click();\n }\n\n // Holding autoplay\n\n /**\n * Move the pointer onto the carousel, which is what HOLDS autoplay.\n *\n * Aimed at the host and not the viewport, deliberately: the arrows and the dots\n * are the viewport's SIBLINGS, so a viewport-scoped hover would let a slide\n * change under a cursor that is aiming at an arrow.\n */\n async hover(): Promise<void> {\n return (await this.host()).hover();\n }\n\n /** Move the pointer away again, releasing the hold. */\n async mouseAway(): Promise<void> {\n return (await this.host()).mouseAway();\n }\n\n /**\n * Put keyboard focus on the first control the carousel renders — the previous\n * arrow, or the first dot when the arrows are hidden.\n *\n * This is the keyboard half of the autoplay hold: WCAG 2.2.2 wants a way to stop\n * moving content, and hovering is not one for someone who never touches a mouse,\n * so the component listens for `focusin` on its host as well. Focus lands on the\n * carousel's OWN controls; anything focusable a slide happens to project is not\n * this harness's business, though in a browser it would hold autoplay just the\n * same.\n *\n * Note what this is NOT: the dot of the slide showing. The dots are ordinary\n * buttons with no roving `tabindex`, so each of them is a tab stop of its own and\n * the first one a Tab press meets is the prev arrow whatever slide is current —\n * two different questions, answered here and by {@link getActiveIndex}.\n *\n * Throws when the carousel renders no controls at all, because then there is\n * nothing for a Tab press to land on and no keyboard mechanism to assert.\n */\n async focus(): Promise<void> {\n const [first] = await this.controls();\n if (!first) {\n throw new Error(\n 'WrCarouselHarness.focus(): this carousel renders no controls of its own — the arrows and the dots are ' +\n 'both gone (a single slide, or [showArrows] and [showDots] switched off), so a Tab press has nothing ' +\n 'inside it to land on.'\n );\n }\n return first.focus();\n }\n\n /**\n * Take focus off whichever of the carousel's controls holds it, releasing the\n * hold {@link focus} started.\n *\n * Throws when none of them is focused: `focusout` is what the component listens\n * for, and blurring an element that never had focus fires nothing — a quiet\n * no-op here surfaces as an autoplay assertion failing three lines later.\n */\n async blur(): Promise<void> {\n for (const control of await this.controls()) {\n if (await control.isFocused()) return control.blur();\n }\n throw new Error(\n 'WrCarouselHarness.blur(): none of the controls this carousel renders holds focus, so there is no focus to ' +\n 'release. Call focus() first — the hold is released by blurring the element that took it.'\n );\n }\n\n /** Whether one of the carousel's own controls holds focus — which is what holds autoplay. */\n async isFocused(): Promise<boolean> {\n for (const control of await this.controls()) {\n if (await control.isFocused()) return true;\n }\n return false;\n }\n\n // Internals\n\n /** The element that carries the carousel's role and name. */\n private async viewport(): Promise<TestElement> {\n return this.locatorFor('.wr-carousel__viewport')();\n }\n\n /** The moving strip, whose inline transform is where the carousel IS. */\n private async track(): Promise<TestElement> {\n return this.locatorFor('.wr-carousel__track')();\n }\n\n private async slides(): Promise<TestElement[]> {\n return this.locatorForAll('wr-carousel-slide')();\n }\n\n private async dots(): Promise<TestElement[]> {\n return this.locatorForAll('.wr-carousel__dot')();\n }\n\n /**\n * Every control the carousel renders itself, in the order a Tab press meets\n * them: the two arrows, then the dots.\n */\n private async controls(): Promise<TestElement[]> {\n const navs = await this.locatorForAll('.wr-carousel__nav')();\n return [...navs, ...(await this.dots())];\n }\n\n /** One arrow, or a failure naming both reasons it might not be there. */\n private async nav(side: 'prev' | 'next', caller: string): Promise<TestElement> {\n const button = await this.locatorForOptional(`.wr-carousel__nav--${side}`)();\n if (!button) {\n throw new Error(\n `WrCarouselHarness.${caller}(): this carousel renders no ${side} arrow — the arrows are dropped when ` +\n '[showArrows] is false or when there are fewer than two slides to page through.'\n );\n }\n return button;\n }\n}\n"],"mappings":";;;;;;;AAeA,MAAM,eAAe;AAyCrB,IAAa,oBAAb,MAAa,0BAA0B,iBAAgB;CACrD,OAAO,eAAe;CAGtB,OAAO,KAAK,UAAoC,CAAA,GAAE;EAChD,OAAO,IAAI,iBAAiB,mBAAmB,OAAO,CAAC,CACpD,UAAU,aAAa,QAAQ,YAAY,SAAS,UACnD,iBAAiB,cAAc,QAAQ,kBAAiB,GAAI,KAAK,CAAC,CACnE,CACA,UAAU,cAAc,QAAQ,YAAY,OAAO,SAAS,UAAW,MAAM,QAAQ,cAAa,MAAQ,KAAK,CAAC,CAChH,UAAU,aAAa,QAAQ,WAAW,OAAO,SAAS,SAAQ;GACjE,KAAK,MAAM,SAAS,MAAM,QAAQ,cAAa,GAC7C,IAAI,MAAM,iBAAiB,cAAc,OAAO,IAAI,GAAG,OAAO;GAEhE,OAAO;EACT,CAAC;CACL;CAYA,MAAM,UAAO;EACX,QAAQ,MAAM,KAAK,SAAQ,EAAA,CAAI,aAAa,MAAM;CACpD;CAGA,MAAM,qBAAkB;EACtB,QAAQ,MAAM,KAAK,SAAQ,EAAA,CAAI,aAAa,sBAAsB;CACpE;CAWA,MAAM,oBAAiB;EACrB,QAAQ,MAAM,KAAK,SAAQ,EAAA,CAAI,aAAa,YAAY;CAC1D;CAGA,MAAM,mBAAgB;EACpB,QAAQ,MAAM,KAAK,IAAI,QAAQ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;EACnC,IAAI,CAAC,OACH,MAAM,IAAI,MACR,iOAEyB;EAG7B,OAAO,MAAM,MAAK;CACpB;CAUA,MAAM,OAAI;EACR,KAAK,MAAM,WAAW,MAAM,KAAK,SAAQ,GACvC,IAAI,MAAM,QAAQ,UAAS,GAAI,OAAO,QAAQ,KAAI;EAEpD,MAAM,IAAI,MACR,oMAC4F;CAEhG;CAGA,MAAM,YAAS;EACb,KAAK,MAAM,WAAW,MAAM,KAAK,SAAQ,GACvC,IAAI,MAAM,QAAQ,UAAS,GAAI,OAAO;EAExC,OAAO;CACT;CAKQ,MAAM,WAAQ;EACpB,OAAO,KAAK,WAAW,wBAAwB,CAAC,CAAA;CAClD;CAGQ,MAAM,QAAK;EACjB,OAAO,KAAK,WAAW,qBAAqB,CAAC,CAAA;CAC/C;CAEQ,MAAM,SAAM;EAClB,OAAO,KAAK,cAAc,mBAAmB,CAAC,CAAA;CAChD;CAEQ,MAAM,OAAI;EAChB,OAAO,KAAK,cAAc,mBAAmB,CAAC,CAAA;CAChD;CAMQ,MAAM,WAAQ;EAEpB,OAAO,CAAC,GAAG,MADQ,KAAK,cAAc,mBAAmB,CAAC,CAAA,GACzC,GAAI,MAAM,KAAK,KAAI,CAAG;CACzC;CAGQ,MAAM,IAAI,MAAuB,QAAc;EACrD,MAAM,SAAS,MAAM,KAAK,mBAAmB,sBAAsB,MAAM,CAAC,CAAA;EAC1E,IAAI,CAAC,QACH,MAAM,IAAI,MACR,qBAAqB,OAAM,+BAAgC,KAAI,oHACmB;EAGtF,OAAO;CACT"}
1
+ {"version":3,"file":"ngwr-carousel-testing.mjs","names":[],"sources":["../../../projects/lib/carousel/testing/wr-carousel-harness.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, HarnessPredicate, type TestElement } from '@angular/cdk/testing';\n\nimport type { WrCarouselHarnessFilters } from './types';\n\n/**\n * The settled percentage out of `translateX(-100%)`, and out of the mid-drag\n * `translateX(calc(-100% + 12px))` — the pixel half is the finger, not the slide.\n */\nconst TRACK_OFFSET = /translateX\\(\\s*(?:calc\\(\\s*)?(-?[\\d.]+)%/;\n\n/**\n * Test harness for `<wr-carousel>` — drive the strip the way someone on the page\n * drives it.\n *\n * Everything it reads is public API: the `.wr-carousel__*` elements, the dots'\n * `aria-current`, and the `aria-roledescription` the viewport and each slide\n * publish. Two things are worth knowing before writing an assertion against it:\n *\n * - **The slides do not say which one is showing.** A `<wr-carousel-slide>` carries\n * `role=\"group\"` and `aria-roledescription=\"slide\"` and nothing else — no\n * `aria-current`, no `aria-hidden` on the ones off-screen. The current slide is\n * published in exactly two places, the dot carrying `aria-current=\"true\"` and the\n * track's own offset, and {@link getActiveIndex} reads them in that order. A\n * move the reader made is also said by the one live region, which\n * {@link getAnnouncement} reads; an autoplay tick is not.\n * - **It never drags.** The swipe the component supports is a touch gesture\n * measured against the viewport's own width, and jsdom has no layout — that width\n * is 0, so the \"20% of the viewport\" threshold is 0 too and EVERY drag clears it,\n * a 1px twitch included. The result says nothing about a real finger, and the spec\n * pins that artifact rather than pretending otherwise. Every move here goes\n * through the arrow buttons and the dots instead, which is the accessible path\n * anyway. `carousel.spec.ts` is where the gesture itself is pinned, by staging the\n * touch events and declaring an `offsetWidth`.\n *\n * @example\n * ```ts\n * const loader = TestbedHarnessEnvironment.loader(fixture);\n * const gallery = await loader.getHarness(WrCarouselHarness.with({ ariaLabel: 'Gallery' }));\n *\n * expect(await gallery.getSlideCount()).toBe(3);\n * await gallery.next();\n * expect(await gallery.getActiveIndex()).toBe(1);\n *\n * await gallery.goTo(2);\n * expect(await gallery.getActiveSlideText()).toBe('Dunes');\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrCarouselHarness extends ComponentHarness {\n static hostSelector = 'wr-carousel';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrCarouselHarnessFilters = {}): HarnessPredicate<WrCarouselHarness> {\n return new HarnessPredicate(WrCarouselHarness, options)\n .addOption('ariaLabel', options.ariaLabel, (harness, label) =>\n HarnessPredicate.stringMatches(harness.getAccessibleName(), label)\n )\n .addOption('slideCount', options.slideCount, async (harness, count) => (await harness.getSlideCount()) === count)\n .addOption('slideText', options.slideText, async (harness, text) => {\n for (const slide of await harness.getSlideTexts()) {\n if (await HarnessPredicate.stringMatches(slide, text)) return true;\n }\n return false;\n });\n }\n\n // What the carousel announces\n\n /**\n * The role the strip announces — `group`, which is what lets\n * `aria-roledescription` mean anything.\n *\n * Read off the VIEWPORT rather than the host, and that is the whole point of the\n * pairing: `aria-roledescription` is dropped on an element with no semantic role,\n * and the host element (`<wr-carousel>`) has none.\n */\n async getRole(): Promise<string | null> {\n return (await this.viewport()).getAttribute('role');\n }\n\n /** How the strip describes itself to a screen reader — `carousel`. */\n async getRoleDescription(): Promise<string | null> {\n return (await this.viewport()).getAttribute('aria-roledescription');\n }\n\n /**\n * The carousel's accessible name.\n *\n * The RESOLVED one, which is the only one the page has: the `ariaLabel` input\n * defaults to `null` and the component runs it through the `ngwr/i18n` catalog\n * (`carousel.label`, falling back to `'Carousel'`), so a consumer who passed\n * nothing still gets a named group and this still answers. Reporting the raw\n * input would say `null` about a carousel that announces itself perfectly well.\n */\n async getAccessibleName(): Promise<string | null> {\n return (await this.viewport()).getAttribute('aria-label');\n }\n\n /** The accessible name of the previous-slide button. Throws when the arrows are not rendered. */\n async getPreviousLabel(): Promise<string | null> {\n return (await this.nav('prev', 'getPreviousLabel')).getAttribute('aria-label');\n }\n\n /** The accessible name of the next-slide button. Throws when the arrows are not rendered. */\n async getNextLabel(): Promise<string | null> {\n return (await this.nav('next', 'getNextLabel')).getAttribute('aria-label');\n }\n\n /**\n * The accessible name of the dot group — what names the row of dots as a set\n * rather than leaving a screen reader with N unexplained buttons.\n *\n * Throws when the dots are not rendered: there is no group to name then, and a\n * `null` would read like a group that lost its label.\n */\n async getPaginationLabel(): Promise<string | null> {\n const dots = await this.locatorForOptional('.wr-carousel__dots')();\n if (!dots) {\n throw new Error(\n 'WrCarouselHarness.getPaginationLabel(): this carousel renders no dot group — the dots are dropped ' +\n 'when [showDots] is false or when there are fewer than two slides.'\n );\n }\n return dots.getAttribute('aria-label');\n }\n\n /**\n * What each slide announces itself as — `slide`, on every one of them, in DOM\n * order.\n *\n * The one piece of ARIA the slides carry, and the reason it is worth asking: it\n * is set on the slide component's own host, so a slide reaching the page through\n * some other element would come back `null` here while the carousel kept working.\n */\n async getSlideRoleDescriptions(): Promise<(string | null)[]> {\n const slides = await this.slides();\n return Promise.all(slides.map(slide => slide.getAttribute('aria-roledescription')));\n }\n\n // What the carousel is showing\n\n /** How many slides the carousel holds. */\n async getSlideCount(): Promise<number> {\n return (await this.slides()).length;\n }\n\n /** The text of every slide, in DOM order. */\n async getSlideTexts(): Promise<string[]> {\n const slides = await this.slides();\n return Promise.all(slides.map(slide => slide.text()));\n }\n\n /**\n * Which slide is showing, as a zero-based index.\n *\n * Taken from the dot carrying `aria-current=\"true\"` whenever the dots are\n * rendered — that attribute is the only thing on the page that tells a screen\n * reader where in the strip it has got to, so it is the answer that matters —\n * and derived from the track's rendered offset when they are not, `[showDots]`\n * being off and a single-slide carousel both dropping the strip entirely.\n *\n * That fallback takes the MAGNITUDE of the offset on purpose. The transform is\n * physical while the slides sit on the inline axis, so a mirrored carousel paints\n * `translateX(100%)` for the very slide an LTR one paints `translateX(-100%)`\n * for; signed, this reported slide -1 for a perfectly healthy RTL carousel.\n *\n * Throws on a carousel with no slides at all — nothing is showing there, and `0`\n * would read like the first slide.\n */\n async getActiveIndex(): Promise<number> {\n const count = await this.getSlideCount();\n if (count === 0) {\n throw new Error(\n 'WrCarouselHarness.getActiveIndex(): this carousel has no <wr-carousel-slide> children, so no slide is ' +\n 'current — 0 would read like the first one.'\n );\n }\n\n const dots = await this.dots();\n if (dots.length) {\n for (let index = 0; index < dots.length; index++) {\n if ((await dots[index].getAttribute('aria-current')) === 'true') return index;\n }\n throw new Error(\n 'WrCarouselHarness.getActiveIndex(): the dots are rendered but none of them carries aria-current, so the ' +\n 'page tells a screen reader that no slide is current. The component clamps `active` into range, so look ' +\n 'for a lost aria-current binding rather than an out-of-range index — the `--active` class alone is paint.'\n );\n }\n\n return Math.round(Math.abs(await this.getTrackOffsetPercent()) / 100);\n }\n\n /** The text of the slide that is showing. Throws on a carousel with no slides. */\n async getActiveSlideText(): Promise<string> {\n const index = await this.getActiveIndex();\n return (await this.slides())[index].text();\n }\n\n /**\n * The track's rendered offset, as a percentage of one viewport: `-100` for the\n * second slide of an LTR carousel, `+100` for the second slide of a mirrored one.\n *\n * Read off the inline `style` attribute rather than through `getCssValue()`,\n * because the percentage only survives where the component wrote it. jsdom hands\n * a declared `transform` straight back through `getComputedStyle`, so\n * `getCssValue()` answers correctly HERE and would stop the moment the same\n * harness ran against a real browser, which resolves the property to a pixel\n * matrix — a green unit test would be hiding it. Mid-drag the component writes\n * `translateX(calc(-100% + 12px))` and this reports the settled `-100`: the pixel\n * half is the finger's own displacement, which is physical in both directions and\n * belongs to no slide.\n *\n * Worth asserting next to {@link getActiveIndex}: it is the same fact painted\n * instead of announced, and a carousel that lights the right dot while parking\n * the track in blank space is exactly the failure nobody sees in a spec.\n */\n async getTrackOffsetPercent(): Promise<number> {\n const style = (await (await this.track()).getAttribute('style')) ?? '';\n const match = TRACK_OFFSET.exec(style);\n if (!match) {\n throw new Error(\n `WrCarouselHarness.getTrackOffsetPercent(): the track carries no translateX() offset (style: \"${style}\"). ` +\n 'That transform is how the carousel moves at all, so it should always be there.'\n );\n }\n return Number(match[1]);\n }\n\n // The controls the carousel renders\n\n /** Whether the prev / next arrows are on the page. Both are dropped together. */\n async hasArrows(): Promise<boolean> {\n return (await this.locatorForOptional('.wr-carousel__nav--next')()) !== null;\n }\n\n /** Whether the dot strip is on the page. */\n async hasDots(): Promise<boolean> {\n return (await this.locatorForOptional('.wr-carousel__dots')()) !== null;\n }\n\n /** How many dots are rendered — one per slide, or `0` while the strip is hidden. */\n async getDotCount(): Promise<number> {\n return (await this.dots()).length;\n }\n\n /**\n * The accessible name of every dot, in order — `'Go to slide 1'`, … resolved\n * through the `ngwr/i18n` catalog.\n *\n * A dot is a bare button with no text of its own, so this label is all a screen\n * reader has to tell one from another. `[]` when the strip is hidden, matching\n * {@link getDotCount}.\n */\n async getDotLabels(): Promise<(string | null)[]> {\n const dots = await this.dots();\n return Promise.all(dots.map(dot => dot.getAttribute('aria-label')));\n }\n\n // Moving the carousel\n\n /**\n * Click the next-slide arrow.\n *\n * \"Next\" is the next SLIDE, not the next thing on the right: the buttons keep\n * their semantics under `dir=\"rtl\"` and only the travel under them turns around.\n * At the last slide this wraps to the first one, unless `[loop]` is off — in\n * which case the arrow is `disabled` and nothing moves, so nothing is asserted\n * about the move.\n */\n async next(): Promise<void> {\n return (await this.nav('next', 'next')).click();\n }\n\n /** Click the previous-slide arrow. Wraps to the last slide unless `[loop]` is off. */\n async previous(): Promise<void> {\n return (await this.nav('prev', 'previous')).click();\n }\n\n /**\n * Jump to a slide by clicking its dot — the only way the page offers to reach a\n * slide directly.\n *\n * Throws when the dots are hidden (the component's own `goTo()` is still there\n * for a spec holding the instance, but nothing on the page can be clicked) and\n * throws on an index no slide has, rather than clicking nothing and leaving the\n * carousel where it was.\n */\n async goTo(index: number): Promise<void> {\n const dots = await this.dots();\n if (!dots.length) {\n throw new Error(\n `WrCarouselHarness.goTo(${index}): this carousel renders no dots, and they are the only way to reach a ` +\n 'slide directly from the page — they are dropped when [showDots] is false or when there are fewer than ' +\n 'two slides. Use next() / previous(), or write the active index from the host.'\n );\n }\n if (!Number.isInteger(index) || index < 0 || index >= dots.length) {\n throw new Error(\n `WrCarouselHarness.goTo(${index}): out of range — this carousel has ${dots.length} slides, so the index ` +\n `must be a whole number between 0 and ${dots.length - 1}.`\n );\n }\n return dots[index].click();\n }\n\n // What the carousel says\n\n /**\n * The text of the live region: `Slide 2 of 3` after an arrow, a dot or a swipe\n * moved the carousel, and empty before any move and after an autoplay tick.\n */\n async getAnnouncement(): Promise<string> {\n return (await (await this.locatorFor('.wr-carousel__live')()).text()).trim();\n }\n\n /**\n * Whether the live region speaks: `polite`, or `off` while the slides advance on\n * their own, when a tick must not be read out.\n */\n async getLivePoliteness(): Promise<string | null> {\n return (await this.locatorFor('.wr-carousel__live')()).getAttribute('aria-live');\n }\n\n // Autoplay\n\n /**\n * The name of the pause button, which says what a press does next: the pause\n * label while autoplay is on, the play label while it is off, held or not.\n * Throws when the carousel has no such button, which is every carousel\n * without `autoplay`.\n */\n async getAutoplayLabel(): Promise<string | null> {\n return (await this.autoplayButton('getAutoplayLabel')).getAttribute('aria-label');\n }\n\n /** Press the pause button. Throws without `autoplay`. */\n async toggleAutoplay(): Promise<void> {\n return (await this.autoplayButton('toggleAutoplay')).click();\n }\n\n // Holding autoplay\n\n /**\n * Move the pointer onto the carousel, which is what HOLDS autoplay.\n *\n * Aimed at the host and not the viewport, deliberately: the arrows and the dots\n * are the viewport's SIBLINGS, so a viewport-scoped hover would let a slide\n * change under a cursor that is aiming at an arrow.\n */\n async hover(): Promise<void> {\n return (await this.host()).hover();\n }\n\n /** Move the pointer away again, releasing the hold. */\n async mouseAway(): Promise<void> {\n return (await this.host()).mouseAway();\n }\n\n /**\n * Put keyboard focus on the first control the carousel renders — the pause\n * button under `autoplay`, else the previous arrow, or the first dot when the\n * arrows are hidden.\n *\n * This is the keyboard half of the autoplay hold: WCAG 2.2.2 wants a way to stop\n * moving content, and hovering is not one for someone who never touches a mouse,\n * so the component listens for `focusin` on its host as well. Focus lands on the\n * carousel's OWN controls; anything focusable a slide happens to project is not\n * this harness's business, though in a browser it would hold autoplay just the\n * same.\n *\n * Note what this is NOT: the dot of the slide showing. The dots are ordinary\n * buttons with no roving `tabindex`, so each of them is a tab stop of its own and\n * the first one a Tab press meets is the same whatever slide is current —\n * two different questions, answered here and by {@link getActiveIndex}.\n *\n * Throws when the carousel renders no controls at all, because then there is\n * nothing for a Tab press to land on and no keyboard mechanism to assert.\n */\n async focus(): Promise<void> {\n const [first] = await this.controls();\n if (!first) {\n throw new Error(\n 'WrCarouselHarness.focus(): this carousel renders no controls of its own — the arrows and the dots are ' +\n 'both gone (a single slide, or [showArrows] and [showDots] switched off), so a Tab press has nothing ' +\n 'inside it to land on.'\n );\n }\n return first.focus();\n }\n\n /**\n * Take focus off whichever of the carousel's controls holds it, releasing the\n * hold {@link focus} started.\n *\n * Throws when none of them is focused: `focusout` is what the component listens\n * for, and blurring an element that never had focus fires nothing — a quiet\n * no-op here surfaces as an autoplay assertion failing three lines later.\n */\n async blur(): Promise<void> {\n for (const control of await this.controls()) {\n if (await control.isFocused()) return control.blur();\n }\n throw new Error(\n 'WrCarouselHarness.blur(): none of the controls this carousel renders holds focus, so there is no focus to ' +\n 'release. Call focus() first — the hold is released by blurring the element that took it.'\n );\n }\n\n /** Whether one of the carousel's own controls holds focus — which is what holds autoplay. */\n async isFocused(): Promise<boolean> {\n for (const control of await this.controls()) {\n if (await control.isFocused()) return true;\n }\n return false;\n }\n\n // Internals\n\n /** The element that carries the carousel's role and name. */\n private async viewport(): Promise<TestElement> {\n return this.locatorFor('.wr-carousel__viewport')();\n }\n\n /** The moving strip, whose inline transform is where the carousel IS. */\n private async track(): Promise<TestElement> {\n return this.locatorFor('.wr-carousel__track')();\n }\n\n private async slides(): Promise<TestElement[]> {\n return this.locatorForAll('wr-carousel-slide')();\n }\n\n private async dots(): Promise<TestElement[]> {\n return this.locatorForAll('.wr-carousel__dot')();\n }\n\n /**\n * Every control the carousel renders itself, in the order a Tab press meets\n * them: the two arrows, then the dots.\n */\n private async controls(): Promise<TestElement[]> {\n const toggle = await this.locatorForAll('.wr-carousel__toggle')();\n const navs = await this.locatorForAll('.wr-carousel__nav')();\n return [...toggle, ...navs, ...(await this.dots())];\n }\n\n /** One arrow, or a failure naming both reasons it might not be there. */\n private async autoplayButton(method: string): Promise<TestElement> {\n const button = await this.locatorForOptional('.wr-carousel__toggle')();\n if (!button) {\n throw new Error(\n `WrCarouselHarness.${method}(): this carousel renders no pause button, which it does only with ` +\n '[autoplay] on and two slides or more.'\n );\n }\n return button;\n }\n\n private async nav(side: 'prev' | 'next', caller: string): Promise<TestElement> {\n const button = await this.locatorForOptional(`.wr-carousel__nav--${side}`)();\n if (!button) {\n throw new Error(\n `WrCarouselHarness.${caller}(): this carousel renders no ${side} arrow — the arrows are dropped when ` +\n '[showArrows] is false or when there are fewer than two slides to page through.'\n );\n }\n return button;\n }\n}\n"],"mappings":";;;;;;;AAeA,MAAM,eAAe;AAyCrB,IAAa,oBAAb,MAAa,0BAA0B,iBAAgB;CACrD,OAAO,eAAe;CAGtB,OAAO,KAAK,UAAoC,CAAA,GAAE;EAChD,OAAO,IAAI,iBAAiB,mBAAmB,OAAO,CAAC,CACpD,UAAU,aAAa,QAAQ,YAAY,SAAS,UACnD,iBAAiB,cAAc,QAAQ,kBAAiB,GAAI,KAAK,CAAC,CACnE,CACA,UAAU,cAAc,QAAQ,YAAY,OAAO,SAAS,UAAW,MAAM,QAAQ,cAAa,MAAQ,KAAK,CAAC,CAChH,UAAU,aAAa,QAAQ,WAAW,OAAO,SAAS,SAAQ;GACjE,KAAK,MAAM,SAAS,MAAM,QAAQ,cAAa,GAC7C,IAAI,MAAM,iBAAiB,cAAc,OAAO,IAAI,GAAG,OAAO;GAEhE,OAAO;EACT,CAAC;CACL;CAYA,MAAM,UAAO;EACX,QAAQ,MAAM,KAAK,SAAQ,EAAA,CAAI,aAAa,MAAM;CACpD;CAGA,MAAM,qBAAkB;EACtB,QAAQ,MAAM,KAAK,SAAQ,EAAA,CAAI,aAAa,sBAAsB;CACpE;CAWA,MAAM,oBAAiB;EACrB,QAAQ,MAAM,KAAK,SAAQ,EAAA,CAAI,aAAa,YAAY;CAC1D;CAGA,MAAM,mBAAgB;EACpB,QAAQ,MAAM,KAAK,IAAI,QAAQ,kBAAkB,EAAA,CAAG,aAAa,YAAY;CAC/E;CAGA,MA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