impact-nova 2.2.3 → 2.2.5
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/ag-grid-react/headers/custom-header.js +133 -110
- package/dist/components/data/ag-grid-react/headers/header-search-input.js +23 -23
- package/dist/components/data/ag-grid-react/index.js +202 -206
- package/dist/components/data/data-table/build-column-tree-from-grid.js +65 -67
- package/dist/components/data/data-table/data-table-column-list-sync.js +5 -10
- package/dist/components/data/data-table/data-table-column-list.js +64 -61
- package/dist/components/data/data-table/data-table-column-tree-cache.d.ts +29 -0
- package/dist/components/data/data-table/data-table-column-tree-cache.js +117 -0
- package/dist/components/data/data-table/data-table-constants.d.ts +2 -0
- package/dist/components/data/data-table/data-table-constants.js +3 -2
- package/dist/components/data/data-table/data-table-sheet.js +46 -49
- package/dist/components/data/data-table/data-table.js +137 -119
- package/dist/components/data/data-table/index.js +24 -23
- package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.d.ts +3 -0
- package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.js +24 -0
- package/dist/components/data/data-table/use-data-table-column-list-sync.d.ts +2 -1
- package/dist/components/data/data-table/use-data-table-column-list-sync.js +249 -150
- package/dist/components/data/expandable-list-item/expandable-list-item-attributes.d.ts +2 -1
- package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +30 -27
- package/dist/components/data/expandable-list-item/expandable-list-item-parts.d.ts +1 -1
- package/dist/components/data/expandable-list-item/expandable-list-item-parts.js +179 -118
- package/dist/components/data/expandable-list-item/expandable-list-item-preset.js +30 -29
- package/dist/components/data/expandable-list-item/expandable-list-item.types.d.ts +8 -1
- package/dist/components/data/expandable-list-item/index.d.ts +1 -1
- package/dist/components/data/nested-list/components/NestedListContent.js +158 -96
- package/dist/components/data/nested-list/nested-list-constants.d.ts +4 -0
- package/dist/components/data/nested-list/nested-list-constants.js +6 -0
- package/dist/components/data/nested-list/nested-list-tree-utils.d.ts +3 -0
- package/dist/components/data/nested-list/nested-list-tree-utils.js +24 -0
- package/dist/components/data/nested-list/nested-list.js +214 -215
- package/dist/components/data-display/card/card.js +6 -5
- package/dist/components/feedback/dialog/dialog.js +7 -5
- package/dist/components/feedback/sheet/sheet.js +28 -27
- package/dist/components/feedback/tooltip/tab-tooltip-render.js +3 -2
- package/dist/components/flows/filter-panel/filter-panel.js +36 -35
- package/dist/components/flows/filter-strip/filter-tag-list.js +44 -44
- package/dist/components/forms/combobox/combobox.js +110 -100
- package/dist/components/forms/date-picker/date-input-behavior.d.ts +9 -0
- package/dist/components/forms/date-picker/date-input-behavior.js +32 -19
- package/dist/components/forms/date-picker/date-picker.js +96 -90
- package/dist/components/forms/date-picker/date-range-picker.js +160 -152
- package/dist/components/forms/date-picker/month-picker.js +71 -65
- package/dist/components/forms/date-picker/month-range-picker.js +153 -145
- package/dist/components/forms/date-picker/multi-date-picker.js +127 -99
- package/dist/components/forms/date-picker/multi-month-picker.js +109 -97
- package/dist/components/forms/date-picker/multi-week-picker.js +98 -86
- package/dist/components/forms/date-picker/week-picker.js +82 -76
- package/dist/components/forms/date-picker/week-range-picker.js +127 -119
- package/dist/impact-nova-base.scss +10 -5
- package/dist/impact-nova-components.css +9 -5
- package/dist/impact-nova.css +1 -1
- package/dist/index.js +189 -188
- package/dist/lib/overlay/overlay-portal-context.d.ts +11 -2
- package/dist/lib/overlay/overlay-portal-context.js +39 -28
- package/dist/lib/primitives/create-compound.d.ts +5 -0
- package/dist/lib/primitives/create-compound.js +17 -16
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- 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
|
|
3
|
-
import { createPortal as
|
|
4
|
-
import { Cross as
|
|
5
|
-
import { cn as
|
|
6
|
-
import { Button as
|
|
7
|
-
import { useDataTable as
|
|
8
|
-
import { DATA_TABLE_SCOPED_SHEET_HOST_MIN_HEIGHT_PX as
|
|
9
|
-
import { DataTableSheetApiContext as
|
|
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:
|
|
14
|
+
onOpenChange: a
|
|
15
15
|
}) => {
|
|
16
|
-
const { registerScopedSheetDepth:
|
|
17
|
-
|
|
18
|
-
|
|
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
|
|
21
|
-
e === void 0 &&
|
|
20
|
+
const S = T((u) => {
|
|
21
|
+
e === void 0 && l(u), m.current?.(u);
|
|
22
22
|
}, [e]);
|
|
23
|
-
return
|
|
24
|
-
if (
|
|
25
|
-
return
|
|
26
|
-
|
|
23
|
+
return p(() => {
|
|
24
|
+
if (i)
|
|
25
|
+
return o(1), () => {
|
|
26
|
+
o(-1);
|
|
27
27
|
};
|
|
28
|
-
}, [
|
|
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:
|
|
34
|
-
e(!
|
|
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: (
|
|
40
|
-
s.props.onClick?.(
|
|
39
|
+
onClick: (l) => {
|
|
40
|
+
s.props.onClick?.(l), o();
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
|
-
return /* @__PURE__ */ t(
|
|
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:
|
|
50
|
+
const { setOpen: a } = y();
|
|
51
51
|
return /* @__PURE__ */ c(
|
|
52
52
|
"div",
|
|
53
53
|
{
|
|
54
|
-
className:
|
|
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
|
-
|
|
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: () =>
|
|
72
|
-
children: /* @__PURE__ */ t(
|
|
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 } =
|
|
84
|
-
if (e && !
|
|
85
|
-
const
|
|
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
|
-
|
|
89
|
-
|
|
90
|
-
|
|
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:
|
|
103
|
-
"relative flex h-full w-[355px] flex-col overflow-
|
|
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
|
-
),
|
|
109
|
+
), f = /* @__PURE__ */ t(
|
|
113
110
|
"div",
|
|
114
111
|
{
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
children:
|
|
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
|
|
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:
|
|
126
|
-
display: e ? void 0 : "none"
|
|
123
|
+
minHeight: N
|
|
127
124
|
},
|
|
128
|
-
children:
|
|
125
|
+
children: l
|
|
129
126
|
}
|
|
130
127
|
);
|
|
131
128
|
};
|
|
@@ -1,202 +1,220 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { AgGridWrapper as
|
|
4
|
-
import { cn as
|
|
5
|
-
import { DataTableContext as F, DataTableSheetPortalStoreContext as
|
|
6
|
-
import { createDataTableSheetPortalStore as
|
|
7
|
-
import { DATA_TABLE_SCOPED_SHEET_HOST_MIN_HEIGHT_PX as
|
|
8
|
-
import {
|
|
9
|
-
|
|
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
|
-
},
|
|
14
|
-
children:
|
|
15
|
-
className:
|
|
14
|
+
}, re = ({
|
|
15
|
+
children: a,
|
|
16
|
+
className: o
|
|
16
17
|
}) => {
|
|
17
|
-
const [r, e] =
|
|
18
|
-
|
|
19
|
-
}, [
|
|
20
|
-
e(
|
|
21
|
-
}, [])
|
|
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
|
-
}[
|
|
31
|
+
}[t], H = `${R[l]}px`, x = p(
|
|
26
32
|
() => ({
|
|
27
33
|
gridApi: r,
|
|
28
|
-
registerApi:
|
|
29
|
-
registerScopedSheetDepth:
|
|
30
|
-
fontSize:
|
|
31
|
-
setFontSize:
|
|
32
|
-
numericFormat:
|
|
33
|
-
setNumericFormat:
|
|
34
|
-
rowHeight:
|
|
35
|
-
setRowHeight:
|
|
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
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
45
|
+
g,
|
|
46
|
+
d,
|
|
47
|
+
t,
|
|
48
|
+
n,
|
|
49
|
+
l
|
|
44
50
|
]
|
|
45
51
|
);
|
|
46
|
-
return /* @__PURE__ */
|
|
47
|
-
|
|
52
|
+
return /* @__PURE__ */ i(F.Provider, { value: x, children: /* @__PURE__ */ i(
|
|
53
|
+
z.Provider,
|
|
48
54
|
{
|
|
49
|
-
value:
|
|
50
|
-
children: /* @__PURE__ */
|
|
55
|
+
value: u,
|
|
56
|
+
children: /* @__PURE__ */ i(
|
|
51
57
|
"div",
|
|
52
58
|
{
|
|
53
59
|
"data-component": "data-table",
|
|
54
|
-
className:
|
|
60
|
+
className: _(
|
|
55
61
|
"flex flex-col w-full min-h-0 rounded-[inherit]",
|
|
56
|
-
|
|
62
|
+
o
|
|
57
63
|
),
|
|
58
64
|
style: {
|
|
59
|
-
"--ag-font-size":
|
|
60
|
-
"--ag-row-height":
|
|
65
|
+
"--ag-font-size": T,
|
|
66
|
+
"--ag-row-height": H
|
|
61
67
|
},
|
|
62
|
-
children:
|
|
68
|
+
children: a
|
|
63
69
|
}
|
|
64
70
|
)
|
|
65
71
|
}
|
|
66
72
|
) });
|
|
67
|
-
},
|
|
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
|
-
},
|
|
74
|
-
const { setSheetTarget:
|
|
75
|
-
return /* @__PURE__ */
|
|
79
|
+
}, V = A(function() {
|
|
80
|
+
const { setSheetTarget: o } = P();
|
|
81
|
+
return /* @__PURE__ */ i(
|
|
76
82
|
"div",
|
|
77
83
|
{
|
|
78
|
-
ref:
|
|
79
|
-
className: "absolute inset-0 pointer-events-none z-[39] flex overflow-
|
|
84
|
+
ref: o,
|
|
85
|
+
className: "absolute inset-0 pointer-events-none z-[39] flex overflow-hidden"
|
|
80
86
|
}
|
|
81
87
|
);
|
|
82
|
-
}),
|
|
83
|
-
className:
|
|
88
|
+
}), Y = A(function({
|
|
89
|
+
className: o,
|
|
84
90
|
children: r
|
|
85
91
|
}) {
|
|
86
|
-
const { scopedSheetOpen: e } = P();
|
|
87
|
-
|
|
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
|
-
|
|
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
|
-
|
|
110
|
+
o
|
|
93
111
|
),
|
|
94
|
-
style:
|
|
112
|
+
style: m ? { minHeight: v } : void 0,
|
|
95
113
|
children: [
|
|
96
114
|
r,
|
|
97
|
-
/* @__PURE__ */
|
|
115
|
+
/* @__PURE__ */ i(V, {})
|
|
98
116
|
]
|
|
99
117
|
}
|
|
100
118
|
);
|
|
101
|
-
}),
|
|
102
|
-
resolvedRowHeight:
|
|
119
|
+
}), $ = A(function({
|
|
120
|
+
resolvedRowHeight: o,
|
|
103
121
|
mergedContext: r,
|
|
104
122
|
onGridReady: e,
|
|
105
|
-
columnDefs:
|
|
106
|
-
maintainColumnOrder:
|
|
107
|
-
...
|
|
123
|
+
columnDefs: t,
|
|
124
|
+
maintainColumnOrder: s = !0,
|
|
125
|
+
...n
|
|
108
126
|
}) {
|
|
109
|
-
return /* @__PURE__ */
|
|
110
|
-
|
|
127
|
+
return /* @__PURE__ */ i(
|
|
128
|
+
M,
|
|
111
129
|
{
|
|
112
|
-
...
|
|
113
|
-
columnDefs:
|
|
114
|
-
rowHeight:
|
|
130
|
+
...n,
|
|
131
|
+
columnDefs: t,
|
|
132
|
+
rowHeight: o,
|
|
115
133
|
onGridReady: e,
|
|
116
134
|
context: r,
|
|
117
|
-
maintainColumnOrder:
|
|
135
|
+
maintainColumnOrder: s
|
|
118
136
|
}
|
|
119
137
|
);
|
|
120
138
|
});
|
|
121
|
-
function
|
|
139
|
+
function ne(a) {
|
|
122
140
|
const {
|
|
123
|
-
registerApi:
|
|
141
|
+
registerApi: o,
|
|
124
142
|
rowHeight: r,
|
|
125
143
|
gridApi: e,
|
|
126
|
-
numericFormat:
|
|
127
|
-
} =
|
|
128
|
-
className:
|
|
129
|
-
onGridReady:
|
|
130
|
-
rowHeight:
|
|
131
|
-
context:
|
|
132
|
-
columnDefs:
|
|
133
|
-
initialState:
|
|
134
|
-
suppressInitialRuntimeState:
|
|
135
|
-
maintainColumnOrder:
|
|
136
|
-
...
|
|
137
|
-
} =
|
|
138
|
-
() =>
|
|
139
|
-
[
|
|
140
|
-
), C =
|
|
141
|
-
() =>
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
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
|
-
[
|
|
147
|
-
),
|
|
164
|
+
[u, w, d]
|
|
165
|
+
), E = p(
|
|
148
166
|
() => ({
|
|
149
|
-
...
|
|
150
|
-
formatType:
|
|
167
|
+
...l,
|
|
168
|
+
formatType: y[t]
|
|
151
169
|
}),
|
|
152
|
-
[
|
|
170
|
+
[l, t]
|
|
153
171
|
);
|
|
154
|
-
|
|
172
|
+
D(() => {
|
|
155
173
|
e?.resetRowHeights();
|
|
156
|
-
}, [r, e]),
|
|
174
|
+
}, [r, e]), D(() => {
|
|
157
175
|
if (e) {
|
|
158
|
-
const
|
|
176
|
+
const S = e.getGridOption("context") || {};
|
|
159
177
|
e.setGridOption("context", {
|
|
160
|
-
...
|
|
161
|
-
formatType:
|
|
178
|
+
...S,
|
|
179
|
+
formatType: y[t]
|
|
162
180
|
}), e.refreshCells({ force: !0 });
|
|
163
181
|
}
|
|
164
|
-
}, [
|
|
165
|
-
const
|
|
166
|
-
(
|
|
167
|
-
|
|
182
|
+
}, [t, e]);
|
|
183
|
+
const G = b(
|
|
184
|
+
(S) => {
|
|
185
|
+
o(S.api), n?.(S);
|
|
168
186
|
},
|
|
169
|
-
[
|
|
187
|
+
[o, n]
|
|
170
188
|
);
|
|
171
|
-
return /* @__PURE__ */
|
|
172
|
-
|
|
189
|
+
return /* @__PURE__ */ i(Y, { className: s, children: /* @__PURE__ */ i(
|
|
190
|
+
$,
|
|
173
191
|
{
|
|
174
|
-
...
|
|
175
|
-
columnDefs:
|
|
192
|
+
...T,
|
|
193
|
+
columnDefs: f,
|
|
176
194
|
initialState: C,
|
|
177
|
-
maintainColumnOrder:
|
|
178
|
-
resolvedRowHeight:
|
|
179
|
-
mergedContext:
|
|
180
|
-
onGridReady:
|
|
195
|
+
maintainColumnOrder: g,
|
|
196
|
+
resolvedRowHeight: x,
|
|
197
|
+
mergedContext: E,
|
|
198
|
+
onGridReady: G
|
|
181
199
|
}
|
|
182
200
|
) });
|
|
183
201
|
}
|
|
184
|
-
const
|
|
185
|
-
children:
|
|
186
|
-
className:
|
|
187
|
-
}) => /* @__PURE__ */
|
|
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:
|
|
209
|
+
className: _(
|
|
192
210
|
"flex items-center justify-between px-4 py-3 shrink-0 bg-canvas-elevated rounded-t-[inherit]",
|
|
193
|
-
|
|
211
|
+
o
|
|
194
212
|
),
|
|
195
|
-
children:
|
|
213
|
+
children: a
|
|
196
214
|
}
|
|
197
215
|
);
|
|
198
216
|
export {
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
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
|
|
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
|
|
5
|
-
import { DataTableFormatOptions as
|
|
6
|
-
import { DataTableSheet as h, DataTableSheetContent as s, DataTableSheetHeader as C, DataTableSheetTrigger as
|
|
7
|
-
import { useDataTableSheet as
|
|
8
|
-
import { DataTableViewMenuContent as
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
20
|
-
|
|
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
|
-
|
|
26
|
-
|
|
26
|
+
p as DataTableSheetPortalStoreContext,
|
|
27
|
+
I as DataTableSheetTrigger,
|
|
27
28
|
r as DataTableToolbar,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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
|
-
|
|
41
|
+
E as useDataTableSheetPortalStore
|
|
41
42
|
};
|
|
@@ -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;
|