impact-nova 2.5.0 → 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/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/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
|
@@ -1,117 +1,150 @@
|
|
|
1
|
-
import { buildColumnTreeFromGrid as
|
|
2
|
-
import { computeColumnListSyncFingerprints as
|
|
3
|
-
import { fingerprintColumnTreeIndicators as
|
|
4
|
-
import { patchColumnTreeIndicatorsFromGrid as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { buildColumnTreeFromGrid as G } from "./build-column-tree-from-grid.js";
|
|
2
|
+
import { computeColumnListSyncFingerprints as _ } from "./data-table-column-list-sync.js";
|
|
3
|
+
import { fingerprintColumnTreeIndicators as M, normalizeColumnPinned as w } from "./data-table-column-apply.js";
|
|
4
|
+
import { patchColumnTreeIndicatorsFromGrid as V } from "./patch-column-tree-indicators-from-grid.js";
|
|
5
|
+
import { patchColumnTreeVisibilityFromGrid as C } from "./patch-column-tree-visibility-from-grid.js";
|
|
6
|
+
function f(n) {
|
|
7
|
+
return n.map((i) => {
|
|
8
|
+
const r = w(i.pinned) ?? "0";
|
|
9
|
+
return `${i.colId}:${r}`;
|
|
9
10
|
}).join("|");
|
|
10
11
|
}
|
|
11
12
|
function d(n) {
|
|
12
|
-
return
|
|
13
|
+
return n.map((i) => `${i.colId}:${i.hide ? "0" : "1"}`).join("|");
|
|
13
14
|
}
|
|
14
|
-
|
|
15
|
+
function H(n) {
|
|
16
|
+
return f(n.getColumnState());
|
|
17
|
+
}
|
|
18
|
+
function O(n) {
|
|
19
|
+
return d(n.getColumnState());
|
|
20
|
+
}
|
|
21
|
+
const p = /* @__PURE__ */ new WeakMap(), F = {
|
|
15
22
|
frozenColumns: "__prewarm_frozen__",
|
|
16
23
|
scrollableColumns: "__prewarm_scrollable__"
|
|
17
24
|
};
|
|
18
|
-
function
|
|
25
|
+
function P(n) {
|
|
19
26
|
return typeof n.isDestroyed == "function" && n.isDestroyed();
|
|
20
27
|
}
|
|
21
|
-
function
|
|
22
|
-
return n.map((
|
|
28
|
+
function I(n, i) {
|
|
29
|
+
return n.map((r) => r.id === "root-frozen" ? { ...r, label: i.frozenColumns } : r.id === "root-scrollable" ? { ...r, label: i.scrollableColumns } : r);
|
|
23
30
|
}
|
|
24
|
-
function
|
|
25
|
-
const
|
|
26
|
-
return
|
|
27
|
-
fingerprints:
|
|
28
|
-
items:
|
|
29
|
-
|
|
31
|
+
function b(n, i) {
|
|
32
|
+
const r = p.get(n);
|
|
33
|
+
return r ? {
|
|
34
|
+
fingerprints: r.fingerprints,
|
|
35
|
+
items: I(r.items, i),
|
|
36
|
+
gridLayoutFingerprint: r.gridLayoutFingerprint,
|
|
37
|
+
gridVisibilityFingerprint: r.gridVisibilityFingerprint
|
|
30
38
|
} : null;
|
|
31
39
|
}
|
|
32
|
-
function
|
|
33
|
-
const
|
|
34
|
-
return
|
|
35
|
-
fingerprints:
|
|
36
|
-
items:
|
|
37
|
-
|
|
38
|
-
|
|
40
|
+
function l(n, i) {
|
|
41
|
+
const r = _(i), t = n.getColumnState();
|
|
42
|
+
return p.set(n, {
|
|
43
|
+
fingerprints: r,
|
|
44
|
+
items: I(i, F),
|
|
45
|
+
gridLayoutFingerprint: f(t),
|
|
46
|
+
gridVisibilityFingerprint: d(t)
|
|
47
|
+
}), r;
|
|
39
48
|
}
|
|
40
|
-
function
|
|
41
|
-
const
|
|
42
|
-
return
|
|
49
|
+
function h(n, i) {
|
|
50
|
+
const r = G(n, i);
|
|
51
|
+
return r ? (l(n, r), r) : null;
|
|
43
52
|
}
|
|
44
|
-
function
|
|
45
|
-
const { gridApi:
|
|
46
|
-
if (
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
),
|
|
51
|
-
if (!
|
|
52
|
-
if (
|
|
53
|
-
const
|
|
53
|
+
function z(n) {
|
|
54
|
+
const { gridApi: i, labels: r, previousFingerprints: t } = n, e = b(i, r), y = i.getColumnState(), v = f(y), T = d(y), k = t.layout === "" && t.visibility === "" && t.indicators === "";
|
|
55
|
+
if (e) {
|
|
56
|
+
const s = V(
|
|
57
|
+
e.items,
|
|
58
|
+
i
|
|
59
|
+
), S = M(s), u = v !== e.gridLayoutFingerprint, c = T !== e.gridVisibilityFingerprint, a = S !== e.fingerprints.indicators;
|
|
60
|
+
if (!u && !c && !a) {
|
|
61
|
+
if (k) {
|
|
62
|
+
const o = l(i, s);
|
|
54
63
|
return {
|
|
55
|
-
rootItems:
|
|
64
|
+
rootItems: s,
|
|
56
65
|
syncMode: "structural",
|
|
57
|
-
fingerprints:
|
|
66
|
+
fingerprints: o
|
|
58
67
|
};
|
|
59
68
|
}
|
|
60
69
|
return {
|
|
61
70
|
rootItems: null,
|
|
62
71
|
syncMode: "skip",
|
|
63
|
-
fingerprints:
|
|
72
|
+
fingerprints: e.fingerprints
|
|
64
73
|
};
|
|
65
74
|
}
|
|
66
|
-
if (!
|
|
67
|
-
const
|
|
75
|
+
if (!u && c && !a) {
|
|
76
|
+
const o = C(
|
|
77
|
+
s,
|
|
78
|
+
i
|
|
79
|
+
), m = l(i, o);
|
|
68
80
|
return {
|
|
69
81
|
rootItems: o,
|
|
82
|
+
syncMode: "visibility-only",
|
|
83
|
+
fingerprints: m
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
if (!u && !c && a) {
|
|
87
|
+
const o = l(i, s);
|
|
88
|
+
return {
|
|
89
|
+
rootItems: s,
|
|
70
90
|
syncMode: "indicators-only",
|
|
71
|
-
fingerprints:
|
|
91
|
+
fingerprints: o
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
if (!u && c && a) {
|
|
95
|
+
const o = C(
|
|
96
|
+
s,
|
|
97
|
+
i
|
|
98
|
+
), m = l(i, o);
|
|
99
|
+
return {
|
|
100
|
+
rootItems: o,
|
|
101
|
+
syncMode: "visibility-only",
|
|
102
|
+
fingerprints: m
|
|
72
103
|
};
|
|
73
104
|
}
|
|
74
105
|
}
|
|
75
|
-
const
|
|
76
|
-
if (!
|
|
106
|
+
const g = h(i, r);
|
|
107
|
+
if (!g)
|
|
77
108
|
return {
|
|
78
109
|
rootItems: null,
|
|
79
110
|
syncMode: "skip",
|
|
80
|
-
fingerprints:
|
|
111
|
+
fingerprints: t
|
|
81
112
|
};
|
|
82
|
-
const
|
|
83
|
-
|
|
113
|
+
const L = b(i, r)?.fingerprints ?? {
|
|
114
|
+
layout: "",
|
|
115
|
+
visibility: "",
|
|
84
116
|
indicators: ""
|
|
85
117
|
};
|
|
86
118
|
return {
|
|
87
|
-
rootItems:
|
|
119
|
+
rootItems: g,
|
|
88
120
|
syncMode: "structural",
|
|
89
|
-
fingerprints:
|
|
121
|
+
fingerprints: L
|
|
90
122
|
};
|
|
91
123
|
}
|
|
92
|
-
function
|
|
124
|
+
function $(n) {
|
|
93
125
|
return typeof n.getColumnState == "function" && (typeof n.getAllGridColumns == "function" || typeof n.getColumns == "function");
|
|
94
126
|
}
|
|
95
|
-
function
|
|
96
|
-
return
|
|
127
|
+
function B(n) {
|
|
128
|
+
return z(n).syncMode === "skip";
|
|
97
129
|
}
|
|
98
|
-
function
|
|
99
|
-
let
|
|
100
|
-
const
|
|
101
|
-
|
|
130
|
+
function E(n) {
|
|
131
|
+
let i = !1, r = 0, t;
|
|
132
|
+
const e = () => {
|
|
133
|
+
i || P(n) || !$(n) || p.has(n) || h(n, F);
|
|
102
134
|
};
|
|
103
|
-
return
|
|
104
|
-
|
|
135
|
+
return r = requestAnimationFrame(() => {
|
|
136
|
+
i || (typeof requestIdleCallback < "u" ? t = requestIdleCallback(e, { timeout: 3e3 }) : setTimeout(e, 0));
|
|
105
137
|
}), () => {
|
|
106
|
-
|
|
138
|
+
i = !0, r && cancelAnimationFrame(r), t !== void 0 && typeof cancelIdleCallback < "u" && cancelIdleCallback(t);
|
|
107
139
|
};
|
|
108
140
|
}
|
|
109
141
|
export {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
142
|
+
h as buildColumnTreeWithCache,
|
|
143
|
+
B as peekColumnListSyncWouldSkip,
|
|
144
|
+
b as readColumnTreeCache,
|
|
145
|
+
H as readGridLayoutFingerprint,
|
|
146
|
+
O as readGridVisibilityFingerprint,
|
|
147
|
+
z as resolveColumnTreeFromCacheOrGrid,
|
|
148
|
+
E as scheduleColumnTreePrewarm,
|
|
149
|
+
l as writeColumnTreeCache
|
|
117
150
|
};
|
|
@@ -1,58 +1,63 @@
|
|
|
1
1
|
import { jsx as i, jsxs as I } from "react/jsx-runtime";
|
|
2
|
-
import { useState as h, useMemo as p, useCallback as
|
|
2
|
+
import { useState as h, useMemo as p, useCallback as D, useEffect as A, memo as w, useRef as O, useLayoutEffect as N } from "react";
|
|
3
3
|
import { AgGridWrapper as M } from "../ag-grid-react/index.js";
|
|
4
4
|
import { cn as _ } from "../../../lib/utils.js";
|
|
5
5
|
import { DataTableContext as F, DataTableSheetPortalStoreContext as z, useDataTable as B, useDataTableSheetPortal as P } from "./data-table-context.js";
|
|
6
6
|
import { createDataTableSheetPortalStore as L } from "./data-table-sheet-portal-store.js";
|
|
7
7
|
import { DATA_TABLE_SCOPED_SHEET_HOST_MIN_HEIGHT_PX as v, DATA_TABLE_SHEET_SLIDE_TRANSITION_MS as j } from "./data-table-constants.js";
|
|
8
8
|
import { scheduleColumnTreePrewarm as k } from "./data-table-column-tree-cache.js";
|
|
9
|
-
import {
|
|
9
|
+
import { scheduleColumnRuntimeStateGuard as W } from "./column-runtime-state-guard.js";
|
|
10
|
+
import { extractRuntimeColumnDefs as X, mergeInitialGridRuntimeState as V } from "./data-table-column-def-pin.js";
|
|
10
11
|
const R = {
|
|
11
12
|
default: 46,
|
|
12
13
|
compact: 30,
|
|
13
14
|
comfort: 52
|
|
14
|
-
},
|
|
15
|
+
}, ie = ({
|
|
15
16
|
children: a,
|
|
16
17
|
className: r
|
|
17
18
|
}) => {
|
|
18
|
-
const [t, e] = h(null), [o, s] = h("medium"), [n,
|
|
19
|
-
|
|
20
|
-
}, [
|
|
21
|
-
e(
|
|
19
|
+
const [t, e] = h(null), [o, s] = h("medium"), [n, d] = h("full"), [l, u] = h("default"), m = p(() => L(), []), f = D((c) => {
|
|
20
|
+
m.registerScopedSheetDepth(c);
|
|
21
|
+
}, [m]), g = D((c) => {
|
|
22
|
+
e(c);
|
|
22
23
|
}, []);
|
|
23
|
-
|
|
24
|
-
if (t)
|
|
25
|
-
return
|
|
24
|
+
A(() => {
|
|
25
|
+
if (!t)
|
|
26
|
+
return;
|
|
27
|
+
const c = k(t), S = W(t);
|
|
28
|
+
return () => {
|
|
29
|
+
c(), S();
|
|
30
|
+
};
|
|
26
31
|
}, [t]);
|
|
27
|
-
const
|
|
32
|
+
const H = {
|
|
28
33
|
small: "12px",
|
|
29
34
|
medium: "14px",
|
|
30
35
|
large: "16px"
|
|
31
|
-
}[o],
|
|
36
|
+
}[o], x = `${R[l]}px`, b = p(
|
|
32
37
|
() => ({
|
|
33
38
|
gridApi: t,
|
|
34
39
|
registerApi: g,
|
|
35
|
-
registerScopedSheetDepth:
|
|
40
|
+
registerScopedSheetDepth: f,
|
|
36
41
|
fontSize: o,
|
|
37
42
|
setFontSize: s,
|
|
38
43
|
numericFormat: n,
|
|
39
|
-
setNumericFormat:
|
|
44
|
+
setNumericFormat: d,
|
|
40
45
|
rowHeight: l,
|
|
41
|
-
setRowHeight:
|
|
46
|
+
setRowHeight: u
|
|
42
47
|
}),
|
|
43
48
|
[
|
|
44
49
|
t,
|
|
45
50
|
g,
|
|
46
|
-
|
|
51
|
+
f,
|
|
47
52
|
o,
|
|
48
53
|
n,
|
|
49
54
|
l
|
|
50
55
|
]
|
|
51
56
|
);
|
|
52
|
-
return /* @__PURE__ */ i(F.Provider, { value:
|
|
57
|
+
return /* @__PURE__ */ i(F.Provider, { value: b, children: /* @__PURE__ */ i(
|
|
53
58
|
z.Provider,
|
|
54
59
|
{
|
|
55
|
-
value:
|
|
60
|
+
value: m,
|
|
56
61
|
children: /* @__PURE__ */ i(
|
|
57
62
|
"div",
|
|
58
63
|
{
|
|
@@ -62,8 +67,8 @@ const R = {
|
|
|
62
67
|
r
|
|
63
68
|
),
|
|
64
69
|
style: {
|
|
65
|
-
"--ag-font-size":
|
|
66
|
-
"--ag-row-height":
|
|
70
|
+
"--ag-font-size": H,
|
|
71
|
+
"--ag-row-height": x
|
|
67
72
|
},
|
|
68
73
|
children: a
|
|
69
74
|
}
|
|
@@ -76,7 +81,7 @@ const R = {
|
|
|
76
81
|
m: "mil",
|
|
77
82
|
b: "bil",
|
|
78
83
|
full_precision: "full_precision"
|
|
79
|
-
},
|
|
84
|
+
}, Y = w(function() {
|
|
80
85
|
const { setSheetTarget: r } = P();
|
|
81
86
|
return /* @__PURE__ */ i(
|
|
82
87
|
"div",
|
|
@@ -85,7 +90,7 @@ const R = {
|
|
|
85
90
|
className: "absolute inset-0 pointer-events-none z-[39] flex overflow-hidden"
|
|
86
91
|
}
|
|
87
92
|
);
|
|
88
|
-
}),
|
|
93
|
+
}), $ = w(function({
|
|
89
94
|
className: r,
|
|
90
95
|
children: t
|
|
91
96
|
}) {
|
|
@@ -93,14 +98,14 @@ const R = {
|
|
|
93
98
|
!e && s && n(!1), N(() => {
|
|
94
99
|
if (!e || (o.current?.clientHeight ?? 0) >= v)
|
|
95
100
|
return;
|
|
96
|
-
const
|
|
101
|
+
const u = window.setTimeout(() => {
|
|
97
102
|
n(!0);
|
|
98
103
|
}, j);
|
|
99
104
|
return () => {
|
|
100
|
-
window.clearTimeout(
|
|
105
|
+
window.clearTimeout(u);
|
|
101
106
|
};
|
|
102
107
|
}, [e]);
|
|
103
|
-
const
|
|
108
|
+
const d = e && s;
|
|
104
109
|
return /* @__PURE__ */ I(
|
|
105
110
|
"div",
|
|
106
111
|
{
|
|
@@ -109,14 +114,14 @@ const R = {
|
|
|
109
114
|
"relative flex-1 min-h-0 w-full bg-canvas-elevated rounded-b-[inherit] grid-rounded-bottom",
|
|
110
115
|
r
|
|
111
116
|
),
|
|
112
|
-
style:
|
|
117
|
+
style: d ? { minHeight: v } : void 0,
|
|
113
118
|
children: [
|
|
114
119
|
t,
|
|
115
|
-
/* @__PURE__ */ i(
|
|
120
|
+
/* @__PURE__ */ i(Y, {})
|
|
116
121
|
]
|
|
117
122
|
}
|
|
118
123
|
);
|
|
119
|
-
}),
|
|
124
|
+
}), q = w(function({
|
|
120
125
|
resolvedRowHeight: r,
|
|
121
126
|
mergedContext: t,
|
|
122
127
|
onGridReady: e,
|
|
@@ -136,7 +141,7 @@ const R = {
|
|
|
136
141
|
}
|
|
137
142
|
);
|
|
138
143
|
});
|
|
139
|
-
function
|
|
144
|
+
function ae(a) {
|
|
140
145
|
const {
|
|
141
146
|
registerApi: r,
|
|
142
147
|
rowHeight: t,
|
|
@@ -145,61 +150,61 @@ function ne(a) {
|
|
|
145
150
|
} = B(), {
|
|
146
151
|
className: s,
|
|
147
152
|
onGridReady: n,
|
|
148
|
-
rowHeight:
|
|
153
|
+
rowHeight: d,
|
|
149
154
|
context: l,
|
|
150
|
-
columnDefs:
|
|
151
|
-
initialState:
|
|
152
|
-
suppressInitialRuntimeState:
|
|
155
|
+
columnDefs: u,
|
|
156
|
+
initialState: m,
|
|
157
|
+
suppressInitialRuntimeState: f,
|
|
153
158
|
maintainColumnOrder: g = !0,
|
|
154
|
-
...
|
|
155
|
-
} = a,
|
|
156
|
-
() =>
|
|
157
|
-
[
|
|
159
|
+
...H
|
|
160
|
+
} = a, x = R[t], b = d ?? x, { runtimeColumnDefs: c, extractedRuntimeDefaults: S } = p(
|
|
161
|
+
() => X(u ?? void 0),
|
|
162
|
+
[u]
|
|
158
163
|
), C = p(
|
|
159
|
-
() =>
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
164
|
+
() => V(
|
|
165
|
+
m,
|
|
166
|
+
S,
|
|
167
|
+
f
|
|
163
168
|
),
|
|
164
|
-
[
|
|
165
|
-
),
|
|
169
|
+
[m, S, f]
|
|
170
|
+
), G = p(
|
|
166
171
|
() => ({
|
|
167
172
|
...l,
|
|
168
173
|
formatType: y[o]
|
|
169
174
|
}),
|
|
170
175
|
[l, o]
|
|
171
176
|
);
|
|
172
|
-
|
|
177
|
+
A(() => {
|
|
173
178
|
e?.resetRowHeights();
|
|
174
|
-
}, [t, e]),
|
|
179
|
+
}, [t, e]), A(() => {
|
|
175
180
|
if (e) {
|
|
176
|
-
const
|
|
181
|
+
const T = e.getGridOption("context") || {};
|
|
177
182
|
e.setGridOption("context", {
|
|
178
|
-
...
|
|
183
|
+
...T,
|
|
179
184
|
formatType: y[o]
|
|
180
185
|
}), e.refreshCells({ force: !0 });
|
|
181
186
|
}
|
|
182
187
|
}, [o, e]);
|
|
183
|
-
const
|
|
184
|
-
(
|
|
185
|
-
r(
|
|
188
|
+
const E = D(
|
|
189
|
+
(T) => {
|
|
190
|
+
r(T.api), n?.(T);
|
|
186
191
|
},
|
|
187
192
|
[r, n]
|
|
188
193
|
);
|
|
189
|
-
return /* @__PURE__ */ i(
|
|
190
|
-
|
|
194
|
+
return /* @__PURE__ */ i($, { className: s, children: /* @__PURE__ */ i(
|
|
195
|
+
q,
|
|
191
196
|
{
|
|
192
|
-
...
|
|
193
|
-
columnDefs:
|
|
197
|
+
...H,
|
|
198
|
+
columnDefs: c,
|
|
194
199
|
initialState: C,
|
|
195
200
|
maintainColumnOrder: g,
|
|
196
|
-
resolvedRowHeight:
|
|
197
|
-
mergedContext:
|
|
198
|
-
onGridReady:
|
|
201
|
+
resolvedRowHeight: b,
|
|
202
|
+
mergedContext: G,
|
|
203
|
+
onGridReady: E
|
|
199
204
|
}
|
|
200
205
|
) });
|
|
201
206
|
}
|
|
202
|
-
const
|
|
207
|
+
const se = ({
|
|
203
208
|
children: a,
|
|
204
209
|
className: r,
|
|
205
210
|
...t
|
|
@@ -216,7 +221,7 @@ const ie = ({
|
|
|
216
221
|
}
|
|
217
222
|
);
|
|
218
223
|
export {
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
224
|
+
ie as DataTable,
|
|
225
|
+
ae as DataTableContent,
|
|
226
|
+
se as DataTableToolbar
|
|
222
227
|
};
|
|
@@ -1,48 +1,54 @@
|
|
|
1
|
-
import { DataTable as t, DataTableContent as o, DataTableToolbar as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
1
|
+
import { DataTable as t, DataTableContent as o, DataTableToolbar as r } from "./data-table.js";
|
|
2
|
+
import { deferColumnRuntimeStateGuard as l, isColumnRuntimeStateGuardDeferred as n, isColumnRuntimeStateGuardUpdating as D, rebuildColumnTreeCacheFromGrid as S, scheduleColumnRuntimeStateGuard as b } from "./column-runtime-state-guard.js";
|
|
3
|
+
import { DATA_TABLE_SCOPED_SHEET_HOST_MIN_HEIGHT_PX as m, DATA_TABLE_SHEET_SLIDE_TRANSITION_MS as u, TABLE_VIEWPORT_SHELL_EXPANDED_CLASS as p } from "./data-table-constants.js";
|
|
4
|
+
import { DataTableColumnList as h } from "./data-table-column-list.js";
|
|
5
|
+
import { DataTableContext as f, DataTableSheetPortalStoreContext as s, useDataTable as _, useDataTableSheetPortal as C, useDataTableSheetPortalStore as E } from "./data-table-context.js";
|
|
6
|
+
import { DataTableFormatOptions as L } from "./data-table-format-options.js";
|
|
7
|
+
import { DataTableSheet as P, DataTableSheetContent as w, DataTableSheetHeader as V, DataTableSheetTrigger as g } from "./data-table-sheet.js";
|
|
8
|
+
import { DataTableSheetBody as M, DataTableSheetSection as c, DataTableSheetTabPanel as G, DataTableSheetTabs as R, DataTableSheetTabsList as O } from "./data-table-sheet-layout.js";
|
|
9
|
+
import { useDataTableSheet as N, useDataTableSheetApi as y } from "./data-table-sheet-context.js";
|
|
10
|
+
import { DataTableViewMenuContent as X, DataTableViewMenuDensity as v, DataTableViewMenuSettingsItem as U, DataTableViewMenuTrigger as W, DataTableViewMenuViewportExpand as j } from "./data-table-view-menu.js";
|
|
11
|
+
import { DataTableSavedViews as q } from "./data-table-saved-views.js";
|
|
12
|
+
import { PinSwitch as J } from "./pin-switch.js";
|
|
13
|
+
import { ColumnIndicator as Q } from "./column-indicator.js";
|
|
14
|
+
import { IndicatorLegend as Z } from "./indicator-legend.js";
|
|
14
15
|
export {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
Q as ColumnIndicator,
|
|
17
|
+
m as DATA_TABLE_SCOPED_SHEET_HOST_MIN_HEIGHT_PX,
|
|
18
|
+
u as DATA_TABLE_SHEET_SLIDE_TRANSITION_MS,
|
|
18
19
|
t as DataTable,
|
|
19
|
-
|
|
20
|
+
h as DataTableColumnList,
|
|
20
21
|
o as DataTableContent,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
22
|
+
f as DataTableContext,
|
|
23
|
+
L as DataTableFormatOptions,
|
|
24
|
+
q as DataTableSavedViews,
|
|
25
|
+
P as DataTableSheet,
|
|
26
|
+
M as DataTableSheetBody,
|
|
27
|
+
w as DataTableSheetContent,
|
|
28
|
+
V as DataTableSheetHeader,
|
|
29
|
+
s as DataTableSheetPortalStoreContext,
|
|
30
|
+
c as DataTableSheetSection,
|
|
31
|
+
G as DataTableSheetTabPanel,
|
|
32
|
+
R as DataTableSheetTabs,
|
|
33
|
+
O as DataTableSheetTabsList,
|
|
34
|
+
g as DataTableSheetTrigger,
|
|
35
|
+
r as DataTableToolbar,
|
|
36
|
+
X as DataTableViewMenuContent,
|
|
37
|
+
v as DataTableViewMenuDensity,
|
|
38
|
+
U as DataTableViewMenuSettingsItem,
|
|
39
|
+
W as DataTableViewMenuTrigger,
|
|
40
|
+
j as DataTableViewMenuViewportExpand,
|
|
41
|
+
Z as IndicatorLegend,
|
|
42
|
+
J as PinSwitch,
|
|
43
|
+
p as TABLE_VIEWPORT_SHELL_EXPANDED_CLASS,
|
|
44
|
+
l as deferColumnRuntimeStateGuard,
|
|
45
|
+
n as isColumnRuntimeStateGuardDeferred,
|
|
46
|
+
D as isColumnRuntimeStateGuardUpdating,
|
|
47
|
+
S as rebuildColumnTreeCacheFromGrid,
|
|
48
|
+
b as scheduleColumnRuntimeStateGuard,
|
|
49
|
+
_ as useDataTable,
|
|
50
|
+
N as useDataTableSheet,
|
|
51
|
+
y as useDataTableSheetApi,
|
|
52
|
+
C as useDataTableSheetPortal,
|
|
53
|
+
E as useDataTableSheetPortalStore
|
|
48
54
|
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
function u(i) {
|
|
2
|
+
return !!(i.category === "group" || i.children && i.children.length > 0);
|
|
3
|
+
}
|
|
4
|
+
function n(i, r) {
|
|
5
|
+
return i.map((e) => {
|
|
6
|
+
if (u(e) && e.children) {
|
|
7
|
+
const t = n(
|
|
8
|
+
e.children,
|
|
9
|
+
r
|
|
10
|
+
), l = t.every((h) => h.checked);
|
|
11
|
+
return {
|
|
12
|
+
...e,
|
|
13
|
+
checked: l,
|
|
14
|
+
children: t
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
const c = r.get(e.id) ?? !1;
|
|
18
|
+
return {
|
|
19
|
+
...e,
|
|
20
|
+
checked: !c
|
|
21
|
+
};
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function d(i, r) {
|
|
25
|
+
const e = new Map(
|
|
26
|
+
r.getColumnState().map((c) => [
|
|
27
|
+
c.colId,
|
|
28
|
+
c.hide === !0
|
|
29
|
+
])
|
|
30
|
+
);
|
|
31
|
+
return n(i, e);
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
d as patchColumnTreeVisibilityFromGrid
|
|
35
|
+
};
|
|
@@ -9,7 +9,6 @@ export interface UseDataTableColumnListSyncOptions {
|
|
|
9
9
|
export declare function useDataTableColumnListSync({ gridApi, frozenColumnsLabel, scrollableColumnsLabel, isSyncActive, }: UseDataTableColumnListSyncOptions): {
|
|
10
10
|
items: NestedListItem[];
|
|
11
11
|
isReady: boolean;
|
|
12
|
-
externalSyncKey: boolean;
|
|
13
12
|
listWrapperRef: import('react').RefObject<HTMLDivElement | null>;
|
|
14
13
|
handleChange: (currentItems: NestedListItem[], enableApplyDiscard: boolean) => void;
|
|
15
14
|
handleSubmit: (finalItems: NestedListItem[]) => void;
|