ngwr 15.0.1 → 15.2.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 (420) hide show
  1. package/anchor/styles/_index.scss +13 -2
  2. package/bits/aurora/styles/_rules.scss +11 -0
  3. package/bits/dot-grid/dot-grid.scss +1 -0
  4. package/bits/dot-grid/styles/_index.scss +8 -0
  5. package/bits/dot-grid/styles/_rules.scss +54 -0
  6. package/bits/iridescence/iridescence.scss +1 -0
  7. package/bits/iridescence/styles/_index.scss +8 -0
  8. package/bits/iridescence/styles/_rules.scss +72 -0
  9. package/bits/marquee/styles/_rules.scss +7 -3
  10. package/bits/ripple-grid/ripple-grid.scss +1 -0
  11. package/bits/ripple-grid/styles/_index.scss +8 -0
  12. package/bits/ripple-grid/styles/_rules.scss +63 -0
  13. package/bits/spotlight-card/styles/_rules.scss +7 -4
  14. package/bits/star-border/styles/_rules.scss +5 -2
  15. package/bits/threads/styles/_index.scss +8 -0
  16. package/bits/threads/styles/_rules.scss +76 -0
  17. package/bits/threads/threads.scss +1 -0
  18. package/bits/waves/styles/_rules.scss +8 -1
  19. package/charts/bar-chart/styles/_index.scss +607 -7
  20. package/charts/boxplot-chart/styles/_index.scss +297 -0
  21. package/charts/bullet-chart/styles/_index.scss +268 -0
  22. package/charts/calendar-heatmap/styles/_index.scss +25 -3
  23. package/charts/candlestick-chart/styles/_index.scss +307 -0
  24. package/charts/chart-legend/styles/_index.scss +143 -0
  25. package/charts/core/styles/_index.scss +30 -0
  26. package/charts/donut-chart/styles/_index.scss +39 -3
  27. package/charts/funnel-chart/styles/_index.scss +237 -0
  28. package/charts/gauge/styles/_index.scss +4 -2
  29. package/charts/heatmap-chart/styles/_index.scss +329 -0
  30. package/charts/line-chart/styles/_index.scss +141 -8
  31. package/charts/meter-group/styles/_index.scss +44 -13
  32. package/charts/radar-chart/styles/_index.scss +206 -0
  33. package/charts/scatter-chart/styles/_index.scss +245 -0
  34. package/charts/sparkline/styles/_index.scss +10 -1
  35. package/charts/treemap-chart/styles/_index.scss +215 -0
  36. package/charts/waterfall-chart/styles/_index.scss +321 -0
  37. package/collapse/styles/_index.scss +6 -1
  38. package/fesm2022/ngwr-affix.mjs +3 -3
  39. package/fesm2022/ngwr-alert.mjs +3 -3
  40. package/fesm2022/ngwr-anchor.mjs +3 -3
  41. package/fesm2022/ngwr-avatar.mjs +3 -3
  42. package/fesm2022/ngwr-back-top.mjs +3 -3
  43. package/fesm2022/ngwr-badge.mjs +6 -6
  44. package/fesm2022/ngwr-bits-aurora.mjs +30 -38
  45. package/fesm2022/ngwr-bits-aurora.mjs.map +1 -1
  46. package/fesm2022/ngwr-bits-blur-text.mjs +3 -3
  47. package/fesm2022/ngwr-bits-border-glow-testing.mjs.map +1 -1
  48. package/fesm2022/ngwr-bits-border-glow.mjs +11 -5
  49. package/fesm2022/ngwr-bits-border-glow.mjs.map +1 -1
  50. package/fesm2022/ngwr-bits-circular-text.mjs +3 -3
  51. package/fesm2022/ngwr-bits-click-spark.mjs +3 -3
  52. package/fesm2022/ngwr-bits-confetti.mjs +3 -3
  53. package/fesm2022/ngwr-bits-decrypt-text.mjs +3 -3
  54. package/fesm2022/ngwr-bits-dot-grid-testing.mjs +40 -0
  55. package/fesm2022/ngwr-bits-dot-grid-testing.mjs.map +1 -0
  56. package/fesm2022/ngwr-bits-dot-grid.mjs +482 -0
  57. package/fesm2022/ngwr-bits-dot-grid.mjs.map +1 -0
  58. package/fesm2022/ngwr-bits-falling-text.mjs +3 -3
  59. package/fesm2022/ngwr-bits-fuzzy-text.mjs +3 -3
  60. package/fesm2022/ngwr-bits-glitch-text.mjs +3 -3
  61. package/fesm2022/ngwr-bits-gradient-text.mjs +3 -3
  62. package/fesm2022/ngwr-bits-iridescence-testing.mjs +31 -0
  63. package/fesm2022/ngwr-bits-iridescence-testing.mjs.map +1 -0
  64. package/fesm2022/ngwr-bits-iridescence.mjs +591 -0
  65. package/fesm2022/ngwr-bits-iridescence.mjs.map +1 -0
  66. package/fesm2022/ngwr-bits-marquee-testing.mjs +1 -1
  67. package/fesm2022/ngwr-bits-marquee-testing.mjs.map +1 -1
  68. package/fesm2022/ngwr-bits-marquee.mjs +7 -7
  69. package/fesm2022/ngwr-bits-marquee.mjs.map +1 -1
  70. package/fesm2022/ngwr-bits-ripple-grid-testing.mjs +40 -0
  71. package/fesm2022/ngwr-bits-ripple-grid-testing.mjs.map +1 -0
  72. package/fesm2022/ngwr-bits-ripple-grid.mjs +805 -0
  73. package/fesm2022/ngwr-bits-ripple-grid.mjs.map +1 -0
  74. package/fesm2022/ngwr-bits-rotating-text.mjs +3 -3
  75. package/fesm2022/ngwr-bits-shiny-text.mjs +6 -6
  76. package/fesm2022/ngwr-bits-splash-cursor.mjs +3 -3
  77. package/fesm2022/ngwr-bits-split-text.mjs +3 -3
  78. package/fesm2022/ngwr-bits-spotlight-card-testing.mjs +1 -1
  79. package/fesm2022/ngwr-bits-spotlight-card-testing.mjs.map +1 -1
  80. package/fesm2022/ngwr-bits-spotlight-card.mjs +10 -10
  81. package/fesm2022/ngwr-bits-spotlight-card.mjs.map +1 -1
  82. package/fesm2022/ngwr-bits-star-border-testing.mjs +1 -1
  83. package/fesm2022/ngwr-bits-star-border-testing.mjs.map +1 -1
  84. package/fesm2022/ngwr-bits-star-border.mjs +7 -7
  85. package/fesm2022/ngwr-bits-star-border.mjs.map +1 -1
  86. package/fesm2022/ngwr-bits-threads-testing.mjs +41 -0
  87. package/fesm2022/ngwr-bits-threads-testing.mjs.map +1 -0
  88. package/fesm2022/ngwr-bits-threads.mjs +482 -0
  89. package/fesm2022/ngwr-bits-threads.mjs.map +1 -0
  90. package/fesm2022/ngwr-bits-tilt-card.mjs +6 -6
  91. package/fesm2022/ngwr-bits-typewriter.mjs +3 -3
  92. package/fesm2022/ngwr-bits-waves-testing.mjs.map +1 -1
  93. package/fesm2022/ngwr-bits-waves.mjs +60 -41
  94. package/fesm2022/ngwr-bits-waves.mjs.map +1 -1
  95. package/fesm2022/ngwr-breadcrumbs.mjs +8 -8
  96. package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
  97. package/fesm2022/ngwr-burger.mjs +3 -3
  98. package/fesm2022/ngwr-button.mjs +6 -6
  99. package/fesm2022/ngwr-calendar.mjs +3 -3
  100. package/fesm2022/ngwr-card.mjs +9 -9
  101. package/fesm2022/ngwr-carousel.mjs +6 -6
  102. package/fesm2022/ngwr-cascader.mjs +5 -5
  103. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  104. package/fesm2022/ngwr-charts-bar-chart-testing.mjs +127 -3
  105. package/fesm2022/ngwr-charts-bar-chart-testing.mjs.map +1 -1
  106. package/fesm2022/ngwr-charts-bar-chart.mjs +683 -49
  107. package/fesm2022/ngwr-charts-bar-chart.mjs.map +1 -1
  108. package/fesm2022/ngwr-charts-boxplot-chart-testing.mjs +161 -0
  109. package/fesm2022/ngwr-charts-boxplot-chart-testing.mjs.map +1 -0
  110. package/fesm2022/ngwr-charts-boxplot-chart.mjs +517 -0
  111. package/fesm2022/ngwr-charts-boxplot-chart.mjs.map +1 -0
  112. package/fesm2022/ngwr-charts-bullet-chart-testing.mjs +68 -0
  113. package/fesm2022/ngwr-charts-bullet-chart-testing.mjs.map +1 -0
  114. package/fesm2022/ngwr-charts-bullet-chart.mjs +459 -0
  115. package/fesm2022/ngwr-charts-bullet-chart.mjs.map +1 -0
  116. package/fesm2022/ngwr-charts-calendar-heatmap-testing.mjs +27 -0
  117. package/fesm2022/ngwr-charts-calendar-heatmap-testing.mjs.map +1 -1
  118. package/fesm2022/ngwr-charts-calendar-heatmap.mjs +96 -17
  119. package/fesm2022/ngwr-charts-calendar-heatmap.mjs.map +1 -1
  120. package/fesm2022/ngwr-charts-candlestick-chart-testing.mjs +107 -0
  121. package/fesm2022/ngwr-charts-candlestick-chart-testing.mjs.map +1 -0
  122. package/fesm2022/ngwr-charts-candlestick-chart.mjs +508 -0
  123. package/fesm2022/ngwr-charts-candlestick-chart.mjs.map +1 -0
  124. package/fesm2022/ngwr-charts-chart-legend-testing.mjs +126 -0
  125. package/fesm2022/ngwr-charts-chart-legend-testing.mjs.map +1 -0
  126. package/fesm2022/ngwr-charts-chart-legend.mjs +251 -0
  127. package/fesm2022/ngwr-charts-chart-legend.mjs.map +1 -0
  128. package/fesm2022/ngwr-charts-core.mjs +383 -0
  129. package/fesm2022/ngwr-charts-core.mjs.map +1 -0
  130. package/fesm2022/ngwr-charts-donut-chart-testing.mjs +10 -1
  131. package/fesm2022/ngwr-charts-donut-chart-testing.mjs.map +1 -1
  132. package/fesm2022/ngwr-charts-donut-chart.mjs +187 -31
  133. package/fesm2022/ngwr-charts-donut-chart.mjs.map +1 -1
  134. package/fesm2022/ngwr-charts-funnel-chart-testing.mjs +100 -0
  135. package/fesm2022/ngwr-charts-funnel-chart-testing.mjs.map +1 -0
  136. package/fesm2022/ngwr-charts-funnel-chart.mjs +415 -0
  137. package/fesm2022/ngwr-charts-funnel-chart.mjs.map +1 -0
  138. package/fesm2022/ngwr-charts-gauge-testing.mjs +9 -3
  139. package/fesm2022/ngwr-charts-gauge-testing.mjs.map +1 -1
  140. package/fesm2022/ngwr-charts-gauge.mjs +9 -15
  141. package/fesm2022/ngwr-charts-gauge.mjs.map +1 -1
  142. package/fesm2022/ngwr-charts-heatmap-chart-testing.mjs +120 -0
  143. package/fesm2022/ngwr-charts-heatmap-chart-testing.mjs.map +1 -0
  144. package/fesm2022/ngwr-charts-heatmap-chart.mjs +519 -0
  145. package/fesm2022/ngwr-charts-heatmap-chart.mjs.map +1 -0
  146. package/fesm2022/ngwr-charts-line-chart-testing.mjs +43 -1
  147. package/fesm2022/ngwr-charts-line-chart-testing.mjs.map +1 -1
  148. package/fesm2022/ngwr-charts-line-chart.mjs +436 -122
  149. package/fesm2022/ngwr-charts-line-chart.mjs.map +1 -1
  150. package/fesm2022/ngwr-charts-meter-group-testing.mjs +14 -2
  151. package/fesm2022/ngwr-charts-meter-group-testing.mjs.map +1 -1
  152. package/fesm2022/ngwr-charts-meter-group.mjs +101 -32
  153. package/fesm2022/ngwr-charts-meter-group.mjs.map +1 -1
  154. package/fesm2022/ngwr-charts-radar-chart-testing.mjs +98 -0
  155. package/fesm2022/ngwr-charts-radar-chart-testing.mjs.map +1 -0
  156. package/fesm2022/ngwr-charts-radar-chart.mjs +720 -0
  157. package/fesm2022/ngwr-charts-radar-chart.mjs.map +1 -0
  158. package/fesm2022/ngwr-charts-scatter-chart-testing.mjs +132 -0
  159. package/fesm2022/ngwr-charts-scatter-chart-testing.mjs.map +1 -0
  160. package/fesm2022/ngwr-charts-scatter-chart.mjs +545 -0
  161. package/fesm2022/ngwr-charts-scatter-chart.mjs.map +1 -0
  162. package/fesm2022/ngwr-charts-sparkline-testing.mjs.map +1 -1
  163. package/fesm2022/ngwr-charts-sparkline.mjs +14 -16
  164. package/fesm2022/ngwr-charts-sparkline.mjs.map +1 -1
  165. package/fesm2022/ngwr-charts-treemap-chart-testing.mjs +103 -0
  166. package/fesm2022/ngwr-charts-treemap-chart-testing.mjs.map +1 -0
  167. package/fesm2022/ngwr-charts-treemap-chart.mjs +535 -0
  168. package/fesm2022/ngwr-charts-treemap-chart.mjs.map +1 -0
  169. package/fesm2022/ngwr-charts-waterfall-chart-testing.mjs +131 -0
  170. package/fesm2022/ngwr-charts-waterfall-chart-testing.mjs.map +1 -0
  171. package/fesm2022/ngwr-charts-waterfall-chart.mjs +462 -0
  172. package/fesm2022/ngwr-charts-waterfall-chart.mjs.map +1 -0
  173. package/fesm2022/ngwr-checkbox.mjs +6 -6
  174. package/fesm2022/ngwr-clipboard.mjs +3 -3
  175. package/fesm2022/ngwr-collapse.mjs +9 -9
  176. package/fesm2022/ngwr-color-picker.mjs +6 -6
  177. package/fesm2022/ngwr-command-palette.mjs +3 -3
  178. package/fesm2022/ngwr-compare.mjs +3 -3
  179. package/fesm2022/ngwr-context-menu.mjs +12 -12
  180. package/fesm2022/ngwr-cookie.mjs +3 -3
  181. package/fesm2022/ngwr-counter.mjs +6 -6
  182. package/fesm2022/ngwr-date-picker.mjs +21 -21
  183. package/fesm2022/ngwr-date.mjs +6 -6
  184. package/fesm2022/ngwr-density.mjs +6 -6
  185. package/fesm2022/ngwr-descriptions.mjs +6 -6
  186. package/fesm2022/ngwr-dialog.mjs +15 -15
  187. package/fesm2022/ngwr-directives.mjs +12 -12
  188. package/fesm2022/ngwr-divider.mjs +3 -3
  189. package/fesm2022/ngwr-drawer.mjs +18 -18
  190. package/fesm2022/ngwr-dropdown.mjs +9 -9
  191. package/fesm2022/ngwr-editor.mjs +3 -3
  192. package/fesm2022/ngwr-empty.mjs +3 -3
  193. package/fesm2022/ngwr-event-calendar.mjs +6 -6
  194. package/fesm2022/ngwr-file-upload.mjs +3 -3
  195. package/fesm2022/ngwr-form.mjs +9 -9
  196. package/fesm2022/ngwr-graph.mjs +6 -6
  197. package/fesm2022/ngwr-hotkey.mjs +6 -6
  198. package/fesm2022/ngwr-i18n-ar.mjs +90 -4
  199. package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
  200. package/fesm2022/ngwr-i18n-cs.mjs +90 -4
  201. package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
  202. package/fesm2022/ngwr-i18n-de.mjs +90 -4
  203. package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
  204. package/fesm2022/ngwr-i18n-en.mjs +90 -4
  205. package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
  206. package/fesm2022/ngwr-i18n-es.mjs +90 -4
  207. package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
  208. package/fesm2022/ngwr-i18n-fr.mjs +90 -4
  209. package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
  210. package/fesm2022/ngwr-i18n-he.mjs +90 -4
  211. package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
  212. package/fesm2022/ngwr-i18n-hi.mjs +90 -4
  213. package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
  214. package/fesm2022/ngwr-i18n-id.mjs +90 -4
  215. package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
  216. package/fesm2022/ngwr-i18n-it.mjs +90 -4
  217. package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
  218. package/fesm2022/ngwr-i18n-ja.mjs +90 -4
  219. package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
  220. package/fesm2022/ngwr-i18n-ko.mjs +90 -4
  221. package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
  222. package/fesm2022/ngwr-i18n-nl.mjs +90 -4
  223. package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
  224. package/fesm2022/ngwr-i18n-pl.mjs +90 -4
  225. package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
  226. package/fesm2022/ngwr-i18n-pt.mjs +90 -4
  227. package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
  228. package/fesm2022/ngwr-i18n-ru.mjs +90 -4
  229. package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
  230. package/fesm2022/ngwr-i18n-sv.mjs +90 -4
  231. package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
  232. package/fesm2022/ngwr-i18n-tr.mjs +90 -4
  233. package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
  234. package/fesm2022/ngwr-i18n-uk.mjs +90 -4
  235. package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
  236. package/fesm2022/ngwr-i18n-vi.mjs +90 -4
  237. package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
  238. package/fesm2022/ngwr-i18n-zh-tw.mjs +90 -4
  239. package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
  240. package/fesm2022/ngwr-i18n-zh.mjs +90 -4
  241. package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
  242. package/fesm2022/ngwr-i18n.mjs +9 -9
  243. package/fesm2022/ngwr-icon.mjs +6 -6
  244. package/fesm2022/ngwr-image-cropper.mjs +3 -3
  245. package/fesm2022/ngwr-input-number.mjs +3 -3
  246. package/fesm2022/ngwr-input-otp.mjs +3 -3
  247. package/fesm2022/ngwr-input.mjs +15 -15
  248. package/fesm2022/ngwr-keyboard.mjs +3 -3
  249. package/fesm2022/ngwr-knob.mjs +3 -3
  250. package/fesm2022/ngwr-layout.mjs +15 -15
  251. package/fesm2022/ngwr-lightbox.mjs +5 -5
  252. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  253. package/fesm2022/ngwr-list.mjs +8 -8
  254. package/fesm2022/ngwr-list.mjs.map +1 -1
  255. package/fesm2022/ngwr-loading-bar.mjs +6 -6
  256. package/fesm2022/ngwr-mention.mjs +6 -6
  257. package/fesm2022/ngwr-meta.mjs +6 -6
  258. package/fesm2022/ngwr-overlay.mjs +6 -6
  259. package/fesm2022/ngwr-page-header.mjs +3 -3
  260. package/fesm2022/ngwr-pagination.mjs +3 -3
  261. package/fesm2022/ngwr-pipes.mjs +21 -21
  262. package/fesm2022/ngwr-platform.mjs +6 -6
  263. package/fesm2022/ngwr-popconfirm.mjs +6 -6
  264. package/fesm2022/ngwr-popover.mjs +43 -20
  265. package/fesm2022/ngwr-popover.mjs.map +1 -1
  266. package/fesm2022/ngwr-progress.mjs +3 -3
  267. package/fesm2022/ngwr-pull-to-refresh.mjs +3 -3
  268. package/fesm2022/ngwr-qr.mjs +4 -3
  269. package/fesm2022/ngwr-qr.mjs.map +1 -1
  270. package/fesm2022/ngwr-radio.mjs +6 -6
  271. package/fesm2022/ngwr-rating.mjs +3 -3
  272. package/fesm2022/ngwr-result.mjs +12 -12
  273. package/fesm2022/ngwr-schema-form.mjs +3 -3
  274. package/fesm2022/ngwr-scroll.mjs +3 -3
  275. package/fesm2022/ngwr-segmented.mjs +3 -3
  276. package/fesm2022/ngwr-select.mjs +12 -12
  277. package/fesm2022/ngwr-sidebar.mjs +3 -3
  278. package/fesm2022/ngwr-skeleton.mjs +3 -3
  279. package/fesm2022/ngwr-slider.mjs +3 -3
  280. package/fesm2022/ngwr-sortable-list.mjs +11 -11
  281. package/fesm2022/ngwr-sortable-list.mjs.map +1 -1
  282. package/fesm2022/ngwr-speed-dial.mjs +3 -3
  283. package/fesm2022/ngwr-spinner.mjs +3 -3
  284. package/fesm2022/ngwr-splitter.mjs +3 -3
  285. package/fesm2022/ngwr-statistic.mjs +9 -9
  286. package/fesm2022/ngwr-stepper.mjs +6 -6
  287. package/fesm2022/ngwr-storage.mjs +3 -3
  288. package/fesm2022/ngwr-switch.mjs +3 -3
  289. package/fesm2022/ngwr-table.mjs +18 -18
  290. package/fesm2022/ngwr-tabs-router.mjs +3 -3
  291. package/fesm2022/ngwr-tabs.mjs +6 -6
  292. package/fesm2022/ngwr-textarea.mjs +3 -3
  293. package/fesm2022/ngwr-theme.mjs +3 -3
  294. package/fesm2022/ngwr-timeline.mjs +6 -6
  295. package/fesm2022/ngwr-toast-testing.mjs +2 -1
  296. package/fesm2022/ngwr-toast-testing.mjs.map +1 -1
  297. package/fesm2022/ngwr-toast.mjs +34 -15
  298. package/fesm2022/ngwr-toast.mjs.map +1 -1
  299. package/fesm2022/ngwr-toolbar.mjs +3 -3
  300. package/fesm2022/ngwr-tour.mjs +6 -6
  301. package/fesm2022/ngwr-transfer.mjs +3 -3
  302. package/fesm2022/ngwr-tree.mjs +3 -3
  303. package/fesm2022/ngwr-typography.mjs +3 -3
  304. package/fesm2022/ngwr-utils.mjs +31 -1
  305. package/fesm2022/ngwr-utils.mjs.map +1 -1
  306. package/fesm2022/ngwr-version.mjs +1 -1
  307. package/fesm2022/ngwr-version.mjs.map +1 -1
  308. package/fesm2022/ngwr-virtual-scroll.mjs +3 -3
  309. package/fesm2022/ngwr-window-testing.mjs +61 -5
  310. package/fesm2022/ngwr-window-testing.mjs.map +1 -1
  311. package/fesm2022/ngwr-window.mjs +1538 -895
  312. package/fesm2022/ngwr-window.mjs.map +1 -1
  313. package/fesm2022/ngwr.mjs.map +1 -1
  314. package/i18n/ar.json +84 -4
  315. package/i18n/cs.json +84 -4
  316. package/i18n/de.json +84 -4
  317. package/i18n/en.json +84 -4
  318. package/i18n/es.json +84 -4
  319. package/i18n/fr.json +84 -4
  320. package/i18n/he.json +84 -4
  321. package/i18n/hi.json +84 -4
  322. package/i18n/id.json +84 -4
  323. package/i18n/it.json +84 -4
  324. package/i18n/ja.json +84 -4
  325. package/i18n/ko.json +84 -4
  326. package/i18n/nl.json +84 -4
  327. package/i18n/pl.json +84 -4
  328. package/i18n/pt.json +84 -4
  329. package/i18n/ru.json +84 -4
  330. package/i18n/sv.json +84 -4
  331. package/i18n/tr.json +84 -4
  332. package/i18n/uk.json +84 -4
  333. package/i18n/vi.json +84 -4
  334. package/i18n/zh-TW.json +84 -4
  335. package/i18n/zh.json +84 -4
  336. package/llms-full.txt +266 -9
  337. package/llms.txt +30 -7
  338. package/mcp/api.js +69 -1
  339. package/mcp/catalog.js +10 -1
  340. package/mcp/server.js +15 -1
  341. package/mcp/tools.js +122 -26
  342. package/package.json +132 -1
  343. package/popover/styles/_index.scss +75 -7
  344. package/schematics/component-style/index.js +3 -0
  345. package/schematics/migrations/v15/index.js +3 -26
  346. package/schematics/ng-add/index.js +2 -2
  347. package/schematics/use/symbol-map.json +14 -0
  348. package/schematics/utility/global-styles.js +19 -4
  349. package/schematics/utility/v15-moves.js +55 -0
  350. package/skills/ngwr/SKILL.md +8 -2
  351. package/skills/ngwr/references/catalog.md +28 -0
  352. package/skills/ngwr/references/setup.md +5 -4
  353. package/theme/styles/_focus.scss +8 -0
  354. package/toast/styles/_index.scss +103 -12
  355. package/types/ngwr-bits-aurora.d.ts +11 -0
  356. package/types/ngwr-bits-border-glow-testing.d.ts +5 -6
  357. package/types/ngwr-bits-border-glow.d.ts +5 -1
  358. package/types/ngwr-bits-dot-grid-testing.d.ts +92 -0
  359. package/types/ngwr-bits-dot-grid.d.ts +158 -0
  360. package/types/ngwr-bits-iridescence-testing.d.ts +85 -0
  361. package/types/ngwr-bits-iridescence.d.ts +244 -0
  362. package/types/ngwr-bits-ripple-grid-testing.d.ts +96 -0
  363. package/types/ngwr-bits-ripple-grid.d.ts +294 -0
  364. package/types/ngwr-bits-splash-cursor.d.ts +0 -1
  365. package/types/ngwr-bits-spotlight-card-testing.d.ts +3 -1
  366. package/types/ngwr-bits-star-border-testing.d.ts +7 -7
  367. package/types/ngwr-bits-threads-testing.d.ts +97 -0
  368. package/types/ngwr-bits-threads.d.ts +216 -0
  369. package/types/ngwr-bits-waves-testing.d.ts +1 -1
  370. package/types/ngwr-bits-waves.d.ts +20 -3
  371. package/types/ngwr-charts-bar-chart-testing.d.ts +193 -14
  372. package/types/ngwr-charts-bar-chart.d.ts +546 -38
  373. package/types/ngwr-charts-boxplot-chart-testing.d.ts +165 -0
  374. package/types/ngwr-charts-boxplot-chart.d.ts +308 -0
  375. package/types/ngwr-charts-bullet-chart-testing.d.ts +99 -0
  376. package/types/ngwr-charts-bullet-chart.d.ts +262 -0
  377. package/types/ngwr-charts-calendar-heatmap-testing.d.ts +32 -1
  378. package/types/ngwr-charts-calendar-heatmap.d.ts +55 -6
  379. package/types/ngwr-charts-candlestick-chart-testing.d.ts +135 -0
  380. package/types/ngwr-charts-candlestick-chart.d.ts +361 -0
  381. package/types/ngwr-charts-chart-legend-testing.d.ts +84 -0
  382. package/types/ngwr-charts-chart-legend.d.ts +178 -0
  383. package/types/ngwr-charts-core.d.ts +391 -0
  384. package/types/ngwr-charts-donut-chart-testing.d.ts +28 -5
  385. package/types/ngwr-charts-donut-chart.d.ts +124 -12
  386. package/types/ngwr-charts-funnel-chart-testing.d.ts +130 -0
  387. package/types/ngwr-charts-funnel-chart.d.ts +296 -0
  388. package/types/ngwr-charts-gauge-testing.d.ts +5 -0
  389. package/types/ngwr-charts-gauge.d.ts +6 -4
  390. package/types/ngwr-charts-heatmap-chart-testing.d.ts +148 -0
  391. package/types/ngwr-charts-heatmap-chart.d.ts +359 -0
  392. package/types/ngwr-charts-line-chart-testing.d.ts +72 -11
  393. package/types/ngwr-charts-line-chart.d.ts +291 -67
  394. package/types/ngwr-charts-meter-group-testing.d.ts +16 -2
  395. package/types/ngwr-charts-meter-group.d.ts +71 -11
  396. package/types/ngwr-charts-radar-chart-testing.d.ts +162 -0
  397. package/types/ngwr-charts-radar-chart.d.ts +461 -0
  398. package/types/ngwr-charts-scatter-chart-testing.d.ts +147 -0
  399. package/types/ngwr-charts-scatter-chart.d.ts +396 -0
  400. package/types/ngwr-charts-sparkline-testing.d.ts +4 -1
  401. package/types/ngwr-charts-sparkline.d.ts +8 -6
  402. package/types/ngwr-charts-treemap-chart-testing.d.ts +131 -0
  403. package/types/ngwr-charts-treemap-chart.d.ts +295 -0
  404. package/types/ngwr-charts-waterfall-chart-testing.d.ts +149 -0
  405. package/types/ngwr-charts-waterfall-chart.d.ts +338 -0
  406. package/types/ngwr-color-picker.d.ts +0 -21
  407. package/types/ngwr-dropdown.d.ts +0 -52
  408. package/types/ngwr-editor.d.ts +2 -84
  409. package/types/ngwr-i18n.d.ts +0 -15
  410. package/types/ngwr-mention.d.ts +0 -13
  411. package/types/ngwr-popconfirm.d.ts +0 -33
  412. package/types/ngwr-popover.d.ts +29 -53
  413. package/types/ngwr-toast-testing.d.ts +6 -1
  414. package/types/ngwr-tour.d.ts +0 -2
  415. package/types/ngwr-utils.d.ts +49 -7
  416. package/types/ngwr-version.d.ts +1 -1
  417. package/types/ngwr-window-testing.d.ts +65 -7
  418. package/types/ngwr-window.d.ts +831 -207
  419. package/types/ngwr.d.ts +1 -0
  420. package/window/styles/_index.scss +528 -82
@@ -0,0 +1,131 @@
1
+ import { ComponentHarness, HarnessPredicate } from "@angular/cdk/testing";
2
+ /**
3
+ * @license
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
7
+ */
8
+ const KINDS = [
9
+ "increase",
10
+ "decrease",
11
+ "flat",
12
+ "total"
13
+ ];
14
+ function styleNumber(style, name) {
15
+ const match = new RegExp(`(?:^|;)\\s*${name}\\s*:\\s*([^;]+)`).exec(style ?? "");
16
+ const value = match ? Number.parseFloat(match[1]) : NaN;
17
+ return Number.isFinite(value) ? value : null;
18
+ }
19
+ async function numberAttribute(element, name, method) {
20
+ const raw = await element.getAttribute(name);
21
+ const value = raw === null ? NaN : Number.parseFloat(raw);
22
+ if (!Number.isFinite(value)) throw new Error(`WrWaterfallChartHarness.${method}(): a step carries ${name}="${raw ?? ""}", which the component writes as a finite number on every step it draws.`);
23
+ return value;
24
+ }
25
+ var StepHarness = class StepHarness extends ComponentHarness {
26
+ static hostSelector = ".wr-waterfall-chart__step";
27
+ async read(label) {
28
+ const host = await this.host();
29
+ const value = await this.locatorForOptional(".wr-waterfall-chart__value")();
30
+ const connector = await this.locatorForOptional(".wr-waterfall-chart__connector")();
31
+ const style = await host.getAttribute("style");
32
+ const bottom = styleNumber(style, "--wr-waterfall-chart-lo");
33
+ const top = styleNumber(style, "--wr-waterfall-chart-hi");
34
+ if (bottom === null || top === null) throw new Error(`WrWaterfallChartHarness.getSteps(): the step "${label}" carries no inline bar ends (style: "${style ?? ""}"). The component writes both on every step, a change of zero included, so their absence is the bug — reporting 0 would read as a bar on the frame.`);
35
+ return {
36
+ label,
37
+ kind: await StepHarness.kindOf(host, label),
38
+ name: await host.getAttribute("aria-label"),
39
+ value: value ? await value.text() : null,
40
+ start: await numberAttribute(host, "data-start", "getSteps"),
41
+ end: await numberAttribute(host, "data-end", "getSteps"),
42
+ bottomPercent: bottom,
43
+ topPercent: top,
44
+ connected: connector !== null
45
+ };
46
+ }
47
+ static async kindOf(host, label) {
48
+ for (const kind of KINDS) if (await host.hasClass(`wr-waterfall-chart__step--${kind}`)) return kind;
49
+ throw new Error(`WrWaterfallChartHarness.getSteps(): the step "${label}" carries no kind modifier. The component gives every step one of \`--increase\`, \`--decrease\`, \`--flat\` and \`--total\`, and the stylesheet paints the figure by it.`);
50
+ }
51
+ };
52
+ var TableRowHarness = class extends ComponentHarness {
53
+ static hostSelector = ".wr-chart-table tbody tr";
54
+ async read() {
55
+ const header = await this.locatorFor("th[scope=\"row\"]")();
56
+ const cells = await this.locatorForAll("td")();
57
+ return {
58
+ header: await header.text(),
59
+ cells: await Promise.all(cells.map((cell) => cell.text()))
60
+ };
61
+ }
62
+ };
63
+ var WrWaterfallChartHarness = class WrWaterfallChartHarness extends ComponentHarness {
64
+ static hostSelector = "wr-waterfall-chart";
65
+ static with(options = {}) {
66
+ return new HarnessPredicate(WrWaterfallChartHarness, options).addOption("ariaLabel", options.ariaLabel, (harness, label) => HarnessPredicate.stringMatches(harness.getAccessibleName(), label)).addOption("stepLabel", options.stepLabel, async (harness, label) => {
67
+ for (const step of await harness.getLabels()) if (await HarnessPredicate.stringMatches(step, label)) return true;
68
+ return false;
69
+ });
70
+ }
71
+ async getAccessibleName() {
72
+ return (await this.locatorFor(".wr-waterfall-chart__plot")()).getAttribute("aria-label");
73
+ }
74
+ async getStepCount() {
75
+ return (await this.locatorForAll(".wr-waterfall-chart__step")()).length;
76
+ }
77
+ async getLabels() {
78
+ const labels = await this.locatorForAll(".wr-waterfall-chart__label")();
79
+ return Promise.all(labels.map((label) => label.text()));
80
+ }
81
+ async getSteps() {
82
+ const steps = await this.locatorForAll(StepHarness)();
83
+ const labels = await this.getLabels();
84
+ if (labels.length !== steps.length) throw new Error(`WrWaterfallChartHarness.getSteps(): the chart draws ${steps.length} step(s) and ${labels.length} label(s). It renders one label per step, so the two lists line up or the template is broken.`);
85
+ return Promise.all(steps.map((step, i) => step.read(labels[i])));
86
+ }
87
+ async hasValues() {
88
+ return await this.locatorForOptional(".wr-waterfall-chart__value")() !== null;
89
+ }
90
+ async getConnectorCount() {
91
+ return (await this.locatorForAll(".wr-waterfall-chart__connector")()).length;
92
+ }
93
+ async hasGrid() {
94
+ return await this.locatorForOptional(".wr-waterfall-chart__grid-line")() !== null;
95
+ }
96
+ async getYTicks() {
97
+ const ticks = await this.locatorForAll(".wr-waterfall-chart__tick")();
98
+ return Promise.all(ticks.map((tick) => tick.text()));
99
+ }
100
+ async getZeroPercent() {
101
+ const style = await (await this.locatorFor(".wr-waterfall-chart__track")()).getAttribute("style");
102
+ const zero = styleNumber(style, "--wr-waterfall-chart-zero");
103
+ if (zero === null) throw new Error(`WrWaterfallChartHarness.getZeroPercent(): no inline zero on .wr-waterfall-chart__track (style: "${style ?? ""}"). The component writes one unconditionally, so its absence is the bug rather than a zero line on the frame.`);
104
+ return zero;
105
+ }
106
+ async hasDataTable() {
107
+ return await this.locatorForOptional(".wr-chart-table")() !== null;
108
+ }
109
+ async getTableColumns() {
110
+ await this.assertDataTable("getTableColumns");
111
+ const cells = await this.locatorForAll(".wr-chart-table thead tr > *")();
112
+ return Promise.all(cells.slice(1).map((cell) => cell.text()));
113
+ }
114
+ async getTableRows() {
115
+ await this.assertDataTable("getTableRows");
116
+ const rows = await this.locatorForAll(TableRowHarness)();
117
+ return Promise.all(rows.map((row) => row.read()));
118
+ }
119
+ async getPlotHeight() {
120
+ const style = await (await this.locatorFor(".wr-waterfall-chart__plot")()).getAttribute("style");
121
+ const match = /height:\s*([\d.]+)px/.exec(style ?? "");
122
+ if (!match) throw new Error(`WrWaterfallChartHarness.getPlotHeight(): no inline height on .wr-waterfall-chart__plot (style: "${style ?? ""}"). The component writes one unconditionally, so its absence is the bug rather than a zero.`);
123
+ return Number.parseFloat(match[1]);
124
+ }
125
+ async assertDataTable(method) {
126
+ if (!await this.hasDataTable()) throw new Error(`WrWaterfallChartHarness.${method}(): the chart renders no data table — \`dataTable\` is off. Ask hasDataTable() first.`);
127
+ }
128
+ };
129
+ export { WrWaterfallChartHarness };
130
+
131
+ //# sourceMappingURL=ngwr-charts-waterfall-chart-testing.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngwr-charts-waterfall-chart-testing.mjs","names":[],"sources":["../../../projects/lib/charts/waterfall-chart/testing/wr-waterfall-chart-harness.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, HarnessPredicate, type TestElement } from '@angular/cdk/testing';\n\nimport type { WrWaterfallChartHarnessFilters, WrWaterfallChartHarnessStep, WrWaterfallChartTableRow } from './types';\n\nconst KINDS = ['increase', 'decrease', 'flat', 'total'] as const;\n\n/** One custom property the component wrote into an inline `style`, as a finite number, or `null` when it is absent. */\nfunction styleNumber(style: string | null, name: string): number | null {\n const match = new RegExp(`(?:^|;)\\\\s*${name}\\\\s*:\\\\s*([^;]+)`).exec(style ?? '');\n const value = match ? Number.parseFloat(match[1]) : Number.NaN;\n return Number.isFinite(value) ? value : null;\n}\n\n/** A finite number off one attribute, or a sentence saying which one the element lacks. */\nasync function numberAttribute(element: TestElement, name: string, method: string): Promise<number> {\n const raw = await element.getAttribute(name);\n const value = raw === null ? Number.NaN : Number.parseFloat(raw);\n if (!Number.isFinite(value)) {\n throw new Error(\n `WrWaterfallChartHarness.${method}(): a step carries ${name}=\"${raw ?? ''}\", which the component writes as a ` +\n 'finite number on every step it draws.'\n );\n }\n return value;\n}\n\n/**\n * One step's column, so its kind, its figure, its bar and its connector are read off the\n * column they sit in rather than matched up by position across the chart: a step prints a\n * figure only with `showValues`, and the last one has no connector.\n */\nclass StepHarness extends ComponentHarness {\n static hostSelector = '.wr-waterfall-chart__step';\n\n async read(label: string): Promise<WrWaterfallChartHarnessStep> {\n const host = await this.host();\n const value = await this.locatorForOptional('.wr-waterfall-chart__value')();\n const connector = await this.locatorForOptional('.wr-waterfall-chart__connector')();\n const style = await host.getAttribute('style');\n const bottom = styleNumber(style, '--wr-waterfall-chart-lo');\n const top = styleNumber(style, '--wr-waterfall-chart-hi');\n if (bottom === null || top === null) {\n throw new Error(\n `WrWaterfallChartHarness.getSteps(): the step \"${label}\" carries no inline bar ends (style: \"${style ?? ''}\"). ` +\n 'The component writes both on every step, a change of zero included, so their absence is the bug — ' +\n 'reporting 0 would read as a bar on the frame.'\n );\n }\n return {\n label,\n kind: await StepHarness.kindOf(host, label),\n name: await host.getAttribute('aria-label'),\n value: value ? await value.text() : null,\n start: await numberAttribute(host, 'data-start', 'getSteps'),\n end: await numberAttribute(host, 'data-end', 'getSteps'),\n bottomPercent: bottom,\n topPercent: top,\n connected: connector !== null,\n };\n }\n\n private static async kindOf(host: TestElement, label: string): Promise<WrWaterfallChartHarnessStep['kind']> {\n for (const kind of KINDS) {\n if (await host.hasClass(`wr-waterfall-chart__step--${kind}`)) return kind;\n }\n throw new Error(\n `WrWaterfallChartHarness.getSteps(): the step \"${label}\" carries no kind modifier. The component gives every ` +\n 'step one of `--increase`, `--decrease`, `--flat` and `--total`, and the stylesheet paints the figure by it.'\n );\n }\n}\n\n/** One body row of the chart's data table. */\nclass TableRowHarness extends ComponentHarness {\n static hostSelector = '.wr-chart-table tbody tr';\n\n async read(): Promise<WrWaterfallChartTableRow> {\n const header = await this.locatorFor('th[scope=\"row\"]')();\n const cells = await this.locatorForAll('td')();\n return { header: await header.text(), cells: await Promise.all(cells.map(cell => cell.text())) };\n }\n}\n\n/**\n * Test harness for `<wr-waterfall-chart>`.\n *\n * **The bars are read as PERCENTAGES of the drawing, not as pixels.** Each step's two\n * ends are written inline as shares of the drawing's height from its bottom, which is the\n * one number that survives a test with no layout, and they are read off the `style`\n * ATTRIBUTE rather than through `getCssValue()`: in a browser that answers laid-out pixels\n * and in jsdom the declaration, with nothing to say which. The running totals before and\n * after each step are read off the `data-*` the component writes beside them, so a spec\n * can hold the arithmetic and the drawing apart — a total at the right figure and the\n * wrong height is exactly the defect worth catching. The hairline a change of zero keeps\n * is the stylesheet's floor, so no method reports it.\n *\n * **Two questions are not one.** A step's printed figure and its accessible name are read\n * separately ({@link WrWaterfallChartHarnessStep.value} and\n * {@link WrWaterfallChartHarnessStep.name}): the column is an `img`, so the name is what a\n * screen reader gets, and asserting only what is drawn would pass on a step that announces\n * nothing.\n *\n * **Whether a printed figure fits is not read.** The stylesheet hides a figure wider than\n * its column by wrapping it out of sight, which takes a layout jsdom does not have;\n * {@link WrWaterfallChartHarnessStep.value} gives the text the component printed, fitting\n * or not.\n *\n * **What tells the kinds apart is read as such.** {@link WrWaterfallChartHarnessStep.kind} comes\n * off the modifier class, not off the colour, and the sign is in the printed figure — so a\n * spec can assert the channels that are not colour, which are the ones a reader without\n * hue relies on. A change of zero is `'flat'`, neither way, so a missing figure the chart\n * counted as nothing never reads as an increase.\n *\n * **No hover method.** The tooltip repeats the step's name, and the chip renders into the\n * overlay container with nothing tying it to this chart, so a query for it would answer\n * with whichever chart's chip is open. The same figures are in the names and in the data\n * table, which {@link getTableRows} reads.\n *\n * @example\n * ```ts\n * const chart = await loader.getHarness(WrWaterfallChartHarness);\n *\n * expect(await chart.getLabels()).toEqual(['Opening', 'Sales', 'Refunds', 'Closing']);\n * const steps = await chart.getSteps();\n * expect(steps[2]).toMatchObject({ kind: 'decrease', value: '−350', end: 5650 });\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrWaterfallChartHarness extends ComponentHarness {\n static hostSelector = 'wr-waterfall-chart';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrWaterfallChartHarnessFilters = {}): HarnessPredicate<WrWaterfallChartHarness> {\n return new HarnessPredicate(WrWaterfallChartHarness, options)\n .addOption('ariaLabel', options.ariaLabel, (harness, label) =>\n HarnessPredicate.stringMatches(harness.getAccessibleName(), label)\n )\n .addOption('stepLabel', options.stepLabel, async (harness, label) => {\n for (const step of await harness.getLabels()) {\n if (await HarnessPredicate.stringMatches(step, label)) return true;\n }\n return false;\n });\n }\n\n /** The chart's accessible name, on the `group` that holds the steps. */\n async getAccessibleName(): Promise<string | null> {\n return (await this.locatorFor('.wr-waterfall-chart__plot')()).getAttribute('aria-label');\n }\n\n /** How many steps the chart drew — one per step given. */\n async getStepCount(): Promise<number> {\n return (await this.locatorForAll('.wr-waterfall-chart__step')()).length;\n }\n\n /** The labels under the bars, in order — the full text, ellipsised on screen or not. */\n async getLabels(): Promise<string[]> {\n const labels = await this.locatorForAll('.wr-waterfall-chart__label')();\n return Promise.all(labels.map(label => label.text()));\n }\n\n /**\n * Every step, in order: its label, its kind, what it prints and announces, the running\n * totals before and after it, and where its bar runs.\n *\n * Throws on a step missing anything the component writes on every one, rather than\n * answering with a `NaN` a spec could compare against.\n */\n async getSteps(): Promise<WrWaterfallChartHarnessStep[]> {\n const steps = await this.locatorForAll(StepHarness)();\n const labels = await this.getLabels();\n if (labels.length !== steps.length) {\n throw new Error(\n `WrWaterfallChartHarness.getSteps(): the chart draws ${steps.length} step(s) and ${labels.length} label(s). ` +\n 'It renders one label per step, so the two lists line up or the template is broken.'\n );\n }\n return Promise.all(steps.map((step, i) => step.read(labels[i])));\n }\n\n /** Whether any figure is printed past a bar (`showValues`, and at least one step). */\n async hasValues(): Promise<boolean> {\n return (await this.locatorForOptional('.wr-waterfall-chart__value')()) !== null;\n }\n\n /** How many connectors are drawn: one per step that the next one starts from, with `showConnectors`. */\n async getConnectorCount(): Promise<number> {\n return (await this.locatorForAll('.wr-waterfall-chart__connector')()).length;\n }\n\n /** Whether the gridlines are drawn (`showGrid`). */\n async hasGrid(): Promise<boolean> {\n return (await this.locatorForOptional('.wr-waterfall-chart__grid-line')()) !== null;\n }\n\n /** The value axis' tick labels, top to bottom; `[]` with `showGrid` off. */\n async getYTicks(): Promise<string[]> {\n const ticks = await this.locatorForAll('.wr-waterfall-chart__tick')();\n return Promise.all(ticks.map(tick => tick.text()));\n }\n\n /**\n * Where zero is — the line every total stands on — as the percentage of the drawing's\n * height from its bottom that the component wrote: `0` when nothing goes below zero.\n */\n async getZeroPercent(): Promise<number> {\n const style = await (await this.locatorFor('.wr-waterfall-chart__track')()).getAttribute('style');\n const zero = styleNumber(style, '--wr-waterfall-chart-zero');\n if (zero === null) {\n throw new Error(\n `WrWaterfallChartHarness.getZeroPercent(): no inline zero on .wr-waterfall-chart__track (style: \"${style ?? ''}\"). ` +\n 'The component writes one unconditionally, so its absence is the bug rather than a zero line on the frame.'\n );\n }\n return zero;\n }\n\n /** Whether the hidden data table is rendered (`dataTable`). */\n async hasDataTable(): Promise<boolean> {\n return (await this.locatorForOptional('.wr-chart-table')()) !== null;\n }\n\n /**\n * The data table's column headings: the change and the running total, in that order.\n *\n * Throws when the chart renders no table (`dataTable` off) rather than answering with\n * no columns.\n */\n async getTableColumns(): Promise<string[]> {\n await this.assertDataTable('getTableColumns');\n // The first cell is the corner over the row headers — what one row is — not a column\n // of figures.\n const cells = await this.locatorForAll('.wr-chart-table thead tr > *')();\n return Promise.all(cells.slice(1).map(cell => cell.text()));\n }\n\n /**\n * The data table's rows, one per step: its label, its change (`''` on a total) and the\n * running total after it, as a screen reader walks them.\n *\n * Throws when the chart renders no table (`dataTable` off), for the reason\n * {@link getTableColumns} gives.\n */\n async getTableRows(): Promise<WrWaterfallChartTableRow[]> {\n await this.assertDataTable('getTableRows');\n const rows = await this.locatorForAll(TableRowHarness)();\n return Promise.all(rows.map(row => row.read()));\n }\n\n /**\n * The plot's height in pixels, read off the `style` ATTRIBUTE the component wrote, not\n * through `getCssValue()`, which answers from the laid-out box and so differs between\n * jsdom and a browser.\n */\n async getPlotHeight(): Promise<number> {\n const style = await (await this.locatorFor('.wr-waterfall-chart__plot')()).getAttribute('style');\n const match = /height:\\s*([\\d.]+)px/.exec(style ?? '');\n if (!match) {\n throw new Error(\n `WrWaterfallChartHarness.getPlotHeight(): no inline height on .wr-waterfall-chart__plot (style: \"${style ?? ''}\"). ` +\n 'The component writes one unconditionally, so its absence is the bug rather than a zero.'\n );\n }\n return Number.parseFloat(match[1]);\n }\n\n private async assertDataTable(method: string): Promise<void> {\n if (!(await this.hasDataTable())) {\n throw new Error(\n `WrWaterfallChartHarness.${method}(): the chart renders no data table — \\`dataTable\\` is off. Ask hasDataTable() first.`\n );\n }\n }\n}\n"],"mappings":"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"}
@@ -0,0 +1,462 @@
1
+ import * as i0 from "@angular/core";
2
+ import { Component, ViewEncapsulation, computed, effect, input, isDevMode, viewChildren } from "@angular/core";
3
+ import { coerceBooleanProperty, coerceNumberProperty } from "@angular/cdk/coercion";
4
+ import { readI18nText, useI18nFormatter, useI18nText } from "ngwr/i18n";
5
+ import { WrChartTable, chartAxis, useChartNumbers } from "ngwr/charts/core";
6
+ import { useChartTooltip } from "ngwr/popover";
7
+ /**
8
+ * @license
9
+ *
10
+ * Use of this source code is governed by an MIT-style license that can be
11
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
12
+ */
13
+ const MINUS = "−";
14
+ const isolate = (text) => `⁨${text}⁩`;
15
+ const percent = (value) => Math.round(value * 1e3) / 1e3 || 0;
16
+ const clean = (value) => Number(value.toPrecision(15)) || 0;
17
+ var WrWaterfallChart = class WrWaterfallChart {
18
+ steps = input([], ...ngDevMode ? [{ debugName: "steps" }] : /* istanbul ignore next */ []);
19
+ ariaLabel = input(null, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
20
+ resolvedAriaLabel = useI18nText(this.ariaLabel, "waterfallChart.label", "Waterfall chart");
21
+ increaseColor = input("var(--wr-color-success)", ...ngDevMode ? [{ debugName: "increaseColor" }] : /* istanbul ignore next */ []);
22
+ decreaseColor = input("var(--wr-color-danger)", ...ngDevMode ? [{ debugName: "decreaseColor" }] : /* istanbul ignore next */ []);
23
+ totalColor = input("var(--wr-color-primary)", ...ngDevMode ? [{ debugName: "totalColor" }] : /* istanbul ignore next */ []);
24
+ height = input(240, {
25
+ ...ngDevMode ? { debugName: "height" } : /* istanbul ignore next */ {},
26
+ transform: (v) => Math.max(80, coerceNumberProperty(v, 240))
27
+ });
28
+ showGrid = input(true, {
29
+ ...ngDevMode ? { debugName: "showGrid" } : /* istanbul ignore next */ {},
30
+ transform: coerceBooleanProperty
31
+ });
32
+ showValues = input(true, {
33
+ ...ngDevMode ? { debugName: "showValues" } : /* istanbul ignore next */ {},
34
+ transform: coerceBooleanProperty
35
+ });
36
+ showConnectors = input(true, {
37
+ ...ngDevMode ? { debugName: "showConnectors" } : /* istanbul ignore next */ {},
38
+ transform: coerceBooleanProperty
39
+ });
40
+ tooltip = input(true, {
41
+ ...ngDevMode ? { debugName: "tooltip" } : /* istanbul ignore next */ {},
42
+ transform: coerceBooleanProperty
43
+ });
44
+ dataTable = input(false, {
45
+ ...ngDevMode ? { debugName: "dataTable" } : /* istanbul ignore next */ {},
46
+ transform: coerceBooleanProperty
47
+ });
48
+ valueFormat = input(null, ...ngDevMode ? [{ debugName: "valueFormat" }] : /* istanbul ignore next */ []);
49
+ numbers = useChartNumbers(this.valueFormat);
50
+ stepName = readI18nText("waterfallChart.step", "Step");
51
+ changeName = readI18nText("waterfallChart.change", "Change");
52
+ runningTotalName = readI18nText("waterfallChart.runningTotal", "Running total");
53
+ changeStepName = useI18nFormatter("waterfallChart.changeStep", "{{label}}: {{change}}, running total {{total}}");
54
+ totalStepName = useI18nFormatter("waterfallChart.totalStep", "{{label}}: total {{total}}");
55
+ barEls = viewChildren("barEl", ...ngDevMode ? [{ debugName: "barEls" }] : /* istanbul ignore next */ []);
56
+ constructor() {
57
+ if (isDevMode()) {
58
+ const warned = /* @__PURE__ */ new Set();
59
+ effect(() => {
60
+ this.resolved().forEach((step, index) => {
61
+ if (step.mismatch === null) return;
62
+ const key = `${index}:${step.mismatch}:${step.end}`;
63
+ if (warned.has(key)) return;
64
+ warned.add(key);
65
+ console.warn(`[NGWR] <wr-waterfall-chart>: the total "${step.label}" (step ${index + 1}) is given as ${step.mismatch}, and the steps above it add up to ${step.end}. The bar shows ${step.end}.`);
66
+ });
67
+ });
68
+ }
69
+ }
70
+ resolved = computed(() => {
71
+ let running = 0;
72
+ let moved = false;
73
+ return this.steps().map((step) => {
74
+ const value = Number.isFinite(step.value) ? step.value : null;
75
+ const start = running;
76
+ if (step.total) {
77
+ let mismatch = null;
78
+ if (!moved) {
79
+ if (value !== null) running = clean(value);
80
+ } else if (value !== null && clean(value) !== running) mismatch = value;
81
+ return {
82
+ label: step.label,
83
+ kind: "total",
84
+ change: null,
85
+ start,
86
+ end: running,
87
+ mismatch
88
+ };
89
+ }
90
+ const change = value ?? 0;
91
+ running = clean(running + change);
92
+ moved = true;
93
+ return {
94
+ label: step.label,
95
+ kind: change < 0 ? "decrease" : change > 0 ? "increase" : "flat",
96
+ change,
97
+ start,
98
+ end: running,
99
+ mismatch: null
100
+ };
101
+ });
102
+ }, ...ngDevMode ? [{ debugName: "resolved" }] : /* istanbul ignore next */ []);
103
+ axis = computed(() => {
104
+ const steps = this.resolved();
105
+ if (steps.length === 0) return chartAxis(NaN, NaN);
106
+ let min = 0;
107
+ let max = 0;
108
+ for (const { start, end, kind } of steps) {
109
+ const from = kind === "total" ? 0 : start;
110
+ min = Math.min(min, from, end);
111
+ max = Math.max(max, from, end);
112
+ }
113
+ return chartAxis(min, max, { includeZero: true });
114
+ }, ...ngDevMode ? [{ debugName: "axis" }] : /* istanbul ignore next */ []);
115
+ zero = computed(() => this.level(0), ...ngDevMode ? [{ debugName: "zero" }] : /* istanbul ignore next */ []);
116
+ ticks = computed(() => {
117
+ const { step, ticks } = this.axis();
118
+ const labels = this.numbers.ticks(ticks.map((value) => Math.abs(value)), step, "tick");
119
+ return ticks.map((value, i) => {
120
+ const bottom = this.level(value);
121
+ return {
122
+ label: value < 0 ? `${MINUS}${labels[i]}` : labels[i],
123
+ bottom,
124
+ top: percent(100 - bottom)
125
+ };
126
+ });
127
+ }, ...ngDevMode ? [{ debugName: "ticks" }] : /* istanbul ignore next */ []);
128
+ drawn = computed(() => {
129
+ const steps = this.resolved();
130
+ const colors = {
131
+ increase: this.increaseColor(),
132
+ decrease: this.decreaseColor(),
133
+ flat: null,
134
+ total: this.totalColor()
135
+ };
136
+ return steps.map((step, i) => {
137
+ const from = step.kind === "total" ? 0 : step.start;
138
+ const totalText = this.written(step.end, (v) => this.numbers.value(v, "value"));
139
+ const changeText = step.change === null ? "" : this.signed(step.change, (v) => this.numbers.value(v, "value"));
140
+ const next = steps[i + 1];
141
+ const connected = next !== void 0 && (next.kind !== "total" || next.end === step.end);
142
+ return {
143
+ label: step.label,
144
+ kind: step.kind,
145
+ start: step.start,
146
+ end: step.end,
147
+ lo: this.level(Math.min(from, step.end)),
148
+ hi: this.level(Math.max(from, step.end)),
149
+ color: colors[step.kind],
150
+ display: step.change === null ? this.written(step.end, (v) => this.numbers.label(v, "label")) : this.signed(step.change, (v) => this.numbers.label(v, "label")),
151
+ below: step.kind === "decrease" || step.kind === "total" && step.end < 0,
152
+ changeText,
153
+ totalText,
154
+ name: step.change === null ? this.totalStepName({
155
+ label: step.label,
156
+ total: totalText
157
+ }) : this.changeStepName({
158
+ label: step.label,
159
+ change: changeText,
160
+ total: totalText
161
+ }),
162
+ connector: connected ? this.level(step.end) : null
163
+ };
164
+ });
165
+ }, ...ngDevMode ? [{ debugName: "drawn" }] : /* istanbul ignore next */ []);
166
+ tableData = computed(() => ({
167
+ caption: this.resolvedAriaLabel(),
168
+ corner: this.stepName(),
169
+ columns: [this.changeName(), this.runningTotalName()],
170
+ groups: [{ rows: this.drawn().map((step) => ({
171
+ header: step.label,
172
+ cells: [step.changeText, step.totalText]
173
+ })) }]
174
+ }), ...ngDevMode ? [{ debugName: "tableData" }] : /* istanbul ignore next */ []);
175
+ tip = useChartTooltip(this.tooltip, (index) => {
176
+ const step = this.drawn()[index];
177
+ const anchor = this.barEls()[index]?.nativeElement;
178
+ if (!step || !anchor) return null;
179
+ const rows = [];
180
+ if (step.kind !== "total") rows.push({
181
+ label: this.changeName(),
182
+ value: isolate(step.changeText)
183
+ });
184
+ rows.push({
185
+ label: this.runningTotalName(),
186
+ value: isolate(step.totalText)
187
+ });
188
+ const label = step.label;
189
+ return {
190
+ datum: step.color === null ? {
191
+ label,
192
+ value: "",
193
+ rows
194
+ } : {
195
+ label,
196
+ value: "",
197
+ color: step.color,
198
+ rows
199
+ },
200
+ anchor
201
+ };
202
+ });
203
+ level(value) {
204
+ const { min, max } = this.axis();
205
+ return percent((value - min) / (max - min) * 100);
206
+ }
207
+ signed(change, write) {
208
+ return change > 0 ? `+${write(change)}` : this.written(change, write);
209
+ }
210
+ written(value, write) {
211
+ return value < 0 ? `${MINUS}${write(-value)}` : write(Math.abs(value));
212
+ }
213
+ static ɵfac = i0.ɵɵngDeclareFactory({
214
+ minVersion: "12.0.0",
215
+ version: "22.2.4",
216
+ ngImport: i0,
217
+ type: WrWaterfallChart,
218
+ deps: [],
219
+ target: i0.ɵɵFactoryTarget.Component
220
+ });
221
+ static ɵcmp = i0.ɵɵngDeclareComponent({
222
+ minVersion: "17.0.0",
223
+ version: "22.2.4",
224
+ type: WrWaterfallChart,
225
+ isStandalone: true,
226
+ selector: "wr-waterfall-chart",
227
+ inputs: {
228
+ steps: {
229
+ classPropertyName: "steps",
230
+ publicName: "steps",
231
+ isSignal: true,
232
+ isRequired: false,
233
+ transformFunction: null
234
+ },
235
+ ariaLabel: {
236
+ classPropertyName: "ariaLabel",
237
+ publicName: "ariaLabel",
238
+ isSignal: true,
239
+ isRequired: false,
240
+ transformFunction: null
241
+ },
242
+ increaseColor: {
243
+ classPropertyName: "increaseColor",
244
+ publicName: "increaseColor",
245
+ isSignal: true,
246
+ isRequired: false,
247
+ transformFunction: null
248
+ },
249
+ decreaseColor: {
250
+ classPropertyName: "decreaseColor",
251
+ publicName: "decreaseColor",
252
+ isSignal: true,
253
+ isRequired: false,
254
+ transformFunction: null
255
+ },
256
+ totalColor: {
257
+ classPropertyName: "totalColor",
258
+ publicName: "totalColor",
259
+ isSignal: true,
260
+ isRequired: false,
261
+ transformFunction: null
262
+ },
263
+ height: {
264
+ classPropertyName: "height",
265
+ publicName: "height",
266
+ isSignal: true,
267
+ isRequired: false,
268
+ transformFunction: null
269
+ },
270
+ showGrid: {
271
+ classPropertyName: "showGrid",
272
+ publicName: "showGrid",
273
+ isSignal: true,
274
+ isRequired: false,
275
+ transformFunction: null
276
+ },
277
+ showValues: {
278
+ classPropertyName: "showValues",
279
+ publicName: "showValues",
280
+ isSignal: true,
281
+ isRequired: false,
282
+ transformFunction: null
283
+ },
284
+ showConnectors: {
285
+ classPropertyName: "showConnectors",
286
+ publicName: "showConnectors",
287
+ isSignal: true,
288
+ isRequired: false,
289
+ transformFunction: null
290
+ },
291
+ tooltip: {
292
+ classPropertyName: "tooltip",
293
+ publicName: "tooltip",
294
+ isSignal: true,
295
+ isRequired: false,
296
+ transformFunction: null
297
+ },
298
+ dataTable: {
299
+ classPropertyName: "dataTable",
300
+ publicName: "dataTable",
301
+ isSignal: true,
302
+ isRequired: false,
303
+ transformFunction: null
304
+ },
305
+ valueFormat: {
306
+ classPropertyName: "valueFormat",
307
+ publicName: "valueFormat",
308
+ isSignal: true,
309
+ isRequired: false,
310
+ transformFunction: null
311
+ }
312
+ },
313
+ host: {
314
+ properties: {
315
+ "class.wr-waterfall-chart--values": "showValues()",
316
+ "style.--wr-waterfall-chart-steps": "steps().length || 1"
317
+ },
318
+ classAttribute: "wr-waterfall-chart"
319
+ },
320
+ viewQueries: [{
321
+ propertyName: "barEls",
322
+ predicate: ["barEl"],
323
+ descendants: true,
324
+ isSignal: true
325
+ }],
326
+ ngImport: i0,
327
+ template: "@let active = tip.active();\n@let values = showValues();\n@let connectors = showConnectors();\n<!-- Two columns: the value axis' tick labels at inline start and the plot beside them,\n with the step labels under the plot only, so their slots are the plot's columns. -->\n<div class=\"wr-waterfall-chart__body\">\n @if (showGrid()) {\n <!-- HTML beside the plot rather than inside it, in flow, so the column is exactly as\n wide as the longest label; each one hands the stylesheet the y of its own\n gridline. Hidden: every figure is in a step's own name, and the axis is the eye's. -->\n <div class=\"wr-waterfall-chart__y-axis\" aria-hidden=\"true\">\n @for (tick of ticks(); track $index) {\n <span class=\"wr-waterfall-chart__tick\" [style.--wr-waterfall-chart-y]=\"tick.top\">{{ tick.label }}</span>\n }\n </div>\n }\n\n <!-- A named `group` of one named `img` per step, as the bar chart's columns are. Not one\n `img` round the whole chart: `img` makes everything inside it presentational, and\n WebKit drops such a subtree, so every step's own name would go with it. -->\n <div\n class=\"wr-waterfall-chart__plot\"\n role=\"group\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [style.height.px]=\"height()\"\n >\n <!-- The drawing: every position in it is a percentage of its height from the bottom,\n handed to the stylesheet as a number. -->\n <div class=\"wr-waterfall-chart__track\" [style.--wr-waterfall-chart-zero]=\"zero()\">\n @if (showGrid()) {\n @for (tick of ticks(); track $index) {\n <span\n class=\"wr-waterfall-chart__grid-line\"\n aria-hidden=\"true\"\n [style.--wr-waterfall-chart-level]=\"tick.bottom\"\n ></span>\n }\n }\n\n @for (step of drawn(); track $index) {\n <!-- Its change and the running total after it in its name: the figure inside is\n drawn for the eye, and the `img` role makes it presentational. The bar's two\n ends are handed to the stylesheet; the running totals before and after it ride\n along as data, beside the name that says them in words. -->\n <div\n class=\"wr-waterfall-chart__step\"\n [class.wr-waterfall-chart__step--increase]=\"step.kind === 'increase'\"\n [class.wr-waterfall-chart__step--decrease]=\"step.kind === 'decrease'\"\n [class.wr-waterfall-chart__step--flat]=\"step.kind === 'flat'\"\n [class.wr-waterfall-chart__step--total]=\"step.kind === 'total'\"\n [class.wr-waterfall-chart__step--active]=\"active === $index\"\n role=\"img\"\n [attr.aria-label]=\"step.name\"\n [attr.data-start]=\"step.start\"\n [attr.data-end]=\"step.end\"\n [style.--wr-waterfall-chart-lo]=\"step.lo\"\n [style.--wr-waterfall-chart-hi]=\"step.hi\"\n (mouseenter)=\"tip.enter($index)\"\n (mouseleave)=\"tip.leave($event)\"\n >\n <!-- A change of zero writes no paint: its neutral hairline is the stylesheet's hook. -->\n <span #barEl class=\"wr-waterfall-chart__bar\" [style.background]=\"step.color\"></span>\n @if (values) {\n <!-- A line one figure tall that the figure joins only where it fits whole; one\n that does not wraps out of sight below it (see the stylesheet). -->\n <span class=\"wr-waterfall-chart__value\" [class.wr-waterfall-chart__value--below]=\"step.below\"\n ><span class=\"wr-waterfall-chart__value-text\">{{ step.display }}</span></span\n >\n }\n @if (connectors && step.connector !== null) {\n <!-- Across the gap to the next bar, at the running total that bar starts from. -->\n <span class=\"wr-waterfall-chart__connector\" [style.--wr-waterfall-chart-level]=\"step.connector\"></span>\n }\n </div>\n }\n\n <!-- After the bars, so it is drawn over them where zero runs through the plot. -->\n <span class=\"wr-waterfall-chart__baseline\" aria-hidden=\"true\"></span>\n </div>\n </div>\n\n <!-- Named on each step above, so the visible label row is decoration here. -->\n <div class=\"wr-waterfall-chart__labels\" aria-hidden=\"true\">\n @for (step of drawn(); track $index) {\n <span class=\"wr-waterfall-chart__label\" [class.wr-waterfall-chart__label--total]=\"step.kind === 'total'\">{{\n step.label\n }}</span>\n }\n </div>\n</div>\n\n@if (dataTable()) {\n <!-- The figures for a screen reader who wants to move cell by cell, beside the steps\n rather than inside an `img`. Clipped to nothing by its own stylesheet, so it takes no\n room and draws nothing. -->\n <wr-chart-table [data]=\"tableData()\" />\n}\n",
328
+ dependencies: [{
329
+ kind: "component",
330
+ type: WrChartTable,
331
+ selector: "wr-chart-table",
332
+ inputs: ["data"]
333
+ }],
334
+ encapsulation: i0.ViewEncapsulation.None
335
+ });
336
+ };
337
+ i0.ɵɵngDeclareClassMetadata({
338
+ minVersion: "12.0.0",
339
+ version: "22.2.4",
340
+ ngImport: i0,
341
+ type: WrWaterfallChart,
342
+ decorators: [{
343
+ type: Component,
344
+ args: [{
345
+ selector: "wr-waterfall-chart",
346
+ encapsulation: ViewEncapsulation.None,
347
+ host: {
348
+ class: "wr-waterfall-chart",
349
+ "[class.wr-waterfall-chart--values]": "showValues()",
350
+ "[style.--wr-waterfall-chart-steps]": "steps().length || 1"
351
+ },
352
+ imports: [WrChartTable],
353
+ template: "@let active = tip.active();\n@let values = showValues();\n@let connectors = showConnectors();\n<!-- Two columns: the value axis' tick labels at inline start and the plot beside them,\n with the step labels under the plot only, so their slots are the plot's columns. -->\n<div class=\"wr-waterfall-chart__body\">\n @if (showGrid()) {\n <!-- HTML beside the plot rather than inside it, in flow, so the column is exactly as\n wide as the longest label; each one hands the stylesheet the y of its own\n gridline. Hidden: every figure is in a step's own name, and the axis is the eye's. -->\n <div class=\"wr-waterfall-chart__y-axis\" aria-hidden=\"true\">\n @for (tick of ticks(); track $index) {\n <span class=\"wr-waterfall-chart__tick\" [style.--wr-waterfall-chart-y]=\"tick.top\">{{ tick.label }}</span>\n }\n </div>\n }\n\n <!-- A named `group` of one named `img` per step, as the bar chart's columns are. Not one\n `img` round the whole chart: `img` makes everything inside it presentational, and\n WebKit drops such a subtree, so every step's own name would go with it. -->\n <div\n class=\"wr-waterfall-chart__plot\"\n role=\"group\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [style.height.px]=\"height()\"\n >\n <!-- The drawing: every position in it is a percentage of its height from the bottom,\n handed to the stylesheet as a number. -->\n <div class=\"wr-waterfall-chart__track\" [style.--wr-waterfall-chart-zero]=\"zero()\">\n @if (showGrid()) {\n @for (tick of ticks(); track $index) {\n <span\n class=\"wr-waterfall-chart__grid-line\"\n aria-hidden=\"true\"\n [style.--wr-waterfall-chart-level]=\"tick.bottom\"\n ></span>\n }\n }\n\n @for (step of drawn(); track $index) {\n <!-- Its change and the running total after it in its name: the figure inside is\n drawn for the eye, and the `img` role makes it presentational. The bar's two\n ends are handed to the stylesheet; the running totals before and after it ride\n along as data, beside the name that says them in words. -->\n <div\n class=\"wr-waterfall-chart__step\"\n [class.wr-waterfall-chart__step--increase]=\"step.kind === 'increase'\"\n [class.wr-waterfall-chart__step--decrease]=\"step.kind === 'decrease'\"\n [class.wr-waterfall-chart__step--flat]=\"step.kind === 'flat'\"\n [class.wr-waterfall-chart__step--total]=\"step.kind === 'total'\"\n [class.wr-waterfall-chart__step--active]=\"active === $index\"\n role=\"img\"\n [attr.aria-label]=\"step.name\"\n [attr.data-start]=\"step.start\"\n [attr.data-end]=\"step.end\"\n [style.--wr-waterfall-chart-lo]=\"step.lo\"\n [style.--wr-waterfall-chart-hi]=\"step.hi\"\n (mouseenter)=\"tip.enter($index)\"\n (mouseleave)=\"tip.leave($event)\"\n >\n <!-- A change of zero writes no paint: its neutral hairline is the stylesheet's hook. -->\n <span #barEl class=\"wr-waterfall-chart__bar\" [style.background]=\"step.color\"></span>\n @if (values) {\n <!-- A line one figure tall that the figure joins only where it fits whole; one\n that does not wraps out of sight below it (see the stylesheet). -->\n <span class=\"wr-waterfall-chart__value\" [class.wr-waterfall-chart__value--below]=\"step.below\"\n ><span class=\"wr-waterfall-chart__value-text\">{{ step.display }}</span></span\n >\n }\n @if (connectors && step.connector !== null) {\n <!-- Across the gap to the next bar, at the running total that bar starts from. -->\n <span class=\"wr-waterfall-chart__connector\" [style.--wr-waterfall-chart-level]=\"step.connector\"></span>\n }\n </div>\n }\n\n <!-- After the bars, so it is drawn over them where zero runs through the plot. -->\n <span class=\"wr-waterfall-chart__baseline\" aria-hidden=\"true\"></span>\n </div>\n </div>\n\n <!-- Named on each step above, so the visible label row is decoration here. -->\n <div class=\"wr-waterfall-chart__labels\" aria-hidden=\"true\">\n @for (step of drawn(); track $index) {\n <span class=\"wr-waterfall-chart__label\" [class.wr-waterfall-chart__label--total]=\"step.kind === 'total'\">{{\n step.label\n }}</span>\n }\n </div>\n</div>\n\n@if (dataTable()) {\n <!-- The figures for a screen reader who wants to move cell by cell, beside the steps\n rather than inside an `img`. Clipped to nothing by its own stylesheet, so it takes no\n room and draws nothing. -->\n <wr-chart-table [data]=\"tableData()\" />\n}\n"
354
+ }]
355
+ }],
356
+ ctorParameters: () => [],
357
+ propDecorators: {
358
+ steps: [{
359
+ type: i0.Input,
360
+ args: [{
361
+ isSignal: true,
362
+ alias: "steps",
363
+ required: false
364
+ }]
365
+ }],
366
+ ariaLabel: [{
367
+ type: i0.Input,
368
+ args: [{
369
+ isSignal: true,
370
+ alias: "ariaLabel",
371
+ required: false
372
+ }]
373
+ }],
374
+ increaseColor: [{
375
+ type: i0.Input,
376
+ args: [{
377
+ isSignal: true,
378
+ alias: "increaseColor",
379
+ required: false
380
+ }]
381
+ }],
382
+ decreaseColor: [{
383
+ type: i0.Input,
384
+ args: [{
385
+ isSignal: true,
386
+ alias: "decreaseColor",
387
+ required: false
388
+ }]
389
+ }],
390
+ totalColor: [{
391
+ type: i0.Input,
392
+ args: [{
393
+ isSignal: true,
394
+ alias: "totalColor",
395
+ required: false
396
+ }]
397
+ }],
398
+ height: [{
399
+ type: i0.Input,
400
+ args: [{
401
+ isSignal: true,
402
+ alias: "height",
403
+ required: false
404
+ }]
405
+ }],
406
+ showGrid: [{
407
+ type: i0.Input,
408
+ args: [{
409
+ isSignal: true,
410
+ alias: "showGrid",
411
+ required: false
412
+ }]
413
+ }],
414
+ showValues: [{
415
+ type: i0.Input,
416
+ args: [{
417
+ isSignal: true,
418
+ alias: "showValues",
419
+ required: false
420
+ }]
421
+ }],
422
+ showConnectors: [{
423
+ type: i0.Input,
424
+ args: [{
425
+ isSignal: true,
426
+ alias: "showConnectors",
427
+ required: false
428
+ }]
429
+ }],
430
+ tooltip: [{
431
+ type: i0.Input,
432
+ args: [{
433
+ isSignal: true,
434
+ alias: "tooltip",
435
+ required: false
436
+ }]
437
+ }],
438
+ dataTable: [{
439
+ type: i0.Input,
440
+ args: [{
441
+ isSignal: true,
442
+ alias: "dataTable",
443
+ required: false
444
+ }]
445
+ }],
446
+ valueFormat: [{
447
+ type: i0.Input,
448
+ args: [{
449
+ isSignal: true,
450
+ alias: "valueFormat",
451
+ required: false
452
+ }]
453
+ }],
454
+ barEls: [{
455
+ type: i0.ViewChildren,
456
+ args: ["barEl", { isSignal: true }]
457
+ }]
458
+ }
459
+ });
460
+ export { WrWaterfallChart };
461
+
462
+ //# sourceMappingURL=ngwr-charts-waterfall-chart.mjs.map