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.
Files changed (25) hide show
  1. package/dist/components/data/data-table/build-column-state-from-tree.d.ts +7 -0
  2. package/dist/components/data/data-table/build-column-state-from-tree.js +34 -0
  3. package/dist/components/data/data-table/column-runtime-state-guard.d.ts +17 -0
  4. package/dist/components/data/data-table/column-runtime-state-guard.js +69 -0
  5. package/dist/components/data/data-table/data-table-column-apply.d.ts +4 -0
  6. package/dist/components/data/data-table/data-table-column-apply.js +82 -65
  7. package/dist/components/data/data-table/data-table-column-list-sync.d.ts +4 -3
  8. package/dist/components/data/data-table/data-table-column-list-sync.js +6 -5
  9. package/dist/components/data/data-table/data-table-column-list.js +34 -36
  10. package/dist/components/data/data-table/data-table-column-tree-cache.d.ts +6 -4
  11. package/dist/components/data/data-table/data-table-column-tree-cache.js +102 -69
  12. package/dist/components/data/data-table/data-table.js +66 -61
  13. package/dist/components/data/data-table/index.d.ts +1 -0
  14. package/dist/components/data/data-table/index.js +50 -44
  15. package/dist/components/data/data-table/patch-column-tree-visibility-from-grid.d.ts +3 -0
  16. package/dist/components/data/data-table/patch-column-tree-visibility-from-grid.js +35 -0
  17. package/dist/components/data/data-table/use-data-table-column-list-sync.d.ts +0 -1
  18. package/dist/components/data/data-table/use-data-table-column-list-sync.js +194 -263
  19. package/dist/components/data/nested-list/components/SortableItem.js +43 -42
  20. package/dist/components/data/nested-list/nested-list-tree-utils.d.ts +8 -0
  21. package/dist/components/data/nested-list/nested-list-tree-utils.js +38 -12
  22. package/dist/index.js +292 -286
  23. package/dist/llms/rules/installation.js +1 -1
  24. package/dist/llms/rules/requirements.js +1 -1
  25. package/package.json +1 -1
@@ -1,117 +1,150 @@
1
- import { buildColumnTreeFromGrid as h } from "./build-column-tree-from-grid.js";
2
- import { computeColumnListSyncFingerprints as S } from "./data-table-column-list-sync.js";
3
- import { fingerprintColumnTreeIndicators as T, normalizeColumnPinned as k } from "./data-table-column-apply.js";
4
- import { patchColumnTreeIndicatorsFromGrid as _ } from "./patch-column-tree-indicators-from-grid.js";
5
- function w(n) {
6
- return n.map((r) => {
7
- const e = k(r.pinned) ?? "0";
8
- return `${r.colId}:${e}:${r.hide ? "0" : "1"}`;
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 w(n.getColumnState());
13
+ return n.map((i) => `${i.colId}:${i.hide ? "0" : "1"}`).join("|");
13
14
  }
14
- const s = /* @__PURE__ */ new WeakMap(), p = {
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 G(n) {
25
+ function P(n) {
19
26
  return typeof n.isDestroyed == "function" && n.isDestroyed();
20
27
  }
21
- function C(n, r) {
22
- return n.map((e) => e.id === "root-frozen" ? { ...e, label: r.frozenColumns } : e.id === "root-scrollable" ? { ...e, label: r.scrollableColumns } : e);
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 f(n, r) {
25
- const e = s.get(n);
26
- return e ? {
27
- fingerprints: e.fingerprints,
28
- items: C(e.items, r),
29
- gridColumnStateFingerprint: e.gridColumnStateFingerprint
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 u(n, r) {
33
- const e = S(r);
34
- return s.set(n, {
35
- fingerprints: e,
36
- items: C(r, p),
37
- gridColumnStateFingerprint: d(n)
38
- }), e;
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 g(n, r) {
41
- const e = h(n, r);
42
- return e ? (u(n, e), e) : null;
49
+ function h(n, i) {
50
+ const r = G(n, i);
51
+ return r ? (l(n, r), r) : null;
43
52
  }
44
- function M(n) {
45
- const { gridApi: r, labels: e, previousFingerprints: i } = n, t = f(r, e), y = d(r), F = i.structural === "" && i.indicators === "";
46
- if (t) {
47
- const o = _(
48
- t.items,
49
- r
50
- ), b = T(o), a = y !== t.gridColumnStateFingerprint, m = b !== t.fingerprints.indicators;
51
- if (!a && !m) {
52
- if (F) {
53
- const l = u(r, o);
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: o,
64
+ rootItems: s,
56
65
  syncMode: "structural",
57
- fingerprints: l
66
+ fingerprints: o
58
67
  };
59
68
  }
60
69
  return {
61
70
  rootItems: null,
62
71
  syncMode: "skip",
63
- fingerprints: t.fingerprints
72
+ fingerprints: e.fingerprints
64
73
  };
65
74
  }
66
- if (!a && m) {
67
- const l = u(r, o);
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: l
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 c = g(r, e);
76
- if (!c)
106
+ const g = h(i, r);
107
+ if (!g)
77
108
  return {
78
109
  rootItems: null,
79
110
  syncMode: "skip",
80
- fingerprints: i
111
+ fingerprints: t
81
112
  };
82
- const I = f(r, e)?.fingerprints ?? {
83
- structural: "",
113
+ const L = b(i, r)?.fingerprints ?? {
114
+ layout: "",
115
+ visibility: "",
84
116
  indicators: ""
85
117
  };
86
118
  return {
87
- rootItems: c,
119
+ rootItems: g,
88
120
  syncMode: "structural",
89
- fingerprints: I
121
+ fingerprints: L
90
122
  };
91
123
  }
92
- function v(n) {
124
+ function $(n) {
93
125
  return typeof n.getColumnState == "function" && (typeof n.getAllGridColumns == "function" || typeof n.getColumns == "function");
94
126
  }
95
- function D(n) {
96
- return M(n).syncMode === "skip";
127
+ function B(n) {
128
+ return z(n).syncMode === "skip";
97
129
  }
98
- function W(n) {
99
- let r = !1, e = 0, i;
100
- const t = () => {
101
- r || G(n) || !v(n) || s.has(n) || g(n, p);
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 e = requestAnimationFrame(() => {
104
- r || (typeof requestIdleCallback < "u" ? i = requestIdleCallback(t, { timeout: 3e3 }) : setTimeout(t, 0));
135
+ return r = requestAnimationFrame(() => {
136
+ i || (typeof requestIdleCallback < "u" ? t = requestIdleCallback(e, { timeout: 3e3 }) : setTimeout(e, 0));
105
137
  }), () => {
106
- r = !0, e && cancelAnimationFrame(e), i !== void 0 && typeof cancelIdleCallback < "u" && cancelIdleCallback(i);
138
+ i = !0, r && cancelAnimationFrame(r), t !== void 0 && typeof cancelIdleCallback < "u" && cancelIdleCallback(t);
107
139
  };
108
140
  }
109
141
  export {
110
- g as buildColumnTreeWithCache,
111
- D as peekColumnListSyncWouldSkip,
112
- f as readColumnTreeCache,
113
- d as readGridColumnStateFingerprint,
114
- M as resolveColumnTreeFromCacheOrGrid,
115
- W as scheduleColumnTreePrewarm,
116
- u as writeColumnTreeCache
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 b, useEffect as D, memo as A, useRef as O, useLayoutEffect as N } from "react";
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 { extractRuntimeColumnDefs as W, mergeInitialGridRuntimeState as X } from "./data-table-column-def-pin.js";
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
- }, re = ({
15
+ }, ie = ({
15
16
  children: a,
16
17
  className: r
17
18
  }) => {
18
- const [t, e] = h(null), [o, s] = h("medium"), [n, m] = h("full"), [l, c] = h("default"), u = p(() => L(), []), d = b((f) => {
19
- u.registerScopedSheetDepth(f);
20
- }, [u]), g = b((f) => {
21
- e(f);
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
- D(() => {
24
- if (t)
25
- return k(t);
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 T = {
32
+ const H = {
28
33
  small: "12px",
29
34
  medium: "14px",
30
35
  large: "16px"
31
- }[o], H = `${R[l]}px`, x = p(
36
+ }[o], x = `${R[l]}px`, b = p(
32
37
  () => ({
33
38
  gridApi: t,
34
39
  registerApi: g,
35
- registerScopedSheetDepth: d,
40
+ registerScopedSheetDepth: f,
36
41
  fontSize: o,
37
42
  setFontSize: s,
38
43
  numericFormat: n,
39
- setNumericFormat: m,
44
+ setNumericFormat: d,
40
45
  rowHeight: l,
41
- setRowHeight: c
46
+ setRowHeight: u
42
47
  }),
43
48
  [
44
49
  t,
45
50
  g,
46
- d,
51
+ f,
47
52
  o,
48
53
  n,
49
54
  l
50
55
  ]
51
56
  );
52
- return /* @__PURE__ */ i(F.Provider, { value: x, children: /* @__PURE__ */ i(
57
+ return /* @__PURE__ */ i(F.Provider, { value: b, children: /* @__PURE__ */ i(
53
58
  z.Provider,
54
59
  {
55
- value: u,
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": T,
66
- "--ag-row-height": H
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
- }, V = A(function() {
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
- }), Y = A(function({
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 c = window.setTimeout(() => {
101
+ const u = window.setTimeout(() => {
97
102
  n(!0);
98
103
  }, j);
99
104
  return () => {
100
- window.clearTimeout(c);
105
+ window.clearTimeout(u);
101
106
  };
102
107
  }, [e]);
103
- const m = e && s;
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: m ? { minHeight: v } : void 0,
117
+ style: d ? { minHeight: v } : void 0,
113
118
  children: [
114
119
  t,
115
- /* @__PURE__ */ i(V, {})
120
+ /* @__PURE__ */ i(Y, {})
116
121
  ]
117
122
  }
118
123
  );
119
- }), $ = A(function({
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 ne(a) {
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: m,
153
+ rowHeight: d,
149
154
  context: l,
150
- columnDefs: c,
151
- initialState: u,
152
- suppressInitialRuntimeState: d,
155
+ columnDefs: u,
156
+ initialState: m,
157
+ suppressInitialRuntimeState: f,
153
158
  maintainColumnOrder: g = !0,
154
- ...T
155
- } = a, H = R[t], x = m ?? H, { runtimeColumnDefs: f, extractedRuntimeDefaults: w } = p(
156
- () => W(c ?? void 0),
157
- [c]
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
- () => X(
160
- u,
161
- w,
162
- d
164
+ () => V(
165
+ m,
166
+ S,
167
+ f
163
168
  ),
164
- [u, w, d]
165
- ), E = p(
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
- D(() => {
177
+ A(() => {
173
178
  e?.resetRowHeights();
174
- }, [t, e]), D(() => {
179
+ }, [t, e]), A(() => {
175
180
  if (e) {
176
- const S = e.getGridOption("context") || {};
181
+ const T = e.getGridOption("context") || {};
177
182
  e.setGridOption("context", {
178
- ...S,
183
+ ...T,
179
184
  formatType: y[o]
180
185
  }), e.refreshCells({ force: !0 });
181
186
  }
182
187
  }, [o, e]);
183
- const G = b(
184
- (S) => {
185
- r(S.api), n?.(S);
188
+ const E = D(
189
+ (T) => {
190
+ r(T.api), n?.(T);
186
191
  },
187
192
  [r, n]
188
193
  );
189
- return /* @__PURE__ */ i(Y, { className: s, children: /* @__PURE__ */ i(
190
- $,
194
+ return /* @__PURE__ */ i($, { className: s, children: /* @__PURE__ */ i(
195
+ q,
191
196
  {
192
- ...T,
193
- columnDefs: f,
197
+ ...H,
198
+ columnDefs: c,
194
199
  initialState: C,
195
200
  maintainColumnOrder: g,
196
- resolvedRowHeight: x,
197
- mergedContext: E,
198
- onGridReady: G
201
+ resolvedRowHeight: b,
202
+ mergedContext: G,
203
+ onGridReady: E
199
204
  }
200
205
  ) });
201
206
  }
202
- const ie = ({
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
- re as DataTable,
220
- ne as DataTableContent,
221
- ie as DataTableToolbar
224
+ ie as DataTable,
225
+ ae as DataTableContent,
226
+ se as DataTableToolbar
222
227
  };
@@ -1,4 +1,5 @@
1
1
  export * from './data-table';
2
+ export * from './column-runtime-state-guard';
2
3
  export * from './data-table-constants';
3
4
  export * from './data-table-column-list';
4
5
  export * from './data-table-context';
@@ -1,48 +1,54 @@
1
- import { DataTable as t, DataTableContent as o, DataTableToolbar as T } from "./data-table.js";
2
- import { DATA_TABLE_SCOPED_SHEET_HOST_MIN_HEIGHT_PX as l, DATA_TABLE_SHEET_SLIDE_TRANSITION_MS as D, TABLE_VIEWPORT_SHELL_EXPANDED_CLASS as b } from "./data-table-constants.js";
3
- import { DataTableColumnList as n } from "./data-table-column-list.js";
4
- import { DataTableContext as m, DataTableSheetPortalStoreContext as p, useDataTable as x, useDataTableSheetPortal as _, useDataTableSheetPortalStore as h } from "./data-table-context.js";
5
- import { DataTableFormatOptions as f } from "./data-table-format-options.js";
6
- import { DataTableSheet as u, DataTableSheetContent as A, DataTableSheetHeader as L, DataTableSheetTrigger as C } from "./data-table-sheet.js";
7
- import { DataTableSheetBody as P, DataTableSheetSection as w, DataTableSheetTabPanel as V, DataTableSheetTabs as d, DataTableSheetTabsList as H } from "./data-table-sheet-layout.js";
8
- import { useDataTableSheet as g, useDataTableSheetApi as O } from "./data-table-sheet-context.js";
9
- import { DataTableViewMenuContent as B, DataTableViewMenuDensity as N, DataTableViewMenuSettingsItem as y, DataTableViewMenuTrigger as R, DataTableViewMenuViewportExpand as X } from "./data-table-view-menu.js";
10
- import { DataTableSavedViews as F } from "./data-table-saved-views.js";
11
- import { PinSwitch as W } from "./pin-switch.js";
12
- import { ColumnIndicator as k } from "./column-indicator.js";
13
- import { IndicatorLegend as z } from "./indicator-legend.js";
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
- k as ColumnIndicator,
16
- l as DATA_TABLE_SCOPED_SHEET_HOST_MIN_HEIGHT_PX,
17
- D as DATA_TABLE_SHEET_SLIDE_TRANSITION_MS,
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
- n as DataTableColumnList,
20
+ h as DataTableColumnList,
20
21
  o as DataTableContent,
21
- m as DataTableContext,
22
- f as DataTableFormatOptions,
23
- F as DataTableSavedViews,
24
- u as DataTableSheet,
25
- P as DataTableSheetBody,
26
- A as DataTableSheetContent,
27
- L as DataTableSheetHeader,
28
- p as DataTableSheetPortalStoreContext,
29
- w as DataTableSheetSection,
30
- V as DataTableSheetTabPanel,
31
- d as DataTableSheetTabs,
32
- H as DataTableSheetTabsList,
33
- C as DataTableSheetTrigger,
34
- T as DataTableToolbar,
35
- B as DataTableViewMenuContent,
36
- N as DataTableViewMenuDensity,
37
- y as DataTableViewMenuSettingsItem,
38
- R as DataTableViewMenuTrigger,
39
- X as DataTableViewMenuViewportExpand,
40
- z as IndicatorLegend,
41
- W as PinSwitch,
42
- b as TABLE_VIEWPORT_SHELL_EXPANDED_CLASS,
43
- x as useDataTable,
44
- g as useDataTableSheet,
45
- O as useDataTableSheetApi,
46
- _ as useDataTableSheetPortal,
47
- h as useDataTableSheetPortalStore
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,3 @@
1
+ import { GridApi } from 'ag-grid-community';
2
+ import { NestedListItem } from '../nested-list/nested-list.types';
3
+ export declare function patchColumnTreeVisibilityFromGrid(rootItems: NestedListItem[], gridApi: GridApi): NestedListItem[];
@@ -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;