impact-nova 3.0.0-alpha.11 → 3.0.0-alpha.13
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/cell-renderers/link-with-batch-cell-renderer.js +88 -76
- package/dist/components/data/ag-grid-react/headers/custom-header.js +109 -107
- package/dist/components/data/data-table/index.d.ts +1 -0
- package/dist/components/data/data-table/index.js +16 -14
- package/dist/components/data/data-table/use-data-table-viewport.d.ts +10 -0
- package/dist/components/data/data-table/use-data-table-viewport.js +31 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +3 -2
- package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +3 -2
- package/dist/components/feedback/tooltip/tab-tooltip-render.js +3 -2
- package/dist/components/flows/command-palette/shortcut-settings.js +10 -10
- package/dist/components/flows/filter-panel/filter-panel.js +4 -4
- package/dist/components/forms/select/components/SelectTriggerValue.js +3 -2
- package/dist/components/forms/select/components/Submenu.js +3 -2
- package/dist/components/primitives/stepper/stepper.js +29 -28
- package/dist/components/primitives/stepper/stepper.types.d.ts +2 -0
- package/dist/impact-nova-components.css +16 -6
- package/dist/impact-nova.css +1 -1
- package/dist/index.js +132 -130
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/package.json +1 -1
|
@@ -1,32 +1,33 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
1
|
+
import { jsx as s, jsxs as j } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as L, useMemo as x, useCallback as U } from "react";
|
|
3
|
+
import { useAgGridTruncationTooltip as G } from "../use-ag-grid-truncation-tooltip.js";
|
|
4
|
+
import { Badge as H } from "../../../data-display/badge/badge.js";
|
|
5
|
+
import { evaluateValidationRules as _, getFieldValue as m, mapBadgeVariant as z, mapBadgeColor as A } from "./cell-renderer-utils.js";
|
|
6
|
+
import { resolveGridIcon as M } from "./gridIconResolver.js";
|
|
7
|
+
import { Tooltip as Q, TooltipTrigger as q, TooltipContent as J } from "../../../feedback/tooltip/tooltip.js";
|
|
8
|
+
const W = (e, n, r, a) => {
|
|
8
9
|
if (!n) return e;
|
|
9
10
|
let t = e;
|
|
10
|
-
return t = t.replace(/\$\{value\}/g, String(a ?? "")), t = t.replace(/\$\{field\}/g, String(r ?? "")), Object.keys(n).forEach((
|
|
11
|
-
const
|
|
12
|
-
t = t.replace(
|
|
11
|
+
return t = t.replace(/\$\{value\}/g, String(a ?? "")), t = t.replace(/\$\{field\}/g, String(r ?? "")), Object.keys(n).forEach((o) => {
|
|
12
|
+
const i = new RegExp(`\\$\\{${o}\\}`, "g");
|
|
13
|
+
t = t.replace(i, String(n[o] ?? ""));
|
|
13
14
|
}), t;
|
|
14
|
-
},
|
|
15
|
+
}, X = ({
|
|
15
16
|
iconConfig: e,
|
|
16
17
|
rowData: n,
|
|
17
18
|
rowId: r,
|
|
18
19
|
field: a
|
|
19
20
|
}) => {
|
|
20
21
|
let t = null;
|
|
21
|
-
const
|
|
22
|
-
if (typeof
|
|
23
|
-
const
|
|
22
|
+
const o = m(e.iconField, e.icon, n);
|
|
23
|
+
if (typeof o == "string" ? t = M(o, { size: 16 }) : t = o, !t) return null;
|
|
24
|
+
const i = m(e.backgroundColorField, e.backgroundColor, n), d = m(e.colorField, e.color, n) ?? "var(--color-foreground-icon)", f = m(e.tooltipField, e.tooltip, n), g = /* @__PURE__ */ s(
|
|
24
25
|
"div",
|
|
25
26
|
{
|
|
26
27
|
className: `flex shrink-0 items-center justify-center bg-[var(--icon-bg)] text-[var(--icon-fg)] ${e.onClick ? "cursor-pointer" : ""} ${e.showOnHover ? "max-w-0 min-w-0 overflow-hidden p-0 opacity-0 pointer-events-none group-hover:max-w-none group-hover:min-w-[18px] group-hover:p-0.5 group-hover:opacity-100 group-hover:pointer-events-auto" : "p-0.5 min-w-[18px]"}`,
|
|
27
28
|
style: {
|
|
28
|
-
"--icon-bg":
|
|
29
|
-
"--icon-fg":
|
|
29
|
+
"--icon-bg": i,
|
|
30
|
+
"--icon-fg": d,
|
|
30
31
|
borderRadius: "4px",
|
|
31
32
|
minHeight: "18px"
|
|
32
33
|
},
|
|
@@ -34,11 +35,11 @@ const M = (e, n, r, a) => {
|
|
|
34
35
|
children: t
|
|
35
36
|
}
|
|
36
37
|
);
|
|
37
|
-
return f ? /* @__PURE__ */ j(
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
] }) :
|
|
41
|
-
},
|
|
38
|
+
return f ? /* @__PURE__ */ j(Q, { children: [
|
|
39
|
+
/* @__PURE__ */ s(q, { asChild: !0, children: g }),
|
|
40
|
+
/* @__PURE__ */ s(J, { variant: "tertiary", side: e.tooltipSide || "top", children: f })
|
|
41
|
+
] }) : g;
|
|
42
|
+
}, Y = ({
|
|
42
43
|
badgeConfig: e,
|
|
43
44
|
rowData: n,
|
|
44
45
|
rowId: r,
|
|
@@ -46,101 +47,112 @@ const M = (e, n, r, a) => {
|
|
|
46
47
|
}) => {
|
|
47
48
|
const t = m(e.labelField, e.label, n);
|
|
48
49
|
if (!t) return null;
|
|
49
|
-
const
|
|
50
|
-
return /* @__PURE__ */
|
|
51
|
-
|
|
50
|
+
const o = m(e.colorField, e.color, n), i = m(e.variantField, e.variant, n);
|
|
51
|
+
return /* @__PURE__ */ s(
|
|
52
|
+
H,
|
|
52
53
|
{
|
|
53
54
|
className: "font-medium",
|
|
54
|
-
color:
|
|
55
|
-
variant:
|
|
55
|
+
color: A(o),
|
|
56
|
+
variant: z(i),
|
|
56
57
|
onClick: e.onClick ? () => e.onClick?.({ rowId: r, field: a, rowData: n ?? {} }) : void 0,
|
|
57
58
|
children: t
|
|
58
59
|
}
|
|
59
60
|
);
|
|
60
|
-
},
|
|
61
|
+
}, Z = (e) => {
|
|
61
62
|
const {
|
|
62
63
|
value: n,
|
|
63
64
|
data: r,
|
|
64
65
|
node: a,
|
|
65
66
|
colDef: t,
|
|
66
|
-
onClick:
|
|
67
|
-
redirectUrl:
|
|
68
|
-
updateQueryParams:
|
|
67
|
+
onClick: o,
|
|
68
|
+
redirectUrl: i,
|
|
69
|
+
updateQueryParams: d,
|
|
69
70
|
navigate: f,
|
|
70
|
-
setSearchParams:
|
|
71
|
-
rightSideContent:
|
|
72
|
-
valueFormatter:
|
|
71
|
+
setSearchParams: g,
|
|
72
|
+
rightSideContent: k,
|
|
73
|
+
valueFormatter: h,
|
|
73
74
|
disableOnPinnedRows: S = !0,
|
|
74
75
|
disableLinkStyle: w,
|
|
75
|
-
validationRules:
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
p =
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
76
|
+
validationRules: R,
|
|
77
|
+
setTooltip: N
|
|
78
|
+
} = e, $ = L(null), y = a.id ?? String(r?.id ?? ""), u = t?.field ?? "", T = r && typeof r == "object" && "_isPinned" in r && r._isPinned === !0, E = x(() => w || S && T || _(R, r) ? !1 : !!(d || i || o), [w, S, T, d, i, o, R, r]), B = U(
|
|
79
|
+
(c) => {
|
|
80
|
+
if (c.stopPropagation(), d && g)
|
|
81
|
+
g((l) => {
|
|
82
|
+
const v = new URLSearchParams(l);
|
|
83
|
+
return Object.entries(d).forEach(([b, V]) => {
|
|
84
|
+
let p = String(V);
|
|
85
|
+
p = p.replace(/\$\{value\}/g, String(n ?? "")), p = p.replace(/\$\{field\}/g, u), r && Object.keys(r).forEach((P) => {
|
|
86
|
+
const I = new RegExp(`\\$\\{${P}\\}`, "g");
|
|
87
|
+
p = p.replace(I, String(r[P] ?? ""));
|
|
88
|
+
}), v.set(b, p);
|
|
89
|
+
}), v;
|
|
88
90
|
});
|
|
89
|
-
else if (
|
|
90
|
-
const l =
|
|
91
|
+
else if (i && f) {
|
|
92
|
+
const l = W(i, r, u, n);
|
|
91
93
|
f(l);
|
|
92
|
-
} else
|
|
94
|
+
} else o && o({ rowId: y, field: u, rowData: r ?? {}, value: n });
|
|
93
95
|
},
|
|
94
|
-
[
|
|
95
|
-
),
|
|
96
|
-
if (
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
[d, g, i, f, o, r, u, n, y]
|
|
97
|
+
), C = x(() => h ? h(n, r ?? {}) : String(n ?? ""), [n, h, r]), O = x(() => {
|
|
98
|
+
if (h) {
|
|
99
|
+
const c = h(n, r ?? {});
|
|
100
|
+
if (typeof c == "string" || typeof c == "number")
|
|
101
|
+
return String(c);
|
|
102
|
+
}
|
|
103
|
+
return String(n ?? "");
|
|
104
|
+
}, [n, h, r]);
|
|
105
|
+
G(N, O, $, "ellipsis");
|
|
106
|
+
const F = x(() => {
|
|
107
|
+
if (!k?.items || k.items.length === 0) return null;
|
|
108
|
+
const c = [];
|
|
109
|
+
return k.items.forEach((l, v) => {
|
|
99
110
|
if (l.type === "icon" && l.icon)
|
|
100
|
-
|
|
101
|
-
/* @__PURE__ */
|
|
102
|
-
|
|
111
|
+
c.push(
|
|
112
|
+
/* @__PURE__ */ s(
|
|
113
|
+
X,
|
|
103
114
|
{
|
|
104
115
|
iconConfig: l.icon,
|
|
105
116
|
rowData: r,
|
|
106
|
-
rowId:
|
|
107
|
-
field:
|
|
117
|
+
rowId: y,
|
|
118
|
+
field: u
|
|
108
119
|
},
|
|
109
|
-
`icon-${
|
|
120
|
+
`icon-${v}`
|
|
110
121
|
)
|
|
111
122
|
);
|
|
112
123
|
else if (l.type === "badge" && l.badge)
|
|
113
|
-
|
|
114
|
-
/* @__PURE__ */
|
|
115
|
-
|
|
124
|
+
c.push(
|
|
125
|
+
/* @__PURE__ */ s(
|
|
126
|
+
Y,
|
|
116
127
|
{
|
|
117
128
|
badgeConfig: l.badge,
|
|
118
129
|
rowData: r,
|
|
119
|
-
rowId:
|
|
120
|
-
field:
|
|
130
|
+
rowId: y,
|
|
131
|
+
field: u
|
|
121
132
|
},
|
|
122
|
-
`badge-${
|
|
133
|
+
`badge-${v}`
|
|
123
134
|
)
|
|
124
135
|
);
|
|
125
136
|
else if (l.type === "dynamic" && l.dynamic) {
|
|
126
|
-
const
|
|
127
|
-
|
|
137
|
+
const b = typeof l.dynamic == "function" ? l.dynamic(r ?? {}) : l.dynamic;
|
|
138
|
+
c.push(/* @__PURE__ */ s("span", { children: b }, `dyn-${v}`));
|
|
128
139
|
}
|
|
129
|
-
}),
|
|
130
|
-
}, [
|
|
140
|
+
}), c.length > 0 ? c : null;
|
|
141
|
+
}, [k, r, y, u]);
|
|
131
142
|
return /* @__PURE__ */ j("div", { className: "w-full h-full flex items-center justify-between gap-2 group ag-cell-inner-padding", children: [
|
|
132
|
-
/* @__PURE__ */
|
|
143
|
+
/* @__PURE__ */ s(
|
|
133
144
|
"div",
|
|
134
145
|
{
|
|
146
|
+
ref: $,
|
|
135
147
|
className: `flex-1 truncate min-w-0 ${E ? "text-brand cursor-pointer hover:underline font-medium" : ""}`,
|
|
136
|
-
onClick: E ?
|
|
137
|
-
children:
|
|
148
|
+
onClick: E ? B : void 0,
|
|
149
|
+
children: C
|
|
138
150
|
}
|
|
139
151
|
),
|
|
140
|
-
F && /* @__PURE__ */
|
|
152
|
+
F && /* @__PURE__ */ s("div", { className: "flex items-center gap-1 flex-shrink-0", children: F })
|
|
141
153
|
] });
|
|
142
154
|
};
|
|
143
|
-
|
|
155
|
+
Z.displayName = "LinkCellRenderer";
|
|
144
156
|
export {
|
|
145
|
-
|
|
157
|
+
Z as LinkCellRenderer
|
|
146
158
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { useRef as M, useState as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { useGridHeader as
|
|
5
|
-
import { HeaderInfo as
|
|
6
|
-
import { Checkbox as
|
|
7
|
-
import { useImpactNovaI18n as
|
|
8
|
-
import { useAgGridTruncationTooltip as
|
|
9
|
-
import { useIsHeaderSearchActive as
|
|
1
|
+
import { jsx as e, jsxs as c, Fragment as te } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as M, useState as L, useEffect as R } from "react";
|
|
3
|
+
import { cn as g } from "../../../../lib/utils.js";
|
|
4
|
+
import { useGridHeader as re } from "./context/grid-header-context.js";
|
|
5
|
+
import { HeaderInfo as ne } from "./components/header-info.js";
|
|
6
|
+
import { Checkbox as oe } from "../../../forms/checkbox/checkbox.js";
|
|
7
|
+
import { useImpactNovaI18n as T } from "../../../../i18n/use-impact-nova-i18n.js";
|
|
8
|
+
import { useAgGridTruncationTooltip as ie } from "../use-ag-grid-truncation-tooltip.js";
|
|
9
|
+
import { useIsHeaderSearchActive as le } from "./header-search-active-state.js";
|
|
10
10
|
import { subscribeGridApiEvent as A } from "../grid-api-event-subscription.js";
|
|
11
|
-
import { subscribeColumnIndicatorSync as
|
|
12
|
-
import { ColumnHeaderSettingsMenu as
|
|
13
|
-
import { HeaderSearchInput as
|
|
14
|
-
const
|
|
15
|
-
/* @__PURE__ */ e("span", { className: "sort-asc-icon inline-flex transition-colors text-content-tertiary hover:text-brand-variant-hover", children: /* @__PURE__ */
|
|
11
|
+
import { subscribeColumnIndicatorSync as se } from "../column-indicator-sync-bus.js";
|
|
12
|
+
import { ColumnHeaderSettingsMenu as ae } from "./column-menu/column-header-settings-menu.js";
|
|
13
|
+
import { HeaderSearchInput as ce } from "./header-search-input.js";
|
|
14
|
+
const de = () => /* @__PURE__ */ c(te, { children: [
|
|
15
|
+
/* @__PURE__ */ e("span", { className: "sort-asc-icon inline-flex transition-colors text-content-tertiary hover:text-brand-variant-hover", children: /* @__PURE__ */ c(
|
|
16
16
|
"svg",
|
|
17
17
|
{
|
|
18
18
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -27,7 +27,7 @@ const se = () => /* @__PURE__ */ a(Y, { children: [
|
|
|
27
27
|
]
|
|
28
28
|
}
|
|
29
29
|
) }),
|
|
30
|
-
/* @__PURE__ */ e("span", { className: "sort-desc-icon inline-flex transition-colors text-content-tertiary hover:text-brand-variant-hover", children: /* @__PURE__ */
|
|
30
|
+
/* @__PURE__ */ e("span", { className: "sort-desc-icon inline-flex transition-colors text-content-tertiary hover:text-brand-variant-hover", children: /* @__PURE__ */ c(
|
|
31
31
|
"svg",
|
|
32
32
|
{
|
|
33
33
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -55,40 +55,40 @@ const se = () => /* @__PURE__ */ a(Y, { children: [
|
|
|
55
55
|
}
|
|
56
56
|
) })
|
|
57
57
|
] });
|
|
58
|
-
function
|
|
58
|
+
function he(r) {
|
|
59
59
|
if (r.getGridOption("rowModelType") === "serverSide") {
|
|
60
|
-
const
|
|
61
|
-
if (!
|
|
60
|
+
const h = r.getServerSideSelectionState?.();
|
|
61
|
+
if (!h || !("selectAll" in h))
|
|
62
62
|
return { isChecked: !1, isIndeterminate: !1 };
|
|
63
|
-
const { selectAll:
|
|
64
|
-
return
|
|
63
|
+
const { selectAll: d, toggledNodes: l } = h, n = !!(l && l.length > 0);
|
|
64
|
+
return d && !n ? { isChecked: !0, isIndeterminate: !1 } : d && n ? { isChecked: !1, isIndeterminate: !0 } : !d && n ? { isChecked: !1, isIndeterminate: !0 } : { isChecked: !1, isIndeterminate: !1 };
|
|
65
65
|
}
|
|
66
|
-
const
|
|
67
|
-
return
|
|
66
|
+
const m = r.getSelectedRows().length, a = r.getDisplayedRowCount();
|
|
67
|
+
return m === 0 ? { isChecked: !1, isIndeterminate: !1 } : m === a && a > 0 ? { isChecked: !0, isIndeterminate: !1 } : { isChecked: !1, isIndeterminate: !0 };
|
|
68
68
|
}
|
|
69
|
-
const
|
|
70
|
-
const { t } =
|
|
71
|
-
|
|
69
|
+
const ue = ({ api: r }) => {
|
|
70
|
+
const { t } = T(), [m, a] = L(0);
|
|
71
|
+
R(() => {
|
|
72
72
|
const n = () => {
|
|
73
|
-
|
|
74
|
-
},
|
|
73
|
+
a((C) => C + 1);
|
|
74
|
+
}, x = A(
|
|
75
75
|
r,
|
|
76
76
|
"selectionChanged",
|
|
77
77
|
n
|
|
78
|
-
),
|
|
78
|
+
), p = A(
|
|
79
79
|
r,
|
|
80
80
|
"modelUpdated",
|
|
81
81
|
n
|
|
82
82
|
);
|
|
83
83
|
return () => {
|
|
84
|
-
|
|
84
|
+
x(), p();
|
|
85
85
|
};
|
|
86
86
|
}, [r]);
|
|
87
|
-
const { isChecked:
|
|
87
|
+
const { isChecked: h, isIndeterminate: d } = he(r);
|
|
88
88
|
return /* @__PURE__ */ e(
|
|
89
|
-
|
|
89
|
+
oe,
|
|
90
90
|
{
|
|
91
|
-
checked:
|
|
91
|
+
checked: d ? "indeterminate" : h,
|
|
92
92
|
onCheckedChange: (n) => {
|
|
93
93
|
if (n === !0) {
|
|
94
94
|
r.selectAll();
|
|
@@ -100,40 +100,40 @@ const ce = ({ api: r }) => {
|
|
|
100
100
|
className: "m-0"
|
|
101
101
|
}
|
|
102
102
|
);
|
|
103
|
-
},
|
|
103
|
+
}, Ae = (r) => {
|
|
104
104
|
const {
|
|
105
105
|
displayName: t,
|
|
106
|
-
setTooltip:
|
|
107
|
-
enableSorting:
|
|
108
|
-
enableMenu:
|
|
109
|
-
progressSort:
|
|
106
|
+
setTooltip: m,
|
|
107
|
+
enableSorting: a,
|
|
108
|
+
enableMenu: h,
|
|
109
|
+
progressSort: d,
|
|
110
110
|
column: l,
|
|
111
111
|
api: n,
|
|
112
|
-
handleInlineSearch:
|
|
113
|
-
handleClearSearchInline:
|
|
114
|
-
onColumnSearchClick:
|
|
115
|
-
onAdvanceSearchClick:
|
|
116
|
-
toggleAdvanceSearch:
|
|
117
|
-
isSearchable:
|
|
118
|
-
advanceSearchEnabled:
|
|
112
|
+
handleInlineSearch: x,
|
|
113
|
+
handleClearSearchInline: p,
|
|
114
|
+
onColumnSearchClick: C,
|
|
115
|
+
onAdvanceSearchClick: V,
|
|
116
|
+
toggleAdvanceSearch: D,
|
|
117
|
+
isSearchable: P = !1,
|
|
118
|
+
advanceSearchEnabled: B = !1,
|
|
119
119
|
// Select params
|
|
120
120
|
selectOptions: _,
|
|
121
|
-
isMultiSelect:
|
|
121
|
+
isMultiSelect: G,
|
|
122
122
|
onSelectScrollToBottom: Z,
|
|
123
123
|
onSelectSearchChange: E,
|
|
124
|
-
onSelectOpen:
|
|
124
|
+
onSelectOpen: O,
|
|
125
125
|
isLoadingSelect: j,
|
|
126
126
|
// Pattern parsing options
|
|
127
127
|
enableSpaceSplitting: z,
|
|
128
|
-
enableBooleanParsing:
|
|
129
|
-
enableDateParsing:
|
|
130
|
-
} = r,
|
|
131
|
-
|
|
132
|
-
const
|
|
133
|
-
|
|
134
|
-
|
|
128
|
+
enableBooleanParsing: U,
|
|
129
|
+
enableDateParsing: K
|
|
130
|
+
} = r, k = M(null);
|
|
131
|
+
ie(m, t ?? "", k, "line-clamp", "leaf");
|
|
132
|
+
const u = re(), { t: w } = T(), o = l.getColDef(), f = l.getColId(), [me, q] = L(0);
|
|
133
|
+
R(() => se(() => {
|
|
134
|
+
q((s) => s + 1);
|
|
135
135
|
}), []);
|
|
136
|
-
const
|
|
136
|
+
const b = l.isFilterActive(), J = l.getSort(), I = l.getSortIndex(), Q = !!J && I != null && I > 0, v = (o?.filter || "agTextColumnFilter") === "agNumberColumnFilter" || (Array.isArray(o?.type) ? o.type.some((i) => i === "number" || i === "numericColumn") : o?.type === "number" || o?.type === "numericColumn"), H = le(u?.gridScopeId ?? "", f), N = M(null), F = [
|
|
137
137
|
"agTextColumnFilter",
|
|
138
138
|
"agNumberColumnFilter",
|
|
139
139
|
"agDateColumnFilter",
|
|
@@ -143,121 +143,123 @@ const ce = ({ api: r }) => {
|
|
|
143
143
|
// Defaults to text/set
|
|
144
144
|
void 0
|
|
145
145
|
// Defaults to text
|
|
146
|
-
].includes(
|
|
147
|
-
|
|
148
|
-
},
|
|
149
|
-
|
|
150
|
-
|
|
146
|
+
], S = o?.filter, W = S === !1 || S == null || S === "agGroupColumnFilter", X = !F.includes(S) && !W, y = (i) => {
|
|
147
|
+
i.stopPropagation(), a && d && d(i.shiftKey);
|
|
148
|
+
}, Y = (i) => {
|
|
149
|
+
i.stopPropagation(), C && C(r);
|
|
150
|
+
const s = l.getColDef().filter;
|
|
151
|
+
if (!(F.includes(s) || s === !1 || s == null || s === "agGroupColumnFilter")) {
|
|
152
|
+
n.showColumnFilter ? n.showColumnFilter(f) : n.showColumnMenu(f);
|
|
151
153
|
return;
|
|
152
154
|
}
|
|
153
|
-
|
|
154
|
-
},
|
|
155
|
-
|
|
156
|
-
},
|
|
157
|
-
|
|
155
|
+
(s === !1 || s == null || s === "agGroupColumnFilter") && (l.getColDef().filter = "agTextColumnFilter"), u && (H ? u.closeSearch() : u.openSearch(f));
|
|
156
|
+
}, $ = (i) => {
|
|
157
|
+
i.preventDefault(), i.stopPropagation(), N.current?.openMenu();
|
|
158
|
+
}, ee = (i) => /* @__PURE__ */ e("span", { onClick: (s) => s.stopPropagation(), children: /* @__PURE__ */ e(
|
|
159
|
+
ne,
|
|
158
160
|
{
|
|
159
161
|
...r,
|
|
160
|
-
className:
|
|
162
|
+
className: i
|
|
161
163
|
}
|
|
162
164
|
) });
|
|
163
|
-
return
|
|
164
|
-
|
|
165
|
+
return H && u && !X ? /* @__PURE__ */ e(
|
|
166
|
+
ce,
|
|
165
167
|
{
|
|
166
168
|
column: l,
|
|
167
169
|
api: n,
|
|
168
170
|
onClose: () => {
|
|
169
|
-
|
|
171
|
+
u.closeSearch();
|
|
170
172
|
},
|
|
171
|
-
handleInlineSearch:
|
|
172
|
-
handleClearSearchInline:
|
|
173
|
-
onAdvanceSearchClick:
|
|
174
|
-
toggleAdvanceSearch:
|
|
175
|
-
advanceSearchEnabled:
|
|
173
|
+
handleInlineSearch: x,
|
|
174
|
+
handleClearSearchInline: p ? () => p(r) : void 0,
|
|
175
|
+
onAdvanceSearchClick: V,
|
|
176
|
+
toggleAdvanceSearch: D,
|
|
177
|
+
advanceSearchEnabled: B,
|
|
176
178
|
selectOptions: _,
|
|
177
|
-
isMultiSelect:
|
|
179
|
+
isMultiSelect: G,
|
|
178
180
|
onSelectScrollToBottom: Z,
|
|
179
181
|
onSelectSearchChange: E,
|
|
180
|
-
onSelectOpen:
|
|
182
|
+
onSelectOpen: O,
|
|
181
183
|
isLoadingSelect: j,
|
|
182
184
|
enableSpaceSplitting: z,
|
|
183
|
-
enableBooleanParsing:
|
|
184
|
-
enableDateParsing:
|
|
185
|
+
enableBooleanParsing: U,
|
|
186
|
+
enableDateParsing: K
|
|
185
187
|
}
|
|
186
|
-
) : /* @__PURE__ */
|
|
188
|
+
) : /* @__PURE__ */ c(
|
|
187
189
|
"div",
|
|
188
190
|
{
|
|
189
|
-
className:
|
|
191
|
+
className: g(
|
|
190
192
|
"ag-header-cell-label flex items-center w-full group min-w-0 h-full",
|
|
191
193
|
v ? "flex-row-reverse" : "flex-row",
|
|
192
194
|
// Center the content area if it's a selection column
|
|
193
|
-
|
|
195
|
+
o?.headerCheckboxSelection && (!t || t.trim() === "") ? "justify-center" : ""
|
|
194
196
|
),
|
|
195
|
-
"data-selection-column":
|
|
196
|
-
onContextMenu:
|
|
197
|
+
"data-selection-column": o?.headerCheckboxSelection && (!t || t.trim() === "") ? "true" : void 0,
|
|
198
|
+
onContextMenu: $,
|
|
197
199
|
children: [
|
|
198
|
-
/* @__PURE__ */
|
|
200
|
+
/* @__PURE__ */ c(
|
|
199
201
|
"div",
|
|
200
202
|
{
|
|
201
|
-
className:
|
|
203
|
+
className: g(
|
|
202
204
|
"ag-header-cell-text relative group flex min-w-0 items-center",
|
|
203
205
|
v ? "flex-row-reverse" : "flex-row",
|
|
204
|
-
!(
|
|
205
|
-
|
|
206
|
+
!(o?.headerCheckboxSelection && (!t || t.trim() === "")) && "flex-1",
|
|
207
|
+
a ? "sortable cursor-pointer" : ""
|
|
206
208
|
),
|
|
207
|
-
onClick:
|
|
209
|
+
onClick: a ? y : void 0,
|
|
208
210
|
children: [
|
|
209
|
-
|
|
210
|
-
t && t.trim() !== "" && t !==
|
|
211
|
+
o?.headerCheckboxSelection && /* @__PURE__ */ e(ue, { api: n }),
|
|
212
|
+
t && t.trim() !== "" && t !== w("gridHeader.selection") && /* @__PURE__ */ c("div", { className: g(
|
|
211
213
|
"ag-grid-header-label-cluster",
|
|
212
214
|
v && "flex-row-reverse"
|
|
213
215
|
), children: [
|
|
214
|
-
/* @__PURE__ */ e("span", { ref:
|
|
215
|
-
|
|
216
|
+
/* @__PURE__ */ e("span", { ref: k, className: "ag-grid-header-label-text", children: t }),
|
|
217
|
+
ee(
|
|
216
218
|
"shrink-0 text-content-tertiary hover:text-brand-variant-hover transition-colors"
|
|
217
219
|
)
|
|
218
220
|
] })
|
|
219
221
|
]
|
|
220
222
|
}
|
|
221
223
|
),
|
|
222
|
-
!(
|
|
224
|
+
!(o?.headerCheckboxSelection && (!t || t.trim() === "")) && /* @__PURE__ */ c(
|
|
223
225
|
"div",
|
|
224
226
|
{
|
|
225
|
-
className:
|
|
227
|
+
className: g(
|
|
226
228
|
"flex items-center shrink-0 group gap-1",
|
|
227
229
|
v ? "flex-row-reverse" : "flex-row"
|
|
228
230
|
),
|
|
229
231
|
children: [
|
|
230
|
-
|
|
232
|
+
a && /* @__PURE__ */ c(
|
|
231
233
|
"div",
|
|
232
234
|
{
|
|
233
235
|
className: "ag-sort-indicator-container cursor-pointer flex items-center",
|
|
234
236
|
onClick: y,
|
|
235
237
|
children: [
|
|
236
|
-
|
|
237
|
-
/* @__PURE__ */ e("span", { className: "ag-sort-indicator-icon", children: /* @__PURE__ */ e(
|
|
238
|
+
Q && /* @__PURE__ */ e("span", { className: "ag-sort-order text-[10px] font-bold text-content-tertiary mr-0.5", children: I + 1 }),
|
|
239
|
+
/* @__PURE__ */ e("span", { className: "ag-sort-indicator-icon", children: /* @__PURE__ */ e(de, {}) })
|
|
238
240
|
]
|
|
239
241
|
}
|
|
240
242
|
),
|
|
241
|
-
|
|
243
|
+
P && /* @__PURE__ */ c(
|
|
242
244
|
"span",
|
|
243
245
|
{
|
|
244
|
-
className:
|
|
246
|
+
className: g(
|
|
245
247
|
"relative cursor-pointer flex items-center shrink-0 duration-200 text-content-tertiary hover:text-brand-variant-hover transition-colors",
|
|
246
|
-
|
|
248
|
+
b ? "opacity-100 w-auto" : "opacity-0 w-0 overflow-hidden group-hover:opacity-100 group-hover:w-auto"
|
|
247
249
|
),
|
|
248
|
-
onClick:
|
|
249
|
-
title:
|
|
250
|
+
onClick: Y,
|
|
251
|
+
title: w(b ? "gridHeader.activeFilter" : "gridHeader.search"),
|
|
250
252
|
children: [
|
|
251
253
|
/* @__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" }) }),
|
|
252
|
-
|
|
254
|
+
b && /* @__PURE__ */ e("span", { className: "absolute -top-0.5 -right-0.5 w-2.5 h-2.5 rounded-full border-2 bg-brand z-10" })
|
|
253
255
|
]
|
|
254
256
|
}
|
|
255
257
|
),
|
|
256
|
-
|
|
257
|
-
|
|
258
|
+
h && !("suppressHeaderMenuButton" in (o ?? {}) && o.suppressHeaderMenuButton) && /* @__PURE__ */ e(
|
|
259
|
+
ae,
|
|
258
260
|
{
|
|
259
|
-
ref:
|
|
260
|
-
columnId:
|
|
261
|
+
ref: N,
|
|
262
|
+
columnId: f,
|
|
261
263
|
gridApi: n,
|
|
262
264
|
displayName: t
|
|
263
265
|
}
|
|
@@ -270,5 +272,5 @@ const ce = ({ api: r }) => {
|
|
|
270
272
|
);
|
|
271
273
|
};
|
|
272
274
|
export {
|
|
273
|
-
|
|
275
|
+
Ae as CustomHeader
|
|
274
276
|
};
|
|
@@ -14,4 +14,5 @@ export * from './column-indicator';
|
|
|
14
14
|
export * from './indicator-legend';
|
|
15
15
|
export * from './column-savability';
|
|
16
16
|
export { mergePartialOrderedColumnState } from './data-table-column-state';
|
|
17
|
+
export { useDataTableViewport } from './use-data-table-viewport';
|
|
17
18
|
export type { SavedTableViewItem, TableViewTypeOption, DataTableSavedViewsProps, DataTableSavedViewsActionContext, DataTableSavedViewsCancelContext, } from '../data-table/data-table-saved-views.types';
|