impact-nova 1.9.0-alpha.2 → 1.9.0-alpha.3

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 (27) hide show
  1. package/dist/components/ui/ag-grid-react/cell-renderers/percent-progress-display-renderer.js +4 -4
  2. package/dist/components/ui/ag-grid-react/index.d.ts +2 -1
  3. package/dist/components/ui/ag-grid-react/index.js +136 -129
  4. package/dist/components/ui/ag-grid-react/refreshGridAutoSizeStrategy.d.ts +7 -0
  5. package/dist/components/ui/ag-grid-react/refreshGridAutoSizeStrategy.js +30 -0
  6. package/dist/components/ui/ag-grid-react/useGridAutoSizeStrategyOnResize.d.ts +7 -0
  7. package/dist/components/ui/ag-grid-react/useGridAutoSizeStrategyOnResize.js +33 -0
  8. package/dist/components/ui/empty-container/emptyStateIllustrations.d.ts +15 -31
  9. package/dist/components/ui/empty-container/emptyStateIllustrations.js +32 -21
  10. package/dist/components/ui/empty-container/illustrations/empty-state-1.d.ts +3 -0
  11. package/dist/components/ui/empty-container/illustrations/empty-state-1.js +7 -0
  12. package/dist/components/ui/empty-container/illustrations/empty-state-2.d.ts +3 -0
  13. package/dist/components/ui/empty-container/illustrations/empty-state-2.js +7 -0
  14. package/dist/components/ui/empty-container/illustrations/empty-state-3.d.ts +3 -0
  15. package/dist/components/ui/empty-container/illustrations/empty-state-3.js +7 -0
  16. package/dist/components/ui/empty-container/illustrations/empty-state-4.d.ts +3 -0
  17. package/dist/components/ui/empty-container/illustrations/empty-state-4.js +7 -0
  18. package/dist/components/ui/empty-container/illustrations/empty-state-5.d.ts +3 -0
  19. package/dist/components/ui/empty-container/illustrations/empty-state-5.js +7 -0
  20. package/dist/components/ui/empty-container/illustrations/empty-state-6.d.ts +3 -0
  21. package/dist/components/ui/empty-container/illustrations/empty-state-6.js +7 -0
  22. package/dist/components/ui/empty-container.js +60 -53
  23. package/dist/components/ui/progress-bar.js +4 -0
  24. package/dist/index.d.ts +0 -56
  25. package/dist/index.js +153 -153
  26. package/dist/lib/virtualized/index.js +18 -0
  27. package/package.json +8 -1
@@ -1,7 +1,7 @@
1
1
  import { jsx as c, jsxs as V } from "react/jsx-runtime";
2
2
  import { Badge as j } from "../../badge.js";
3
- import { cn as w } from "../../../../lib/utils.js";
4
- import { Progress as $ } from "../../progress.js";
3
+ import { Progress as w } from "../../progress.js";
4
+ import { cn as $ } from "../../../../lib/utils.js";
5
5
  function E(e) {
6
6
  return e && typeof e == "object" && "value" in e ? e.value : e;
7
7
  }
@@ -28,7 +28,7 @@ const _ = (e) => {
28
28
  className: `w-full h-full flex items-center ag-cell-inner-padding ${b ?? ""} ${n ? "opacity-60 cursor-not-allowed" : t ? "in-ag-editable-cell-highlight" : ""}`,
29
29
  children: /* @__PURE__ */ V("div", { className: "flex w-full min-w-0 items-center gap-2", children: [
30
30
  /* @__PURE__ */ c("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ c(
31
- $,
31
+ w,
32
32
  {
33
33
  label: !1,
34
34
  variant: N,
@@ -47,7 +47,7 @@ const _ = (e) => {
47
47
  color: x,
48
48
  shape: p,
49
49
  size: "sm",
50
- className: w("shrink-0 tabular-nums leading-none", !i && "text-content-empty"),
50
+ className: $("shrink-0 tabular-nums leading-none", !i && "text-content-empty"),
51
51
  children: M
52
52
  }
53
53
  )
@@ -1,6 +1,7 @@
1
1
  import { AgGridWrapperProps } from '../types/ag-grid.types';
2
- export declare function AgGridWrapper<TData>({ children, defaultColDef, defaultColGroupDef, columnDefs, valueFormatters, onGridReady: userOnGridReady, onGridPreDestroyed: userOnGridPreDestroyed, onFilterChanged: userOnFilterChanged, onSelectionChanged: userOnSelectionChanged, onModelUpdated: userOnModelUpdated, ensureDomOrder, ...restProps }: AgGridWrapperProps<TData> & {
2
+ export declare function AgGridWrapper<TData>({ children, defaultColDef, defaultColGroupDef, columnDefs, valueFormatters, onGridReady: userOnGridReady, onGridPreDestroyed: userOnGridPreDestroyed, onFilterChanged: userOnFilterChanged, onSelectionChanged: userOnSelectionChanged, onModelUpdated: userOnModelUpdated, ensureDomOrder, autoSizeStrategy, ...restProps }: AgGridWrapperProps<TData> & {
3
3
  className?: string;
4
4
  }): import("react/jsx-runtime").JSX.Element;
5
5
  export default AgGridWrapper;
6
+ export { refreshGridAutoSizeStrategy } from './refreshGridAutoSizeStrategy';
6
7
  export { subscribeGridApiEvent, subscribeGridApiEvents } from './grid-api-event-subscription';
@@ -1,31 +1,33 @@
1
- import { jsxs as pe, jsx as v } from "react/jsx-runtime";
2
- import { lazy as fe, useRef as F, useState as w, useCallback as f, useMemo as y, useEffect as me, Suspense as ge } from "react";
3
- import { ModuleRegistry as he, AllCommunityModule as Ce, ValidationModule as ye } from "ag-grid-community";
4
- import { AllEnterpriseModule as ve } from "ag-grid-enterprise";
5
- import { AgGridReact as be } from "ag-grid-react";
6
- import { customAgGridTheme as xe } from "./theme.js";
7
- import { CustomHeader as Fe } from "./headers/custom-header.js";
8
- import { CustomHeaderGroup as Se } from "./headers/custom-header-group.js";
9
- import { DefaultTextCellRenderer as Me } from "./cell-renderers/default-text-cell-renderer.js";
10
- import { GridHeaderContext as Ee } from "./headers/context/grid-header-context.js";
11
- import { convertToAgGridFilterModel as Ae, getMultiFilterIndices as Re, convertFromAgGridFilterModel as Ge } from "./headers/utils/filter-utils.js";
12
- import { ColumnSettingsMenu as ke } from "./headers/column-menu/column-settings-menu.js";
13
- import { AG_GRID_VALUE_FORMATTERS as je } from "./value-formatters.js";
1
+ import { jsxs as fe, jsx as v } from "react/jsx-runtime";
2
+ import { lazy as me, useRef as F, useState as T, 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 Fe } from "./theme.js";
7
+ import { CustomHeader as Se } 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 Ge, getMultiFilterIndices as Re, 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 Te } from "./value-formatters.js";
14
+ import { useGridAutoSizeStrategyOnResize as we } from "./useGridAutoSizeStrategyOnResize.js";
14
15
  /* empty css */
15
- import { subscribeGridApiEvent as Qe, subscribeGridApiEvents as Ye } from "./grid-api-event-subscription.js";
16
- const Te = fe(() => import("./headers/advanced-filter/advanced-filter-dialog.js"));
17
- he.registerModules([Ce, ve, ye]);
18
- const S = "", D = "";
19
- function K(i) {
16
+ import { refreshGridAutoSizeStrategy as et } from "./refreshGridAutoSizeStrategy.js";
17
+ import { subscribeGridApiEvent as rt, subscribeGridApiEvents as nt } from "./grid-api-event-subscription.js";
18
+ const Pe = me(() => import("./headers/advanced-filter/advanced-filter-dialog.js"));
19
+ Ce.registerModules([ye, be, ve]);
20
+ const S = "", H = "";
21
+ function U(i) {
20
22
  return i.getColumns()?.some((n) => n.getColDef().headerCheckboxSelection) ?? !1;
21
23
  }
22
- const U = (i) => {
24
+ const W = (i) => {
23
25
  if (!i) return;
24
26
  const n = i.cellRendererParams?.splits;
25
27
  if (Array.isArray(n) && n.length > 0) return n;
26
28
  const l = i.cellEditorParams?.splits;
27
29
  if (Array.isArray(l) && l.length > 0) return l;
28
- }, W = (i, n) => {
30
+ }, z = (i, n) => {
29
31
  const l = [];
30
32
  for (const h of n) {
31
33
  const m = h?.field?.split(".").pop();
@@ -33,18 +35,18 @@ const U = (i) => {
33
35
  l.push("");
34
36
  continue;
35
37
  }
36
- const u = i[m];
37
- if (u == null) {
38
+ const a = i[m];
39
+ if (a == null) {
38
40
  l.push("");
39
41
  continue;
40
42
  }
41
- if (typeof u == "object" && "value" in u) {
42
- const c = u.value;
43
+ if (typeof a == "object" && "value" in a) {
44
+ const c = a.value;
43
45
  l.push(c == null ? "" : String(c));
44
46
  continue;
45
47
  }
46
- if (typeof u != "object") {
47
- l.push(String(u));
48
+ if (typeof a != "object") {
49
+ l.push(String(a));
48
50
  continue;
49
51
  }
50
52
  l.push("");
@@ -66,21 +68,24 @@ const U = (i) => {
66
68
  document.body.removeChild(n);
67
69
  }
68
70
  };
69
- function Je({
71
+ function Qe({
70
72
  children: i,
71
73
  defaultColDef: n,
72
74
  defaultColGroupDef: l,
73
75
  columnDefs: h,
74
76
  valueFormatters: m,
75
- onGridReady: u,
77
+ onGridReady: a,
76
78
  onGridPreDestroyed: c,
77
79
  onFilterChanged: b,
78
80
  onSelectionChanged: C,
79
81
  onModelUpdated: M,
80
- ensureDomOrder: P = !0,
82
+ ensureDomOrder: w = !0,
83
+ autoSizeStrategy: P,
81
84
  ...g
82
85
  }) {
83
- const a = F(null), E = F(null), [H, O] = w(null), [z, L] = w(!1), [J, N] = w(null), [X, _] = w(!1), A = F(null), I = F(null), R = F(null), B = f(() => [], []), Q = y(() => ({
86
+ const u = F(null), I = F(null), [D, L] = T(null);
87
+ we(D, I, P);
88
+ const [J, N] = T(!1), [X, _] = T(null), [B, V] = T(!1), E = F(null), O = F(null), A = F(null), Q = f(() => [], []), Y = y(() => ({
84
89
  numericColumn: {
85
90
  cellClass: "ag-right-aligned-cell",
86
91
  headerClass: "ag-right-aligned-header",
@@ -103,66 +108,66 @@ function Je({
103
108
  }
104
109
  }), []), G = y(() => ({
105
110
  openSearch: (e) => {
106
- if (!a.current) return;
107
- const t = a.current.getGridOption("context") || {};
108
- a.current.setGridOption("context", { ...t, activeSearchColumnId: e }), a.current.refreshHeader();
111
+ if (!u.current) return;
112
+ const t = u.current.getGridOption("context") || {};
113
+ u.current.setGridOption("context", { ...t, activeSearchColumnId: e }), u.current.refreshHeader();
109
114
  },
110
115
  closeSearch: () => {
111
- if (!a.current) return;
112
- const e = a.current.getGridOption("context") || {};
113
- a.current.setGridOption("context", { ...e, activeSearchColumnId: null }), a.current.refreshHeader();
116
+ if (!u.current) return;
117
+ const e = u.current.getGridOption("context") || {};
118
+ u.current.setGridOption("context", { ...e, activeSearchColumnId: null }), u.current.refreshHeader();
114
119
  },
115
120
  openAdvancedFilter: (e) => {
116
- N(e || null), L(!0);
121
+ _(e || null), N(!0);
117
122
  },
118
123
  closeAdvancedFilter: () => {
119
- L(!1), N(null);
124
+ N(!1), _(null);
120
125
  },
121
126
  applyAdvancedFilter: (e) => {
122
- if (!a.current) return;
123
- const t = Ae(e);
124
- a.current.setFilterModel(t), a.current.onFilterChanged(), a.current.refreshHeader();
127
+ if (!u.current) return;
128
+ const t = Ge(e);
129
+ u.current.setFilterModel(t), u.current.onFilterChanged(), u.current.refreshHeader();
125
130
  },
126
131
  openMenu: (e, t, o = "column") => {
127
- A.current = e, I.current = t, R.current = o, _(!0);
132
+ E.current = e, O.current = t, A.current = o, V(!0);
128
133
  },
129
134
  closeMenu: () => {
130
- A.current = null, I.current = null, R.current = null, _(!1);
135
+ E.current = null, O.current = null, A.current = null, V(!1);
131
136
  },
132
137
  // Getters read from refs - O(1) per header, no memory allocation
133
138
  get activeMenuColumnId() {
134
- return A.current;
139
+ return E.current;
135
140
  },
136
141
  get activeMenuVariant() {
137
- return R.current;
142
+ return A.current;
138
143
  }
139
- }), []), Y = f((e) => {
140
- a.current = e.api, O(e.api);
144
+ }), []), Z = f((e) => {
145
+ u.current = e.api, L(e.api);
141
146
  const t = e.api.getGridOption("context") || {};
142
- e.api.setGridOption("context", { ...t, activeSearchColumnId: null }), u && u(e);
143
- }, [u]), Z = f(
147
+ e.api.setGridOption("context", { ...t, activeSearchColumnId: null }), a && a(e);
148
+ }, [a]), ee = f(
144
149
  (e) => {
145
- a.current = null, O(null), c?.(e);
150
+ u.current = null, L(null), c?.(e);
146
151
  },
147
152
  [c]
148
- ), ee = f(
153
+ ), te = f(
149
154
  (e) => {
150
155
  e.api.refreshHeader(), b?.(e);
151
156
  },
152
157
  [b]
153
- ), te = f(
158
+ ), re = f(
154
159
  (e) => {
155
- K(e.api) && e.api.refreshHeader(), C?.(e);
160
+ U(e.api) && e.api.refreshHeader(), C?.(e);
156
161
  },
157
162
  [C]
158
- ), re = f(
163
+ ), ne = f(
159
164
  (e) => {
160
- e.api.getGridOption("rowModelType") !== "serverSide" && K(e.api) && e.api.refreshHeader(), M?.(e);
165
+ e.api.getGridOption("rowModelType") !== "serverSide" && U(e.api) && e.api.refreshHeader(), M?.(e);
161
166
  },
162
167
  [M]
163
168
  );
164
- me(() => {
165
- const e = E.current;
169
+ ge(() => {
170
+ const e = I.current;
166
171
  if (!e) return;
167
172
  const t = (o) => {
168
173
  if (o.key !== "Enter" && o.key !== " ") return;
@@ -175,12 +180,12 @@ function Je({
175
180
  };
176
181
  return e.addEventListener("keydown", t, !0), () => e.removeEventListener("keydown", t, !0);
177
182
  }, []);
178
- const ne = y(() => ({
179
- headerComponent: Fe,
183
+ const oe = y(() => ({
184
+ headerComponent: Se,
180
185
  // Default cell renderer wraps text in a span so display:flex centering
181
186
  // and text-overflow:ellipsis both work (ellipsis doesn't work on
182
187
  // anonymous flex text nodes, but works on flex child elements).
183
- cellRenderer: Me,
188
+ cellRenderer: Ee,
184
189
  ...n,
185
190
  suppressHeaderKeyboardEvent: (e) => {
186
191
  const { event: t } = e, o = t.target;
@@ -199,34 +204,34 @@ function Je({
199
204
  headerComponentParams: {
200
205
  ...n?.headerComponentParams
201
206
  }
202
- }), [n]), oe = y(() => ({
203
- headerGroupComponent: Se,
207
+ }), [n]), le = y(() => ({
208
+ headerGroupComponent: Me,
204
209
  ...l,
205
210
  headerGroupComponentParams: {
206
211
  ...l?.headerGroupComponentParams
207
212
  }
208
- }), [l]), le = y(() => ({
209
- ...je,
213
+ }), [l]), ie = y(() => ({
214
+ ...Te,
210
215
  // Always available - value formatters
211
216
  ...g.components,
212
217
  // User components override
213
218
  ...m
214
219
  // Optional custom formatters override defaults
215
- }), [m, g.components]), ie = f((e) => {
220
+ }), [m, g.components]), se = f((e) => {
216
221
  const t = e.value;
217
222
  if (t == null || typeof t != "object") return t;
218
- const o = U(e.column?.getColDef());
223
+ const o = W(e.column?.getColDef());
219
224
  if (o && o.length > 0) {
220
- const r = W(t, o);
225
+ const r = z(t, o);
221
226
  if (o.length === 1) {
222
227
  const d = o[0]?.field?.split(".").pop(), x = d ? t[d] : void 0;
223
228
  return x && typeof x == "object" && "value" in x ? x.value ?? "" : r[0];
224
229
  }
225
- return D + r.join(S);
230
+ return H + r.join(S);
226
231
  }
227
232
  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);
228
233
  return s.length === 0 ? "" : s.length === 1 ? s[0] : s.join(S);
229
- }, []), se = f((e) => {
234
+ }, []), ue = f((e) => {
230
235
  if (typeof e.value == "string") {
231
236
  const t = e.value.trim();
232
237
  if (t.startsWith("{") || t.startsWith("["))
@@ -239,7 +244,7 @@ function Je({
239
244
  return e.value;
240
245
  }, []), ae = f((e) => {
241
246
  const t = e?.data ?? "";
242
- if (!t.includes(S) && !t.includes(D)) {
247
+ if (!t.includes(S) && !t.includes(H)) {
243
248
  $(t);
244
249
  return;
245
250
  }
@@ -251,25 +256,25 @@ function Je({
251
256
  o.push("");
252
257
  continue;
253
258
  }
254
- const j = d.split(" ").map((p) => p.startsWith(D) ? { isSplit: !0, slots: p.slice(1).split(S) } : { isSplit: !1, slots: p.split(S) }), V = Math.max(1, ...j.map((p) => p.slots.length));
255
- if (V === 1) {
256
- o.push(j.map((p) => p.slots[0] ?? "").join(" "));
259
+ const k = d.split(" ").map((p) => p.startsWith(H) ? { isSplit: !0, slots: p.slice(1).split(S) } : { isSplit: !1, slots: p.split(S) }), K = Math.max(1, ...k.map((p) => p.slots.length));
260
+ if (K === 1) {
261
+ o.push(k.map((p) => p.slots[0] ?? "").join(" "));
257
262
  continue;
258
263
  }
259
- for (let p = 0; p < V; p++) {
260
- const de = j.map((T) => !T.isSplit && T.slots.length === 1 ? T.slots[0] : T.slots[p] ?? "");
261
- o.push(de.join(" "));
264
+ for (let p = 0; p < K; p++) {
265
+ const pe = k.map((j) => !j.isSplit && j.slots.length === 1 ? j.slots[0] : j.slots[p] ?? "");
266
+ o.push(pe.join(" "));
262
267
  }
263
268
  }
264
269
  $(o.join(`
265
270
  `));
266
- }, []), k = f((e) => {
271
+ }, []), R = f((e) => {
267
272
  const t = e.value;
268
273
  if (t == null) return "";
269
274
  if (typeof t != "object") return String(t);
270
- const o = U(e.column?.getColDef());
275
+ const o = W(e.column?.getColDef());
271
276
  if (o && o.length > 0) {
272
- const r = W(t, o);
277
+ const r = z(t, o);
273
278
  return o.length === 1 ? r[0] : r.join(`
274
279
  `);
275
280
  }
@@ -285,67 +290,68 @@ function Je({
285
290
  }
286
291
  return s.length === 0 ? "" : s.length === 1 ? s[0] : s.join(`
287
292
  `);
288
- }, []), ue = y(() => ({
289
- processCellCallback: k,
293
+ }, []), ce = y(() => ({
294
+ processCellCallback: R,
290
295
  ...g.defaultCsvExportParams ?? {}
291
- }), [k, g.defaultCsvExportParams]), ce = y(() => ({
292
- processCellCallback: k,
296
+ }), [R, g.defaultCsvExportParams]), de = y(() => ({
297
+ processCellCallback: R,
293
298
  ...g.defaultExcelExportParams ?? {}
294
- }), [k, g.defaultExcelExportParams]);
295
- return /* @__PURE__ */ pe(Ee.Provider, { value: G, children: [
296
- /* @__PURE__ */ v("div", { ref: E, style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ v(
297
- be,
299
+ }), [R, g.defaultExcelExportParams]);
300
+ return /* @__PURE__ */ fe(Ae.Provider, { value: G, children: [
301
+ /* @__PURE__ */ v("div", { ref: I, style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ v(
302
+ xe,
298
303
  {
299
- theme: xe,
300
- defaultColDef: ne,
304
+ theme: Fe,
305
+ defaultColDef: oe,
301
306
  columnDefs: h,
302
307
  cellSelection: !0,
303
- defaultColGroupDef: oe,
304
- onGridReady: Y,
305
- onGridPreDestroyed: Z,
306
- onFilterChanged: ee,
307
- onSelectionChanged: te,
308
- onModelUpdated: re,
309
- components: le,
310
- processCellForClipboard: ie,
311
- processCellFromClipboard: se,
308
+ defaultColGroupDef: le,
309
+ onGridReady: Z,
310
+ onGridPreDestroyed: ee,
311
+ onFilterChanged: te,
312
+ onSelectionChanged: re,
313
+ onModelUpdated: ne,
314
+ components: ie,
315
+ processCellForClipboard: se,
316
+ processCellFromClipboard: ue,
312
317
  sendToClipboard: ae,
313
- ensureDomOrder: P,
318
+ ensureDomOrder: w,
314
319
  suppressHeaderFocus: !1,
315
320
  suppressFocusAfterRefresh: !0,
316
321
  suppressGroupRowsSticky: !0,
317
- columnTypes: Q,
322
+ columnTypes: Y,
323
+ autoSizeStrategy: P,
318
324
  ...g,
319
- defaultCsvExportParams: ue,
320
- defaultExcelExportParams: ce,
321
- getMainMenuItems: B
325
+ defaultCsvExportParams: ce,
326
+ defaultExcelExportParams: de,
327
+ getMainMenuItems: Q
322
328
  }
323
329
  ) }),
324
330
  i,
325
331
  /* @__PURE__ */ v(
326
- we,
332
+ Ie,
327
333
  {
328
- isOpen: z,
329
- columnId: J,
330
- gridApi: H,
334
+ isOpen: J,
335
+ columnId: X,
336
+ gridApi: D,
331
337
  onClose: G.closeAdvancedFilter,
332
338
  onApply: G.applyAdvancedFilter
333
339
  }
334
340
  ),
335
341
  /* @__PURE__ */ v(
336
- Pe,
342
+ De,
337
343
  {
338
- isOpen: X,
339
- columnId: A.current,
340
- gridApi: H,
341
- anchor: I.current,
342
- variant: R.current,
344
+ isOpen: B,
345
+ columnId: E.current,
346
+ gridApi: D,
347
+ anchor: O.current,
348
+ variant: A.current,
343
349
  onClose: G.closeMenu
344
350
  }
345
351
  )
346
352
  ] });
347
353
  }
348
- function we({
354
+ function Ie({
349
355
  isOpen: i,
350
356
  columnId: n,
351
357
  gridApi: l,
@@ -353,48 +359,49 @@ function we({
353
359
  onApply: m
354
360
  }) {
355
361
  if (!i || !n || !l) return null;
356
- const u = l.getColumn(n);
357
- if (!u) return null;
358
- const c = u.getColDef(), b = c.headerComponentParams, C = Re(c), M = C.text !== -1 || C.number !== -1 || C.date !== -1, P = C.set !== -1, a = c.filter === "agMultiColumnFilter" && (M || P) ? "multi" : c.filter === "agNumberColumnFilter" ? "number" : c.filter === "agDateColumnFilter" ? "date" : c.filter === "agSetColumnFilter" || b?.selectOptions ? "select" : "text", E = Ge(l.getFilterModel());
359
- return /* @__PURE__ */ v(ge, { fallback: null, children: /* @__PURE__ */ v(
360
- Te,
362
+ const a = l.getColumn(n);
363
+ if (!a) return null;
364
+ const c = a.getColDef(), b = c.headerComponentParams, C = Re(c), M = C.text !== -1 || C.number !== -1 || C.date !== -1, w = C.set !== -1, g = c.filter === "agMultiColumnFilter" && (M || w) ? "multi" : c.filter === "agNumberColumnFilter" ? "number" : c.filter === "agDateColumnFilter" ? "date" : c.filter === "agSetColumnFilter" || b?.selectOptions ? "select" : "text", u = ke(l.getFilterModel());
365
+ return /* @__PURE__ */ v(he, { fallback: null, children: /* @__PURE__ */ v(
366
+ Pe,
361
367
  {
362
368
  isOpen: i,
363
369
  onClose: h,
364
370
  onApply: m,
365
371
  columnId: n,
366
372
  columnLabel: c.headerName || n,
367
- columnType: a,
373
+ columnType: g,
368
374
  selectOptions: b?.selectOptions,
369
375
  isMultiSelect: b?.isMultiSelect,
370
- initialModel: E,
376
+ initialModel: u,
371
377
  api: l
372
378
  }
373
379
  ) });
374
380
  }
375
- function Pe({
381
+ function De({
376
382
  isOpen: i,
377
383
  columnId: n,
378
384
  gridApi: l,
379
385
  anchor: h,
380
386
  variant: m,
381
- onClose: u
387
+ onClose: a
382
388
  }) {
383
389
  return !i || !n || !l ? null : /* @__PURE__ */ v(
384
- ke,
390
+ je,
385
391
  {
386
392
  isOpen: i,
387
393
  columnId: n,
388
394
  gridApi: l,
389
395
  anchor: h,
390
396
  variant: m || "column",
391
- onClose: u
397
+ onClose: a
392
398
  }
393
399
  );
394
400
  }
395
401
  export {
396
- Je as AgGridWrapper,
397
- Je as default,
398
- Qe as subscribeGridApiEvent,
399
- Ye as subscribeGridApiEvents
402
+ Qe as AgGridWrapper,
403
+ Qe as default,
404
+ et as refreshGridAutoSizeStrategy,
405
+ rt as subscribeGridApiEvent,
406
+ nt as subscribeGridApiEvents
400
407
  };
@@ -0,0 +1,7 @@
1
+ import { GridApi } from 'ag-grid-community';
2
+ /**
3
+ * Re-run the grid's configured `autoSizeStrategy` after the container width changes.
4
+ * Accordion panels, tabs, and deferred layout can leave columns sized against a
5
+ * stale width when `scaleUpToFitGridWidth` is enabled.
6
+ */
7
+ export declare function refreshGridAutoSizeStrategy(api: GridApi): void;
@@ -0,0 +1,30 @@
1
+ function o(i) {
2
+ if (i.isDestroyed())
3
+ return;
4
+ const t = i.getGridOption("autoSizeStrategy");
5
+ if (!t)
6
+ return;
7
+ if (t.type === "fitGridWidth") {
8
+ i.sizeColumnsToFit({
9
+ defaultMinWidth: t.defaultMinWidth,
10
+ defaultMaxWidth: t.defaultMaxWidth,
11
+ columnLimits: t.columnLimits?.map((e) => ({
12
+ key: e.colId,
13
+ minWidth: e.minWidth,
14
+ maxWidth: e.maxWidth
15
+ }))
16
+ });
17
+ return;
18
+ }
19
+ if (t.type === "fitProvidedWidth") {
20
+ i.sizeColumnsToFit(t.width);
21
+ return;
22
+ }
23
+ const d = (e) => {
24
+ i.setGridOption("autoSizeStrategy", e);
25
+ };
26
+ d(void 0), d(t);
27
+ }
28
+ export {
29
+ o as refreshGridAutoSizeStrategy
30
+ };
@@ -0,0 +1,7 @@
1
+ import { RefObject } from 'react';
2
+ import { AutoSizeStrategy, GridApi } from 'ag-grid-community';
3
+ /**
4
+ * Keeps `autoSizeStrategy` in sync when the grid container width changes
5
+ * (accordion expand, viewport expand, responsive layout, etc.).
6
+ */
7
+ export declare function useGridAutoSizeStrategyOnResize(gridApi: GridApi | null, containerRef: RefObject<HTMLElement | null>, autoSizeStrategy: AutoSizeStrategy | undefined): void;
@@ -0,0 +1,33 @@
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";
4
+ function v(e, s, o) {
5
+ a(() => {
6
+ if (!e || !o)
7
+ return;
8
+ const t = s.current;
9
+ if (!t)
10
+ return;
11
+ let n = 0, r = 0;
12
+ const c = () => {
13
+ cancelAnimationFrame(r), r = requestAnimationFrame(() => {
14
+ e.isDestroyed() || f(e);
15
+ });
16
+ }, m = new ResizeObserver(() => {
17
+ const i = t.clientWidth;
18
+ i <= 0 || i === n || (n = i, c());
19
+ });
20
+ n = t.clientWidth, m.observe(t);
21
+ const u = l(
22
+ e,
23
+ ["columnVisible", "displayedColumnsChanged"],
24
+ c
25
+ );
26
+ return () => {
27
+ cancelAnimationFrame(r), m.disconnect(), u();
28
+ };
29
+ }, [e, s, o]);
30
+ }
31
+ export {
32
+ v as useGridAutoSizeStrategyOnResize
33
+ };
@@ -1,31 +1,15 @@
1
- export declare const EmptyState1: import('impact-nova-icons').ImageComponent;
2
- export declare const EmptyState2: import('impact-nova-icons').ImageComponent;
3
- export declare const EmptyState3: import('impact-nova-icons').ImageComponent;
4
- export declare const EmptyState4: import('impact-nova-icons').ImageComponent;
5
- export declare const EmptyState5: import('impact-nova-icons').ImageComponent;
6
- export declare const EmptyState6: import('impact-nova-icons').ImageComponent;
7
- export declare const EMPTY_STATE_IMAGES: readonly [{
8
- readonly Component: import('impact-nova-icons').ImageComponent;
9
- readonly width: 225;
10
- readonly height: 150;
11
- }, {
12
- readonly Component: import('impact-nova-icons').ImageComponent;
13
- readonly width: 200;
14
- readonly height: 200;
15
- }, {
16
- readonly Component: import('impact-nova-icons').ImageComponent;
17
- readonly width: 225;
18
- readonly height: 150;
19
- }, {
20
- readonly Component: import('impact-nova-icons').ImageComponent;
21
- readonly width: 250;
22
- readonly height: 180;
23
- }, {
24
- readonly Component: import('impact-nova-icons').ImageComponent;
25
- readonly width: 225;
26
- readonly height: 150;
27
- }, {
28
- readonly Component: import('impact-nova-icons').ImageComponent;
29
- readonly width: 225;
30
- readonly height: 150;
31
- }];
1
+ import { ImageComponent } from 'impact-nova-icons';
2
+ export interface EmptyStateImageEntry {
3
+ width: number;
4
+ height: number;
5
+ load: () => Promise<{
6
+ Component: ImageComponent;
7
+ }>;
8
+ }
9
+ export declare const EMPTY_STATE_IMAGES: EmptyStateImageEntry[];
10
+ export { default as EmptyState1 } from './illustrations/empty-state-1';
11
+ export { default as EmptyState2 } from './illustrations/empty-state-2';
12
+ export { default as EmptyState3 } from './illustrations/empty-state-3';
13
+ export { default as EmptyState4 } from './illustrations/empty-state-4';
14
+ export { default as EmptyState5 } from './illustrations/empty-state-5';
15
+ export { default as EmptyState6 } from './illustrations/empty-state-6';