ngwr 16.4.0 → 16.5.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 (258) hide show
  1. package/charts/bar-chart/styles/_index.scss +494 -305
  2. package/charts/boxplot-chart/styles/_index.scss +114 -48
  3. package/charts/bullet-chart/styles/_index.scss +113 -42
  4. package/charts/calendar-heatmap/styles/_index.scss +111 -20
  5. package/charts/candlestick-chart/styles/_index.scss +61 -26
  6. package/charts/chart-legend/styles/_index.scss +119 -1
  7. package/charts/core/styles/_index.scss +201 -5
  8. package/charts/donut-chart/styles/_index.scss +76 -21
  9. package/charts/funnel-chart/styles/_index.scss +66 -38
  10. package/charts/gauge/styles/_index.scss +12 -1
  11. package/charts/heatmap-chart/styles/_index.scss +90 -53
  12. package/charts/line-chart/styles/_index.scss +143 -139
  13. package/charts/meter-group/styles/_index.scss +87 -25
  14. package/charts/radar-chart/styles/_index.scss +82 -40
  15. package/charts/scatter-chart/styles/_index.scss +117 -44
  16. package/charts/sparkline/styles/_index.scss +7 -1
  17. package/charts/treemap-chart/styles/_index.scss +94 -42
  18. package/charts/waterfall-chart/styles/_index.scss +150 -87
  19. package/color-picker/styles/_index.scss +7 -3
  20. package/copy-value/styles/_index.scss +21 -2
  21. package/date-stamp/styles/_index.scss +2 -1
  22. package/dialog/styles/_index.scss +6 -0
  23. package/drawer/styles/_index.scss +5 -1
  24. package/fesm2022/ngwr-carousel-testing.mjs +4 -1
  25. package/fesm2022/ngwr-carousel-testing.mjs.map +1 -1
  26. package/fesm2022/ngwr-carousel.mjs +21 -2
  27. package/fesm2022/ngwr-carousel.mjs.map +1 -1
  28. package/fesm2022/ngwr-cascader-testing.mjs.map +1 -1
  29. package/fesm2022/ngwr-cascader.mjs +48 -4
  30. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  31. package/fesm2022/ngwr-charts-bar-chart-testing.mjs +16 -14
  32. package/fesm2022/ngwr-charts-bar-chart-testing.mjs.map +1 -1
  33. package/fesm2022/ngwr-charts-bar-chart.mjs +399 -141
  34. package/fesm2022/ngwr-charts-bar-chart.mjs.map +1 -1
  35. package/fesm2022/ngwr-charts-boxplot-chart-testing.mjs +19 -5
  36. package/fesm2022/ngwr-charts-boxplot-chart-testing.mjs.map +1 -1
  37. package/fesm2022/ngwr-charts-boxplot-chart.mjs +250 -56
  38. package/fesm2022/ngwr-charts-boxplot-chart.mjs.map +1 -1
  39. package/fesm2022/ngwr-charts-bullet-chart.mjs +118 -18
  40. package/fesm2022/ngwr-charts-bullet-chart.mjs.map +1 -1
  41. package/fesm2022/ngwr-charts-calendar-heatmap.mjs +266 -46
  42. package/fesm2022/ngwr-charts-calendar-heatmap.mjs.map +1 -1
  43. package/fesm2022/ngwr-charts-candlestick-chart-testing.mjs +21 -10
  44. package/fesm2022/ngwr-charts-candlestick-chart-testing.mjs.map +1 -1
  45. package/fesm2022/ngwr-charts-candlestick-chart.mjs +319 -72
  46. package/fesm2022/ngwr-charts-candlestick-chart.mjs.map +1 -1
  47. package/fesm2022/ngwr-charts-chart-legend.mjs +211 -9
  48. package/fesm2022/ngwr-charts-chart-legend.mjs.map +1 -1
  49. package/fesm2022/ngwr-charts-core.mjs +299 -18
  50. package/fesm2022/ngwr-charts-core.mjs.map +1 -1
  51. package/fesm2022/ngwr-charts-donut-chart-testing.mjs.map +1 -1
  52. package/fesm2022/ngwr-charts-donut-chart.mjs +206 -27
  53. package/fesm2022/ngwr-charts-donut-chart.mjs.map +1 -1
  54. package/fesm2022/ngwr-charts-funnel-chart-testing.mjs +4 -4
  55. package/fesm2022/ngwr-charts-funnel-chart-testing.mjs.map +1 -1
  56. package/fesm2022/ngwr-charts-funnel-chart.mjs +113 -10
  57. package/fesm2022/ngwr-charts-funnel-chart.mjs.map +1 -1
  58. package/fesm2022/ngwr-charts-gauge-testing.mjs.map +1 -1
  59. package/fesm2022/ngwr-charts-gauge.mjs +98 -12
  60. package/fesm2022/ngwr-charts-gauge.mjs.map +1 -1
  61. package/fesm2022/ngwr-charts-heatmap-chart.mjs +226 -31
  62. package/fesm2022/ngwr-charts-heatmap-chart.mjs.map +1 -1
  63. package/fesm2022/ngwr-charts-line-chart-testing.mjs +16 -4
  64. package/fesm2022/ngwr-charts-line-chart-testing.mjs.map +1 -1
  65. package/fesm2022/ngwr-charts-line-chart.mjs +407 -172
  66. package/fesm2022/ngwr-charts-line-chart.mjs.map +1 -1
  67. package/fesm2022/ngwr-charts-meter-group-testing.mjs +4 -4
  68. package/fesm2022/ngwr-charts-meter-group-testing.mjs.map +1 -1
  69. package/fesm2022/ngwr-charts-meter-group.mjs +223 -31
  70. package/fesm2022/ngwr-charts-meter-group.mjs.map +1 -1
  71. package/fesm2022/ngwr-charts-radar-chart-testing.mjs +2 -1
  72. package/fesm2022/ngwr-charts-radar-chart-testing.mjs.map +1 -1
  73. package/fesm2022/ngwr-charts-radar-chart.mjs +255 -66
  74. package/fesm2022/ngwr-charts-radar-chart.mjs.map +1 -1
  75. package/fesm2022/ngwr-charts-scatter-chart-testing.mjs +39 -18
  76. package/fesm2022/ngwr-charts-scatter-chart-testing.mjs.map +1 -1
  77. package/fesm2022/ngwr-charts-scatter-chart.mjs +431 -53
  78. package/fesm2022/ngwr-charts-scatter-chart.mjs.map +1 -1
  79. package/fesm2022/ngwr-charts-sparkline.mjs +19 -8
  80. package/fesm2022/ngwr-charts-sparkline.mjs.map +1 -1
  81. package/fesm2022/ngwr-charts-treemap-chart.mjs +253 -44
  82. package/fesm2022/ngwr-charts-treemap-chart.mjs.map +1 -1
  83. package/fesm2022/ngwr-charts-waterfall-chart-testing.mjs +15 -7
  84. package/fesm2022/ngwr-charts-waterfall-chart-testing.mjs.map +1 -1
  85. package/fesm2022/ngwr-charts-waterfall-chart.mjs +151 -23
  86. package/fesm2022/ngwr-charts-waterfall-chart.mjs.map +1 -1
  87. package/fesm2022/ngwr-color-picker.mjs +44 -4
  88. package/fesm2022/ngwr-color-picker.mjs.map +1 -1
  89. package/fesm2022/ngwr-context-menu-testing.mjs.map +1 -1
  90. package/fesm2022/ngwr-context-menu.mjs +47 -19
  91. package/fesm2022/ngwr-context-menu.mjs.map +1 -1
  92. package/fesm2022/ngwr-copy-value-testing.mjs +5 -1
  93. package/fesm2022/ngwr-copy-value-testing.mjs.map +1 -1
  94. package/fesm2022/ngwr-copy-value.mjs +38 -2
  95. package/fesm2022/ngwr-copy-value.mjs.map +1 -1
  96. package/fesm2022/ngwr-date-picker.mjs +56 -8
  97. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  98. package/fesm2022/ngwr-dialog.mjs +13 -5
  99. package/fesm2022/ngwr-dialog.mjs.map +1 -1
  100. package/fesm2022/ngwr-drawer.mjs +19 -3
  101. package/fesm2022/ngwr-drawer.mjs.map +1 -1
  102. package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -1
  103. package/fesm2022/ngwr-dropdown.mjs +35 -6
  104. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  105. package/fesm2022/ngwr-editor.mjs +1 -0
  106. package/fesm2022/ngwr-editor.mjs.map +1 -1
  107. package/fesm2022/ngwr-graph.mjs +81 -13
  108. package/fesm2022/ngwr-graph.mjs.map +1 -1
  109. package/fesm2022/ngwr-i18n-ar.mjs +5 -0
  110. package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
  111. package/fesm2022/ngwr-i18n-cs.mjs +5 -0
  112. package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
  113. package/fesm2022/ngwr-i18n-de.mjs +5 -0
  114. package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
  115. package/fesm2022/ngwr-i18n-en.mjs +5 -0
  116. package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
  117. package/fesm2022/ngwr-i18n-es.mjs +5 -0
  118. package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
  119. package/fesm2022/ngwr-i18n-fr.mjs +5 -0
  120. package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
  121. package/fesm2022/ngwr-i18n-he.mjs +5 -0
  122. package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
  123. package/fesm2022/ngwr-i18n-hi.mjs +5 -0
  124. package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
  125. package/fesm2022/ngwr-i18n-id.mjs +5 -0
  126. package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
  127. package/fesm2022/ngwr-i18n-it.mjs +5 -0
  128. package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
  129. package/fesm2022/ngwr-i18n-ja.mjs +5 -0
  130. package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
  131. package/fesm2022/ngwr-i18n-ko.mjs +5 -0
  132. package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
  133. package/fesm2022/ngwr-i18n-nl.mjs +5 -0
  134. package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
  135. package/fesm2022/ngwr-i18n-pl.mjs +5 -0
  136. package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
  137. package/fesm2022/ngwr-i18n-pt.mjs +5 -0
  138. package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
  139. package/fesm2022/ngwr-i18n-ru.mjs +5 -0
  140. package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
  141. package/fesm2022/ngwr-i18n-sv.mjs +5 -0
  142. package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
  143. package/fesm2022/ngwr-i18n-tr.mjs +5 -0
  144. package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
  145. package/fesm2022/ngwr-i18n-uk.mjs +5 -0
  146. package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
  147. package/fesm2022/ngwr-i18n-vi.mjs +5 -0
  148. package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
  149. package/fesm2022/ngwr-i18n-zh-tw.mjs +5 -0
  150. package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
  151. package/fesm2022/ngwr-i18n-zh.mjs +5 -0
  152. package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
  153. package/fesm2022/ngwr-lightbox.mjs +20 -3
  154. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  155. package/fesm2022/ngwr-overlay.mjs +21 -2
  156. package/fesm2022/ngwr-overlay.mjs.map +1 -1
  157. package/fesm2022/ngwr-popconfirm-testing.mjs +4 -1
  158. package/fesm2022/ngwr-popconfirm-testing.mjs.map +1 -1
  159. package/fesm2022/ngwr-popconfirm.mjs +41 -5
  160. package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
  161. package/fesm2022/ngwr-popover.mjs +67 -12
  162. package/fesm2022/ngwr-popover.mjs.map +1 -1
  163. package/fesm2022/ngwr-schema-form.mjs +2 -0
  164. package/fesm2022/ngwr-schema-form.mjs.map +1 -1
  165. package/fesm2022/ngwr-table.mjs +2 -0
  166. package/fesm2022/ngwr-table.mjs.map +1 -1
  167. package/fesm2022/ngwr-tour.mjs +14 -9
  168. package/fesm2022/ngwr-tour.mjs.map +1 -1
  169. package/fesm2022/ngwr-tree-testing.mjs.map +1 -1
  170. package/fesm2022/ngwr-tree.mjs +49 -16
  171. package/fesm2022/ngwr-tree.mjs.map +1 -1
  172. package/fesm2022/ngwr-version.mjs +1 -1
  173. package/fesm2022/ngwr-version.mjs.map +1 -1
  174. package/fesm2022/ngwr-window.mjs +16 -9
  175. package/fesm2022/ngwr-window.mjs.map +1 -1
  176. package/i18n/ar.json +5 -0
  177. package/i18n/cs.json +5 -0
  178. package/i18n/de.json +5 -0
  179. package/i18n/en.json +5 -0
  180. package/i18n/es.json +5 -0
  181. package/i18n/fr.json +5 -0
  182. package/i18n/he.json +5 -0
  183. package/i18n/hi.json +5 -0
  184. package/i18n/id.json +5 -0
  185. package/i18n/it.json +5 -0
  186. package/i18n/ja.json +5 -0
  187. package/i18n/ko.json +5 -0
  188. package/i18n/nl.json +5 -0
  189. package/i18n/pl.json +5 -0
  190. package/i18n/pt.json +5 -0
  191. package/i18n/ru.json +5 -0
  192. package/i18n/sv.json +5 -0
  193. package/i18n/tr.json +5 -0
  194. package/i18n/uk.json +5 -0
  195. package/i18n/vi.json +5 -0
  196. package/i18n/zh-TW.json +5 -0
  197. package/i18n/zh.json +5 -0
  198. package/llms-full.txt +8 -8
  199. package/llms.txt +7 -3
  200. package/package.json +1 -1
  201. package/popconfirm/styles/_index.scss +6 -0
  202. package/popover/styles/_index.scss +24 -13
  203. package/schematics/use/symbol-map.json +1 -0
  204. package/skills/ngwr/references/catalog.md +1 -1
  205. package/tour/styles/_index.scss +6 -0
  206. package/types/ngwr-carousel-testing.d.ts +6 -4
  207. package/types/ngwr-carousel.d.ts +14 -3
  208. package/types/ngwr-cascader-testing.d.ts +4 -3
  209. package/types/ngwr-cascader.d.ts +27 -3
  210. package/types/ngwr-charts-bar-chart-testing.d.ts +15 -13
  211. package/types/ngwr-charts-bar-chart.d.ts +220 -48
  212. package/types/ngwr-charts-boxplot-chart-testing.d.ts +9 -2
  213. package/types/ngwr-charts-boxplot-chart.d.ts +110 -19
  214. package/types/ngwr-charts-bullet-chart.d.ts +72 -12
  215. package/types/ngwr-charts-calendar-heatmap.d.ts +119 -15
  216. package/types/ngwr-charts-candlestick-chart-testing.d.ts +19 -9
  217. package/types/ngwr-charts-candlestick-chart.d.ts +195 -62
  218. package/types/ngwr-charts-chart-legend.d.ts +142 -5
  219. package/types/ngwr-charts-core.d.ts +259 -21
  220. package/types/ngwr-charts-donut-chart-testing.d.ts +11 -5
  221. package/types/ngwr-charts-donut-chart.d.ts +124 -16
  222. package/types/ngwr-charts-funnel-chart.d.ts +62 -6
  223. package/types/ngwr-charts-gauge-testing.d.ts +5 -1
  224. package/types/ngwr-charts-gauge.d.ts +72 -10
  225. package/types/ngwr-charts-heatmap-chart.d.ts +103 -20
  226. package/types/ngwr-charts-line-chart-testing.d.ts +16 -2
  227. package/types/ngwr-charts-line-chart.d.ts +215 -86
  228. package/types/ngwr-charts-meter-group.d.ts +96 -7
  229. package/types/ngwr-charts-radar-chart-testing.d.ts +14 -3
  230. package/types/ngwr-charts-radar-chart.d.ts +148 -28
  231. package/types/ngwr-charts-scatter-chart-testing.d.ts +22 -10
  232. package/types/ngwr-charts-scatter-chart.d.ts +188 -18
  233. package/types/ngwr-charts-sparkline.d.ts +26 -4
  234. package/types/ngwr-charts-treemap-chart.d.ts +121 -23
  235. package/types/ngwr-charts-waterfall-chart-testing.d.ts +8 -1
  236. package/types/ngwr-charts-waterfall-chart.d.ts +108 -21
  237. package/types/ngwr-color-picker.d.ts +27 -0
  238. package/types/ngwr-context-menu-testing.d.ts +10 -9
  239. package/types/ngwr-context-menu.d.ts +17 -0
  240. package/types/ngwr-copy-value.d.ts +8 -0
  241. package/types/ngwr-date-picker.d.ts +34 -2
  242. package/types/ngwr-dialog.d.ts +30 -10
  243. package/types/ngwr-drawer.d.ts +32 -1
  244. package/types/ngwr-dropdown-testing.d.ts +8 -5
  245. package/types/ngwr-dropdown.d.ts +29 -6
  246. package/types/ngwr-graph.d.ts +22 -6
  247. package/types/ngwr-lightbox.d.ts +15 -0
  248. package/types/ngwr-overlay.d.ts +16 -1
  249. package/types/ngwr-popconfirm-testing.d.ts +11 -2
  250. package/types/ngwr-popconfirm.d.ts +28 -1
  251. package/types/ngwr-popover.d.ts +59 -9
  252. package/types/ngwr-table.d.ts +1 -1
  253. package/types/ngwr-tour.d.ts +21 -2
  254. package/types/ngwr-tree-testing.d.ts +1 -2
  255. package/types/ngwr-tree.d.ts +33 -2
  256. package/types/ngwr-version.d.ts +1 -1
  257. package/types/ngwr-window.d.ts +14 -11
  258. package/window/styles/_index.scss +5 -10
@@ -3,8 +3,8 @@ import { Component, ViewEncapsulation, computed, input, viewChild } from "@angul
3
3
  import { coerceBooleanProperty, coerceNumberProperty } from "@angular/cdk/coercion";
4
4
  import { wrCheckStyles, wrClamp } from "ngwr/utils";
5
5
  import { useI18nText } from "ngwr/i18n";
6
- import { useChartNumbers } from "ngwr/charts/core";
7
- import { useChartTooltip } from "ngwr/popover";
6
+ import { WrChartState, useChartNumbers, useChartState, wrChartRound } from "ngwr/charts/core";
7
+ import { useChartTooltip, wrCoerceChartTooltip } from "ngwr/popover";
8
8
  /**
9
9
  * @license
10
10
  *
@@ -33,27 +33,38 @@ var WrGauge = class WrGauge {
33
33
  ...ngDevMode ? { debugName: "size" } : /* istanbul ignore next */ {},
34
34
  transform: (v) => Math.max(48, coerceNumberProperty(v, 160))
35
35
  });
36
- strokeWidth = input(10, {
36
+ strokeWidth = input(16, {
37
37
  ...ngDevMode ? { debugName: "strokeWidth" } : /* istanbul ignore next */ {},
38
- transform: (v) => Math.max(1, coerceNumberProperty(v, 10))
38
+ transform: (v) => Math.max(1, coerceNumberProperty(v, 16))
39
39
  });
40
- trackColor = input("color-mix(in srgb, var(--wr-border-base) 60%, transparent)", ...ngDevMode ? [{ debugName: "trackColor" }] : /* istanbul ignore next */ []);
41
- valueColor = input("var(--wr-color-primary)", ...ngDevMode ? [{ debugName: "valueColor" }] : /* istanbul ignore next */ []);
40
+ trackColor = input("var(--wr-chart-track)", ...ngDevMode ? [{ debugName: "trackColor" }] : /* istanbul ignore next */ []);
41
+ valueColor = input("var(--wr-chart-1)", ...ngDevMode ? [{ debugName: "valueColor" }] : /* istanbul ignore next */ []);
42
42
  showValue = input(true, {
43
43
  ...ngDevMode ? { debugName: "showValue" } : /* istanbul ignore next */ {},
44
44
  transform: coerceBooleanProperty
45
45
  });
46
46
  suffix = input("", ...ngDevMode ? [{ debugName: "suffix" }] : /* istanbul ignore next */ []);
47
+ loading = input(false, {
48
+ ...ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {},
49
+ transform: coerceBooleanProperty
50
+ });
51
+ error = input(false, {
52
+ ...ngDevMode ? { debugName: "error" } : /* istanbul ignore next */ {},
53
+ transform: coerceBooleanProperty
54
+ });
55
+ loadingLabel = input(null, ...ngDevMode ? [{ debugName: "loadingLabel" }] : /* istanbul ignore next */ []);
56
+ errorLabel = input(null, ...ngDevMode ? [{ debugName: "errorLabel" }] : /* istanbul ignore next */ []);
47
57
  tooltip = input(true, {
48
58
  ...ngDevMode ? { debugName: "tooltip" } : /* istanbul ignore next */ {},
49
- transform: coerceBooleanProperty
59
+ transform: wrCoerceChartTooltip
50
60
  });
51
61
  valueFormat = input(null, ...ngDevMode ? [{ debugName: "valueFormat" }] : /* istanbul ignore next */ []);
52
62
  numbers = useChartNumbers(this.valueFormat);
53
63
  surface = viewChild("surface", ...ngDevMode ? [{ debugName: "surface" }] : /* istanbul ignore next */ []);
54
64
  cx = 50;
55
65
  cy = 50;
56
- radius = computed(() => Math.max(1, 50 - this.strokeWidth() / 2 - .5), ...ngDevMode ? [{ debugName: "radius" }] : /* istanbul ignore next */ []);
66
+ stroke = computed(() => wrChartRound(this.strokeWidth() * 100 / this.size(), 2), ...ngDevMode ? [{ debugName: "stroke" }] : /* istanbul ignore next */ []);
67
+ radius = computed(() => Math.max(1, wrChartRound(50 - this.stroke() / 2 - .5, 2)), ...ngDevMode ? [{ debugName: "radius" }] : /* istanbul ignore next */ []);
57
68
  displayValue = computed(() => wrClamp(this.value(), this.min(), this.max()), ...ngDevMode ? [{ debugName: "displayValue" }] : /* istanbul ignore next */ []);
58
69
  displayText = computed(() => this.numbers.value(this.displayValue()), ...ngDevMode ? [{ debugName: "displayText" }] : /* istanbul ignore next */ []);
59
70
  ratio = computed(() => {
@@ -73,11 +84,19 @@ var WrGauge = class WrGauge {
73
84
  const ey = this.cy - r * Math.sin(angle);
74
85
  return `M ${this.cx - r} ${this.cy} A ${r} ${r} 0 0 1 ${ex.toFixed(2)} ${ey.toFixed(2)}`;
75
86
  }, ...ngDevMode ? [{ debugName: "valuePath" }] : /* istanbul ignore next */ []);
76
- viewBox = "0 0 100 56";
87
+ viewBox = computed(() => `0 0 100 ${wrChartRound(this.cy + this.stroke() / 2 + 1, 2)}`, ...ngDevMode ? [{ debugName: "viewBox" }] : /* istanbul ignore next */ []);
88
+ state = useChartState({
89
+ loading: this.loading,
90
+ error: this.error,
91
+ empty: computed(() => false),
92
+ emptyLabel: computed(() => null),
93
+ loadingLabel: this.loadingLabel,
94
+ errorLabel: this.errorLabel
95
+ });
77
96
  valueText = computed(() => `${this.displayText()}${this.suffix()}`, ...ngDevMode ? [{ debugName: "valueText" }] : /* istanbul ignore next */ []);
78
97
  tip = useChartTooltip(this.tooltip, () => {
79
98
  const el = this.surface()?.nativeElement;
80
- if (!el) return null;
99
+ if (!el || this.state()) return null;
81
100
  return {
82
101
  datum: {
83
102
  label: this.ariaLabel() ?? void 0,
@@ -172,6 +191,34 @@ var WrGauge = class WrGauge {
172
191
  isRequired: false,
173
192
  transformFunction: null
174
193
  },
194
+ loading: {
195
+ classPropertyName: "loading",
196
+ publicName: "loading",
197
+ isSignal: true,
198
+ isRequired: false,
199
+ transformFunction: null
200
+ },
201
+ error: {
202
+ classPropertyName: "error",
203
+ publicName: "error",
204
+ isSignal: true,
205
+ isRequired: false,
206
+ transformFunction: null
207
+ },
208
+ loadingLabel: {
209
+ classPropertyName: "loadingLabel",
210
+ publicName: "loadingLabel",
211
+ isSignal: true,
212
+ isRequired: false,
213
+ transformFunction: null
214
+ },
215
+ errorLabel: {
216
+ classPropertyName: "errorLabel",
217
+ publicName: "errorLabel",
218
+ isSignal: true,
219
+ isRequired: false,
220
+ transformFunction: null
221
+ },
175
222
  tooltip: {
176
223
  classPropertyName: "tooltip",
177
224
  publicName: "tooltip",
@@ -196,7 +243,13 @@ var WrGauge = class WrGauge {
196
243
  isSignal: true
197
244
  }],
198
245
  ngImport: i0,
199
- template: "<!--\n The dial is drawn in an aria-hidden <svg> and the printed value is optional, so\n with `showValue` off the component had no accessible representation at all.\n `role=\"meter\"` plus the value attributes make it readable either way.\n-->\n<div\n #surface\n class=\"wr-gauge__surface\"\n [style.width.px]=\"size()\"\n role=\"meter\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-valuemin]=\"min()\"\n [attr.aria-valuemax]=\"max()\"\n [attr.aria-valuenow]=\"displayValue()\"\n [attr.aria-valuetext]=\"valueText()\"\n (mouseenter)=\"tip.enter(0)\"\n (mouseleave)=\"tip.leave($event)\"\n>\n <svg [attr.viewBox]=\"viewBox\" aria-hidden=\"true\">\n <path\n class=\"wr-gauge__track\"\n [attr.d]=\"trackPath()\"\n fill=\"none\"\n [attr.stroke]=\"trackColor()\"\n [attr.stroke-width]=\"strokeWidth()\"\n stroke-linecap=\"round\"\n />\n <path\n class=\"wr-gauge__value\"\n [attr.d]=\"valuePath()\"\n fill=\"none\"\n [attr.stroke]=\"valueColor()\"\n [attr.stroke-width]=\"strokeWidth()\"\n stroke-linecap=\"round\"\n />\n </svg>\n @if (showValue()) {\n <!--\n `dir=\"auto\"`, as on `wr-knob`'s value: a number and its unit read as one phrase,\n and the browser is the only thing that knows which way that phrase runs. In an\n RTL page the flex row ran right to left, so `72%` was drawn `% 72` and `9.5/10`\n as `10/ 9.5`. `dir=\"auto\"` takes the direction from the first strong character,\n so a Latin or symbol `suffix` keeps the number first, and an Arabic one still\n reads right to left. `unicode-bidi: isolate` does nothing here, since the flip\n happens inside the element; a hard `dir=\"ltr\"` would be wrong for that Arabic\n suffix.\n -->\n <div class=\"wr-gauge__text\" dir=\"auto\">\n {{ displayText() }}<span class=\"wr-gauge__suffix\">{{ suffix() }}</span>\n </div>\n }\n</div>\n",
246
+ template: "<!--\n The dial is drawn in an aria-hidden <svg> and the printed value is optional, so\n with `showValue` off the component had no accessible representation at all.\n `role=\"meter\"` plus the value attributes make it readable either way.\n-->\n@let shown = state();\n<!-- Under a state there is no reading to announce, and a meter with no `aria-valuenow`\n is an invalid one: the surface is a named group, and the message inside it is the\n live region. -->\n<div\n #surface\n class=\"wr-gauge__surface\"\n [style.width.px]=\"size()\"\n [attr.role]=\"shown ? 'group' : 'meter'\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-valuemin]=\"shown ? null : min()\"\n [attr.aria-valuemax]=\"shown ? null : max()\"\n [attr.aria-valuenow]=\"shown ? null : displayValue()\"\n [attr.aria-valuetext]=\"shown ? null : valueText()\"\n (mouseenter)=\"tip.enter(0)\"\n (mouseleave)=\"tip.leave($event)\"\n>\n <!-- `strokeWidth` is in CSS pixels: `stroke()` is the same width in the drawing's own\n units at this `size`, so the arc is as thick on a large gauge as on a small one. -->\n <svg [attr.viewBox]=\"viewBox()\" aria-hidden=\"true\">\n <path\n class=\"wr-gauge__track\"\n [attr.d]=\"trackPath()\"\n fill=\"none\"\n [attr.stroke]=\"trackColor()\"\n [attr.stroke-width]=\"stroke()\"\n stroke-linecap=\"round\"\n />\n @if (!shown) {\n <path\n class=\"wr-gauge__value\"\n [attr.d]=\"valuePath()\"\n fill=\"none\"\n [attr.stroke]=\"valueColor()\"\n [attr.stroke-width]=\"stroke()\"\n stroke-linecap=\"round\"\n />\n }\n </svg>\n @if (shown) {\n <!-- Loading or failed: the message, where the reading was, over the track. -->\n <wr-chart-state [kind]=\"shown.kind\" [label]=\"shown.label\" />\n } @else if (showValue()) {\n <!--\n `dir=\"auto\"`, as on `wr-knob`'s value: a number and its unit read as one phrase,\n and the browser is the only thing that knows which way that phrase runs. In an\n RTL page the flex row ran right to left, so `72%` was drawn `% 72` and `9.5/10`\n as `10/ 9.5`. `dir=\"auto\"` takes the direction from the first strong character,\n so a Latin or symbol `suffix` keeps the number first, and an Arabic one still\n reads right to left. `unicode-bidi: isolate` does nothing here, since the flip\n happens inside the element; a hard `dir=\"ltr\"` would be wrong for that Arabic\n suffix.\n -->\n <div class=\"wr-gauge__text\" dir=\"auto\">\n {{ displayText() }}<span class=\"wr-gauge__suffix\">{{ suffix() }}</span>\n </div>\n }\n</div>\n",
247
+ dependencies: [{
248
+ kind: "component",
249
+ type: WrChartState,
250
+ selector: "wr-chart-state",
251
+ inputs: ["kind", "label"]
252
+ }],
200
253
  encapsulation: i0.ViewEncapsulation.None
201
254
  });
202
255
  };
@@ -211,7 +264,8 @@ i0.ɵɵngDeclareClassMetadata({
211
264
  selector: "wr-gauge",
212
265
  encapsulation: ViewEncapsulation.None,
213
266
  host: { class: "wr-gauge" },
214
- template: "<!--\n The dial is drawn in an aria-hidden <svg> and the printed value is optional, so\n with `showValue` off the component had no accessible representation at all.\n `role=\"meter\"` plus the value attributes make it readable either way.\n-->\n<div\n #surface\n class=\"wr-gauge__surface\"\n [style.width.px]=\"size()\"\n role=\"meter\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-valuemin]=\"min()\"\n [attr.aria-valuemax]=\"max()\"\n [attr.aria-valuenow]=\"displayValue()\"\n [attr.aria-valuetext]=\"valueText()\"\n (mouseenter)=\"tip.enter(0)\"\n (mouseleave)=\"tip.leave($event)\"\n>\n <svg [attr.viewBox]=\"viewBox\" aria-hidden=\"true\">\n <path\n class=\"wr-gauge__track\"\n [attr.d]=\"trackPath()\"\n fill=\"none\"\n [attr.stroke]=\"trackColor()\"\n [attr.stroke-width]=\"strokeWidth()\"\n stroke-linecap=\"round\"\n />\n <path\n class=\"wr-gauge__value\"\n [attr.d]=\"valuePath()\"\n fill=\"none\"\n [attr.stroke]=\"valueColor()\"\n [attr.stroke-width]=\"strokeWidth()\"\n stroke-linecap=\"round\"\n />\n </svg>\n @if (showValue()) {\n <!--\n `dir=\"auto\"`, as on `wr-knob`'s value: a number and its unit read as one phrase,\n and the browser is the only thing that knows which way that phrase runs. In an\n RTL page the flex row ran right to left, so `72%` was drawn `% 72` and `9.5/10`\n as `10/ 9.5`. `dir=\"auto\"` takes the direction from the first strong character,\n so a Latin or symbol `suffix` keeps the number first, and an Arabic one still\n reads right to left. `unicode-bidi: isolate` does nothing here, since the flip\n happens inside the element; a hard `dir=\"ltr\"` would be wrong for that Arabic\n suffix.\n -->\n <div class=\"wr-gauge__text\" dir=\"auto\">\n {{ displayText() }}<span class=\"wr-gauge__suffix\">{{ suffix() }}</span>\n </div>\n }\n</div>\n"
267
+ imports: [WrChartState],
268
+ template: "<!--\n The dial is drawn in an aria-hidden <svg> and the printed value is optional, so\n with `showValue` off the component had no accessible representation at all.\n `role=\"meter\"` plus the value attributes make it readable either way.\n-->\n@let shown = state();\n<!-- Under a state there is no reading to announce, and a meter with no `aria-valuenow`\n is an invalid one: the surface is a named group, and the message inside it is the\n live region. -->\n<div\n #surface\n class=\"wr-gauge__surface\"\n [style.width.px]=\"size()\"\n [attr.role]=\"shown ? 'group' : 'meter'\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-valuemin]=\"shown ? null : min()\"\n [attr.aria-valuemax]=\"shown ? null : max()\"\n [attr.aria-valuenow]=\"shown ? null : displayValue()\"\n [attr.aria-valuetext]=\"shown ? null : valueText()\"\n (mouseenter)=\"tip.enter(0)\"\n (mouseleave)=\"tip.leave($event)\"\n>\n <!-- `strokeWidth` is in CSS pixels: `stroke()` is the same width in the drawing's own\n units at this `size`, so the arc is as thick on a large gauge as on a small one. -->\n <svg [attr.viewBox]=\"viewBox()\" aria-hidden=\"true\">\n <path\n class=\"wr-gauge__track\"\n [attr.d]=\"trackPath()\"\n fill=\"none\"\n [attr.stroke]=\"trackColor()\"\n [attr.stroke-width]=\"stroke()\"\n stroke-linecap=\"round\"\n />\n @if (!shown) {\n <path\n class=\"wr-gauge__value\"\n [attr.d]=\"valuePath()\"\n fill=\"none\"\n [attr.stroke]=\"valueColor()\"\n [attr.stroke-width]=\"stroke()\"\n stroke-linecap=\"round\"\n />\n }\n </svg>\n @if (shown) {\n <!-- Loading or failed: the message, where the reading was, over the track. -->\n <wr-chart-state [kind]=\"shown.kind\" [label]=\"shown.label\" />\n } @else if (showValue()) {\n <!--\n `dir=\"auto\"`, as on `wr-knob`'s value: a number and its unit read as one phrase,\n and the browser is the only thing that knows which way that phrase runs. In an\n RTL page the flex row ran right to left, so `72%` was drawn `% 72` and `9.5/10`\n as `10/ 9.5`. `dir=\"auto\"` takes the direction from the first strong character,\n so a Latin or symbol `suffix` keeps the number first, and an Arabic one still\n reads right to left. `unicode-bidi: isolate` does nothing here, since the flip\n happens inside the element; a hard `dir=\"ltr\"` would be wrong for that Arabic\n suffix.\n -->\n <div class=\"wr-gauge__text\" dir=\"auto\">\n {{ displayText() }}<span class=\"wr-gauge__suffix\">{{ suffix() }}</span>\n </div>\n }\n</div>\n"
215
269
  }]
216
270
  }],
217
271
  ctorParameters: () => [],
@@ -296,6 +350,38 @@ i0.ɵɵngDeclareClassMetadata({
296
350
  required: false
297
351
  }]
298
352
  }],
353
+ loading: [{
354
+ type: i0.Input,
355
+ args: [{
356
+ isSignal: true,
357
+ alias: "loading",
358
+ required: false
359
+ }]
360
+ }],
361
+ error: [{
362
+ type: i0.Input,
363
+ args: [{
364
+ isSignal: true,
365
+ alias: "error",
366
+ required: false
367
+ }]
368
+ }],
369
+ loadingLabel: [{
370
+ type: i0.Input,
371
+ args: [{
372
+ isSignal: true,
373
+ alias: "loadingLabel",
374
+ required: false
375
+ }]
376
+ }],
377
+ errorLabel: [{
378
+ type: i0.Input,
379
+ args: [{
380
+ isSignal: true,
381
+ alias: "errorLabel",
382
+ required: false
383
+ }]
384
+ }],
299
385
  tooltip: [{
300
386
  type: i0.Input,
301
387
  args: [{
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-charts-gauge.mjs","names":[],"sources":["../../../projects/lib/charts/gauge/gauge.ts","../../../projects/lib/charts/gauge/gauge.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, viewChild } from '@angular/core';\n\nimport { useChartNumbers } from 'ngwr/charts/core';\nimport { useI18nText } from 'ngwr/i18n';\nimport { useChartTooltip } from 'ngwr/popover';\nimport { wrClamp, wrCheckStyles } from 'ngwr/utils';\n\n/**\n * Semicircle progress gauge. Display-only — for interactive use see the\n * {@link WrKnob} from `ngwr/knob`.\n *\n * @example\n * ```html\n * <wr-gauge [value]=\"72\" />\n * <wr-gauge [value]=\"9.5\" [min]=\"0\" [max]=\"10\" suffix=\"/10\" valueColor=\"var(--wr-color-warning)\" />\n * ```\n *\n * @see https://ngwr.dev/charts/gauge\n */\n@Component({\n selector: 'wr-gauge',\n templateUrl: './gauge.html',\n encapsulation: ViewEncapsulation.None,\n host: { class: 'wr-gauge' },\n})\nexport class WrGauge {\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('charts/gauge');\n }\n\n /** Accessible name — the role needs one. Falls back to `gauge.label`. */\n readonly ariaLabel = input<string | null>(null);\n\n protected readonly resolvedAriaLabel = useI18nText(this.ariaLabel, 'gauge.label', 'Gauge');\n\n /**\n * The reading. Coerced like every other numeric input here — it was the only one\n * without it, so a NaN reached the arc's `d` as the literal text `NaN`, which is\n * invalid path geometry and drops the arc.\n */\n readonly value = input.required<number, unknown>({\n transform: (v: unknown): number => coerceNumberProperty(v, 0),\n });\n /**\n * Low end of the scale — where the arc starts. Values below it clamp here.\n * @default 0\n */\n readonly min = input(0, { transform: (v: unknown): number => coerceNumberProperty(v, 0) });\n /**\n * High end of the scale — where the arc completes. Values above it clamp here.\n * @default 100\n */\n readonly max = input(100, { transform: (v: unknown): number => coerceNumberProperty(v, 100) });\n\n /** Diameter in CSS pixels. @default 160 */\n readonly size = input(160, { transform: (v: unknown): number => Math.max(48, coerceNumberProperty(v, 160)) });\n\n /** Arc stroke thickness in viewBox units (out of 100). @default 10 */\n readonly strokeWidth = input(10, {\n transform: (v: unknown): number => Math.max(1, coerceNumberProperty(v, 10)),\n });\n\n /**\n * Colour of the unfilled arc behind the value. Any CSS colour; the default is\n * `--wr-border-base` at 60%, which reads as a hairline in both themes.\n * @default color-mix(in srgb, var(--wr-border-base) 60%, transparent)\n */\n readonly trackColor = input<string>('color-mix(in srgb, var(--wr-border-base) 60%, transparent)');\n /**\n * Colour of the filled arc. Any CSS colour — pass an intent token to tie it to\n * a threshold, e.g. `var(--wr-color-danger)` once the value crosses one.\n * @default 'var(--wr-color-primary)'\n */\n readonly valueColor = input<string>('var(--wr-color-primary)');\n\n /** Show the value text in the center. @default true */\n readonly showValue = input(true, { transform: coerceBooleanProperty });\n\n /**\n * Unit printed immediately after the number — `%`, `/10`, ` GB`. It goes into\n * the accessible text too, so the gauge is announced the way it reads.\n */\n readonly suffix = input<string>('');\n\n /**\n * Show a tooltip with the reading on hover, named by `ariaLabel` when one is\n * given. Pointer only — the meter announces the same reading. @default true\n */\n readonly tooltip = input(true, { transform: coerceBooleanProperty });\n\n /**\n * Writes the reading in the centre, the tooltip and `aria-valuetext`, before\n * `suffix`. `null` uses `Intl.NumberFormat` in `LOCALE_ID`. `aria-valuenow` stays a\n * number.\n */\n readonly valueFormat = input<((value: number) => string) | null>(null);\n\n /** The reading as the centre, the tooltip and `aria-valuetext` write it: never compact. */\n private readonly numbers = useChartNumbers(this.valueFormat);\n\n private readonly surface = viewChild<ElementRef<HTMLElement>>('surface');\n\n // Geometry — semicircle in a 100×56 viewBox (centre at 50, 50).\n protected readonly cx = 50;\n protected readonly cy = 50;\n // A negative radius is invalid in the SVG path grammar, so the browser drops the arc\n // and the dial vanishes — which a fat stroke reaches at 99. `wr-knob` floors it too.\n protected readonly radius = computed(() => Math.max(1, 50 - this.strokeWidth() / 2 - 0.5));\n\n /**\n * The reading as it can actually be shown. Only `ratio` used to be clamped, so an\n * over-range value drew a full bar while `aria-valuenow` announced the raw number\n * against `aria-valuemax` — an invalid state for `role=\"meter\"` — and the printed\n * text disagreed with the bar as well.\n */\n protected readonly displayValue = computed(() => wrClamp(this.value(), this.min(), this.max()));\n\n /** The reading as the centre prints it, without the suffix. */\n protected readonly displayText = computed(() => this.numbers.value(this.displayValue()));\n\n protected readonly ratio = computed(() => {\n const range = this.max() - this.min();\n if (range <= 0) return 0;\n return wrClamp((this.value() - this.min()) / range, 0, 1);\n });\n\n protected readonly trackPath = computed(() => {\n const r = this.radius();\n return `M ${this.cx - r} ${this.cy} A ${r} ${r} 0 0 1 ${this.cx + r} ${this.cy}`;\n });\n\n protected readonly valuePath = computed(() => {\n // Nothing to draw at zero. A zero-length arc is not nothing: its round cap paints a\n // dot a stroke wide at the start of the track, so 0 read as a small reading.\n if (this.ratio() === 0) return null;\n const r = this.radius();\n const angle = Math.PI * (1 - this.ratio());\n const ex = this.cx + r * Math.cos(angle);\n const ey = this.cy - r * Math.sin(angle);\n // The arc always spans `π × ratio` radians (≤ 180°), so largeArc stays 0.\n // Previously this was set to 1 when ratio > 0.5, which made the swept arc\n // take the long way round and visually flipped the bar.\n return `M ${this.cx - r} ${this.cy} A ${r} ${r} 0 0 1 ${ex.toFixed(2)} ${ey.toFixed(2)}`;\n });\n\n protected readonly viewBox = '0 0 100 56';\n\n /**\n * The reading as the meter announces it — `aria-valuetext`, the number plus the\n * suffix — so the tooltip, the printed value and a screen reader all say one\n * thing.\n */\n protected readonly valueText = computed(() => `${this.displayText()}${this.suffix()}`);\n\n /**\n * One tooltip, pointing at the top of the dial. The whole gauge is one section.\n * The label is the `ariaLabel` input and not the catalog fallback, which names\n * the kind of widget rather than the reading.\n */\n protected readonly tip = useChartTooltip(this.tooltip, () => {\n const el = this.surface()?.nativeElement;\n if (!el) return null;\n return {\n datum: { label: this.ariaLabel() ?? undefined, value: this.valueText(), color: this.valueColor() },\n anchor: el,\n };\n });\n}\n","<!--\n The dial is drawn in an aria-hidden <svg> and the printed value is optional, so\n with `showValue` off the component had no accessible representation at all.\n `role=\"meter\"` plus the value attributes make it readable either way.\n-->\n<div\n #surface\n class=\"wr-gauge__surface\"\n [style.width.px]=\"size()\"\n role=\"meter\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-valuemin]=\"min()\"\n [attr.aria-valuemax]=\"max()\"\n [attr.aria-valuenow]=\"displayValue()\"\n [attr.aria-valuetext]=\"valueText()\"\n (mouseenter)=\"tip.enter(0)\"\n (mouseleave)=\"tip.leave($event)\"\n>\n <svg [attr.viewBox]=\"viewBox\" aria-hidden=\"true\">\n <path\n class=\"wr-gauge__track\"\n [attr.d]=\"trackPath()\"\n fill=\"none\"\n [attr.stroke]=\"trackColor()\"\n [attr.stroke-width]=\"strokeWidth()\"\n stroke-linecap=\"round\"\n />\n <path\n class=\"wr-gauge__value\"\n [attr.d]=\"valuePath()\"\n fill=\"none\"\n [attr.stroke]=\"valueColor()\"\n [attr.stroke-width]=\"strokeWidth()\"\n stroke-linecap=\"round\"\n />\n </svg>\n @if (showValue()) {\n <!--\n `dir=\"auto\"`, as on `wr-knob`'s value: a number and its unit read as one phrase,\n and the browser is the only thing that knows which way that phrase runs. In an\n RTL page the flex row ran right to left, so `72%` was drawn `% 72` and `9.5/10`\n as `10/ 9.5`. `dir=\"auto\"` takes the direction from the first strong character,\n so a Latin or symbol `suffix` keeps the number first, and an Arabic one still\n reads right to left. `unicode-bidi: isolate` does nothing here, since the flip\n happens inside the element; a hard `dir=\"ltr\"` would be wrong for that Arabic\n suffix.\n -->\n <div class=\"wr-gauge__text\" dir=\"auto\">\n {{ displayText() }}<span class=\"wr-gauge__suffix\">{{ suffix() }}</span>\n </div>\n }\n</div>\n"],"mappings":";;;;;;;;;;;;;AAiCA,IAAa,UAAb,MAAa,QAAO;CAClB,cAAA;EACE,IAAI,OAAO,cAAc,eAAe,WAAW,cAAc,cAAc;CACjF;CAGS,YAAY,MAAqB,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAE5B,oBAAoB,YAAY,KAAK,WAAW,eAAe,OAAO;CAOhF,QAAQ,MAAM,SAAQ;EAAA,GAAA,YAAA,EAAA,WAAA,QAAA,+BAAA,CAAA;EAC7B,YAAY,MAAuB,qBAAqB,GAAG,CAAC;CAAC,CAAA;CAMtD,MAAM,MAAM,GAAC;EAAA,GAAA,YAAA,EAAA,WAAA,MAAA,+BAAA,CAAA;EAAI,YAAY,MAAuB,qBAAqB,GAAG,CAAC;CAAC,CAAA;CAK9E,MAAM,MAAM,KAAG;EAAA,GAAA,YAAA,EAAA,WAAA,MAAA,+BAAA,CAAA;EAAI,YAAY,MAAuB,qBAAqB,GAAG,G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AAA,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,YAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,YAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,QAAA,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,SAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,WAAS,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
1
+ {"version":3,"file":"ngwr-charts-gauge.mjs","names":[],"sources":["../../../projects/lib/charts/gauge/gauge.ts","../../../projects/lib/charts/gauge/gauge.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, viewChild } from '@angular/core';\n\nimport { WrChartState, useChartNumbers, useChartState, wrChartRound } from 'ngwr/charts/core';\nimport { useI18nText } from 'ngwr/i18n';\nimport { useChartTooltip, wrCoerceChartTooltip } from 'ngwr/popover';\nimport { wrClamp, wrCheckStyles } from 'ngwr/utils';\n\n/**\n * Semicircle progress gauge. Display-only — for interactive use see the\n * {@link WrKnob} from `ngwr/knob`.\n *\n * @example\n * ```html\n * <wr-gauge [value]=\"72\" />\n * <wr-gauge [value]=\"9.5\" [min]=\"0\" [max]=\"10\" suffix=\"/10\" valueColor=\"var(--wr-color-warning)\" />\n * ```\n *\n * **The look is the chart theme's.** The arc is the first colour of the chart palette\n * (`--wr-chart-1`) over a track in `--wr-chart-track`, and `strokeWidth` is in CSS pixels,\n * so two gauges of different sizes draw the same arc. `valueColor` takes any colour: a\n * palette token, or an intent once the reading crosses a threshold.\n *\n * **Loading and error.** `loading` and `error` put their message in place of the reading,\n * over the track; the gauge is a named group rather than a meter while it has no reading\n * to announce.\n *\n * @see https://ngwr.dev/charts/gauge\n */\n@Component({\n selector: 'wr-gauge',\n templateUrl: './gauge.html',\n encapsulation: ViewEncapsulation.None,\n host: { class: 'wr-gauge' },\n imports: [WrChartState],\n})\nexport class WrGauge {\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('charts/gauge');\n }\n\n /** Accessible name — the role needs one. Falls back to `gauge.label`. */\n readonly ariaLabel = input<string | null>(null);\n\n protected readonly resolvedAriaLabel = useI18nText(this.ariaLabel, 'gauge.label', 'Gauge');\n\n /**\n * The reading. Coerced like every other numeric input here — it was the only one\n * without it, so a NaN reached the arc's `d` as the literal text `NaN`, which is\n * invalid path geometry and drops the arc.\n */\n readonly value = input.required<number, unknown>({\n transform: (v: unknown): number => coerceNumberProperty(v, 0),\n });\n /**\n * Low end of the scale — where the arc starts. Values below it clamp here.\n * @default 0\n */\n readonly min = input(0, { transform: (v: unknown): number => coerceNumberProperty(v, 0) });\n /**\n * High end of the scale — where the arc completes. Values above it clamp here.\n * @default 100\n */\n readonly max = input(100, { transform: (v: unknown): number => coerceNumberProperty(v, 100) });\n\n /** Diameter in CSS pixels. @default 160 */\n readonly size = input(160, { transform: (v: unknown): number => Math.max(48, coerceNumberProperty(v, 160)) });\n\n /**\n * Arc stroke thickness in CSS pixels, the same at any `size`. It was a share of the\n * drawing until 16.5, so a gauge twice the size drew an arc twice as thick.\n * @default 16\n */\n readonly strokeWidth = input(16, {\n transform: (v: unknown): number => Math.max(1, coerceNumberProperty(v, 16)),\n });\n\n /**\n * Colour of the unfilled arc behind the value. Any CSS colour; the default is the\n * chart theme's track, shared with the meter group and the bullet chart.\n * @default 'var(--wr-chart-track)'\n */\n readonly trackColor = input<string>('var(--wr-chart-track)');\n /**\n * Colour of the filled arc. Any CSS colour: the default is the first colour of the\n * chart palette; pass another (`var(--wr-chart-3)`), or an intent token to tie it to\n * a threshold, e.g. `var(--wr-color-danger)` once the value crosses one.\n * @default 'var(--wr-chart-1)'\n */\n readonly valueColor = input<string>('var(--wr-chart-1)');\n\n /** Show the value text in the center. @default true */\n readonly showValue = input(true, { transform: coerceBooleanProperty });\n\n /**\n * Unit printed immediately after the number — `%`, `/10`, ` GB`. It goes into\n * the accessible text too, so the gauge is announced the way it reads.\n */\n readonly suffix = input<string>('');\n\n /**\n * A request for the reading is in flight: the arc and the number give way to the\n * loading message, over the track. @default false\n */\n readonly loading = input(false, { transform: coerceBooleanProperty });\n\n /**\n * The reading failed to load: the arc and the number give way to the error message.\n * `loading` wins while both are set. @default false\n */\n readonly error = input(false, { transform: coerceBooleanProperty });\n\n /** The message shown while `loading`. Falls back to `chart.loading`, then `'Loading…'`. */\n readonly loadingLabel = input<string | null>(null);\n\n /** The message shown on `error`. Falls back to `chart.error`, then `'Could not load'`. */\n readonly errorLabel = input<string | null>(null);\n\n /**\n * Show a tooltip with the reading on hover, named by `ariaLabel` when one is given.\n * Pointer only — the meter announces the same reading.\n *\n * By default the pointer passes under the chip to the chart, so the next section\n * answers at once and the chip closes off the chart; `'hoverable'` lets the pointer\n * rest on the chip instead, as WCAG 1.4.13 asks of a hint. @default true\n */\n readonly tooltip = input<boolean | 'hoverable', unknown>(true, { transform: wrCoerceChartTooltip });\n\n /**\n * Writes the reading in the centre, the tooltip and `aria-valuetext`, before\n * `suffix`. `null` uses `Intl.NumberFormat` in `LOCALE_ID`. `aria-valuenow` stays a\n * number.\n */\n readonly valueFormat = input<((value: number) => string) | null>(null);\n\n /** The reading as the centre, the tooltip and `aria-valuetext` write it: never compact. */\n private readonly numbers = useChartNumbers(this.valueFormat);\n\n private readonly surface = viewChild<ElementRef<HTMLElement>>('surface');\n\n // Geometry — a semicircle in a viewBox 100 wide (centre at 50, 50), as tall as the arc's\n // round caps reach below the centre: 56 at the default stroke.\n protected readonly cx = 50;\n protected readonly cy = 50;\n\n /**\n * The stroke in the viewBox's units. The drawing is `size` px wide and 100 units wide,\n * so a width in pixels is that many hundredths of `size`: worked out from the input\n * rather than measured, since the surface is laid out at exactly `size`, and the radius\n * and the viewBox depend on it, which a non-scaling stroke would leave behind.\n */\n protected readonly stroke = computed(() => wrChartRound((this.strokeWidth() * 100) / this.size(), 2));\n\n // A negative radius is invalid in the SVG path grammar, so the browser drops the arc\n // and the dial vanishes — which a fat stroke reaches at 99 units. `wr-knob` floors it too.\n protected readonly radius = computed(() => Math.max(1, wrChartRound(50 - this.stroke() / 2 - 0.5, 2)));\n\n /**\n * The reading as it can actually be shown. Only `ratio` used to be clamped, so an\n * over-range value drew a full bar while `aria-valuenow` announced the raw number\n * against `aria-valuemax` — an invalid state for `role=\"meter\"` — and the printed\n * text disagreed with the bar as well.\n */\n protected readonly displayValue = computed(() => wrClamp(this.value(), this.min(), this.max()));\n\n /** The reading as the centre prints it, without the suffix. */\n protected readonly displayText = computed(() => this.numbers.value(this.displayValue()));\n\n protected readonly ratio = computed(() => {\n const range = this.max() - this.min();\n if (range <= 0) return 0;\n return wrClamp((this.value() - this.min()) / range, 0, 1);\n });\n\n protected readonly trackPath = computed(() => {\n const r = this.radius();\n return `M ${this.cx - r} ${this.cy} A ${r} ${r} 0 0 1 ${this.cx + r} ${this.cy}`;\n });\n\n protected readonly valuePath = computed(() => {\n // Nothing to draw at zero. A zero-length arc is not nothing: its round cap paints a\n // dot a stroke wide at the start of the track, so 0 read as a small reading.\n if (this.ratio() === 0) return null;\n const r = this.radius();\n const angle = Math.PI * (1 - this.ratio());\n const ex = this.cx + r * Math.cos(angle);\n const ey = this.cy - r * Math.sin(angle);\n // The arc always spans `π × ratio` radians (≤ 180°), so largeArc stays 0.\n // Previously this was set to 1 when ratio > 0.5, which made the swept arc\n // take the long way round and visually flipped the bar.\n return `M ${this.cx - r} ${this.cy} A ${r} ${r} 0 0 1 ${ex.toFixed(2)} ${ey.toFixed(2)}`;\n });\n\n /** A unit past the caps, which end half a stroke below the centre. */\n protected readonly viewBox = computed(() => `0 0 100 ${wrChartRound(this.cy + this.stroke() / 2 + 1, 2)}`);\n\n /** Loading, or a failed load, or `null` while the gauge shows its reading. A gauge always has a value, so it is never empty. */\n protected readonly state = useChartState({\n loading: this.loading,\n error: this.error,\n empty: computed(() => false),\n emptyLabel: computed(() => null),\n loadingLabel: this.loadingLabel,\n errorLabel: this.errorLabel,\n });\n\n /**\n * The reading as the meter announces it — `aria-valuetext`, the number plus the\n * suffix — so the tooltip, the printed value and a screen reader all say one\n * thing.\n */\n protected readonly valueText = computed(() => `${this.displayText()}${this.suffix()}`);\n\n /**\n * One tooltip, pointing at the top of the dial. The whole gauge is one section.\n * The label is the `ariaLabel` input and not the catalog fallback, which names\n * the kind of widget rather than the reading.\n */\n protected readonly tip = useChartTooltip(this.tooltip, () => {\n const el = this.surface()?.nativeElement;\n // No reading to show under a state: its message is already on the dial.\n if (!el || this.state()) return null;\n return {\n datum: { label: this.ariaLabel() ?? undefined, value: this.valueText(), color: this.valueColor() },\n anchor: el,\n };\n });\n}\n","<!--\n The dial is drawn in an aria-hidden <svg> and the printed value is optional, so\n with `showValue` off the component had no accessible representation at all.\n `role=\"meter\"` plus the value attributes make it readable either way.\n-->\n@let shown = state();\n<!-- Under a state there is no reading to announce, and a meter with no `aria-valuenow`\n is an invalid one: the surface is a named group, and the message inside it is the\n live region. -->\n<div\n #surface\n class=\"wr-gauge__surface\"\n [style.width.px]=\"size()\"\n [attr.role]=\"shown ? 'group' : 'meter'\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-valuemin]=\"shown ? null : min()\"\n [attr.aria-valuemax]=\"shown ? null : max()\"\n [attr.aria-valuenow]=\"shown ? null : displayValue()\"\n [attr.aria-valuetext]=\"shown ? null : valueText()\"\n (mouseenter)=\"tip.enter(0)\"\n (mouseleave)=\"tip.leave($event)\"\n>\n <!-- `strokeWidth` is in CSS pixels: `stroke()` is the same width in the drawing's own\n units at this `size`, so the arc is as thick on a large gauge as on a small one. -->\n <svg [attr.viewBox]=\"viewBox()\" aria-hidden=\"true\">\n <path\n class=\"wr-gauge__track\"\n [attr.d]=\"trackPath()\"\n fill=\"none\"\n [attr.stroke]=\"trackColor()\"\n [attr.stroke-width]=\"stroke()\"\n stroke-linecap=\"round\"\n />\n @if (!shown) {\n <path\n class=\"wr-gauge__value\"\n [attr.d]=\"valuePath()\"\n fill=\"none\"\n [attr.stroke]=\"valueColor()\"\n [attr.stroke-width]=\"stroke()\"\n stroke-linecap=\"round\"\n />\n }\n </svg>\n @if (shown) {\n <!-- Loading or failed: the message, where the reading was, over the track. -->\n <wr-chart-state [kind]=\"shown.kind\" [label]=\"shown.label\" />\n } @else if (showValue()) {\n <!--\n `dir=\"auto\"`, as on `wr-knob`'s value: a number and its unit read as one phrase,\n and the browser is the only thing that knows which way that phrase runs. In an\n RTL page the flex row ran right to left, so `72%` was drawn `% 72` and `9.5/10`\n as `10/ 9.5`. `dir=\"auto\"` takes the direction from the first strong character,\n so a Latin or symbol `suffix` keeps the number first, and an Arabic one still\n reads right to left. `unicode-bidi: isolate` does nothing here, since the flip\n happens inside the element; a hard `dir=\"ltr\"` would be wrong for that Arabic\n suffix.\n -->\n <div class=\"wr-gauge__text\" dir=\"auto\">\n {{ displayText() }}<span class=\"wr-gauge__suffix\">{{ suffix() }}</span>\n </div>\n }\n</div>\n"],"mappings":";;;;;;;;;;;;;AA2CA,IAAa,UAAb,MAAa,QAAO;CAClB,cAAA;EACE,IAAI,OAAO,cAAc,eAAe,WAAW,cAAc,cAAc;CACjF;CAGS,YAAY,MAAqB,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAE5B,oBAAoB,YAAY,KAAK,WAAW,eAAe,OAAO;CAOhF,QAAQ,MAAM,SAAQ;EAAA,GAAA,YAAA,EAAA,WAAA,QAAA,+BAAA,CAAA;EAC7B,YAAY,MAAuB,qBAAqB,GAAG,CAAC;CAAC,CAAA;CAMtD,MAAM,MAAM,GAAC;EAAA,GAAA,YAAA,EAAA,WAAA,MAAA,+BAAA,CAAA;EAAI,YAAY,MAAuB,qBAAqB,GAAG,CAAC;CAAC,CAAA;CAK9E,MAAM,MAAM,KAAG;EAAA,GAAA,YAAA,EAAA,WAAA,MAAA,+BAAA,CAAA;EAAI,YAAY,MAAuB,qBAAqB,GAAG,GAAG;CAAC,CAAA;CAGlF,OAAO,MAAM,KAAG;EAAA,GAAA,YAAA,EAAA,WAAA,OAAA,+BAAA,CAAA;EAAI,YAAY,MAAuB,KAAK,IAAI,IAAI,qBAAqB,GAAG,GAAG,CAAC;CAAC,CAAA;CAOjG,cAAc,MAAM,IAAE;EAAA,GAAA,YAAA,EAAA,WAAA,cAAA,+BAAA,CAAA;EAC7B,YAAY,MAAuB,KAAK,IAAI,GAAG,qBAAqB,GAAG,EAAE,CAAC;CAAC,CAAA;CAQpE,aAAa,MAAc,yBAAwB,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;CAOnD,aAAa,MAAc,qBAAoB,GAAA,YAA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