@ids-group-ltd/ids-design-system 0.13.4 → 0.14.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 (247) hide show
  1. package/CHANGELOG.md +584 -0
  2. package/components.md +100 -52
  3. package/design-system.md +2 -0
  4. package/docs/agent/INDEX.md +3 -2
  5. package/docs/agent/charts/column-series-component.md +1 -1
  6. package/docs/agent/charts/ds-bar-chart.md +2 -1
  7. package/docs/agent/charts/ds-chart.md +3 -1
  8. package/docs/agent/charts/ds-config.md +3 -1
  9. package/docs/agent/charts/ds-line-chart.md +3 -3
  10. package/docs/agent/charts/ds-pie-chart.md +4 -3
  11. package/docs/agent/charts/line-series-component.md +1 -1
  12. package/docs/agent/feedback/ds-alert.md +1 -0
  13. package/docs/agent/feedback/ds-badge.md +1 -1
  14. package/docs/agent/feedback/ds-banner.md +1 -0
  15. package/docs/agent/feedback/ds-skeleton.md +2 -2
  16. package/docs/agent/feedback/ds-tag.md +1 -1
  17. package/docs/agent/forms/ds-autocomplete.md +2 -2
  18. package/docs/agent/forms/ds-button.md +1 -1
  19. package/docs/agent/forms/ds-color-picker.md +1 -1
  20. package/docs/agent/forms/ds-date-picker.md +2 -2
  21. package/docs/agent/forms/ds-filter-bar.md +1 -1
  22. package/docs/agent/forms/ds-icon-button.md +1 -1
  23. package/docs/agent/forms/ds-input.md +1 -1
  24. package/docs/agent/forms/ds-multi-select.md +2 -2
  25. package/docs/agent/forms/ds-otp-input.md +1 -1
  26. package/docs/agent/forms/ds-search.md +3 -3
  27. package/docs/agent/forms/ds-split-button.md +1 -1
  28. package/docs/agent/forms/ds-switch.md +4 -2
  29. package/docs/agent/forms/ds-textarea.md +2 -1
  30. package/docs/agent/foundations/tokens.md +1 -1
  31. package/docs/agent/navigation/ds-app-layout.md +2 -2
  32. package/docs/agent/navigation/ds-auth-layout.md +4 -4
  33. package/docs/agent/navigation/ds-page-header.md +1 -1
  34. package/docs/agent/navigation/ds-pagination.md +2 -2
  35. package/docs/agent/platform/ds-config.md +3 -3
  36. package/docs/agent/platform/ds-intl.md +33 -0
  37. package/docs/agent/surfaces/ds-accordion.md +2 -2
  38. package/docs/agent/tables/ds-cell-template.md +1 -1
  39. package/docs/agent/tables/ds-table.md +5 -4
  40. package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs +9 -5
  41. package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs.map +1 -1
  42. package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs +21 -10
  43. package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs.map +1 -1
  44. package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs +9 -5
  45. package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs.map +1 -1
  46. package/fesm2022/ids-group-ltd-ids-design-system-components-auth-layout.mjs +8 -8
  47. package/fesm2022/ids-group-ltd-ids-design-system-components-auth-layout.mjs.map +1 -1
  48. package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs +13 -8
  49. package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs.map +1 -1
  50. package/fesm2022/ids-group-ltd-ids-design-system-components-avatar-group.mjs +5 -3
  51. package/fesm2022/ids-group-ltd-ids-design-system-components-avatar-group.mjs.map +1 -1
  52. package/fesm2022/ids-group-ltd-ids-design-system-components-avatar.mjs +5 -10
  53. package/fesm2022/ids-group-ltd-ids-design-system-components-avatar.mjs.map +1 -1
  54. package/fesm2022/ids-group-ltd-ids-design-system-components-badge.mjs +12 -8
  55. package/fesm2022/ids-group-ltd-ids-design-system-components-badge.mjs.map +1 -1
  56. package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs +21 -10
  57. package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs.map +1 -1
  58. package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs +56 -32
  59. package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs.map +1 -1
  60. package/fesm2022/ids-group-ltd-ids-design-system-components-bar.mjs +2 -2
  61. package/fesm2022/ids-group-ltd-ids-design-system-components-bar.mjs.map +1 -1
  62. package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs +7 -6
  63. package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs.map +1 -1
  64. package/fesm2022/ids-group-ltd-ids-design-system-components-breadcrumbs.mjs +4 -3
  65. package/fesm2022/ids-group-ltd-ids-design-system-components-breadcrumbs.mjs.map +1 -1
  66. package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs +4 -4
  67. package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs.map +1 -1
  68. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-data-table.mjs +15 -3
  69. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-data-table.mjs.map +1 -1
  70. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs +5 -3
  71. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs.map +1 -1
  72. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs +45 -39
  73. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs.map +1 -1
  74. package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs +414 -105
  75. package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs.map +1 -1
  76. package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs +9 -5
  77. package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs.map +1 -1
  78. package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs +22 -18
  79. package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs.map +1 -1
  80. package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs +16 -9
  81. package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs.map +1 -1
  82. package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs +4 -2
  83. package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs.map +1 -1
  84. package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs +7 -4
  85. package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs.map +1 -1
  86. package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs +12 -6
  87. package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs.map +1 -1
  88. package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs +2 -2
  89. package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs.map +1 -1
  90. package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs +13 -7
  91. package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs.map +1 -1
  92. package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs +40 -42
  93. package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs.map +1 -1
  94. package/fesm2022/ids-group-ltd-ids-design-system-components-heatmap-chart.mjs +13 -9
  95. package/fesm2022/ids-group-ltd-ids-design-system-components-heatmap-chart.mjs.map +1 -1
  96. package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs +3 -3
  97. package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs.map +1 -1
  98. package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs +5 -4
  99. package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs.map +1 -1
  100. package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs +27 -23
  101. package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs.map +1 -1
  102. package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs +62 -13
  103. package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs.map +1 -1
  104. package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs +15 -10
  105. package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -1
  106. package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs +5 -4
  107. package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs.map +1 -1
  108. package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs +13 -7
  109. package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs.map +1 -1
  110. package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs +2 -2
  111. package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs.map +1 -1
  112. package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs +22 -13
  113. package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs.map +1 -1
  114. package/fesm2022/ids-group-ltd-ids-design-system-components-password-rules.mjs +12 -11
  115. package/fesm2022/ids-group-ltd-ids-design-system-components-password-rules.mjs.map +1 -1
  116. package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs +55 -29
  117. package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs.map +1 -1
  118. package/fesm2022/ids-group-ltd-ids-design-system-components-scatter-chart.mjs +41 -12
  119. package/fesm2022/ids-group-ltd-ids-design-system-components-scatter-chart.mjs.map +1 -1
  120. package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs +13 -6
  121. package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs.map +1 -1
  122. package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs +4 -3
  123. package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs.map +1 -1
  124. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav-footer.mjs +4 -2
  125. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav-footer.mjs.map +1 -1
  126. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs +5 -3
  127. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs.map +1 -1
  128. package/fesm2022/ids-group-ltd-ids-design-system-components-skeleton.mjs +37 -4
  129. package/fesm2022/ids-group-ltd-ids-design-system-components-skeleton.mjs.map +1 -1
  130. package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs +8 -7
  131. package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs.map +1 -1
  132. package/fesm2022/ids-group-ltd-ids-design-system-components-spinner.mjs +5 -3
  133. package/fesm2022/ids-group-ltd-ids-design-system-components-spinner.mjs.map +1 -1
  134. package/fesm2022/ids-group-ltd-ids-design-system-components-split-button.mjs +9 -6
  135. package/fesm2022/ids-group-ltd-ids-design-system-components-split-button.mjs.map +1 -1
  136. package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs +6 -4
  137. package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs.map +1 -1
  138. package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs +20 -5
  139. package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs.map +1 -1
  140. package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.mjs +18 -15
  141. package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.mjs.map +1 -1
  142. package/fesm2022/ids-group-ltd-ids-design-system-components-table-export.mjs +9 -6
  143. package/fesm2022/ids-group-ltd-ids-design-system-components-table-export.mjs.map +1 -1
  144. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +47 -38
  145. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
  146. package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs +5 -3
  147. package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs.map +1 -1
  148. package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs +9 -5
  149. package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs.map +1 -1
  150. package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs +26 -4
  151. package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs.map +1 -1
  152. package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +12 -10
  153. package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -1
  154. package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs +8 -6
  155. package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs.map +1 -1
  156. package/fesm2022/ids-group-ltd-ids-design-system-components-w3w.mjs +5 -3
  157. package/fesm2022/ids-group-ltd-ids-design-system-components-w3w.mjs.map +1 -1
  158. package/fesm2022/ids-group-ltd-ids-design-system-components-waterfall-chart.mjs +14 -15
  159. package/fesm2022/ids-group-ltd-ids-design-system-components-waterfall-chart.mjs.map +1 -1
  160. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +345 -66
  161. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
  162. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +361 -6
  163. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
  164. package/fesm2022/ids-group-ltd-ids-design-system.mjs +1 -1
  165. package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
  166. package/migrations/0.10.0.json +1 -1
  167. package/migrations/0.10.1.json +1 -1
  168. package/migrations/0.12.2.json +4 -1
  169. package/migrations/0.13.3.json +32 -10
  170. package/migrations/0.13.4.json +1630 -132
  171. package/migrations/0.14.0.json +615 -0
  172. package/migrations/0.14.1.json +856 -0
  173. package/migrations/0.5.0.json +10 -4
  174. package/migrations/0.7.0.json +5 -2
  175. package/migrations/0.9.0.json +5 -2
  176. package/migrations/README.md +7 -2
  177. package/package.json +1 -1
  178. package/schematics/check-overrides/index.cjs +56 -0
  179. package/schematics/check-overrides/scan.cjs +74 -0
  180. package/schematics/check-overrides/schema.json +19 -0
  181. package/schematics/check-overrides/surface.json +2304 -0
  182. package/schematics/collection.json +5 -0
  183. package/styles/_chart-frame.scss +4 -4
  184. package/styles/_chart-interactive.scss +33 -0
  185. package/styles/_chart-motion.scss +17 -10
  186. package/styles/_field-box.scss +12 -0
  187. package/styles/_overlay-motion.scss +20 -10
  188. package/styles/_skeleton-shimmer.scss +4 -1
  189. package/styles/_tokens-charts.scss +1 -1
  190. package/styles/_tokens.scss +1 -1
  191. package/types/ids-group-ltd-ids-design-system-components-accordion.d.ts +11 -2
  192. package/types/ids-group-ltd-ids-design-system-components-alert.d.ts +4 -0
  193. package/types/ids-group-ltd-ids-design-system-components-app-layout.d.ts +5 -2
  194. package/types/ids-group-ltd-ids-design-system-components-auth-layout.d.ts +5 -5
  195. package/types/ids-group-ltd-ids-design-system-components-autocomplete.d.ts +7 -4
  196. package/types/ids-group-ltd-ids-design-system-components-avatar-group.d.ts +2 -0
  197. package/types/ids-group-ltd-ids-design-system-components-avatar.d.ts +5 -3
  198. package/types/ids-group-ltd-ids-design-system-components-badge.d.ts +6 -2
  199. package/types/ids-group-ltd-ids-design-system-components-banner.d.ts +4 -0
  200. package/types/ids-group-ltd-ids-design-system-components-bar-chart.d.ts +20 -14
  201. package/types/ids-group-ltd-ids-design-system-components-breadcrumbs.d.ts +2 -0
  202. package/types/ids-group-ltd-ids-design-system-components-button.d.ts +2 -2
  203. package/types/ids-group-ltd-ids-design-system-components-chart-data-table.d.ts +5 -0
  204. package/types/ids-group-ltd-ids-design-system-components-chart-legend.d.ts +2 -0
  205. package/types/ids-group-ltd-ids-design-system-components-chart-tooltip.d.ts +11 -6
  206. package/types/ids-group-ltd-ids-design-system-components-chart.d.ts +155 -36
  207. package/types/ids-group-ltd-ids-design-system-components-color-picker.d.ts +6 -2
  208. package/types/ids-group-ltd-ids-design-system-components-column-chart.d.ts +11 -8
  209. package/types/ids-group-ltd-ids-design-system-components-date-picker.d.ts +9 -3
  210. package/types/ids-group-ltd-ids-design-system-components-description-list.d.ts +2 -0
  211. package/types/ids-group-ltd-ids-design-system-components-drawer.d.ts +2 -0
  212. package/types/ids-group-ltd-ids-design-system-components-dropzone.d.ts +3 -0
  213. package/types/ids-group-ltd-ids-design-system-components-filter-bar.d.ts +9 -4
  214. package/types/ids-group-ltd-ids-design-system-components-funnel-chart.d.ts +13 -13
  215. package/types/ids-group-ltd-ids-design-system-components-heatmap-chart.d.ts +7 -5
  216. package/types/ids-group-ltd-ids-design-system-components-input.d.ts +2 -0
  217. package/types/ids-group-ltd-ids-design-system-components-line-chart.d.ts +17 -11
  218. package/types/ids-group-ltd-ids-design-system-components-modal.d.ts +6 -0
  219. package/types/ids-group-ltd-ids-design-system-components-multi-select.d.ts +11 -6
  220. package/types/ids-group-ltd-ids-design-system-components-number-stepper.d.ts +2 -0
  221. package/types/ids-group-ltd-ids-design-system-components-otp-input.d.ts +6 -2
  222. package/types/ids-group-ltd-ids-design-system-components-pagination.d.ts +17 -10
  223. package/types/ids-group-ltd-ids-design-system-components-password-rules.d.ts +2 -0
  224. package/types/ids-group-ltd-ids-design-system-components-pie-chart.d.ts +25 -14
  225. package/types/ids-group-ltd-ids-design-system-components-scatter-chart.d.ts +15 -6
  226. package/types/ids-group-ltd-ids-design-system-components-search.d.ts +9 -3
  227. package/types/ids-group-ltd-ids-design-system-components-select.d.ts +3 -2
  228. package/types/ids-group-ltd-ids-design-system-components-sidenav-footer.d.ts +2 -0
  229. package/types/ids-group-ltd-ids-design-system-components-sidenav.d.ts +3 -1
  230. package/types/ids-group-ltd-ids-design-system-components-skeleton.d.ts +6 -1
  231. package/types/ids-group-ltd-ids-design-system-components-slider.d.ts +2 -0
  232. package/types/ids-group-ltd-ids-design-system-components-spinner.d.ts +6 -4
  233. package/types/ids-group-ltd-ids-design-system-components-split-button.d.ts +5 -2
  234. package/types/ids-group-ltd-ids-design-system-components-stepper.d.ts +2 -0
  235. package/types/ids-group-ltd-ids-design-system-components-switch.d.ts +10 -1
  236. package/types/ids-group-ltd-ids-design-system-components-table-export.d.ts +1 -0
  237. package/types/ids-group-ltd-ids-design-system-components-table.d.ts +44 -28
  238. package/types/ids-group-ltd-ids-design-system-components-tabs.d.ts +2 -0
  239. package/types/ids-group-ltd-ids-design-system-components-tag.d.ts +6 -2
  240. package/types/ids-group-ltd-ids-design-system-components-textarea.d.ts +15 -0
  241. package/types/ids-group-ltd-ids-design-system-components-time-picker.d.ts +3 -0
  242. package/types/ids-group-ltd-ids-design-system-components-toast.d.ts +3 -0
  243. package/types/ids-group-ltd-ids-design-system-components-w3w.d.ts +2 -0
  244. package/types/ids-group-ltd-ids-design-system-components-waterfall-chart.d.ts +7 -5
  245. package/types/ids-group-ltd-ids-design-system-components.d.ts +83 -17
  246. package/types/ids-group-ltd-ids-design-system-core.d.ts +420 -14
  247. package/types/ids-group-ltd-ids-design-system.d.ts +3 -3
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, computed, signal, PLATFORM_ID, DestroyRef, untracked, afterRenderEffect, TemplateRef, Directive, Injector, afterNextRender, isDevMode, input, booleanAttribute, effect, ElementRef, DOCUMENT } from '@angular/core';
3
- import { DS_CONFIG, resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';
2
+ import { inject, computed, signal, PLATFORM_ID, DestroyRef, InjectionToken, ElementRef, afterNextRender, NgZone, untracked, afterRenderEffect, TemplateRef, Directive, Injector, isDevMode, input, booleanAttribute, effect, DOCUMENT } from '@angular/core';
3
+ import { DS_CONFIG, DS_INTL, injectDsLocale, resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';
4
4
  import { isPlatformBrowser } from '@angular/common';
5
5
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
6
6
  import { NgForm, FormGroupDirective, NgControl } from '@angular/forms';
@@ -105,34 +105,64 @@ function formatValue(value, locale) {
105
105
  }
106
106
  return numberFormatter(locale).format(value);
107
107
  }
108
- /** The built-in `valueFormat`: compact on a tick (`1.2M`), spelled out everywhere else
109
- * (`1 248 392`). A caller-supplied formatter receives the same `location` and decides for
108
+ const chartFormats = new Map();
109
+ /** The built-in `valueFormat` in one locale: compact on a tick (`1.2M`), spelled out everywhere
110
+ * else (`1,248,392`). A caller-supplied formatter receives the same `location` and decides for
110
111
  * itself; this is only the default.
111
112
  *
112
113
  * @internal */
113
- function defaultChartFormat(value, location) {
114
- if (!Number.isFinite(value)) {
115
- return '—';
116
- }
117
- return location === 'tick'
118
- ? new Intl.NumberFormat(undefined, {
114
+ function chartValueFormat(locale) {
115
+ let format = chartFormats.get(locale);
116
+ if (!format) {
117
+ const compact = new Intl.NumberFormat(locale, {
119
118
  notation: 'compact',
120
119
  maximumFractionDigits: 1,
121
- }).format(value)
122
- : new Intl.NumberFormat().format(value);
120
+ });
121
+ const full = new Intl.NumberFormat(locale);
122
+ format = (value, location) => !Number.isFinite(value)
123
+ ? '—'
124
+ : location === 'tick'
125
+ ? compact.format(value)
126
+ : full.format(value);
127
+ chartFormats.set(locale, format);
128
+ }
129
+ return format;
130
+ }
131
+ const percentFormatters = new Map();
132
+ function percentFormatter(locale, digits) {
133
+ const key = `${locale}|${digits}`;
134
+ let formatter = percentFormatters.get(key);
135
+ if (!formatter) {
136
+ formatter = new Intl.NumberFormat(locale, {
137
+ style: 'percent',
138
+ minimumFractionDigits: digits,
139
+ maximumFractionDigits: digits,
140
+ });
141
+ percentFormatters.set(key, formatter);
142
+ }
143
+ return formatter;
123
144
  }
124
145
  /** @internal */
125
- function formatPercent(value, total) {
146
+ function formatPercent(value, total, locale) {
126
147
  if (!total || !Number.isFinite(value) || !Number.isFinite(total)) {
127
148
  return '—';
128
149
  }
129
- const percent = (value / total) * 100;
150
+ const fraction = value / total;
151
+ const formatter = percentFormatter(locale, 1);
130
152
  // A real share must never print as an exact zero: at one decimal, 214 of 987,654,321 rounds to
131
153
  // "0.0%" beside a bar too short to see, and the row reads as nothing when it is not nothing.
132
- if (percent !== 0 && Math.abs(percent) < 0.05) {
133
- return percent > 0 ? '<0.1%' : '>-0.1%';
154
+ if (fraction !== 0 && Math.abs(fraction) < 0.0005) {
155
+ return fraction > 0
156
+ ? `<${formatter.format(0.001)}`
157
+ : `>${formatter.format(-0.001)}`;
134
158
  }
135
- return `${percent.toFixed(1)}%`;
159
+ return formatter.format(fraction);
160
+ }
161
+ /** A whole-number percentage (the pie's largest-remainder shares), in `locale`.
162
+ *
163
+ * @internal */
164
+ function formatWholePercent(percent, locale) {
165
+ return percentFormatter(locale, 0).format(percent / 100);
136
166
  }
137
167
  /** Whole percentages that sum to exactly 100. Rounding each share on its own
138
168
  * gives 33/33/33 for three equal parts, and a legend that visibly loses 1%.
@@ -191,7 +221,7 @@ function formatTick(value, step) {
191
221
  * rather than subtracted from it, so a negative mark has no share rather than a misleading one.
192
222
  *
193
223
  * @internal */
194
- function shareOfTotal(values, index) {
224
+ function shareOfTotal(values, index, locale) {
195
225
  const value = values[index];
196
226
  if (values.length < 2 || !Number.isFinite(value) || value <= 0) {
197
227
  return '';
@@ -199,15 +229,15 @@ function shareOfTotal(values, index) {
199
229
  const total = values
200
230
  .filter((entry) => Number.isFinite(entry) && entry > 0)
201
231
  .reduce((sum, entry) => sum + entry, 0);
202
- return total > 0 ? formatPercent(value, total) : '';
232
+ return total > 0 ? formatPercent(value, total, locale) : '';
203
233
  }
204
234
  /** The same share, phrased for a tooltip line, where no column header stands above it to say what
205
235
  * the percentage is OF.
206
236
  *
207
237
  * @internal */
208
- function describeShare(values, index) {
209
- const share = shareOfTotal(values, index);
210
- return share ? `${share} of total` : '';
238
+ function describeShare(values, index, locale, phrase) {
239
+ const share = shareOfTotal(values, index, locale);
240
+ return share ? phrase(share) : '';
211
241
  }
212
242
 
213
243
  /** Container width as a signal. It is 0 under SSR, while the container is
@@ -219,13 +249,177 @@ function elementWidth(host) {
219
249
  if (!isPlatformBrowser(inject(PLATFORM_ID))) {
220
250
  return width.asReadonly();
221
251
  }
222
- const observer = new ResizeObserver((entries) => {
223
- width.set(Math.round(entries[0]?.contentRect.width ?? 0));
252
+ const element = host.nativeElement;
253
+ widths.set(element, width);
254
+ sharedObserver().observe(element);
255
+ inject(DestroyRef).onDestroy(() => {
256
+ sharedObserver().unobserve(element);
257
+ widths.delete(element);
224
258
  });
225
- observer.observe(host.nativeElement);
226
- inject(DestroyRef).onDestroy(() => observer.disconnect());
227
259
  return width.asReadonly();
228
260
  }
261
+ const widths = new WeakMap();
262
+ let observer$1 = null;
263
+ // One observer for every chart on the page, so a resize is one callback with every entry in it
264
+ // rather than one callback per chart.
265
+ function sharedObserver() {
266
+ observer$1 ??= new ResizeObserver((entries) => {
267
+ for (const entry of entries) {
268
+ widths.get(entry.target)?.set(Math.round(entry.contentRect.width));
269
+ }
270
+ });
271
+ return observer$1;
272
+ }
273
+
274
+ /** Provided by a chart that has already waited for the viewport, so the `ds-chart` it draws
275
+ * through builds at once instead of waiting a second time.
276
+ *
277
+ * @internal */
278
+ const CHART_RENDER_GATE_PASSED = new InjectionToken('CHART_RENDER_GATE_PASSED');
279
+ const builders = new WeakMap();
280
+ const near = new Map();
281
+ const ahead = new Map();
282
+ const observers = new Map();
283
+ let draining = false;
284
+ let idleScheduled = false;
285
+ let budgetMs = 8;
286
+ function drain() {
287
+ const start = performance.now();
288
+ for (const [host, build] of near) {
289
+ if (performance.now() - start > budgetMs) {
290
+ setTimeout(drain);
291
+ return;
292
+ }
293
+ near.delete(host);
294
+ build();
295
+ }
296
+ draining = false;
297
+ }
298
+ // An idle period with less than this left would run a chart's build into the next frame.
299
+ const IDLE_ROOM_MS = 12;
300
+ function buildWhileIdle(deadline) {
301
+ idleScheduled = false;
302
+ for (const [host, build] of ahead) {
303
+ if (deadline.timeRemaining() < IDLE_ROOM_MS) {
304
+ break;
305
+ }
306
+ ahead.delete(host);
307
+ build();
308
+ }
309
+ scheduleIdle();
310
+ }
311
+ function scheduleIdle() {
312
+ if (idleScheduled ||
313
+ !ahead.size ||
314
+ typeof requestIdleCallback === 'undefined') {
315
+ return;
316
+ }
317
+ idleScheduled = true;
318
+ requestIdleCallback(buildWhileIdle);
319
+ }
320
+ function observer(root, margin, queue, schedule) {
321
+ let byMargin = observers.get(root);
322
+ if (!byMargin) {
323
+ byMargin = new Map();
324
+ observers.set(root, byMargin);
325
+ }
326
+ const key = `${queue === near ? 'near' : 'ahead'} ${margin}`;
327
+ let found = byMargin.get(key);
328
+ if (!found) {
329
+ found = new IntersectionObserver((entries) => {
330
+ for (const entry of entries) {
331
+ const build = builders.get(entry.target);
332
+ // A chart the reader has already scrolled past leaves the queue instead of being built
333
+ // behind them.
334
+ if (build && entry.isIntersecting) {
335
+ queue.set(entry.target, build);
336
+ }
337
+ else {
338
+ queue.delete(entry.target);
339
+ }
340
+ }
341
+ schedule();
342
+ }, { root, rootMargin: margin });
343
+ byMargin.set(key, found);
344
+ }
345
+ return found;
346
+ }
347
+ function scheduleDrain() {
348
+ if (near.size && !draining) {
349
+ draining = true;
350
+ setTimeout(drain);
351
+ }
352
+ }
353
+ // A margin on the root only widens the root: an element inside a scrolling container is clipped by
354
+ // that container first, so the container has to BE the root for the margin to reach past its edge.
355
+ // The overflow test alone is not enough - a box that only scrolls sideways computes `overflow-y:
356
+ // auto` too - so the container also has to be taller inside than out.
357
+ function scrollRoot(host) {
358
+ for (let node = host.parentElement; node; node = node.parentElement) {
359
+ const overflow = getComputedStyle(node).overflowY;
360
+ if ((overflow === 'auto' ||
361
+ overflow === 'scroll' ||
362
+ overflow === 'overlay') &&
363
+ node.scrollHeight > node.clientHeight) {
364
+ return node;
365
+ }
366
+ }
367
+ return null;
368
+ }
369
+ /** Whether a chart may build its plot yet, under `DS_CONFIG.chart.rendering`. `true` from the
370
+ * start unless `deferUntilVisible` is on; with it on, `true` once the chart nears the viewport or
371
+ * is built ahead while the page is idle, and it stays `true`. Call from an injection context.
372
+ *
373
+ * @internal */
374
+ function chartRenderGate() {
375
+ const rendering = inject(DS_CONFIG).chart?.rendering;
376
+ // `skipSelf`: a preset provides the token to its own view, and must not read it back itself.
377
+ const passed = inject(CHART_RENDER_GATE_PASSED, {
378
+ optional: true,
379
+ skipSelf: true,
380
+ });
381
+ if (!rendering?.deferUntilVisible ||
382
+ passed ||
383
+ !isPlatformBrowser(inject(PLATFORM_ID)) ||
384
+ typeof IntersectionObserver === 'undefined') {
385
+ return signal(true).asReadonly();
386
+ }
387
+ const ready = signal(false, ...(ngDevMode ? [{ debugName: "ready" }] : /* istanbul ignore next */ []));
388
+ const host = inject(ElementRef).nativeElement;
389
+ budgetMs = rendering.frameBudgetMs ?? budgetMs;
390
+ const skipWhileOffscreen = rendering.skipWhileOffscreen ?? true;
391
+ let release = () => undefined;
392
+ afterNextRender(() => {
393
+ const root = scrollRoot(host);
394
+ const watchers = [
395
+ observer(root, rendering.visibleMargin ?? '10% 0px', near, scheduleDrain),
396
+ ];
397
+ if (rendering.buildAheadWhileIdle ?? true) {
398
+ watchers.push(observer(root, rendering.buildAheadMargin ?? '100% 0px', ahead, scheduleIdle));
399
+ }
400
+ release = () => {
401
+ for (const watcher of watchers) {
402
+ watcher.unobserve(host);
403
+ }
404
+ near.delete(host);
405
+ ahead.delete(host);
406
+ };
407
+ builders.set(host, () => {
408
+ release();
409
+ if (skipWhileOffscreen) {
410
+ // `auto` remembers the height the chart last rendered at, so skipping it moves nothing.
411
+ host.style.contentVisibility = 'auto';
412
+ host.style.containIntrinsicBlockSize = 'auto 300px';
413
+ }
414
+ ready.set(true);
415
+ });
416
+ for (const watcher of watchers) {
417
+ watcher.observe(host);
418
+ }
419
+ });
420
+ inject(DestroyRef).onDestroy(() => release());
421
+ return ready.asReadonly();
422
+ }
229
423
 
230
424
  /** A label turned 45 degrees takes this fraction of its width across the axis. 45 is where the
231
425
  * policy stops: past it the eye has to tilt rather than glance. */
@@ -673,6 +867,15 @@ function staggerDelay(index, stepMs) {
673
867
  }
674
868
  return Math.min(index * stepMs, STAGGER_CAP_MS);
675
869
  }
870
+ /** Starts a mark's exit, bound as `(animate.leave)="leaveMark($event)"`: `_chart-motion.scss`
871
+ * animates `.mark-leave`, and Angular removes the mark on its `animationend`. The function form,
872
+ * not `animate.leave="mark-leave"`: the class form calls `getAnimations()` once per leaving mark,
873
+ * and in Chrome that call costs more the more animations are running.
874
+ *
875
+ * @internal */
876
+ function leaveMark(event) {
877
+ event.target.classList.add('mark-leave');
878
+ }
676
879
 
677
880
  /** Where a roving tabindex lands after `key`, or `null` when the key does not traverse.
678
881
  *
@@ -716,43 +919,107 @@ function focusMark(scope, index, within = '') {
716
919
  target.focus();
717
920
  }
718
921
  }
922
+ /** @internal */
923
+ function rovingMarks(count) {
924
+ const roving = signal(0, ...(ngDevMode ? [{ debugName: "roving" }] : /* istanbul ignore next */ []));
925
+ return {
926
+ tabStop: computed(() => Math.min(roving(), Math.max(0, count() - 1))),
927
+ focus: (index) => roving.set(index),
928
+ navigate(event, index, scope) {
929
+ const next = nextRovingIndex(event.key, index, count());
930
+ if (next === null) {
931
+ return;
932
+ }
933
+ event.preventDefault();
934
+ roving.set(next);
935
+ focusMark(scope, next);
936
+ },
937
+ };
938
+ }
939
+ /** The mark an event on the marks' parent came from - the nearest `[data-mark-index]` inside that
940
+ * parent - for a chart that listens once per series rather than once per mark. `null` when the
941
+ * event did not start on a mark.
942
+ *
943
+ * @internal */
944
+ function markOf(event, scope = event.currentTarget) {
945
+ const target = event.target;
946
+ if (!(scope instanceof Element) || !(target instanceof Element)) {
947
+ return null;
948
+ }
949
+ const element = target.closest('[data-mark-index]');
950
+ if (!element || !scope.contains(element)) {
951
+ return null;
952
+ }
953
+ return { element, index: Number(element.getAttribute('data-mark-index')) };
954
+ }
955
+ /** Focus arriving on and leaving a mark inside `scope`, heard from the document rather than from
956
+ * the marks' group: Chromium makes an SVG element focusable once it has a `focus`, `blur`,
957
+ * `focusin` or `focusout` listener, so a group that listened would take focus on a click and
958
+ * ring every mark it holds. Call from an injection context.
959
+ *
960
+ * @internal */
961
+ function listenForMarkFocus(scope, onFocus, onBlur) {
962
+ const zone = inject(NgZone);
963
+ const destroyRef = inject(DestroyRef);
964
+ afterNextRender(() => {
965
+ const host = scope.nativeElement;
966
+ const document = host.ownerDocument;
967
+ const forward = (handler) => (event) => {
968
+ const hit = handler && markOf(event, host);
969
+ if (hit) {
970
+ handler(event, hit);
971
+ }
972
+ };
973
+ const focusIn = forward(onFocus);
974
+ const focusOut = forward(onBlur);
975
+ // Outside the zone: every focus change on the page reaches every series, and the handlers
976
+ // write signals, which schedule the render they need.
977
+ zone.runOutsideAngular(() => {
978
+ document.addEventListener('focusin', focusIn);
979
+ document.addEventListener('focusout', focusOut);
980
+ });
981
+ destroyRef.onDestroy(() => {
982
+ document.removeEventListener('focusin', focusIn);
983
+ document.removeEventListener('focusout', focusOut);
984
+ });
985
+ });
986
+ }
719
987
 
720
- function trendOf(values) {
988
+ function trendOf(values, words) {
721
989
  const first = values[0];
722
990
  const last = values[values.length - 1];
723
991
  const rose = values.every((value, index) => index === 0 || value > values[index - 1]);
724
992
  const fell = values.every((value, index) => index === 0 || value < values[index - 1]);
725
993
  if (rose) {
726
- return 'Rising throughout';
994
+ return words.trendRisingThroughout;
727
995
  }
728
996
  if (fell) {
729
- return 'Falling throughout';
997
+ return words.trendFallingThroughout;
730
998
  }
731
999
  if (last > first) {
732
- return 'Rising overall';
1000
+ return words.trendRisingOverall;
733
1001
  }
734
1002
  if (last < first) {
735
- return 'Falling overall';
1003
+ return words.trendFallingOverall;
736
1004
  }
737
- return 'Ending where it started';
1005
+ return words.trendFlat;
738
1006
  }
739
1007
  /** Where the readings sit against each reference line, appended to the description. A line the
740
1008
  * reader cannot see is a line that does not exist for them, and its whole point is the
741
1009
  * comparison, not its position. */
742
- function describeThresholds(thresholds, points, format) {
1010
+ function describeThresholds(thresholds, points, format, words) {
743
1011
  const total = points.length;
744
- const noun = total === 1 ? 'point' : 'points';
745
1012
  return thresholds
746
1013
  .map((threshold) => {
747
- const name = threshold.label ?? 'Threshold';
1014
+ const name = threshold.label ?? words.threshold;
748
1015
  if (threshold.to == null) {
749
1016
  const above = points.filter((point) => point.value > threshold.value).length;
750
- return ` ${name} at ${format(threshold.value)}, ${above} of ${total} ${noun} above.`;
1017
+ return ` ${words.thresholdAbove(name, format(threshold.value), above, total)}`;
751
1018
  }
752
1019
  const low = Math.min(threshold.value, threshold.to);
753
1020
  const high = Math.max(threshold.value, threshold.to);
754
1021
  const inside = points.filter((point) => point.value >= low && point.value <= high).length;
755
- return ` ${name} from ${format(low)} to ${format(high)}, ${inside} of ${total} ${noun} inside.`;
1022
+ return ` ${words.thresholdInside(name, format(low), format(high), inside, total)}`;
756
1023
  })
757
1024
  .join('');
758
1025
  }
@@ -765,22 +1032,20 @@ function describeThresholds(thresholds, points, format) {
765
1032
  * levels of chart description, and the encoding is the one thing a screen-reader user cannot use.
766
1033
  *
767
1034
  * @internal */
768
- function describeSeries(label, points, format = formatValue, tableFollows = true, thresholds = []) {
1035
+ function describeSeries(words, label, points, format = formatValue, tableFollows = true, thresholds = []) {
769
1036
  if (points.length === 0) {
770
- return `${label}. No data.`;
1037
+ return words.noData(label);
771
1038
  }
772
- const pointer = describeThresholds(thresholds, points, format) +
773
- (tableFollows ? ' Full values in the table below.' : '');
1039
+ const pointer = describeThresholds(thresholds, points, format, words) +
1040
+ (tableFollows ? ` ${words.tableFollows}` : '');
774
1041
  if (points.length === 1) {
775
- return `${label}, one point: ${format(points[0].value)} at ${points[0].label}.${pointer}`;
1042
+ return `${words.onePoint(label, format(points[0].value), points[0].label)}${pointer}`;
776
1043
  }
777
1044
  const lowest = points.reduce((min, point) => point.value < min.value ? point : min);
778
1045
  const highest = points.reduce((max, point) => point.value > max.value ? point : max);
779
- return (`${label}, ${points.length} points, ` +
780
- `${format(lowest.value)} to ${format(highest.value)}. ` +
781
- `${trendOf(points.map((point) => point.value))}. ` +
782
- `Highest in ${highest.label} at ${format(highest.value)}, ` +
783
- `lowest in ${lowest.label} at ${format(lowest.value)}.${pointer}`);
1046
+ return (`${words.range(label, points.length, format(lowest.value), format(highest.value))} ` +
1047
+ `${trendOf(points.map((point) => point.value), words)}. ` +
1048
+ `${words.extremes(highest.label, format(highest.value), lowest.label, format(lowest.value))}${pointer}`);
784
1049
  }
785
1050
 
786
1051
  /**
@@ -1354,6 +1619,12 @@ function focusOwnControl(host, options) {
1354
1619
  host.querySelector(TRIGGER_ELEMENTS);
1355
1620
  target?.focus(options);
1356
1621
  }
1622
+ function blurOwnControl(host) {
1623
+ const active = host.ownerDocument.activeElement;
1624
+ if (active instanceof HTMLElement && host.contains(active)) {
1625
+ active.blur();
1626
+ }
1627
+ }
1357
1628
  /**
1358
1629
  * Shared `ControlValueAccessor` for DS form controls whose value is a signal
1359
1630
  * `model()`. Bridges that model with Angular forms (reactive `formControl` /
@@ -1382,6 +1653,15 @@ class DsControlValueAccessor extends DsFieldBase {
1382
1653
  focus(options) {
1383
1654
  focusOwnControl(this.hostElement.nativeElement, options);
1384
1655
  }
1656
+ /**
1657
+ * The counterpart of `focus()`: drops focus if it sits anywhere inside this
1658
+ * control - the input, a picker trigger, the OTP cell that has it - so no
1659
+ * subclass overrides it. A portaled panel is outside the host and is left alone.
1660
+ * For a host that navigates away after `clear()`, which keeps focus on purpose.
1661
+ */
1662
+ blur() {
1663
+ blurOwnControl(this.hostElement.nativeElement);
1664
+ }
1385
1665
  bridge = valueControlBridge(() => this.value);
1386
1666
  /** Driven by the forms API via `setDisabledState`. */
1387
1667
  formDisabled = this.bridge.formDisabled;
@@ -1434,6 +1714,10 @@ class DsBooleanControlValueAccessor extends DsFieldBase {
1434
1714
  focus(options) {
1435
1715
  focusOwnControl(this.hostElement.nativeElement, options);
1436
1716
  }
1717
+ /** The counterpart of `focus()` - see `DsControlValueAccessor.blur`. */
1718
+ blur() {
1719
+ blurOwnControl(this.hostElement.nativeElement);
1720
+ }
1437
1721
  /** Driven by the forms API via `setDisabledState`. */
1438
1722
  formDisabled = signal(false, ...(ngDevMode ? [{ debugName: "formDisabled" }] : /* istanbul ignore next */ []));
1439
1723
  // Separate from the control's `touched`, which only exists once `NgControl`
@@ -1810,9 +2094,9 @@ function dropdownOverlay(overlay, trigger, extraPanelClass = []) {
1810
2094
  },
1811
2095
  };
1812
2096
  }
1813
- // Backstop for the leave animation: if the class never produces an animation
1814
- // (a pane that is display:none, a consumer stylesheet that removed it), the
1815
- // panel must still go away. Comfortably past --ds-motion-exit-duration.
2097
+ // The teardown guarantee for the leave: a pane that is display:none, a consumer stylesheet
2098
+ // that removed the animation, and a 0s reduced-motion duration (whose animationend is not
2099
+ // reliably delivered) all end here. Comfortably past --ds-motion-exit-duration.
1816
2100
  const LEAVE_TIMEOUT_MS = 400;
1817
2101
  /**
1818
2102
  * Close a DS overlay panel — instantly on a `'select'`, with a short fade on a
@@ -2059,14 +2343,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
2059
2343
  * child and, worse, a region created together with its text is the case screen
2060
2344
  * readers reliably do not announce — there is no content CHANGE to fire on. The
2061
2345
  * node here is created once, empty, and only its text changes.
2062
- *
2063
- * The text is English, which is the same debt every other library-invented string
2064
- * in this package carries (see the localization item in `docs/todo.md`). It is a
2065
- * count, so it is the cheapest of them to swap once a provider lands.
2066
2346
  * @internal
2067
2347
  */
2068
2348
  function announceOptionCount(count, active) {
2069
2349
  const documentRef = inject(DOCUMENT);
2350
+ const intl = inject(DS_INTL);
2070
2351
  const region = documentRef.createElement('div');
2071
2352
  region.setAttribute('aria-live', 'polite');
2072
2353
  region.setAttribute('aria-atomic', 'true');
@@ -2081,13 +2362,7 @@ function announceOptionCount(count, active) {
2081
2362
  region.textContent = '';
2082
2363
  return;
2083
2364
  }
2084
- const total = count();
2085
- region.textContent =
2086
- total === 0
2087
- ? 'No results'
2088
- : total === 1
2089
- ? '1 result'
2090
- : `${total} results`;
2365
+ region.textContent = intl().picker.resultCount(count());
2091
2366
  });
2092
2367
  }
2093
2368
 
@@ -2257,16 +2532,20 @@ function createTypeAhead() {
2257
2532
 
2258
2533
  const NO_DATA_TABLE = signal(null, ...(ngDevMode ? [{ debugName: "NO_DATA_TABLE" }] : /* istanbul ignore next */ []));
2259
2534
  const NO_LINGER = signal(null, ...(ngDevMode ? [{ debugName: "NO_LINGER" }] : /* istanbul ignore next */ []));
2260
- /** Each resolved input → `DS_CONFIG.chart` → the built-in. Call from an injection context.
2535
+ /** Each resolved input → `DS_CONFIG.chart` → the built-in; copy resolves input → `DS_INTL.chart`.
2536
+ * Call from an injection context.
2261
2537
  *
2262
2538
  * @internal */
2263
2539
  function resolveChartDefaults(inputs) {
2540
+ const locale = injectDsLocale();
2541
+ const intl = inject(DS_INTL);
2264
2542
  return {
2543
+ locale,
2265
2544
  frame: resolveWithConfig(inputs.frame, (config) => config.chart?.frame, 'auto'),
2266
2545
  dataTable: resolveWithConfig(inputs.dataTable ?? NO_DATA_TABLE, (config) => config.chart?.dataTable, 'none'),
2267
- emptyText: resolveWithConfig(inputs.emptyText, (config) => config.chart?.emptyText, 'No data'),
2268
- errorText: resolveWithConfig(inputs.errorText, (config) => config.chart?.errorText, 'Could not load the data'),
2269
- valueFormat: resolveWithConfig(inputs.valueFormat, (config) => config.chart?.valueFormat, defaultChartFormat),
2546
+ emptyText: computed(() => inputs.emptyText() ?? intl().chart.empty),
2547
+ errorText: computed(() => inputs.errorText() ?? intl().chart.error),
2548
+ valueFormat: resolveWithConfig(inputs.valueFormat, (config) => config.chart?.valueFormat, chartValueFormat(locale)),
2270
2549
  tooltipLingerMs: resolveWithConfig(inputs.tooltipLingerMs ?? NO_LINGER, (config) => config.chart?.tooltipLingerMs, 0),
2271
2550
  };
2272
2551
  }
@@ -2275,5 +2554,5 @@ function resolveChartDefaults(inputs) {
2275
2554
  * Generated bundle index. Do not edit.
2276
2555
  */
2277
2556
 
2278
- export { CHART_HEAT_COLORS, CHART_RAMP_COLORS, CHART_SERIES_COLORS, DS_FIELD_WARNING_KIND, DsBooleanControlValueAccessor, DsChipTemplateDirective, DsControlValueAccessor, DsCreateTemplateDirective, DsEmptyTemplateDirective, DsFieldBase, DsGroupLabelTemplateDirective, DsMessageBase, DsOptionTemplateDirective, DsPanelFooterTemplateDirective, DsPanelHeaderTemplateDirective, DsPickerTriggerDirective, DsStaticPreview, FieldClickFocusDirective, ProjectionDroppedDirective, announceOptionCount, areaPath, bandPath, bandScale, chartColors, chipFit, clearOnDetach, closeOnOutsidePointer, closeOnScroll, createTypeAhead, decimationTarget, defaultChartFormat, describeSeries, describeShare, disposeWithLeave, domainMinOf, dropdownOverlay, dsAriaCurrent, dsDestination, elementWidth, focusIsInside, focusMark, formatPercent, formatTick, formatValue, forwardOverlayTokens, labelInterval, largestRemainder, linePath, lineSegments, linearScale, lttbDecimate, markAt, minMaxDecimate, needsDecimating, nextControlId, nextRovingIndex, niceDomain, overlayPlacementOf, panelClassesOf, pointScale, polylinePoints, prepareOverlayEnter, resolveBrandValue, resolveChartDefaults, resolveFieldMessage, rotationWouldFit, roundStepAtLeast, scrollActiveOptionIntoView, shareOfTotal, staggerDelay, tickStep, tickValues, trimmedText, valueControlBridge };
2557
+ export { CHART_HEAT_COLORS, CHART_RAMP_COLORS, CHART_RENDER_GATE_PASSED, CHART_SERIES_COLORS, DS_FIELD_WARNING_KIND, DsBooleanControlValueAccessor, DsChipTemplateDirective, DsControlValueAccessor, DsCreateTemplateDirective, DsEmptyTemplateDirective, DsFieldBase, DsGroupLabelTemplateDirective, DsMessageBase, DsOptionTemplateDirective, DsPanelFooterTemplateDirective, DsPanelHeaderTemplateDirective, DsPickerTriggerDirective, DsStaticPreview, FieldClickFocusDirective, ProjectionDroppedDirective, announceOptionCount, areaPath, bandPath, bandScale, chartColors, chartRenderGate, chartValueFormat, chipFit, clearOnDetach, closeOnOutsidePointer, closeOnScroll, createTypeAhead, decimationTarget, describeSeries, describeShare, disposeWithLeave, domainMinOf, dropdownOverlay, dsAriaCurrent, dsDestination, elementWidth, focusIsInside, focusMark, formatPercent, formatTick, formatValue, formatWholePercent, forwardOverlayTokens, labelInterval, largestRemainder, leaveMark, linePath, lineSegments, linearScale, listenForMarkFocus, lttbDecimate, markAt, markOf, minMaxDecimate, needsDecimating, nextControlId, nextRovingIndex, niceDomain, overlayPlacementOf, panelClassesOf, pointScale, polylinePoints, prepareOverlayEnter, resolveBrandValue, resolveChartDefaults, resolveFieldMessage, rotationWouldFit, roundStepAtLeast, rovingMarks, scrollActiveOptionIntoView, shareOfTotal, staggerDelay, tickStep, tickValues, trimmedText, valueControlBridge };
2279
2558
  //# sourceMappingURL=ids-group-ltd-ids-design-system-components.mjs.map