impact-nova 1.2.3 → 1.3.0
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 +52 -51
- package/dist/components/ui/ag-grid-react/headers/custom-header.js +170 -155
- package/dist/components/ui/alert.d.ts +1 -1
- package/dist/components/ui/alert.js +59 -47
- package/dist/components/ui/data-table/data-table-column-list.d.ts +1 -2
- package/dist/components/ui/data-table/data-table-column-list.js +120 -121
- package/dist/components/ui/popover.js +1 -1
- package/dist/components/ui/prompt.js +32 -31
- package/dist/components/ui/select/select.js +252 -240
- package/dist/components/ui/tabs.d.ts +11 -1
- package/dist/components/ui/tabs.js +79 -54
- package/dist/components/ui/tooltip.js +1 -1
- package/dist/icons/assets/webp/delete-3d.webp.js +4 -0
- package/dist/icons/assets/webp/info-3d.webp.js +4 -0
- package/dist/icons/assets/webp/success-3d.webp.js +4 -0
- package/dist/icons/assets/webp/warning-3d.webp.js +4 -0
- package/dist/icons/index.d.ts +4 -0
- package/dist/icons/index.js +143 -135
- package/dist/impact-nova.css +1 -1
- package/dist/index.js +69 -68
- package/package.json +1 -1
|
@@ -1,37 +1,38 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as n, jsx as e, Fragment as j } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { Settings as
|
|
4
|
-
import { DropdownMenu as
|
|
5
|
-
|
|
3
|
+
import { Settings as T, Checkmark as d, Search as L } from "../../../../../icons/index.js";
|
|
4
|
+
import { DropdownMenu as _, DropdownMenuTrigger as E, DropdownMenuContent as G, DropdownMenuLabel as k, DropdownMenuSeparator as z, DropdownMenuSub as m, DropdownMenuSubTrigger as p, DropdownMenuSubContent as f, DropdownMenuItem as s } from "../../../dropdown-menu.js";
|
|
5
|
+
import { useGridHeader as H } from "../context/grid-header-context.js";
|
|
6
|
+
const K = ({
|
|
6
7
|
isOpen: O,
|
|
7
|
-
onClose:
|
|
8
|
-
columnId:
|
|
8
|
+
onClose: a,
|
|
9
|
+
columnId: i,
|
|
9
10
|
gridApi: r,
|
|
10
|
-
anchor:
|
|
11
|
+
anchor: A
|
|
11
12
|
}) => {
|
|
12
|
-
const o = r.getColumn(
|
|
13
|
+
const S = H(), o = r.getColumn(i);
|
|
13
14
|
if (!o) return null;
|
|
14
|
-
const l = o.getColDef(), C = o.getSort(),
|
|
15
|
+
const l = o.getColDef(), C = o.getSort(), g = o.getPinned(), M = l?.sortable !== !1, x = l?.filter || "agTextColumnFilter", w = x === "agNumberColumnFilter" || (Array.isArray(l?.type) ? l.type.includes("numericColumn") : l?.type === "numericColumn"), D = x === "agDateColumnFilter" || (Array.isArray(l?.type) ? l.type.includes("dateColumn") : l?.type === "dateColumn"), h = (t) => {
|
|
15
16
|
r.applyColumnState({
|
|
16
|
-
state: [{ colId:
|
|
17
|
+
state: [{ colId: i, sort: t }],
|
|
17
18
|
defaultState: { sort: null }
|
|
18
|
-
}),
|
|
19
|
-
}, u = (
|
|
19
|
+
}), a();
|
|
20
|
+
}, u = (t) => {
|
|
20
21
|
r.applyColumnState({
|
|
21
|
-
state: [{ colId:
|
|
22
|
+
state: [{ colId: i, pinned: t }],
|
|
22
23
|
defaultState: { pinned: null }
|
|
23
|
-
}),
|
|
24
|
-
},
|
|
25
|
-
|
|
24
|
+
}), a();
|
|
25
|
+
}, b = (t) => {
|
|
26
|
+
t ? r.autoSizeAllColumns() : r.autoSizeColumns([i]), a();
|
|
26
27
|
}, P = () => {
|
|
27
|
-
const
|
|
28
|
-
r.setGridOption("context", { ...
|
|
29
|
-
},
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
}, c =
|
|
33
|
-
return /* @__PURE__ */
|
|
34
|
-
c && /* @__PURE__ */ e(
|
|
28
|
+
const t = r.getGridOption("context") || {};
|
|
29
|
+
r.setGridOption("context", { ...t, activeSearchColumnId: i }), r.refreshHeader(), a();
|
|
30
|
+
}, F = () => {
|
|
31
|
+
const t = l?.headerComponentParams;
|
|
32
|
+
t?.onAdvanceSearchClick ? t.onAdvanceSearchClick(o) : t?.toggleAdvanceSearch ? t.toggleAdvanceSearch(i) : S && S.openAdvancedFilter(i), a();
|
|
33
|
+
}, c = A?.getBoundingClientRect(), y = l?.headerComponentParams, N = y?.isSearchable, v = y?.advanceSearchEnabled;
|
|
34
|
+
return /* @__PURE__ */ n(_, { open: O, onOpenChange: (t) => !t && a(), children: [
|
|
35
|
+
c && /* @__PURE__ */ e(E, { asChild: !0, children: /* @__PURE__ */ e(
|
|
35
36
|
"div",
|
|
36
37
|
{
|
|
37
38
|
style: {
|
|
@@ -46,62 +47,62 @@ const H = ({
|
|
|
46
47
|
}
|
|
47
48
|
) }),
|
|
48
49
|
/* @__PURE__ */ e(
|
|
49
|
-
|
|
50
|
+
G,
|
|
50
51
|
{
|
|
51
52
|
align: "end",
|
|
52
53
|
side: "bottom",
|
|
53
54
|
sideOffset: 5,
|
|
54
55
|
className: "w-[200px] p-2 rounded-[8px] border-none !shadow-[0px_0px_2px_0px_rgba(0,0,0,0.25)]",
|
|
55
|
-
onCloseAutoFocus: (
|
|
56
|
-
children: /* @__PURE__ */
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
/* @__PURE__ */ e(
|
|
56
|
+
onCloseAutoFocus: (t) => t.preventDefault(),
|
|
57
|
+
children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-0.5", children: [
|
|
58
|
+
/* @__PURE__ */ n(k, { className: "flex items-center gap-2 text-[#60697D]", children: [
|
|
59
|
+
/* @__PURE__ */ e(T, { size: "xs" }),
|
|
59
60
|
" Column Settings"
|
|
60
61
|
] }),
|
|
61
62
|
/* @__PURE__ */ e(z, {}),
|
|
62
|
-
M && /* @__PURE__ */
|
|
63
|
+
M && /* @__PURE__ */ n(m, { children: [
|
|
63
64
|
/* @__PURE__ */ e(p, { inset: !0, children: "Sort" }),
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
-
/* @__PURE__ */ e(s, { onClick: () => h("asc"), children: /* @__PURE__ */
|
|
66
|
-
/* @__PURE__ */ e("span", { children:
|
|
65
|
+
/* @__PURE__ */ n(f, { sideOffset: 10, alignOffset: -5, children: [
|
|
66
|
+
/* @__PURE__ */ e(s, { onClick: () => h("asc"), children: /* @__PURE__ */ n("span", { className: "flex items-center w-full justify-between", children: [
|
|
67
|
+
/* @__PURE__ */ e("span", { children: w ? "Sort Smallest to Largest" : D ? "Sort Oldest to Newest" : "Sort A to Z" }),
|
|
67
68
|
C === "asc" && /* @__PURE__ */ e(d, { size: "sm", className: "ml-2 text-[#60697D]" })
|
|
68
69
|
] }) }),
|
|
69
|
-
/* @__PURE__ */ e(s, { onClick: () => h("desc"), children: /* @__PURE__ */
|
|
70
|
-
/* @__PURE__ */ e("span", { children:
|
|
70
|
+
/* @__PURE__ */ e(s, { onClick: () => h("desc"), children: /* @__PURE__ */ n("span", { className: "flex items-center w-full justify-between", children: [
|
|
71
|
+
/* @__PURE__ */ e("span", { children: w ? "Sort Largest to Smallest" : D ? "Sort Newest to Oldest" : "Sort Z to A" }),
|
|
71
72
|
C === "desc" && /* @__PURE__ */ e(d, { size: "sm", className: "ml-2 text-[#60697D]" })
|
|
72
73
|
] }) }),
|
|
73
74
|
/* @__PURE__ */ e(s, { onClick: () => h(null), children: /* @__PURE__ */ e("span", { children: "Reset" }) })
|
|
74
75
|
] })
|
|
75
76
|
] }),
|
|
76
|
-
/* @__PURE__ */
|
|
77
|
+
/* @__PURE__ */ n(m, { children: [
|
|
77
78
|
/* @__PURE__ */ e(p, { inset: !0, children: "Freeze Column" }),
|
|
78
|
-
/* @__PURE__ */
|
|
79
|
-
/* @__PURE__ */ e(s, { onClick: () => u("left"), children: /* @__PURE__ */
|
|
79
|
+
/* @__PURE__ */ n(f, { className: "z-[120]", sideOffset: 10, alignOffset: -5, children: [
|
|
80
|
+
/* @__PURE__ */ e(s, { onClick: () => u("left"), children: /* @__PURE__ */ n("span", { className: "flex items-center w-full justify-between", children: [
|
|
80
81
|
/* @__PURE__ */ e("span", { children: "Pin Left" }),
|
|
81
|
-
|
|
82
|
+
g === "left" && /* @__PURE__ */ e(d, { size: "sm", className: "ml-2 text-[#60697D]" })
|
|
82
83
|
] }) }),
|
|
83
|
-
/* @__PURE__ */ e(s, { onClick: () => u("right"), children: /* @__PURE__ */
|
|
84
|
+
/* @__PURE__ */ e(s, { onClick: () => u("right"), children: /* @__PURE__ */ n("span", { className: "flex items-center w-full justify-between", children: [
|
|
84
85
|
/* @__PURE__ */ e("span", { children: "Pin Right" }),
|
|
85
|
-
|
|
86
|
+
g === "right" && /* @__PURE__ */ e(d, { size: "sm", className: "ml-2 text-[#60697D]" })
|
|
86
87
|
] }) }),
|
|
87
88
|
/* @__PURE__ */ e(s, { onClick: () => u(null), children: /* @__PURE__ */ e("span", { children: "No Pin" }) })
|
|
88
89
|
] })
|
|
89
90
|
] }),
|
|
90
|
-
/* @__PURE__ */
|
|
91
|
+
/* @__PURE__ */ n(m, { children: [
|
|
91
92
|
/* @__PURE__ */ e(p, { inset: !0, children: "Column width" }),
|
|
92
|
-
/* @__PURE__ */
|
|
93
|
-
/* @__PURE__ */ e(s, { onClick: () =>
|
|
94
|
-
/* @__PURE__ */ e(s, { onClick: () =>
|
|
93
|
+
/* @__PURE__ */ n(f, { className: "z-[120]", sideOffset: 10, alignOffset: -5, children: [
|
|
94
|
+
/* @__PURE__ */ e(s, { onClick: () => b(!1), children: "Autosize This Column" }),
|
|
95
|
+
/* @__PURE__ */ e(s, { onClick: () => b(!0), children: "Autosize All Columns" })
|
|
95
96
|
] })
|
|
96
97
|
] }),
|
|
97
|
-
(
|
|
98
|
+
(N || v) && /* @__PURE__ */ n(j, { children: [
|
|
98
99
|
/* @__PURE__ */ e(z, {}),
|
|
99
|
-
/* @__PURE__ */
|
|
100
|
-
/* @__PURE__ */ e(
|
|
100
|
+
/* @__PURE__ */ n(k, { className: "flex items-center gap-2 text-[#60697D]", children: [
|
|
101
|
+
/* @__PURE__ */ e(L, { size: "xs" }),
|
|
101
102
|
" Search Options"
|
|
102
103
|
] }),
|
|
103
|
-
|
|
104
|
-
|
|
104
|
+
N && /* @__PURE__ */ e(s, { inset: !0, onClick: P, children: "Search" }),
|
|
105
|
+
v && /* @__PURE__ */ e(s, { inset: !0, onClick: F, children: "Advance Search" })
|
|
105
106
|
] })
|
|
106
107
|
] })
|
|
107
108
|
}
|
|
@@ -109,5 +110,5 @@ const H = ({
|
|
|
109
110
|
] });
|
|
110
111
|
};
|
|
111
112
|
export {
|
|
112
|
-
|
|
113
|
+
K as ColumnSettingsMenu
|
|
113
114
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as h, Fragment as A } from "react/jsx-runtime";
|
|
2
2
|
import { useState as M, useEffect as K } from "react";
|
|
3
|
-
import { cn as
|
|
3
|
+
import { cn as f } from "../../../../lib/utils.js";
|
|
4
4
|
import { useGridHeader as q } from "./context/grid-header-context.js";
|
|
5
5
|
import { HeaderInfo as J } from "./components/header-info.js";
|
|
6
6
|
import { Checkbox as Q } from "../../checkbox.js";
|
|
7
7
|
import { HeaderSearchInput as W } from "./header-search-input.js";
|
|
8
|
-
const X = () => /* @__PURE__ */
|
|
9
|
-
/* @__PURE__ */ e("span", { className: "sort-asc-icon inline-flex transition-colors text-[#60697D] hover:text-[#3649C6]", children: /* @__PURE__ */
|
|
8
|
+
const X = () => /* @__PURE__ */ h(A, { children: [
|
|
9
|
+
/* @__PURE__ */ e("span", { className: "sort-asc-icon inline-flex transition-colors text-[#60697D] hover:text-[#3649C6]", children: /* @__PURE__ */ h(
|
|
10
10
|
"svg",
|
|
11
11
|
{
|
|
12
12
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -21,7 +21,7 @@ const X = () => /* @__PURE__ */ a(U, { children: [
|
|
|
21
21
|
]
|
|
22
22
|
}
|
|
23
23
|
) }),
|
|
24
|
-
/* @__PURE__ */ e("span", { className: "sort-desc-icon inline-flex transition-colors text-[#60697D] hover:text-[#3649C6]", children: /* @__PURE__ */
|
|
24
|
+
/* @__PURE__ */ e("span", { className: "sort-desc-icon inline-flex transition-colors text-[#60697D] hover:text-[#3649C6]", children: /* @__PURE__ */ h(
|
|
25
25
|
"svg",
|
|
26
26
|
{
|
|
27
27
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -48,71 +48,75 @@ const X = () => /* @__PURE__ */ a(U, { children: [
|
|
|
48
48
|
children: /* @__PURE__ */ e("path", { d: "M7.85714 10.8967V5.44444H6.42857V10.8967H4.28571L7.14286 14L10 10.8967H7.85714ZM2.85714 0L0 3.10333H2.14286V8.55556H3.57143V3.10333H5.71429L2.85714 0ZM7.85714 10.8967V5.44444H6.42857V10.8967H4.28571L7.14286 14L10 10.8967H7.85714ZM2.85714 0L0 3.10333H2.14286V8.55556H3.57143V3.10333H5.71429L2.85714 0Z", fill: "currentColor" })
|
|
49
49
|
}
|
|
50
50
|
) })
|
|
51
|
-
] }), Y = ({ api:
|
|
52
|
-
const [
|
|
53
|
-
|
|
54
|
-
if (!
|
|
55
|
-
const
|
|
56
|
-
let
|
|
57
|
-
if (
|
|
58
|
-
const
|
|
59
|
-
if (
|
|
60
|
-
const { selectAll:
|
|
61
|
-
|
|
51
|
+
] }), Y = ({ api: r }) => {
|
|
52
|
+
const [t, C] = M(!1), [k, x] = M(!1);
|
|
53
|
+
K(() => {
|
|
54
|
+
if (!r) return;
|
|
55
|
+
const n = r.getGridOption?.("rowModelType") === "serverSide", w = () => {
|
|
56
|
+
let i = !1, s = !1;
|
|
57
|
+
if (n) {
|
|
58
|
+
const m = r.getServerSideSelectionState?.();
|
|
59
|
+
if (m) {
|
|
60
|
+
const { selectAll: a, toggledNodes: S } = m, p = S && S.length > 0;
|
|
61
|
+
a && !p ? (i = !0, s = !1) : a && p || !a && p ? (i = !1, s = !0) : (i = !1, s = !1);
|
|
62
62
|
}
|
|
63
63
|
} else {
|
|
64
|
-
const
|
|
65
|
-
|
|
64
|
+
const m = r.getSelectedRows().length, a = r.getDisplayedRowCount();
|
|
65
|
+
m === 0 ? (i = !1, s = !1) : m === a && a > 0 ? (i = !0, s = !1) : (i = !1, s = !0);
|
|
66
66
|
}
|
|
67
|
-
|
|
67
|
+
C(i), x(s);
|
|
68
68
|
};
|
|
69
|
-
|
|
70
|
-
const
|
|
71
|
-
|
|
69
|
+
w();
|
|
70
|
+
const u = () => {
|
|
71
|
+
w();
|
|
72
72
|
};
|
|
73
|
-
return
|
|
74
|
-
|
|
73
|
+
return r.addEventListener("selectionChanged", u), r.addEventListener("modelUpdated", u), () => {
|
|
74
|
+
r.removeEventListener("selectionChanged", u), r.removeEventListener("modelUpdated", u);
|
|
75
75
|
};
|
|
76
|
-
}, [
|
|
76
|
+
}, [r]);
|
|
77
|
+
const c = (n) => {
|
|
78
|
+
n === !0 ? r.selectAll() : r.deselectAll();
|
|
79
|
+
};
|
|
80
|
+
return /* @__PURE__ */ e(A, { children: /* @__PURE__ */ e(
|
|
77
81
|
Q,
|
|
78
82
|
{
|
|
79
|
-
checked:
|
|
80
|
-
onCheckedChange: (
|
|
81
|
-
|
|
83
|
+
checked: k ? "indeterminate" : t,
|
|
84
|
+
onCheckedChange: (n) => {
|
|
85
|
+
c(n);
|
|
82
86
|
},
|
|
83
87
|
"aria-label": "Toggle Selection",
|
|
84
|
-
className: "
|
|
88
|
+
className: "m-0"
|
|
85
89
|
}
|
|
86
|
-
);
|
|
87
|
-
}, se = (
|
|
90
|
+
) });
|
|
91
|
+
}, se = (r) => {
|
|
88
92
|
const {
|
|
89
|
-
displayName:
|
|
90
|
-
enableSorting:
|
|
91
|
-
enableMenu:
|
|
92
|
-
progressSort:
|
|
93
|
-
column:
|
|
94
|
-
api:
|
|
95
|
-
handleInlineSearch:
|
|
96
|
-
handleClearSearchInline:
|
|
97
|
-
onColumnSearchClick:
|
|
98
|
-
onAdvanceSearchClick:
|
|
99
|
-
toggleAdvanceSearch:
|
|
100
|
-
isSearchable:
|
|
93
|
+
displayName: t,
|
|
94
|
+
enableSorting: C,
|
|
95
|
+
enableMenu: k,
|
|
96
|
+
progressSort: x,
|
|
97
|
+
column: c,
|
|
98
|
+
api: n,
|
|
99
|
+
handleInlineSearch: w,
|
|
100
|
+
handleClearSearchInline: u,
|
|
101
|
+
onColumnSearchClick: i,
|
|
102
|
+
onAdvanceSearchClick: s,
|
|
103
|
+
toggleAdvanceSearch: m,
|
|
104
|
+
isSearchable: a = !1,
|
|
101
105
|
advanceSearchEnabled: S = !1,
|
|
102
106
|
// Select params
|
|
103
107
|
selectOptions: p,
|
|
104
|
-
isMultiSelect:
|
|
105
|
-
onSelectScrollToBottom:
|
|
106
|
-
onSelectSearchChange:
|
|
107
|
-
onSelectOpen:
|
|
108
|
-
isLoadingSelect:
|
|
108
|
+
isMultiSelect: D,
|
|
109
|
+
onSelectScrollToBottom: F,
|
|
110
|
+
onSelectSearchChange: T,
|
|
111
|
+
onSelectOpen: V,
|
|
112
|
+
isLoadingSelect: P,
|
|
109
113
|
// Pattern parsing options
|
|
110
|
-
enableSpaceSplitting:
|
|
111
|
-
enableBooleanParsing:
|
|
112
|
-
enableDateParsing:
|
|
113
|
-
} =
|
|
114
|
-
|
|
115
|
-
const y =
|
|
114
|
+
enableSpaceSplitting: _,
|
|
115
|
+
enableBooleanParsing: Z,
|
|
116
|
+
enableDateParsing: B
|
|
117
|
+
} = r, d = q(), o = c.getColDef(), g = c.getColId(), N = c.isFilterActive(), E = c.getSort(), b = c.getSortIndex(), R = !!E, j = b != null && (b > 0 || n.getColumnState().filter((l) => l.sort).length > 1), O = R && j, H = o?.filter || "agTextColumnFilter", v = H === "agNumberColumnFilter" || (Array.isArray(o?.type) ? o.type.some((l) => l === "number" || l === "numericColumn") : o?.type === "number" || o?.type === "numericColumn");
|
|
118
|
+
H === "agDateColumnFilter" || (Array.isArray(o?.type) ? o.type.includes("dateColumn") : o?.type);
|
|
119
|
+
const y = n.getGridOption("context")?.activeSearchColumnId === g, I = ![
|
|
116
120
|
"agTextColumnFilter",
|
|
117
121
|
"agNumberColumnFilter",
|
|
118
122
|
"agDateColumnFilter",
|
|
@@ -122,121 +126,132 @@ const X = () => /* @__PURE__ */ a(U, { children: [
|
|
|
122
126
|
// Defaults to text/set
|
|
123
127
|
void 0
|
|
124
128
|
// Defaults to text
|
|
125
|
-
].includes(o?.filter), L = (
|
|
126
|
-
|
|
127
|
-
},
|
|
128
|
-
if (
|
|
129
|
-
|
|
129
|
+
].includes(o?.filter), L = (l) => {
|
|
130
|
+
l.stopPropagation(), C && x && x(l.shiftKey);
|
|
131
|
+
}, z = (l) => {
|
|
132
|
+
if (l.stopPropagation(), i && i(r), I) {
|
|
133
|
+
n.showColumnFilter ? n.showColumnFilter(g) : n.showColumnMenu(g);
|
|
130
134
|
return;
|
|
131
135
|
}
|
|
132
|
-
|
|
133
|
-
},
|
|
136
|
+
d && (y ? d.closeSearch() : d.openSearch(g));
|
|
137
|
+
}, G = (l) => /* @__PURE__ */ e("span", { onClick: (U) => U.stopPropagation(), children: /* @__PURE__ */ e(
|
|
134
138
|
J,
|
|
135
139
|
{
|
|
136
|
-
...
|
|
137
|
-
className:
|
|
140
|
+
...r,
|
|
141
|
+
className: l
|
|
138
142
|
}
|
|
139
143
|
) });
|
|
140
|
-
return y &&
|
|
144
|
+
return y && d && !I ? /* @__PURE__ */ e(
|
|
141
145
|
W,
|
|
142
146
|
{
|
|
143
|
-
column:
|
|
144
|
-
api:
|
|
145
|
-
onClose: () =>
|
|
146
|
-
handleInlineSearch:
|
|
147
|
-
handleClearSearchInline:
|
|
148
|
-
onAdvanceSearchClick:
|
|
149
|
-
toggleAdvanceSearch:
|
|
147
|
+
column: c,
|
|
148
|
+
api: n,
|
|
149
|
+
onClose: () => d.closeSearch(),
|
|
150
|
+
handleInlineSearch: w,
|
|
151
|
+
handleClearSearchInline: u ? () => u(r) : void 0,
|
|
152
|
+
onAdvanceSearchClick: s,
|
|
153
|
+
toggleAdvanceSearch: m,
|
|
150
154
|
advanceSearchEnabled: S,
|
|
151
155
|
selectOptions: p,
|
|
152
|
-
isMultiSelect:
|
|
153
|
-
onSelectScrollToBottom:
|
|
154
|
-
onSelectSearchChange:
|
|
155
|
-
onSelectOpen:
|
|
156
|
-
isLoadingSelect:
|
|
157
|
-
enableSpaceSplitting:
|
|
158
|
-
enableBooleanParsing:
|
|
159
|
-
enableDateParsing:
|
|
156
|
+
isMultiSelect: D,
|
|
157
|
+
onSelectScrollToBottom: F,
|
|
158
|
+
onSelectSearchChange: T,
|
|
159
|
+
onSelectOpen: V,
|
|
160
|
+
isLoadingSelect: P,
|
|
161
|
+
enableSpaceSplitting: _,
|
|
162
|
+
enableBooleanParsing: Z,
|
|
163
|
+
enableDateParsing: B
|
|
160
164
|
}
|
|
161
|
-
) : /* @__PURE__ */
|
|
162
|
-
"
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
"
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
165
|
+
) : /* @__PURE__ */ h(
|
|
166
|
+
"div",
|
|
167
|
+
{
|
|
168
|
+
className: f(
|
|
169
|
+
"ag-header-cell-label flex items-center w-full group min-w-0 h-full",
|
|
170
|
+
v ? "flex-row-reverse" : "flex-row",
|
|
171
|
+
// Center the content area if it's a selection column
|
|
172
|
+
o?.headerCheckboxSelection && (!t || t.trim() === "") ? "justify-center" : ""
|
|
173
|
+
),
|
|
174
|
+
"data-selection-column": o?.headerCheckboxSelection && (!t || t.trim() === "") ? "true" : void 0,
|
|
175
|
+
children: [
|
|
176
|
+
/* @__PURE__ */ e(
|
|
177
|
+
"div",
|
|
178
|
+
{
|
|
179
|
+
className: f(
|
|
180
|
+
"ag-header-cell-text relative group flex items-center min-w-0 h-full",
|
|
181
|
+
// Remove flex-1 if we are centering via parent's justify-center
|
|
182
|
+
!(o?.headerCheckboxSelection && (!t || t.trim() === "")) && "flex-1",
|
|
183
|
+
v ? "flex-row-reverse" : "flex-row",
|
|
184
|
+
C ? "sortable cursor-pointer" : ""
|
|
185
|
+
),
|
|
186
|
+
onClick: C ? L : void 0,
|
|
187
|
+
children: /* @__PURE__ */ h("div", { className: f(
|
|
188
|
+
"flex items-center min-w-0 h-full",
|
|
189
|
+
v ? "flex-row-reverse" : "flex-row",
|
|
190
|
+
// If it's a checkbox-only header, ensure it shrinks to content for centering
|
|
191
|
+
o?.headerCheckboxSelection && (!t || t.trim() === "") ? "justify-center" : "gap-1 flex-1"
|
|
192
|
+
), children: [
|
|
193
|
+
o?.headerCheckboxSelection && /* @__PURE__ */ e(Y, { api: n }),
|
|
194
|
+
t && t.trim() !== "" && /* @__PURE__ */ e("span", { className: "block truncate", children: t !== "Selection" && t }),
|
|
195
|
+
t && t.trim() !== "" && G(f(
|
|
196
|
+
"text-[#60697D] hover:text-[#3649C6] transition-colors",
|
|
197
|
+
v ? "mr-1" : "ml-1"
|
|
198
|
+
))
|
|
199
|
+
] })
|
|
200
|
+
}
|
|
195
201
|
),
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
202
|
+
!(o?.headerCheckboxSelection && (!t || t.trim() === "")) && /* @__PURE__ */ h(
|
|
203
|
+
"div",
|
|
204
|
+
{
|
|
205
|
+
className: f(
|
|
206
|
+
"flex items-center shrink-0 group gap-1",
|
|
207
|
+
v ? "flex-row-reverse" : "flex-row"
|
|
208
|
+
),
|
|
209
|
+
children: [
|
|
210
|
+
C && /* @__PURE__ */ h(
|
|
211
|
+
"div",
|
|
212
|
+
{
|
|
213
|
+
className: "ag-sort-indicator-container cursor-pointer flex items-center",
|
|
214
|
+
onClick: L,
|
|
215
|
+
children: [
|
|
216
|
+
O && /* @__PURE__ */ e("span", { className: "ag-sort-order text-[10px] font-bold text-[#60697D] mr-0.5", children: b + 1 }),
|
|
217
|
+
/* @__PURE__ */ e("span", { className: "ag-sort-indicator-icon", children: /* @__PURE__ */ e(X, {}) })
|
|
218
|
+
]
|
|
219
|
+
}
|
|
214
220
|
),
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
221
|
+
a && /* @__PURE__ */ h(
|
|
222
|
+
"span",
|
|
223
|
+
{
|
|
224
|
+
className: f(
|
|
225
|
+
"relative cursor-pointer flex items-center shrink-0 duration-200 text-[#60697D] hover:text-[#3649C6] transition-colors",
|
|
226
|
+
N ? "opacity-100 w-auto" : "opacity-0 w-0 overflow-hidden group-hover:opacity-100 group-hover:w-auto"
|
|
227
|
+
),
|
|
228
|
+
onClick: z,
|
|
229
|
+
title: N ? "Active filter" : "Search",
|
|
230
|
+
children: [
|
|
231
|
+
/* @__PURE__ */ e("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ e("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z", fill: "currentColor" }) }),
|
|
232
|
+
N && /* @__PURE__ */ e("span", { className: "absolute -top-0.5 -right-0.5 w-2.5 h-2.5 rounded-full border-2 bg-[#4259ee] z-10" })
|
|
233
|
+
]
|
|
234
|
+
}
|
|
229
235
|
),
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
236
|
+
k && !o?.suppressHeaderMenuButton && /* @__PURE__ */ e("div", { className: "custom-ag-header-icons relative", children: /* @__PURE__ */ e(
|
|
237
|
+
"button",
|
|
238
|
+
{
|
|
239
|
+
className: f(
|
|
240
|
+
"custom-ag-menu-icon-button cursor-pointer flex items-center shrink-0 overflow-hidden transition-colors duration-200 outline-none focus:outline-none focus:ring-0 text-[#60697D] hover:text-[#3649C6]",
|
|
241
|
+
d?.activeMenuColumnId === g ? "opacity-100 w-auto text-[#3649C6]" : "w-0 opacity-0 group-hover:w-auto group-hover:opacity-100"
|
|
242
|
+
),
|
|
243
|
+
onClick: (l) => {
|
|
244
|
+
l.stopPropagation(), d && d.openMenu(g, l.currentTarget);
|
|
245
|
+
},
|
|
246
|
+
children: /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ e("path", { d: "M14 18C14 18.55 13.8042 19.0208 13.4125 19.4125C13.0208 19.8042 12.55 20 12 20C11.45 20 10.9792 19.8042 10.5875 19.4125C10.1958 19.0208 10 18.55 10 18C10 17.45 10.1958 16.9792 10.5875 16.5875C10.9792 16.1958 11.45 16 12 16C12.55 16 13.0208 16.1958 13.4125 16.5875C13.8042 16.9792 14 17.45 14 18ZM14 12C14 12.55 13.8042 13.0208 13.4125 13.4125C13.0208 13.8042 12.55 14 12 14C11.45 14 10.9792 13.8042 10.5875 13.4125C10.1958 13.0208 10 12.55 10 12C10 11.45 10.1958 10.9792 10.5875 10.5875C10.9792 10.1958 11.45 10 12 10C12.55 10 13.0208 10.1958 13.4125 10.5875C13.8042 10.9792 14 11.45 14 12ZM14 6C14 6.55 13.8042 7.02083 13.4125 7.4125C13.0208 7.80417 12.55 8 12 8C11.45 8 10.9792 7.80417 10.5875 7.4125C10.1958 7.02083 10 6.55 10 6C10 5.45 10.1958 4.97917 10.5875 4.5875C10.9792 4.19583 11.45 4 12 4C12.55 4 13.0208 4.19583 13.4125 4.5875C13.8042 4.97917 14 5.45 14 6Z", fill: "currentColor" }) })
|
|
247
|
+
}
|
|
248
|
+
) })
|
|
249
|
+
]
|
|
250
|
+
}
|
|
251
|
+
)
|
|
252
|
+
]
|
|
253
|
+
}
|
|
254
|
+
);
|
|
240
255
|
};
|
|
241
256
|
export {
|
|
242
257
|
se as CustomHeader
|
|
@@ -20,7 +20,7 @@ export interface AlertIconProps {
|
|
|
20
20
|
* Renders the appropriate icon for the given Alert variant.
|
|
21
21
|
*
|
|
22
22
|
* @example
|
|
23
|
-
* <AlertIcon variant="success" className="h-
|
|
23
|
+
* <AlertIcon variant="success" className="h-5 w-5" />
|
|
24
24
|
* <AlertIcon variant="error" />
|
|
25
25
|
*/
|
|
26
26
|
declare const AlertIcon: {
|