impact-nova 2.1.0-alpha.3 → 2.1.0-alpha.5

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 (137) hide show
  1. package/dist/components/data/ag-grid-react/ag-grid-tooltip-overflow.d.ts +3 -0
  2. package/dist/components/data/ag-grid-react/ag-grid-tooltip-overflow.js +6 -0
  3. package/dist/components/data/ag-grid-react/ag-grid.types.d.ts +15 -21
  4. package/dist/components/data/ag-grid-react/cell-renderers/date-display-renderer.js +1 -1
  5. package/dist/components/data/ag-grid-react/cell-renderers/default-text-cell-renderer.d.ts +1 -2
  6. package/dist/components/data/ag-grid-react/cell-renderers/default-text-cell-renderer.js +12 -6
  7. package/dist/components/data/ag-grid-react/cell-renderers/editors/textarea-cell-editor.js +19 -19
  8. package/dist/components/data/ag-grid-react/cell-renderers/select-display-renderer.js +1 -1
  9. package/dist/components/data/ag-grid-react/cell-renderers/switch-display-renderer.js +15 -15
  10. package/dist/components/data/ag-grid-react/headers/advanced-filter/advanced-filter-dialog.js +1 -1
  11. package/dist/components/data/ag-grid-react/headers/advanced-filter/column-filter-section.js +33 -33
  12. package/dist/components/data/ag-grid-react/headers/components/header-info.js +66 -62
  13. package/dist/components/data/ag-grid-react/headers/components/info-modal.js +6 -6
  14. package/dist/components/data/ag-grid-react/headers/components/section-renderers.js +18 -18
  15. package/dist/components/data/ag-grid-react/headers/custom-header-group.js +40 -29
  16. package/dist/components/data/ag-grid-react/headers/custom-header.js +102 -98
  17. package/dist/components/data/ag-grid-react/index.d.ts +1 -1
  18. package/dist/components/data/ag-grid-react/index.js +156 -148
  19. package/dist/components/data/ag-grid-react/theme.js +3 -0
  20. package/dist/components/data/ag-grid-react/use-ag-grid-truncation-tooltip.d.ts +5 -0
  21. package/dist/components/data/ag-grid-react/use-ag-grid-truncation-tooltip.js +13 -0
  22. package/dist/components/data/ag-grid-react/useGridAutoSizeStrategyOnResize.js +8 -5
  23. package/dist/components/data/data-table/data-table-column-apply.d.ts +16 -0
  24. package/dist/components/data/data-table/data-table-column-apply.js +18 -0
  25. package/dist/components/data/data-table/data-table-column-list.d.ts +13 -3
  26. package/dist/components/data/data-table/data-table-column-list.js +198 -191
  27. package/dist/components/data/data-table/data-table-constants.d.ts +3 -4
  28. package/dist/components/data/data-table/data-table-context.d.ts +3 -6
  29. package/dist/components/data/data-table/data-table-context.js +21 -10
  30. package/dist/components/data/data-table/data-table-saved-views.js +26 -26
  31. package/dist/components/data/data-table/data-table-sheet-portal-store.d.ts +13 -0
  32. package/dist/components/data/data-table/data-table-sheet-portal-store.js +36 -0
  33. package/dist/components/data/data-table/data-table-sheet.d.ts +3 -6
  34. package/dist/components/data/data-table/data-table-sheet.js +1 -1
  35. package/dist/components/data/data-table/data-table-view-menu.js +40 -40
  36. package/dist/components/data/data-table/data-table.d.ts +8 -10
  37. package/dist/components/data/data-table/data-table.js +131 -113
  38. package/dist/components/data/data-table/data-table.types.d.ts +35 -0
  39. package/dist/components/data/data-table/index.js +28 -27
  40. package/dist/components/data/data-table/indicator-legend.js +6 -6
  41. package/dist/components/data/expandable-list-item/expandable-list-item-attributes.d.ts +8 -0
  42. package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +72 -0
  43. package/dist/components/data/expandable-list-item/expandable-list-item-context.d.ts +13 -0
  44. package/dist/components/data/expandable-list-item/expandable-list-item-context.js +25 -0
  45. package/dist/components/data/expandable-list-item/expandable-list-item-metrics.d.ts +6 -0
  46. package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +41 -0
  47. package/dist/components/data/expandable-list-item/expandable-list-item-parts.d.ts +31 -0
  48. package/dist/components/data/expandable-list-item/expandable-list-item-parts.js +233 -0
  49. package/dist/components/data/expandable-list-item/expandable-list-item-preset.d.ts +18 -0
  50. package/dist/components/data/expandable-list-item/expandable-list-item-preset.js +133 -0
  51. package/dist/components/data/expandable-list-item/expandable-list-item.d.ts +5 -0
  52. package/dist/components/data/{expandable-sku/expandable-sku.types.d.ts → expandable-list-item/expandable-list-item.types.d.ts} +7 -7
  53. package/dist/components/data/expandable-list-item/index.d.ts +5 -0
  54. package/dist/components/data/expandable-list-item/index.js +19 -0
  55. package/dist/components/data/nested-list/components/NestedListHeader.js +11 -11
  56. package/dist/components/data/nested-list/components/SortableItem.js +2 -2
  57. package/dist/components/data-display/avatar/avatar.types.d.ts +2 -0
  58. package/dist/components/data-display/badge/badge.types.d.ts +2 -0
  59. package/dist/components/data-display/calendar/calendar-day-picker-classnames.js +11 -11
  60. package/dist/components/data-display/calendar/calendar-month-picker-panel.js +7 -7
  61. package/dist/components/data-display/calendar/calendar-week-number-cell.js +31 -31
  62. package/dist/components/data-display/card/card.js +8 -8
  63. package/dist/components/data-display/chart/chart.types.d.ts +9 -0
  64. package/dist/components/data-display/skeleton/skeleton.js +6 -6
  65. package/dist/components/data-display/statistics-card/statistics-card.js +14 -14
  66. package/dist/components/feedback/alert-dialog/alert-dialog.js +19 -19
  67. package/dist/components/feedback/dialog/dialog.js +1 -1
  68. package/dist/components/feedback/drawer/drawer.js +18 -18
  69. package/dist/components/feedback/dropdown-menu/dropdown-menu.js +68 -55
  70. package/dist/components/feedback/popover/popover.js +8 -1
  71. package/dist/components/feedback/sheet/sheet.js +1 -1
  72. package/dist/components/feedback/tooltip/tooltip.js +22 -22
  73. package/dist/components/feedback/tooltip/tooltip.variants.js +1 -1
  74. package/dist/components/flows/command-palette/command-palette.js +104 -104
  75. package/dist/components/flows/command-palette/shortcut-settings.js +34 -34
  76. package/dist/components/flows/filter-strip/filter-tag-list.js +4 -4
  77. package/dist/components/flows/notification-panel/notification-list.js +17 -17
  78. package/dist/components/flows/notification-panel/notification-panel.js +4 -4
  79. package/dist/components/flows/notification-panel/notification-panel.types.d.ts +3 -0
  80. package/dist/components/flows/wizard/wizard.js +8 -8
  81. package/dist/components/forms/combobox/combobox.js +20 -20
  82. package/dist/components/forms/date-picker/date-picker.js +17 -17
  83. package/dist/components/forms/date-picker/date-range-picker.js +3 -3
  84. package/dist/components/forms/date-picker/month-picker.js +1 -1
  85. package/dist/components/forms/date-picker/month-range-picker.js +42 -42
  86. package/dist/components/forms/date-picker/week-picker.js +15 -15
  87. package/dist/components/forms/date-picker/week-range-picker.js +3 -3
  88. package/dist/components/forms/file-upload/file-upload.js +33 -33
  89. package/dist/components/forms/input/input.js +8 -8
  90. package/dist/components/forms/input/input.variants.js +3 -3
  91. package/dist/components/forms/select/components/SelectMenuPanel.d.ts +1 -2
  92. package/dist/components/forms/select/components/SelectMenuPanel.js +17 -19
  93. package/dist/components/forms/select/components/SelectTrigger.d.ts +9 -6
  94. package/dist/components/forms/select/components/SelectTrigger.js +119 -116
  95. package/dist/components/forms/select/components/Submenu.js +7 -7
  96. package/dist/components/forms/select/hooks/useSelectKeyboardHandlers.d.ts +1 -1
  97. package/dist/components/forms/select/select.js +88 -88
  98. package/dist/components/forms/select/select.variants.js +5 -5
  99. package/dist/components/layout/sidebar/sidebar.d.ts +7 -50
  100. package/dist/components/layout/sidebar/sidebar.js +12 -11
  101. package/dist/components/layout/sidebar/sidebar.types.d.ts +35 -1
  102. package/dist/components/primitives/button-group/button-group.js +32 -32
  103. package/dist/components/primitives/chips/chips.variants.js +5 -5
  104. package/dist/components/primitives/empty-container/empty-container.types.d.ts +3 -0
  105. package/dist/components/primitives/kbd/kbd.variants.js +3 -3
  106. package/dist/components/primitives/stepper/stepper.js +6 -6
  107. package/dist/components/primitives/tag/tag.variants.js +2 -2
  108. package/dist/impact-nova-components.css +97 -0
  109. package/dist/impact-nova-tokens.scss +2 -0
  110. package/dist/impact-nova.css +1 -1
  111. package/dist/index.d.ts +1 -1
  112. package/dist/index.js +446 -413
  113. package/dist/lib/compose-refs.d.ts +8 -0
  114. package/dist/lib/compose-refs.js +14 -0
  115. package/dist/lib/primitives/field.types.d.ts +8 -2
  116. package/dist/lib/virtualized/index.d.ts +3 -0
  117. package/dist/lib/virtualized/index.js +33 -16
  118. package/dist/lib/virtualized/useVirtualizedList.d.ts +2 -0
  119. package/dist/lib/virtualized/useVirtualizedList.js +115 -109
  120. package/dist/lib/virtualized/virtualized-list-context.d.ts +12 -0
  121. package/dist/lib/virtualized/virtualized-list-context.js +21 -0
  122. package/dist/lib/virtualized/virtualized-list-parts.d.ts +51 -0
  123. package/dist/lib/virtualized/virtualized-list-parts.js +175 -0
  124. package/dist/lib/virtualized/virtualized-list-utils.d.ts +5 -0
  125. package/dist/lib/virtualized/virtualized-list-utils.js +6 -0
  126. package/dist/llms/rules/installation.js +1 -1
  127. package/dist/llms/rules/migration.js +1 -1
  128. package/dist/llms/rules/real-world-patterns.js +1 -1
  129. package/dist/llms/rules/requirements.js +1 -1
  130. package/package.json +24 -15
  131. package/tailwind.config.js +1 -0
  132. package/dist/components/data/ag-grid-react/headers/components/truncated-text.d.ts +0 -15
  133. package/dist/components/data/ag-grid-react/headers/components/truncated-text.js +0 -27
  134. package/dist/components/data/expandable-sku/expandable-sku.d.ts +0 -38
  135. package/dist/components/data/expandable-sku/expandable-sku.js +0 -245
  136. package/dist/components/data/expandable-sku/index.d.ts +0 -2
  137. package/dist/components/data/expandable-sku/index.js +0 -4
@@ -1,67 +1,67 @@
1
- import { jsxs as fe, jsx as v } from "react/jsx-runtime";
2
- import { lazy as me, useRef as S, useState as w, useCallback as f, useMemo as y, useEffect as ge, Suspense as he } from "react";
3
- import { ModuleRegistry as Ce, AllCommunityModule as ye, ValidationModule as ve } from "ag-grid-community";
4
- import { AllEnterpriseModule as be } from "ag-grid-enterprise";
5
- import { AgGridReact as xe } from "ag-grid-react";
6
- import { customAgGridTheme as Se } from "./theme.js";
7
- import { CustomHeader as Fe } from "./headers/custom-header.js";
8
- import { CustomHeaderGroup as Me } from "./headers/custom-header-group.js";
9
- import { DefaultTextCellRenderer as Ee } from "./cell-renderers/default-text-cell-renderer.js";
10
- import { GridHeaderContext as Ae } from "./headers/context/grid-header-context.js";
11
- import { convertToAgGridFilterModel as Re, getMultiFilterIndices as Ge, convertFromAgGridFilterModel as ke } from "./headers/utils/filter-utils.js";
12
- import { ColumnSettingsMenu as je } from "./headers/column-menu/column-settings-menu.js";
13
- import { AG_GRID_VALUE_FORMATTERS as we } from "./value-formatters.js";
14
- import { useGridAutoSizeStrategyOnResize as Ie } from "./useGridAutoSizeStrategyOnResize.js";
15
- import { subscribeGridApiEvent as et, subscribeGridApiEvents as tt } from "./grid-api-event-subscription.js";
1
+ import { jsxs as Ce, jsx as v } from "react/jsx-runtime";
2
+ import { lazy as ye, useRef as S, useState as j, useCallback as f, useMemo as y, useEffect as ve, Suspense as be } from "react";
3
+ import { ModuleRegistry as xe, AllCommunityModule as Se, ValidationModule as Fe } from "ag-grid-community";
4
+ import { AllEnterpriseModule as Me } from "ag-grid-enterprise";
5
+ import { AgGridReact as Ee } from "ag-grid-react";
6
+ import { customAgGridTheme as Ae } from "./theme.js";
7
+ import { CustomHeader as Re } from "./headers/custom-header.js";
8
+ import { CustomHeaderGroup as Ge } from "./headers/custom-header-group.js";
9
+ import { DefaultTextCellRenderer as ke } from "./cell-renderers/default-text-cell-renderer.js";
10
+ import { GridHeaderContext as we } from "./headers/context/grid-header-context.js";
11
+ import { convertToAgGridFilterModel as je, getMultiFilterIndices as Te, convertFromAgGridFilterModel as Ie } from "./headers/utils/filter-utils.js";
12
+ import { ColumnSettingsMenu as Oe } from "./headers/column-menu/column-settings-menu.js";
13
+ import { AG_GRID_VALUE_FORMATTERS as Pe } from "./value-formatters.js";
14
+ import { useGridAutoSizeStrategyOnResize as De } from "./useGridAutoSizeStrategyOnResize.js";
15
+ import { subscribeGridApiEvent as ot, subscribeGridApiEvents as lt } from "./grid-api-event-subscription.js";
16
16
  /* empty css */
17
- const Te = me(
17
+ const He = ye(
18
18
  () => import("./headers/advanced-filter/advanced-filter-dialog.js").then((l) => ({
19
19
  default: l.AdvancedFilterDialog
20
20
  }))
21
21
  );
22
- Ce.registerModules([ye, be, ve]);
23
- const F = "", H = "";
24
- function K(l) {
22
+ xe.registerModules([Se, Me, Fe]);
23
+ const F = "", N = "";
24
+ function $(l) {
25
25
  return l.getColumns()?.some((n) => n.getColDef().headerCheckboxSelection) ?? !1;
26
26
  }
27
- const U = (l) => {
27
+ const q = (l) => {
28
28
  if (!l) return;
29
29
  const n = l.cellRendererParams?.splits;
30
30
  if (Array.isArray(n) && n.length > 0) return n;
31
31
  const i = l.cellEditorParams?.splits;
32
32
  if (Array.isArray(i) && i.length > 0) return i;
33
- }, $ = (l, n) => {
33
+ }, z = (l, n) => {
34
34
  const i = [];
35
- for (const h of n) {
36
- const m = h?.field?.split(".").pop();
35
+ for (const g of n) {
36
+ const m = g?.field?.split(".").pop();
37
37
  if (!m) {
38
38
  i.push("");
39
39
  continue;
40
40
  }
41
- const c = l[m];
42
- if (c == null) {
41
+ const a = l[m];
42
+ if (a == null) {
43
43
  i.push("");
44
44
  continue;
45
45
  }
46
- if (typeof c == "object" && "value" in c) {
47
- const u = c.value;
46
+ if (typeof a == "object" && "value" in a) {
47
+ const u = a.value;
48
48
  i.push(u == null ? "" : String(u));
49
49
  continue;
50
50
  }
51
- if (typeof c != "object") {
52
- i.push(String(c));
51
+ if (typeof a != "object") {
52
+ i.push(String(a));
53
53
  continue;
54
54
  }
55
55
  i.push("");
56
56
  }
57
57
  return i;
58
- }, q = (l) => {
58
+ }, B = (l) => {
59
59
  if (typeof navigator < "u" && navigator.clipboard?.writeText) {
60
- navigator.clipboard.writeText(l).catch(() => z(l));
60
+ navigator.clipboard.writeText(l).catch(() => J(l));
61
61
  return;
62
62
  }
63
- z(l);
64
- }, z = (l) => {
63
+ J(l);
64
+ }, J = (l) => {
65
65
  if (typeof document > "u") return;
66
66
  const n = document.createElement("textarea");
67
67
  n.value = l, 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);
@@ -71,24 +71,28 @@ const U = (l) => {
71
71
  document.body.removeChild(n);
72
72
  }
73
73
  };
74
- function Qe({
74
+ function tt({
75
75
  children: l,
76
76
  defaultColDef: n,
77
77
  defaultColGroupDef: i,
78
- columnDefs: h,
78
+ columnDefs: g,
79
79
  valueFormatters: m,
80
- onGridReady: c,
80
+ onGridReady: a,
81
81
  onGridPreDestroyed: u,
82
82
  onFilterChanged: b,
83
- onSelectionChanged: C,
83
+ onSelectionChanged: h,
84
84
  onModelUpdated: M,
85
- ensureDomOrder: I = !0,
86
- autoSizeStrategy: T,
87
- ...g
85
+ ensureDomOrder: T = !1,
86
+ autoSizeStrategy: I,
87
+ tooltipShowMode: O = "whenTruncated",
88
+ tooltipShowDelay: P = 500,
89
+ tooltipHideDelay: X = 5e3,
90
+ tooltipInteraction: Q = !0,
91
+ ...C
88
92
  }) {
89
- const a = S(null), O = S(null), [P, L] = w(null);
90
- Ie(P, O, T);
91
- const [B, N] = w(!1), [J, _] = w(null), [X, V] = w(!1), E = S(null), D = S(null), A = S(null), Q = f(() => [], []), Y = y(() => ({
93
+ const c = S(null), D = S(null), [H, _] = j(null);
94
+ De(H, D, I);
95
+ const [Y, V] = j(!1), [Z, W] = j(null), [ee, K] = j(!1), E = S(null), L = S(null), A = S(null), te = f(() => [], []), re = y(() => ({
92
96
  numericColumn: {
93
97
  cellClass: "ag-right-aligned-cell",
94
98
  headerClass: "ag-right-aligned-header",
@@ -111,31 +115,31 @@ function Qe({
111
115
  }
112
116
  }), []), R = y(() => ({
113
117
  openSearch: (e) => {
114
- if (!a.current) return;
115
- const t = a.current.getGridOption("context") || {};
116
- a.current.setGridOption("context", { ...t, activeSearchColumnId: e }), a.current.refreshHeader();
118
+ if (!c.current) return;
119
+ const t = c.current.getGridOption("context") || {};
120
+ c.current.setGridOption("context", { ...t, activeSearchColumnId: e }), c.current.refreshHeader();
117
121
  },
118
122
  closeSearch: () => {
119
- if (!a.current) return;
120
- const e = a.current.getGridOption("context") || {};
121
- a.current.setGridOption("context", { ...e, activeSearchColumnId: null }), a.current.refreshHeader();
123
+ if (!c.current) return;
124
+ const e = c.current.getGridOption("context") || {};
125
+ c.current.setGridOption("context", { ...e, activeSearchColumnId: null }), c.current.refreshHeader();
122
126
  },
123
127
  openAdvancedFilter: (e) => {
124
- _(e || null), N(!0);
128
+ W(e || null), V(!0);
125
129
  },
126
130
  closeAdvancedFilter: () => {
127
- N(!1), _(null);
131
+ V(!1), W(null);
128
132
  },
129
133
  applyAdvancedFilter: (e) => {
130
- if (!a.current) return;
131
- const t = Re(e);
132
- a.current.setFilterModel(t), a.current.onFilterChanged(), a.current.refreshHeader();
134
+ if (!c.current) return;
135
+ const t = je(e);
136
+ c.current.setFilterModel(t), c.current.onFilterChanged(), c.current.refreshHeader();
133
137
  },
134
138
  openMenu: (e, t, o = "column") => {
135
- E.current = e, D.current = t, A.current = o, V(!0);
139
+ E.current = e, L.current = t, A.current = o, K(!0);
136
140
  },
137
141
  closeMenu: () => {
138
- E.current = null, D.current = null, A.current = null, V(!1);
142
+ E.current = null, L.current = null, A.current = null, K(!1);
139
143
  },
140
144
  // Getters read from refs - O(1) per header, no memory allocation
141
145
  get activeMenuColumnId() {
@@ -144,33 +148,33 @@ function Qe({
144
148
  get activeMenuVariant() {
145
149
  return A.current;
146
150
  }
147
- }), []), Z = f((e) => {
148
- a.current = e.api, L(e.api);
151
+ }), []), ne = f((e) => {
152
+ c.current = e.api, _(e.api);
149
153
  const t = e.api.getGridOption("context") || {};
150
- e.api.setGridOption("context", { ...t, activeSearchColumnId: null }), c && c(e);
151
- }, [c]), ee = f(
154
+ e.api.setGridOption("context", { ...t, activeSearchColumnId: null }), a && a(e);
155
+ }, [a]), oe = f(
152
156
  (e) => {
153
- a.current = null, L(null), u?.(e);
157
+ c.current = null, _(null), u?.(e);
154
158
  },
155
159
  [u]
156
- ), te = f(
160
+ ), le = f(
157
161
  (e) => {
158
162
  e.api.getGridOption("context")?.activeSearchColumnId || e.api.refreshHeader(), b?.(e);
159
163
  },
160
164
  [b]
161
- ), re = f(
165
+ ), ie = f(
162
166
  (e) => {
163
- K(e.api) && e.api.refreshHeader(), C?.(e);
167
+ $(e.api) && e.api.refreshHeader(), h?.(e);
164
168
  },
165
- [C]
166
- ), ne = f(
169
+ [h]
170
+ ), se = f(
167
171
  (e) => {
168
- e.api.getGridOption("rowModelType") !== "serverSide" && K(e.api) && e.api.refreshHeader(), M?.(e);
172
+ e.api.getGridOption("rowModelType") !== "serverSide" && $(e.api) && e.api.refreshHeader(), M?.(e);
169
173
  },
170
174
  [M]
171
175
  );
172
- ge(() => {
173
- const e = O.current;
176
+ ve(() => {
177
+ const e = D.current;
174
178
  if (!e) return;
175
179
  const t = (o) => {
176
180
  if (o.key !== "Enter" && o.key !== " ") return;
@@ -183,12 +187,12 @@ function Qe({
183
187
  };
184
188
  return e.addEventListener("keydown", t, !0), () => e.removeEventListener("keydown", t, !0);
185
189
  }, []);
186
- const oe = y(() => ({
187
- headerComponent: Fe,
190
+ const ae = y(() => ({
191
+ headerComponent: Re,
188
192
  // Default cell renderer wraps text in a span so display:flex centering
189
193
  // and text-overflow:ellipsis both work (ellipsis doesn't work on
190
194
  // anonymous flex text nodes, but works on flex child elements).
191
- cellRenderer: Ee,
195
+ cellRenderer: ke,
192
196
  ...n,
193
197
  suppressHeaderKeyboardEvent: (e) => {
194
198
  const { event: t } = e, o = t.target;
@@ -207,34 +211,34 @@ function Qe({
207
211
  headerComponentParams: {
208
212
  ...n?.headerComponentParams
209
213
  }
210
- }), [n]), le = y(() => ({
211
- headerGroupComponent: Me,
214
+ }), [n]), ce = y(() => ({
215
+ headerGroupComponent: Ge,
212
216
  ...i,
213
217
  headerGroupComponentParams: {
214
218
  ...i?.headerGroupComponentParams
215
219
  }
216
- }), [i]), ie = y(() => ({
217
- ...we,
220
+ }), [i]), ue = y(() => ({
221
+ ...Pe,
218
222
  // Always available - value formatters
219
- ...g.components,
223
+ ...C.components,
220
224
  // User components override
221
225
  ...m
222
226
  // Optional custom formatters override defaults
223
- }), [m, g.components]), se = f((e) => {
227
+ }), [m, C.components]), de = f((e) => {
224
228
  const t = e.value;
225
229
  if (t == null || typeof t != "object") return t;
226
- const o = U(e.column?.getColDef());
230
+ const o = q(e.column?.getColDef());
227
231
  if (o && o.length > 0) {
228
- const r = $(t, o);
232
+ const r = z(t, o);
229
233
  if (o.length === 1) {
230
234
  const d = o[0]?.field?.split(".").pop(), x = d ? t[d] : void 0;
231
235
  return x && typeof x == "object" && "value" in x ? x.value ?? "" : r[0];
232
236
  }
233
- return H + r.join(F);
237
+ return N + r.join(F);
234
238
  }
235
239
  const s = Object.entries(t).map(([, r]) => r && typeof r == "object" && "value" in r ? r.value : typeof r != "object" && typeof r < "u" ? r : null).filter((r) => r != null);
236
240
  return s.length === 0 ? "" : s.length === 1 ? s[0] : s.join(F);
237
- }, []), ae = f((e) => {
241
+ }, []), pe = f((e) => {
238
242
  if (typeof e.value == "string") {
239
243
  const t = e.value.trim();
240
244
  if (t.startsWith("{") || t.startsWith("["))
@@ -245,10 +249,10 @@ function Qe({
245
249
  }
246
250
  }
247
251
  return e.value;
248
- }, []), ce = f((e) => {
252
+ }, []), fe = f((e) => {
249
253
  const t = e?.data ?? "";
250
- if (!t.includes(F) && !t.includes(H)) {
251
- q(t);
254
+ if (!t.includes(F) && !t.includes(N)) {
255
+ B(t);
252
256
  return;
253
257
  }
254
258
  const o = [], s = t.split(`
@@ -259,25 +263,25 @@ function Qe({
259
263
  o.push("");
260
264
  continue;
261
265
  }
262
- const k = d.split(" ").map((p) => p.startsWith(H) ? { isSplit: !0, slots: p.slice(1).split(F) } : { isSplit: !1, slots: p.split(F) }), W = Math.max(1, ...k.map((p) => p.slots.length));
263
- if (W === 1) {
266
+ const k = d.split(" ").map((p) => p.startsWith(N) ? { isSplit: !0, slots: p.slice(1).split(F) } : { isSplit: !1, slots: p.split(F) }), U = Math.max(1, ...k.map((p) => p.slots.length));
267
+ if (U === 1) {
264
268
  o.push(k.map((p) => p.slots[0] ?? "").join(" "));
265
269
  continue;
266
270
  }
267
- for (let p = 0; p < W; p++) {
268
- const pe = k.map((j) => !j.isSplit && j.slots.length === 1 ? j.slots[0] : j.slots[p] ?? "");
269
- o.push(pe.join(" "));
271
+ for (let p = 0; p < U; p++) {
272
+ const he = k.map((w) => !w.isSplit && w.slots.length === 1 ? w.slots[0] : w.slots[p] ?? "");
273
+ o.push(he.join(" "));
270
274
  }
271
275
  }
272
- q(o.join(`
276
+ B(o.join(`
273
277
  `));
274
278
  }, []), G = f((e) => {
275
279
  const t = e.value;
276
280
  if (t == null) return "";
277
281
  if (typeof t != "object") return String(t);
278
- const o = U(e.column?.getColDef());
282
+ const o = q(e.column?.getColDef());
279
283
  if (o && o.length > 0) {
280
- const r = $(t, o);
284
+ const r = z(t, o);
281
285
  return o.length === 1 ? r[0] : r.join(`
282
286
  `);
283
287
  }
@@ -293,118 +297,122 @@ function Qe({
293
297
  }
294
298
  return s.length === 0 ? "" : s.length === 1 ? s[0] : s.join(`
295
299
  `);
296
- }, []), ue = y(() => ({
300
+ }, []), me = y(() => ({
297
301
  processCellCallback: G,
298
- ...g.defaultCsvExportParams ?? {}
299
- }), [G, g.defaultCsvExportParams]), de = y(() => ({
302
+ ...C.defaultCsvExportParams ?? {}
303
+ }), [G, C.defaultCsvExportParams]), ge = y(() => ({
300
304
  processCellCallback: G,
301
- ...g.defaultExcelExportParams ?? {}
302
- }), [G, g.defaultExcelExportParams]);
303
- return /* @__PURE__ */ fe(Ae.Provider, { value: R, children: [
304
- /* @__PURE__ */ v("div", { ref: O, "data-component": "ag-grid-react", style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ v(
305
- xe,
305
+ ...C.defaultExcelExportParams ?? {}
306
+ }), [G, C.defaultExcelExportParams]);
307
+ return /* @__PURE__ */ Ce(we.Provider, { value: R, children: [
308
+ /* @__PURE__ */ v("div", { ref: D, "data-component": "ag-grid-react", style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ v(
309
+ Ee,
306
310
  {
307
- theme: Se,
308
- defaultColDef: oe,
309
- columnDefs: h,
311
+ theme: Ae,
312
+ defaultColDef: ae,
313
+ columnDefs: g,
310
314
  cellSelection: !0,
311
- defaultColGroupDef: le,
312
- onGridReady: Z,
313
- onGridPreDestroyed: ee,
314
- onFilterChanged: te,
315
- onSelectionChanged: re,
316
- onModelUpdated: ne,
317
- components: ie,
318
- processCellForClipboard: se,
319
- processCellFromClipboard: ae,
320
- sendToClipboard: ce,
321
- ensureDomOrder: I,
315
+ defaultColGroupDef: ce,
316
+ onGridReady: ne,
317
+ onGridPreDestroyed: oe,
318
+ onFilterChanged: le,
319
+ onSelectionChanged: ie,
320
+ onModelUpdated: se,
321
+ components: ue,
322
+ tooltipShowMode: O,
323
+ tooltipShowDelay: P,
324
+ tooltipHideDelay: X,
325
+ tooltipInteraction: Q,
326
+ processCellForClipboard: de,
327
+ processCellFromClipboard: pe,
328
+ sendToClipboard: fe,
329
+ ensureDomOrder: T,
322
330
  suppressHeaderFocus: !1,
323
331
  suppressFocusAfterRefresh: !0,
324
332
  suppressGroupRowsSticky: !0,
325
333
  hidePaddedHeaderRows: !0,
326
334
  suppressServerSideFullWidthLoadingRow: !0,
327
- columnTypes: Y,
328
- autoSizeStrategy: T,
329
- ...g,
330
- defaultCsvExportParams: ue,
331
- defaultExcelExportParams: de,
332
- getMainMenuItems: Q
335
+ columnTypes: re,
336
+ autoSizeStrategy: I,
337
+ ...C,
338
+ defaultCsvExportParams: me,
339
+ defaultExcelExportParams: ge,
340
+ getMainMenuItems: te
333
341
  }
334
342
  ) }),
335
343
  l,
336
344
  /* @__PURE__ */ v(
337
- Oe,
345
+ Le,
338
346
  {
339
- isOpen: B,
340
- columnId: J,
341
- gridApi: P,
347
+ isOpen: Y,
348
+ columnId: Z,
349
+ gridApi: H,
342
350
  onClose: R.closeAdvancedFilter,
343
351
  onApply: R.applyAdvancedFilter
344
352
  }
345
353
  ),
346
354
  /* @__PURE__ */ v(
347
- Pe,
355
+ Ne,
348
356
  {
349
- isOpen: X,
357
+ isOpen: ee,
350
358
  columnId: E.current,
351
- gridApi: P,
352
- anchor: D.current,
359
+ gridApi: H,
360
+ anchor: L.current,
353
361
  variant: A.current,
354
362
  onClose: R.closeMenu
355
363
  }
356
364
  )
357
365
  ] });
358
366
  }
359
- function Oe({
367
+ function Le({
360
368
  isOpen: l,
361
369
  columnId: n,
362
370
  gridApi: i,
363
- onClose: h,
371
+ onClose: g,
364
372
  onApply: m
365
373
  }) {
366
374
  if (!l || !n || !i) return null;
367
- const c = i.getColumn(n);
368
- if (!c) return null;
369
- const u = c.getColDef(), b = u.headerComponentParams, C = Ge(u), M = C.text !== -1 || C.number !== -1 || C.date !== -1, I = C.set !== -1, g = u.filter === "agMultiColumnFilter" && (M || I) ? "multi" : u.filter === "agNumberColumnFilter" ? "number" : u.filter === "agDateColumnFilter" ? "date" : u.filter === "agSetColumnFilter" || b?.selectOptions ? "select" : "text", a = ke(i.getFilterModel());
370
- return /* @__PURE__ */ v(he, { fallback: null, children: /* @__PURE__ */ v(
371
- Te,
375
+ const a = i.getColumn(n);
376
+ if (!a) return null;
377
+ const u = a.getColDef(), b = u.headerComponentParams, h = Te(u), M = h.text !== -1 || h.number !== -1 || h.date !== -1, T = h.set !== -1, O = u.filter === "agMultiColumnFilter" && (M || T) ? "multi" : u.filter === "agNumberColumnFilter" ? "number" : u.filter === "agDateColumnFilter" ? "date" : u.filter === "agSetColumnFilter" || b?.selectOptions ? "select" : "text", P = Ie(i.getFilterModel());
378
+ return /* @__PURE__ */ v(be, { fallback: null, children: /* @__PURE__ */ v(
379
+ He,
372
380
  {
373
381
  isOpen: l,
374
- onClose: h,
382
+ onClose: g,
375
383
  onApply: m,
376
384
  columnId: n,
377
385
  columnLabel: u.headerName || n,
378
- columnType: g,
386
+ columnType: O,
379
387
  selectOptions: b?.selectOptions,
380
388
  isMultiSelect: b?.isMultiSelect,
381
- initialModel: a,
389
+ initialModel: P,
382
390
  api: i
383
391
  }
384
392
  ) });
385
393
  }
386
- function Pe({
394
+ function Ne({
387
395
  isOpen: l,
388
396
  columnId: n,
389
397
  gridApi: i,
390
- anchor: h,
398
+ anchor: g,
391
399
  variant: m,
392
- onClose: c
400
+ onClose: a
393
401
  }) {
394
402
  return !l || !n || !i ? null : /* @__PURE__ */ v(
395
- je,
403
+ Oe,
396
404
  {
397
405
  isOpen: l,
398
406
  columnId: n,
399
407
  gridApi: i,
400
- anchor: h,
408
+ anchor: g,
401
409
  variant: m || "column",
402
- onClose: c
410
+ onClose: a
403
411
  }
404
412
  );
405
413
  }
406
414
  export {
407
- Qe as AgGridWrapper,
408
- et as subscribeGridApiEvent,
409
- tt as subscribeGridApiEvents
415
+ tt as AgGridWrapper,
416
+ ot as subscribeGridApiEvent,
417
+ lt as subscribeGridApiEvents
410
418
  };
@@ -40,6 +40,9 @@ const d = e.withPart(r).withParams({
40
40
  menuBorder: !1,
41
41
  menuShadow: "#00000040 0px 0px 2px 0px",
42
42
  menuTextColor: "#1F2B4D",
43
+ tooltipBackgroundColor: "#1F2B4D",
44
+ tooltipTextColor: "#FFFFFF",
45
+ tooltipBorder: !1,
43
46
  pinnedRowBackgroundColor: "#F4F1F9",
44
47
  pinnedSourceRowBackgroundColor: "#F4F1F9",
45
48
  pinnedRowBorder: !1
@@ -0,0 +1,5 @@
1
+ import { RefObject } from 'react';
2
+ import { AgGridTooltipOverflowMode } from './ag-grid-tooltip-overflow';
3
+ type AgGridSetTooltip = (value: string, shouldDisplayTooltip?: () => boolean) => void;
4
+ export declare function useAgGridTruncationTooltip(setTooltip: AgGridSetTooltip | undefined, text: string, elementRef: RefObject<HTMLElement | null>, mode?: AgGridTooltipOverflowMode): void;
5
+ export {};
@@ -0,0 +1,13 @@
1
+ import { useEffect as c } from "react";
2
+ import { isAgGridTextOverflowing as e } from "./ag-grid-tooltip-overflow.js";
3
+ function m(r, i, n, f = "line-clamp") {
4
+ c(() => {
5
+ !r || !i.trim() || r(i, () => {
6
+ const u = n.current;
7
+ return u ? e(u, f) : !1;
8
+ });
9
+ }, [r, i, n, f]);
10
+ }
11
+ export {
12
+ m as useAgGridTruncationTooltip
13
+ };
@@ -1,6 +1,6 @@
1
1
  import { useEffect as a } from "react";
2
- import { subscribeGridApiEvents as l } from "./grid-api-event-subscription.js";
3
- import { refreshGridAutoSizeStrategy as f } from "./refreshGridAutoSizeStrategy.js";
2
+ import { subscribeGridApiEvents as f } from "./grid-api-event-subscription.js";
3
+ import { refreshGridAutoSizeStrategy as l } from "./refreshGridAutoSizeStrategy.js";
4
4
  function v(e, s, o) {
5
5
  a(() => {
6
6
  if (!e || !o)
@@ -11,16 +11,19 @@ function v(e, s, o) {
11
11
  let n = 0, r = 0;
12
12
  const c = () => {
13
13
  cancelAnimationFrame(r), r = requestAnimationFrame(() => {
14
- e.isDestroyed() || f(e);
14
+ e.isDestroyed() || l(e);
15
15
  });
16
16
  }, m = new ResizeObserver(() => {
17
17
  const i = t.clientWidth;
18
18
  i <= 0 || i === n || (n = i, c());
19
19
  });
20
20
  n = t.clientWidth, m.observe(t);
21
- const u = l(
21
+ const u = f(
22
22
  e,
23
- ["columnVisible", "displayedColumnsChanged"],
23
+ // columnVisible: user toggled column visibility in settings.
24
+ // Do NOT subscribe to displayedColumnsChanged — it fires during horizontal
25
+ // scroll when column virtualization swaps cells and would re-run autoSize.
26
+ ["columnVisible"],
24
27
  c
25
28
  );
26
29
  return () => {
@@ -0,0 +1,16 @@
1
+ import { ColumnPinnedType, GridApi } from 'ag-grid-community';
2
+ /** Debounce window for coalescing external grid column events into one UI sync. */
3
+ export declare const EXTERNAL_SYNC_DEBOUNCE_MS = 150;
4
+ /**
5
+ * Fallback when AG Grid may asynchronously reject a new pin (pinned viewport full).
6
+ * Event-driven detection is primary; this only covers the "no rejection fired" path.
7
+ */
8
+ export declare const GRID_AUTO_UNPIN_WAIT_MS = 300;
9
+ export type NormalizedColumnPin = 'left' | 'right' | null;
10
+ export declare function normalizeColumnPinned(pinned: ColumnPinnedType | boolean | null | undefined): NormalizedColumnPin;
11
+ export declare function readGridColumnPinned(gridApi: GridApi, columnId: string): NormalizedColumnPin;
12
+ /**
13
+ * Run after `applyColumnState` returns. AG Grid applies pin/order/hide synchronously;
14
+ * `queueMicrotask` lets any same-turn grid events finish before we release the panel lock.
15
+ */
16
+ export declare function afterSynchronousColumnApply(onSettled: () => void): void;
@@ -0,0 +1,18 @@
1
+ const e = 150, o = 300;
2
+ function u(n) {
3
+ return n === "left" || n === !0 ? "left" : n === "right" ? "right" : null;
4
+ }
5
+ function l(n, r) {
6
+ const t = n.getColumn(r);
7
+ return t ? u(t.getPinned()) : null;
8
+ }
9
+ function i(n) {
10
+ queueMicrotask(n);
11
+ }
12
+ export {
13
+ e as EXTERNAL_SYNC_DEBOUNCE_MS,
14
+ o as GRID_AUTO_UNPIN_WAIT_MS,
15
+ i as afterSynchronousColumnApply,
16
+ u as normalizeColumnPinned,
17
+ l as readGridColumnPinned
18
+ };
@@ -1,8 +1,18 @@
1
- interface DataTableColumnListProps {
1
+ /**
2
+ * Column visibility, order, and pin picker backed by AG Grid `gridApi`.
3
+ * Must render inside `DataTable` (reads `useDataTable().gridApi`).
4
+ */
5
+ export type DataTableColumnListProps = {
6
+ /**
7
+ * When `true`, column changes stay staged until the user clicks Apply (Discard resets).
8
+ * When `false` (default), visibility, order, and pin updates apply to the grid immediately.
9
+ */
2
10
  enableApplyDiscard?: boolean;
11
+ /** Show the search field that filters the column tree. Default `true`. */
3
12
  showSearch?: boolean;
13
+ /** Show the select-all control for column visibility. Default `true`. */
4
14
  showSelectAll?: boolean;
15
+ /** Show collapse/expand controls on nested column group headers. Default `true`. */
5
16
  showCollapse?: boolean;
6
- }
17
+ };
7
18
  export declare const DataTableColumnList: ({ enableApplyDiscard, showSearch, showSelectAll, showCollapse }: DataTableColumnListProps) => import("react/jsx-runtime").JSX.Element;
8
- export {};