impact-nova 3.0.0-alpha.17 → 3.0.0-alpha.19

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 (111) hide show
  1. package/dist/components/data/ag-grid-react/ag-grid.types.d.ts +15 -0
  2. package/dist/components/data/ag-grid-react/cell-renderers/badge-cell-renderer.d.ts +2 -0
  3. package/dist/components/data/ag-grid-react/cell-renderers/badge-cell-renderer.js +15 -14
  4. package/dist/components/data/ag-grid-react/cell-renderers/badge-icon-registry.d.ts +10 -0
  5. package/dist/components/data/ag-grid-react/cell-renderers/badge-icon-registry.js +17 -0
  6. package/dist/components/data/ag-grid-react/cell-renderers/index.d.ts +45 -7
  7. package/dist/components/data/ag-grid-react/cell-renderers/index.js +70 -58
  8. package/dist/components/data/ag-grid-react/cell-renderers/style-description-display-renderer.d.ts +5 -11
  9. package/dist/components/data/ag-grid-react/cell-renderers/style-description-display-renderer.js +127 -51
  10. package/dist/components/data/ag-grid-react/headers/custom-header.js +56 -56
  11. package/dist/components/data/ag-grid-react/index.d.ts +2 -1
  12. package/dist/components/data/ag-grid-react/index.js +315 -296
  13. package/dist/components/data/ag-grid-react/list-drag-grid-options.d.ts +14 -1
  14. package/dist/components/data/ag-grid-react/list-drag-grid-options.js +95 -31
  15. package/dist/components/data/ag-grid-react/list-drag-preview-card.d.ts +4 -0
  16. package/dist/components/data/ag-grid-react/list-drag-preview-card.js +14 -0
  17. package/dist/components/data/ag-grid-react/list-drag-preview-snapshot.d.ts +20 -0
  18. package/dist/components/data/ag-grid-react/list-drag-preview-snapshot.js +42 -0
  19. package/dist/components/data/ag-grid-react/list-find-highlight.d.ts +6 -0
  20. package/dist/components/data/ag-grid-react/list-find-highlight.js +7 -0
  21. package/dist/components/data/ag-grid-react/numeric-column-header-alignment.d.ts +9 -0
  22. package/dist/components/data/ag-grid-react/numeric-column-header-alignment.js +67 -0
  23. package/dist/components/data/ag-grid-react/process-backend-columndefs.d.ts +10 -2
  24. package/dist/components/data/ag-grid-react/process-backend-columndefs.js +84 -0
  25. package/dist/components/data/ag-grid-react/use-ag-grid-list-drag.d.ts +10 -2
  26. package/dist/components/data/ag-grid-react/use-ag-grid-list-drag.js +130 -107
  27. package/dist/components/data/ag-grid-react/use-list-drag-preview.d.ts +4 -1
  28. package/dist/components/data/ag-grid-react/use-list-drag-preview.js +131 -32
  29. package/dist/components/data/ag-grid-react/use-list-find.d.ts +36 -0
  30. package/dist/components/data/ag-grid-react/use-list-row-drop-zones.d.ts +2 -0
  31. package/dist/components/data/ag-grid-react/use-list-row-drop-zones.js +60 -41
  32. package/dist/components/data/data-table/data-table-list-header.js +1 -1
  33. package/dist/components/data/data-table/data-table-overlay.d.ts +6 -0
  34. package/dist/components/data/data-table/data-table-overlay.js +18 -0
  35. package/dist/components/data/data-table/data-table.types.d.ts +1 -0
  36. package/dist/components/data/data-table/index.d.ts +3 -0
  37. package/dist/components/data/data-table/index.js +67 -63
  38. package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +3 -2
  39. package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +3 -2
  40. package/dist/components/data/scenario-comparison/flatten-scenario-comparison-rows.d.ts +2 -0
  41. package/dist/components/data/scenario-comparison/flatten-scenario-comparison-rows.js +16 -0
  42. package/dist/components/data/scenario-comparison/index.d.ts +3 -0
  43. package/dist/components/data/scenario-comparison/index.js +6 -0
  44. package/dist/components/data/scenario-comparison/scenario-comparison-column.d.ts +12 -0
  45. package/dist/components/data/scenario-comparison/scenario-comparison-column.js +172 -0
  46. package/dist/components/data/scenario-comparison/scenario-comparison-label.d.ts +6 -0
  47. package/dist/components/data/scenario-comparison/scenario-comparison-label.js +64 -0
  48. package/dist/components/data/scenario-comparison/scenario-comparison.d.ts +5 -0
  49. package/dist/components/data/scenario-comparison/scenario-comparison.js +127 -0
  50. package/dist/components/data/scenario-comparison/scenario-comparison.types.d.ts +56 -0
  51. package/dist/components/data/scenario-comparison/scenario-comparison.variants.d.ts +7 -0
  52. package/dist/components/data/scenario-comparison/scenario-comparison.variants.js +29 -0
  53. package/dist/components/data-display/badge/index.d.ts +2 -0
  54. package/dist/components/data-display/badge/index.js +4 -2
  55. package/dist/components/data-display/badge/trophy-icon.d.ts +6 -0
  56. package/dist/components/data-display/badge/trophy-icon.js +28 -0
  57. package/dist/components/feedback/find-bar/collect-find-matches.d.ts +35 -0
  58. package/dist/components/feedback/find-bar/collect-find-matches.js +68 -0
  59. package/dist/components/feedback/find-bar/find-bar-shortcuts.d.ts +5 -0
  60. package/dist/components/feedback/find-bar/find-bar-shortcuts.js +27 -0
  61. package/dist/components/feedback/find-bar/find-bar.d.ts +7 -0
  62. package/dist/components/feedback/find-bar/find-bar.js +266 -0
  63. package/dist/components/feedback/find-bar/find-bar.types.d.ts +32 -0
  64. package/dist/components/feedback/find-bar/index.d.ts +4 -0
  65. package/dist/components/feedback/find-bar/index.js +11 -0
  66. package/dist/components/feedback/tooltip/tab-tooltip-render.js +3 -2
  67. package/dist/components/flows/command-palette/shortcut-settings.js +10 -10
  68. package/dist/components/flows/filter-panel/filter-panel.js +4 -4
  69. package/dist/components/flows/iris-chat/iris-chat-composer.js +213 -184
  70. package/dist/components/flows/iris-chat/iris-chat-icons.d.ts +1 -0
  71. package/dist/components/flows/iris-chat/iris-chat-icons.js +23 -10
  72. package/dist/components/flows/iris-chat/iris-chat.variants.js +4 -4
  73. package/dist/components/flows/iris-chat/sync-iris-chat-composer-textarea.d.ts +6 -0
  74. package/dist/components/flows/iris-chat/sync-iris-chat-composer-textarea.js +23 -0
  75. package/dist/components/forms/choice-card/choice-card-compare-scroll.d.ts +4 -0
  76. package/dist/components/forms/choice-card/choice-card-compare-scroll.js +6 -0
  77. package/dist/components/forms/choice-card/choice-card.d.ts +13 -2
  78. package/dist/components/forms/choice-card/choice-card.js +432 -342
  79. package/dist/components/forms/choice-card/choice-card.types.d.ts +9 -2
  80. package/dist/components/forms/select/components/SelectTriggerValue.js +3 -2
  81. package/dist/components/forms/select/components/Submenu.js +3 -2
  82. package/dist/components/primitives/tabs/folder-tab-path.d.ts +6 -0
  83. package/dist/components/primitives/tabs/folder-tab-path.js +16 -0
  84. package/dist/components/primitives/tabs/tabs.js +178 -112
  85. package/dist/components/primitives/tabs/tabs.types.d.ts +1 -1
  86. package/dist/i18n/defaultMessages.d.ts +19 -0
  87. package/dist/i18n/defaultMessages.js +54 -38
  88. package/dist/i18n/impact-nova-i18n-defaults.d.ts +5 -0
  89. package/dist/i18n/impact-nova-i18n-defaults.js +4 -9
  90. package/dist/i18n/index.d.ts +1 -1
  91. package/dist/i18n/locales/de.js +17 -1
  92. package/dist/i18n/locales/es.js +17 -1
  93. package/dist/i18n/locales/hi.js +17 -1
  94. package/dist/i18n/locales/kn.js +17 -1
  95. package/dist/impact-nova-components.css +189 -14
  96. package/dist/impact-nova-tokens.scss +2 -0
  97. package/dist/impact-nova.css +1 -1
  98. package/dist/index.d.ts +1 -0
  99. package/dist/index.js +621 -607
  100. package/dist/lib/virtualized/index.d.ts +2 -0
  101. package/dist/lib/virtualized/index.js +35 -31
  102. package/dist/lib/virtualized/list-index.d.ts +5 -0
  103. package/dist/lib/virtualized/list-index.js +13 -0
  104. package/dist/lib/virtualized/read-infinite-query-list.d.ts +14 -0
  105. package/dist/lib/virtualized/read-infinite-query-list.js +12 -0
  106. package/dist/lib/virtualized/types.d.ts +4 -2
  107. package/dist/lib/virtualized/useRowState.js +60 -56
  108. package/dist/lib/virtualized/useVirtualizedList.d.ts +5 -0
  109. package/dist/llms/rules/installation.js +1 -1
  110. package/dist/llms/rules/requirements.js +1 -1
  111. package/package.json +1 -1
@@ -1,266 +1,282 @@
1
- import { jsxs as Pe, jsx as w } from "react/jsx-runtime";
2
- import { lazy as Ne, useRef as _, useState as P, useId as Ve, useEffect as Z, useCallback as f, useMemo as h, Suspense as We } from "react";
3
- import { ModuleRegistry as Ke, AllCommunityModule as $e } from "ag-grid-community";
4
- import { AllEnterpriseModule as Ue } from "ag-grid-enterprise";
5
- import { AgGridReact as qe } from "ag-grid-react";
6
- import { useAgGridDragList as ze } from "./use-ag-grid-list-drag.js";
7
- import { customAgGridTheme as Xe } from "./theme.js";
8
- import { AG_GRID_LIST_ROW_HEIGHT_PX as Je, customAgGridListTheme as Ze } from "./ag-grid-list.js";
9
- import { AG_GRID_LIST_RANK_GRADIENT as Lt } from "./ag-grid-list.js";
10
- import { syncAgGridThemeMode as Be } from "./sync-ag-grid-theme-mode.js";
11
- import { CustomHeader as Qe } from "./headers/custom-header.js";
12
- import { CustomHeaderGroup as B } from "./headers/custom-inner-header-group.js";
13
- import { mergeColumnGroupDefsWithDefault as Ye } from "./merge-column-group-defs.js";
14
- import { DefaultTextCellRenderer as et } from "./cell-renderers/default-text-cell-renderer.js";
15
- import { GridHeaderContext as tt } from "./headers/context/grid-header-context.js";
16
- import { convertToAgGridFilterModel as rt, getMultiFilterIndices as nt, convertFromAgGridFilterModel as ot } from "./headers/utils/filter-utils.js";
17
- import { AG_GRID_VALUE_FORMATTERS as lt } from "./value-formatters.js";
18
- import { useGridAutoSizeStrategyOnResize as it } from "./useGridAutoSizeStrategyOnResize.js";
19
- import { subscribeGridApiEvent as Ht, subscribeGridApiEvents as jt } from "./grid-api-event-subscription.js";
20
- import { notifyColumnIndicatorSync as D } from "./notify-column-indicator-sync.js";
21
- import { setActiveSearchColumnId as N, clearHeaderSearchActiveState as at } from "./headers/header-search-active-state.js";
1
+ import { jsxs as We, jsx as G } from "react/jsx-runtime";
2
+ import { lazy as Ke, useRef as V, useState as W, useId as $e, useEffect as K, useCallback as m, useMemo as g, Suspense as Ue } from "react";
3
+ import { ModuleRegistry as ze, AllCommunityModule as qe } from "ag-grid-community";
4
+ import { AllEnterpriseModule as Xe } from "ag-grid-enterprise";
5
+ import { AgGridReact as Je } from "ag-grid-react";
6
+ import { useAgGridDragList as Ze } from "./use-ag-grid-list-drag.js";
7
+ import { customAgGridTheme as Be } from "./theme.js";
8
+ import { AG_GRID_LIST_ROW_HEIGHT_PX as Qe, customAgGridListTheme as Ye } from "./ag-grid-list.js";
9
+ import { AG_GRID_LIST_RANK_GRADIENT as Pt } from "./ag-grid-list.js";
10
+ import { syncAgGridThemeMode as et } from "./sync-ag-grid-theme-mode.js";
11
+ import { CustomHeader as tt } from "./headers/custom-header.js";
12
+ import { CustomHeaderGroup as Y } from "./headers/custom-inner-header-group.js";
13
+ import { mergeColumnGroupDefsWithDefault as rt } from "./merge-column-group-defs.js";
14
+ import { DefaultTextCellRenderer as ot } from "./cell-renderers/default-text-cell-renderer.js";
15
+ import { GridHeaderContext as nt } from "./headers/context/grid-header-context.js";
16
+ import { convertToAgGridFilterModel as it, getMultiFilterIndices as lt, convertFromAgGridFilterModel as st } from "./headers/utils/filter-utils.js";
17
+ import { AG_GRID_VALUE_FORMATTERS as at } from "./value-formatters.js";
18
+ import { useGridAutoSizeStrategyOnResize as ct } from "./useGridAutoSizeStrategyOnResize.js";
19
+ import { subscribeGridApiEvent as Vt, subscribeGridApiEvents as Wt } from "./grid-api-event-subscription.js";
20
+ import { notifyColumnIndicatorSync as I } from "./notify-column-indicator-sync.js";
21
+ import { setActiveSearchColumnId as $, clearHeaderSearchActiveState as ut } from "./headers/header-search-active-state.js";
22
22
  /* empty css */
23
- import { useAgGridTruncationTooltip as _t } from "./use-ag-grid-truncation-tooltip.js";
24
- import { useListRowDropZones as Nt } from "./use-list-row-drop-zones.js";
25
- import { isAgGridHeaderLabelTooltipOverflowing as Wt, isAgGridTextOverflowing as Kt } from "./ag-grid-tooltip-overflow.js";
26
- const st = Ne(
27
- () => import("./headers/advanced-filter/advanced-filter-dialog.js").then((s) => ({
28
- default: s.AdvancedFilterDialog
23
+ import { readNumericColumnTypeConfig as dt, normalizeColumnDefsNumericHeaderAlignment as pt } from "./numeric-column-header-alignment.js";
24
+ import { useAgGridTruncationTooltip as $t } from "./use-ag-grid-truncation-tooltip.js";
25
+ import { useListRowDropZones as zt } from "./use-list-row-drop-zones.js";
26
+ import { isAgGridHeaderLabelTooltipOverflowing as Xt, isAgGridTextOverflowing as Jt } from "./ag-grid-tooltip-overflow.js";
27
+ const ft = Ke(
28
+ () => import("./headers/advanced-filter/advanced-filter-dialog.js").then((c) => ({
29
+ default: c.AdvancedFilterDialog
29
30
  }))
30
31
  );
31
- Ke.registerModules([$e, Ue]);
32
- const S = "", V = "", Q = (s) => {
33
- if (!s) return;
34
- const n = s.cellRendererParams?.splits;
35
- if (Array.isArray(n) && n.length > 0) return n;
36
- const a = s.cellEditorParams?.splits;
37
- if (Array.isArray(a) && a.length > 0) return a;
38
- }, Y = (s, n) => {
39
- const a = [];
40
- for (const C of n) {
41
- const v = C?.field?.split(".").pop();
42
- if (!v) {
43
- a.push("");
32
+ ze.registerModules([qe, Xe]);
33
+ const R = "", U = "", ee = (c) => {
34
+ if (!c) return;
35
+ const o = c.cellRendererParams?.splits;
36
+ if (Array.isArray(o) && o.length > 0) return o;
37
+ const s = c.cellEditorParams?.splits;
38
+ if (Array.isArray(s) && s.length > 0) return s;
39
+ }, te = (c, o) => {
40
+ const s = [];
41
+ for (const C of o) {
42
+ const y = C?.field?.split(".").pop();
43
+ if (!y) {
44
+ s.push("");
44
45
  continue;
45
46
  }
46
- const d = s[v];
47
+ const d = c[y];
47
48
  if (d == null) {
48
- a.push("");
49
+ s.push("");
49
50
  continue;
50
51
  }
51
52
  if (typeof d == "object" && "value" in d) {
52
53
  const p = d.value;
53
- a.push(p == null ? "" : String(p));
54
+ s.push(p == null ? "" : String(p));
54
55
  continue;
55
56
  }
56
57
  if (typeof d != "object") {
57
- a.push(String(d));
58
+ s.push(String(d));
58
59
  continue;
59
60
  }
60
- a.push("");
61
+ s.push("");
61
62
  }
62
- return a;
63
- }, ee = (s) => {
63
+ return s;
64
+ }, re = (c) => {
64
65
  if (typeof navigator < "u" && navigator.clipboard?.writeText) {
65
- navigator.clipboard.writeText(s).catch(() => te(s));
66
+ navigator.clipboard.writeText(c).catch(() => oe(c));
66
67
  return;
67
68
  }
68
- te(s);
69
- }, te = (s) => {
69
+ oe(c);
70
+ }, oe = (c) => {
70
71
  if (typeof document > "u") return;
71
- const n = document.createElement("textarea");
72
- n.value = s, n.setAttribute("readonly", ""), n.style.position = "fixed", n.style.top = "0", n.style.left = "0", n.style.opacity = "0", n.style.pointerEvents = "none", document.body.appendChild(n);
72
+ const o = document.createElement("textarea");
73
+ o.value = c, o.setAttribute("readonly", ""), o.style.position = "fixed", o.style.top = "0", o.style.left = "0", o.style.opacity = "0", o.style.pointerEvents = "none", document.body.appendChild(o);
73
74
  try {
74
- n.select(), document.execCommand("copy");
75
+ o.select(), document.execCommand("copy");
75
76
  } finally {
76
- document.body.removeChild(n);
77
+ document.body.removeChild(o);
77
78
  }
78
79
  };
79
- function Mt({
80
- children: s,
81
- defaultColDef: n,
82
- defaultColGroupDef: a,
80
+ function Ot({
81
+ children: c,
82
+ defaultColDef: o,
83
+ defaultColGroupDef: s,
83
84
  columnDefs: C,
84
- valueFormatters: v,
85
+ valueFormatters: y,
85
86
  onGridReady: d,
86
87
  onGridPreDestroyed: p,
87
- onFilterChanged: x,
88
- onSelectionChanged: y,
89
- onModelUpdated: F,
90
- ensureDomOrder: M = !1,
91
- autoSizeStrategy: T,
92
- tooltipShowMode: I = "whenTruncated",
93
- tooltipShowDelay: L = 500,
94
- tooltipHideDelay: re = 5e3,
95
- tooltipInteraction: ne = !0,
96
- themeOverride: oe,
97
- variant: W = "table",
98
- listRowGradient: le,
99
- listDragPreview: ie,
100
- listHeader: ae = "columns",
101
- onRowReorder: se,
102
- isRowDragDisabled: ce,
103
- getRowDragHandleLabel: ue,
104
- canDropRow: de,
105
- rowLoading: pe = !1,
106
- className: K,
107
- ...c
88
+ onFilterChanged: w,
89
+ onSelectionChanged: x,
90
+ onModelUpdated: D,
91
+ ensureDomOrder: L = !1,
92
+ autoSizeStrategy: k,
93
+ tooltipShowMode: j = "whenTruncated",
94
+ tooltipShowDelay: O = 500,
95
+ tooltipHideDelay: ne = 5e3,
96
+ tooltipInteraction: ie = !0,
97
+ themeOverride: le,
98
+ variant: z = "table",
99
+ listRowGradient: se,
100
+ listDragPreview: ae,
101
+ listHeader: ce = "columns",
102
+ onRowReorder: ue,
103
+ onRowMoveBeyondEdge: de,
104
+ isRowDragDisabled: pe,
105
+ getRowDragHandleLabel: fe,
106
+ canDropRow: me,
107
+ rowLoading: ge = !1,
108
+ numericColumnHeaderAlignment: h = "right",
109
+ className: q,
110
+ ...a
108
111
  }) {
109
- const u = _(null), R = _(null), [$, U] = P(null), q = Ve(), b = _(q);
110
- b.current = q, it($, R, T), Z(() => {
112
+ const u = V(null), E = V(null), [b, X] = W(null), J = $e(), S = V(J);
113
+ S.current = J, ct(b, E, k), K(() => {
111
114
  const e = document.documentElement, t = () => {
112
- Be(e.classList.contains("dark") ? "dark" : "light", e);
115
+ et(e.classList.contains("dark") ? "dark" : "light", e);
113
116
  };
114
117
  t();
115
- const o = new MutationObserver(t);
116
- return o.observe(e, { attributes: !0, attributeFilter: ["class"] }), () => o.disconnect();
118
+ const n = new MutationObserver(t);
119
+ return n.observe(e, { attributes: !0, attributeFilter: ["class"] }), () => n.disconnect();
117
120
  }, []);
118
- const [me, z] = P(!1), [fe, X] = P(null), ge = f(() => [], []), he = h(() => ({
121
+ const [he, Z] = W(!1), [ve, B] = W(null), Ce = m(() => [], []), F = g(
122
+ () => dt(h),
123
+ [h]
124
+ ), ye = g(() => ({
119
125
  numericColumn: {
120
- cellClass: "ag-right-aligned-cell",
121
- headerClass: "ag-right-aligned-header",
122
- filter: "agNumberColumnFilter"
126
+ ...F
123
127
  },
124
128
  currency: {
125
- cellClass: "ag-right-aligned-cell",
126
- headerClass: "ag-right-aligned-header",
127
- filter: "agNumberColumnFilter",
129
+ ...F,
128
130
  valueFormatter: (e) => e.value != null ? `$${Number(e.value).toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : ""
129
131
  },
130
132
  percentage: {
131
- cellClass: "ag-right-aligned-cell",
132
- headerClass: "ag-right-aligned-header",
133
- filter: "agNumberColumnFilter",
133
+ ...F,
134
134
  valueFormatter: (e) => e.value != null ? `${Number(e.value).toFixed(2)}%` : ""
135
135
  },
136
136
  dateColumn: {
137
137
  filter: "agDateColumnFilter"
138
138
  }
139
- }), []), k = h(() => ({
140
- gridScopeId: b.current,
139
+ }), [F]), H = g(() => ({
140
+ gridScopeId: S.current,
141
141
  openSearch: (e) => {
142
142
  if (!u.current) return;
143
143
  const t = u.current.getGridOption("context") || {};
144
- u.current.setGridOption("context", { ...t, activeSearchColumnId: e }), N(b.current, e), D(u.current);
144
+ u.current.setGridOption("context", { ...t, activeSearchColumnId: e }), $(S.current, e), I(u.current);
145
145
  },
146
146
  closeSearch: () => {
147
147
  if (!u.current) return;
148
148
  const e = u.current.getGridOption("context") || {};
149
- u.current.setGridOption("context", { ...e, activeSearchColumnId: null }), N(b.current, null), D(u.current);
149
+ u.current.setGridOption("context", { ...e, activeSearchColumnId: null }), $(S.current, null), I(u.current);
150
150
  },
151
151
  openAdvancedFilter: (e) => {
152
- X(e || null), z(!0);
152
+ B(e || null), Z(!0);
153
153
  },
154
154
  closeAdvancedFilter: () => {
155
- z(!1), X(null);
155
+ Z(!1), B(null);
156
156
  },
157
157
  applyAdvancedFilter: (e) => {
158
158
  if (!u.current) return;
159
- const t = rt(e);
160
- u.current.setFilterModel(t), u.current.onFilterChanged(), D(u.current);
159
+ const t = it(e);
160
+ u.current.setFilterModel(t), u.current.onFilterChanged(), I(u.current);
161
161
  }
162
- }), []), Ce = f((e) => {
163
- u.current = e.api, U(e.api);
162
+ }), []), xe = m((e) => {
163
+ u.current = e.api, X(e.api);
164
164
  const t = e.api.getGridOption("context") || {};
165
165
  e.api.setGridOption("context", {
166
166
  ...t,
167
167
  activeSearchColumnId: null,
168
- headerSearchScopeId: b.current
169
- }), N(b.current, null), d && d(e);
170
- }, [d]), ve = f(
168
+ headerSearchScopeId: S.current,
169
+ numericColumnHeaderAlignment: h
170
+ }), $(S.current, null), d && d(e);
171
+ }, [h, d]);
172
+ K(() => {
173
+ if (!b) return;
174
+ const e = b.getGridOption("context") || {};
175
+ b.setGridOption("context", {
176
+ ...e,
177
+ numericColumnHeaderAlignment: h
178
+ }), b.refreshHeader();
179
+ }, [b, h]);
180
+ const be = m(
171
181
  (e) => {
172
- at(b.current), u.current = null, U(null), p?.(e);
182
+ ut(S.current), u.current = null, X(null), p?.(e);
173
183
  },
174
184
  [p]
175
- ), ye = f(
185
+ ), Se = m(
176
186
  (e) => {
177
- D(e.api), x?.(e);
187
+ I(e.api), w?.(e);
178
188
  },
179
- [x]
180
- ), be = f(
189
+ [w]
190
+ ), we = m(
181
191
  (e) => {
182
- y?.(e);
192
+ x?.(e);
183
193
  },
184
- [y]
185
- ), xe = f(
194
+ [x]
195
+ ), Re = m(
186
196
  (e) => {
187
- F?.(e);
197
+ D?.(e);
188
198
  },
189
- [F]
199
+ [D]
190
200
  );
191
- Z(() => {
192
- const e = R.current;
201
+ K(() => {
202
+ const e = E.current;
193
203
  if (!e) return;
194
- const t = (o) => {
195
- if (o.key !== "Enter" && o.key !== " ") return;
196
- const i = o.target;
197
- if (!i.classList.contains("ag-cell") && !i.classList.contains("ag-header-cell")) return;
198
- const r = i.querySelector(
204
+ const t = (n) => {
205
+ if (n.key !== "Enter" && n.key !== " ") return;
206
+ const l = n.target;
207
+ if (!l.classList.contains("ag-cell") && !l.classList.contains("ag-header-cell")) return;
208
+ const r = l.querySelector(
199
209
  'button, [role="checkbox"], [role="switch"], [role="combobox"], [role="button"], [role="link"], a, input, select, textarea, .cursor-pointer'
200
210
  );
201
- r && (o.preventDefault(), o.stopPropagation(), r.click(), r.focus());
211
+ r && (n.preventDefault(), n.stopPropagation(), r.click(), r.focus());
202
212
  };
203
213
  return e.addEventListener("keydown", t, !0), () => e.removeEventListener("keydown", t, !0);
204
214
  }, []);
205
- const Se = h(() => ({
206
- headerComponent: Qe,
215
+ const Ge = g(() => ({
216
+ headerComponent: tt,
207
217
  // Default cell renderer wraps text in a span so display:flex centering
208
218
  // and text-overflow:ellipsis both work (ellipsis doesn't work on
209
219
  // anonymous flex text nodes, but works on flex child elements).
210
- cellRenderer: et,
211
- ...n,
220
+ cellRenderer: ot,
221
+ ...o,
212
222
  suppressHeaderKeyboardEvent: (e) => {
213
- const { event: t } = e, o = t.target;
214
- if (o.tagName === "INPUT" || o.tagName === "TEXTAREA")
223
+ const { event: t } = e, n = t.target;
224
+ if (n.tagName === "INPUT" || n.tagName === "TEXTAREA")
215
225
  return !(t.key === "Escape" || t.key === "Tab");
216
226
  if (t.key === "Enter" || t.key === " ") {
217
- const r = o.closest(".ag-header-cell");
227
+ const r = n.closest(".ag-header-cell");
218
228
  if (r) {
219
- const l = r.querySelector('[role="checkbox"], button, [role="switch"], input');
220
- if (l)
221
- return t.preventDefault(), l.click(), !0;
229
+ const i = r.querySelector('[role="checkbox"], button, [role="switch"], input');
230
+ if (i)
231
+ return t.preventDefault(), i.click(), !0;
222
232
  }
223
233
  }
224
- return n?.suppressHeaderKeyboardEvent?.(e) ?? !1;
234
+ return o?.suppressHeaderKeyboardEvent?.(e) ?? !1;
225
235
  },
226
236
  headerComponentParams: {
227
- ...n?.headerComponentParams
237
+ ...o?.headerComponentParams
228
238
  }
229
- }), [n]), H = h(() => ({
230
- ...a,
239
+ }), [o]), _ = g(() => ({
240
+ ...s,
231
241
  headerGroupComponentParams: {
232
- ...a?.headerGroupComponentParams,
233
- innerHeaderGroupComponent: a?.headerGroupComponentParams?.innerHeaderGroupComponent ?? "CustomInnerHeaderGroup"
242
+ ...s?.headerGroupComponentParams,
243
+ innerHeaderGroupComponent: s?.headerGroupComponentParams?.innerHeaderGroupComponent ?? "CustomInnerHeaderGroup"
234
244
  }
235
- }), [a]), we = h(
236
- () => Ye(C ?? void 0, H),
237
- [C, H]
238
- ), Fe = h(() => ({
239
- ...lt,
245
+ }), [s]), De = g(() => {
246
+ const e = rt(
247
+ C ?? void 0,
248
+ _
249
+ );
250
+ return pt(
251
+ e ?? void 0,
252
+ h
253
+ );
254
+ }, [C, _, h]), Ee = g(() => ({
255
+ ...at,
240
256
  // Always available - value formatters
241
- CustomInnerHeaderGroup: B,
242
- CustomHeaderGroup: B,
243
- ...c.components,
257
+ CustomInnerHeaderGroup: Y,
258
+ CustomHeaderGroup: Y,
259
+ ...a.components,
244
260
  // User components override
245
- ...v
261
+ ...y
246
262
  // Optional custom formatters override defaults
247
- }), [v, c.components]), Re = f((e) => {
263
+ }), [y, a.components]), Fe = m((e) => {
248
264
  const t = e.value;
249
265
  if (t != null && typeof t == "object") {
250
- const i = Q(e.column?.getColDef());
251
- if (i && i.length > 0) {
252
- const l = Y(t, i);
253
- if (i.length === 1) {
254
- const j = i[0]?.field?.split(".").pop(), g = j ? t[j] : void 0;
255
- return g && typeof g == "object" && "value" in g ? g.value ?? "" : l[0];
266
+ const l = ee(e.column?.getColDef());
267
+ if (l && l.length > 0) {
268
+ const i = te(t, l);
269
+ if (l.length === 1) {
270
+ const P = l[0]?.field?.split(".").pop(), v = P ? t[P] : void 0;
271
+ return v && typeof v == "object" && "value" in v ? v.value ?? "" : i[0];
256
272
  }
257
- return V + l.join(S);
273
+ return U + i.join(R);
258
274
  }
259
- const r = Object.entries(t).map(([, l]) => l && typeof l == "object" && "value" in l ? l.value : typeof l != "object" && typeof l < "u" ? l : null).filter((l) => l != null);
260
- return r.length === 0 ? "" : r.length === 1 ? r[0] : r.join(S);
275
+ const r = Object.entries(t).map(([, i]) => i && typeof i == "object" && "value" in i ? i.value : typeof i != "object" && typeof i < "u" ? i : null).filter((i) => i != null);
276
+ return r.length === 0 ? "" : r.length === 1 ? r[0] : r.join(R);
261
277
  }
262
278
  return t == null ? t : e.column?.getColDef()?.useValueFormatterForExport === !0 ? e.formatValue?.(t) ?? t : t;
263
- }, []), Ae = f((e) => {
279
+ }, []), Ae = m((e) => {
264
280
  if (typeof e.value == "string") {
265
281
  const t = e.value.trim();
266
282
  if (t.startsWith("{") || t.startsWith("["))
@@ -271,198 +287,201 @@ function Mt({
271
287
  }
272
288
  }
273
289
  return e.value;
274
- }, []), Ee = f((e) => {
290
+ }, []), Te = m((e) => {
275
291
  const t = e?.data ?? "";
276
- if (!t.includes(S) && !t.includes(V)) {
277
- ee(t);
292
+ if (!t.includes(R) && !t.includes(U)) {
293
+ re(t);
278
294
  return;
279
295
  }
280
- const o = [], i = t.split(`
296
+ const n = [], l = t.split(`
281
297
  `);
282
- for (let r = 0; r < i.length; r++) {
283
- const l = i[r];
284
- if (l.length === 0 && r === i.length - 1) {
285
- o.push("");
298
+ for (let r = 0; r < l.length; r++) {
299
+ const i = l[r];
300
+ if (i.length === 0 && r === l.length - 1) {
301
+ n.push("");
286
302
  continue;
287
303
  }
288
- const g = l.split(" ").map((m) => m.startsWith(V) ? { isSplit: !0, slots: m.slice(1).split(S) } : { isSplit: !1, slots: m.split(S) }), O = Math.max(1, ...g.map((m) => m.slots.length));
289
- if (O === 1) {
290
- o.push(g.map((m) => m.slots[0] ?? "").join(" "));
304
+ const v = i.split(" ").map((f) => f.startsWith(U) ? { isSplit: !0, slots: f.slice(1).split(R) } : { isSplit: !1, slots: f.split(R) }), N = Math.max(1, ...v.map((f) => f.slots.length));
305
+ if (N === 1) {
306
+ n.push(v.map((f) => f.slots[0] ?? "").join(" "));
291
307
  continue;
292
308
  }
293
- for (let m = 0; m < O; m++) {
294
- const _e = g.map((G) => !G.isSplit && G.slots.length === 1 ? G.slots[0] : G.slots[m] ?? "");
295
- o.push(_e.join(" "));
309
+ for (let f = 0; f < N; f++) {
310
+ const Ve = v.map((M) => !M.isSplit && M.slots.length === 1 ? M.slots[0] : M.slots[f] ?? "");
311
+ n.push(Ve.join(" "));
296
312
  }
297
313
  }
298
- ee(o.join(`
314
+ re(n.join(`
299
315
  `));
300
- }, []), A = f((e) => {
316
+ }, []), A = m((e) => {
301
317
  const t = e.value;
302
318
  if (t == null) return "";
303
319
  if (typeof t != "object")
304
320
  return e.column?.getColDef()?.useValueFormatterForExport === !0 ? String(e.formatValue?.(t) ?? t) : String(t);
305
- const o = Q(e.column?.getColDef());
306
- if (o && o.length > 0) {
307
- const r = Y(t, o);
308
- return o.length === 1 ? r[0] : r.join(`
321
+ const n = ee(e.column?.getColDef());
322
+ if (n && n.length > 0) {
323
+ const r = te(t, n);
324
+ return n.length === 1 ? r[0] : r.join(`
309
325
  `);
310
326
  }
311
- const i = [];
327
+ const l = [];
312
328
  for (const r of Object.values(t)) {
313
329
  if (r && typeof r == "object" && "value" in r) {
314
- const l = r.value;
315
- if (l == null) continue;
316
- i.push(String(l));
330
+ const i = r.value;
331
+ if (i == null) continue;
332
+ l.push(String(i));
317
333
  continue;
318
334
  }
319
- r != null && typeof r != "object" && i.push(String(r));
335
+ r != null && typeof r != "object" && l.push(String(r));
320
336
  }
321
- return i.length === 0 ? "" : i.length === 1 ? i[0] : i.join(`
337
+ return l.length === 0 ? "" : l.length === 1 ? l[0] : l.join(`
322
338
  `);
323
- }, []), Ge = h(() => ({
339
+ }, []), Me = g(() => ({
324
340
  processCellCallback: A,
325
- ...c.defaultCsvExportParams ?? {}
326
- }), [A, c.defaultCsvExportParams]), De = h(() => ({
341
+ ...a.defaultCsvExportParams ?? {}
342
+ }), [A, a.defaultCsvExportParams]), Ie = g(() => ({
327
343
  processCellCallback: A,
328
- ...c.defaultExcelExportParams ?? {}
329
- }), [A, c.defaultExcelExportParams]), {
330
- isDragList: Me,
331
- isListVariant: E,
332
- hideColumnHeader: Te,
333
- dragListColumnDefs: Ie,
334
- dragListGridProps: Le,
335
- listHeaderGridProps: ke,
336
- dragPreviewPortal: He,
337
- liveRegion: je
338
- } = ze({
339
- variant: W,
340
- listHeader: ae,
344
+ ...a.defaultExcelExportParams ?? {}
345
+ }), [A, a.defaultExcelExportParams]), {
346
+ isDragList: Le,
347
+ isListVariant: T,
348
+ hideColumnHeader: ke,
349
+ dragListColumnDefs: je,
350
+ dragListGridProps: Oe,
351
+ listHeaderGridProps: He,
352
+ dragPreviewPortal: _e,
353
+ liveRegion: Pe
354
+ } = Ze({
355
+ variant: z,
356
+ listHeader: ce,
341
357
  columnDefs: C,
342
- mergedColumnDefs: we,
343
- listRowGradient: le,
344
- listDragPreview: ie,
345
- isRowDragDisabled: ce,
346
- getRowDragHandleLabel: ue,
347
- canDropRow: de,
348
- onRowReorder: se,
349
- getRowStyle: c.getRowStyle,
350
- getRowId: c.getRowId,
351
- rowData: c.rowData,
352
- rowDragManaged: c.rowDragManaged,
353
- rowDragText: c.rowDragText,
354
- onRowDragEnter: c.onRowDragEnter,
355
- onRowDragMove: c.onRowDragMove,
356
- onRowDragCancel: c.onRowDragCancel,
357
- onRowDragEnd: c.onRowDragEnd,
358
- gridContainerRef: R,
358
+ mergedColumnDefs: De,
359
+ listRowGradient: se,
360
+ listDragPreview: ae,
361
+ isRowDragDisabled: pe,
362
+ getRowDragHandleLabel: fe,
363
+ canDropRow: me,
364
+ onRowReorder: ue,
365
+ onRowMoveBeyondEdge: de,
366
+ getRowStyle: a.getRowStyle,
367
+ getRowId: a.getRowId,
368
+ rowData: a.rowData,
369
+ rowDragManaged: a.rowDragManaged,
370
+ rowDragText: a.rowDragText,
371
+ onRowDragEnter: a.onRowDragEnter,
372
+ onRowDragMove: a.onRowDragMove,
373
+ onRowDragLeave: a.onRowDragLeave,
374
+ onRowDragCancel: a.onRowDragCancel,
375
+ onRowDragEnd: a.onRowDragEnd,
376
+ gridContainerRef: E,
359
377
  gridApiRef: u
360
- }), J = c.rowHeight ?? Je, Oe = oe ?? (E ? Ze : Xe);
361
- return /* @__PURE__ */ Pe(tt.Provider, { value: k, children: [
362
- /* @__PURE__ */ w(
378
+ }), Q = a.rowHeight ?? Qe, Ne = le ?? (T ? Ye : Be);
379
+ return /* @__PURE__ */ We(nt.Provider, { value: H, children: [
380
+ /* @__PURE__ */ G(
363
381
  "div",
364
382
  {
365
- ref: R,
383
+ ref: E,
366
384
  "data-component": "ag-grid-react",
367
- "data-variant": E ? "list" : W,
368
- "data-list-drag": Me ? "true" : void 0,
369
- "data-list-header": Te ? "none" : void 0,
370
- "data-row-loading": pe ? "true" : "false",
371
- className: `table-with-loader${K ? ` ${K}` : ""}`,
385
+ "data-variant": T ? "list" : z,
386
+ "data-list-drag": Le ? "true" : void 0,
387
+ "data-list-header": ke ? "none" : void 0,
388
+ "data-row-loading": ge ? "true" : "false",
389
+ className: `table-with-loader${q ? ` ${q}` : ""}`,
372
390
  style: {
373
391
  width: "100%",
374
392
  height: "100%",
375
- ...E ? { "--ag-row-height": `${J}px` } : null
393
+ ...T ? { "--ag-row-height": `${Q}px` } : null
376
394
  },
377
- children: /* @__PURE__ */ w(
378
- qe,
395
+ children: /* @__PURE__ */ G(
396
+ Je,
379
397
  {
380
- theme: Oe,
381
- defaultColDef: Se,
382
- columnDefs: Ie,
398
+ theme: Ne,
399
+ defaultColDef: Ge,
400
+ columnDefs: je,
383
401
  cellSelection: !0,
384
- defaultColGroupDef: H,
385
- onGridReady: Ce,
386
- onGridPreDestroyed: ve,
387
- onFilterChanged: ye,
388
- onSelectionChanged: be,
389
- onModelUpdated: xe,
390
- tooltipShowMode: I,
391
- tooltipShowDelay: L,
392
- tooltipHideDelay: re,
393
- tooltipInteraction: ne,
394
- processCellForClipboard: Re,
402
+ defaultColGroupDef: _,
403
+ onGridReady: xe,
404
+ onGridPreDestroyed: be,
405
+ onFilterChanged: Se,
406
+ onSelectionChanged: we,
407
+ onModelUpdated: Re,
408
+ tooltipShowMode: j,
409
+ tooltipShowDelay: O,
410
+ tooltipHideDelay: ne,
411
+ tooltipInteraction: ie,
412
+ processCellForClipboard: Fe,
395
413
  processCellFromClipboard: Ae,
396
- sendToClipboard: Ee,
397
- ensureDomOrder: M,
414
+ sendToClipboard: Te,
415
+ ensureDomOrder: L,
398
416
  suppressHeaderFocus: !1,
399
417
  suppressFocusAfterRefresh: !0,
400
418
  suppressGroupRowsSticky: !0,
401
419
  hidePaddedHeaderRows: !0,
402
420
  suppressServerSideFullWidthLoadingRow: !0,
403
- columnTypes: he,
404
- autoSizeStrategy: T,
405
- ...c,
406
- ...E ? { rowHeight: J } : null,
407
- ...ke,
408
- ...Le,
409
- components: Fe,
410
- defaultCsvExportParams: Ge,
411
- defaultExcelExportParams: De,
412
- getMainMenuItems: ge
421
+ columnTypes: ye,
422
+ autoSizeStrategy: k,
423
+ ...a,
424
+ ...T ? { rowHeight: Q, cellSelection: a.cellSelection ?? !1 } : null,
425
+ ...He,
426
+ ...Oe,
427
+ components: Ee,
428
+ defaultCsvExportParams: Me,
429
+ defaultExcelExportParams: Ie,
430
+ getMainMenuItems: Ce
413
431
  }
414
432
  )
415
433
  }
416
434
  ),
417
- He,
418
- je,
419
- s,
420
- /* @__PURE__ */ w(
421
- ct,
435
+ _e,
436
+ Pe,
437
+ c,
438
+ /* @__PURE__ */ G(
439
+ mt,
422
440
  {
423
- isOpen: me,
424
- columnId: fe,
425
- gridApi: $,
426
- onClose: k.closeAdvancedFilter,
427
- onApply: k.applyAdvancedFilter
441
+ isOpen: he,
442
+ columnId: ve,
443
+ gridApi: b,
444
+ onClose: H.closeAdvancedFilter,
445
+ onApply: H.applyAdvancedFilter
428
446
  }
429
447
  )
430
448
  ] });
431
449
  }
432
- function ct({
433
- isOpen: s,
434
- columnId: n,
435
- gridApi: a,
450
+ function mt({
451
+ isOpen: c,
452
+ columnId: o,
453
+ gridApi: s,
436
454
  onClose: C,
437
- onApply: v
455
+ onApply: y
438
456
  }) {
439
- if (!s || !n || !a) return null;
440
- const d = a.getColumn(n);
457
+ if (!c || !o || !s) return null;
458
+ const d = s.getColumn(o);
441
459
  if (!d) return null;
442
- const p = d.getColDef(), x = p.headerComponentParams, y = nt(p), F = y.text !== -1 || y.number !== -1 || y.date !== -1, M = y.set !== -1, I = p.filter === "agMultiColumnFilter" && (F || M) ? "multi" : p.filter === "agNumberColumnFilter" ? "number" : p.filter === "agDateColumnFilter" ? "date" : p.filter === "agSetColumnFilter" || x?.selectOptions ? "select" : "text", L = ot(a.getFilterModel());
443
- return /* @__PURE__ */ w(We, { fallback: null, children: /* @__PURE__ */ w(
444
- st,
460
+ const p = d.getColDef(), w = p.headerComponentParams, x = lt(p), D = x.text !== -1 || x.number !== -1 || x.date !== -1, L = x.set !== -1, j = p.filter === "agMultiColumnFilter" && (D || L) ? "multi" : p.filter === "agNumberColumnFilter" ? "number" : p.filter === "agDateColumnFilter" ? "date" : p.filter === "agSetColumnFilter" || w?.selectOptions ? "select" : "text", O = st(s.getFilterModel());
461
+ return /* @__PURE__ */ G(Ue, { fallback: null, children: /* @__PURE__ */ G(
462
+ ft,
445
463
  {
446
- isOpen: s,
464
+ isOpen: c,
447
465
  onClose: C,
448
- onApply: v,
449
- columnId: n,
450
- columnLabel: p.headerName || n,
451
- columnType: I,
452
- selectOptions: x?.selectOptions,
453
- isMultiSelect: x?.isMultiSelect,
454
- initialModel: L,
455
- api: a
466
+ onApply: y,
467
+ columnId: o,
468
+ columnLabel: p.headerName || o,
469
+ columnType: j,
470
+ selectOptions: w?.selectOptions,
471
+ isMultiSelect: w?.isMultiSelect,
472
+ initialModel: O,
473
+ api: s
456
474
  }
457
475
  ) });
458
476
  }
459
477
  export {
460
- Lt as AG_GRID_LIST_RANK_GRADIENT,
461
- Mt as AgGridWrapper,
462
- Wt as isAgGridHeaderLabelTooltipOverflowing,
463
- Kt as isAgGridTextOverflowing,
464
- Ht as subscribeGridApiEvent,
465
- jt as subscribeGridApiEvents,
466
- _t as useAgGridTruncationTooltip,
467
- Nt as useListRowDropZones
478
+ Pt as AG_GRID_LIST_RANK_GRADIENT,
479
+ Ot as AgGridWrapper,
480
+ Xt as isAgGridHeaderLabelTooltipOverflowing,
481
+ Jt as isAgGridTextOverflowing,
482
+ pt as normalizeColumnDefsNumericHeaderAlignment,
483
+ Vt as subscribeGridApiEvent,
484
+ Wt as subscribeGridApiEvents,
485
+ $t as useAgGridTruncationTooltip,
486
+ zt as useListRowDropZones
468
487
  };