impact-nova 3.0.0-alpha.13 → 3.0.0-alpha.15

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 (42) hide show
  1. package/dist/components/data/ag-grid-react/ag-grid-list.d.ts +3 -1
  2. package/dist/components/data/ag-grid-react/ag-grid-list.demo-board.d.ts +46 -0
  3. package/dist/components/data/ag-grid-react/ag-grid-list.js +9 -8
  4. package/dist/components/data/ag-grid-react/ag-grid-list.key-attributes.d.ts +1 -0
  5. package/dist/components/data/ag-grid-react/ag-grid.types.d.ts +50 -3
  6. package/dist/components/data/ag-grid-react/build-list-drag-column-defs.d.ts +8 -0
  7. package/dist/components/data/ag-grid-react/build-list-drag-column-defs.js +28 -0
  8. package/dist/components/data/ag-grid-react/cell-renderers/drag-handle-cell-renderer.d.ts +18 -0
  9. package/dist/components/data/ag-grid-react/cell-renderers/drag-handle-cell-renderer.js +32 -0
  10. package/dist/components/data/ag-grid-react/cell-renderers/editors/list-select-cell-editor.js +66 -55
  11. package/dist/components/data/ag-grid-react/index.d.ts +5 -1
  12. package/dist/components/data/ag-grid-react/index.js +250 -201
  13. package/dist/components/data/ag-grid-react/list-drag-grid-options.d.ts +21 -0
  14. package/dist/components/data/ag-grid-react/list-drag-grid-options.js +46 -0
  15. package/dist/components/data/ag-grid-react/list-row-move.d.ts +84 -0
  16. package/dist/components/data/ag-grid-react/list-row-move.js +74 -0
  17. package/dist/components/data/ag-grid-react/use-ag-grid-list-drag.d.ts +59 -0
  18. package/dist/components/data/ag-grid-react/use-ag-grid-list-drag.js +139 -0
  19. package/dist/components/data/ag-grid-react/use-list-drag-preview.d.ts +17 -0
  20. package/dist/components/data/ag-grid-react/use-list-drag-preview.js +49 -0
  21. package/dist/components/data/ag-grid-react/use-list-row-drop-zones.d.ts +44 -0
  22. package/dist/components/data/ag-grid-react/use-list-row-drop-zones.js +73 -0
  23. package/dist/components/data/data-table/data-table-list-header.d.ts +7 -0
  24. package/dist/components/data/data-table/data-table-list-header.js +31 -0
  25. package/dist/components/data/data-table/data-table.js +35 -34
  26. package/dist/components/data/data-table/data-table.types.d.ts +12 -2
  27. package/dist/components/data/data-table/index.d.ts +6 -0
  28. package/dist/components/data/data-table/index.js +63 -57
  29. package/dist/components/forms/choice-card/choice-card.js +99 -97
  30. package/dist/components/forms/choice-card/choice-card.variants.js +22 -1
  31. package/dist/components/primitives/iris/iris.js +20 -18
  32. package/dist/impact-nova-components.css +71 -0
  33. package/dist/impact-nova-tokens.scss +2 -0
  34. package/dist/impact-nova.css +1 -1
  35. package/dist/index.js +314 -308
  36. package/dist/llms/rules/ag-grid.js +1 -1
  37. package/dist/llms/rules/installation.js +1 -1
  38. package/dist/llms/rules/real-world-patterns.js +1 -1
  39. package/dist/llms/rules/requirements.js +1 -1
  40. package/dist/tailwind.config.js +3 -0
  41. package/dist/theme/tailwind-colors.js +3 -0
  42. package/package.json +1 -1
@@ -1,111 +1,121 @@
1
- import { jsxs as Ee, jsx as S } from "react/jsx-runtime";
2
- import { lazy as Ge, useRef as O, useState as _, useId as Re, useEffect as B, useCallback as m, useMemo as h, Suspense as we } from "react";
3
- import { ModuleRegistry as Me, AllCommunityModule as Te } from "ag-grid-community";
4
- import { AllEnterpriseModule as De } from "ag-grid-enterprise";
5
- import { AgGridReact as Ie } from "ag-grid-react";
6
- import { customAgGridTheme as ke } from "./theme.js";
7
- import { AG_GRID_LIST_ROW_HEIGHT_PX as je, customAgGridListTheme as He } from "./ag-grid-list.js";
8
- import { syncAgGridThemeMode as Pe } from "./sync-ag-grid-theme-mode.js";
9
- import { CustomHeader as Le } from "./headers/custom-header.js";
10
- import { CustomHeaderGroup as Q } from "./headers/custom-inner-header-group.js";
11
- import { mergeColumnGroupDefsWithDefault as Oe } from "./merge-column-group-defs.js";
12
- import { DefaultTextCellRenderer as _e } from "./cell-renderers/default-text-cell-renderer.js";
13
- import { GridHeaderContext as Ne } from "./headers/context/grid-header-context.js";
14
- import { convertToAgGridFilterModel as Ve, getMultiFilterIndices as We, convertFromAgGridFilterModel as $e } from "./headers/utils/filter-utils.js";
15
- import { AG_GRID_VALUE_FORMATTERS as Ke } from "./value-formatters.js";
16
- import { useGridAutoSizeStrategyOnResize as Ue } from "./useGridAutoSizeStrategyOnResize.js";
17
- import { subscribeGridApiEvent as Ct, subscribeGridApiEvents as vt } from "./grid-api-event-subscription.js";
18
- import { notifyColumnIndicatorSync as R } from "./notify-column-indicator-sync.js";
19
- import { setActiveSearchColumnId as N, clearHeaderSearchActiveState as qe } from "./headers/header-search-active-state.js";
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";
20
22
  /* empty css */
21
- import { useAgGridTruncationTooltip as bt } from "./use-ag-grid-truncation-tooltip.js";
22
- import { isAgGridHeaderLabelTooltipOverflowing as Ft, isAgGridTextOverflowing as St } from "./ag-grid-tooltip-overflow.js";
23
- const ze = Ge(
24
- () => import("./headers/advanced-filter/advanced-filter-dialog.js").then((c) => ({
25
- default: c.AdvancedFilterDialog
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
26
29
  }))
27
30
  );
28
- Me.registerModules([Te, De]);
29
- const F = "", V = "", Y = (c) => {
30
- if (!c) return;
31
- const n = c.cellRendererParams?.splits;
31
+ Ke.registerModules([$e, Ue]);
32
+ const S = "", V = "", Q = (s) => {
33
+ if (!s) return;
34
+ const n = s.cellRendererParams?.splits;
32
35
  if (Array.isArray(n) && n.length > 0) return n;
33
- const s = c.cellEditorParams?.splits;
34
- if (Array.isArray(s) && s.length > 0) return s;
35
- }, Z = (c, n) => {
36
- const s = [];
37
- for (const b of n) {
38
- const C = b?.field?.split(".").pop();
39
- if (!C) {
40
- s.push("");
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("");
41
44
  continue;
42
45
  }
43
- const u = c[C];
44
- if (u == null) {
45
- s.push("");
46
+ const d = s[v];
47
+ if (d == null) {
48
+ a.push("");
46
49
  continue;
47
50
  }
48
- if (typeof u == "object" && "value" in u) {
49
- const d = u.value;
50
- s.push(d == null ? "" : String(d));
51
+ if (typeof d == "object" && "value" in d) {
52
+ const p = d.value;
53
+ a.push(p == null ? "" : String(p));
51
54
  continue;
52
55
  }
53
- if (typeof u != "object") {
54
- s.push(String(u));
56
+ if (typeof d != "object") {
57
+ a.push(String(d));
55
58
  continue;
56
59
  }
57
- s.push("");
60
+ a.push("");
58
61
  }
59
- return s;
60
- }, ee = (c) => {
62
+ return a;
63
+ }, ee = (s) => {
61
64
  if (typeof navigator < "u" && navigator.clipboard?.writeText) {
62
- navigator.clipboard.writeText(c).catch(() => te(c));
65
+ navigator.clipboard.writeText(s).catch(() => te(s));
63
66
  return;
64
67
  }
65
- te(c);
66
- }, te = (c) => {
68
+ te(s);
69
+ }, te = (s) => {
67
70
  if (typeof document > "u") return;
68
71
  const n = document.createElement("textarea");
69
- n.value = c, 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
+ 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);
70
73
  try {
71
74
  n.select(), document.execCommand("copy");
72
75
  } finally {
73
76
  document.body.removeChild(n);
74
77
  }
75
78
  };
76
- function ft({
77
- children: c,
79
+ function Mt({
80
+ children: s,
78
81
  defaultColDef: n,
79
- defaultColGroupDef: s,
80
- columnDefs: b,
81
- valueFormatters: C,
82
- onGridReady: u,
83
- onGridPreDestroyed: d,
82
+ defaultColGroupDef: a,
83
+ columnDefs: C,
84
+ valueFormatters: v,
85
+ onGridReady: d,
86
+ onGridPreDestroyed: p,
84
87
  onFilterChanged: x,
85
- onSelectionChanged: v,
86
- onModelUpdated: A,
87
- ensureDomOrder: w = !1,
88
- autoSizeStrategy: M,
89
- tooltipShowMode: T = "whenTruncated",
90
- tooltipShowDelay: D = 500,
88
+ onSelectionChanged: y,
89
+ onModelUpdated: F,
90
+ ensureDomOrder: M = !1,
91
+ autoSizeStrategy: T,
92
+ tooltipShowMode: I = "whenTruncated",
93
+ tooltipShowDelay: L = 500,
91
94
  tooltipHideDelay: re = 5e3,
92
95
  tooltipInteraction: ne = !0,
93
96
  themeOverride: oe,
94
97
  variant: W = "table",
95
- rowLoading: le = !1,
96
- className: $,
97
- ...f
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
98
108
  }) {
99
- const a = O(null), I = O(null), [K, U] = _(null), q = Re(), y = O(q);
100
- y.current = q, Ue(K, I, M), B(() => {
109
+ const u = _(null), R = _(null), [$, U] = P(null), q = Ve(), b = _(q);
110
+ b.current = q, it($, R, T), Z(() => {
101
111
  const e = document.documentElement, t = () => {
102
- Pe(e.classList.contains("dark") ? "dark" : "light", e);
112
+ Be(e.classList.contains("dark") ? "dark" : "light", e);
103
113
  };
104
114
  t();
105
115
  const o = new MutationObserver(t);
106
116
  return o.observe(e, { attributes: !0, attributeFilter: ["class"] }), () => o.disconnect();
107
117
  }, []);
108
- const [ie, z] = _(!1), [se, X] = _(null), ce = m(() => [], []), ae = h(() => ({
118
+ const [me, z] = P(!1), [fe, X] = P(null), ge = f(() => [], []), he = h(() => ({
109
119
  numericColumn: {
110
120
  cellClass: "ag-right-aligned-cell",
111
121
  headerClass: "ag-right-aligned-header",
@@ -127,16 +137,16 @@ function ft({
127
137
  filter: "agDateColumnFilter"
128
138
  }
129
139
  }), []), k = h(() => ({
130
- gridScopeId: y.current,
140
+ gridScopeId: b.current,
131
141
  openSearch: (e) => {
132
- if (!a.current) return;
133
- const t = a.current.getGridOption("context") || {};
134
- a.current.setGridOption("context", { ...t, activeSearchColumnId: e }), N(y.current, e), R(a.current);
142
+ if (!u.current) return;
143
+ const t = u.current.getGridOption("context") || {};
144
+ u.current.setGridOption("context", { ...t, activeSearchColumnId: e }), N(b.current, e), D(u.current);
135
145
  },
136
146
  closeSearch: () => {
137
- if (!a.current) return;
138
- const e = a.current.getGridOption("context") || {};
139
- a.current.setGridOption("context", { ...e, activeSearchColumnId: null }), N(y.current, null), R(a.current);
147
+ if (!u.current) return;
148
+ const e = u.current.getGridOption("context") || {};
149
+ u.current.setGridOption("context", { ...e, activeSearchColumnId: null }), N(b.current, null), D(u.current);
140
150
  },
141
151
  openAdvancedFilter: (e) => {
142
152
  X(e || null), z(!0);
@@ -145,41 +155,41 @@ function ft({
145
155
  z(!1), X(null);
146
156
  },
147
157
  applyAdvancedFilter: (e) => {
148
- if (!a.current) return;
149
- const t = Ve(e);
150
- a.current.setFilterModel(t), a.current.onFilterChanged(), R(a.current);
158
+ if (!u.current) return;
159
+ const t = rt(e);
160
+ u.current.setFilterModel(t), u.current.onFilterChanged(), D(u.current);
151
161
  }
152
- }), []), ue = m((e) => {
153
- a.current = e.api, U(e.api);
162
+ }), []), Ce = f((e) => {
163
+ u.current = e.api, U(e.api);
154
164
  const t = e.api.getGridOption("context") || {};
155
165
  e.api.setGridOption("context", {
156
166
  ...t,
157
167
  activeSearchColumnId: null,
158
- headerSearchScopeId: y.current
159
- }), N(y.current, null), u && u(e);
160
- }, [u]), de = m(
168
+ headerSearchScopeId: b.current
169
+ }), N(b.current, null), d && d(e);
170
+ }, [d]), ve = f(
161
171
  (e) => {
162
- qe(y.current), a.current = null, U(null), d?.(e);
172
+ at(b.current), u.current = null, U(null), p?.(e);
163
173
  },
164
- [d]
165
- ), pe = m(
174
+ [p]
175
+ ), ye = f(
166
176
  (e) => {
167
- R(e.api), x?.(e);
177
+ D(e.api), x?.(e);
168
178
  },
169
179
  [x]
170
- ), me = m(
180
+ ), be = f(
171
181
  (e) => {
172
- v?.(e);
182
+ y?.(e);
173
183
  },
174
- [v]
175
- ), fe = m(
184
+ [y]
185
+ ), xe = f(
176
186
  (e) => {
177
- A?.(e);
187
+ F?.(e);
178
188
  },
179
- [A]
189
+ [F]
180
190
  );
181
- B(() => {
182
- const e = I.current;
191
+ Z(() => {
192
+ const e = R.current;
183
193
  if (!e) return;
184
194
  const t = (o) => {
185
195
  if (o.key !== "Enter" && o.key !== " ") return;
@@ -192,12 +202,12 @@ function ft({
192
202
  };
193
203
  return e.addEventListener("keydown", t, !0), () => e.removeEventListener("keydown", t, !0);
194
204
  }, []);
195
- const ge = h(() => ({
196
- headerComponent: Le,
205
+ const Se = h(() => ({
206
+ headerComponent: Qe,
197
207
  // Default cell renderer wraps text in a span so display:flex centering
198
208
  // and text-overflow:ellipsis both work (ellipsis doesn't work on
199
209
  // anonymous flex text nodes, but works on flex child elements).
200
- cellRenderer: _e,
210
+ cellRenderer: et,
201
211
  ...n,
202
212
  suppressHeaderKeyboardEvent: (e) => {
203
213
  const { event: t } = e, o = t.target;
@@ -216,41 +226,41 @@ function ft({
216
226
  headerComponentParams: {
217
227
  ...n?.headerComponentParams
218
228
  }
219
- }), [n]), j = h(() => ({
220
- ...s,
229
+ }), [n]), H = h(() => ({
230
+ ...a,
221
231
  headerGroupComponentParams: {
222
- ...s?.headerGroupComponentParams,
223
- innerHeaderGroupComponent: s?.headerGroupComponentParams?.innerHeaderGroupComponent ?? "CustomInnerHeaderGroup"
232
+ ...a?.headerGroupComponentParams,
233
+ innerHeaderGroupComponent: a?.headerGroupComponentParams?.innerHeaderGroupComponent ?? "CustomInnerHeaderGroup"
224
234
  }
225
- }), [s]), he = h(
226
- () => Oe(b ?? void 0, j),
227
- [b, j]
228
- ), Ce = h(() => ({
229
- ...Ke,
235
+ }), [a]), we = h(
236
+ () => Ye(C ?? void 0, H),
237
+ [C, H]
238
+ ), Fe = h(() => ({
239
+ ...lt,
230
240
  // Always available - value formatters
231
- CustomInnerHeaderGroup: Q,
232
- CustomHeaderGroup: Q,
233
- ...f.components,
241
+ CustomInnerHeaderGroup: B,
242
+ CustomHeaderGroup: B,
243
+ ...c.components,
234
244
  // User components override
235
- ...C
245
+ ...v
236
246
  // Optional custom formatters override defaults
237
- }), [C, f.components]), ve = m((e) => {
247
+ }), [v, c.components]), Re = f((e) => {
238
248
  const t = e.value;
239
249
  if (t != null && typeof t == "object") {
240
- const i = Y(e.column?.getColDef());
250
+ const i = Q(e.column?.getColDef());
241
251
  if (i && i.length > 0) {
242
- const l = Z(t, i);
252
+ const l = Y(t, i);
243
253
  if (i.length === 1) {
244
- const P = i[0]?.field?.split(".").pop(), g = P ? t[P] : void 0;
254
+ const j = i[0]?.field?.split(".").pop(), g = j ? t[j] : void 0;
245
255
  return g && typeof g == "object" && "value" in g ? g.value ?? "" : l[0];
246
256
  }
247
- return V + l.join(F);
257
+ return V + l.join(S);
248
258
  }
249
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);
250
- return r.length === 0 ? "" : r.length === 1 ? r[0] : r.join(F);
260
+ return r.length === 0 ? "" : r.length === 1 ? r[0] : r.join(S);
251
261
  }
252
262
  return t == null ? t : e.column?.getColDef()?.useValueFormatterForExport === !0 ? e.formatValue?.(t) ?? t : t;
253
- }, []), ye = m((e) => {
263
+ }, []), Ae = f((e) => {
254
264
  if (typeof e.value == "string") {
255
265
  const t = e.value.trim();
256
266
  if (t.startsWith("{") || t.startsWith("["))
@@ -261,9 +271,9 @@ function ft({
261
271
  }
262
272
  }
263
273
  return e.value;
264
- }, []), be = m((e) => {
274
+ }, []), Ee = f((e) => {
265
275
  const t = e?.data ?? "";
266
- if (!t.includes(F) && !t.includes(V)) {
276
+ if (!t.includes(S) && !t.includes(V)) {
267
277
  ee(t);
268
278
  return;
269
279
  }
@@ -275,26 +285,26 @@ function ft({
275
285
  o.push("");
276
286
  continue;
277
287
  }
278
- const g = l.split(" ").map((p) => p.startsWith(V) ? { isSplit: !0, slots: p.slice(1).split(F) } : { isSplit: !1, slots: p.split(F) }), L = Math.max(1, ...g.map((p) => p.slots.length));
279
- if (L === 1) {
280
- o.push(g.map((p) => p.slots[0] ?? "").join(" "));
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(" "));
281
291
  continue;
282
292
  }
283
- for (let p = 0; p < L; p++) {
284
- const Ae = g.map((G) => !G.isSplit && G.slots.length === 1 ? G.slots[0] : G.slots[p] ?? "");
285
- o.push(Ae.join(" "));
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(" "));
286
296
  }
287
297
  }
288
298
  ee(o.join(`
289
299
  `));
290
- }, []), E = m((e) => {
300
+ }, []), A = f((e) => {
291
301
  const t = e.value;
292
302
  if (t == null) return "";
293
303
  if (typeof t != "object")
294
304
  return e.column?.getColDef()?.useValueFormatterForExport === !0 ? String(e.formatValue?.(t) ?? t) : String(t);
295
- const o = Y(e.column?.getColDef());
305
+ const o = Q(e.column?.getColDef());
296
306
  if (o && o.length > 0) {
297
- const r = Z(t, o);
307
+ const r = Y(t, o);
298
308
  return o.length === 1 ? r[0] : r.join(`
299
309
  `);
300
310
  }
@@ -310,110 +320,149 @@ function ft({
310
320
  }
311
321
  return i.length === 0 ? "" : i.length === 1 ? i[0] : i.join(`
312
322
  `);
313
- }, []), xe = h(() => ({
314
- processCellCallback: E,
315
- ...f.defaultCsvExportParams ?? {}
316
- }), [E, f.defaultCsvExportParams]), Fe = h(() => ({
317
- processCellCallback: E,
318
- ...f.defaultExcelExportParams ?? {}
319
- }), [E, f.defaultExcelExportParams]), H = W === "list", J = f.rowHeight ?? je, Se = oe ?? (H ? He : ke);
320
- return /* @__PURE__ */ Ee(Ne.Provider, { value: k, children: [
321
- /* @__PURE__ */ S(
323
+ }, []), Ge = h(() => ({
324
+ processCellCallback: A,
325
+ ...c.defaultCsvExportParams ?? {}
326
+ }), [A, c.defaultCsvExportParams]), De = h(() => ({
327
+ 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,
341
+ 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,
359
+ gridApiRef: u
360
+ }), J = c.rowHeight ?? Je, Oe = oe ?? (E ? Ze : Xe);
361
+ return /* @__PURE__ */ Pe(tt.Provider, { value: k, children: [
362
+ /* @__PURE__ */ w(
322
363
  "div",
323
364
  {
324
- ref: I,
365
+ ref: R,
325
366
  "data-component": "ag-grid-react",
326
- "data-variant": W,
327
- "data-row-loading": le ? "true" : "false",
328
- className: `table-with-loader${$ ? ` ${$}` : ""}`,
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}` : ""}`,
329
372
  style: {
330
373
  width: "100%",
331
374
  height: "100%",
332
- ...H ? { "--ag-row-height": `${J}px` } : null
375
+ ...E ? { "--ag-row-height": `${J}px` } : null
333
376
  },
334
- children: /* @__PURE__ */ S(
335
- Ie,
377
+ children: /* @__PURE__ */ w(
378
+ qe,
336
379
  {
337
- theme: Se,
338
- defaultColDef: ge,
339
- columnDefs: he,
380
+ theme: Oe,
381
+ defaultColDef: Se,
382
+ columnDefs: Ie,
340
383
  cellSelection: !0,
341
- defaultColGroupDef: j,
342
- onGridReady: ue,
343
- onGridPreDestroyed: de,
344
- onFilterChanged: pe,
345
- onSelectionChanged: me,
346
- onModelUpdated: fe,
347
- tooltipShowMode: T,
348
- tooltipShowDelay: D,
384
+ defaultColGroupDef: H,
385
+ onGridReady: Ce,
386
+ onGridPreDestroyed: ve,
387
+ onFilterChanged: ye,
388
+ onSelectionChanged: be,
389
+ onModelUpdated: xe,
390
+ tooltipShowMode: I,
391
+ tooltipShowDelay: L,
349
392
  tooltipHideDelay: re,
350
393
  tooltipInteraction: ne,
351
- processCellForClipboard: ve,
352
- processCellFromClipboard: ye,
353
- sendToClipboard: be,
354
- ensureDomOrder: w,
394
+ processCellForClipboard: Re,
395
+ processCellFromClipboard: Ae,
396
+ sendToClipboard: Ee,
397
+ ensureDomOrder: M,
355
398
  suppressHeaderFocus: !1,
356
399
  suppressFocusAfterRefresh: !0,
357
400
  suppressGroupRowsSticky: !0,
358
401
  hidePaddedHeaderRows: !0,
359
402
  suppressServerSideFullWidthLoadingRow: !0,
360
- columnTypes: ae,
361
- autoSizeStrategy: M,
362
- ...f,
363
- ...H ? { rowHeight: J } : null,
364
- components: Ce,
365
- defaultCsvExportParams: xe,
366
- defaultExcelExportParams: Fe,
367
- getMainMenuItems: ce
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
368
413
  }
369
414
  )
370
415
  }
371
416
  ),
372
- c,
373
- /* @__PURE__ */ S(
374
- Xe,
417
+ He,
418
+ je,
419
+ s,
420
+ /* @__PURE__ */ w(
421
+ ct,
375
422
  {
376
- isOpen: ie,
377
- columnId: se,
378
- gridApi: K,
423
+ isOpen: me,
424
+ columnId: fe,
425
+ gridApi: $,
379
426
  onClose: k.closeAdvancedFilter,
380
427
  onApply: k.applyAdvancedFilter
381
428
  }
382
429
  )
383
430
  ] });
384
431
  }
385
- function Xe({
386
- isOpen: c,
432
+ function ct({
433
+ isOpen: s,
387
434
  columnId: n,
388
- gridApi: s,
389
- onClose: b,
390
- onApply: C
435
+ gridApi: a,
436
+ onClose: C,
437
+ onApply: v
391
438
  }) {
392
- if (!c || !n || !s) return null;
393
- const u = s.getColumn(n);
394
- if (!u) return null;
395
- const d = u.getColDef(), x = d.headerComponentParams, v = We(d), A = v.text !== -1 || v.number !== -1 || v.date !== -1, w = v.set !== -1, T = d.filter === "agMultiColumnFilter" && (A || w) ? "multi" : d.filter === "agNumberColumnFilter" ? "number" : d.filter === "agDateColumnFilter" ? "date" : d.filter === "agSetColumnFilter" || x?.selectOptions ? "select" : "text", D = $e(s.getFilterModel());
396
- return /* @__PURE__ */ S(we, { fallback: null, children: /* @__PURE__ */ S(
397
- ze,
439
+ if (!s || !n || !a) return null;
440
+ const d = a.getColumn(n);
441
+ 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,
398
445
  {
399
- isOpen: c,
400
- onClose: b,
401
- onApply: C,
446
+ isOpen: s,
447
+ onClose: C,
448
+ onApply: v,
402
449
  columnId: n,
403
- columnLabel: d.headerName || n,
404
- columnType: T,
450
+ columnLabel: p.headerName || n,
451
+ columnType: I,
405
452
  selectOptions: x?.selectOptions,
406
453
  isMultiSelect: x?.isMultiSelect,
407
- initialModel: D,
408
- api: s
454
+ initialModel: L,
455
+ api: a
409
456
  }
410
457
  ) });
411
458
  }
412
459
  export {
413
- ft as AgGridWrapper,
414
- Ft as isAgGridHeaderLabelTooltipOverflowing,
415
- St as isAgGridTextOverflowing,
416
- Ct as subscribeGridApiEvent,
417
- vt as subscribeGridApiEvents,
418
- bt as useAgGridTruncationTooltip
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
419
468
  };
@@ -0,0 +1,21 @@
1
+ import { IRowNode, RowDragEndEvent, RowDragMoveEvent } from 'ag-grid-community';
2
+ import { AgGridReactProps } from 'ag-grid-react';
3
+ import { ListDropPosition, isListDropAllowed } from './list-row-move';
4
+ import { AgGridVisualVariant, AgGridWrapperProps } from './ag-grid.types';
5
+ /** Card-row skin on `DataTableContent` / `AgGridWrapper`. */
6
+ export declare function isAgGridListVariant(variant: AgGridVisualVariant | undefined): boolean;
7
+ /**
8
+ * Row drag on the list skin: `variant="list"` plus `onRowReorder` plus `getRowId`.
9
+ * Handles are not shown without a callback — the host must own `rowData`.
10
+ */
11
+ export declare function isAgGridListDragEnabled(options: {
12
+ variant: AgGridVisualVariant | undefined;
13
+ onRowReorder?: unknown;
14
+ getRowId?: unknown;
15
+ }): boolean;
16
+ export declare function readDragRowId<TData>(node: IRowNode<TData> | undefined): string | undefined;
17
+ export declare function dropPositionFromEvent<TData>(event: RowDragMoveEvent<TData> | RowDragEndEvent<TData>): ListDropPosition;
18
+ export declare function itemIdFromGetRowId<TData>(getRowId: AgGridReactProps<TData>['getRowId'], data: TData): string | undefined;
19
+ export declare function createDefaultRowDragText<TData>(columnDefs: AgGridReactProps<TData>['columnDefs']): NonNullable<AgGridReactProps<TData>['rowDragText']>;
20
+ export declare function createListRowStyle<TData>(listRowGradient: AgGridWrapperProps<TData>['listRowGradient'], userGetRowStyle: AgGridReactProps<TData>['getRowStyle']): AgGridReactProps<TData>['getRowStyle'];
21
+ export { isListDropAllowed };