ngwr 16.2.0 → 16.3.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 (398) hide show
  1. package/badge/styles/_tag.scss +73 -1
  2. package/calendar/styles/_index.scss +22 -0
  3. package/cascader/styles/_rules.scss +7 -0
  4. package/color-picker/styles/_index.scss +21 -0
  5. package/date-picker/styles/_index.scss +19 -0
  6. package/dropdown/styles/_index.scss +13 -19
  7. package/fesm2022/ngwr-affix.mjs +3 -3
  8. package/fesm2022/ngwr-alert-testing.mjs +70 -0
  9. package/fesm2022/ngwr-alert-testing.mjs.map +1 -0
  10. package/fesm2022/ngwr-alert.mjs +3 -3
  11. package/fesm2022/ngwr-anchor.mjs +17 -6
  12. package/fesm2022/ngwr-anchor.mjs.map +1 -1
  13. package/fesm2022/ngwr-animations-aurora.mjs +3 -3
  14. package/fesm2022/ngwr-animations-blur-reveal.mjs +3 -3
  15. package/fesm2022/ngwr-animations-click-sparks.mjs +3 -3
  16. package/fesm2022/ngwr-animations-confetti.mjs +3 -3
  17. package/fesm2022/ngwr-animations-decode.mjs +3 -3
  18. package/fesm2022/ngwr-animations-destruct.mjs +3 -3
  19. package/fesm2022/ngwr-animations-dot-grid.mjs +3 -3
  20. package/fesm2022/ngwr-animations-falling-letters.mjs +3 -3
  21. package/fesm2022/ngwr-animations-flow-lines.mjs +3 -3
  22. package/fesm2022/ngwr-animations-fluid-cursor.mjs +3 -3
  23. package/fesm2022/ngwr-animations-glitch.mjs +3 -3
  24. package/fesm2022/ngwr-animations-glow-border.mjs +3 -3
  25. package/fesm2022/ngwr-animations-gradient-flow.mjs +3 -3
  26. package/fesm2022/ngwr-animations-marquee.mjs +3 -3
  27. package/fesm2022/ngwr-animations-orbit.mjs +3 -3
  28. package/fesm2022/ngwr-animations-reveal.mjs +3 -3
  29. package/fesm2022/ngwr-animations-ripple-grid.mjs +3 -3
  30. package/fesm2022/ngwr-animations-rotate-reveal.mjs +3 -3
  31. package/fesm2022/ngwr-animations-shimmer.mjs +3 -3
  32. package/fesm2022/ngwr-animations-spotlight.mjs +3 -3
  33. package/fesm2022/ngwr-animations-thread-lines.mjs +3 -3
  34. package/fesm2022/ngwr-animations-tilt.mjs +3 -3
  35. package/fesm2022/ngwr-animations-typewriter.mjs +3 -3
  36. package/fesm2022/ngwr-avatar.mjs +3 -3
  37. package/fesm2022/ngwr-back-top.mjs +3 -3
  38. package/fesm2022/ngwr-badge.mjs +129 -11
  39. package/fesm2022/ngwr-badge.mjs.map +1 -1
  40. package/fesm2022/ngwr-breadcrumbs-testing.mjs +83 -0
  41. package/fesm2022/ngwr-breadcrumbs-testing.mjs.map +1 -0
  42. package/fesm2022/ngwr-breadcrumbs.mjs +8 -8
  43. package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
  44. package/fesm2022/ngwr-burger-testing.mjs +45 -0
  45. package/fesm2022/ngwr-burger-testing.mjs.map +1 -0
  46. package/fesm2022/ngwr-burger.mjs +3 -3
  47. package/fesm2022/ngwr-button.mjs +6 -6
  48. package/fesm2022/ngwr-calendar-testing.mjs +18 -0
  49. package/fesm2022/ngwr-calendar-testing.mjs.map +1 -1
  50. package/fesm2022/ngwr-calendar.mjs +500 -73
  51. package/fesm2022/ngwr-calendar.mjs.map +1 -1
  52. package/fesm2022/ngwr-card.mjs +9 -9
  53. package/fesm2022/ngwr-carousel.mjs +6 -6
  54. package/fesm2022/ngwr-cascader.mjs +37 -16
  55. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  56. package/fesm2022/ngwr-charts-bar-chart.mjs +5 -4
  57. package/fesm2022/ngwr-charts-bar-chart.mjs.map +1 -1
  58. package/fesm2022/ngwr-charts-boxplot-chart.mjs +3 -3
  59. package/fesm2022/ngwr-charts-bullet-chart.mjs +3 -3
  60. package/fesm2022/ngwr-charts-calendar-heatmap.mjs +3 -3
  61. package/fesm2022/ngwr-charts-candlestick-chart.mjs +3 -3
  62. package/fesm2022/ngwr-charts-chart-legend.mjs +26 -11
  63. package/fesm2022/ngwr-charts-chart-legend.mjs.map +1 -1
  64. package/fesm2022/ngwr-charts-core.mjs +3 -3
  65. package/fesm2022/ngwr-charts-donut-chart.mjs +5 -4
  66. package/fesm2022/ngwr-charts-donut-chart.mjs.map +1 -1
  67. package/fesm2022/ngwr-charts-funnel-chart.mjs +3 -3
  68. package/fesm2022/ngwr-charts-gauge.mjs +3 -3
  69. package/fesm2022/ngwr-charts-heatmap-chart.mjs +3 -3
  70. package/fesm2022/ngwr-charts-line-chart-testing.mjs +3 -2
  71. package/fesm2022/ngwr-charts-line-chart-testing.mjs.map +1 -1
  72. package/fesm2022/ngwr-charts-line-chart.mjs +17 -7
  73. package/fesm2022/ngwr-charts-line-chart.mjs.map +1 -1
  74. package/fesm2022/ngwr-charts-meter-group.mjs +5 -4
  75. package/fesm2022/ngwr-charts-meter-group.mjs.map +1 -1
  76. package/fesm2022/ngwr-charts-radar-chart.mjs +5 -4
  77. package/fesm2022/ngwr-charts-radar-chart.mjs.map +1 -1
  78. package/fesm2022/ngwr-charts-scatter-chart.mjs +5 -4
  79. package/fesm2022/ngwr-charts-scatter-chart.mjs.map +1 -1
  80. package/fesm2022/ngwr-charts-sparkline.mjs +3 -3
  81. package/fesm2022/ngwr-charts-treemap-chart.mjs +3 -3
  82. package/fesm2022/ngwr-charts-waterfall-chart.mjs +3 -3
  83. package/fesm2022/ngwr-checkbox.mjs +6 -6
  84. package/fesm2022/ngwr-clipboard.mjs +3 -3
  85. package/fesm2022/ngwr-collapse.mjs +9 -9
  86. package/fesm2022/ngwr-color-picker-testing.mjs +11 -1
  87. package/fesm2022/ngwr-color-picker-testing.mjs.map +1 -1
  88. package/fesm2022/ngwr-color-picker.mjs +153 -37
  89. package/fesm2022/ngwr-color-picker.mjs.map +1 -1
  90. package/fesm2022/ngwr-command-palette.mjs +3 -3
  91. package/fesm2022/ngwr-comment.mjs +10 -6
  92. package/fesm2022/ngwr-comment.mjs.map +1 -1
  93. package/fesm2022/ngwr-compare-testing.mjs +84 -0
  94. package/fesm2022/ngwr-compare-testing.mjs.map +1 -0
  95. package/fesm2022/ngwr-compare.mjs +3 -3
  96. package/fesm2022/ngwr-context-menu.mjs +12 -12
  97. package/fesm2022/ngwr-cookie.mjs +3 -3
  98. package/fesm2022/ngwr-copy-value.mjs +3 -3
  99. package/fesm2022/ngwr-counter.mjs +6 -6
  100. package/fesm2022/ngwr-date-picker-testing.mjs +30 -4
  101. package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
  102. package/fesm2022/ngwr-date-picker.mjs +342 -69
  103. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  104. package/fesm2022/ngwr-date-stamp.mjs +3 -3
  105. package/fesm2022/ngwr-date.mjs +59 -8
  106. package/fesm2022/ngwr-date.mjs.map +1 -1
  107. package/fesm2022/ngwr-density.mjs +6 -6
  108. package/fesm2022/ngwr-descriptions.mjs +6 -6
  109. package/fesm2022/ngwr-dialog.mjs +18 -18
  110. package/fesm2022/ngwr-directives.mjs +15 -15
  111. package/fesm2022/ngwr-divider.mjs +3 -3
  112. package/fesm2022/ngwr-drawer.mjs +51 -29
  113. package/fesm2022/ngwr-drawer.mjs.map +1 -1
  114. package/fesm2022/ngwr-dropdown-testing.mjs +11 -3
  115. package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -1
  116. package/fesm2022/ngwr-dropdown.mjs +52 -95
  117. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  118. package/fesm2022/ngwr-editor.mjs +4 -3
  119. package/fesm2022/ngwr-editor.mjs.map +1 -1
  120. package/fesm2022/ngwr-empty.mjs +3 -3
  121. package/fesm2022/ngwr-event-calendar.mjs +186 -33
  122. package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
  123. package/fesm2022/ngwr-file-upload-testing.mjs +34 -2
  124. package/fesm2022/ngwr-file-upload-testing.mjs.map +1 -1
  125. package/fesm2022/ngwr-file-upload.mjs +274 -15
  126. package/fesm2022/ngwr-file-upload.mjs.map +1 -1
  127. package/fesm2022/ngwr-form.mjs +9 -9
  128. package/fesm2022/ngwr-form.mjs.map +1 -1
  129. package/fesm2022/ngwr-graph-testing.mjs +3 -0
  130. package/fesm2022/ngwr-graph-testing.mjs.map +1 -1
  131. package/fesm2022/ngwr-graph.mjs +102 -42
  132. package/fesm2022/ngwr-graph.mjs.map +1 -1
  133. package/fesm2022/ngwr-hotkey.mjs +6 -6
  134. package/fesm2022/ngwr-i18n-ar.mjs +19 -4
  135. package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
  136. package/fesm2022/ngwr-i18n-cs.mjs +19 -4
  137. package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
  138. package/fesm2022/ngwr-i18n-de.mjs +19 -4
  139. package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
  140. package/fesm2022/ngwr-i18n-en.mjs +19 -4
  141. package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
  142. package/fesm2022/ngwr-i18n-es.mjs +19 -4
  143. package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
  144. package/fesm2022/ngwr-i18n-fr.mjs +19 -4
  145. package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
  146. package/fesm2022/ngwr-i18n-he.mjs +19 -4
  147. package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
  148. package/fesm2022/ngwr-i18n-hi.mjs +19 -4
  149. package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
  150. package/fesm2022/ngwr-i18n-id.mjs +19 -4
  151. package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
  152. package/fesm2022/ngwr-i18n-it.mjs +19 -4
  153. package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
  154. package/fesm2022/ngwr-i18n-ja.mjs +19 -4
  155. package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
  156. package/fesm2022/ngwr-i18n-ko.mjs +19 -4
  157. package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
  158. package/fesm2022/ngwr-i18n-nl.mjs +19 -4
  159. package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
  160. package/fesm2022/ngwr-i18n-pl.mjs +19 -4
  161. package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
  162. package/fesm2022/ngwr-i18n-pt.mjs +19 -4
  163. package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
  164. package/fesm2022/ngwr-i18n-ru.mjs +19 -4
  165. package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
  166. package/fesm2022/ngwr-i18n-sv.mjs +19 -4
  167. package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
  168. package/fesm2022/ngwr-i18n-tr.mjs +19 -4
  169. package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
  170. package/fesm2022/ngwr-i18n-uk.mjs +19 -4
  171. package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
  172. package/fesm2022/ngwr-i18n-vi.mjs +19 -4
  173. package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
  174. package/fesm2022/ngwr-i18n-zh-tw.mjs +19 -4
  175. package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
  176. package/fesm2022/ngwr-i18n-zh.mjs +19 -4
  177. package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
  178. package/fesm2022/ngwr-i18n.mjs +9 -9
  179. package/fesm2022/ngwr-icon.mjs +6 -6
  180. package/fesm2022/ngwr-image-cropper.mjs +3 -3
  181. package/fesm2022/ngwr-input-number-testing.mjs +11 -0
  182. package/fesm2022/ngwr-input-number-testing.mjs.map +1 -1
  183. package/fesm2022/ngwr-input-number.mjs +68 -7
  184. package/fesm2022/ngwr-input-number.mjs.map +1 -1
  185. package/fesm2022/ngwr-input-otp.mjs +23 -3
  186. package/fesm2022/ngwr-input-otp.mjs.map +1 -1
  187. package/fesm2022/ngwr-input-testing.mjs +24 -1
  188. package/fesm2022/ngwr-input-testing.mjs.map +1 -1
  189. package/fesm2022/ngwr-input.mjs +152 -36
  190. package/fesm2022/ngwr-input.mjs.map +1 -1
  191. package/fesm2022/ngwr-keyboard.mjs +3 -3
  192. package/fesm2022/ngwr-knob.mjs +3 -3
  193. package/fesm2022/ngwr-layout.mjs +15 -15
  194. package/fesm2022/ngwr-lightbox.mjs +8 -8
  195. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  196. package/fesm2022/ngwr-list.mjs +8 -8
  197. package/fesm2022/ngwr-list.mjs.map +1 -1
  198. package/fesm2022/ngwr-load-state.mjs +15 -15
  199. package/fesm2022/ngwr-loading-bar.mjs +6 -6
  200. package/fesm2022/ngwr-mention.mjs +6 -6
  201. package/fesm2022/ngwr-meta.mjs +6 -6
  202. package/fesm2022/ngwr-overlay.mjs +175 -13
  203. package/fesm2022/ngwr-overlay.mjs.map +1 -1
  204. package/fesm2022/ngwr-page-header.mjs +3 -3
  205. package/fesm2022/ngwr-pagination.mjs +5 -3
  206. package/fesm2022/ngwr-pagination.mjs.map +1 -1
  207. package/fesm2022/ngwr-pipes.mjs +31 -29
  208. package/fesm2022/ngwr-pipes.mjs.map +1 -1
  209. package/fesm2022/ngwr-platform.mjs +9 -9
  210. package/fesm2022/ngwr-popconfirm-testing.mjs +5 -2
  211. package/fesm2022/ngwr-popconfirm-testing.mjs.map +1 -1
  212. package/fesm2022/ngwr-popconfirm.mjs +44 -63
  213. package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
  214. package/fesm2022/ngwr-popover-testing.mjs +7 -1
  215. package/fesm2022/ngwr-popover-testing.mjs.map +1 -1
  216. package/fesm2022/ngwr-popover.mjs +58 -156
  217. package/fesm2022/ngwr-popover.mjs.map +1 -1
  218. package/fesm2022/ngwr-progress.mjs +50 -9
  219. package/fesm2022/ngwr-progress.mjs.map +1 -1
  220. package/fesm2022/ngwr-pull-to-refresh-testing.mjs +57 -0
  221. package/fesm2022/ngwr-pull-to-refresh-testing.mjs.map +1 -0
  222. package/fesm2022/ngwr-pull-to-refresh.mjs +3 -3
  223. package/fesm2022/ngwr-qr.mjs +3 -3
  224. package/fesm2022/ngwr-radio.mjs +6 -6
  225. package/fesm2022/ngwr-rating.mjs +3 -3
  226. package/fesm2022/ngwr-resizable-testing.mjs +113 -0
  227. package/fesm2022/ngwr-resizable-testing.mjs.map +1 -0
  228. package/fesm2022/ngwr-resizable.mjs +3 -3
  229. package/fesm2022/ngwr-result.mjs +12 -12
  230. package/fesm2022/ngwr-schema-form-testing.mjs +336 -0
  231. package/fesm2022/ngwr-schema-form-testing.mjs.map +1 -0
  232. package/fesm2022/ngwr-schema-form.mjs +415 -19
  233. package/fesm2022/ngwr-schema-form.mjs.map +1 -1
  234. package/fesm2022/ngwr-scroll.mjs +3 -3
  235. package/fesm2022/ngwr-segmented.mjs +3 -3
  236. package/fesm2022/ngwr-select-testing.mjs +19 -0
  237. package/fesm2022/ngwr-select-testing.mjs.map +1 -1
  238. package/fesm2022/ngwr-select.mjs +263 -83
  239. package/fesm2022/ngwr-select.mjs.map +1 -1
  240. package/fesm2022/ngwr-sidebar-testing.mjs +176 -0
  241. package/fesm2022/ngwr-sidebar-testing.mjs.map +1 -0
  242. package/fesm2022/ngwr-sidebar.mjs +3 -3
  243. package/fesm2022/ngwr-skeleton.mjs +3 -3
  244. package/fesm2022/ngwr-slider-testing.mjs +6 -0
  245. package/fesm2022/ngwr-slider-testing.mjs.map +1 -1
  246. package/fesm2022/ngwr-slider.mjs +21 -3
  247. package/fesm2022/ngwr-slider.mjs.map +1 -1
  248. package/fesm2022/ngwr-sortable-list.mjs +29 -12
  249. package/fesm2022/ngwr-sortable-list.mjs.map +1 -1
  250. package/fesm2022/ngwr-speed-dial.mjs +3 -3
  251. package/fesm2022/ngwr-spinner.mjs +3 -3
  252. package/fesm2022/ngwr-splitter.mjs +3 -3
  253. package/fesm2022/ngwr-statistic.mjs +9 -9
  254. package/fesm2022/ngwr-stepper.mjs +42 -11
  255. package/fesm2022/ngwr-stepper.mjs.map +1 -1
  256. package/fesm2022/ngwr-storage.mjs +3 -3
  257. package/fesm2022/ngwr-switch.mjs +3 -3
  258. package/fesm2022/ngwr-table-testing.mjs +88 -2
  259. package/fesm2022/ngwr-table-testing.mjs.map +1 -1
  260. package/fesm2022/ngwr-table.mjs +891 -74
  261. package/fesm2022/ngwr-table.mjs.map +1 -1
  262. package/fesm2022/ngwr-tabs-router.mjs +3 -3
  263. package/fesm2022/ngwr-tabs-testing.mjs +1 -1
  264. package/fesm2022/ngwr-tabs-testing.mjs.map +1 -1
  265. package/fesm2022/ngwr-tabs.mjs +15 -10
  266. package/fesm2022/ngwr-tabs.mjs.map +1 -1
  267. package/fesm2022/ngwr-textarea-testing.mjs +11 -0
  268. package/fesm2022/ngwr-textarea-testing.mjs.map +1 -1
  269. package/fesm2022/ngwr-textarea.mjs +128 -16
  270. package/fesm2022/ngwr-textarea.mjs.map +1 -1
  271. package/fesm2022/ngwr-theme.mjs +3 -3
  272. package/fesm2022/ngwr-timeline.mjs +6 -6
  273. package/fesm2022/ngwr-toast.mjs +40 -19
  274. package/fesm2022/ngwr-toast.mjs.map +1 -1
  275. package/fesm2022/ngwr-toolbar.mjs +3 -3
  276. package/fesm2022/ngwr-tour.mjs +6 -6
  277. package/fesm2022/ngwr-transfer-testing.mjs +6 -0
  278. package/fesm2022/ngwr-transfer-testing.mjs.map +1 -1
  279. package/fesm2022/ngwr-transfer.mjs +24 -5
  280. package/fesm2022/ngwr-transfer.mjs.map +1 -1
  281. package/fesm2022/ngwr-tree-testing.mjs +62 -2
  282. package/fesm2022/ngwr-tree-testing.mjs.map +1 -1
  283. package/fesm2022/ngwr-tree.mjs +966 -78
  284. package/fesm2022/ngwr-tree.mjs.map +1 -1
  285. package/fesm2022/ngwr-typography.mjs +3 -3
  286. package/fesm2022/ngwr-utils-router.mjs +3 -3
  287. package/fesm2022/ngwr-utils.mjs +34 -1
  288. package/fesm2022/ngwr-utils.mjs.map +1 -1
  289. package/fesm2022/ngwr-version.mjs +1 -1
  290. package/fesm2022/ngwr-version.mjs.map +1 -1
  291. package/fesm2022/ngwr-virtual-scroll.mjs +3 -3
  292. package/fesm2022/ngwr-window.mjs +33 -22
  293. package/fesm2022/ngwr-window.mjs.map +1 -1
  294. package/file-upload/styles/_index.scss +156 -0
  295. package/i18n/ar.json +21 -4
  296. package/i18n/cs.json +21 -4
  297. package/i18n/de.json +21 -4
  298. package/i18n/en.json +21 -4
  299. package/i18n/es.json +21 -4
  300. package/i18n/fr.json +21 -4
  301. package/i18n/he.json +21 -4
  302. package/i18n/hi.json +21 -4
  303. package/i18n/id.json +21 -4
  304. package/i18n/it.json +21 -4
  305. package/i18n/ja.json +21 -4
  306. package/i18n/ko.json +21 -4
  307. package/i18n/nl.json +21 -4
  308. package/i18n/pl.json +21 -4
  309. package/i18n/pt.json +21 -4
  310. package/i18n/ru.json +21 -4
  311. package/i18n/sv.json +21 -4
  312. package/i18n/tr.json +21 -4
  313. package/i18n/uk.json +21 -4
  314. package/i18n/vi.json +21 -4
  315. package/i18n/zh-TW.json +21 -4
  316. package/i18n/zh.json +21 -4
  317. package/input/styles/_index.scss +68 -1
  318. package/input-otp/styles/_index.scss +14 -0
  319. package/llms-full.txt +52 -20
  320. package/overlay/styles/_arrow.scss +4 -4
  321. package/package.json +33 -1
  322. package/popconfirm/styles/_index.scss +3 -11
  323. package/progress/styles/_index.scss +32 -0
  324. package/schema-form/styles/_index.scss +78 -0
  325. package/schematics/use/rule.js +2 -0
  326. package/schematics/use/symbol-map.json +4 -0
  327. package/select/styles/_index.scss +114 -22
  328. package/skills/ngwr/SKILL.md +1 -1
  329. package/skills/ngwr/references/catalog.md +9 -1
  330. package/slider/styles/_index.scss +22 -0
  331. package/table/styles/_index.scss +167 -3
  332. package/textarea/styles/_index.scss +80 -0
  333. package/theme/styles/_focus.scss +5 -0
  334. package/theme/styles/_motion.scss +5 -0
  335. package/transfer/styles/_index.scss +84 -0
  336. package/tree/styles/_index.scss +138 -5
  337. package/types/ngwr-alert-testing.d.ts +88 -0
  338. package/types/ngwr-badge.d.ts +72 -2
  339. package/types/ngwr-breadcrumbs-testing.d.ts +92 -0
  340. package/types/ngwr-burger-testing.d.ts +51 -0
  341. package/types/ngwr-calendar-testing.d.ts +18 -6
  342. package/types/ngwr-calendar.d.ts +272 -22
  343. package/types/ngwr-cascader.d.ts +10 -1
  344. package/types/ngwr-charts-chart-legend.d.ts +9 -4
  345. package/types/ngwr-charts-line-chart-testing.d.ts +4 -1
  346. package/types/ngwr-charts-line-chart.d.ts +7 -4
  347. package/types/ngwr-color-picker-testing.d.ts +15 -4
  348. package/types/ngwr-color-picker.d.ts +76 -6
  349. package/types/ngwr-compare-testing.d.ts +72 -0
  350. package/types/ngwr-date-picker-testing.d.ts +23 -8
  351. package/types/ngwr-date-picker.d.ts +100 -9
  352. package/types/ngwr-date.d.ts +71 -1
  353. package/types/ngwr-drawer.d.ts +9 -0
  354. package/types/ngwr-dropdown-testing.d.ts +20 -0
  355. package/types/ngwr-dropdown.d.ts +24 -6
  356. package/types/ngwr-event-calendar.d.ts +66 -8
  357. package/types/ngwr-file-upload-testing.d.ts +31 -2
  358. package/types/ngwr-file-upload.d.ts +148 -1
  359. package/types/ngwr-form.d.ts +47 -3
  360. package/types/ngwr-graph-testing.d.ts +8 -3
  361. package/types/ngwr-graph.d.ts +147 -7
  362. package/types/ngwr-input-number-testing.d.ts +10 -0
  363. package/types/ngwr-input-number.d.ts +30 -1
  364. package/types/ngwr-input-otp.d.ts +10 -0
  365. package/types/ngwr-input-testing.d.ts +30 -0
  366. package/types/ngwr-input.d.ts +54 -3
  367. package/types/ngwr-overlay.d.ts +84 -5
  368. package/types/ngwr-pipes.d.ts +2 -1
  369. package/types/ngwr-popconfirm-testing.d.ts +12 -3
  370. package/types/ngwr-popconfirm.d.ts +28 -3
  371. package/types/ngwr-popover-testing.d.ts +19 -2
  372. package/types/ngwr-popover.d.ts +22 -2
  373. package/types/ngwr-progress.d.ts +29 -1
  374. package/types/ngwr-pull-to-refresh-testing.d.ts +83 -0
  375. package/types/ngwr-resizable-testing.d.ts +116 -0
  376. package/types/ngwr-schema-form-testing.d.ts +260 -0
  377. package/types/ngwr-schema-form.d.ts +76 -6
  378. package/types/ngwr-select-testing.d.ts +20 -0
  379. package/types/ngwr-select.d.ts +112 -11
  380. package/types/ngwr-sidebar-testing.d.ts +176 -0
  381. package/types/ngwr-slider-testing.d.ts +3 -1
  382. package/types/ngwr-slider.d.ts +21 -1
  383. package/types/ngwr-sortable-list.d.ts +6 -0
  384. package/types/ngwr-stepper.d.ts +20 -11
  385. package/types/ngwr-table-testing.d.ts +70 -6
  386. package/types/ngwr-table.d.ts +480 -50
  387. package/types/ngwr-tabs-testing.d.ts +14 -17
  388. package/types/ngwr-tabs.d.ts +6 -0
  389. package/types/ngwr-textarea-testing.d.ts +10 -0
  390. package/types/ngwr-textarea.d.ts +48 -2
  391. package/types/ngwr-toast.d.ts +8 -1
  392. package/types/ngwr-transfer-testing.d.ts +3 -0
  393. package/types/ngwr-transfer.d.ts +24 -1
  394. package/types/ngwr-tree-testing.d.ts +65 -1
  395. package/types/ngwr-tree.d.ts +333 -12
  396. package/types/ngwr-utils.d.ts +28 -0
  397. package/types/ngwr-version.d.ts +1 -1
  398. package/types/ngwr-window.d.ts +7 -4
@@ -1,5 +1,5 @@
1
1
  import * as i0 from "@angular/core";
2
- import { Component, Directive, InjectionToken, ViewEncapsulation, computed, inject, input, model, output, signal } from "@angular/core";
2
+ import { Component, Directive, InjectionToken, ViewEncapsulation, computed, inject, input, model, output } from "@angular/core";
3
3
  import { coerceBooleanProperty } from "@angular/cdk/coercion";
4
4
  import { NgTemplateOutlet } from "@angular/common";
5
5
  import { wrCheckStyles } from "ngwr/utils";
@@ -18,7 +18,7 @@ var WrChartLegendPart = class WrChartLegendPart {
18
18
  wrChartLegendPart = input("", ...ngDevMode ? [{ debugName: "wrChartLegendPart" }] : /* istanbul ignore next */ []);
19
19
  static ɵfac = i0.ɵɵngDeclareFactory({
20
20
  minVersion: "12.0.0",
21
- version: "22.2.5",
21
+ version: "22.2.6",
22
22
  ngImport: i0,
23
23
  type: WrChartLegendPart,
24
24
  deps: [],
@@ -26,7 +26,7 @@ var WrChartLegendPart = class WrChartLegendPart {
26
26
  });
27
27
  static ɵdir = i0.ɵɵngDeclareDirective({
28
28
  minVersion: "17.1.0",
29
- version: "22.2.5",
29
+ version: "22.2.6",
30
30
  type: WrChartLegendPart,
31
31
  isStandalone: true,
32
32
  selector: "[wrChartLegendPart]",
@@ -43,7 +43,7 @@ var WrChartLegendPart = class WrChartLegendPart {
43
43
  };
44
44
  i0.ɵɵngDeclareClassMetadata({
45
45
  minVersion: "12.0.0",
46
- version: "22.2.5",
46
+ version: "22.2.6",
47
47
  ngImport: i0,
48
48
  type: WrChartLegendPart,
49
49
  decorators: [{
@@ -76,7 +76,6 @@ const WR_CHART_LEGEND_BLOCK = new InjectionToken("WR_CHART_LEGEND_BLOCK");
76
76
  * Use of this source code is governed by an MIT-style license that can be
77
77
  * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
78
78
  */
79
- const NO_OVERRIDE = signal(null).asReadonly();
80
79
  var WrChartLegend = class WrChartLegend {
81
80
  constructor() {
82
81
  if (typeof ngDevMode === "undefined" || ngDevMode) wrCheckStyles("charts/chart-legend");
@@ -90,7 +89,8 @@ var WrChartLegend = class WrChartLegend {
90
89
  ariaLabel = input(null, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
91
90
  toggled = output();
92
91
  toggleLabel = useI18nText(this.ariaLabel, "chartLegend.toggleLabel", "Toggle series visibility");
93
- hiddenText = useI18nText(NO_OVERRIDE, "chartLegend.hidden", "hidden");
92
+ hiddenLabel = input(null, ...ngDevMode ? [{ debugName: "hiddenLabel" }] : /* istanbul ignore next */ []);
93
+ resolvedHiddenLabel = useI18nText(this.hiddenLabel, "chartLegend.hidden", "hidden");
94
94
  label = computed(() => this.ariaLabel() || this.toggleable() ? this.toggleLabel() : null, ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
95
95
  block = inject(WR_CHART_LEGEND_BLOCK, {
96
96
  optional: true,
@@ -118,7 +118,7 @@ var WrChartLegend = class WrChartLegend {
118
118
  }
119
119
  static ɵfac = i0.ɵɵngDeclareFactory({
120
120
  minVersion: "12.0.0",
121
- version: "22.2.5",
121
+ version: "22.2.6",
122
122
  ngImport: i0,
123
123
  type: WrChartLegend,
124
124
  deps: [],
@@ -126,7 +126,7 @@ var WrChartLegend = class WrChartLegend {
126
126
  });
127
127
  static ɵcmp = i0.ɵɵngDeclareComponent({
128
128
  minVersion: "17.0.0",
129
- version: "22.2.5",
129
+ version: "22.2.6",
130
130
  type: WrChartLegend,
131
131
  isStandalone: true,
132
132
  selector: "ul[wr-chart-legend]",
@@ -158,6 +158,13 @@ var WrChartLegend = class WrChartLegend {
158
158
  isSignal: true,
159
159
  isRequired: false,
160
160
  transformFunction: null
161
+ },
162
+ hiddenLabel: {
163
+ classPropertyName: "hiddenLabel",
164
+ publicName: "hiddenLabel",
165
+ isSignal: true,
166
+ isRequired: false,
167
+ transformFunction: null
161
168
  }
162
169
  },
163
170
  outputs: {
@@ -173,7 +180,7 @@ var WrChartLegend = class WrChartLegend {
173
180
  classAttribute: "wr-chart-legend"
174
181
  },
175
182
  ngImport: i0,
176
- template: "@for (item of items(); track $index) {\n <li\n class=\"wr-chart-legend__item\"\n [class.wr-chart-legend__item--hidden]=\"isHidden($index)\"\n [wrChartLegendPart]=\"part('legend-item')\"\n >\n @if (toggleable()) {\n <!-- Pressed means SHOWN: the button's name is the series, and pressing it turns\n that series on. The name never changes with the state, as the toggle-button\n pattern requires; the state is `aria-pressed` and the struck-through label. -->\n <button\n type=\"button\"\n class=\"wr-chart-legend__toggle\"\n [attr.aria-pressed]=\"!isHidden($index)\"\n (click)=\"toggle($index)\"\n >\n <ng-container [ngTemplateOutlet]=\"row\" [ngTemplateOutletContext]=\"{ $implicit: $index }\" />\n </button>\n } @else {\n <ng-container [ngTemplateOutlet]=\"row\" [ngTemplateOutletContext]=\"{ $implicit: $index }\" />\n }\n </li>\n}\n\n<ng-template #row let-index>\n @let item = items()[index];\n @if (item.dash !== undefined) {\n <!-- The key draws the series' own dash, not a solid block. A legend that pairs a\n coloured square with a name leaves the reader to match the square to the LINE,\n and matching by colour is the step the patterns exist to remove. -->\n <svg\n class=\"wr-chart-legend__swatch wr-chart-legend__swatch--line\"\n [wrChartLegendPart]=\"part('swatch')\"\n viewBox=\"0 0 16 2\"\n aria-hidden=\"true\"\n [attr.data-marker]=\"item.marker ?? null\"\n >\n <line\n x1=\"0\"\n y1=\"1\"\n x2=\"16\"\n y2=\"1\"\n [attr.stroke]=\"item.color\"\n [attr.stroke-dasharray]=\"item.dash || null\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n @if (item.marker) {\n <path [attr.d]=\"markerPath(item.marker, 3.5)\" transform=\"translate(8 1)\" [attr.fill]=\"item.color\" />\n }\n </svg>\n } @else if (item.marker) {\n <svg\n class=\"wr-chart-legend__swatch wr-chart-legend__swatch--marker\"\n [wrChartLegendPart]=\"part('swatch')\"\n viewBox=\"-6 -6 12 12\"\n aria-hidden=\"true\"\n [attr.data-marker]=\"item.marker\"\n >\n <path [attr.d]=\"markerPath(item.marker, 5)\" [attr.fill]=\"item.color\" />\n </svg>\n } @else {\n <span\n class=\"wr-chart-legend__swatch wr-chart-legend__swatch--dot\"\n [wrChartLegendPart]=\"part('swatch')\"\n aria-hidden=\"true\"\n [style.background]=\"item.color\"\n ></span>\n }\n <span class=\"wr-chart-legend__label\" [wrChartLegendPart]=\"part('legend-label')\">{{ item.label }}</span>\n @if (!toggleable() && isHidden(index)) {\n <!-- A toggle says hidden through aria-pressed. A row that is not one has nothing but\n the strike-through and the faded key, which reach no one who cannot see them. -->\n <span class=\"wr-chart-legend__sr-only\"> {{ hiddenText() }} </span>\n }\n @if (item.value !== undefined && item.value !== null) {\n <span class=\"wr-chart-legend__value\" [wrChartLegendPart]=\"part('legend-value')\">{{ item.value }}</span>\n }\n</ng-template>\n",
183
+ template: "@for (item of items(); track $index) {\n <li\n class=\"wr-chart-legend__item\"\n [class.wr-chart-legend__item--hidden]=\"isHidden($index)\"\n [wrChartLegendPart]=\"part('legend-item')\"\n >\n @if (toggleable()) {\n <!-- Pressed means SHOWN: the button's name is the series, and pressing it turns\n that series on. The name never changes with the state, as the toggle-button\n pattern requires; the state is `aria-pressed` and the struck-through label. -->\n <button\n type=\"button\"\n class=\"wr-chart-legend__toggle\"\n [attr.aria-pressed]=\"!isHidden($index)\"\n (click)=\"toggle($index)\"\n >\n <ng-container [ngTemplateOutlet]=\"row\" [ngTemplateOutletContext]=\"{ $implicit: $index }\" />\n </button>\n } @else {\n <ng-container [ngTemplateOutlet]=\"row\" [ngTemplateOutletContext]=\"{ $implicit: $index }\" />\n }\n </li>\n}\n\n<ng-template #row let-index>\n @let item = items()[index];\n @if (item.dash !== undefined) {\n <!-- The key draws the series' own dash, not a solid block. A legend that pairs a\n coloured square with a name leaves the reader to match the square to the LINE,\n and matching by colour is the step the patterns exist to remove. -->\n <svg\n class=\"wr-chart-legend__swatch wr-chart-legend__swatch--line\"\n [wrChartLegendPart]=\"part('swatch')\"\n viewBox=\"0 0 16 2\"\n aria-hidden=\"true\"\n [attr.data-marker]=\"item.marker ?? null\"\n >\n <line\n x1=\"0\"\n y1=\"1\"\n x2=\"16\"\n y2=\"1\"\n [attr.stroke]=\"item.color\"\n [attr.stroke-dasharray]=\"item.dash || null\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n @if (item.marker) {\n <path [attr.d]=\"markerPath(item.marker, 3.5)\" transform=\"translate(8 1)\" [attr.fill]=\"item.color\" />\n }\n </svg>\n } @else if (item.marker) {\n <svg\n class=\"wr-chart-legend__swatch wr-chart-legend__swatch--marker\"\n [wrChartLegendPart]=\"part('swatch')\"\n viewBox=\"-6 -6 12 12\"\n aria-hidden=\"true\"\n [attr.data-marker]=\"item.marker\"\n >\n <path [attr.d]=\"markerPath(item.marker, 5)\" [attr.fill]=\"item.color\" />\n </svg>\n } @else {\n <span\n class=\"wr-chart-legend__swatch wr-chart-legend__swatch--dot\"\n [wrChartLegendPart]=\"part('swatch')\"\n aria-hidden=\"true\"\n [style.background]=\"item.color\"\n ></span>\n }\n <span class=\"wr-chart-legend__label\" [wrChartLegendPart]=\"part('legend-label')\">{{ item.label }}</span>\n @if (!toggleable() && isHidden(index)) {\n <!-- A toggle says hidden through aria-pressed. A row that is not one has nothing but\n the strike-through and the faded key, which reach no one who cannot see them. -->\n <span class=\"wr-chart-legend__sr-only\"> {{ resolvedHiddenLabel() }} </span>\n }\n @if (item.value !== undefined && item.value !== null) {\n <span class=\"wr-chart-legend__value\" [wrChartLegendPart]=\"part('legend-value')\">{{ item.value }}</span>\n }\n</ng-template>\n",
177
184
  dependencies: [{
178
185
  kind: "directive",
179
186
  type: NgTemplateOutlet,
@@ -194,7 +201,7 @@ var WrChartLegend = class WrChartLegend {
194
201
  };
195
202
  i0.ɵɵngDeclareClassMetadata({
196
203
  minVersion: "12.0.0",
197
- version: "22.2.5",
204
+ version: "22.2.6",
198
205
  ngImport: i0,
199
206
  type: WrChartLegend,
200
207
  decorators: [{
@@ -209,7 +216,7 @@ i0.ɵɵngDeclareClassMetadata({
209
216
  "[attr.aria-label]": "label()"
210
217
  },
211
218
  imports: [NgTemplateOutlet, WrChartLegendPart],
212
- template: "@for (item of items(); track $index) {\n <li\n class=\"wr-chart-legend__item\"\n [class.wr-chart-legend__item--hidden]=\"isHidden($index)\"\n [wrChartLegendPart]=\"part('legend-item')\"\n >\n @if (toggleable()) {\n <!-- Pressed means SHOWN: the button's name is the series, and pressing it turns\n that series on. The name never changes with the state, as the toggle-button\n pattern requires; the state is `aria-pressed` and the struck-through label. -->\n <button\n type=\"button\"\n class=\"wr-chart-legend__toggle\"\n [attr.aria-pressed]=\"!isHidden($index)\"\n (click)=\"toggle($index)\"\n >\n <ng-container [ngTemplateOutlet]=\"row\" [ngTemplateOutletContext]=\"{ $implicit: $index }\" />\n </button>\n } @else {\n <ng-container [ngTemplateOutlet]=\"row\" [ngTemplateOutletContext]=\"{ $implicit: $index }\" />\n }\n </li>\n}\n\n<ng-template #row let-index>\n @let item = items()[index];\n @if (item.dash !== undefined) {\n <!-- The key draws the series' own dash, not a solid block. A legend that pairs a\n coloured square with a name leaves the reader to match the square to the LINE,\n and matching by colour is the step the patterns exist to remove. -->\n <svg\n class=\"wr-chart-legend__swatch wr-chart-legend__swatch--line\"\n [wrChartLegendPart]=\"part('swatch')\"\n viewBox=\"0 0 16 2\"\n aria-hidden=\"true\"\n [attr.data-marker]=\"item.marker ?? null\"\n >\n <line\n x1=\"0\"\n y1=\"1\"\n x2=\"16\"\n y2=\"1\"\n [attr.stroke]=\"item.color\"\n [attr.stroke-dasharray]=\"item.dash || null\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n @if (item.marker) {\n <path [attr.d]=\"markerPath(item.marker, 3.5)\" transform=\"translate(8 1)\" [attr.fill]=\"item.color\" />\n }\n </svg>\n } @else if (item.marker) {\n <svg\n class=\"wr-chart-legend__swatch wr-chart-legend__swatch--marker\"\n [wrChartLegendPart]=\"part('swatch')\"\n viewBox=\"-6 -6 12 12\"\n aria-hidden=\"true\"\n [attr.data-marker]=\"item.marker\"\n >\n <path [attr.d]=\"markerPath(item.marker, 5)\" [attr.fill]=\"item.color\" />\n </svg>\n } @else {\n <span\n class=\"wr-chart-legend__swatch wr-chart-legend__swatch--dot\"\n [wrChartLegendPart]=\"part('swatch')\"\n aria-hidden=\"true\"\n [style.background]=\"item.color\"\n ></span>\n }\n <span class=\"wr-chart-legend__label\" [wrChartLegendPart]=\"part('legend-label')\">{{ item.label }}</span>\n @if (!toggleable() && isHidden(index)) {\n <!-- A toggle says hidden through aria-pressed. A row that is not one has nothing but\n the strike-through and the faded key, which reach no one who cannot see them. -->\n <span class=\"wr-chart-legend__sr-only\"> {{ hiddenText() }} </span>\n }\n @if (item.value !== undefined && item.value !== null) {\n <span class=\"wr-chart-legend__value\" [wrChartLegendPart]=\"part('legend-value')\">{{ item.value }}</span>\n }\n</ng-template>\n"
219
+ template: "@for (item of items(); track $index) {\n <li\n class=\"wr-chart-legend__item\"\n [class.wr-chart-legend__item--hidden]=\"isHidden($index)\"\n [wrChartLegendPart]=\"part('legend-item')\"\n >\n @if (toggleable()) {\n <!-- Pressed means SHOWN: the button's name is the series, and pressing it turns\n that series on. The name never changes with the state, as the toggle-button\n pattern requires; the state is `aria-pressed` and the struck-through label. -->\n <button\n type=\"button\"\n class=\"wr-chart-legend__toggle\"\n [attr.aria-pressed]=\"!isHidden($index)\"\n (click)=\"toggle($index)\"\n >\n <ng-container [ngTemplateOutlet]=\"row\" [ngTemplateOutletContext]=\"{ $implicit: $index }\" />\n </button>\n } @else {\n <ng-container [ngTemplateOutlet]=\"row\" [ngTemplateOutletContext]=\"{ $implicit: $index }\" />\n }\n </li>\n}\n\n<ng-template #row let-index>\n @let item = items()[index];\n @if (item.dash !== undefined) {\n <!-- The key draws the series' own dash, not a solid block. A legend that pairs a\n coloured square with a name leaves the reader to match the square to the LINE,\n and matching by colour is the step the patterns exist to remove. -->\n <svg\n class=\"wr-chart-legend__swatch wr-chart-legend__swatch--line\"\n [wrChartLegendPart]=\"part('swatch')\"\n viewBox=\"0 0 16 2\"\n aria-hidden=\"true\"\n [attr.data-marker]=\"item.marker ?? null\"\n >\n <line\n x1=\"0\"\n y1=\"1\"\n x2=\"16\"\n y2=\"1\"\n [attr.stroke]=\"item.color\"\n [attr.stroke-dasharray]=\"item.dash || null\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n @if (item.marker) {\n <path [attr.d]=\"markerPath(item.marker, 3.5)\" transform=\"translate(8 1)\" [attr.fill]=\"item.color\" />\n }\n </svg>\n } @else if (item.marker) {\n <svg\n class=\"wr-chart-legend__swatch wr-chart-legend__swatch--marker\"\n [wrChartLegendPart]=\"part('swatch')\"\n viewBox=\"-6 -6 12 12\"\n aria-hidden=\"true\"\n [attr.data-marker]=\"item.marker\"\n >\n <path [attr.d]=\"markerPath(item.marker, 5)\" [attr.fill]=\"item.color\" />\n </svg>\n } @else {\n <span\n class=\"wr-chart-legend__swatch wr-chart-legend__swatch--dot\"\n [wrChartLegendPart]=\"part('swatch')\"\n aria-hidden=\"true\"\n [style.background]=\"item.color\"\n ></span>\n }\n <span class=\"wr-chart-legend__label\" [wrChartLegendPart]=\"part('legend-label')\">{{ item.label }}</span>\n @if (!toggleable() && isHidden(index)) {\n <!-- A toggle says hidden through aria-pressed. A row that is not one has nothing but\n the strike-through and the faded key, which reach no one who cannot see them. -->\n <span class=\"wr-chart-legend__sr-only\"> {{ resolvedHiddenLabel() }} </span>\n }\n @if (item.value !== undefined && item.value !== null) {\n <span class=\"wr-chart-legend__value\" [wrChartLegendPart]=\"part('legend-value')\">{{ item.value }}</span>\n }\n</ng-template>\n"
213
220
  }]
214
221
  }],
215
222
  ctorParameters: () => [],
@@ -252,6 +259,14 @@ i0.ɵɵngDeclareClassMetadata({
252
259
  toggled: [{
253
260
  type: i0.Output,
254
261
  args: ["toggled"]
262
+ }],
263
+ hiddenLabel: [{
264
+ type: i0.Input,
265
+ args: [{
266
+ isSignal: true,
267
+ alias: "hiddenLabel",
268
+ required: false
269
+ }]
255
270
  }]
256
271
  }
257
272
  });
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-charts-chart-legend.mjs","names":[],"sources":["../../../projects/lib/charts/chart-legend/internal/chart-legend-part.ts","../../../projects/lib/charts/chart-legend/tokens/chart-legend-block.token.ts","../../../projects/lib/charts/chart-legend/chart-legend.ts","../../../projects/lib/charts/chart-legend/chart-legend.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';\n\nimport { wrCheckStyles } from 'ngwr/utils';\n\n/**\n * Adds the host chart's own class to one part of a legend row, beside the part's\n * static `wr-chart-legend__*` classes.\n *\n * A host `[class]` binding merges with the element's static `class`, where a\n * template's `class` plus `[class]` pair is one the template lint refuses — and the\n * static half has to stay static: `charts/stylesheets.spec.ts` reads the first class\n * of every inline-painted mark off the template to hold it to `forced-color-adjust`.\n *\n * @internal\n */\n@Directive({\n selector: '[wrChartLegendPart]',\n host: { '[class]': 'wrChartLegendPart()' },\n})\nexport class WrChartLegendPart {\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('charts/chart-legend');\n }\n\n /** The class to add; `''` adds none. */\n readonly wrChartLegendPart = input('');\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 { InjectionToken } from '@angular/core';\n\n/**\n * The BEM block of the chart a legend is drawn inside, provided by that chart:\n * `'wr-donut-chart'` makes every row also carry `.wr-donut-chart__legend-item`,\n * its key `.wr-donut-chart__swatch`, its name `.wr-donut-chart__legend-label` and\n * its value `.wr-donut-chart__legend-value` — the classes the chart drew before it\n * drew its legend through `WrChartLegend`, which are public API and stay on the\n * same elements.\n *\n * A chart provides it in `viewProviders`, and the legend reads it with `host: true`:\n * that lookup stops at the host element of the view the legend is declared in, where\n * it sees that component's `viewProviders` and not its `providers`. So only a legend\n * in the chart's OWN template takes the block, never one further down the tree.\n *\n * @internal\n */\nexport const WR_CHART_LEGEND_BLOCK = new InjectionToken<string>('WR_CHART_LEGEND_BLOCK');\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 { NgTemplateOutlet } from '@angular/common';\nimport { Component, ViewEncapsulation, computed, inject, input, model, output, signal } from '@angular/core';\n\nimport { wrChartMarkerPath } from 'ngwr/charts/core';\nimport { useI18nText } from 'ngwr/i18n';\nimport { wrCheckStyles } from 'ngwr/utils';\n\nimport { WrChartLegendPart } from './internal/chart-legend-part';\nimport { WR_CHART_LEGEND_BLOCK } from './tokens';\nimport type { WrChartLegendItem, WrChartLegendToggle, WrChartMarker } from './types';\n\nconst NO_OVERRIDE = signal<string | null>(null).asReadonly();\n\n/**\n * A chart's key: one row per series, each a swatch, a name and an optional value.\n * It stands on its own for a key that several charts share — one legend above a row\n * of sparklines — and the bar, line, donut, meter group, scatter and radar charts\n * draw their own legends with it.\n *\n * It sits on a `<ul>` the way `button[wr-btn]` sits on a `<button>`, and renders the\n * `<li>`s, so the list is the consumer's element: its class, its placement, its\n * name. The swatch follows what tells the series apart in the chart: a dot, a line\n * in the series' `dash`, or the series' `marker`. A dot is a span painted with an\n * inline background, a line or a marker is an SVG, and every key is `aria-hidden`:\n * the row's text is its name.\n *\n * **Toggling is opt-in.** With `toggleable`, every row is a\n * `<button type=\"button\" aria-pressed>` that shows and hides its series: pressed\n * means shown, and `hiddenSeries` holds the positions of the hidden ones. The rows\n * stay in the tab order, one stop each, rather than becoming one toolbar stop with\n * arrow keys: the toolbar pattern needs `role=\"toolbar\"`, which would take the\n * `<ul>`'s list role and with it the \"list, 5 items\" a reader hears, while each row\n * is an independent toggle — the Button pattern, Tab plus Space or Enter — and a\n * chart's series rarely outnumber the five colours it cycles through. A legend\n * draws nothing hidden by itself: the chart reads `hiddenSeries`.\n *\n * **A hidden row says so in both modes.** On a toggle it is `aria-pressed=\"false\"`;\n * on a legend that does not toggle, where a host has hidden the series from\n * elsewhere, the row carries a visually hidden word after its name\n * (`chartLegend.hidden`, \"hidden\"), since the strike-through and the faded key reach\n * no one who cannot see them.\n *\n * @example\n * ```html\n * <ul\n * wr-chart-legend\n * [items]=\"[\n * { label: 'Visits', color: 'var(--wr-color-primary)', value: '1,204' },\n * { label: 'Signups', color: 'var(--wr-color-success)', value: '86' }\n * ]\"\n * ></ul>\n *\n * <ul wr-chart-legend toggleable [items]=\"series\" [(hiddenSeries)]=\"hidden\"></ul>\n * ```\n *\n * @see https://ngwr.dev/charts/chart-legend\n */\n@Component({\n selector: 'ul[wr-chart-legend]',\n templateUrl: './chart-legend.html',\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-chart-legend',\n // Written out because `list-style: none` (styles/_index.scss) drops the implicit\n // list semantics in Safari, and with them the list's `aria-label`.\n role: 'list',\n '[class.wr-chart-legend--toggleable]': 'toggleable()',\n '[attr.aria-label]': 'label()',\n },\n imports: [NgTemplateOutlet, WrChartLegendPart],\n})\nexport class WrChartLegend {\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('charts/chart-legend');\n }\n\n /** One row per series, in the chart's order. */\n readonly items = input<readonly WrChartLegendItem[]>([]);\n\n /**\n * Make each row a toggle button that shows and hides its series, through\n * `hiddenSeries` and `toggled`. @default false\n */\n readonly toggleable = input(false, { transform: coerceBooleanProperty });\n\n /**\n * The positions in `items` of the series that are hidden, ascending. Positions\n * rather than labels: two series may share a label, and a label translated into\n * another language would no longer match the one it hid. A position past the end\n * of `items` is kept and ignored, so a series coming back finds its state.\n *\n * Written by a click on a `toggleable` row; read in either mode, so a legend that\n * does not toggle still shows a series hidden from elsewhere as hidden.\n */\n readonly hiddenSeries = model<readonly number[]>([]);\n\n /**\n * Accessible name of the list. A `toggleable` legend falls back to\n * `chartLegend.toggleLabel` (\"Toggle series visibility\"), which tells a reader\n * what its buttons do; one that does not toggle has no name unless given one.\n */\n readonly ariaLabel = input<string | null>(null);\n\n /** Emits when a reader shows or hides a series from a `toggleable` legend, after `hiddenSeries` moves. */\n readonly toggled = output<WrChartLegendToggle>();\n\n private readonly toggleLabel = useI18nText(this.ariaLabel, 'chartLegend.toggleLabel', 'Toggle series visibility');\n\n /**\n * The word a hidden row of a legend that does not toggle carries after its name,\n * visually hidden: the strike-through and the faded key are the eye's half of the\n * state, and a toggle row's `aria-pressed` is the other half there. Catalog-only\n * rather than an input, as `stepper.completed` is: one word shared by every row,\n * which an app rewords once in its catalog.\n */\n protected readonly hiddenText = useI18nText(NO_OVERRIDE, 'chartLegend.hidden', 'hidden');\n\n protected readonly label = computed(() => (this.ariaLabel() || this.toggleable() ? this.toggleLabel() : null));\n\n private readonly block = inject(WR_CHART_LEGEND_BLOCK, { optional: true, host: true });\n\n private readonly hidden = computed(() => new Set(this.hiddenSeries()));\n\n /** Whether the series at `index` is hidden. */\n protected isHidden(index: number): boolean {\n return this.hidden().has(index);\n }\n\n /** The host chart's own class for one part of a row, or nothing outside a chart. */\n protected part(name: 'legend-item' | 'swatch' | 'legend-label' | 'legend-value'): string {\n return this.block ? `${this.block}__${name}` : '';\n }\n\n /** A marker's path, as large as a circle of radius `r` in the swatch's own units. */\n protected markerPath(shape: WrChartMarker, r: number): string {\n return wrChartMarkerPath(shape, r);\n }\n\n /** Shows or hides the series at `index`, then says so. */\n protected toggle(index: number): void {\n const current = this.hiddenSeries();\n const hide = !current.includes(index);\n this.hiddenSeries.set(hide ? [...current, index].sort((a, b) => a - b) : current.filter(i => i !== index));\n this.toggled.emit({ index, label: this.items()[index]?.label ?? '', hidden: hide });\n }\n}\n\nexport type { WrChartLegendItem, WrChartLegendToggle, WrChartMarker } from './types';\n","@for (item of items(); track $index) {\n <li\n class=\"wr-chart-legend__item\"\n [class.wr-chart-legend__item--hidden]=\"isHidden($index)\"\n [wrChartLegendPart]=\"part('legend-item')\"\n >\n @if (toggleable()) {\n <!-- Pressed means SHOWN: the button's name is the series, and pressing it turns\n that series on. The name never changes with the state, as the toggle-button\n pattern requires; the state is `aria-pressed` and the struck-through label. -->\n <button\n type=\"button\"\n class=\"wr-chart-legend__toggle\"\n [attr.aria-pressed]=\"!isHidden($index)\"\n (click)=\"toggle($index)\"\n >\n <ng-container [ngTemplateOutlet]=\"row\" [ngTemplateOutletContext]=\"{ $implicit: $index }\" />\n </button>\n } @else {\n <ng-container [ngTemplateOutlet]=\"row\" [ngTemplateOutletContext]=\"{ $implicit: $index }\" />\n }\n </li>\n}\n\n<ng-template #row let-index>\n @let item = items()[index];\n @if (item.dash !== undefined) {\n <!-- The key draws the series' own dash, not a solid block. A legend that pairs a\n coloured square with a name leaves the reader to match the square to the LINE,\n and matching by colour is the step the patterns exist to remove. -->\n <svg\n class=\"wr-chart-legend__swatch wr-chart-legend__swatch--line\"\n [wrChartLegendPart]=\"part('swatch')\"\n viewBox=\"0 0 16 2\"\n aria-hidden=\"true\"\n [attr.data-marker]=\"item.marker ?? null\"\n >\n <line\n x1=\"0\"\n y1=\"1\"\n x2=\"16\"\n y2=\"1\"\n [attr.stroke]=\"item.color\"\n [attr.stroke-dasharray]=\"item.dash || null\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n @if (item.marker) {\n <path [attr.d]=\"markerPath(item.marker, 3.5)\" transform=\"translate(8 1)\" [attr.fill]=\"item.color\" />\n }\n </svg>\n } @else if (item.marker) {\n <svg\n class=\"wr-chart-legend__swatch wr-chart-legend__swatch--marker\"\n [wrChartLegendPart]=\"part('swatch')\"\n viewBox=\"-6 -6 12 12\"\n aria-hidden=\"true\"\n [attr.data-marker]=\"item.marker\"\n >\n <path [attr.d]=\"markerPath(item.marker, 5)\" [attr.fill]=\"item.color\" />\n </svg>\n } @else {\n <span\n class=\"wr-chart-legend__swatch wr-chart-legend__swatch--dot\"\n [wrChartLegendPart]=\"part('swatch')\"\n aria-hidden=\"true\"\n [style.background]=\"item.color\"\n ></span>\n }\n <span class=\"wr-chart-legend__label\" [wrChartLegendPart]=\"part('legend-label')\">{{ item.label }}</span>\n @if (!toggleable() && isHidden(index)) {\n <!-- A toggle says hidden through aria-pressed. A row that is not one has nothing but\n the strike-through and the faded key, which reach no one who cannot see them. -->\n <span class=\"wr-chart-legend__sr-only\"> {{ hiddenText() }} </span>\n }\n @if (item.value !== undefined && item.value !== null) {\n <span class=\"wr-chart-legend__value\" [wrChartLegendPart]=\"part('legend-value')\">{{ item.value }}</span>\n }\n</ng-template>\n"],"mappings":";;;;;;;;;;;;;AA0BA,IAAa,oBAAb,MAAa,kBAAiB;CAC5B,cAAA;EACE,IAAI,OAAO,cAAc,eAAe,WAAW,cAAc,qBAAqB;CACxF;CAGS,oBAAoB,MAAM,IA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UAAA;EAAA,QAAA;GAAA,OAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,YAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,cAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,WAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;EAAA;EAAA,SAAA;GAAA,cAAA;GAAA,SAAA;EAAA;EAAA,MAAA;GAAA,YAAA,EAAA,QAAA,OAAA;GAAA,YAAA;IAAA,qCAAA;IAAA,mBAAA;GAAA;GAAA,gBAAA;EAAA;EAAA,UAAA;EAAA,UC/E1B;EA+EA,cAAA,CAAA;GAAA,MAAA;GAAA,MDFY;GAAgB,UAAA;GAAA,QAAA;IAAA;IAAA;IAAA;GAAA;EAAA,GAAA;GAAA,MAAA;GAAA,MAAE;GAAiB,UAAA;GAAA,QAAA,CAAA,mBAAA;EAAA,CAAA;EAAA,eAAA,GAAA,kBAAA;CAAA,CAAA;;AAElC,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAa,YAAA,CAAA;EAdzB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAqB,eAEhB,kBAAkB;GAAI,MAC/B;IACJ,OAAO;IAGP,MAAM;IACN,uCAAuC;IACvC,qBAAqB;GACtB;GAAA,SACQ,CAAC,kBAAkB,iBAAiB;GAAC,UAAA;EAAA,CAAA"}
1
+ {"version":3,"file":"ngwr-charts-chart-legend.mjs","names":[],"sources":["../../../projects/lib/charts/chart-legend/internal/chart-legend-part.ts","../../../projects/lib/charts/chart-legend/tokens/chart-legend-block.token.ts","../../../projects/lib/charts/chart-legend/chart-legend.ts","../../../projects/lib/charts/chart-legend/chart-legend.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';\n\nimport { wrCheckStyles } from 'ngwr/utils';\n\n/**\n * Adds the host chart's own class to one part of a legend row, beside the part's\n * static `wr-chart-legend__*` classes.\n *\n * A host `[class]` binding merges with the element's static `class`, where a\n * template's `class` plus `[class]` pair is one the template lint refuses — and the\n * static half has to stay static: `charts/stylesheets.spec.ts` reads the first class\n * of every inline-painted mark off the template to hold it to `forced-color-adjust`.\n *\n * @internal\n */\n@Directive({\n selector: '[wrChartLegendPart]',\n host: { '[class]': 'wrChartLegendPart()' },\n})\nexport class WrChartLegendPart {\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('charts/chart-legend');\n }\n\n /** The class to add; `''` adds none. */\n readonly wrChartLegendPart = input('');\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 { InjectionToken } from '@angular/core';\n\n/**\n * The BEM block of the chart a legend is drawn inside, provided by that chart:\n * `'wr-donut-chart'` makes every row also carry `.wr-donut-chart__legend-item`,\n * its key `.wr-donut-chart__swatch`, its name `.wr-donut-chart__legend-label` and\n * its value `.wr-donut-chart__legend-value` — the classes the chart drew before it\n * drew its legend through `WrChartLegend`, which are public API and stay on the\n * same elements.\n *\n * A chart provides it in `viewProviders`, and the legend reads it with `host: true`:\n * that lookup stops at the host element of the view the legend is declared in, where\n * it sees that component's `viewProviders` and not its `providers`. So only a legend\n * in the chart's OWN template takes the block, never one further down the tree.\n *\n * @internal\n */\nexport const WR_CHART_LEGEND_BLOCK = new InjectionToken<string>('WR_CHART_LEGEND_BLOCK');\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 { NgTemplateOutlet } from '@angular/common';\nimport { Component, ViewEncapsulation, computed, inject, input, model, output } from '@angular/core';\n\nimport { wrChartMarkerPath } from 'ngwr/charts/core';\nimport { useI18nText } from 'ngwr/i18n';\nimport { wrCheckStyles } from 'ngwr/utils';\n\nimport { WrChartLegendPart } from './internal/chart-legend-part';\nimport { WR_CHART_LEGEND_BLOCK } from './tokens';\nimport type { WrChartLegendItem, WrChartLegendToggle, WrChartMarker } from './types';\n\n/**\n * A chart's key: one row per series, each a swatch, a name and an optional value.\n * It stands on its own for a key that several charts share — one legend above a row\n * of sparklines — and the bar, line, donut, meter group, scatter and radar charts\n * draw their own legends with it.\n *\n * It sits on a `<ul>` the way `button[wr-btn]` sits on a `<button>`, and renders the\n * `<li>`s, so the list is the consumer's element: its class, its placement, its\n * name. The swatch follows what tells the series apart in the chart: a dot, a line\n * in the series' `dash`, or the series' `marker`. A dot is a span painted with an\n * inline background, a line or a marker is an SVG, and every key is `aria-hidden`:\n * the row's text is its name.\n *\n * **Toggling is opt-in.** With `toggleable`, every row is a\n * `<button type=\"button\" aria-pressed>` that shows and hides its series: pressed\n * means shown, and `hiddenSeries` holds the positions of the hidden ones. The rows\n * stay in the tab order, one stop each, rather than becoming one toolbar stop with\n * arrow keys: the toolbar pattern needs `role=\"toolbar\"`, which would take the\n * `<ul>`'s list role and with it the \"list, 5 items\" a reader hears, while each row\n * is an independent toggle — the Button pattern, Tab plus Space or Enter — and a\n * chart's series rarely outnumber the five colours it cycles through. A legend\n * draws nothing hidden by itself: the chart reads `hiddenSeries`.\n *\n * **A hidden row says so in both modes.** On a toggle it is `aria-pressed=\"false\"`;\n * on a legend that does not toggle, where a host has hidden the series from\n * elsewhere, the row carries a visually hidden word after its name\n * (`chartLegend.hidden`, \"hidden\"), since the strike-through and the faded key reach\n * no one who cannot see them.\n *\n * @example\n * ```html\n * <ul\n * wr-chart-legend\n * [items]=\"[\n * { label: 'Visits', color: 'var(--wr-color-primary)', value: '1,204' },\n * { label: 'Signups', color: 'var(--wr-color-success)', value: '86' }\n * ]\"\n * ></ul>\n *\n * <ul wr-chart-legend toggleable [items]=\"series\" [(hiddenSeries)]=\"hidden\"></ul>\n * ```\n *\n * @see https://ngwr.dev/charts/chart-legend\n */\n@Component({\n selector: 'ul[wr-chart-legend]',\n templateUrl: './chart-legend.html',\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-chart-legend',\n // Written out because `list-style: none` (styles/_index.scss) drops the implicit\n // list semantics in Safari, and with them the list's `aria-label`.\n role: 'list',\n '[class.wr-chart-legend--toggleable]': 'toggleable()',\n '[attr.aria-label]': 'label()',\n },\n imports: [NgTemplateOutlet, WrChartLegendPart],\n})\nexport class WrChartLegend {\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('charts/chart-legend');\n }\n\n /** One row per series, in the chart's order. */\n readonly items = input<readonly WrChartLegendItem[]>([]);\n\n /**\n * Make each row a toggle button that shows and hides its series, through\n * `hiddenSeries` and `toggled`. @default false\n */\n readonly toggleable = input(false, { transform: coerceBooleanProperty });\n\n /**\n * The positions in `items` of the series that are hidden, ascending. Positions\n * rather than labels: two series may share a label, and a label translated into\n * another language would no longer match the one it hid. A position past the end\n * of `items` is kept and ignored, so a series coming back finds its state.\n *\n * Written by a click on a `toggleable` row; read in either mode, so a legend that\n * does not toggle still shows a series hidden from elsewhere as hidden.\n */\n readonly hiddenSeries = model<readonly number[]>([]);\n\n /**\n * Accessible name of the list. A `toggleable` legend falls back to\n * `chartLegend.toggleLabel` (\"Toggle series visibility\"), which tells a reader\n * what its buttons do; one that does not toggle has no name unless given one.\n */\n readonly ariaLabel = input<string | null>(null);\n\n /** Emits when a reader shows or hides a series from a `toggleable` legend, after `hiddenSeries` moves. */\n readonly toggled = output<WrChartLegendToggle>();\n\n private readonly toggleLabel = useI18nText(this.ariaLabel, 'chartLegend.toggleLabel', 'Toggle series visibility');\n\n /**\n * The word a hidden row of a legend that does not toggle carries after its name,\n * visually hidden: the strike-through and the faded key are the eye's half of the\n * state, and a toggle row's `aria-pressed` is the other half there. Falls back to\n * `chartLegend.hidden`, then `'hidden'`.\n */\n readonly hiddenLabel = input<string | null>(null);\n\n protected readonly resolvedHiddenLabel = useI18nText(this.hiddenLabel, 'chartLegend.hidden', 'hidden');\n\n protected readonly label = computed(() => (this.ariaLabel() || this.toggleable() ? this.toggleLabel() : null));\n\n private readonly block = inject(WR_CHART_LEGEND_BLOCK, { optional: true, host: true });\n\n private readonly hidden = computed(() => new Set(this.hiddenSeries()));\n\n /** Whether the series at `index` is hidden. */\n protected isHidden(index: number): boolean {\n return this.hidden().has(index);\n }\n\n /** The host chart's own class for one part of a row, or nothing outside a chart. */\n protected part(name: 'legend-item' | 'swatch' | 'legend-label' | 'legend-value'): string {\n return this.block ? `${this.block}__${name}` : '';\n }\n\n /** A marker's path, as large as a circle of radius `r` in the swatch's own units. */\n protected markerPath(shape: WrChartMarker, r: number): string {\n return wrChartMarkerPath(shape, r);\n }\n\n /** Shows or hides the series at `index`, then says so. */\n protected toggle(index: number): void {\n const current = this.hiddenSeries();\n const hide = !current.includes(index);\n this.hiddenSeries.set(hide ? [...current, index].sort((a, b) => a - b) : current.filter(i => i !== index));\n this.toggled.emit({ index, label: this.items()[index]?.label ?? '', hidden: hide });\n }\n}\n\nexport type { WrChartLegendItem, WrChartLegendToggle, WrChartMarker } from './types';\n","@for (item of items(); track $index) {\n <li\n class=\"wr-chart-legend__item\"\n [class.wr-chart-legend__item--hidden]=\"isHidden($index)\"\n [wrChartLegendPart]=\"part('legend-item')\"\n >\n @if (toggleable()) {\n <!-- Pressed means SHOWN: the button's name is the series, and pressing it turns\n that series on. The name never changes with the state, as the toggle-button\n pattern requires; the state is `aria-pressed` and the struck-through label. -->\n <button\n type=\"button\"\n class=\"wr-chart-legend__toggle\"\n [attr.aria-pressed]=\"!isHidden($index)\"\n (click)=\"toggle($index)\"\n >\n <ng-container [ngTemplateOutlet]=\"row\" [ngTemplateOutletContext]=\"{ $implicit: $index }\" />\n </button>\n } @else {\n <ng-container [ngTemplateOutlet]=\"row\" [ngTemplateOutletContext]=\"{ $implicit: $index }\" />\n }\n </li>\n}\n\n<ng-template #row let-index>\n @let item = items()[index];\n @if (item.dash !== undefined) {\n <!-- The key draws the series' own dash, not a solid block. A legend that pairs a\n coloured square with a name leaves the reader to match the square to the LINE,\n and matching by colour is the step the patterns exist to remove. -->\n <svg\n class=\"wr-chart-legend__swatch wr-chart-legend__swatch--line\"\n [wrChartLegendPart]=\"part('swatch')\"\n viewBox=\"0 0 16 2\"\n aria-hidden=\"true\"\n [attr.data-marker]=\"item.marker ?? null\"\n >\n <line\n x1=\"0\"\n y1=\"1\"\n x2=\"16\"\n y2=\"1\"\n [attr.stroke]=\"item.color\"\n [attr.stroke-dasharray]=\"item.dash || null\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n @if (item.marker) {\n <path [attr.d]=\"markerPath(item.marker, 3.5)\" transform=\"translate(8 1)\" [attr.fill]=\"item.color\" />\n }\n </svg>\n } @else if (item.marker) {\n <svg\n class=\"wr-chart-legend__swatch wr-chart-legend__swatch--marker\"\n [wrChartLegendPart]=\"part('swatch')\"\n viewBox=\"-6 -6 12 12\"\n aria-hidden=\"true\"\n [attr.data-marker]=\"item.marker\"\n >\n <path [attr.d]=\"markerPath(item.marker, 5)\" [attr.fill]=\"item.color\" />\n </svg>\n } @else {\n <span\n class=\"wr-chart-legend__swatch wr-chart-legend__swatch--dot\"\n [wrChartLegendPart]=\"part('swatch')\"\n aria-hidden=\"true\"\n [style.background]=\"item.color\"\n ></span>\n }\n <span class=\"wr-chart-legend__label\" [wrChartLegendPart]=\"part('legend-label')\">{{ item.label }}</span>\n @if (!toggleable() && isHidden(index)) {\n <!-- A toggle says hidden through aria-pressed. A row that is not one has nothing but\n the strike-through and the faded key, which reach no one who cannot see them. -->\n <span class=\"wr-chart-legend__sr-only\"> {{ resolvedHiddenLabel() }} </span>\n }\n @if (item.value !== undefined && item.value !== null) {\n <span class=\"wr-chart-legend__value\" [wrChartLegendPart]=\"part('legend-value')\">{{ item.value }}</span>\n }\n</ng-template>\n"],"mappings":";;;;;;;;;;;;;AA0BA,IAAa,oBAAb,MAAa,kBAAiB;CAC5B,cAAA;EACE,IAAI,OAAO,cAAc,eAAe,WAAW,cAAc,qBAAqB;CACxF;CAGS,oBAAoB,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,oBAAA,CAAA,+BAAA,CAAA,CAAA;CAN3B,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAiB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAjB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAiB,cAAA;EAAA,UAAA;EAAA,QAAA,EAAA,mBAAA;GAAA,mBAAA;GAAA,YAAA;GAAA,UAAA;GAAA,YAAA;GAAA,mBAAA;EAAA,EAAA;EAAA,MAAA,EAAA,YAAA,EAAA,SAAA,sBAAA,EAAA;EAAA,UAAA;CAAA,CAAA;;AAAjB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAiB,YAAA,CAAA;EAJ7B,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,MAAM,EAAE,WAAW,sBAAqB;EACzC,CAAA;;;;;;;;;;;;;;;;;;ACDD,MAAa,wBAAwB,IAAI,eAAuB,uBAAuB;;;;;;;ACqDvF,IAAa,gBAAb,MAAa,cAAa;CACxB,cAAA;EACE,IAAI,OAAO,cAAc,eAAe,WAAW,cAAc,qBAAqB;CACxF;CAGS,QAAQ,MAAoC,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAM/C,aAAa,MAAM,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,aAAA,+BAAA,CAAA;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UAAA;GAAqB,eAEhB,kBAAkB;GAAI,MAC/B;IACJ,OAAO;IAGP,MAAM;IACN,uCAAuC;IACvC,qBAAqB;GACtB;GAAA,SACQ,CAAC,kBAAkB,iBAAiB;GAAC,UAAA;EAAA,CAAA"}
@@ -97,7 +97,7 @@ var WrChartTable = class WrChartTable {
97
97
  hasGroupHeaders = computed(() => this.data().groups.some((group) => !!group.header), ...ngDevMode ? [{ debugName: "hasGroupHeaders" }] : /* istanbul ignore next */ []);
98
98
  static ɵfac = i0.ɵɵngDeclareFactory({
99
99
  minVersion: "12.0.0",
100
- version: "22.2.5",
100
+ version: "22.2.6",
101
101
  ngImport: i0,
102
102
  type: WrChartTable,
103
103
  deps: [],
@@ -105,7 +105,7 @@ var WrChartTable = class WrChartTable {
105
105
  });
106
106
  static ɵcmp = i0.ɵɵngDeclareComponent({
107
107
  minVersion: "17.0.0",
108
- version: "22.2.5",
108
+ version: "22.2.6",
109
109
  type: WrChartTable,
110
110
  isStandalone: true,
111
111
  selector: "wr-chart-table",
@@ -124,7 +124,7 @@ var WrChartTable = class WrChartTable {
124
124
  };
125
125
  i0.ɵɵngDeclareClassMetadata({
126
126
  minVersion: "12.0.0",
127
- version: "22.2.5",
127
+ version: "22.2.6",
128
128
  ngImport: i0,
129
129
  type: WrChartTable,
130
130
  decorators: [{
@@ -222,7 +222,7 @@ var WrDonutChart = class WrDonutChart {
222
222
  }
223
223
  static ɵfac = i0.ɵɵngDeclareFactory({
224
224
  minVersion: "12.0.0",
225
- version: "22.2.5",
225
+ version: "22.2.6",
226
226
  ngImport: i0,
227
227
  type: WrDonutChart,
228
228
  deps: [],
@@ -230,7 +230,7 @@ var WrDonutChart = class WrDonutChart {
230
230
  });
231
231
  static ɵcmp = i0.ɵɵngDeclareComponent({
232
232
  minVersion: "17.0.0",
233
- version: "22.2.5",
233
+ version: "22.2.6",
234
234
  type: WrDonutChart,
235
235
  isStandalone: true,
236
236
  selector: "wr-donut-chart",
@@ -342,7 +342,8 @@ var WrDonutChart = class WrDonutChart {
342
342
  "items",
343
343
  "toggleable",
344
344
  "hiddenSeries",
345
- "ariaLabel"
345
+ "ariaLabel",
346
+ "hiddenLabel"
346
347
  ],
347
348
  outputs: ["hiddenSeriesChange", "toggled"]
348
349
  }],
@@ -355,7 +356,7 @@ var WrDonutChart = class WrDonutChart {
355
356
  };
356
357
  i0.ɵɵngDeclareClassMetadata({
357
358
  minVersion: "12.0.0",
358
- version: "22.2.5",
359
+ version: "22.2.6",
359
360
  ngImport: i0,
360
361
  type: WrDonutChart,
361
362
  decorators: [{
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-charts-donut-chart.mjs","names":[],"sources":["../../../projects/lib/charts/donut-chart/donut-chart.ts","../../../projects/lib/charts/donut-chart/donut-chart.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 { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';\nimport { Component, type ElementRef, ViewEncapsulation, computed, input, model, viewChild } from '@angular/core';\n\nimport { WR_CHART_LEGEND_BLOCK, WrChartLegend, type WrChartLegendItem } from 'ngwr/charts/chart-legend';\nimport { wrChartColor, useChartNumbers } from 'ngwr/charts/core';\nimport { useI18nText } from 'ngwr/i18n';\nimport { useChartTooltip } from 'ngwr/popover';\nimport { wrCheckStyles } from 'ngwr/utils';\n\nimport type { WrDonutSegment } from './types';\n\n/**\n * A segment's contribution to the ring. `Math.max(0, NaN)` is NaN, and the running total\n * carries it forward — so one non-finite datum used to take out its own arc AND every arc\n * after it, writing the literal text `NaN` into the path `d`.\n */\nfunction weight(value: number): number {\n return Number.isFinite(value) ? Math.max(0, value) : 0;\n}\n\n/**\n * How wide a slice's hover target is at least, along the outer edge, in CSS px. A\n * slice narrower than that — a share of a percent or two, which at the default 200px\n * is a few px of arc — is a target no pointer lands on, so it gets a wider one; see\n * `hits`.\n */\nconst HIT_PX = 12;\n\n/**\n * The widest that target may grow, in radians, whatever the chart's size: on a 48px\n * chart 12px of arc is a third of a quarter turn, which would take too much of the\n * slices beside it.\n */\nconst MAX_HIT_ANGLE = Math.PI / 12;\n\n/**\n * Donut chart, and with `pie` a pie chart. Optional center text via inputs.\n *\n * @example\n * ```html\n * <wr-donut-chart [segments]=\"[\n * { label: 'Used', value: 60 },\n * { label: 'Free', value: 40 }\n * ]\" centerLabel=\"Disk\" centerValue=\"60%\" />\n *\n * <wr-donut-chart [segments]=\"segments\" pie />\n * ```\n *\n * The legend is a `ul[wr-chart-legend]` (`ngwr/charts/chart-legend`), and with\n * `toggleableLegend` its rows show and hide their slices through `hiddenSegments`.\n *\n * @see https://ngwr.dev/charts/donut-chart\n */\n@Component({\n selector: 'wr-donut-chart',\n templateUrl: './donut-chart.html',\n encapsulation: ViewEncapsulation.None,\n host: { class: 'wr-donut-chart', '[class.wr-donut-chart--pie]': 'pie()' },\n imports: [WrChartLegend],\n // The legend's rows keep the classes this chart drew before it drew them through\n // `WrChartLegend`: `.wr-donut-chart__legend-item`, `__swatch`, `__legend-label` and\n // `__legend-value`.\n viewProviders: [{ provide: WR_CHART_LEGEND_BLOCK, useValue: 'wr-donut-chart' }],\n})\nexport class WrDonutChart {\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('charts/donut-chart');\n }\n\n /**\n * The slices, drawn clockwise from twelve o'clock. A segment with no `color`\n * takes the next entry from the chart's fallback palette.\n */\n readonly segments = input<readonly WrDonutSegment[]>([]);\n\n /**\n * Accessible name of the drawing. The arcs carry no text and the legend is optional, so\n * with `showLegend: false` this and the centre text are the whole of what a screen reader\n * gets. Falls back to `donutChart.label`, or to `donutChart.pieLabel` with `pie`.\n */\n readonly ariaLabel = input<string | null>(null);\n\n private readonly donutLabel = useI18nText(this.ariaLabel, 'donutChart.label', 'Donut chart');\n private readonly pieLabel = useI18nText(this.ariaLabel, 'donutChart.pieLabel', 'Pie chart');\n\n protected readonly resolvedAriaLabel = computed(() => (this.pie() ? this.pieLabel() : this.donutLabel()));\n\n /** Diameter in CSS pixels. @default 200 */\n readonly size = input(200, { transform: (v: unknown): number => Math.max(48, coerceNumberProperty(v, 200)) });\n\n /**\n * Inner-ring thickness as a percent of radius (0–100). `0` fills to the centre, and\n * keeps the centre text; `pie` ignores it. @default 30\n */\n readonly thickness = input(30, {\n transform: (v: unknown): number => Math.min(100, Math.max(0, coerceNumberProperty(v, 30))),\n });\n\n /**\n * Draw a pie chart: every slice fills to the centre, whatever `thickness` says, and\n * the host takes the `wr-donut-chart--pie` modifier. A pie has no hole to print in, so\n * `centerValue` and `centerLabel` are not rendered. Everything else is the donut's: the\n * slices run clockwise from twelve o'clock, with the same gap between them, the legend\n * and its toggle, and the tooltip — which in a pie also opens from a wider, invisible\n * target over a slice too thin to point at (see `tooltip`). The drawing's name falls\n * back to `donutChart.pieLabel`. @default false\n */\n readonly pie = input(false, { transform: coerceBooleanProperty });\n\n /** Show the legend under the chart. @default true */\n readonly showLegend = input(true, { transform: coerceBooleanProperty });\n\n /**\n * Make each legend row a toggle button that shows and hides its slice, through\n * `hiddenSegments`. A row is a `<button aria-pressed>`, pressed while its slice is\n * shown, so the legend becomes one tab stop per slice. @default false\n */\n readonly toggleableLegend = input(false, { transform: coerceBooleanProperty });\n\n /**\n * The positions in `segments` of the slices that are hidden. Positions rather than\n * labels, since two slices may share a label. A toggleable legend writes it, and a\n * host may bind it with or without one: `[(hiddenSegments)]`.\n *\n * A hidden slice is left out of the ring, and the slices still shown RE-NORMALISE:\n * they share the whole ring between them, each at its share of their own total. A\n * donut reads as the parts of the whole it draws, so leaving the hidden slice's arc\n * as a gap would show a whole that no longer adds up, and turning a slice off is how\n * a reader asks \"of the rest, how much is each?\". The tooltip cannot open on a slice\n * that is not drawn. The legend keeps the hidden slice's row, struck through and with\n * its own value, so it can be shown again; the row says \"hidden\" to a screen reader as\n * well, through `aria-pressed` on a toggle and a visually hidden word otherwise. The\n * centre text is printed as given, so a host that writes a total there works it out\n * from this list. A position past the end of `segments` is kept and ignored.\n */\n readonly hiddenSegments = model<readonly number[]>([]);\n\n /** Bold value text in the center. Not rendered with `pie`, which has no hole to hold it. */\n readonly centerValue = input<string>('');\n\n /** Smaller label under the value. Not rendered with `pie`, which has no hole to hold it. */\n readonly centerLabel = input<string>('');\n\n /** Whether the centre text renders: some is given, and there is a hole to print it in. */\n protected readonly showCenter = computed(() => !this.pie() && (!!this.centerValue() || !!this.centerLabel()));\n\n /**\n * Show a tooltip with the slice's label and value on hover. Pointer only — the\n * legend prints the same numbers, and with `showLegend` off `ariaLabel` is where\n * to say them. With `pie`, a slice too thin to land a pointer on, a sliver of a few\n * degrees, is hovered over a wider strip than it draws, through an invisible\n * `.wr-donut-chart__hit` over the pie: widened toward 12px of outer arc (15° on a chart\n * under about 92px) out of what the wider slices beside it can spare, each of which keeps\n * that much of its own. A sliver whose neighbours are slivers too, or have little to\n * spare, gets a narrower target or none, and is read in the legend. The ring draws no\n * such target. @default true\n */\n readonly tooltip = input(true, { transform: coerceBooleanProperty });\n\n /**\n * Writes every value in the legend and the tooltip. `null` uses `Intl.NumberFormat`\n * in `LOCALE_ID`. The centre text is printed as given.\n */\n readonly valueFormat = input<((value: number) => string) | null>(null);\n\n /** Each value as the legend and the tooltip print it: exact, in `LOCALE_ID` unless `valueFormat` is given. */\n private readonly numbers = useChartNumbers(this.valueFormat);\n\n private readonly hidden = computed(() => new Set(this.hiddenSegments()));\n\n private readonly svg = viewChild<ElementRef<SVGSVGElement>>('svg');\n\n // Drawn in a 100×100 viewBox.\n private readonly outerR = 50;\n\n protected readonly innerR = computed(() => {\n const thickness = this.thickness();\n // A pie, or a thickness of 0: fill all the way to the center, not a zero-width ring.\n if (this.pie() || thickness === 0) return 0;\n return this.outerR * (1 - thickness / 100);\n });\n\n /** The sum the ring is divided by: the slices still shown (see `hiddenSegments`). */\n protected readonly total = computed(() => {\n const hidden = this.hidden();\n const sum = this.segments().reduce((acc, s, i) => acc + (hidden.has(i) ? 0 : weight(s.value)), 0);\n return sum > 0 ? sum : 1;\n });\n\n /**\n * Resolved slices ready for the template — each carries its arc path.\n *\n * Angles are in the drawing's own frame, where 0 is three o'clock and a positive\n * angle turns clockwise, because y runs downwards. The ring starts a quarter turn\n * back from there, at twelve o'clock, which is where the input's JSDoc always said\n * it started and where a reader looks for the first slice; it used to start at three.\n */\n protected readonly slices = computed(() => {\n const total = this.total();\n const hidden = this.hidden();\n const origin = -Math.PI / 2;\n let cumulative = 0;\n return this.segments().map((s, i) => {\n const value = weight(s.value);\n const isHidden = hidden.has(i);\n // A hidden slice takes no turn of the ring, so the next slice starts where the last\n // shown one ended.\n const share = isHidden ? 0 : value;\n const startAngle = origin + (cumulative / total) * Math.PI * 2;\n cumulative += share;\n const endAngle = origin + (cumulative / total) * Math.PI * 2;\n return {\n label: s.label,\n value,\n // The segment's own figure, which a negative one keeps although it draws nothing:\n // the weight is the arc's, not the data's, and printing it named a \"0\" the data\n // never had. A value that is not a number has no figure to print.\n text: Number.isFinite(s.value) ? this.numbers.value(s.value) : '',\n color: s.color ?? wrChartColor(i),\n hidden: isHidden,\n path: isHidden ? '' : this.arcPath(startAngle, endAngle),\n percent: (share / total) * 100,\n startAngle,\n endAngle,\n midAngle: (startAngle + endAngle) / 2,\n };\n });\n });\n\n /**\n * In a pie, a wider hover target for every slice too thin to land a pointer on: an\n * invisible wedge over the slice, drawn above the pie, widened toward `HIT_PX` of outer\n * arc (`MAX_HIT_ANGLE` at most, which binds below about 92px) out of the wider slices\n * beside it.\n *\n * A wider slice gives away only what it can spare: it keeps `HIT_PX` of outer arc of its\n * own (the same `MAX_HIT_ANGLE` cap), however many slivers reach into it, so a slice\n * that was easy to point at stays easy, and its middle, where its own chip points, is\n * never covered. Two slivers reaching into one slice from either side split what it\n * spares. A sliver asks half its shortfall of each wider neighbour, or all of it of the\n * only one; what one side cannot give, the other gives if it can. Between two slivers\n * side by side the boundary stays their shared edge, so of a run of slivers only the two\n * at its ends grow, and the legend is where the rest are read — as it is for a sliver\n * whose neighbours have little to spare, which gets the narrower target they leave it.\n * A slice that draws nothing — a zero, or a hidden slice — has nothing to point at and\n * gets no target, and nor does one with no wider neighbour.\n *\n * Pie only, and only while the tooltip is on, which is all it is for: the ring draws\n * exactly what it drew before `pie` existed. The wedge is filled with nothing and\n * hit-tested through `pointer-events=\"fill\"`, which reads its interior whatever its\n * paint and never its unpainted stroke, so its edges are the ones computed here; it\n * paints in no theme and in no forced-colors palette.\n */\n protected readonly hits = computed(() => {\n if (!this.pie() || !this.tooltip()) return [];\n const min = Math.min(MAX_HIT_ANGLE, HIT_PX / (this.size() / 2));\n const drawn = this.slices()\n .map((slice, index) => ({ index, start: slice.startAngle, end: slice.endAngle }))\n .filter(slice => slice.end - slice.start > 0);\n const count = drawn.length;\n if (count < 2) return [];\n const width = drawn.map(slice => slice.end - slice.start);\n const thin = width.map(w => w < min);\n const prev = (k: number): number => (k - 1 + count) % count;\n const next = (k: number): number => (k + 1) % count;\n // What each wider slice can give away and still keep `min` of its own.\n const spare = width.map((w, k) => (thin[k] ? 0 : w - min));\n // How far each sliver asks to reach on each side: into a wider neighbour only.\n const ask = width.map((w, k) => {\n if (!thin[k]) return { before: 0, after: 0 };\n const before = !thin[prev(k)];\n const after = !thin[next(k)];\n const share = (min - w) / (before && after ? 2 : 1);\n return { before: before ? share : 0, after: after ? share : 0 };\n });\n const reach = width.map(() => ({ before: 0, after: 0 }));\n // A wider slice is reached into by the sliver before it, past its own end, and by the\n // one after it, past its own start — the same sliver from both sides when there are\n // only two slices. Each gets what it asks while the two fit in the spare; past that,\n // at least half of it, and more where the other asks for less.\n width.forEach((_, j) => {\n if (thin[j]) return;\n const fromBefore = thin[prev(j)] ? ask[prev(j)].after : 0;\n const fromAfter = thin[next(j)] ? ask[next(j)].before : 0;\n const claims = (fromBefore > 0 ? 1 : 0) + (fromAfter > 0 ? 1 : 0);\n if (claims === 0) return;\n const fair = spare[j] / claims;\n const toBefore = Math.min(fromBefore, Math.max(fair, spare[j] - fromAfter));\n const toAfter = Math.min(fromAfter, Math.max(fair, spare[j] - fromBefore));\n if (toBefore > 0) reach[prev(j)].after = toBefore;\n if (toAfter > 0) reach[next(j)].before = toAfter;\n spare[j] = Math.max(0, spare[j] - toBefore - toAfter);\n });\n // What one side could not give, the other side gives out of what it has left.\n width.forEach((w, k) => {\n if (!thin[k]) return;\n let short = min - w - reach[k].before - reach[k].after;\n for (const [side, j] of [\n ['before', prev(k)],\n ['after', next(k)],\n ] as const) {\n if (short <= 0 || thin[j]) continue;\n const more = Math.min(short, spare[j]);\n reach[k][side] += more;\n spare[j] -= more;\n short -= more;\n }\n });\n return drawn.flatMap((slice, k) => {\n const { before, after } = reach[k];\n if (!thin[k] || before + after <= 0) return [];\n return [{ index: slice.index, path: this.arcPath(slice.start - before, slice.end + after) }];\n });\n });\n\n /**\n * The legend's rows: every slice, hidden ones included, each with its own figure — a\n * negative one included, which draws no slice — and no value at all for a segment whose\n * value is not a number.\n */\n protected readonly legendItems = computed<readonly WrChartLegendItem[]>(() =>\n this.slices().map(({ label, color, text }) => ({ label, color, value: text === '' ? null : text }))\n );\n\n /**\n * One tooltip for the whole chart, pointing at the hovered slice: at the middle of\n * its OUTER arc, on the side that part of the ring faces — above for a slice whose\n * middle is in the top quarter, below for the bottom one, beside it for the two at\n * three and nine o'clock. From there the chip sits clear of the ring, and the way\n * onto it runs straight out of the slice that opened it, over nothing else.\n *\n * Not the slice's `<path>` element: its box is most of the ring for any slice past\n * a quarter, so the chip would point at the middle of the chart. And not the middle\n * of the band: a chip there lies over the ring, under a pointer resting on it —\n * measured in Chromium, the inner half of a lower slice landed on its own chip. A\n * tiny slice keeps its own mid-angle, so the arrow says which sliver it is.\n */\n protected readonly tip = useChartTooltip(this.tooltip, index => {\n const slice = this.slices()[index];\n const svg = this.svg()?.nativeElement;\n if (!slice?.path || !svg) return null;\n const box = svg.getBoundingClientRect();\n // The drawing's y runs downwards, so a positive sine is the lower half.\n const cos = Math.cos(slice.midAngle);\n const sin = Math.sin(slice.midAngle);\n const side = Math.abs(cos) > Math.abs(sin) ? (cos > 0 ? 'right' : 'left') : sin > 0 ? 'bottom' : 'top';\n return {\n datum: { label: slice.label, value: slice.text, color: slice.color },\n anchor: {\n x: box.left + ((50 + this.outerR * cos) / 100) * box.width,\n y: box.top + ((50 + this.outerR * sin) / 100) * box.height,\n },\n side,\n };\n });\n\n // Helpers\n\n /** SVG path for one donut slice using outer and inner arcs. */\n private arcPath(start: number, end: number): string {\n const cx = 50;\n const cy = 50;\n const ro = this.outerR;\n const ri = this.innerR();\n const sweep = end - start;\n if (sweep <= 0) return '';\n // Full-circle slice — two halves so the arc can render.\n if (sweep >= Math.PI * 2 - 1e-6) {\n const path = [\n `M ${cx + ro} ${cy}`,\n `A ${ro} ${ro} 0 1 1 ${cx - ro} ${cy}`,\n `A ${ro} ${ro} 0 1 1 ${cx + ro} ${cy}`,\n ];\n if (ri > 0) {\n path.push(`M ${cx + ri} ${cy}`, `A ${ri} ${ri} 0 1 0 ${cx - ri} ${cy}`, `A ${ri} ${ri} 0 1 0 ${cx + ri} ${cy}`);\n }\n return path.join(' ');\n }\n const largeArc = sweep > Math.PI ? 1 : 0;\n const sox = cx + ro * Math.cos(start);\n const soy = cy + ro * Math.sin(start);\n const eox = cx + ro * Math.cos(end);\n const eoy = cy + ro * Math.sin(end);\n if (ri === 0) {\n return `M ${cx} ${cy} L ${sox.toFixed(2)} ${soy.toFixed(2)} A ${ro} ${ro} 0 ${largeArc} 1 ${eox.toFixed(2)} ${eoy.toFixed(2)} Z`;\n }\n const eix = cx + ri * Math.cos(end);\n const eiy = cy + ri * Math.sin(end);\n const six = cx + ri * Math.cos(start);\n const siy = cy + ri * Math.sin(start);\n return [\n `M ${sox.toFixed(2)} ${soy.toFixed(2)}`,\n `A ${ro} ${ro} 0 ${largeArc} 1 ${eox.toFixed(2)} ${eoy.toFixed(2)}`,\n `L ${eix.toFixed(2)} ${eiy.toFixed(2)}`,\n `A ${ri} ${ri} 0 ${largeArc} 0 ${six.toFixed(2)} ${siy.toFixed(2)}`,\n 'Z',\n ].join(' ');\n }\n}\n\nexport type { WrDonutSegment } from './types';\n","<div class=\"wr-donut-chart__surface\" [style.width.px]=\"size()\">\n <!-- The name sits on the DRAWING, not on this wrapper. `img` is a\n children-presentational role, so with it out here WebKit dropped the whole\n subtree — including the centre value and label, which are real text and are\n the headline datum the legend does not carry. -->\n <svg #svg viewBox=\"0 0 100 100\" role=\"img\" [attr.aria-label]=\"resolvedAriaLabel()\">\n <!-- Every slice is stroked in the SURFACE colour (`--wr-donut-chart-slice-gap-color`,\n from the stylesheet), so adjacent arcs are separated by a visible gap rather than\n by the boundary between two fills. Without it the only thing dividing two slices\n is the colour change itself, and the default palette's entries sit within about\n 1.06:1 of each other in relative luminance — for a reader who cannot separate\n hue, two neighbours merge into one arc and the chart reads as having fewer slices\n than it has. A gap is a shape, and it survives greyscale, printing and a\n monochrome display. -->\n @for (slice of slices(); track $index) {\n <!-- A hidden slice draws nothing at all; the index stays the slice's own, which is\n what the tooltip looks it up by. -->\n @if (!slice.hidden) {\n <path\n class=\"wr-donut-chart__slice\"\n [attr.d]=\"slice.path\"\n [attr.fill]=\"slice.color\"\n stroke-width=\"1\"\n stroke-linejoin=\"round\"\n (mouseenter)=\"tip.enter($index)\"\n (mouseleave)=\"tip.leave($event)\"\n />\n }\n }\n <!-- A sliver's wider hover target in a pie, filled with nothing: see `hits`, which is\n empty for the ring and with the tooltip off. Last, so it wins the pointer over the\n slices it reaches into; `fill`, so the unpainted stroke is not hit-tested and the\n edges stay where `hits` put them. -->\n @for (hit of hits(); track hit.index) {\n <path\n class=\"wr-donut-chart__hit\"\n [attr.d]=\"hit.path\"\n fill=\"none\"\n pointer-events=\"fill\"\n (mouseenter)=\"tip.enter(hit.index)\"\n (mouseleave)=\"tip.leave($event)\"\n />\n }\n </svg>\n <!-- Never with `pie`: a pie has no hole to print in. -->\n @if (showCenter()) {\n <div class=\"wr-donut-chart__center\">\n @if (centerValue()) {\n <div class=\"wr-donut-chart__center-value\">{{ centerValue() }}</div>\n }\n @if (centerLabel()) {\n <div class=\"wr-donut-chart__center-label\">{{ centerLabel() }}</div>\n }\n </div>\n }\n</div>\n\n@if (showLegend() && slices().length > 0) {\n <!-- The key is `aria-hidden`: the row's text is its name, and the dot carries no word\n of its own. -->\n <ul\n wr-chart-legend\n class=\"wr-donut-chart__legend\"\n [items]=\"legendItems()\"\n [toggleable]=\"toggleableLegend()\"\n [(hiddenSeries)]=\"hiddenSegments\"\n ></ul>\n}\n"],"mappings":";;;;;;;;;;;;;;AAuBA,SAAS,OAAO,OAAa;CAC3B,OAAO,OAAO,SAAS,KAAK,IAAI,KAAK,IAAI,GAAG,KAAK,IAAI;AACvD;AAQA,MAAM,SAAS;AAOf,MAAM,gBAAgB,KAAK,KAAK;AA+BhC,IAAa,eAAb,MAAa,aAAY;CACvB,cAAA;EACE,IAAI,OAAO,cAAc,eAAe,WAAW,cAAc,oBAAoB;CACvF;CAMS,WAAW,MAAiC,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAO/C,YAAY,MAAqB,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAE9B,aAAa,YAAY,KAAK,WAAW,oBAAoB,aAAa;CAC1E,WAAW,YAAY,KAAK,WAAW,uBAAuB,WAAW;CAEvE,oBAAoB,eAAgB,KAAK,IAAG,IAAK,KAAK,SAAQ,IAAK,KAAK,WAAU,GAAI,GAAA,YAAA,CAAA,EAAA,WAAA,oBAAA,CAAA,+BAAA,CAAA,CAAA;CAGhG,OAAO,MAAM,KAAG;EAAA,GAAA,YAAA,EAAA,WAAA,OAAA,+BAAA,CAAA;EAAI,YAAY,MAAuB,KAAK,IAAI,IAAI,qBAAqB,GAAG,GAAG,CAAC;CAAC,CAAA;CAMjG,YAAY,MAAM,IAAE;EAAA,GAAA,YAAA,EAAA,WAAA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":"ngwr-charts-donut-chart.mjs","names":[],"sources":["../../../projects/lib/charts/donut-chart/donut-chart.ts","../../../projects/lib/charts/donut-chart/donut-chart.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 { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';\nimport { Component, type ElementRef, ViewEncapsulation, computed, input, model, viewChild } from '@angular/core';\n\nimport { WR_CHART_LEGEND_BLOCK, WrChartLegend, type WrChartLegendItem } from 'ngwr/charts/chart-legend';\nimport { wrChartColor, useChartNumbers } from 'ngwr/charts/core';\nimport { useI18nText } from 'ngwr/i18n';\nimport { useChartTooltip } from 'ngwr/popover';\nimport { wrCheckStyles } from 'ngwr/utils';\n\nimport type { WrDonutSegment } from './types';\n\n/**\n * A segment's contribution to the ring. `Math.max(0, NaN)` is NaN, and the running total\n * carries it forward — so one non-finite datum used to take out its own arc AND every arc\n * after it, writing the literal text `NaN` into the path `d`.\n */\nfunction weight(value: number): number {\n return Number.isFinite(value) ? Math.max(0, value) : 0;\n}\n\n/**\n * How wide a slice's hover target is at least, along the outer edge, in CSS px. A\n * slice narrower than that — a share of a percent or two, which at the default 200px\n * is a few px of arc — is a target no pointer lands on, so it gets a wider one; see\n * `hits`.\n */\nconst HIT_PX = 12;\n\n/**\n * The widest that target may grow, in radians, whatever the chart's size: on a 48px\n * chart 12px of arc is a third of a quarter turn, which would take too much of the\n * slices beside it.\n */\nconst MAX_HIT_ANGLE = Math.PI / 12;\n\n/**\n * Donut chart, and with `pie` a pie chart. Optional center text via inputs.\n *\n * @example\n * ```html\n * <wr-donut-chart [segments]=\"[\n * { label: 'Used', value: 60 },\n * { label: 'Free', value: 40 }\n * ]\" centerLabel=\"Disk\" centerValue=\"60%\" />\n *\n * <wr-donut-chart [segments]=\"segments\" pie />\n * ```\n *\n * The legend is a `ul[wr-chart-legend]` (`ngwr/charts/chart-legend`), and with\n * `toggleableLegend` its rows show and hide their slices through `hiddenSegments`.\n *\n * @see https://ngwr.dev/charts/donut-chart\n */\n@Component({\n selector: 'wr-donut-chart',\n templateUrl: './donut-chart.html',\n encapsulation: ViewEncapsulation.None,\n host: { class: 'wr-donut-chart', '[class.wr-donut-chart--pie]': 'pie()' },\n imports: [WrChartLegend],\n // The legend's rows keep the classes this chart drew before it drew them through\n // `WrChartLegend`: `.wr-donut-chart__legend-item`, `__swatch`, `__legend-label` and\n // `__legend-value`.\n viewProviders: [{ provide: WR_CHART_LEGEND_BLOCK, useValue: 'wr-donut-chart' }],\n})\nexport class WrDonutChart {\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('charts/donut-chart');\n }\n\n /**\n * The slices, drawn clockwise from twelve o'clock. A segment with no `color`\n * takes the next entry from the chart's fallback palette.\n */\n readonly segments = input<readonly WrDonutSegment[]>([]);\n\n /**\n * Accessible name of the drawing. The arcs carry no text and the legend is optional, so\n * with `showLegend: false` this and the centre text are the whole of what a screen reader\n * gets. Falls back to `donutChart.label`, or to `donutChart.pieLabel` with `pie`.\n */\n readonly ariaLabel = input<string | null>(null);\n\n private readonly donutLabel = useI18nText(this.ariaLabel, 'donutChart.label', 'Donut chart');\n private readonly pieLabel = useI18nText(this.ariaLabel, 'donutChart.pieLabel', 'Pie chart');\n\n protected readonly resolvedAriaLabel = computed(() => (this.pie() ? this.pieLabel() : this.donutLabel()));\n\n /** Diameter in CSS pixels. @default 200 */\n readonly size = input(200, { transform: (v: unknown): number => Math.max(48, coerceNumberProperty(v, 200)) });\n\n /**\n * Inner-ring thickness as a percent of radius (0–100). `0` fills to the centre, and\n * keeps the centre text; `pie` ignores it. @default 30\n */\n readonly thickness = input(30, {\n transform: (v: unknown): number => Math.min(100, Math.max(0, coerceNumberProperty(v, 30))),\n });\n\n /**\n * Draw a pie chart: every slice fills to the centre, whatever `thickness` says, and\n * the host takes the `wr-donut-chart--pie` modifier. A pie has no hole to print in, so\n * `centerValue` and `centerLabel` are not rendered. Everything else is the donut's: the\n * slices run clockwise from twelve o'clock, with the same gap between them, the legend\n * and its toggle, and the tooltip — which in a pie also opens from a wider, invisible\n * target over a slice too thin to point at (see `tooltip`). The drawing's name falls\n * back to `donutChart.pieLabel`. @default false\n */\n readonly pie = input(false, { transform: coerceBooleanProperty });\n\n /** Show the legend under the chart. @default true */\n readonly showLegend = input(true, { transform: coerceBooleanProperty });\n\n /**\n * Make each legend row a toggle button that shows and hides its slice, through\n * `hiddenSegments`. A row is a `<button aria-pressed>`, pressed while its slice is\n * shown, so the legend becomes one tab stop per slice. @default false\n */\n readonly toggleableLegend = input(false, { transform: coerceBooleanProperty });\n\n /**\n * The positions in `segments` of the slices that are hidden. Positions rather than\n * labels, since two slices may share a label. A toggleable legend writes it, and a\n * host may bind it with or without one: `[(hiddenSegments)]`.\n *\n * A hidden slice is left out of the ring, and the slices still shown RE-NORMALISE:\n * they share the whole ring between them, each at its share of their own total. A\n * donut reads as the parts of the whole it draws, so leaving the hidden slice's arc\n * as a gap would show a whole that no longer adds up, and turning a slice off is how\n * a reader asks \"of the rest, how much is each?\". The tooltip cannot open on a slice\n * that is not drawn. The legend keeps the hidden slice's row, struck through and with\n * its own value, so it can be shown again; the row says \"hidden\" to a screen reader as\n * well, through `aria-pressed` on a toggle and a visually hidden word otherwise. The\n * centre text is printed as given, so a host that writes a total there works it out\n * from this list. A position past the end of `segments` is kept and ignored.\n */\n readonly hiddenSegments = model<readonly number[]>([]);\n\n /** Bold value text in the center. Not rendered with `pie`, which has no hole to hold it. */\n readonly centerValue = input<string>('');\n\n /** Smaller label under the value. Not rendered with `pie`, which has no hole to hold it. */\n readonly centerLabel = input<string>('');\n\n /** Whether the centre text renders: some is given, and there is a hole to print it in. */\n protected readonly showCenter = computed(() => !this.pie() && (!!this.centerValue() || !!this.centerLabel()));\n\n /**\n * Show a tooltip with the slice's label and value on hover. Pointer only — the\n * legend prints the same numbers, and with `showLegend` off `ariaLabel` is where\n * to say them. With `pie`, a slice too thin to land a pointer on, a sliver of a few\n * degrees, is hovered over a wider strip than it draws, through an invisible\n * `.wr-donut-chart__hit` over the pie: widened toward 12px of outer arc (15° on a chart\n * under about 92px) out of what the wider slices beside it can spare, each of which keeps\n * that much of its own. A sliver whose neighbours are slivers too, or have little to\n * spare, gets a narrower target or none, and is read in the legend. The ring draws no\n * such target. @default true\n */\n readonly tooltip = input(true, { transform: coerceBooleanProperty });\n\n /**\n * Writes every value in the legend and the tooltip. `null` uses `Intl.NumberFormat`\n * in `LOCALE_ID`. The centre text is printed as given.\n */\n readonly valueFormat = input<((value: number) => string) | null>(null);\n\n /** Each value as the legend and the tooltip print it: exact, in `LOCALE_ID` unless `valueFormat` is given. */\n private readonly numbers = useChartNumbers(this.valueFormat);\n\n private readonly hidden = computed(() => new Set(this.hiddenSegments()));\n\n private readonly svg = viewChild<ElementRef<SVGSVGElement>>('svg');\n\n // Drawn in a 100×100 viewBox.\n private readonly outerR = 50;\n\n protected readonly innerR = computed(() => {\n const thickness = this.thickness();\n // A pie, or a thickness of 0: fill all the way to the center, not a zero-width ring.\n if (this.pie() || thickness === 0) return 0;\n return this.outerR * (1 - thickness / 100);\n });\n\n /** The sum the ring is divided by: the slices still shown (see `hiddenSegments`). */\n protected readonly total = computed(() => {\n const hidden = this.hidden();\n const sum = this.segments().reduce((acc, s, i) => acc + (hidden.has(i) ? 0 : weight(s.value)), 0);\n return sum > 0 ? sum : 1;\n });\n\n /**\n * Resolved slices ready for the template — each carries its arc path.\n *\n * Angles are in the drawing's own frame, where 0 is three o'clock and a positive\n * angle turns clockwise, because y runs downwards. The ring starts a quarter turn\n * back from there, at twelve o'clock, which is where the input's JSDoc always said\n * it started and where a reader looks for the first slice; it used to start at three.\n */\n protected readonly slices = computed(() => {\n const total = this.total();\n const hidden = this.hidden();\n const origin = -Math.PI / 2;\n let cumulative = 0;\n return this.segments().map((s, i) => {\n const value = weight(s.value);\n const isHidden = hidden.has(i);\n // A hidden slice takes no turn of the ring, so the next slice starts where the last\n // shown one ended.\n const share = isHidden ? 0 : value;\n const startAngle = origin + (cumulative / total) * Math.PI * 2;\n cumulative += share;\n const endAngle = origin + (cumulative / total) * Math.PI * 2;\n return {\n label: s.label,\n value,\n // The segment's own figure, which a negative one keeps although it draws nothing:\n // the weight is the arc's, not the data's, and printing it named a \"0\" the data\n // never had. A value that is not a number has no figure to print.\n text: Number.isFinite(s.value) ? this.numbers.value(s.value) : '',\n color: s.color ?? wrChartColor(i),\n hidden: isHidden,\n path: isHidden ? '' : this.arcPath(startAngle, endAngle),\n percent: (share / total) * 100,\n startAngle,\n endAngle,\n midAngle: (startAngle + endAngle) / 2,\n };\n });\n });\n\n /**\n * In a pie, a wider hover target for every slice too thin to land a pointer on: an\n * invisible wedge over the slice, drawn above the pie, widened toward `HIT_PX` of outer\n * arc (`MAX_HIT_ANGLE` at most, which binds below about 92px) out of the wider slices\n * beside it.\n *\n * A wider slice gives away only what it can spare: it keeps `HIT_PX` of outer arc of its\n * own (the same `MAX_HIT_ANGLE` cap), however many slivers reach into it, so a slice\n * that was easy to point at stays easy, and its middle, where its own chip points, is\n * never covered. Two slivers reaching into one slice from either side split what it\n * spares. A sliver asks half its shortfall of each wider neighbour, or all of it of the\n * only one; what one side cannot give, the other gives if it can. Between two slivers\n * side by side the boundary stays their shared edge, so of a run of slivers only the two\n * at its ends grow, and the legend is where the rest are read — as it is for a sliver\n * whose neighbours have little to spare, which gets the narrower target they leave it.\n * A slice that draws nothing — a zero, or a hidden slice — has nothing to point at and\n * gets no target, and nor does one with no wider neighbour.\n *\n * Pie only, and only while the tooltip is on, which is all it is for: the ring draws\n * exactly what it drew before `pie` existed. The wedge is filled with nothing and\n * hit-tested through `pointer-events=\"fill\"`, which reads its interior whatever its\n * paint and never its unpainted stroke, so its edges are the ones computed here; it\n * paints in no theme and in no forced-colors palette.\n */\n protected readonly hits = computed(() => {\n if (!this.pie() || !this.tooltip()) return [];\n const min = Math.min(MAX_HIT_ANGLE, HIT_PX / (this.size() / 2));\n const drawn = this.slices()\n .map((slice, index) => ({ index, start: slice.startAngle, end: slice.endAngle }))\n .filter(slice => slice.end - slice.start > 0);\n const count = drawn.length;\n if (count < 2) return [];\n const width = drawn.map(slice => slice.end - slice.start);\n const thin = width.map(w => w < min);\n const prev = (k: number): number => (k - 1 + count) % count;\n const next = (k: number): number => (k + 1) % count;\n // What each wider slice can give away and still keep `min` of its own.\n const spare = width.map((w, k) => (thin[k] ? 0 : w - min));\n // How far each sliver asks to reach on each side: into a wider neighbour only.\n const ask = width.map((w, k) => {\n if (!thin[k]) return { before: 0, after: 0 };\n const before = !thin[prev(k)];\n const after = !thin[next(k)];\n const share = (min - w) / (before && after ? 2 : 1);\n return { before: before ? share : 0, after: after ? share : 0 };\n });\n const reach = width.map(() => ({ before: 0, after: 0 }));\n // A wider slice is reached into by the sliver before it, past its own end, and by the\n // one after it, past its own start — the same sliver from both sides when there are\n // only two slices. Each gets what it asks while the two fit in the spare; past that,\n // at least half of it, and more where the other asks for less.\n width.forEach((_, j) => {\n if (thin[j]) return;\n const fromBefore = thin[prev(j)] ? ask[prev(j)].after : 0;\n const fromAfter = thin[next(j)] ? ask[next(j)].before : 0;\n const claims = (fromBefore > 0 ? 1 : 0) + (fromAfter > 0 ? 1 : 0);\n if (claims === 0) return;\n const fair = spare[j] / claims;\n const toBefore = Math.min(fromBefore, Math.max(fair, spare[j] - fromAfter));\n const toAfter = Math.min(fromAfter, Math.max(fair, spare[j] - fromBefore));\n if (toBefore > 0) reach[prev(j)].after = toBefore;\n if (toAfter > 0) reach[next(j)].before = toAfter;\n spare[j] = Math.max(0, spare[j] - toBefore - toAfter);\n });\n // What one side could not give, the other side gives out of what it has left.\n width.forEach((w, k) => {\n if (!thin[k]) return;\n let short = min - w - reach[k].before - reach[k].after;\n for (const [side, j] of [\n ['before', prev(k)],\n ['after', next(k)],\n ] as const) {\n if (short <= 0 || thin[j]) continue;\n const more = Math.min(short, spare[j]);\n reach[k][side] += more;\n spare[j] -= more;\n short -= more;\n }\n });\n return drawn.flatMap((slice, k) => {\n const { before, after } = reach[k];\n if (!thin[k] || before + after <= 0) return [];\n return [{ index: slice.index, path: this.arcPath(slice.start - before, slice.end + after) }];\n });\n });\n\n /**\n * The legend's rows: every slice, hidden ones included, each with its own figure — a\n * negative one included, which draws no slice — and no value at all for a segment whose\n * value is not a number.\n */\n protected readonly legendItems = computed<readonly WrChartLegendItem[]>(() =>\n this.slices().map(({ label, color, text }) => ({ label, color, value: text === '' ? null : text }))\n );\n\n /**\n * One tooltip for the whole chart, pointing at the hovered slice: at the middle of\n * its OUTER arc, on the side that part of the ring faces — above for a slice whose\n * middle is in the top quarter, below for the bottom one, beside it for the two at\n * three and nine o'clock. From there the chip sits clear of the ring, and the way\n * onto it runs straight out of the slice that opened it, over nothing else.\n *\n * Not the slice's `<path>` element: its box is most of the ring for any slice past\n * a quarter, so the chip would point at the middle of the chart. And not the middle\n * of the band: a chip there lies over the ring, under a pointer resting on it —\n * measured in Chromium, the inner half of a lower slice landed on its own chip. A\n * tiny slice keeps its own mid-angle, so the arrow says which sliver it is.\n */\n protected readonly tip = useChartTooltip(this.tooltip, index => {\n const slice = this.slices()[index];\n const svg = this.svg()?.nativeElement;\n if (!slice?.path || !svg) return null;\n const box = svg.getBoundingClientRect();\n // The drawing's y runs downwards, so a positive sine is the lower half.\n const cos = Math.cos(slice.midAngle);\n const sin = Math.sin(slice.midAngle);\n const side = Math.abs(cos) > Math.abs(sin) ? (cos > 0 ? 'right' : 'left') : sin > 0 ? 'bottom' : 'top';\n return {\n datum: { label: slice.label, value: slice.text, color: slice.color },\n anchor: {\n x: box.left + ((50 + this.outerR * cos) / 100) * box.width,\n y: box.top + ((50 + this.outerR * sin) / 100) * box.height,\n },\n side,\n };\n });\n\n // Helpers\n\n /** SVG path for one donut slice using outer and inner arcs. */\n private arcPath(start: number, end: number): string {\n const cx = 50;\n const cy = 50;\n const ro = this.outerR;\n const ri = this.innerR();\n const sweep = end - start;\n if (sweep <= 0) return '';\n // Full-circle slice — two halves so the arc can render.\n if (sweep >= Math.PI * 2 - 1e-6) {\n const path = [\n `M ${cx + ro} ${cy}`,\n `A ${ro} ${ro} 0 1 1 ${cx - ro} ${cy}`,\n `A ${ro} ${ro} 0 1 1 ${cx + ro} ${cy}`,\n ];\n if (ri > 0) {\n path.push(`M ${cx + ri} ${cy}`, `A ${ri} ${ri} 0 1 0 ${cx - ri} ${cy}`, `A ${ri} ${ri} 0 1 0 ${cx + ri} ${cy}`);\n }\n return path.join(' ');\n }\n const largeArc = sweep > Math.PI ? 1 : 0;\n const sox = cx + ro * Math.cos(start);\n const soy = cy + ro * Math.sin(start);\n const eox = cx + ro * Math.cos(end);\n const eoy = cy + ro * Math.sin(end);\n if (ri === 0) {\n return `M ${cx} ${cy} L ${sox.toFixed(2)} ${soy.toFixed(2)} A ${ro} ${ro} 0 ${largeArc} 1 ${eox.toFixed(2)} ${eoy.toFixed(2)} Z`;\n }\n const eix = cx + ri * Math.cos(end);\n const eiy = cy + ri * Math.sin(end);\n const six = cx + ri * Math.cos(start);\n const siy = cy + ri * Math.sin(start);\n return [\n `M ${sox.toFixed(2)} ${soy.toFixed(2)}`,\n `A ${ro} ${ro} 0 ${largeArc} 1 ${eox.toFixed(2)} ${eoy.toFixed(2)}`,\n `L ${eix.toFixed(2)} ${eiy.toFixed(2)}`,\n `A ${ri} ${ri} 0 ${largeArc} 0 ${six.toFixed(2)} ${siy.toFixed(2)}`,\n 'Z',\n ].join(' ');\n }\n}\n\nexport type { WrDonutSegment } from './types';\n","<div class=\"wr-donut-chart__surface\" [style.width.px]=\"size()\">\n <!-- The name sits on the DRAWING, not on this wrapper. `img` is a\n children-presentational role, so with it out here WebKit dropped the whole\n subtree — including the centre value and label, which are real text and are\n the headline datum the legend does not carry. -->\n <svg #svg viewBox=\"0 0 100 100\" role=\"img\" [attr.aria-label]=\"resolvedAriaLabel()\">\n <!-- Every slice is stroked in the SURFACE colour (`--wr-donut-chart-slice-gap-color`,\n from the stylesheet), so adjacent arcs are separated by a visible gap rather than\n by the boundary between two fills. Without it the only thing dividing two slices\n is the colour change itself, and the default palette's entries sit within about\n 1.06:1 of each other in relative luminance — for a reader who cannot separate\n hue, two neighbours merge into one arc and the chart reads as having fewer slices\n than it has. A gap is a shape, and it survives greyscale, printing and a\n monochrome display. -->\n @for (slice of slices(); track $index) {\n <!-- A hidden slice draws nothing at all; the index stays the slice's own, which is\n what the tooltip looks it up by. -->\n @if (!slice.hidden) {\n <path\n class=\"wr-donut-chart__slice\"\n [attr.d]=\"slice.path\"\n [attr.fill]=\"slice.color\"\n stroke-width=\"1\"\n stroke-linejoin=\"round\"\n (mouseenter)=\"tip.enter($index)\"\n (mouseleave)=\"tip.leave($event)\"\n />\n }\n }\n <!-- A sliver's wider hover target in a pie, filled with nothing: see `hits`, which is\n empty for the ring and with the tooltip off. Last, so it wins the pointer over the\n slices it reaches into; `fill`, so the unpainted stroke is not hit-tested and the\n edges stay where `hits` put them. -->\n @for (hit of hits(); track hit.index) {\n <path\n class=\"wr-donut-chart__hit\"\n [attr.d]=\"hit.path\"\n fill=\"none\"\n pointer-events=\"fill\"\n (mouseenter)=\"tip.enter(hit.index)\"\n (mouseleave)=\"tip.leave($event)\"\n />\n }\n </svg>\n <!-- Never with `pie`: a pie has no hole to print in. -->\n @if (showCenter()) {\n <div class=\"wr-donut-chart__center\">\n @if (centerValue()) {\n <div class=\"wr-donut-chart__center-value\">{{ centerValue() }}</div>\n }\n @if (centerLabel()) {\n <div class=\"wr-donut-chart__center-label\">{{ centerLabel() }}</div>\n }\n </div>\n }\n</div>\n\n@if (showLegend() && slices().length > 0) {\n <!-- The key is `aria-hidden`: the row's text is its name, and the dot carries no word\n of its own. -->\n <ul\n wr-chart-legend\n class=\"wr-donut-chart__legend\"\n [items]=\"legendItems()\"\n [toggleable]=\"toggleableLegend()\"\n [(hiddenSeries)]=\"hiddenSegments\"\n ></ul>\n}\n"],"mappings":";;;;;;;;;;;;;;AAuBA,SAAS,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AA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,gBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,GAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,sBAAA;EAAA,CAAA;EAAA,aAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,aAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,SAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,aAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,KAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,OAAK,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
@@ -194,7 +194,7 @@ var WrFunnelChart = class WrFunnelChart {
194
194
  }
195
195
  static ɵfac = i0.ɵɵngDeclareFactory({
196
196
  minVersion: "12.0.0",
197
- version: "22.2.5",
197
+ version: "22.2.6",
198
198
  ngImport: i0,
199
199
  type: WrFunnelChart,
200
200
  deps: [],
@@ -202,7 +202,7 @@ var WrFunnelChart = class WrFunnelChart {
202
202
  });
203
203
  static ɵcmp = i0.ɵɵngDeclareComponent({
204
204
  minVersion: "17.0.0",
205
- version: "22.2.5",
205
+ version: "22.2.6",
206
206
  type: WrFunnelChart,
207
207
  isStandalone: true,
208
208
  selector: "wr-funnel-chart",
@@ -305,7 +305,7 @@ var WrFunnelChart = class WrFunnelChart {
305
305
  };
306
306
  i0.ɵɵngDeclareClassMetadata({
307
307
  minVersion: "12.0.0",
308
- version: "22.2.5",
308
+ version: "22.2.6",
309
309
  ngImport: i0,
310
310
  type: WrFunnelChart,
311
311
  decorators: [{
@@ -89,7 +89,7 @@ var WrGauge = class WrGauge {
89
89
  });
90
90
  static ɵfac = i0.ɵɵngDeclareFactory({
91
91
  minVersion: "12.0.0",
92
- version: "22.2.5",
92
+ version: "22.2.6",
93
93
  ngImport: i0,
94
94
  type: WrGauge,
95
95
  deps: [],
@@ -97,7 +97,7 @@ var WrGauge = class WrGauge {
97
97
  });
98
98
  static ɵcmp = i0.ɵɵngDeclareComponent({
99
99
  minVersion: "17.0.0",
100
- version: "22.2.5",
100
+ version: "22.2.6",
101
101
  type: WrGauge,
102
102
  isStandalone: true,
103
103
  selector: "wr-gauge",
@@ -202,7 +202,7 @@ var WrGauge = class WrGauge {
202
202
  };
203
203
  i0.ɵɵngDeclareClassMetadata({
204
204
  minVersion: "12.0.0",
205
- version: "22.2.5",
205
+ version: "22.2.6",
206
206
  ngImport: i0,
207
207
  type: WrGauge,
208
208
  decorators: [{
@@ -233,7 +233,7 @@ var WrHeatmapChart = class WrHeatmapChart {
233
233
  }
234
234
  static ɵfac = i0.ɵɵngDeclareFactory({
235
235
  minVersion: "12.0.0",
236
- version: "22.2.5",
236
+ version: "22.2.6",
237
237
  ngImport: i0,
238
238
  type: WrHeatmapChart,
239
239
  deps: [],
@@ -241,7 +241,7 @@ var WrHeatmapChart = class WrHeatmapChart {
241
241
  });
242
242
  static ɵcmp = i0.ɵɵngDeclareComponent({
243
243
  minVersion: "17.0.0",
244
- version: "22.2.5",
244
+ version: "22.2.6",
245
245
  type: WrHeatmapChart,
246
246
  isStandalone: true,
247
247
  selector: "wr-heatmap-chart",
@@ -375,7 +375,7 @@ var WrHeatmapChart = class WrHeatmapChart {
375
375
  };
376
376
  i0.ɵɵngDeclareClassMetadata({
377
377
  minVersion: "12.0.0",
378
- version: "22.2.5",
378
+ version: "22.2.6",
379
379
  ngImport: i0,
380
380
  type: WrHeatmapChart,
381
381
  decorators: [{
@@ -1,4 +1,4 @@
1
- import { ComponentHarness, HarnessPredicate } from "@angular/cdk/testing";
1
+ import { ComponentHarness, HarnessPredicate, parallel } from "@angular/cdk/testing";
2
2
  import { WrChartLegendHarness } from "ngwr/charts/chart-legend/testing";
3
3
  /**
4
4
  * @license
@@ -44,7 +44,8 @@ var WrLineChartHarness = class WrLineChartHarness extends ComponentHarness {
44
44
  return (await this.locatorForAll(".wr-line-chart__line")()).length;
45
45
  }
46
46
  async getDotCount() {
47
- return (await this.locatorForAll(".wr-line-chart__dot")()).length;
47
+ const paths = await this.locatorForAll(".wr-line-chart__dot")();
48
+ return (await parallel(() => paths.map((path) => path.getAttribute("d")))).reduce((count, d) => count + (d?.match(/M/g)?.length ?? 0), 0);
48
49
  }
49
50
  async hasArea() {
50
51
  return (await this.host()).hasClass("wr-line-chart--area");