ngwr 16.2.0 → 16.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (418) hide show
  1. package/badge/styles/_tag.scss +73 -1
  2. package/calendar/styles/_index.scss +22 -0
  3. package/carousel/styles/_index.scss +53 -1
  4. package/cascader/styles/_rules.scss +7 -0
  5. package/color-picker/styles/_index.scss +21 -0
  6. package/date-picker/styles/_index.scss +19 -0
  7. package/dropdown/styles/_index.scss +13 -19
  8. package/fesm2022/ngwr-affix.mjs +3 -3
  9. package/fesm2022/ngwr-alert-testing.mjs +70 -0
  10. package/fesm2022/ngwr-alert-testing.mjs.map +1 -0
  11. package/fesm2022/ngwr-alert.mjs +3 -3
  12. package/fesm2022/ngwr-anchor.mjs +17 -6
  13. package/fesm2022/ngwr-anchor.mjs.map +1 -1
  14. package/fesm2022/ngwr-animations-aurora.mjs +3 -3
  15. package/fesm2022/ngwr-animations-blur-reveal.mjs +3 -3
  16. package/fesm2022/ngwr-animations-click-sparks.mjs +3 -3
  17. package/fesm2022/ngwr-animations-confetti.mjs +3 -3
  18. package/fesm2022/ngwr-animations-decode.mjs +3 -3
  19. package/fesm2022/ngwr-animations-destruct.mjs +3 -3
  20. package/fesm2022/ngwr-animations-dot-grid.mjs +3 -3
  21. package/fesm2022/ngwr-animations-falling-letters.mjs +3 -3
  22. package/fesm2022/ngwr-animations-flow-lines.mjs +3 -3
  23. package/fesm2022/ngwr-animations-fluid-cursor.mjs +3 -3
  24. package/fesm2022/ngwr-animations-glitch.mjs +3 -3
  25. package/fesm2022/ngwr-animations-glow-border.mjs +3 -3
  26. package/fesm2022/ngwr-animations-gradient-flow.mjs +3 -3
  27. package/fesm2022/ngwr-animations-marquee.mjs +3 -3
  28. package/fesm2022/ngwr-animations-orbit.mjs +3 -3
  29. package/fesm2022/ngwr-animations-reveal.mjs +3 -3
  30. package/fesm2022/ngwr-animations-ripple-grid.mjs +3 -3
  31. package/fesm2022/ngwr-animations-rotate-reveal.mjs +3 -3
  32. package/fesm2022/ngwr-animations-shimmer.mjs +3 -3
  33. package/fesm2022/ngwr-animations-spotlight.mjs +3 -3
  34. package/fesm2022/ngwr-animations-thread-lines.mjs +3 -3
  35. package/fesm2022/ngwr-animations-tilt.mjs +3 -3
  36. package/fesm2022/ngwr-animations-typewriter.mjs +3 -3
  37. package/fesm2022/ngwr-avatar.mjs +3 -3
  38. package/fesm2022/ngwr-back-top.mjs +3 -3
  39. package/fesm2022/ngwr-badge.mjs +129 -11
  40. package/fesm2022/ngwr-badge.mjs.map +1 -1
  41. package/fesm2022/ngwr-breadcrumbs-testing.mjs +83 -0
  42. package/fesm2022/ngwr-breadcrumbs-testing.mjs.map +1 -0
  43. package/fesm2022/ngwr-breadcrumbs.mjs +8 -8
  44. package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
  45. package/fesm2022/ngwr-burger-testing.mjs +45 -0
  46. package/fesm2022/ngwr-burger-testing.mjs.map +1 -0
  47. package/fesm2022/ngwr-burger.mjs +3 -3
  48. package/fesm2022/ngwr-button.mjs +6 -6
  49. package/fesm2022/ngwr-calendar-testing.mjs +18 -0
  50. package/fesm2022/ngwr-calendar-testing.mjs.map +1 -1
  51. package/fesm2022/ngwr-calendar.mjs +500 -73
  52. package/fesm2022/ngwr-calendar.mjs.map +1 -1
  53. package/fesm2022/ngwr-card.mjs +9 -9
  54. package/fesm2022/ngwr-carousel-testing.mjs +24 -1
  55. package/fesm2022/ngwr-carousel-testing.mjs.map +1 -1
  56. package/fesm2022/ngwr-carousel.mjs +73 -10
  57. package/fesm2022/ngwr-carousel.mjs.map +1 -1
  58. package/fesm2022/ngwr-cascader.mjs +45 -37
  59. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  60. package/fesm2022/ngwr-charts-bar-chart.mjs +5 -4
  61. package/fesm2022/ngwr-charts-bar-chart.mjs.map +1 -1
  62. package/fesm2022/ngwr-charts-boxplot-chart.mjs +3 -3
  63. package/fesm2022/ngwr-charts-bullet-chart.mjs +3 -3
  64. package/fesm2022/ngwr-charts-calendar-heatmap.mjs +3 -3
  65. package/fesm2022/ngwr-charts-candlestick-chart.mjs +3 -3
  66. package/fesm2022/ngwr-charts-chart-legend.mjs +26 -11
  67. package/fesm2022/ngwr-charts-chart-legend.mjs.map +1 -1
  68. package/fesm2022/ngwr-charts-core.mjs +3 -3
  69. package/fesm2022/ngwr-charts-donut-chart.mjs +5 -4
  70. package/fesm2022/ngwr-charts-donut-chart.mjs.map +1 -1
  71. package/fesm2022/ngwr-charts-funnel-chart.mjs +3 -3
  72. package/fesm2022/ngwr-charts-gauge.mjs +3 -3
  73. package/fesm2022/ngwr-charts-heatmap-chart.mjs +3 -3
  74. package/fesm2022/ngwr-charts-line-chart-testing.mjs +3 -2
  75. package/fesm2022/ngwr-charts-line-chart-testing.mjs.map +1 -1
  76. package/fesm2022/ngwr-charts-line-chart.mjs +17 -7
  77. package/fesm2022/ngwr-charts-line-chart.mjs.map +1 -1
  78. package/fesm2022/ngwr-charts-meter-group.mjs +5 -4
  79. package/fesm2022/ngwr-charts-meter-group.mjs.map +1 -1
  80. package/fesm2022/ngwr-charts-radar-chart.mjs +5 -4
  81. package/fesm2022/ngwr-charts-radar-chart.mjs.map +1 -1
  82. package/fesm2022/ngwr-charts-scatter-chart.mjs +5 -4
  83. package/fesm2022/ngwr-charts-scatter-chart.mjs.map +1 -1
  84. package/fesm2022/ngwr-charts-sparkline.mjs +3 -3
  85. package/fesm2022/ngwr-charts-treemap-chart.mjs +3 -3
  86. package/fesm2022/ngwr-charts-waterfall-chart.mjs +3 -3
  87. package/fesm2022/ngwr-checkbox.mjs +6 -6
  88. package/fesm2022/ngwr-clipboard.mjs +3 -3
  89. package/fesm2022/ngwr-collapse.mjs +9 -9
  90. package/fesm2022/ngwr-color-picker-testing.mjs +11 -1
  91. package/fesm2022/ngwr-color-picker-testing.mjs.map +1 -1
  92. package/fesm2022/ngwr-color-picker.mjs +153 -37
  93. package/fesm2022/ngwr-color-picker.mjs.map +1 -1
  94. package/fesm2022/ngwr-command-palette.mjs +3 -3
  95. package/fesm2022/ngwr-comment.mjs +10 -6
  96. package/fesm2022/ngwr-comment.mjs.map +1 -1
  97. package/fesm2022/ngwr-compare-testing.mjs +84 -0
  98. package/fesm2022/ngwr-compare-testing.mjs.map +1 -0
  99. package/fesm2022/ngwr-compare.mjs +3 -3
  100. package/fesm2022/ngwr-context-menu.mjs +28 -13
  101. package/fesm2022/ngwr-context-menu.mjs.map +1 -1
  102. package/fesm2022/ngwr-cookie.mjs +3 -3
  103. package/fesm2022/ngwr-copy-value.mjs +3 -3
  104. package/fesm2022/ngwr-counter.mjs +6 -6
  105. package/fesm2022/ngwr-date-picker-testing.mjs +30 -4
  106. package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
  107. package/fesm2022/ngwr-date-picker.mjs +342 -69
  108. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  109. package/fesm2022/ngwr-date-stamp.mjs +3 -3
  110. package/fesm2022/ngwr-date.mjs +59 -8
  111. package/fesm2022/ngwr-date.mjs.map +1 -1
  112. package/fesm2022/ngwr-density.mjs +6 -6
  113. package/fesm2022/ngwr-descriptions.mjs +6 -6
  114. package/fesm2022/ngwr-dialog.mjs +18 -18
  115. package/fesm2022/ngwr-directives.mjs +15 -15
  116. package/fesm2022/ngwr-divider.mjs +3 -3
  117. package/fesm2022/ngwr-drawer.mjs +51 -29
  118. package/fesm2022/ngwr-drawer.mjs.map +1 -1
  119. package/fesm2022/ngwr-dropdown-testing.mjs +11 -3
  120. package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -1
  121. package/fesm2022/ngwr-dropdown.mjs +70 -99
  122. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  123. package/fesm2022/ngwr-editor.mjs +4 -3
  124. package/fesm2022/ngwr-editor.mjs.map +1 -1
  125. package/fesm2022/ngwr-empty.mjs +3 -3
  126. package/fesm2022/ngwr-event-calendar.mjs +186 -33
  127. package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
  128. package/fesm2022/ngwr-file-upload-testing.mjs +34 -2
  129. package/fesm2022/ngwr-file-upload-testing.mjs.map +1 -1
  130. package/fesm2022/ngwr-file-upload.mjs +279 -16
  131. package/fesm2022/ngwr-file-upload.mjs.map +1 -1
  132. package/fesm2022/ngwr-form.mjs +9 -9
  133. package/fesm2022/ngwr-form.mjs.map +1 -1
  134. package/fesm2022/ngwr-graph-testing.mjs +30 -0
  135. package/fesm2022/ngwr-graph-testing.mjs.map +1 -1
  136. package/fesm2022/ngwr-graph.mjs +664 -43
  137. package/fesm2022/ngwr-graph.mjs.map +1 -1
  138. package/fesm2022/ngwr-hotkey.mjs +6 -6
  139. package/fesm2022/ngwr-i18n-ar.mjs +27 -8
  140. package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
  141. package/fesm2022/ngwr-i18n-cs.mjs +27 -8
  142. package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
  143. package/fesm2022/ngwr-i18n-de.mjs +27 -8
  144. package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
  145. package/fesm2022/ngwr-i18n-en.mjs +27 -8
  146. package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
  147. package/fesm2022/ngwr-i18n-es.mjs +27 -8
  148. package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
  149. package/fesm2022/ngwr-i18n-fr.mjs +27 -8
  150. package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
  151. package/fesm2022/ngwr-i18n-he.mjs +27 -8
  152. package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
  153. package/fesm2022/ngwr-i18n-hi.mjs +27 -8
  154. package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
  155. package/fesm2022/ngwr-i18n-id.mjs +27 -8
  156. package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
  157. package/fesm2022/ngwr-i18n-it.mjs +27 -8
  158. package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
  159. package/fesm2022/ngwr-i18n-ja.mjs +27 -8
  160. package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
  161. package/fesm2022/ngwr-i18n-ko.mjs +27 -8
  162. package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
  163. package/fesm2022/ngwr-i18n-nl.mjs +27 -8
  164. package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
  165. package/fesm2022/ngwr-i18n-pl.mjs +27 -8
  166. package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
  167. package/fesm2022/ngwr-i18n-pt.mjs +27 -8
  168. package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
  169. package/fesm2022/ngwr-i18n-ru.mjs +27 -8
  170. package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
  171. package/fesm2022/ngwr-i18n-sv.mjs +27 -8
  172. package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
  173. package/fesm2022/ngwr-i18n-tr.mjs +27 -8
  174. package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
  175. package/fesm2022/ngwr-i18n-uk.mjs +27 -8
  176. package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
  177. package/fesm2022/ngwr-i18n-vi.mjs +27 -8
  178. package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
  179. package/fesm2022/ngwr-i18n-zh-tw.mjs +27 -8
  180. package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
  181. package/fesm2022/ngwr-i18n-zh.mjs +27 -8
  182. package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
  183. package/fesm2022/ngwr-i18n.mjs +9 -9
  184. package/fesm2022/ngwr-icon.mjs +6 -6
  185. package/fesm2022/ngwr-image-cropper.mjs +3 -3
  186. package/fesm2022/ngwr-input-number-testing.mjs +11 -0
  187. package/fesm2022/ngwr-input-number-testing.mjs.map +1 -1
  188. package/fesm2022/ngwr-input-number.mjs +68 -7
  189. package/fesm2022/ngwr-input-number.mjs.map +1 -1
  190. package/fesm2022/ngwr-input-otp.mjs +23 -3
  191. package/fesm2022/ngwr-input-otp.mjs.map +1 -1
  192. package/fesm2022/ngwr-input-testing.mjs +24 -1
  193. package/fesm2022/ngwr-input-testing.mjs.map +1 -1
  194. package/fesm2022/ngwr-input.mjs +152 -36
  195. package/fesm2022/ngwr-input.mjs.map +1 -1
  196. package/fesm2022/ngwr-keyboard.mjs +3 -3
  197. package/fesm2022/ngwr-knob.mjs +3 -3
  198. package/fesm2022/ngwr-layout.mjs +15 -15
  199. package/fesm2022/ngwr-lightbox.mjs +8 -8
  200. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  201. package/fesm2022/ngwr-list.mjs +8 -8
  202. package/fesm2022/ngwr-list.mjs.map +1 -1
  203. package/fesm2022/ngwr-load-state.mjs +15 -15
  204. package/fesm2022/ngwr-loading-bar.mjs +6 -6
  205. package/fesm2022/ngwr-mention.mjs +6 -6
  206. package/fesm2022/ngwr-meta.mjs +6 -6
  207. package/fesm2022/ngwr-overlay.mjs +175 -13
  208. package/fesm2022/ngwr-overlay.mjs.map +1 -1
  209. package/fesm2022/ngwr-page-header.mjs +3 -3
  210. package/fesm2022/ngwr-pagination.mjs +6 -3
  211. package/fesm2022/ngwr-pagination.mjs.map +1 -1
  212. package/fesm2022/ngwr-pipes.mjs +31 -29
  213. package/fesm2022/ngwr-pipes.mjs.map +1 -1
  214. package/fesm2022/ngwr-platform.mjs +9 -9
  215. package/fesm2022/ngwr-popconfirm-testing.mjs +5 -2
  216. package/fesm2022/ngwr-popconfirm-testing.mjs.map +1 -1
  217. package/fesm2022/ngwr-popconfirm.mjs +44 -63
  218. package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
  219. package/fesm2022/ngwr-popover-testing.mjs +7 -1
  220. package/fesm2022/ngwr-popover-testing.mjs.map +1 -1
  221. package/fesm2022/ngwr-popover.mjs +58 -156
  222. package/fesm2022/ngwr-popover.mjs.map +1 -1
  223. package/fesm2022/ngwr-progress.mjs +50 -9
  224. package/fesm2022/ngwr-progress.mjs.map +1 -1
  225. package/fesm2022/ngwr-pull-to-refresh-testing.mjs +57 -0
  226. package/fesm2022/ngwr-pull-to-refresh-testing.mjs.map +1 -0
  227. package/fesm2022/ngwr-pull-to-refresh.mjs +3 -3
  228. package/fesm2022/ngwr-qr.mjs +3 -3
  229. package/fesm2022/ngwr-radio.mjs +6 -6
  230. package/fesm2022/ngwr-rating.mjs +3 -3
  231. package/fesm2022/ngwr-resizable-testing.mjs +113 -0
  232. package/fesm2022/ngwr-resizable-testing.mjs.map +1 -0
  233. package/fesm2022/ngwr-resizable.mjs +3 -3
  234. package/fesm2022/ngwr-result.mjs +12 -12
  235. package/fesm2022/ngwr-schema-form-testing.mjs +336 -0
  236. package/fesm2022/ngwr-schema-form-testing.mjs.map +1 -0
  237. package/fesm2022/ngwr-schema-form.mjs +416 -19
  238. package/fesm2022/ngwr-schema-form.mjs.map +1 -1
  239. package/fesm2022/ngwr-scroll.mjs +3 -3
  240. package/fesm2022/ngwr-segmented.mjs +3 -3
  241. package/fesm2022/ngwr-select-testing.mjs +19 -0
  242. package/fesm2022/ngwr-select-testing.mjs.map +1 -1
  243. package/fesm2022/ngwr-select.mjs +361 -84
  244. package/fesm2022/ngwr-select.mjs.map +1 -1
  245. package/fesm2022/ngwr-sidebar-testing.mjs +176 -0
  246. package/fesm2022/ngwr-sidebar-testing.mjs.map +1 -0
  247. package/fesm2022/ngwr-sidebar.mjs +3 -3
  248. package/fesm2022/ngwr-skeleton.mjs +3 -3
  249. package/fesm2022/ngwr-slider-testing.mjs +6 -0
  250. package/fesm2022/ngwr-slider-testing.mjs.map +1 -1
  251. package/fesm2022/ngwr-slider.mjs +21 -3
  252. package/fesm2022/ngwr-slider.mjs.map +1 -1
  253. package/fesm2022/ngwr-sortable-list.mjs +29 -12
  254. package/fesm2022/ngwr-sortable-list.mjs.map +1 -1
  255. package/fesm2022/ngwr-speed-dial.mjs +3 -3
  256. package/fesm2022/ngwr-spinner.mjs +3 -3
  257. package/fesm2022/ngwr-splitter.mjs +3 -3
  258. package/fesm2022/ngwr-statistic.mjs +9 -9
  259. package/fesm2022/ngwr-stepper.mjs +42 -11
  260. package/fesm2022/ngwr-stepper.mjs.map +1 -1
  261. package/fesm2022/ngwr-storage.mjs +3 -3
  262. package/fesm2022/ngwr-switch.mjs +3 -3
  263. package/fesm2022/ngwr-table-testing.mjs +157 -3
  264. package/fesm2022/ngwr-table-testing.mjs.map +1 -1
  265. package/fesm2022/ngwr-table.mjs +1051 -74
  266. package/fesm2022/ngwr-table.mjs.map +1 -1
  267. package/fesm2022/ngwr-tabs-router.mjs +3 -3
  268. package/fesm2022/ngwr-tabs-testing.mjs +1 -1
  269. package/fesm2022/ngwr-tabs-testing.mjs.map +1 -1
  270. package/fesm2022/ngwr-tabs.mjs +15 -10
  271. package/fesm2022/ngwr-tabs.mjs.map +1 -1
  272. package/fesm2022/ngwr-textarea-testing.mjs +11 -0
  273. package/fesm2022/ngwr-textarea-testing.mjs.map +1 -1
  274. package/fesm2022/ngwr-textarea.mjs +128 -16
  275. package/fesm2022/ngwr-textarea.mjs.map +1 -1
  276. package/fesm2022/ngwr-theme.mjs +3 -3
  277. package/fesm2022/ngwr-timeline.mjs +6 -6
  278. package/fesm2022/ngwr-toast.mjs +40 -19
  279. package/fesm2022/ngwr-toast.mjs.map +1 -1
  280. package/fesm2022/ngwr-toolbar.mjs +3 -3
  281. package/fesm2022/ngwr-tour-testing.mjs +13 -1
  282. package/fesm2022/ngwr-tour-testing.mjs.map +1 -1
  283. package/fesm2022/ngwr-tour.mjs +19 -15
  284. package/fesm2022/ngwr-tour.mjs.map +1 -1
  285. package/fesm2022/ngwr-transfer-testing.mjs +6 -0
  286. package/fesm2022/ngwr-transfer-testing.mjs.map +1 -1
  287. package/fesm2022/ngwr-transfer.mjs +24 -5
  288. package/fesm2022/ngwr-transfer.mjs.map +1 -1
  289. package/fesm2022/ngwr-tree-testing.mjs +62 -2
  290. package/fesm2022/ngwr-tree-testing.mjs.map +1 -1
  291. package/fesm2022/ngwr-tree.mjs +978 -79
  292. package/fesm2022/ngwr-tree.mjs.map +1 -1
  293. package/fesm2022/ngwr-typography.mjs +3 -3
  294. package/fesm2022/ngwr-utils-router.mjs +3 -3
  295. package/fesm2022/ngwr-utils.mjs +97 -1
  296. package/fesm2022/ngwr-utils.mjs.map +1 -1
  297. package/fesm2022/ngwr-version.mjs +1 -1
  298. package/fesm2022/ngwr-version.mjs.map +1 -1
  299. package/fesm2022/ngwr-virtual-scroll.mjs +3 -3
  300. package/fesm2022/ngwr-window.mjs +33 -22
  301. package/fesm2022/ngwr-window.mjs.map +1 -1
  302. package/file-upload/styles/_index.scss +156 -0
  303. package/graph/styles/_index.scss +87 -0
  304. package/i18n/ar.json +29 -8
  305. package/i18n/cs.json +29 -8
  306. package/i18n/de.json +29 -8
  307. package/i18n/en.json +29 -8
  308. package/i18n/es.json +29 -8
  309. package/i18n/fr.json +29 -8
  310. package/i18n/he.json +29 -8
  311. package/i18n/hi.json +29 -8
  312. package/i18n/id.json +29 -8
  313. package/i18n/it.json +29 -8
  314. package/i18n/ja.json +29 -8
  315. package/i18n/ko.json +29 -8
  316. package/i18n/nl.json +29 -8
  317. package/i18n/pl.json +29 -8
  318. package/i18n/pt.json +29 -8
  319. package/i18n/ru.json +29 -8
  320. package/i18n/sv.json +29 -8
  321. package/i18n/tr.json +29 -8
  322. package/i18n/uk.json +29 -8
  323. package/i18n/vi.json +29 -8
  324. package/i18n/zh-TW.json +29 -8
  325. package/i18n/zh.json +29 -8
  326. package/input/styles/_index.scss +68 -1
  327. package/input-otp/styles/_index.scss +14 -0
  328. package/llms-full.txt +53 -21
  329. package/llms.txt +57 -24
  330. package/overlay/styles/_arrow.scss +4 -4
  331. package/package.json +33 -1
  332. package/popconfirm/styles/_index.scss +3 -11
  333. package/progress/styles/_index.scss +32 -0
  334. package/schema-form/styles/_index.scss +78 -0
  335. package/schematics/collection.json +5 -0
  336. package/schematics/eject/index.js +158 -0
  337. package/schematics/eject/schema.js +8 -0
  338. package/schematics/eject/schema.json +24 -0
  339. package/schematics/eject/source.js +295 -0
  340. package/schematics/use/rule.js +2 -0
  341. package/schematics/use/symbol-map.json +5 -0
  342. package/select/styles/_index.scss +127 -22
  343. package/skills/ngwr/SKILL.md +31 -4
  344. package/skills/ngwr/references/catalog.md +9 -1
  345. package/slider/styles/_index.scss +22 -0
  346. package/table/styles/_index.scss +191 -3
  347. package/textarea/styles/_index.scss +80 -0
  348. package/theme/styles/_focus.scss +16 -1
  349. package/theme/styles/_motion.scss +5 -0
  350. package/transfer/styles/_index.scss +84 -0
  351. package/tree/styles/_index.scss +138 -5
  352. package/types/ngwr-alert-testing.d.ts +88 -0
  353. package/types/ngwr-badge.d.ts +72 -2
  354. package/types/ngwr-breadcrumbs-testing.d.ts +92 -0
  355. package/types/ngwr-burger-testing.d.ts +51 -0
  356. package/types/ngwr-calendar-testing.d.ts +18 -6
  357. package/types/ngwr-calendar.d.ts +272 -22
  358. package/types/ngwr-carousel-testing.d.ts +27 -6
  359. package/types/ngwr-carousel.d.ts +42 -6
  360. package/types/ngwr-cascader.d.ts +13 -6
  361. package/types/ngwr-charts-chart-legend.d.ts +9 -4
  362. package/types/ngwr-charts-line-chart-testing.d.ts +4 -1
  363. package/types/ngwr-charts-line-chart.d.ts +7 -4
  364. package/types/ngwr-color-picker-testing.d.ts +15 -4
  365. package/types/ngwr-color-picker.d.ts +76 -6
  366. package/types/ngwr-compare-testing.d.ts +72 -0
  367. package/types/ngwr-context-menu.d.ts +2 -0
  368. package/types/ngwr-date-picker-testing.d.ts +23 -8
  369. package/types/ngwr-date-picker.d.ts +100 -9
  370. package/types/ngwr-date.d.ts +71 -1
  371. package/types/ngwr-drawer.d.ts +9 -0
  372. package/types/ngwr-dropdown-testing.d.ts +20 -0
  373. package/types/ngwr-dropdown.d.ts +26 -6
  374. package/types/ngwr-event-calendar.d.ts +66 -8
  375. package/types/ngwr-file-upload-testing.d.ts +31 -2
  376. package/types/ngwr-file-upload.d.ts +156 -3
  377. package/types/ngwr-form.d.ts +47 -3
  378. package/types/ngwr-graph-testing.d.ts +36 -3
  379. package/types/ngwr-graph.d.ts +309 -13
  380. package/types/ngwr-input-number-testing.d.ts +10 -0
  381. package/types/ngwr-input-number.d.ts +30 -1
  382. package/types/ngwr-input-otp.d.ts +10 -0
  383. package/types/ngwr-input-testing.d.ts +30 -0
  384. package/types/ngwr-input.d.ts +54 -3
  385. package/types/ngwr-overlay.d.ts +84 -5
  386. package/types/ngwr-pipes.d.ts +2 -1
  387. package/types/ngwr-popconfirm-testing.d.ts +12 -3
  388. package/types/ngwr-popconfirm.d.ts +28 -3
  389. package/types/ngwr-popover-testing.d.ts +19 -2
  390. package/types/ngwr-popover.d.ts +22 -2
  391. package/types/ngwr-progress.d.ts +29 -1
  392. package/types/ngwr-pull-to-refresh-testing.d.ts +83 -0
  393. package/types/ngwr-resizable-testing.d.ts +116 -0
  394. package/types/ngwr-schema-form-testing.d.ts +260 -0
  395. package/types/ngwr-schema-form.d.ts +76 -6
  396. package/types/ngwr-select-testing.d.ts +20 -0
  397. package/types/ngwr-select.d.ts +149 -11
  398. package/types/ngwr-sidebar-testing.d.ts +176 -0
  399. package/types/ngwr-slider-testing.d.ts +3 -1
  400. package/types/ngwr-slider.d.ts +21 -1
  401. package/types/ngwr-sortable-list.d.ts +6 -0
  402. package/types/ngwr-stepper.d.ts +20 -11
  403. package/types/ngwr-table-testing.d.ts +122 -7
  404. package/types/ngwr-table.d.ts +572 -50
  405. package/types/ngwr-tabs-testing.d.ts +14 -17
  406. package/types/ngwr-tabs.d.ts +6 -0
  407. package/types/ngwr-textarea-testing.d.ts +10 -0
  408. package/types/ngwr-textarea.d.ts +48 -2
  409. package/types/ngwr-toast.d.ts +8 -1
  410. package/types/ngwr-tour-testing.d.ts +10 -0
  411. package/types/ngwr-tour.d.ts +11 -2
  412. package/types/ngwr-transfer-testing.d.ts +3 -0
  413. package/types/ngwr-transfer.d.ts +24 -1
  414. package/types/ngwr-tree-testing.d.ts +65 -1
  415. package/types/ngwr-tree.d.ts +335 -12
  416. package/types/ngwr-utils.d.ts +107 -1
  417. package/types/ngwr-version.d.ts +1 -1
  418. package/types/ngwr-window.d.ts +7 -4
@@ -1,6 +1,6 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import { Component, ViewEncapsulation, computed, input } from "@angular/core";
3
- import { coerceNumberProperty } from "@angular/cdk/coercion";
3
+ import { coerceBooleanProperty, coerceNumberProperty } from "@angular/cdk/coercion";
4
4
  import { wrCheckStyles } from "ngwr/utils";
5
5
  import { useI18nText } from "ngwr/i18n";
6
6
  /**
@@ -16,15 +16,26 @@ var WrProgress = class WrProgress {
16
16
  ariaLabel = input(null, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
17
17
  resolvedAriaLabel = useI18nText(this.ariaLabel, "progress.label", "Progress");
18
18
  color = input("primary", ...ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []);
19
+ size = input("md", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
19
20
  value = input(0, {
20
21
  ...ngDevMode ? { debugName: "value" } : /* istanbul ignore next */ {},
21
22
  transform: (v) => coerceNumberProperty(v, 0)
22
23
  });
24
+ indeterminate = input(false, {
25
+ ...ngDevMode ? { debugName: "indeterminate" } : /* istanbul ignore next */ {},
26
+ transform: coerceBooleanProperty
27
+ });
23
28
  clamped = computed(() => Math.max(0, Math.min(100, this.value())), ...ngDevMode ? [{ debugName: "clamped" }] : /* istanbul ignore next */ []);
24
- classes = computed(() => `wr-progress--${this.color()}`, ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
29
+ classes = computed(() => {
30
+ const parts = [`wr-progress--${this.color()}`];
31
+ const size = this.size();
32
+ if (size !== "md") parts.push(`wr-progress--${size}`);
33
+ if (this.indeterminate()) parts.push("wr-progress--indeterminate");
34
+ return parts.join(" ");
35
+ }, ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
25
36
  static ɵfac = i0.ɵɵngDeclareFactory({
26
37
  minVersion: "12.0.0",
27
- version: "22.2.5",
38
+ version: "22.2.6",
28
39
  ngImport: i0,
29
40
  type: WrProgress,
30
41
  deps: [],
@@ -32,7 +43,7 @@ var WrProgress = class WrProgress {
32
43
  });
33
44
  static ɵcmp = i0.ɵɵngDeclareComponent({
34
45
  minVersion: "17.1.0",
35
- version: "22.2.5",
46
+ version: "22.2.6",
36
47
  type: WrProgress,
37
48
  isStandalone: true,
38
49
  selector: "wr-progress",
@@ -51,12 +62,26 @@ var WrProgress = class WrProgress {
51
62
  isRequired: false,
52
63
  transformFunction: null
53
64
  },
65
+ size: {
66
+ classPropertyName: "size",
67
+ publicName: "size",
68
+ isSignal: true,
69
+ isRequired: false,
70
+ transformFunction: null
71
+ },
54
72
  value: {
55
73
  classPropertyName: "value",
56
74
  publicName: "value",
57
75
  isSignal: true,
58
76
  isRequired: false,
59
77
  transformFunction: null
78
+ },
79
+ indeterminate: {
80
+ classPropertyName: "indeterminate",
81
+ publicName: "indeterminate",
82
+ isSignal: true,
83
+ isRequired: false,
84
+ transformFunction: null
60
85
  }
61
86
  },
62
87
  host: {
@@ -66,34 +91,34 @@ var WrProgress = class WrProgress {
66
91
  "aria-valuemax": "100"
67
92
  },
68
93
  properties: {
69
- "attr.aria-valuenow": "clamped()",
94
+ "attr.aria-valuenow": "indeterminate() ? null : clamped()",
70
95
  "attr.aria-label": "resolvedAriaLabel()",
71
96
  "class": "classes()"
72
97
  },
73
98
  classAttribute: "wr-progress"
74
99
  },
75
100
  ngImport: i0,
76
- template: `<div class="wr-progress__bar" [style.width.%]="clamped()"></div>`,
101
+ template: `<div class="wr-progress__bar" [style.width.%]="indeterminate() ? null : clamped()"></div>`,
77
102
  isInline: true,
78
103
  encapsulation: i0.ViewEncapsulation.None
79
104
  });
80
105
  };
81
106
  i0.ɵɵngDeclareClassMetadata({
82
107
  minVersion: "12.0.0",
83
- version: "22.2.5",
108
+ version: "22.2.6",
84
109
  ngImport: i0,
85
110
  type: WrProgress,
86
111
  decorators: [{
87
112
  type: Component,
88
113
  args: [{
89
114
  selector: "wr-progress",
90
- template: `<div class="wr-progress__bar" [style.width.%]="clamped()"></div>`,
115
+ template: `<div class="wr-progress__bar" [style.width.%]="indeterminate() ? null : clamped()"></div>`,
91
116
  encapsulation: ViewEncapsulation.None,
92
117
  host: {
93
118
  role: "progressbar",
94
119
  "aria-valuemin": "0",
95
120
  "aria-valuemax": "100",
96
- "[attr.aria-valuenow]": "clamped()",
121
+ "[attr.aria-valuenow]": "indeterminate() ? null : clamped()",
97
122
  "[attr.aria-label]": "resolvedAriaLabel()",
98
123
  class: "wr-progress",
99
124
  "[class]": "classes()"
@@ -118,6 +143,14 @@ i0.ɵɵngDeclareClassMetadata({
118
143
  required: false
119
144
  }]
120
145
  }],
146
+ size: [{
147
+ type: i0.Input,
148
+ args: [{
149
+ isSignal: true,
150
+ alias: "size",
151
+ required: false
152
+ }]
153
+ }],
121
154
  value: [{
122
155
  type: i0.Input,
123
156
  args: [{
@@ -125,6 +158,14 @@ i0.ɵɵngDeclareClassMetadata({
125
158
  alias: "value",
126
159
  required: false
127
160
  }]
161
+ }],
162
+ indeterminate: [{
163
+ type: i0.Input,
164
+ args: [{
165
+ isSignal: true,
166
+ alias: "indeterminate",
167
+ required: false
168
+ }]
128
169
  }]
129
170
  }
130
171
  });
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-progress.mjs","names":[],"sources":["../../../projects/lib/progress/progress.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 { coerceNumberProperty } from '@angular/cdk/coercion';\nimport { Component, ViewEncapsulation, computed, input } from '@angular/core';\n\nimport { useI18nText } from 'ngwr/i18n';\nimport type { WrColor } from 'ngwr/theme';\nimport { wrCheckStyles } from 'ngwr/utils';\n\n/**\n * Horizontal progress bar.\n *\n * @example\n * ```html\n * <wr-progress [value]=\"42\" />\n * <wr-progress color=\"success\" [value]=\"80\" />\n * ```\n *\n * @see https://ngwr.dev/reference/components/progress\n */\n@Component({\n selector: 'wr-progress',\n template: `<div class=\"wr-progress__bar\" [style.width.%]=\"clamped()\"></div>`,\n encapsulation: ViewEncapsulation.None,\n host: {\n role: 'progressbar',\n 'aria-valuemin': '0',\n 'aria-valuemax': '100',\n '[attr.aria-valuenow]': 'clamped()',\n '[attr.aria-label]': 'resolvedAriaLabel()',\n class: 'wr-progress',\n '[class]': 'classes()',\n },\n})\nexport class WrProgress {\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('progress');\n }\n\n /** Accessible name — `role=\"progressbar\"` needs one. Falls back to `progress.label`. */\n readonly ariaLabel = input<string | null>(null);\n\n protected readonly resolvedAriaLabel = useI18nText(this.ariaLabel, 'progress.label', 'Progress');\n\n /**\n * Bar color.\n *\n * @default 'primary'\n */\n readonly color = input<WrColor>('primary');\n\n /**\n * Progress value, clamped to `[0, 100]`.\n *\n * @default 0\n */\n readonly value = input(0, { transform: (v: unknown): number => coerceNumberProperty(v, 0) });\n\n protected readonly clamped = computed(() => Math.max(0, Math.min(100, this.value())));\n\n protected readonly classes = computed(() => `wr-progress--${this.color()}`);\n}\n"],"mappings":";;;;;;;;;;;AAuCA,IAAa,aAAb,MAAa,WAAU;CACrB,cAAA;EACE,IAAI,OAAO,cAAc,eAAe,WAAW,cAAc,UAAU;CAC7E;CAGS,YAAY,MAAqB,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAE5B,oBAAoB,YAAY,KAAK,WAAW,kBAAkB,UAAU;CAOtF,QAAQ,MAAe,WAAU,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAOjC,QAAQ,MAAM,GAAC;EAAA,GAAA,YAAA,EAAA,WAAA,QAAA,+BAAA,CAAA;EAAI,YAAY,MAAuB,qBAAqB,GAAG,CAAC;CAAC,C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;EACF,CAAA"}
1
+ {"version":3,"file":"ngwr-progress.mjs","names":[],"sources":["../../../projects/lib/progress/progress.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';\nimport { Component, ViewEncapsulation, computed, input } from '@angular/core';\n\nimport { useI18nText } from 'ngwr/i18n';\nimport type { WrColor } from 'ngwr/theme';\nimport { wrCheckStyles } from 'ngwr/utils';\n\n/** Size of a `<wr-progress>`. */\nexport type WrProgressSize = 'sm' | 'md' | 'lg';\n\n/**\n * Horizontal progress bar.\n *\n * @example\n * ```html\n * <wr-progress [value]=\"42\" />\n * <wr-progress color=\"success\" [value]=\"80\" />\n * <wr-progress indeterminate />\n * ```\n *\n * @see https://ngwr.dev/reference/components/progress\n */\n@Component({\n selector: 'wr-progress',\n template: `<div class=\"wr-progress__bar\" [style.width.%]=\"indeterminate() ? null : clamped()\"></div>`,\n encapsulation: ViewEncapsulation.None,\n host: {\n role: 'progressbar',\n 'aria-valuemin': '0',\n 'aria-valuemax': '100',\n '[attr.aria-valuenow]': 'indeterminate() ? null : clamped()',\n '[attr.aria-label]': 'resolvedAriaLabel()',\n class: 'wr-progress',\n '[class]': 'classes()',\n },\n})\nexport class WrProgress {\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('progress');\n }\n\n /** Accessible name — `role=\"progressbar\"` needs one. Falls back to `progress.label`. */\n readonly ariaLabel = input<string | null>(null);\n\n protected readonly resolvedAriaLabel = useI18nText(this.ariaLabel, 'progress.label', 'Progress');\n\n /**\n * Bar color.\n *\n * @default 'primary'\n */\n readonly color = input<WrColor>('primary');\n\n /**\n * Bar thickness: 4px, 8px or 12px, through `--wr-progress-height`.\n *\n * @default 'md'\n */\n readonly size = input<WrProgressSize>('md');\n\n /**\n * Progress value, clamped to `[0, 100]`.\n *\n * @default 0\n */\n readonly value = input(0, { transform: (v: unknown): number => coerceNumberProperty(v, 0) });\n\n /**\n * Show that work is running without saying how far it has got: the bar sweeps,\n * `value` is ignored and `aria-valuenow` is left off, which is how a\n * progressbar says its value is unknown.\n *\n * @default false\n */\n readonly indeterminate = input(false, { transform: coerceBooleanProperty });\n\n protected readonly clamped = computed(() => Math.max(0, Math.min(100, this.value())));\n\n protected readonly classes = computed(() => {\n const parts = [`wr-progress--${this.color()}`];\n const size = this.size();\n if (size !== 'md') parts.push(`wr-progress--${size}`);\n if (this.indeterminate()) parts.push('wr-progress--indeterminate');\n return parts.join(' ');\n });\n}\n"],"mappings":";;;;;;;;;;;AA2CA,IAAa,aAAb,MAAa,WAAU;CACrB,cAAA;EACE,IAAI,OAAO,cAAc,eAAe,WAAW,cAAc,UAAU;CAC7E;CAGS,YAAY,MAAqB,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAE5B,oBAAoB,YAAY,KAAK,WAAW,kBAAkB,UAAU;CAOtF,QAAQ,MAAe,WAAU,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAOjC,OAAO,MAAsB,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAOlC,QAAQ,MAAM,GAAC;EAAA,GAAA,YAAA,EAAA,WAAA,QAAA,+BAAA,CAAA;EAAI,YAAY,MAAuB,qBAAqB,GAAG,CAAC;CAAC,CAAA;CAShF,gBAAgB,MAAM,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,gBAAA,+BAAA,CAAA;EAAI,WAAW;CAAqB,CAAA;CAErD,UAAU,eAAe,KAAK,IAAI,GAAG,KAAK,IAAI,KAAK,KAAK,MAAK,CAAE,CAAC,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAElE,UAAU,eAAc;EACzC,MAAM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EAdtB,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,UAAU;GACV,eAAe,kBAAkB;GACjC,MAAM;IACJ,MAAM;IACN,iBAAiB;IACjB,iBAAiB;IACjB,wBAAwB;IACxB,qBAAqB;IACrB,OAAO;IACP,WAAW;GACZ;EACF,CAAA"}
@@ -0,0 +1,57 @@
1
+ import { ComponentHarness, HarnessPredicate } from "@angular/cdk/testing";
2
+ /**
3
+ * @license
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
7
+ */
8
+ const FARTHEST_PULL = 4096;
9
+ var WrPullToRefreshHarness = class WrPullToRefreshHarness extends ComponentHarness {
10
+ static hostSelector = "wr-pull-to-refresh";
11
+ static with(options = {}) {
12
+ return new HarnessPredicate(WrPullToRefreshHarness, options).addOption("refreshing", options.refreshing, async (harness, refreshing) => await harness.isRefreshing() === refreshing);
13
+ }
14
+ indicator = this.locatorForOptional(".wr-pull-to-refresh__indicator");
15
+ async isRefreshing() {
16
+ return await this.indicator() !== null && !await this.isPulling();
17
+ }
18
+ async isPulling() {
19
+ return !await (await this.host()).hasClass("wr-pull-to-refresh--animating");
20
+ }
21
+ async getPullDistance() {
22
+ const style = await (await this.indicator())?.getAttribute("style") ?? "";
23
+ return Number.parseFloat(/(?:^|;)\s*height:\s*([\d.]+)px/.exec(style)?.[1] ?? "0");
24
+ }
25
+ async isArmed() {
26
+ if (!await this.isPulling()) return false;
27
+ const style = await (await this.locatorForOptional(".wr-pull-to-refresh__spinner")())?.getAttribute("style") ?? "";
28
+ return Number.parseFloat(/(?:^|;)\s*opacity:\s*([\d.]+)/.exec(style)?.[1] ?? "0") >= 1;
29
+ }
30
+ async getContentText() {
31
+ return (await this.locatorFor(".wr-pull-to-refresh__content")()).text();
32
+ }
33
+ async pullBy(travel) {
34
+ const host = await this.host();
35
+ await host.dispatchEvent("touchstart", { touches: [{ clientY: 0 }] });
36
+ await host.dispatchEvent("touchmove", { touches: [{ clientY: travel }] });
37
+ }
38
+ async release() {
39
+ await (await this.host()).dispatchEvent("touchend", { touches: [] });
40
+ }
41
+ async cancel() {
42
+ await (await this.host()).dispatchEvent("touchcancel", { touches: [] });
43
+ }
44
+ async pull() {
45
+ const host = await this.host();
46
+ await host.dispatchEvent("touchstart", { touches: [{ clientY: 0 }] });
47
+ for (let travel = 64; travel <= FARTHEST_PULL; travel *= 2) {
48
+ await host.dispatchEvent("touchmove", { touches: [{ clientY: travel }] });
49
+ if (await this.isArmed()) return this.release();
50
+ }
51
+ await this.cancel();
52
+ throw new Error("WrPullToRefreshHarness.pull(): the pull never armed. The wrapper is disabled, already refreshing, or scrolled away from its top, and each of those ignores the gesture.");
53
+ }
54
+ };
55
+ export { WrPullToRefreshHarness };
56
+
57
+ //# sourceMappingURL=ngwr-pull-to-refresh-testing.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngwr-pull-to-refresh-testing.mjs","names":[],"sources":["../../../projects/lib/pull-to-refresh/testing/wr-pull-to-refresh-harness.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport type { WrPullToRefreshHarnessFilters } from './types';\n\n/** How far past any sane `threshold` the finger travels before `pull()` gives up, in pixels. */\nconst FARTHEST_PULL = 4096;\n\n/**\n * Test harness for `<wr-pull-to-refresh>`.\n *\n * The component is a controlled spinner: a pull only fires `(refresh)`, and the\n * indicator stays open while the host binds `refreshing`. So {@link pull}\n * proves the gesture reached the handler, and {@link isRefreshing} proves the\n * handler set the flag. A spec that wants both asserts both.\n *\n * The gesture is sent as `touchstart`, `touchmove` and `touchend` events\n * carrying the one field the component reads, a `touches` list with a\n * `clientY`. That is what a unit test can send; the feel of the rubber band\n * needs a device. A pull starts only while the wrapper is scrolled to its top,\n * which is where every element is in a test with no layout.\n *\n * There is no `isDisabled()`: `disabled` writes nothing to the page. Pull, and\n * read what happened.\n *\n * @example\n * ```ts\n * const list = await loader.getHarness(WrPullToRefreshHarness);\n *\n * await list.pull();\n * expect(reload).toHaveBeenCalledOnce();\n * expect(await list.isRefreshing()).toBe(true);\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrPullToRefreshHarness extends ComponentHarness {\n static hostSelector = 'wr-pull-to-refresh';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrPullToRefreshHarnessFilters = {}): HarnessPredicate<WrPullToRefreshHarness> {\n return new HarnessPredicate(WrPullToRefreshHarness, options).addOption(\n 'refreshing',\n options.refreshing,\n async (harness, refreshing) => (await harness.isRefreshing()) === refreshing\n );\n }\n\n private readonly indicator = this.locatorForOptional('.wr-pull-to-refresh__indicator');\n\n /**\n * Whether a refresh is in flight: the indicator is drawn while no finger is\n * on the wrapper. At rest the component closes the indicator unless\n * `refreshing` holds it open, so the two together mean the bound flag is set.\n */\n async isRefreshing(): Promise<boolean> {\n return (await this.indicator()) !== null && !(await this.isPulling());\n }\n\n /** Whether a pull is under way, from the host losing its `wr-pull-to-refresh--animating` modifier. */\n async isPulling(): Promise<boolean> {\n return !(await (await this.host()).hasClass('wr-pull-to-refresh--animating'));\n }\n\n /**\n * How far the indicator is open, in pixels, from the height the component\n * wrote on it: `0` when it is closed.\n */\n async getPullDistance(): Promise<number> {\n const style = (await (await this.indicator())?.getAttribute('style')) ?? '';\n return Number.parseFloat(/(?:^|;)\\s*height:\\s*([\\d.]+)px/.exec(style)?.[1] ?? '0');\n }\n\n /**\n * Whether a pull under way has reached the threshold, so letting go would\n * refresh. Read from the spinner's opacity, which the component writes as the\n * pull's progress and which reaches `1` at the threshold. `false` with no\n * finger down: a refresh in flight holds the spinner at full opacity too.\n */\n async isArmed(): Promise<boolean> {\n if (!(await this.isPulling())) return false;\n const spinner = await this.locatorForOptional('.wr-pull-to-refresh__spinner')();\n const style = (await spinner?.getAttribute('style')) ?? '';\n return Number.parseFloat(/(?:^|;)\\s*opacity:\\s*([\\d.]+)/.exec(style)?.[1] ?? '0') >= 1;\n }\n\n /** The projected content, trimmed. */\n async getContentText(): Promise<string> {\n return (await this.locatorFor('.wr-pull-to-refresh__content')()).text();\n }\n\n /**\n * Put a finger down at the top and drag it `travel` pixels down, without\n * letting go. The indicator opens by half the travel. Follow with\n * {@link release} or {@link cancel}.\n */\n async pullBy(travel: number): Promise<void> {\n const host = await this.host();\n await host.dispatchEvent('touchstart', { touches: [{ clientY: 0 }] });\n await host.dispatchEvent('touchmove', { touches: [{ clientY: travel }] });\n }\n\n /** Lift the finger. An armed pull fires `(refresh)`; a shorter one closes. */\n async release(): Promise<void> {\n await (await this.host()).dispatchEvent('touchend', { touches: [] });\n }\n\n /** Abandon the pull the way the system does (`touchcancel`): nothing refreshes. */\n async cancel(): Promise<void> {\n await (await this.host()).dispatchEvent('touchcancel', { touches: [] });\n }\n\n /**\n * A whole pull: drag down until the indicator arms, then let go, which fires\n * `(refresh)` once.\n *\n * The `threshold` is not on the page, so the drag lengthens until the\n * component says it is armed. Throws when it never does, which is what a\n * disabled wrapper, one already refreshing and one scrolled away from its top\n * all do.\n */\n async pull(): Promise<void> {\n const host = await this.host();\n await host.dispatchEvent('touchstart', { touches: [{ clientY: 0 }] });\n for (let travel = 64; travel <= FARTHEST_PULL; travel *= 2) {\n await host.dispatchEvent('touchmove', { touches: [{ clientY: travel }] });\n if (await this.isArmed()) return this.release();\n }\n await this.cancel();\n throw new Error(\n 'WrPullToRefreshHarness.pull(): the pull never armed. The wrapper is disabled, already refreshing, ' +\n 'or scrolled away from its top, and each of those ignores the gesture.'\n );\n }\n}\n"],"mappings":";;;;;;;AAYA,MAAM,gBAAgB;AA8BtB,IAAa,yBAAb,MAAa,+BAA+B,iBAAgB;CAC1D,OAAO,eAAe;CAGtB,OAAO,KAAK,UAAyC,CAAA,GAAE;EACrD,OAAO,IAAI,iBAAi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A,CAAI,cAAc,eAAe,EAAE,SAAS,CAAA,EAAE,CAAE;CACxE;CAWA,MAAM,OAAI;EACR,MAAM,OAAO,MAAM,KAAK,KAAI;EAC5B,MAAM,KAAK,cAAc,cAAc,EAAE,SAAS,CAAC,EAAE,SAAS,EAAC,CAAE,EAAC,CAAE;EACpE,KAAK,IAAI,SAAS,IAAI,UAAU,eAAe,UAAU,GAAG;GAC1D,MAAM,KAAK,cAAc,aAAa,EAAE,SAAS,CAAC,EAAE,SAAS,OAAM,CAAE,EAAC,CAAE;GACxE,IAAI,MAAM,KAAK,QAAO,GAAI,OAAO,KAAK,QAAO;EAC/C;EACA,MAAM,KAAK,OAAM;EACjB,MAAM,IAAI,MACR,yKACyE;CAE7E"}
@@ -85,7 +85,7 @@ var WrPullToRefresh = class WrPullToRefresh {
85
85
  }
86
86
  static ɵfac = i0.ɵɵngDeclareFactory({
87
87
  minVersion: "12.0.0",
88
- version: "22.2.5",
88
+ version: "22.2.6",
89
89
  ngImport: i0,
90
90
  type: WrPullToRefresh,
91
91
  deps: [],
@@ -93,7 +93,7 @@ var WrPullToRefresh = class WrPullToRefresh {
93
93
  });
94
94
  static ɵcmp = i0.ɵɵngDeclareComponent({
95
95
  minVersion: "17.0.0",
96
- version: "22.2.5",
96
+ version: "22.2.6",
97
97
  type: WrPullToRefresh,
98
98
  isStandalone: true,
99
99
  selector: "wr-pull-to-refresh",
@@ -144,7 +144,7 @@ var WrPullToRefresh = class WrPullToRefresh {
144
144
  };
145
145
  i0.ɵɵngDeclareClassMetadata({
146
146
  minVersion: "12.0.0",
147
- version: "22.2.5",
147
+ version: "22.2.6",
148
148
  ngImport: i0,
149
149
  type: WrPullToRefresh,
150
150
  decorators: [{
@@ -1012,7 +1012,7 @@ var WrQr = class WrQr {
1012
1012
  }
1013
1013
  static ɵfac = i0.ɵɵngDeclareFactory({
1014
1014
  minVersion: "12.0.0",
1015
- version: "22.2.5",
1015
+ version: "22.2.6",
1016
1016
  ngImport: i0,
1017
1017
  type: WrQr,
1018
1018
  deps: [],
@@ -1020,7 +1020,7 @@ var WrQr = class WrQr {
1020
1020
  });
1021
1021
  static ɵcmp = i0.ɵɵngDeclareComponent({
1022
1022
  minVersion: "17.2.0",
1023
- version: "22.2.5",
1023
+ version: "22.2.6",
1024
1024
  type: WrQr,
1025
1025
  isStandalone: true,
1026
1026
  selector: "wr-qr",
@@ -1107,7 +1107,7 @@ var WrQr = class WrQr {
1107
1107
  };
1108
1108
  i0.ɵɵngDeclareClassMetadata({
1109
1109
  minVersion: "12.0.0",
1110
- version: "22.2.5",
1110
+ version: "22.2.6",
1111
1111
  ngImport: i0,
1112
1112
  type: WrQr,
1113
1113
  decorators: [{
@@ -57,7 +57,7 @@ var WrRadio = class WrRadio {
57
57
  }
58
58
  static ɵfac = i0.ɵɵngDeclareFactory({
59
59
  minVersion: "12.0.0",
60
- version: "22.2.5",
60
+ version: "22.2.6",
61
61
  ngImport: i0,
62
62
  type: WrRadio,
63
63
  deps: [],
@@ -65,7 +65,7 @@ var WrRadio = class WrRadio {
65
65
  });
66
66
  static ɵcmp = i0.ɵɵngDeclareComponent({
67
67
  minVersion: "17.0.0",
68
- version: "22.2.5",
68
+ version: "22.2.6",
69
69
  type: WrRadio,
70
70
  isStandalone: true,
71
71
  selector: "wr-radio",
@@ -126,7 +126,7 @@ var WrRadio = class WrRadio {
126
126
  };
127
127
  i0.ɵɵngDeclareClassMetadata({
128
128
  minVersion: "12.0.0",
129
- version: "22.2.5",
129
+ version: "22.2.6",
130
130
  ngImport: i0,
131
131
  type: WrRadio,
132
132
  decorators: [{
@@ -227,7 +227,7 @@ var WrRadioGroup = class WrRadioGroup {
227
227
  }
228
228
  static ɵfac = i0.ɵɵngDeclareFactory({
229
229
  minVersion: "12.0.0",
230
- version: "22.2.5",
230
+ version: "22.2.6",
231
231
  ngImport: i0,
232
232
  type: WrRadioGroup,
233
233
  deps: [],
@@ -235,7 +235,7 @@ var WrRadioGroup = class WrRadioGroup {
235
235
  });
236
236
  static ɵcmp = i0.ɵɵngDeclareComponent({
237
237
  minVersion: "17.1.0",
238
- version: "22.2.5",
238
+ version: "22.2.6",
239
239
  type: WrRadioGroup,
240
240
  isStandalone: true,
241
241
  selector: "wr-radio-group",
@@ -295,7 +295,7 @@ var WrRadioGroup = class WrRadioGroup {
295
295
  };
296
296
  i0.ɵɵngDeclareClassMetadata({
297
297
  minVersion: "12.0.0",
298
- version: "22.2.5",
298
+ version: "22.2.6",
299
299
  ngImport: i0,
300
300
  type: WrRadioGroup,
301
301
  decorators: [{
@@ -132,7 +132,7 @@ var WrRating = class WrRating {
132
132
  }
133
133
  static ɵfac = i0.ɵɵngDeclareFactory({
134
134
  minVersion: "12.0.0",
135
- version: "22.2.5",
135
+ version: "22.2.6",
136
136
  ngImport: i0,
137
137
  type: WrRating,
138
138
  deps: [],
@@ -140,7 +140,7 @@ var WrRating = class WrRating {
140
140
  });
141
141
  static ɵcmp = i0.ɵɵngDeclareComponent({
142
142
  minVersion: "17.0.0",
143
- version: "22.2.5",
143
+ version: "22.2.6",
144
144
  type: WrRating,
145
145
  isStandalone: true,
146
146
  selector: "wr-rating",
@@ -217,7 +217,7 @@ var WrRating = class WrRating {
217
217
  };
218
218
  i0.ɵɵngDeclareClassMetadata({
219
219
  minVersion: "12.0.0",
220
- version: "22.2.5",
220
+ version: "22.2.6",
221
221
  ngImport: i0,
222
222
  type: WrRating,
223
223
  decorators: [{
@@ -0,0 +1,113 @@
1
+ import { ComponentHarness, HarnessPredicate, TestKey } from "@angular/cdk/testing";
2
+ /**
3
+ * @license
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
7
+ */
8
+ const EDGES = [
9
+ "start",
10
+ "end",
11
+ "top",
12
+ "bottom"
13
+ ];
14
+ const MOST_PRESSES = 2048;
15
+ var WrResizableHarness = class WrResizableHarness extends ComponentHarness {
16
+ static hostSelector = ".wr-resizable";
17
+ static with(options = {}) {
18
+ return new HarnessPredicate(WrResizableHarness, options).addOption("label", options.label, (harness, label) => HarnessPredicate.stringMatches(harness.getLabel(), label)).addOption("edge", options.edge, async (harness, edge) => await harness.getEdge() === edge).addOption("disabled", options.disabled, async (harness, disabled) => await harness.isDisabled() === disabled).addOption("collapsed", options.collapsed, async (harness, collapsed) => await harness.isCollapsed() === collapsed);
19
+ }
20
+ async getEdge() {
21
+ const host = await this.host();
22
+ for (const edge of EDGES) if (await host.hasClass(`wr-resizable--${edge}`)) return edge;
23
+ throw new Error("WrResizableHarness.getEdge(): the host carries no wr-resizable--<edge> modifier.");
24
+ }
25
+ async getSize() {
26
+ const property = await this.isInline() ? "width" : "height";
27
+ const style = await (await this.host()).getAttribute("style") ?? "";
28
+ const written = new RegExp(`(?:^|;)\\s*${property}:\\s*(-?[\\d.]+)px`).exec(style)?.[1];
29
+ return written === void 0 ? null : Number.parseFloat(written);
30
+ }
31
+ async getAnnouncedSize() {
32
+ return this.numeric("aria-valuenow");
33
+ }
34
+ async getMinSize() {
35
+ return this.numeric("aria-valuemin");
36
+ }
37
+ async getMaxSize() {
38
+ return this.numeric("aria-valuemax");
39
+ }
40
+ async getLabel() {
41
+ return (await this.handle()).getAttribute("aria-label");
42
+ }
43
+ async isDisabled() {
44
+ return (await this.host()).hasClass("wr-resizable--disabled");
45
+ }
46
+ async isCollapsed() {
47
+ return (await this.host()).hasClass("wr-resizable--collapsed");
48
+ }
49
+ async isHandleActive() {
50
+ const handle = await this.handle();
51
+ return await handle.getAttribute("aria-disabled") !== "true" && await handle.getAttribute("tabindex") === "0";
52
+ }
53
+ async focus() {
54
+ return (await this.handle()).focus();
55
+ }
56
+ async isFocused() {
57
+ return (await this.handle()).isFocused();
58
+ }
59
+ async resizeBy(px) {
60
+ if (px === 0) return;
61
+ const handle = await this.handle();
62
+ const start = await this.getAnnouncedSize() ?? 0;
63
+ const target = start + px;
64
+ const edge = await this.getEdge();
65
+ const along = edge === "start" || edge === "end" ? [TestKey.RIGHT_ARROW, TestKey.LEFT_ARROW] : [TestKey.DOWN_ARROW, TestKey.UP_ARROW];
66
+ let [grow, shrink] = edge === "end" || edge === "bottom" ? along : [along[1], along[0]];
67
+ let now = start;
68
+ let turned = false;
69
+ for (let press = 0; now !== target && press < MOST_PRESSES; press++) {
70
+ const gap = target - now;
71
+ const [key, back] = gap > 0 ? [grow, shrink] : [shrink, grow];
72
+ await handle.sendKeys(key);
73
+ const next = await this.getAnnouncedSize() ?? 0;
74
+ if (Math.sign(next - now) === Math.sign(gap)) {
75
+ now = next;
76
+ if (Math.sign(target - now) === -Math.sign(gap)) break;
77
+ continue;
78
+ }
79
+ if (next !== now) await handle.sendKeys(back);
80
+ now = await this.getAnnouncedSize() ?? 0;
81
+ if (turned) break;
82
+ turned = true;
83
+ [grow, shrink] = [shrink, grow];
84
+ }
85
+ if (now !== target) throw new Error(`WrResizableHarness.resizeBy(${px}): the size stopped at ${now}, from ${start}. An arrow moves one \`step\`, a limit clamps, and a disabled or collapsed handle ignores its keys.`);
86
+ }
87
+ async resizeToMin() {
88
+ return (await this.handle()).sendKeys(TestKey.HOME);
89
+ }
90
+ async resizeToMax() {
91
+ if (await this.getMaxSize() === null) throw new Error("WrResizableHarness.resizeToMax(): the handle announces no maximum. A percentage `maxSize` resolves against the parent, which a test with no layout measures as zero: bind pixels.");
92
+ return (await this.handle()).sendKeys(TestKey.END);
93
+ }
94
+ async reset() {
95
+ return (await this.handle()).sendKeys(TestKey.ENTER);
96
+ }
97
+ async handle() {
98
+ const own = (await this.locatorForAll(".wr-resizable__handle[role=\"separator\"]")()).at(-1);
99
+ if (!own) throw new Error("WrResizableHarness: no handle. The directive adds it after the first render, in a browser only.");
100
+ return own;
101
+ }
102
+ async isInline() {
103
+ const edge = await this.getEdge();
104
+ return edge === "start" || edge === "end";
105
+ }
106
+ async numeric(attribute) {
107
+ const raw = await (await this.handle()).getAttribute(attribute);
108
+ return raw === null ? null : Number(raw);
109
+ }
110
+ };
111
+ export { WrResizableHarness };
112
+
113
+ //# sourceMappingURL=ngwr-resizable-testing.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngwr-resizable-testing.mjs","names":[],"sources":["../../../projects/lib/resizable/testing/wr-resizable-harness.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, HarnessPredicate, type TestElement, TestKey } from '@angular/cdk/testing';\n\nimport type { WrResizableEdge } from 'ngwr/resizable';\n\nimport type { WrResizableHarnessFilters } from './types';\n\nconst EDGES: readonly WrResizableEdge[] = ['start', 'end', 'top', 'bottom'];\n\n/** Presses `resizeBy()` spends before it gives up. */\nconst MOST_PRESSES = 2048;\n\n/**\n * Test harness for an element carrying `[wrResizable]`.\n *\n * The directive adds its handle after the first render in a browser, so the\n * harness finds none on the server or before the fixture has rendered.\n *\n * Two sizes, and they are two questions. {@link getSize} is the pixel size the\n * directive wrote on the element, `null` until something set one.\n * {@link getAnnouncedSize} is what the handle tells a screen reader, which\n * falls back to the element's measured size, and a unit test measures `0`.\n *\n * Sizes are written with the keyboard. There is no `dragBy()`: a drag also\n * works from pointer coordinates alone, but it needs pointer capture, which\n * jsdom does not implement, so the method would throw in the one environment\n * most specs run in. A percentage limit resolves against the parent's measured\n * size, so in a unit test `maxSize=\"60%\"` limits nothing: bind pixels there.\n *\n * @example\n * ```ts\n * const panel = await loader.getHarness(WrResizableHarness);\n *\n * await panel.resizeBy(40);\n * expect(await panel.getSize()).toBe(360);\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrResizableHarness extends ComponentHarness {\n static hostSelector = '.wr-resizable';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrResizableHarnessFilters = {}): HarnessPredicate<WrResizableHarness> {\n return new HarnessPredicate(WrResizableHarness, options)\n .addOption('label', options.label, (harness, label) => HarnessPredicate.stringMatches(harness.getLabel(), label))\n .addOption('edge', options.edge, async (harness, edge) => (await harness.getEdge()) === edge)\n .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled)\n .addOption(\n 'collapsed',\n options.collapsed,\n async (harness, collapsed) => (await harness.isCollapsed()) === collapsed\n );\n }\n\n /**\n * The edge that drags, from the host's `wr-resizable--<edge>` modifier.\n * Throws when the host carries none: the directive always writes one.\n */\n async getEdge(): Promise<WrResizableEdge> {\n const host = await this.host();\n for (const edge of EDGES) {\n if (await host.hasClass(`wr-resizable--${edge}`)) return edge;\n }\n throw new Error('WrResizableHarness.getEdge(): the host carries no wr-resizable--<edge> modifier.');\n }\n\n /**\n * The size the directive wrote on the element, in pixels: its inline\n * `width` for the `start` and `end` edges, its `height` for `top` and\n * `bottom`. `null` while the element still has the size its CSS gives it,\n * and `0` while collapsed.\n */\n async getSize(): Promise<number | null> {\n const property = (await this.isInline()) ? 'width' : 'height';\n const style = (await (await this.host()).getAttribute('style')) ?? '';\n const written = new RegExp(`(?:^|;)\\\\s*${property}:\\\\s*(-?[\\\\d.]+)px`).exec(style)?.[1];\n return written === undefined ? null : Number.parseFloat(written);\n }\n\n /**\n * The size the handle announces (`aria-valuenow`), in whole pixels, or\n * `null` when it announces none. Without a size set this is the element's\n * measured size, which a test with no layout reports as `0`.\n */\n async getAnnouncedSize(): Promise<number | null> {\n return this.numeric('aria-valuenow');\n }\n\n /** The smallest size, in pixels, from `aria-valuemin`. */\n async getMinSize(): Promise<number | null> {\n return this.numeric('aria-valuemin');\n }\n\n /** The largest size, in pixels, from `aria-valuemax`: `null` when there is no maximum. */\n async getMaxSize(): Promise<number | null> {\n return this.numeric('aria-valuemax');\n }\n\n /** The handle's accessible name. */\n async getLabel(): Promise<string | null> {\n return (await this.handle()).getAttribute('aria-label');\n }\n\n /** Whether `disabled` is set, from the host's `wr-resizable--disabled` modifier. */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).hasClass('wr-resizable--disabled');\n }\n\n /** Whether the element is collapsed to zero, from the host's `wr-resizable--collapsed` modifier. */\n async isCollapsed(): Promise<boolean> {\n return (await this.host()).hasClass('wr-resizable--collapsed');\n }\n\n /**\n * Whether the handle takes the keyboard: it is neither disabled nor\n * collapsed. Read from what the handle says, `aria-disabled` and its\n * `tabindex` together, since a handle that is announced inert and still a\n * tab stop is the bug.\n */\n async isHandleActive(): Promise<boolean> {\n const handle = await this.handle();\n return (await handle.getAttribute('aria-disabled')) !== 'true' && (await handle.getAttribute('tabindex')) === '0';\n }\n\n /** Move keyboard focus to the handle. */\n async focus(): Promise<void> {\n return (await this.handle()).focus();\n }\n\n /** Whether the handle holds focus. */\n async isFocused(): Promise<boolean> {\n return (await this.handle()).isFocused();\n }\n\n /**\n * Grow (`px > 0`) or shrink (`px < 0`) the element by pressing the arrow\n * keys on its handle, one `step` a press.\n *\n * Which arrow grows depends on the edge and on the reading direction, which a\n * harness cannot read, so the walk watches where each press lands and turns\n * around when the first one went the wrong way. That costs two extra\n * `sizeChange` emissions under `dir=\"rtl\"`.\n *\n * Throws rather than half-arriving, with where the size stopped: when `px`\n * is not a multiple of `step`, when a limit is in the way, and when the\n * handle is disabled or collapsed.\n */\n async resizeBy(px: number): Promise<void> {\n if (px === 0) return;\n const handle = await this.handle();\n const start = (await this.getAnnouncedSize()) ?? 0;\n const target = start + px;\n\n const edge = await this.getEdge();\n const along =\n edge === 'start' || edge === 'end'\n ? [TestKey.RIGHT_ARROW, TestKey.LEFT_ARROW]\n : [TestKey.DOWN_ARROW, TestKey.UP_ARROW];\n // The `start` and `top` edges grow the element toward lower coordinates.\n let [grow, shrink] = edge === 'end' || edge === 'bottom' ? along : [along[1], along[0]];\n\n let now = start;\n let turned = false;\n for (let press = 0; now !== target && press < MOST_PRESSES; press++) {\n const gap = target - now;\n const [key, back] = gap > 0 ? [grow, shrink] : [shrink, grow];\n await handle.sendKeys(key);\n const next = (await this.getAnnouncedSize()) ?? 0;\n\n if (Math.sign(next - now) === Math.sign(gap)) {\n now = next;\n // Stepped over the target: `px` is not a multiple of `step`.\n if (Math.sign(target - now) === -Math.sign(gap)) break;\n continue;\n }\n // Nothing moved, or it moved away: the page reads right to left, a limit\n // is in the way, or the handle is inert. Put a wrong step back, turn once.\n if (next !== now) await handle.sendKeys(back);\n now = (await this.getAnnouncedSize()) ?? 0;\n if (turned) break;\n turned = true;\n [grow, shrink] = [shrink, grow];\n }\n\n if (now !== target) {\n throw new Error(\n `WrResizableHarness.resizeBy(${px}): the size stopped at ${now}, from ${start}. An arrow moves one ` +\n '`step`, a limit clamps, and a disabled or collapsed handle ignores its keys.'\n );\n }\n }\n\n /** Press Home: the element goes to its smallest size. */\n async resizeToMin(): Promise<void> {\n return (await this.handle()).sendKeys(TestKey.HOME);\n }\n\n /**\n * Press End: the element goes to its largest size. Throws when it has no\n * maximum, where the key has nowhere to go and the component ignores it.\n */\n async resizeToMax(): Promise<void> {\n if ((await this.getMaxSize()) === null) {\n throw new Error(\n 'WrResizableHarness.resizeToMax(): the handle announces no maximum. A percentage `maxSize` resolves ' +\n 'against the parent, which a test with no layout measures as zero: bind pixels.'\n );\n }\n return (await this.handle()).sendKeys(TestKey.END);\n }\n\n /** Press Enter: the size goes back to `defaultSize`, or to what the element started with. */\n async reset(): Promise<void> {\n return (await this.handle()).sendKeys(TestKey.ENTER);\n }\n\n /**\n * The directive appends its handle as the host's last child, so a resizable\n * nested inside this one has its handle earlier in the document: the last\n * match is this element's own.\n */\n private async handle(): Promise<TestElement> {\n const handles = await this.locatorForAll('.wr-resizable__handle[role=\"separator\"]')();\n const own = handles.at(-1);\n if (!own) {\n throw new Error(\n 'WrResizableHarness: no handle. The directive adds it after the first render, in a browser only.'\n );\n }\n return own;\n }\n\n private async isInline(): Promise<boolean> {\n const edge = await this.getEdge();\n return edge === 'start' || edge === 'end';\n }\n\n private async numeric(attribute: string): Promise<number | null> {\n const raw = await (await this.handle()).getAttribute(attribute);\n return raw === null ? null : Number(raw);\n }\n}\n"],"mappings":";;;;;;;AAaA,MAAM,QA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293
293
  ngImport: i0,
294
294
  type: WrResizable,
295
295
  deps: [],
@@ -297,7 +297,7 @@ var WrResizable = class WrResizable {
297
297
  });
298
298
  static ɵdir = i0.ɵɵngDeclareDirective({
299
299
  minVersion: "17.1.0",
300
- version: "22.2.5",
300
+ version: "22.2.6",
301
301
  type: WrResizable,
302
302
  isStandalone: true,
303
303
  selector: "[wrResizable]",
@@ -391,7 +391,7 @@ var WrResizable = class WrResizable {
391
391
  };
392
392
  i0.ɵɵngDeclareClassMetadata({
393
393
  minVersion: "12.0.0",
394
- version: "22.2.5",
394
+ version: "22.2.6",
395
395
  ngImport: i0,
396
396
  type: WrResizable,
397
397
  decorators: [{
@@ -18,7 +18,7 @@ var WrResult = class WrResult {
18
18
  classes = computed(() => `wr-result--${this.status()}`, ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
19
19
  static ɵfac = i0.ɵɵngDeclareFactory({
20
20
  minVersion: "12.0.0",
21
- version: "22.2.5",
21
+ version: "22.2.6",
22
22
  ngImport: i0,
23
23
  type: WrResult,
24
24
  deps: [],
@@ -26,7 +26,7 @@ var WrResult = class WrResult {
26
26
  });
27
27
  static ɵcmp = i0.ɵɵngDeclareComponent({
28
28
  minVersion: "17.0.0",
29
- version: "22.2.5",
29
+ version: "22.2.6",
30
30
  type: WrResult,
31
31
  isStandalone: true,
32
32
  selector: "wr-result",
@@ -67,7 +67,7 @@ var WrResult = class WrResult {
67
67
  };
68
68
  i0.ɵɵngDeclareClassMetadata({
69
69
  minVersion: "12.0.0",
70
- version: "22.2.5",
70
+ version: "22.2.6",
71
71
  ngImport: i0,
72
72
  type: WrResult,
73
73
  decorators: [{
@@ -127,7 +127,7 @@ var WrResult404 = class WrResult404 {
127
127
  desc = useI18nText(this.description, "result.notFound", "Sorry, the page you visited does not exist.");
128
128
  static ɵfac = i0.ɵɵngDeclareFactory({
129
129
  minVersion: "12.0.0",
130
- version: "22.2.5",
130
+ version: "22.2.6",
131
131
  ngImport: i0,
132
132
  type: WrResult404,
133
133
  deps: [],
@@ -135,7 +135,7 @@ var WrResult404 = class WrResult404 {
135
135
  });
136
136
  static ɵcmp = i0.ɵɵngDeclareComponent({
137
137
  minVersion: "17.1.0",
138
- version: "22.2.5",
138
+ version: "22.2.6",
139
139
  type: WrResult404,
140
140
  isStandalone: true,
141
141
  selector: "wr-result-404",
@@ -173,7 +173,7 @@ var WrResult404 = class WrResult404 {
173
173
  };
174
174
  i0.ɵɵngDeclareClassMetadata({
175
175
  minVersion: "12.0.0",
176
- version: "22.2.5",
176
+ version: "22.2.6",
177
177
  ngImport: i0,
178
178
  type: WrResult404,
179
179
  decorators: [{
@@ -216,7 +216,7 @@ var WrResult403 = class WrResult403 {
216
216
  desc = useI18nText(this.description, "result.forbidden", "Sorry, you are not authorized to access this page.");
217
217
  static ɵfac = i0.ɵɵngDeclareFactory({
218
218
  minVersion: "12.0.0",
219
- version: "22.2.5",
219
+ version: "22.2.6",
220
220
  ngImport: i0,
221
221
  type: WrResult403,
222
222
  deps: [],
@@ -224,7 +224,7 @@ var WrResult403 = class WrResult403 {
224
224
  });
225
225
  static ɵcmp = i0.ɵɵngDeclareComponent({
226
226
  minVersion: "17.1.0",
227
- version: "22.2.5",
227
+ version: "22.2.6",
228
228
  type: WrResult403,
229
229
  isStandalone: true,
230
230
  selector: "wr-result-403",
@@ -262,7 +262,7 @@ var WrResult403 = class WrResult403 {
262
262
  };
263
263
  i0.ɵɵngDeclareClassMetadata({
264
264
  minVersion: "12.0.0",
265
- version: "22.2.5",
265
+ version: "22.2.6",
266
266
  ngImport: i0,
267
267
  type: WrResult403,
268
268
  decorators: [{
@@ -305,7 +305,7 @@ var WrResult500 = class WrResult500 {
305
305
  desc = useI18nText(this.description, "result.serverError", "Sorry, something went wrong.");
306
306
  static ɵfac = i0.ɵɵngDeclareFactory({
307
307
  minVersion: "12.0.0",
308
- version: "22.2.5",
308
+ version: "22.2.6",
309
309
  ngImport: i0,
310
310
  type: WrResult500,
311
311
  deps: [],
@@ -313,7 +313,7 @@ var WrResult500 = class WrResult500 {
313
313
  });
314
314
  static ɵcmp = i0.ɵɵngDeclareComponent({
315
315
  minVersion: "17.1.0",
316
- version: "22.2.5",
316
+ version: "22.2.6",
317
317
  type: WrResult500,
318
318
  isStandalone: true,
319
319
  selector: "wr-result-500",
@@ -351,7 +351,7 @@ var WrResult500 = class WrResult500 {
351
351
  };
352
352
  i0.ɵɵngDeclareClassMetadata({
353
353
  minVersion: "12.0.0",
354
- version: "22.2.5",
354
+ version: "22.2.6",
355
355
  ngImport: i0,
356
356
  type: WrResult500,
357
357
  decorators: [{