impact-nova 2.5.1 → 2.5.2
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/data-table/build-column-state-from-tree.d.ts +7 -0
- package/dist/components/data/data-table/build-column-state-from-tree.js +34 -0
- package/dist/components/data/data-table/column-runtime-state-guard.d.ts +17 -0
- package/dist/components/data/data-table/column-runtime-state-guard.js +69 -0
- package/dist/components/data/data-table/data-table-column-apply.d.ts +4 -0
- package/dist/components/data/data-table/data-table-column-apply.js +82 -65
- package/dist/components/data/data-table/data-table-column-list-sync.d.ts +4 -3
- package/dist/components/data/data-table/data-table-column-list-sync.js +6 -5
- package/dist/components/data/data-table/data-table-column-list.js +34 -36
- package/dist/components/data/data-table/data-table-column-tree-cache.d.ts +6 -4
- package/dist/components/data/data-table/data-table-column-tree-cache.js +102 -69
- package/dist/components/data/data-table/data-table.js +66 -61
- package/dist/components/data/data-table/index.d.ts +1 -0
- package/dist/components/data/data-table/index.js +50 -44
- package/dist/components/data/data-table/patch-column-tree-visibility-from-grid.d.ts +3 -0
- package/dist/components/data/data-table/patch-column-tree-visibility-from-grid.js +35 -0
- package/dist/components/data/data-table/use-data-table-column-list-sync.d.ts +0 -1
- package/dist/components/data/data-table/use-data-table-column-list-sync.js +194 -263
- 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/nested-list/components/SortableItem.js +43 -42
- package/dist/components/data/nested-list/nested-list-tree-utils.d.ts +8 -0
- package/dist/components/data/nested-list/nested-list-tree-utils.js +38 -12
- 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/select/components/SelectTriggerValue.js +3 -2
- package/dist/components/forms/select/components/Submenu.js +3 -2
- package/dist/index.js +292 -286
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ColumnState } from 'ag-grid-community';
|
|
2
|
+
import { NestedListItem } from '../nested-list/nested-list.types';
|
|
3
|
+
/**
|
|
4
|
+
* Build AG Grid `ColumnState` partials (hide, pinned, order) from a column-picker tree.
|
|
5
|
+
* O(n) over tree leaves; used by column-list sync and runtime state guard.
|
|
6
|
+
*/
|
|
7
|
+
export declare function buildColumnStateFromTree(rootItems: NestedListItem[]): ColumnState[];
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
function a(u) {
|
|
2
|
+
const c = [], l = (f, i) => {
|
|
3
|
+
f.forEach((r) => {
|
|
4
|
+
if (r.id === "root-frozen") {
|
|
5
|
+
r.children && l(r.children, "left");
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
if (r.id === "root-scrollable") {
|
|
9
|
+
r.children && l(r.children, null);
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
if (r.category === "group" || r.children && r.children.length > 0)
|
|
13
|
+
r.children && l(r.children, i);
|
|
14
|
+
else {
|
|
15
|
+
let t;
|
|
16
|
+
if (i === null)
|
|
17
|
+
t = null;
|
|
18
|
+
else {
|
|
19
|
+
const e = r.data?.pinned;
|
|
20
|
+
t = e === "left" || e === "right" ? e : i;
|
|
21
|
+
}
|
|
22
|
+
c.push({
|
|
23
|
+
colId: r.id,
|
|
24
|
+
pinned: t,
|
|
25
|
+
hide: !r.checked
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
return l(u, null), c;
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
a as buildColumnStateFromTree
|
|
34
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { GridApi } from 'ag-grid-community';
|
|
2
|
+
export declare function isColumnRuntimeStateGuardUpdating(gridApi: GridApi): boolean;
|
|
3
|
+
export declare function isColumnRuntimeStateGuardDeferred(gridApi: GridApi): boolean;
|
|
4
|
+
/**
|
|
5
|
+
* Suppress guard restore while an external authority (saved view, server metadata)
|
|
6
|
+
* applies column state. Cleared on the next macrotask so follow-up grid events settle.
|
|
7
|
+
*/
|
|
8
|
+
export declare function deferColumnRuntimeStateGuard(gridApi: GridApi): void;
|
|
9
|
+
/**
|
|
10
|
+
* Rebuild column-tree cache from the live grid (authority writers after apply).
|
|
11
|
+
*/
|
|
12
|
+
export declare function rebuildColumnTreeCacheFromGrid(gridApi: GridApi): void;
|
|
13
|
+
/**
|
|
14
|
+
* Subscribe once per grid: re-apply cached user column state after AG Grid
|
|
15
|
+
* structural reloads (`newColumnsLoaded`).
|
|
16
|
+
*/
|
|
17
|
+
export declare function scheduleColumnRuntimeStateGuard(gridApi: GridApi): () => void;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { buildColumnStateFromTree as c } from "./build-column-state-from-tree.js";
|
|
2
|
+
import { mergePartialOrderedColumnState as f } from "./data-table-column-state.js";
|
|
3
|
+
import { afterSynchronousColumnApply as d } from "./data-table-column-apply.js";
|
|
4
|
+
import { buildColumnTreeWithCache as C, readColumnTreeCache as y, readGridLayoutFingerprint as p, readGridVisibilityFingerprint as S, writeColumnTreeCache as b } from "./data-table-column-tree-cache.js";
|
|
5
|
+
import { subscribeGridApiEvent as h } from "../ag-grid-react/grid-api-event-subscription.js";
|
|
6
|
+
const u = {
|
|
7
|
+
frozenColumns: "__prewarm_frozen__",
|
|
8
|
+
scrollableColumns: "__prewarm_scrollable__"
|
|
9
|
+
}, n = /* @__PURE__ */ new WeakMap(), r = /* @__PURE__ */ new WeakMap();
|
|
10
|
+
function a(e) {
|
|
11
|
+
return typeof e.isDestroyed == "function" && e.isDestroyed();
|
|
12
|
+
}
|
|
13
|
+
function E(e) {
|
|
14
|
+
return r.get(e) === !0;
|
|
15
|
+
}
|
|
16
|
+
function _(e) {
|
|
17
|
+
return n.get(e) === !0;
|
|
18
|
+
}
|
|
19
|
+
function W(e) {
|
|
20
|
+
n.set(e, !0), globalThis.setTimeout(() => {
|
|
21
|
+
n.delete(e);
|
|
22
|
+
}, 0);
|
|
23
|
+
}
|
|
24
|
+
function G(e) {
|
|
25
|
+
a(e) || C(e, u);
|
|
26
|
+
}
|
|
27
|
+
function F(e) {
|
|
28
|
+
const t = y(e, u);
|
|
29
|
+
if (!t)
|
|
30
|
+
return;
|
|
31
|
+
const i = p(e), l = S(e);
|
|
32
|
+
if (i === t.gridLayoutFingerprint && l === t.gridVisibilityFingerprint)
|
|
33
|
+
return;
|
|
34
|
+
const o = c(t.items);
|
|
35
|
+
if (o.length === 0)
|
|
36
|
+
return;
|
|
37
|
+
r.set(e, !0);
|
|
38
|
+
const m = e.getColumnState(), s = f(m, o);
|
|
39
|
+
e.applyColumnState({ state: s, applyOrder: !0 }), d(() => {
|
|
40
|
+
r.delete(e), b(e, t.items);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function L(e) {
|
|
44
|
+
if (!a(e)) {
|
|
45
|
+
if (_(e)) {
|
|
46
|
+
G(e);
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
F(e);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function B(e) {
|
|
53
|
+
if (typeof e.addEventListener != "function")
|
|
54
|
+
return () => {
|
|
55
|
+
};
|
|
56
|
+
const t = h(e, "newColumnsLoaded", () => {
|
|
57
|
+
L(e);
|
|
58
|
+
});
|
|
59
|
+
return () => {
|
|
60
|
+
t(), r.delete(e), n.delete(e);
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
export {
|
|
64
|
+
W as deferColumnRuntimeStateGuard,
|
|
65
|
+
_ as isColumnRuntimeStateGuardDeferred,
|
|
66
|
+
E as isColumnRuntimeStateGuardUpdating,
|
|
67
|
+
G as rebuildColumnTreeCacheFromGrid,
|
|
68
|
+
B as scheduleColumnRuntimeStateGuard
|
|
69
|
+
};
|
|
@@ -18,6 +18,10 @@ export declare function readGridColumnPinned(gridApi: GridApi, columnId: string)
|
|
|
18
18
|
export declare function pinnedColumnIdsFromState(state: ColumnState[]): Set<string>;
|
|
19
19
|
/** Align `data.pinned` on leaves with frozen/scrollable section placement. */
|
|
20
20
|
export declare function alignColumnTreePinMetadata(items: NestedListItem[]): NestedListItem[];
|
|
21
|
+
/** Fingerprint for column-tree layout (order, pin section placement). */
|
|
22
|
+
export declare function fingerprintColumnTreeLayout(items: NestedListItem[]): string;
|
|
23
|
+
/** Fingerprint for column-tree visibility (leaf checked state). */
|
|
24
|
+
export declare function fingerprintColumnTreeVisibility(items: NestedListItem[]): string;
|
|
21
25
|
/** Cheap structural fingerprint for column-tree equality (order, pin, visibility). */
|
|
22
26
|
export declare function fingerprintColumnTreeItems(items: NestedListItem[]): string;
|
|
23
27
|
/** Fingerprint for sort/filter indicator badges on column-picker leaves. */
|
|
@@ -1,102 +1,119 @@
|
|
|
1
|
-
const
|
|
2
|
-
function
|
|
3
|
-
return
|
|
1
|
+
const s = 150, p = 300;
|
|
2
|
+
function u(i) {
|
|
3
|
+
return i === "left" || i === !0 ? "left" : i === "right" ? "right" : null;
|
|
4
4
|
}
|
|
5
|
-
function
|
|
6
|
-
return "pinned" in
|
|
5
|
+
function a(i, r) {
|
|
6
|
+
return "pinned" in i && i.pinned !== void 0 ? u(i.pinned) : u(r.getPinned());
|
|
7
7
|
}
|
|
8
|
-
function g(
|
|
9
|
-
const
|
|
10
|
-
if (!
|
|
11
|
-
const
|
|
12
|
-
return
|
|
8
|
+
function g(i, r) {
|
|
9
|
+
const e = i.getColumn(r);
|
|
10
|
+
if (!e) return null;
|
|
11
|
+
const o = i.getColumnState().find((n) => n.colId === r);
|
|
12
|
+
return o ? a(o, e) : u(e.getPinned());
|
|
13
13
|
}
|
|
14
|
-
function d(
|
|
15
|
-
return
|
|
16
|
-
if ((
|
|
14
|
+
function d(i, r) {
|
|
15
|
+
return i.map((e) => {
|
|
16
|
+
if ((e.category === "group" || e.children && e.children.length > 0) && e.children)
|
|
17
17
|
return {
|
|
18
|
-
...
|
|
19
|
-
children: d(
|
|
18
|
+
...e,
|
|
19
|
+
children: d(e.children, r)
|
|
20
20
|
};
|
|
21
|
-
const
|
|
22
|
-
let
|
|
23
|
-
if (
|
|
24
|
-
const
|
|
25
|
-
|
|
21
|
+
const n = e.data ?? {};
|
|
22
|
+
let t = null;
|
|
23
|
+
if (r !== null) {
|
|
24
|
+
const l = n.pinned;
|
|
25
|
+
t = l === "left" || l === "right" ? l : r;
|
|
26
26
|
}
|
|
27
27
|
return {
|
|
28
|
-
...
|
|
28
|
+
...e,
|
|
29
29
|
data: {
|
|
30
|
-
...
|
|
31
|
-
pinned:
|
|
30
|
+
...n,
|
|
31
|
+
pinned: t
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
|
-
function m(
|
|
37
|
-
return
|
|
38
|
-
...
|
|
39
|
-
children:
|
|
40
|
-
} :
|
|
41
|
-
...
|
|
42
|
-
children:
|
|
43
|
-
} :
|
|
36
|
+
function m(i) {
|
|
37
|
+
return i.map((r) => r.id === "root-frozen" ? {
|
|
38
|
+
...r,
|
|
39
|
+
children: r.children ? d(r.children, "left") : []
|
|
40
|
+
} : r.id === "root-scrollable" ? {
|
|
41
|
+
...r,
|
|
42
|
+
children: r.children ? d(r.children, null) : []
|
|
43
|
+
} : r);
|
|
44
44
|
}
|
|
45
|
-
function C(
|
|
46
|
-
const
|
|
47
|
-
for (const
|
|
48
|
-
if (
|
|
49
|
-
|
|
45
|
+
function C(i) {
|
|
46
|
+
const r = [], e = (o, n) => {
|
|
47
|
+
for (const t of o) {
|
|
48
|
+
if (t.id === "root-frozen") {
|
|
49
|
+
t.children && e(t.children, "left");
|
|
50
50
|
continue;
|
|
51
51
|
}
|
|
52
|
-
if (
|
|
53
|
-
|
|
52
|
+
if (t.id === "root-scrollable") {
|
|
53
|
+
t.children && e(t.children, null);
|
|
54
54
|
continue;
|
|
55
55
|
}
|
|
56
|
-
if ((
|
|
57
|
-
|
|
56
|
+
if ((t.category === "group" || t.children && t.children.length > 0) && t.children) {
|
|
57
|
+
e(t.children, n);
|
|
58
58
|
continue;
|
|
59
59
|
}
|
|
60
|
-
let
|
|
61
|
-
if (
|
|
62
|
-
const
|
|
63
|
-
|
|
60
|
+
let f = "0";
|
|
61
|
+
if (n !== null) {
|
|
62
|
+
const c = t.data?.pinned;
|
|
63
|
+
f = c === "left" || c === "right" ? c : "left";
|
|
64
64
|
}
|
|
65
|
-
|
|
65
|
+
r.push(`${t.id}:${f}`);
|
|
66
66
|
}
|
|
67
67
|
};
|
|
68
|
-
return
|
|
68
|
+
return e(i, null), r.join("|");
|
|
69
69
|
}
|
|
70
|
-
function G(
|
|
71
|
-
const
|
|
72
|
-
for (const
|
|
73
|
-
if (
|
|
74
|
-
|
|
70
|
+
function G(i) {
|
|
71
|
+
const r = [], e = (o) => {
|
|
72
|
+
for (const n of o) {
|
|
73
|
+
if (n.id === "root-frozen" || n.id === "root-scrollable") {
|
|
74
|
+
n.children && e(n.children);
|
|
75
75
|
continue;
|
|
76
76
|
}
|
|
77
|
-
if ((
|
|
78
|
-
|
|
77
|
+
if ((n.category === "group" || n.children && n.children.length > 0) && n.children) {
|
|
78
|
+
e(n.children);
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
r.push(`${n.id}:${n.checked ? "1" : "0"}`);
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
return e(i), r.join("|");
|
|
85
|
+
}
|
|
86
|
+
function y(i) {
|
|
87
|
+
const r = [], e = (o) => {
|
|
88
|
+
for (const n of o) {
|
|
89
|
+
if (n.id === "root-frozen" || n.id === "root-scrollable") {
|
|
90
|
+
n.children && e(n.children);
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
if ((n.category === "group" || n.children && n.children.length > 0) && n.children) {
|
|
94
|
+
e(n.children);
|
|
79
95
|
continue;
|
|
80
96
|
}
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
`${
|
|
97
|
+
const l = n.data;
|
|
98
|
+
r.push(
|
|
99
|
+
`${n.id}:${l?.hasSortApplied ? "1" : "0"}:${l?.hasFilterApplied ? "1" : "0"}`
|
|
84
100
|
);
|
|
85
101
|
}
|
|
86
102
|
};
|
|
87
|
-
return
|
|
103
|
+
return e(i), r.join("|");
|
|
88
104
|
}
|
|
89
|
-
function S(
|
|
90
|
-
queueMicrotask(
|
|
105
|
+
function S(i) {
|
|
106
|
+
queueMicrotask(i);
|
|
91
107
|
}
|
|
92
108
|
export {
|
|
93
|
-
|
|
94
|
-
|
|
109
|
+
s as EXTERNAL_SYNC_DEBOUNCE_MS,
|
|
110
|
+
p as GRID_AUTO_UNPIN_WAIT_MS,
|
|
95
111
|
S as afterSynchronousColumnApply,
|
|
96
112
|
m as alignColumnTreePinMetadata,
|
|
97
|
-
|
|
98
|
-
C as
|
|
99
|
-
|
|
113
|
+
y as fingerprintColumnTreeIndicators,
|
|
114
|
+
C as fingerprintColumnTreeLayout,
|
|
115
|
+
G as fingerprintColumnTreeVisibility,
|
|
116
|
+
u as normalizeColumnPinned,
|
|
100
117
|
g as readGridColumnPinned,
|
|
101
|
-
|
|
118
|
+
a as resolveColumnPinnedFromGridState
|
|
102
119
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { NestedListItem } from '../nested-list/nested-list.types';
|
|
2
|
-
export type ColumnListSyncMode = 'skip' | 'indicators-only' | 'structural';
|
|
2
|
+
export type ColumnListSyncMode = 'skip' | 'indicators-only' | 'visibility-only' | 'structural';
|
|
3
3
|
export interface ColumnListSyncFingerprints {
|
|
4
|
-
|
|
4
|
+
layout: string;
|
|
5
|
+
visibility: string;
|
|
5
6
|
indicators: string;
|
|
6
7
|
}
|
|
7
8
|
export declare function computeColumnListSyncFingerprints(rootItems: NestedListItem[]): ColumnListSyncFingerprints;
|
|
8
|
-
export declare function resolveColumnListSyncMode(rootItems: NestedListItem[],
|
|
9
|
+
export declare function resolveColumnListSyncMode(rootItems: NestedListItem[], previousFingerprints: ColumnListSyncFingerprints): ColumnListSyncMode;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { fingerprintColumnTreeIndicators as n,
|
|
2
|
-
function
|
|
1
|
+
import { fingerprintColumnTreeIndicators as n, fingerprintColumnTreeVisibility as r, fingerprintColumnTreeLayout as t } from "./data-table-column-apply.js";
|
|
2
|
+
function o(i) {
|
|
3
3
|
return {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
layout: t(i),
|
|
5
|
+
visibility: r(i),
|
|
6
|
+
indicators: n(i)
|
|
6
7
|
};
|
|
7
8
|
}
|
|
8
9
|
export {
|
|
9
|
-
|
|
10
|
+
o as computeColumnListSyncFingerprints
|
|
10
11
|
};
|
|
@@ -1,88 +1,86 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as
|
|
1
|
+
import { jsxs as D, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as _, useState as F, useMemo as O, useCallback as i } from "react";
|
|
3
3
|
import { useDataTable as E } from "./data-table-context.js";
|
|
4
|
-
import { useDataTableSheet as
|
|
5
|
-
import { NestedList as
|
|
6
|
-
import { SelectionMode as
|
|
7
|
-
import { useImpactNovaI18n as
|
|
8
|
-
import { countNestedListLeaves as
|
|
9
|
-
import { PinSwitch as
|
|
4
|
+
import { useDataTableSheet as y } from "./data-table-sheet-context.js";
|
|
5
|
+
import { NestedList as z } from "../nested-list/nested-list.js";
|
|
6
|
+
import { SelectionMode as P } from "../nested-list/nested-list.types.js";
|
|
7
|
+
import { useImpactNovaI18n as R } from "../../../i18n/use-impact-nova-i18n.js";
|
|
8
|
+
import { countNestedListLeaves as k, buildCollapsedStateForAllGroups as M } from "../nested-list/nested-list-tree-utils.js";
|
|
9
|
+
import { PinSwitch as j } from "./pin-switch.js";
|
|
10
10
|
import { ColumnIndicator as m } from "./column-indicator.js";
|
|
11
|
-
import { IndicatorLegend as
|
|
12
|
-
import { useDataTableColumnListSync as
|
|
13
|
-
const
|
|
11
|
+
import { IndicatorLegend as G } from "./indicator-legend.js";
|
|
12
|
+
import { useDataTableColumnListSync as H } from "./use-data-table-column-list-sync.js";
|
|
13
|
+
const U = 100, te = ({
|
|
14
14
|
enableApplyDiscard: o = !1,
|
|
15
15
|
showSearch: d = !0,
|
|
16
16
|
showSelectAll: p = !0,
|
|
17
17
|
showCollapse: f = !0
|
|
18
18
|
}) => {
|
|
19
|
-
const { gridApi: h } = E(), { open: C } =
|
|
19
|
+
const { gridApi: h } = E(), { open: C } = y(), { t: r } = R(), b = _({}), [l, L] = F({}), {
|
|
20
20
|
items: a,
|
|
21
|
-
isReady:
|
|
22
|
-
|
|
23
|
-
listWrapperRef: A,
|
|
21
|
+
isReady: S,
|
|
22
|
+
listWrapperRef: g,
|
|
24
23
|
handleChange: c,
|
|
25
|
-
handleSubmit:
|
|
24
|
+
handleSubmit: A,
|
|
26
25
|
handlePinChange: u
|
|
27
|
-
} =
|
|
26
|
+
} = H({
|
|
28
27
|
gridApi: h,
|
|
29
28
|
frozenColumnsLabel: r("dataTable.frozenColumns"),
|
|
30
29
|
scrollableColumnsLabel: r("dataTable.scrollableColumns"),
|
|
31
30
|
isSyncActive: C
|
|
32
|
-
}),
|
|
31
|
+
}), T = O(() => Object.keys(l).length > 0 || a.length === 0 || k(a) <= U ? l : M(a), [l, a]), x = i(
|
|
33
32
|
(e) => {
|
|
34
33
|
c(e, o);
|
|
35
34
|
},
|
|
36
35
|
[o, c]
|
|
37
|
-
),
|
|
36
|
+
), I = i(
|
|
38
37
|
(e, s) => {
|
|
39
38
|
if (!s.isLeaf) return null;
|
|
40
39
|
const t = e.data;
|
|
41
|
-
return !t?.hasSortApplied && !t?.hasFilterApplied ? null : /* @__PURE__ */
|
|
40
|
+
return !t?.hasSortApplied && !t?.hasFilterApplied ? null : /* @__PURE__ */ D("span", { className: "inline-flex items-center gap-1 shrink-0", children: [
|
|
42
41
|
t?.hasSortApplied && /* @__PURE__ */ n(m, { type: "sort" }),
|
|
43
42
|
t?.hasFilterApplied && /* @__PURE__ */ n(m, { type: "filter" })
|
|
44
43
|
] });
|
|
45
44
|
},
|
|
46
45
|
[]
|
|
47
|
-
),
|
|
46
|
+
), N = i(
|
|
48
47
|
(e, s) => {
|
|
49
48
|
const t = e.data;
|
|
50
|
-
return e.category === "structure" ? e.id !== "root-frozen" ? null : /* @__PURE__ */ n(
|
|
51
|
-
|
|
49
|
+
return e.category === "structure" ? e.id !== "root-frozen" ? null : /* @__PURE__ */ n(G, {}) : !s.isLeaf || !(t?.pinned === "left" || t?.pinned === "right") ? null : /* @__PURE__ */ n(
|
|
50
|
+
j,
|
|
52
51
|
{
|
|
53
52
|
value: t?.pinned ?? null,
|
|
54
|
-
onChange: (
|
|
53
|
+
onChange: (v) => u(e.id, v),
|
|
55
54
|
className: "shrink-0"
|
|
56
55
|
}
|
|
57
56
|
);
|
|
58
57
|
},
|
|
59
58
|
[u]
|
|
60
59
|
);
|
|
61
|
-
return
|
|
62
|
-
|
|
60
|
+
return S ? /* @__PURE__ */ n("div", { ref: g, className: "flex flex-col flex-1 min-h-0 bg-canvas-elevated", children: /* @__PURE__ */ n(
|
|
61
|
+
z,
|
|
63
62
|
{
|
|
64
63
|
items: a,
|
|
65
|
-
onChange:
|
|
66
|
-
onSubmit:
|
|
67
|
-
renderLabelExtras:
|
|
68
|
-
renderActions:
|
|
64
|
+
onChange: x,
|
|
65
|
+
onSubmit: A,
|
|
66
|
+
renderLabelExtras: I,
|
|
67
|
+
renderActions: N,
|
|
69
68
|
enableApplyDiscard: o,
|
|
70
69
|
enableSearch: d,
|
|
71
70
|
enableSelectAll: p,
|
|
72
71
|
enableDragDrop: !0,
|
|
73
72
|
enableCollapse: !0,
|
|
74
73
|
enableGlobalCollapse: f,
|
|
75
|
-
selectionMode:
|
|
74
|
+
selectionMode: P.CASCADE_DOWN,
|
|
76
75
|
searchPlaceholder: r("dataTable.searchColumnsPlaceholder"),
|
|
77
76
|
className: "flex-1 min-h-0",
|
|
78
|
-
initialCollapsedItems:
|
|
77
|
+
initialCollapsedItems: T,
|
|
79
78
|
onCollapseChange: (e) => {
|
|
80
|
-
b.current = e,
|
|
79
|
+
b.current = e, L(e);
|
|
81
80
|
}
|
|
82
|
-
}
|
|
83
|
-
`data-table-column-list-${g}`
|
|
81
|
+
}
|
|
84
82
|
) }) : /* @__PURE__ */ n("div", { className: "p-4 text-[13px] text-content-placeholder", children: r("dataTable.loadingColumns") });
|
|
85
83
|
};
|
|
86
84
|
export {
|
|
87
|
-
|
|
85
|
+
te as DataTableColumnList
|
|
88
86
|
};
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { GridApi } from 'ag-grid-community';
|
|
2
2
|
import { NestedListItem } from '../nested-list/nested-list.types';
|
|
3
3
|
import { BuildColumnTreeLabels } from './build-column-tree-from-grid';
|
|
4
|
-
import { ColumnListSyncFingerprints } from './data-table-column-list-sync';
|
|
4
|
+
import { ColumnListSyncFingerprints, ColumnListSyncMode } from './data-table-column-list-sync';
|
|
5
5
|
interface ColumnTreeCacheEntry {
|
|
6
6
|
fingerprints: ColumnListSyncFingerprints;
|
|
7
7
|
items: NestedListItem[];
|
|
8
|
-
|
|
8
|
+
gridLayoutFingerprint: string;
|
|
9
|
+
gridVisibilityFingerprint: string;
|
|
9
10
|
}
|
|
10
|
-
export declare function
|
|
11
|
+
export declare function readGridLayoutFingerprint(gridApi: GridApi): string;
|
|
12
|
+
export declare function readGridVisibilityFingerprint(gridApi: GridApi): string;
|
|
11
13
|
export declare function readColumnTreeCache(gridApi: GridApi, labels: BuildColumnTreeLabels): ColumnTreeCacheEntry | null;
|
|
12
14
|
export declare function writeColumnTreeCache(gridApi: GridApi, rootItems: NestedListItem[]): ColumnListSyncFingerprints;
|
|
13
15
|
export declare function buildColumnTreeWithCache(gridApi: GridApi, labels: BuildColumnTreeLabels): NestedListItem[] | null;
|
|
@@ -17,7 +19,7 @@ export declare function resolveColumnTreeFromCacheOrGrid(options: {
|
|
|
17
19
|
previousFingerprints: ColumnListSyncFingerprints;
|
|
18
20
|
}): {
|
|
19
21
|
rootItems: NestedListItem[] | null;
|
|
20
|
-
syncMode:
|
|
22
|
+
syncMode: ColumnListSyncMode;
|
|
21
23
|
fingerprints: ColumnListSyncFingerprints;
|
|
22
24
|
};
|
|
23
25
|
export declare function peekColumnListSyncWouldSkip(options: {
|