impact-nova 3.0.0-alpha.16 → 3.0.0-alpha.18
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.
- package/dist/components/data/ag-grid-react/ag-grid.types.d.ts +9 -0
- package/dist/components/data/ag-grid-react/cell-renderers/badge-cell-renderer.d.ts +2 -0
- package/dist/components/data/ag-grid-react/cell-renderers/badge-cell-renderer.js +15 -14
- package/dist/components/data/ag-grid-react/cell-renderers/badge-icon-registry.d.ts +10 -0
- package/dist/components/data/ag-grid-react/cell-renderers/badge-icon-registry.js +17 -0
- package/dist/components/data/ag-grid-react/cell-renderers/index.d.ts +45 -7
- package/dist/components/data/ag-grid-react/cell-renderers/index.js +70 -58
- package/dist/components/data/ag-grid-react/cell-renderers/style-description-display-renderer.d.ts +5 -11
- package/dist/components/data/ag-grid-react/cell-renderers/style-description-display-renderer.js +127 -51
- package/dist/components/data/ag-grid-react/index.d.ts +1 -1
- package/dist/components/data/ag-grid-react/index.js +150 -147
- package/dist/components/data/ag-grid-react/list-drag-grid-options.d.ts +14 -1
- package/dist/components/data/ag-grid-react/list-drag-grid-options.js +95 -31
- package/dist/components/data/ag-grid-react/list-drag-preview-card.d.ts +4 -0
- package/dist/components/data/ag-grid-react/list-drag-preview-card.js +14 -0
- package/dist/components/data/ag-grid-react/list-drag-preview-snapshot.d.ts +20 -0
- package/dist/components/data/ag-grid-react/list-drag-preview-snapshot.js +42 -0
- package/dist/components/data/ag-grid-react/list-find-highlight.d.ts +6 -0
- package/dist/components/data/ag-grid-react/list-find-highlight.js +7 -0
- package/dist/components/data/ag-grid-react/process-backend-columndefs.d.ts +4 -0
- package/dist/components/data/ag-grid-react/process-backend-columndefs.js +78 -0
- package/dist/components/data/ag-grid-react/use-ag-grid-list-drag.d.ts +10 -2
- package/dist/components/data/ag-grid-react/use-ag-grid-list-drag.js +130 -107
- package/dist/components/data/ag-grid-react/use-list-drag-preview.d.ts +4 -1
- package/dist/components/data/ag-grid-react/use-list-drag-preview.js +131 -32
- package/dist/components/data/ag-grid-react/use-list-find.d.ts +36 -0
- package/dist/components/data/ag-grid-react/use-list-row-drop-zones.d.ts +2 -0
- package/dist/components/data/ag-grid-react/use-list-row-drop-zones.js +60 -41
- package/dist/components/data/data-table/data-table-list-header.js +1 -1
- package/dist/components/data/data-table/data-table-overlay.d.ts +6 -0
- package/dist/components/data/data-table/data-table-overlay.js +18 -0
- package/dist/components/data/data-table/data-table.types.d.ts +1 -0
- package/dist/components/data/data-table/index.d.ts +3 -0
- package/dist/components/data/data-table/index.js +67 -63
- package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +3 -2
- package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +3 -2
- package/dist/components/data/scenario-comparison/flatten-scenario-comparison-rows.d.ts +2 -0
- package/dist/components/data/scenario-comparison/flatten-scenario-comparison-rows.js +16 -0
- package/dist/components/data/scenario-comparison/index.d.ts +3 -0
- package/dist/components/data/scenario-comparison/index.js +6 -0
- package/dist/components/data/scenario-comparison/scenario-comparison-column.d.ts +12 -0
- package/dist/components/data/scenario-comparison/scenario-comparison-column.js +172 -0
- package/dist/components/data/scenario-comparison/scenario-comparison-label.d.ts +6 -0
- package/dist/components/data/scenario-comparison/scenario-comparison-label.js +64 -0
- package/dist/components/data/scenario-comparison/scenario-comparison.d.ts +5 -0
- package/dist/components/data/scenario-comparison/scenario-comparison.js +127 -0
- package/dist/components/data/scenario-comparison/scenario-comparison.types.d.ts +56 -0
- package/dist/components/data/scenario-comparison/scenario-comparison.variants.d.ts +7 -0
- package/dist/components/data/scenario-comparison/scenario-comparison.variants.js +29 -0
- package/dist/components/data-display/badge/index.d.ts +2 -0
- package/dist/components/data-display/badge/index.js +4 -2
- package/dist/components/data-display/badge/trophy-icon.d.ts +6 -0
- package/dist/components/data-display/badge/trophy-icon.js +28 -0
- package/dist/components/feedback/find-bar/collect-find-matches.d.ts +35 -0
- package/dist/components/feedback/find-bar/collect-find-matches.js +68 -0
- package/dist/components/feedback/find-bar/find-bar-shortcuts.d.ts +5 -0
- package/dist/components/feedback/find-bar/find-bar-shortcuts.js +27 -0
- package/dist/components/feedback/find-bar/find-bar.d.ts +7 -0
- package/dist/components/feedback/find-bar/find-bar.js +266 -0
- package/dist/components/feedback/find-bar/find-bar.types.d.ts +32 -0
- package/dist/components/feedback/find-bar/index.d.ts +4 -0
- package/dist/components/feedback/find-bar/index.js +11 -0
- package/dist/components/feedback/tooltip/tab-tooltip-render.js +3 -2
- package/dist/components/flows/command-palette/shortcut-settings.js +10 -10
- package/dist/components/flows/filter-panel/filter-panel.js +4 -4
- package/dist/components/forms/choice-card/choice-card-compare-scroll.d.ts +4 -0
- package/dist/components/forms/choice-card/choice-card-compare-scroll.js +6 -0
- package/dist/components/forms/choice-card/choice-card.d.ts +13 -2
- package/dist/components/forms/choice-card/choice-card.js +432 -342
- package/dist/components/forms/choice-card/choice-card.types.d.ts +9 -2
- package/dist/components/forms/select/components/SelectTriggerValue.js +3 -2
- package/dist/components/forms/select/components/Submenu.js +3 -2
- package/dist/components/primitives/tabs/folder-tab-path.d.ts +6 -0
- package/dist/components/primitives/tabs/folder-tab-path.js +16 -0
- package/dist/components/primitives/tabs/tabs.js +164 -111
- package/dist/components/primitives/tabs/tabs.types.d.ts +1 -1
- package/dist/i18n/defaultMessages.d.ts +17 -0
- package/dist/i18n/defaultMessages.js +52 -38
- package/dist/i18n/impact-nova-i18n-defaults.d.ts +5 -0
- package/dist/i18n/impact-nova-i18n-defaults.js +4 -9
- package/dist/i18n/index.d.ts +1 -1
- package/dist/i18n/locales/de.js +15 -1
- package/dist/i18n/locales/es.js +15 -1
- package/dist/i18n/locales/hi.js +15 -1
- package/dist/i18n/locales/kn.js +15 -1
- package/dist/impact-nova-components.css +189 -14
- package/dist/impact-nova-tokens.scss +2 -0
- package/dist/impact-nova.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +621 -607
- package/dist/lib/virtualized/index.d.ts +2 -0
- package/dist/lib/virtualized/index.js +35 -31
- package/dist/lib/virtualized/list-index.d.ts +5 -0
- package/dist/lib/virtualized/list-index.js +13 -0
- package/dist/lib/virtualized/read-infinite-query-list.d.ts +14 -0
- package/dist/lib/virtualized/read-infinite-query-list.js +12 -0
- package/dist/lib/virtualized/types.d.ts +4 -2
- package/dist/lib/virtualized/useRowState.js +60 -56
- package/dist/lib/virtualized/useVirtualizedList.d.ts +5 -0
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/package.json +16 -3
|
@@ -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
|
|
2
|
-
import { useState as
|
|
3
|
-
import { createPortal as
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
-
[
|
|
14
|
-
),
|
|
61
|
+
[h, s]
|
|
62
|
+
), S = u(
|
|
15
63
|
(e) => {
|
|
16
|
-
|
|
17
|
-
(
|
|
18
|
-
|
|
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
|
-
[
|
|
21
|
-
),
|
|
22
|
-
o(null), u(!1);
|
|
23
|
-
}, []), D = r(
|
|
73
|
+
[R, f, g, P]
|
|
74
|
+
), X = u(
|
|
24
75
|
(e) => {
|
|
25
|
-
|
|
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
|
-
[
|
|
83
|
+
[i, y]
|
|
84
|
+
), Y = u(
|
|
85
|
+
(e) => {
|
|
86
|
+
i(), L?.(e);
|
|
87
|
+
},
|
|
88
|
+
[i, L]
|
|
28
89
|
);
|
|
29
|
-
|
|
30
|
-
if (!
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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 {
|
|
138
|
+
return {
|
|
139
|
+
handleRowDragEnter: S,
|
|
140
|
+
handleRowDragMove: X,
|
|
141
|
+
handleRowDragCancel: Y,
|
|
142
|
+
clearPreview: i,
|
|
143
|
+
dragPreviewPortal: M
|
|
144
|
+
};
|
|
46
145
|
}
|
|
47
146
|
export {
|
|
48
|
-
|
|
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
|
|
2
|
-
import { buildListRowTransferMeta as
|
|
3
|
-
import { readDragRowId as
|
|
4
|
-
|
|
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
|
|
20
|
+
return t.forEachNodeAfterFilterAndSort(() => {
|
|
7
21
|
o += 1;
|
|
8
22
|
}), o;
|
|
9
23
|
}
|
|
10
|
-
function
|
|
11
|
-
const
|
|
12
|
-
if (!
|
|
13
|
-
const n =
|
|
14
|
-
overIndex:
|
|
15
|
-
overNode:
|
|
16
|
-
targetDisplayedCount:
|
|
17
|
-
position:
|
|
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
|
|
20
|
-
row:
|
|
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
|
|
27
|
-
const
|
|
28
|
-
return
|
|
29
|
-
row:
|
|
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:
|
|
34
|
-
overNode:
|
|
35
|
-
targetDisplayedCount:
|
|
36
|
-
position:
|
|
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
|
|
41
|
-
const { lists: o, onRowTransfer:
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
|
-
|
|
67
|
+
s.setRowDropPositionIndicator(null), C(a, l) || i.setRowDropPositionIndicator(null);
|
|
50
68
|
},
|
|
51
69
|
onDragStop: (a) => {
|
|
52
70
|
i.setRowDropPositionIndicator(null);
|
|
53
|
-
const
|
|
54
|
-
|
|
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),
|
|
78
|
+
d && (s.addRowDropZone(d), u.push({ source: s, params: d }));
|
|
61
79
|
}
|
|
62
80
|
return () => {
|
|
63
|
-
for (const { source: e, params: s } of
|
|
81
|
+
for (const { source: e, params: s } of u)
|
|
64
82
|
e.removeRowDropZone(s);
|
|
65
83
|
};
|
|
66
|
-
}, [n,
|
|
84
|
+
}, [n, g, r]);
|
|
67
85
|
}
|
|
68
86
|
export {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
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-
|
|
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,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsxs as n, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
function a(e) {
|
|
3
|
+
return /* @__PURE__ */ n(
|
|
4
|
+
"div",
|
|
5
|
+
{
|
|
6
|
+
className: "flex h-full min-h-24 flex-col items-center justify-center gap-2 p-6 text-center",
|
|
7
|
+
"data-component": "data-table-overlay",
|
|
8
|
+
children: [
|
|
9
|
+
/* @__PURE__ */ t("p", { className: "text-sm font-medium text-content", children: e.title }),
|
|
10
|
+
e.description ? /* @__PURE__ */ t("p", { className: "text-sm text-content-secondary", children: e.description }) : null,
|
|
11
|
+
e.children
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
a as DataTableOverlay
|
|
18
|
+
};
|
|
@@ -18,6 +18,7 @@ export type DataTableContentProps<TData = unknown> = AgGridWrapperProps<TData> &
|
|
|
18
18
|
* Visual skin forwarded to `AgGridWrapper`. `"list"` is card-row chrome
|
|
19
19
|
* (48px card + 12px gap). Pass `onRowReorder` and `getRowId` on `"list"` to
|
|
20
20
|
* enable row drag — same component, not a second variant. Explicit `rowHeight` wins.
|
|
21
|
+
* List defaults `cellSelection` to false; pass `cellSelection={true}` to opt back in.
|
|
21
22
|
*/
|
|
22
23
|
variant?: AgGridWrapperProps<TData>["variant"];
|
|
23
24
|
/**
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
export type { CellClassRules, CellClickedEvent, CellEditingStartedEvent, CellEditingStoppedEvent, ColDef, ColGroupDef, Column, GridApi, ICellEditorParams, ICellRendererParams, IRowNode, IServerSideDatasource, IServerSideGetRowsParams, ProcessCellForExportParams, ValueFormatterParams, ValueGetterParams, ValueSetterParams, } from 'ag-grid-community';
|
|
1
2
|
export * from './data-table';
|
|
2
3
|
export { DataTableListHeader } from './data-table-list-header';
|
|
3
4
|
export type { DataTableListHeaderProps } from './data-table.types';
|
|
5
|
+
export { DataTableOverlay } from './data-table-overlay';
|
|
6
|
+
export { ListFindHighlight } from '../ag-grid-react/list-find-highlight';
|
|
4
7
|
export { useListRowDropZones } from '../ag-grid-react/use-list-row-drop-zones';
|
|
5
8
|
export type { UseListRowDropZonesOptions } from '../ag-grid-react/use-list-row-drop-zones';
|
|
6
9
|
export type { ListRowReorderMeta, ListRowTransferMeta, ListRowDropCheck, } from '../ag-grid-react/list-row-move';
|
|
@@ -1,66 +1,70 @@
|
|
|
1
|
-
import { DataTable as t, DataTableContent as
|
|
2
|
-
import { DataTableListHeader as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
1
|
+
import { DataTable as t, DataTableContent as r, DataTableToolbar as o } from "./data-table.js";
|
|
2
|
+
import { DataTableListHeader as T } from "./data-table-list-header.js";
|
|
3
|
+
import { DataTableOverlay as i } from "./data-table-overlay.js";
|
|
4
|
+
import { ListFindHighlight as n } from "../ag-grid-react/list-find-highlight.js";
|
|
5
|
+
import { useListRowDropZones as b } from "../ag-grid-react/use-list-row-drop-zones.js";
|
|
6
|
+
import { AG_GRID_LIST_RANK_GRADIENT as p } from "../ag-grid-react/ag-grid-list.js";
|
|
7
|
+
import { deferColumnRuntimeStateGuard as f, isColumnRuntimeStateGuardDeferred as s, isColumnRuntimeStateGuardUpdating as d, rebuildColumnTreeCacheFromGrid as _, scheduleColumnRuntimeStateGuard as h } from "./column-runtime-state-guard.js";
|
|
8
|
+
import { DATA_TABLE_SCOPED_SHEET_HOST_MIN_HEIGHT_PX as E, DATA_TABLE_SHEET_SLIDE_TRANSITION_MS as A, TABLE_VIEWPORT_SHELL_EXPANDED_CLASS as L } from "./data-table-constants.js";
|
|
9
|
+
import { DataTableColumnList as g } from "./data-table-column-list.js";
|
|
10
|
+
import { DataTableContext as P, DataTableSheetPortalStoreContext as R, useDataTable as G, useDataTableSheetPortal as H, useDataTableSheetPortalStore as V } from "./data-table-context.js";
|
|
11
|
+
import { DataTableFormatOptions as O } from "./data-table-format-options.js";
|
|
12
|
+
import { DataTableSheet as N, DataTableSheetContent as v, DataTableSheetHeader as y, DataTableSheetTrigger as B } from "./data-table-sheet.js";
|
|
13
|
+
import { DataTableSheetBody as X, DataTableSheetSection as K, DataTableSheetTabPanel as U, DataTableSheetTabs as W, DataTableSheetTabsList as Z } from "./data-table-sheet-layout.js";
|
|
14
|
+
import { useDataTableSheet as k, useDataTableSheetApi as q } from "./data-table-sheet-context.js";
|
|
15
|
+
import { DataTableViewMenuContent as J, DataTableViewMenuDensity as Q, DataTableViewMenuSettingsItem as Y, DataTableViewMenuTrigger as $, DataTableViewMenuViewportExpand as ee } from "./data-table-view-menu.js";
|
|
16
|
+
import { DataTableSavedViews as te } from "./data-table-saved-views.js";
|
|
17
|
+
import { PinSwitch as oe } from "./pin-switch.js";
|
|
18
|
+
import { ColumnIndicator as Te } from "./column-indicator.js";
|
|
19
|
+
import { IndicatorLegend as ie } from "./indicator-legend.js";
|
|
20
|
+
import { resolveColumnSavability as ne } from "./column-savability.js";
|
|
21
|
+
import { mergePartialOrderedColumnState as be } from "./data-table-column-state.js";
|
|
22
|
+
import { useDataTableViewport as pe } from "./use-data-table-viewport.js";
|
|
21
23
|
export {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
p as AG_GRID_LIST_RANK_GRADIENT,
|
|
25
|
+
Te as ColumnIndicator,
|
|
26
|
+
E as DATA_TABLE_SCOPED_SHEET_HOST_MIN_HEIGHT_PX,
|
|
27
|
+
A as DATA_TABLE_SHEET_SLIDE_TRANSITION_MS,
|
|
26
28
|
t as DataTable,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
29
|
+
g as DataTableColumnList,
|
|
30
|
+
r as DataTableContent,
|
|
31
|
+
P as DataTableContext,
|
|
32
|
+
O as DataTableFormatOptions,
|
|
33
|
+
T as DataTableListHeader,
|
|
34
|
+
i as DataTableOverlay,
|
|
35
|
+
te as DataTableSavedViews,
|
|
36
|
+
N as DataTableSheet,
|
|
37
|
+
X as DataTableSheetBody,
|
|
38
|
+
v as DataTableSheetContent,
|
|
39
|
+
y as DataTableSheetHeader,
|
|
40
|
+
R as DataTableSheetPortalStoreContext,
|
|
41
|
+
K as DataTableSheetSection,
|
|
42
|
+
U as DataTableSheetTabPanel,
|
|
43
|
+
W as DataTableSheetTabs,
|
|
44
|
+
Z as DataTableSheetTabsList,
|
|
45
|
+
B as DataTableSheetTrigger,
|
|
46
|
+
o as DataTableToolbar,
|
|
47
|
+
J as DataTableViewMenuContent,
|
|
48
|
+
Q as DataTableViewMenuDensity,
|
|
49
|
+
Y as DataTableViewMenuSettingsItem,
|
|
50
|
+
$ as DataTableViewMenuTrigger,
|
|
51
|
+
ee as DataTableViewMenuViewportExpand,
|
|
52
|
+
ie as IndicatorLegend,
|
|
53
|
+
n as ListFindHighlight,
|
|
54
|
+
oe as PinSwitch,
|
|
55
|
+
L as TABLE_VIEWPORT_SHELL_EXPANDED_CLASS,
|
|
56
|
+
f as deferColumnRuntimeStateGuard,
|
|
57
|
+
s as isColumnRuntimeStateGuardDeferred,
|
|
58
|
+
d as isColumnRuntimeStateGuardUpdating,
|
|
59
|
+
be as mergePartialOrderedColumnState,
|
|
60
|
+
_ as rebuildColumnTreeCacheFromGrid,
|
|
61
|
+
ne as resolveColumnSavability,
|
|
62
|
+
h as scheduleColumnRuntimeStateGuard,
|
|
63
|
+
G as useDataTable,
|
|
64
|
+
k as useDataTableSheet,
|
|
65
|
+
q as useDataTableSheetApi,
|
|
66
|
+
H as useDataTableSheetPortal,
|
|
67
|
+
V as useDataTableSheetPortalStore,
|
|
68
|
+
pe as useDataTableViewport,
|
|
69
|
+
b as useListRowDropZones
|
|
66
70
|
};
|
|
@@ -3,7 +3,8 @@ import { Badge as s } from "../../data-display/badge/badge.js";
|
|
|
3
3
|
import { FilterPopoverContent as u } from "../../flows/filter-strip/filter-tag-list.js";
|
|
4
4
|
import { Popover as b, PopoverTrigger as f } from "../../feedback/popover/popover.js";
|
|
5
5
|
import { Tooltip as g, TooltipTrigger as v, TooltipContent as x } from "../../feedback/tooltip/tooltip.js";
|
|
6
|
-
|
|
6
|
+
import "react";
|
|
7
|
+
function I({
|
|
7
8
|
tags: o,
|
|
8
9
|
title: l = "Attributes",
|
|
9
10
|
maxVisibleTags: n = 4,
|
|
@@ -70,5 +71,5 @@ function w({
|
|
|
70
71
|
);
|
|
71
72
|
}
|
|
72
73
|
export {
|
|
73
|
-
|
|
74
|
+
I as ExpandableListItemAttributes
|
|
74
75
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
2
2
|
import { ScrollOverflowAffordance as o } from "../../layout/horizontal-scroller/scroll-overflow-affordance.js";
|
|
3
|
+
import "react";
|
|
3
4
|
import { OverflowTooltip as r } from "../../feedback/tooltip/overflow-tooltip.js";
|
|
4
5
|
const m = 128;
|
|
5
|
-
function
|
|
6
|
+
function f({
|
|
6
7
|
columns: i,
|
|
7
8
|
sectionId: l = "metrics"
|
|
8
9
|
}) {
|
|
@@ -50,5 +51,5 @@ function x({
|
|
|
50
51
|
);
|
|
51
52
|
}
|
|
52
53
|
export {
|
|
53
|
-
|
|
54
|
+
f as ExpandableListItemMetrics
|
|
54
55
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
function a(c, e = 0) {
|
|
2
|
+
return c.flatMap((n) => {
|
|
3
|
+
const t = n.children ?? [];
|
|
4
|
+
return [{
|
|
5
|
+
id: n.id,
|
|
6
|
+
label: n.label,
|
|
7
|
+
icon: n.icon,
|
|
8
|
+
swatch: n.swatch,
|
|
9
|
+
depth: e,
|
|
10
|
+
emphasized: t.length > 0
|
|
11
|
+
}, ...a(t, e + 1)];
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
a as flattenScenarioComparisonRows
|
|
16
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { ScenarioComparison } from './scenario-comparison';
|
|
2
|
+
export { flattenScenarioComparisonRows } from './flatten-scenario-comparison-rows';
|
|
3
|
+
export type { ScenarioComparisonProps, ScenarioComparisonRow, ScenarioComparisonColumn, ScenarioComparisonCell, FlatScenarioComparisonRow, ScenarioComparisonLabelState, ScenarioComparisonCellState, } from './scenario-comparison.types';
|