@edsis/angular 22.1.6 → 22.2.10

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 (366) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +87 -399
  3. package/SECURITY.md +18 -0
  4. package/SUPPORT.md +15 -0
  5. package/chart/README.md +275 -0
  6. package/component/README.md +89 -0
  7. package/component/accordion/README.md +195 -0
  8. package/component/alert/README.md +184 -0
  9. package/component/alert-dialog/README.md +255 -0
  10. package/component/aspect-ratio/README.md +116 -0
  11. package/component/avatar/README.md +182 -0
  12. package/component/badge/README.md +143 -0
  13. package/component/breadcrumb/README.md +223 -0
  14. package/component/button/README.md +141 -0
  15. package/component/button-group/README.md +214 -0
  16. package/component/calendar/README.md +125 -0
  17. package/component/card/README.md +232 -0
  18. package/component/carousel/README.md +276 -0
  19. package/component/checkbox/README.md +153 -0
  20. package/component/collapsible/README.md +216 -0
  21. package/component/combobox/README.md +202 -0
  22. package/component/command/README.md +287 -0
  23. package/component/composer/README.md +241 -0
  24. package/component/context-menu/README.md +268 -0
  25. package/component/date-picker/README.md +202 -0
  26. package/component/dialog/README.md +276 -0
  27. package/component/drawer/README.md +146 -0
  28. package/component/dropdown-menu/README.md +336 -0
  29. package/component/editor/README.md +152 -0
  30. package/component/empty/README.md +193 -0
  31. package/component/form/README.md +216 -0
  32. package/component/hover-card/README.md +150 -0
  33. package/component/icon/README.md +52 -0
  34. package/component/input/README.md +160 -0
  35. package/component/input-group/README.md +245 -0
  36. package/component/input-otp/README.md +331 -0
  37. package/component/item/README.md +254 -0
  38. package/component/kanban/README.md +81 -0
  39. package/component/kbd/README.md +141 -0
  40. package/component/label/README.md +137 -0
  41. package/component/menubar/README.md +270 -0
  42. package/component/native-select/README.md +176 -0
  43. package/component/navigation-menu/README.md +165 -0
  44. package/component/pagination/README.md +151 -0
  45. package/component/pillbox/README.md +68 -0
  46. package/component/popover/README.md +54 -0
  47. package/component/progress/README.md +160 -0
  48. package/component/radio/README.md +212 -0
  49. package/component/resizable/README.md +178 -0
  50. package/component/scroll-area/README.md +150 -0
  51. package/component/select/README.md +228 -0
  52. package/component/separator/README.md +175 -0
  53. package/component/sheet/README.md +190 -0
  54. package/component/skeleton/README.md +158 -0
  55. package/component/slider/README.md +207 -0
  56. package/component/spinner/README.md +160 -0
  57. package/component/switch/README.md +170 -0
  58. package/component/table/README.md +292 -0
  59. package/component/tabs/README.md +220 -0
  60. package/component/textarea/README.md +169 -0
  61. package/component/timeline/README.md +94 -0
  62. package/component/toast/README.md +173 -0
  63. package/component/toggle/README.md +133 -0
  64. package/component/toggle-group/README.md +234 -0
  65. package/component/tooltip/README.md +230 -0
  66. package/fesm2022/edsis-angular-chart-area.mjs +508 -0
  67. package/fesm2022/edsis-angular-chart-bar.mjs +946 -0
  68. package/fesm2022/edsis-angular-chart-core.mjs +1319 -0
  69. package/fesm2022/edsis-angular-chart-line.mjs +544 -0
  70. package/fesm2022/edsis-angular-chart-pie.mjs +531 -0
  71. package/fesm2022/edsis-angular-chart-primitives.mjs +1647 -0
  72. package/fesm2022/edsis-angular-chart-radar.mjs +693 -0
  73. package/fesm2022/edsis-angular-chart-radial.mjs +542 -0
  74. package/fesm2022/edsis-angular-chart-scatter.mjs +486 -0
  75. package/fesm2022/edsis-angular-chart.mjs +3 -0
  76. package/fesm2022/edsis-angular-component-accordion.mjs +513 -0
  77. package/fesm2022/edsis-angular-component-alert-dialog.mjs +1001 -0
  78. package/fesm2022/edsis-angular-component-alert.mjs +268 -0
  79. package/fesm2022/edsis-angular-component-aspect-ratio.mjs +80 -0
  80. package/fesm2022/edsis-angular-component-avatar.mjs +410 -0
  81. package/fesm2022/edsis-angular-component-badge.mjs +111 -0
  82. package/fesm2022/edsis-angular-component-breadcrumb.mjs +464 -0
  83. package/fesm2022/edsis-angular-component-button-group.mjs +252 -0
  84. package/fesm2022/edsis-angular-component-button.mjs +155 -0
  85. package/fesm2022/edsis-angular-component-calendar.mjs +835 -0
  86. package/fesm2022/edsis-angular-component-card.mjs +460 -0
  87. package/fesm2022/edsis-angular-component-carousel.mjs +700 -0
  88. package/fesm2022/edsis-angular-component-checkbox.mjs +398 -0
  89. package/fesm2022/edsis-angular-component-collapsible.mjs +305 -0
  90. package/fesm2022/edsis-angular-component-combobox.mjs +544 -0
  91. package/fesm2022/edsis-angular-component-command.mjs +815 -0
  92. package/fesm2022/edsis-angular-component-composer.mjs +840 -0
  93. package/fesm2022/edsis-angular-component-context-menu.mjs +197 -0
  94. package/fesm2022/edsis-angular-component-date-picker.mjs +798 -0
  95. package/fesm2022/edsis-angular-component-dialog.mjs +798 -0
  96. package/fesm2022/edsis-angular-component-drawer.mjs +1 -0
  97. package/fesm2022/edsis-angular-component-dropdown-menu.mjs +1259 -0
  98. package/fesm2022/edsis-angular-component-editor.mjs +1000 -0
  99. package/fesm2022/edsis-angular-component-empty.mjs +351 -0
  100. package/fesm2022/edsis-angular-component-form.mjs +821 -0
  101. package/fesm2022/edsis-angular-component-hover-card.mjs +486 -0
  102. package/fesm2022/edsis-angular-component-icon.mjs +253 -0
  103. package/fesm2022/edsis-angular-component-input-group.mjs +453 -0
  104. package/fesm2022/edsis-angular-component-input-otp.mjs +957 -0
  105. package/fesm2022/edsis-angular-component-input.mjs +87 -0
  106. package/fesm2022/edsis-angular-component-item.mjs +720 -0
  107. package/fesm2022/edsis-angular-component-kanban.mjs +812 -0
  108. package/fesm2022/edsis-angular-component-kbd.mjs +124 -0
  109. package/fesm2022/edsis-angular-component-label.mjs +82 -0
  110. package/fesm2022/edsis-angular-component-menubar.mjs +481 -0
  111. package/fesm2022/edsis-angular-component-native-select.mjs +168 -0
  112. package/fesm2022/edsis-angular-component-navigation-menu.mjs +685 -0
  113. package/fesm2022/edsis-angular-component-pagination.mjs +425 -0
  114. package/fesm2022/edsis-angular-component-pillbox.mjs +1679 -0
  115. package/fesm2022/edsis-angular-component-popover.mjs +292 -0
  116. package/fesm2022/edsis-angular-component-progress.mjs +184 -0
  117. package/fesm2022/edsis-angular-component-radio.mjs +491 -0
  118. package/fesm2022/edsis-angular-component-resizable.mjs +703 -0
  119. package/fesm2022/edsis-angular-component-scroll-area.mjs +133 -0
  120. package/fesm2022/edsis-angular-component-segmented-control.mjs +408 -0
  121. package/fesm2022/edsis-angular-component-select.mjs +743 -0
  122. package/fesm2022/edsis-angular-component-separator.mjs +102 -0
  123. package/fesm2022/edsis-angular-component-sheet.mjs +874 -0
  124. package/fesm2022/edsis-angular-component-skeleton.mjs +62 -0
  125. package/fesm2022/edsis-angular-component-slider.mjs +676 -0
  126. package/fesm2022/edsis-angular-component-spinner.mjs +157 -0
  127. package/fesm2022/edsis-angular-component-switch.mjs +361 -0
  128. package/fesm2022/edsis-angular-component-table.mjs +446 -0
  129. package/fesm2022/edsis-angular-component-tabs.mjs +592 -0
  130. package/fesm2022/edsis-angular-component-textarea.mjs +85 -0
  131. package/fesm2022/edsis-angular-component-timeline.mjs +619 -0
  132. package/fesm2022/edsis-angular-component-toast.mjs +231 -0
  133. package/fesm2022/edsis-angular-component-toggle-group.mjs +579 -0
  134. package/fesm2022/edsis-angular-component-toggle.mjs +189 -0
  135. package/fesm2022/edsis-angular-component-tooltip.mjs +804 -0
  136. package/fesm2022/edsis-angular-component-utils-core.mjs +181 -0
  137. package/fesm2022/edsis-angular-component-utils-overlay.mjs +54 -0
  138. package/fesm2022/edsis-angular-component-utils-scale.mjs +76 -0
  139. package/fesm2022/edsis-angular-component-utils.mjs +2 -0
  140. package/fesm2022/edsis-angular-component.mjs +0 -0
  141. package/fesm2022/edsis-angular-navigation-core.mjs +15 -0
  142. package/fesm2022/edsis-angular-navigation-icon.mjs +35 -0
  143. package/fesm2022/edsis-angular-navigation-navigation-badge-count.component-D70Ju6_f.mjs +234 -0
  144. package/fesm2022/edsis-angular-navigation-navigation-dockbar-menu.component-BaFnh48V.mjs +834 -0
  145. package/fesm2022/edsis-angular-navigation-navigation-entry-grid.component-D39W0FQZ.mjs +823 -0
  146. package/fesm2022/edsis-angular-navigation-navigation-flyout-menu.component-CpmsY8hb.mjs +670 -0
  147. package/fesm2022/edsis-angular-navigation-navigation-horizontal.component-D35IfX6r.mjs +689 -0
  148. package/fesm2022/edsis-angular-navigation-navigation-item.component-X6JFy-ya.mjs +1522 -0
  149. package/fesm2022/edsis-angular-navigation-navigation-list.component-D6Ms8H5g.mjs +346 -0
  150. package/fesm2022/edsis-angular-navigation-service.mjs +558 -0
  151. package/fesm2022/edsis-angular-navigation-types.mjs +151 -0
  152. package/fesm2022/edsis-angular-navigation.mjs +3338 -0
  153. package/fesm2022/edsis-angular-sdk.mjs +100 -0
  154. package/fesm2022/edsis-angular-theme-component-settings.mjs +1863 -0
  155. package/fesm2022/edsis-angular-theme-layout-services.mjs +252 -0
  156. package/fesm2022/edsis-angular-theme-layout-types.mjs +45 -0
  157. package/fesm2022/edsis-angular-theme-layout-wrapper.mjs +2568 -0
  158. package/fesm2022/edsis-angular-theme-layout.mjs +1089 -0
  159. package/fesm2022/edsis-angular-theme-on-fill.mjs +89 -0
  160. package/fesm2022/edsis-angular-theme-page-core.mjs +315 -0
  161. package/fesm2022/edsis-angular-theme-page-filter.mjs +409 -0
  162. package/fesm2022/edsis-angular-theme-page-overview.mjs +88 -0
  163. package/fesm2022/edsis-angular-theme-page-root.mjs +693 -0
  164. package/fesm2022/edsis-angular-theme-page-side.mjs +342 -0
  165. package/fesm2022/edsis-angular-theme-page-slots.mjs +258 -0
  166. package/fesm2022/edsis-angular-theme-page.mjs +7 -0
  167. package/fesm2022/edsis-angular-theme-shell-services.mjs +231 -0
  168. package/fesm2022/edsis-angular-theme-shell-types.mjs +102 -0
  169. package/fesm2022/edsis-angular-theme-shell.mjs +1352 -0
  170. package/fesm2022/edsis-angular-theme-styles.mjs +605 -0
  171. package/fesm2022/edsis-angular-theme.mjs +0 -0
  172. package/fesm2022/edsis-angular.mjs +5 -8
  173. package/navigation/README.md +576 -0
  174. package/package.json +481 -52
  175. package/sdk/README.md +212 -0
  176. package/sdk/schematics/collection.json +20 -0
  177. package/sdk/schematics/init/index.js +83 -0
  178. package/sdk/schematics/init/schema.json +19 -0
  179. package/sdk/schematics/ng-add/index.js +147 -0
  180. package/sdk/schematics/ng-add/schema.json +14 -0
  181. package/sdk/schematics/package.json +3 -0
  182. package/sdk/schematics/sdk/index.js +175 -0
  183. package/sdk/schematics/sdk/schema.json +19 -0
  184. package/sdk/sdk.config.example.json +24 -0
  185. package/sdk/src/config/loader.js +43 -0
  186. package/sdk/src/config/schema.js +59 -0
  187. package/sdk/src/emit/client.js +251 -0
  188. package/sdk/src/emit/metadata.js +310 -0
  189. package/sdk/src/emit/models.js +104 -0
  190. package/sdk/src/emit/navigation.js +56 -0
  191. package/sdk/src/emit/operations.js +118 -0
  192. package/sdk/src/emit/public-api.js +54 -0
  193. package/sdk/src/emit/services.js +110 -0
  194. package/sdk/src/engine.js +67 -0
  195. package/sdk/src/layout/per-domain.js +360 -0
  196. package/sdk/src/package.json +3 -0
  197. package/sdk/src/parser/bundle.js +25 -0
  198. package/sdk/src/parser/ir.js +429 -0
  199. package/sdk/src/parser/types.js +7 -0
  200. package/sdk/src/render/template.js +152 -0
  201. package/sdk/src/writer/index.js +286 -0
  202. package/theme/README.md +120 -0
  203. package/theme/component/settings/README.md +154 -0
  204. package/theme/layout/README.md +604 -0
  205. package/theme/page/README.md +505 -0
  206. package/theme/shell/README.md +344 -0
  207. package/theme/styles/README.md +251 -0
  208. package/theme/styles/css/base/components.css +577 -0
  209. package/theme/styles/css/base/index.css +14 -0
  210. package/theme/styles/css/base/on-fill.css +153 -0
  211. package/theme/styles/css/base/package.css +10 -0
  212. package/theme/styles/css/base/prefers-dark.css +81 -0
  213. package/theme/styles/css/base/print.css +62 -0
  214. package/theme/styles/css/base/status.css +38 -0
  215. package/theme/styles/css/base/tailwind.css +208 -0
  216. package/theme/styles/css/base/theme.css +306 -0
  217. package/theme/styles/css/base/tokens.css +388 -0
  218. package/theme/styles/css/color/amber.css +72 -0
  219. package/theme/styles/css/color/blue.css +72 -0
  220. package/theme/styles/css/color/brand.css +38 -0
  221. package/theme/styles/css/color/cyan.css +72 -0
  222. package/theme/styles/css/color/emerald.css +72 -0
  223. package/theme/styles/css/color/fuchsia.css +72 -0
  224. package/theme/styles/css/color/green.css +72 -0
  225. package/theme/styles/css/color/index.css +19 -0
  226. package/theme/styles/css/color/indigo.css +72 -0
  227. package/theme/styles/css/color/lime.css +72 -0
  228. package/theme/styles/css/color/orange.css +72 -0
  229. package/theme/styles/css/color/pink.css +72 -0
  230. package/theme/styles/css/color/purple.css +72 -0
  231. package/theme/styles/css/color/red.css +72 -0
  232. package/theme/styles/css/color/rose.css +72 -0
  233. package/theme/styles/css/color/sky.css +72 -0
  234. package/theme/styles/css/color/teal.css +72 -0
  235. package/theme/styles/css/color/violet.css +72 -0
  236. package/theme/styles/css/color/yellow.css +72 -0
  237. package/theme/styles/css/fonts.css +85 -0
  238. package/theme/styles/css/index.css +18 -0
  239. package/theme/styles/css/neutral/gray.css +63 -0
  240. package/theme/styles/css/neutral/index.css +11 -0
  241. package/theme/styles/css/neutral/mauve.css +63 -0
  242. package/theme/styles/css/neutral/mist.css +63 -0
  243. package/theme/styles/css/neutral/neutral.css +63 -0
  244. package/theme/styles/css/neutral/olive.css +63 -0
  245. package/theme/styles/css/neutral/slate.css +63 -0
  246. package/theme/styles/css/neutral/stone.css +63 -0
  247. package/theme/styles/css/neutral/taupe.css +63 -0
  248. package/theme/styles/css/neutral/zinc.css +63 -0
  249. package/theme/styles/css/radius/index.css +30 -0
  250. package/theme/styles/css/space/index.css +20 -0
  251. package/types/edsis-angular-chart-area.d.ts +139 -0
  252. package/types/edsis-angular-chart-bar.d.ts +291 -0
  253. package/types/edsis-angular-chart-core.d.ts +824 -0
  254. package/types/edsis-angular-chart-line.d.ts +148 -0
  255. package/types/edsis-angular-chart-pie.d.ts +207 -0
  256. package/types/edsis-angular-chart-primitives.d.ts +360 -0
  257. package/types/edsis-angular-chart-radar.d.ts +198 -0
  258. package/types/edsis-angular-chart-radial.d.ts +187 -0
  259. package/types/edsis-angular-chart-scatter.d.ts +181 -0
  260. package/types/edsis-angular-chart.d.ts +3 -0
  261. package/types/edsis-angular-component-accordion.d.ts +139 -0
  262. package/types/edsis-angular-component-alert-dialog.d.ts +288 -0
  263. package/types/edsis-angular-component-alert.d.ts +72 -0
  264. package/types/edsis-angular-component-aspect-ratio.d.ts +20 -0
  265. package/types/edsis-angular-component-avatar.d.ts +111 -0
  266. package/types/edsis-angular-component-badge.d.ts +36 -0
  267. package/types/edsis-angular-component-breadcrumb.d.ts +85 -0
  268. package/types/edsis-angular-component-button-group.d.ts +50 -0
  269. package/types/edsis-angular-component-button.d.ts +44 -0
  270. package/types/edsis-angular-component-calendar.d.ts +150 -0
  271. package/types/edsis-angular-component-card.d.ts +123 -0
  272. package/types/edsis-angular-component-carousel.d.ts +155 -0
  273. package/types/edsis-angular-component-checkbox.d.ts +100 -0
  274. package/types/edsis-angular-component-collapsible.d.ts +68 -0
  275. package/types/edsis-angular-component-combobox.d.ts +105 -0
  276. package/types/edsis-angular-component-command.d.ts +215 -0
  277. package/types/edsis-angular-component-composer.d.ts +190 -0
  278. package/types/edsis-angular-component-context-menu.d.ts +64 -0
  279. package/types/edsis-angular-component-date-picker.d.ts +199 -0
  280. package/types/edsis-angular-component-dialog.d.ts +231 -0
  281. package/types/edsis-angular-component-drawer.d.ts +2 -0
  282. package/types/edsis-angular-component-dropdown-menu.d.ts +370 -0
  283. package/types/edsis-angular-component-editor.d.ts +234 -0
  284. package/types/edsis-angular-component-empty.d.ts +85 -0
  285. package/types/edsis-angular-component-form.d.ts +223 -0
  286. package/types/edsis-angular-component-hover-card.d.ts +133 -0
  287. package/types/edsis-angular-component-icon.d.ts +90 -0
  288. package/types/edsis-angular-component-input-group.d.ts +98 -0
  289. package/types/edsis-angular-component-input-otp.d.ts +249 -0
  290. package/types/edsis-angular-component-input.d.ts +31 -0
  291. package/types/edsis-angular-component-item.d.ts +169 -0
  292. package/types/edsis-angular-component-kanban.d.ts +165 -0
  293. package/types/edsis-angular-component-kbd.d.ts +25 -0
  294. package/types/edsis-angular-component-label.d.ts +19 -0
  295. package/types/edsis-angular-component-menubar.d.ts +123 -0
  296. package/types/edsis-angular-component-native-select.d.ts +39 -0
  297. package/types/edsis-angular-component-navigation-menu.d.ts +163 -0
  298. package/types/edsis-angular-component-pagination.d.ts +83 -0
  299. package/types/edsis-angular-component-pillbox.d.ts +380 -0
  300. package/types/edsis-angular-component-popover.d.ts +96 -0
  301. package/types/edsis-angular-component-progress.d.ts +45 -0
  302. package/types/edsis-angular-component-radio.d.ts +137 -0
  303. package/types/edsis-angular-component-resizable.d.ts +166 -0
  304. package/types/edsis-angular-component-scroll-area.d.ts +37 -0
  305. package/types/edsis-angular-component-segmented-control.d.ts +102 -0
  306. package/types/edsis-angular-component-select.d.ts +138 -0
  307. package/types/edsis-angular-component-separator.d.ts +26 -0
  308. package/types/edsis-angular-component-sheet.d.ts +240 -0
  309. package/types/edsis-angular-component-skeleton.d.ts +13 -0
  310. package/types/edsis-angular-component-slider.d.ts +148 -0
  311. package/types/edsis-angular-component-spinner.d.ts +31 -0
  312. package/types/edsis-angular-component-switch.d.ts +101 -0
  313. package/types/edsis-angular-component-table.d.ts +109 -0
  314. package/types/edsis-angular-component-tabs.d.ts +183 -0
  315. package/types/edsis-angular-component-textarea.d.ts +27 -0
  316. package/types/edsis-angular-component-timeline.d.ts +146 -0
  317. package/types/edsis-angular-component-toast.d.ts +60 -0
  318. package/types/edsis-angular-component-toggle-group.d.ts +161 -0
  319. package/types/edsis-angular-component-toggle.d.ts +47 -0
  320. package/types/edsis-angular-component-tooltip.d.ts +233 -0
  321. package/types/edsis-angular-component-utils-core.d.ts +175 -0
  322. package/types/edsis-angular-component-utils-overlay.d.ts +17 -0
  323. package/types/edsis-angular-component-utils-scale.d.ts +27 -0
  324. package/types/edsis-angular-component-utils.d.ts +2 -0
  325. package/types/edsis-angular-component.d.ts +1 -0
  326. package/types/edsis-angular-navigation-core.d.ts +55 -0
  327. package/types/edsis-angular-navigation-icon.d.ts +9 -0
  328. package/types/edsis-angular-navigation-service.d.ts +121 -0
  329. package/types/edsis-angular-navigation-types.d.ts +185 -0
  330. package/types/edsis-angular-navigation.d.ts +862 -0
  331. package/types/edsis-angular-sdk.d.ts +87 -0
  332. package/types/edsis-angular-theme-component-settings.d.ts +205 -0
  333. package/types/edsis-angular-theme-layout-services.d.ts +143 -0
  334. package/types/edsis-angular-theme-layout-types.d.ts +36 -0
  335. package/types/edsis-angular-theme-layout-wrapper.d.ts +670 -0
  336. package/types/edsis-angular-theme-layout.d.ts +218 -0
  337. package/types/edsis-angular-theme-on-fill.d.ts +45 -0
  338. package/types/edsis-angular-theme-page-core.d.ts +151 -0
  339. package/types/edsis-angular-theme-page-filter.d.ts +127 -0
  340. package/types/edsis-angular-theme-page-overview.d.ts +28 -0
  341. package/types/edsis-angular-theme-page-root.d.ts +172 -0
  342. package/types/edsis-angular-theme-page-side.d.ts +90 -0
  343. package/types/edsis-angular-theme-page-slots.d.ts +61 -0
  344. package/types/edsis-angular-theme-page.d.ts +7 -0
  345. package/types/edsis-angular-theme-shell-services.d.ts +188 -0
  346. package/types/edsis-angular-theme-shell-types.d.ts +102 -0
  347. package/types/edsis-angular-theme-shell.d.ts +178 -0
  348. package/types/edsis-angular-theme-styles.d.ts +328 -0
  349. package/types/edsis-angular-theme.d.ts +1 -0
  350. package/types/edsis-angular.d.ts +5 -2
  351. package/fesm2022/edsis-angular-block-shell.mjs +0 -1329
  352. package/fesm2022/edsis-angular-block-shell.mjs.map +0 -1
  353. package/fesm2022/edsis-angular-block-themes.mjs +0 -1007
  354. package/fesm2022/edsis-angular-block-themes.mjs.map +0 -1
  355. package/fesm2022/edsis-angular-module-auth.mjs +0 -2582
  356. package/fesm2022/edsis-angular-module-auth.mjs.map +0 -1
  357. package/fesm2022/edsis-angular-platform-mfe.mjs +0 -329
  358. package/fesm2022/edsis-angular-platform-mfe.mjs.map +0 -1
  359. package/fesm2022/edsis-angular-services-runtime.mjs +0 -385
  360. package/fesm2022/edsis-angular-services-runtime.mjs.map +0 -1
  361. package/fesm2022/edsis-angular.mjs.map +0 -1
  362. package/types/edsis-angular-block-shell.d.ts +0 -190
  363. package/types/edsis-angular-block-themes.d.ts +0 -94
  364. package/types/edsis-angular-module-auth.d.ts +0 -533
  365. package/types/edsis-angular-platform-mfe.d.ts +0 -126
  366. package/types/edsis-angular-services-runtime.d.ts +0 -118
@@ -0,0 +1,1319 @@
1
+ import { foregroundFor } from "@edsis/angular/theme/styles";
2
+ import * as i0 from "@angular/core";
3
+ import { Component, DestroyRef, Directive, ElementRef, NgZone, PLATFORM_ID, Renderer2, Service, afterNextRender, computed, effect, inject, input, signal, viewChild } from "@angular/core";
4
+ import { DOCUMENT, isPlatformBrowser } from "@angular/common";
5
+ import { scaleBand, scaleLinear, scalePoint } from "d3-scale";
6
+ import { max, min } from "d3-array";
7
+ import { area, curveLinear, curveMonotoneX, curveStep, line, stack, stackOffsetExpand } from "d3-shape";
8
+ const CHART_DATA_ATTRIBUTE = "data-chart";
9
+ const CHART_THEMES = [{
10
+ key: "light",
11
+ selector: ""
12
+ }, {
13
+ key: "dark",
14
+ selector: "[data-mode=\"dark\"]"
15
+ }];
16
+ const CSS_CONTEXT_BREAKERS = /[;{}<>@\\"']|\/\*|\*\//;
17
+ const CSS_COLOR_CHARACTERS = /^[a-zA-Z0-9#%.,+\-_()/ ]+$/;
18
+ const ALLOWED_COLOR_FUNCTIONS = /* @__PURE__ */ new Set([
19
+ "rgb",
20
+ "rgba",
21
+ "hsl",
22
+ "hsla",
23
+ "hwb",
24
+ "lab",
25
+ "lch",
26
+ "oklab",
27
+ "oklch",
28
+ "color",
29
+ "color-mix",
30
+ "light-dark",
31
+ "var"
32
+ ]);
33
+ function isSafeCssColorValue(value) {
34
+ const trimmed = value.trim();
35
+ if (!trimmed || trimmed.length > 200) return false;
36
+ if (CSS_CONTEXT_BREAKERS.test(trimmed)) return false;
37
+ if (!CSS_COLOR_CHARACTERS.test(trimmed)) return false;
38
+ let depth = 0;
39
+ for (const character of trimmed) if (character === "(") depth += 1;
40
+ else if (character === ")") {
41
+ depth -= 1;
42
+ if (depth < 0) return false;
43
+ }
44
+ if (depth !== 0) return false;
45
+ for (const match of trimmed.matchAll(/([a-zA-Z][a-zA-Z0-9-]*)\s*\(/g)) if (!ALLOWED_COLOR_FUNCTIONS.has(match[1].toLowerCase())) return false;
46
+ return true;
47
+ }
48
+ const PAIRED_THEME_TOKENS = /* @__PURE__ */ new Set([
49
+ "chart-1",
50
+ "chart-2",
51
+ "chart-3",
52
+ "chart-4",
53
+ "chart-5",
54
+ "primary",
55
+ "secondary",
56
+ "accent",
57
+ "success",
58
+ "warning",
59
+ "info",
60
+ "destructive",
61
+ "brand"
62
+ ]);
63
+ const TOKEN_REFERENCE = /^(?:hsl\(\s*var\(\s*--([\w-]+)\s*\)\s*\)|var\(\s*--([\w-]+)\s*\))$/i;
64
+ const HSL_FUNCTION = /^hsl\(\s*([^()/]+?)\s*\)$/i;
65
+ const HEX_6 = /^#[0-9a-f]{6}$/i;
66
+ function seriesForegroundValue(value, mode) {
67
+ const trimmed = value.trim();
68
+ const reference = TOKEN_REFERENCE.exec(trimmed);
69
+ if (reference) {
70
+ const token = (reference[1] ?? reference[2]).toLowerCase();
71
+ return PAIRED_THEME_TOKENS.has(token) ? `hsl(var(--${token}-foreground))` : null;
72
+ }
73
+ const inner = HSL_FUNCTION.exec(trimmed)?.[1];
74
+ const candidate = inner ?? trimmed;
75
+ if (inner !== void 0 || HEX_6.test(trimmed) || !/[(#]/.test(trimmed)) {
76
+ const foreground = foregroundFor(candidate, mode);
77
+ return foreground ? `hsl(${foreground})` : null;
78
+ }
79
+ return null;
80
+ }
81
+ function buildChartCss(chartId, config) {
82
+ const entries = Object.entries(config).filter(([, cfg]) => cfg.color || cfg.theme);
83
+ if (entries.length === 0) return "";
84
+ const scopeId = escapeCssIdent(chartId);
85
+ return CHART_THEMES.map(({ key, selector }) => {
86
+ const vars = entries.map(([seriesKey, cfg]) => {
87
+ const value = cfg.theme?.[key] ?? cfg.color;
88
+ if (!value || !isSafeCssColorValue(value)) return "";
89
+ const ident = escapeCssIdent(seriesKey);
90
+ const declaration = ` --color-${ident}: ${value.trim()};`;
91
+ const foreground = seriesForegroundValue(value, key);
92
+ return foreground ? `${declaration}\n --color-${ident}-foreground: ${foreground};` : declaration;
93
+ }).filter(Boolean).join("\n");
94
+ if (!vars) return "";
95
+ return `${selector ? `${selector} [${CHART_DATA_ATTRIBUTE}="${scopeId}"]` : `[${CHART_DATA_ATTRIBUTE}="${scopeId}"]`} {\n${vars}\n}`;
96
+ }).filter(Boolean).join("\n");
97
+ }
98
+ const CSS_IDENT_CHARACTERS = /^[a-zA-Z0-9_-]*$/;
99
+ const CSS_IDENT_FINGERPRINTED = /_h[0-9a-f]{8}$/;
100
+ function escapeCssIdent(input) {
101
+ if (CSS_IDENT_CHARACTERS.test(input) && !CSS_IDENT_FINGERPRINTED.test(input)) return input;
102
+ return `${input.replace(/[^a-zA-Z0-9_-]/g, "_")}_h${fingerprint(input)}`;
103
+ }
104
+ function fingerprint(input) {
105
+ let hash = 2166136261;
106
+ for (let index = 0; index < input.length; index += 1) {
107
+ hash ^= input.charCodeAt(index);
108
+ hash = Math.imul(hash, 16777619);
109
+ }
110
+ return (hash >>> 0).toString(16).padStart(8, "0");
111
+ }
112
+ function seriesColorVar(seriesKey) {
113
+ return `var(--color-${escapeCssIdent(seriesKey)})`;
114
+ }
115
+ function resolveSeriesColor(raw, fallback) {
116
+ if (typeof raw !== "string" || raw.length === 0) return fallback;
117
+ if (raw.startsWith("var(") || raw.startsWith("#") || raw.startsWith("rgb") || raw.startsWith("hsl") || raw.includes("(")) return raw;
118
+ return seriesColorVar(raw);
119
+ }
120
+ var ChartContext = class ChartContext {
121
+ id = signal("", ...ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []);
122
+ config = signal({}, ...ngDevMode ? [{ debugName: "config" }] : /* istanbul ignore next */ []);
123
+ dimensions = signal({
124
+ width: 0,
125
+ height: 0
126
+ }, ...ngDevMode ? [{ debugName: "dimensions" }] : /* istanbul ignore next */ []);
127
+ activePoint = signal(null, ...ngDevMode ? [{ debugName: "activePoint" }] : /* istanbul ignore next */ []);
128
+ hiddenSeries = signal(/* @__PURE__ */ new Set(), ...ngDevMode ? [{ debugName: "hiddenSeries" }] : /* istanbul ignore next */ []);
129
+ seriesKeys = computed(() => Object.keys(this.config()), ...ngDevMode ? [{ debugName: "seriesKeys" }] : /* istanbul ignore next */ []);
130
+ visibleSeriesKeys = computed(() => {
131
+ const hidden = this.hiddenSeries();
132
+ return this.seriesKeys().filter((k) => !hidden.has(k));
133
+ }, ...ngDevMode ? [{ debugName: "visibleSeriesKeys" }] : /* istanbul ignore next */ []);
134
+ toggleSeries(key) {
135
+ this.hiddenSeries.update((set) => {
136
+ const next = new Set(set);
137
+ if (next.has(key)) next.delete(key);
138
+ else next.add(key);
139
+ return next;
140
+ });
141
+ }
142
+ static ɵfac = i0.ɵɵngDeclareFactory({
143
+ minVersion: "12.0.0",
144
+ version: "22.2.4",
145
+ ngImport: i0,
146
+ type: ChartContext,
147
+ deps: [],
148
+ target: i0.ɵɵFactoryTarget.Service
149
+ });
150
+ static ɵprov = i0.ɵɵngDeclareService({
151
+ minVersion: "22.0.0",
152
+ version: "22.2.4",
153
+ ngImport: i0,
154
+ type: ChartContext,
155
+ autoProvided: false
156
+ });
157
+ };
158
+ i0.ɵɵngDeclareClassMetadata({
159
+ minVersion: "12.0.0",
160
+ version: "22.2.4",
161
+ ngImport: i0,
162
+ type: ChartContext,
163
+ decorators: [{
164
+ type: Service,
165
+ args: [{ autoProvided: false }]
166
+ }]
167
+ });
168
+ function nearestCategoryIndex(ctx, localX, localY) {
169
+ const scale = ctx.categoryScale();
170
+ const categories = ctx.categories();
171
+ if (!scale || categories.length === 0) return -1;
172
+ const pointerAlong = ctx.orientation() === "vertical" ? localX : localY;
173
+ const bandwidth = scale.bandwidth();
174
+ const step = scale.step?.() ?? bandwidth;
175
+ let bestIndex = -1;
176
+ let bestDelta = Infinity;
177
+ for (let i = 0; i < categories.length; i++) {
178
+ const center = (scale(categories[i]) ?? 0) + bandwidth / 2;
179
+ const delta = Math.abs(pointerAlong - center);
180
+ if (delta < bestDelta) {
181
+ bestDelta = delta;
182
+ bestIndex = i;
183
+ }
184
+ }
185
+ if (bestDelta > step) return -1;
186
+ return bestIndex;
187
+ }
188
+ function elementClientCenter(target) {
189
+ const el = target;
190
+ if (!el || typeof el.getBoundingClientRect !== "function") return null;
191
+ const rect = el.getBoundingClientRect();
192
+ return {
193
+ clientX: rect.left + rect.width / 2,
194
+ clientY: rect.top + rect.height / 2
195
+ };
196
+ }
197
+ function activationClientPoint(event) {
198
+ return event instanceof PointerEvent ? {
199
+ clientX: event.clientX,
200
+ clientY: event.clientY
201
+ } : elementClientCenter(event.currentTarget ?? event.target);
202
+ }
203
+ function clamp(value, min, max) {
204
+ return Math.min(max, Math.max(min, value));
205
+ }
206
+ function normalizeIndexRange(start, end, maxCount) {
207
+ if (maxCount <= 0) return null;
208
+ return {
209
+ startIndex: clamp(Math.floor(Math.min(start, end)), 0, maxCount - 1),
210
+ endIndex: clamp(Math.floor(Math.max(start, end)), 0, maxCount - 1)
211
+ };
212
+ }
213
+ function effectiveIndexRange(range, maxCount) {
214
+ if (maxCount <= 0) return null;
215
+ return range ? normalizeIndexRange(range.startIndex, range.endIndex, maxCount) : {
216
+ startIndex: 0,
217
+ endIndex: maxCount - 1
218
+ };
219
+ }
220
+ function indexRangeSize(range, maxCount) {
221
+ const effective = effectiveIndexRange(range, maxCount);
222
+ return effective ? effective.endIndex - effective.startIndex + 1 : 0;
223
+ }
224
+ function sliceByIndexRange(data, range) {
225
+ if (!range) return data;
226
+ return data.slice(range.startIndex, range.endIndex + 1);
227
+ }
228
+ function zoomIndexRange(current, maxCount, anchorIndex, factor) {
229
+ const base = effectiveIndexRange(current, maxCount);
230
+ if (!base) return null;
231
+ const currentSize = base.endIndex - base.startIndex + 1;
232
+ const nextSize = clamp(Math.round(currentSize * factor), 2, maxCount);
233
+ if (nextSize >= maxCount) return null;
234
+ const boundedAnchor = clamp(anchorIndex, base.startIndex, base.endIndex);
235
+ const ratio = currentSize <= 1 ? .5 : (boundedAnchor - base.startIndex) / (currentSize - 1);
236
+ let start = Math.round(boundedAnchor - ratio * (nextSize - 1));
237
+ start = clamp(start, 0, maxCount - nextSize);
238
+ return {
239
+ startIndex: start,
240
+ endIndex: start + nextSize - 1
241
+ };
242
+ }
243
+ function panIndexRange(current, maxCount, deltaSteps) {
244
+ const base = effectiveIndexRange(current, maxCount);
245
+ if (!base) return null;
246
+ const size = base.endIndex - base.startIndex + 1;
247
+ if (size >= maxCount) return null;
248
+ const start = clamp(base.startIndex + deltaSteps, 0, maxCount - size);
249
+ return {
250
+ startIndex: start,
251
+ endIndex: start + size - 1
252
+ };
253
+ }
254
+ function zeroBaselineDomain(minValue, maxValue) {
255
+ const min = Math.min(0, minValue);
256
+ const max = Math.max(0, maxValue);
257
+ return min === max ? [min, max + 1] : [min, max];
258
+ }
259
+ function normalizeNumericDomain(a, b) {
260
+ if (a === b) return [a - 1, b + 1];
261
+ return a < b ? [a, b] : [b, a];
262
+ }
263
+ function zoomNumericDomain(current, full, anchor, factor) {
264
+ const currentWidth = current[1] - current[0];
265
+ const fullWidth = full[1] - full[0];
266
+ const nextWidth = clamp(currentWidth * factor, fullWidth / 50, fullWidth);
267
+ if (nextWidth >= fullWidth) return full;
268
+ let start = anchor - (currentWidth === 0 ? .5 : (anchor - current[0]) / currentWidth) * nextWidth;
269
+ start = clamp(start, full[0], full[1] - nextWidth);
270
+ return [start, start + nextWidth];
271
+ }
272
+ function panNumericDomain(current, full, delta) {
273
+ const width = current[1] - current[0];
274
+ const start = clamp(current[0] + delta, full[0], full[1] - width);
275
+ return [start, start + width];
276
+ }
277
+ function setupCartesianChart(options) {
278
+ const root = inject(ChartContext);
279
+ const innerWidth = computed(() => Math.max(0, root.dimensions().width - options.margin().left - options.margin().right), ...ngDevMode ? [{ debugName: "innerWidth" }] : /* istanbul ignore next */ []);
280
+ const innerHeight = computed(() => Math.max(0, root.dimensions().height - options.margin().top - options.margin().bottom), ...ngDevMode ? [{ debugName: "innerHeight" }] : /* istanbul ignore next */ []);
281
+ const viewBox = computed(() => {
282
+ const { width, height } = root.dimensions();
283
+ return `0 0 ${Math.max(0, width)} ${Math.max(0, height)}`;
284
+ }, ...ngDevMode ? [{ debugName: "viewBox" }] : /* istanbul ignore next */ []);
285
+ const innerTransform = computed(() => `translate(${options.margin().left},${options.margin().top})`, ...ngDevMode ? [{ debugName: "innerTransform" }] : /* istanbul ignore next */ []);
286
+ const windowRange = computed(() => options.viewport ? effectiveIndexRange(options.viewport.zoomRange(), options.data().length) : null, ...ngDevMode ? [{ debugName: "windowRange" }] : /* istanbul ignore next */ []);
287
+ const visibleStartIndex = computed(() => windowRange()?.startIndex ?? 0, ...ngDevMode ? [{ debugName: "visibleStartIndex" }] : /* istanbul ignore next */ []);
288
+ const visibleData = computed(() => options.viewport ? sliceByIndexRange(options.data(), windowRange()) : options.data(), ...ngDevMode ? [{ debugName: "visibleData" }] : /* istanbul ignore next */ []);
289
+ const resolveDatumIndex = (mark) => visibleStartIndex() + mark.datumIndex;
290
+ const seriesLabel = (seriesKey) => root.config()[seriesKey]?.label ?? seriesKey;
291
+ effect(() => {
292
+ options.viewport?.dataCount.set(options.data().length);
293
+ const cartesian = options.cartesian;
294
+ if (cartesian) {
295
+ cartesian.context.orientation.set(cartesian.orientation());
296
+ cartesian.context.margin.set(options.margin());
297
+ cartesian.context.innerWidth.set(innerWidth());
298
+ cartesian.context.innerHeight.set(innerHeight());
299
+ }
300
+ options.publishLayout?.({
301
+ width: innerWidth(),
302
+ height: innerHeight()
303
+ });
304
+ });
305
+ return {
306
+ innerWidth,
307
+ innerHeight,
308
+ viewBox,
309
+ innerTransform,
310
+ visibleStartIndex,
311
+ visibleData,
312
+ resolveDatumIndex,
313
+ seriesLabel,
314
+ pointAriaLabel: (mark) => options.ariaLabel(mark, seriesLabel(mark.seriesKey)),
315
+ emitClick: (mark) => {
316
+ const datumIndex = resolveDatumIndex(mark);
317
+ options.click.emit(options.click.payload(mark, datumIndex, options.data()[datumIndex]));
318
+ },
319
+ setActivePoint: (event, mark) => {
320
+ const center = activationClientPoint(event);
321
+ root.activePoint.set({
322
+ index: mark.datumIndex,
323
+ datumIndex: resolveDatumIndex(mark),
324
+ seriesKey: mark.seriesKey,
325
+ clientX: center?.clientX,
326
+ clientY: center?.clientY
327
+ });
328
+ },
329
+ clearActivePoint: () => root.activePoint.set(null)
330
+ };
331
+ }
332
+ function setupPolarChart(options) {
333
+ const root = inject(ChartContext);
334
+ return {
335
+ innerWidth: computed(() => Math.max(0, root.dimensions().width - options.margin().left - options.margin().right), ...ngDevMode ? [{ debugName: "innerWidth" }] : /* istanbul ignore next */ []),
336
+ innerHeight: computed(() => Math.max(0, root.dimensions().height - options.margin().top - options.margin().bottom), ...ngDevMode ? [{ debugName: "innerHeight" }] : /* istanbul ignore next */ []),
337
+ viewBox: computed(() => {
338
+ const { width, height } = root.dimensions();
339
+ return `0 0 ${Math.max(0, width)} ${Math.max(0, height)}`;
340
+ }, ...ngDevMode ? [{ debugName: "viewBox" }] : /* istanbul ignore next */ []),
341
+ innerTransform: computed(() => `translate(${options.margin().left},${options.margin().top})`, ...ngDevMode ? [{ debugName: "innerTransform" }] : /* istanbul ignore next */ []),
342
+ seriesLabel: (seriesKey) => root.config()[seriesKey]?.label ?? seriesKey,
343
+ setActivePoint: (event, mark) => {
344
+ const location = activationClientPoint(event);
345
+ root.activePoint.set({
346
+ index: mark.datumIndex,
347
+ datumIndex: mark.datumIndex,
348
+ seriesKey: mark.seriesKey,
349
+ clientX: location?.clientX,
350
+ clientY: location?.clientY
351
+ });
352
+ },
353
+ clearActivePoint: () => root.activePoint.set(null)
354
+ };
355
+ }
356
+ var ChartStyle = class ChartStyle {
357
+ ctx = inject(ChartContext);
358
+ host = inject(ElementRef);
359
+ renderer = inject(Renderer2);
360
+ styleEl = null;
361
+ css = computed(() => buildChartCss(this.ctx.id(), this.ctx.config()), ...ngDevMode ? [{ debugName: "css" }] : /* istanbul ignore next */ []);
362
+ constructor() {
363
+ effect(() => {
364
+ const css = this.css();
365
+ if (!this.styleEl) {
366
+ this.styleEl = this.renderer.createElement("style");
367
+ this.renderer.appendChild(this.host.nativeElement, this.styleEl);
368
+ }
369
+ this.styleEl.textContent = css;
370
+ });
371
+ }
372
+ static ɵfac = i0.ɵɵngDeclareFactory({
373
+ minVersion: "12.0.0",
374
+ version: "22.2.4",
375
+ ngImport: i0,
376
+ type: ChartStyle,
377
+ deps: [],
378
+ target: i0.ɵɵFactoryTarget.Component
379
+ });
380
+ static ɵcmp = i0.ɵɵngDeclareComponent({
381
+ minVersion: "14.0.0",
382
+ version: "22.2.4",
383
+ type: ChartStyle,
384
+ isStandalone: true,
385
+ selector: "ChartStyle",
386
+ ngImport: i0,
387
+ template: "",
388
+ isInline: true
389
+ });
390
+ };
391
+ i0.ɵɵngDeclareClassMetadata({
392
+ minVersion: "12.0.0",
393
+ version: "22.2.4",
394
+ ngImport: i0,
395
+ type: ChartStyle,
396
+ decorators: [{
397
+ type: Component,
398
+ args: [{
399
+ selector: "ChartStyle",
400
+ template: ""
401
+ }]
402
+ }],
403
+ ctorParameters: () => []
404
+ });
405
+ function resolveChartStyle(styleVariant, styles) {
406
+ return computed(() => styleVariant() ?? styles());
407
+ }
408
+ let chartIdCounter = 0;
409
+ var ChartContainer = class ChartContainer {
410
+ ctx = inject(ChartContext);
411
+ zone = inject(NgZone);
412
+ platformId = inject(PLATFORM_ID);
413
+ destroyRef = inject(DestroyRef);
414
+ areaRef = viewChild.required("area", ...ngDevMode ? [{ debugName: "areaRef" }] : /* istanbul ignore next */ []);
415
+ config = input.required(...ngDevMode ? [{ debugName: "config" }] : /* istanbul ignore next */ []);
416
+ aspect = input("aspect-video", ...ngDevMode ? [{ debugName: "aspect" }] : /* istanbul ignore next */ []);
417
+ areaClass = computed(() => `relative flex ${this.aspect()} w-full justify-center`, ...ngDevMode ? [{ debugName: "areaClass" }] : /* istanbul ignore next */ []);
418
+ chartId = input(null, ...ngDevMode ? [{ debugName: "chartId" }] : /* istanbul ignore next */ []);
419
+ constructor() {
420
+ const autoId = `chart-${++chartIdCounter}`;
421
+ effect(() => {
422
+ this.ctx.id.set(this.chartId() ?? autoId);
423
+ });
424
+ effect(() => {
425
+ this.ctx.config.set(this.config());
426
+ });
427
+ if (isPlatformBrowser(this.platformId)) afterNextRender(() => this.observeSize());
428
+ }
429
+ observeSize() {
430
+ const el = this.areaRef().nativeElement;
431
+ if (typeof ResizeObserver === "undefined") {
432
+ const rect = el.getBoundingClientRect();
433
+ this.ctx.dimensions.set({
434
+ width: rect.width,
435
+ height: rect.height
436
+ });
437
+ return;
438
+ }
439
+ const observer = new ResizeObserver((entries) => {
440
+ for (const entry of entries) {
441
+ const { width, height } = entry.contentRect;
442
+ this.zone.run(() => this.ctx.dimensions.set({
443
+ width,
444
+ height
445
+ }));
446
+ }
447
+ });
448
+ observer.observe(el);
449
+ this.destroyRef.onDestroy(() => observer.disconnect());
450
+ }
451
+ static ɵfac = i0.ɵɵngDeclareFactory({
452
+ minVersion: "12.0.0",
453
+ version: "22.2.4",
454
+ ngImport: i0,
455
+ type: ChartContainer,
456
+ deps: [],
457
+ target: i0.ɵɵFactoryTarget.Component
458
+ });
459
+ static ɵcmp = i0.ɵɵngDeclareComponent({
460
+ minVersion: "17.2.0",
461
+ version: "22.2.4",
462
+ type: ChartContainer,
463
+ isStandalone: true,
464
+ selector: "Chart",
465
+ inputs: {
466
+ config: {
467
+ classPropertyName: "config",
468
+ publicName: "config",
469
+ isSignal: true,
470
+ isRequired: true,
471
+ transformFunction: null
472
+ },
473
+ aspect: {
474
+ classPropertyName: "aspect",
475
+ publicName: "aspect",
476
+ isSignal: true,
477
+ isRequired: false,
478
+ transformFunction: null
479
+ },
480
+ chartId: {
481
+ classPropertyName: "chartId",
482
+ publicName: "chartId",
483
+ isSignal: true,
484
+ isRequired: false,
485
+ transformFunction: null
486
+ }
487
+ },
488
+ host: {
489
+ properties: { "attr.data-chart": "ctx.id()" },
490
+ classAttribute: "relative flex flex-col text-xs"
491
+ },
492
+ providers: [ChartContext],
493
+ viewQueries: [{
494
+ propertyName: "areaRef",
495
+ first: true,
496
+ predicate: ["area"],
497
+ descendants: true,
498
+ isSignal: true
499
+ }],
500
+ ngImport: i0,
501
+ template: `
502
+ <ChartStyle />
503
+ <div #area data-chart-area [class]="areaClass()">
504
+ <ng-content />
505
+ </div>
506
+ <ng-content select="ChartLegend" />
507
+ `,
508
+ isInline: true,
509
+ dependencies: [{
510
+ kind: "component",
511
+ type: ChartStyle,
512
+ selector: "ChartStyle"
513
+ }]
514
+ });
515
+ };
516
+ i0.ɵɵngDeclareClassMetadata({
517
+ minVersion: "12.0.0",
518
+ version: "22.2.4",
519
+ ngImport: i0,
520
+ type: ChartContainer,
521
+ decorators: [{
522
+ type: Component,
523
+ args: [{
524
+ selector: "Chart",
525
+ providers: [ChartContext],
526
+ imports: [ChartStyle],
527
+ host: {
528
+ "[attr.data-chart]": "ctx.id()",
529
+ class: "relative flex flex-col text-xs"
530
+ },
531
+ template: `
532
+ <ChartStyle />
533
+ <div #area data-chart-area [class]="areaClass()">
534
+ <ng-content />
535
+ </div>
536
+ <ng-content select="ChartLegend" />
537
+ `
538
+ }]
539
+ }],
540
+ ctorParameters: () => [],
541
+ propDecorators: {
542
+ areaRef: [{
543
+ type: i0.ViewChild,
544
+ args: ["area", { isSignal: true }]
545
+ }],
546
+ config: [{
547
+ type: i0.Input,
548
+ args: [{
549
+ isSignal: true,
550
+ alias: "config",
551
+ required: true
552
+ }]
553
+ }],
554
+ aspect: [{
555
+ type: i0.Input,
556
+ args: [{
557
+ isSignal: true,
558
+ alias: "aspect",
559
+ required: false
560
+ }]
561
+ }],
562
+ chartId: [{
563
+ type: i0.Input,
564
+ args: [{
565
+ isSignal: true,
566
+ alias: "chartId",
567
+ required: false
568
+ }]
569
+ }]
570
+ }
571
+ });
572
+ var ChartDataTable = class ChartDataTable {
573
+ data = input.required(...ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []);
574
+ columns = input.required(...ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []);
575
+ label = input("Chart data", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
576
+ rowHeaderKey = input(null, ...ngDevMode ? [{ debugName: "rowHeaderKey" }] : /* istanbul ignore next */ []);
577
+ static ɵfac = i0.ɵɵngDeclareFactory({
578
+ minVersion: "12.0.0",
579
+ version: "22.2.4",
580
+ ngImport: i0,
581
+ type: ChartDataTable,
582
+ deps: [],
583
+ target: i0.ɵɵFactoryTarget.Component
584
+ });
585
+ static ɵcmp = i0.ɵɵngDeclareComponent({
586
+ minVersion: "17.0.0",
587
+ version: "22.2.4",
588
+ type: ChartDataTable,
589
+ isStandalone: true,
590
+ selector: "ChartDataTable",
591
+ inputs: {
592
+ data: {
593
+ classPropertyName: "data",
594
+ publicName: "data",
595
+ isSignal: true,
596
+ isRequired: true,
597
+ transformFunction: null
598
+ },
599
+ columns: {
600
+ classPropertyName: "columns",
601
+ publicName: "columns",
602
+ isSignal: true,
603
+ isRequired: true,
604
+ transformFunction: null
605
+ },
606
+ label: {
607
+ classPropertyName: "label",
608
+ publicName: "label",
609
+ isSignal: true,
610
+ isRequired: false,
611
+ transformFunction: null
612
+ },
613
+ rowHeaderKey: {
614
+ classPropertyName: "rowHeaderKey",
615
+ publicName: "rowHeaderKey",
616
+ isSignal: true,
617
+ isRequired: false,
618
+ transformFunction: null
619
+ }
620
+ },
621
+ ngImport: i0,
622
+ template: `
623
+ <table class="sr-only" [attr.aria-label]="label()">
624
+ <thead>
625
+ <tr>
626
+ @for (column of columns(); track column) {
627
+ <th scope="col">{{ column }}</th>
628
+ }
629
+ </tr>
630
+ </thead>
631
+ <tbody>
632
+ @for (row of data(); track $index) {
633
+ <tr>
634
+ @for (column of columns(); track column) {
635
+ @if (column === rowHeaderKey()) {
636
+ <th scope="row">{{ row[column] }}</th>
637
+ } @else {
638
+ <td>{{ row[column] }}</td>
639
+ }
640
+ }
641
+ </tr>
642
+ }
643
+ </tbody>
644
+ </table>
645
+ `,
646
+ isInline: true
647
+ });
648
+ };
649
+ i0.ɵɵngDeclareClassMetadata({
650
+ minVersion: "12.0.0",
651
+ version: "22.2.4",
652
+ ngImport: i0,
653
+ type: ChartDataTable,
654
+ decorators: [{
655
+ type: Component,
656
+ args: [{
657
+ selector: "ChartDataTable",
658
+ template: `
659
+ <table class="sr-only" [attr.aria-label]="label()">
660
+ <thead>
661
+ <tr>
662
+ @for (column of columns(); track column) {
663
+ <th scope="col">{{ column }}</th>
664
+ }
665
+ </tr>
666
+ </thead>
667
+ <tbody>
668
+ @for (row of data(); track $index) {
669
+ <tr>
670
+ @for (column of columns(); track column) {
671
+ @if (column === rowHeaderKey()) {
672
+ <th scope="row">{{ row[column] }}</th>
673
+ } @else {
674
+ <td>{{ row[column] }}</td>
675
+ }
676
+ }
677
+ </tr>
678
+ }
679
+ </tbody>
680
+ </table>
681
+ `
682
+ }]
683
+ }],
684
+ propDecorators: {
685
+ data: [{
686
+ type: i0.Input,
687
+ args: [{
688
+ isSignal: true,
689
+ alias: "data",
690
+ required: true
691
+ }]
692
+ }],
693
+ columns: [{
694
+ type: i0.Input,
695
+ args: [{
696
+ isSignal: true,
697
+ alias: "columns",
698
+ required: true
699
+ }]
700
+ }],
701
+ label: [{
702
+ type: i0.Input,
703
+ args: [{
704
+ isSignal: true,
705
+ alias: "label",
706
+ required: false
707
+ }]
708
+ }],
709
+ rowHeaderKey: [{
710
+ type: i0.Input,
711
+ args: [{
712
+ isSignal: true,
713
+ alias: "rowHeaderKey",
714
+ required: false
715
+ }]
716
+ }]
717
+ }
718
+ });
719
+ var ChartRovingFocus = class ChartRovingFocus {
720
+ host = inject(ElementRef);
721
+ destroyRef = inject(DestroyRef);
722
+ activeMark = null;
723
+ constructor() {
724
+ afterNextRender(() => {
725
+ this.syncTabStops(this.marks());
726
+ if (typeof MutationObserver === "undefined") return;
727
+ const observer = new MutationObserver(() => this.syncTabStops(this.marks()));
728
+ observer.observe(this.host.nativeElement, {
729
+ childList: true,
730
+ subtree: true
731
+ });
732
+ this.destroyRef.onDestroy(() => observer.disconnect());
733
+ });
734
+ }
735
+ onFocusIn(event) {
736
+ const target = event.target;
737
+ if (!(target instanceof Element) || !this.marks().includes(target)) return;
738
+ this.activeMark = target;
739
+ this.syncTabStops(this.marks());
740
+ }
741
+ onKeydown(event) {
742
+ const marks = this.marks();
743
+ const target = event.target;
744
+ const currentIndex = target instanceof Element ? marks.indexOf(target) : -1;
745
+ if (currentIndex < 0 || marks.length < 2) return;
746
+ let targetIndex = null;
747
+ if (event.key === "ArrowRight" || event.key === "ArrowDown") targetIndex = (currentIndex + 1) % marks.length;
748
+ else if (event.key === "ArrowLeft" || event.key === "ArrowUp") targetIndex = (currentIndex - 1 + marks.length) % marks.length;
749
+ else if (event.key === "Home") targetIndex = 0;
750
+ else if (event.key === "End") targetIndex = marks.length - 1;
751
+ if (targetIndex === null) return;
752
+ event.preventDefault();
753
+ const next = marks[targetIndex];
754
+ this.activeMark = next;
755
+ this.syncTabStops(marks);
756
+ next.focus();
757
+ }
758
+ marks() {
759
+ return Array.from(this.host.nativeElement.querySelectorAll("[role=\"img\"][tabindex]"));
760
+ }
761
+ syncTabStops(marks) {
762
+ if (marks.length === 0) {
763
+ this.activeMark = null;
764
+ return;
765
+ }
766
+ const active = this.activeMark && marks.includes(this.activeMark) ? this.activeMark : marks[0];
767
+ this.activeMark = active;
768
+ for (const mark of marks) mark.setAttribute("tabindex", mark === active ? "0" : "-1");
769
+ }
770
+ static ɵfac = i0.ɵɵngDeclareFactory({
771
+ minVersion: "12.0.0",
772
+ version: "22.2.4",
773
+ ngImport: i0,
774
+ type: ChartRovingFocus,
775
+ deps: [],
776
+ target: i0.ɵɵFactoryTarget.Directive
777
+ });
778
+ static ɵdir = i0.ɵɵngDeclareDirective({
779
+ minVersion: "14.0.0",
780
+ version: "22.2.4",
781
+ type: ChartRovingFocus,
782
+ isStandalone: true,
783
+ selector: "svg[ChartRovingFocus]",
784
+ host: { listeners: {
785
+ "focusin": "onFocusIn($event)",
786
+ "keydown": "onKeydown($event)"
787
+ } },
788
+ ngImport: i0
789
+ });
790
+ };
791
+ i0.ɵɵngDeclareClassMetadata({
792
+ minVersion: "12.0.0",
793
+ version: "22.2.4",
794
+ ngImport: i0,
795
+ type: ChartRovingFocus,
796
+ decorators: [{
797
+ type: Directive,
798
+ args: [{
799
+ selector: "svg[ChartRovingFocus]",
800
+ host: {
801
+ "(focusin)": "onFocusIn($event)",
802
+ "(keydown)": "onKeydown($event)"
803
+ }
804
+ }]
805
+ }],
806
+ ctorParameters: () => []
807
+ });
808
+ var ChartMarkFocus = class ChartMarkFocus {
809
+ static ɵfac = i0.ɵɵngDeclareFactory({
810
+ minVersion: "12.0.0",
811
+ version: "22.2.4",
812
+ ngImport: i0,
813
+ type: ChartMarkFocus,
814
+ deps: [],
815
+ target: i0.ɵɵFactoryTarget.Directive
816
+ });
817
+ static ɵdir = i0.ɵɵngDeclareDirective({
818
+ minVersion: "14.0.0",
819
+ version: "22.2.4",
820
+ type: ChartMarkFocus,
821
+ isStandalone: true,
822
+ selector: "[ChartMarkFocus]",
823
+ host: { classAttribute: "outline-none focus-visible:stroke-ring focus-visible:stroke-2" },
824
+ ngImport: i0
825
+ });
826
+ };
827
+ i0.ɵɵngDeclareClassMetadata({
828
+ minVersion: "12.0.0",
829
+ version: "22.2.4",
830
+ ngImport: i0,
831
+ type: ChartMarkFocus,
832
+ decorators: [{
833
+ type: Directive,
834
+ args: [{
835
+ selector: "[ChartMarkFocus]",
836
+ host: { class: "outline-none focus-visible:stroke-ring focus-visible:stroke-2" }
837
+ }]
838
+ }]
839
+ });
840
+ const DEFAULT_CARTESIAN_MARGIN = {
841
+ top: 8,
842
+ right: 8,
843
+ bottom: 24,
844
+ left: 40
845
+ };
846
+ const DEFAULT_POLAR_MARGIN = {
847
+ top: 8,
848
+ right: 8,
849
+ bottom: 8,
850
+ left: 8
851
+ };
852
+ const DEFAULT_RADAR_MARGIN = {
853
+ top: 24,
854
+ right: 24,
855
+ bottom: 24,
856
+ left: 24
857
+ };
858
+ const DEFAULT_CARTESIAN_MARGIN_UNITS = {
859
+ top: 2,
860
+ right: 2,
861
+ bottom: 6,
862
+ left: 10
863
+ };
864
+ const DEFAULT_POLAR_MARGIN_UNITS = {
865
+ top: 2,
866
+ right: 2,
867
+ bottom: 2,
868
+ left: 2
869
+ };
870
+ const DEFAULT_RADAR_MARGIN_UNITS = {
871
+ top: 6,
872
+ right: 6,
873
+ bottom: 6,
874
+ left: 6
875
+ };
876
+ var CartesianContext = class CartesianContext {
877
+ innerWidth = signal(0, ...ngDevMode ? [{ debugName: "innerWidth" }] : /* istanbul ignore next */ []);
878
+ innerHeight = signal(0, ...ngDevMode ? [{ debugName: "innerHeight" }] : /* istanbul ignore next */ []);
879
+ margin = signal(DEFAULT_CARTESIAN_MARGIN, ...ngDevMode ? [{ debugName: "margin" }] : /* istanbul ignore next */ []);
880
+ orientation = signal("vertical", ...ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []);
881
+ categoryScale = signal(null, ...ngDevMode ? [{ debugName: "categoryScale" }] : /* istanbul ignore next */ []);
882
+ valueScale = signal(null, ...ngDevMode ? [{ debugName: "valueScale" }] : /* istanbul ignore next */ []);
883
+ categories = signal([], ...ngDevMode ? [{ debugName: "categories" }] : /* istanbul ignore next */ []);
884
+ static ɵfac = i0.ɵɵngDeclareFactory({
885
+ minVersion: "12.0.0",
886
+ version: "22.2.4",
887
+ ngImport: i0,
888
+ type: CartesianContext,
889
+ deps: [],
890
+ target: i0.ɵɵFactoryTarget.Service
891
+ });
892
+ static ɵprov = i0.ɵɵngDeclareService({
893
+ minVersion: "22.0.0",
894
+ version: "22.2.4",
895
+ ngImport: i0,
896
+ type: CartesianContext,
897
+ autoProvided: false
898
+ });
899
+ };
900
+ i0.ɵɵngDeclareClassMetadata({
901
+ minVersion: "12.0.0",
902
+ version: "22.2.4",
903
+ ngImport: i0,
904
+ type: CartesianContext,
905
+ decorators: [{
906
+ type: Service,
907
+ args: [{ autoProvided: false }]
908
+ }]
909
+ });
910
+ function xScale(ctx) {
911
+ return computed(() => ctx.orientation() === "vertical" ? ctx.categoryScale() : ctx.valueScale());
912
+ }
913
+ function yScale(ctx) {
914
+ return computed(() => ctx.orientation() === "vertical" ? ctx.valueScale() : ctx.categoryScale());
915
+ }
916
+ function resolveChartMargin(margin, units, space) {
917
+ return computed(() => {
918
+ const explicit = margin();
919
+ if (explicit) return explicit;
920
+ return {
921
+ top: space.scale(units.top),
922
+ right: space.scale(units.right),
923
+ bottom: space.scale(units.bottom),
924
+ left: space.scale(units.left)
925
+ };
926
+ });
927
+ }
928
+ var CategoricalViewportContext = class CategoricalViewportContext {
929
+ dataCount = signal(0, ...ngDevMode ? [{ debugName: "dataCount" }] : /* istanbul ignore next */ []);
930
+ brushRange = signal(null, ...ngDevMode ? [{ debugName: "brushRange" }] : /* istanbul ignore next */ []);
931
+ zoomRange = signal(null, ...ngDevMode ? [{ debugName: "zoomRange" }] : /* istanbul ignore next */ []);
932
+ hasZoom = computed(() => {
933
+ const range = this.zoomRange();
934
+ const count = this.dataCount();
935
+ return !!range && count > 0 && (range.startIndex > 0 || range.endIndex < count - 1);
936
+ }, ...ngDevMode ? [{ debugName: "hasZoom" }] : /* istanbul ignore next */ []);
937
+ resetZoom() {
938
+ this.brushRange.set(null);
939
+ this.zoomRange.set(null);
940
+ }
941
+ static ɵfac = i0.ɵɵngDeclareFactory({
942
+ minVersion: "12.0.0",
943
+ version: "22.2.4",
944
+ ngImport: i0,
945
+ type: CategoricalViewportContext,
946
+ deps: [],
947
+ target: i0.ɵɵFactoryTarget.Service
948
+ });
949
+ static ɵprov = i0.ɵɵngDeclareService({
950
+ minVersion: "22.0.0",
951
+ version: "22.2.4",
952
+ ngImport: i0,
953
+ type: CategoricalViewportContext,
954
+ autoProvided: false
955
+ });
956
+ };
957
+ i0.ɵɵngDeclareClassMetadata({
958
+ minVersion: "12.0.0",
959
+ version: "22.2.4",
960
+ ngImport: i0,
961
+ type: CategoricalViewportContext,
962
+ decorators: [{
963
+ type: Service,
964
+ args: [{ autoProvided: false }]
965
+ }]
966
+ });
967
+ var ScatterViewportContext = class ScatterViewportContext {
968
+ innerWidth = signal(0, ...ngDevMode ? [{ debugName: "innerWidth" }] : /* istanbul ignore next */ []);
969
+ innerHeight = signal(0, ...ngDevMode ? [{ debugName: "innerHeight" }] : /* istanbul ignore next */ []);
970
+ fullXDomain = signal(null, ...ngDevMode ? [{ debugName: "fullXDomain" }] : /* istanbul ignore next */ []);
971
+ fullYDomain = signal(null, ...ngDevMode ? [{ debugName: "fullYDomain" }] : /* istanbul ignore next */ []);
972
+ zoomXDomain = signal(null, ...ngDevMode ? [{ debugName: "zoomXDomain" }] : /* istanbul ignore next */ []);
973
+ zoomYDomain = signal(null, ...ngDevMode ? [{ debugName: "zoomYDomain" }] : /* istanbul ignore next */ []);
974
+ xScale = signal(null, ...ngDevMode ? [{ debugName: "xScale" }] : /* istanbul ignore next */ []);
975
+ yScale = signal(null, ...ngDevMode ? [{ debugName: "yScale" }] : /* istanbul ignore next */ []);
976
+ hasZoom = computed(() => this.zoomXDomain() !== null || this.zoomYDomain() !== null, ...ngDevMode ? [{ debugName: "hasZoom" }] : /* istanbul ignore next */ []);
977
+ resetZoom() {
978
+ this.zoomXDomain.set(null);
979
+ this.zoomYDomain.set(null);
980
+ }
981
+ static ɵfac = i0.ɵɵngDeclareFactory({
982
+ minVersion: "12.0.0",
983
+ version: "22.2.4",
984
+ ngImport: i0,
985
+ type: ScatterViewportContext,
986
+ deps: [],
987
+ target: i0.ɵɵFactoryTarget.Service
988
+ });
989
+ static ɵprov = i0.ɵɵngDeclareService({
990
+ minVersion: "22.0.0",
991
+ version: "22.2.4",
992
+ ngImport: i0,
993
+ type: ScatterViewportContext,
994
+ autoProvided: false
995
+ });
996
+ };
997
+ i0.ɵɵngDeclareClassMetadata({
998
+ minVersion: "12.0.0",
999
+ version: "22.2.4",
1000
+ ngImport: i0,
1001
+ type: ScatterViewportContext,
1002
+ decorators: [{
1003
+ type: Service,
1004
+ args: [{ autoProvided: false }]
1005
+ }]
1006
+ });
1007
+ function bandTicks(scale) {
1008
+ const half = scale.bandwidth() / 2;
1009
+ return scale.domain().map((value) => ({
1010
+ value,
1011
+ offset: (scale(value) ?? 0) + half,
1012
+ label: value
1013
+ }));
1014
+ }
1015
+ function linearTicks(scale, count = 5, formatter = (v) => String(v)) {
1016
+ return scale.ticks(count).map((value) => ({
1017
+ value,
1018
+ offset: scale(value),
1019
+ label: formatter(value)
1020
+ }));
1021
+ }
1022
+ function readNumber(datum, key) {
1023
+ const raw = datum[key];
1024
+ if (typeof raw === "number" && Number.isFinite(raw)) return raw;
1025
+ if (typeof raw === "string") {
1026
+ const parsed = Number(raw);
1027
+ return Number.isFinite(parsed) ? parsed : 0;
1028
+ }
1029
+ return 0;
1030
+ }
1031
+ function curveFor(curve) {
1032
+ switch (curve) {
1033
+ case "monotone": return curveMonotoneX;
1034
+ case "step": return curveStep;
1035
+ default: return curveLinear;
1036
+ }
1037
+ }
1038
+ function buildCartesianScales(input) {
1039
+ const { data, xKey, seriesKeys, orientation, innerWidth, innerHeight } = input;
1040
+ const isVertical = orientation === "vertical";
1041
+ const categories = data.map((d) => String(d[xKey] ?? ""));
1042
+ const categoryScale = scalePoint().domain(categories).range(isVertical ? [0, innerWidth] : [0, innerHeight]).padding(0);
1043
+ const [domainMin, domainMax] = zeroBaselineDomain(min(data, (d) => min(seriesKeys, (k) => readNumber(d, k)) ?? 0) ?? 0, max(data, (d) => max(seriesKeys, (k) => readNumber(d, k)) ?? 0) ?? 0);
1044
+ return {
1045
+ categories,
1046
+ categoryScale,
1047
+ valueScale: scaleLinear().domain([domainMin, domainMax]).nice().range(isVertical ? [innerHeight, 0] : [0, innerWidth])
1048
+ };
1049
+ }
1050
+ function computeLineLayout(input) {
1051
+ const { data, seriesKeys, orientation, curve } = input;
1052
+ const { categories, categoryScale, valueScale } = buildCartesianScales(input);
1053
+ const isVertical = orientation === "vertical";
1054
+ const allPoints = [];
1055
+ const series = [];
1056
+ for (const seriesKey of seriesKeys) {
1057
+ const points = data.map((d, datumIndex) => {
1058
+ const value = readNumber(d, seriesKey);
1059
+ const category = categories[datumIndex];
1060
+ const c = categoryScale(category) ?? 0;
1061
+ const v = valueScale(value);
1062
+ return {
1063
+ seriesKey,
1064
+ datumIndex,
1065
+ category,
1066
+ value,
1067
+ x: isVertical ? c : v,
1068
+ y: isVertical ? v : c
1069
+ };
1070
+ });
1071
+ allPoints.push(...points);
1072
+ const generator = line().x((p) => p.x).y((p) => p.y).curve(curveFor(curve));
1073
+ series.push({
1074
+ seriesKey,
1075
+ color: seriesColorVar(seriesKey),
1076
+ linePath: generator(points) ?? "",
1077
+ points
1078
+ });
1079
+ }
1080
+ return {
1081
+ series,
1082
+ points: allPoints,
1083
+ categoryScale,
1084
+ valueScale,
1085
+ categories
1086
+ };
1087
+ }
1088
+ function computeAreaLayout(input) {
1089
+ if (input.stacked && input.seriesKeys.length > 0) return computeStackedArea(input);
1090
+ return computeSingleArea(input);
1091
+ }
1092
+ function computeSingleArea(input) {
1093
+ const { data, seriesKeys, orientation, curve } = input;
1094
+ const { categories, categoryScale, valueScale } = buildCartesianScales(input);
1095
+ const isVertical = orientation === "vertical";
1096
+ const baseline = isVertical ? valueScale(0) : valueScale(0);
1097
+ const allPoints = [];
1098
+ const series = [];
1099
+ for (const seriesKey of seriesKeys) {
1100
+ const points = data.map((d, datumIndex) => {
1101
+ const value = readNumber(d, seriesKey);
1102
+ const category = categories[datumIndex];
1103
+ const c = categoryScale(category) ?? 0;
1104
+ const v = valueScale(value);
1105
+ return {
1106
+ seriesKey,
1107
+ datumIndex,
1108
+ category,
1109
+ value,
1110
+ x: isVertical ? c : v,
1111
+ y: isVertical ? v : c
1112
+ };
1113
+ });
1114
+ allPoints.push(...points);
1115
+ const lineGen = line().x((p) => p.x).y((p) => p.y).curve(curveFor(curve));
1116
+ const areaGen = isVertical ? area().x((p) => p.x).y0(baseline).y1((p) => p.y).curve(curveFor(curve)) : area().y((p) => p.y).x0(baseline).x1((p) => p.x).curve(curveFor(curve));
1117
+ series.push({
1118
+ seriesKey,
1119
+ color: seriesColorVar(seriesKey),
1120
+ linePath: lineGen(points) ?? "",
1121
+ areaPath: areaGen(points) ?? "",
1122
+ points
1123
+ });
1124
+ }
1125
+ return {
1126
+ series,
1127
+ points: allPoints,
1128
+ categoryScale,
1129
+ valueScale,
1130
+ categories,
1131
+ stacked: false
1132
+ };
1133
+ }
1134
+ function computeStackedArea(input) {
1135
+ const { data, seriesKeys, orientation, innerWidth, innerHeight, xKey, curve, expanded } = input;
1136
+ const isVertical = orientation === "vertical";
1137
+ const categories = data.map((d) => String(d[xKey] ?? ""));
1138
+ const categoryScale = scalePoint().domain(categories).range(isVertical ? [0, innerWidth] : [0, innerHeight]).padding(0);
1139
+ const normalized = data.map((d) => {
1140
+ const out = {};
1141
+ for (const k of seriesKeys) out[k] = readNumber(d, k);
1142
+ return out;
1143
+ });
1144
+ const stackGenerator = stack().keys(seriesKeys);
1145
+ if (expanded) stackGenerator.offset(stackOffsetExpand);
1146
+ const stackSeries = stackGenerator(normalized);
1147
+ const [domainMin, domainMax] = zeroBaselineDomain(expanded ? 0 : min(stackSeries, (layer) => min(layer, (p) => Math.min(p[0], p[1]))) ?? 0, expanded ? 1 : max(stackSeries, (layer) => max(layer, (p) => Math.max(p[0], p[1]))) ?? 0);
1148
+ const valueScale = scaleLinear().domain([domainMin, domainMax]).range(isVertical ? [innerHeight, 0] : [0, innerWidth]);
1149
+ if (!expanded) valueScale.nice();
1150
+ const allPoints = [];
1151
+ return {
1152
+ series: stackSeries.map((layer) => {
1153
+ const seriesKey = layer.key;
1154
+ const points = layer.map((p, datumIndex) => {
1155
+ const category = categories[datumIndex];
1156
+ const c = categoryScale(category) ?? 0;
1157
+ const upper = valueScale(p[1]);
1158
+ return {
1159
+ seriesKey,
1160
+ datumIndex,
1161
+ category,
1162
+ value: p[1] - p[0],
1163
+ x: isVertical ? c : upper,
1164
+ y: isVertical ? upper : c
1165
+ };
1166
+ });
1167
+ allPoints.push(...points);
1168
+ const lineGen = line().x(([x]) => x).y(([, y]) => y).curve(curveFor(curve));
1169
+ const areaGen = isVertical ? area().x(([x]) => x).y0(([, , y0]) => y0).y1(([, y1]) => y1).curve(curveFor(curve)) : area().y(([x]) => x).x0(([, , x0]) => x0).x1(([, x1]) => x1).curve(curveFor(curve));
1170
+ const tuples = layer.map((p, i) => {
1171
+ return [
1172
+ categoryScale(categories[i]) ?? 0,
1173
+ valueScale(p[1]),
1174
+ valueScale(p[0])
1175
+ ];
1176
+ });
1177
+ return {
1178
+ seriesKey,
1179
+ color: seriesColorVar(seriesKey),
1180
+ linePath: lineGen(tuples) ?? "",
1181
+ areaPath: areaGen(tuples) ?? "",
1182
+ points
1183
+ };
1184
+ }),
1185
+ points: allPoints,
1186
+ categoryScale,
1187
+ valueScale,
1188
+ categories,
1189
+ stacked: true
1190
+ };
1191
+ }
1192
+ function pointToBandAdapter(pointScale, range) {
1193
+ const half = pointScale.step() / 2;
1194
+ const extended = [range[0] - half, range[1] + half];
1195
+ return scaleBand().domain(pointScale.domain()).range(extended).padding(0);
1196
+ }
1197
+ function cloneLinear(scale) {
1198
+ return scaleLinear().domain(scale.domain()).range(scale.range());
1199
+ }
1200
+ function provideCartesianFromLineLayout(ctx, layout, orientation, innerWidth, innerHeight) {
1201
+ const range = orientation === "vertical" ? [0, innerWidth] : [0, innerHeight];
1202
+ ctx.orientation.set(orientation);
1203
+ ctx.innerWidth.set(innerWidth);
1204
+ ctx.innerHeight.set(innerHeight);
1205
+ ctx.categoryScale.set(pointToBandAdapter(layout.categoryScale, range));
1206
+ ctx.valueScale.set(cloneLinear(layout.valueScale));
1207
+ ctx.categories.set(layout.categories);
1208
+ }
1209
+ const FALLBACK_RADIUS_PX = 6;
1210
+ var ChartThemeRadius = class ChartThemeRadius {
1211
+ document = inject(DOCUMENT, { optional: true });
1212
+ basePx = signal(this.readBasePx(), ...ngDevMode ? [{ debugName: "basePx" }] : /* istanbul ignore next */ []);
1213
+ px = this.basePx.asReadonly();
1214
+ constructor() {
1215
+ const root = this.document?.documentElement;
1216
+ const view = this.document?.defaultView;
1217
+ if (!root || !view || typeof view.MutationObserver !== "function") return;
1218
+ const observer = new view.MutationObserver(() => this.basePx.set(this.readBasePx()));
1219
+ observer.observe(root, {
1220
+ attributes: true,
1221
+ attributeFilter: ["theme-radius"]
1222
+ });
1223
+ inject(DestroyRef).onDestroy(() => observer.disconnect());
1224
+ }
1225
+ readBasePx() {
1226
+ const root = this.document?.documentElement;
1227
+ const view = this.document?.defaultView;
1228
+ if (!root || !view) return FALLBACK_RADIUS_PX;
1229
+ const raw = view.getComputedStyle(root).getPropertyValue("--radius").trim();
1230
+ return this.toPx(raw, view, root) ?? FALLBACK_RADIUS_PX;
1231
+ }
1232
+ toPx(value, view, root) {
1233
+ if (!value) return null;
1234
+ if (value.includes("infinity")) return 9999;
1235
+ const numeric = Number.parseFloat(value);
1236
+ if (!Number.isFinite(numeric)) return null;
1237
+ if (value.endsWith("rem")) return numeric * (Number.parseFloat(view.getComputedStyle(root).fontSize) || 16);
1238
+ return numeric;
1239
+ }
1240
+ static ɵfac = i0.ɵɵngDeclareFactory({
1241
+ minVersion: "12.0.0",
1242
+ version: "22.2.4",
1243
+ ngImport: i0,
1244
+ type: ChartThemeRadius,
1245
+ deps: [],
1246
+ target: i0.ɵɵFactoryTarget.Service
1247
+ });
1248
+ static ɵprov = i0.ɵɵngDeclareService({
1249
+ minVersion: "22.0.0",
1250
+ version: "22.2.4",
1251
+ ngImport: i0,
1252
+ type: ChartThemeRadius
1253
+ });
1254
+ };
1255
+ i0.ɵɵngDeclareClassMetadata({
1256
+ minVersion: "12.0.0",
1257
+ version: "22.2.4",
1258
+ ngImport: i0,
1259
+ type: ChartThemeRadius,
1260
+ decorators: [{ type: Service }],
1261
+ ctorParameters: () => []
1262
+ });
1263
+ const FALLBACK_SPACING_PX = 4;
1264
+ var ChartThemeSpace = class ChartThemeSpace {
1265
+ document = inject(DOCUMENT, { optional: true });
1266
+ unitPx = signal(this.readUnitPx(), ...ngDevMode ? [{ debugName: "unitPx" }] : /* istanbul ignore next */ []);
1267
+ px = this.unitPx.asReadonly();
1268
+ constructor() {
1269
+ const root = this.document?.documentElement;
1270
+ const view = this.document?.defaultView;
1271
+ if (!root || !view || typeof view.MutationObserver !== "function") return;
1272
+ const observer = new view.MutationObserver(() => this.unitPx.set(this.readUnitPx()));
1273
+ observer.observe(root, {
1274
+ attributes: true,
1275
+ attributeFilter: ["theme-space"]
1276
+ });
1277
+ inject(DestroyRef).onDestroy(() => observer.disconnect());
1278
+ }
1279
+ scale(units) {
1280
+ return units * this.unitPx();
1281
+ }
1282
+ readUnitPx() {
1283
+ const root = this.document?.documentElement;
1284
+ const view = this.document?.defaultView;
1285
+ if (!root || !view) return FALLBACK_SPACING_PX;
1286
+ const raw = view.getComputedStyle(root).getPropertyValue("--spacing-base").trim();
1287
+ return this.toPx(raw, view, root) ?? FALLBACK_SPACING_PX;
1288
+ }
1289
+ toPx(value, view, root) {
1290
+ if (!value) return null;
1291
+ const numeric = Number.parseFloat(value);
1292
+ if (!Number.isFinite(numeric)) return null;
1293
+ if (value.endsWith("rem")) return numeric * (Number.parseFloat(view.getComputedStyle(root).fontSize) || 16);
1294
+ return numeric;
1295
+ }
1296
+ static ɵfac = i0.ɵɵngDeclareFactory({
1297
+ minVersion: "12.0.0",
1298
+ version: "22.2.4",
1299
+ ngImport: i0,
1300
+ type: ChartThemeSpace,
1301
+ deps: [],
1302
+ target: i0.ɵɵFactoryTarget.Service
1303
+ });
1304
+ static ɵprov = i0.ɵɵngDeclareService({
1305
+ minVersion: "22.0.0",
1306
+ version: "22.2.4",
1307
+ ngImport: i0,
1308
+ type: ChartThemeSpace
1309
+ });
1310
+ };
1311
+ i0.ɵɵngDeclareClassMetadata({
1312
+ minVersion: "12.0.0",
1313
+ version: "22.2.4",
1314
+ ngImport: i0,
1315
+ type: ChartThemeSpace,
1316
+ decorators: [{ type: Service }],
1317
+ ctorParameters: () => []
1318
+ });
1319
+ export { CHART_DATA_ATTRIBUTE, CHART_THEMES, CartesianContext, CategoricalViewportContext, ChartContainer, ChartContext, ChartDataTable, ChartMarkFocus, ChartRovingFocus, ChartStyle, ChartThemeRadius, ChartThemeSpace, DEFAULT_CARTESIAN_MARGIN, DEFAULT_CARTESIAN_MARGIN_UNITS, DEFAULT_POLAR_MARGIN, DEFAULT_POLAR_MARGIN_UNITS, DEFAULT_RADAR_MARGIN, DEFAULT_RADAR_MARGIN_UNITS, ScatterViewportContext, activationClientPoint, bandTicks, buildCartesianScales, buildChartCss, cloneLinear, computeAreaLayout, computeLineLayout, effectiveIndexRange, elementClientCenter, escapeCssIdent, indexRangeSize, isSafeCssColorValue, linearTicks, nearestCategoryIndex, normalizeIndexRange, normalizeNumericDomain, panIndexRange, panNumericDomain, pointToBandAdapter, provideCartesianFromLineLayout, readNumber, resolveChartMargin, resolveChartStyle, resolveSeriesColor, seriesColorVar, setupCartesianChart, setupPolarChart, sliceByIndexRange, xScale, yScale, zeroBaselineDomain, zoomIndexRange, zoomNumericDomain };