impact-nova 2.2.4 → 2.2.6
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/ag-grid-tooltip-overflow.d.ts +2 -1
- package/dist/components/data/ag-grid-react/ag-grid-tooltip-overflow.js +12 -11
- package/dist/components/data/ag-grid-react/cell-renderers/link-with-batch-cell-renderer.js +109 -87
- package/dist/components/data/ag-grid-react/index.d.ts +2 -0
- package/dist/components/data/ag-grid-react/index.js +41 -36
- package/dist/components/data/data-table/data-table-saved-views.js +216 -191
- 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-metrics.js +44 -30
- 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 +162 -127
- 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-display/statistics-card/statistics-card.js +138 -111
- package/dist/components/feedback/tooltip/index.d.ts +3 -0
- package/dist/components/feedback/tooltip/index.js +13 -9
- package/dist/components/feedback/tooltip/overflow-tooltip.d.ts +2 -0
- package/dist/components/feedback/tooltip/overflow-tooltip.js +69 -0
- package/dist/components/feedback/tooltip/overflow-tooltip.types.d.ts +37 -0
- package/dist/components/feedback/tooltip/tab-tooltip-render.js +3 -2
- package/dist/components/feedback/tooltip/use-overflow-tooltip.d.ts +3 -0
- package/dist/components/feedback/tooltip/use-overflow-tooltip.js +55 -0
- package/dist/components/flows/command-palette/shortcut-settings.js +85 -66
- package/dist/components/flows/filter-panel/filter-panel.js +76 -69
- package/dist/components/flows/filter-strip/filter-summary.js +184 -163
- package/dist/components/flows/filter-strip/filter-tag-list.js +119 -103
- package/dist/components/forms/select/components/SelectOptionRow.js +35 -27
- package/dist/components/forms/select/components/SelectTriggerValue.js +49 -20
- package/dist/components/forms/select/components/Submenu.js +40 -31
- package/dist/components/layout/horizontal-scroller/index.d.ts +4 -0
- package/dist/components/layout/horizontal-scroller/index.js +6 -2
- package/dist/components/layout/horizontal-scroller/scroll-overflow-affordance.d.ts +10 -0
- package/dist/components/layout/horizontal-scroller/scroll-overflow-affordance.js +124 -0
- package/dist/components/layout/horizontal-scroller/use-horizontal-scroll-overflow.d.ts +13 -0
- package/dist/components/layout/horizontal-scroller/use-horizontal-scroll-overflow.js +40 -0
- package/dist/components/primitives/stepper/stepper.js +61 -42
- package/dist/impact-nova.css +1 -1
- package/dist/index.js +468 -460
- package/dist/lib/overflow/is-text-overflowing.d.ts +3 -0
- package/dist/lib/overflow/is-text-overflowing.js +6 -0
- package/dist/llms/rules/ag-grid.js +1 -1
- package/dist/llms/rules/best-practices.js +1 -1
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/dist/llms/rules/troubleshooting.js +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { TextOverflowMode } from '../../../lib/overflow/is-text-overflowing';
|
|
1
2
|
import { AgGridHeaderTooltipKind } from './ag-grid-header-dom';
|
|
2
|
-
export type AgGridTooltipOverflowMode =
|
|
3
|
+
export type AgGridTooltipOverflowMode = TextOverflowMode;
|
|
3
4
|
/** Matches AG Grid `_isElementOverflowingCallback` (horizontal or vertical). */
|
|
4
5
|
export declare function isAgGridTextOverflowing(element: HTMLElement, mode?: AgGridTooltipOverflowMode): boolean;
|
|
5
6
|
/** Header label tooltips: ellipsis on the text node, else content wider than the label shell. */
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { isTextOverflowing as o } from "../../../lib/overflow/is-text-overflowing.js";
|
|
2
|
+
import { resolveAgGridHeaderLabelShellSelector as n, AG_GRID_HEADER_LABEL_CLUSTER_SELECTOR as c } from "./ag-grid-header-dom.js";
|
|
3
|
+
function h(t, l = "line-clamp") {
|
|
4
|
+
return o(t, l);
|
|
4
5
|
}
|
|
5
|
-
function
|
|
6
|
-
if (
|
|
6
|
+
function u(t, l) {
|
|
7
|
+
if (t.clientWidth < t.scrollWidth)
|
|
7
8
|
return !0;
|
|
8
|
-
const
|
|
9
|
-
if (!
|
|
9
|
+
const e = t.closest(n(l));
|
|
10
|
+
if (!e || typeof e.clientWidth != "number")
|
|
10
11
|
return !1;
|
|
11
|
-
const
|
|
12
|
-
return (r && typeof r.scrollWidth == "number" ? r.scrollWidth :
|
|
12
|
+
const i = e, r = t.closest(c);
|
|
13
|
+
return (r && typeof r.scrollWidth == "number" ? r.scrollWidth : t.scrollWidth) > i.clientWidth;
|
|
13
14
|
}
|
|
14
15
|
export {
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
u as isAgGridHeaderLabelTooltipOverflowing,
|
|
17
|
+
h as isAgGridTextOverflowing
|
|
17
18
|
};
|
|
@@ -1,148 +1,170 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useMemo as
|
|
1
|
+
import { jsx as a, jsxs as j } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as R, useCallback as C, useState as H, useRef as I, useEffect as P } from "react";
|
|
3
3
|
import { Badge as V } from "../../../data-display/badge/badge.js";
|
|
4
|
-
import { evaluateValidationRules as
|
|
5
|
-
import { resolveGridIcon as
|
|
6
|
-
import { Tooltip as
|
|
7
|
-
const
|
|
4
|
+
import { evaluateValidationRules as U, getFieldValue as v, mapBadgeVariant as G, mapBadgeColor as _ } from "./cell-renderer-utils.js";
|
|
5
|
+
import { resolveGridIcon as z } from "./gridIconResolver.js";
|
|
6
|
+
import { Tooltip as M, TooltipTrigger as Q, TooltipContent as W } from "../../../feedback/tooltip/tooltip.js";
|
|
7
|
+
const q = (e, n, r, d) => {
|
|
8
8
|
if (!n) return e;
|
|
9
9
|
let l = e;
|
|
10
|
-
return l = l.replace(/\$\{value\}/g, String(
|
|
11
|
-
const
|
|
12
|
-
l = l.replace(
|
|
10
|
+
return l = l.replace(/\$\{value\}/g, String(d ?? "")), l = l.replace(/\$\{field\}/g, String(r ?? "")), Object.keys(n).forEach((o) => {
|
|
11
|
+
const i = new RegExp(`\\$\\{${o}\\}`, "g");
|
|
12
|
+
l = l.replace(i, String(n[o] ?? ""));
|
|
13
13
|
}), l;
|
|
14
|
-
},
|
|
14
|
+
}, A = ({
|
|
15
15
|
iconConfig: e,
|
|
16
16
|
rowData: n,
|
|
17
17
|
rowId: r,
|
|
18
|
-
field:
|
|
18
|
+
field: d
|
|
19
19
|
}) => {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
const [l, o] = H(!1), i = I(null);
|
|
21
|
+
P(() => {
|
|
22
|
+
const x = i.current;
|
|
23
|
+
if (!x || !e.showOnHover)
|
|
24
|
+
return;
|
|
25
|
+
const y = x.closest(".group");
|
|
26
|
+
if (!y)
|
|
27
|
+
return;
|
|
28
|
+
const c = () => o(!1);
|
|
29
|
+
return y.addEventListener("mouseleave", c), () => {
|
|
30
|
+
y.removeEventListener("mouseleave", c);
|
|
31
|
+
};
|
|
32
|
+
}, [e.showOnHover]), P(() => () => o(!1), []);
|
|
33
|
+
let s = null;
|
|
34
|
+
const u = v(e.iconField, e.icon, n);
|
|
35
|
+
if (typeof u == "string" ? s = z(u, { size: 16 }) : s = u, !s) return null;
|
|
36
|
+
const k = v(e.backgroundColorField, e.backgroundColor, n), h = v(e.colorField, e.color, n) ?? "var(--color-foreground-icon)", g = v(e.tooltipField, e.tooltip, n), S = /* @__PURE__ */ a(
|
|
24
37
|
"div",
|
|
25
38
|
{
|
|
26
|
-
|
|
39
|
+
ref: i,
|
|
40
|
+
className: `flex items-center justify-center bg-[var(--icon-bg)] text-[var(--icon-fg)] ${e.onClick ? "cursor-pointer" : ""} ${e.showOnHover ? "invisible opacity-0 pointer-events-none group-hover:visible group-hover:opacity-100 group-hover:pointer-events-auto transition-opacity" : ""}`,
|
|
27
41
|
style: {
|
|
28
|
-
"--icon-bg":
|
|
29
|
-
"--icon-fg":
|
|
42
|
+
"--icon-bg": k,
|
|
43
|
+
"--icon-fg": h,
|
|
30
44
|
borderRadius: "4px",
|
|
31
45
|
padding: "2px",
|
|
32
46
|
minWidth: "18px",
|
|
33
47
|
minHeight: "18px"
|
|
34
48
|
},
|
|
35
|
-
onClick: e.onClick ? () => e.onClick?.({ rowId: r, field:
|
|
36
|
-
children:
|
|
49
|
+
onClick: e.onClick ? () => e.onClick?.({ rowId: r, field: d, rowData: n ?? {} }) : void 0,
|
|
50
|
+
children: s
|
|
37
51
|
}
|
|
38
52
|
);
|
|
39
|
-
return
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
53
|
+
return g ? /* @__PURE__ */ j(
|
|
54
|
+
M,
|
|
55
|
+
{
|
|
56
|
+
open: l,
|
|
57
|
+
onOpenChange: o,
|
|
58
|
+
disableHoverableContent: !0,
|
|
59
|
+
children: [
|
|
60
|
+
/* @__PURE__ */ a(Q, { asChild: !0, children: S }),
|
|
61
|
+
/* @__PURE__ */ a(W, { variant: "tertiary", side: e.tooltipSide || "top", children: g })
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
) : null;
|
|
65
|
+
}, J = ({
|
|
44
66
|
badgeConfig: e,
|
|
45
67
|
rowData: n,
|
|
46
68
|
rowId: r,
|
|
47
|
-
field:
|
|
69
|
+
field: d
|
|
48
70
|
}) => {
|
|
49
|
-
const l =
|
|
71
|
+
const l = v(e.labelField, e.label, n);
|
|
50
72
|
if (!l) return null;
|
|
51
|
-
const
|
|
52
|
-
return /* @__PURE__ */
|
|
73
|
+
const o = v(e.colorField, e.color, n), i = v(e.variantField, e.variant, n);
|
|
74
|
+
return /* @__PURE__ */ a(
|
|
53
75
|
V,
|
|
54
76
|
{
|
|
55
77
|
className: "font-medium",
|
|
56
|
-
color:
|
|
57
|
-
variant:
|
|
58
|
-
onClick: e.onClick ? () => e.onClick?.({ rowId: r, field:
|
|
78
|
+
color: _(o),
|
|
79
|
+
variant: G(i),
|
|
80
|
+
onClick: e.onClick ? () => e.onClick?.({ rowId: r, field: d, rowData: n ?? {} }) : void 0,
|
|
59
81
|
children: l
|
|
60
82
|
}
|
|
61
83
|
);
|
|
62
|
-
},
|
|
84
|
+
}, X = (e) => {
|
|
63
85
|
const {
|
|
64
86
|
value: n,
|
|
65
87
|
data: r,
|
|
66
|
-
node:
|
|
88
|
+
node: d,
|
|
67
89
|
colDef: l,
|
|
68
|
-
onClick:
|
|
69
|
-
redirectUrl:
|
|
90
|
+
onClick: o,
|
|
91
|
+
redirectUrl: i,
|
|
70
92
|
updateQueryParams: s,
|
|
71
|
-
navigate:
|
|
72
|
-
setSearchParams:
|
|
73
|
-
rightSideContent:
|
|
74
|
-
valueFormatter:
|
|
93
|
+
navigate: u,
|
|
94
|
+
setSearchParams: k,
|
|
95
|
+
rightSideContent: h,
|
|
96
|
+
valueFormatter: g,
|
|
75
97
|
disableOnPinnedRows: S = !0,
|
|
76
|
-
disableLinkStyle:
|
|
77
|
-
validationRules:
|
|
78
|
-
} = e,
|
|
79
|
-
(
|
|
80
|
-
if (
|
|
81
|
-
|
|
82
|
-
const
|
|
83
|
-
return Object.entries(s).forEach(([
|
|
84
|
-
let
|
|
85
|
-
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
}),
|
|
89
|
-
}),
|
|
98
|
+
disableLinkStyle: x,
|
|
99
|
+
validationRules: y
|
|
100
|
+
} = e, c = d.id ?? String(r?.id ?? ""), p = l?.field ?? "", $ = r && typeof r == "object" && "_isPinned" in r && r._isPinned === !0, w = R(() => x || S && $ || U(y, r) ? !1 : !!(s || i || o), [x, S, $, s, i, o, y, r]), T = C(
|
|
101
|
+
(f) => {
|
|
102
|
+
if (f.stopPropagation(), s && k)
|
|
103
|
+
k((t) => {
|
|
104
|
+
const b = new URLSearchParams(t);
|
|
105
|
+
return Object.entries(s).forEach(([E, N]) => {
|
|
106
|
+
let m = String(N);
|
|
107
|
+
m = m.replace(/\$\{value\}/g, String(n ?? "")), m = m.replace(/\$\{field\}/g, p), r && Object.keys(r).forEach((F) => {
|
|
108
|
+
const B = new RegExp(`\\$\\{${F}\\}`, "g");
|
|
109
|
+
m = m.replace(B, String(r[F] ?? ""));
|
|
110
|
+
}), b.set(E, m);
|
|
111
|
+
}), b;
|
|
90
112
|
});
|
|
91
|
-
else if (
|
|
92
|
-
const t =
|
|
93
|
-
|
|
94
|
-
} else
|
|
113
|
+
else if (i && u) {
|
|
114
|
+
const t = q(i, r, p, n);
|
|
115
|
+
u(t);
|
|
116
|
+
} else o && o({ rowId: c, field: p, rowData: r ?? {}, value: n });
|
|
95
117
|
},
|
|
96
|
-
[s,
|
|
97
|
-
),
|
|
98
|
-
if (!
|
|
99
|
-
const
|
|
100
|
-
return
|
|
118
|
+
[s, k, i, u, o, r, p, n, c]
|
|
119
|
+
), L = R(() => g ? g(n, r ?? {}) : String(n ?? ""), [n, g, r]), O = R(() => {
|
|
120
|
+
if (!h?.items || h.items.length === 0) return null;
|
|
121
|
+
const f = [];
|
|
122
|
+
return h.items.forEach((t, b) => {
|
|
101
123
|
if (t.type === "icon" && t.icon)
|
|
102
|
-
|
|
103
|
-
/* @__PURE__ */
|
|
104
|
-
|
|
124
|
+
f.push(
|
|
125
|
+
/* @__PURE__ */ a(
|
|
126
|
+
A,
|
|
105
127
|
{
|
|
106
128
|
iconConfig: t.icon,
|
|
107
129
|
rowData: r,
|
|
108
|
-
rowId:
|
|
109
|
-
field:
|
|
130
|
+
rowId: c,
|
|
131
|
+
field: p
|
|
110
132
|
},
|
|
111
|
-
`icon-${
|
|
133
|
+
`icon-${b}`
|
|
112
134
|
)
|
|
113
135
|
);
|
|
114
136
|
else if (t.type === "badge" && t.badge)
|
|
115
|
-
|
|
116
|
-
/* @__PURE__ */
|
|
117
|
-
|
|
137
|
+
f.push(
|
|
138
|
+
/* @__PURE__ */ a(
|
|
139
|
+
J,
|
|
118
140
|
{
|
|
119
141
|
badgeConfig: t.badge,
|
|
120
142
|
rowData: r,
|
|
121
|
-
rowId:
|
|
122
|
-
field:
|
|
143
|
+
rowId: c,
|
|
144
|
+
field: p
|
|
123
145
|
},
|
|
124
|
-
`badge-${
|
|
146
|
+
`badge-${b}`
|
|
125
147
|
)
|
|
126
148
|
);
|
|
127
149
|
else if (t.type === "dynamic" && t.dynamic) {
|
|
128
|
-
const
|
|
129
|
-
|
|
150
|
+
const E = typeof t.dynamic == "function" ? t.dynamic(r ?? {}) : t.dynamic;
|
|
151
|
+
f.push(/* @__PURE__ */ a("span", { children: E }, `dyn-${b}`));
|
|
130
152
|
}
|
|
131
|
-
}),
|
|
132
|
-
}, [
|
|
133
|
-
return /* @__PURE__ */
|
|
134
|
-
/* @__PURE__ */
|
|
153
|
+
}), f.length > 0 ? f : null;
|
|
154
|
+
}, [h, r, c, p]);
|
|
155
|
+
return /* @__PURE__ */ j("div", { className: "w-full h-full flex items-center justify-between gap-2 group ag-cell-inner-padding", children: [
|
|
156
|
+
/* @__PURE__ */ a(
|
|
135
157
|
"div",
|
|
136
158
|
{
|
|
137
|
-
className: `flex-1 truncate min-w-0 ${
|
|
138
|
-
onClick:
|
|
139
|
-
children:
|
|
159
|
+
className: `flex-1 truncate min-w-0 ${w ? "text-brand cursor-pointer hover:underline font-medium" : ""}`,
|
|
160
|
+
onClick: w ? T : void 0,
|
|
161
|
+
children: L
|
|
140
162
|
}
|
|
141
163
|
),
|
|
142
|
-
|
|
164
|
+
O && /* @__PURE__ */ a("div", { className: "flex items-center gap-1 flex-shrink-0", children: O })
|
|
143
165
|
] });
|
|
144
166
|
};
|
|
145
|
-
|
|
167
|
+
X.displayName = "LinkCellRenderer";
|
|
146
168
|
export {
|
|
147
|
-
|
|
169
|
+
X as LinkCellRenderer
|
|
148
170
|
};
|
|
@@ -4,3 +4,5 @@ export { subscribeGridApiEvent, subscribeGridApiEvents };
|
|
|
4
4
|
export declare function AgGridWrapper<TData>({ children, defaultColDef, defaultColGroupDef, columnDefs, valueFormatters, onGridReady: userOnGridReady, onGridPreDestroyed: userOnGridPreDestroyed, onFilterChanged: userOnFilterChanged, onSelectionChanged: userOnSelectionChanged, onModelUpdated: userOnModelUpdated, ensureDomOrder, autoSizeStrategy, tooltipShowMode, tooltipShowDelay, tooltipHideDelay, tooltipInteraction, themeOverride, ...restProps }: AgGridWrapperProps<TData> & {
|
|
5
5
|
className?: string;
|
|
6
6
|
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export { useAgGridTruncationTooltip } from './use-ag-grid-truncation-tooltip';
|
|
8
|
+
export { isAgGridTextOverflowing, isAgGridHeaderLabelTooltipOverflowing, type AgGridTooltipOverflowMode, } from './ag-grid-tooltip-overflow';
|
|
@@ -1,29 +1,31 @@
|
|
|
1
1
|
import { jsxs as Ce, jsx as F } from "react/jsx-runtime";
|
|
2
2
|
import { lazy as ve, useRef as U, useState as I, useEffect as V, useCallback as m, useMemo as f, Suspense as ye } from "react";
|
|
3
3
|
import { ModuleRegistry as be, AllCommunityModule as xe, ValidationModule as Fe } from "ag-grid-community";
|
|
4
|
-
import { AllEnterpriseModule as
|
|
5
|
-
import { AgGridReact as
|
|
4
|
+
import { AllEnterpriseModule as Ae } from "ag-grid-enterprise";
|
|
5
|
+
import { AgGridReact as Se } from "ag-grid-react";
|
|
6
6
|
import { customAgGridTheme as Ee } from "./theme.js";
|
|
7
7
|
import { syncAgGridThemeMode as Ge } from "./sync-ag-grid-theme-mode.js";
|
|
8
8
|
import { CustomHeader as Me } from "./headers/custom-header.js";
|
|
9
9
|
import { CustomHeaderGroup as $ } from "./headers/custom-inner-header-group.js";
|
|
10
10
|
import { mergeColumnGroupDefsWithDefault as Re } from "./merge-column-group-defs.js";
|
|
11
|
-
import { DefaultTextCellRenderer as
|
|
11
|
+
import { DefaultTextCellRenderer as Te } from "./cell-renderers/default-text-cell-renderer.js";
|
|
12
12
|
import { GridHeaderContext as we } from "./headers/context/grid-header-context.js";
|
|
13
|
-
import { convertToAgGridFilterModel as
|
|
13
|
+
import { convertToAgGridFilterModel as ke, getMultiFilterIndices as je, convertFromAgGridFilterModel as Pe } from "./headers/utils/filter-utils.js";
|
|
14
14
|
import { AG_GRID_VALUE_FORMATTERS as De } from "./value-formatters.js";
|
|
15
15
|
import { useGridAutoSizeStrategyOnResize as Ie } from "./useGridAutoSizeStrategyOnResize.js";
|
|
16
16
|
import { subscribeGridApiEvent as it, subscribeGridApiEvents as st } from "./grid-api-event-subscription.js";
|
|
17
17
|
import { notifyColumnIndicatorSync as M } from "./notify-column-indicator-sync.js";
|
|
18
18
|
import { setActiveSearchColumnId as L, clearHeaderSearchActiveState as Le } from "./headers/header-search-active-state.js";
|
|
19
19
|
/* empty css */
|
|
20
|
-
|
|
20
|
+
import { useAgGridTruncationTooltip as ct } from "./use-ag-grid-truncation-tooltip.js";
|
|
21
|
+
import { isAgGridHeaderLabelTooltipOverflowing as dt, isAgGridTextOverflowing as pt } from "./ag-grid-tooltip-overflow.js";
|
|
22
|
+
const Oe = ve(
|
|
21
23
|
() => import("./headers/advanced-filter/advanced-filter-dialog.js").then((s) => ({
|
|
22
24
|
default: s.AdvancedFilterDialog
|
|
23
25
|
}))
|
|
24
26
|
);
|
|
25
|
-
be.registerModules([xe,
|
|
26
|
-
const x = "",
|
|
27
|
+
be.registerModules([xe, Ae, Fe]);
|
|
28
|
+
const x = "", O = "", q = (s) => {
|
|
27
29
|
if (!s) return;
|
|
28
30
|
const o = s.cellRendererParams?.splits;
|
|
29
31
|
if (Array.isArray(o) && o.length > 0) return o;
|
|
@@ -80,18 +82,18 @@ function nt({
|
|
|
80
82
|
onGridPreDestroyed: u,
|
|
81
83
|
onFilterChanged: y,
|
|
82
84
|
onSelectionChanged: h,
|
|
83
|
-
onModelUpdated:
|
|
85
|
+
onModelUpdated: A,
|
|
84
86
|
ensureDomOrder: R = !1,
|
|
85
|
-
autoSizeStrategy:
|
|
87
|
+
autoSizeStrategy: T,
|
|
86
88
|
tooltipShowMode: w = "whenTruncated",
|
|
87
|
-
tooltipShowDelay:
|
|
89
|
+
tooltipShowDelay: k = 500,
|
|
88
90
|
tooltipHideDelay: B = 5e3,
|
|
89
91
|
tooltipInteraction: Q = !0,
|
|
90
92
|
themeOverride: Y,
|
|
91
93
|
...C
|
|
92
94
|
}) {
|
|
93
|
-
const a = U(null),
|
|
94
|
-
Ie(
|
|
95
|
+
const a = U(null), j = U(null), [H, N] = I(null);
|
|
96
|
+
Ie(H, j, T), V(() => {
|
|
95
97
|
const e = document.documentElement, t = () => {
|
|
96
98
|
Ge(e.classList.contains("dark") ? "dark" : "light", e);
|
|
97
99
|
};
|
|
@@ -139,7 +141,7 @@ function nt({
|
|
|
139
141
|
},
|
|
140
142
|
applyAdvancedFilter: (e) => {
|
|
141
143
|
if (!a.current) return;
|
|
142
|
-
const t =
|
|
144
|
+
const t = ke(e);
|
|
143
145
|
a.current.setFilterModel(t), a.current.onFilterChanged(), M(a.current);
|
|
144
146
|
}
|
|
145
147
|
}), []), ne = m((e) => {
|
|
@@ -163,12 +165,12 @@ function nt({
|
|
|
163
165
|
[h]
|
|
164
166
|
), se = m(
|
|
165
167
|
(e) => {
|
|
166
|
-
|
|
168
|
+
A?.(e);
|
|
167
169
|
},
|
|
168
|
-
[
|
|
170
|
+
[A]
|
|
169
171
|
);
|
|
170
172
|
V(() => {
|
|
171
|
-
const e =
|
|
173
|
+
const e = j.current;
|
|
172
174
|
if (!e) return;
|
|
173
175
|
const t = (n) => {
|
|
174
176
|
if (n.key !== "Enter" && n.key !== " ") return;
|
|
@@ -186,7 +188,7 @@ function nt({
|
|
|
186
188
|
// Default cell renderer wraps text in a span so display:flex centering
|
|
187
189
|
// and text-overflow:ellipsis both work (ellipsis doesn't work on
|
|
188
190
|
// anonymous flex text nodes, but works on flex child elements).
|
|
189
|
-
cellRenderer:
|
|
191
|
+
cellRenderer: Te,
|
|
190
192
|
...o,
|
|
191
193
|
suppressHeaderKeyboardEvent: (e) => {
|
|
192
194
|
const { event: t } = e, n = t.target;
|
|
@@ -233,7 +235,7 @@ function nt({
|
|
|
233
235
|
const d = n[0]?.field?.split(".").pop(), b = d ? t[d] : void 0;
|
|
234
236
|
return b && typeof b == "object" && "value" in b ? b.value ?? "" : r[0];
|
|
235
237
|
}
|
|
236
|
-
return
|
|
238
|
+
return O + r.join(x);
|
|
237
239
|
}
|
|
238
240
|
const i = Object.entries(t).map(([, r]) => r && typeof r == "object" && "value" in r ? r.value : typeof r != "object" && typeof r < "u" ? r : null).filter((r) => r != null);
|
|
239
241
|
return i.length === 0 ? "" : i.length === 1 ? i[0] : i.join(x);
|
|
@@ -250,7 +252,7 @@ function nt({
|
|
|
250
252
|
return e.value;
|
|
251
253
|
}, []), me = m((e) => {
|
|
252
254
|
const t = e?.data ?? "";
|
|
253
|
-
if (!t.includes(x) && !t.includes(
|
|
255
|
+
if (!t.includes(x) && !t.includes(O)) {
|
|
254
256
|
J(t);
|
|
255
257
|
return;
|
|
256
258
|
}
|
|
@@ -262,7 +264,7 @@ function nt({
|
|
|
262
264
|
n.push("");
|
|
263
265
|
continue;
|
|
264
266
|
}
|
|
265
|
-
const E = d.split(" ").map((p) => p.startsWith(
|
|
267
|
+
const E = d.split(" ").map((p) => p.startsWith(O) ? { isSplit: !0, slots: p.slice(1).split(x) } : { isSplit: !1, slots: p.split(x) }), K = Math.max(1, ...E.map((p) => p.slots.length));
|
|
266
268
|
if (K === 1) {
|
|
267
269
|
n.push(E.map((p) => p.slots[0] ?? "").join(" "));
|
|
268
270
|
continue;
|
|
@@ -274,7 +276,7 @@ function nt({
|
|
|
274
276
|
}
|
|
275
277
|
J(n.join(`
|
|
276
278
|
`));
|
|
277
|
-
}, []),
|
|
279
|
+
}, []), S = m((e) => {
|
|
278
280
|
const t = e.value;
|
|
279
281
|
if (t == null) return "";
|
|
280
282
|
if (typeof t != "object") return String(t);
|
|
@@ -297,15 +299,15 @@ function nt({
|
|
|
297
299
|
return i.length === 0 ? "" : i.length === 1 ? i[0] : i.join(`
|
|
298
300
|
`);
|
|
299
301
|
}, []), fe = f(() => ({
|
|
300
|
-
processCellCallback:
|
|
302
|
+
processCellCallback: S,
|
|
301
303
|
...C.defaultCsvExportParams ?? {}
|
|
302
|
-
}), [
|
|
303
|
-
processCellCallback:
|
|
304
|
+
}), [S, C.defaultCsvExportParams]), ge = f(() => ({
|
|
305
|
+
processCellCallback: S,
|
|
304
306
|
...C.defaultExcelExportParams ?? {}
|
|
305
|
-
}), [
|
|
307
|
+
}), [S, C.defaultExcelExportParams]);
|
|
306
308
|
return /* @__PURE__ */ Ce(we.Provider, { value: P, children: [
|
|
307
|
-
/* @__PURE__ */ F("div", { ref:
|
|
308
|
-
|
|
309
|
+
/* @__PURE__ */ F("div", { ref: j, "data-component": "ag-grid-react", style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ F(
|
|
310
|
+
Se,
|
|
309
311
|
{
|
|
310
312
|
theme: Y ?? Ee,
|
|
311
313
|
defaultColDef: ae,
|
|
@@ -318,7 +320,7 @@ function nt({
|
|
|
318
320
|
onSelectionChanged: ie,
|
|
319
321
|
onModelUpdated: se,
|
|
320
322
|
tooltipShowMode: w,
|
|
321
|
-
tooltipShowDelay:
|
|
323
|
+
tooltipShowDelay: k,
|
|
322
324
|
tooltipHideDelay: B,
|
|
323
325
|
tooltipInteraction: Q,
|
|
324
326
|
processCellForClipboard: de,
|
|
@@ -331,7 +333,7 @@ function nt({
|
|
|
331
333
|
hidePaddedHeaderRows: !0,
|
|
332
334
|
suppressServerSideFullWidthLoadingRow: !0,
|
|
333
335
|
columnTypes: re,
|
|
334
|
-
autoSizeStrategy:
|
|
336
|
+
autoSizeStrategy: T,
|
|
335
337
|
...C,
|
|
336
338
|
components: ue,
|
|
337
339
|
defaultCsvExportParams: fe,
|
|
@@ -341,18 +343,18 @@ function nt({
|
|
|
341
343
|
) }),
|
|
342
344
|
s,
|
|
343
345
|
/* @__PURE__ */ F(
|
|
344
|
-
|
|
346
|
+
He,
|
|
345
347
|
{
|
|
346
348
|
isOpen: Z,
|
|
347
349
|
columnId: ee,
|
|
348
|
-
gridApi:
|
|
350
|
+
gridApi: H,
|
|
349
351
|
onClose: P.closeAdvancedFilter,
|
|
350
352
|
onApply: P.applyAdvancedFilter
|
|
351
353
|
}
|
|
352
354
|
)
|
|
353
355
|
] });
|
|
354
356
|
}
|
|
355
|
-
function
|
|
357
|
+
function He({
|
|
356
358
|
isOpen: s,
|
|
357
359
|
columnId: o,
|
|
358
360
|
gridApi: l,
|
|
@@ -362,9 +364,9 @@ function Oe({
|
|
|
362
364
|
if (!s || !o || !l) return null;
|
|
363
365
|
const c = l.getColumn(o);
|
|
364
366
|
if (!c) return null;
|
|
365
|
-
const u = c.getColDef(), y = u.headerComponentParams, h =
|
|
367
|
+
const u = c.getColDef(), y = u.headerComponentParams, h = je(u), A = h.text !== -1 || h.number !== -1 || h.date !== -1, R = h.set !== -1, w = u.filter === "agMultiColumnFilter" && (A || R) ? "multi" : u.filter === "agNumberColumnFilter" ? "number" : u.filter === "agDateColumnFilter" ? "date" : u.filter === "agSetColumnFilter" || y?.selectOptions ? "select" : "text", k = Pe(l.getFilterModel());
|
|
366
368
|
return /* @__PURE__ */ F(ye, { fallback: null, children: /* @__PURE__ */ F(
|
|
367
|
-
|
|
369
|
+
Oe,
|
|
368
370
|
{
|
|
369
371
|
isOpen: s,
|
|
370
372
|
onClose: v,
|
|
@@ -374,13 +376,16 @@ function Oe({
|
|
|
374
376
|
columnType: w,
|
|
375
377
|
selectOptions: y?.selectOptions,
|
|
376
378
|
isMultiSelect: y?.isMultiSelect,
|
|
377
|
-
initialModel:
|
|
379
|
+
initialModel: k,
|
|
378
380
|
api: l
|
|
379
381
|
}
|
|
380
382
|
) });
|
|
381
383
|
}
|
|
382
384
|
export {
|
|
383
385
|
nt as AgGridWrapper,
|
|
386
|
+
dt as isAgGridHeaderLabelTooltipOverflowing,
|
|
387
|
+
pt as isAgGridTextOverflowing,
|
|
384
388
|
it as subscribeGridApiEvent,
|
|
385
|
-
st as subscribeGridApiEvents
|
|
389
|
+
st as subscribeGridApiEvents,
|
|
390
|
+
ct as useAgGridTruncationTooltip
|
|
386
391
|
};
|