impact-nova 1.6.2 → 1.6.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.
- package/dist/components/ui/accordion-nested-list/accordion-nested-list.js +7 -7
- package/dist/components/ui/accordion.d.ts +0 -1
- package/dist/components/ui/accordion.js +22 -25
- package/dist/components/ui/ag-grid-react/index.js +38 -35
- package/dist/components/ui/ag-grid-react/process-backend-columndefs.js +10 -10
- package/dist/components/ui/ag-grid-react/value-formatters.js +18 -18
- package/dist/components/ui/calendar.js +255 -247
- package/dist/components/ui/chart/chart.js +103 -94
- package/dist/components/ui/data-table/data-table.d.ts +0 -4
- package/dist/components/ui/data-table/data-table.js +94 -60
- package/dist/components/ui/date-picker/date-picker.js +90 -81
- package/dist/components/ui/date-picker/date-range-picker.js +144 -130
- package/dist/components/ui/date-picker/week-range-picker.js +157 -143
- package/dist/components/ui/filter-strip/filter-summary.js +161 -234
- package/dist/components/ui/filter-strip/filter-tag-list.js +97 -124
- package/dist/components/ui/horizontal-scroller/horizontal-scroller.js +29 -29
- package/dist/components/ui/select/select.js +536 -508
- package/dist/components/ui/sheet.js +71 -94
- package/dist/components/ui/statistics-card.d.ts +4 -10
- package/dist/components/ui/statistics-card.hooks.d.ts +2 -0
- package/dist/components/ui/statistics-card.hooks.js +26 -24
- package/dist/components/ui/statistics-card.js +103 -102
- package/dist/components/ui/types/chart.types.d.ts +1 -0
- package/dist/components/ui/types/statistics-card.types.d.ts +1 -1
- package/dist/impact-nova.css +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as s, jsxs as
|
|
1
|
+
import { jsx as s, jsxs as b } from "react/jsx-runtime";
|
|
2
2
|
import * as n from "react";
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
5
|
-
import { cn as
|
|
6
|
-
import { Skeleton as
|
|
3
|
+
import * as i from "highcharts";
|
|
4
|
+
import F from "highcharts-react-official";
|
|
5
|
+
import { cn as p } from "../../../lib/utils.js";
|
|
6
|
+
import { Skeleton as k } from "../skeleton.js";
|
|
7
7
|
import { Minimize2 as A, Maximize2 as j } from "lucide-react";
|
|
8
8
|
import { Button as I } from "../button.js";
|
|
9
9
|
import B from "highcharts/highcharts-more";
|
|
@@ -13,41 +13,41 @@ import P from "highcharts/modules/treemap";
|
|
|
13
13
|
import D from "highcharts/modules/venn";
|
|
14
14
|
import V from "highcharts/modules/stock";
|
|
15
15
|
import O from "highcharts/modules/accessibility";
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import { getBaseChartOptions as
|
|
21
|
-
import { useImpactNovaI18n as
|
|
16
|
+
import W from "highcharts/modules/exporting";
|
|
17
|
+
import G from "highcharts/modules/dumbbell";
|
|
18
|
+
import J from "highcharts/modules/lollipop";
|
|
19
|
+
import K from "highcharts-border-radius";
|
|
20
|
+
import { getBaseChartOptions as Q } from "./chart.utils.js";
|
|
21
|
+
import { useImpactNovaI18n as U } from "../../../i18n/ImpactNovaI18nContext.js";
|
|
22
22
|
const c = (e, r) => {
|
|
23
23
|
typeof e == "function" ? e(r) : typeof e == "object" && e.default && typeof e.default == "function" && e.default(r);
|
|
24
24
|
};
|
|
25
|
-
typeof
|
|
26
|
-
const
|
|
27
|
-
const e = n.useContext(
|
|
25
|
+
typeof i == "object" && (c(B, i), c(M, i), c(T, i), c(P, i), c(D, i), c(O, i), c(W, i), c(G, i), c(J, i), c(V, i), c(K, i));
|
|
26
|
+
const E = n.createContext(null), z = () => {
|
|
27
|
+
const e = n.useContext(E);
|
|
28
28
|
if (!e)
|
|
29
29
|
throw new Error("Chart components must be used within a ChartContainer");
|
|
30
30
|
return e;
|
|
31
|
-
},
|
|
32
|
-
({ className: e, children: r, isLoading:
|
|
33
|
-
const
|
|
34
|
-
n.useImperativeHandle(
|
|
35
|
-
const
|
|
36
|
-
const t =
|
|
37
|
-
t && (
|
|
38
|
-
t.requestFullscreen ? t.requestFullscreen() : t.webkitRequestFullscreen ? t.webkitRequestFullscreen() : t.msRequestFullscreen && t.msRequestFullscreen(),
|
|
31
|
+
}, S = n.forwardRef(
|
|
32
|
+
({ className: e, children: r, isLoading: a = !1, ...o }, h) => {
|
|
33
|
+
const l = n.useRef(null), u = n.useRef(null), [m, f] = n.useState(!1), [R, w] = n.useState(!1);
|
|
34
|
+
n.useImperativeHandle(h, () => l.current);
|
|
35
|
+
const x = () => {
|
|
36
|
+
const t = l.current;
|
|
37
|
+
t && (w(!0), t.classList.add("fullscreen-animating"), setTimeout(() => {
|
|
38
|
+
t.requestFullscreen ? t.requestFullscreen() : t.webkitRequestFullscreen ? t.webkitRequestFullscreen() : t.msRequestFullscreen && t.msRequestFullscreen(), f(!0), t.classList.remove("fullscreen-animating");
|
|
39
39
|
}, 200));
|
|
40
|
-
},
|
|
41
|
-
const t =
|
|
42
|
-
t && (
|
|
43
|
-
document.exitFullscreen ? document.exitFullscreen() : document.webkitExitFullscreen ? document.webkitExitFullscreen() : document.msExitFullscreen && document.msExitFullscreen(),
|
|
40
|
+
}, g = () => {
|
|
41
|
+
const t = l.current;
|
|
42
|
+
t && (w(!0), t.classList.add("fullscreen-animating-out"), setTimeout(() => {
|
|
43
|
+
document.exitFullscreen ? document.exitFullscreen() : document.webkitExitFullscreen ? document.webkitExitFullscreen() : document.msExitFullscreen && document.msExitFullscreen(), f(!1), t.classList.remove("fullscreen-animating-out");
|
|
44
44
|
}, 200));
|
|
45
|
-
},
|
|
46
|
-
|
|
45
|
+
}, C = () => {
|
|
46
|
+
m ? g() : x();
|
|
47
47
|
};
|
|
48
48
|
return n.useEffect(() => {
|
|
49
49
|
const t = () => {
|
|
50
|
-
document.fullscreenElement || document.webkitFullscreenElement || document.msFullscreenElement ||
|
|
50
|
+
document.fullscreenElement || document.webkitFullscreenElement || document.msFullscreenElement || f(!1);
|
|
51
51
|
};
|
|
52
52
|
return document.addEventListener("fullscreenchange", t), document.addEventListener("webkitfullscreenchange", t), () => {
|
|
53
53
|
document.removeEventListener("fullscreenchange", t), document.removeEventListener(
|
|
@@ -56,44 +56,44 @@ const b = n.createContext(null), k = () => {
|
|
|
56
56
|
);
|
|
57
57
|
};
|
|
58
58
|
}, []), n.useEffect(() => {
|
|
59
|
-
if (!
|
|
60
|
-
const t =
|
|
59
|
+
if (!u?.current?.chart) return;
|
|
60
|
+
const t = u.current.chart;
|
|
61
61
|
let d = null;
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
const v =
|
|
62
|
+
const N = () => {
|
|
63
|
+
m && l.current ? (d && cancelAnimationFrame(d), d = requestAnimationFrame(() => {
|
|
64
|
+
const v = l.current;
|
|
65
65
|
if (!v) return;
|
|
66
|
-
const
|
|
67
|
-
if (
|
|
68
|
-
const
|
|
69
|
-
t.setSize(
|
|
66
|
+
const y = v.getBoundingClientRect(), H = v.querySelector('[class*="ChartContent"]');
|
|
67
|
+
if (H) {
|
|
68
|
+
const L = H.getBoundingClientRect();
|
|
69
|
+
t.setSize(L.width, L.height, !1);
|
|
70
70
|
} else
|
|
71
|
-
t.setSize(
|
|
71
|
+
t.setSize(y.width, y.height, !1);
|
|
72
72
|
d = null;
|
|
73
73
|
})) : (t.setSize(null, null, !1), t.reflow());
|
|
74
74
|
};
|
|
75
|
-
return window.addEventListener("resize",
|
|
76
|
-
d && cancelAnimationFrame(d), window.removeEventListener("resize",
|
|
75
|
+
return window.addEventListener("resize", N), () => {
|
|
76
|
+
d && cancelAnimationFrame(d), window.removeEventListener("resize", N);
|
|
77
77
|
};
|
|
78
|
-
}, [
|
|
79
|
-
|
|
78
|
+
}, [m]), /* @__PURE__ */ s(
|
|
79
|
+
E.Provider,
|
|
80
80
|
{
|
|
81
81
|
value: {
|
|
82
|
-
isExpanded:
|
|
83
|
-
toggleFullscreen:
|
|
84
|
-
isLoading:
|
|
85
|
-
containerRef:
|
|
86
|
-
chartComponentRef:
|
|
82
|
+
isExpanded: m,
|
|
83
|
+
toggleFullscreen: C,
|
|
84
|
+
isLoading: a,
|
|
85
|
+
containerRef: l,
|
|
86
|
+
chartComponentRef: u
|
|
87
87
|
},
|
|
88
88
|
children: /* @__PURE__ */ s(
|
|
89
89
|
"div",
|
|
90
90
|
{
|
|
91
|
-
ref:
|
|
92
|
-
className:
|
|
91
|
+
ref: l,
|
|
92
|
+
className: p(
|
|
93
93
|
e,
|
|
94
94
|
"w-full relative bg-canvas-elevated transition-all duration-200 ease-in-out",
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
m && "fixed inset-0 z-50 h-screen w-screen p-4 bg-canvas flex flex-col",
|
|
96
|
+
R && "overflow-hidden"
|
|
97
97
|
),
|
|
98
98
|
...o,
|
|
99
99
|
children: r
|
|
@@ -103,89 +103,98 @@ const b = n.createContext(null), k = () => {
|
|
|
103
103
|
);
|
|
104
104
|
}
|
|
105
105
|
);
|
|
106
|
-
|
|
106
|
+
S.displayName = "ChartContainer";
|
|
107
107
|
const X = n.forwardRef(
|
|
108
|
-
({ className: e, children: r, ...
|
|
108
|
+
({ className: e, children: r, ...a }, o) => /* @__PURE__ */ s("div", { ref: o, className: p("flex items-center justify-between mb-4", e), ...a, children: r })
|
|
109
109
|
);
|
|
110
110
|
X.displayName = "ChartHeader";
|
|
111
111
|
const Y = n.forwardRef(
|
|
112
|
-
({ className: e, ...r },
|
|
112
|
+
({ className: e, ...r }, a) => /* @__PURE__ */ s("h3", { ref: a, className: p("text-lg font-semibold leading-none tracking-tight", e), ...r })
|
|
113
113
|
);
|
|
114
114
|
Y.displayName = "ChartTitle";
|
|
115
115
|
const Z = n.forwardRef(
|
|
116
|
-
({ className: e, ...r },
|
|
116
|
+
({ className: e, ...r }, a) => /* @__PURE__ */ s("div", { ref: a, className: p("flex items-center gap-2", e), ...r })
|
|
117
117
|
);
|
|
118
118
|
Z.displayName = "ChartActions";
|
|
119
119
|
const _ = n.forwardRef(
|
|
120
|
-
({ className: e, ...r },
|
|
121
|
-
const { t: o } =
|
|
122
|
-
return /* @__PURE__ */
|
|
120
|
+
({ className: e, ...r }, a) => {
|
|
121
|
+
const { t: o } = U(), { toggleFullscreen: h, isExpanded: l } = z(), u = o("aria.toggleFullscreen");
|
|
122
|
+
return /* @__PURE__ */ b(
|
|
123
123
|
I,
|
|
124
124
|
{
|
|
125
125
|
variant: "ghost",
|
|
126
126
|
size: "icon",
|
|
127
|
-
onClick:
|
|
128
|
-
ref:
|
|
129
|
-
className:
|
|
130
|
-
"aria-label":
|
|
127
|
+
onClick: h,
|
|
128
|
+
ref: a,
|
|
129
|
+
className: p("h-8 w-8", e),
|
|
130
|
+
"aria-label": u,
|
|
131
131
|
...r,
|
|
132
132
|
children: [
|
|
133
|
-
|
|
134
|
-
/* @__PURE__ */ s("span", { className: "sr-only", children:
|
|
133
|
+
l ? /* @__PURE__ */ s(A, { className: "h-4 w-4" }) : /* @__PURE__ */ s(j, { className: "h-4 w-4" }),
|
|
134
|
+
/* @__PURE__ */ s("span", { className: "sr-only", children: u })
|
|
135
135
|
]
|
|
136
136
|
}
|
|
137
137
|
);
|
|
138
138
|
}
|
|
139
139
|
);
|
|
140
140
|
_.displayName = "ChartFullScreen";
|
|
141
|
-
const
|
|
142
|
-
({ className: e, children: r, loader:
|
|
143
|
-
const { isLoading:
|
|
144
|
-
return
|
|
145
|
-
|
|
146
|
-
/* @__PURE__ */ s(
|
|
147
|
-
/* @__PURE__ */ s(
|
|
141
|
+
const q = n.forwardRef(
|
|
142
|
+
({ className: e, children: r, loader: a, ...o }, h) => {
|
|
143
|
+
const { isLoading: l, chartComponentRef: u, isExpanded: m } = z();
|
|
144
|
+
return l && a ? /* @__PURE__ */ s("div", { ref: h, className: p(e, "w-full relative flex items-center justify-center flex-1 min-h-[300px]", m && "min-h-0"), ...o, children: a }) : /* @__PURE__ */ b("div", { ref: h, className: p(e, "w-full relative flex-1 min-h-[300px]", m && "min-h-0"), ...o, children: [
|
|
145
|
+
l && /* @__PURE__ */ b("div", { className: "absolute inset-0 z-10 bg-canvas/50 flex flex-col gap-2 p-4", children: [
|
|
146
|
+
/* @__PURE__ */ s(k, { className: "h-8 w-1/3" }),
|
|
147
|
+
/* @__PURE__ */ s(k, { className: "flex-1 w-full" })
|
|
148
148
|
] }),
|
|
149
|
-
n.Children.map(r, (
|
|
149
|
+
n.Children.map(r, (f) => n.isValidElement(f) ? n.cloneElement(f, { ref: u }) : f)
|
|
150
150
|
] });
|
|
151
151
|
}
|
|
152
152
|
);
|
|
153
|
-
|
|
153
|
+
q.displayName = "ChartContent";
|
|
154
154
|
const $ = n.forwardRef(
|
|
155
155
|
(e, r) => {
|
|
156
156
|
const {
|
|
157
|
-
height:
|
|
157
|
+
height: a,
|
|
158
158
|
width: o,
|
|
159
|
-
className:
|
|
160
|
-
isLoading:
|
|
161
|
-
loader:
|
|
162
|
-
title:
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
159
|
+
className: h,
|
|
160
|
+
isLoading: l,
|
|
161
|
+
loader: u,
|
|
162
|
+
title: m,
|
|
163
|
+
noWrapper: f,
|
|
164
|
+
children: R,
|
|
165
|
+
...w
|
|
166
|
+
} = e, x = n.useContext(E), g = n.useMemo(() => {
|
|
167
|
+
const C = Q({ title: m, ...w });
|
|
167
168
|
return {
|
|
168
169
|
...C,
|
|
169
170
|
chart: {
|
|
170
171
|
...C.chart,
|
|
171
|
-
height:
|
|
172
|
+
height: a ?? null,
|
|
172
173
|
width: o ?? null
|
|
173
174
|
}
|
|
174
175
|
};
|
|
175
176
|
}, [e]);
|
|
176
|
-
return
|
|
177
|
-
|
|
177
|
+
return f ? /* @__PURE__ */ s(
|
|
178
|
+
F,
|
|
179
|
+
{
|
|
180
|
+
highcharts: i,
|
|
181
|
+
options: g,
|
|
182
|
+
ref: r,
|
|
183
|
+
containerProps: { style: { height: "100%", width: "100%" } }
|
|
184
|
+
}
|
|
185
|
+
) : x ? /* @__PURE__ */ s(
|
|
186
|
+
F,
|
|
178
187
|
{
|
|
179
|
-
highcharts:
|
|
180
|
-
options:
|
|
188
|
+
highcharts: i,
|
|
189
|
+
options: g,
|
|
181
190
|
ref: r,
|
|
182
191
|
containerProps: { style: { height: "100%", width: "100%" } }
|
|
183
192
|
}
|
|
184
|
-
) : /* @__PURE__ */ s(
|
|
185
|
-
|
|
193
|
+
) : /* @__PURE__ */ s(S, { className: h, isLoading: l, children: /* @__PURE__ */ s(q, { loader: u, children: /* @__PURE__ */ s(
|
|
194
|
+
F,
|
|
186
195
|
{
|
|
187
|
-
highcharts:
|
|
188
|
-
options:
|
|
196
|
+
highcharts: i,
|
|
197
|
+
options: g,
|
|
189
198
|
ref: r,
|
|
190
199
|
containerProps: { style: { height: "100%", width: "100%" } }
|
|
191
200
|
}
|
|
@@ -196,8 +205,8 @@ $.displayName = "Chart";
|
|
|
196
205
|
export {
|
|
197
206
|
$ as Chart,
|
|
198
207
|
Z as ChartActions,
|
|
199
|
-
|
|
200
|
-
|
|
208
|
+
S as ChartContainer,
|
|
209
|
+
q as ChartContent,
|
|
201
210
|
_ as ChartFullScreen,
|
|
202
211
|
X as ChartHeader,
|
|
203
212
|
Y as ChartTitle
|
|
@@ -8,10 +8,6 @@ export declare const DataTable: ({ children, className }: {
|
|
|
8
8
|
children: React.ReactNode;
|
|
9
9
|
className?: string;
|
|
10
10
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
/**
|
|
12
|
-
* DataTable Content
|
|
13
|
-
* Wraps AgGridWrapper and captures the API reference.
|
|
14
|
-
*/
|
|
15
11
|
export declare function DataTableContent<TData>(props: AgGridWrapperProps<TData> & {
|
|
16
12
|
className?: string;
|
|
17
13
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,87 +1,121 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { AgGridWrapper as
|
|
4
|
-
import { cn as
|
|
5
|
-
import { DataTableContext as
|
|
6
|
-
import { DATA_TABLE_SCOPED_SHEET_HOST_MIN_HEIGHT_PX as
|
|
7
|
-
|
|
1
|
+
import { jsx as c, jsxs as C } from "react/jsx-runtime";
|
|
2
|
+
import { useState as s, useRef as E, useCallback as A, useMemo as H, useEffect as _ } from "react";
|
|
3
|
+
import { AgGridWrapper as O } from "../ag-grid-react/index.js";
|
|
4
|
+
import { cn as y } from "../../../lib/utils.js";
|
|
5
|
+
import { DataTableContext as D, useDataTable as P } from "./data-table-context.js";
|
|
6
|
+
import { DATA_TABLE_SCOPED_SHEET_HOST_MIN_HEIGHT_PX as F } from "./data-table-constants.js";
|
|
7
|
+
import { AG_GRID_VALUE_FORMATTERS as N } from "../ag-grid-react/value-formatters.js";
|
|
8
|
+
const R = {
|
|
8
9
|
default: 46,
|
|
9
10
|
compact: 30,
|
|
10
11
|
comfort: 52
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
}, G = (o) => {
|
|
13
|
+
if (o)
|
|
14
|
+
return o.map((e) => {
|
|
15
|
+
if ("children" in e && e.children)
|
|
16
|
+
return {
|
|
17
|
+
...e,
|
|
18
|
+
children: G(e.children)
|
|
19
|
+
};
|
|
20
|
+
const t = e;
|
|
21
|
+
return !t.valueFormatter && (t.type === "numericColumn" || t.type === "number") ? {
|
|
22
|
+
...t,
|
|
23
|
+
valueFormatter: N.number
|
|
24
|
+
} : t;
|
|
25
|
+
});
|
|
26
|
+
}, W = ({
|
|
27
|
+
children: o,
|
|
28
|
+
className: e
|
|
14
29
|
}) => {
|
|
15
|
-
const [
|
|
16
|
-
|
|
17
|
-
}, []),
|
|
18
|
-
|
|
19
|
-
}, []),
|
|
30
|
+
const [t, d] = s(null), [r, u] = s(null), [n, p] = s("medium"), [f, h] = s("full"), [a, m] = s("default"), [g, x] = s(!1), l = E(0), T = A((S) => {
|
|
31
|
+
l.current = Math.max(0, l.current + S), x(l.current > 0);
|
|
32
|
+
}, []), b = A((S) => {
|
|
33
|
+
d(S);
|
|
34
|
+
}, []), v = {
|
|
20
35
|
small: "12px",
|
|
21
36
|
medium: "14px",
|
|
22
37
|
large: "16px"
|
|
23
|
-
}[
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
-
gridApi:
|
|
26
|
-
registerApi:
|
|
27
|
-
sheetTarget:
|
|
28
|
-
setSheetTarget:
|
|
29
|
-
scopedSheetOpen:
|
|
38
|
+
}[n], i = `${R[a]}px`;
|
|
39
|
+
return /* @__PURE__ */ c(D.Provider, { value: {
|
|
40
|
+
gridApi: t,
|
|
41
|
+
registerApi: b,
|
|
42
|
+
sheetTarget: r,
|
|
43
|
+
setSheetTarget: u,
|
|
44
|
+
scopedSheetOpen: g,
|
|
30
45
|
registerScopedSheetDepth: T,
|
|
31
|
-
fontSize:
|
|
46
|
+
fontSize: n,
|
|
32
47
|
setFontSize: p,
|
|
33
|
-
numericFormat:
|
|
48
|
+
numericFormat: f,
|
|
34
49
|
setNumericFormat: h,
|
|
35
|
-
rowHeight:
|
|
36
|
-
setRowHeight:
|
|
37
|
-
}, children: /* @__PURE__ */
|
|
50
|
+
rowHeight: a,
|
|
51
|
+
setRowHeight: m
|
|
52
|
+
}, children: /* @__PURE__ */ c(
|
|
38
53
|
"div",
|
|
39
54
|
{
|
|
40
55
|
"data-component": "data-table",
|
|
41
|
-
className:
|
|
56
|
+
className: y("flex flex-col w-full min-h-0 rounded-[inherit]", e),
|
|
42
57
|
style: {
|
|
43
|
-
"--ag-font-size":
|
|
44
|
-
"--ag-row-height":
|
|
58
|
+
"--ag-font-size": v,
|
|
59
|
+
"--ag-row-height": i
|
|
45
60
|
},
|
|
46
|
-
children:
|
|
61
|
+
children: o
|
|
47
62
|
}
|
|
48
63
|
) });
|
|
64
|
+
}, w = {
|
|
65
|
+
full: "full_no",
|
|
66
|
+
k: "thou",
|
|
67
|
+
m: "mil",
|
|
68
|
+
b: "bil"
|
|
49
69
|
};
|
|
50
|
-
function
|
|
70
|
+
function X(o) {
|
|
51
71
|
const {
|
|
52
|
-
registerApi:
|
|
53
|
-
setSheetTarget:
|
|
54
|
-
rowHeight:
|
|
55
|
-
gridApi:
|
|
56
|
-
scopedSheetOpen:
|
|
57
|
-
|
|
72
|
+
registerApi: e,
|
|
73
|
+
setSheetTarget: t,
|
|
74
|
+
rowHeight: d,
|
|
75
|
+
gridApi: r,
|
|
76
|
+
scopedSheetOpen: u,
|
|
77
|
+
numericFormat: n
|
|
78
|
+
} = P(), { className: p, onGridReady: f, rowHeight: h, context: a, columnDefs: m, ...g } = o, x = R[d], l = h ?? x, T = H(() => G(m), [m]), b = H(() => ({
|
|
79
|
+
...a,
|
|
80
|
+
formatType: w[n]
|
|
81
|
+
}), [a, n]);
|
|
58
82
|
_(() => {
|
|
59
|
-
|
|
60
|
-
}, [
|
|
61
|
-
|
|
62
|
-
|
|
83
|
+
r?.resetRowHeights();
|
|
84
|
+
}, [d, r]), _(() => {
|
|
85
|
+
if (r) {
|
|
86
|
+
const i = r.getGridOption("context") || {};
|
|
87
|
+
r.setGridOption("context", {
|
|
88
|
+
...i,
|
|
89
|
+
formatType: w[n]
|
|
90
|
+
}), r.refreshCells({ force: !0 });
|
|
91
|
+
}
|
|
92
|
+
}, [n, r]);
|
|
93
|
+
const v = (i) => {
|
|
94
|
+
e(i.api), f?.(i);
|
|
63
95
|
};
|
|
64
|
-
return /* @__PURE__ */
|
|
96
|
+
return /* @__PURE__ */ C(
|
|
65
97
|
"div",
|
|
66
98
|
{
|
|
67
|
-
className:
|
|
99
|
+
className: y(
|
|
68
100
|
"relative flex-1 min-h-0 w-full bg-canvas-elevated rounded-b-[inherit] grid-rounded-bottom",
|
|
69
|
-
|
|
101
|
+
p
|
|
70
102
|
),
|
|
71
|
-
style:
|
|
103
|
+
style: u ? { minHeight: F } : void 0,
|
|
72
104
|
children: [
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
-
|
|
105
|
+
/* @__PURE__ */ c(
|
|
106
|
+
O,
|
|
75
107
|
{
|
|
76
|
-
...
|
|
77
|
-
|
|
78
|
-
|
|
108
|
+
...g,
|
|
109
|
+
columnDefs: T,
|
|
110
|
+
rowHeight: l,
|
|
111
|
+
onGridReady: v,
|
|
112
|
+
context: b
|
|
79
113
|
}
|
|
80
114
|
),
|
|
81
|
-
/* @__PURE__ */
|
|
115
|
+
/* @__PURE__ */ c(
|
|
82
116
|
"div",
|
|
83
117
|
{
|
|
84
|
-
ref:
|
|
118
|
+
ref: t,
|
|
85
119
|
className: "absolute inset-0 pointer-events-none z-[39] flex overflow-x-hidden overflow-y-visible"
|
|
86
120
|
}
|
|
87
121
|
)
|
|
@@ -89,12 +123,12 @@ function k(t) {
|
|
|
89
123
|
}
|
|
90
124
|
);
|
|
91
125
|
}
|
|
92
|
-
const
|
|
93
|
-
children:
|
|
94
|
-
className:
|
|
95
|
-
}) => /* @__PURE__ */
|
|
126
|
+
const U = ({
|
|
127
|
+
children: o,
|
|
128
|
+
className: e
|
|
129
|
+
}) => /* @__PURE__ */ c("div", { "data-component": "data-table-toolbar", className: y("flex items-center justify-between px-4 py-3 shrink-0 bg-canvas-elevated rounded-t-[inherit]", e), children: o });
|
|
96
130
|
export {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
131
|
+
W as DataTable,
|
|
132
|
+
X as DataTableContent,
|
|
133
|
+
U as DataTableToolbar
|
|
100
134
|
};
|