impact-nova 0.1.4 → 0.1.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/ui/ag-grid-react/headers/column-menu/column-settings-menu.js +47 -47
- package/dist/components/ui/ag-grid-react/headers/components/section-renderers.js +40 -40
- package/dist/components/ui/ag-grid-react/index.js +4 -3
- package/dist/components/ui/ag-grid-react/theme.js +2 -3
- package/package.json +1 -1
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as t, jsx as e, Fragment as j } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { Settings as
|
|
4
|
-
import { DropdownMenu as
|
|
5
|
-
const
|
|
3
|
+
import { Settings as F, Checkmark as d, Search as T } from "../../../../../icons/index.js";
|
|
4
|
+
import { DropdownMenu as L, DropdownMenuTrigger as _, DropdownMenuContent as E, DropdownMenuLabel as z, DropdownMenuSeparator as k, DropdownMenuSub as m, DropdownMenuSubTrigger as p, DropdownMenuSubContent as f, DropdownMenuItem as s } from "../../../dropdown-menu.js";
|
|
5
|
+
const H = ({
|
|
6
6
|
isOpen: O,
|
|
7
7
|
onClose: i,
|
|
8
8
|
columnId: a,
|
|
9
|
-
gridApi:
|
|
9
|
+
gridApi: r,
|
|
10
10
|
anchor: v
|
|
11
11
|
}) => {
|
|
12
|
-
const o =
|
|
12
|
+
const o = r.getColumn(a);
|
|
13
13
|
if (!o) return null;
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
state: [{ colId: a, sort:
|
|
14
|
+
const l = o.getColDef(), C = o.getSort(), S = o.getPinned(), M = l?.sortable !== !1, x = l?.filter || "agTextColumnFilter", g = x === "agNumberColumnFilter" || (Array.isArray(l?.type) ? l.type.includes("numericColumn") : l?.type === "numericColumn"), w = x === "agDateColumnFilter" || (Array.isArray(l?.type) ? l.type.includes("dateColumn") : l?.type === "dateColumn"), h = (n) => {
|
|
15
|
+
r.applyColumnState({
|
|
16
|
+
state: [{ colId: a, sort: n }],
|
|
17
17
|
defaultState: { sort: null }
|
|
18
18
|
}), i();
|
|
19
|
-
}, u = (
|
|
20
|
-
|
|
21
|
-
state: [{ colId: a, pinned:
|
|
19
|
+
}, u = (n) => {
|
|
20
|
+
r.applyColumnState({
|
|
21
|
+
state: [{ colId: a, pinned: n }],
|
|
22
22
|
defaultState: { pinned: null }
|
|
23
23
|
}), i();
|
|
24
|
-
}, D = (
|
|
25
|
-
|
|
26
|
-
}, M = () => {
|
|
27
|
-
const t = s.getGridOption("context") || {};
|
|
28
|
-
s.setGridOption("context", { ...t, activeSearchColumnId: a }), s.refreshHeader(), i();
|
|
24
|
+
}, D = (n) => {
|
|
25
|
+
n ? r.autoSizeAllColumns() : r.autoSizeColumns([a]), i();
|
|
29
26
|
}, P = () => {
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
|
|
27
|
+
const n = r.getGridOption("context") || {};
|
|
28
|
+
r.setGridOption("context", { ...n, activeSearchColumnId: a }), r.refreshHeader(), i();
|
|
29
|
+
}, A = () => {
|
|
30
|
+
const n = l?.headerComponentParams;
|
|
31
|
+
n?.onAdvanceSearchClick ? n.onAdvanceSearchClick(o) : r.getGridOption("context"), i();
|
|
32
|
+
}, c = v?.getBoundingClientRect(), N = l?.headerComponentParams, b = N?.isSearchable, y = N?.advanceSearchEnabled;
|
|
33
|
+
return /* @__PURE__ */ t(L, { open: O, onOpenChange: (n) => !n && i(), children: [
|
|
34
|
+
c && /* @__PURE__ */ e(_, { asChild: !0, children: /* @__PURE__ */ e(
|
|
35
35
|
"div",
|
|
36
36
|
{
|
|
37
37
|
style: {
|
|
@@ -46,62 +46,62 @@ const B = ({
|
|
|
46
46
|
}
|
|
47
47
|
) }),
|
|
48
48
|
/* @__PURE__ */ e(
|
|
49
|
-
|
|
49
|
+
E,
|
|
50
50
|
{
|
|
51
51
|
align: "end",
|
|
52
52
|
side: "bottom",
|
|
53
53
|
sideOffset: 5,
|
|
54
54
|
className: "w-[200px] p-2 rounded-[8px] border-none !shadow-[0px_0px_2px_0px_rgba(0,0,0,0.25)] z-[110]",
|
|
55
|
-
onCloseAutoFocus: (
|
|
56
|
-
children: /* @__PURE__ */
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
/* @__PURE__ */ e(
|
|
55
|
+
onCloseAutoFocus: (n) => n.preventDefault(),
|
|
56
|
+
children: /* @__PURE__ */ t("div", { className: "flex flex-col gap-0.5", children: [
|
|
57
|
+
/* @__PURE__ */ t(z, { className: "flex items-center gap-2 text-[#60697D]", children: [
|
|
58
|
+
/* @__PURE__ */ e(F, { size: 12 }),
|
|
59
59
|
" Column Settings"
|
|
60
60
|
] }),
|
|
61
61
|
/* @__PURE__ */ e(k, {}),
|
|
62
|
-
/* @__PURE__ */
|
|
62
|
+
M && /* @__PURE__ */ t(m, { children: [
|
|
63
63
|
/* @__PURE__ */ e(p, { inset: !0, children: "Sort" }),
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
-
/* @__PURE__ */ e(
|
|
64
|
+
/* @__PURE__ */ t(f, { className: "z-[120]", sideOffset: 10, alignOffset: -5, children: [
|
|
65
|
+
/* @__PURE__ */ e(s, { onClick: () => h("asc"), children: /* @__PURE__ */ t("span", { className: "flex items-center w-full justify-between", children: [
|
|
66
66
|
/* @__PURE__ */ e("span", { children: g ? "Sort Smallest to Largest" : w ? "Sort Oldest to Newest" : "Sort A to Z" }),
|
|
67
67
|
C === "asc" && /* @__PURE__ */ e(d, { size: 14, className: "ml-2 text-[#60697D]" })
|
|
68
68
|
] }) }),
|
|
69
|
-
/* @__PURE__ */ e(
|
|
69
|
+
/* @__PURE__ */ e(s, { onClick: () => h("desc"), children: /* @__PURE__ */ t("span", { className: "flex items-center w-full justify-between", children: [
|
|
70
70
|
/* @__PURE__ */ e("span", { children: g ? "Sort Largest to Smallest" : w ? "Sort Newest to Oldest" : "Sort Z to A" }),
|
|
71
71
|
C === "desc" && /* @__PURE__ */ e(d, { size: 14, className: "ml-2 text-[#60697D]" })
|
|
72
72
|
] }) }),
|
|
73
|
-
/* @__PURE__ */ e(
|
|
73
|
+
/* @__PURE__ */ e(s, { onClick: () => h(null), children: /* @__PURE__ */ e("span", { children: "Reset" }) })
|
|
74
74
|
] })
|
|
75
75
|
] }),
|
|
76
|
-
/* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */ t(m, { children: [
|
|
77
77
|
/* @__PURE__ */ e(p, { inset: !0, children: "Freeze Column" }),
|
|
78
|
-
/* @__PURE__ */
|
|
79
|
-
/* @__PURE__ */ e(
|
|
78
|
+
/* @__PURE__ */ t(f, { className: "z-[120]", sideOffset: 10, alignOffset: -5, children: [
|
|
79
|
+
/* @__PURE__ */ e(s, { onClick: () => u("left"), children: /* @__PURE__ */ t("span", { className: "flex items-center w-full justify-between", children: [
|
|
80
80
|
/* @__PURE__ */ e("span", { children: "Pin Left" }),
|
|
81
81
|
S === "left" && /* @__PURE__ */ e(d, { size: 14, className: "ml-2 text-[#60697D]" })
|
|
82
82
|
] }) }),
|
|
83
|
-
/* @__PURE__ */ e(
|
|
83
|
+
/* @__PURE__ */ e(s, { onClick: () => u("right"), children: /* @__PURE__ */ t("span", { className: "flex items-center w-full justify-between", children: [
|
|
84
84
|
/* @__PURE__ */ e("span", { children: "Pin Right" }),
|
|
85
85
|
S === "right" && /* @__PURE__ */ e(d, { size: 14, className: "ml-2 text-[#60697D]" })
|
|
86
86
|
] }) }),
|
|
87
|
-
/* @__PURE__ */ e(
|
|
87
|
+
/* @__PURE__ */ e(s, { onClick: () => u(null), children: /* @__PURE__ */ e("span", { children: "No Pin" }) })
|
|
88
88
|
] })
|
|
89
89
|
] }),
|
|
90
|
-
/* @__PURE__ */
|
|
90
|
+
/* @__PURE__ */ t(m, { children: [
|
|
91
91
|
/* @__PURE__ */ e(p, { inset: !0, children: "Column width" }),
|
|
92
|
-
/* @__PURE__ */
|
|
93
|
-
/* @__PURE__ */ e(
|
|
94
|
-
/* @__PURE__ */ e(
|
|
92
|
+
/* @__PURE__ */ t(f, { className: "z-[120]", sideOffset: 10, alignOffset: -5, children: [
|
|
93
|
+
/* @__PURE__ */ e(s, { onClick: () => D(!1), children: "Autosize This Column" }),
|
|
94
|
+
/* @__PURE__ */ e(s, { onClick: () => D(!0), children: "Autosize All Columns" })
|
|
95
95
|
] })
|
|
96
96
|
] }),
|
|
97
|
-
(
|
|
97
|
+
(b || y) && /* @__PURE__ */ t(j, { children: [
|
|
98
98
|
/* @__PURE__ */ e(k, {}),
|
|
99
|
-
/* @__PURE__ */
|
|
100
|
-
/* @__PURE__ */ e(
|
|
99
|
+
/* @__PURE__ */ t(z, { className: "flex items-center gap-2 text-[#60697D]", children: [
|
|
100
|
+
/* @__PURE__ */ e(T, { size: 12 }),
|
|
101
101
|
" Search Options"
|
|
102
102
|
] }),
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
b && /* @__PURE__ */ e(s, { inset: !0, onClick: P, children: "Search" }),
|
|
104
|
+
y && /* @__PURE__ */ e(s, { inset: !0, onClick: A, children: "Advance Search" })
|
|
105
105
|
] })
|
|
106
106
|
] })
|
|
107
107
|
}
|
|
@@ -109,5 +109,5 @@ const B = ({
|
|
|
109
109
|
] });
|
|
110
110
|
};
|
|
111
111
|
export {
|
|
112
|
-
|
|
112
|
+
H as ColumnSettingsMenu
|
|
113
113
|
};
|
|
@@ -1,78 +1,78 @@
|
|
|
1
1
|
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { Badge as
|
|
4
|
-
import { cn as
|
|
3
|
+
import { Badge as o } from "../../../badge.js";
|
|
4
|
+
import { cn as i } from "../../../../../lib/utils.js";
|
|
5
5
|
const d = ({ section: t }) => {
|
|
6
|
-
const
|
|
7
|
-
|
|
6
|
+
const r = t.variant || "paragraph", { label: l, content: n } = t.data || {}, a = i(
|
|
7
|
+
r === "heading" ? "text-lg font-semibold text-slate-900" : r === "caption" ? "text-xs text-slate-500" : "text-sm text-slate-700 leading-relaxed"
|
|
8
8
|
);
|
|
9
9
|
return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1.5", children: [
|
|
10
|
-
|
|
11
|
-
/* @__PURE__ */ e("p", { className:
|
|
10
|
+
l && /* @__PURE__ */ e("span", { className: "text-xs text-[#60697D] font-medium", children: l }),
|
|
11
|
+
/* @__PURE__ */ e("p", { className: a, children: n })
|
|
12
12
|
] });
|
|
13
|
-
}, i = ({ section: t }) => {
|
|
14
|
-
const l = t.data?.items || [];
|
|
15
|
-
return /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-x-8 gap-y-4", children: l.map((a, r) => /* @__PURE__ */ s("div", { className: "flex flex-col gap-1 min-w-[120px]", children: [
|
|
16
|
-
/* @__PURE__ */ e("span", { className: "text-xs text-[#60697D] font-normal", children: a.label }),
|
|
17
|
-
/* @__PURE__ */ e("span", { className: "text-sm text-[#1F2B4D] font-semibold", children: String(a.value) })
|
|
18
|
-
] }, `${a.label}-${r}`)) });
|
|
19
13
|
}, x = ({ section: t }) => {
|
|
20
|
-
const
|
|
14
|
+
const r = t.data?.items || [];
|
|
15
|
+
return /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-x-8 gap-y-4", children: r.map((l, n) => /* @__PURE__ */ s("div", { className: "flex flex-col gap-1 min-w-[120px]", children: [
|
|
16
|
+
/* @__PURE__ */ e("span", { className: "text-xs text-[#60697D] font-normal", children: l.label }),
|
|
17
|
+
/* @__PURE__ */ e("span", { className: "text-sm text-[#1F2B4D] font-semibold", children: String(l.value) })
|
|
18
|
+
] }, `${l.label}-${n}`)) });
|
|
19
|
+
}, m = ({ section: t }) => {
|
|
20
|
+
const { label: r, items: l = [] } = t.data || {}, n = l.filter((a) => a.label && a.label.trim().length > 0);
|
|
21
21
|
return /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: [
|
|
22
|
-
|
|
23
|
-
/* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2", children:
|
|
24
|
-
|
|
22
|
+
r && /* @__PURE__ */ e("span", { className: "text-xs text-[#60697D] font-medium", children: r }),
|
|
23
|
+
/* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2", children: n.map((a, c) => /* @__PURE__ */ e(
|
|
24
|
+
o,
|
|
25
25
|
{
|
|
26
|
-
variant:
|
|
27
|
-
color:
|
|
28
|
-
children:
|
|
26
|
+
variant: a.variant,
|
|
27
|
+
color: a.color,
|
|
28
|
+
children: a.label
|
|
29
29
|
},
|
|
30
|
-
`${
|
|
30
|
+
`${a.label}-${c}`
|
|
31
31
|
)) })
|
|
32
32
|
] });
|
|
33
|
-
},
|
|
34
|
-
const { label:
|
|
33
|
+
}, p = ({ section: t }) => {
|
|
34
|
+
const { label: r, text: l, url: n } = t.data || {};
|
|
35
35
|
return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1.5", children: [
|
|
36
|
-
|
|
36
|
+
r && /* @__PURE__ */ e("span", { className: "text-xs text-[#60697D] font-medium", children: r }),
|
|
37
37
|
/* @__PURE__ */ e(
|
|
38
38
|
"a",
|
|
39
39
|
{
|
|
40
|
-
href:
|
|
40
|
+
href: n,
|
|
41
41
|
target: "_blank",
|
|
42
42
|
rel: "noopener noreferrer",
|
|
43
43
|
className: "text-sm text-[#4259EE] hover:underline font-medium inline-flex items-center gap-1",
|
|
44
|
-
children:
|
|
44
|
+
children: l
|
|
45
45
|
}
|
|
46
46
|
)
|
|
47
47
|
] });
|
|
48
|
-
},
|
|
49
|
-
const
|
|
48
|
+
}, N = ({ section: t }) => {
|
|
49
|
+
const r = () => {
|
|
50
50
|
switch (t.type) {
|
|
51
51
|
case "TEXT":
|
|
52
52
|
return /* @__PURE__ */ e(d, { section: t });
|
|
53
53
|
case "KEY_VALUE":
|
|
54
|
-
return /* @__PURE__ */ e(i, { section: t });
|
|
55
|
-
case "BADGES":
|
|
56
54
|
return /* @__PURE__ */ e(x, { section: t });
|
|
57
|
-
case "
|
|
55
|
+
case "BADGES":
|
|
58
56
|
return /* @__PURE__ */ e(m, { section: t });
|
|
57
|
+
case "LINK":
|
|
58
|
+
return /* @__PURE__ */ e(p, { section: t });
|
|
59
59
|
default:
|
|
60
60
|
return null;
|
|
61
61
|
}
|
|
62
|
-
},
|
|
63
|
-
const { separator:
|
|
64
|
-
return
|
|
62
|
+
}, l = (n) => {
|
|
63
|
+
const { separator: a } = t;
|
|
64
|
+
return a ? a === !0 || a === n || a === "both" : !1;
|
|
65
65
|
};
|
|
66
66
|
return /* @__PURE__ */ s("div", { className: "w-full", children: [
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
l("top") && /* @__PURE__ */ e("div", { className: "h-px bg-slate-200 my-6" }),
|
|
68
|
+
r(),
|
|
69
|
+
l("bottom") && /* @__PURE__ */ e("div", { className: "h-px bg-slate-200 my-6" })
|
|
70
70
|
] });
|
|
71
71
|
};
|
|
72
72
|
export {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
m as BadgesSectionRenderer,
|
|
74
|
+
x as KeyValueSectionRenderer,
|
|
75
|
+
p as LinkSectionRenderer,
|
|
76
|
+
N as SectionRenderer,
|
|
77
77
|
d as TextSectionRenderer
|
|
78
78
|
};
|
|
@@ -10,9 +10,10 @@ import { GridHeaderContext as W } from "./headers/context/grid-header-context.js
|
|
|
10
10
|
import { convertToAgGridFilterModel as q, getMultiFilterIndices as w, convertFromAgGridFilterModel as B } from "./headers/utils/filter-utils.js";
|
|
11
11
|
import { ColumnSettingsMenu as J } from "./headers/column-menu/column-settings-menu.js";
|
|
12
12
|
import { AG_GRID_VALUE_FORMATTERS as K } from "./value-formatters.js";
|
|
13
|
+
/* empty css */
|
|
13
14
|
const Q = H(() => import("./headers/advanced-filter/advanced-filter-dialog.js"));
|
|
14
15
|
L.registerModules([V, $, _]);
|
|
15
|
-
function
|
|
16
|
+
function de({
|
|
16
17
|
children: o,
|
|
17
18
|
defaultColDef: n,
|
|
18
19
|
defaultColGroupDef: r,
|
|
@@ -178,6 +179,6 @@ function Y({
|
|
|
178
179
|
);
|
|
179
180
|
}
|
|
180
181
|
export {
|
|
181
|
-
|
|
182
|
-
|
|
182
|
+
de as AgGridWrapper,
|
|
183
|
+
de as default
|
|
183
184
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { themeQuartz as e, iconSetMaterial as r } from "ag-grid-enterprise";
|
|
2
|
-
|
|
3
|
-
const a = e.withPart(r).withParams({
|
|
2
|
+
const d = e.withPart(r).withParams({
|
|
4
3
|
accentColor: "#4259EE",
|
|
5
4
|
advancedFilterBuilderButtonBarBorder: !0,
|
|
6
5
|
borderColor: "#D9DDE7",
|
|
@@ -42,5 +41,5 @@ const a = e.withPart(r).withParams({
|
|
|
42
41
|
pinnedRowBorder: !1
|
|
43
42
|
});
|
|
44
43
|
export {
|
|
45
|
-
|
|
44
|
+
d as customAgGridTheme
|
|
46
45
|
};
|