impact-nova 2.2.3 → 2.2.4

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 (51) hide show
  1. package/dist/components/data/ag-grid-react/headers/custom-header.js +133 -110
  2. package/dist/components/data/ag-grid-react/headers/header-search-input.js +23 -23
  3. package/dist/components/data/ag-grid-react/index.js +202 -206
  4. package/dist/components/data/data-table/build-column-tree-from-grid.js +65 -67
  5. package/dist/components/data/data-table/data-table-column-list-sync.js +5 -10
  6. package/dist/components/data/data-table/data-table-column-list.js +64 -61
  7. package/dist/components/data/data-table/data-table-column-tree-cache.d.ts +29 -0
  8. package/dist/components/data/data-table/data-table-column-tree-cache.js +117 -0
  9. package/dist/components/data/data-table/data-table-constants.d.ts +2 -0
  10. package/dist/components/data/data-table/data-table-constants.js +3 -2
  11. package/dist/components/data/data-table/data-table-sheet.js +46 -49
  12. package/dist/components/data/data-table/data-table.js +137 -119
  13. package/dist/components/data/data-table/index.js +24 -23
  14. package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.d.ts +3 -0
  15. package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.js +24 -0
  16. package/dist/components/data/data-table/use-data-table-column-list-sync.d.ts +2 -1
  17. package/dist/components/data/data-table/use-data-table-column-list-sync.js +249 -150
  18. package/dist/components/data/nested-list/components/NestedListContent.js +158 -96
  19. package/dist/components/data/nested-list/nested-list-constants.d.ts +4 -0
  20. package/dist/components/data/nested-list/nested-list-constants.js +6 -0
  21. package/dist/components/data/nested-list/nested-list-tree-utils.d.ts +3 -0
  22. package/dist/components/data/nested-list/nested-list-tree-utils.js +24 -0
  23. package/dist/components/data/nested-list/nested-list.js +214 -215
  24. package/dist/components/data-display/card/card.js +6 -5
  25. package/dist/components/feedback/dialog/dialog.js +7 -5
  26. package/dist/components/feedback/sheet/sheet.js +28 -27
  27. package/dist/components/flows/filter-panel/filter-panel.js +36 -35
  28. package/dist/components/flows/filter-strip/filter-tag-list.js +33 -33
  29. package/dist/components/forms/combobox/combobox.js +110 -100
  30. package/dist/components/forms/date-picker/date-input-behavior.d.ts +9 -0
  31. package/dist/components/forms/date-picker/date-input-behavior.js +32 -19
  32. package/dist/components/forms/date-picker/date-picker.js +96 -90
  33. package/dist/components/forms/date-picker/date-range-picker.js +160 -152
  34. package/dist/components/forms/date-picker/month-picker.js +71 -65
  35. package/dist/components/forms/date-picker/month-range-picker.js +153 -145
  36. package/dist/components/forms/date-picker/multi-date-picker.js +127 -99
  37. package/dist/components/forms/date-picker/multi-month-picker.js +109 -97
  38. package/dist/components/forms/date-picker/multi-week-picker.js +98 -86
  39. package/dist/components/forms/date-picker/week-picker.js +82 -76
  40. package/dist/components/forms/date-picker/week-range-picker.js +127 -119
  41. package/dist/impact-nova-base.scss +10 -5
  42. package/dist/impact-nova-components.css +9 -5
  43. package/dist/impact-nova.css +1 -1
  44. package/dist/index.js +189 -188
  45. package/dist/lib/overlay/overlay-portal-context.d.ts +11 -2
  46. package/dist/lib/overlay/overlay-portal-context.js +39 -28
  47. package/dist/lib/primitives/create-compound.d.ts +5 -0
  48. package/dist/lib/primitives/create-compound.js +17 -16
  49. package/dist/llms/rules/installation.js +1 -1
  50. package/dist/llms/rules/requirements.js +1 -1
  51. package/package.json +1 -1
@@ -1,57 +1,57 @@
1
1
  import { jsx as t, jsxs as c } from "react/jsx-runtime";
2
- import d, { useState as b, useEffect as u, useCallback as T } from "react";
3
- import { createPortal as g } from "react-dom";
4
- import { Cross as C } from "impact-nova-icons";
5
- import { cn as f } from "../../../lib/utils.js";
6
- import { Button as x } from "../../primitives/button/button.js";
7
- import { useDataTable as w, useDataTableSheetPortal as D } from "./data-table-context.js";
8
- import { DATA_TABLE_SCOPED_SHEET_HOST_MIN_HEIGHT_PX as v } from "./data-table-constants.js";
9
- import { DataTableSheetApiContext as N, DataTableSheetStateContext as k, useDataTableSheet as S, useDataTableSheetApi as _ } from "./data-table-sheet-context.js";
2
+ import d, { useState as v, useEffect as p, useCallback as T } from "react";
3
+ import { createPortal as C } from "react-dom";
4
+ import { Cross as g } from "impact-nova-icons";
5
+ import { cn as h } from "../../../lib/utils.js";
6
+ import { Button as b } from "../../primitives/button/button.js";
7
+ import { useDataTable as k, useDataTableSheetPortal as D } from "./data-table-context.js";
8
+ import { DATA_TABLE_SCOPED_SHEET_HOST_MIN_HEIGHT_PX as N } from "./data-table-constants.js";
9
+ import { DataTableSheetApiContext as w, DataTableSheetStateContext as _, useDataTableSheet as x, useDataTableSheetApi as y } from "./data-table-sheet-context.js";
10
10
  const I = ({
11
11
  children: n,
12
12
  defaultOpen: r = !1,
13
13
  open: e,
14
- onOpenChange: o
14
+ onOpenChange: a
15
15
  }) => {
16
- const { registerScopedSheetDepth: a } = w(), [s, i] = b(r), l = e !== void 0 ? e : s, h = d.useRef(o);
17
- u(() => {
18
- h.current = o;
16
+ const { registerScopedSheetDepth: o } = k(), [s, l] = v(r), i = e !== void 0 ? e : s, m = d.useRef(a);
17
+ p(() => {
18
+ m.current = a;
19
19
  });
20
- const y = T((p) => {
21
- e === void 0 && i(p), h.current?.(p);
20
+ const S = T((u) => {
21
+ e === void 0 && l(u), m.current?.(u);
22
22
  }, [e]);
23
- return u(() => {
24
- if (l)
25
- return a(1), () => {
26
- a(-1);
23
+ return p(() => {
24
+ if (i)
25
+ return o(1), () => {
26
+ o(-1);
27
27
  };
28
- }, [l, a]), /* @__PURE__ */ t(N.Provider, { value: y, children: /* @__PURE__ */ t(k.Provider, { value: l, children: n }) });
28
+ }, [i, o]), /* @__PURE__ */ t(w.Provider, { value: S, children: /* @__PURE__ */ t(_.Provider, { value: i, children: n }) });
29
29
  }, M = ({
30
30
  children: n,
31
31
  asChild: r
32
32
  }) => {
33
- const { setOpen: e, open: o } = S(), a = () => {
34
- e(!o);
33
+ const { setOpen: e, open: a } = x(), o = () => {
34
+ e(!a);
35
35
  };
36
36
  if (r) {
37
37
  const s = d.Children.only(n);
38
38
  return d.cloneElement(s, {
39
- onClick: (i) => {
40
- s.props.onClick?.(i), a();
39
+ onClick: (l) => {
40
+ s.props.onClick?.(l), o();
41
41
  }
42
42
  });
43
43
  }
44
- return /* @__PURE__ */ t(x, { variant: "outline", onClick: a, children: n });
44
+ return /* @__PURE__ */ t(b, { variant: "outline", onClick: o, children: n });
45
45
  }, G = ({
46
46
  title: n,
47
47
  children: r,
48
48
  className: e
49
49
  }) => {
50
- const { setOpen: o } = _();
50
+ const { setOpen: a } = y();
51
51
  return /* @__PURE__ */ c(
52
52
  "div",
53
53
  {
54
- className: f(
54
+ className: h(
55
55
  "flex shrink-0 flex-row justify-between items-center px-4 py-3 mb-2 bg-brand-tint",
56
56
  e
57
57
  ),
@@ -60,7 +60,7 @@ const I = ({
60
60
  /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
61
61
  r,
62
62
  /* @__PURE__ */ t(
63
- x,
63
+ b,
64
64
  {
65
65
  type: "button",
66
66
  variant: "ghost",
@@ -68,8 +68,8 @@ const I = ({
68
68
  "data-component": "data-table-sheet-close",
69
69
  className: "close_icon h-6 w-6 rounded-full hover:bg-muted/50",
70
70
  "aria-label": "Close",
71
- onClick: () => o(!1),
72
- children: /* @__PURE__ */ t(C, { className: "!h-3 !w-3 text-content-icon" })
71
+ onClick: () => a(!1),
72
+ children: /* @__PURE__ */ t(g, { className: "!h-3 !w-3 text-content-icon" })
73
73
  }
74
74
  )
75
75
  ] })
@@ -80,27 +80,24 @@ const I = ({
80
80
  children: n,
81
81
  className: r
82
82
  }) => {
83
- const { open: e } = S(), { sheetTarget: o } = D(), [a, s] = b(!1);
84
- if (e && !a && s(!0), !a) return null;
85
- const i = /* @__PURE__ */ c(
83
+ const { open: e } = x(), { sheetTarget: a } = D(), [o, s] = v(!1);
84
+ if (e && !o && s(!0), !o) return null;
85
+ const l = /* @__PURE__ */ c(
86
86
  "div",
87
87
  {
88
- className: f(
89
- "-my-px flex h-[calc(100%_+_2px)]",
90
- e && "animate-in slide-in-from-right-[100%] duration-200 ease-in-out fade-in fill-mode-forwards motion-reduce:animate-none motion-reduce:transition-none"
88
+ "aria-hidden": !e,
89
+ className: h(
90
+ "flex h-full max-h-full shrink-0 transition-transform duration-200 ease-in-out motion-reduce:transition-none",
91
+ e ? "translate-x-0" : "translate-x-full pointer-events-none"
91
92
  ),
92
- style: {
93
- minHeight: v,
94
- display: e ? void 0 : "none"
95
- },
96
93
  children: [
97
94
  /* @__PURE__ */ t("div", { className: "w-[10px] bg-canvas-elevated border-l border-stroke-hairline shrink-0" }),
98
95
  /* @__PURE__ */ t(
99
96
  "div",
100
97
  {
101
98
  "data-component": "data-table-sheet-panel",
102
- className: f(
103
- "relative flex h-full w-[355px] flex-col overflow-y-auto bg-canvas-elevated border-t border-l border-stroke-hairline pointer-events-auto shadow-elevation-floating",
99
+ className: h(
100
+ "relative flex h-full min-h-0 w-[355px] flex-col overflow-hidden bg-canvas-elevated border-t border-l border-stroke-hairline pointer-events-auto shadow-elevation-floating",
104
101
  r
105
102
  ),
106
103
  children: n
@@ -109,23 +106,23 @@ const I = ({
109
106
  /* @__PURE__ */ t("div", { className: "w-[16px] bg-canvas-elevated border-l border-stroke-hairline shrink-0" })
110
107
  ]
111
108
  }
112
- ), m = /* @__PURE__ */ t(
109
+ ), f = /* @__PURE__ */ t(
113
110
  "div",
114
111
  {
115
- className: "pointer-events-none absolute inset-0 z-[35] flex justify-end overflow-x-hidden overflow-y-visible",
116
- style: { display: e ? void 0 : "none" },
117
- children: i
112
+ "aria-hidden": !e,
113
+ className: "pointer-events-none absolute inset-0 z-[35] flex justify-end overflow-hidden",
114
+ children: l
118
115
  }
119
116
  );
120
- return o ? g(m, o) : /* @__PURE__ */ t(
117
+ return a ? C(f, a) : /* @__PURE__ */ t(
121
118
  "div",
122
119
  {
120
+ "aria-hidden": !e,
123
121
  className: "pointer-events-none fixed inset-0 z-[35] flex justify-end overflow-x-hidden overflow-y-visible",
124
122
  style: {
125
- minHeight: v,
126
- display: e ? void 0 : "none"
123
+ minHeight: N
127
124
  },
128
- children: i
125
+ children: l
129
126
  }
130
127
  );
131
128
  };
@@ -1,202 +1,220 @@
1
- import { jsx as n, jsxs as E } from "react/jsx-runtime";
2
- import { useState as g, useMemo as u, useCallback as D, useEffect as w, memo as v } from "react";
3
- import { AgGridWrapper as O } from "../ag-grid-react/index.js";
4
- import { cn as H } from "../../../lib/utils.js";
5
- import { DataTableContext as F, DataTableSheetPortalStoreContext as I, useDataTable as N, useDataTableSheetPortal as P } from "./data-table-context.js";
6
- import { createDataTableSheetPortalStore as z } from "./data-table-sheet-portal-store.js";
7
- import { DATA_TABLE_SCOPED_SHEET_HOST_MIN_HEIGHT_PX as B } from "./data-table-constants.js";
8
- import { extractRuntimeColumnDefs as M, mergeInitialGridRuntimeState as j } from "./data-table-column-def-pin.js";
9
- const _ = {
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";
3
+ import { AgGridWrapper as M } from "../ag-grid-react/index.js";
4
+ import { cn as _ } from "../../../lib/utils.js";
5
+ import { DataTableContext as F, DataTableSheetPortalStoreContext as z, useDataTable as B, useDataTableSheetPortal as P } from "./data-table-context.js";
6
+ import { createDataTableSheetPortalStore as L } from "./data-table-sheet-portal-store.js";
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
+ 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";
10
+ const R = {
10
11
  default: 46,
11
12
  compact: 30,
12
13
  comfort: 52
13
- }, U = ({
14
- children: i,
15
- className: t
14
+ }, re = ({
15
+ children: a,
16
+ className: o
16
17
  }) => {
17
- const [r, e] = g(null), [o, c] = g("medium"), [a, S] = g("full"), [s, f] = g("default"), l = u(() => z(), []), m = D((d) => {
18
- l.registerScopedSheetDepth(d);
19
- }, [l]), p = D((d) => {
20
- e(d);
21
- }, []), x = {
18
+ const [r, e] = h(null), [t, 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);
22
+ }, []);
23
+ D(() => {
24
+ if (r)
25
+ return k(r);
26
+ }, [r]);
27
+ const T = {
22
28
  small: "12px",
23
29
  medium: "14px",
24
30
  large: "16px"
25
- }[o], b = `${_[s]}px`, T = u(
31
+ }[t], H = `${R[l]}px`, x = p(
26
32
  () => ({
27
33
  gridApi: r,
28
- registerApi: p,
29
- registerScopedSheetDepth: m,
30
- fontSize: o,
31
- setFontSize: c,
32
- numericFormat: a,
33
- setNumericFormat: S,
34
- rowHeight: s,
35
- setRowHeight: f
34
+ registerApi: g,
35
+ registerScopedSheetDepth: d,
36
+ fontSize: t,
37
+ setFontSize: s,
38
+ numericFormat: n,
39
+ setNumericFormat: m,
40
+ rowHeight: l,
41
+ setRowHeight: c
36
42
  }),
37
43
  [
38
44
  r,
39
- p,
40
- m,
41
- o,
42
- a,
43
- s
45
+ g,
46
+ d,
47
+ t,
48
+ n,
49
+ l
44
50
  ]
45
51
  );
46
- return /* @__PURE__ */ n(F.Provider, { value: T, children: /* @__PURE__ */ n(
47
- I.Provider,
52
+ return /* @__PURE__ */ i(F.Provider, { value: x, children: /* @__PURE__ */ i(
53
+ z.Provider,
48
54
  {
49
- value: l,
50
- children: /* @__PURE__ */ n(
55
+ value: u,
56
+ children: /* @__PURE__ */ i(
51
57
  "div",
52
58
  {
53
59
  "data-component": "data-table",
54
- className: H(
60
+ className: _(
55
61
  "flex flex-col w-full min-h-0 rounded-[inherit]",
56
- t
62
+ o
57
63
  ),
58
64
  style: {
59
- "--ag-font-size": x,
60
- "--ag-row-height": b
65
+ "--ag-font-size": T,
66
+ "--ag-row-height": H
61
67
  },
62
- children: i
68
+ children: a
63
69
  }
64
70
  )
65
71
  }
66
72
  ) });
67
- }, A = {
73
+ }, y = {
68
74
  full: "full_no",
69
75
  k: "thou",
70
76
  m: "mil",
71
77
  b: "bil",
72
78
  full_precision: "full_precision"
73
- }, k = v(function() {
74
- const { setSheetTarget: t } = P();
75
- return /* @__PURE__ */ n(
79
+ }, V = A(function() {
80
+ const { setSheetTarget: o } = P();
81
+ return /* @__PURE__ */ i(
76
82
  "div",
77
83
  {
78
- ref: t,
79
- className: "absolute inset-0 pointer-events-none z-[39] flex overflow-x-hidden overflow-y-visible"
84
+ ref: o,
85
+ className: "absolute inset-0 pointer-events-none z-[39] flex overflow-hidden"
80
86
  }
81
87
  );
82
- }), L = v(function({
83
- className: t,
88
+ }), Y = A(function({
89
+ className: o,
84
90
  children: r
85
91
  }) {
86
- const { scopedSheetOpen: e } = P();
87
- return /* @__PURE__ */ E(
92
+ const { scopedSheetOpen: e } = P(), t = O(null), [s, n] = h(!1);
93
+ !e && s && n(!1), N(() => {
94
+ if (!e || (t.current?.clientHeight ?? 0) >= v)
95
+ return;
96
+ const c = window.setTimeout(() => {
97
+ n(!0);
98
+ }, j);
99
+ return () => {
100
+ window.clearTimeout(c);
101
+ };
102
+ }, [e]);
103
+ const m = e && s;
104
+ return /* @__PURE__ */ I(
88
105
  "div",
89
106
  {
90
- className: H(
107
+ ref: t,
108
+ className: _(
91
109
  "relative flex-1 min-h-0 w-full bg-canvas-elevated rounded-b-[inherit] grid-rounded-bottom",
92
- t
110
+ o
93
111
  ),
94
- style: e ? { minHeight: B } : void 0,
112
+ style: m ? { minHeight: v } : void 0,
95
113
  children: [
96
114
  r,
97
- /* @__PURE__ */ n(k, {})
115
+ /* @__PURE__ */ i(V, {})
98
116
  ]
99
117
  }
100
118
  );
101
- }), W = v(function({
102
- resolvedRowHeight: t,
119
+ }), $ = A(function({
120
+ resolvedRowHeight: o,
103
121
  mergedContext: r,
104
122
  onGridReady: e,
105
- columnDefs: o,
106
- maintainColumnOrder: c = !0,
107
- ...a
123
+ columnDefs: t,
124
+ maintainColumnOrder: s = !0,
125
+ ...n
108
126
  }) {
109
- return /* @__PURE__ */ n(
110
- O,
127
+ return /* @__PURE__ */ i(
128
+ M,
111
129
  {
112
- ...a,
113
- columnDefs: o,
114
- rowHeight: t,
130
+ ...n,
131
+ columnDefs: t,
132
+ rowHeight: o,
115
133
  onGridReady: e,
116
134
  context: r,
117
- maintainColumnOrder: c
135
+ maintainColumnOrder: s
118
136
  }
119
137
  );
120
138
  });
121
- function Z(i) {
139
+ function ne(a) {
122
140
  const {
123
- registerApi: t,
141
+ registerApi: o,
124
142
  rowHeight: r,
125
143
  gridApi: e,
126
- numericFormat: o
127
- } = N(), {
128
- className: c,
129
- onGridReady: a,
130
- rowHeight: S,
131
- context: s,
132
- columnDefs: f,
133
- initialState: l,
134
- suppressInitialRuntimeState: m,
135
- maintainColumnOrder: p = !0,
136
- ...x
137
- } = i, b = _[r], T = S ?? b, { runtimeColumnDefs: d, extractedRuntimeDefaults: y } = u(
138
- () => M(f ?? void 0),
139
- [f]
140
- ), C = u(
141
- () => j(
142
- l,
143
- y,
144
- m
144
+ numericFormat: t
145
+ } = B(), {
146
+ className: s,
147
+ onGridReady: n,
148
+ rowHeight: m,
149
+ context: l,
150
+ columnDefs: c,
151
+ initialState: u,
152
+ suppressInitialRuntimeState: d,
153
+ maintainColumnOrder: g = !0,
154
+ ...T
155
+ } = a, H = R[r], x = m ?? H, { runtimeColumnDefs: f, extractedRuntimeDefaults: w } = p(
156
+ () => W(c ?? void 0),
157
+ [c]
158
+ ), C = p(
159
+ () => X(
160
+ u,
161
+ w,
162
+ d
145
163
  ),
146
- [l, y, m]
147
- ), G = u(
164
+ [u, w, d]
165
+ ), E = p(
148
166
  () => ({
149
- ...s,
150
- formatType: A[o]
167
+ ...l,
168
+ formatType: y[t]
151
169
  }),
152
- [s, o]
170
+ [l, t]
153
171
  );
154
- w(() => {
172
+ D(() => {
155
173
  e?.resetRowHeights();
156
- }, [r, e]), w(() => {
174
+ }, [r, e]), D(() => {
157
175
  if (e) {
158
- const h = e.getGridOption("context") || {};
176
+ const S = e.getGridOption("context") || {};
159
177
  e.setGridOption("context", {
160
- ...h,
161
- formatType: A[o]
178
+ ...S,
179
+ formatType: y[t]
162
180
  }), e.refreshCells({ force: !0 });
163
181
  }
164
- }, [o, e]);
165
- const R = D(
166
- (h) => {
167
- t(h.api), a?.(h);
182
+ }, [t, e]);
183
+ const G = b(
184
+ (S) => {
185
+ o(S.api), n?.(S);
168
186
  },
169
- [t, a]
187
+ [o, n]
170
188
  );
171
- return /* @__PURE__ */ n(L, { className: c, children: /* @__PURE__ */ n(
172
- W,
189
+ return /* @__PURE__ */ i(Y, { className: s, children: /* @__PURE__ */ i(
190
+ $,
173
191
  {
174
- ...x,
175
- columnDefs: d,
192
+ ...T,
193
+ columnDefs: f,
176
194
  initialState: C,
177
- maintainColumnOrder: p,
178
- resolvedRowHeight: T,
179
- mergedContext: G,
180
- onGridReady: R
195
+ maintainColumnOrder: g,
196
+ resolvedRowHeight: x,
197
+ mergedContext: E,
198
+ onGridReady: G
181
199
  }
182
200
  ) });
183
201
  }
184
- const ee = ({
185
- children: i,
186
- className: t
187
- }) => /* @__PURE__ */ n(
202
+ const ie = ({
203
+ children: a,
204
+ className: o
205
+ }) => /* @__PURE__ */ i(
188
206
  "div",
189
207
  {
190
208
  "data-component": "data-table-toolbar",
191
- className: H(
209
+ className: _(
192
210
  "flex items-center justify-between px-4 py-3 shrink-0 bg-canvas-elevated rounded-t-[inherit]",
193
- t
211
+ o
194
212
  ),
195
- children: i
213
+ children: a
196
214
  }
197
215
  );
198
216
  export {
199
- U as DataTable,
200
- Z as DataTableContent,
201
- ee as DataTableToolbar
217
+ re as DataTable,
218
+ ne as DataTableContent,
219
+ ie as DataTableToolbar
202
220
  };
@@ -1,41 +1,42 @@
1
1
  import { DataTable as t, DataTableContent as o, DataTableToolbar as r } from "./data-table.js";
2
- import { DATA_TABLE_SCOPED_SHEET_HOST_MIN_HEIGHT_PX as l, TABLE_VIEWPORT_SHELL_EXPANDED_CLASS as D } from "./data-table-constants.js";
2
+ import { DATA_TABLE_SCOPED_SHEET_HOST_MIN_HEIGHT_PX as D, DATA_TABLE_SHEET_SLIDE_TRANSITION_MS as l, TABLE_VIEWPORT_SHELL_EXPANDED_CLASS as S } from "./data-table-constants.js";
3
3
  import { DataTableColumnList as n } from "./data-table-column-list.js";
4
- import { DataTableContext as i, DataTableSheetPortalStoreContext as m, useDataTable as p, useDataTableSheetPortal as x, useDataTableSheetPortalStore as f } from "./data-table-context.js";
5
- import { DataTableFormatOptions as E } from "./data-table-format-options.js";
6
- import { DataTableSheet as h, DataTableSheetContent as s, DataTableSheetHeader as C, DataTableSheetTrigger as w } from "./data-table-sheet.js";
7
- import { useDataTableSheet as V, useDataTableSheetApi as A } from "./data-table-sheet-context.js";
8
- import { DataTableViewMenuContent as d, DataTableViewMenuDensity as g, DataTableViewMenuSettingsItem as H, DataTableViewMenuTrigger as I, DataTableViewMenuViewportExpand as M } from "./data-table-view-menu.js";
4
+ import { DataTableContext as m, DataTableSheetPortalStoreContext as p, useDataTable as _, useDataTableSheetPortal as x, useDataTableSheetPortalStore as E } from "./data-table-context.js";
5
+ import { DataTableFormatOptions as u } from "./data-table-format-options.js";
6
+ import { DataTableSheet as h, DataTableSheetContent as s, DataTableSheetHeader as C, DataTableSheetTrigger as I } from "./data-table-sheet.js";
7
+ import { useDataTableSheet as w, useDataTableSheetApi as P } from "./data-table-sheet-context.js";
8
+ import { DataTableViewMenuContent as H, DataTableViewMenuDensity as M, DataTableViewMenuSettingsItem as d, DataTableViewMenuTrigger as g, DataTableViewMenuViewportExpand as O } from "./data-table-view-menu.js";
9
9
  import { DataTableSavedViews as c } from "./data-table-saved-views.js";
10
- import { PinSwitch as N } from "./pin-switch.js";
10
+ import { PinSwitch as R } from "./pin-switch.js";
11
11
  import { ColumnIndicator as v } from "./column-indicator.js";
12
12
  import { IndicatorLegend as F } from "./indicator-legend.js";
13
13
  export {
14
14
  v as ColumnIndicator,
15
- l as DATA_TABLE_SCOPED_SHEET_HOST_MIN_HEIGHT_PX,
15
+ D as DATA_TABLE_SCOPED_SHEET_HOST_MIN_HEIGHT_PX,
16
+ l as DATA_TABLE_SHEET_SLIDE_TRANSITION_MS,
16
17
  t as DataTable,
17
18
  n as DataTableColumnList,
18
19
  o as DataTableContent,
19
- i as DataTableContext,
20
- E as DataTableFormatOptions,
20
+ m as DataTableContext,
21
+ u as DataTableFormatOptions,
21
22
  c as DataTableSavedViews,
22
23
  h as DataTableSheet,
23
24
  s as DataTableSheetContent,
24
25
  C as DataTableSheetHeader,
25
- m as DataTableSheetPortalStoreContext,
26
- w as DataTableSheetTrigger,
26
+ p as DataTableSheetPortalStoreContext,
27
+ I as DataTableSheetTrigger,
27
28
  r as DataTableToolbar,
28
- d as DataTableViewMenuContent,
29
- g as DataTableViewMenuDensity,
30
- H as DataTableViewMenuSettingsItem,
31
- I as DataTableViewMenuTrigger,
32
- M as DataTableViewMenuViewportExpand,
29
+ H as DataTableViewMenuContent,
30
+ M as DataTableViewMenuDensity,
31
+ d as DataTableViewMenuSettingsItem,
32
+ g as DataTableViewMenuTrigger,
33
+ O as DataTableViewMenuViewportExpand,
33
34
  F as IndicatorLegend,
34
- N as PinSwitch,
35
- D as TABLE_VIEWPORT_SHELL_EXPANDED_CLASS,
36
- p as useDataTable,
37
- V as useDataTableSheet,
38
- A as useDataTableSheetApi,
35
+ R as PinSwitch,
36
+ S as TABLE_VIEWPORT_SHELL_EXPANDED_CLASS,
37
+ _ as useDataTable,
38
+ w as useDataTableSheet,
39
+ P as useDataTableSheetApi,
39
40
  x as useDataTableSheetPortal,
40
- f as useDataTableSheetPortalStore
41
+ E as useDataTableSheetPortalStore
41
42
  };
@@ -0,0 +1,3 @@
1
+ import { GridApi } from 'ag-grid-community';
2
+ import { NestedListItem } from '../nested-list/nested-list.types';
3
+ export declare function patchColumnTreeIndicatorsFromGrid(rootItems: NestedListItem[], gridApi: GridApi): NestedListItem[];
@@ -0,0 +1,24 @@
1
+ function h(n, c) {
2
+ const e = c.getGridOption("context"), a = typeof e?.activeSearchColumnId == "string" ? e.activeSearchColumnId : null, o = new Map(
3
+ c.getColumnState().map((r) => [r.colId, r])
4
+ ), i = (r) => r.map((t) => {
5
+ if ((t.category === "group" || t.children && t.children.length > 0) && t.children)
6
+ return {
7
+ ...t,
8
+ children: i(t.children)
9
+ };
10
+ const l = c.getColumn(t.id), s = o.get(t.id), u = t.data;
11
+ return {
12
+ ...t,
13
+ data: {
14
+ ...u,
15
+ hasSortApplied: !!s?.sort,
16
+ hasFilterApplied: l?.isFilterActive() === !0 || a === t.id
17
+ }
18
+ };
19
+ });
20
+ return i(n);
21
+ }
22
+ export {
23
+ h as patchColumnTreeIndicatorsFromGrid
24
+ };
@@ -4,8 +4,9 @@ export interface UseDataTableColumnListSyncOptions {
4
4
  gridApi: GridApi | null;
5
5
  frozenColumnsLabel: string;
6
6
  scrollableColumnsLabel: string;
7
+ isSyncActive?: boolean;
7
8
  }
8
- export declare function useDataTableColumnListSync({ gridApi, frozenColumnsLabel, scrollableColumnsLabel, }: UseDataTableColumnListSyncOptions): {
9
+ export declare function useDataTableColumnListSync({ gridApi, frozenColumnsLabel, scrollableColumnsLabel, isSyncActive, }: UseDataTableColumnListSyncOptions): {
9
10
  items: NestedListItem[];
10
11
  isReady: boolean;
11
12
  externalSyncKey: boolean;