@vadem/ui 0.0.0-stage → 0.0.1

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 (289) hide show
  1. package/LICENSE-lucide.txt +43 -0
  2. package/README.md +19 -2
  3. package/fesm2022/vadem-ui-accordion.mjs +139 -0
  4. package/fesm2022/vadem-ui-accordion.mjs.map +1 -0
  5. package/fesm2022/vadem-ui-active-filters.mjs +355 -0
  6. package/fesm2022/vadem-ui-active-filters.mjs.map +1 -0
  7. package/fesm2022/vadem-ui-alert-dialog.mjs +433 -0
  8. package/fesm2022/vadem-ui-alert-dialog.mjs.map +1 -0
  9. package/fesm2022/vadem-ui-alert.mjs +266 -0
  10. package/fesm2022/vadem-ui-alert.mjs.map +1 -0
  11. package/fesm2022/vadem-ui-autocomplete.mjs +715 -0
  12. package/fesm2022/vadem-ui-autocomplete.mjs.map +1 -0
  13. package/fesm2022/vadem-ui-avatar.mjs +219 -0
  14. package/fesm2022/vadem-ui-avatar.mjs.map +1 -0
  15. package/fesm2022/vadem-ui-badge.mjs +86 -0
  16. package/fesm2022/vadem-ui-badge.mjs.map +1 -0
  17. package/fesm2022/vadem-ui-breadcrumbs.mjs +61 -0
  18. package/fesm2022/vadem-ui-breadcrumbs.mjs.map +1 -0
  19. package/fesm2022/vadem-ui-button.mjs +220 -0
  20. package/fesm2022/vadem-ui-button.mjs.map +1 -0
  21. package/fesm2022/vadem-ui-calendar.mjs +1314 -0
  22. package/fesm2022/vadem-ui-calendar.mjs.map +1 -0
  23. package/fesm2022/vadem-ui-card.mjs +271 -0
  24. package/fesm2022/vadem-ui-card.mjs.map +1 -0
  25. package/fesm2022/vadem-ui-character-count.mjs +269 -0
  26. package/fesm2022/vadem-ui-character-count.mjs.map +1 -0
  27. package/fesm2022/vadem-ui-chart.mjs +1984 -0
  28. package/fesm2022/vadem-ui-chart.mjs.map +1 -0
  29. package/fesm2022/vadem-ui-checkbox.mjs +67 -0
  30. package/fesm2022/vadem-ui-checkbox.mjs.map +1 -0
  31. package/fesm2022/vadem-ui-color-picker.mjs +815 -0
  32. package/fesm2022/vadem-ui-color-picker.mjs.map +1 -0
  33. package/fesm2022/vadem-ui-command.mjs +735 -0
  34. package/fesm2022/vadem-ui-command.mjs.map +1 -0
  35. package/fesm2022/vadem-ui-copy-button.mjs +375 -0
  36. package/fesm2022/vadem-ui-copy-button.mjs.map +1 -0
  37. package/fesm2022/vadem-ui-date-range-picker.mjs +1011 -0
  38. package/fesm2022/vadem-ui-date-range-picker.mjs.map +1 -0
  39. package/fesm2022/vadem-ui-description-list.mjs +59 -0
  40. package/fesm2022/vadem-ui-description-list.mjs.map +1 -0
  41. package/fesm2022/vadem-ui-dialog.mjs +587 -0
  42. package/fesm2022/vadem-ui-dialog.mjs.map +1 -0
  43. package/fesm2022/vadem-ui-dropzone.mjs +176 -0
  44. package/fesm2022/vadem-ui-dropzone.mjs.map +1 -0
  45. package/fesm2022/vadem-ui-editable-text.mjs +641 -0
  46. package/fesm2022/vadem-ui-editable-text.mjs.map +1 -0
  47. package/fesm2022/vadem-ui-empty-state.mjs +175 -0
  48. package/fesm2022/vadem-ui-empty-state.mjs.map +1 -0
  49. package/fesm2022/vadem-ui-expandable-text.mjs +244 -0
  50. package/fesm2022/vadem-ui-expandable-text.mjs.map +1 -0
  51. package/fesm2022/vadem-ui-field.mjs +583 -0
  52. package/fesm2022/vadem-ui-field.mjs.map +1 -0
  53. package/fesm2022/vadem-ui-file-preview.mjs +532 -0
  54. package/fesm2022/vadem-ui-file-preview.mjs.map +1 -0
  55. package/fesm2022/vadem-ui-file-size.mjs +83 -0
  56. package/fesm2022/vadem-ui-file-size.mjs.map +1 -0
  57. package/fesm2022/vadem-ui-form-error-summary.mjs +201 -0
  58. package/fesm2022/vadem-ui-form-error-summary.mjs.map +1 -0
  59. package/fesm2022/vadem-ui-icon.mjs +303 -0
  60. package/fesm2022/vadem-ui-icon.mjs.map +1 -0
  61. package/fesm2022/vadem-ui-input.mjs +120 -0
  62. package/fesm2022/vadem-ui-input.mjs.map +1 -0
  63. package/fesm2022/vadem-ui-kbd.mjs +286 -0
  64. package/fesm2022/vadem-ui-kbd.mjs.map +1 -0
  65. package/fesm2022/vadem-ui-keyboard.mjs +105 -0
  66. package/fesm2022/vadem-ui-keyboard.mjs.map +1 -0
  67. package/fesm2022/vadem-ui-locale.mjs +443 -0
  68. package/fesm2022/vadem-ui-locale.mjs.map +1 -0
  69. package/fesm2022/vadem-ui-menu.mjs +637 -0
  70. package/fesm2022/vadem-ui-menu.mjs.map +1 -0
  71. package/fesm2022/vadem-ui-navigation-list.mjs +130 -0
  72. package/fesm2022/vadem-ui-navigation-list.mjs.map +1 -0
  73. package/fesm2022/vadem-ui-number-input.mjs +264 -0
  74. package/fesm2022/vadem-ui-number-input.mjs.map +1 -0
  75. package/fesm2022/vadem-ui-otp-input.mjs +86 -0
  76. package/fesm2022/vadem-ui-otp-input.mjs.map +1 -0
  77. package/fesm2022/vadem-ui-pagination.mjs +353 -0
  78. package/fesm2022/vadem-ui-pagination.mjs.map +1 -0
  79. package/fesm2022/vadem-ui-password-input.mjs +213 -0
  80. package/fesm2022/vadem-ui-password-input.mjs.map +1 -0
  81. package/fesm2022/vadem-ui-popover.mjs +178 -0
  82. package/fesm2022/vadem-ui-popover.mjs.map +1 -0
  83. package/fesm2022/vadem-ui-progress.mjs +331 -0
  84. package/fesm2022/vadem-ui-progress.mjs.map +1 -0
  85. package/fesm2022/vadem-ui-radio.mjs +39 -0
  86. package/fesm2022/vadem-ui-radio.mjs.map +1 -0
  87. package/fesm2022/vadem-ui-range-slider.mjs +561 -0
  88. package/fesm2022/vadem-ui-range-slider.mjs.map +1 -0
  89. package/fesm2022/vadem-ui-rating.mjs +404 -0
  90. package/fesm2022/vadem-ui-rating.mjs.map +1 -0
  91. package/fesm2022/vadem-ui-relative-time.mjs +217 -0
  92. package/fesm2022/vadem-ui-relative-time.mjs.map +1 -0
  93. package/fesm2022/vadem-ui-reorder-list.mjs +601 -0
  94. package/fesm2022/vadem-ui-reorder-list.mjs.map +1 -0
  95. package/fesm2022/vadem-ui-scroll-area.mjs +65 -0
  96. package/fesm2022/vadem-ui-scroll-area.mjs.map +1 -0
  97. package/fesm2022/vadem-ui-search-input.mjs +307 -0
  98. package/fesm2022/vadem-ui-search-input.mjs.map +1 -0
  99. package/fesm2022/vadem-ui-segmented.mjs +297 -0
  100. package/fesm2022/vadem-ui-segmented.mjs.map +1 -0
  101. package/fesm2022/vadem-ui-select.mjs +1462 -0
  102. package/fesm2022/vadem-ui-select.mjs.map +1 -0
  103. package/fesm2022/vadem-ui-sidebar.mjs +493 -0
  104. package/fesm2022/vadem-ui-sidebar.mjs.map +1 -0
  105. package/fesm2022/vadem-ui-skeleton.mjs +106 -0
  106. package/fesm2022/vadem-ui-skeleton.mjs.map +1 -0
  107. package/fesm2022/vadem-ui-slider.mjs +60 -0
  108. package/fesm2022/vadem-ui-slider.mjs.map +1 -0
  109. package/fesm2022/vadem-ui-splitter.mjs +438 -0
  110. package/fesm2022/vadem-ui-splitter.mjs.map +1 -0
  111. package/fesm2022/vadem-ui-stat.mjs +369 -0
  112. package/fesm2022/vadem-ui-stat.mjs.map +1 -0
  113. package/fesm2022/vadem-ui-stepper.mjs +483 -0
  114. package/fesm2022/vadem-ui-stepper.mjs.map +1 -0
  115. package/fesm2022/vadem-ui-switch.mjs +45 -0
  116. package/fesm2022/vadem-ui-switch.mjs.map +1 -0
  117. package/fesm2022/vadem-ui-table.mjs +593 -0
  118. package/fesm2022/vadem-ui-table.mjs.map +1 -0
  119. package/fesm2022/vadem-ui-tabs.mjs +405 -0
  120. package/fesm2022/vadem-ui-tabs.mjs.map +1 -0
  121. package/fesm2022/vadem-ui-tag-input.mjs +685 -0
  122. package/fesm2022/vadem-ui-tag-input.mjs.map +1 -0
  123. package/fesm2022/vadem-ui-text-highlight.mjs +126 -0
  124. package/fesm2022/vadem-ui-text-highlight.mjs.map +1 -0
  125. package/fesm2022/vadem-ui-time-input.mjs +430 -0
  126. package/fesm2022/vadem-ui-time-input.mjs.map +1 -0
  127. package/fesm2022/vadem-ui-timeline.mjs +313 -0
  128. package/fesm2022/vadem-ui-timeline.mjs.map +1 -0
  129. package/fesm2022/vadem-ui-toast.mjs +397 -0
  130. package/fesm2022/vadem-ui-toast.mjs.map +1 -0
  131. package/fesm2022/vadem-ui-toolbar.mjs +396 -0
  132. package/fesm2022/vadem-ui-toolbar.mjs.map +1 -0
  133. package/fesm2022/vadem-ui-tooltip.mjs +218 -0
  134. package/fesm2022/vadem-ui-tooltip.mjs.map +1 -0
  135. package/fesm2022/vadem-ui-tree.mjs +551 -0
  136. package/fesm2022/vadem-ui-tree.mjs.map +1 -0
  137. package/fesm2022/vadem-ui-upload-list.mjs +408 -0
  138. package/fesm2022/vadem-ui-upload-list.mjs.map +1 -0
  139. package/fesm2022/vadem-ui.mjs +4 -0
  140. package/fesm2022/vadem-ui.mjs.map +1 -0
  141. package/fonts/jetbrains-mono/OFL.txt +93 -0
  142. package/fonts/jetbrains-mono/jetbrains-mono-cyrillic.woff2 +0 -0
  143. package/fonts/jetbrains-mono/jetbrains-mono-latin.woff2 +0 -0
  144. package/fonts/manrope/OFL.txt +93 -0
  145. package/fonts/manrope/manrope-cyrillic.woff2 +0 -0
  146. package/fonts/manrope/manrope-latin.woff2 +0 -0
  147. package/package.json +306 -3
  148. package/styles/base.css +160 -0
  149. package/styles/components/accordion.css +130 -0
  150. package/styles/components/active-filters.css +42 -0
  151. package/styles/components/alert-dialog.css +34 -0
  152. package/styles/components/alert.css +159 -0
  153. package/styles/components/autocomplete.css +97 -0
  154. package/styles/components/avatar.css +90 -0
  155. package/styles/components/badge.css +91 -0
  156. package/styles/components/breadcrumbs.css +94 -0
  157. package/styles/components/button.css +174 -0
  158. package/styles/components/calendar.css +186 -0
  159. package/styles/components/card.css +206 -0
  160. package/styles/components/character-count.css +41 -0
  161. package/styles/components/chart.css +308 -0
  162. package/styles/components/checkbox.css +115 -0
  163. package/styles/components/color-picker.css +158 -0
  164. package/styles/components/command.css +175 -0
  165. package/styles/components/copy-button.css +58 -0
  166. package/styles/components/date-range-picker.css +153 -0
  167. package/styles/components/description-list.css +69 -0
  168. package/styles/components/dialog.css +334 -0
  169. package/styles/components/dropzone.css +89 -0
  170. package/styles/components/editable-text.css +58 -0
  171. package/styles/components/empty-state.css +72 -0
  172. package/styles/components/expandable-text.css +24 -0
  173. package/styles/components/field.css +148 -0
  174. package/styles/components/file-preview.css +65 -0
  175. package/styles/components/form-error-summary.css +71 -0
  176. package/styles/components/icon.css +38 -0
  177. package/styles/components/index.css +80 -0
  178. package/styles/components/input.css +171 -0
  179. package/styles/components/kbd.css +42 -0
  180. package/styles/components/menu.css +168 -0
  181. package/styles/components/multi-select.css +156 -0
  182. package/styles/components/navigation-list.css +147 -0
  183. package/styles/components/number-input.css +33 -0
  184. package/styles/components/otp-input.css +26 -0
  185. package/styles/components/pagination.css +127 -0
  186. package/styles/components/password-input.css +20 -0
  187. package/styles/components/popover.css +93 -0
  188. package/styles/components/progress-ring.css +112 -0
  189. package/styles/components/progress.css +162 -0
  190. package/styles/components/radio.css +117 -0
  191. package/styles/components/range-slider.css +158 -0
  192. package/styles/components/rating.css +100 -0
  193. package/styles/components/reorder-list.css +143 -0
  194. package/styles/components/scroll-area.css +39 -0
  195. package/styles/components/search-input.css +25 -0
  196. package/styles/components/segmented.css +136 -0
  197. package/styles/components/select.css +257 -0
  198. package/styles/components/sidebar.css +105 -0
  199. package/styles/components/skeleton.css +83 -0
  200. package/styles/components/slider.css +132 -0
  201. package/styles/components/splitter.css +83 -0
  202. package/styles/components/stat.css +62 -0
  203. package/styles/components/stepper.css +236 -0
  204. package/styles/components/switch.css +107 -0
  205. package/styles/components/table.css +195 -0
  206. package/styles/components/tabs.css +198 -0
  207. package/styles/components/tag-input.css +138 -0
  208. package/styles/components/text-highlight.css +22 -0
  209. package/styles/components/time-input.css +96 -0
  210. package/styles/components/timeline.css +182 -0
  211. package/styles/components/toast.css +146 -0
  212. package/styles/components/toolbar.css +72 -0
  213. package/styles/components/tooltip.css +93 -0
  214. package/styles/components/tree.css +88 -0
  215. package/styles/components/upload-list.css +113 -0
  216. package/styles/fonts.css +67 -0
  217. package/styles/index.css +14 -0
  218. package/styles/reset.css +57 -0
  219. package/styles/tokens/primitives.css +364 -0
  220. package/styles/tokens/semantic.css +233 -0
  221. package/types/vadem-ui-accordion.d.ts +43 -0
  222. package/types/vadem-ui-active-filters.d.ts +73 -0
  223. package/types/vadem-ui-alert-dialog.d.ts +87 -0
  224. package/types/vadem-ui-alert.d.ts +64 -0
  225. package/types/vadem-ui-autocomplete.d.ts +156 -0
  226. package/types/vadem-ui-avatar.d.ts +59 -0
  227. package/types/vadem-ui-badge.d.ts +25 -0
  228. package/types/vadem-ui-breadcrumbs.d.ts +22 -0
  229. package/types/vadem-ui-button.d.ts +52 -0
  230. package/types/vadem-ui-calendar.d.ts +327 -0
  231. package/types/vadem-ui-card.d.ts +58 -0
  232. package/types/vadem-ui-character-count.d.ts +71 -0
  233. package/types/vadem-ui-chart.d.ts +452 -0
  234. package/types/vadem-ui-checkbox.d.ts +20 -0
  235. package/types/vadem-ui-color-picker.d.ts +171 -0
  236. package/types/vadem-ui-command.d.ts +145 -0
  237. package/types/vadem-ui-copy-button.d.ts +90 -0
  238. package/types/vadem-ui-date-range-picker.d.ts +216 -0
  239. package/types/vadem-ui-description-list.d.ts +15 -0
  240. package/types/vadem-ui-dialog.d.ts +174 -0
  241. package/types/vadem-ui-dropzone.d.ts +73 -0
  242. package/types/vadem-ui-editable-text.d.ts +141 -0
  243. package/types/vadem-ui-empty-state.d.ts +34 -0
  244. package/types/vadem-ui-expandable-text.d.ts +52 -0
  245. package/types/vadem-ui-field.d.ts +180 -0
  246. package/types/vadem-ui-file-preview.d.ts +108 -0
  247. package/types/vadem-ui-file-size.d.ts +18 -0
  248. package/types/vadem-ui-form-error-summary.d.ts +46 -0
  249. package/types/vadem-ui-icon.d.ts +152 -0
  250. package/types/vadem-ui-input.d.ts +31 -0
  251. package/types/vadem-ui-kbd.d.ts +66 -0
  252. package/types/vadem-ui-keyboard.d.ts +61 -0
  253. package/types/vadem-ui-locale.d.ts +241 -0
  254. package/types/vadem-ui-menu.d.ts +132 -0
  255. package/types/vadem-ui-navigation-list.d.ts +28 -0
  256. package/types/vadem-ui-number-input.d.ts +39 -0
  257. package/types/vadem-ui-otp-input.d.ts +15 -0
  258. package/types/vadem-ui-pagination.d.ts +96 -0
  259. package/types/vadem-ui-password-input.d.ts +36 -0
  260. package/types/vadem-ui-popover.d.ts +48 -0
  261. package/types/vadem-ui-progress.d.ts +95 -0
  262. package/types/vadem-ui-radio.d.ts +11 -0
  263. package/types/vadem-ui-range-slider.d.ts +136 -0
  264. package/types/vadem-ui-rating.d.ts +95 -0
  265. package/types/vadem-ui-relative-time.d.ts +58 -0
  266. package/types/vadem-ui-reorder-list.d.ts +120 -0
  267. package/types/vadem-ui-scroll-area.d.ts +13 -0
  268. package/types/vadem-ui-search-input.d.ts +58 -0
  269. package/types/vadem-ui-segmented.d.ts +76 -0
  270. package/types/vadem-ui-select.d.ts +303 -0
  271. package/types/vadem-ui-sidebar.d.ts +70 -0
  272. package/types/vadem-ui-skeleton.d.ts +28 -0
  273. package/types/vadem-ui-slider.d.ts +17 -0
  274. package/types/vadem-ui-splitter.d.ts +99 -0
  275. package/types/vadem-ui-stat.d.ts +101 -0
  276. package/types/vadem-ui-stepper.d.ts +108 -0
  277. package/types/vadem-ui-switch.d.ts +10 -0
  278. package/types/vadem-ui-table.d.ts +172 -0
  279. package/types/vadem-ui-tabs.d.ts +101 -0
  280. package/types/vadem-ui-tag-input.d.ts +170 -0
  281. package/types/vadem-ui-text-highlight.d.ts +27 -0
  282. package/types/vadem-ui-time-input.d.ts +47 -0
  283. package/types/vadem-ui-timeline.d.ts +54 -0
  284. package/types/vadem-ui-toast.d.ts +104 -0
  285. package/types/vadem-ui-toolbar.d.ts +80 -0
  286. package/types/vadem-ui-tooltip.d.ts +71 -0
  287. package/types/vadem-ui-tree.d.ts +123 -0
  288. package/types/vadem-ui-upload-list.d.ts +70 -0
  289. package/types/vadem-ui.d.ts +1 -0
@@ -0,0 +1,1984 @@
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, DestroyRef, Directive, ViewEncapsulation, afterNextRender, booleanAttribute, computed, inject, input, numberAttribute, output, signal, viewChild } from "@angular/core";
3
+ import { VD_LOCALE, vdTexts } from "@vadem/ui/locale";
4
+ import { VdButton } from "@vadem/ui/button";
5
+ import { vdUniqueId } from "@vadem/ui/field";
6
+ function linearScale(domain, range) {
7
+ const [d0, d1] = domain;
8
+ const [r0, r1] = range;
9
+ const span = d1 - d0 || 1;
10
+ const scale = ((value) => r0 + (value - d0) / span * (r1 - r0));
11
+ return Object.assign(scale, {
12
+ domain,
13
+ range
14
+ });
15
+ }
16
+ function niceTicks(min, max, target = 5) {
17
+ const lo = Math.min(0, min);
18
+ const hi = Math.max(0, max);
19
+ if (lo === hi) return [0, 1];
20
+ const raw = (hi - lo) / Math.max(1, target);
21
+ const power = 10 ** Math.floor(Math.log10(raw));
22
+ const step = [
23
+ 1,
24
+ 2,
25
+ 2.5,
26
+ 5,
27
+ 10
28
+ ].map((m) => m * power).find((s) => s >= raw) ?? 10 * power;
29
+ const start = Math.floor(lo / step) * step;
30
+ const end = Math.ceil(hi / step) * step;
31
+ const ticks = [];
32
+ for (let v = start; v <= end + step / 2; v += step) ticks.push(Number(v.toFixed(10)));
33
+ return ticks;
34
+ }
35
+ function bands(count, range) {
36
+ const [r0, r1] = range;
37
+ const step = count > 0 ? (r1 - r0) / count : 0;
38
+ return Array.from({ length: count }, (_, i) => ({
39
+ start: r0 + i * step,
40
+ center: r0 + (i + .5) * step,
41
+ step
42
+ }));
43
+ }
44
+ function nearestIndex(position, count, range) {
45
+ if (count <= 0) return -1;
46
+ const [r0, r1] = range;
47
+ const t = (position - r0) / (r1 - r0 || 1);
48
+ return Math.min(count - 1, Math.max(0, Math.floor(t * count)));
49
+ }
50
+ function stack(series, count) {
51
+ const up = new Array(count).fill(0);
52
+ const down = new Array(count).fill(0);
53
+ return series.map((s) => Array.from({ length: count }, (_, i) => {
54
+ const v = s.values[i] ?? 0;
55
+ if (v >= 0) {
56
+ const seg = {
57
+ from: up[i],
58
+ to: up[i] + v
59
+ };
60
+ up[i] += v;
61
+ return seg;
62
+ }
63
+ const seg = {
64
+ from: down[i],
65
+ to: down[i] + v
66
+ };
67
+ down[i] += v;
68
+ return seg;
69
+ }));
70
+ }
71
+ function extent(series, count, stacked) {
72
+ let min = 0;
73
+ let max = 0;
74
+ if (stacked) for (const segments of stack(series, count)) for (const seg of segments) {
75
+ min = Math.min(min, seg.to);
76
+ max = Math.max(max, seg.to);
77
+ }
78
+ else for (const s of series) for (const v of s.values) {
79
+ if (v === null || !Number.isFinite(v)) continue;
80
+ min = Math.min(min, v);
81
+ max = Math.max(max, v);
82
+ }
83
+ return [min, max];
84
+ }
85
+ const r = (n) => Math.round(n * 100) / 100;
86
+ function barPath(center, thickness, base, end, radius, orientation) {
87
+ const length = Math.abs(end - base);
88
+ if (length < .5) return "";
89
+ const rad = Math.min(radius, thickness / 2, length);
90
+ const a = center - thickness / 2;
91
+ const b = center + thickness / 2;
92
+ const tip = end - (end < base ? -1 : 1) * rad;
93
+ if (orientation === "vertical") return [
94
+ `M${r(a)},${r(base)}`,
95
+ `L${r(a)},${r(tip)}`,
96
+ `Q${r(a)},${r(end)} ${r(a + rad)},${r(end)}`,
97
+ `L${r(b - rad)},${r(end)}`,
98
+ `Q${r(b)},${r(end)} ${r(b)},${r(tip)}`,
99
+ `L${r(b)},${r(base)}`,
100
+ "Z"
101
+ ].join(" ");
102
+ return [
103
+ `M${r(base)},${r(a)}`,
104
+ `L${r(tip)},${r(a)}`,
105
+ `Q${r(end)},${r(a)} ${r(end)},${r(a + rad)}`,
106
+ `L${r(end)},${r(b - rad)}`,
107
+ `Q${r(end)},${r(b)} ${r(tip)},${r(b)}`,
108
+ `L${r(base)},${r(b)}`,
109
+ "Z"
110
+ ].join(" ");
111
+ }
112
+ function linePath(points) {
113
+ let d = "";
114
+ let pen = false;
115
+ for (const p of points) {
116
+ if (!p) {
117
+ pen = false;
118
+ continue;
119
+ }
120
+ d += `${pen ? "L" : "M"}${r(p[0])},${r(p[1])}`;
121
+ pen = true;
122
+ }
123
+ return d;
124
+ }
125
+ function areaPath(points, baseline) {
126
+ const runs = [[]];
127
+ for (const p of points) if (p) runs[runs.length - 1].push(p);
128
+ else if (runs[runs.length - 1].length) runs.push([]);
129
+ return runs.filter((run) => run.length > 1).map((run) => `M${r(run[0][0])},${r(baseline)}` + run.map(([x, y]) => `L${r(x)},${r(y)}`).join("") + `L${r(run[run.length - 1][0])},${r(baseline)}Z`).join("");
130
+ }
131
+ function seriesSlot(index, count) {
132
+ return count === 1 ? "accent" : String(index % 8 + 1);
133
+ }
134
+ var VdChartFrame = class VdChartFrame {
135
+ title = input.required(...ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []);
136
+ description = input(...ngDevMode ? [void 0, { debugName: "description" }] : /* istanbul ignore next */ []);
137
+ categories = input([], ...ngDevMode ? [{ debugName: "categories" }] : /* istanbul ignore next */ []);
138
+ series = input([], ...ngDevMode ? [{ debugName: "series" }] : /* istanbul ignore next */ []);
139
+ kind = input("bar", ...ngDevMode ? [{ debugName: "kind" }] : /* istanbul ignore next */ []);
140
+ format = input(...ngDevMode ? [void 0, { debugName: "format" }] : /* istanbul ignore next */ []);
141
+ categoryLabel = input(...ngDevMode ? [void 0, { debugName: "categoryLabel" }] : /* istanbul ignore next */ []);
142
+ active = input(-1, ...ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []);
143
+ tooltipX = input(null, ...ngDevMode ? [{ debugName: "tooltipX" }] : /* istanbul ignore next */ []);
144
+ tooltipY = input(0, ...ngDevMode ? [{ debugName: "tooltipY" }] : /* istanbul ignore next */ []);
145
+ tableLabel = input(...ngDevMode ? [void 0, { debugName: "tableLabel" }] : /* istanbul ignore next */ []);
146
+ loading = input(false, ...ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []);
147
+ t = vdTexts("chart", {
148
+ tableLabel: this.tableLabel,
149
+ categoryLabel: this.categoryLabel
150
+ });
151
+ locale = inject(VD_LOCALE);
152
+ titleId = vdUniqueId("vd-chart-title");
153
+ tableId = vdUniqueId("vd-chart-table");
154
+ tableShown = signal(false, ...ngDevMode ? [{ debugName: "tableShown" }] : /* istanbul ignore next */ []);
155
+ width = signal(0, ...ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []);
156
+ pointerLeave = output();
157
+ plot = viewChild.required("plot", ...ngDevMode ? [{ debugName: "plot" }] : /* istanbul ignore next */ []);
158
+ numberFormat = computed(() => new Intl.NumberFormat(this.locale.code), ...ngDevMode ? [{ debugName: "numberFormat" }] : /* istanbul ignore next */ []);
159
+ constructor() {
160
+ const destroyRef = inject(DestroyRef);
161
+ afterNextRender(() => {
162
+ const el = this.plot().nativeElement;
163
+ const view = el.ownerDocument.defaultView;
164
+ const measure = () => this.width.set(el.clientWidth);
165
+ measure();
166
+ if (!view?.ResizeObserver) return;
167
+ const observer = new view.ResizeObserver(measure);
168
+ observer.observe(el);
169
+ destroyRef.onDestroy(() => observer.disconnect());
170
+ });
171
+ }
172
+ slot(index) {
173
+ return seriesSlot(index, this.series().length);
174
+ }
175
+ valueText(value) {
176
+ if (value === null || value === void 0 || !Number.isFinite(value)) return "—";
177
+ return (this.format() ?? ((v) => this.numberFormat().format(v)))(value);
178
+ }
179
+ leave() {
180
+ this.pointerLeave.emit();
181
+ }
182
+ tooltipSide = computed(() => (this.tooltipX() ?? 0) > this.width() / 2 ? "start" : "end", ...ngDevMode ? [{ debugName: "tooltipSide" }] : /* istanbul ignore next */ []);
183
+ static ɵfac = i0.ɵɵngDeclareFactory({
184
+ minVersion: "12.0.0",
185
+ version: "22.2.1",
186
+ ngImport: i0,
187
+ type: VdChartFrame,
188
+ deps: [],
189
+ target: i0.ɵɵFactoryTarget.Component
190
+ });
191
+ static ɵcmp = i0.ɵɵngDeclareComponent({
192
+ minVersion: "17.0.0",
193
+ version: "22.2.1",
194
+ type: VdChartFrame,
195
+ isStandalone: true,
196
+ selector: "vd-chart-frame",
197
+ inputs: {
198
+ title: {
199
+ classPropertyName: "title",
200
+ publicName: "title",
201
+ isSignal: true,
202
+ isRequired: true,
203
+ transformFunction: null
204
+ },
205
+ description: {
206
+ classPropertyName: "description",
207
+ publicName: "description",
208
+ isSignal: true,
209
+ isRequired: false,
210
+ transformFunction: null
211
+ },
212
+ categories: {
213
+ classPropertyName: "categories",
214
+ publicName: "categories",
215
+ isSignal: true,
216
+ isRequired: false,
217
+ transformFunction: null
218
+ },
219
+ series: {
220
+ classPropertyName: "series",
221
+ publicName: "series",
222
+ isSignal: true,
223
+ isRequired: false,
224
+ transformFunction: null
225
+ },
226
+ kind: {
227
+ classPropertyName: "kind",
228
+ publicName: "kind",
229
+ isSignal: true,
230
+ isRequired: false,
231
+ transformFunction: null
232
+ },
233
+ format: {
234
+ classPropertyName: "format",
235
+ publicName: "format",
236
+ isSignal: true,
237
+ isRequired: false,
238
+ transformFunction: null
239
+ },
240
+ categoryLabel: {
241
+ classPropertyName: "categoryLabel",
242
+ publicName: "categoryLabel",
243
+ isSignal: true,
244
+ isRequired: false,
245
+ transformFunction: null
246
+ },
247
+ active: {
248
+ classPropertyName: "active",
249
+ publicName: "active",
250
+ isSignal: true,
251
+ isRequired: false,
252
+ transformFunction: null
253
+ },
254
+ tooltipX: {
255
+ classPropertyName: "tooltipX",
256
+ publicName: "tooltipX",
257
+ isSignal: true,
258
+ isRequired: false,
259
+ transformFunction: null
260
+ },
261
+ tooltipY: {
262
+ classPropertyName: "tooltipY",
263
+ publicName: "tooltipY",
264
+ isSignal: true,
265
+ isRequired: false,
266
+ transformFunction: null
267
+ },
268
+ tableLabel: {
269
+ classPropertyName: "tableLabel",
270
+ publicName: "tableLabel",
271
+ isSignal: true,
272
+ isRequired: false,
273
+ transformFunction: null
274
+ },
275
+ loading: {
276
+ classPropertyName: "loading",
277
+ publicName: "loading",
278
+ isSignal: true,
279
+ isRequired: false,
280
+ transformFunction: null
281
+ }
282
+ },
283
+ outputs: { pointerLeave: "pointerLeave" },
284
+ host: { classAttribute: "vd-chart" },
285
+ viewQueries: [{
286
+ propertyName: "plot",
287
+ first: true,
288
+ predicate: ["plot"],
289
+ descendants: true,
290
+ isSignal: true
291
+ }],
292
+ ngImport: i0,
293
+ template: `
294
+ <figure
295
+ class="vd-chart__figure"
296
+ [attr.aria-labelledby]="titleId"
297
+ [attr.aria-busy]="loading() || null"
298
+ [attr.data-loading]="loading() ? '' : null"
299
+ >
300
+ <figcaption class="vd-chart__head">
301
+ <span class="vd-chart__title" [id]="titleId">{{ title() }}</span>
302
+ @if (description()) {
303
+ <span class="vd-chart__description">{{ description() }}</span>
304
+ }
305
+ </figcaption>
306
+ <div class="vd-chart__toolbar">
307
+ @if (series().length > 1) {
308
+ <ul class="vd-chart__legend" role="list">
309
+ @for (s of series(); track $index) {
310
+ <li class="vd-chart__legend-item">
311
+ <span
312
+ class="vd-chart__key"
313
+ aria-hidden="true"
314
+ [attr.data-series]="slot($index)"
315
+ [attr.data-kind]="kind()"
316
+ ></span>
317
+ {{ s.name }}
318
+ </li>
319
+ }
320
+ </ul>
321
+ }
322
+ <button
323
+ vdButton
324
+ type="button"
325
+ variant="ghost"
326
+ size="sm"
327
+ class="vd-chart__table-toggle"
328
+ [attr.aria-pressed]="tableShown()"
329
+ [attr.aria-controls]="tableId"
330
+ (click)="tableShown.set(!tableShown())"
331
+ >
332
+ {{ t().tableLabel }}
333
+ </button>
334
+ </div>
335
+
336
+ <div #plot class="vd-chart__plot" [hidden]="tableShown()" (pointerleave)="leave()">
337
+ <ng-content />
338
+ @if (active() >= 0 && tooltipX() !== null) {
339
+ <div
340
+ class="vd-chart__tooltip"
341
+ role="presentation"
342
+ aria-hidden="true"
343
+ [attr.data-side]="tooltipSide()"
344
+ [style.--vd-chart-tip-x.px]="tooltipX()"
345
+ [style.--vd-chart-tip-y.px]="tooltipY()"
346
+ >
347
+ <span class="vd-chart__tooltip-category" dir="auto">{{ categories()[active()] }}</span>
348
+ @for (s of series(); track $index) {
349
+ <span class="vd-chart__tooltip-row">
350
+ <span
351
+ class="vd-chart__key"
352
+ [attr.data-series]="slot($index)"
353
+ data-kind="line"
354
+ ></span>
355
+ <strong class="vd-chart__tooltip-value">{{ valueText(s.values[active()]) }}</strong>
356
+ <span class="vd-chart__tooltip-name" dir="auto">{{ s.name }}</span>
357
+ </span>
358
+ }
359
+ </div>
360
+ }
361
+ </div>
362
+
363
+ <div
364
+ class="vd-chart__table-wrap"
365
+ role="region"
366
+ tabindex="0"
367
+ [id]="tableId"
368
+ [attr.aria-labelledby]="titleId"
369
+ [hidden]="!tableShown()"
370
+ >
371
+ @if (tableShown()) {
372
+ <table class="vd-chart__table">
373
+ <thead>
374
+ <tr>
375
+ <th scope="col">{{ t().categoryLabel }}</th>
376
+ @for (s of series(); track $index) {
377
+ <th scope="col">{{ s.name }}</th>
378
+ }
379
+ </tr>
380
+ </thead>
381
+ <tbody>
382
+ @for (c of categories(); track $index; let i = $index) {
383
+ <tr>
384
+ <th scope="row">{{ c }}</th>
385
+ @for (s of series(); track $index) {
386
+ <td>{{ valueText(s.values[i]) }}</td>
387
+ }
388
+ </tr>
389
+ }
390
+ </tbody>
391
+ </table>
392
+ }
393
+ </div>
394
+ </figure>
395
+ `,
396
+ isInline: true,
397
+ dependencies: [{
398
+ kind: "component",
399
+ type: VdButton,
400
+ selector: "button[vdButton], a[vdButton]",
401
+ inputs: [
402
+ "variant",
403
+ "size",
404
+ "disabled",
405
+ "loading",
406
+ "iconOnly",
407
+ "type"
408
+ ]
409
+ }],
410
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
411
+ encapsulation: i0.ViewEncapsulation.None
412
+ });
413
+ };
414
+ i0.ɵɵngDeclareClassMetadata({
415
+ minVersion: "12.0.0",
416
+ version: "22.2.1",
417
+ ngImport: i0,
418
+ type: VdChartFrame,
419
+ decorators: [{
420
+ type: Component,
421
+ args: [{
422
+ selector: "vd-chart-frame",
423
+ imports: [VdButton],
424
+ changeDetection: ChangeDetectionStrategy.OnPush,
425
+ encapsulation: ViewEncapsulation.None,
426
+ host: { class: "vd-chart" },
427
+ template: `
428
+ <figure
429
+ class="vd-chart__figure"
430
+ [attr.aria-labelledby]="titleId"
431
+ [attr.aria-busy]="loading() || null"
432
+ [attr.data-loading]="loading() ? '' : null"
433
+ >
434
+ <figcaption class="vd-chart__head">
435
+ <span class="vd-chart__title" [id]="titleId">{{ title() }}</span>
436
+ @if (description()) {
437
+ <span class="vd-chart__description">{{ description() }}</span>
438
+ }
439
+ </figcaption>
440
+ <div class="vd-chart__toolbar">
441
+ @if (series().length > 1) {
442
+ <ul class="vd-chart__legend" role="list">
443
+ @for (s of series(); track $index) {
444
+ <li class="vd-chart__legend-item">
445
+ <span
446
+ class="vd-chart__key"
447
+ aria-hidden="true"
448
+ [attr.data-series]="slot($index)"
449
+ [attr.data-kind]="kind()"
450
+ ></span>
451
+ {{ s.name }}
452
+ </li>
453
+ }
454
+ </ul>
455
+ }
456
+ <button
457
+ vdButton
458
+ type="button"
459
+ variant="ghost"
460
+ size="sm"
461
+ class="vd-chart__table-toggle"
462
+ [attr.aria-pressed]="tableShown()"
463
+ [attr.aria-controls]="tableId"
464
+ (click)="tableShown.set(!tableShown())"
465
+ >
466
+ {{ t().tableLabel }}
467
+ </button>
468
+ </div>
469
+
470
+ <div #plot class="vd-chart__plot" [hidden]="tableShown()" (pointerleave)="leave()">
471
+ <ng-content />
472
+ @if (active() >= 0 && tooltipX() !== null) {
473
+ <div
474
+ class="vd-chart__tooltip"
475
+ role="presentation"
476
+ aria-hidden="true"
477
+ [attr.data-side]="tooltipSide()"
478
+ [style.--vd-chart-tip-x.px]="tooltipX()"
479
+ [style.--vd-chart-tip-y.px]="tooltipY()"
480
+ >
481
+ <span class="vd-chart__tooltip-category" dir="auto">{{ categories()[active()] }}</span>
482
+ @for (s of series(); track $index) {
483
+ <span class="vd-chart__tooltip-row">
484
+ <span
485
+ class="vd-chart__key"
486
+ [attr.data-series]="slot($index)"
487
+ data-kind="line"
488
+ ></span>
489
+ <strong class="vd-chart__tooltip-value">{{ valueText(s.values[active()]) }}</strong>
490
+ <span class="vd-chart__tooltip-name" dir="auto">{{ s.name }}</span>
491
+ </span>
492
+ }
493
+ </div>
494
+ }
495
+ </div>
496
+
497
+ <div
498
+ class="vd-chart__table-wrap"
499
+ role="region"
500
+ tabindex="0"
501
+ [id]="tableId"
502
+ [attr.aria-labelledby]="titleId"
503
+ [hidden]="!tableShown()"
504
+ >
505
+ @if (tableShown()) {
506
+ <table class="vd-chart__table">
507
+ <thead>
508
+ <tr>
509
+ <th scope="col">{{ t().categoryLabel }}</th>
510
+ @for (s of series(); track $index) {
511
+ <th scope="col">{{ s.name }}</th>
512
+ }
513
+ </tr>
514
+ </thead>
515
+ <tbody>
516
+ @for (c of categories(); track $index; let i = $index) {
517
+ <tr>
518
+ <th scope="row">{{ c }}</th>
519
+ @for (s of series(); track $index) {
520
+ <td>{{ valueText(s.values[i]) }}</td>
521
+ }
522
+ </tr>
523
+ }
524
+ </tbody>
525
+ </table>
526
+ }
527
+ </div>
528
+ </figure>
529
+ `
530
+ }]
531
+ }],
532
+ ctorParameters: () => [],
533
+ propDecorators: {
534
+ title: [{
535
+ type: i0.Input,
536
+ args: [{
537
+ isSignal: true,
538
+ alias: "title",
539
+ required: true
540
+ }]
541
+ }],
542
+ description: [{
543
+ type: i0.Input,
544
+ args: [{
545
+ isSignal: true,
546
+ alias: "description",
547
+ required: false
548
+ }]
549
+ }],
550
+ categories: [{
551
+ type: i0.Input,
552
+ args: [{
553
+ isSignal: true,
554
+ alias: "categories",
555
+ required: false
556
+ }]
557
+ }],
558
+ series: [{
559
+ type: i0.Input,
560
+ args: [{
561
+ isSignal: true,
562
+ alias: "series",
563
+ required: false
564
+ }]
565
+ }],
566
+ kind: [{
567
+ type: i0.Input,
568
+ args: [{
569
+ isSignal: true,
570
+ alias: "kind",
571
+ required: false
572
+ }]
573
+ }],
574
+ format: [{
575
+ type: i0.Input,
576
+ args: [{
577
+ isSignal: true,
578
+ alias: "format",
579
+ required: false
580
+ }]
581
+ }],
582
+ categoryLabel: [{
583
+ type: i0.Input,
584
+ args: [{
585
+ isSignal: true,
586
+ alias: "categoryLabel",
587
+ required: false
588
+ }]
589
+ }],
590
+ active: [{
591
+ type: i0.Input,
592
+ args: [{
593
+ isSignal: true,
594
+ alias: "active",
595
+ required: false
596
+ }]
597
+ }],
598
+ tooltipX: [{
599
+ type: i0.Input,
600
+ args: [{
601
+ isSignal: true,
602
+ alias: "tooltipX",
603
+ required: false
604
+ }]
605
+ }],
606
+ tooltipY: [{
607
+ type: i0.Input,
608
+ args: [{
609
+ isSignal: true,
610
+ alias: "tooltipY",
611
+ required: false
612
+ }]
613
+ }],
614
+ tableLabel: [{
615
+ type: i0.Input,
616
+ args: [{
617
+ isSignal: true,
618
+ alias: "tableLabel",
619
+ required: false
620
+ }]
621
+ }],
622
+ loading: [{
623
+ type: i0.Input,
624
+ args: [{
625
+ isSignal: true,
626
+ alias: "loading",
627
+ required: false
628
+ }]
629
+ }],
630
+ pointerLeave: [{
631
+ type: i0.Output,
632
+ args: ["pointerLeave"]
633
+ }],
634
+ plot: [{
635
+ type: i0.ViewChild,
636
+ args: ["plot", { isSignal: true }]
637
+ }]
638
+ }
639
+ });
640
+ const CHAR_PX = 6.8;
641
+ const AXIS_FONT_GAP = 8;
642
+ var VdChartBase = class VdChartBase {
643
+ title = input.required(...ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []);
644
+ description = input(...ngDevMode ? [void 0, { debugName: "description" }] : /* istanbul ignore next */ []);
645
+ categories = input([], ...ngDevMode ? [{ debugName: "categories" }] : /* istanbul ignore next */ []);
646
+ series = input([], ...ngDevMode ? [{ debugName: "series" }] : /* istanbul ignore next */ []);
647
+ height = input(240, {
648
+ ...ngDevMode ? { debugName: "height" } : /* istanbul ignore next */ {},
649
+ transform: numberAttribute
650
+ });
651
+ format = input(...ngDevMode ? [void 0, { debugName: "format" }] : /* istanbul ignore next */ []);
652
+ axisFormat = input(...ngDevMode ? [void 0, { debugName: "axisFormat" }] : /* istanbul ignore next */ []);
653
+ categoryLabel = input(...ngDevMode ? [void 0, { debugName: "categoryLabel" }] : /* istanbul ignore next */ []);
654
+ loading = input(false, {
655
+ ...ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {},
656
+ transform: booleanAttribute
657
+ });
658
+ frame = viewChild.required(VdChartFrame, ...ngDevMode ? [{ debugName: "frame" }] : /* istanbul ignore next */ []);
659
+ active = signal(-1, ...ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []);
660
+ focusIndex = signal(0, ...ngDevMode ? [{ debugName: "focusIndex" }] : /* istanbul ignore next */ []);
661
+ count = computed(() => this.categories().length, ...ngDevMode ? [{ debugName: "count" }] : /* istanbul ignore next */ []);
662
+ width = computed(() => this.frame().width(), ...ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []);
663
+ ticks = computed(() => {
664
+ const [min, max] = this.extentOf();
665
+ return niceTicks(min, max, Math.max(2, Math.round(this.height() / 60)));
666
+ }, ...ngDevMode ? [{ debugName: "ticks" }] : /* istanbul ignore next */ []);
667
+ compact = computed(() => new Intl.NumberFormat(this.localeCode(), {
668
+ notation: "compact",
669
+ maximumFractionDigits: 1
670
+ }), ...ngDevMode ? [{ debugName: "compact" }] : /* istanbul ignore next */ []);
671
+ locale = inject(VD_LOCALE);
672
+ localeCode() {
673
+ return this.locale.code;
674
+ }
675
+ tickText(value) {
676
+ return (this.axisFormat() ?? ((v) => this.compact().format(v)))(value);
677
+ }
678
+ tickWidth = computed(() => Math.max(...this.ticks().map((t) => this.tickText(t).length), 1) * CHAR_PX + AXIS_FONT_GAP, ...ngDevMode ? [{ debugName: "tickWidth" }] : /* istanbul ignore next */ []);
679
+ categoryWidth = computed(() => Math.max(...this.categories().map((c) => c.length), 1) * CHAR_PX + AXIS_FONT_GAP, ...ngDevMode ? [{ debugName: "categoryWidth" }] : /* istanbul ignore next */ []);
680
+ valueScale(range) {
681
+ const ticks = this.ticks();
682
+ return linearScale([ticks[0], ticks[ticks.length - 1]], range);
683
+ }
684
+ slot(index) {
685
+ return seriesSlot(index, this.series().length);
686
+ }
687
+ pointLabel(index) {
688
+ const values = this.series().map((s) => `${s.name} ${this.frame().valueText(s.values[index])}`).join(", ");
689
+ return `${this.categories()[index]}: ${values}`;
690
+ }
691
+ labelEvery(available) {
692
+ const per = this.categoryWidth();
693
+ const fit = Math.max(1, Math.floor(available / per));
694
+ return Math.max(1, Math.ceil(this.count() / fit));
695
+ }
696
+ pointerAt(position, range) {
697
+ this.active.set(nearestIndex(position, this.count(), range));
698
+ }
699
+ onKeydown(event, index) {
700
+ const last = this.count() - 1;
701
+ const next = {
702
+ ArrowRight: index + 1,
703
+ ArrowDown: index + 1,
704
+ ArrowLeft: index - 1,
705
+ ArrowUp: index - 1,
706
+ Home: 0,
707
+ End: last
708
+ }[event.key] ?? null;
709
+ if (next === null) return;
710
+ event.preventDefault();
711
+ const target = Math.min(last, Math.max(0, next));
712
+ this.focusIndex.set(target);
713
+ event.currentTarget.parentElement?.querySelector(`[data-index="${target}"]`)?.focus();
714
+ }
715
+ onFocus(index) {
716
+ this.focusIndex.set(index);
717
+ this.active.set(index);
718
+ }
719
+ onBlur(event) {
720
+ if (!event.relatedTarget?.closest(".vd-chart__hits")) this.active.set(-1);
721
+ }
722
+ static ɵfac = i0.ɵɵngDeclareFactory({
723
+ minVersion: "12.0.0",
724
+ version: "22.2.1",
725
+ ngImport: i0,
726
+ type: VdChartBase,
727
+ deps: [],
728
+ target: i0.ɵɵFactoryTarget.Directive
729
+ });
730
+ static ɵdir = i0.ɵɵngDeclareDirective({
731
+ minVersion: "17.2.0",
732
+ version: "22.2.1",
733
+ type: VdChartBase,
734
+ isStandalone: true,
735
+ inputs: {
736
+ title: {
737
+ classPropertyName: "title",
738
+ publicName: "title",
739
+ isSignal: true,
740
+ isRequired: true,
741
+ transformFunction: null
742
+ },
743
+ description: {
744
+ classPropertyName: "description",
745
+ publicName: "description",
746
+ isSignal: true,
747
+ isRequired: false,
748
+ transformFunction: null
749
+ },
750
+ categories: {
751
+ classPropertyName: "categories",
752
+ publicName: "categories",
753
+ isSignal: true,
754
+ isRequired: false,
755
+ transformFunction: null
756
+ },
757
+ series: {
758
+ classPropertyName: "series",
759
+ publicName: "series",
760
+ isSignal: true,
761
+ isRequired: false,
762
+ transformFunction: null
763
+ },
764
+ height: {
765
+ classPropertyName: "height",
766
+ publicName: "height",
767
+ isSignal: true,
768
+ isRequired: false,
769
+ transformFunction: null
770
+ },
771
+ format: {
772
+ classPropertyName: "format",
773
+ publicName: "format",
774
+ isSignal: true,
775
+ isRequired: false,
776
+ transformFunction: null
777
+ },
778
+ axisFormat: {
779
+ classPropertyName: "axisFormat",
780
+ publicName: "axisFormat",
781
+ isSignal: true,
782
+ isRequired: false,
783
+ transformFunction: null
784
+ },
785
+ categoryLabel: {
786
+ classPropertyName: "categoryLabel",
787
+ publicName: "categoryLabel",
788
+ isSignal: true,
789
+ isRequired: false,
790
+ transformFunction: null
791
+ },
792
+ loading: {
793
+ classPropertyName: "loading",
794
+ publicName: "loading",
795
+ isSignal: true,
796
+ isRequired: false,
797
+ transformFunction: null
798
+ }
799
+ },
800
+ viewQueries: [{
801
+ propertyName: "frame",
802
+ first: true,
803
+ predicate: VdChartFrame,
804
+ descendants: true,
805
+ isSignal: true
806
+ }],
807
+ ngImport: i0
808
+ });
809
+ };
810
+ i0.ɵɵngDeclareClassMetadata({
811
+ minVersion: "12.0.0",
812
+ version: "22.2.1",
813
+ ngImport: i0,
814
+ type: VdChartBase,
815
+ decorators: [{ type: Directive }],
816
+ propDecorators: {
817
+ title: [{
818
+ type: i0.Input,
819
+ args: [{
820
+ isSignal: true,
821
+ alias: "title",
822
+ required: true
823
+ }]
824
+ }],
825
+ description: [{
826
+ type: i0.Input,
827
+ args: [{
828
+ isSignal: true,
829
+ alias: "description",
830
+ required: false
831
+ }]
832
+ }],
833
+ categories: [{
834
+ type: i0.Input,
835
+ args: [{
836
+ isSignal: true,
837
+ alias: "categories",
838
+ required: false
839
+ }]
840
+ }],
841
+ series: [{
842
+ type: i0.Input,
843
+ args: [{
844
+ isSignal: true,
845
+ alias: "series",
846
+ required: false
847
+ }]
848
+ }],
849
+ height: [{
850
+ type: i0.Input,
851
+ args: [{
852
+ isSignal: true,
853
+ alias: "height",
854
+ required: false
855
+ }]
856
+ }],
857
+ format: [{
858
+ type: i0.Input,
859
+ args: [{
860
+ isSignal: true,
861
+ alias: "format",
862
+ required: false
863
+ }]
864
+ }],
865
+ axisFormat: [{
866
+ type: i0.Input,
867
+ args: [{
868
+ isSignal: true,
869
+ alias: "axisFormat",
870
+ required: false
871
+ }]
872
+ }],
873
+ categoryLabel: [{
874
+ type: i0.Input,
875
+ args: [{
876
+ isSignal: true,
877
+ alias: "categoryLabel",
878
+ required: false
879
+ }]
880
+ }],
881
+ loading: [{
882
+ type: i0.Input,
883
+ args: [{
884
+ isSignal: true,
885
+ alias: "loading",
886
+ required: false
887
+ }]
888
+ }],
889
+ frame: [{
890
+ type: i0.ViewChild,
891
+ args: [i0.forwardRef(() => VdChartFrame), { isSignal: true }]
892
+ }]
893
+ }
894
+ });
895
+ const MAX_THICKNESS = 24;
896
+ const RADIUS = 4;
897
+ const GAP = 2;
898
+ const PAD$1 = 8;
899
+ const AXIS_BAND$1 = 22;
900
+ var VdBarChart = class VdBarChart extends VdChartBase {
901
+ orientation = input("vertical", ...ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []);
902
+ stacked = input(false, {
903
+ ...ngDevMode ? { debugName: "stacked" } : /* istanbul ignore next */ {},
904
+ transform: booleanAttribute
905
+ });
906
+ highlight = input(null, ...ngDevMode ? [{ debugName: "highlight" }] : /* istanbul ignore next */ []);
907
+ highlighted = computed(() => {
908
+ const h = this.highlight();
909
+ const values = this.series()[0]?.values ?? [];
910
+ if (h === null || this.series().length !== 1) return -1;
911
+ if (h !== "max") return h;
912
+ let best = -1;
913
+ values.forEach((v, i) => {
914
+ if (v !== null && Number.isFinite(v) && (best < 0 || v > (values[best] ?? -Infinity))) best = i;
915
+ });
916
+ return best;
917
+ }, ...ngDevMode ? [{ debugName: "highlighted" }] : /* istanbul ignore next */ []);
918
+ stackedValues = () => this.stacked();
919
+ extentOf() {
920
+ return extent(this.series(), this.count(), this.stacked());
921
+ }
922
+ vertical = computed(() => this.orientation() === "vertical", ...ngDevMode ? [{ debugName: "vertical" }] : /* istanbul ignore next */ []);
923
+ box = computed(() => {
924
+ const w = this.width();
925
+ const h = this.height();
926
+ if (this.vertical()) return {
927
+ x0: this.tickWidth(),
928
+ x1: w - PAD$1,
929
+ y0: PAD$1,
930
+ y1: h - AXIS_BAND$1
931
+ };
932
+ return {
933
+ x0: Math.min(this.categoryWidth(), w * .4),
934
+ x1: w - PAD$1 - this.tickWidth() / 2,
935
+ y0: PAD$1,
936
+ y1: h - AXIS_BAND$1
937
+ };
938
+ }, ...ngDevMode ? [{ debugName: "box" }] : /* istanbul ignore next */ []);
939
+ scale = computed(() => {
940
+ const b = this.box();
941
+ return this.vertical() ? this.valueScale([b.y1, b.y0]) : this.valueScale([b.x0, b.x1]);
942
+ }, ...ngDevMode ? [{ debugName: "scale" }] : /* istanbul ignore next */ []);
943
+ categoryRange = computed(() => {
944
+ const b = this.box();
945
+ return this.vertical() ? [b.x0, b.x1] : [b.y0, b.y1];
946
+ }, ...ngDevMode ? [{ debugName: "categoryRange" }] : /* istanbul ignore next */ []);
947
+ bandList = computed(() => bands(this.count(), this.categoryRange()), ...ngDevMode ? [{ debugName: "bandList" }] : /* istanbul ignore next */ []);
948
+ marks = computed(() => {
949
+ const series = this.series();
950
+ const n = series.length;
951
+ if (!n || !this.count()) return [];
952
+ const scale = this.scale();
953
+ const zero = scale(0);
954
+ const orient = this.orientation();
955
+ const marks = [];
956
+ if (this.stacked()) {
957
+ const segments = stack(series, this.count());
958
+ const outer = this.bandList().map((_, c) => {
959
+ let top = -1;
960
+ let bottom = -1;
961
+ segments.forEach((s, i) => {
962
+ if (s[c].to > s[c].from) top = i;
963
+ if (s[c].to < s[c].from) bottom = i;
964
+ });
965
+ return {
966
+ top,
967
+ bottom
968
+ };
969
+ });
970
+ this.bandList().forEach((band, c) => {
971
+ const thickness = Math.min(MAX_THICKNESS, band.step * .6);
972
+ segments.forEach((s, i) => {
973
+ const seg = s[c];
974
+ if (seg.to === seg.from) return;
975
+ const rounded = i === outer[c].top || i === outer[c].bottom;
976
+ const from = scale(seg.from);
977
+ const to = scale(seg.to);
978
+ const dir = Math.sign(to - from);
979
+ const end = rounded ? to : to - dir * GAP;
980
+ marks.push({
981
+ d: barPath(band.center, thickness, from, end, rounded ? RADIUS : 0, orient),
982
+ series: i,
983
+ category: c
984
+ });
985
+ });
986
+ });
987
+ return marks;
988
+ }
989
+ this.bandList().forEach((band, c) => {
990
+ const thickness = Math.min(MAX_THICKNESS, (band.step * .7 - GAP * (n - 1)) / n);
991
+ const group = thickness * n + GAP * (n - 1);
992
+ series.forEach((s, i) => {
993
+ const v = s.values[c];
994
+ if (v === null || v === void 0 || !Number.isFinite(v)) return;
995
+ const center = band.center - group / 2 + thickness / 2 + i * (thickness + GAP);
996
+ marks.push({
997
+ d: barPath(center, thickness, zero, scale(v), RADIUS, orient),
998
+ series: i,
999
+ category: c
1000
+ });
1001
+ });
1002
+ });
1003
+ return marks;
1004
+ }, ...ngDevMode ? [{ debugName: "marks" }] : /* istanbul ignore next */ []);
1005
+ tickMarks = computed(() => {
1006
+ const b = this.box();
1007
+ const scale = this.scale();
1008
+ return this.ticks().map((value) => this.vertical() ? {
1009
+ value,
1010
+ x1: b.x0,
1011
+ x2: b.x1,
1012
+ y1: scale(value),
1013
+ y2: scale(value),
1014
+ tx: b.x0 - 6,
1015
+ ty: scale(value),
1016
+ anchor: "end"
1017
+ } : {
1018
+ value,
1019
+ x1: scale(value),
1020
+ x2: scale(value),
1021
+ y1: b.y0,
1022
+ y2: b.y1,
1023
+ tx: scale(value),
1024
+ ty: b.y1 + AXIS_BAND$1 / 2 + 2,
1025
+ anchor: "middle"
1026
+ });
1027
+ }, ...ngDevMode ? [{ debugName: "tickMarks" }] : /* istanbul ignore next */ []);
1028
+ categoryTicks = computed(() => {
1029
+ const b = this.box();
1030
+ const list = this.bandList();
1031
+ if (this.vertical()) {
1032
+ const every = this.labelEvery(b.x1 - b.x0);
1033
+ return list.map((band, index) => ({
1034
+ index,
1035
+ x: band.center,
1036
+ y: b.y1 + AXIS_BAND$1 / 2 + 2,
1037
+ anchor: "middle"
1038
+ })).filter((c) => c.index % every === 0);
1039
+ }
1040
+ return list.map((band, index) => ({
1041
+ index,
1042
+ x: b.x0 - 8,
1043
+ y: band.center,
1044
+ anchor: "end"
1045
+ }));
1046
+ }, ...ngDevMode ? [{ debugName: "categoryTicks" }] : /* istanbul ignore next */ []);
1047
+ hits = computed(() => {
1048
+ const b = this.box();
1049
+ return this.bandList().map((band, index) => this.vertical() ? {
1050
+ index,
1051
+ x: band.start,
1052
+ y: b.y0,
1053
+ w: band.step,
1054
+ h: b.y1 - b.y0
1055
+ } : {
1056
+ index,
1057
+ x: b.x0,
1058
+ y: band.start,
1059
+ w: b.x1 - b.x0,
1060
+ h: band.step
1061
+ });
1062
+ }, ...ngDevMode ? [{ debugName: "hits" }] : /* istanbul ignore next */ []);
1063
+ bandRect = computed(() => {
1064
+ const hit = this.hits()[this.active()];
1065
+ if (!hit) return {
1066
+ x: 0,
1067
+ y: 0,
1068
+ w: 0,
1069
+ h: 0
1070
+ };
1071
+ const inset = 2;
1072
+ return {
1073
+ x: hit.x + inset,
1074
+ y: hit.y + inset,
1075
+ w: Math.max(0, hit.w - 4),
1076
+ h: Math.max(0, hit.h - 4)
1077
+ };
1078
+ }, ...ngDevMode ? [{ debugName: "bandRect" }] : /* istanbul ignore next */ []);
1079
+ tooltip = computed(() => {
1080
+ const i = this.active();
1081
+ const band = this.bandList()[i];
1082
+ if (!band) return null;
1083
+ const b = this.box();
1084
+ return this.vertical() ? {
1085
+ x: band.center,
1086
+ y: b.y0
1087
+ } : {
1088
+ x: b.x0 + (b.x1 - b.x0) / 2,
1089
+ y: band.center
1090
+ };
1091
+ }, ...ngDevMode ? [{ debugName: "tooltip" }] : /* istanbul ignore next */ []);
1092
+ onPointer(event) {
1093
+ const rect = event.currentTarget.getBoundingClientRect();
1094
+ const pos = this.vertical() ? event.clientX - rect.left : event.clientY - rect.top;
1095
+ this.pointerAt(pos, this.categoryRange());
1096
+ }
1097
+ static ɵfac = i0.ɵɵngDeclareFactory({
1098
+ minVersion: "12.0.0",
1099
+ version: "22.2.1",
1100
+ ngImport: i0,
1101
+ type: VdBarChart,
1102
+ deps: null,
1103
+ target: i0.ɵɵFactoryTarget.Component
1104
+ });
1105
+ static ɵcmp = i0.ɵɵngDeclareComponent({
1106
+ minVersion: "17.0.0",
1107
+ version: "22.2.1",
1108
+ type: VdBarChart,
1109
+ isStandalone: true,
1110
+ selector: "vd-bar-chart",
1111
+ inputs: {
1112
+ orientation: {
1113
+ classPropertyName: "orientation",
1114
+ publicName: "orientation",
1115
+ isSignal: true,
1116
+ isRequired: false,
1117
+ transformFunction: null
1118
+ },
1119
+ stacked: {
1120
+ classPropertyName: "stacked",
1121
+ publicName: "stacked",
1122
+ isSignal: true,
1123
+ isRequired: false,
1124
+ transformFunction: null
1125
+ },
1126
+ highlight: {
1127
+ classPropertyName: "highlight",
1128
+ publicName: "highlight",
1129
+ isSignal: true,
1130
+ isRequired: false,
1131
+ transformFunction: null
1132
+ }
1133
+ },
1134
+ host: {
1135
+ properties: {
1136
+ "attr.title": "null",
1137
+ "attr.data-orientation": "orientation()"
1138
+ },
1139
+ classAttribute: "vd-bar-chart"
1140
+ },
1141
+ usesInheritance: true,
1142
+ ngImport: i0,
1143
+ template: `
1144
+ <vd-chart-frame
1145
+ kind="bar"
1146
+ [title]="title()"
1147
+ [description]="description()"
1148
+ [categories]="categories()"
1149
+ [series]="series()"
1150
+ [format]="format()"
1151
+ [categoryLabel]="categoryLabel()"
1152
+ [loading]="loading()"
1153
+ [active]="active()"
1154
+ [tooltipX]="tooltip()?.x ?? null"
1155
+ [tooltipY]="tooltip()?.y ?? 0"
1156
+ (pointerLeave)="active.set(-1)"
1157
+ >
1158
+ @if (width() > 0) {
1159
+ <svg
1160
+ class="vd-chart__svg"
1161
+ [attr.width]="width()"
1162
+ [attr.height]="height()"
1163
+ [attr.viewBox]="'0 0 ' + width() + ' ' + height()"
1164
+ role="group"
1165
+ [attr.aria-labelledby]="frame().titleId"
1166
+ (pointermove)="onPointer($event)"
1167
+ >
1168
+ <g class="vd-chart__grid" aria-hidden="true">
1169
+ @for (t of tickMarks(); track t.value) {
1170
+ <line
1171
+ [attr.x1]="t.x1"
1172
+ [attr.x2]="t.x2"
1173
+ [attr.y1]="t.y1"
1174
+ [attr.y2]="t.y2"
1175
+ [attr.data-zero]="t.value === 0 ? '' : null"
1176
+ />
1177
+ <text
1178
+ [attr.x]="t.tx"
1179
+ [attr.y]="t.ty"
1180
+ [attr.text-anchor]="t.anchor"
1181
+ dominant-baseline="middle"
1182
+ >
1183
+ {{ tickText(t.value) }}
1184
+ </text>
1185
+ }
1186
+ </g>
1187
+ @if (active() >= 0) {
1188
+ <rect
1189
+ class="vd-chart__band"
1190
+ aria-hidden="true"
1191
+ [attr.x]="bandRect().x"
1192
+ [attr.y]="bandRect().y"
1193
+ [attr.width]="bandRect().w"
1194
+ [attr.height]="bandRect().h"
1195
+ rx="4"
1196
+ />
1197
+ }
1198
+ <g class="vd-chart__marks" aria-hidden="true">
1199
+ @for (m of marks(); track $index) {
1200
+ <path
1201
+ class="vd-chart__bar"
1202
+ [attr.d]="m.d"
1203
+ [attr.data-series]="slot(m.series)"
1204
+ [attr.data-muted]="highlighted() >= 0 && m.category !== highlighted() ? '' : null"
1205
+ />
1206
+ }
1207
+ </g>
1208
+ <g class="vd-chart__axis" aria-hidden="true">
1209
+ @for (c of categoryTicks(); track c.index) {
1210
+ <text
1211
+ [attr.x]="c.x"
1212
+ [attr.y]="c.y"
1213
+ [attr.text-anchor]="c.anchor"
1214
+ dominant-baseline="middle"
1215
+ >
1216
+ {{ categories()[c.index] }}
1217
+ </text>
1218
+ }
1219
+ </g>
1220
+ <g class="vd-chart__hits">
1221
+ @for (h of hits(); track h.index) {
1222
+ <rect
1223
+ class="vd-chart__hit"
1224
+ rx="6"
1225
+ role="img"
1226
+ [attr.data-index]="h.index"
1227
+ [attr.tabindex]="h.index === focusIndex() ? 0 : -1"
1228
+ [attr.aria-label]="pointLabel(h.index)"
1229
+ [attr.x]="h.x"
1230
+ [attr.y]="h.y"
1231
+ [attr.width]="h.w"
1232
+ [attr.height]="h.h"
1233
+ (focus)="onFocus(h.index)"
1234
+ (blur)="onBlur($event)"
1235
+ (keydown)="onKeydown($event, h.index)"
1236
+ />
1237
+ }
1238
+ </g>
1239
+ </svg>
1240
+ }
1241
+ </vd-chart-frame>
1242
+ `,
1243
+ isInline: true,
1244
+ dependencies: [{
1245
+ kind: "component",
1246
+ type: VdChartFrame,
1247
+ selector: "vd-chart-frame",
1248
+ inputs: [
1249
+ "title",
1250
+ "description",
1251
+ "categories",
1252
+ "series",
1253
+ "kind",
1254
+ "format",
1255
+ "categoryLabel",
1256
+ "active",
1257
+ "tooltipX",
1258
+ "tooltipY",
1259
+ "tableLabel",
1260
+ "loading"
1261
+ ],
1262
+ outputs: ["pointerLeave"]
1263
+ }],
1264
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
1265
+ encapsulation: i0.ViewEncapsulation.None
1266
+ });
1267
+ };
1268
+ i0.ɵɵngDeclareClassMetadata({
1269
+ minVersion: "12.0.0",
1270
+ version: "22.2.1",
1271
+ ngImport: i0,
1272
+ type: VdBarChart,
1273
+ decorators: [{
1274
+ type: Component,
1275
+ args: [{
1276
+ selector: "vd-bar-chart",
1277
+ imports: [VdChartFrame],
1278
+ changeDetection: ChangeDetectionStrategy.OnPush,
1279
+ encapsulation: ViewEncapsulation.None,
1280
+ host: {
1281
+ "[attr.title]": "null",
1282
+ class: "vd-bar-chart",
1283
+ "[attr.data-orientation]": "orientation()"
1284
+ },
1285
+ template: `
1286
+ <vd-chart-frame
1287
+ kind="bar"
1288
+ [title]="title()"
1289
+ [description]="description()"
1290
+ [categories]="categories()"
1291
+ [series]="series()"
1292
+ [format]="format()"
1293
+ [categoryLabel]="categoryLabel()"
1294
+ [loading]="loading()"
1295
+ [active]="active()"
1296
+ [tooltipX]="tooltip()?.x ?? null"
1297
+ [tooltipY]="tooltip()?.y ?? 0"
1298
+ (pointerLeave)="active.set(-1)"
1299
+ >
1300
+ @if (width() > 0) {
1301
+ <svg
1302
+ class="vd-chart__svg"
1303
+ [attr.width]="width()"
1304
+ [attr.height]="height()"
1305
+ [attr.viewBox]="'0 0 ' + width() + ' ' + height()"
1306
+ role="group"
1307
+ [attr.aria-labelledby]="frame().titleId"
1308
+ (pointermove)="onPointer($event)"
1309
+ >
1310
+ <g class="vd-chart__grid" aria-hidden="true">
1311
+ @for (t of tickMarks(); track t.value) {
1312
+ <line
1313
+ [attr.x1]="t.x1"
1314
+ [attr.x2]="t.x2"
1315
+ [attr.y1]="t.y1"
1316
+ [attr.y2]="t.y2"
1317
+ [attr.data-zero]="t.value === 0 ? '' : null"
1318
+ />
1319
+ <text
1320
+ [attr.x]="t.tx"
1321
+ [attr.y]="t.ty"
1322
+ [attr.text-anchor]="t.anchor"
1323
+ dominant-baseline="middle"
1324
+ >
1325
+ {{ tickText(t.value) }}
1326
+ </text>
1327
+ }
1328
+ </g>
1329
+ @if (active() >= 0) {
1330
+ <rect
1331
+ class="vd-chart__band"
1332
+ aria-hidden="true"
1333
+ [attr.x]="bandRect().x"
1334
+ [attr.y]="bandRect().y"
1335
+ [attr.width]="bandRect().w"
1336
+ [attr.height]="bandRect().h"
1337
+ rx="4"
1338
+ />
1339
+ }
1340
+ <g class="vd-chart__marks" aria-hidden="true">
1341
+ @for (m of marks(); track $index) {
1342
+ <path
1343
+ class="vd-chart__bar"
1344
+ [attr.d]="m.d"
1345
+ [attr.data-series]="slot(m.series)"
1346
+ [attr.data-muted]="highlighted() >= 0 && m.category !== highlighted() ? '' : null"
1347
+ />
1348
+ }
1349
+ </g>
1350
+ <g class="vd-chart__axis" aria-hidden="true">
1351
+ @for (c of categoryTicks(); track c.index) {
1352
+ <text
1353
+ [attr.x]="c.x"
1354
+ [attr.y]="c.y"
1355
+ [attr.text-anchor]="c.anchor"
1356
+ dominant-baseline="middle"
1357
+ >
1358
+ {{ categories()[c.index] }}
1359
+ </text>
1360
+ }
1361
+ </g>
1362
+ <g class="vd-chart__hits">
1363
+ @for (h of hits(); track h.index) {
1364
+ <rect
1365
+ class="vd-chart__hit"
1366
+ rx="6"
1367
+ role="img"
1368
+ [attr.data-index]="h.index"
1369
+ [attr.tabindex]="h.index === focusIndex() ? 0 : -1"
1370
+ [attr.aria-label]="pointLabel(h.index)"
1371
+ [attr.x]="h.x"
1372
+ [attr.y]="h.y"
1373
+ [attr.width]="h.w"
1374
+ [attr.height]="h.h"
1375
+ (focus)="onFocus(h.index)"
1376
+ (blur)="onBlur($event)"
1377
+ (keydown)="onKeydown($event, h.index)"
1378
+ />
1379
+ }
1380
+ </g>
1381
+ </svg>
1382
+ }
1383
+ </vd-chart-frame>
1384
+ `
1385
+ }]
1386
+ }],
1387
+ propDecorators: {
1388
+ orientation: [{
1389
+ type: i0.Input,
1390
+ args: [{
1391
+ isSignal: true,
1392
+ alias: "orientation",
1393
+ required: false
1394
+ }]
1395
+ }],
1396
+ stacked: [{
1397
+ type: i0.Input,
1398
+ args: [{
1399
+ isSignal: true,
1400
+ alias: "stacked",
1401
+ required: false
1402
+ }]
1403
+ }],
1404
+ highlight: [{
1405
+ type: i0.Input,
1406
+ args: [{
1407
+ isSignal: true,
1408
+ alias: "highlight",
1409
+ required: false
1410
+ }]
1411
+ }]
1412
+ }
1413
+ });
1414
+ const PAD = 12;
1415
+ const AXIS_BAND = 22;
1416
+ const MAX_END_LABELS = 4;
1417
+ const END_LABEL_GAP = 14;
1418
+ var VdLineChart = class VdLineChart extends VdChartBase {
1419
+ area = input(true, {
1420
+ ...ngDevMode ? { debugName: "area" } : /* istanbul ignore next */ {},
1421
+ transform: booleanAttribute
1422
+ });
1423
+ stackedValues = () => false;
1424
+ extentOf() {
1425
+ return extent(this.series(), this.count(), false);
1426
+ }
1427
+ showArea = computed(() => this.area() && this.series().length === 1, ...ngDevMode ? [{ debugName: "showArea" }] : /* istanbul ignore next */ []);
1428
+ labelled = computed(() => this.series().length > 1 && this.series().length <= MAX_END_LABELS, ...ngDevMode ? [{ debugName: "labelled" }] : /* istanbul ignore next */ []);
1429
+ box = computed(() => {
1430
+ const longest = Math.max(...this.series().map((s) => s.name.length), 0);
1431
+ const end = this.labelled() ? Math.min(longest * 6.8 + END_LABEL_GAP, this.width() * .3) : PAD;
1432
+ return {
1433
+ x0: this.tickWidth(),
1434
+ x1: this.width() - end,
1435
+ y0: PAD,
1436
+ y1: this.height() - AXIS_BAND
1437
+ };
1438
+ }, ...ngDevMode ? [{ debugName: "box" }] : /* istanbul ignore next */ []);
1439
+ scale = computed(() => this.valueScale([this.box().y1, this.box().y0]), ...ngDevMode ? [{ debugName: "scale" }] : /* istanbul ignore next */ []);
1440
+ xs = computed(() => {
1441
+ const { x0, x1 } = this.box();
1442
+ const n = this.count();
1443
+ if (n <= 1) return [(x0 + x1) / 2];
1444
+ return Array.from({ length: n }, (_, i) => x0 + i * (x1 - x0) / (n - 1));
1445
+ }, ...ngDevMode ? [{ debugName: "xs" }] : /* istanbul ignore next */ []);
1446
+ step = computed(() => {
1447
+ const xs = this.xs();
1448
+ return xs.length > 1 ? xs[1] - xs[0] : this.box().x1 - this.box().x0;
1449
+ }, ...ngDevMode ? [{ debugName: "step" }] : /* istanbul ignore next */ []);
1450
+ points = computed(() => this.series().map((s) => this.xs().map((x, i) => {
1451
+ const v = s.values[i];
1452
+ return v === null || v === void 0 || !Number.isFinite(v) ? null : [x, this.scale()(v)];
1453
+ })), ...ngDevMode ? [{ debugName: "points" }] : /* istanbul ignore next */ []);
1454
+ lines = computed(() => this.points().map((p) => linePath(p)), ...ngDevMode ? [{ debugName: "lines" }] : /* istanbul ignore next */ []);
1455
+ areaD = computed(() => areaPath(this.points()[0] ?? [], this.scale()(0)), ...ngDevMode ? [{ debugName: "areaD" }] : /* istanbul ignore next */ []);
1456
+ tickMarks = computed(() => this.ticks().map((value) => ({
1457
+ value,
1458
+ y: this.scale()(value)
1459
+ })), ...ngDevMode ? [{ debugName: "tickMarks" }] : /* istanbul ignore next */ []);
1460
+ categoryTicks = computed(() => {
1461
+ const every = this.labelEvery(this.box().x1 - this.box().x0);
1462
+ return this.xs().map((x, index) => ({
1463
+ index,
1464
+ x
1465
+ })).filter((c) => c.index % every === 0 || c.index === this.count() - 1).filter((c, i, all) => i === all.length - 1 || all[all.length - 1].index - c.index >= every);
1466
+ }, ...ngDevMode ? [{ debugName: "categoryTicks" }] : /* istanbul ignore next */ []);
1467
+ dots = computed(() => {
1468
+ const at = this.active() >= 0 ? this.active() : this.count() - 1;
1469
+ return this.points().flatMap((p, series) => {
1470
+ const point = p[at];
1471
+ return point ? [{
1472
+ x: point[0],
1473
+ y: point[1],
1474
+ series
1475
+ }] : [];
1476
+ });
1477
+ }, ...ngDevMode ? [{ debugName: "dots" }] : /* istanbul ignore next */ []);
1478
+ endLabels = computed(() => {
1479
+ if (!this.labelled()) return [];
1480
+ const x = this.box().x1 + 8;
1481
+ const placed = [];
1482
+ this.points().map((p, series) => ({
1483
+ series,
1484
+ y: [...p].reverse().find((q) => q)?.[1]
1485
+ })).filter((e) => e.y !== void 0).sort((a, b) => a.y - b.y).forEach((e) => {
1486
+ if (placed.every((p) => Math.abs(p.y - e.y) >= 14)) placed.push({
1487
+ ...e,
1488
+ x
1489
+ });
1490
+ });
1491
+ return placed;
1492
+ }, ...ngDevMode ? [{ debugName: "endLabels" }] : /* istanbul ignore next */ []);
1493
+ tooltip = computed(() => {
1494
+ const x = this.xs()[this.active()];
1495
+ return x === void 0 ? null : {
1496
+ x,
1497
+ y: this.box().y0
1498
+ };
1499
+ }, ...ngDevMode ? [{ debugName: "tooltip" }] : /* istanbul ignore next */ []);
1500
+ onPointer(event) {
1501
+ const rect = event.currentTarget.getBoundingClientRect();
1502
+ const { x0, x1 } = this.box();
1503
+ const half = this.step() / 2;
1504
+ this.pointerAt(event.clientX - rect.left, [x0 - half, x1 + half]);
1505
+ }
1506
+ static ɵfac = i0.ɵɵngDeclareFactory({
1507
+ minVersion: "12.0.0",
1508
+ version: "22.2.1",
1509
+ ngImport: i0,
1510
+ type: VdLineChart,
1511
+ deps: null,
1512
+ target: i0.ɵɵFactoryTarget.Component
1513
+ });
1514
+ static ɵcmp = i0.ɵɵngDeclareComponent({
1515
+ minVersion: "17.0.0",
1516
+ version: "22.2.1",
1517
+ type: VdLineChart,
1518
+ isStandalone: true,
1519
+ selector: "vd-line-chart",
1520
+ inputs: { area: {
1521
+ classPropertyName: "area",
1522
+ publicName: "area",
1523
+ isSignal: true,
1524
+ isRequired: false,
1525
+ transformFunction: null
1526
+ } },
1527
+ host: {
1528
+ properties: { "attr.title": "null" },
1529
+ classAttribute: "vd-line-chart"
1530
+ },
1531
+ usesInheritance: true,
1532
+ ngImport: i0,
1533
+ template: `
1534
+ <vd-chart-frame
1535
+ kind="line"
1536
+ [title]="title()"
1537
+ [description]="description()"
1538
+ [categories]="categories()"
1539
+ [series]="series()"
1540
+ [format]="format()"
1541
+ [categoryLabel]="categoryLabel()"
1542
+ [loading]="loading()"
1543
+ [active]="active()"
1544
+ [tooltipX]="tooltip()?.x ?? null"
1545
+ [tooltipY]="tooltip()?.y ?? 0"
1546
+ (pointerLeave)="active.set(-1)"
1547
+ >
1548
+ @if (width() > 0) {
1549
+ <svg
1550
+ class="vd-chart__svg"
1551
+ [attr.width]="width()"
1552
+ [attr.height]="height()"
1553
+ [attr.viewBox]="'0 0 ' + width() + ' ' + height()"
1554
+ role="group"
1555
+ [attr.aria-labelledby]="frame().titleId"
1556
+ (pointermove)="onPointer($event)"
1557
+ >
1558
+ <g class="vd-chart__grid" aria-hidden="true">
1559
+ @for (t of tickMarks(); track t.value) {
1560
+ <line
1561
+ [attr.x1]="box().x0"
1562
+ [attr.x2]="box().x1"
1563
+ [attr.y1]="t.y"
1564
+ [attr.y2]="t.y"
1565
+ [attr.data-zero]="t.value === 0 ? '' : null"
1566
+ />
1567
+ <text
1568
+ [attr.x]="box().x0 - 6"
1569
+ [attr.y]="t.y"
1570
+ text-anchor="end"
1571
+ dominant-baseline="middle"
1572
+ >
1573
+ {{ tickText(t.value) }}
1574
+ </text>
1575
+ }
1576
+ </g>
1577
+ <g class="vd-chart__marks" aria-hidden="true">
1578
+ @if (showArea()) {
1579
+ <path class="vd-chart__area" [attr.d]="areaD()" [attr.data-series]="slot(0)" />
1580
+ }
1581
+ @for (l of lines(); track $index) {
1582
+ <path class="vd-chart__line" [attr.d]="l" [attr.data-series]="slot($index)" />
1583
+ }
1584
+ @if (active() >= 0) {
1585
+ <line
1586
+ class="vd-chart__crosshair"
1587
+ [attr.x1]="xs()[active()]"
1588
+ [attr.x2]="xs()[active()]"
1589
+ [attr.y1]="box().y0"
1590
+ [attr.y2]="box().y1"
1591
+ />
1592
+ }
1593
+ @for (d of dots(); track $index) {
1594
+ <circle
1595
+ class="vd-chart__dot"
1596
+ [attr.cx]="d.x"
1597
+ [attr.cy]="d.y"
1598
+ r="4"
1599
+ [attr.data-series]="slot(d.series)"
1600
+ />
1601
+ }
1602
+ </g>
1603
+ <g class="vd-chart__end-labels" aria-hidden="true">
1604
+ @for (e of endLabels(); track e.series) {
1605
+ <text [attr.x]="e.x" [attr.y]="e.y" dominant-baseline="middle">
1606
+ {{ series()[e.series].name }}
1607
+ </text>
1608
+ }
1609
+ </g>
1610
+ <g class="vd-chart__axis" aria-hidden="true">
1611
+ @for (c of categoryTicks(); track c.index) {
1612
+ <text
1613
+ [attr.x]="c.x"
1614
+ [attr.y]="box().y1 + 13"
1615
+ text-anchor="middle"
1616
+ dominant-baseline="middle"
1617
+ >
1618
+ {{ categories()[c.index] }}
1619
+ </text>
1620
+ }
1621
+ </g>
1622
+ <g class="vd-chart__hits">
1623
+ @for (x of xs(); track $index; let i = $index) {
1624
+ <rect
1625
+ class="vd-chart__hit"
1626
+ rx="6"
1627
+ role="img"
1628
+ [attr.data-index]="i"
1629
+ [attr.tabindex]="i === focusIndex() ? 0 : -1"
1630
+ [attr.aria-label]="pointLabel(i)"
1631
+ [attr.x]="x - step() / 2"
1632
+ [attr.y]="box().y0"
1633
+ [attr.width]="step()"
1634
+ [attr.height]="box().y1 - box().y0"
1635
+ (focus)="onFocus(i)"
1636
+ (blur)="onBlur($event)"
1637
+ (keydown)="onKeydown($event, i)"
1638
+ />
1639
+ }
1640
+ </g>
1641
+ </svg>
1642
+ }
1643
+ </vd-chart-frame>
1644
+ `,
1645
+ isInline: true,
1646
+ dependencies: [{
1647
+ kind: "component",
1648
+ type: VdChartFrame,
1649
+ selector: "vd-chart-frame",
1650
+ inputs: [
1651
+ "title",
1652
+ "description",
1653
+ "categories",
1654
+ "series",
1655
+ "kind",
1656
+ "format",
1657
+ "categoryLabel",
1658
+ "active",
1659
+ "tooltipX",
1660
+ "tooltipY",
1661
+ "tableLabel",
1662
+ "loading"
1663
+ ],
1664
+ outputs: ["pointerLeave"]
1665
+ }],
1666
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
1667
+ encapsulation: i0.ViewEncapsulation.None
1668
+ });
1669
+ };
1670
+ i0.ɵɵngDeclareClassMetadata({
1671
+ minVersion: "12.0.0",
1672
+ version: "22.2.1",
1673
+ ngImport: i0,
1674
+ type: VdLineChart,
1675
+ decorators: [{
1676
+ type: Component,
1677
+ args: [{
1678
+ selector: "vd-line-chart",
1679
+ imports: [VdChartFrame],
1680
+ changeDetection: ChangeDetectionStrategy.OnPush,
1681
+ encapsulation: ViewEncapsulation.None,
1682
+ host: {
1683
+ "[attr.title]": "null",
1684
+ class: "vd-line-chart"
1685
+ },
1686
+ template: `
1687
+ <vd-chart-frame
1688
+ kind="line"
1689
+ [title]="title()"
1690
+ [description]="description()"
1691
+ [categories]="categories()"
1692
+ [series]="series()"
1693
+ [format]="format()"
1694
+ [categoryLabel]="categoryLabel()"
1695
+ [loading]="loading()"
1696
+ [active]="active()"
1697
+ [tooltipX]="tooltip()?.x ?? null"
1698
+ [tooltipY]="tooltip()?.y ?? 0"
1699
+ (pointerLeave)="active.set(-1)"
1700
+ >
1701
+ @if (width() > 0) {
1702
+ <svg
1703
+ class="vd-chart__svg"
1704
+ [attr.width]="width()"
1705
+ [attr.height]="height()"
1706
+ [attr.viewBox]="'0 0 ' + width() + ' ' + height()"
1707
+ role="group"
1708
+ [attr.aria-labelledby]="frame().titleId"
1709
+ (pointermove)="onPointer($event)"
1710
+ >
1711
+ <g class="vd-chart__grid" aria-hidden="true">
1712
+ @for (t of tickMarks(); track t.value) {
1713
+ <line
1714
+ [attr.x1]="box().x0"
1715
+ [attr.x2]="box().x1"
1716
+ [attr.y1]="t.y"
1717
+ [attr.y2]="t.y"
1718
+ [attr.data-zero]="t.value === 0 ? '' : null"
1719
+ />
1720
+ <text
1721
+ [attr.x]="box().x0 - 6"
1722
+ [attr.y]="t.y"
1723
+ text-anchor="end"
1724
+ dominant-baseline="middle"
1725
+ >
1726
+ {{ tickText(t.value) }}
1727
+ </text>
1728
+ }
1729
+ </g>
1730
+ <g class="vd-chart__marks" aria-hidden="true">
1731
+ @if (showArea()) {
1732
+ <path class="vd-chart__area" [attr.d]="areaD()" [attr.data-series]="slot(0)" />
1733
+ }
1734
+ @for (l of lines(); track $index) {
1735
+ <path class="vd-chart__line" [attr.d]="l" [attr.data-series]="slot($index)" />
1736
+ }
1737
+ @if (active() >= 0) {
1738
+ <line
1739
+ class="vd-chart__crosshair"
1740
+ [attr.x1]="xs()[active()]"
1741
+ [attr.x2]="xs()[active()]"
1742
+ [attr.y1]="box().y0"
1743
+ [attr.y2]="box().y1"
1744
+ />
1745
+ }
1746
+ @for (d of dots(); track $index) {
1747
+ <circle
1748
+ class="vd-chart__dot"
1749
+ [attr.cx]="d.x"
1750
+ [attr.cy]="d.y"
1751
+ r="4"
1752
+ [attr.data-series]="slot(d.series)"
1753
+ />
1754
+ }
1755
+ </g>
1756
+ <g class="vd-chart__end-labels" aria-hidden="true">
1757
+ @for (e of endLabels(); track e.series) {
1758
+ <text [attr.x]="e.x" [attr.y]="e.y" dominant-baseline="middle">
1759
+ {{ series()[e.series].name }}
1760
+ </text>
1761
+ }
1762
+ </g>
1763
+ <g class="vd-chart__axis" aria-hidden="true">
1764
+ @for (c of categoryTicks(); track c.index) {
1765
+ <text
1766
+ [attr.x]="c.x"
1767
+ [attr.y]="box().y1 + 13"
1768
+ text-anchor="middle"
1769
+ dominant-baseline="middle"
1770
+ >
1771
+ {{ categories()[c.index] }}
1772
+ </text>
1773
+ }
1774
+ </g>
1775
+ <g class="vd-chart__hits">
1776
+ @for (x of xs(); track $index; let i = $index) {
1777
+ <rect
1778
+ class="vd-chart__hit"
1779
+ rx="6"
1780
+ role="img"
1781
+ [attr.data-index]="i"
1782
+ [attr.tabindex]="i === focusIndex() ? 0 : -1"
1783
+ [attr.aria-label]="pointLabel(i)"
1784
+ [attr.x]="x - step() / 2"
1785
+ [attr.y]="box().y0"
1786
+ [attr.width]="step()"
1787
+ [attr.height]="box().y1 - box().y0"
1788
+ (focus)="onFocus(i)"
1789
+ (blur)="onBlur($event)"
1790
+ (keydown)="onKeydown($event, i)"
1791
+ />
1792
+ }
1793
+ </g>
1794
+ </svg>
1795
+ }
1796
+ </vd-chart-frame>
1797
+ `
1798
+ }]
1799
+ }],
1800
+ propDecorators: { area: [{
1801
+ type: i0.Input,
1802
+ args: [{
1803
+ isSignal: true,
1804
+ alias: "area",
1805
+ required: false
1806
+ }]
1807
+ }] }
1808
+ });
1809
+ const W = 120;
1810
+ const H = 32;
1811
+ const INSET = 4;
1812
+ var VdSparkline = class VdSparkline {
1813
+ values = input([], ...ngDevMode ? [{ debugName: "values" }] : /* istanbul ignore next */ []);
1814
+ label = input.required(...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
1815
+ format = input(...ngDevMode ? [void 0, { debugName: "format" }] : /* istanbul ignore next */ []);
1816
+ trendSummary = input(...ngDevMode ? [void 0, { debugName: "trendSummary" }] : /* istanbul ignore next */ []);
1817
+ W = W;
1818
+ H = H;
1819
+ t = vdTexts("chart", { trendSummary: this.trendSummary });
1820
+ locale = inject(VD_LOCALE);
1821
+ numbers = computed(() => this.values().filter((v) => v !== null && Number.isFinite(v)), ...ngDevMode ? [{ debugName: "numbers" }] : /* istanbul ignore next */ []);
1822
+ points = computed(() => {
1823
+ const values = this.values();
1824
+ const nums = this.numbers();
1825
+ if (!nums.length) return [];
1826
+ const min = Math.min(...nums);
1827
+ const max = Math.max(...nums);
1828
+ const y = linearScale(min === max ? [min - 1, max + 1] : [min, max], [28, INSET]);
1829
+ const n = values.length;
1830
+ return values.map((v, i) => v === null || !Number.isFinite(v) ? null : [n > 1 ? i * W / (n - 1) : W / 2, y(v)]);
1831
+ }, ...ngDevMode ? [{ debugName: "points" }] : /* istanbul ignore next */ []);
1832
+ line = computed(() => linePath(this.points()), ...ngDevMode ? [{ debugName: "line" }] : /* istanbul ignore next */ []);
1833
+ area = computed(() => areaPath(this.points(), H), ...ngDevMode ? [{ debugName: "area" }] : /* istanbul ignore next */ []);
1834
+ last = computed(() => [...this.points()].reverse().find((p) => p) ?? null, ...ngDevMode ? [{ debugName: "last" }] : /* istanbul ignore next */ []);
1835
+ summary = computed(() => {
1836
+ const nums = this.numbers();
1837
+ if (!nums.length) return this.label();
1838
+ const fmt = this.format() ?? ((v) => new Intl.NumberFormat(this.locale.code).format(v));
1839
+ const text = this.t().trendSummary(fmt(nums[0]), fmt(nums[nums.length - 1]), fmt(Math.min(...nums)), fmt(Math.max(...nums)));
1840
+ return `${this.label()}: ${text}`;
1841
+ }, ...ngDevMode ? [{ debugName: "summary" }] : /* istanbul ignore next */ []);
1842
+ static ɵfac = i0.ɵɵngDeclareFactory({
1843
+ minVersion: "12.0.0",
1844
+ version: "22.2.1",
1845
+ ngImport: i0,
1846
+ type: VdSparkline,
1847
+ deps: [],
1848
+ target: i0.ɵɵFactoryTarget.Component
1849
+ });
1850
+ static ɵcmp = i0.ɵɵngDeclareComponent({
1851
+ minVersion: "17.0.0",
1852
+ version: "22.2.1",
1853
+ type: VdSparkline,
1854
+ isStandalone: true,
1855
+ selector: "vd-sparkline",
1856
+ inputs: {
1857
+ values: {
1858
+ classPropertyName: "values",
1859
+ publicName: "values",
1860
+ isSignal: true,
1861
+ isRequired: false,
1862
+ transformFunction: null
1863
+ },
1864
+ label: {
1865
+ classPropertyName: "label",
1866
+ publicName: "label",
1867
+ isSignal: true,
1868
+ isRequired: true,
1869
+ transformFunction: null
1870
+ },
1871
+ format: {
1872
+ classPropertyName: "format",
1873
+ publicName: "format",
1874
+ isSignal: true,
1875
+ isRequired: false,
1876
+ transformFunction: null
1877
+ },
1878
+ trendSummary: {
1879
+ classPropertyName: "trendSummary",
1880
+ publicName: "trendSummary",
1881
+ isSignal: true,
1882
+ isRequired: false,
1883
+ transformFunction: null
1884
+ }
1885
+ },
1886
+ host: { classAttribute: "vd-sparkline" },
1887
+ ngImport: i0,
1888
+ template: `
1889
+ <svg
1890
+ class="vd-sparkline__svg"
1891
+ [attr.viewBox]="'0 0 ' + W + ' ' + H"
1892
+ preserveAspectRatio="none"
1893
+ role="img"
1894
+ [attr.aria-label]="summary()"
1895
+ >
1896
+ <path class="vd-sparkline__area" [attr.d]="area()" />
1897
+ <path class="vd-sparkline__line" [attr.d]="line()" vector-effect="non-scaling-stroke" />
1898
+ </svg>
1899
+ @if (last(); as p) {
1900
+ <span
1901
+ class="vd-sparkline__dot"
1902
+ aria-hidden="true"
1903
+ [style.--vd-sparkline-x.%]="(p[0] / W) * 100"
1904
+ [style.--vd-sparkline-y.%]="(p[1] / H) * 100"
1905
+ ></span>
1906
+ }
1907
+ `,
1908
+ isInline: true,
1909
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
1910
+ encapsulation: i0.ViewEncapsulation.None
1911
+ });
1912
+ };
1913
+ i0.ɵɵngDeclareClassMetadata({
1914
+ minVersion: "12.0.0",
1915
+ version: "22.2.1",
1916
+ ngImport: i0,
1917
+ type: VdSparkline,
1918
+ decorators: [{
1919
+ type: Component,
1920
+ args: [{
1921
+ selector: "vd-sparkline",
1922
+ changeDetection: ChangeDetectionStrategy.OnPush,
1923
+ encapsulation: ViewEncapsulation.None,
1924
+ host: { class: "vd-sparkline" },
1925
+ template: `
1926
+ <svg
1927
+ class="vd-sparkline__svg"
1928
+ [attr.viewBox]="'0 0 ' + W + ' ' + H"
1929
+ preserveAspectRatio="none"
1930
+ role="img"
1931
+ [attr.aria-label]="summary()"
1932
+ >
1933
+ <path class="vd-sparkline__area" [attr.d]="area()" />
1934
+ <path class="vd-sparkline__line" [attr.d]="line()" vector-effect="non-scaling-stroke" />
1935
+ </svg>
1936
+ @if (last(); as p) {
1937
+ <span
1938
+ class="vd-sparkline__dot"
1939
+ aria-hidden="true"
1940
+ [style.--vd-sparkline-x.%]="(p[0] / W) * 100"
1941
+ [style.--vd-sparkline-y.%]="(p[1] / H) * 100"
1942
+ ></span>
1943
+ }
1944
+ `
1945
+ }]
1946
+ }],
1947
+ propDecorators: {
1948
+ values: [{
1949
+ type: i0.Input,
1950
+ args: [{
1951
+ isSignal: true,
1952
+ alias: "values",
1953
+ required: false
1954
+ }]
1955
+ }],
1956
+ label: [{
1957
+ type: i0.Input,
1958
+ args: [{
1959
+ isSignal: true,
1960
+ alias: "label",
1961
+ required: true
1962
+ }]
1963
+ }],
1964
+ format: [{
1965
+ type: i0.Input,
1966
+ args: [{
1967
+ isSignal: true,
1968
+ alias: "format",
1969
+ required: false
1970
+ }]
1971
+ }],
1972
+ trendSummary: [{
1973
+ type: i0.Input,
1974
+ args: [{
1975
+ isSignal: true,
1976
+ alias: "trendSummary",
1977
+ required: false
1978
+ }]
1979
+ }]
1980
+ }
1981
+ });
1982
+ export { VdBarChart, VdChartFrame, VdLineChart, VdSparkline, areaPath, bands, barPath, extent, linePath, linearScale, nearestIndex, niceTicks, stack };
1983
+
1984
+ //# sourceMappingURL=vadem-ui-chart.mjs.map