ngwr 16.4.0 → 16.6.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 (427) hide show
  1. package/back-top/styles/_index.scss +6 -0
  2. package/breadcrumbs/styles/_rules.scss +34 -0
  3. package/cascader/styles/_rules.scss +7 -0
  4. package/charts/bar-chart/styles/_index.scss +494 -305
  5. package/charts/boxplot-chart/styles/_index.scss +114 -48
  6. package/charts/bullet-chart/styles/_index.scss +113 -42
  7. package/charts/calendar-heatmap/styles/_index.scss +111 -20
  8. package/charts/candlestick-chart/styles/_index.scss +61 -26
  9. package/charts/chart-legend/styles/_index.scss +120 -10
  10. package/charts/core/styles/_index.scss +201 -5
  11. package/charts/donut-chart/styles/_index.scss +76 -21
  12. package/charts/funnel-chart/styles/_index.scss +66 -38
  13. package/charts/gauge/styles/_index.scss +12 -1
  14. package/charts/heatmap-chart/styles/_index.scss +90 -53
  15. package/charts/line-chart/styles/_index.scss +143 -139
  16. package/charts/meter-group/styles/_index.scss +87 -25
  17. package/charts/radar-chart/styles/_index.scss +82 -40
  18. package/charts/scatter-chart/styles/_index.scss +117 -44
  19. package/charts/sparkline/styles/_index.scss +7 -1
  20. package/charts/treemap-chart/styles/_index.scss +94 -42
  21. package/charts/waterfall-chart/styles/_index.scss +150 -87
  22. package/color-picker/styles/_index.scss +7 -3
  23. package/copy-value/styles/_index.scss +21 -2
  24. package/counter/styles/_index.scss +1 -8
  25. package/date-picker/styles/_index.scss +15 -9
  26. package/date-stamp/styles/_index.scss +2 -1
  27. package/dialog/styles/_index.scss +43 -0
  28. package/drawer/styles/_index.scss +5 -1
  29. package/editor/styles/_index.scss +1 -8
  30. package/event-calendar/styles/_index.scss +2 -6
  31. package/fesm2022/ngwr-affix.mjs +1 -1
  32. package/fesm2022/ngwr-affix.mjs.map +1 -1
  33. package/fesm2022/ngwr-anchor.mjs +9 -2
  34. package/fesm2022/ngwr-anchor.mjs.map +1 -1
  35. package/fesm2022/ngwr-animations-aurora.mjs.map +1 -1
  36. package/fesm2022/ngwr-animations-blur-reveal.mjs.map +1 -1
  37. package/fesm2022/ngwr-animations-click-sparks.mjs.map +1 -1
  38. package/fesm2022/ngwr-animations-confetti.mjs.map +1 -1
  39. package/fesm2022/ngwr-animations-decode.mjs.map +1 -1
  40. package/fesm2022/ngwr-animations-destruct.mjs.map +1 -1
  41. package/fesm2022/ngwr-animations-dot-grid.mjs.map +1 -1
  42. package/fesm2022/ngwr-animations-falling-letters.mjs.map +1 -1
  43. package/fesm2022/ngwr-animations-flow-lines.mjs.map +1 -1
  44. package/fesm2022/ngwr-animations-fluid-cursor.mjs.map +1 -1
  45. package/fesm2022/ngwr-animations-glitch.mjs.map +1 -1
  46. package/fesm2022/ngwr-animations-glow-border.mjs.map +1 -1
  47. package/fesm2022/ngwr-animations-gradient-flow.mjs.map +1 -1
  48. package/fesm2022/ngwr-animations-marquee.mjs.map +1 -1
  49. package/fesm2022/ngwr-animations-orbit.mjs.map +1 -1
  50. package/fesm2022/ngwr-animations-reveal.mjs.map +1 -1
  51. package/fesm2022/ngwr-animations-ripple-grid.mjs.map +1 -1
  52. package/fesm2022/ngwr-animations-rotate-reveal.mjs.map +1 -1
  53. package/fesm2022/ngwr-animations-shimmer.mjs.map +1 -1
  54. package/fesm2022/ngwr-animations-spotlight.mjs.map +1 -1
  55. package/fesm2022/ngwr-animations-thread-lines.mjs.map +1 -1
  56. package/fesm2022/ngwr-animations-tilt.mjs +20 -13
  57. package/fesm2022/ngwr-animations-tilt.mjs.map +1 -1
  58. package/fesm2022/ngwr-animations-typewriter.mjs.map +1 -1
  59. package/fesm2022/ngwr-breadcrumbs.mjs +40 -7
  60. package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
  61. package/fesm2022/ngwr-button.mjs +12 -3
  62. package/fesm2022/ngwr-button.mjs.map +1 -1
  63. package/fesm2022/ngwr-carousel-testing.mjs +4 -1
  64. package/fesm2022/ngwr-carousel-testing.mjs.map +1 -1
  65. package/fesm2022/ngwr-carousel.mjs +27 -2
  66. package/fesm2022/ngwr-carousel.mjs.map +1 -1
  67. package/fesm2022/ngwr-cascader-testing.mjs.map +1 -1
  68. package/fesm2022/ngwr-cascader.mjs +72 -8
  69. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  70. package/fesm2022/ngwr-charts-bar-chart-testing.mjs +16 -14
  71. package/fesm2022/ngwr-charts-bar-chart-testing.mjs.map +1 -1
  72. package/fesm2022/ngwr-charts-bar-chart.mjs +399 -141
  73. package/fesm2022/ngwr-charts-bar-chart.mjs.map +1 -1
  74. package/fesm2022/ngwr-charts-boxplot-chart-testing.mjs +19 -5
  75. package/fesm2022/ngwr-charts-boxplot-chart-testing.mjs.map +1 -1
  76. package/fesm2022/ngwr-charts-boxplot-chart.mjs +250 -56
  77. package/fesm2022/ngwr-charts-boxplot-chart.mjs.map +1 -1
  78. package/fesm2022/ngwr-charts-bullet-chart.mjs +118 -18
  79. package/fesm2022/ngwr-charts-bullet-chart.mjs.map +1 -1
  80. package/fesm2022/ngwr-charts-calendar-heatmap.mjs +266 -46
  81. package/fesm2022/ngwr-charts-calendar-heatmap.mjs.map +1 -1
  82. package/fesm2022/ngwr-charts-candlestick-chart-testing.mjs +21 -10
  83. package/fesm2022/ngwr-charts-candlestick-chart-testing.mjs.map +1 -1
  84. package/fesm2022/ngwr-charts-candlestick-chart.mjs +319 -72
  85. package/fesm2022/ngwr-charts-candlestick-chart.mjs.map +1 -1
  86. package/fesm2022/ngwr-charts-chart-legend.mjs +211 -9
  87. package/fesm2022/ngwr-charts-chart-legend.mjs.map +1 -1
  88. package/fesm2022/ngwr-charts-core.mjs +311 -23
  89. package/fesm2022/ngwr-charts-core.mjs.map +1 -1
  90. package/fesm2022/ngwr-charts-donut-chart-testing.mjs.map +1 -1
  91. package/fesm2022/ngwr-charts-donut-chart.mjs +206 -27
  92. package/fesm2022/ngwr-charts-donut-chart.mjs.map +1 -1
  93. package/fesm2022/ngwr-charts-funnel-chart-testing.mjs +4 -4
  94. package/fesm2022/ngwr-charts-funnel-chart-testing.mjs.map +1 -1
  95. package/fesm2022/ngwr-charts-funnel-chart.mjs +113 -10
  96. package/fesm2022/ngwr-charts-funnel-chart.mjs.map +1 -1
  97. package/fesm2022/ngwr-charts-gauge-testing.mjs.map +1 -1
  98. package/fesm2022/ngwr-charts-gauge.mjs +98 -12
  99. package/fesm2022/ngwr-charts-gauge.mjs.map +1 -1
  100. package/fesm2022/ngwr-charts-heatmap-chart.mjs +226 -31
  101. package/fesm2022/ngwr-charts-heatmap-chart.mjs.map +1 -1
  102. package/fesm2022/ngwr-charts-line-chart-testing.mjs +16 -4
  103. package/fesm2022/ngwr-charts-line-chart-testing.mjs.map +1 -1
  104. package/fesm2022/ngwr-charts-line-chart.mjs +407 -172
  105. package/fesm2022/ngwr-charts-line-chart.mjs.map +1 -1
  106. package/fesm2022/ngwr-charts-meter-group-testing.mjs +4 -4
  107. package/fesm2022/ngwr-charts-meter-group-testing.mjs.map +1 -1
  108. package/fesm2022/ngwr-charts-meter-group.mjs +225 -31
  109. package/fesm2022/ngwr-charts-meter-group.mjs.map +1 -1
  110. package/fesm2022/ngwr-charts-radar-chart-testing.mjs +2 -1
  111. package/fesm2022/ngwr-charts-radar-chart-testing.mjs.map +1 -1
  112. package/fesm2022/ngwr-charts-radar-chart.mjs +255 -66
  113. package/fesm2022/ngwr-charts-radar-chart.mjs.map +1 -1
  114. package/fesm2022/ngwr-charts-scatter-chart-testing.mjs +39 -18
  115. package/fesm2022/ngwr-charts-scatter-chart-testing.mjs.map +1 -1
  116. package/fesm2022/ngwr-charts-scatter-chart.mjs +431 -53
  117. package/fesm2022/ngwr-charts-scatter-chart.mjs.map +1 -1
  118. package/fesm2022/ngwr-charts-sparkline.mjs +19 -8
  119. package/fesm2022/ngwr-charts-sparkline.mjs.map +1 -1
  120. package/fesm2022/ngwr-charts-treemap-chart.mjs +253 -44
  121. package/fesm2022/ngwr-charts-treemap-chart.mjs.map +1 -1
  122. package/fesm2022/ngwr-charts-waterfall-chart-testing.mjs +15 -7
  123. package/fesm2022/ngwr-charts-waterfall-chart-testing.mjs.map +1 -1
  124. package/fesm2022/ngwr-charts-waterfall-chart.mjs +151 -23
  125. package/fesm2022/ngwr-charts-waterfall-chart.mjs.map +1 -1
  126. package/fesm2022/ngwr-checkbox.mjs +3 -2
  127. package/fesm2022/ngwr-checkbox.mjs.map +1 -1
  128. package/fesm2022/ngwr-color-picker.mjs +65 -5
  129. package/fesm2022/ngwr-color-picker.mjs.map +1 -1
  130. package/fesm2022/ngwr-context-menu-testing.mjs.map +1 -1
  131. package/fesm2022/ngwr-context-menu.mjs +51 -24
  132. package/fesm2022/ngwr-context-menu.mjs.map +1 -1
  133. package/fesm2022/ngwr-copy-value-testing.mjs +5 -1
  134. package/fesm2022/ngwr-copy-value-testing.mjs.map +1 -1
  135. package/fesm2022/ngwr-copy-value.mjs +38 -2
  136. package/fesm2022/ngwr-copy-value.mjs.map +1 -1
  137. package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
  138. package/fesm2022/ngwr-date-picker.mjs +105 -9
  139. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  140. package/fesm2022/ngwr-dialog.mjs +29 -11
  141. package/fesm2022/ngwr-dialog.mjs.map +1 -1
  142. package/fesm2022/ngwr-directives.mjs +9 -6
  143. package/fesm2022/ngwr-directives.mjs.map +1 -1
  144. package/fesm2022/ngwr-drawer.mjs +19 -3
  145. package/fesm2022/ngwr-drawer.mjs.map +1 -1
  146. package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -1
  147. package/fesm2022/ngwr-dropdown.mjs +35 -6
  148. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  149. package/fesm2022/ngwr-editor.mjs +1 -0
  150. package/fesm2022/ngwr-editor.mjs.map +1 -1
  151. package/fesm2022/ngwr-event-calendar.mjs +20 -9
  152. package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
  153. package/fesm2022/ngwr-form.mjs +170 -3
  154. package/fesm2022/ngwr-form.mjs.map +1 -1
  155. package/fesm2022/ngwr-graph.mjs +81 -13
  156. package/fesm2022/ngwr-graph.mjs.map +1 -1
  157. package/fesm2022/ngwr-i18n-ar.mjs +20 -0
  158. package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
  159. package/fesm2022/ngwr-i18n-cs.mjs +20 -0
  160. package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
  161. package/fesm2022/ngwr-i18n-de.mjs +20 -0
  162. package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
  163. package/fesm2022/ngwr-i18n-en.mjs +20 -0
  164. package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
  165. package/fesm2022/ngwr-i18n-es.mjs +20 -0
  166. package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
  167. package/fesm2022/ngwr-i18n-fr.mjs +20 -0
  168. package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
  169. package/fesm2022/ngwr-i18n-he.mjs +20 -0
  170. package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
  171. package/fesm2022/ngwr-i18n-hi.mjs +20 -0
  172. package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
  173. package/fesm2022/ngwr-i18n-id.mjs +20 -0
  174. package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
  175. package/fesm2022/ngwr-i18n-it.mjs +20 -0
  176. package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
  177. package/fesm2022/ngwr-i18n-ja.mjs +20 -0
  178. package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
  179. package/fesm2022/ngwr-i18n-ko.mjs +20 -0
  180. package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
  181. package/fesm2022/ngwr-i18n-nl.mjs +20 -0
  182. package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
  183. package/fesm2022/ngwr-i18n-pl.mjs +20 -0
  184. package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
  185. package/fesm2022/ngwr-i18n-pt.mjs +20 -0
  186. package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
  187. package/fesm2022/ngwr-i18n-ru.mjs +20 -0
  188. package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
  189. package/fesm2022/ngwr-i18n-sv.mjs +20 -0
  190. package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
  191. package/fesm2022/ngwr-i18n-tr.mjs +20 -0
  192. package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
  193. package/fesm2022/ngwr-i18n-uk.mjs +20 -0
  194. package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
  195. package/fesm2022/ngwr-i18n-vi.mjs +20 -0
  196. package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
  197. package/fesm2022/ngwr-i18n-zh-tw.mjs +20 -0
  198. package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
  199. package/fesm2022/ngwr-i18n-zh.mjs +20 -0
  200. package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
  201. package/fesm2022/ngwr-i18n.mjs +82 -11
  202. package/fesm2022/ngwr-i18n.mjs.map +1 -1
  203. package/fesm2022/ngwr-input-number.mjs +24 -1
  204. package/fesm2022/ngwr-input-number.mjs.map +1 -1
  205. package/fesm2022/ngwr-input-otp.mjs +2 -2
  206. package/fesm2022/ngwr-input-otp.mjs.map +1 -1
  207. package/fesm2022/ngwr-input.mjs +10 -2
  208. package/fesm2022/ngwr-input.mjs.map +1 -1
  209. package/fesm2022/ngwr-layout.mjs.map +1 -1
  210. package/fesm2022/ngwr-lightbox.mjs +20 -3
  211. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  212. package/fesm2022/ngwr-list.mjs +1 -1
  213. package/fesm2022/ngwr-list.mjs.map +1 -1
  214. package/fesm2022/ngwr-loading-bar-router.mjs.map +1 -1
  215. package/fesm2022/ngwr-loading-bar.mjs +2 -2
  216. package/fesm2022/ngwr-loading-bar.mjs.map +1 -1
  217. package/fesm2022/ngwr-mention.mjs +8 -0
  218. package/fesm2022/ngwr-mention.mjs.map +1 -1
  219. package/fesm2022/ngwr-meta.mjs +9 -6
  220. package/fesm2022/ngwr-meta.mjs.map +1 -1
  221. package/fesm2022/ngwr-overlay.mjs +21 -2
  222. package/fesm2022/ngwr-overlay.mjs.map +1 -1
  223. package/fesm2022/ngwr-page-header.mjs +21 -0
  224. package/fesm2022/ngwr-page-header.mjs.map +1 -1
  225. package/fesm2022/ngwr-pagination.mjs +2 -0
  226. package/fesm2022/ngwr-pagination.mjs.map +1 -1
  227. package/fesm2022/ngwr-pipes.mjs +8 -1
  228. package/fesm2022/ngwr-pipes.mjs.map +1 -1
  229. package/fesm2022/ngwr-popconfirm-testing.mjs +4 -1
  230. package/fesm2022/ngwr-popconfirm-testing.mjs.map +1 -1
  231. package/fesm2022/ngwr-popconfirm.mjs +43 -6
  232. package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
  233. package/fesm2022/ngwr-popover.mjs +114 -15
  234. package/fesm2022/ngwr-popover.mjs.map +1 -1
  235. package/fesm2022/ngwr-qr.mjs +6 -2
  236. package/fesm2022/ngwr-qr.mjs.map +1 -1
  237. package/fesm2022/ngwr-radio.mjs +71 -5
  238. package/fesm2022/ngwr-radio.mjs.map +1 -1
  239. package/fesm2022/ngwr-schema-form.mjs +12 -1
  240. package/fesm2022/ngwr-schema-form.mjs.map +1 -1
  241. package/fesm2022/ngwr-scroll.mjs +1 -3
  242. package/fesm2022/ngwr-scroll.mjs.map +1 -1
  243. package/fesm2022/ngwr-segmented.mjs +20 -0
  244. package/fesm2022/ngwr-segmented.mjs.map +1 -1
  245. package/fesm2022/ngwr-select.mjs +80 -9
  246. package/fesm2022/ngwr-select.mjs.map +1 -1
  247. package/fesm2022/ngwr-sortable-list.mjs +16 -4
  248. package/fesm2022/ngwr-sortable-list.mjs.map +1 -1
  249. package/fesm2022/ngwr-storage.mjs +1 -1
  250. package/fesm2022/ngwr-storage.mjs.map +1 -1
  251. package/fesm2022/ngwr-switch.mjs +2 -2
  252. package/fesm2022/ngwr-switch.mjs.map +1 -1
  253. package/fesm2022/ngwr-table.mjs +43 -7
  254. package/fesm2022/ngwr-table.mjs.map +1 -1
  255. package/fesm2022/ngwr-tabs-router.mjs.map +1 -1
  256. package/fesm2022/ngwr-textarea.mjs +2 -2
  257. package/fesm2022/ngwr-textarea.mjs.map +1 -1
  258. package/fesm2022/ngwr-toast.mjs +28 -0
  259. package/fesm2022/ngwr-toast.mjs.map +1 -1
  260. package/fesm2022/ngwr-tour.mjs +16 -11
  261. package/fesm2022/ngwr-tour.mjs.map +1 -1
  262. package/fesm2022/ngwr-tree-testing.mjs.map +1 -1
  263. package/fesm2022/ngwr-tree.mjs +49 -16
  264. package/fesm2022/ngwr-tree.mjs.map +1 -1
  265. package/fesm2022/ngwr-typography.mjs +20 -0
  266. package/fesm2022/ngwr-typography.mjs.map +1 -1
  267. package/fesm2022/ngwr-utils-router.mjs.map +1 -1
  268. package/fesm2022/ngwr-utils.mjs +46 -4
  269. package/fesm2022/ngwr-utils.mjs.map +1 -1
  270. package/fesm2022/ngwr-validators.mjs +33 -1
  271. package/fesm2022/ngwr-validators.mjs.map +1 -1
  272. package/fesm2022/ngwr-version.mjs +1 -1
  273. package/fesm2022/ngwr-version.mjs.map +1 -1
  274. package/fesm2022/ngwr-window.mjs +16 -9
  275. package/fesm2022/ngwr-window.mjs.map +1 -1
  276. package/form/styles/_index.scss +37 -0
  277. package/graph/styles/_index.scss +1 -9
  278. package/i18n/ar.json +20 -0
  279. package/i18n/cs.json +20 -0
  280. package/i18n/de.json +20 -0
  281. package/i18n/en.json +20 -0
  282. package/i18n/es.json +20 -0
  283. package/i18n/fr.json +20 -0
  284. package/i18n/he.json +20 -0
  285. package/i18n/hi.json +20 -0
  286. package/i18n/id.json +20 -0
  287. package/i18n/it.json +20 -0
  288. package/i18n/ja.json +20 -0
  289. package/i18n/ko.json +20 -0
  290. package/i18n/nl.json +20 -0
  291. package/i18n/pl.json +20 -0
  292. package/i18n/pt.json +20 -0
  293. package/i18n/ru.json +20 -0
  294. package/i18n/sv.json +20 -0
  295. package/i18n/tr.json +20 -0
  296. package/i18n/uk.json +20 -0
  297. package/i18n/vi.json +20 -0
  298. package/i18n/zh-TW.json +20 -0
  299. package/i18n/zh.json +20 -0
  300. package/image-cropper/styles/_index.scss +1 -9
  301. package/input-number/styles/_index.scss +7 -0
  302. package/layout/styles/_index.scss +13 -1
  303. package/llms-full.txt +17 -17
  304. package/llms.txt +7 -3
  305. package/loading-bar/styles/_rules.scss +6 -0
  306. package/package.json +2 -2
  307. package/page-header/styles/_index.scss +18 -0
  308. package/popconfirm/styles/_index.scss +6 -0
  309. package/popover/styles/_index.scss +31 -13
  310. package/schematics/use/symbol-map.json +3 -0
  311. package/segmented/styles/_index.scss +7 -0
  312. package/select/styles/_index.scss +7 -0
  313. package/sidebar/styles/_index.scss +6 -0
  314. package/skills/ngwr/references/catalog.md +2 -2
  315. package/sortable-list/styles/_rules.scss +1 -9
  316. package/speed-dial/styles/_index.scss +6 -0
  317. package/stepper/styles/_index.scss +1 -9
  318. package/table/styles/_index.scss +49 -0
  319. package/theme/_index.scss +12 -1
  320. package/theme/styles/_colors.scss +11 -0
  321. package/theme/styles/_contrast.scss +6 -0
  322. package/theme/styles/_index.scss +1 -0
  323. package/theme/styles/_mixins.scss +45 -0
  324. package/theme/styles/_print.scss +17 -0
  325. package/toast/styles/_index.scss +7 -0
  326. package/tour/styles/_index.scss +14 -0
  327. package/tree/styles/_index.scss +1 -9
  328. package/types/ngwr-anchor.d.ts +3 -0
  329. package/types/ngwr-animations-aurora.d.ts +6 -0
  330. package/types/ngwr-animations-blur-reveal.d.ts +6 -0
  331. package/types/ngwr-animations-click-sparks.d.ts +6 -0
  332. package/types/ngwr-animations-confetti.d.ts +6 -0
  333. package/types/ngwr-animations-decode.d.ts +6 -0
  334. package/types/ngwr-animations-destruct.d.ts +6 -0
  335. package/types/ngwr-animations-dot-grid.d.ts +6 -0
  336. package/types/ngwr-animations-falling-letters.d.ts +6 -0
  337. package/types/ngwr-animations-flow-lines.d.ts +6 -0
  338. package/types/ngwr-animations-fluid-cursor.d.ts +6 -0
  339. package/types/ngwr-animations-glitch.d.ts +6 -0
  340. package/types/ngwr-animations-glow-border.d.ts +6 -0
  341. package/types/ngwr-animations-gradient-flow.d.ts +6 -0
  342. package/types/ngwr-animations-marquee.d.ts +6 -0
  343. package/types/ngwr-animations-orbit.d.ts +6 -0
  344. package/types/ngwr-animations-reveal.d.ts +6 -0
  345. package/types/ngwr-animations-ripple-grid.d.ts +6 -0
  346. package/types/ngwr-animations-rotate-reveal.d.ts +6 -0
  347. package/types/ngwr-animations-shimmer.d.ts +6 -0
  348. package/types/ngwr-animations-spotlight.d.ts +6 -0
  349. package/types/ngwr-animations-thread-lines.d.ts +6 -0
  350. package/types/ngwr-animations-tilt.d.ts +10 -0
  351. package/types/ngwr-animations-typewriter.d.ts +6 -0
  352. package/types/ngwr-breadcrumbs.d.ts +25 -0
  353. package/types/ngwr-button.d.ts +23 -3
  354. package/types/ngwr-carousel-testing.d.ts +6 -4
  355. package/types/ngwr-carousel.d.ts +16 -3
  356. package/types/ngwr-cascader-testing.d.ts +4 -3
  357. package/types/ngwr-cascader.d.ts +34 -3
  358. package/types/ngwr-charts-bar-chart-testing.d.ts +15 -13
  359. package/types/ngwr-charts-bar-chart.d.ts +220 -48
  360. package/types/ngwr-charts-boxplot-chart-testing.d.ts +9 -2
  361. package/types/ngwr-charts-boxplot-chart.d.ts +110 -19
  362. package/types/ngwr-charts-bullet-chart.d.ts +72 -12
  363. package/types/ngwr-charts-calendar-heatmap.d.ts +119 -15
  364. package/types/ngwr-charts-candlestick-chart-testing.d.ts +19 -9
  365. package/types/ngwr-charts-candlestick-chart.d.ts +195 -62
  366. package/types/ngwr-charts-chart-legend.d.ts +142 -5
  367. package/types/ngwr-charts-core.d.ts +275 -21
  368. package/types/ngwr-charts-donut-chart-testing.d.ts +11 -5
  369. package/types/ngwr-charts-donut-chart.d.ts +124 -16
  370. package/types/ngwr-charts-funnel-chart.d.ts +62 -6
  371. package/types/ngwr-charts-gauge-testing.d.ts +5 -1
  372. package/types/ngwr-charts-gauge.d.ts +72 -10
  373. package/types/ngwr-charts-heatmap-chart.d.ts +103 -20
  374. package/types/ngwr-charts-line-chart-testing.d.ts +16 -2
  375. package/types/ngwr-charts-line-chart.d.ts +215 -86
  376. package/types/ngwr-charts-meter-group.d.ts +98 -7
  377. package/types/ngwr-charts-radar-chart-testing.d.ts +14 -3
  378. package/types/ngwr-charts-radar-chart.d.ts +148 -28
  379. package/types/ngwr-charts-scatter-chart-testing.d.ts +22 -10
  380. package/types/ngwr-charts-scatter-chart.d.ts +188 -18
  381. package/types/ngwr-charts-sparkline.d.ts +26 -4
  382. package/types/ngwr-charts-treemap-chart.d.ts +121 -23
  383. package/types/ngwr-charts-waterfall-chart-testing.d.ts +8 -1
  384. package/types/ngwr-charts-waterfall-chart.d.ts +108 -21
  385. package/types/ngwr-checkbox.d.ts +1 -0
  386. package/types/ngwr-color-picker.d.ts +28 -0
  387. package/types/ngwr-context-menu-testing.d.ts +10 -9
  388. package/types/ngwr-context-menu.d.ts +18 -1
  389. package/types/ngwr-copy-value.d.ts +8 -0
  390. package/types/ngwr-date-picker.d.ts +53 -2
  391. package/types/ngwr-dialog.d.ts +64 -13
  392. package/types/ngwr-directives.d.ts +12 -4
  393. package/types/ngwr-drawer.d.ts +33 -2
  394. package/types/ngwr-dropdown-testing.d.ts +8 -5
  395. package/types/ngwr-dropdown.d.ts +29 -6
  396. package/types/ngwr-event-calendar.d.ts +4 -0
  397. package/types/ngwr-form.d.ts +85 -1
  398. package/types/ngwr-graph.d.ts +22 -6
  399. package/types/ngwr-i18n.d.ts +65 -5
  400. package/types/ngwr-input-number.d.ts +8 -0
  401. package/types/ngwr-input.d.ts +7 -0
  402. package/types/ngwr-layout.d.ts +1 -1
  403. package/types/ngwr-lightbox.d.ts +15 -0
  404. package/types/ngwr-loading-bar-router.d.ts +6 -0
  405. package/types/ngwr-overlay.d.ts +16 -1
  406. package/types/ngwr-page-header.d.ts +23 -1
  407. package/types/ngwr-popconfirm-testing.d.ts +11 -2
  408. package/types/ngwr-popconfirm.d.ts +29 -2
  409. package/types/ngwr-popover.d.ts +87 -13
  410. package/types/ngwr-radio.d.ts +47 -5
  411. package/types/ngwr-segmented.d.ts +7 -0
  412. package/types/ngwr-select.d.ts +57 -13
  413. package/types/ngwr-sortable-list.d.ts +20 -7
  414. package/types/ngwr-table.d.ts +59 -6
  415. package/types/ngwr-tabs-router.d.ts +6 -0
  416. package/types/ngwr-toast.d.ts +11 -0
  417. package/types/ngwr-tour.d.ts +21 -3
  418. package/types/ngwr-tree-testing.d.ts +1 -2
  419. package/types/ngwr-tree.d.ts +33 -2
  420. package/types/ngwr-typography.d.ts +7 -0
  421. package/types/ngwr-utils-router.d.ts +6 -0
  422. package/types/ngwr-utils.d.ts +56 -2
  423. package/types/ngwr-validators.d.ts +49 -1
  424. package/types/ngwr-version.d.ts +1 -1
  425. package/types/ngwr-window.d.ts +14 -11
  426. package/typography/styles/_index.scss +4 -0
  427. package/window/styles/_index.scss +6 -19
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-date-picker-testing.mjs","names":[],"sources":["../../../projects/lib/date-picker/testing/wr-date-picker-day-harness.ts","../../../projects/lib/date-picker/testing/wr-time-panel-harness.ts","../../../projects/lib/date-picker/testing/wr-date-picker-harness-base.ts","../../../projects/lib/date-picker/testing/wr-date-picker-harness.ts","../../../projects/lib/date-picker/testing/wr-date-range-picker-harness.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\n/**\n * The day cell of a date-picker's calendar, under the name it shipped as.\n *\n * There is one implementation, and it lives with the component that owns the\n * element: a picker's popup IS a `<wr-calendar>`, and `.wr-calendar__day` is its\n * cell. `ngwr/calendar/testing` is therefore the home, and this alias keeps\n * `WrDatePickerDayHarness` working for every spec that already imports it — the two\n * names are the same class, so a harness from either query is usable with either.\n */\nexport { WrCalendarDayHarness as WrDatePickerDayHarness } from 'ngwr/calendar/testing';\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, type TestElement } from '@angular/cdk/testing';\n\nimport type { WrDatePickerTimeFields } from './types';\n\n/** Column order inside the stepper, which is also the order the boxes render in. */\nconst UNITS = ['hours', 'minutes', 'seconds'] as const;\n\n/** One unit of a time stepper. */\ntype Unit = (typeof UNITS)[number];\n\nfunction missingColumn(unit: Unit, method: string): string {\n return `${method}(): this stepper has no ${unit} column — seconds only render with [showSeconds]=\"true\".`;\n}\n\n/**\n * The `<wr-time-picker>` stepper inside a date-picker popup.\n *\n * Deliberately NOT exported from the entry point: the component is `@internal`\n * (`<wr-date-picker mode=\"time\">` is how a consumer gets one), so the picker\n * harnesses re-publish what it can do — `getTime()`, `setTime()`, `stepTime()`,\n * `toggleMeridiem()` — rather than handing out this class. It exists so the\n * range picker, which renders one stepper PER END, can address them\n * independently instead of by CSS nth-of-type gymnastics.\n *\n * Units are addressed by position, not by the boxes' `aria-label`: every string\n * in this panel now resolves through the i18n catalog (`datePicker.hours`,\n * `datePicker.incrementHours`, `datePicker.am` …), so keying on them would make\n * this harness answer in whatever locale the app under test is configured for.\n * Column order is the layout contract.\n *\n * @internal\n */\nexport class WrTimePanelHarness extends ComponentHarness {\n static hostSelector = '.wr-time-picker';\n\n /** The stepper's value as `HH:MM`, plus `:SS` and a space-joined {@link getMeridiem} when those columns exist. */\n async getTimeText(): Promise<string> {\n const parts = [await this.getValue('hours'), await this.getValue('minutes')];\n const seconds = await this.getOptionalValue('seconds');\n if (seconds !== null) parts.push(seconds);\n\n const meridiem = await this.getMeridiem();\n return meridiem ? `${parts.join(':')} ${meridiem}` : parts.join(':');\n }\n\n /**\n * The meridiem column's rendered text, or `null` when the stepper is in\n * 24-hour mode. `'AM'` / `'PM'` on the built-in fallbacks — it reads whatever\n * `datePicker.am` / `datePicker.pm` resolve to, so a configured catalog\n * changes the answer.\n */\n async getMeridiem(): Promise<string | null> {\n const label = await this.locatorForOptional('.wr-time-picker__label')();\n return label ? label.text() : null;\n }\n\n /**\n * Type into the boxes named by `fields`, leaving the rest alone.\n *\n * Each box is cleared and retyped rather than assigned: the panel reads an\n * emptied box as someone mid-retype and deliberately commits nothing for it, so\n * a harness that only cleared would look like a no-op.\n */\n async setFields(fields: WrDatePickerTimeFields): Promise<void> {\n for (const unit of UNITS) {\n const value = fields[unit];\n if (value === undefined) continue;\n\n const box = await this.box(unit, 'setTime');\n await box.clear();\n await box.sendKeys(String(value));\n }\n }\n\n /** Click a unit's ▲ / ▼ button once. Minutes and seconds move by the picker's `step`. */\n async step(unit: Unit, direction: 1 | -1): Promise<void> {\n // The AM/PM column contributes a ▲ and a ▼ of its own, and it is always\n // last — so it cannot be excluded by index alone: with seconds off, the\n // third ▲ in the panel IS the meridiem toggle.\n const suffix = direction === 1 ? 'up' : 'down';\n const buttons = await this.locatorForAll(\n `.wr-time-picker__col:not(.wr-time-picker__col--ampm) .wr-time-picker__step--${suffix}`\n )();\n\n const button = buttons[UNITS.indexOf(unit)];\n if (!button) throw new Error(missingColumn(unit, 'stepTime'));\n\n await button.click();\n }\n\n /** Flip AM ↔ PM. Throws on a 24-hour stepper, which has no such control. */\n async toggleMeridiem(): Promise<void> {\n const button = await this.locatorForOptional('.wr-time-picker__col--ampm .wr-time-picker__step--up')();\n if (!button) {\n throw new Error(\n 'toggleMeridiem(): this stepper has no AM / PM control — it is in 24-hour mode. Pass ' +\n 'timeFormat=\"12h\" (or a locale that resolves to 12-hour time) to get one.'\n );\n }\n\n await button.click();\n }\n\n /** A unit's rendered (zero-padded) value. */\n private async getValue(unit: Unit): Promise<string> {\n return (await this.box(unit, 'getTime')).getProperty<string>('value');\n }\n\n /** Same, but `null` when the column is not rendered at all. */\n private async getOptionalValue(unit: Unit): Promise<string | null> {\n const boxes = await this.boxes();\n const box = boxes[UNITS.indexOf(unit)];\n return box ? box.getProperty<string>('value') : null;\n }\n\n private async box(unit: Unit, method: string): Promise<TestElement> {\n const boxes = await this.boxes();\n const box = boxes[UNITS.indexOf(unit)];\n if (!box) throw new Error(missingColumn(unit, method));\n return box;\n }\n\n /** The typable boxes, in column order — the AM/PM column is a `<span>`, not one of these. */\n private async boxes(): Promise<TestElement[]> {\n return this.locatorForAll('.wr-time-picker__input')();\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, type HarnessLoader, type TestElement } from '@angular/cdk/testing';\n\nimport type { WrDatePickerDayHarnessFilters } from './types';\nimport { WrDatePickerDayHarness } from './wr-date-picker-day-harness';\nimport { WrTimePanelHarness } from './wr-time-panel-harness';\n\n/** The first element whose trimmed text is exactly `text`. */\nasync function byText(elements: TestElement[], text: string): Promise<TestElement | null> {\n for (const element of elements) {\n if ((await element.text()) === text) return element;\n }\n return null;\n}\n\n/**\n * Everything `<wr-date-picker>` and `<wr-date-range-picker>` do identically: the\n * trigger button, the popup it owns, and the `<wr-calendar>` inside it. Both\n * components render the SAME trigger element (`.wr-date-picker__trigger` — the\n * range picker reuses the class rather than minting its own) and both publish\n * their popup's id through the trigger's `aria-controls`, so the scoping story is\n * shared too.\n *\n * **Deliberately not exported, and `WrAnyDatePickerHarness` is what replaces it.**\n * The reason a consumer wanted this name was to write a helper taking \"either\n * picker\", which the union in `types/` says directly and without publishing\n * anything else. Exporting the class instead would publish the `protected` members\n * below as a subclassing contract — including `timePanels()`, which hands back the\n * harness for `<wr-time-panel>`, a component this package does not ship as public\n * API. A type-only re-export is not the middle ground it looks like: the base is a\n * value in two `extends` clauses, so d.ts flattening promotes `export type` back to\n * a value export while the FESM bundle exports nothing — an import that type-checks\n * and is `undefined` at runtime.\n *\n * @internal\n */\nexport abstract class WrDatePickerHarnessBase extends ComponentHarness {\n /** Concrete class name, so errors read like the harness the caller reached for. */\n protected abstract readonly harnessName: string;\n\n /**\n * Whether the popup is up.\n *\n * Read from the trigger's `aria-expanded` rather than from a host class: unlike\n * `wr-select`, neither picker carries an `--open` modifier, and the ARIA state\n * is the thing a consumer's users actually get told.\n */\n async isOpen(): Promise<boolean> {\n return (await (await this.trigger()).getAttribute('aria-expanded')) === 'true';\n }\n\n /** Open the popup from the trigger. An already-open picker is left alone. */\n async open(): Promise<void> {\n if (await this.isOpen()) return;\n\n await (await this.trigger()).click();\n if (await this.isOpen()) return;\n\n throw new Error(\n `${this.harnessName}.open(): the trigger did not open a popup. A disabled picker refuses to open, and so ` +\n 'does a readonly <wr-date-range-picker> — a readonly <wr-date-picker>, deliberately, still opens.'\n );\n }\n\n /**\n * Close the popup by clicking the trigger again. A closed picker is left alone.\n *\n * Deliberately not Escape: the CDK dispatches a keydown to the TOP-MOST overlay,\n * so with two pickers open this would close whichever opened last rather than\n * this one. The trigger only ever toggles its own popup.\n */\n async close(): Promise<void> {\n if (!(await this.isOpen())) return;\n\n await (await this.trigger()).click();\n }\n\n /** The popup's role — `'dialog'`, which is what the trigger's `aria-haspopup` promises. */\n async getPanelRole(): Promise<string | null> {\n return (await this.panel()).getAttribute('role');\n }\n\n /**\n * The popup's accessible name. Defaults to a catalog string chosen by `mode`\n * (\"Choose date\", \"Choose time\", …) and is overridden by `[panelAriaLabel]`.\n */\n async getPanelAriaLabel(): Promise<string | null> {\n return (await this.panel()).getAttribute('aria-label');\n }\n\n /**\n * Which of the calendar's views is showing. The header label zooms out\n * (day, then month, then year); picking a month or a year zooms back in. A period\n * mode opens on the view it picks from, and `quarter` exists only in\n * `mode=\"quarter\"`.\n */\n async getView(): Promise<'day' | 'month' | 'quarter' | 'year'> {\n if (await this.inPanel('[role=\"grid\"]')) return 'day';\n if (await this.inPanel('.wr-calendar__months')) return 'month';\n if (await this.inPanel('.wr-calendar__quarters')) return 'quarter';\n if (await this.inPanel('.wr-calendar__years')) return 'year';\n\n throw new Error(this.noCalendar('getView'));\n }\n\n /**\n * The calendar's header: `'January 2025'` in the day view, `'2025'` in the month\n * view, `'2016 – 2027'` in the year view.\n */\n async getPanelHeader(): Promise<string> {\n const label = await this.inPanel('.wr-calendar__label');\n if (!label) throw new Error(this.noCalendar('getPanelHeader'));\n\n return label.text();\n }\n\n /** The weekday strip, in display order — `role=\"columnheader\"` cells of the grid's first row. */\n async getWeekdayLabels(): Promise<string[]> {\n const cells = await this.allInPanel('[role=\"columnheader\"]');\n if (cells.length === 0) {\n throw new Error(\n `${this.harnessName}.getWeekdayLabels(): no weekday strip. Only the day view has one, and mode=\"time\" ` +\n 'has no calendar at all.'\n );\n }\n\n return Promise.all(cells.map(cell => cell.text()));\n }\n\n /**\n * Step the calendar forwards. What one step MEANS follows the active view, as\n * the button's own `aria-label` says: a month in the day view, a year in the\n * month view, twelve years in the year view.\n */\n async next(): Promise<void> {\n await this.navigate('next');\n }\n\n /** Step the calendar backwards — see {@link next} for what one step covers. */\n async previous(): Promise<void> {\n await this.navigate('prev');\n }\n\n /**\n * Zoom out one level by clicking the header, the way a user does: day → month,\n * month → year. Throws at the year view, where the header is inert.\n */\n async zoomOut(): Promise<void> {\n const label = await this.inPanel('.wr-calendar__label');\n if (!label) throw new Error(this.noCalendar('zoomOut'));\n\n if (await label.getProperty<boolean>('disabled')) {\n throw new Error(\n `${this.harnessName}.zoomOut(): the header is inert — the calendar is already showing the year view ` +\n '(or the whole picker is disabled), and there is nothing further to zoom out to.'\n );\n }\n\n await label.click();\n }\n\n /** Pick a month in the month view, by 0-based index or by the label the calendar renders. */\n async selectMonth(month: number | string): Promise<void> {\n const chips = await this.allInPanel('.wr-calendar__months .wr-calendar__chip');\n if (chips.length === 0) {\n throw new Error(\n `${this.harnessName}.selectMonth(): the calendar is not showing its month view — call zoomOut() first.`\n );\n }\n\n const chip = typeof month === 'number' ? chips[month] : await byText(chips, month);\n if (!chip) {\n throw new Error(\n `${this.harnessName}.selectMonth(${JSON.stringify(month)}): no such month. Pass a 0-based index, or the ` +\n 'label the calendar renders — a short month name in the active locale.'\n );\n }\n\n await chip.click();\n }\n\n /**\n * Pick a quarter, 1 to 4, of the year in the header. `mode=\"quarter\"` only:\n * no other mode has a quarter view.\n */\n async selectQuarter(quarter: 1 | 2 | 3 | 4): Promise<void> {\n const chips = await this.allInPanel('.wr-calendar__quarters .wr-calendar__chip');\n if (chips.length === 0) {\n throw new Error(\n `${this.harnessName}.selectQuarter(): the calendar is not showing its quarter view. Only mode=\"quarter\" ` +\n 'has one, and from its year view selectYear() comes back to it.'\n );\n }\n\n const chip = chips[quarter - 1];\n if (!chip) throw new Error(`${this.harnessName}.selectQuarter(${quarter}): a year has quarters 1 to 4.`);\n if (await chip.getProperty<boolean>('disabled')) {\n throw new Error(\n `${this.harnessName}.selectQuarter(${quarter}): that quarter is disabled: min / max or dateFilter rules ` +\n 'out every day in it.'\n );\n }\n\n await chip.click();\n }\n\n /**\n * Pick the week holding a day of the month on show. `mode=\"week\"` only: the\n * click is a day click, and what makes it a week is the mode, so in any other\n * mode this throws rather than quietly picking a day.\n */\n async selectWeek(dayOfMonth: number): Promise<void> {\n if (!(await this.inPanel('.wr-calendar--week'))) {\n throw new Error(\n `${this.harnessName}.selectWeek(): the calendar does not pick weeks, that is mode=\"week\". selectDay() ` +\n 'picks a day.'\n );\n }\n\n await this.selectDay(dayOfMonth);\n }\n\n /** Pick a year in the year view. Only the twelve on show can be picked. */\n async selectYear(year: number): Promise<void> {\n const chips = await this.allInPanel('.wr-calendar__years .wr-calendar__chip');\n if (chips.length === 0) {\n throw new Error(\n `${this.harnessName}.selectYear(): the calendar is not showing its year view — call zoomOut() until ` +\n 'getView() answers \"year\".'\n );\n }\n\n const chip = await byText(chips, String(year));\n if (!chip) {\n const shown = await Promise.all(chips.map(candidate => candidate.text()));\n throw new Error(\n `${this.harnessName}.selectYear(${year}): the year view is showing ${shown[0]}-${shown[shown.length - 1]} ` +\n '— call previous() / next() to move the twelve-year window first.'\n );\n }\n\n await chip.click();\n }\n\n /**\n * The day cells of the calendar in this picker's popup, in DOM order — 42 of\n * them, since the grid is always six weeks and pads into the neighbouring\n * months.\n */\n async getDays(filters: WrDatePickerDayHarnessFilters = {}): Promise<WrDatePickerDayHarness[]> {\n await this.requireGrid('getDays');\n\n return (await this.panelLoader()).getAllHarnesses(WrDatePickerDayHarness.with(filters));\n }\n\n /**\n * One day of the month on show. The padding days of the neighbouring months are\n * skipped, so `getDay(1)` is the 1st of THIS month and never the 1st of the next.\n */\n async getDay(dayOfMonth: number): Promise<WrDatePickerDayHarness> {\n const cells = await this.getDays({ text: String(dayOfMonth) });\n for (const cell of cells) {\n if (!(await cell.isOutOfMonth())) return cell;\n }\n\n throw new Error(\n `${this.harnessName}.getDay(${dayOfMonth}): the month on show (${await this.getPanelHeader()}) has no such ` +\n 'day. Cells belonging to the neighbouring months are deliberately not matched — call previous() / next() ' +\n 'to change month.'\n );\n }\n\n /** Click a day of the month on show. */\n async selectDay(dayOfMonth: number): Promise<void> {\n const cell = await this.getDay(dayOfMonth);\n if (await cell.isDisabled()) {\n throw new Error(\n `${this.harnessName}.selectDay(${dayOfMonth}): that day is disabled — min / max or dateFilter rules it ` +\n 'out, and a disabled cell swallows the click rather than picking anything.'\n );\n }\n\n await cell.click();\n }\n\n /** The trigger button. Both components render it with the same class. */\n protected async trigger(): Promise<TestElement> {\n return this.locatorFor('.wr-date-picker__trigger')();\n }\n\n /**\n * The id of THIS picker's popup.\n *\n * The trigger publishes it as `aria-controls` only while the popup is up, which\n * makes one lookup answer both questions — is it open, and which of the panes\n * in the shared overlay container is ours.\n */\n protected async panelId(): Promise<string> {\n const id = await (await this.trigger()).getAttribute('aria-controls');\n if (!id) {\n throw new Error(\n `${this.harnessName}: the popup is closed — call open() first. The trigger only publishes aria-controls ` +\n 'while its popup is up.'\n );\n }\n\n return id;\n }\n\n /** A loader scoped to THIS picker's popup, so a second open picker cannot answer for it. */\n protected async panelLoader(): Promise<HarnessLoader> {\n return this.documentRootLocatorFactory().harnessLoaderFor(`#${await this.panelId()}`);\n }\n\n /** One element inside THIS picker's popup, or `null`. */\n protected async inPanel(selector: string): Promise<TestElement | null> {\n return this.documentRootLocatorFactory().locatorForOptional(`#${await this.panelId()} ${selector}`)();\n }\n\n /** Every matching element inside THIS picker's popup, in DOM order. */\n protected async allInPanel(selector: string): Promise<TestElement[]> {\n return this.documentRootLocatorFactory().locatorForAll(`#${await this.panelId()} ${selector}`)();\n }\n\n /**\n * The time steppers in this popup, in DOM order — none in `date` mode, one for\n * `time` / `datetime`, and two (start then end) for a datetime range.\n */\n protected async timePanels(): Promise<WrTimePanelHarness[]> {\n return (await this.panelLoader()).getAllHarnesses(WrTimePanelHarness);\n }\n\n private async navigate(direction: 'prev' | 'next'): Promise<void> {\n const button = await this.inPanel(`.wr-calendar__nav--${direction}`);\n if (!button) throw new Error(this.noCalendar(direction === 'next' ? 'next' : 'previous'));\n\n await button.click();\n }\n\n /** Fail early on the day-cell methods rather than answering with an empty list. */\n private async requireGrid(method: string): Promise<void> {\n if (await this.inPanel('[role=\"grid\"]')) return;\n\n throw new Error(\n `${this.harnessName}.${method}(): this popup has no day grid. mode=\"time\" renders a time stepper only, and a ` +\n 'calendar on its month / quarter / year view offers chips instead of day cells: selectMonth() / ' +\n 'selectYear() come back to the days, except in a period mode, which has none.'\n );\n }\n\n private async panel(): Promise<TestElement> {\n return this.documentRootLocatorFactory().locatorFor(`#${await this.panelId()}`)();\n }\n\n private noCalendar(method: string): string {\n return `${this.harnessName}.${method}(): this popup has no calendar — mode=\"time\" renders a time stepper only.`;\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { HarnessPredicate, type TestElement } from '@angular/cdk/testing';\n\nimport type { WrDatePickerMode } from 'ngwr/date-picker';\n\nimport type { WrDatePickerHarnessFilters, WrDatePickerTimeFields } from './types';\nimport { WrDatePickerHarnessBase } from './wr-date-picker-harness-base';\nimport type { WrTimePanelHarness } from './wr-time-panel-harness';\n\n/**\n * Test harness for `<wr-date-picker>` — the `date`, `time` and `datetime` modes\n * of the one component, and its period modes: `selectMonth()`, `selectYear()`,\n * `selectQuarter()` and `selectWeek()` are the pick where the mode makes them one.\n *\n * The popup is NOT inside the picker: it is a pane in the overlay container, a\n * sibling of the whole app. Everything inside it is therefore reached through the\n * document root, scoped by the id the trigger publishes as `aria-controls` —\n * which is what keeps two pickers on one page from reading each other's calendar.\n *\n * The value lives in a text field, so there are two ways in and the harness\n * offers both: {@link setValueText} types a date, {@link selectDay} picks one out\n * of the grid. There is deliberately no clear BUTTON on this component — an\n * emptied field is what clears the value, and that is what {@link clear} does.\n *\n * @example\n * ```ts\n * const picker = await loader.getHarness(WrDatePickerHarness);\n *\n * await picker.open();\n * expect(await picker.getPanelHeader()).toBe('January 2025');\n * await picker.selectDay(14);\n *\n * expect(await picker.getValueText()).toBe('14.01.2025');\n * expect(await (await picker.getDay(14)).isSelected()).toBe(true);\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrDatePickerHarness extends WrDatePickerHarnessBase {\n static hostSelector = 'wr-date-picker';\n\n /** Build a predicate that narrows the query. */\n static with(options: WrDatePickerHarnessFilters = {}): HarnessPredicate<WrDatePickerHarness> {\n return new HarnessPredicate(WrDatePickerHarness, options)\n .addOption('text', options.text, (harness, text) => HarnessPredicate.stringMatches(harness.getValueText(), text))\n .addOption('placeholder', options.placeholder, (harness, placeholder) =>\n HarnessPredicate.stringMatches(harness.getPlaceholder(), placeholder)\n )\n .addOption('mode', options.mode, async (harness, mode) => (await harness.getMode()) === mode)\n .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled)\n .addOption('open', options.open, async (harness, open) => (await harness.isOpen()) === open);\n }\n\n protected readonly harnessName = 'WrDatePickerHarness';\n\n /** Which mode the picker is in, read from the `wr-date-picker--*` modifier. */\n async getMode(): Promise<WrDatePickerMode> {\n const host = await this.host();\n for (const mode of ['time', 'datetime', 'week', 'month', 'quarter', 'year'] as const) {\n if (await host.hasClass(`wr-date-picker--${mode}`)) return mode;\n }\n return 'date';\n }\n\n /**\n * What the field is showing: the value in the picker's `format`, or `''` when it\n * is empty and the placeholder is up.\n */\n async getValueText(): Promise<string> {\n return (await this.field()).getProperty<string>('value');\n }\n\n /** The field's placeholder. */\n async getPlaceholder(): Promise<string> {\n return (await this.field()).getProperty<string>('placeholder');\n }\n\n /**\n * Type a date into the field, replacing whatever is there.\n *\n * The field is cleared first, so the value passes through `null` on the way —\n * exactly as it does for a user who selects all and types over it. The picker\n * parses on every keystroke and commits only when the text parses in full, so a\n * partial or out-of-bounds entry leaves the model on its last good value.\n */\n async setValueText(text: string): Promise<void> {\n const field = await this.field();\n await field.clear();\n // `sendKeys()` with an empty string throws — clearing was the whole request.\n if (text) await field.sendKeys(text);\n }\n\n /**\n * Empty the field, which clears the value.\n *\n * Not a click on the `×`: that button exists only on a `clearable` picker, and an\n * empty field gets back to `null` on every one.\n */\n async clear(): Promise<void> {\n await (await this.field()).clear();\n }\n\n /** Whether the picker refuses interaction. */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).hasClass('wr-date-picker--disabled');\n }\n\n /**\n * Whether the field refuses typing. A read-only picker still OPENS its popup —\n * documented behaviour, and the one place it parts company with the range picker.\n */\n async isReadonly(): Promise<boolean> {\n return (await this.field()).getProperty<boolean>('readOnly');\n }\n\n /** Move focus to the field. */\n async focus(): Promise<void> {\n return (await this.field()).focus();\n }\n\n /**\n * Blur the field, which is what reformats a value to canonical and emits `touch`\n * so a bound `[formField]` can mark itself touched.\n */\n async blur(): Promise<void> {\n return (await this.field()).blur();\n }\n\n /** Whether the field currently has focus. */\n async isFocused(): Promise<boolean> {\n return (await this.field()).isFocused();\n }\n\n /**\n * The open time stepper's value as `HH:MM`, plus `:SS` when `showSeconds` is on\n * and ` AM`/` PM` in 12-hour mode.\n */\n async getTime(): Promise<string> {\n return (await this.timePanel()).getTimeText();\n }\n\n /** Type into the open time stepper's boxes. Omitted fields are left alone. */\n async setTime(fields: WrDatePickerTimeFields): Promise<void> {\n await (await this.timePanel()).setFields(fields);\n }\n\n /** Click one of the stepper's ▲ / ▼ buttons. Minutes and seconds move by `step`. */\n async stepTime(unit: 'hours' | 'minutes' | 'seconds', direction: 1 | -1): Promise<void> {\n await (await this.timePanel()).step(unit, direction);\n }\n\n /** Flip the stepper between AM and PM. Throws in 24-hour mode, which has no such control. */\n async toggleMeridiem(): Promise<void> {\n await (await this.timePanel()).toggleMeridiem();\n }\n\n private async field(): Promise<TestElement> {\n return this.locatorFor('input[wrInput]')();\n }\n\n /** The one stepper in the popup — `panelId()` has already refused a closed picker. */\n private async timePanel(): Promise<WrTimePanelHarness> {\n const [panel] = await this.timePanels();\n if (!panel) {\n throw new Error(\n `${this.harnessName}: this popup has no time stepper — mode=\"date\" renders a calendar only. Use mode=\"time\" ` +\n 'or mode=\"datetime\".'\n );\n }\n\n return panel;\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { HarnessPredicate, type TestElement } from '@angular/cdk/testing';\n\nimport type { WrDateRangePickerMode } from 'ngwr/date-picker';\n\nimport type { WrDatePickerTimeFields, WrDateRangePickerEnd, WrDateRangePickerHarnessFilters } from './types';\nimport { WrDatePickerHarnessBase } from './wr-date-picker-harness-base';\nimport type { WrTimePanelHarness } from './wr-time-panel-harness';\n\n/**\n * Test harness for `<wr-date-range-picker>` — two text fields over one range\n * calendar.\n *\n * A separate harness rather than a mode of {@link WrDatePickerHarness}, because\n * the DOM a spec has to reach is genuinely different: two fields with a separator\n * between them, and in `datetime` mode two time steppers instead of one. Every\n * call that could mean either field takes an explicit `'start'` / `'end'` — the\n * component's own bugs were nearly all \"which end did that belong to\", and a\n * harness that guessed would reproduce them.\n *\n * The popup, the calendar and the scoping work exactly as they do for the single\n * picker: a pane in the overlay container, addressed by the id the trigger\n * publishes as `aria-controls`.\n *\n * @example\n * ```ts\n * const period = await loader.getHarness(WrDateRangePickerHarness);\n *\n * await period.open();\n * await period.selectDay(14);\n * await period.selectDay(20);\n *\n * expect([await period.getStartText(), await period.getEndText()]).toEqual(['14.01.2025', '20.01.2025']);\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrDateRangePickerHarness extends WrDatePickerHarnessBase {\n static hostSelector = 'wr-date-range-picker';\n\n /** Build a predicate that narrows the query. */\n static with(options: WrDateRangePickerHarnessFilters = {}): HarnessPredicate<WrDateRangePickerHarness> {\n return new HarnessPredicate(WrDateRangePickerHarness, options)\n .addOption('startText', options.startText, (harness, text) =>\n HarnessPredicate.stringMatches(harness.getStartText(), text)\n )\n .addOption('endText', options.endText, (harness, text) =>\n HarnessPredicate.stringMatches(harness.getEndText(), text)\n )\n .addOption('mode', options.mode, async (harness, mode) => (await harness.getMode()) === mode)\n .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled)\n .addOption('open', options.open, async (harness, open) => (await harness.isOpen()) === open);\n }\n\n protected readonly harnessName = 'WrDateRangePickerHarness';\n\n /** Which mode the picker is in, read from the `wr-date-range-picker--*` modifier. */\n async getMode(): Promise<WrDateRangePickerMode> {\n const host = await this.host();\n for (const mode of ['datetime', 'month', 'quarter', 'year'] as const) {\n if (await host.hasClass(`wr-date-range-picker--${mode}`)) return mode;\n }\n return 'date';\n }\n\n /** What the start field is showing — `''` while that end is unpicked. */\n async getStartText(): Promise<string> {\n return (await this.field('start')).getProperty<string>('value');\n }\n\n /** What the end field is showing — `''` while that end is unpicked. */\n async getEndText(): Promise<string> {\n return (await this.field('end')).getProperty<string>('value');\n }\n\n /** The glyph rendered between the two fields (`[separator]`, `'–'` by default). */\n async getSeparator(): Promise<string> {\n return (await this.locatorFor('.wr-date-range-picker__separator')()).text();\n }\n\n /** The placeholder of one field. */\n async getPlaceholder(end: WrDateRangePickerEnd): Promise<string> {\n return (await this.field(end)).getProperty<string>('placeholder');\n }\n\n /**\n * Type a date into the start field, replacing whatever is there.\n *\n * Ends typed out of order are NOT swapped here — the component settles the\n * ordering when the interaction is over, so call {@link blur} (or close the\n * popup) to see a normalised range.\n */\n async setStartText(text: string): Promise<void> {\n await this.type('start', text);\n }\n\n /** Type a date into the end field — see {@link setStartText} on ordering. */\n async setEndText(text: string): Promise<void> {\n await this.type('end', text);\n }\n\n /** Empty both fields, which clears the range, with or without the `clearable` button. */\n async clear(): Promise<void> {\n await (await this.field('start')).clear();\n await (await this.field('end')).clear();\n }\n\n /** Whether the picker refuses interaction. */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).hasClass('wr-date-range-picker--disabled');\n }\n\n /**\n * Whether the fields refuse typing. Stricter than `<wr-date-picker>`: a\n * read-only range picker also refuses to open, since two fields over one\n * calendar leaves no reading of \"untypeable\" that still lets the grid rewrite\n * both ends.\n */\n async isReadonly(): Promise<boolean> {\n return (await this.field('start')).getProperty<boolean>('readOnly');\n }\n\n /** Move focus to one field. */\n async focus(end: WrDateRangePickerEnd): Promise<void> {\n return (await this.field(end)).focus();\n }\n\n /**\n * Blur one field. This is the moment an out-of-order range is put back in\n * order, and — when focus leaves the control rather than hopping to the other\n * end — the moment `touch` is emitted.\n */\n async blur(end: WrDateRangePickerEnd): Promise<void> {\n return (await this.field(end)).blur();\n }\n\n /** Whether one field currently has focus. */\n async isFocused(end: WrDateRangePickerEnd): Promise<boolean> {\n return (await this.field(end)).isFocused();\n }\n\n /**\n * One end's time stepper as `HH:MM`, plus `:SS` when `showSeconds` is on and\n * ` AM`/` PM` in 12-hour mode. `datetime` mode only.\n */\n async getTime(end: WrDateRangePickerEnd): Promise<string> {\n return (await this.timePanel(end)).getTimeText();\n }\n\n /** Type into one end's time stepper. Omitted fields are left alone. */\n async setTime(end: WrDateRangePickerEnd, fields: WrDatePickerTimeFields): Promise<void> {\n await (await this.timePanel(end)).setFields(fields);\n }\n\n /** Click one of an end's ▲ / ▼ buttons. Minutes and seconds move by `step`. */\n async stepTime(end: WrDateRangePickerEnd, unit: 'hours' | 'minutes' | 'seconds', direction: 1 | -1): Promise<void> {\n await (await this.timePanel(end)).step(unit, direction);\n }\n\n /** Flip one end between AM and PM. Throws in 24-hour mode, which has no such control. */\n async toggleMeridiem(end: WrDateRangePickerEnd): Promise<void> {\n await (await this.timePanel(end)).toggleMeridiem();\n }\n\n /**\n * The labels of the `[presets]` in the open popup, in the order they render —\n * empty when the picker has none.\n */\n async getPresets(): Promise<string[]> {\n return Promise.all((await this.presetButtons()).map(button => button.text()));\n }\n\n /**\n * The label of the preset marked `aria-pressed` — the one whose range equals\n * the value — or `null` when the value matches none.\n */\n async getActivePreset(): Promise<string | null> {\n for (const button of await this.presetButtons()) {\n if ((await button.getAttribute('aria-pressed')) === 'true') return button.text();\n }\n return null;\n }\n\n /**\n * Click a preset by its label. That commits the range and closes the popup.\n * Throws for a label the popup does not show, and for a preset the picker\n * disabled because it reaches outside `minDate` / `maxDate`.\n */\n async selectPreset(label: string): Promise<void> {\n const buttons = await this.presetButtons();\n const labels = await Promise.all(buttons.map(button => button.text()));\n const button = buttons[labels.indexOf(label)];\n if (!button) {\n throw new Error(\n `${this.harnessName}.selectPreset(${JSON.stringify(label)}): no such preset. The popup shows ` +\n `${labels.length ? labels.map(shown => JSON.stringify(shown)).join(', ') : 'none'}.`\n );\n }\n if (await button.getProperty<boolean>('disabled')) {\n throw new Error(\n `${this.harnessName}.selectPreset(${JSON.stringify(label)}): the preset is disabled — its range reaches ` +\n 'outside minDate / maxDate.'\n );\n }\n\n await button.click();\n }\n\n private presetButtons(): Promise<TestElement[]> {\n return this.allInPanel('.wr-date-range-presets__item');\n }\n\n private async type(end: WrDateRangePickerEnd, text: string): Promise<void> {\n const field = await this.field(end);\n await field.clear();\n // `sendKeys()` with an empty string throws — clearing was the whole request.\n if (text) await field.sendKeys(text);\n }\n\n /** The two fields are addressed by position, which is the order they render in. */\n private async field(end: WrDateRangePickerEnd): Promise<TestElement> {\n const fields = await this.locatorForAll('.wr-date-range-picker__input')();\n const field = fields[end === 'start' ? 0 : 1];\n if (!field) {\n throw new Error(`${this.harnessName}: no \"${end}\" field — the picker rendered ${fields.length} of them.`);\n }\n\n return field;\n }\n\n /**\n * One end's stepper. Both are mounted together in `datetime` mode, start first —\n * the group labels are localized, so position is the addressable thing.\n */\n private async timePanel(end: WrDateRangePickerEnd): Promise<WrTimePanelHarness> {\n const panels = await this.timePanels();\n if (panels.length === 0) {\n throw new Error(\n `${this.harnessName}: this popup has no time steppers — mode=\"date\" renders a calendar only. Use ` +\n 'mode=\"datetime\".'\n );\n }\n\n const panel = panels[end === 'start' ? 0 : 1];\n if (!panel) {\n throw new Error(`${this.harnessName}: no \"${end}\" time stepper — the popup rendered ${panels.length}.`);\n }\n\n return panel;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;ACYA,MAAM,QAAQ;CAAC;CAAS;CAAW;AAAS;AAK5C,SAAS,cAAc,MAAY,QAAc;CAC/C,OAAO,GAAG,OAAM,0BAA2B,KAAI;AACjD;AAoBA,IAAa,qBAAb,cAAwC,iBAAgB;CACtD,OAAO,eAAe;CAGtB,MAAM,cAAW;EACf,MAAM,QAAQ,CAAC,MAAM,KAAK,SAAS,OAAO,GAAG,MAAM,KAAK,SAAS,SAAS,CAAC;EAC3E,MAAM,UAAU,MAAM,KAAK,iBAAiB,SAAS;EACrD,IAAI,YAAY,MAAM,MAAM,KAAK,OAAO;EAExC,MAAM,WAAW,MAAM,KAAK,YAAW;EACvC,OAAO,WAAW,GAAG,MAAM,KAAK,GAAG,EAAC,GAAI,aAAa,MAAM,KAAK,GAAG;CACrE;CAQA,MAAM,cAAW;EACf,MAAM,QAAQ,MAAM,KAAK,mBAAmB,wBAAwB,CAAC,CAAA;EACrE,OAAO,QAAQ,MAAM,KAAI,IAAK;CAChC;CASA,MAAM,UAAU,QAA8B;EAC5C,KAAK,MAAM,QAAQ,OAAO;GACxB,MA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AM,IAAI,MACR,GAAG,KAAK,YAAW,gBAAiB,KAAK,UAAU,KAAK,EAAC,yEAC3B;EAIlC,MAAM,OAAO,MAAK;CACpB;CAEQ,gBAAa;EACnB,OAAO,KAAK,WAAW,8BAA8B;CACvD;CAEQ,MAAM,KAAK,KAA2B,MAAY;EACxD,MAAM,QAAQ,MAAM,KAAK,MAAM,GAAG;EAClC,MAAM,MAAM,MAAK;EAEjB,IAAI,MAAM,MAAM,MAAM,SAAS,IAAI;CACrC;CAGQ,MAAM,MAAM,KAAyB;EAC3C,MAAM,SAAS,MAAM,KAAK,cAAc,8BAA8B,CAAC,CAAA;EACvE,MAAM,QAAQ,OAAO,QAAQ,UAAU,IAAI;EAC3C,IAAI,CAAC,OACH,MAAM,IAAI,MAAM,GAAG,KAAK,YAAW,QAAS,IAAG,gCAAiC,OAAO,OAAM,UAAW;EAG1G,OAAO;CACT;CAMQ,MAAM,UAAU,KAAyB;EAC/C,MAAM,SAAS,MAAM,KAAK,WAAU;EACpC,IAAI,OAAO,WAAW,GACpB,MAAM,IAAI,MACR,GAAG,KAAK,YAAW,8FACC;EAIxB,MAAM,QAAQ,OAAO,QAAQ,UAAU,IAAI;EAC3C,IAAI,CAAC,OACH,MAAM,IAAI,MAAM,GAAG,KAAK,YAAW,QAAS,IAAG,sCAAuC,OAAO,OAAM,EAAG;EAGxG,OAAO;CACT"}
1
+ {"version":3,"file":"ngwr-date-picker-testing.mjs","names":[],"sources":["../../../projects/lib/date-picker/testing/wr-time-panel-harness.ts","../../../projects/lib/date-picker/testing/wr-date-picker-harness-base.ts","../../../projects/lib/date-picker/testing/wr-date-picker-harness.ts","../../../projects/lib/date-picker/testing/wr-date-range-picker-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, type TestElement } from '@angular/cdk/testing';\n\nimport type { WrDatePickerTimeFields } from './types';\n\n/** Column order inside the stepper, which is also the order the boxes render in. */\nconst UNITS = ['hours', 'minutes', 'seconds'] as const;\n\n/** One unit of a time stepper. */\ntype Unit = (typeof UNITS)[number];\n\nfunction missingColumn(unit: Unit, method: string): string {\n return `${method}(): this stepper has no ${unit} column — seconds only render with [showSeconds]=\"true\".`;\n}\n\n/**\n * The `<wr-time-picker>` stepper inside a date-picker popup.\n *\n * Deliberately NOT exported from the entry point: the component is `@internal`\n * (`<wr-date-picker mode=\"time\">` is how a consumer gets one), so the picker\n * harnesses re-publish what it can do — `getTime()`, `setTime()`, `stepTime()`,\n * `toggleMeridiem()` — rather than handing out this class. It exists so the\n * range picker, which renders one stepper PER END, can address them\n * independently instead of by CSS nth-of-type gymnastics.\n *\n * Units are addressed by position, not by the boxes' `aria-label`: every string\n * in this panel now resolves through the i18n catalog (`datePicker.hours`,\n * `datePicker.incrementHours`, `datePicker.am` …), so keying on them would make\n * this harness answer in whatever locale the app under test is configured for.\n * Column order is the layout contract.\n *\n * @internal\n */\nexport class WrTimePanelHarness extends ComponentHarness {\n static hostSelector = '.wr-time-picker';\n\n /** The stepper's value as `HH:MM`, plus `:SS` and a space-joined {@link getMeridiem} when those columns exist. */\n async getTimeText(): Promise<string> {\n const parts = [await this.getValue('hours'), await this.getValue('minutes')];\n const seconds = await this.getOptionalValue('seconds');\n if (seconds !== null) parts.push(seconds);\n\n const meridiem = await this.getMeridiem();\n return meridiem ? `${parts.join(':')} ${meridiem}` : parts.join(':');\n }\n\n /**\n * The meridiem column's rendered text, or `null` when the stepper is in\n * 24-hour mode. `'AM'` / `'PM'` on the built-in fallbacks — it reads whatever\n * `datePicker.am` / `datePicker.pm` resolve to, so a configured catalog\n * changes the answer.\n */\n async getMeridiem(): Promise<string | null> {\n const label = await this.locatorForOptional('.wr-time-picker__label')();\n return label ? label.text() : null;\n }\n\n /**\n * Type into the boxes named by `fields`, leaving the rest alone.\n *\n * Each box is cleared and retyped rather than assigned: the panel reads an\n * emptied box as someone mid-retype and deliberately commits nothing for it, so\n * a harness that only cleared would look like a no-op.\n */\n async setFields(fields: WrDatePickerTimeFields): Promise<void> {\n for (const unit of UNITS) {\n const value = fields[unit];\n if (value === undefined) continue;\n\n const box = await this.box(unit, 'setTime');\n await box.clear();\n await box.sendKeys(String(value));\n }\n }\n\n /** Click a unit's ▲ / ▼ button once. Minutes and seconds move by the picker's `step`. */\n async step(unit: Unit, direction: 1 | -1): Promise<void> {\n // The AM/PM column contributes a ▲ and a ▼ of its own, and it is always\n // last — so it cannot be excluded by index alone: with seconds off, the\n // third ▲ in the panel IS the meridiem toggle.\n const suffix = direction === 1 ? 'up' : 'down';\n const buttons = await this.locatorForAll(\n `.wr-time-picker__col:not(.wr-time-picker__col--ampm) .wr-time-picker__step--${suffix}`\n )();\n\n const button = buttons[UNITS.indexOf(unit)];\n if (!button) throw new Error(missingColumn(unit, 'stepTime'));\n\n await button.click();\n }\n\n /** Flip AM ↔ PM. Throws on a 24-hour stepper, which has no such control. */\n async toggleMeridiem(): Promise<void> {\n const button = await this.locatorForOptional('.wr-time-picker__col--ampm .wr-time-picker__step--up')();\n if (!button) {\n throw new Error(\n 'toggleMeridiem(): this stepper has no AM / PM control — it is in 24-hour mode. Pass ' +\n 'timeFormat=\"12h\" (or a locale that resolves to 12-hour time) to get one.'\n );\n }\n\n await button.click();\n }\n\n /** A unit's rendered (zero-padded) value. */\n private async getValue(unit: Unit): Promise<string> {\n return (await this.box(unit, 'getTime')).getProperty<string>('value');\n }\n\n /** Same, but `null` when the column is not rendered at all. */\n private async getOptionalValue(unit: Unit): Promise<string | null> {\n const boxes = await this.boxes();\n const box = boxes[UNITS.indexOf(unit)];\n return box ? box.getProperty<string>('value') : null;\n }\n\n private async box(unit: Unit, method: string): Promise<TestElement> {\n const boxes = await this.boxes();\n const box = boxes[UNITS.indexOf(unit)];\n if (!box) throw new Error(missingColumn(unit, method));\n return box;\n }\n\n /** The typable boxes, in column order — the AM/PM column is a `<span>`, not one of these. */\n private async boxes(): Promise<TestElement[]> {\n return this.locatorForAll('.wr-time-picker__input')();\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, type HarnessLoader, type TestElement } from '@angular/cdk/testing';\n\nimport type { WrDatePickerDayHarnessFilters } from './types';\nimport { WrDatePickerDayHarness } from './wr-date-picker-day-harness';\nimport { WrTimePanelHarness } from './wr-time-panel-harness';\n\n/** The first element whose trimmed text is exactly `text`. */\nasync function byText(elements: TestElement[], text: string): Promise<TestElement | null> {\n for (const element of elements) {\n if ((await element.text()) === text) return element;\n }\n return null;\n}\n\n/**\n * Everything `<wr-date-picker>` and `<wr-date-range-picker>` do identically: the\n * trigger button, the popup it owns, and the `<wr-calendar>` inside it. Both\n * components render the SAME trigger element (`.wr-date-picker__trigger` — the\n * range picker reuses the class rather than minting its own) and both publish\n * their popup's id through the trigger's `aria-controls`, so the scoping story is\n * shared too.\n *\n * **Deliberately not exported, and `WrAnyDatePickerHarness` is what replaces it.**\n * The reason a consumer wanted this name was to write a helper taking \"either\n * picker\", which the union in `types/` says directly and without publishing\n * anything else. Exporting the class instead would publish the `protected` members\n * below as a subclassing contract — including `timePanels()`, which hands back the\n * harness for `<wr-time-panel>`, a component this package does not ship as public\n * API. A type-only re-export is not the middle ground it looks like: the base is a\n * value in two `extends` clauses, so d.ts flattening promotes `export type` back to\n * a value export while the FESM bundle exports nothing — an import that type-checks\n * and is `undefined` at runtime.\n *\n * @internal\n */\nexport abstract class WrDatePickerHarnessBase extends ComponentHarness {\n /** Concrete class name, so errors read like the harness the caller reached for. */\n protected abstract readonly harnessName: string;\n\n /**\n * Whether the popup is up.\n *\n * Read from the trigger's `aria-expanded` rather than from a host class: unlike\n * `wr-select`, neither picker carries an `--open` modifier, and the ARIA state\n * is the thing a consumer's users actually get told.\n */\n async isOpen(): Promise<boolean> {\n return (await (await this.trigger()).getAttribute('aria-expanded')) === 'true';\n }\n\n /** Open the popup from the trigger. An already-open picker is left alone. */\n async open(): Promise<void> {\n if (await this.isOpen()) return;\n\n await (await this.trigger()).click();\n if (await this.isOpen()) return;\n\n throw new Error(\n `${this.harnessName}.open(): the trigger did not open a popup. A disabled picker refuses to open, and so ` +\n 'does a readonly <wr-date-range-picker> — a readonly <wr-date-picker>, deliberately, still opens.'\n );\n }\n\n /**\n * Close the popup by clicking the trigger again. A closed picker is left alone.\n *\n * Deliberately not Escape: the CDK dispatches a keydown to the TOP-MOST overlay,\n * so with two pickers open this would close whichever opened last rather than\n * this one. The trigger only ever toggles its own popup.\n */\n async close(): Promise<void> {\n if (!(await this.isOpen())) return;\n\n await (await this.trigger()).click();\n }\n\n /** The popup's role — `'dialog'`, which is what the trigger's `aria-haspopup` promises. */\n async getPanelRole(): Promise<string | null> {\n return (await this.panel()).getAttribute('role');\n }\n\n /**\n * The popup's accessible name. Defaults to a catalog string chosen by `mode`\n * (\"Choose date\", \"Choose time\", …) and is overridden by `[panelAriaLabel]`.\n */\n async getPanelAriaLabel(): Promise<string | null> {\n return (await this.panel()).getAttribute('aria-label');\n }\n\n /**\n * Which of the calendar's views is showing. The header label zooms out\n * (day, then month, then year); picking a month or a year zooms back in. A period\n * mode opens on the view it picks from, and `quarter` exists only in\n * `mode=\"quarter\"`.\n */\n async getView(): Promise<'day' | 'month' | 'quarter' | 'year'> {\n if (await this.inPanel('[role=\"grid\"]')) return 'day';\n if (await this.inPanel('.wr-calendar__months')) return 'month';\n if (await this.inPanel('.wr-calendar__quarters')) return 'quarter';\n if (await this.inPanel('.wr-calendar__years')) return 'year';\n\n throw new Error(this.noCalendar('getView'));\n }\n\n /**\n * The calendar's header: `'January 2025'` in the day view, `'2025'` in the month\n * view, `'2016 – 2027'` in the year view.\n */\n async getPanelHeader(): Promise<string> {\n const label = await this.inPanel('.wr-calendar__label');\n if (!label) throw new Error(this.noCalendar('getPanelHeader'));\n\n return label.text();\n }\n\n /** The weekday strip, in display order — `role=\"columnheader\"` cells of the grid's first row. */\n async getWeekdayLabels(): Promise<string[]> {\n const cells = await this.allInPanel('[role=\"columnheader\"]');\n if (cells.length === 0) {\n throw new Error(\n `${this.harnessName}.getWeekdayLabels(): no weekday strip. Only the day view has one, and mode=\"time\" ` +\n 'has no calendar at all.'\n );\n }\n\n return Promise.all(cells.map(cell => cell.text()));\n }\n\n /**\n * Step the calendar forwards. What one step MEANS follows the active view, as\n * the button's own `aria-label` says: a month in the day view, a year in the\n * month view, twelve years in the year view.\n */\n async next(): Promise<void> {\n await this.navigate('next');\n }\n\n /** Step the calendar backwards — see {@link next} for what one step covers. */\n async previous(): Promise<void> {\n await this.navigate('prev');\n }\n\n /**\n * Zoom out one level by clicking the header, the way a user does: day → month,\n * month → year. Throws at the year view, where the header is inert.\n */\n async zoomOut(): Promise<void> {\n const label = await this.inPanel('.wr-calendar__label');\n if (!label) throw new Error(this.noCalendar('zoomOut'));\n\n if (await label.getProperty<boolean>('disabled')) {\n throw new Error(\n `${this.harnessName}.zoomOut(): the header is inert — the calendar is already showing the year view ` +\n '(or the whole picker is disabled), and there is nothing further to zoom out to.'\n );\n }\n\n await label.click();\n }\n\n /** Pick a month in the month view, by 0-based index or by the label the calendar renders. */\n async selectMonth(month: number | string): Promise<void> {\n const chips = await this.allInPanel('.wr-calendar__months .wr-calendar__chip');\n if (chips.length === 0) {\n throw new Error(\n `${this.harnessName}.selectMonth(): the calendar is not showing its month view — call zoomOut() first.`\n );\n }\n\n const chip = typeof month === 'number' ? chips[month] : await byText(chips, month);\n if (!chip) {\n throw new Error(\n `${this.harnessName}.selectMonth(${JSON.stringify(month)}): no such month. Pass a 0-based index, or the ` +\n 'label the calendar renders — a short month name in the active locale.'\n );\n }\n\n await chip.click();\n }\n\n /**\n * Pick a quarter, 1 to 4, of the year in the header. `mode=\"quarter\"` only:\n * no other mode has a quarter view.\n */\n async selectQuarter(quarter: 1 | 2 | 3 | 4): Promise<void> {\n const chips = await this.allInPanel('.wr-calendar__quarters .wr-calendar__chip');\n if (chips.length === 0) {\n throw new Error(\n `${this.harnessName}.selectQuarter(): the calendar is not showing its quarter view. Only mode=\"quarter\" ` +\n 'has one, and from its year view selectYear() comes back to it.'\n );\n }\n\n const chip = chips[quarter - 1];\n if (!chip) throw new Error(`${this.harnessName}.selectQuarter(${quarter}): a year has quarters 1 to 4.`);\n if (await chip.getProperty<boolean>('disabled')) {\n throw new Error(\n `${this.harnessName}.selectQuarter(${quarter}): that quarter is disabled: min / max or dateFilter rules ` +\n 'out every day in it.'\n );\n }\n\n await chip.click();\n }\n\n /**\n * Pick the week holding a day of the month on show. `mode=\"week\"` only: the\n * click is a day click, and what makes it a week is the mode, so in any other\n * mode this throws rather than quietly picking a day.\n */\n async selectWeek(dayOfMonth: number): Promise<void> {\n if (!(await this.inPanel('.wr-calendar--week'))) {\n throw new Error(\n `${this.harnessName}.selectWeek(): the calendar does not pick weeks, that is mode=\"week\". selectDay() ` +\n 'picks a day.'\n );\n }\n\n await this.selectDay(dayOfMonth);\n }\n\n /** Pick a year in the year view. Only the twelve on show can be picked. */\n async selectYear(year: number): Promise<void> {\n const chips = await this.allInPanel('.wr-calendar__years .wr-calendar__chip');\n if (chips.length === 0) {\n throw new Error(\n `${this.harnessName}.selectYear(): the calendar is not showing its year view — call zoomOut() until ` +\n 'getView() answers \"year\".'\n );\n }\n\n const chip = await byText(chips, String(year));\n if (!chip) {\n const shown = await Promise.all(chips.map(candidate => candidate.text()));\n throw new Error(\n `${this.harnessName}.selectYear(${year}): the year view is showing ${shown[0]}-${shown[shown.length - 1]} ` +\n '— call previous() / next() to move the twelve-year window first.'\n );\n }\n\n await chip.click();\n }\n\n /**\n * The day cells of the calendar in this picker's popup, in DOM order — 42 of\n * them, since the grid is always six weeks and pads into the neighbouring\n * months.\n */\n async getDays(filters: WrDatePickerDayHarnessFilters = {}): Promise<WrDatePickerDayHarness[]> {\n await this.requireGrid('getDays');\n\n return (await this.panelLoader()).getAllHarnesses(WrDatePickerDayHarness.with(filters));\n }\n\n /**\n * One day of the month on show. The padding days of the neighbouring months are\n * skipped, so `getDay(1)` is the 1st of THIS month and never the 1st of the next.\n */\n async getDay(dayOfMonth: number): Promise<WrDatePickerDayHarness> {\n const cells = await this.getDays({ text: String(dayOfMonth) });\n for (const cell of cells) {\n if (!(await cell.isOutOfMonth())) return cell;\n }\n\n throw new Error(\n `${this.harnessName}.getDay(${dayOfMonth}): the month on show (${await this.getPanelHeader()}) has no such ` +\n 'day. Cells belonging to the neighbouring months are deliberately not matched — call previous() / next() ' +\n 'to change month.'\n );\n }\n\n /** Click a day of the month on show. */\n async selectDay(dayOfMonth: number): Promise<void> {\n const cell = await this.getDay(dayOfMonth);\n if (await cell.isDisabled()) {\n throw new Error(\n `${this.harnessName}.selectDay(${dayOfMonth}): that day is disabled — min / max or dateFilter rules it ` +\n 'out, and a disabled cell swallows the click rather than picking anything.'\n );\n }\n\n await cell.click();\n }\n\n /** The trigger button. Both components render it with the same class. */\n protected async trigger(): Promise<TestElement> {\n return this.locatorFor('.wr-date-picker__trigger')();\n }\n\n /**\n * The id of THIS picker's popup.\n *\n * The trigger publishes it as `aria-controls` only while the popup is up, which\n * makes one lookup answer both questions — is it open, and which of the panes\n * in the shared overlay container is ours.\n */\n protected async panelId(): Promise<string> {\n const id = await (await this.trigger()).getAttribute('aria-controls');\n if (!id) {\n throw new Error(\n `${this.harnessName}: the popup is closed — call open() first. The trigger only publishes aria-controls ` +\n 'while its popup is up.'\n );\n }\n\n return id;\n }\n\n /** A loader scoped to THIS picker's popup, so a second open picker cannot answer for it. */\n protected async panelLoader(): Promise<HarnessLoader> {\n return this.documentRootLocatorFactory().harnessLoaderFor(`#${await this.panelId()}`);\n }\n\n /** One element inside THIS picker's popup, or `null`. */\n protected async inPanel(selector: string): Promise<TestElement | null> {\n return this.documentRootLocatorFactory().locatorForOptional(`#${await this.panelId()} ${selector}`)();\n }\n\n /** Every matching element inside THIS picker's popup, in DOM order. */\n protected async allInPanel(selector: string): Promise<TestElement[]> {\n return this.documentRootLocatorFactory().locatorForAll(`#${await this.panelId()} ${selector}`)();\n }\n\n /**\n * The time steppers in this popup, in DOM order — none in `date` mode, one for\n * `time` / `datetime`, and two (start then end) for a datetime range.\n */\n protected async timePanels(): Promise<WrTimePanelHarness[]> {\n return (await this.panelLoader()).getAllHarnesses(WrTimePanelHarness);\n }\n\n private async navigate(direction: 'prev' | 'next'): Promise<void> {\n const button = await this.inPanel(`.wr-calendar__nav--${direction}`);\n if (!button) throw new Error(this.noCalendar(direction === 'next' ? 'next' : 'previous'));\n\n await button.click();\n }\n\n /** Fail early on the day-cell methods rather than answering with an empty list. */\n private async requireGrid(method: string): Promise<void> {\n if (await this.inPanel('[role=\"grid\"]')) return;\n\n throw new Error(\n `${this.harnessName}.${method}(): this popup has no day grid. mode=\"time\" renders a time stepper only, and a ` +\n 'calendar on its month / quarter / year view offers chips instead of day cells: selectMonth() / ' +\n 'selectYear() come back to the days, except in a period mode, which has none.'\n );\n }\n\n private async panel(): Promise<TestElement> {\n return this.documentRootLocatorFactory().locatorFor(`#${await this.panelId()}`)();\n }\n\n private noCalendar(method: string): string {\n return `${this.harnessName}.${method}(): this popup has no calendar — mode=\"time\" renders a time stepper only.`;\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { HarnessPredicate, type TestElement } from '@angular/cdk/testing';\n\nimport type { WrDatePickerMode } from 'ngwr/date-picker';\n\nimport type { WrDatePickerHarnessFilters, WrDatePickerTimeFields } from './types';\nimport { WrDatePickerHarnessBase } from './wr-date-picker-harness-base';\nimport type { WrTimePanelHarness } from './wr-time-panel-harness';\n\n/**\n * Test harness for `<wr-date-picker>` — the `date`, `time` and `datetime` modes\n * of the one component, and its period modes: `selectMonth()`, `selectYear()`,\n * `selectQuarter()` and `selectWeek()` are the pick where the mode makes them one.\n *\n * The popup is NOT inside the picker: it is a pane in the overlay container, a\n * sibling of the whole app. Everything inside it is therefore reached through the\n * document root, scoped by the id the trigger publishes as `aria-controls` —\n * which is what keeps two pickers on one page from reading each other's calendar.\n *\n * The value lives in a text field, so there are two ways in and the harness\n * offers both: {@link setValueText} types a date, {@link selectDay} picks one out\n * of the grid. There is deliberately no clear BUTTON on this component — an\n * emptied field is what clears the value, and that is what {@link clear} does.\n *\n * @example\n * ```ts\n * const picker = await loader.getHarness(WrDatePickerHarness);\n *\n * await picker.open();\n * expect(await picker.getPanelHeader()).toBe('January 2025');\n * await picker.selectDay(14);\n *\n * expect(await picker.getValueText()).toBe('14.01.2025');\n * expect(await (await picker.getDay(14)).isSelected()).toBe(true);\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrDatePickerHarness extends WrDatePickerHarnessBase {\n static hostSelector = 'wr-date-picker';\n\n /** Build a predicate that narrows the query. */\n static with(options: WrDatePickerHarnessFilters = {}): HarnessPredicate<WrDatePickerHarness> {\n return new HarnessPredicate(WrDatePickerHarness, options)\n .addOption('text', options.text, (harness, text) => HarnessPredicate.stringMatches(harness.getValueText(), text))\n .addOption('placeholder', options.placeholder, (harness, placeholder) =>\n HarnessPredicate.stringMatches(harness.getPlaceholder(), placeholder)\n )\n .addOption('mode', options.mode, async (harness, mode) => (await harness.getMode()) === mode)\n .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled)\n .addOption('open', options.open, async (harness, open) => (await harness.isOpen()) === open);\n }\n\n protected readonly harnessName = 'WrDatePickerHarness';\n\n /** Which mode the picker is in, read from the `wr-date-picker--*` modifier. */\n async getMode(): Promise<WrDatePickerMode> {\n const host = await this.host();\n for (const mode of ['time', 'datetime', 'week', 'month', 'quarter', 'year'] as const) {\n if (await host.hasClass(`wr-date-picker--${mode}`)) return mode;\n }\n return 'date';\n }\n\n /**\n * What the field is showing: the value in the picker's `format`, or `''` when it\n * is empty and the placeholder is up.\n */\n async getValueText(): Promise<string> {\n return (await this.field()).getProperty<string>('value');\n }\n\n /** The field's placeholder. */\n async getPlaceholder(): Promise<string> {\n return (await this.field()).getProperty<string>('placeholder');\n }\n\n /**\n * Type a date into the field, replacing whatever is there.\n *\n * The field is cleared first, so the value passes through `null` on the way —\n * exactly as it does for a user who selects all and types over it. The picker\n * parses on every keystroke and commits only when the text parses in full, so a\n * partial or out-of-bounds entry leaves the model on its last good value.\n */\n async setValueText(text: string): Promise<void> {\n const field = await this.field();\n await field.clear();\n // `sendKeys()` with an empty string throws — clearing was the whole request.\n if (text) await field.sendKeys(text);\n }\n\n /**\n * Empty the field, which clears the value.\n *\n * Not a click on the `×`: that button exists only on a `clearable` picker, and an\n * empty field gets back to `null` on every one.\n */\n async clear(): Promise<void> {\n await (await this.field()).clear();\n }\n\n /** Whether the picker refuses interaction. */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).hasClass('wr-date-picker--disabled');\n }\n\n /**\n * Whether the field refuses typing. A read-only picker still OPENS its popup —\n * documented behaviour, and the one place it parts company with the range picker.\n */\n async isReadonly(): Promise<boolean> {\n return (await this.field()).getProperty<boolean>('readOnly');\n }\n\n /** Move focus to the field. */\n async focus(): Promise<void> {\n return (await this.field()).focus();\n }\n\n /**\n * Blur the field, which is what reformats a value to canonical and emits `touch`\n * so a bound `[formField]` can mark itself touched.\n */\n async blur(): Promise<void> {\n return (await this.field()).blur();\n }\n\n /** Whether the field currently has focus. */\n async isFocused(): Promise<boolean> {\n return (await this.field()).isFocused();\n }\n\n /**\n * The open time stepper's value as `HH:MM`, plus `:SS` when `showSeconds` is on\n * and ` AM`/` PM` in 12-hour mode.\n */\n async getTime(): Promise<string> {\n return (await this.timePanel()).getTimeText();\n }\n\n /** Type into the open time stepper's boxes. Omitted fields are left alone. */\n async setTime(fields: WrDatePickerTimeFields): Promise<void> {\n await (await this.timePanel()).setFields(fields);\n }\n\n /** Click one of the stepper's ▲ / ▼ buttons. Minutes and seconds move by `step`. */\n async stepTime(unit: 'hours' | 'minutes' | 'seconds', direction: 1 | -1): Promise<void> {\n await (await this.timePanel()).step(unit, direction);\n }\n\n /** Flip the stepper between AM and PM. Throws in 24-hour mode, which has no such control. */\n async toggleMeridiem(): Promise<void> {\n await (await this.timePanel()).toggleMeridiem();\n }\n\n private async field(): Promise<TestElement> {\n return this.locatorFor('input[wrInput]')();\n }\n\n /** The one stepper in the popup — `panelId()` has already refused a closed picker. */\n private async timePanel(): Promise<WrTimePanelHarness> {\n const [panel] = await this.timePanels();\n if (!panel) {\n throw new Error(\n `${this.harnessName}: this popup has no time stepper — mode=\"date\" renders a calendar only. Use mode=\"time\" ` +\n 'or mode=\"datetime\".'\n );\n }\n\n return panel;\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { HarnessPredicate, type TestElement } from '@angular/cdk/testing';\n\nimport type { WrDateRangePickerMode } from 'ngwr/date-picker';\n\nimport type { WrDatePickerTimeFields, WrDateRangePickerEnd, WrDateRangePickerHarnessFilters } from './types';\nimport { WrDatePickerHarnessBase } from './wr-date-picker-harness-base';\nimport type { WrTimePanelHarness } from './wr-time-panel-harness';\n\n/**\n * Test harness for `<wr-date-range-picker>` — two text fields over one range\n * calendar.\n *\n * A separate harness rather than a mode of {@link WrDatePickerHarness}, because\n * the DOM a spec has to reach is genuinely different: two fields with a separator\n * between them, and in `datetime` mode two time steppers instead of one. Every\n * call that could mean either field takes an explicit `'start'` / `'end'` — the\n * component's own bugs were nearly all \"which end did that belong to\", and a\n * harness that guessed would reproduce them.\n *\n * The popup, the calendar and the scoping work exactly as they do for the single\n * picker: a pane in the overlay container, addressed by the id the trigger\n * publishes as `aria-controls`.\n *\n * @example\n * ```ts\n * const period = await loader.getHarness(WrDateRangePickerHarness);\n *\n * await period.open();\n * await period.selectDay(14);\n * await period.selectDay(20);\n *\n * expect([await period.getStartText(), await period.getEndText()]).toEqual(['14.01.2025', '20.01.2025']);\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrDateRangePickerHarness extends WrDatePickerHarnessBase {\n static hostSelector = 'wr-date-range-picker';\n\n /** Build a predicate that narrows the query. */\n static with(options: WrDateRangePickerHarnessFilters = {}): HarnessPredicate<WrDateRangePickerHarness> {\n return new HarnessPredicate(WrDateRangePickerHarness, options)\n .addOption('startText', options.startText, (harness, text) =>\n HarnessPredicate.stringMatches(harness.getStartText(), text)\n )\n .addOption('endText', options.endText, (harness, text) =>\n HarnessPredicate.stringMatches(harness.getEndText(), text)\n )\n .addOption('mode', options.mode, async (harness, mode) => (await harness.getMode()) === mode)\n .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled)\n .addOption('open', options.open, async (harness, open) => (await harness.isOpen()) === open);\n }\n\n protected readonly harnessName = 'WrDateRangePickerHarness';\n\n /** Which mode the picker is in, read from the `wr-date-range-picker--*` modifier. */\n async getMode(): Promise<WrDateRangePickerMode> {\n const host = await this.host();\n for (const mode of ['datetime', 'month', 'quarter', 'year'] as const) {\n if (await host.hasClass(`wr-date-range-picker--${mode}`)) return mode;\n }\n return 'date';\n }\n\n /** What the start field is showing — `''` while that end is unpicked. */\n async getStartText(): Promise<string> {\n return (await this.field('start')).getProperty<string>('value');\n }\n\n /** What the end field is showing — `''` while that end is unpicked. */\n async getEndText(): Promise<string> {\n return (await this.field('end')).getProperty<string>('value');\n }\n\n /** The glyph rendered between the two fields (`[separator]`, `'–'` by default). */\n async getSeparator(): Promise<string> {\n return (await this.locatorFor('.wr-date-range-picker__separator')()).text();\n }\n\n /** The placeholder of one field. */\n async getPlaceholder(end: WrDateRangePickerEnd): Promise<string> {\n return (await this.field(end)).getProperty<string>('placeholder');\n }\n\n /**\n * Type a date into the start field, replacing whatever is there.\n *\n * Ends typed out of order are NOT swapped here — the component settles the\n * ordering when the interaction is over, so call {@link blur} (or close the\n * popup) to see a normalised range.\n */\n async setStartText(text: string): Promise<void> {\n await this.type('start', text);\n }\n\n /** Type a date into the end field — see {@link setStartText} on ordering. */\n async setEndText(text: string): Promise<void> {\n await this.type('end', text);\n }\n\n /** Empty both fields, which clears the range, with or without the `clearable` button. */\n async clear(): Promise<void> {\n await (await this.field('start')).clear();\n await (await this.field('end')).clear();\n }\n\n /** Whether the picker refuses interaction. */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).hasClass('wr-date-range-picker--disabled');\n }\n\n /**\n * Whether the fields refuse typing. Stricter than `<wr-date-picker>`: a\n * read-only range picker also refuses to open, since two fields over one\n * calendar leaves no reading of \"untypeable\" that still lets the grid rewrite\n * both ends.\n */\n async isReadonly(): Promise<boolean> {\n return (await this.field('start')).getProperty<boolean>('readOnly');\n }\n\n /** Move focus to one field. */\n async focus(end: WrDateRangePickerEnd): Promise<void> {\n return (await this.field(end)).focus();\n }\n\n /**\n * Blur one field. This is the moment an out-of-order range is put back in\n * order, and — when focus leaves the control rather than hopping to the other\n * end — the moment `touch` is emitted.\n */\n async blur(end: WrDateRangePickerEnd): Promise<void> {\n return (await this.field(end)).blur();\n }\n\n /** Whether one field currently has focus. */\n async isFocused(end: WrDateRangePickerEnd): Promise<boolean> {\n return (await this.field(end)).isFocused();\n }\n\n /**\n * One end's time stepper as `HH:MM`, plus `:SS` when `showSeconds` is on and\n * ` AM`/` PM` in 12-hour mode. `datetime` mode only.\n */\n async getTime(end: WrDateRangePickerEnd): Promise<string> {\n return (await this.timePanel(end)).getTimeText();\n }\n\n /** Type into one end's time stepper. Omitted fields are left alone. */\n async setTime(end: WrDateRangePickerEnd, fields: WrDatePickerTimeFields): Promise<void> {\n await (await this.timePanel(end)).setFields(fields);\n }\n\n /** Click one of an end's ▲ / ▼ buttons. Minutes and seconds move by `step`. */\n async stepTime(end: WrDateRangePickerEnd, unit: 'hours' | 'minutes' | 'seconds', direction: 1 | -1): Promise<void> {\n await (await this.timePanel(end)).step(unit, direction);\n }\n\n /** Flip one end between AM and PM. Throws in 24-hour mode, which has no such control. */\n async toggleMeridiem(end: WrDateRangePickerEnd): Promise<void> {\n await (await this.timePanel(end)).toggleMeridiem();\n }\n\n /**\n * The labels of the `[presets]` in the open popup, in the order they render —\n * empty when the picker has none.\n */\n async getPresets(): Promise<string[]> {\n return Promise.all((await this.presetButtons()).map(button => button.text()));\n }\n\n /**\n * The label of the preset marked `aria-pressed` — the one whose range equals\n * the value — or `null` when the value matches none.\n */\n async getActivePreset(): Promise<string | null> {\n for (const button of await this.presetButtons()) {\n if ((await button.getAttribute('aria-pressed')) === 'true') return button.text();\n }\n return null;\n }\n\n /**\n * Click a preset by its label. That commits the range and closes the popup.\n * Throws for a label the popup does not show, and for a preset the picker\n * disabled because it reaches outside `minDate` / `maxDate`.\n */\n async selectPreset(label: string): Promise<void> {\n const buttons = await this.presetButtons();\n const labels = await Promise.all(buttons.map(button => button.text()));\n const button = buttons[labels.indexOf(label)];\n if (!button) {\n throw new Error(\n `${this.harnessName}.selectPreset(${JSON.stringify(label)}): no such preset. The popup shows ` +\n `${labels.length ? labels.map(shown => JSON.stringify(shown)).join(', ') : 'none'}.`\n );\n }\n if (await button.getProperty<boolean>('disabled')) {\n throw new Error(\n `${this.harnessName}.selectPreset(${JSON.stringify(label)}): the preset is disabled — its range reaches ` +\n 'outside minDate / maxDate.'\n );\n }\n\n await button.click();\n }\n\n private presetButtons(): Promise<TestElement[]> {\n return this.allInPanel('.wr-date-range-presets__item');\n }\n\n private async type(end: WrDateRangePickerEnd, text: string): Promise<void> {\n const field = await this.field(end);\n await field.clear();\n // `sendKeys()` with an empty string throws — clearing was the whole request.\n if (text) await field.sendKeys(text);\n }\n\n /** The two fields are addressed by position, which is the order they render in. */\n private async field(end: WrDateRangePickerEnd): Promise<TestElement> {\n const fields = await this.locatorForAll('.wr-date-range-picker__input')();\n const field = fields[end === 'start' ? 0 : 1];\n if (!field) {\n throw new Error(`${this.harnessName}: no \"${end}\" field — the picker rendered ${fields.length} of them.`);\n }\n\n return field;\n }\n\n /**\n * One end's stepper. Both are mounted together in `datetime` mode, start first —\n * the group labels are localized, so position is the addressable thing.\n */\n private async timePanel(end: WrDateRangePickerEnd): Promise<WrTimePanelHarness> {\n const panels = await this.timePanels();\n if (panels.length === 0) {\n throw new Error(\n `${this.harnessName}: this popup has no time steppers — mode=\"date\" renders a calendar only. Use ` +\n 'mode=\"datetime\".'\n );\n }\n\n const panel = panels[end === 'start' ? 0 : 1];\n if (!panel) {\n throw new Error(`${this.harnessName}: no \"${end}\" time stepper — the popup rendered ${panels.length}.`);\n }\n\n return panel;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAYA,MAAM,QAAQ;CAAC;CAAS;CAAW;AAAS;AAK5C,SAAS,cAAc,MAAY,QAAc;CAC/C,OAAO,GAAG,OAAM,0BAA2B,KAAI;AACjD;AAoBA,IAAa,qBAAb,cAAwC,iBAAgB;CACtD,OAAO,eAAe;CAGtB,MAAM,cAAW;EACf,MAAM,QAAQ,CAAC,MAAM,KAAK,SAAS,OAAO,GAAG,MAAM,KAAK,SAAS,SAAS,CAAC;EAC3E,MAAM,UAAU,MAAM,KAAK,iBAAiB,SAAS;EACrD,IAAI,YAAY,MAAM,MAAM,KAAK,OAAO;EAExC,MAAM,WAAW,MAAM,KAAK,YAAW;EACvC,OAAO,WAAW,GAAG,MAAM,KAAK,GAAG,EAAC,GAAI,aAAa,MAAM,KAAK,GAAG;CACrE;CAQA,MAAM,cAAW;EACf,MAAM,QAAQ,MAAM,KAAK,mBAAmB,wBAAwB,CAAC,CAAA;EACrE,OAAO,QAAQ,MAAM,KAAI,IAAK;CAChC;CASA,MAAM,UAAU,QAA8B;EAC5C,KAAK,MAAM,QAAQ,OAAO;GACxB,MAAM,QAAQ,OAAO;GACrB,IAAI,UAAU,QAAW;GAEzB,MAAM,MAAM,MAAM,KAAK,IAAI,MAAM,SAAS;GAC1C,MAAM,IAAI,MAAK;GACf,MAAM,IAAI,SAAS,OAAO,KAAK,CAAC;EAClC;CACF;CAGA,MAAM,KAAK,MAAY,WAAiB;EAItC,MAAM,SAAS,cAAc,IAAI,OAAO;EAKxC,MAAM,UAAS,MAJO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AEjB,IAAI,MAAM,MAAM,MAAM,SAAS,IAAI;CACrC;CAGQ,MAAM,MAAM,KAAyB;EAC3C,MAAM,SAAS,MAAM,KAAK,cAAc,8BAA8B,CAAC,CAAA;EACvE,MAAM,QAAQ,OAAO,QAAQ,UAAU,IAAI;EAC3C,IAAI,CAAC,OACH,MAAM,IAAI,MAAM,GAAG,KAAK,YAAW,QAAS,IAAG,gCAAiC,OAAO,OAAM,UAAW;EAG1G,OAAO;CACT;CAMQ,MAAM,UAAU,KAAyB;EAC/C,MAAM,SAAS,MAAM,KAAK,WAAU;EACpC,IAAI,OAAO,WAAW,GACpB,MAAM,IAAI,MACR,GAAG,KAAK,YAAW,8FACC;EAIxB,MAAM,QAAQ,OAAO,QAAQ,UAAU,IAAI;EAC3C,IAAI,CAAC,OACH,MAAM,IAAI,MAAM,GAAG,KAAK,YAAW,QAAS,IAAG,sCAAuC,OAAO,OAAM,EAAG;EAGxG,OAAO;CACT"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from "@angular/core";
2
- import { Component, DestroyRef, Directive, ElementRef, EnvironmentInjector, Injectable, Injector, ViewEncapsulation, afterNextRender, computed, effect, inject, input, model, output, signal, untracked, viewChild } from "@angular/core";
2
+ import { Component, DestroyRef, Directive, ElementRef, EnvironmentInjector, Injectable, Injector, ViewEncapsulation, afterNextRender, afterRenderEffect, computed, effect, inject, input, model, output, signal, untracked, viewChild } from "@angular/core";
3
3
  import { coerceBooleanProperty, coerceNumberProperty } from "@angular/cdk/coercion";
4
4
  import { wrCheckStyles, wrClamp, wrGetFocusableElements, wrToClassList } from "ngwr/utils";
5
5
  import { useI18nFormatter, useI18nText, wrReadI18nText } from "ngwr/i18n";
@@ -804,6 +804,7 @@ var WrDateInputField = class WrDateInputField {
804
804
  adoptControlId: (id) => outer.adoptControlId(id),
805
805
  labelId: outer.labelId,
806
806
  hintId: outer.hintId,
807
+ required: outer.required,
807
808
  errorKeys: computed(() => {
808
809
  const keys = outer.errorKeys();
809
810
  const own = this.described();
@@ -1028,6 +1029,10 @@ var WrDatePicker = class WrDatePicker {
1028
1029
  transform: (v) => Math.max(1, coerceNumberProperty(v, 1))
1029
1030
  });
1030
1031
  size = input("md", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
1032
+ block = input(false, {
1033
+ ...ngDevMode ? { debugName: "block" } : /* istanbul ignore next */ {},
1034
+ transform: coerceBooleanProperty
1035
+ });
1031
1036
  rounded = input(false, {
1032
1037
  ...ngDevMode ? { debugName: "rounded" } : /* istanbul ignore next */ {},
1033
1038
  transform: coerceBooleanProperty
@@ -1102,6 +1107,10 @@ var WrDatePicker = class WrDatePicker {
1102
1107
  return this.labelDate();
1103
1108
  }, ...ngDevMode ? [{ debugName: "triggerLabel" }] : /* istanbul ignore next */ []);
1104
1109
  panelAriaLabel = input(null, ...ngDevMode ? [{ debugName: "panelAriaLabel" }] : /* istanbul ignore next */ []);
1110
+ autoFocus = input(false, {
1111
+ ...ngDevMode ? { debugName: "autoFocus" } : /* istanbul ignore next */ {},
1112
+ transform: coerceBooleanProperty
1113
+ });
1105
1114
  panelClass = input(null, ...ngDevMode ? [{ debugName: "panelClass" }] : /* istanbul ignore next */ []);
1106
1115
  panelId = `wr-date-picker-panel-${++panelUid}`;
1107
1116
  resolvedPanelLabel = computed(() => {
@@ -1142,6 +1151,7 @@ var WrDatePicker = class WrDatePicker {
1142
1151
  const size = this.size();
1143
1152
  if (size !== "md") parts.push(`wr-date-picker--${size}`);
1144
1153
  if (this.rounded()) parts.push("wr-date-picker--rounded");
1154
+ if (this.block()) parts.push("wr-date-picker--block");
1145
1155
  if (this.disabled()) parts.push("wr-date-picker--disabled");
1146
1156
  if (this.inputError()) parts.push("wr-date-picker--invalid");
1147
1157
  return parts.join(" ");
@@ -1307,10 +1317,10 @@ var WrDatePicker = class WrDatePicker {
1307
1317
  if (this.disabled() || this.overlayRef) return;
1308
1318
  this.openOverlay(this.inputEl().nativeElement, false);
1309
1319
  }
1310
- toggleOverlay() {
1320
+ toggleOverlay(event) {
1311
1321
  if (this.disabled()) return;
1312
1322
  if (this.overlayRef) this.closeOverlay();
1313
- else this.openOverlay(this.triggerEl()?.nativeElement ?? null, true);
1323
+ else this.openOverlay(this.triggerEl()?.nativeElement ?? null, event.detail === 0 || this.autoFocus());
1314
1324
  }
1315
1325
  onFieldKey(event) {
1316
1326
  if (this.disabled()) return;
@@ -1329,6 +1339,11 @@ var WrDatePicker = class WrDatePicker {
1329
1339
  this.focusPanel();
1330
1340
  }
1331
1341
  }
1342
+ onTriggerArrow(event) {
1343
+ if (!this.overlayRef) return;
1344
+ event.preventDefault();
1345
+ this.focusPanel();
1346
+ }
1332
1347
  focusPanel() {
1333
1348
  const pane = this.overlayRef?.overlayElement;
1334
1349
  (pane?.querySelector(".wr-calendar__day--focused:not([disabled])") ?? pane?.querySelector(".wr-calendar__chip[tabindex=\"0\"]") ?? pane?.querySelector(".wr-time-picker__input"))?.focus();
@@ -1597,6 +1612,13 @@ var WrDatePicker = class WrDatePicker {
1597
1612
  isRequired: false,
1598
1613
  transformFunction: null
1599
1614
  },
1615
+ block: {
1616
+ classPropertyName: "block",
1617
+ publicName: "block",
1618
+ isSignal: true,
1619
+ isRequired: false,
1620
+ transformFunction: null
1621
+ },
1600
1622
  rounded: {
1601
1623
  classPropertyName: "rounded",
1602
1624
  publicName: "rounded",
@@ -1653,6 +1675,13 @@ var WrDatePicker = class WrDatePicker {
1653
1675
  isRequired: false,
1654
1676
  transformFunction: null
1655
1677
  },
1678
+ autoFocus: {
1679
+ classPropertyName: "autoFocus",
1680
+ publicName: "autoFocus",
1681
+ isSignal: true,
1682
+ isRequired: false,
1683
+ transformFunction: null
1684
+ },
1656
1685
  panelClass: {
1657
1686
  classPropertyName: "panelClass",
1658
1687
  publicName: "panelClass",
@@ -1686,7 +1715,7 @@ var WrDatePicker = class WrDatePicker {
1686
1715
  isSignal: true
1687
1716
  }],
1688
1717
  ngImport: i0,
1689
- template: "<wr-input-group [rounded]=\"rounded()\">\n <!--\n A plain textbox, per the APG date-picker-dialog pattern: `aria-haspopup` and\n `aria-expanded` are not permitted on `textbox` and belong to the trigger\n button below, which is the thing that opens the dialog.\n -->\n <input\n #input\n wrInput\n type=\"text\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [attr.aria-label]=\"nameLabel()\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"ownAriaInvalid()\"\n [attr.aria-describedby]=\"ownDescribedBy()\"\n [value]=\"text()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n (click)=\"openOnInput()\"\n (keydown)=\"onFieldKey($event)\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur($event)\"\n />\n <!-- Pointer-only, as the select's is: emptying the field is the keyboard way to clear. -->\n @if (clearable() && hasValue() && !disabled() && !readonly()) {\n <span\n class=\"wr-date-picker__clear\"\n role=\"button\"\n [attr.aria-label]=\"resolvedClear()\"\n tabindex=\"-1\"\n (click)=\"clear($event)\"\n >\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </span>\n }\n <button\n #trigger\n type=\"button\"\n wrInputSuffix\n class=\"wr-date-picker__trigger\"\n [attr.aria-label]=\"triggerLabel()\"\n [attr.aria-haspopup]=\"'dialog'\"\n [attr.aria-expanded]=\"overlayOpen()\"\n [attr.aria-controls]=\"overlayOpen() ? panelId : null\"\n [disabled]=\"disabled()\"\n (click)=\"toggleOverlay()\"\n >\n @if (isTime()) {\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" aria-hidden=\"true\">\n <circle cx=\"7\" cy=\"7\" r=\"5.75\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n <line x1=\"7\" y1=\"7\" x2=\"7\" y2=\"3.75\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n <line x1=\"7\" y1=\"7\" x2=\"9.5\" y2=\"7\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n </svg>\n } @else {\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" aria-hidden=\"true\">\n <rect x=\"1.5\" y=\"2.5\" width=\"11\" height=\"10\" rx=\"1.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n <line x1=\"1.5\" y1=\"5.5\" x2=\"12.5\" y2=\"5.5\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n <line x1=\"4\" y1=\"1\" x2=\"4\" y2=\"4\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n <line x1=\"10\" y1=\"1\" x2=\"10\" y2=\"4\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n @if (isDateTime()) {\n <circle cx=\"7\" cy=\"9\" r=\"1.5\" fill=\"currentColor\" />\n }\n </svg>\n }\n </button>\n</wr-input-group>\n<!--\n Why a typed entry was refused, for a screen reader: written when the refusal is\n shown (Enter, or leaving the field) and emptied when the text is corrected. Silent\n inside a <wr-form-field> bound to the same control, whose message says it instead,\n and silent when the app's catalog has no `validation.*` sentence for the refusal.\n-->\n<span class=\"wr-date-picker__sr-only\" role=\"status\" [id]=\"statusId\">{{ announcement() }}</span>\n",
1718
+ template: "<wr-input-group [rounded]=\"rounded()\">\n <!--\n A plain textbox, per the APG date-picker-dialog pattern: `aria-haspopup` and\n `aria-expanded` are not permitted on `textbox` and belong to the trigger\n button below, which is the thing that opens the dialog.\n -->\n <input\n #input\n wrInput\n type=\"text\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [attr.aria-label]=\"nameLabel()\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"ownAriaInvalid()\"\n [attr.aria-describedby]=\"ownDescribedBy()\"\n [value]=\"text()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n (click)=\"openOnInput()\"\n (keydown)=\"onFieldKey($event)\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur($event)\"\n />\n <!-- Pointer-only, as the select's is: emptying the field is the keyboard way to clear. -->\n @if (clearable() && hasValue() && !disabled() && !readonly()) {\n <span\n class=\"wr-date-picker__clear\"\n role=\"button\"\n [attr.aria-label]=\"resolvedClear()\"\n tabindex=\"-1\"\n (click)=\"clear($event)\"\n >\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </span>\n }\n <button\n #trigger\n type=\"button\"\n wrInputSuffix\n class=\"wr-date-picker__trigger\"\n [attr.aria-label]=\"triggerLabel()\"\n [attr.aria-haspopup]=\"'dialog'\"\n [attr.aria-expanded]=\"overlayOpen()\"\n [attr.aria-controls]=\"overlayOpen() ? panelId : null\"\n [disabled]=\"disabled()\"\n (click)=\"toggleOverlay($event)\"\n (keydown.arrowDown)=\"onTriggerArrow($event)\"\n >\n @if (isTime()) {\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" aria-hidden=\"true\">\n <circle cx=\"7\" cy=\"7\" r=\"5.75\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n <line x1=\"7\" y1=\"7\" x2=\"7\" y2=\"3.75\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n <line x1=\"7\" y1=\"7\" x2=\"9.5\" y2=\"7\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n </svg>\n } @else {\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" aria-hidden=\"true\">\n <rect x=\"1.5\" y=\"2.5\" width=\"11\" height=\"10\" rx=\"1.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n <line x1=\"1.5\" y1=\"5.5\" x2=\"12.5\" y2=\"5.5\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n <line x1=\"4\" y1=\"1\" x2=\"4\" y2=\"4\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n <line x1=\"10\" y1=\"1\" x2=\"10\" y2=\"4\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n @if (isDateTime()) {\n <circle cx=\"7\" cy=\"9\" r=\"1.5\" fill=\"currentColor\" />\n }\n </svg>\n }\n </button>\n</wr-input-group>\n<!--\n Why a typed entry was refused, for a screen reader: written when the refusal is\n shown (Enter, or leaving the field) and emptied when the text is corrected. Silent\n inside a <wr-form-field> bound to the same control, whose message says it instead,\n and silent when the app's catalog has no `validation.*` sentence for the refusal.\n-->\n<span class=\"wr-date-picker__sr-only\" role=\"status\" [id]=\"statusId\">{{ announcement() }}</span>\n",
1690
1719
  dependencies: [
1691
1720
  {
1692
1721
  kind: "directive",
@@ -1737,7 +1766,7 @@ i0.ɵɵngDeclareClassMetadata({
1737
1766
  ],
1738
1767
  providers: [WrDateInputField],
1739
1768
  viewProviders: [WR_DATE_INPUT_FIELD_VIEW_PROVIDER],
1740
- template: "<wr-input-group [rounded]=\"rounded()\">\n <!--\n A plain textbox, per the APG date-picker-dialog pattern: `aria-haspopup` and\n `aria-expanded` are not permitted on `textbox` and belong to the trigger\n button below, which is the thing that opens the dialog.\n -->\n <input\n #input\n wrInput\n type=\"text\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [attr.aria-label]=\"nameLabel()\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"ownAriaInvalid()\"\n [attr.aria-describedby]=\"ownDescribedBy()\"\n [value]=\"text()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n (click)=\"openOnInput()\"\n (keydown)=\"onFieldKey($event)\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur($event)\"\n />\n <!-- Pointer-only, as the select's is: emptying the field is the keyboard way to clear. -->\n @if (clearable() && hasValue() && !disabled() && !readonly()) {\n <span\n class=\"wr-date-picker__clear\"\n role=\"button\"\n [attr.aria-label]=\"resolvedClear()\"\n tabindex=\"-1\"\n (click)=\"clear($event)\"\n >\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </span>\n }\n <button\n #trigger\n type=\"button\"\n wrInputSuffix\n class=\"wr-date-picker__trigger\"\n [attr.aria-label]=\"triggerLabel()\"\n [attr.aria-haspopup]=\"'dialog'\"\n [attr.aria-expanded]=\"overlayOpen()\"\n [attr.aria-controls]=\"overlayOpen() ? panelId : null\"\n [disabled]=\"disabled()\"\n (click)=\"toggleOverlay()\"\n >\n @if (isTime()) {\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" aria-hidden=\"true\">\n <circle cx=\"7\" cy=\"7\" r=\"5.75\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n <line x1=\"7\" y1=\"7\" x2=\"7\" y2=\"3.75\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n <line x1=\"7\" y1=\"7\" x2=\"9.5\" y2=\"7\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n </svg>\n } @else {\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" aria-hidden=\"true\">\n <rect x=\"1.5\" y=\"2.5\" width=\"11\" height=\"10\" rx=\"1.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n <line x1=\"1.5\" y1=\"5.5\" x2=\"12.5\" y2=\"5.5\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n <line x1=\"4\" y1=\"1\" x2=\"4\" y2=\"4\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n <line x1=\"10\" y1=\"1\" x2=\"10\" y2=\"4\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n @if (isDateTime()) {\n <circle cx=\"7\" cy=\"9\" r=\"1.5\" fill=\"currentColor\" />\n }\n </svg>\n }\n </button>\n</wr-input-group>\n<!--\n Why a typed entry was refused, for a screen reader: written when the refusal is\n shown (Enter, or leaving the field) and emptied when the text is corrected. Silent\n inside a <wr-form-field> bound to the same control, whose message says it instead,\n and silent when the app's catalog has no `validation.*` sentence for the refusal.\n-->\n<span class=\"wr-date-picker__sr-only\" role=\"status\" [id]=\"statusId\">{{ announcement() }}</span>\n"
1769
+ template: "<wr-input-group [rounded]=\"rounded()\">\n <!--\n A plain textbox, per the APG date-picker-dialog pattern: `aria-haspopup` and\n `aria-expanded` are not permitted on `textbox` and belong to the trigger\n button below, which is the thing that opens the dialog.\n -->\n <input\n #input\n wrInput\n type=\"text\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [attr.aria-label]=\"nameLabel()\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"ownAriaInvalid()\"\n [attr.aria-describedby]=\"ownDescribedBy()\"\n [value]=\"text()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n (click)=\"openOnInput()\"\n (keydown)=\"onFieldKey($event)\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur($event)\"\n />\n <!-- Pointer-only, as the select's is: emptying the field is the keyboard way to clear. -->\n @if (clearable() && hasValue() && !disabled() && !readonly()) {\n <span\n class=\"wr-date-picker__clear\"\n role=\"button\"\n [attr.aria-label]=\"resolvedClear()\"\n tabindex=\"-1\"\n (click)=\"clear($event)\"\n >\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </span>\n }\n <button\n #trigger\n type=\"button\"\n wrInputSuffix\n class=\"wr-date-picker__trigger\"\n [attr.aria-label]=\"triggerLabel()\"\n [attr.aria-haspopup]=\"'dialog'\"\n [attr.aria-expanded]=\"overlayOpen()\"\n [attr.aria-controls]=\"overlayOpen() ? panelId : null\"\n [disabled]=\"disabled()\"\n (click)=\"toggleOverlay($event)\"\n (keydown.arrowDown)=\"onTriggerArrow($event)\"\n >\n @if (isTime()) {\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" aria-hidden=\"true\">\n <circle cx=\"7\" cy=\"7\" r=\"5.75\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n <line x1=\"7\" y1=\"7\" x2=\"7\" y2=\"3.75\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n <line x1=\"7\" y1=\"7\" x2=\"9.5\" y2=\"7\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n </svg>\n } @else {\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" aria-hidden=\"true\">\n <rect x=\"1.5\" y=\"2.5\" width=\"11\" height=\"10\" rx=\"1.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n <line x1=\"1.5\" y1=\"5.5\" x2=\"12.5\" y2=\"5.5\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n <line x1=\"4\" y1=\"1\" x2=\"4\" y2=\"4\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n <line x1=\"10\" y1=\"1\" x2=\"10\" y2=\"4\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n @if (isDateTime()) {\n <circle cx=\"7\" cy=\"9\" r=\"1.5\" fill=\"currentColor\" />\n }\n </svg>\n }\n </button>\n</wr-input-group>\n<!--\n Why a typed entry was refused, for a screen reader: written when the refusal is\n shown (Enter, or leaving the field) and emptied when the text is corrected. Silent\n inside a <wr-form-field> bound to the same control, whose message says it instead,\n and silent when the app's catalog has no `validation.*` sentence for the refusal.\n-->\n<span class=\"wr-date-picker__sr-only\" role=\"status\" [id]=\"statusId\">{{ announcement() }}</span>\n"
1741
1770
  }]
1742
1771
  }],
1743
1772
  ctorParameters: () => [],
@@ -1822,6 +1851,14 @@ i0.ɵɵngDeclareClassMetadata({
1822
1851
  required: false
1823
1852
  }]
1824
1853
  }],
1854
+ block: [{
1855
+ type: i0.Input,
1856
+ args: [{
1857
+ isSignal: true,
1858
+ alias: "block",
1859
+ required: false
1860
+ }]
1861
+ }],
1825
1862
  rounded: [{
1826
1863
  type: i0.Input,
1827
1864
  args: [{
@@ -1909,6 +1946,14 @@ i0.ɵɵngDeclareClassMetadata({
1909
1946
  required: false
1910
1947
  }]
1911
1948
  }],
1949
+ autoFocus: [{
1950
+ type: i0.Input,
1951
+ args: [{
1952
+ isSignal: true,
1953
+ alias: "autoFocus",
1954
+ required: false
1955
+ }]
1956
+ }],
1912
1957
  panelClass: [{
1913
1958
  type: i0.Input,
1914
1959
  args: [{
@@ -2385,6 +2430,10 @@ var WrDateRangePicker = class WrDateRangePicker {
2385
2430
  transform: (v) => Math.max(1, coerceNumberProperty(v, 1))
2386
2431
  });
2387
2432
  size = input("md", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
2433
+ block = input(false, {
2434
+ ...ngDevMode ? { debugName: "block" } : /* istanbul ignore next */ {},
2435
+ transform: coerceBooleanProperty
2436
+ });
2388
2437
  rounded = input(false, {
2389
2438
  ...ngDevMode ? { debugName: "rounded" } : /* istanbul ignore next */ {},
2390
2439
  transform: coerceBooleanProperty
@@ -2448,6 +2497,10 @@ var WrDateRangePicker = class WrDateRangePicker {
2448
2497
  panelLabelRange = wrReadI18nText("datePicker.panelRange", "Choose date range");
2449
2498
  panelLabelRangeDateTime = wrReadI18nText("datePicker.panelRangeDateTime", "Choose date and time range");
2450
2499
  panelAriaLabel = input(null, ...ngDevMode ? [{ debugName: "panelAriaLabel" }] : /* istanbul ignore next */ []);
2500
+ autoFocus = input(false, {
2501
+ ...ngDevMode ? { debugName: "autoFocus" } : /* istanbul ignore next */ {},
2502
+ transform: coerceBooleanProperty
2503
+ });
2451
2504
  panelClass = input(null, ...ngDevMode ? [{ debugName: "panelClass" }] : /* istanbul ignore next */ []);
2452
2505
  panelId = `wr-date-range-picker-panel-${++rangePanelUid}`;
2453
2506
  resolvedPanelLabel = computed(() => {
@@ -2499,6 +2552,7 @@ var WrDateRangePicker = class WrDateRangePicker {
2499
2552
  }, ...ngDevMode ? [{ debugName: "announcement" }] : /* istanbul ignore next */ []);
2500
2553
  startAriaInvalid = computed(() => !this.inputField.outer && this.shownErrors()[0] ? "true" : null, ...ngDevMode ? [{ debugName: "startAriaInvalid" }] : /* istanbul ignore next */ []);
2501
2554
  endAriaInvalid = computed(() => this.shownErrors()[1] ? "true" : null, ...ngDevMode ? [{ debugName: "endAriaInvalid" }] : /* istanbul ignore next */ []);
2555
+ endAriaRequired = computed(() => this.inputField.outer?.required?.() ? "true" : null, ...ngDevMode ? [{ debugName: "endAriaRequired" }] : /* istanbul ignore next */ []);
2502
2556
  startDescribedBy = computed(() => !this.inputField.outer && this.shownErrors()[0]?.message && this.announcement() ? this.statusId : null, ...ngDevMode ? [{ debugName: "startDescribedBy" }] : /* istanbul ignore next */ []);
2503
2557
  endDescribedBy = computed(() => this.shownErrors()[1]?.message && this.announcement() ? this.statusId : null, ...ngDevMode ? [{ debugName: "endDescribedBy" }] : /* istanbul ignore next */ []);
2504
2558
  classes = computed(() => {
@@ -2506,6 +2560,7 @@ var WrDateRangePicker = class WrDateRangePicker {
2506
2560
  const size = this.size();
2507
2561
  if (size !== "md") parts.push(`wr-date-range-picker--${size}`);
2508
2562
  if (this.rounded()) parts.push("wr-date-range-picker--rounded");
2563
+ if (this.block()) parts.push("wr-date-range-picker--block");
2509
2564
  if (this.disabled()) parts.push("wr-date-range-picker--disabled");
2510
2565
  if (this.shownErrors().some(Boolean)) parts.push("wr-date-range-picker--invalid");
2511
2566
  return parts.join(" ");
@@ -2520,6 +2575,12 @@ var WrDateRangePicker = class WrDateRangePicker {
2520
2575
  this.dispose();
2521
2576
  clearTimeout(this.silenceTimer);
2522
2577
  });
2578
+ afterRenderEffect(() => {
2579
+ const end = this.endEl().nativeElement;
2580
+ const required = this.endAriaRequired();
2581
+ if (required) end.setAttribute("aria-required", required);
2582
+ else end.removeAttribute("aria-required");
2583
+ });
2523
2584
  this.inputField.describe(computed(() => this.shownErrors()[0]));
2524
2585
  effect(() => {
2525
2586
  const v = this.value();
@@ -2638,10 +2699,10 @@ var WrDateRangePicker = class WrDateRangePicker {
2638
2699
  if (this.disabled() || this.readonly() || this.overlayRef) return;
2639
2700
  this.openOverlay(this.fieldEl(end), false);
2640
2701
  }
2641
- toggleOverlay() {
2702
+ toggleOverlay(event) {
2642
2703
  if (this.disabled() || this.readonly()) return;
2643
2704
  if (this.overlayRef) this.closeOverlay();
2644
- else this.openOverlay(this.triggerEl()?.nativeElement ?? null, true);
2705
+ else this.openOverlay(this.triggerEl()?.nativeElement ?? null, event.detail === 0 || this.autoFocus());
2645
2706
  }
2646
2707
  onFieldKey(event, end) {
2647
2708
  if (this.disabled() || this.readonly()) return;
@@ -2663,6 +2724,11 @@ var WrDateRangePicker = class WrDateRangePicker {
2663
2724
  fieldEl(end) {
2664
2725
  return end === 0 ? this.startEl().nativeElement : this.endEl().nativeElement;
2665
2726
  }
2727
+ onTriggerArrow(event) {
2728
+ if (!this.overlayRef) return;
2729
+ event.preventDefault();
2730
+ this.focusPanel();
2731
+ }
2666
2732
  focusPanel() {
2667
2733
  const pane = this.overlayRef?.overlayElement;
2668
2734
  (pane?.querySelector(".wr-calendar__day--focused:not([disabled])") ?? pane?.querySelector(".wr-calendar__chip[tabindex=\"0\"]") ?? pane?.querySelector(".wr-time-picker__input"))?.focus();
@@ -2975,6 +3041,13 @@ var WrDateRangePicker = class WrDateRangePicker {
2975
3041
  isRequired: false,
2976
3042
  transformFunction: null
2977
3043
  },
3044
+ block: {
3045
+ classPropertyName: "block",
3046
+ publicName: "block",
3047
+ isSignal: true,
3048
+ isRequired: false,
3049
+ transformFunction: null
3050
+ },
2978
3051
  rounded: {
2979
3052
  classPropertyName: "rounded",
2980
3053
  publicName: "rounded",
@@ -3038,6 +3111,13 @@ var WrDateRangePicker = class WrDateRangePicker {
3038
3111
  isRequired: false,
3039
3112
  transformFunction: null
3040
3113
  },
3114
+ autoFocus: {
3115
+ classPropertyName: "autoFocus",
3116
+ publicName: "autoFocus",
3117
+ isSignal: true,
3118
+ isRequired: false,
3119
+ transformFunction: null
3120
+ },
3041
3121
  panelClass: {
3042
3122
  classPropertyName: "panelClass",
3043
3123
  publicName: "panelClass",
@@ -3081,7 +3161,7 @@ var WrDateRangePicker = class WrDateRangePicker {
3081
3161
  }
3082
3162
  ],
3083
3163
  ngImport: i0,
3084
- template: "<wr-input-group [rounded]=\"rounded()\">\n <input\n #startInput\n wrInput\n type=\"text\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n class=\"wr-date-range-picker__input\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [attr.aria-label]=\"startLabel()\"\n [attr.aria-invalid]=\"startAriaInvalid()\"\n [attr.aria-describedby]=\"startDescribedBy()\"\n [value]=\"startText()\"\n [placeholder]=\"startPlaceholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n (click)=\"openOnInput(0)\"\n (keydown)=\"onFieldKey($event, 0)\"\n (input)=\"onStartInput($event)\"\n (blur)=\"onBlur($event)\"\n />\n <span class=\"wr-date-range-picker__separator\" aria-hidden=\"true\">{{ separator() }}</span>\n <!--\n `wrDateRangeEnd` hides the surrounding `<wr-form-field>` from this input, so\n only the start one adopts its `controlId` — see the directive for why the\n second half of a range carries no id at all.\n -->\n <input\n #endInput\n wrInput\n wrDateRangeEnd\n type=\"text\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n class=\"wr-date-range-picker__input\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [attr.aria-label]=\"endLabel()\"\n [attr.aria-invalid]=\"endAriaInvalid()\"\n [attr.aria-describedby]=\"endDescribedBy()\"\n [value]=\"endText()\"\n [placeholder]=\"endPlaceholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n (click)=\"openOnInput(1)\"\n (keydown)=\"onFieldKey($event, 1)\"\n (input)=\"onEndInput($event)\"\n (blur)=\"onBlur($event)\"\n />\n <!-- Pointer-only, as the select's is: emptying both fields is the keyboard way to clear. -->\n @if (clearable() && hasValue() && !disabled() && !readonly()) {\n <span\n class=\"wr-date-picker__clear\"\n role=\"button\"\n [attr.aria-label]=\"resolvedClear()\"\n tabindex=\"-1\"\n (click)=\"clear($event)\"\n >\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </span>\n }\n <!--\n `readonly` refuses to open the popup, so the trigger is disabled with it —\n otherwise it stays a focusable button advertising `aria-haspopup=\"dialog\"`\n for a dialog it will never show.\n -->\n <button\n #trigger\n type=\"button\"\n wrInputSuffix\n class=\"wr-date-picker__trigger\"\n [attr.aria-label]=\"triggerLabel()\"\n [attr.aria-haspopup]=\"'dialog'\"\n [attr.aria-expanded]=\"overlayOpen()\"\n [attr.aria-controls]=\"overlayOpen() ? panelId : null\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"toggleOverlay()\"\n (blur)=\"onBlur($event)\"\n >\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" aria-hidden=\"true\">\n <rect x=\"1.5\" y=\"2.5\" width=\"11\" height=\"10\" rx=\"1.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n <line x1=\"1.5\" y1=\"5.5\" x2=\"12.5\" y2=\"5.5\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n <line x1=\"4\" y1=\"1\" x2=\"4\" y2=\"4\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n <line x1=\"10\" y1=\"1\" x2=\"10\" y2=\"4\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n @if (isDateTime()) {\n <circle cx=\"7\" cy=\"9\" r=\"1.5\" fill=\"currentColor\" />\n }\n </svg>\n </button>\n</wr-input-group>\n<!--\n Why a typed end was refused, for a screen reader — the same live region\n <wr-date-picker> carries, written when a refusal is shown and emptied when it is\n corrected. Silent inside a <wr-form-field> bound to the same control, and for a\n refusal the app's catalog has no `validation.*` sentence for.\n-->\n<span class=\"wr-date-range-picker__sr-only\" role=\"status\" [id]=\"statusId\">{{ announcement() }}</span>\n",
3164
+ template: "<wr-input-group [rounded]=\"rounded()\">\n <input\n #startInput\n wrInput\n type=\"text\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n class=\"wr-date-range-picker__input\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [attr.aria-label]=\"startLabel()\"\n [attr.aria-invalid]=\"startAriaInvalid()\"\n [attr.aria-describedby]=\"startDescribedBy()\"\n [value]=\"startText()\"\n [placeholder]=\"startPlaceholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n (click)=\"openOnInput(0)\"\n (keydown)=\"onFieldKey($event, 0)\"\n (input)=\"onStartInput($event)\"\n (blur)=\"onBlur($event)\"\n />\n <span class=\"wr-date-range-picker__separator\" aria-hidden=\"true\">{{ separator() }}</span>\n <!--\n `wrDateRangeEnd` hides the surrounding `<wr-form-field>` from this input, so\n only the start one adopts its `controlId` — see the directive for why the\n second half of a range carries no id at all.\n -->\n <input\n #endInput\n wrInput\n wrDateRangeEnd\n type=\"text\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n class=\"wr-date-range-picker__input\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [attr.aria-label]=\"endLabel()\"\n [attr.aria-invalid]=\"endAriaInvalid()\"\n [attr.aria-describedby]=\"endDescribedBy()\"\n [value]=\"endText()\"\n [placeholder]=\"endPlaceholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n (click)=\"openOnInput(1)\"\n (keydown)=\"onFieldKey($event, 1)\"\n (input)=\"onEndInput($event)\"\n (blur)=\"onBlur($event)\"\n />\n <!-- Pointer-only, as the select's is: emptying both fields is the keyboard way to clear. -->\n @if (clearable() && hasValue() && !disabled() && !readonly()) {\n <span\n class=\"wr-date-picker__clear\"\n role=\"button\"\n [attr.aria-label]=\"resolvedClear()\"\n tabindex=\"-1\"\n (click)=\"clear($event)\"\n >\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </span>\n }\n <!--\n `readonly` refuses to open the popup, so the trigger is disabled with it —\n otherwise it stays a focusable button advertising `aria-haspopup=\"dialog\"`\n for a dialog it will never show.\n -->\n <button\n #trigger\n type=\"button\"\n wrInputSuffix\n class=\"wr-date-picker__trigger\"\n [attr.aria-label]=\"triggerLabel()\"\n [attr.aria-haspopup]=\"'dialog'\"\n [attr.aria-expanded]=\"overlayOpen()\"\n [attr.aria-controls]=\"overlayOpen() ? panelId : null\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"toggleOverlay($event)\"\n (keydown.arrowDown)=\"onTriggerArrow($event)\"\n (blur)=\"onBlur($event)\"\n >\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" aria-hidden=\"true\">\n <rect x=\"1.5\" y=\"2.5\" width=\"11\" height=\"10\" rx=\"1.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n <line x1=\"1.5\" y1=\"5.5\" x2=\"12.5\" y2=\"5.5\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n <line x1=\"4\" y1=\"1\" x2=\"4\" y2=\"4\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n <line x1=\"10\" y1=\"1\" x2=\"10\" y2=\"4\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n @if (isDateTime()) {\n <circle cx=\"7\" cy=\"9\" r=\"1.5\" fill=\"currentColor\" />\n }\n </svg>\n </button>\n</wr-input-group>\n<!--\n Why a typed end was refused, for a screen reader — the same live region\n <wr-date-picker> carries, written when a refusal is shown and emptied when it is\n corrected. Silent inside a <wr-form-field> bound to the same control, and for a\n refusal the app's catalog has no `validation.*` sentence for.\n-->\n<span class=\"wr-date-range-picker__sr-only\" role=\"status\" [id]=\"statusId\">{{ announcement() }}</span>\n",
3085
3165
  dependencies: [
3086
3166
  {
3087
3167
  kind: "directive",
@@ -3138,7 +3218,7 @@ i0.ɵɵngDeclareClassMetadata({
3138
3218
  ],
3139
3219
  providers: [WrDateInputField],
3140
3220
  viewProviders: [WR_DATE_INPUT_FIELD_VIEW_PROVIDER],
3141
- template: "<wr-input-group [rounded]=\"rounded()\">\n <input\n #startInput\n wrInput\n type=\"text\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n class=\"wr-date-range-picker__input\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [attr.aria-label]=\"startLabel()\"\n [attr.aria-invalid]=\"startAriaInvalid()\"\n [attr.aria-describedby]=\"startDescribedBy()\"\n [value]=\"startText()\"\n [placeholder]=\"startPlaceholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n (click)=\"openOnInput(0)\"\n (keydown)=\"onFieldKey($event, 0)\"\n (input)=\"onStartInput($event)\"\n (blur)=\"onBlur($event)\"\n />\n <span class=\"wr-date-range-picker__separator\" aria-hidden=\"true\">{{ separator() }}</span>\n <!--\n `wrDateRangeEnd` hides the surrounding `<wr-form-field>` from this input, so\n only the start one adopts its `controlId` — see the directive for why the\n second half of a range carries no id at all.\n -->\n <input\n #endInput\n wrInput\n wrDateRangeEnd\n type=\"text\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n class=\"wr-date-range-picker__input\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [attr.aria-label]=\"endLabel()\"\n [attr.aria-invalid]=\"endAriaInvalid()\"\n [attr.aria-describedby]=\"endDescribedBy()\"\n [value]=\"endText()\"\n [placeholder]=\"endPlaceholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n (click)=\"openOnInput(1)\"\n (keydown)=\"onFieldKey($event, 1)\"\n (input)=\"onEndInput($event)\"\n (blur)=\"onBlur($event)\"\n />\n <!-- Pointer-only, as the select's is: emptying both fields is the keyboard way to clear. -->\n @if (clearable() && hasValue() && !disabled() && !readonly()) {\n <span\n class=\"wr-date-picker__clear\"\n role=\"button\"\n [attr.aria-label]=\"resolvedClear()\"\n tabindex=\"-1\"\n (click)=\"clear($event)\"\n >\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </span>\n }\n <!--\n `readonly` refuses to open the popup, so the trigger is disabled with it —\n otherwise it stays a focusable button advertising `aria-haspopup=\"dialog\"`\n for a dialog it will never show.\n -->\n <button\n #trigger\n type=\"button\"\n wrInputSuffix\n class=\"wr-date-picker__trigger\"\n [attr.aria-label]=\"triggerLabel()\"\n [attr.aria-haspopup]=\"'dialog'\"\n [attr.aria-expanded]=\"overlayOpen()\"\n [attr.aria-controls]=\"overlayOpen() ? panelId : null\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"toggleOverlay()\"\n (blur)=\"onBlur($event)\"\n >\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" aria-hidden=\"true\">\n <rect x=\"1.5\" y=\"2.5\" width=\"11\" height=\"10\" rx=\"1.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n <line x1=\"1.5\" y1=\"5.5\" x2=\"12.5\" y2=\"5.5\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n <line x1=\"4\" y1=\"1\" x2=\"4\" y2=\"4\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n <line x1=\"10\" y1=\"1\" x2=\"10\" y2=\"4\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n @if (isDateTime()) {\n <circle cx=\"7\" cy=\"9\" r=\"1.5\" fill=\"currentColor\" />\n }\n </svg>\n </button>\n</wr-input-group>\n<!--\n Why a typed end was refused, for a screen reader — the same live region\n <wr-date-picker> carries, written when a refusal is shown and emptied when it is\n corrected. Silent inside a <wr-form-field> bound to the same control, and for a\n refusal the app's catalog has no `validation.*` sentence for.\n-->\n<span class=\"wr-date-range-picker__sr-only\" role=\"status\" [id]=\"statusId\">{{ announcement() }}</span>\n"
3221
+ template: "<wr-input-group [rounded]=\"rounded()\">\n <input\n #startInput\n wrInput\n type=\"text\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n class=\"wr-date-range-picker__input\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [attr.aria-label]=\"startLabel()\"\n [attr.aria-invalid]=\"startAriaInvalid()\"\n [attr.aria-describedby]=\"startDescribedBy()\"\n [value]=\"startText()\"\n [placeholder]=\"startPlaceholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n (click)=\"openOnInput(0)\"\n (keydown)=\"onFieldKey($event, 0)\"\n (input)=\"onStartInput($event)\"\n (blur)=\"onBlur($event)\"\n />\n <span class=\"wr-date-range-picker__separator\" aria-hidden=\"true\">{{ separator() }}</span>\n <!--\n `wrDateRangeEnd` hides the surrounding `<wr-form-field>` from this input, so\n only the start one adopts its `controlId` — see the directive for why the\n second half of a range carries no id at all.\n -->\n <input\n #endInput\n wrInput\n wrDateRangeEnd\n type=\"text\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n class=\"wr-date-range-picker__input\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [attr.aria-label]=\"endLabel()\"\n [attr.aria-invalid]=\"endAriaInvalid()\"\n [attr.aria-describedby]=\"endDescribedBy()\"\n [value]=\"endText()\"\n [placeholder]=\"endPlaceholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n (click)=\"openOnInput(1)\"\n (keydown)=\"onFieldKey($event, 1)\"\n (input)=\"onEndInput($event)\"\n (blur)=\"onBlur($event)\"\n />\n <!-- Pointer-only, as the select's is: emptying both fields is the keyboard way to clear. -->\n @if (clearable() && hasValue() && !disabled() && !readonly()) {\n <span\n class=\"wr-date-picker__clear\"\n role=\"button\"\n [attr.aria-label]=\"resolvedClear()\"\n tabindex=\"-1\"\n (click)=\"clear($event)\"\n >\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </span>\n }\n <!--\n `readonly` refuses to open the popup, so the trigger is disabled with it —\n otherwise it stays a focusable button advertising `aria-haspopup=\"dialog\"`\n for a dialog it will never show.\n -->\n <button\n #trigger\n type=\"button\"\n wrInputSuffix\n class=\"wr-date-picker__trigger\"\n [attr.aria-label]=\"triggerLabel()\"\n [attr.aria-haspopup]=\"'dialog'\"\n [attr.aria-expanded]=\"overlayOpen()\"\n [attr.aria-controls]=\"overlayOpen() ? panelId : null\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"toggleOverlay($event)\"\n (keydown.arrowDown)=\"onTriggerArrow($event)\"\n (blur)=\"onBlur($event)\"\n >\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" aria-hidden=\"true\">\n <rect x=\"1.5\" y=\"2.5\" width=\"11\" height=\"10\" rx=\"1.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n <line x1=\"1.5\" y1=\"5.5\" x2=\"12.5\" y2=\"5.5\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n <line x1=\"4\" y1=\"1\" x2=\"4\" y2=\"4\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n <line x1=\"10\" y1=\"1\" x2=\"10\" y2=\"4\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n @if (isDateTime()) {\n <circle cx=\"7\" cy=\"9\" r=\"1.5\" fill=\"currentColor\" />\n }\n </svg>\n </button>\n</wr-input-group>\n<!--\n Why a typed end was refused, for a screen reader — the same live region\n <wr-date-picker> carries, written when a refusal is shown and emptied when it is\n corrected. Silent inside a <wr-form-field> bound to the same control, and for a\n refusal the app's catalog has no `validation.*` sentence for.\n-->\n<span class=\"wr-date-range-picker__sr-only\" role=\"status\" [id]=\"statusId\">{{ announcement() }}</span>\n"
3142
3222
  }]
3143
3223
  }],
3144
3224
  ctorParameters: () => [],
@@ -3239,6 +3319,14 @@ i0.ɵɵngDeclareClassMetadata({
3239
3319
  required: false
3240
3320
  }]
3241
3321
  }],
3322
+ block: [{
3323
+ type: i0.Input,
3324
+ args: [{
3325
+ isSignal: true,
3326
+ alias: "block",
3327
+ required: false
3328
+ }]
3329
+ }],
3242
3330
  rounded: [{
3243
3331
  type: i0.Input,
3244
3332
  args: [{
@@ -3338,6 +3426,14 @@ i0.ɵɵngDeclareClassMetadata({
3338
3426
  required: false
3339
3427
  }]
3340
3428
  }],
3429
+ autoFocus: [{
3430
+ type: i0.Input,
3431
+ args: [{
3432
+ isSignal: true,
3433
+ alias: "autoFocus",
3434
+ required: false
3435
+ }]
3436
+ }],
3341
3437
  panelClass: [{
3342
3438
  type: i0.Input,
3343
3439
  args: [{