impact-nova 2.5.17 → 2.6.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (204) hide show
  1. package/README.md +27 -25
  2. package/dist/components/data/ag-grid-react/ag-grid.types.d.ts +28 -1
  3. package/dist/components/data/ag-grid-react/cell-renderers/date-display-renderer.d.ts +0 -3
  4. package/dist/components/data/ag-grid-react/cell-renderers/date-display-renderer.js +31 -38
  5. package/dist/components/data/ag-grid-react/cell-renderers/input-display-renderer.d.ts +1 -1
  6. package/dist/components/data/ag-grid-react/chat/chat-capabilities.d.ts +9 -0
  7. package/dist/components/data/ag-grid-react/chat/chat-capabilities.js +22 -0
  8. package/dist/components/data/ag-grid-react/chat/chat-column.d.ts +20 -0
  9. package/dist/components/data/ag-grid-react/chat/chat-column.js +81 -0
  10. package/dist/components/data/ag-grid-react/chat/chat-composer.d.ts +10 -0
  11. package/dist/components/data/ag-grid-react/chat/chat-composer.js +352 -0
  12. package/dist/components/data/ag-grid-react/chat/chat-constants.d.ts +17 -0
  13. package/dist/components/data/ag-grid-react/chat/chat-constants.js +22 -0
  14. package/dist/components/data/ag-grid-react/chat/chat-format.d.ts +41 -0
  15. package/dist/components/data/ag-grid-react/chat/chat-format.js +94 -0
  16. package/dist/components/data/ag-grid-react/chat/chat-host.d.ts +10 -0
  17. package/dist/components/data/ag-grid-react/chat/chat-host.js +651 -0
  18. package/dist/components/data/ag-grid-react/chat/chat-host.types.d.ts +13 -0
  19. package/dist/components/data/ag-grid-react/chat/chat-html.d.ts +2 -0
  20. package/dist/components/data/ag-grid-react/chat/chat-html.js +40 -0
  21. package/dist/components/data/ag-grid-react/chat/chat-identity.d.ts +13 -0
  22. package/dist/components/data/ag-grid-react/chat/chat-identity.js +24 -0
  23. package/dist/components/data/ag-grid-react/chat/chat-menu.d.ts +13 -0
  24. package/dist/components/data/ag-grid-react/chat/chat-menu.js +15 -0
  25. package/dist/components/data/ag-grid-react/chat/chat-notify.d.ts +17 -0
  26. package/dist/components/data/ag-grid-react/chat/chat-notify.js +124 -0
  27. package/dist/components/data/ag-grid-react/chat/chat-persist.d.ts +13 -0
  28. package/dist/components/data/ag-grid-react/chat/chat-persist.js +34 -0
  29. package/dist/components/data/ag-grid-react/chat/chat-priority.d.ts +13 -0
  30. package/dist/components/data/ag-grid-react/chat/chat-priority.js +79 -0
  31. package/dist/components/data/ag-grid-react/chat/chat-summaries.d.ts +2 -0
  32. package/dist/components/data/ag-grid-react/chat/chat-summaries.js +24 -0
  33. package/dist/components/data/ag-grid-react/chat/chat-thread-ui.d.ts +72 -0
  34. package/dist/components/data/ag-grid-react/chat/chat-thread-ui.js +713 -0
  35. package/dist/components/data/ag-grid-react/chat/chat-toggle.d.ts +6 -0
  36. package/dist/components/data/ag-grid-react/chat/chat-toggle.js +25 -0
  37. package/dist/components/data/ag-grid-react/chat/chat-ui-actions.d.ts +13 -0
  38. package/dist/components/data/ag-grid-react/chat/chat-ui-actions.js +26 -0
  39. package/dist/components/data/ag-grid-react/chat/chat-window.d.ts +14 -0
  40. package/dist/components/data/ag-grid-react/chat/chat-window.js +82 -0
  41. package/dist/components/data/ag-grid-react/chat/chat-workspace.d.ts +91 -0
  42. package/dist/components/data/ag-grid-react/chat/chat-workspace.js +555 -0
  43. package/dist/components/data/ag-grid-react/chat/chat.types.d.ts +319 -0
  44. package/dist/components/data/ag-grid-react/chat/index.d.ts +6 -0
  45. package/dist/components/data/ag-grid-react/chat/index.js +24 -0
  46. package/dist/components/data/ag-grid-react/chat.story-data.d.ts +34 -0
  47. package/dist/components/data/ag-grid-react/chat.story-sources.d.ts +4 -0
  48. package/dist/components/data/ag-grid-react/comments/assets/comments-no-results.png.js +4 -0
  49. package/dist/components/data/ag-grid-react/comments/comment-mode-toggle.d.ts +6 -0
  50. package/dist/components/data/ag-grid-react/comments/comment-mode-toggle.js +29 -0
  51. package/dist/components/data/ag-grid-react/comments/comments-actions-menu.d.ts +8 -0
  52. package/dist/components/data/ag-grid-react/comments/comments-actions-menu.js +18 -0
  53. package/dist/components/data/ag-grid-react/comments/comments-ag-grid-presence.d.ts +18 -0
  54. package/dist/components/data/ag-grid-react/comments/comments-ag-grid-presence.js +16 -0
  55. package/dist/components/data/ag-grid-react/comments/comments-capabilities.d.ts +11 -0
  56. package/dist/components/data/ag-grid-react/comments/comments-capabilities.js +26 -0
  57. package/dist/components/data/ag-grid-react/comments/comments-constants.d.ts +12 -0
  58. package/dist/components/data/ag-grid-react/comments/comments-constants.js +21 -0
  59. package/dist/components/data/ag-grid-react/comments/comments-format.d.ts +20 -0
  60. package/dist/components/data/ag-grid-react/comments/comments-format.js +49 -0
  61. package/dist/components/data/ag-grid-react/comments/comments-generation.d.ts +14 -0
  62. package/dist/components/data/ag-grid-react/comments/comments-generation.js +18 -0
  63. package/dist/components/data/ag-grid-react/comments/comments-host.d.ts +10 -0
  64. package/dist/components/data/ag-grid-react/comments/comments-host.js +343 -0
  65. package/dist/components/data/ag-grid-react/comments/comments-host.types.d.ts +18 -0
  66. package/dist/components/data/ag-grid-react/comments/comments-identity.d.ts +7 -0
  67. package/dist/components/data/ag-grid-react/comments/comments-identity.js +20 -0
  68. package/dist/components/data/ag-grid-react/comments/comments-menu.d.ts +29 -0
  69. package/dist/components/data/ag-grid-react/comments/comments-menu.js +35 -0
  70. package/dist/components/data/ag-grid-react/comments/comments-overlay-anchor.d.ts +22 -0
  71. package/dist/components/data/ag-grid-react/comments/comments-overlay-anchor.js +98 -0
  72. package/dist/components/data/ag-grid-react/comments/comments-overlay.d.ts +21 -0
  73. package/dist/components/data/ag-grid-react/comments/comments-overlay.js +406 -0
  74. package/dist/components/data/ag-grid-react/comments/comments-panel.d.ts +9 -0
  75. package/dist/components/data/ag-grid-react/comments/comments-panel.js +272 -0
  76. package/dist/components/data/ag-grid-react/comments/comments-persist.d.ts +11 -0
  77. package/dist/components/data/ag-grid-react/comments/comments-persist.js +19 -0
  78. package/dist/components/data/ag-grid-react/comments/comments-reveal.d.ts +11 -0
  79. package/dist/components/data/ag-grid-react/comments/comments-reveal.js +31 -0
  80. package/dist/components/data/ag-grid-react/comments/comments-ui-actions.d.ts +18 -0
  81. package/dist/components/data/ag-grid-react/comments/comments-ui-actions.js +22 -0
  82. package/dist/components/data/ag-grid-react/comments/comments-window.d.ts +10 -0
  83. package/dist/components/data/ag-grid-react/comments/comments-window.js +62 -0
  84. package/dist/components/data/ag-grid-react/comments/comments.types.d.ts +178 -0
  85. package/dist/components/data/ag-grid-react/comments/index.d.ts +5 -0
  86. package/dist/components/data/ag-grid-react/comments/index.js +15 -0
  87. package/dist/components/data/ag-grid-react/comments-cell-renderers-showcase.d.ts +25 -0
  88. package/dist/components/data/ag-grid-react/comments.story-data.d.ts +37 -0
  89. package/dist/components/data/ag-grid-react/comments.story-sources.d.ts +11 -0
  90. package/dist/components/data/ag-grid-react/grid-cell-address.d.ts +21 -0
  91. package/dist/components/data/ag-grid-react/grid-cell-address.js +21 -0
  92. package/dist/components/data/ag-grid-react/grid-row-reveal.d.ts +34 -0
  93. package/dist/components/data/ag-grid-react/grid-row-reveal.js +33 -0
  94. package/dist/components/data/ag-grid-react/headers/advanced-filter/advanced-filter-dialog.js +75 -65
  95. package/dist/components/data/ag-grid-react/headers/advanced-filter/column-filter-section.d.ts +1 -1
  96. package/dist/components/data/ag-grid-react/headers/advanced-filter/column-filter-section.js +54 -54
  97. package/dist/components/data/ag-grid-react/headers/components/date-filter-picker.d.ts +1 -1
  98. package/dist/components/data/ag-grid-react/headers/header-search-input.js +122 -119
  99. package/dist/components/data/ag-grid-react/headers/utils/date-utils.d.ts +2 -1
  100. package/dist/components/data/ag-grid-react/headers/utils/date-utils.js +25 -20
  101. package/dist/components/data/ag-grid-react/headers/utils/filter-utils.d.ts +1 -1
  102. package/dist/components/data/ag-grid-react/index.d.ts +1 -1
  103. package/dist/components/data/ag-grid-react/index.js +481 -254
  104. package/dist/components/data/ag-grid-react/notes/index.d.ts +2 -0
  105. package/dist/components/data/ag-grid-react/notes/index.js +1 -0
  106. package/dist/components/data/ag-grid-react/notes/notes-ag-grid-adapter.d.ts +25 -0
  107. package/dist/components/data/ag-grid-react/notes/notes-ag-grid-adapter.js +32 -0
  108. package/dist/components/data/ag-grid-react/notes/notes-constants.d.ts +2 -0
  109. package/dist/components/data/ag-grid-react/notes/notes-constants.js +4 -0
  110. package/dist/components/data/ag-grid-react/notes/notes.types.d.ts +12 -0
  111. package/dist/components/data/ag-grid-react/notes.story-sources.d.ts +7 -0
  112. package/dist/components/data/ag-grid-react/nova-system-column.d.ts +7 -0
  113. package/dist/components/data/ag-grid-react/nova-system-column.js +18 -0
  114. package/dist/components/data/ag-grid-react/theme.js +6 -2
  115. package/dist/components/data/ag-grid-react/value-formatter.types.d.ts +4 -0
  116. package/dist/components/data/ag-grid-react/value-formatters.d.ts +0 -19
  117. package/dist/components/data/ag-grid-react/value-formatters.js +88 -90
  118. package/dist/components/data/data-table/build-column-tree-from-grid.js +14 -13
  119. package/dist/components/data/data-table/data-table-column-def-pin.js +34 -31
  120. package/dist/components/data/data-table/data-table-context.js +5 -5
  121. package/dist/components/data/data-table/data-table-sheet-context.js +1 -1
  122. package/dist/components/data/data-table/data-table-sheet.js +2 -1
  123. package/dist/components/data-display/calendar/calendar-config.js +22 -21
  124. package/dist/components/data-display/calendar/calendar-day-button.js +21 -21
  125. package/dist/components/data-display/calendar/calendar-day-picker-view.js +36 -35
  126. package/dist/components/data-display/calendar/calendar-fiscal-labels.d.ts +3 -3
  127. package/dist/components/data-display/calendar/calendar-fiscal-labels.js +50 -62
  128. package/dist/components/data-display/calendar/calendar.js +138 -137
  129. package/dist/components/data-display/calendar/fiscal-period-caption-select.js +23 -22
  130. package/dist/components/data-display/calendar/use-calendar-i18n.d.ts +1 -0
  131. package/dist/components/data-display/calendar/use-calendar-i18n.js +10 -9
  132. package/dist/components/data-display/chart/chart.js +72 -72
  133. package/dist/components/data-display/chart/chart.utils.d.ts +1 -1
  134. package/dist/components/data-display/chart/chart.utils.js +40 -31
  135. package/dist/components/feedback/sheet/sheet.js +1 -1
  136. package/dist/components/feedback/toast/toast.d.ts +1 -1
  137. package/dist/components/feedback/toast/toast.variants.d.ts +1 -1
  138. package/dist/components/flows/filter-panel/filter-panel.d.ts +1 -1
  139. package/dist/components/flows/filter-panel/filter-panel.js +65 -64
  140. package/dist/components/flows/filter-panel/filter-panel.types.d.ts +1 -0
  141. package/dist/components/forms/date-picker/date-picker.js +125 -126
  142. package/dist/components/forms/date-picker/date-range-picker.js +191 -192
  143. package/dist/components/forms/date-picker/multi-date-picker.js +66 -67
  144. package/dist/components/forms/date-picker/multi-week-picker.js +82 -83
  145. package/dist/components/forms/date-picker/use-picker-i18n.d.ts +6 -0
  146. package/dist/components/forms/date-picker/use-picker-i18n.js +11 -0
  147. package/dist/components/forms/date-picker/week-picker.js +146 -147
  148. package/dist/components/forms/date-picker/week-range-picker.js +158 -159
  149. package/dist/components/ui/local-raster-icons/message3d.webp.js +4 -0
  150. package/dist/components/ui/local-raster-icons/rasterIcons.d.ts +1 -0
  151. package/dist/components/ui/local-raster-icons/rasterIcons.js +27 -25
  152. package/dist/form-react/Fields/WeekRangePicker.js +16 -16
  153. package/dist/form-react/fields.d.ts +0 -3
  154. package/dist/form-react/fields.js +29 -35
  155. package/dist/i18n/defaultMessages.d.ts +144 -0
  156. package/dist/i18n/defaultMessages.js +161 -19
  157. package/dist/i18n/format/collator.d.ts +1 -0
  158. package/dist/i18n/format/collator.js +7 -0
  159. package/dist/i18n/format/date-pattern.d.ts +5 -0
  160. package/dist/i18n/format/date-pattern.js +20 -0
  161. package/dist/i18n/format/format-date.d.ts +9 -0
  162. package/dist/i18n/format/format-date.js +56 -0
  163. package/dist/i18n/format/format-number.d.ts +20 -0
  164. package/dist/i18n/format/format-number.js +68 -0
  165. package/dist/i18n/format/formatter-cache.d.ts +9 -0
  166. package/dist/i18n/format/formatter-cache.js +66 -0
  167. package/dist/i18n/format/index.d.ts +6 -0
  168. package/dist/i18n/format/parse-number.d.ts +6 -0
  169. package/dist/i18n/format/parse-number.js +53 -0
  170. package/dist/i18n/getDateFnsLocale.d.ts +5 -4
  171. package/dist/i18n/getDateFnsLocale.js +46 -16
  172. package/dist/i18n/i18n.types.d.ts +13 -0
  173. package/dist/i18n/impact-nova-i18n-context.d.ts +1 -1
  174. package/dist/i18n/impact-nova-i18n-context.js +33 -25
  175. package/dist/i18n/impact-nova-i18n-defaults.js +8 -6
  176. package/dist/i18n/index.d.ts +4 -1
  177. package/dist/i18n/index.js +41 -16
  178. package/dist/i18n/locale-config.d.ts +28 -0
  179. package/dist/i18n/locale-config.js +32 -0
  180. package/dist/i18n/locales/de.js +142 -0
  181. package/dist/i18n/locales/es.js +142 -0
  182. package/dist/i18n/locales/hi.js +142 -0
  183. package/dist/i18n/locales/kn.js +142 -0
  184. package/dist/i18n/week-start.d.ts +6 -0
  185. package/dist/i18n/week-start.js +30 -0
  186. package/dist/impact-nova-components.css +249 -0
  187. package/dist/impact-nova-tokens.scss +6 -0
  188. package/dist/impact-nova.css +1 -1
  189. package/dist/index.d.ts +1 -1
  190. package/dist/index.js +624 -601
  191. package/dist/llms/index.js +26 -2
  192. package/dist/llms/rules/ag-grid.js +1 -1
  193. package/dist/llms/rules/best-practices.js +1 -1
  194. package/dist/llms/rules/data-table-chat.js +1 -0
  195. package/dist/llms/rules/data-table-comments.js +1 -0
  196. package/dist/llms/rules/data-table-notes.js +1 -0
  197. package/dist/llms/rules/installation.js +1 -1
  198. package/dist/llms/rules/migration.js +1 -1
  199. package/dist/llms/rules/real-world-patterns.js +1 -1
  200. package/dist/llms/rules/requirements.js +1 -1
  201. package/dist/llms/rules/troubleshooting.js +1 -1
  202. package/dist/providers/app-providers.d.ts +3 -1
  203. package/dist/providers/app-providers.js +22 -11
  204. package/package.json +13 -1
@@ -0,0 +1,56 @@
1
+ import { getRelativeTimeFormat as c, getDateTimeFormat as d } from "./formatter-cache.js";
2
+ const a = {
3
+ day: "2-digit",
4
+ month: "2-digit",
5
+ year: "numeric"
6
+ }, u = {
7
+ hour: "numeric",
8
+ minute: "2-digit"
9
+ }, T = {
10
+ ...a,
11
+ ...u
12
+ }, l = /^\d{4}-\d{2}-\d{2}$/;
13
+ function f(t) {
14
+ if (t instanceof Date)
15
+ return Number.isNaN(t.getTime()) ? null : t;
16
+ if (typeof t == "number") {
17
+ const e = new Date(t);
18
+ return Number.isNaN(e.getTime()) ? null : e;
19
+ }
20
+ if (typeof t != "string" || t.trim() === "") return null;
21
+ const n = t.trim();
22
+ if (l.test(n)) {
23
+ const [e, o, m] = n.split("-").map(Number);
24
+ if (e == null || o == null || m == null) return null;
25
+ const r = new Date(e, o - 1, m);
26
+ return Number.isNaN(r.getTime()) || r.getFullYear() !== e || r.getMonth() !== o - 1 || r.getDate() !== m ? null : r;
27
+ }
28
+ const i = new Date(n);
29
+ return Number.isNaN(i.getTime()) ? null : i;
30
+ }
31
+ function s(t, n, i = a) {
32
+ const e = f(t);
33
+ return e ? d(n, i).format(e) : "";
34
+ }
35
+ function g(t, n, i = u) {
36
+ return s(t, n, i);
37
+ }
38
+ function D(t, n, i = T) {
39
+ return s(t, n, i);
40
+ }
41
+ function h(t, n, i = Date.now()) {
42
+ const e = f(t);
43
+ if (!e) return typeof t == "string" ? t : "";
44
+ const o = e.getTime() - i, m = Math.abs(o) / 1e3, r = c(n, { numeric: "auto" });
45
+ return m < 60 ? r.format(Math.round(o / 1e3), "second") : m < 3600 ? r.format(Math.round(o / 6e4), "minute") : m < 86400 ? r.format(Math.round(o / 36e5), "hour") : m < 86400 * 30 ? r.format(Math.round(o / 864e5), "day") : r.format(Math.round(o / (864e5 * 30)), "month");
46
+ }
47
+ export {
48
+ a as SHORT_DATE_OPTIONS,
49
+ T as SHORT_DATE_TIME_OPTIONS,
50
+ u as SHORT_TIME_OPTIONS,
51
+ s as formatDate,
52
+ D as formatDateTime,
53
+ h as formatRelativeTime,
54
+ g as formatTime,
55
+ f as toValidDate
56
+ };
@@ -0,0 +1,20 @@
1
+ export type CompactMagnitude = "auto" | "thou" | "mil" | "bil";
2
+ export declare function formatNumber(value: number, locale: string, options?: Intl.NumberFormatOptions): string;
3
+ /**
4
+ * Currency is always explicit. `numberLocale` only controls presentation
5
+ * (separators, symbol placement), never the ISO currency code.
6
+ */
7
+ export declare function formatCurrency(value: number, locale: string, currency: string, options?: Omit<Intl.NumberFormatOptions, "style" | "currency">): string;
8
+ export declare function formatPercent(value: number, locale: string, options?: Omit<Intl.NumberFormatOptions, "style">): string;
9
+ /**
10
+ * Auto compact uses Intl compact notation.
11
+ * Forced thou/mil/bil keep magnitude semantics and format the coefficient with `locale`.
12
+ * Never append English K/M/B onto a localized decimal.
13
+ */
14
+ export declare function formatCompactNumber(value: number, locale: string, magnitude?: CompactMagnitude): string;
15
+ export interface NumberSeparators {
16
+ decimal: string;
17
+ group: string;
18
+ minus: string;
19
+ }
20
+ export declare function getNumberSeparators(locale: string): NumberSeparators;
@@ -0,0 +1,68 @@
1
+ import { canonicalizeLocale as s } from "../locale-config.js";
2
+ import { getNumberFormat as i } from "./formatter-cache.js";
3
+ const u = {
4
+ thou: 1e3,
5
+ mil: 1e6,
6
+ bil: 1e9
7
+ }, p = {
8
+ thou: 1e3,
9
+ mil: 1e6,
10
+ bil: 1e9
11
+ };
12
+ function f(o, r, t) {
13
+ return i(r, t).format(o);
14
+ }
15
+ function D(o, r, t, c) {
16
+ return i(r, {
17
+ ...c,
18
+ style: "currency",
19
+ currency: t
20
+ }).format(o);
21
+ }
22
+ function l(o, r, t) {
23
+ return i(r, {
24
+ ...t,
25
+ style: "percent"
26
+ }).format(o);
27
+ }
28
+ function b(o, r) {
29
+ const t = p[r];
30
+ for (const c of ["short", "long"]) {
31
+ const m = i(o, {
32
+ notation: "compact",
33
+ compactDisplay: c
34
+ }).formatToParts(t).filter((n) => n.type === "compact").map((n) => n.value).join("");
35
+ if (m) return m;
36
+ }
37
+ return "";
38
+ }
39
+ function N(o, r, t = "auto") {
40
+ if (!Number.isFinite(o))
41
+ return f(o, r);
42
+ if (t === "auto")
43
+ return i(r, {
44
+ notation: "compact",
45
+ compactDisplay: "short",
46
+ maximumFractionDigits: 1
47
+ }).format(o);
48
+ const c = u[t], e = o < 0 || Object.is(o, -0) ? -1 : 1, m = Math.abs(o) / c * e, n = f(m, r, {
49
+ minimumFractionDigits: 1,
50
+ maximumFractionDigits: 1
51
+ }), a = b(r, t);
52
+ return a ? `${n}${a}` : n;
53
+ }
54
+ function x(o) {
55
+ const r = i(s(o)).formatToParts(-123456789e-2);
56
+ return {
57
+ decimal: r.find((t) => t.type === "decimal")?.value ?? ".",
58
+ group: r.find((t) => t.type === "group")?.value ?? ",",
59
+ minus: r.find((t) => t.type === "minusSign")?.value ?? "-"
60
+ };
61
+ }
62
+ export {
63
+ N as formatCompactNumber,
64
+ D as formatCurrency,
65
+ f as formatNumber,
66
+ l as formatPercent,
67
+ x as getNumberSeparators
68
+ };
@@ -0,0 +1,9 @@
1
+ export declare const FORMATTER_CACHE_LIMIT = 64;
2
+ export declare function getNumberFormat(locale: string, options?: Intl.NumberFormatOptions): Intl.NumberFormat;
3
+ export declare function getDateTimeFormat(locale: string, options?: Intl.DateTimeFormatOptions): Intl.DateTimeFormat;
4
+ export declare function getCollator(locale: string, options?: Intl.CollatorOptions): Intl.Collator;
5
+ export declare function getRelativeTimeFormat(locale: string, options?: Intl.RelativeTimeFormatOptions): Intl.RelativeTimeFormat;
6
+ /** Test-only: cache occupancy. Eviction is allowed; identity is not a public contract. */
7
+ export declare function getFormatterCacheSize(): number;
8
+ /** Test-only. */
9
+ export declare function clearFormatterCache(): void;
@@ -0,0 +1,66 @@
1
+ import { canonicalizeLocale as h, DEFAULT_LOCALE as f } from "../locale-config.js";
2
+ const d = 64, r = [], c = /* @__PURE__ */ new Map();
3
+ function g(t) {
4
+ if (!t) return "";
5
+ const e = Object.entries(t).filter(([, n]) => n !== void 0).sort(([n], [i]) => n.localeCompare(i));
6
+ return e.length === 0 ? "" : JSON.stringify(e);
7
+ }
8
+ function v(t, e, n) {
9
+ return `${t}|${e}|${g(n)}`;
10
+ }
11
+ function s() {
12
+ c.clear();
13
+ for (let t = 0; t < r.length; t += 1) {
14
+ const e = r[t];
15
+ e && c.set(e.key, t);
16
+ }
17
+ }
18
+ function y(t) {
19
+ const e = c.get(t);
20
+ if (e == null) return;
21
+ const n = r[e];
22
+ if (n)
23
+ return e !== r.length - 1 && (r.splice(e, 1), r.push(n), s()), n.value;
24
+ }
25
+ function C(t, e) {
26
+ const n = c.get(t);
27
+ for (n != null && r.splice(n, 1), r.push({ key: t, value: e }); r.length > d; ) {
28
+ const i = r.shift();
29
+ i && c.delete(i.key);
30
+ }
31
+ return s(), e;
32
+ }
33
+ function o(t, e, n, i) {
34
+ const l = h(e), u = v(t, l, n), a = y(u);
35
+ if (a) return a;
36
+ try {
37
+ return C(u, i(l));
38
+ } catch (m) {
39
+ if (l === f) throw m;
40
+ return o(t, f, n, i);
41
+ }
42
+ }
43
+ function T(t, e) {
44
+ return o("number", t, e, (n) => new Intl.NumberFormat(n, e));
45
+ }
46
+ function w(t, e) {
47
+ return o("date", t, e, (n) => new Intl.DateTimeFormat(n, e));
48
+ }
49
+ function I(t, e) {
50
+ return o("collator", t, e, (n) => new Intl.Collator(n, e));
51
+ }
52
+ function b(t, e) {
53
+ return o(
54
+ "relative",
55
+ t,
56
+ e,
57
+ (n) => new Intl.RelativeTimeFormat(n, e)
58
+ );
59
+ }
60
+ export {
61
+ d as FORMATTER_CACHE_LIMIT,
62
+ I as getCollator,
63
+ w as getDateTimeFormat,
64
+ T as getNumberFormat,
65
+ b as getRelativeTimeFormat
66
+ };
@@ -0,0 +1,6 @@
1
+ export { FORMATTER_CACHE_LIMIT, getNumberFormat, getDateTimeFormat, getCollator, getRelativeTimeFormat, } from './formatter-cache';
2
+ export { formatNumber, formatCurrency, formatPercent, formatCompactNumber, getNumberSeparators, type CompactMagnitude, type NumberSeparators, } from './format-number';
3
+ export { parseNumber } from './parse-number';
4
+ export { formatDate, formatTime, formatDateTime, formatRelativeTime, toValidDate, SHORT_DATE_OPTIONS, SHORT_TIME_OPTIONS, SHORT_DATE_TIME_OPTIONS, } from './format-date';
5
+ export { getLocalizedDatePattern } from './date-pattern';
6
+ export { compareStrings } from './collator';
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Parse a localized numeric string into a canonical JavaScript number.
3
+ * Display formatting must never become the stored value.
4
+ * Returns null for empty, mixed-separator, or otherwise malformed input.
5
+ */
6
+ export declare function parseNumber(input: string, locale: string): number | null;
@@ -0,0 +1,53 @@
1
+ import { getNumberSeparators as h } from "./format-number.js";
2
+ const A = /[\s\u00A0\u202F\u2009\u2007\u2008\u200A]/, $ = /[\s\u00A0\u202F\u2009\u2007\u2008\u200A]/g;
3
+ function d(t) {
4
+ return t.length > 0 && A.test(t);
5
+ }
6
+ function C(t, r) {
7
+ if (!r || d(r) || !t.includes(r)) return !0;
8
+ const e = t.split(r);
9
+ return e.some((n) => n.length === 0 || !/^\d+$/.test(n)) ? !1 : e.slice(1).every((n) => n.length >= 2 && n.length <= 3);
10
+ }
11
+ function x(t) {
12
+ return t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
13
+ }
14
+ function E(t) {
15
+ let r = t.trim().replace(new RegExp("\\p{Sc}", "gu"), "");
16
+ return r = r.replace(/^[A-Z]{3}\s+/u, "").replace(/\s+[A-Z]{3}$/u, ""), r.trim();
17
+ }
18
+ function S(t, r) {
19
+ if (typeof t != "string") return null;
20
+ let e = E(t);
21
+ if (!e) return null;
22
+ const { decimal: n, group: i, minus: f } = h(r);
23
+ let o = !1;
24
+ const p = [f, "-", "−", "-"];
25
+ for (const c of p)
26
+ if (c && e.startsWith(c)) {
27
+ o = !0, e = e.slice(c.length).trim();
28
+ break;
29
+ }
30
+ if ((e.endsWith("-") || e.endsWith(f)) && (o = !0, e = e.slice(0, e.endsWith(f) ? -f.length : -1).trim()), !e) return null;
31
+ const a = n ? e.lastIndexOf(n) : -1;
32
+ let s, u;
33
+ if (a >= 0) {
34
+ if (s = e.slice(0, a), u = e.slice(a + n.length), u.length === 0 || !/^\d+$/.test(u)) return null;
35
+ } else
36
+ s = e, u = null;
37
+ if (n && u == null && s.includes(n) || i && !C(s, i)) return null;
38
+ let l = s;
39
+ if (i && !d(i)) {
40
+ const c = new RegExp(x(i), "g");
41
+ l = l.replace(c, "");
42
+ }
43
+ if (l = l.replace($, ""), l.length === 0) {
44
+ if (!u) return null;
45
+ l = "0";
46
+ }
47
+ if (!/^\d+$/.test(l)) return null;
48
+ const m = `${o ? "-" : ""}${l}.${u ?? "0"}`, g = Number(m);
49
+ return Number.isFinite(g) ? g : null;
50
+ }
51
+ export {
52
+ S as parseNumber
53
+ };
@@ -1,11 +1,12 @@
1
1
  import { Locale } from 'date-fns/locale';
2
2
  /**
3
- * Returns the date-fns Locale for the given BCP 47 locale code.
4
- * Used by Calendar (react-day-picker) and date pickers (date-fns format).
3
+ * Curated date-fns locale for Calendar / DayPicker.
4
+ * Formatting still uses the full BCP 47 tag via Intl — this map is calendar chrome only.
5
+ * Unknown regional tags fall back to language, then enUS. Never remaps en-GB → enUS.
5
6
  */
6
7
  export declare function getDateFnsLocale(localeCode: string): Locale;
7
8
  /**
8
- * Returns a BCP 47 string suitable for Intl (e.g. toLocaleString).
9
- * Defaults to 'en-US' when locale is 'en'.
9
+ * BCP 47 tag for Intl constructors. Does not rewrite regional variants
10
+ * (`en-GB` stays `en-GB`; `de` stays `de`).
10
11
  */
11
12
  export declare function getIntlLocale(localeCode: string): string;
@@ -1,21 +1,51 @@
1
- import { kn as i, hi as u, es as f, de as s, enUS as r } from "date-fns/locale";
2
- const t = {
3
- en: r,
4
- "en-US": r,
5
- "en-GB": r,
6
- de: s,
7
- es: f,
8
- hi: u,
9
- kn: i
1
+ import { enUS as n } from "date-fns/locale/en-US";
2
+ import { enGB as u } from "date-fns/locale/en-GB";
3
+ import { enIN as l } from "date-fns/locale/en-IN";
4
+ import { de as r } from "date-fns/locale/de";
5
+ import { deAT as L } from "date-fns/locale/de-AT";
6
+ import { es as t } from "date-fns/locale/es";
7
+ import { fr as i } from "date-fns/locale/fr";
8
+ import { it as p } from "date-fns/locale/it";
9
+ import { pt as f } from "date-fns/locale/pt";
10
+ import { ptBR as d } from "date-fns/locale/pt-BR";
11
+ import { hi as a } from "date-fns/locale/hi";
12
+ import { kn as c } from "date-fns/locale/kn";
13
+ import { canonicalizeLocale as s, languageFromLocale as g } from "./locale-config.js";
14
+ const F = {
15
+ en: n,
16
+ "en-us": n,
17
+ "en-gb": u,
18
+ "en-in": l,
19
+ de: r,
20
+ "de-de": r,
21
+ "de-at": L,
22
+ "de-ch": r,
23
+ es: t,
24
+ "es-es": t,
25
+ "es-mx": t,
26
+ fr: i,
27
+ "fr-fr": i,
28
+ it: p,
29
+ "it-it": p,
30
+ pt: f,
31
+ "pt-pt": f,
32
+ "pt-br": d,
33
+ hi: a,
34
+ "hi-in": a,
35
+ kn: c,
36
+ "kn-in": c
10
37
  };
11
- function p(n) {
12
- const e = n.split("-")[0]?.toLowerCase() ?? "en";
13
- return t[n] ?? t[e] ?? r;
38
+ function e(o) {
39
+ return F[o.toLowerCase()];
14
40
  }
15
- function U(n) {
16
- return n === "en" || n === "en-US" || n === "en-GB" ? "en-US" : n === "de" ? "de-DE" : n === "es" ? "es-ES" : n === "hi" ? "hi-IN" : n === "kn" ? "kn-IN" : n;
41
+ function w(o) {
42
+ const m = s(o);
43
+ return e(m) ?? e(o) ?? e(g(m)) ?? n;
44
+ }
45
+ function z(o) {
46
+ return s(o);
17
47
  }
18
48
  export {
19
- p as getDateFnsLocale,
20
- U as getIntlLocale
49
+ w as getDateFnsLocale,
50
+ z as getIntlLocale
21
51
  };
@@ -5,12 +5,25 @@ export type I18nParams = {
5
5
  [key: string]: string | number | undefined;
6
6
  };
7
7
  export interface ImpactNovaI18nContextValue {
8
+ /** Language locale (BCP 47) and default for date/number formatting. */
8
9
  locale: string;
10
+ /** Date/time/calendar locale. Falls back to `locale`. */
11
+ dateLocale: string;
12
+ /** Number/currency/percent locale. Falls back to `locale`. */
13
+ numberLocale: string;
9
14
  messages: ImpactNovaMessages;
10
15
  t: (key: string, params?: I18nParams) => string;
11
16
  }
12
17
  export interface ImpactNovaI18nProviderProps {
13
18
  children: React.ReactNode;
19
+ /**
20
+ * BCP 47 language locale and default for date/number formatting.
21
+ * Example: `'de-DE'`. Default `'en'`.
22
+ */
14
23
  locale?: string;
24
+ /** Optional BCP 47 override for dates, times, and calendars. */
25
+ dateLocale?: string;
26
+ /** Optional BCP 47 override for numbers, currency, and percentages. */
27
+ numberLocale?: string;
15
28
  messages?: Partial<ImpactNovaMessages>;
16
29
  }
@@ -1 +1 @@
1
- export declare function ImpactNovaI18nProvider({ children, locale, messages: messagesOverride, }: import('./i18n.types').ImpactNovaI18nProviderProps): import("react/jsx-runtime").JSX.Element;
1
+ export declare function ImpactNovaI18nProvider({ children, locale, dateLocale, numberLocale, messages: messagesOverride, }: import('./i18n.types').ImpactNovaI18nProviderProps): import("react/jsx-runtime").JSX.Element;
@@ -1,36 +1,44 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import * as p from "react";
3
- import { defaultMessages as o } from "./defaultMessages.js";
4
- import { ImpactNovaI18nContext as d } from "./impact-nova-i18n-react-context.js";
5
- import { deepMerge as v, getNested as u, applyParams as c } from "./i18n-utils.js";
6
- function N({
7
- children: f,
8
- locale: n = "en",
9
- messages: t
1
+ import { jsx as u } from "react/jsx-runtime";
2
+ import * as n from "react";
3
+ import { defaultMessages as a } from "./defaultMessages.js";
4
+ import { ImpactNovaI18nContext as M } from "./impact-nova-i18n-react-context.js";
5
+ import { deepMerge as I, getNested as f, applyParams as d } from "./i18n-utils.js";
6
+ import { resolveLocaleConfig as x } from "./locale-config.js";
7
+ function h({
8
+ children: v,
9
+ locale: s = "en",
10
+ dateLocale: m,
11
+ numberLocale: l,
12
+ messages: o
10
13
  }) {
11
- const e = p.useMemo(() => t ? v(
12
- o,
13
- t
14
- ) : o, [t]), l = p.useMemo(
14
+ const e = n.useMemo(
15
+ () => x({ locale: s, dateLocale: m, numberLocale: l }),
16
+ [s, m, l]
17
+ ), t = n.useMemo(() => o ? I(
18
+ a,
19
+ o
20
+ ) : a, [o]), g = n.useMemo(
15
21
  () => ({
16
- locale: n,
17
- messages: e,
18
- t: (r, a) => {
19
- const s = u(e, r);
20
- if (s == null) {
21
- const m = u(
22
- o,
22
+ locale: e.locale,
23
+ dateLocale: e.dateLocale,
24
+ numberLocale: e.numberLocale,
25
+ messages: t,
26
+ t: (r, c) => {
27
+ const i = f(t, r);
28
+ if (i == null) {
29
+ const p = f(
30
+ a,
23
31
  r
24
32
  );
25
- return m == null ? r : c(m, a);
33
+ return p == null ? r : d(p, c);
26
34
  }
27
- return c(s, a);
35
+ return d(i, c);
28
36
  }
29
37
  }),
30
- [n, e]
38
+ [e, t]
31
39
  );
32
- return /* @__PURE__ */ i(d.Provider, { value: l, children: /* @__PURE__ */ i("div", { "data-component": "impact-nova-i18n-provider", style: { display: "contents" }, children: f }) });
40
+ return /* @__PURE__ */ u(M.Provider, { value: g, children: /* @__PURE__ */ u("div", { "data-component": "impact-nova-i18n-provider", style: { display: "contents" }, children: v }) });
33
41
  }
34
42
  export {
35
- N as ImpactNovaI18nProvider
43
+ h as ImpactNovaI18nProvider
36
44
  };
@@ -1,11 +1,13 @@
1
- import { defaultMessages as r } from "./defaultMessages.js";
2
- import { getNested as s, applyParams as o } from "./i18n-utils.js";
1
+ import { defaultMessages as a } from "./defaultMessages.js";
2
+ import { getNested as n, applyParams as o } from "./i18n-utils.js";
3
3
  const m = {
4
4
  locale: "en",
5
- messages: r,
6
- t: (e, a) => {
7
- const t = s(r, e);
8
- return t == null ? e : o(t, a);
5
+ dateLocale: "en",
6
+ numberLocale: "en",
7
+ messages: a,
8
+ t: (e, r) => {
9
+ const t = n(a, e);
10
+ return t == null ? e : o(t, r);
9
11
  }
10
12
  };
11
13
  export {
@@ -1,7 +1,10 @@
1
1
  export { ImpactNovaI18nProvider } from './impact-nova-i18n-context';
2
2
  export { useImpactNovaI18n } from './use-impact-nova-i18n';
3
3
  export type { ImpactNovaI18nContextValue, ImpactNovaI18nProviderProps, I18nParams, } from './i18n.types';
4
- export { defaultMessages, type ImpactNovaMessages, type CalendarMessages, type DatePickerMessages, type FilterMessages, type FilterOperatorMessages, type AdvancedFilterMessages, type GridHeaderMessages, type SelectMessages, type NestedListMessages, type DataTableMessages, type AriaMessages, type PromptMessages, type FileUploadMessages, type FilterStripMessages, type FilterPanelMessages, type NotificationPanelMessages, type HelpCenterMessages, type HorizontalScrollerMessages, type SidebarMessages, type StepperMessages, } from './defaultMessages';
4
+ export { defaultMessages, type ImpactNovaMessages, type CalendarMessages, type DatePickerMessages, type FilterMessages, type FilterOperatorMessages, type AdvancedFilterMessages, type GridHeaderMessages, type SelectMessages, type NestedListMessages, type DataTableMessages, type AriaMessages, type PromptMessages, type FileUploadMessages, type FilterStripMessages, type FilterPanelMessages, type NotificationPanelMessages, type HelpCenterMessages, type HorizontalScrollerMessages, type SidebarMessages, type StepperMessages, type CommentsMessages, type ChatMessages, } from './defaultMessages';
5
5
  export { getDateFnsLocale, getIntlLocale } from './getDateFnsLocale';
6
+ export { canonicalizeLocale, languageFromLocale, resolveLocaleConfig, DEFAULT_LOCALE, type LocaleConfigInput, type ResolvedLocaleConfig, } from './locale-config';
7
+ export { getWeekStartsOn } from './week-start';
8
+ export { formatDate, formatTime, formatDateTime, formatRelativeTime, formatNumber, formatCurrency, formatPercent, formatCompactNumber, parseNumber, getLocalizedDatePattern, getNumberSeparators, compareStrings, toValidDate, } from './format';
6
9
  /** Locale message packs for i18n. Use as-is or spread and override specific keys. */
7
10
  export { de, es, hi, kn } from './locales';
@@ -1,19 +1,44 @@
1
- import { ImpactNovaI18nProvider as r } from "./impact-nova-i18n-context.js";
2
- import { useImpactNovaI18n as m } from "./use-impact-nova-i18n.js";
3
- import { defaultMessages as a } from "./defaultMessages.js";
4
- import { getDateFnsLocale as x, getIntlLocale as s } from "./getDateFnsLocale.js";
5
- import { de as I } from "./locales/de.js";
6
- import { es as l } from "./locales/es.js";
7
- import { hi as g } from "./locales/hi.js";
8
- import { kn as i } from "./locales/kn.js";
1
+ import { ImpactNovaI18nProvider as o } from "./impact-nova-i18n-context.js";
2
+ import { useImpactNovaI18n as a } from "./use-impact-nova-i18n.js";
3
+ import { defaultMessages as f } from "./defaultMessages.js";
4
+ import { getDateFnsLocale as x, getIntlLocale as c } from "./getDateFnsLocale.js";
5
+ import { DEFAULT_LOCALE as l, canonicalizeLocale as i, languageFromLocale as s, resolveLocaleConfig as g } from "./locale-config.js";
6
+ import { getWeekStartsOn as u } from "./week-start.js";
7
+ import { de as N } from "./locales/de.js";
8
+ import { es as v } from "./locales/es.js";
9
+ import { hi as b } from "./locales/hi.js";
10
+ import { kn as T } from "./locales/kn.js";
11
+ import { compareStrings as P } from "./format/collator.js";
12
+ import { formatCompactNumber as k, formatCurrency as z, formatNumber as A, formatPercent as E, getNumberSeparators as O } from "./format/format-number.js";
13
+ import { formatDate as y, formatDateTime as M, formatRelativeTime as R, formatTime as U, toValidDate as V } from "./format/format-date.js";
14
+ import { getLocalizedDatePattern as _ } from "./format/date-pattern.js";
15
+ import { parseNumber as q } from "./format/parse-number.js";
9
16
  export {
10
- r as ImpactNovaI18nProvider,
11
- I as de,
12
- a as defaultMessages,
13
- l as es,
17
+ l as DEFAULT_LOCALE,
18
+ o as ImpactNovaI18nProvider,
19
+ i as canonicalizeLocale,
20
+ P as compareStrings,
21
+ N as de,
22
+ f as defaultMessages,
23
+ v as es,
24
+ k as formatCompactNumber,
25
+ z as formatCurrency,
26
+ y as formatDate,
27
+ M as formatDateTime,
28
+ A as formatNumber,
29
+ E as formatPercent,
30
+ R as formatRelativeTime,
31
+ U as formatTime,
14
32
  x as getDateFnsLocale,
15
- s as getIntlLocale,
16
- g as hi,
17
- i as kn,
18
- m as useImpactNovaI18n
33
+ c as getIntlLocale,
34
+ _ as getLocalizedDatePattern,
35
+ O as getNumberSeparators,
36
+ u as getWeekStartsOn,
37
+ b as hi,
38
+ T as kn,
39
+ s as languageFromLocale,
40
+ q as parseNumber,
41
+ g as resolveLocaleConfig,
42
+ V as toValidDate,
43
+ a as useImpactNovaI18n
19
44
  };
@@ -0,0 +1,28 @@
1
+ export declare const DEFAULT_LOCALE = "en";
2
+ export interface LocaleConfigInput {
3
+ locale?: string;
4
+ dateLocale?: string;
5
+ numberLocale?: string;
6
+ }
7
+ export interface ResolvedLocaleConfig {
8
+ locale: string;
9
+ dateLocale: string;
10
+ numberLocale: string;
11
+ }
12
+ /**
13
+ * Canonicalize a BCP 47 tag with Intl.Locale.
14
+ * Invalid/malformed tags fall back to `fallback` — the returned value is what callers must advertise.
15
+ */
16
+ export declare function canonicalizeLocale(tag: string | undefined | null, fallback?: string): string;
17
+ /** Language subtag only (`de-DE` → `de`). Used for message-pack lookup, not formatting. */
18
+ export declare function languageFromLocale(tag: string): string;
19
+ /**
20
+ * Resolve the public locale model:
21
+ * language = locale ?? "en"
22
+ * dateLocale = dateLocale ?? locale ?? "en"
23
+ * numberLocale = numberLocale ?? locale ?? "en"
24
+ *
25
+ * Independent overrides that fail canonicalization fall back to the resolved language locale,
26
+ * not a hidden en-US rewrite.
27
+ */
28
+ export declare function resolveLocaleConfig(input?: LocaleConfigInput): ResolvedLocaleConfig;
@@ -0,0 +1,32 @@
1
+ const L = "en";
2
+ function r(e) {
3
+ if (e == null) return;
4
+ const n = e.trim();
5
+ return n.length > 0 ? n : void 0;
6
+ }
7
+ function t(e, n = "en") {
8
+ const o = r(e);
9
+ if (!o) return n;
10
+ try {
11
+ return new Intl.Locale(o).toString();
12
+ } catch {
13
+ return n;
14
+ }
15
+ }
16
+ function a(e) {
17
+ try {
18
+ return new Intl.Locale(e).language;
19
+ } catch {
20
+ return "en";
21
+ }
22
+ }
23
+ function l(e = {}) {
24
+ const n = t(e.locale, "en"), o = r(e.dateLocale) ? t(e.dateLocale, n) : n, c = r(e.numberLocale) ? t(e.numberLocale, n) : n;
25
+ return { locale: n, dateLocale: o, numberLocale: c };
26
+ }
27
+ export {
28
+ L as DEFAULT_LOCALE,
29
+ t as canonicalizeLocale,
30
+ a as languageFromLocale,
31
+ l as resolveLocaleConfig
32
+ };