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,139 +1,162 @@
1
- import { jsx as _ } from "react/jsx-runtime";
2
- import { useState as oo, useMemo as h, useCallback as M, useEffect as eo } from "react";
3
- import { isListDropAllowed as F, applyUnmanagedRowDrag as ro, applyKeyboardListRowReorder as to } from "./list-row-move.js";
4
- import { buildDragListColumnDefs as ao } from "./build-list-drag-column-defs.js";
5
- import { createDefaultRowDragText as no, createListRowStyle as io, dropPositionFromEvent as H, readDragRowId as m, isAgGridListDragEnabled as so, isAgGridListVariant as lo, itemIdFromGetRowId as N } from "./list-drag-grid-options.js";
6
- import { useListDragPreview as wo } from "./use-list-drag-preview.js";
7
- function go(d) {
8
- const r = d?.getFocusedCell();
9
- if (!(!r || r.rowIndex == null))
10
- return d?.getDisplayedRowAtIndex(r.rowIndex) ?? void 0;
1
+ import { jsx as so } from "react/jsx-runtime";
2
+ import { useState as lo, useMemo as A, useCallback as p, useEffect as wo } from "react";
3
+ import { useImpactNovaI18n as go } from "../../../i18n/use-impact-nova-i18n.js";
4
+ import { isListDropAllowed as B, applyUnmanagedRowDrag as co, applyKeyboardListRowReorder as Do } from "./list-row-move.js";
5
+ import { buildDragListColumnDefs as Ro } from "./build-list-drag-column-defs.js";
6
+ import { createDefaultRowDragText as uo, createListRowStyle as po, formatListReorderLiveMessage as fo, isListDragPointerOverHost as mo, dropPositionFromEvent as W, readDragRowId as h, isAgGridListDragEnabled as Io, isAgGridListVariant as Lo, itemIdFromGetRowId as q, readListKeyboardRow as yo } from "./list-drag-grid-options.js";
7
+ import { useListDragPreview as ho } from "./use-list-drag-preview.js";
8
+ function z(x) {
9
+ const w = [];
10
+ return x.forEachNodeAfterFilterAndSort((P) => {
11
+ const g = h(P);
12
+ g && w.push(g);
13
+ }), w;
11
14
  }
12
- function co(d) {
13
- const r = [];
14
- return d.forEachNodeAfterFilterAndSort((I) => {
15
- const g = m(I);
16
- g && r.push(g);
17
- }), r;
18
- }
19
- function Io(d) {
15
+ function Go(x) {
20
16
  const {
21
- variant: r,
22
- listHeader: I,
17
+ variant: w,
18
+ listHeader: P,
23
19
  columnDefs: g,
24
- mergedColumnDefs: y,
25
- listRowGradient: D,
26
- listDragPreview: T,
27
- isRowDragDisabled: R,
28
- getRowDragHandleLabel: P,
29
- canDropRow: s,
30
- onRowReorder: L,
31
- getRowStyle: x,
32
- getRowId: a,
20
+ mergedColumnDefs: E,
21
+ listRowGradient: f,
22
+ listDragPreview: J,
23
+ isRowDragDisabled: m,
24
+ getRowDragHandleLabel: C,
25
+ canDropRow: d,
26
+ onRowReorder: M,
27
+ onRowMoveBeyondEdge: v,
28
+ getRowStyle: b,
29
+ getRowId: n,
33
30
  rowData: l,
34
- rowDragManaged: K,
35
- rowDragText: U,
36
- onRowDragEnter: V,
37
- onRowDragMove: E,
38
- onRowDragCancel: j,
39
- onRowDragEnd: v,
40
- gridContainerRef: A,
41
- gridApiRef: C
42
- } = d, c = lo(r), t = so({ variant: r, onRowReorder: L, getRowId: a }), b = c && I === "none", u = K === !0, [W, $] = oo(""), q = h(() => t ? ao({
43
- columnDefs: y,
44
- isRowDragDisabled: R,
45
- getRowDragHandleLabel: P
46
- }) : y, [P, t, R, y]), z = h(
47
- () => no(g),
31
+ rowDragManaged: Q,
32
+ rowDragText: G,
33
+ onRowDragEnter: X,
34
+ onRowDragMove: T,
35
+ onRowDragLeave: S,
36
+ onRowDragCancel: Y,
37
+ onRowDragEnd: k,
38
+ gridContainerRef: c,
39
+ gridApiRef: H
40
+ } = x, D = Lo(w), t = Io({ variant: w, onRowReorder: M, getRowId: n }), N = D && P === "none", e = Q === !0, { t: K } = go(), [Z, _] = lo(""), $ = A(() => t ? Ro({
41
+ columnDefs: E,
42
+ isRowDragDisabled: m,
43
+ getRowDragHandleLabel: C
44
+ }) : E, [C, t, m, E]), F = A(
45
+ () => uo(g),
48
46
  [g]
49
- ), G = h(
50
- () => c ? io(D, x) : x,
51
- [x, c, D]
52
- ), f = M(
47
+ ), O = A(
48
+ () => D ? po(f, b) : b,
49
+ [b, D, f]
50
+ ), I = p(
53
51
  (o) => {
54
- L?.(o), $(`Moved to position ${o.toIndex + 1}`);
52
+ M?.(o), _(
53
+ fo(o.toIndex + 1, K("dataTable.listMovedToPosition"))
54
+ );
55
55
  },
56
- [L]
57
- ), n = wo({
56
+ [M, K]
57
+ ), a = ho({
58
58
  enabled: t,
59
- listDragPreview: T,
60
- onRowDragEnter: V,
61
- onRowDragCancel: j
62
- }), B = M(
59
+ gridContainerRef: c,
60
+ listDragPreview: J,
61
+ rowDragText: G ?? F,
62
+ onRowDragEnter: X,
63
+ onRowDragCancel: Y
64
+ }), oo = p(
63
65
  (o) => {
64
- if (n.handleRowDragMove(o), !u) {
65
- const i = Math.max(o.overIndex, 0), e = o.node.data && F(s, { row: o.node.data, toIndex: i });
66
+ if (a.handleRowDragMove(o), !e) {
67
+ const i = Math.max(o.overIndex, 0), r = o.node.data && B(d, { row: o.node.data, toIndex: i }), R = mo(
68
+ o,
69
+ c.current
70
+ );
66
71
  o.api.setRowDropPositionIndicator(
67
- e && o.overNode ? { row: o.overNode, dropIndicatorPosition: H(o) } : null
72
+ R && r && o.overNode ? { row: o.overNode, dropIndicatorPosition: W(o) } : null
68
73
  );
69
74
  }
70
- E?.(o);
75
+ T?.(o);
76
+ },
77
+ [d, c, e, T, a]
78
+ ), ro = p(
79
+ (o) => {
80
+ e || o.api.setRowDropPositionIndicator(null), S?.(o);
71
81
  },
72
- [s, u, E, n]
73
- ), J = M(
82
+ [e, S]
83
+ ), eo = p(
74
84
  (o) => {
75
- if (n.clearPreview(), o.api.setRowDropPositionIndicator(null), !u && l && o.node.data && a) {
76
- const i = m(o.node), e = Math.max(o.overIndex, 0);
77
- if (o.node.data && F(s, { row: o.node.data, toIndex: e }) && i) {
78
- const w = ro({
85
+ e || o.api.setRowDropPositionIndicator(null), a.handleRowDragCancel(o);
86
+ },
87
+ [e, a]
88
+ ), to = p(
89
+ (o) => {
90
+ if (a.clearPreview(), o.api.setRowDropPositionIndicator(null), !e && l && o.node.data && n) {
91
+ const i = h(o.node), r = Math.max(o.overIndex, 0);
92
+ if (o.node.data && B(d, { row: o.node.data, toIndex: r }) && i) {
93
+ const s = co({
79
94
  items: l,
80
- getItemId: (p) => N(a, p) ?? "",
95
+ getItemId: (u) => q(n, u) ?? "",
81
96
  draggedId: i,
82
- overId: m(o.overNode),
83
- position: H(o)
97
+ overId: h(o.overNode),
98
+ position: W(o)
84
99
  });
85
- w && f(w);
100
+ s && I(s);
86
101
  }
87
- } else typeof D == "function" && o.api.redrawRows();
88
- v?.(o);
102
+ } else typeof f == "function" && o.api.redrawRows();
103
+ k?.(o);
89
104
  },
90
- [s, f, a, D, u, v, n, l]
105
+ [d, I, n, f, e, k, a, l]
91
106
  );
92
- eo(() => {
93
- const o = A.current;
94
- if (!t || !o || !a) return;
95
- const i = (e) => {
96
- if (!e.altKey || e.key !== "ArrowUp" && e.key !== "ArrowDown" || e.target?.closest('input, textarea, [contenteditable="true"]')) return;
97
- const w = C.current, p = go(w ?? void 0);
98
- if (!p?.data || !l || !w) return;
99
- const S = m(p);
100
- if (!S) return;
101
- e.preventDefault();
102
- const Y = e.key === "ArrowUp" ? "up" : "down", k = to({
107
+ wo(() => {
108
+ const o = c.current;
109
+ if (!t || !o || !n) return;
110
+ const i = (r) => {
111
+ if (!r.altKey || r.key !== "ArrowUp" && r.key !== "ArrowDown") return;
112
+ const R = r.target;
113
+ if (R?.closest('input, textarea, [contenteditable="true"]')) return;
114
+ const s = H.current, u = yo({ api: s ?? void 0, target: R });
115
+ if (!u?.data || !l || !s) return;
116
+ const L = h(u);
117
+ if (!L) return;
118
+ r.preventDefault();
119
+ const y = r.key === "ArrowUp" ? "up" : "down", U = Do({
103
120
  items: l,
104
- displayedRowIds: co(w),
105
- draggedId: S,
106
- direction: Y,
107
- getItemId: (Z) => N(a, Z) ?? "",
108
- isRowDragDisabled: R,
109
- canDropRow: s
121
+ displayedRowIds: z(s),
122
+ draggedId: L,
123
+ direction: y,
124
+ getItemId: (io) => q(n, io) ?? "",
125
+ isRowDragDisabled: m,
126
+ canDropRow: d
110
127
  });
111
- k && f(k);
128
+ if (U) {
129
+ I(U);
130
+ return;
131
+ }
132
+ const V = z(s), j = V.indexOf(L);
133
+ (y === "up" && j === 0 || y === "down" && j === V.length - 1) && v && v({ rowId: L, direction: y, row: u.data });
112
134
  };
113
135
  return o.addEventListener("keydown", i), () => o.removeEventListener("keydown", i);
114
- }, [s, f, a, C, A, t, R, l]);
115
- const O = t ? /* @__PURE__ */ _("div", { className: "sr-only", "aria-live": "polite", children: W }) : null, Q = t ? {
116
- rowDragManaged: u,
117
- rowDragText: U ?? z,
136
+ }, [d, I, n, H, c, t, m, v, l]);
137
+ const ao = t ? /* @__PURE__ */ so("div", { className: "sr-only", "aria-live": "polite", children: Z }) : null, no = t ? {
138
+ rowDragManaged: e,
139
+ rowDragText: G ?? F,
118
140
  suppressMoveWhenRowDragging: !0,
119
141
  animateRows: !0,
120
- getRowStyle: G,
121
- onRowDragEnter: n.handleRowDragEnter,
122
- onRowDragMove: B,
123
- onRowDragCancel: n.handleRowDragCancel,
124
- onRowDragEnd: J
125
- } : c ? { getRowStyle: G } : null;
142
+ getRowStyle: O,
143
+ onRowDragEnter: a.handleRowDragEnter,
144
+ onRowDragMove: oo,
145
+ onRowDragLeave: ro,
146
+ onRowDragCancel: eo,
147
+ onRowDragEnd: to
148
+ } : D ? { getRowStyle: O } : null;
126
149
  return {
127
150
  isDragList: t,
128
- isListVariant: c,
129
- hideColumnHeader: b,
130
- dragListColumnDefs: q,
131
- dragListGridProps: Q,
132
- listHeaderGridProps: b ? { headerHeight: 0 } : null,
133
- dragPreviewPortal: n.dragPreviewPortal,
134
- liveRegion: O
151
+ isListVariant: D,
152
+ hideColumnHeader: N,
153
+ dragListColumnDefs: $,
154
+ dragListGridProps: no,
155
+ listHeaderGridProps: N ? { headerHeight: 0 } : null,
156
+ dragPreviewPortal: a.dragPreviewPortal,
157
+ liveRegion: ao
135
158
  };
136
159
  }
137
160
  export {
138
- Io as useAgGridDragList
161
+ Go as useAgGridDragList
139
162
  };
@@ -1,10 +1,13 @@
1
- import { ReactNode } from 'react';
1
+ import { ReactNode, RefObject } from 'react';
2
2
  import { RowDragCancelEvent, RowDragEnterEvent, RowDragMoveEvent } from 'ag-grid-community';
3
+ import { AgGridReactProps } from 'ag-grid-react';
3
4
  export declare function useListDragPreview<TData>(options: {
4
5
  enabled: boolean;
6
+ gridContainerRef: RefObject<HTMLElement | null>;
5
7
  listDragPreview?: (params: {
6
8
  data: TData;
7
9
  }) => ReactNode;
10
+ rowDragText?: AgGridReactProps<TData>['rowDragText'];
8
11
  onRowDragEnter?: (event: RowDragEnterEvent<TData>) => void;
9
12
  onRowDragMove?: (event: RowDragMoveEvent<TData>) => void;
10
13
  onRowDragCancel?: (event: RowDragCancelEvent<TData>) => void;
@@ -1,49 +1,148 @@
1
- import { jsx as p } from "react/jsx-runtime";
2
- import { useState as w, useCallback as r, useEffect as y } from "react";
3
- import { createPortal as P } from "react-dom";
4
- function C(f) {
5
- const { enabled: a, listDragPreview: n, onRowDragEnter: l, onRowDragMove: s, onRowDragCancel: c } = f, [t, o] = w(null), [g, u] = w(!1), m = r(
1
+ import { jsx as b } from "react/jsx-runtime";
2
+ import { useState as E, useRef as T, useCallback as u, useEffect as A } from "react";
3
+ import { createPortal as F } from "react-dom";
4
+ import { ListDragPreviewCard as H } from "./list-drag-preview-card.js";
5
+ import { readListDragPreviewPosition as N, readListDragPreviewMarkup as q, readListDragRowFrame as B } from "./list-drag-preview-snapshot.js";
6
+ function k(r) {
7
+ return r ? { x: r.clientX, y: r.clientY } : { x: 0, y: 0 };
8
+ }
9
+ function G(r, a) {
10
+ return r ? r({ rowNode: a, defaultTextValue: a.id ?? "" }, 1) : "";
11
+ }
12
+ function I(r) {
13
+ return {
14
+ frame: B(r),
15
+ markup: q(r)
16
+ };
17
+ }
18
+ function x(r, a, s) {
19
+ return { ...r, pointerX: a, pointerY: s };
20
+ }
21
+ function C(r) {
22
+ return r.pointerType === "mouse" || r.pointerType === "pen" ? r.buttons === 1 : r.buttons !== 0;
23
+ }
24
+ function K(r) {
25
+ const {
26
+ enabled: a,
27
+ gridContainerRef: s,
28
+ listDragPreview: f,
29
+ rowDragText: P,
30
+ onRowDragEnter: g,
31
+ onRowDragMove: y,
32
+ onRowDragCancel: L
33
+ } = r, [n, l] = E(null), [p, D] = E(!1), c = T(!1), i = u(() => {
34
+ c.current = !1, l(null), D(!1);
35
+ }, []), h = u(
6
36
  (e) => {
7
- u(!0), n && e.node.data && o({
8
- node: n({ data: e.node.data }),
9
- x: e.event.clientX,
10
- y: e.event.clientY
11
- }), l?.(e);
37
+ D(!0), l({
38
+ body: e.body,
39
+ label: e.label,
40
+ pointerX: e.pointerX,
41
+ pointerY: e.pointerY,
42
+ frame: e.frame,
43
+ markup: e.markup
44
+ });
45
+ },
46
+ []
47
+ ), R = u(
48
+ (e, t, o, d) => {
49
+ const m = s.current;
50
+ if (!m?.querySelector(".ag-row.ag-row-dragging")) return !1;
51
+ const v = I(m);
52
+ return v.frame ? (c.current = !0, h({
53
+ pointerX: e,
54
+ pointerY: t,
55
+ label: o,
56
+ body: d,
57
+ frame: v.frame,
58
+ markup: v.markup
59
+ }), !0) : !1;
12
60
  },
13
- [n, l]
14
- ), v = r(
61
+ [h, s]
62
+ ), S = u(
15
63
  (e) => {
16
- o(
17
- (i) => i && { ...i, x: e.event.clientX, y: e.event.clientY }
18
- ), s?.(e);
64
+ if (c.current) {
65
+ g?.(e);
66
+ return;
67
+ }
68
+ const t = k(e.event), o = e.node.data, d = G(P, e.node), m = f && o ? f({ data: o }) : null;
69
+ requestAnimationFrame(() => {
70
+ c.current || R(t.x, t.y, d, m);
71
+ }), g?.(e);
19
72
  },
20
- [s]
21
- ), d = r(() => {
22
- o(null), u(!1);
23
- }, []), D = r(
73
+ [R, f, g, P]
74
+ ), X = u(
24
75
  (e) => {
25
- d(), c?.(e);
76
+ if (!C(e.event ?? {})) {
77
+ i();
78
+ return;
79
+ }
80
+ const t = k(e.event);
81
+ l((o) => o && x(o, t.x, t.y)), y?.(e);
26
82
  },
27
- [d, c]
83
+ [i, y]
84
+ ), Y = u(
85
+ (e) => {
86
+ i(), L?.(e);
87
+ },
88
+ [i, L]
28
89
  );
29
- y(() => {
30
- if (!(!a || !g))
31
- return document.body.setAttribute("data-in-list-drag", "true"), () => document.body.removeAttribute("data-in-list-drag");
32
- }, [a, g]);
33
- const b = a && t && typeof document < "u" ? P(
34
- /* @__PURE__ */ p(
90
+ A(() => {
91
+ if (!a || !p) return;
92
+ document.body.setAttribute("data-in-list-drag", "true");
93
+ const e = (o) => {
94
+ if (!C(o)) {
95
+ i();
96
+ return;
97
+ }
98
+ l(
99
+ (d) => d && x(d, o.clientX, o.clientY)
100
+ );
101
+ }, t = () => {
102
+ i();
103
+ };
104
+ return document.addEventListener("pointermove", e), document.addEventListener("pointerup", t), document.addEventListener("pointercancel", t), window.addEventListener("blur", t), () => {
105
+ document.body.removeAttribute("data-in-list-drag"), document.removeEventListener("pointermove", e), document.removeEventListener("pointerup", t), document.removeEventListener("pointercancel", t), window.removeEventListener("blur", t);
106
+ };
107
+ }, [i, a, p]);
108
+ const w = n == null ? null : N({
109
+ pointerX: n.pointerX,
110
+ pointerY: n.pointerY,
111
+ frame: n.frame
112
+ }), M = a && p && n && w && typeof document < "u" ? F(
113
+ /* @__PURE__ */ b(
35
114
  "div",
36
115
  {
37
116
  "data-component": "ag-grid-drag-preview",
38
- className: "pointer-events-none fixed z-[9999] rounded-lg border border-stroke-hairline bg-canvas-elevated px-3 py-2 shadow-[var(--shadow-elevation-toast)]",
39
- style: { left: t.x + 12, top: t.y + 12 },
40
- children: t.node
117
+ "aria-hidden": "true",
118
+ className: "pointer-events-none fixed z-[9999] box-border overflow-hidden",
119
+ style: {
120
+ left: w.left,
121
+ top: w.top,
122
+ width: n.frame?.width,
123
+ height: n.frame?.cardHeight,
124
+ borderRadius: n.frame?.listBorderRadius || void 0,
125
+ "--in-ag-list-row-gradient": n.frame?.rowGradient || void 0
126
+ },
127
+ children: n.body ?? (n.markup ? /* @__PURE__ */ b(
128
+ "div",
129
+ {
130
+ className: "in-ag-list-drag-preview-content",
131
+ dangerouslySetInnerHTML: { __html: n.markup }
132
+ }
133
+ ) : /* @__PURE__ */ b(H, { label: n.label }))
41
134
  }
42
135
  ),
43
136
  document.body
44
137
  ) : null;
45
- return { handleRowDragEnter: m, handleRowDragMove: v, handleRowDragCancel: D, clearPreview: d, dragPreviewPortal: b };
138
+ return {
139
+ handleRowDragEnter: S,
140
+ handleRowDragMove: X,
141
+ handleRowDragCancel: Y,
142
+ clearPreview: i,
143
+ dragPreviewPortal: M
144
+ };
46
145
  }
47
146
  export {
48
- C as useListDragPreview
147
+ K as useListDragPreview
49
148
  };
@@ -0,0 +1,36 @@
1
+ import { GridApi } from 'ag-grid-community';
2
+ import { KeyAttributeRow } from './ag-grid-list.demo-board';
3
+ interface UseKeyAttributesFindOptions {
4
+ topRows: KeyAttributeRow[];
5
+ benchRows: KeyAttributeRow[];
6
+ showBench: boolean;
7
+ topApi: GridApi<KeyAttributeRow> | null;
8
+ benchApi: GridApi<KeyAttributeRow> | null;
9
+ }
10
+ /** Refresh name cells on the rows that changed. Omit `rowIds` to refresh the whole name column. */
11
+ export declare function refreshFindHighlightGrids(options: {
12
+ topApi: GridApi<KeyAttributeRow> | null;
13
+ benchApi: GridApi<KeyAttributeRow> | null;
14
+ rowIds?: string[];
15
+ }): void;
16
+ export interface KeyAttributesFindGridContext {
17
+ findQuery: string;
18
+ currentMatchRowId?: string;
19
+ /** Active substring within the row name (0-based among matches in that cell). */
20
+ currentOccurrenceIndexInRow?: number;
21
+ }
22
+ export declare const KEY_ATTRIBUTES_FIND_CONTEXT_KEY = "keyAttributesFind";
23
+ export declare function readKeyAttributesFindFromGridContext(context: unknown): KeyAttributesFindGridContext;
24
+ /** Key Attributes demo hook — not part of the public `impact-nova/data-table` API. */
25
+ export declare function useListFind(options: UseKeyAttributesFindOptions): {
26
+ open: boolean;
27
+ query: string;
28
+ activeIndex: number;
29
+ matchCount: number;
30
+ openFind: () => void;
31
+ closeFind: () => void;
32
+ setQuery: (nextQuery: string) => void;
33
+ goPrevious: () => void;
34
+ goNext: () => void;
35
+ };
36
+ export {};
@@ -1,5 +1,7 @@
1
1
  import { GridApi, RowDragEndEvent, RowDragMoveEvent } from 'ag-grid-community';
2
2
  import { ListRowDropCheck, ListRowTransferMeta } from './list-row-move';
3
+ /** Stable key for drop-zone pairing — ignores a new `lists` object with the same APIs. */
4
+ export declare function readListDropZoneIdentity(lists: Record<string, object | null | undefined>): string;
3
5
  export interface UseListRowDropZonesOptions<TData> {
4
6
  /** Grid APIs from each list's `onGridReady`. A `null` api is skipped (hidden list). */
5
7
  lists: Record<string, GridApi<TData> | null>;
@@ -1,73 +1,92 @@
1
- import { useEffect as D } from "react";
2
- import { buildListRowTransferMeta as R, listRowTransferDropIndex as m, isListDropAllowed as L } from "./list-row-move.js";
3
- import { readDragRowId as g, dropPositionFromEvent as p } from "./list-drag-grid-options.js";
4
- function I(r) {
1
+ import { useRef as y, useEffect as w } from "react";
2
+ import { buildListRowTransferMeta as A, listRowTransferDropIndex as P, isListDropAllowed as Z } from "./list-row-move.js";
3
+ import { readDragRowId as v, dropPositionFromEvent as m } from "./list-drag-grid-options.js";
4
+ const D = /* @__PURE__ */ new WeakMap();
5
+ let R = 1;
6
+ function N(t) {
7
+ const o = D.get(t);
8
+ if (o) return o;
9
+ const r = R;
10
+ return R += 1, D.set(t, r), r;
11
+ }
12
+ function T(t) {
13
+ return Object.keys(t).sort().map((o) => {
14
+ const r = t[o];
15
+ return `${o}:${r == null ? "0" : String(N(r))}`;
16
+ }).join("|");
17
+ }
18
+ function L(t) {
5
19
  let o = 0;
6
- return r.forEachNodeAfterFilterAndSort(() => {
20
+ return t.forEachNodeAfterFilterAndSort(() => {
7
21
  o += 1;
8
22
  }), o;
9
23
  }
10
- function x(r, o) {
11
- const t = r.node.data;
12
- if (!t) return !1;
13
- const n = m({
14
- overIndex: r.overIndex,
15
- overNode: r.overNode,
16
- targetDisplayedCount: I(o.target),
17
- position: p(r)
24
+ function C(t, o) {
25
+ const r = t.node.data;
26
+ if (!r) return !1;
27
+ const n = P({
28
+ overIndex: t.overIndex,
29
+ overNode: t.overNode,
30
+ targetDisplayedCount: L(o.target),
31
+ position: m(t)
18
32
  });
19
- return L(o.canDropRow, {
20
- row: t,
33
+ return Z(o.canDropRow, {
34
+ row: r,
21
35
  toIndex: n,
22
36
  fromListId: o.fromListId,
23
37
  toListId: o.toListId
24
38
  });
25
39
  }
26
- function P(r, o) {
27
- const t = r.node.data, n = g(r.node);
28
- return R({
29
- row: t,
40
+ function b(t, o) {
41
+ const r = t.node.data, n = v(t.node);
42
+ return A({
43
+ row: r,
30
44
  rowId: n,
31
45
  fromListId: o.fromListId,
32
46
  toListId: o.toListId,
33
- overIndex: r.overIndex,
34
- overNode: r.overNode,
35
- targetDisplayedCount: I(o.target),
36
- position: p(r),
47
+ overIndex: t.overIndex,
48
+ overNode: t.overNode,
49
+ targetDisplayedCount: L(o.target),
50
+ position: m(t),
37
51
  canDropRow: o.canDropRow
38
52
  });
39
53
  }
40
- function y(r) {
41
- const { lists: o, onRowTransfer: t, canDropRow: n } = r;
42
- D(() => {
43
- const c = Object.entries(o).filter((e) => e[1] != null), f = [];
44
- for (const [e, s] of c)
45
- for (const [u, i] of c) {
46
- if (e === u) continue;
47
- const l = { fromListId: e, toListId: u, target: i, canDropRow: n }, d = i.getRowDropZoneParams({
54
+ function S(t) {
55
+ const { lists: o, onRowTransfer: r, canDropRow: n } = t, c = y(o), g = T(o);
56
+ w(() => {
57
+ c.current = o;
58
+ }), w(() => {
59
+ const x = c.current, f = Object.entries(x).filter(
60
+ (e) => e[1] != null
61
+ ), u = [];
62
+ for (const [e, s] of f)
63
+ for (const [p, i] of f) {
64
+ if (e === p) continue;
65
+ const l = { fromListId: e, toListId: p, target: i, canDropRow: n }, d = i.getRowDropZoneParams({
48
66
  onDragging: (a) => {
49
- x(a, l) || (s.setRowDropPositionIndicator(null), i.setRowDropPositionIndicator(null));
67
+ s.setRowDropPositionIndicator(null), C(a, l) || i.setRowDropPositionIndicator(null);
50
68
  },
51
69
  onDragStop: (a) => {
52
70
  i.setRowDropPositionIndicator(null);
53
- const w = P(a, l);
54
- w && t(w);
71
+ const I = b(a, l);
72
+ I && r(I);
55
73
  },
56
74
  onDragLeave: () => {
57
75
  s.setRowDropPositionIndicator(null), i.setRowDropPositionIndicator(null);
58
76
  }
59
77
  });
60
- d && (s.addRowDropZone(d), f.push({ source: s, params: d }));
78
+ d && (s.addRowDropZone(d), u.push({ source: s, params: d }));
61
79
  }
62
80
  return () => {
63
- for (const { source: e, params: s } of f)
81
+ for (const { source: e, params: s } of u)
64
82
  e.removeRowDropZone(s);
65
83
  };
66
- }, [n, o, t]);
84
+ }, [n, g, r]);
67
85
  }
68
86
  export {
69
- I as displayedRowCount,
70
- x as previewListTransferAllowed,
71
- P as tryListRowTransfer,
72
- y as useListRowDropZones
87
+ L as displayedRowCount,
88
+ C as previewListTransferAllowed,
89
+ T as readListDropZoneIdentity,
90
+ b as tryListRowTransfer,
91
+ S as useListRowDropZones
73
92
  };
@@ -12,7 +12,7 @@ function d({
12
12
  {
13
13
  "data-component": "data-table-list-header",
14
14
  className: r(
15
- "mb-3 flex h-10 shrink-0 items-center justify-between gap-4 rounded-lg bg-canvas-muted px-5",
15
+ "mb-2 flex h-10 shrink-0 items-center justify-between gap-4 rounded-lg bg-canvas-muted px-5",
16
16
  s
17
17
  ),
18
18
  ...i,