ngwr 16.5.0 → 16.7.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 (450) hide show
  1. package/avatar/styles/_index.scss +39 -0
  2. package/back-top/styles/_index.scss +6 -0
  3. package/breadcrumbs/styles/_rules.scss +34 -0
  4. package/button/styles/_index.scss +45 -2
  5. package/cascader/styles/_rules.scss +7 -0
  6. package/charts/chart-legend/styles/_index.scss +1 -9
  7. package/copy-value/styles/_index.scss +4 -0
  8. package/counter/styles/_index.scss +1 -8
  9. package/date-picker/styles/_index.scss +15 -9
  10. package/dialog/styles/_index.scss +37 -0
  11. package/dropdown/styles/_index.scss +17 -0
  12. package/editor/styles/_index.scss +1 -8
  13. package/event-calendar/styles/_index.scss +2 -6
  14. package/fesm2022/ngwr-affix.mjs +4 -4
  15. package/fesm2022/ngwr-affix.mjs.map +1 -1
  16. package/fesm2022/ngwr-alert.mjs +3 -3
  17. package/fesm2022/ngwr-anchor.mjs +12 -5
  18. package/fesm2022/ngwr-anchor.mjs.map +1 -1
  19. package/fesm2022/ngwr-animations-aurora.mjs +3 -3
  20. package/fesm2022/ngwr-animations-aurora.mjs.map +1 -1
  21. package/fesm2022/ngwr-animations-blur-reveal.mjs +3 -3
  22. package/fesm2022/ngwr-animations-blur-reveal.mjs.map +1 -1
  23. package/fesm2022/ngwr-animations-click-sparks.mjs +3 -3
  24. package/fesm2022/ngwr-animations-click-sparks.mjs.map +1 -1
  25. package/fesm2022/ngwr-animations-confetti.mjs +3 -3
  26. package/fesm2022/ngwr-animations-confetti.mjs.map +1 -1
  27. package/fesm2022/ngwr-animations-decode.mjs +3 -3
  28. package/fesm2022/ngwr-animations-decode.mjs.map +1 -1
  29. package/fesm2022/ngwr-animations-destruct.mjs +3 -3
  30. package/fesm2022/ngwr-animations-destruct.mjs.map +1 -1
  31. package/fesm2022/ngwr-animations-dot-grid.mjs +3 -3
  32. package/fesm2022/ngwr-animations-dot-grid.mjs.map +1 -1
  33. package/fesm2022/ngwr-animations-falling-letters.mjs +3 -3
  34. package/fesm2022/ngwr-animations-falling-letters.mjs.map +1 -1
  35. package/fesm2022/ngwr-animations-flow-lines.mjs +3 -3
  36. package/fesm2022/ngwr-animations-flow-lines.mjs.map +1 -1
  37. package/fesm2022/ngwr-animations-fluid-cursor.mjs +3 -3
  38. package/fesm2022/ngwr-animations-fluid-cursor.mjs.map +1 -1
  39. package/fesm2022/ngwr-animations-glitch.mjs +3 -3
  40. package/fesm2022/ngwr-animations-glitch.mjs.map +1 -1
  41. package/fesm2022/ngwr-animations-glow-border.mjs +3 -3
  42. package/fesm2022/ngwr-animations-glow-border.mjs.map +1 -1
  43. package/fesm2022/ngwr-animations-gradient-flow.mjs +3 -3
  44. package/fesm2022/ngwr-animations-gradient-flow.mjs.map +1 -1
  45. package/fesm2022/ngwr-animations-marquee.mjs +4 -3
  46. package/fesm2022/ngwr-animations-marquee.mjs.map +1 -1
  47. package/fesm2022/ngwr-animations-orbit.mjs +3 -3
  48. package/fesm2022/ngwr-animations-orbit.mjs.map +1 -1
  49. package/fesm2022/ngwr-animations-reveal.mjs +3 -3
  50. package/fesm2022/ngwr-animations-reveal.mjs.map +1 -1
  51. package/fesm2022/ngwr-animations-ripple-grid.mjs +3 -3
  52. package/fesm2022/ngwr-animations-ripple-grid.mjs.map +1 -1
  53. package/fesm2022/ngwr-animations-rotate-reveal.mjs +3 -3
  54. package/fesm2022/ngwr-animations-rotate-reveal.mjs.map +1 -1
  55. package/fesm2022/ngwr-animations-shimmer.mjs +3 -3
  56. package/fesm2022/ngwr-animations-shimmer.mjs.map +1 -1
  57. package/fesm2022/ngwr-animations-spotlight.mjs +3 -3
  58. package/fesm2022/ngwr-animations-spotlight.mjs.map +1 -1
  59. package/fesm2022/ngwr-animations-thread-lines.mjs +3 -3
  60. package/fesm2022/ngwr-animations-thread-lines.mjs.map +1 -1
  61. package/fesm2022/ngwr-animations-tilt.mjs +23 -16
  62. package/fesm2022/ngwr-animations-tilt.mjs.map +1 -1
  63. package/fesm2022/ngwr-animations-typewriter.mjs +3 -3
  64. package/fesm2022/ngwr-animations-typewriter.mjs.map +1 -1
  65. package/fesm2022/ngwr-avatar.mjs +171 -6
  66. package/fesm2022/ngwr-avatar.mjs.map +1 -1
  67. package/fesm2022/ngwr-back-top.mjs +3 -3
  68. package/fesm2022/ngwr-badge.mjs +6 -6
  69. package/fesm2022/ngwr-breadcrumbs.mjs +47 -13
  70. package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
  71. package/fesm2022/ngwr-burger.mjs +3 -3
  72. package/fesm2022/ngwr-button.mjs +38 -9
  73. package/fesm2022/ngwr-button.mjs.map +1 -1
  74. package/fesm2022/ngwr-calendar.mjs +3 -3
  75. package/fesm2022/ngwr-card.mjs +9 -9
  76. package/fesm2022/ngwr-carousel.mjs +14 -8
  77. package/fesm2022/ngwr-carousel.mjs.map +1 -1
  78. package/fesm2022/ngwr-cascader.mjs +27 -7
  79. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  80. package/fesm2022/ngwr-charts-bar-chart.mjs +3 -3
  81. package/fesm2022/ngwr-charts-boxplot-chart.mjs +3 -3
  82. package/fesm2022/ngwr-charts-bullet-chart.mjs +3 -3
  83. package/fesm2022/ngwr-charts-calendar-heatmap.mjs +3 -3
  84. package/fesm2022/ngwr-charts-candlestick-chart.mjs +3 -3
  85. package/fesm2022/ngwr-charts-chart-legend.mjs +9 -9
  86. package/fesm2022/ngwr-charts-core.mjs +18 -11
  87. package/fesm2022/ngwr-charts-core.mjs.map +1 -1
  88. package/fesm2022/ngwr-charts-donut-chart.mjs +3 -3
  89. package/fesm2022/ngwr-charts-funnel-chart.mjs +3 -3
  90. package/fesm2022/ngwr-charts-gauge.mjs +3 -3
  91. package/fesm2022/ngwr-charts-heatmap-chart.mjs +3 -3
  92. package/fesm2022/ngwr-charts-line-chart.mjs +3 -3
  93. package/fesm2022/ngwr-charts-meter-group.mjs +7 -5
  94. package/fesm2022/ngwr-charts-meter-group.mjs.map +1 -1
  95. package/fesm2022/ngwr-charts-radar-chart.mjs +3 -3
  96. package/fesm2022/ngwr-charts-scatter-chart.mjs +3 -3
  97. package/fesm2022/ngwr-charts-sparkline.mjs +3 -3
  98. package/fesm2022/ngwr-charts-treemap-chart.mjs +3 -3
  99. package/fesm2022/ngwr-charts-waterfall-chart.mjs +3 -3
  100. package/fesm2022/ngwr-checkbox.mjs +9 -8
  101. package/fesm2022/ngwr-checkbox.mjs.map +1 -1
  102. package/fesm2022/ngwr-clipboard.mjs +3 -3
  103. package/fesm2022/ngwr-collapse.mjs +9 -9
  104. package/fesm2022/ngwr-color-picker.mjs +27 -7
  105. package/fesm2022/ngwr-color-picker.mjs.map +1 -1
  106. package/fesm2022/ngwr-command-palette.mjs +3 -3
  107. package/fesm2022/ngwr-comment.mjs +7 -6
  108. package/fesm2022/ngwr-comment.mjs.map +1 -1
  109. package/fesm2022/ngwr-compare.mjs +3 -3
  110. package/fesm2022/ngwr-context-menu.mjs +16 -17
  111. package/fesm2022/ngwr-context-menu.mjs.map +1 -1
  112. package/fesm2022/ngwr-cookie.mjs +3 -3
  113. package/fesm2022/ngwr-copy-value.mjs +3 -3
  114. package/fesm2022/ngwr-counter.mjs +6 -6
  115. package/fesm2022/ngwr-date-picker-testing.mjs +35 -0
  116. package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
  117. package/fesm2022/ngwr-date-picker.mjs +151 -54
  118. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  119. package/fesm2022/ngwr-date-stamp.mjs +3 -3
  120. package/fesm2022/ngwr-date.mjs +40 -16
  121. package/fesm2022/ngwr-date.mjs.map +1 -1
  122. package/fesm2022/ngwr-density.mjs +6 -6
  123. package/fesm2022/ngwr-descriptions.mjs +6 -6
  124. package/fesm2022/ngwr-dialog.mjs +35 -24
  125. package/fesm2022/ngwr-dialog.mjs.map +1 -1
  126. package/fesm2022/ngwr-directives.mjs +189 -23
  127. package/fesm2022/ngwr-directives.mjs.map +1 -1
  128. package/fesm2022/ngwr-divider.mjs +3 -3
  129. package/fesm2022/ngwr-drawer.mjs +18 -18
  130. package/fesm2022/ngwr-dropdown-testing.mjs +5 -1
  131. package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -1
  132. package/fesm2022/ngwr-dropdown.mjs +59 -16
  133. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  134. package/fesm2022/ngwr-editor.mjs +6 -5
  135. package/fesm2022/ngwr-editor.mjs.map +1 -1
  136. package/fesm2022/ngwr-empty.mjs +3 -3
  137. package/fesm2022/ngwr-event-calendar.mjs +27 -15
  138. package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
  139. package/fesm2022/ngwr-file-upload-testing.mjs +5 -0
  140. package/fesm2022/ngwr-file-upload-testing.mjs.map +1 -1
  141. package/fesm2022/ngwr-file-upload.mjs +68 -13
  142. package/fesm2022/ngwr-file-upload.mjs.map +1 -1
  143. package/fesm2022/ngwr-form.mjs +181 -12
  144. package/fesm2022/ngwr-form.mjs.map +1 -1
  145. package/fesm2022/ngwr-graph-testing.mjs +30 -0
  146. package/fesm2022/ngwr-graph-testing.mjs.map +1 -1
  147. package/fesm2022/ngwr-graph.mjs +100 -11
  148. package/fesm2022/ngwr-graph.mjs.map +1 -1
  149. package/fesm2022/ngwr-hotkey.mjs +6 -6
  150. package/fesm2022/ngwr-i18n-ar.mjs +21 -2
  151. package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
  152. package/fesm2022/ngwr-i18n-cs.mjs +21 -2
  153. package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
  154. package/fesm2022/ngwr-i18n-de.mjs +21 -2
  155. package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
  156. package/fesm2022/ngwr-i18n-en.mjs +21 -2
  157. package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
  158. package/fesm2022/ngwr-i18n-es.mjs +21 -2
  159. package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
  160. package/fesm2022/ngwr-i18n-fr.mjs +21 -2
  161. package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
  162. package/fesm2022/ngwr-i18n-he.mjs +21 -2
  163. package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
  164. package/fesm2022/ngwr-i18n-hi.mjs +21 -2
  165. package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
  166. package/fesm2022/ngwr-i18n-id.mjs +21 -2
  167. package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
  168. package/fesm2022/ngwr-i18n-it.mjs +21 -2
  169. package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
  170. package/fesm2022/ngwr-i18n-ja.mjs +21 -2
  171. package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
  172. package/fesm2022/ngwr-i18n-kk.mjs +520 -0
  173. package/fesm2022/ngwr-i18n-kk.mjs.map +1 -0
  174. package/fesm2022/ngwr-i18n-ko.mjs +21 -2
  175. package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
  176. package/fesm2022/ngwr-i18n-nl.mjs +21 -2
  177. package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
  178. package/fesm2022/ngwr-i18n-pl.mjs +21 -2
  179. package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
  180. package/fesm2022/ngwr-i18n-pt.mjs +21 -2
  181. package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
  182. package/fesm2022/ngwr-i18n-ru.mjs +21 -2
  183. package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
  184. package/fesm2022/ngwr-i18n-sv.mjs +21 -2
  185. package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
  186. package/fesm2022/ngwr-i18n-tr.mjs +21 -2
  187. package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
  188. package/fesm2022/ngwr-i18n-uk.mjs +21 -2
  189. package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
  190. package/fesm2022/ngwr-i18n-vi.mjs +21 -2
  191. package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
  192. package/fesm2022/ngwr-i18n-zh-tw.mjs +21 -2
  193. package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
  194. package/fesm2022/ngwr-i18n-zh.mjs +21 -2
  195. package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
  196. package/fesm2022/ngwr-i18n.mjs +91 -20
  197. package/fesm2022/ngwr-i18n.mjs.map +1 -1
  198. package/fesm2022/ngwr-icon.mjs +6 -6
  199. package/fesm2022/ngwr-image-cropper.mjs +8 -4
  200. package/fesm2022/ngwr-image-cropper.mjs.map +1 -1
  201. package/fesm2022/ngwr-input-number.mjs +27 -4
  202. package/fesm2022/ngwr-input-number.mjs.map +1 -1
  203. package/fesm2022/ngwr-input-otp.mjs +5 -5
  204. package/fesm2022/ngwr-input-otp.mjs.map +1 -1
  205. package/fesm2022/ngwr-input.mjs +25 -17
  206. package/fesm2022/ngwr-input.mjs.map +1 -1
  207. package/fesm2022/ngwr-keyboard.mjs +3 -3
  208. package/fesm2022/ngwr-knob.mjs +3 -3
  209. package/fesm2022/ngwr-layout.mjs +15 -15
  210. package/fesm2022/ngwr-layout.mjs.map +1 -1
  211. package/fesm2022/ngwr-lightbox.mjs +8 -8
  212. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  213. package/fesm2022/ngwr-list.mjs +9 -9
  214. package/fesm2022/ngwr-list.mjs.map +1 -1
  215. package/fesm2022/ngwr-load-state.mjs +16 -15
  216. package/fesm2022/ngwr-load-state.mjs.map +1 -1
  217. package/fesm2022/ngwr-loading-bar-router.mjs.map +1 -1
  218. package/fesm2022/ngwr-loading-bar.mjs +8 -8
  219. package/fesm2022/ngwr-loading-bar.mjs.map +1 -1
  220. package/fesm2022/ngwr-mention.mjs +14 -6
  221. package/fesm2022/ngwr-mention.mjs.map +1 -1
  222. package/fesm2022/ngwr-meta.mjs +15 -12
  223. package/fesm2022/ngwr-meta.mjs.map +1 -1
  224. package/fesm2022/ngwr-overlay.mjs +9 -9
  225. package/fesm2022/ngwr-page-header.mjs +24 -3
  226. package/fesm2022/ngwr-page-header.mjs.map +1 -1
  227. package/fesm2022/ngwr-pagination-testing.mjs +3 -0
  228. package/fesm2022/ngwr-pagination-testing.mjs.map +1 -1
  229. package/fesm2022/ngwr-pagination.mjs +34 -5
  230. package/fesm2022/ngwr-pagination.mjs.map +1 -1
  231. package/fesm2022/ngwr-pipes.mjs +35 -28
  232. package/fesm2022/ngwr-pipes.mjs.map +1 -1
  233. package/fesm2022/ngwr-platform.mjs +9 -9
  234. package/fesm2022/ngwr-popconfirm.mjs +9 -7
  235. package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
  236. package/fesm2022/ngwr-popover.mjs +162 -18
  237. package/fesm2022/ngwr-popover.mjs.map +1 -1
  238. package/fesm2022/ngwr-progress.mjs +75 -10
  239. package/fesm2022/ngwr-progress.mjs.map +1 -1
  240. package/fesm2022/ngwr-pull-to-refresh.mjs +3 -3
  241. package/fesm2022/ngwr-qr.mjs +9 -5
  242. package/fesm2022/ngwr-qr.mjs.map +1 -1
  243. package/fesm2022/ngwr-radio.mjs +77 -11
  244. package/fesm2022/ngwr-radio.mjs.map +1 -1
  245. package/fesm2022/ngwr-rating.mjs +3 -3
  246. package/fesm2022/ngwr-resizable.mjs +3 -3
  247. package/fesm2022/ngwr-result.mjs +12 -12
  248. package/fesm2022/ngwr-schema-form.mjs +20 -7
  249. package/fesm2022/ngwr-schema-form.mjs.map +1 -1
  250. package/fesm2022/ngwr-scroll.mjs +233 -10
  251. package/fesm2022/ngwr-scroll.mjs.map +1 -1
  252. package/fesm2022/ngwr-segmented.mjs +23 -3
  253. package/fesm2022/ngwr-segmented.mjs.map +1 -1
  254. package/fesm2022/ngwr-select.mjs +106 -26
  255. package/fesm2022/ngwr-select.mjs.map +1 -1
  256. package/fesm2022/ngwr-sidebar-testing.mjs +17 -1
  257. package/fesm2022/ngwr-sidebar-testing.mjs.map +1 -1
  258. package/fesm2022/ngwr-sidebar.mjs +66 -11
  259. package/fesm2022/ngwr-sidebar.mjs.map +1 -1
  260. package/fesm2022/ngwr-skeleton.mjs +3 -3
  261. package/fesm2022/ngwr-slider.mjs +3 -3
  262. package/fesm2022/ngwr-sortable-list.mjs +27 -15
  263. package/fesm2022/ngwr-sortable-list.mjs.map +1 -1
  264. package/fesm2022/ngwr-speed-dial.mjs +3 -3
  265. package/fesm2022/ngwr-spinner.mjs +3 -3
  266. package/fesm2022/ngwr-splitter.mjs +3 -3
  267. package/fesm2022/ngwr-statistic.mjs +9 -9
  268. package/fesm2022/ngwr-stepper.mjs +6 -6
  269. package/fesm2022/ngwr-storage.mjs +4 -4
  270. package/fesm2022/ngwr-storage.mjs.map +1 -1
  271. package/fesm2022/ngwr-switch.mjs +5 -5
  272. package/fesm2022/ngwr-switch.mjs.map +1 -1
  273. package/fesm2022/ngwr-table-router.mjs +89 -0
  274. package/fesm2022/ngwr-table-router.mjs.map +1 -0
  275. package/fesm2022/ngwr-table-testing.mjs +5 -0
  276. package/fesm2022/ngwr-table-testing.mjs.map +1 -1
  277. package/fesm2022/ngwr-table.mjs +307 -47
  278. package/fesm2022/ngwr-table.mjs.map +1 -1
  279. package/fesm2022/ngwr-tabs-router.mjs +9 -5
  280. package/fesm2022/ngwr-tabs-router.mjs.map +1 -1
  281. package/fesm2022/ngwr-tabs-testing.mjs +8 -1
  282. package/fesm2022/ngwr-tabs-testing.mjs.map +1 -1
  283. package/fesm2022/ngwr-tabs.mjs +60 -10
  284. package/fesm2022/ngwr-tabs.mjs.map +1 -1
  285. package/fesm2022/ngwr-textarea.mjs +5 -5
  286. package/fesm2022/ngwr-textarea.mjs.map +1 -1
  287. package/fesm2022/ngwr-theme.mjs +3 -3
  288. package/fesm2022/ngwr-timeline.mjs +6 -6
  289. package/fesm2022/ngwr-toast.mjs +43 -15
  290. package/fesm2022/ngwr-toast.mjs.map +1 -1
  291. package/fesm2022/ngwr-toolbar.mjs +3 -3
  292. package/fesm2022/ngwr-tour.mjs +9 -8
  293. package/fesm2022/ngwr-tour.mjs.map +1 -1
  294. package/fesm2022/ngwr-transfer.mjs +4 -3
  295. package/fesm2022/ngwr-transfer.mjs.map +1 -1
  296. package/fesm2022/ngwr-tree.mjs +3 -3
  297. package/fesm2022/ngwr-typography.mjs +23 -3
  298. package/fesm2022/ngwr-typography.mjs.map +1 -1
  299. package/fesm2022/ngwr-utils-router.mjs +3 -3
  300. package/fesm2022/ngwr-utils-router.mjs.map +1 -1
  301. package/fesm2022/ngwr-utils.mjs +74 -4
  302. package/fesm2022/ngwr-utils.mjs.map +1 -1
  303. package/fesm2022/ngwr-validators.mjs +33 -1
  304. package/fesm2022/ngwr-validators.mjs.map +1 -1
  305. package/fesm2022/ngwr-version.mjs +1 -1
  306. package/fesm2022/ngwr-version.mjs.map +1 -1
  307. package/fesm2022/ngwr-virtual-scroll.mjs +3 -3
  308. package/fesm2022/ngwr-window.mjs +18 -13
  309. package/fesm2022/ngwr-window.mjs.map +1 -1
  310. package/file-upload/styles/_index.scss +16 -0
  311. package/form/styles/_index.scss +37 -0
  312. package/graph/styles/_index.scss +49 -9
  313. package/i18n/ar.json +19 -2
  314. package/i18n/cs.json +19 -2
  315. package/i18n/de.json +19 -2
  316. package/i18n/en.json +19 -2
  317. package/i18n/es.json +19 -2
  318. package/i18n/fr.json +19 -2
  319. package/i18n/he.json +19 -2
  320. package/i18n/hi.json +19 -2
  321. package/i18n/id.json +19 -2
  322. package/i18n/it.json +19 -2
  323. package/i18n/ja.json +19 -2
  324. package/i18n/kk.json +567 -0
  325. package/i18n/ko.json +19 -2
  326. package/i18n/nl.json +19 -2
  327. package/i18n/pl.json +19 -2
  328. package/i18n/pt.json +19 -2
  329. package/i18n/ru.json +19 -2
  330. package/i18n/sv.json +19 -2
  331. package/i18n/tr.json +19 -2
  332. package/i18n/uk.json +19 -2
  333. package/i18n/vi.json +19 -2
  334. package/i18n/zh-TW.json +19 -2
  335. package/i18n/zh.json +19 -2
  336. package/image-cropper/styles/_index.scss +1 -9
  337. package/input-number/styles/_index.scss +7 -0
  338. package/layout/styles/_index.scss +13 -1
  339. package/llms-full.txt +37 -26
  340. package/llms.txt +4 -1
  341. package/loading-bar/styles/_rules.scss +6 -0
  342. package/package.json +16 -8
  343. package/page-header/styles/_index.scss +18 -0
  344. package/pagination/styles/_index.scss +6 -0
  345. package/popover/styles/_index.scss +9 -0
  346. package/progress/styles/_index.scss +64 -0
  347. package/schematics/use/symbol-map.json +7 -0
  348. package/segmented/styles/_index.scss +7 -0
  349. package/select/styles/_index.scss +7 -0
  350. package/sidebar/styles/_index.scss +64 -6
  351. package/skills/ngwr/SKILL.md +7 -6
  352. package/skills/ngwr/references/catalog.md +7 -5
  353. package/sortable-list/styles/_rules.scss +1 -9
  354. package/speed-dial/styles/_index.scss +6 -0
  355. package/stepper/styles/_index.scss +1 -9
  356. package/table/styles/_index.scss +168 -30
  357. package/tabs/styles/_index.scss +9 -0
  358. package/theme/_index.scss +12 -1
  359. package/theme/styles/_colors.scss +11 -0
  360. package/theme/styles/_contrast.scss +6 -0
  361. package/theme/styles/_focus.scss +3 -1
  362. package/theme/styles/_index.scss +1 -0
  363. package/theme/styles/_mixins.scss +45 -0
  364. package/theme/styles/_print.scss +17 -0
  365. package/toast/styles/_index.scss +7 -0
  366. package/tour/styles/_index.scss +9 -0
  367. package/tree/styles/_index.scss +1 -9
  368. package/types/ngwr-anchor.d.ts +3 -0
  369. package/types/ngwr-animations-aurora.d.ts +6 -0
  370. package/types/ngwr-animations-blur-reveal.d.ts +6 -0
  371. package/types/ngwr-animations-click-sparks.d.ts +6 -0
  372. package/types/ngwr-animations-confetti.d.ts +6 -0
  373. package/types/ngwr-animations-decode.d.ts +6 -0
  374. package/types/ngwr-animations-destruct.d.ts +6 -0
  375. package/types/ngwr-animations-dot-grid.d.ts +6 -0
  376. package/types/ngwr-animations-falling-letters.d.ts +6 -0
  377. package/types/ngwr-animations-flow-lines.d.ts +6 -0
  378. package/types/ngwr-animations-fluid-cursor.d.ts +6 -0
  379. package/types/ngwr-animations-glitch.d.ts +6 -0
  380. package/types/ngwr-animations-glow-border.d.ts +6 -0
  381. package/types/ngwr-animations-gradient-flow.d.ts +6 -0
  382. package/types/ngwr-animations-marquee.d.ts +6 -0
  383. package/types/ngwr-animations-orbit.d.ts +6 -0
  384. package/types/ngwr-animations-reveal.d.ts +6 -0
  385. package/types/ngwr-animations-ripple-grid.d.ts +6 -0
  386. package/types/ngwr-animations-rotate-reveal.d.ts +6 -0
  387. package/types/ngwr-animations-shimmer.d.ts +6 -0
  388. package/types/ngwr-animations-spotlight.d.ts +6 -0
  389. package/types/ngwr-animations-thread-lines.d.ts +6 -0
  390. package/types/ngwr-animations-tilt.d.ts +10 -0
  391. package/types/ngwr-animations-typewriter.d.ts +6 -0
  392. package/types/ngwr-avatar.d.ts +39 -0
  393. package/types/ngwr-breadcrumbs.d.ts +25 -0
  394. package/types/ngwr-button.d.ts +35 -3
  395. package/types/ngwr-carousel.d.ts +2 -0
  396. package/types/ngwr-cascader.d.ts +7 -0
  397. package/types/ngwr-charts-core.d.ts +16 -0
  398. package/types/ngwr-charts-meter-group.d.ts +2 -0
  399. package/types/ngwr-checkbox.d.ts +1 -0
  400. package/types/ngwr-color-picker.d.ts +1 -0
  401. package/types/ngwr-context-menu.d.ts +1 -1
  402. package/types/ngwr-date-picker-testing.d.ts +22 -0
  403. package/types/ngwr-date-picker.d.ts +97 -17
  404. package/types/ngwr-date.d.ts +51 -0
  405. package/types/ngwr-dialog.d.ts +39 -8
  406. package/types/ngwr-directives.d.ts +57 -4
  407. package/types/ngwr-drawer.d.ts +1 -1
  408. package/types/ngwr-dropdown-testing.d.ts +8 -1
  409. package/types/ngwr-dropdown.d.ts +30 -1
  410. package/types/ngwr-event-calendar.d.ts +4 -0
  411. package/types/ngwr-file-upload-testing.d.ts +10 -0
  412. package/types/ngwr-file-upload.d.ts +55 -1
  413. package/types/ngwr-form.d.ts +87 -1
  414. package/types/ngwr-graph-testing.d.ts +28 -1
  415. package/types/ngwr-graph.d.ts +53 -3
  416. package/types/ngwr-i18n-kk.d.ts +3 -0
  417. package/types/ngwr-i18n.d.ts +65 -5
  418. package/types/ngwr-image-cropper.d.ts +6 -0
  419. package/types/ngwr-input-number.d.ts +8 -0
  420. package/types/ngwr-input.d.ts +7 -0
  421. package/types/ngwr-layout.d.ts +1 -1
  422. package/types/ngwr-loading-bar-router.d.ts +6 -0
  423. package/types/ngwr-page-header.d.ts +23 -1
  424. package/types/ngwr-pagination-testing.d.ts +8 -0
  425. package/types/ngwr-pagination.d.ts +16 -0
  426. package/types/ngwr-popconfirm.d.ts +1 -1
  427. package/types/ngwr-popover.d.ts +67 -4
  428. package/types/ngwr-progress.d.ts +63 -1
  429. package/types/ngwr-radio.d.ts +47 -5
  430. package/types/ngwr-scroll.d.ts +86 -0
  431. package/types/ngwr-segmented.d.ts +7 -0
  432. package/types/ngwr-select.d.ts +88 -25
  433. package/types/ngwr-sidebar-testing.d.ts +21 -7
  434. package/types/ngwr-sidebar.d.ts +66 -4
  435. package/types/ngwr-sortable-list.d.ts +20 -7
  436. package/types/ngwr-table-router.d.ts +49 -0
  437. package/types/ngwr-table-testing.d.ts +7 -0
  438. package/types/ngwr-table.d.ts +241 -10
  439. package/types/ngwr-tabs-router.d.ts +7 -1
  440. package/types/ngwr-tabs-testing.d.ts +5 -1
  441. package/types/ngwr-tabs.d.ts +34 -1
  442. package/types/ngwr-toast.d.ts +11 -0
  443. package/types/ngwr-tour.d.ts +0 -1
  444. package/types/ngwr-typography.d.ts +7 -0
  445. package/types/ngwr-utils-router.d.ts +6 -0
  446. package/types/ngwr-utils.d.ts +69 -2
  447. package/types/ngwr-validators.d.ts +49 -1
  448. package/types/ngwr-version.d.ts +1 -1
  449. package/typography/styles/_index.scss +4 -0
  450. package/window/styles/_index.scss +1 -9
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-radio.mjs","names":[],"sources":["../../../projects/lib/radio/tokens/radio-group.token.ts","../../../projects/lib/radio/radio.ts","../../../projects/lib/radio/radio.html","../../../projects/lib/radio/radio-group.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 { InjectionToken } from '@angular/core';\n\nimport type { WrRadioGroupContext } from '../types';\n\n/**\n * Token a `<wr-radio>` injects to participate in its parent `<wr-radio-group>`\n * — reads the selected value, shares the `name` attribute, and signals\n * selection / blur back up.\n *\n * @internal\n */\nexport const WR_RADIO_GROUP = new InjectionToken<WrRadioGroupContext>('WR_RADIO_GROUP');\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 { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Component, ViewEncapsulation, computed, inject, input } from '@angular/core';\n\nimport { WrIcon, type WrIconName } from 'ngwr/icon';\nimport { wrRandomId, wrCheckStyles } from 'ngwr/utils';\n\nimport { WR_RADIO_GROUP } from './tokens';\n\n/**\n * Single-choice option. Must be a child of `<wr-radio-group>`.\n *\n * @example\n * ```html\n * <wr-radio-group [(ngModel)]=\"size\">\n * <wr-radio value=\"sm\">Small</wr-radio>\n * <wr-radio value=\"md\">Medium</wr-radio>\n * <wr-radio value=\"lg\">Large</wr-radio>\n * </wr-radio-group>\n * ```\n *\n * @see https://ngwr.dev/reference/components/radio\n */\nexport type WrRadioSize = 'sm' | 'md' | 'lg';\n\n@Component({\n selector: 'wr-radio',\n templateUrl: './radio.html',\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-radio',\n '[class]': 'classes()',\n // The `id` input belongs to the native input, not to this element. A static\n // `id=\"x\"` in a consumer's template is written to the host as a plain\n // attribute AS WELL as fed to the input, which put two elements with the\n // same id in the document and made `<label for>` resolve through\n // `getElementById` to the host — not a labelable element, so `input.labels`\n // went from 1 to 0 and `document.getElementById(id)` returned the wrong node.\n '[attr.id]': 'null',\n },\n imports: [WrIcon],\n})\nexport class WrRadio {\n /**\n * Stable id used to associate the native input with its label. Lands on the\n * inner `<input>`; the host never keeps it.\n */\n readonly id = input<string>(wrRandomId('wr-radio'));\n\n /** Value selected when this radio is checked. */\n readonly value = input.required<unknown>();\n\n /**\n * Optional icon name rendered inside the dot when checked, in place of the\n * default solid circle. Use any registered NGWR icon.\n */\n readonly icon = input<WrIconName | null>(null);\n\n /**\n * Control size — shares the `--wr-control-*` contract. Set per option; the\n * group has no `size`. @default 'md'\n */\n readonly size = input<WrRadioSize>('md');\n\n /**\n * Disable just this option. The group can also be disabled as a whole via\n * `<wr-radio-group disabled>`; either source disables this radio.\n *\n * @default false\n */\n readonly disabled = input(false, { transform: coerceBooleanProperty });\n\n private readonly group = inject(WR_RADIO_GROUP, { optional: true });\n\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('radio');\n if (!this.group) {\n throw new Error('[NGWR] <wr-radio> must be used inside <wr-radio-group>.');\n }\n }\n\n protected readonly name = computed(() => this.group?.name() ?? '');\n protected readonly checked = computed(() => this.group?.value() === this.value());\n /** Effective disabled — this option's own `disabled` or the group's. */\n protected readonly isDisabled = computed(() => this.disabled() || (this.group?.isDisabled() ?? false));\n\n /**\n * Readonly is a GROUP-level state — a single option cannot be read-only while\n * its siblings are not, because picking any of them rewrites the same value.\n * `aria-readonly` therefore lives on the `role=\"radiogroup\"` host and NOT here:\n * role `radio` does not support it.\n */\n protected readonly isReadonly = computed(() => this.group?.isReadonly() ?? false);\n\n protected readonly classes = computed(() => {\n const parts: string[] = [];\n const size = this.size();\n if (size !== 'md') parts.push(`wr-radio--${size}`);\n if (this.checked()) parts.push('wr-radio--checked');\n if (this.isDisabled()) parts.push('wr-radio--disabled');\n else if (this.isReadonly()) parts.push('wr-radio--readonly');\n if (this.icon()) parts.push('wr-radio--has-icon');\n return parts.join(' ');\n });\n\n /**\n * Cancel the selection while the group is read-only. `change` never fires for\n * a click whose default was prevented, so this is the only guard the pointer\n * and Space paths need; `onSelect` keeps its own for a synthetic `change`.\n */\n protected onInputClick(event: Event): void {\n if (this.isReadonly()) event.preventDefault();\n }\n\n protected onSelect(): void {\n if (this.isDisabled() || this.isReadonly()) return;\n this.group?.select(this.value());\n }\n\n protected onBlur(): void {\n this.group?.markTouched();\n }\n}\n","<label class=\"wr-radio__label\" [for]=\"id()\">\n <input\n class=\"wr-radio__input\"\n type=\"radio\"\n [id]=\"id()\"\n [name]=\"name()\"\n [checked]=\"checked()\"\n [disabled]=\"isDisabled()\"\n (click)=\"onInputClick($event)\"\n (change)=\"onSelect()\"\n (blur)=\"onBlur()\"\n />\n\n <span class=\"wr-radio__dot\" aria-hidden=\"true\">\n @if (icon(); as iconName) {\n <wr-icon class=\"wr-radio__icon\" [name]=\"iconName\" />\n }\n </span>\n\n <span class=\"wr-radio__text\">\n <ng-content />\n </span>\n</label>\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 { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport {\n Component,\n ElementRef,\n HostAttributeToken,\n ViewEncapsulation,\n computed,\n forwardRef,\n inject,\n input,\n model,\n output,\n} from '@angular/core';\nimport type { FormValueControl } from '@angular/forms/signals';\n\nimport { useFormFieldAria } from 'ngwr/form';\nimport { wrRandomId, wrCheckStyles } from 'ngwr/utils';\n\nimport { WR_RADIO_GROUP } from './tokens';\nimport type { WrRadioGroupContext } from './types';\n\n/**\n * Hosts a group of `<wr-radio>` children as a single-value selection.\n *\n * A signal-forms native control: it implements `FormValueControl<unknown>`, so\n * `[formField]` binds to its `value` model — the currently selected radio's\n * `value`. `[(value)]` works standalone. Classic `[(ngModel)]` / reactive forms\n * keep working through Angular's bridge.\n *\n * @example\n * ```html\n * <wr-radio-group [formField]=\"form.size\">\n * <wr-radio value=\"sm\">Small</wr-radio>\n * <wr-radio value=\"md\">Medium</wr-radio>\n * <wr-radio value=\"lg\">Large</wr-radio>\n * </wr-radio-group>\n * ```\n *\n * @see https://ngwr.dev/reference/components/radio\n */\n@Component({\n selector: 'wr-radio-group',\n template: '<ng-content />',\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-radio-group',\n role: 'radiogroup',\n '[attr.aria-readonly]': 'readonly() || null',\n // `aria-labelledby` is how a `role=\"radiogroup\"` gets its name from a\n // `<wr-form-field label=\"…\">`: `<label for>` binds only to a LABELABLE\n // element, and this host is a `div` with a role, so the field's visible\n // label pointed at nothing and the group announced unnamed. This is the\n // case `useFormFieldAria().labelledBy()` exists for, and `wr-rating`\n // already reads it.\n //\n // The consumer's OWN attribute wins, and has to: the component ships no\n // label input on purpose — the question above a radio group is the\n // consumer's heading — so a binding that always wrote the field's id\n // would delete a hand-written `aria-labelledby` on every group that is\n // not inside a field, which is most of them.\n '[attr.aria-labelledby]': 'labelledBy()',\n '[attr.aria-invalid]': 'fieldAria.ariaInvalid()',\n '[attr.aria-describedby]': 'fieldAria.describedBy()',\n },\n providers: [\n {\n provide: WR_RADIO_GROUP,\n // eslint-disable-next-line @angular-eslint/no-forward-ref\n useExisting: forwardRef(() => WrRadioGroup),\n },\n ],\n})\nexport class WrRadioGroup implements FormValueControl<unknown>, WrRadioGroupContext {\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('radio');\n }\n\n /**\n * Shared `name` attribute. Defaults to a random id so multiple groups\n * on the same page don't collide. (Also the `FormUiControl.name` slot.)\n */\n readonly name = input<string>(wrRandomId('wr-radio-group'));\n\n /**\n * Disable the whole group. Bound automatically from the field's disabled\n * state when used with `[formField]`.\n *\n * @default false\n */\n readonly disabled = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Refuse selection changes while every option stays focusable and the value\n * still submits. Bound automatically from the field's readonly state when used\n * with `[formField]`.\n *\n * Native radios ignore the `readonly` attribute, so the group cancels the\n * activation instead and mirrors the state as `aria-readonly`, which role\n * `radiogroup` supports.\n *\n * @default false\n */\n readonly readonly = input(false, { transform: coerceBooleanProperty });\n\n /** The surrounding `<wr-form-field>`'s error state. @internal */\n /**\n * Whatever the consumer wrote on the host, read once at construction.\n *\n * `HostAttributeToken` rather than a DOM read: it resolves from the\n * element's attributes through DI, so it works under SSR, where a\n * constructor-time `getAttribute` would not.\n */\n private readonly ownLabelledBy = inject(new HostAttributeToken('aria-labelledby'), { optional: true });\n\n protected readonly fieldAria = useFormFieldAria();\n\n protected readonly labelledBy = computed(() => this.ownLabelledBy ?? this.fieldAria.labelledBy());\n\n /** The selected radio's value. Bound by `[formField]`, or two-way via `[(value)]`. */\n readonly value = model<unknown>(null);\n\n /** Emitted on blur from any child so a bound field can mark itself touched. */\n readonly touch = output<void>();\n\n /** Effective disabled state (WrRadioGroupContext). */\n readonly isDisabled = computed(() => this.disabled());\n\n /** Effective readonly state (WrRadioGroupContext). */\n readonly isReadonly = computed(() => this.readonly());\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * Focus the group — what Signal Forms calls to focus this control. The radio\n * Tab lands on takes it: the checked one, or the first enabled one while\n * nothing is checked. The `role=\"radiogroup\"` host has no tab stop of its own,\n * and a disabled radio has none either — so a checked radio that is disabled\n * hands focus to the first enabled one too, where Tab would skip the group.\n */\n focus(options?: FocusOptions): void {\n const host = this.host.nativeElement;\n const radio =\n host.querySelector<HTMLInputElement>('.wr-radio__input:checked:not(:disabled)') ??\n host.querySelector<HTMLInputElement>('.wr-radio__input:not(:disabled)');\n radio?.focus(options);\n }\n\n // WrRadioGroupContext\n\n select(value: unknown): void {\n if (this.isDisabled() || this.isReadonly()) return;\n this.value.set(value);\n }\n\n markTouched(): void {\n this.touch.emit();\n }\n}\n"],"mappings":";;;;;;;;;;;;AAkBA,MAAa,iBAAiB,IAAI,eAAoC,gBAAgB;;;;;;;AC8BtF,IAAa,UAAb,MAAa,QAAO;CAKT,KAAK,MAAc,WAAW,UAAU,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,KAAA,CAAA,+BAAA,CAAA,CAAA;C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AA;EAAA,eAAA,GAAA,kBAAA;CAAA,CAAA;;AA8Bf,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAY,YAAA,CAAA;EAhCxB,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,UAAU;GACV,eAAe,kBAAkB;GACjC,MAAM;IACJ,OAAO;IACP,MAAM;IACN,wBAAwB;IAaxB,0BAA0B;IAC1B,uBAAuB;IACvB,2BAA2B;GAC5B;GACD,WAAW,CACT;IACE,SAAS;IAET,aAAa,iBAAgB,YAAa;GAC3C,CACF;EACF,CAAA"}
1
+ {"version":3,"file":"ngwr-radio.mjs","names":[],"sources":["../../../projects/lib/radio/tokens/radio-group.token.ts","../../../projects/lib/radio/radio.ts","../../../projects/lib/radio/radio.html","../../../projects/lib/radio/radio-group.ts","../../../projects/lib/radio/radio-group.html"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { InjectionToken } from '@angular/core';\n\nimport type { WrRadioGroupContext } from '../types';\n\n/**\n * Token a `<wr-radio>` injects to participate in its parent `<wr-radio-group>`\n * — reads the selected value, shares the `name` attribute, and signals\n * selection / blur back up.\n *\n * @internal\n */\nexport const WR_RADIO_GROUP = new InjectionToken<WrRadioGroupContext>('WR_RADIO_GROUP');\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 { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Component, ViewEncapsulation, computed, inject, input } from '@angular/core';\n\nimport { WrIcon, type WrIconName } from 'ngwr/icon';\nimport { wrRandomId, wrCheckStyles } from 'ngwr/utils';\n\nimport { WR_RADIO_GROUP } from './tokens';\n\n/**\n * Single-choice option. Must be a child of `<wr-radio-group>`.\n *\n * @example\n * ```html\n * <wr-radio-group [(ngModel)]=\"size\">\n * <wr-radio value=\"sm\">Small</wr-radio>\n * <wr-radio value=\"md\">Medium</wr-radio>\n * <wr-radio value=\"lg\">Large</wr-radio>\n * </wr-radio-group>\n * ```\n *\n * @see https://ngwr.dev/reference/components/radio\n */\nexport type WrRadioSize = 'sm' | 'md' | 'lg';\n\n@Component({\n selector: 'wr-radio',\n templateUrl: './radio.html',\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-radio',\n '[class]': 'classes()',\n // The `id` input belongs to the native input, not to this element. A static\n // `id=\"x\"` in a consumer's template is written to the host as a plain\n // attribute AS WELL as fed to the input, which put two elements with the\n // same id in the document and made `<label for>` resolve through\n // `getElementById` to the host — not a labelable element, so `input.labels`\n // went from 1 to 0 and `document.getElementById(id)` returned the wrong node.\n '[attr.id]': 'null',\n },\n imports: [WrIcon],\n})\nexport class WrRadio {\n /**\n * Stable id used to associate the native input with its label. Lands on the\n * inner `<input>`; the host never keeps it.\n */\n readonly id = input<string>(wrRandomId('wr-radio'));\n\n /** Value selected when this radio is checked. */\n readonly value = input.required<unknown>();\n\n /**\n * Optional icon name rendered inside the dot when checked, in place of the\n * default solid circle. Use any registered NGWR icon.\n */\n readonly icon = input<WrIconName | null>(null);\n\n /**\n * Control size — shares the `--wr-control-*` contract. Set per option; the\n * group has no `size`. @default 'md'\n */\n readonly size = input<WrRadioSize>('md');\n\n /**\n * Disable just this option. The group can also be disabled as a whole via\n * `<wr-radio-group disabled>`; either source disables this radio.\n *\n * @default false\n */\n readonly disabled = input(false, { transform: coerceBooleanProperty });\n\n private readonly group = inject(WR_RADIO_GROUP, { optional: true });\n\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('radio');\n if (!this.group) {\n throw new Error('[NGWR] <wr-radio> must be used inside <wr-radio-group>.');\n }\n }\n\n protected readonly name = computed(() => this.group?.name() ?? '');\n protected readonly checked = computed(() => this.group?.value() === this.value());\n /** Effective disabled — this option's own `disabled` or the group's. */\n protected readonly isDisabled = computed(() => this.disabled() || (this.group?.isDisabled() ?? false));\n\n /**\n * Readonly is a GROUP-level state — a single option cannot be read-only while\n * its siblings are not, because picking any of them rewrites the same value.\n * `aria-readonly` therefore lives on the `role=\"radiogroup\"` host and NOT here:\n * role `radio` does not support it.\n */\n protected readonly isReadonly = computed(() => this.group?.isReadonly() ?? false);\n\n protected readonly classes = computed(() => {\n const parts: string[] = [];\n const size = this.size();\n if (size !== 'md') parts.push(`wr-radio--${size}`);\n if (this.checked()) parts.push('wr-radio--checked');\n if (this.isDisabled()) parts.push('wr-radio--disabled');\n else if (this.isReadonly()) parts.push('wr-radio--readonly');\n if (this.icon()) parts.push('wr-radio--has-icon');\n return parts.join(' ');\n });\n\n /**\n * Cancel the selection while the group is read-only. `change` never fires for\n * a click whose default was prevented, so this is the only guard the pointer\n * and Space paths need; `onSelect` keeps its own for a synthetic `change`.\n */\n protected onInputClick(event: Event): void {\n if (this.isReadonly()) event.preventDefault();\n }\n\n protected onSelect(): void {\n if (this.isDisabled() || this.isReadonly()) return;\n this.group?.select(this.value());\n }\n\n protected onBlur(): void {\n this.group?.markTouched();\n }\n}\n","<label class=\"wr-radio__label\" [for]=\"id()\">\n <input\n class=\"wr-radio__input\"\n type=\"radio\"\n [id]=\"id()\"\n [name]=\"name()\"\n [checked]=\"checked()\"\n [disabled]=\"isDisabled()\"\n (click)=\"onInputClick($event)\"\n (change)=\"onSelect()\"\n (blur)=\"onBlur()\"\n />\n\n <span class=\"wr-radio__dot\" aria-hidden=\"true\">\n @if (icon(); as iconName) {\n <wr-icon class=\"wr-radio__icon\" [name]=\"iconName\" />\n }\n </span>\n\n <span class=\"wr-radio__text\">\n <ng-content />\n </span>\n</label>\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 { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport {\n Component,\n ElementRef,\n HostAttributeToken,\n ViewEncapsulation,\n computed,\n forwardRef,\n inject,\n input,\n model,\n output,\n} from '@angular/core';\nimport type { FormValueControl } from '@angular/forms/signals';\n\nimport { useFormFieldAria } from 'ngwr/form';\nimport { wrRandomId, wrCheckStyles } from 'ngwr/utils';\n\nimport { WrRadio } from './radio';\nimport { WR_RADIO_GROUP } from './tokens';\nimport type { WrRadioGroupContext } from './types';\n\n/**\n * Hosts a group of `<wr-radio>` children as a single-value selection.\n *\n * A signal-forms native control: it implements `FormValueControl`, so\n * `[formField]` binds to its `value` model — the currently selected radio's\n * `value`. `[(value)]` works standalone. Classic `[(ngModel)]` / reactive forms\n * keep working through Angular's bridge.\n *\n * `T` is an item of `[options]` and `V` is a radio's value: the return type of\n * `[valueWith]`, or else the type of the value binding.\n *\n * @example\n * ```html\n * <wr-radio-group [formField]=\"form.size\">\n * <wr-radio value=\"sm\">Small</wr-radio>\n * <wr-radio value=\"md\">Medium</wr-radio>\n * <wr-radio value=\"lg\">Large</wr-radio>\n * </wr-radio-group>\n *\n * <!-- One radio per item, the id in the model -->\n * <wr-radio-group [options]=\"plans\" [displayWith]=\"planName\" [valueWith]=\"planId\" [(value)]=\"planId\" />\n * ```\n *\n * @see https://ngwr.dev/reference/components/radio\n */\n@Component({\n selector: 'wr-radio-group',\n templateUrl: './radio-group.html',\n imports: [WrRadio],\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-radio-group',\n role: 'radiogroup',\n '[attr.aria-readonly]': 'readonly() || null',\n // `aria-labelledby` is how a `role=\"radiogroup\"` gets its name from a\n // `<wr-form-field label=\"…\">`: `<label for>` binds only to a LABELABLE\n // element, and this host is a `div` with a role, so the field's visible\n // label pointed at nothing and the group announced unnamed. This is the\n // case `useFormFieldAria().labelledBy()` exists for, and `wr-rating`\n // already reads it.\n //\n // The consumer's OWN attribute wins, and has to: the component ships no\n // label input on purpose — the question above a radio group is the\n // consumer's heading — so a binding that always wrote the field's id\n // would delete a hand-written `aria-labelledby` on every group that is\n // not inside a field, which is most of them.\n '[attr.aria-labelledby]': 'labelledBy()',\n '[attr.aria-invalid]': 'fieldAria.ariaInvalid()',\n '[attr.aria-required]': 'fieldAria.ariaRequired()',\n '[attr.aria-describedby]': 'fieldAria.describedBy()',\n },\n providers: [\n {\n provide: WR_RADIO_GROUP,\n // eslint-disable-next-line @angular-eslint/no-forward-ref\n useExisting: forwardRef(() => WrRadioGroup),\n },\n ],\n})\nexport class WrRadioGroup<T = unknown, V = T> implements FormValueControl<V | null>, WrRadioGroupContext {\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('radio');\n }\n\n /**\n * Shared `name` attribute. Defaults to a random id so multiple groups\n * on the same page don't collide. (Also the `FormUiControl.name` slot.)\n */\n readonly name = input<string>(wrRandomId('wr-radio-group'));\n\n /**\n * Option array. Each item is rendered as a `<wr-radio>` whose value is the\n * item, or `[valueWith]` of it, and whose label comes from `[displayWith]`,\n * before any projected `<wr-radio>` children.\n *\n * @example\n * ```html\n * <wr-radio-group [options]=\"plans\" [displayWith]=\"planName\" [valueWith]=\"planId\" [(value)]=\"planId\" />\n * ```\n */\n readonly options = input<readonly T[]>([]);\n\n /** Maps an `[options]` item to its label. @default String */\n readonly displayWith = input<(item: T) => string>((item: T) => String(item));\n\n /**\n * Maps an `[options]` item to the value the model holds, so a list of objects\n * can bind an id. Values are compared with `===`. Without it an item is its\n * own value.\n */\n readonly valueWith = input<((item: T) => V) | null>(null);\n\n /** An item's value: `valueWith` of it, or the item itself. */\n protected valueOf(item: T): V {\n const valueWith = this.valueWith();\n return valueWith ? valueWith(item) : (item as unknown as V);\n }\n\n /**\n * Disable the whole group. Bound automatically from the field's disabled\n * state when used with `[formField]`.\n *\n * @default false\n */\n readonly disabled = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Refuse selection changes while every option stays focusable and the value\n * still submits. Bound automatically from the field's readonly state when used\n * with `[formField]`.\n *\n * Native radios ignore the `readonly` attribute, so the group cancels the\n * activation instead and mirrors the state as `aria-readonly`, which role\n * `radiogroup` supports.\n *\n * @default false\n */\n readonly readonly = input(false, { transform: coerceBooleanProperty });\n\n /** The surrounding `<wr-form-field>`'s error state. @internal */\n /**\n * Whatever the consumer wrote on the host, read once at construction.\n *\n * `HostAttributeToken` rather than a DOM read: it resolves from the\n * element's attributes through DI, so it works under SSR, where a\n * constructor-time `getAttribute` would not.\n */\n private readonly ownLabelledBy = inject(new HostAttributeToken('aria-labelledby'), { optional: true });\n\n protected readonly fieldAria = useFormFieldAria();\n\n protected readonly labelledBy = computed(() => this.ownLabelledBy ?? this.fieldAria.labelledBy());\n\n /** The selected radio's value. Bound by `[formField]`, or two-way via `[(value)]`. */\n readonly value = model<V | null>(null);\n\n /** Emitted on blur from any child so a bound field can mark itself touched. */\n readonly touch = output<void>();\n\n /** Effective disabled state (WrRadioGroupContext). */\n readonly isDisabled = computed(() => this.disabled());\n\n /** Effective readonly state (WrRadioGroupContext). */\n readonly isReadonly = computed(() => this.readonly());\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * Focus the group — what Signal Forms calls to focus this control. The radio\n * Tab lands on takes it: the checked one, or the first enabled one while\n * nothing is checked. The `role=\"radiogroup\"` host has no tab stop of its own,\n * and a disabled radio has none either — so a checked radio that is disabled\n * hands focus to the first enabled one too, where Tab would skip the group.\n */\n focus(options?: FocusOptions): void {\n const host = this.host.nativeElement;\n const radio =\n host.querySelector<HTMLInputElement>('.wr-radio__input:checked:not(:disabled)') ??\n host.querySelector<HTMLInputElement>('.wr-radio__input:not(:disabled)');\n radio?.focus(options);\n }\n\n // WrRadioGroupContext\n\n select(value: unknown): void {\n if (this.isDisabled() || this.isReadonly()) return;\n this.value.set(value as V);\n }\n\n markTouched(): void {\n this.touch.emit();\n }\n}\n","@for (item of options(); track $index) {\n <wr-radio [value]=\"valueOf(item)\">{{ displayWith()(item) }}</wr-radio>\n}\n<ng-content />\n"],"mappings":";;;;;;;;;;;;AAkBA,MAAa,iBAAiB,IAAI,eAAoC,gBAAgB;;;;;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S;IAET,aAAa,iBAAgB,YAAa;GAC3C,CACF;GAAA,UAAA;EAAA,CAAA"}
@@ -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.6",
135
+ version: "22.3.0",
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.6",
143
+ version: "22.3.0",
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.6",
220
+ version: "22.3.0",
221
221
  ngImport: i0,
222
222
  type: WrRating,
223
223
  decorators: [{
@@ -289,7 +289,7 @@ var WrResizable = class WrResizable {
289
289
  }
290
290
  static ɵfac = i0.ɵɵngDeclareFactory({
291
291
  minVersion: "12.0.0",
292
- version: "22.2.6",
292
+ version: "22.3.0",
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.6",
300
+ version: "22.3.0",
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.6",
394
+ version: "22.3.0",
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.6",
21
+ version: "22.3.0",
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.6",
29
+ version: "22.3.0",
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.6",
70
+ version: "22.3.0",
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.6",
130
+ version: "22.3.0",
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.6",
138
+ version: "22.3.0",
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.6",
176
+ version: "22.3.0",
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.6",
219
+ version: "22.3.0",
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.6",
227
+ version: "22.3.0",
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.6",
265
+ version: "22.3.0",
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.6",
308
+ version: "22.3.0",
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.6",
316
+ version: "22.3.0",
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.6",
354
+ version: "22.3.0",
355
355
  ngImport: i0,
356
356
  type: WrResult500,
357
357
  decorators: [{
@@ -43,7 +43,7 @@ var WrSchemaFormArrayState = class WrSchemaFormArrayState {
43
43
  }
44
44
  static ɵfac = i0.ɵɵngDeclareFactory({
45
45
  minVersion: "12.0.0",
46
- version: "22.2.6",
46
+ version: "22.3.0",
47
47
  ngImport: i0,
48
48
  type: WrSchemaFormArrayState,
49
49
  deps: [],
@@ -51,7 +51,7 @@ var WrSchemaFormArrayState = class WrSchemaFormArrayState {
51
51
  });
52
52
  static ɵdir = i0.ɵɵngDeclareDirective({
53
53
  minVersion: "17.1.0",
54
- version: "22.2.6",
54
+ version: "22.3.0",
55
55
  type: WrSchemaFormArrayState,
56
56
  isStandalone: true,
57
57
  selector: "[wrSchemaFormArrayState]",
@@ -71,7 +71,7 @@ var WrSchemaFormArrayState = class WrSchemaFormArrayState {
71
71
  };
72
72
  i0.ɵɵngDeclareClassMetadata({
73
73
  minVersion: "12.0.0",
74
- version: "22.2.6",
74
+ version: "22.3.0",
75
75
  ngImport: i0,
76
76
  type: WrSchemaFormArrayState,
77
77
  decorators: [{
@@ -285,7 +285,7 @@ var WrSchemaForm = class WrSchemaForm {
285
285
  }
286
286
  static ɵfac = i0.ɵɵngDeclareFactory({
287
287
  minVersion: "12.0.0",
288
- version: "22.2.6",
288
+ version: "22.3.0",
289
289
  ngImport: i0,
290
290
  type: WrSchemaForm,
291
291
  deps: [],
@@ -293,7 +293,7 @@ var WrSchemaForm = class WrSchemaForm {
293
293
  });
294
294
  static ɵcmp = i0.ɵɵngDeclareComponent({
295
295
  minVersion: "17.0.0",
296
- version: "22.2.6",
296
+ version: "22.3.0",
297
297
  type: WrSchemaForm,
298
298
  isStandalone: true,
299
299
  selector: "wr-schema-form",
@@ -374,6 +374,7 @@ var WrSchemaForm = class WrSchemaForm {
374
374
  "iconPosition",
375
375
  "disabled",
376
376
  "outlined",
377
+ "ghost",
377
378
  "block",
378
379
  "loading",
379
380
  "disabledWhenLoading"
@@ -405,6 +406,7 @@ var WrSchemaForm = class WrSchemaForm {
405
406
  "mode",
406
407
  "format",
407
408
  "placeholder",
409
+ "valueFormat",
408
410
  "min",
409
411
  "max",
410
412
  "dateFilter",
@@ -412,6 +414,7 @@ var WrSchemaForm = class WrSchemaForm {
412
414
  "showSeconds",
413
415
  "step",
414
416
  "size",
417
+ "block",
415
418
  "rounded",
416
419
  "clearable",
417
420
  "clearLabel",
@@ -447,6 +450,7 @@ var WrSchemaForm = class WrSchemaForm {
447
450
  "showSeconds",
448
451
  "step",
449
452
  "size",
453
+ "block",
450
454
  "rounded",
451
455
  "clearable",
452
456
  "presets",
@@ -480,6 +484,7 @@ var WrSchemaForm = class WrSchemaForm {
480
484
  "disabled",
481
485
  "readonly",
482
486
  "status",
487
+ "stored",
483
488
  "previews",
484
489
  "acceptPaste",
485
490
  "pickLabel",
@@ -496,6 +501,7 @@ var WrSchemaForm = class WrSchemaForm {
496
501
  outputs: [
497
502
  "valueChange",
498
503
  "rejected",
504
+ "storedRemove",
499
505
  "retry",
500
506
  "touch"
501
507
  ]
@@ -532,6 +538,7 @@ var WrSchemaForm = class WrSchemaForm {
532
538
  "decimals",
533
539
  "showSteppers",
534
540
  "size",
541
+ "block",
535
542
  "rounded",
536
543
  "prefix",
537
544
  "suffix",
@@ -576,6 +583,9 @@ var WrSchemaForm = class WrSchemaForm {
576
583
  selector: "wr-radio-group",
577
584
  inputs: [
578
585
  "name",
586
+ "options",
587
+ "displayWith",
588
+ "valueWith",
579
589
  "disabled",
580
590
  "readonly",
581
591
  "value"
@@ -612,7 +622,8 @@ var WrSchemaForm = class WrSchemaForm {
612
622
  "value",
613
623
  "disabled",
614
624
  "readonly",
615
- "size"
625
+ "size",
626
+ "block"
616
627
  ],
617
628
  outputs: ["valueChange", "touch"]
618
629
  },
@@ -626,6 +637,7 @@ var WrSchemaForm = class WrSchemaForm {
626
637
  "ariaLabel",
627
638
  "disabled",
628
639
  "readonly",
640
+ "block",
629
641
  "rounded",
630
642
  "size",
631
643
  "mode",
@@ -633,6 +645,7 @@ var WrSchemaForm = class WrSchemaForm {
633
645
  "searchQuery",
634
646
  "options",
635
647
  "displayWith",
648
+ "valueWith",
636
649
  "loader",
637
650
  "serverSearch",
638
651
  "debounceMs",
@@ -736,7 +749,7 @@ var WrSchemaForm = class WrSchemaForm {
736
749
  };
737
750
  i0.ɵɵngDeclareClassMetadata({
738
751
  minVersion: "12.0.0",
739
- version: "22.2.6",
752
+ version: "22.3.0",
740
753
  ngImport: i0,
741
754
  type: WrSchemaForm,
742
755
  decorators: [{
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-schema-form.mjs","names":[],"sources":["../../../projects/lib/schema-form/array-state.ts","../../../projects/lib/schema-form/schema-form.ts","../../../projects/lib/schema-form/schema-form.html"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Directive, input } from '@angular/core';\nimport { NgControl, type ValidationErrors } from '@angular/forms';\nimport type { Field } from '@angular/forms/signals';\n\nimport { wrCheckStyles } from 'ngwr/utils';\n\n/**\n * Hands an `array` field's own state to the `<wr-form-field>` around it.\n *\n * `<wr-form-field>` reads its errors off the `NgControl` in its content, which\n * `[formField]` provides for a control. A repeating group has no control, so\n * without this its own errors (`minLength`, a `validate` on the array) had\n * nowhere to show, and they would have needed a second copy of the rules for\n * where an error's words come from.\n *\n * @internal\n */\n@Directive({\n selector: '[wrSchemaFormArrayState]',\n providers: [{ provide: NgControl, useExisting: WrSchemaFormArrayState }],\n})\nexport class WrSchemaFormArrayState {\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('schema-form');\n }\n\n readonly wrSchemaFormArrayState = input.required<Field<never>>();\n\n /** Not an `AbstractControl`, which is what tells the field to read the getters below. */\n readonly control = null;\n\n get touched(): boolean {\n return this.wrSchemaFormArrayState()().touched();\n }\n\n get dirty(): boolean {\n return this.wrSchemaFormArrayState()().dirty();\n }\n\n /** The array's OWN errors, keyed by kind. An item's errors show beside the item's control. */\n get errors(): ValidationErrors | null {\n const errors = this.wrSchemaFormArrayState()().errors();\n return errors.length ? Object.fromEntries(errors.map(error => [error.kind, error])) : null;\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 { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n Injector,\n type Signal,\n ViewEncapsulation,\n afterNextRender,\n computed,\n inject,\n input,\n isDevMode,\n} from '@angular/core';\nimport { FormField, type Field, type FieldState, type FieldTree, isFieldTree } from '@angular/forms/signals';\n\nimport { WrButton } from 'ngwr/button';\nimport { WrCheckbox } from 'ngwr/checkbox';\nimport { WrDatePicker, WrDateRangePicker } from 'ngwr/date-picker';\nimport { WrFileUpload } from 'ngwr/file-upload';\nimport { WR_FIELD, WrFormField, wrFieldLabel, type WrFieldSpec } from 'ngwr/form';\nimport { useI18nText } from 'ngwr/i18n';\nimport { WrInput } from 'ngwr/input';\nimport { WrInputNumber } from 'ngwr/input-number';\nimport { WrRadio, WrRadioGroup } from 'ngwr/radio';\nimport { WrRating } from 'ngwr/rating';\nimport { WrSegmented } from 'ngwr/segmented';\nimport { WrOption, WrSelect } from 'ngwr/select';\nimport { WrSlider } from 'ngwr/slider';\nimport { WrSwitch } from 'ngwr/switch';\nimport { WrTextarea } from 'ngwr/textarea';\nimport { wrNumAttr, wrCheckStyles } from 'ngwr/utils';\n\nimport { WrSchemaFormArrayState } from './array-state';\n\n/** One field the template draws, resolved once per schema change. */\ninterface WrRenderedField {\n readonly key: string;\n readonly field: Field<never>;\n readonly spec: WrFieldSpec;\n /** `spec.label`, or the key de-camel-cased. */\n readonly label: string;\n /**\n * The same text, or `''` for the two kinds that carry their own label inside\n * the control. Resolved here rather than in the template: a method call in a\n * template is re-run on every pass, and this is decided once per schema.\n */\n readonly labelAbove: string;\n /** `grid-column`, already clamped to the columns of the grid the field sits on. */\n readonly column: string;\n /** DOM id prefix for the parts of an `array` field. */\n readonly id: string;\n /** The item fields of an `array`, in order. Empty for every other kind. */\n readonly items: Signal<readonly FieldTree<object>[]>;\n}\n\n/** A run of fields drawn inside one `<fieldset>`. */\ninterface WrRenderedSection {\n readonly id: string;\n readonly title: string;\n readonly description: string;\n /** `grid-template-columns` of the section's own grid. */\n readonly template: string;\n readonly fields: WrRenderedField[];\n /** False while the schema hides every field in it: an empty fieldset announces a group of nothing. */\n readonly visible: Signal<boolean>;\n}\n\n/** One child of the form's grid: a field, or a section holding several. */\ninterface WrRenderedCell {\n readonly key: string;\n readonly field?: WrRenderedField;\n readonly section?: WrRenderedSection;\n}\n\nconst NO_ITEMS: Signal<readonly FieldTree<object>[]> = computed(() => []);\n\nlet uid = 0;\n\n/**\n * The two kinds that carry their own label. Everything else gets one above the\n * control, from `<wr-form-field>`.\n */\nconst SELF_LABELLING = new Set<WrFieldSpec['kind']>(['checkbox', 'switch']);\n\n/** What each kind writes into the model, for the dev-mode mismatch warning. */\nconst EXPECTED_TYPE: Partial<Record<WrFieldSpec['kind'], string>> = {\n input: 'string',\n textarea: 'string',\n number: 'number',\n multiselect: 'array',\n tags: 'array',\n checkbox: 'boolean',\n switch: 'boolean',\n slider: 'number',\n rating: 'number',\n array: 'array',\n};\n\n/** `typeof`, with the one distinction it does not make and three kinds depend on. */\nfunction typeOf(value: unknown): string {\n return Array.isArray(value) ? 'array' : typeof value;\n}\n\n/** The track list of a grid of `columns` equal columns. */\nfunction tracks(columns: number): string {\n return `repeat(${Math.max(1, Math.round(columns))}, minmax(0, 1fr))`;\n}\n\n/**\n * The first field of a group a keyboard can land on: described, not hidden and\n * not disabled, in the model's key order. A nested `array` is passed over, since\n * it has no control of its own to focus.\n */\nfunction firstControl(group: FieldTree<object>): Field<never> | null {\n for (const [, child] of group as unknown as Iterable<[string, unknown]>) {\n if (!isFieldTree(child)) continue;\n const state = (child as Field<never>)();\n const spec = state.metadata(WR_FIELD)?.();\n if (spec && spec.kind !== 'array' && !state.hidden() && !state.disabled()) return child as Field<never>;\n }\n return null;\n}\n\n/**\n * Warn when a group's described fields are about to be drawn by nothing.\n *\n * A field tree is iterated one level deep, so an object-valued field with no\n * `WR_FIELD` of its own is skipped exactly like an undescribed leaf — and its\n * children go with it. That is the right default (a model nests for reasons\n * that have nothing to do with a screen), but it is indistinguishable from a\n * half-drawn form: nothing is missing from the DOM, so nothing looks wrong.\n *\n * Describing the children and getting none of them is never intentional, so\n * that exact shape is what this reports. A group whose children carry no spec\n * either is silent, because it is a model detail this screen does not render.\n */\nfunction warnOnUndrawnGroup(key: string, group: unknown): void {\n // A field tree over a primitive is not iterable, and every undescribed leaf\n // arrives here — so the guard is what keeps this from throwing on the common\n // case rather than a defence against an exotic one.\n const subfields = (group as Partial<Iterable<[string, unknown]>>)[Symbol.iterator];\n if (typeof subfields !== 'function') return;\n // An array iterates its items, not `[key, field]` pairs.\n if (Array.isArray((group as Field<never>)().value())) return;\n\n let described = 0;\n for (const [, child] of group as Iterable<[string, unknown]>) {\n if (isFieldTree(child) && (child as Field<never>)().metadata(WR_FIELD)?.()) described++;\n }\n if (described === 0) return;\n\n // eslint-disable-next-line no-console -- dev-mode validation\n console.warn(\n `[NGWR] <wr-schema-form>: \"${key}\" is a group holding ${described} described ` +\n `field(s), and none of them are drawn — a field tree is walked one level deep. ` +\n `Draw the group with a second <wr-schema-form [field]=\"form.${key}\" />, or give ` +\n `\"${key}\" a WR_FIELD of its own if this screen is meant to skip it.`\n );\n}\n\n/**\n * Warn when a `kind` contradicts what the field actually holds.\n *\n * This is the one failure mode of the whole component that nothing else\n * reports: `kind` is a string on a metadata value, so TypeScript cannot hold it\n * against the field's own type, and a `kind: 'number'` on a `string` field\n * renders a `<wr-input-number>` that writes numbers into it forever. The runtime\n * value is the only evidence available, so an empty or nullish one says nothing\n * and is left alone.\n */\nfunction warnOnKindMismatch(f: WrRenderedField): void {\n const expected = EXPECTED_TYPE[f.spec.kind];\n const value = f.field().value();\n if (!expected || value === null || value === undefined || value === '') return;\n if (typeOf(value) === expected) return;\n\n // eslint-disable-next-line no-console -- dev-mode validation\n console.warn(\n `[NGWR] <wr-schema-form>: field \"${f.key}\" is described as kind '${f.spec.kind}', ` +\n `which writes a ${expected}, but the field holds a ${typeOf(value)}. ` +\n `The control will overwrite the model with the wrong type.`\n );\n}\n\n/**\n * A form drawn from a Signal Forms schema — one `<wr-form-field>`, one control\n * and one set of error messages per described field, laid out on a grid.\n *\n * The presentation rides on the SAME schema as the validation, through the\n * `WR_FIELD` metadata key from `ngwr/form`:\n *\n * ```ts\n * const profile = form(model, path => {\n * required(path.email, { message: 'Enter your email.' });\n * email(path.email, { message: 'That is not an email address.' });\n * metadata(path.email, WR_FIELD, () => ({ kind: 'input', type: 'email' }));\n * metadata(path.role, WR_FIELD, () => ({ kind: 'select', options: ROLES }));\n * });\n * ```\n * ```html\n * <wr-schema-form [field]=\"profile\" [columns]=\"2\" />\n * ```\n *\n * The error messages are the rules' own: each field's `<wr-form-field>` shows a\n * validator's `message`, else `validation.<key>` from the app's i18n catalog.\n * ngwr ships no error texts, so a rule with neither renders no message.\n *\n * **A field with no `WR_FIELD` metadata is skipped**, silently and on purpose: a\n * schema may describe more than one screen renders, and guessing a control from\n * a field's type would draw a `wr-switch` for every boolean flag in the model.\n * Order is the model's own key order.\n *\n * **`required`, `disabled`, `readonly` and `hidden` are NOT in the spec.** They\n * are Angular's own schema functions, `[formField]` already applies the first\n * three to the control, and this component reads `hidden()` to decide whether to\n * draw the field at all — which Angular's docs say a template has to do itself.\n * Re-declaring any of them here would be a second source of truth for state the\n * form already owns.\n *\n * **A section is a spec key, a repeating group is a kind.** Fields naming the\n * same `section` are drawn in one `<fieldset>` under its title. A field of\n * `kind: 'array'` over an array of objects draws one group per item, each a\n * `<wr-schema-form>` of its own, so the items' fields are described once with\n * `applyEach`. Add and Remove write the array, and `minLength` and `maxLength`\n * on it are the bounds they stop at.\n *\n * **Why its own entry point rather than `ngwr/form`.** Drawing every kind means\n * depending on every control, and `ngwr/form` is the layout primitive every\n * form imports — folding this in would put a date picker and a slider into the\n * bundle of an app that only wanted `<wr-form-field>`.\n *\n * @see https://ngwr.dev/reference/components/schema-form\n */\n@Component({\n selector: 'wr-schema-form',\n templateUrl: './schema-form.html',\n encapsulation: ViewEncapsulation.None,\n imports: [\n FormField,\n NgTemplateOutlet,\n WrButton,\n WrCheckbox,\n WrDatePicker,\n WrDateRangePicker,\n WrFileUpload,\n WrFormField,\n WrInput,\n WrInputNumber,\n WrOption,\n WrRadio,\n WrRadioGroup,\n WrRating,\n WrSchemaFormArrayState,\n WrSegmented,\n WrSelect,\n WrSlider,\n WrSwitch,\n WrTextarea,\n ],\n host: {\n class: 'wr-schema-form',\n '[style.grid-template-columns]': 'template()',\n },\n})\nexport class WrSchemaForm<T extends object> {\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('schema-form');\n }\n\n // Generic, rather than `FieldTree<Record<string, unknown>>`, because a model\n // declared as an `interface` has no index signature and is not assignable to\n // that: every consumer would have had to declare their model as a type alias\n // just to bind it. `T extends object` still refuses a field tree over a\n // primitive, which has no subfields and would draw nothing.\n /**\n * The form to draw — the value `form()` returned, or any object-valued field\n * inside one.\n */\n readonly field = input.required<FieldTree<T>>();\n\n /**\n * Grid columns. A field spans one of them unless its spec says otherwise.\n * @default 1\n */\n readonly columns = input(1, { transform: wrNumAttr(1) });\n\n /** Text of the button that adds an item to a repeating group. Falls back to `common.add`. */\n readonly addLabel = input<string | null>(null);\n\n /** Text of the button that removes one item of a repeating group. Falls back to `common.remove`. */\n readonly removeLabel = input<string | null>(null);\n\n protected readonly resolvedAdd = useI18nText(this.addLabel, 'common.add', 'Add');\n protected readonly resolvedRemove = useI18nText(this.removeLabel, 'common.remove', 'Remove');\n\n private readonly injector = inject(Injector);\n private readonly uid = `wr-schema-form-${++uid}`;\n\n /**\n * The track list, written as a style rather than published as a\n * `--wr-schema-form-columns` hook: `columns` always has a value, so the\n * inline style would win over any declaration a consumer wrote and the hook\n * would be one nobody could use.\n */\n protected readonly template = computed(() => tracks(this.columns()));\n\n /**\n * The described fields, in the model's key order, with the fields of a\n * section gathered where its first field stands.\n *\n * A field tree over an object is iterable as `[key, field]` pairs, which is\n * the whole reason this component needs no field list of its own. `isFieldTree`\n * guards the pair: a model carrying a method or a non-field property would\n * otherwise be read as a field and answer `undefined` to everything.\n */\n protected readonly cells = computed<readonly WrRenderedCell[]>(() => {\n const columns = this.columns();\n const described: { key: string; field: Field<never>; spec: WrFieldSpec; title: string | null }[] = [];\n // What each section says about itself: the first field to state a member wins.\n const stated = new Map<string, { description?: string; columns?: number }>();\n\n for (const [key, child] of this.field() as unknown as Iterable<[string, unknown]>) {\n if (!isFieldTree(child)) continue;\n\n const field = child as Field<never>;\n const spec = field().metadata(WR_FIELD)?.();\n if (!spec) {\n if (isDevMode()) warnOnUndrawnGroup(key, child);\n continue;\n }\n\n const section = typeof spec.section === 'string' ? { title: spec.section } : spec.section;\n if (section) {\n const known = stated.get(section.title) ?? {};\n stated.set(section.title, {\n description: known.description ?? section.description,\n columns: known.columns ?? section.columns,\n });\n }\n described.push({ key, field, spec, title: section?.title ?? null });\n }\n\n const out: WrRenderedCell[] = [];\n const sections = new Map<string, WrRenderedSection>();\n const all: WrRenderedField[] = [];\n\n for (const { key, field, spec, title } of described) {\n const grid = title === null ? columns : Math.max(1, Math.round(stated.get(title)?.columns ?? columns));\n const label = spec.label ?? wrFieldLabel(key);\n const span = Math.min(Math.max(Math.round(spec.span ?? 1), 1), grid);\n const rendered: WrRenderedField = {\n key,\n field,\n spec,\n label,\n labelAbove: SELF_LABELLING.has(spec.kind) ? '' : label,\n column: `span ${span}`,\n id: `${this.uid}-${key}`,\n items:\n spec.kind === 'array'\n ? computed(() => {\n const value: unknown = field().value();\n const list = field as unknown as ArrayLike<FieldTree<object>>;\n return Array.isArray(value) ? value.map((_, index) => list[index]) : [];\n })\n : NO_ITEMS,\n };\n all.push(rendered);\n\n if (title === null) {\n out.push({ key, field: rendered });\n continue;\n }\n\n let section = sections.get(title);\n if (!section) {\n const fields: WrRenderedField[] = [];\n section = {\n id: `${this.uid}-section-${sections.size}`,\n title,\n description: stated.get(title)?.description ?? '',\n template: tracks(grid),\n fields,\n visible: computed(() => fields.some(each => !each.field().hidden())),\n };\n sections.set(title, section);\n out.push({ key: `section:${title}`, section });\n }\n section.fields.push(rendered);\n }\n\n if (isDevMode()) all.forEach(f => warnOnKindMismatch(f));\n return out;\n });\n\n /** Types the context of the cell template, which an outlet hands over untyped. */\n protected rendered(field: unknown): WrRenderedField {\n return field as WrRenderedField;\n }\n\n /** Whether a repeating group may take one more item: not past `maxLength`, and not disabled or read-only. */\n protected canAdd(f: WrRenderedField): boolean {\n const state = f.field();\n return !state.disabled() && !state.readonly() && f.items().length < (state.maxLength?.() ?? Infinity);\n }\n\n /** Whether a repeating group may lose an item: not under `minLength`, and not disabled or read-only. */\n protected canRemove(f: WrRenderedField): boolean {\n const state = f.field();\n return !state.disabled() && !state.readonly() && f.items().length > (state.minLength?.() ?? 0);\n }\n\n /**\n * What describes a repeating group: its own errors while it shows any, else\n * its hint. The ids are the ones `<wr-form-field>` derives from `controlId`,\n * and the condition is the one it shows errors on, so the reference never\n * names an element that is not drawn.\n */\n protected describedBy(f: WrRenderedField): string | null {\n const state = f.field();\n if ((state.touched() || state.dirty()) && state.errors().length) return `${f.id}-errors`;\n return f.spec.hint ? `${f.id}-hint` : null;\n }\n\n /** Append a new item and move focus into it. */\n protected add(f: WrRenderedField): void {\n const make = f.spec.item;\n if (!make || !this.canAdd(f)) return;\n\n const index = f.items().length;\n this.write(f, list => [...list, make()]);\n afterNextRender(() => this.focusItem(f, index), { injector: this.injector });\n }\n\n /**\n * Remove one item. Focus goes to the item that took its place, and from the\n * last one to the Add button, so it never falls back to the page.\n */\n protected remove(f: WrRenderedField, index: number, list: HTMLElement): void {\n if (!this.canRemove(f)) return;\n\n this.write(f, items => items.filter((_, each) => each !== index));\n afterNextRender(\n () => {\n const length = f.items().length;\n if (index < length) return this.focusItem(f, index);\n const add = list.querySelector<HTMLElement>(':scope > .wr-schema-form__add:not([disabled])');\n if (add) add.focus();\n else if (length) this.focusItem(f, length - 1);\n },\n { injector: this.injector }\n );\n }\n\n private write(f: WrRenderedField, change: (items: readonly unknown[]) => readonly unknown[]): void {\n const state = f.field() as unknown as FieldState<readonly unknown[]>;\n state.value.update(change);\n state.markAsDirty();\n // The array alone: a new item's fields are not touched because the list was.\n state.markAsTouched({ skipDescendants: true });\n }\n\n private focusItem(f: WrRenderedField, index: number): void {\n const item = f.items()[index];\n if (item) firstControl(item)?.().focusBoundControl();\n }\n}\n","<ng-template #cell let-drawn>\n @let f = rendered(drawn);\n @let state = f.field();\n\n <!-- Angular's `hidden()` does not hide anything on its own; the docs are\n explicit that the template has to honour it. -->\n @if (!state.hidden()) {\n @if (f.spec.kind === 'array') {\n <fieldset class=\"wr-schema-form__array\" [style.grid-column]=\"f.column\" [attr.aria-describedby]=\"describedBy(f)\">\n <legend class=\"wr-schema-form__legend\">\n {{ f.label }}\n @if (state.required()) {\n <span class=\"wr-form-field__required\" aria-hidden=\"true\">*</span>\n }\n </legend>\n <wr-form-field [hint]=\"f.spec.hint ?? ''\" [controlId]=\"f.id\">\n <div #list class=\"wr-schema-form__items\" [id]=\"`${f.id}-items`\" [wrSchemaFormArrayState]=\"f.field\">\n @for (item of f.items(); track item) {\n <div class=\"wr-schema-form__item\" role=\"group\" [attr.aria-labelledby]=\"`${f.id}-title-${$index}`\">\n <div class=\"wr-schema-form__item-head\">\n <span class=\"wr-schema-form__item-title\" [id]=\"`${f.id}-title-${$index}`\"\n >{{ f.spec.itemLabel ?? f.label }} {{ $index + 1 }}</span\n >\n <!-- Named by its own text and then the item's heading, so a\n list of five reads \"Remove Address 2\", not \"Remove\" five times. -->\n <button\n wr-btn\n type=\"button\"\n size=\"sm\"\n class=\"wr-schema-form__remove\"\n [id]=\"`${f.id}-remove-${$index}`\"\n [attr.aria-labelledby]=\"`${f.id}-remove-${$index} ${f.id}-title-${$index}`\"\n [disabled]=\"!canRemove(f)\"\n (click)=\"remove(f, $index, list)\"\n >\n {{ resolvedRemove() }}\n </button>\n </div>\n <wr-schema-form\n [field]=\"item\"\n [columns]=\"f.spec.columns ?? 1\"\n [addLabel]=\"addLabel()\"\n [removeLabel]=\"removeLabel()\"\n />\n </div>\n }\n @if (f.spec.item) {\n <button wr-btn type=\"button\" class=\"wr-schema-form__add\" [disabled]=\"!canAdd(f)\" (click)=\"add(f)\">\n {{ resolvedAdd() }}\n </button>\n }\n </div>\n </wr-form-field>\n </fieldset>\n } @else {\n <div class=\"wr-schema-form__field\" [style.grid-column]=\"f.column\">\n <wr-form-field [label]=\"f.labelAbove\" [hint]=\"f.spec.hint ?? ''\" [required]=\"state.required()\">\n @switch (f.spec.kind) {\n @case ('textarea') {\n <wr-textarea [formField]=\"f.field\" [placeholder]=\"f.spec.placeholder ?? ''\" [ariaLabel]=\"f.label\" />\n }\n @case ('number') {\n <wr-input-number\n [formField]=\"f.field\"\n [placeholder]=\"f.spec.placeholder ?? ''\"\n [step]=\"f.spec.step ?? 1\"\n [ariaLabel]=\"f.label\"\n />\n }\n @case ('select') {\n <wr-select [formField]=\"f.field\" [placeholder]=\"f.spec.placeholder ?? null\" [ariaLabel]=\"f.label\">\n @for (option of f.spec.options ?? []; track option.value) {\n <wr-option [value]=\"option.value\" [disabled]=\"option.disabled ?? false\">{{ option.label }}</wr-option>\n }\n </wr-select>\n }\n @case ('multiselect') {\n <wr-select\n mode=\"multi\"\n [formField]=\"f.field\"\n [placeholder]=\"f.spec.placeholder ?? null\"\n [ariaLabel]=\"f.label\"\n >\n @for (option of f.spec.options ?? []; track option.value) {\n <wr-option [value]=\"option.value\" [disabled]=\"option.disabled ?? false\">{{ option.label }}</wr-option>\n }\n </wr-select>\n }\n @case ('tags') {\n <wr-select\n mode=\"tag\"\n [formField]=\"f.field\"\n [placeholder]=\"f.spec.placeholder ?? null\"\n [ariaLabel]=\"f.label\"\n />\n }\n @case ('checkbox') {\n <wr-checkbox [formField]=\"f.field\">{{ f.label }}</wr-checkbox>\n }\n @case ('switch') {\n <wr-switch [formField]=\"f.field\">{{ f.label }}</wr-switch>\n }\n @case ('radio') {\n <!-- `wr-radio-group` has no `ariaLabel` input, and needs none: its\n host is a `role=\"radiogroup\"`, where `aria-label` is legal. -->\n <wr-radio-group [formField]=\"f.field\" [attr.aria-label]=\"f.label\">\n @for (option of f.spec.options ?? []; track option.value) {\n <wr-radio [value]=\"option.value\" [disabled]=\"option.disabled ?? false\">{{ option.label }}</wr-radio>\n }\n </wr-radio-group>\n }\n @case ('segmented') {\n <wr-segmented [formField]=\"f.field\" [options]=\"f.spec.options ?? []\" />\n }\n @case ('date') {\n <wr-date-picker [formField]=\"f.field\" [placeholder]=\"f.spec.placeholder ?? ''\" [ariaLabel]=\"f.label\" />\n }\n @case ('daterange') {\n <!-- The picker names its two inputs \"Range start\" and \"Range end\";\n the group around them is what carries the field's own label. -->\n <wr-date-range-picker [formField]=\"f.field\" role=\"group\" [attr.aria-label]=\"f.label\" />\n }\n @case ('slider') {\n <wr-slider [formField]=\"f.field\" [step]=\"f.spec.step ?? 1\" [ariaLabel]=\"f.label\" />\n }\n @case ('rating') {\n <wr-rating [formField]=\"f.field\" [ariaLabel]=\"f.label\" />\n }\n @case ('file') {\n <wr-file-upload\n [formField]=\"f.field\"\n [multiple]=\"f.spec.multiple ?? false\"\n [accept]=\"f.spec.accept ?? ''\"\n />\n }\n @default {\n <input\n wrInput\n [formField]=\"f.field\"\n [type]=\"f.spec.type ?? 'text'\"\n [placeholder]=\"f.spec.placeholder ?? ''\"\n />\n }\n }\n </wr-form-field>\n </div>\n }\n }\n</ng-template>\n\n@for (c of cells(); track c.key) {\n @if (c.section; as section) {\n @if (section.visible()) {\n <fieldset\n class=\"wr-schema-form__section\"\n [attr.aria-describedby]=\"section.description ? `${section.id}-description` : null\"\n >\n <legend class=\"wr-schema-form__legend\">{{ section.title }}</legend>\n @if (section.description) {\n <p class=\"wr-schema-form__description\" [id]=\"`${section.id}-description`\">{{ section.description }}</p>\n }\n <div class=\"wr-schema-form__grid\" [style.grid-template-columns]=\"section.template\">\n @for (f of section.fields; track f.key) {\n <ng-container [ngTemplateOutlet]=\"cell\" [ngTemplateOutletContext]=\"{ $implicit: f }\" />\n }\n </div>\n </fieldset>\n }\n } @else {\n <ng-container [ngTemplateOutlet]=\"cell\" [ngTemplateOutletContext]=\"{ $implicit: c.field }\" />\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,IAAa,yBAAb,MAAa,uBAAsB;CACjC,cAAA;EACE,IAAI,OAAO,cAAc,eAAe,WAAW,cAAc,aAAa;CAChF;CAES,yBAAyB,MAAM,SAAwB,GAAA,YAAA,CAAA,EAAA,WAAA,yBAAA,CAAA,+BAAA,CAAA,CAAA;CAGvD,UAAU;CAEnB,IAAI,UAAO;EACT,OAAO,KAAK,uBAAsB,CAAE,CAAA,CAAE,CAAC,QAAO;CAChD;CAEA,IAAI,QAAK;EACP,OAAO,KAAK,uBAAsB,CAAE,CAAA,CAAE,CAAC,MAAK;CAC9C;CAGA,IAAI,SAAM;EACR,MAAM,SAAS,KAAK,uBAAsB,CAAE,CAAA,CAAE,CAAC,OAAM;EACrD,OAAO,OAAO,SAAS,OAAO,YAAY,OAAO,KAAI,UAAS,CAAC,MAAM,MAAM,KAAK,CAAC,CAAC,IAAI;CACxF;CAtBW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAsB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAtB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAsB,cAAA;EAAA,UAAA;EAAA,QAAA,EAAA,wBAAA;GAAA,mBAAA;GAAA,YAAA;GAAA,UAAA;GAAA,YAAA;GAAA,mBAAA;EAAA,EAAA;EAAA,WAFtB,CAAC;GAAE,SAAS;GAAW,aAAa;EAAsB,CAAE;EAAC,UAAA;CAAA,CAAA;;AAE7D,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UA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A;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;IAAA;IAAA,SAAA,CAAA,eAAA,OAAA;GAAA;EAAA;EAAA,eAAA,GAAA,kBAAA;CAAA,CAAA;;AAOD,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAY,YAAA,CAAA;EA/BxB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAgB,eAEX,kBAAkB;GAAI,SAC5B;IACP;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;GAAA,MACK;IACJ,OAAO;IACP,iCAAiC;GAClC;GAAA,UAAA;EAAA,CAAA"}
1
+ {"version":3,"file":"ngwr-schema-form.mjs","names":[],"sources":["../../../projects/lib/schema-form/array-state.ts","../../../projects/lib/schema-form/schema-form.ts","../../../projects/lib/schema-form/schema-form.html"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Directive, input } from '@angular/core';\nimport { NgControl, type ValidationErrors } from '@angular/forms';\nimport type { Field } from '@angular/forms/signals';\n\nimport { wrCheckStyles } from 'ngwr/utils';\n\n/**\n * Hands an `array` field's own state to the `<wr-form-field>` around it.\n *\n * `<wr-form-field>` reads its errors off the `NgControl` in its content, which\n * `[formField]` provides for a control. A repeating group has no control, so\n * without this its own errors (`minLength`, a `validate` on the array) had\n * nowhere to show, and they would have needed a second copy of the rules for\n * where an error's words come from.\n *\n * @internal\n */\n@Directive({\n selector: '[wrSchemaFormArrayState]',\n providers: [{ provide: NgControl, useExisting: WrSchemaFormArrayState }],\n})\nexport class WrSchemaFormArrayState {\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('schema-form');\n }\n\n readonly wrSchemaFormArrayState = input.required<Field<never>>();\n\n /** Not an `AbstractControl`, which is what tells the field to read the getters below. */\n readonly control = null;\n\n get touched(): boolean {\n return this.wrSchemaFormArrayState()().touched();\n }\n\n get dirty(): boolean {\n return this.wrSchemaFormArrayState()().dirty();\n }\n\n /** The array's OWN errors, keyed by kind. An item's errors show beside the item's control. */\n get errors(): ValidationErrors | null {\n const errors = this.wrSchemaFormArrayState()().errors();\n return errors.length ? Object.fromEntries(errors.map(error => [error.kind, error])) : null;\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 { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n Injector,\n type Signal,\n ViewEncapsulation,\n afterNextRender,\n computed,\n inject,\n input,\n isDevMode,\n} from '@angular/core';\nimport { FormField, type Field, type FieldState, type FieldTree, isFieldTree } from '@angular/forms/signals';\n\nimport { WrButton } from 'ngwr/button';\nimport { WrCheckbox } from 'ngwr/checkbox';\nimport { WrDatePicker, WrDateRangePicker } from 'ngwr/date-picker';\nimport { WrFileUpload } from 'ngwr/file-upload';\nimport { WR_FIELD, WrFormField, wrFieldLabel, type WrFieldSpec } from 'ngwr/form';\nimport { useI18nText } from 'ngwr/i18n';\nimport { WrInput } from 'ngwr/input';\nimport { WrInputNumber } from 'ngwr/input-number';\nimport { WrRadio, WrRadioGroup } from 'ngwr/radio';\nimport { WrRating } from 'ngwr/rating';\nimport { WrSegmented } from 'ngwr/segmented';\nimport { WrOption, WrSelect } from 'ngwr/select';\nimport { WrSlider } from 'ngwr/slider';\nimport { WrSwitch } from 'ngwr/switch';\nimport { WrTextarea } from 'ngwr/textarea';\nimport { wrNumAttr, wrCheckStyles } from 'ngwr/utils';\n\nimport { WrSchemaFormArrayState } from './array-state';\n\n/** One field the template draws, resolved once per schema change. */\ninterface WrRenderedField {\n readonly key: string;\n readonly field: Field<never>;\n readonly spec: WrFieldSpec;\n /** `spec.label`, or the key de-camel-cased. */\n readonly label: string;\n /**\n * The same text, or `''` for the two kinds that carry their own label inside\n * the control. Resolved here rather than in the template: a method call in a\n * template is re-run on every pass, and this is decided once per schema.\n */\n readonly labelAbove: string;\n /** `grid-column`, already clamped to the columns of the grid the field sits on. */\n readonly column: string;\n /** DOM id prefix for the parts of an `array` field. */\n readonly id: string;\n /** The item fields of an `array`, in order. Empty for every other kind. */\n readonly items: Signal<readonly FieldTree<object>[]>;\n}\n\n/** A run of fields drawn inside one `<fieldset>`. */\ninterface WrRenderedSection {\n readonly id: string;\n readonly title: string;\n readonly description: string;\n /** `grid-template-columns` of the section's own grid. */\n readonly template: string;\n readonly fields: WrRenderedField[];\n /** False while the schema hides every field in it: an empty fieldset announces a group of nothing. */\n readonly visible: Signal<boolean>;\n}\n\n/** One child of the form's grid: a field, or a section holding several. */\ninterface WrRenderedCell {\n readonly key: string;\n readonly field?: WrRenderedField;\n readonly section?: WrRenderedSection;\n}\n\nconst NO_ITEMS: Signal<readonly FieldTree<object>[]> = computed(() => []);\n\nlet uid = 0;\n\n/**\n * The two kinds that carry their own label. Everything else gets one above the\n * control, from `<wr-form-field>`.\n */\nconst SELF_LABELLING = new Set<WrFieldSpec['kind']>(['checkbox', 'switch']);\n\n/** What each kind writes into the model, for the dev-mode mismatch warning. */\nconst EXPECTED_TYPE: Partial<Record<WrFieldSpec['kind'], string>> = {\n input: 'string',\n textarea: 'string',\n number: 'number',\n multiselect: 'array',\n tags: 'array',\n checkbox: 'boolean',\n switch: 'boolean',\n slider: 'number',\n rating: 'number',\n array: 'array',\n};\n\n/** `typeof`, with the one distinction it does not make and three kinds depend on. */\nfunction typeOf(value: unknown): string {\n return Array.isArray(value) ? 'array' : typeof value;\n}\n\n/** The track list of a grid of `columns` equal columns. */\nfunction tracks(columns: number): string {\n return `repeat(${Math.max(1, Math.round(columns))}, minmax(0, 1fr))`;\n}\n\n/**\n * The first field of a group a keyboard can land on: described, not hidden and\n * not disabled, in the model's key order. A nested `array` is passed over, since\n * it has no control of its own to focus.\n */\nfunction firstControl(group: FieldTree<object>): Field<never> | null {\n for (const [, child] of group as unknown as Iterable<[string, unknown]>) {\n if (!isFieldTree(child)) continue;\n const state = (child as Field<never>)();\n const spec = state.metadata(WR_FIELD)?.();\n if (spec && spec.kind !== 'array' && !state.hidden() && !state.disabled()) return child as Field<never>;\n }\n return null;\n}\n\n/**\n * Warn when a group's described fields are about to be drawn by nothing.\n *\n * A field tree is iterated one level deep, so an object-valued field with no\n * `WR_FIELD` of its own is skipped exactly like an undescribed leaf — and its\n * children go with it. That is the right default (a model nests for reasons\n * that have nothing to do with a screen), but it is indistinguishable from a\n * half-drawn form: nothing is missing from the DOM, so nothing looks wrong.\n *\n * Describing the children and getting none of them is never intentional, so\n * that exact shape is what this reports. A group whose children carry no spec\n * either is silent, because it is a model detail this screen does not render.\n */\nfunction warnOnUndrawnGroup(key: string, group: unknown): void {\n // A field tree over a primitive is not iterable, and every undescribed leaf\n // arrives here — so the guard is what keeps this from throwing on the common\n // case rather than a defence against an exotic one.\n const subfields = (group as Partial<Iterable<[string, unknown]>>)[Symbol.iterator];\n if (typeof subfields !== 'function') return;\n // An array iterates its items, not `[key, field]` pairs.\n if (Array.isArray((group as Field<never>)().value())) return;\n\n let described = 0;\n for (const [, child] of group as Iterable<[string, unknown]>) {\n if (isFieldTree(child) && (child as Field<never>)().metadata(WR_FIELD)?.()) described++;\n }\n if (described === 0) return;\n\n // eslint-disable-next-line no-console -- dev-mode validation\n console.warn(\n `[NGWR] <wr-schema-form>: \"${key}\" is a group holding ${described} described ` +\n `field(s), and none of them are drawn — a field tree is walked one level deep. ` +\n `Draw the group with a second <wr-schema-form [field]=\"form.${key}\" />, or give ` +\n `\"${key}\" a WR_FIELD of its own if this screen is meant to skip it.`\n );\n}\n\n/**\n * Warn when a `kind` contradicts what the field actually holds.\n *\n * This is the one failure mode of the whole component that nothing else\n * reports: `kind` is a string on a metadata value, so TypeScript cannot hold it\n * against the field's own type, and a `kind: 'number'` on a `string` field\n * renders a `<wr-input-number>` that writes numbers into it forever. The runtime\n * value is the only evidence available, so an empty or nullish one says nothing\n * and is left alone.\n */\nfunction warnOnKindMismatch(f: WrRenderedField): void {\n const expected = EXPECTED_TYPE[f.spec.kind];\n const value = f.field().value();\n if (!expected || value === null || value === undefined || value === '') return;\n if (typeOf(value) === expected) return;\n\n // eslint-disable-next-line no-console -- dev-mode validation\n console.warn(\n `[NGWR] <wr-schema-form>: field \"${f.key}\" is described as kind '${f.spec.kind}', ` +\n `which writes a ${expected}, but the field holds a ${typeOf(value)}. ` +\n `The control will overwrite the model with the wrong type.`\n );\n}\n\n/**\n * A form drawn from a Signal Forms schema — one `<wr-form-field>`, one control\n * and one set of error messages per described field, laid out on a grid.\n *\n * The presentation rides on the SAME schema as the validation, through the\n * `WR_FIELD` metadata key from `ngwr/form`:\n *\n * ```ts\n * const profile = form(model, path => {\n * required(path.email, { message: 'Enter your email.' });\n * email(path.email, { message: 'That is not an email address.' });\n * metadata(path.email, WR_FIELD, () => ({ kind: 'input', type: 'email' }));\n * metadata(path.role, WR_FIELD, () => ({ kind: 'select', options: ROLES }));\n * });\n * ```\n * ```html\n * <wr-schema-form [field]=\"profile\" [columns]=\"2\" />\n * ```\n *\n * The error messages are the rules' own: each field's `<wr-form-field>` shows a\n * validator's `message`, else `validation.<key>` from the app's i18n catalog.\n * ngwr ships no error texts, so a rule with neither renders no message.\n *\n * **A field with no `WR_FIELD` metadata is skipped**, silently and on purpose: a\n * schema may describe more than one screen renders, and guessing a control from\n * a field's type would draw a `wr-switch` for every boolean flag in the model.\n * Order is the model's own key order.\n *\n * **`required`, `disabled`, `readonly` and `hidden` are NOT in the spec.** They\n * are Angular's own schema functions, `[formField]` already applies the first\n * three to the control, and this component reads `hidden()` to decide whether to\n * draw the field at all — which Angular's docs say a template has to do itself.\n * Re-declaring any of them here would be a second source of truth for state the\n * form already owns.\n *\n * **A section is a spec key, a repeating group is a kind.** Fields naming the\n * same `section` are drawn in one `<fieldset>` under its title. A field of\n * `kind: 'array'` over an array of objects draws one group per item, each a\n * `<wr-schema-form>` of its own, so the items' fields are described once with\n * `applyEach`. Add and Remove write the array, and `minLength` and `maxLength`\n * on it are the bounds they stop at.\n *\n * **Why its own entry point rather than `ngwr/form`.** Drawing every kind means\n * depending on every control, and `ngwr/form` is the layout primitive every\n * form imports — folding this in would put a date picker and a slider into the\n * bundle of an app that only wanted `<wr-form-field>`.\n *\n * @see https://ngwr.dev/reference/components/schema-form\n */\n@Component({\n selector: 'wr-schema-form',\n templateUrl: './schema-form.html',\n encapsulation: ViewEncapsulation.None,\n imports: [\n FormField,\n NgTemplateOutlet,\n WrButton,\n WrCheckbox,\n WrDatePicker,\n WrDateRangePicker,\n WrFileUpload,\n WrFormField,\n WrInput,\n WrInputNumber,\n WrOption,\n WrRadio,\n WrRadioGroup,\n WrRating,\n WrSchemaFormArrayState,\n WrSegmented,\n WrSelect,\n WrSlider,\n WrSwitch,\n WrTextarea,\n ],\n host: {\n class: 'wr-schema-form',\n '[style.grid-template-columns]': 'template()',\n },\n})\nexport class WrSchemaForm<T extends object> {\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('schema-form');\n }\n\n // Generic, rather than `FieldTree<Record<string, unknown>>`, because a model\n // declared as an `interface` has no index signature and is not assignable to\n // that: every consumer would have had to declare their model as a type alias\n // just to bind it. `T extends object` still refuses a field tree over a\n // primitive, which has no subfields and would draw nothing.\n /**\n * The form to draw — the value `form()` returned, or any object-valued field\n * inside one.\n */\n readonly field = input.required<FieldTree<T>>();\n\n /**\n * Grid columns. A field spans one of them unless its spec says otherwise.\n * @default 1\n */\n readonly columns = input(1, { transform: wrNumAttr(1) });\n\n /** Text of the button that adds an item to a repeating group. Falls back to `common.add`. */\n readonly addLabel = input<string | null>(null);\n\n /** Text of the button that removes one item of a repeating group. Falls back to `common.remove`. */\n readonly removeLabel = input<string | null>(null);\n\n protected readonly resolvedAdd = useI18nText(this.addLabel, 'common.add', 'Add');\n protected readonly resolvedRemove = useI18nText(this.removeLabel, 'common.remove', 'Remove');\n\n private readonly injector = inject(Injector);\n private readonly uid = `wr-schema-form-${++uid}`;\n\n /**\n * The track list, written as a style rather than published as a\n * `--wr-schema-form-columns` hook: `columns` always has a value, so the\n * inline style would win over any declaration a consumer wrote and the hook\n * would be one nobody could use.\n */\n protected readonly template = computed(() => tracks(this.columns()));\n\n /**\n * The described fields, in the model's key order, with the fields of a\n * section gathered where its first field stands.\n *\n * A field tree over an object is iterable as `[key, field]` pairs, which is\n * the whole reason this component needs no field list of its own. `isFieldTree`\n * guards the pair: a model carrying a method or a non-field property would\n * otherwise be read as a field and answer `undefined` to everything.\n */\n protected readonly cells = computed<readonly WrRenderedCell[]>(() => {\n const columns = this.columns();\n const described: { key: string; field: Field<never>; spec: WrFieldSpec; title: string | null }[] = [];\n // What each section says about itself: the first field to state a member wins.\n const stated = new Map<string, { description?: string; columns?: number }>();\n\n for (const [key, child] of this.field() as unknown as Iterable<[string, unknown]>) {\n if (!isFieldTree(child)) continue;\n\n const field = child as Field<never>;\n const spec = field().metadata(WR_FIELD)?.();\n if (!spec) {\n if (isDevMode()) warnOnUndrawnGroup(key, child);\n continue;\n }\n\n const section = typeof spec.section === 'string' ? { title: spec.section } : spec.section;\n if (section) {\n const known = stated.get(section.title) ?? {};\n stated.set(section.title, {\n description: known.description ?? section.description,\n columns: known.columns ?? section.columns,\n });\n }\n described.push({ key, field, spec, title: section?.title ?? null });\n }\n\n const out: WrRenderedCell[] = [];\n const sections = new Map<string, WrRenderedSection>();\n const all: WrRenderedField[] = [];\n\n for (const { key, field, spec, title } of described) {\n const grid = title === null ? columns : Math.max(1, Math.round(stated.get(title)?.columns ?? columns));\n const label = spec.label ?? wrFieldLabel(key);\n const span = Math.min(Math.max(Math.round(spec.span ?? 1), 1), grid);\n const rendered: WrRenderedField = {\n key,\n field,\n spec,\n label,\n labelAbove: SELF_LABELLING.has(spec.kind) ? '' : label,\n column: `span ${span}`,\n id: `${this.uid}-${key}`,\n items:\n spec.kind === 'array'\n ? computed(() => {\n const value: unknown = field().value();\n const list = field as unknown as ArrayLike<FieldTree<object>>;\n return Array.isArray(value) ? value.map((_, index) => list[index]) : [];\n })\n : NO_ITEMS,\n };\n all.push(rendered);\n\n if (title === null) {\n out.push({ key, field: rendered });\n continue;\n }\n\n let section = sections.get(title);\n if (!section) {\n const fields: WrRenderedField[] = [];\n section = {\n id: `${this.uid}-section-${sections.size}`,\n title,\n description: stated.get(title)?.description ?? '',\n template: tracks(grid),\n fields,\n visible: computed(() => fields.some(each => !each.field().hidden())),\n };\n sections.set(title, section);\n out.push({ key: `section:${title}`, section });\n }\n section.fields.push(rendered);\n }\n\n if (isDevMode()) all.forEach(f => warnOnKindMismatch(f));\n return out;\n });\n\n /** Types the context of the cell template, which an outlet hands over untyped. */\n protected rendered(field: unknown): WrRenderedField {\n return field as WrRenderedField;\n }\n\n /** Whether a repeating group may take one more item: not past `maxLength`, and not disabled or read-only. */\n protected canAdd(f: WrRenderedField): boolean {\n const state = f.field();\n return !state.disabled() && !state.readonly() && f.items().length < (state.maxLength?.() ?? Infinity);\n }\n\n /** Whether a repeating group may lose an item: not under `minLength`, and not disabled or read-only. */\n protected canRemove(f: WrRenderedField): boolean {\n const state = f.field();\n return !state.disabled() && !state.readonly() && f.items().length > (state.minLength?.() ?? 0);\n }\n\n /**\n * What describes a repeating group: its own errors while it shows any, else\n * its hint. The ids are the ones `<wr-form-field>` derives from `controlId`,\n * and the condition is the one it shows errors on, so the reference never\n * names an element that is not drawn.\n */\n protected describedBy(f: WrRenderedField): string | null {\n const state = f.field();\n if ((state.touched() || state.dirty()) && state.errors().length) return `${f.id}-errors`;\n return f.spec.hint ? `${f.id}-hint` : null;\n }\n\n /** Append a new item and move focus into it. */\n protected add(f: WrRenderedField): void {\n const make = f.spec.item;\n if (!make || !this.canAdd(f)) return;\n\n const index = f.items().length;\n this.write(f, list => [...list, make()]);\n afterNextRender(() => this.focusItem(f, index), { injector: this.injector });\n }\n\n /**\n * Remove one item. Focus goes to the item that took its place, and from the\n * last one to the Add button, so it never falls back to the page.\n */\n protected remove(f: WrRenderedField, index: number, list: HTMLElement): void {\n if (!this.canRemove(f)) return;\n\n this.write(f, items => items.filter((_, each) => each !== index));\n afterNextRender(\n () => {\n const length = f.items().length;\n if (index < length) return this.focusItem(f, index);\n const add = list.querySelector<HTMLElement>(':scope > .wr-schema-form__add:not([disabled])');\n if (add) add.focus();\n else if (length) this.focusItem(f, length - 1);\n },\n { injector: this.injector }\n );\n }\n\n private write(f: WrRenderedField, change: (items: readonly unknown[]) => readonly unknown[]): void {\n const state = f.field() as unknown as FieldState<readonly unknown[]>;\n state.value.update(change);\n state.markAsDirty();\n // The array alone: a new item's fields are not touched because the list was.\n state.markAsTouched({ skipDescendants: true });\n }\n\n private focusItem(f: WrRenderedField, index: number): void {\n const item = f.items()[index];\n if (item) firstControl(item)?.().focusBoundControl();\n }\n}\n","<ng-template #cell let-drawn>\n @let f = rendered(drawn);\n @let state = f.field();\n\n <!-- Angular's `hidden()` does not hide anything on its own; the docs are\n explicit that the template has to honour it. -->\n @if (!state.hidden()) {\n @if (f.spec.kind === 'array') {\n <fieldset class=\"wr-schema-form__array\" [style.grid-column]=\"f.column\" [attr.aria-describedby]=\"describedBy(f)\">\n <legend class=\"wr-schema-form__legend\">\n {{ f.label }}\n @if (state.required()) {\n <span class=\"wr-form-field__required\" aria-hidden=\"true\">*</span>\n }\n </legend>\n <wr-form-field [hint]=\"f.spec.hint ?? ''\" [controlId]=\"f.id\">\n <div #list class=\"wr-schema-form__items\" [id]=\"`${f.id}-items`\" [wrSchemaFormArrayState]=\"f.field\">\n @for (item of f.items(); track item) {\n <div class=\"wr-schema-form__item\" role=\"group\" [attr.aria-labelledby]=\"`${f.id}-title-${$index}`\">\n <div class=\"wr-schema-form__item-head\">\n <span class=\"wr-schema-form__item-title\" [id]=\"`${f.id}-title-${$index}`\"\n >{{ f.spec.itemLabel ?? f.label }} {{ $index + 1 }}</span\n >\n <!-- Named by its own text and then the item's heading, so a\n list of five reads \"Remove Address 2\", not \"Remove\" five times. -->\n <button\n wr-btn\n type=\"button\"\n size=\"sm\"\n class=\"wr-schema-form__remove\"\n [id]=\"`${f.id}-remove-${$index}`\"\n [attr.aria-labelledby]=\"`${f.id}-remove-${$index} ${f.id}-title-${$index}`\"\n [disabled]=\"!canRemove(f)\"\n (click)=\"remove(f, $index, list)\"\n >\n {{ resolvedRemove() }}\n </button>\n </div>\n <wr-schema-form\n [field]=\"item\"\n [columns]=\"f.spec.columns ?? 1\"\n [addLabel]=\"addLabel()\"\n [removeLabel]=\"removeLabel()\"\n />\n </div>\n }\n @if (f.spec.item) {\n <button wr-btn type=\"button\" class=\"wr-schema-form__add\" [disabled]=\"!canAdd(f)\" (click)=\"add(f)\">\n {{ resolvedAdd() }}\n </button>\n }\n </div>\n </wr-form-field>\n </fieldset>\n } @else {\n <div class=\"wr-schema-form__field\" [style.grid-column]=\"f.column\">\n <wr-form-field [label]=\"f.labelAbove\" [hint]=\"f.spec.hint ?? ''\" [required]=\"state.required()\">\n @switch (f.spec.kind) {\n @case ('textarea') {\n <wr-textarea [formField]=\"f.field\" [placeholder]=\"f.spec.placeholder ?? ''\" [ariaLabel]=\"f.label\" />\n }\n @case ('number') {\n <wr-input-number\n [formField]=\"f.field\"\n [placeholder]=\"f.spec.placeholder ?? ''\"\n [step]=\"f.spec.step ?? 1\"\n [ariaLabel]=\"f.label\"\n />\n }\n @case ('select') {\n <wr-select [formField]=\"f.field\" [placeholder]=\"f.spec.placeholder ?? null\" [ariaLabel]=\"f.label\">\n @for (option of f.spec.options ?? []; track option.value) {\n <wr-option [value]=\"option.value\" [disabled]=\"option.disabled ?? false\">{{ option.label }}</wr-option>\n }\n </wr-select>\n }\n @case ('multiselect') {\n <wr-select\n mode=\"multi\"\n [formField]=\"f.field\"\n [placeholder]=\"f.spec.placeholder ?? null\"\n [ariaLabel]=\"f.label\"\n >\n @for (option of f.spec.options ?? []; track option.value) {\n <wr-option [value]=\"option.value\" [disabled]=\"option.disabled ?? false\">{{ option.label }}</wr-option>\n }\n </wr-select>\n }\n @case ('tags') {\n <wr-select\n mode=\"tag\"\n [formField]=\"f.field\"\n [placeholder]=\"f.spec.placeholder ?? null\"\n [ariaLabel]=\"f.label\"\n />\n }\n @case ('checkbox') {\n <wr-checkbox [formField]=\"f.field\">{{ f.label }}</wr-checkbox>\n }\n @case ('switch') {\n <wr-switch [formField]=\"f.field\">{{ f.label }}</wr-switch>\n }\n @case ('radio') {\n <!-- `wr-radio-group` has no `ariaLabel` input, and needs none: its\n host is a `role=\"radiogroup\"`, where `aria-label` is legal. -->\n <wr-radio-group [formField]=\"f.field\" [attr.aria-label]=\"f.label\">\n @for (option of f.spec.options ?? []; track option.value) {\n <wr-radio [value]=\"option.value\" [disabled]=\"option.disabled ?? false\">{{ option.label }}</wr-radio>\n }\n </wr-radio-group>\n }\n @case ('segmented') {\n <wr-segmented [formField]=\"f.field\" [options]=\"f.spec.options ?? []\" />\n }\n @case ('date') {\n <wr-date-picker [formField]=\"f.field\" [placeholder]=\"f.spec.placeholder ?? ''\" [ariaLabel]=\"f.label\" />\n }\n @case ('daterange') {\n <!-- The picker names its two inputs \"Range start\" and \"Range end\";\n the group around them is what carries the field's own label. -->\n <wr-date-range-picker [formField]=\"f.field\" role=\"group\" [attr.aria-label]=\"f.label\" />\n }\n @case ('slider') {\n <wr-slider [formField]=\"f.field\" [step]=\"f.spec.step ?? 1\" [ariaLabel]=\"f.label\" />\n }\n @case ('rating') {\n <wr-rating [formField]=\"f.field\" [ariaLabel]=\"f.label\" />\n }\n @case ('file') {\n <wr-file-upload\n [formField]=\"f.field\"\n [multiple]=\"f.spec.multiple ?? false\"\n [accept]=\"f.spec.accept ?? ''\"\n />\n }\n @default {\n <input\n wrInput\n [formField]=\"f.field\"\n [type]=\"f.spec.type ?? 'text'\"\n [placeholder]=\"f.spec.placeholder ?? ''\"\n />\n }\n }\n </wr-form-field>\n </div>\n }\n }\n</ng-template>\n\n@for (c of cells(); track c.key) {\n @if (c.section; as section) {\n @if (section.visible()) {\n <fieldset\n class=\"wr-schema-form__section\"\n [attr.aria-describedby]=\"section.description ? `${section.id}-description` : null\"\n >\n <legend class=\"wr-schema-form__legend\">{{ section.title }}</legend>\n @if (section.description) {\n <p class=\"wr-schema-form__description\" [id]=\"`${section.id}-description`\">{{ section.description }}</p>\n }\n <div class=\"wr-schema-form__grid\" [style.grid-template-columns]=\"section.template\">\n @for (f of section.fields; track f.key) {\n <ng-container [ngTemplateOutlet]=\"cell\" [ngTemplateOutletContext]=\"{ $implicit: f }\" />\n }\n </div>\n </fieldset>\n }\n } @else {\n <ng-container [ngTemplateOutlet]=\"cell\" [ngTemplateOutletContext]=\"{ $implicit: c.field }\" />\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,IAAa,yBAAb,MAAa,uBAAsB;CACjC,cAAA;EACE,IAAI,OAAO,cAAc,eAAe,WAAW,cAAc,aAAa;CAChF;CAES,yBAAyB,MAAM,SAAwB,GAAA,YAAA,CAAA,EAAA,WAAA,yBAAA,CAAA,+BAAA,CAAA,CAAA;CAGvD,UAAU;CAEnB,IAAI,UAAO;EACT,OAAO,KAAK,uBAAsB,CAAE,CAAA,CAAE,CAAC,QAAO;CAChD;CAEA,IAAI,QAAK;EACP,OAAO,KAAK,uBAAsB,CAAE,CAAA,CAAE,CAAC,MAAK;CAC9C;CAGA,IAAI,SAAM;EACR,MAAM,SAAS,KAAK,uBAAsB,CAAE,CAAA,CAAE,CAAC,OAAM;EACrD,OAAO,OAAO,SAAS,OAAO,YAAY,OAAO,KAAI,UAAS,CAAC,MAAM,MAAM,KAAK,CAAC,CAAC,IAAI;CACxF;CAtBW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAsB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAtB,OAAA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