impact-nova 2.2.1 → 2.2.2
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-header-dom.d.ts +8 -0
- package/dist/components/data/ag-grid-react/ag-grid-header-dom.js +11 -0
- package/dist/components/data/ag-grid-react/ag-grid-tooltip-overflow.d.ts +4 -1
- package/dist/components/data/ag-grid-react/ag-grid-tooltip-overflow.js +14 -3
- package/dist/components/data/ag-grid-react/headers/column-menu/column-header-settings-menu.d.ts +19 -0
- package/dist/components/data/ag-grid-react/headers/column-menu/column-header-settings-menu.js +74 -0
- package/dist/components/data/ag-grid-react/headers/column-menu/column-settings-menu.d.ts +4 -5
- package/dist/components/data/ag-grid-react/headers/column-menu/column-settings-menu.js +110 -144
- package/dist/components/data/ag-grid-react/headers/components/header-info.d.ts +2 -1
- package/dist/components/data/ag-grid-react/headers/components/header-info.js +73 -70
- package/dist/components/data/ag-grid-react/headers/context/grid-header-context.d.ts +0 -8
- package/dist/components/data/ag-grid-react/headers/custom-header.js +112 -118
- package/dist/components/data/ag-grid-react/headers/custom-inner-header-group.js +27 -23
- package/dist/components/data/ag-grid-react/headers/resolve-header-info-params.d.ts +10 -0
- package/dist/components/data/ag-grid-react/headers/resolve-header-info-params.js +19 -0
- package/dist/components/data/ag-grid-react/index.js +169 -210
- package/dist/components/data/ag-grid-react/info-system-story-columns.d.ts +12 -0
- package/dist/components/data/ag-grid-react/merge-column-group-defs.d.ts +3 -0
- package/dist/components/data/ag-grid-react/merge-column-group-defs.js +27 -0
- package/dist/components/data/ag-grid-react/use-ag-grid-truncation-tooltip.d.ts +2 -1
- package/dist/components/data/ag-grid-react/use-ag-grid-truncation-tooltip.js +7 -7
- package/dist/components/data/data-table/data-table-view-menu.d.ts +1 -0
- package/dist/components/feedback/dialog/dialog.js +107 -61
- package/dist/components/feedback/dropdown-menu/dropdown-menu.d.ts +1 -0
- package/dist/components/feedback/dropdown-menu/dropdown-menu.js +83 -76
- package/dist/components/feedback/popover/popover.d.ts +5 -2
- package/dist/components/feedback/popover/popover.js +43 -40
- package/dist/components/feedback/sheet/sheet.js +149 -102
- package/dist/components/forms/date-picker/date-input-behavior.d.ts +10 -4
- package/dist/components/forms/date-picker/date-input-behavior.js +86 -67
- package/dist/components/forms/date-picker/date-picker.js +59 -52
- package/dist/components/forms/date-picker/date-range-picker.js +26 -25
- package/dist/components/forms/date-picker/month-picker.js +76 -69
- package/dist/components/forms/date-picker/month-range-picker.js +41 -40
- package/dist/components/forms/date-picker/multi-date-picker.js +31 -31
- package/dist/components/forms/date-picker/multi-month-picker.js +27 -27
- package/dist/components/forms/date-picker/multi-week-picker.js +37 -37
- package/dist/components/forms/date-picker/week-picker.js +85 -78
- package/dist/components/forms/date-picker/week-range-picker.js +67 -66
- package/dist/components/forms/select/components/SelectMenuPanel.js +19 -15
- package/dist/components/forms/select/components/SelectOptionRow.js +110 -90
- package/dist/components/forms/select/components/Submenu.js +39 -34
- package/dist/components/forms/select/hooks/useSelectOpenEffects.js +65 -70
- package/dist/components/forms/select/select.js +228 -223
- package/dist/components/forms/select/select.types.d.ts +8 -0
- package/dist/impact-nova-components.css +59 -15
- package/dist/impact-nova.css +1 -1
- package/dist/lib/overlay/merge-element-refs.d.ts +2 -0
- package/dist/lib/overlay/merge-element-refs.js +17 -0
- package/dist/lib/overlay/overlay-host.constants.d.ts +4 -0
- package/dist/lib/overlay/overlay-host.constants.js +5 -0
- package/dist/lib/overlay/overlay-portal-context.d.ts +26 -0
- package/dist/lib/overlay/overlay-portal-context.js +65 -0
- package/dist/lib/overlay/use-overlay-portal-container-state.d.ts +5 -0
- package/dist/lib/overlay/use-overlay-portal-container-state.js +13 -0
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/package.json +22 -8
- package/dist/components/forms/select/components/LabelWithSequence.d.ts +0 -13
- package/dist/components/forms/select/components/LabelWithSequence.js +0 -18
|
@@ -1,109 +1,112 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { cn as
|
|
1
|
+
import { jsx as r, jsxs as I, Fragment as g } from "react/jsx-runtime";
|
|
2
|
+
import { useState as v } from "react";
|
|
3
|
+
import { cn as m } from "../../../../../lib/utils.js";
|
|
4
4
|
import { Info as k } from "impact-nova-icons";
|
|
5
|
-
import { useImpactNovaI18n as
|
|
5
|
+
import { useImpactNovaI18n as u } from "../../../../../i18n/use-impact-nova-i18n.js";
|
|
6
6
|
import { LazyTooltip as p } from "./lazy-tooltip.js";
|
|
7
7
|
import { InfoModal as b } from "./info-modal.js";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
import { resolveHeaderInfoParams as C } from "../resolve-header-info-params.js";
|
|
9
|
+
const h = ({
|
|
10
|
+
onClick: o,
|
|
11
|
+
className: n,
|
|
12
|
+
label: t
|
|
12
13
|
}) => {
|
|
13
|
-
const
|
|
14
|
-
a.stopPropagation(),
|
|
14
|
+
const e = (a) => {
|
|
15
|
+
a.stopPropagation(), o?.(a);
|
|
15
16
|
};
|
|
16
|
-
return /* @__PURE__ */
|
|
17
|
+
return /* @__PURE__ */ r(
|
|
17
18
|
"button",
|
|
18
19
|
{
|
|
19
20
|
type: "button",
|
|
20
|
-
"aria-label":
|
|
21
|
-
className:
|
|
21
|
+
"aria-label": t,
|
|
22
|
+
className: m(
|
|
22
23
|
"cursor-pointer flex items-center justify-center shrink-0 w-6 h-6 rounded-md transition-all duration-200 text-content-tertiary hover:bg-canvas-muted active:bg-stroke-hairline",
|
|
23
|
-
|
|
24
|
+
n
|
|
24
25
|
),
|
|
25
|
-
onClick:
|
|
26
|
-
children: /* @__PURE__ */
|
|
26
|
+
onClick: e,
|
|
27
|
+
children: /* @__PURE__ */ r(k, { size: 16, "aria-hidden": !0 })
|
|
27
28
|
}
|
|
28
29
|
);
|
|
29
|
-
},
|
|
30
|
-
content:
|
|
31
|
-
className:
|
|
32
|
-
onInfoClick:
|
|
33
|
-
label:
|
|
34
|
-
}) => /* @__PURE__ */
|
|
35
|
-
infoData:
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
30
|
+
}, y = ({
|
|
31
|
+
content: o,
|
|
32
|
+
className: n,
|
|
33
|
+
onInfoClick: t,
|
|
34
|
+
label: e
|
|
35
|
+
}) => /* @__PURE__ */ r(p, { content: o, children: /* @__PURE__ */ r(h, { onClick: t, className: n, label: e }) }), x = ({
|
|
36
|
+
infoData: o,
|
|
37
|
+
displayName: n,
|
|
38
|
+
className: t,
|
|
39
|
+
onInfoClick: e,
|
|
40
|
+
label: a
|
|
39
41
|
}) => {
|
|
40
|
-
const { t:
|
|
41
|
-
|
|
42
|
+
const { t: f } = u(), [s, c] = v(!1), i = o ?? (n ? { title: n, sections: [] } : void 0), d = (l) => {
|
|
43
|
+
l.stopPropagation(), i && c(!0);
|
|
42
44
|
};
|
|
43
|
-
return /* @__PURE__ */
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
|
|
45
|
+
return /* @__PURE__ */ I(g, { children: [
|
|
46
|
+
/* @__PURE__ */ r(p, { content: f("gridHeader.clickForDetails"), children: /* @__PURE__ */ r(
|
|
47
|
+
h,
|
|
46
48
|
{
|
|
47
|
-
label:
|
|
48
|
-
onClick: (
|
|
49
|
-
|
|
49
|
+
label: a,
|
|
50
|
+
onClick: (l) => {
|
|
51
|
+
d(l), e && e(l);
|
|
50
52
|
},
|
|
51
|
-
className:
|
|
53
|
+
className: m(
|
|
52
54
|
"hover:bg-canvas-muted hover:shadow-sm hover:text-brand-variant-hover hover:-translate-y-0.5 active:scale-95",
|
|
53
|
-
|
|
55
|
+
t
|
|
54
56
|
)
|
|
55
57
|
}
|
|
56
58
|
) }),
|
|
57
|
-
|
|
59
|
+
s && i && // Stop propagation to prevent the click from bubbling to the header group
|
|
58
60
|
// regardless of whether the modal is portaled or not.
|
|
59
|
-
/* @__PURE__ */
|
|
61
|
+
/* @__PURE__ */ r("div", { onClick: (l) => l.stopPropagation(), children: /* @__PURE__ */ r(
|
|
60
62
|
b,
|
|
61
63
|
{
|
|
62
|
-
open:
|
|
63
|
-
onClose: () =>
|
|
64
|
-
data:
|
|
64
|
+
open: s,
|
|
65
|
+
onClose: () => c(!1),
|
|
66
|
+
data: i
|
|
65
67
|
}
|
|
66
68
|
) })
|
|
67
69
|
] });
|
|
68
|
-
},
|
|
69
|
-
const {
|
|
70
|
-
showInfoIcon:
|
|
71
|
-
displayName:
|
|
70
|
+
}, z = (o) => {
|
|
71
|
+
const n = C(o, o.displayName), {
|
|
72
|
+
showInfoIcon: t,
|
|
73
|
+
displayName: e
|
|
72
74
|
} = n;
|
|
73
|
-
return !
|
|
75
|
+
return !t || !e || e.trim() === "" ? null : /* @__PURE__ */ r(N, { ...o, ...n });
|
|
74
76
|
};
|
|
75
|
-
function
|
|
76
|
-
const { t:
|
|
77
|
-
displayName:
|
|
78
|
-
displayMode:
|
|
77
|
+
function N(o) {
|
|
78
|
+
const { t: n } = u(), {
|
|
79
|
+
displayName: t,
|
|
80
|
+
displayMode: e = "tooltip",
|
|
79
81
|
infoTooltip: a,
|
|
80
|
-
infoData:
|
|
81
|
-
className:
|
|
82
|
-
onInfoClick:
|
|
83
|
-
} =
|
|
84
|
-
|
|
85
|
-
}, d = a ? `${
|
|
86
|
-
return
|
|
87
|
-
|
|
82
|
+
infoData: f,
|
|
83
|
+
className: s,
|
|
84
|
+
onInfoClick: c
|
|
85
|
+
} = o, i = () => {
|
|
86
|
+
c && c(o);
|
|
87
|
+
}, d = a ? `${t}: ${a}` : `${t} ${n("gridHeader.information")}`;
|
|
88
|
+
return e === "modal" ? /* @__PURE__ */ r(
|
|
89
|
+
x,
|
|
88
90
|
{
|
|
89
|
-
infoData:
|
|
90
|
-
|
|
91
|
-
|
|
91
|
+
infoData: f,
|
|
92
|
+
displayName: t,
|
|
93
|
+
className: s,
|
|
94
|
+
onInfoClick: i,
|
|
92
95
|
label: d
|
|
93
96
|
}
|
|
94
|
-
) : /* @__PURE__ */
|
|
95
|
-
|
|
97
|
+
) : /* @__PURE__ */ r(
|
|
98
|
+
y,
|
|
96
99
|
{
|
|
97
|
-
content: a || `Info about ${
|
|
98
|
-
className:
|
|
99
|
-
onInfoClick:
|
|
100
|
+
content: a || `Info about ${t}`,
|
|
101
|
+
className: s,
|
|
102
|
+
onInfoClick: i,
|
|
100
103
|
label: d
|
|
101
104
|
}
|
|
102
105
|
);
|
|
103
106
|
}
|
|
104
107
|
export {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
108
|
+
z as HeaderInfo,
|
|
109
|
+
h as InfoIconTrigger,
|
|
110
|
+
x as ModalInfoTrigger,
|
|
111
|
+
y as TooltipInfoTrigger
|
|
109
112
|
};
|
|
@@ -19,14 +19,6 @@ export interface GridHeaderContextValue {
|
|
|
19
19
|
closeAdvancedFilter: () => void;
|
|
20
20
|
/** Apply a new advanced filter model (updates state AND applies to grid) */
|
|
21
21
|
applyAdvancedFilter: (model: AdvancedFilterModel | null) => void;
|
|
22
|
-
/** Open column settings menu for a specific column or group */
|
|
23
|
-
openMenu: (columnId: string, anchor: HTMLElement, variant?: 'column' | 'group') => void;
|
|
24
|
-
/** Close the column settings menu */
|
|
25
|
-
closeMenu: () => void;
|
|
26
|
-
/** ID of the column that currently has the settings menu open */
|
|
27
|
-
activeMenuColumnId: string | null;
|
|
28
|
-
/** Variant of the active menu ('column' for regular columns, 'group' for column groups) */
|
|
29
|
-
activeMenuVariant: 'column' | 'group' | null;
|
|
30
22
|
}
|
|
31
23
|
export declare const GridHeaderContext: import('react').Context<GridHeaderContextValue | null>;
|
|
32
24
|
/**
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { useRef as
|
|
1
|
+
import { jsx as e, jsxs as s, Fragment as Q } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as N } from "react";
|
|
3
3
|
import { cn as f } from "../../../../lib/utils.js";
|
|
4
|
-
import { useGridHeader as
|
|
5
|
-
import { HeaderInfo as
|
|
6
|
-
import { Checkbox as
|
|
7
|
-
import { useImpactNovaI18n as
|
|
8
|
-
import { useAgGridTruncationTooltip as
|
|
9
|
-
import { useIsHeaderSearchActive as
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
import { useGridHeader as U } from "./context/grid-header-context.js";
|
|
5
|
+
import { HeaderInfo as W } from "./components/header-info.js";
|
|
6
|
+
import { Checkbox as X } from "../../../forms/checkbox/checkbox.js";
|
|
7
|
+
import { useImpactNovaI18n as y } from "../../../../i18n/use-impact-nova-i18n.js";
|
|
8
|
+
import { useAgGridTruncationTooltip as Y } from "../use-ag-grid-truncation-tooltip.js";
|
|
9
|
+
import { useIsHeaderSearchActive as $ } from "./header-search-active-state.js";
|
|
10
|
+
import { ColumnHeaderSettingsMenu as ee } from "./column-menu/column-header-settings-menu.js";
|
|
11
|
+
import { HeaderSearchInput as te } from "./header-search-input.js";
|
|
12
|
+
const re = () => /* @__PURE__ */ s(Q, { children: [
|
|
13
|
+
/* @__PURE__ */ e("span", { className: "sort-asc-icon inline-flex transition-colors text-content-tertiary hover:text-brand-variant-hover", children: /* @__PURE__ */ s(
|
|
13
14
|
"svg",
|
|
14
15
|
{
|
|
15
16
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -24,7 +25,7 @@ const te = () => /* @__PURE__ */ d(q, { children: [
|
|
|
24
25
|
]
|
|
25
26
|
}
|
|
26
27
|
) }),
|
|
27
|
-
/* @__PURE__ */ e("span", { className: "sort-desc-icon inline-flex transition-colors text-content-tertiary hover:text-brand-variant-hover", children: /* @__PURE__ */
|
|
28
|
+
/* @__PURE__ */ e("span", { className: "sort-desc-icon inline-flex transition-colors text-content-tertiary hover:text-brand-variant-hover", children: /* @__PURE__ */ s(
|
|
28
29
|
"svg",
|
|
29
30
|
{
|
|
30
31
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -52,64 +53,64 @@ const te = () => /* @__PURE__ */ d(q, { children: [
|
|
|
52
53
|
}
|
|
53
54
|
) })
|
|
54
55
|
] });
|
|
55
|
-
function
|
|
56
|
-
if (
|
|
57
|
-
const
|
|
58
|
-
if (!
|
|
56
|
+
function ne(r) {
|
|
57
|
+
if (r.getGridOption("rowModelType") === "serverSide") {
|
|
58
|
+
const h = r.getServerSideSelectionState?.();
|
|
59
|
+
if (!h || !("selectAll" in h))
|
|
59
60
|
return { isChecked: !1, isIndeterminate: !1 };
|
|
60
|
-
const { selectAll: c, toggledNodes: a } =
|
|
61
|
-
return c && !
|
|
61
|
+
const { selectAll: c, toggledNodes: a } = h, i = !!(a && a.length > 0);
|
|
62
|
+
return c && !i ? { isChecked: !0, isIndeterminate: !1 } : c && i ? { isChecked: !1, isIndeterminate: !0 } : !c && i ? { isChecked: !1, isIndeterminate: !0 } : { isChecked: !1, isIndeterminate: !1 };
|
|
62
63
|
}
|
|
63
|
-
const
|
|
64
|
-
return
|
|
64
|
+
const d = r.getSelectedRows().length, l = r.getDisplayedRowCount();
|
|
65
|
+
return d === 0 ? { isChecked: !1, isIndeterminate: !1 } : d === l && l > 0 ? { isChecked: !0, isIndeterminate: !1 } : { isChecked: !1, isIndeterminate: !0 };
|
|
65
66
|
}
|
|
66
|
-
const
|
|
67
|
-
const { t } =
|
|
67
|
+
const oe = ({ api: r }) => {
|
|
68
|
+
const { t } = y(), { isChecked: d, isIndeterminate: l } = ne(r);
|
|
68
69
|
return /* @__PURE__ */ e(
|
|
69
|
-
|
|
70
|
+
X,
|
|
70
71
|
{
|
|
71
|
-
checked: l ? "indeterminate" :
|
|
72
|
+
checked: l ? "indeterminate" : d,
|
|
72
73
|
onCheckedChange: (c) => {
|
|
73
74
|
if (c === !0) {
|
|
74
|
-
|
|
75
|
+
r.selectAll();
|
|
75
76
|
return;
|
|
76
77
|
}
|
|
77
|
-
|
|
78
|
+
r.deselectAll();
|
|
78
79
|
},
|
|
79
80
|
"aria-label": t("aria.toggleSelection"),
|
|
80
81
|
className: "m-0"
|
|
81
82
|
}
|
|
82
83
|
);
|
|
83
|
-
},
|
|
84
|
+
}, Se = (r) => {
|
|
84
85
|
const {
|
|
85
86
|
displayName: t,
|
|
86
|
-
setTooltip:
|
|
87
|
+
setTooltip: d,
|
|
87
88
|
enableSorting: l,
|
|
88
|
-
enableMenu:
|
|
89
|
+
enableMenu: h,
|
|
89
90
|
progressSort: c,
|
|
90
91
|
column: a,
|
|
91
|
-
api:
|
|
92
|
-
handleInlineSearch:
|
|
93
|
-
handleClearSearchInline:
|
|
94
|
-
onColumnSearchClick:
|
|
95
|
-
onAdvanceSearchClick:
|
|
96
|
-
toggleAdvanceSearch:
|
|
97
|
-
isSearchable:
|
|
92
|
+
api: i,
|
|
93
|
+
handleInlineSearch: M,
|
|
94
|
+
handleClearSearchInline: S,
|
|
95
|
+
onColumnSearchClick: x,
|
|
96
|
+
onAdvanceSearchClick: A,
|
|
97
|
+
toggleAdvanceSearch: F,
|
|
98
|
+
isSearchable: L = !1,
|
|
98
99
|
advanceSearchEnabled: T = !1,
|
|
99
100
|
// Select params
|
|
100
|
-
selectOptions:
|
|
101
|
-
isMultiSelect:
|
|
102
|
-
onSelectScrollToBottom:
|
|
103
|
-
onSelectSearchChange:
|
|
101
|
+
selectOptions: V,
|
|
102
|
+
isMultiSelect: D,
|
|
103
|
+
onSelectScrollToBottom: P,
|
|
104
|
+
onSelectSearchChange: _,
|
|
104
105
|
onSelectOpen: B,
|
|
105
|
-
isLoadingSelect:
|
|
106
|
+
isLoadingSelect: R,
|
|
106
107
|
// Pattern parsing options
|
|
107
|
-
enableSpaceSplitting:
|
|
108
|
-
enableBooleanParsing:
|
|
109
|
-
enableDateParsing:
|
|
110
|
-
} =
|
|
111
|
-
|
|
112
|
-
const
|
|
108
|
+
enableSpaceSplitting: Z,
|
|
109
|
+
enableBooleanParsing: j,
|
|
110
|
+
enableDateParsing: z
|
|
111
|
+
} = r, w = N(null);
|
|
112
|
+
Y(d, t ?? "", w, "ellipsis", "leaf");
|
|
113
|
+
const u = U(), { t: p } = y(), n = a.getColDef(), m = a.getColId(), C = a.isFilterActive(), E = a.getSort(), v = a.getSortIndex(), G = !!E && v != null && v > 0, g = (n?.filter || "agTextColumnFilter") === "agNumberColumnFilter" || (Array.isArray(n?.type) ? n.type.some((o) => o === "number" || o === "numericColumn") : n?.type === "number" || n?.type === "numericColumn"), b = $(m), k = N(null), H = ![
|
|
113
114
|
"agTextColumnFilter",
|
|
114
115
|
"agNumberColumnFilter",
|
|
115
116
|
"agDateColumnFilter",
|
|
@@ -119,47 +120,47 @@ const ne = ({ api: o }) => {
|
|
|
119
120
|
// Defaults to text/set
|
|
120
121
|
void 0
|
|
121
122
|
// Defaults to text
|
|
122
|
-
].includes(n?.filter),
|
|
123
|
-
|
|
124
|
-
},
|
|
125
|
-
if (
|
|
126
|
-
|
|
123
|
+
].includes(n?.filter), I = (o) => {
|
|
124
|
+
o.stopPropagation(), l && c && c(o.shiftKey);
|
|
125
|
+
}, O = (o) => {
|
|
126
|
+
if (o.stopPropagation(), x && x(r), H) {
|
|
127
|
+
i.showColumnFilter ? i.showColumnFilter(m) : i.showColumnMenu(m);
|
|
127
128
|
return;
|
|
128
129
|
}
|
|
129
|
-
|
|
130
|
-
},
|
|
131
|
-
|
|
132
|
-
},
|
|
133
|
-
|
|
130
|
+
u && (b ? u.closeSearch() : u.openSearch(m));
|
|
131
|
+
}, K = (o) => {
|
|
132
|
+
o.preventDefault(), o.stopPropagation(), k.current?.openMenu();
|
|
133
|
+
}, q = (o) => /* @__PURE__ */ e("span", { onClick: (J) => J.stopPropagation(), children: /* @__PURE__ */ e(
|
|
134
|
+
W,
|
|
134
135
|
{
|
|
135
|
-
...
|
|
136
|
-
className:
|
|
136
|
+
...r,
|
|
137
|
+
className: o
|
|
137
138
|
}
|
|
138
139
|
) });
|
|
139
|
-
return b &&
|
|
140
|
-
|
|
140
|
+
return b && u && !H ? /* @__PURE__ */ e(
|
|
141
|
+
te,
|
|
141
142
|
{
|
|
142
143
|
column: a,
|
|
143
|
-
api:
|
|
144
|
+
api: i,
|
|
144
145
|
onClose: () => {
|
|
145
|
-
|
|
146
|
+
u.closeSearch();
|
|
146
147
|
},
|
|
147
|
-
handleInlineSearch:
|
|
148
|
-
handleClearSearchInline:
|
|
149
|
-
onAdvanceSearchClick:
|
|
150
|
-
toggleAdvanceSearch:
|
|
148
|
+
handleInlineSearch: M,
|
|
149
|
+
handleClearSearchInline: S ? () => S(r) : void 0,
|
|
150
|
+
onAdvanceSearchClick: A,
|
|
151
|
+
toggleAdvanceSearch: F,
|
|
151
152
|
advanceSearchEnabled: T,
|
|
152
|
-
selectOptions:
|
|
153
|
-
isMultiSelect:
|
|
154
|
-
onSelectScrollToBottom:
|
|
155
|
-
onSelectSearchChange:
|
|
153
|
+
selectOptions: V,
|
|
154
|
+
isMultiSelect: D,
|
|
155
|
+
onSelectScrollToBottom: P,
|
|
156
|
+
onSelectSearchChange: _,
|
|
156
157
|
onSelectOpen: B,
|
|
157
|
-
isLoadingSelect:
|
|
158
|
-
enableSpaceSplitting:
|
|
159
|
-
enableBooleanParsing:
|
|
160
|
-
enableDateParsing:
|
|
158
|
+
isLoadingSelect: R,
|
|
159
|
+
enableSpaceSplitting: Z,
|
|
160
|
+
enableBooleanParsing: j,
|
|
161
|
+
enableDateParsing: z
|
|
161
162
|
}
|
|
162
|
-
) : /* @__PURE__ */
|
|
163
|
+
) : /* @__PURE__ */ s(
|
|
163
164
|
"div",
|
|
164
165
|
{
|
|
165
166
|
className: f(
|
|
@@ -169,32 +170,33 @@ const ne = ({ api: o }) => {
|
|
|
169
170
|
n?.headerCheckboxSelection && (!t || t.trim() === "") ? "justify-center" : ""
|
|
170
171
|
),
|
|
171
172
|
"data-selection-column": n?.headerCheckboxSelection && (!t || t.trim() === "") ? "true" : void 0,
|
|
172
|
-
onContextMenu:
|
|
173
|
+
onContextMenu: K,
|
|
173
174
|
children: [
|
|
174
|
-
/* @__PURE__ */
|
|
175
|
+
/* @__PURE__ */ s(
|
|
175
176
|
"div",
|
|
176
177
|
{
|
|
177
178
|
className: f(
|
|
178
|
-
"ag-header-cell-text relative group flex min-w-0",
|
|
179
|
-
// Use items-start for non-numeric to allow 2-line text expansion
|
|
180
|
-
g ? "items-center" : "items-start",
|
|
181
|
-
// Remove flex-1 if we are centering via parent's justify-center
|
|
182
|
-
!(n?.headerCheckboxSelection && (!t || t.trim() === "")) && "flex-1",
|
|
179
|
+
"ag-header-cell-text relative group flex min-w-0 items-center",
|
|
183
180
|
g ? "flex-row-reverse" : "flex-row",
|
|
181
|
+
!(n?.headerCheckboxSelection && (!t || t.trim() === "")) && "flex-1",
|
|
184
182
|
l ? "sortable cursor-pointer" : ""
|
|
185
183
|
),
|
|
186
|
-
onClick: l ?
|
|
187
|
-
children:
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
184
|
+
onClick: l ? I : void 0,
|
|
185
|
+
children: [
|
|
186
|
+
n?.headerCheckboxSelection && /* @__PURE__ */ e(oe, { api: i }),
|
|
187
|
+
t && t.trim() !== "" && t !== p("gridHeader.selection") && /* @__PURE__ */ s("div", { className: f(
|
|
188
|
+
"ag-grid-header-label-cluster",
|
|
189
|
+
g && "flex-row-reverse"
|
|
190
|
+
), children: [
|
|
191
|
+
/* @__PURE__ */ e("span", { ref: w, className: "ag-grid-header-label-text", children: t }),
|
|
192
|
+
q(
|
|
193
|
+
"shrink-0 text-content-tertiary hover:text-brand-variant-hover transition-colors"
|
|
194
|
+
)
|
|
195
|
+
] })
|
|
196
|
+
]
|
|
195
197
|
}
|
|
196
198
|
),
|
|
197
|
-
!(n?.headerCheckboxSelection && (!t || t.trim() === "")) && /* @__PURE__ */
|
|
199
|
+
!(n?.headerCheckboxSelection && (!t || t.trim() === "")) && /* @__PURE__ */ s(
|
|
198
200
|
"div",
|
|
199
201
|
{
|
|
200
202
|
className: f(
|
|
@@ -202,49 +204,41 @@ const ne = ({ api: o }) => {
|
|
|
202
204
|
g ? "flex-row-reverse" : "flex-row"
|
|
203
205
|
),
|
|
204
206
|
children: [
|
|
205
|
-
|
|
206
|
-
"text-content-tertiary hover:text-brand-variant-hover transition-colors"
|
|
207
|
-
),
|
|
208
|
-
l && /* @__PURE__ */ d(
|
|
207
|
+
l && /* @__PURE__ */ s(
|
|
209
208
|
"div",
|
|
210
209
|
{
|
|
211
210
|
className: "ag-sort-indicator-container cursor-pointer flex items-center",
|
|
212
|
-
onClick:
|
|
211
|
+
onClick: I,
|
|
213
212
|
children: [
|
|
214
|
-
|
|
215
|
-
/* @__PURE__ */ e("span", { className: "ag-sort-indicator-icon", children: /* @__PURE__ */ e(
|
|
213
|
+
G && /* @__PURE__ */ e("span", { className: "ag-sort-order text-[10px] font-bold text-content-tertiary mr-0.5", children: v + 1 }),
|
|
214
|
+
/* @__PURE__ */ e("span", { className: "ag-sort-indicator-icon", children: /* @__PURE__ */ e(re, {}) })
|
|
216
215
|
]
|
|
217
216
|
}
|
|
218
217
|
),
|
|
219
|
-
|
|
218
|
+
L && /* @__PURE__ */ s(
|
|
220
219
|
"span",
|
|
221
220
|
{
|
|
222
221
|
className: f(
|
|
223
222
|
"relative cursor-pointer flex items-center shrink-0 duration-200 text-content-tertiary hover:text-brand-variant-hover transition-colors",
|
|
224
|
-
|
|
223
|
+
C ? "opacity-100 w-auto" : "opacity-0 w-0 overflow-hidden group-hover:opacity-100 group-hover:w-auto"
|
|
225
224
|
),
|
|
226
|
-
onClick:
|
|
227
|
-
title: C
|
|
225
|
+
onClick: O,
|
|
226
|
+
title: p(C ? "gridHeader.activeFilter" : "gridHeader.search"),
|
|
228
227
|
children: [
|
|
229
228
|
/* @__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" }) }),
|
|
230
|
-
|
|
229
|
+
C && /* @__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" })
|
|
231
230
|
]
|
|
232
231
|
}
|
|
233
232
|
),
|
|
234
|
-
|
|
235
|
-
|
|
233
|
+
h && !("suppressHeaderMenuButton" in (n ?? {}) && n.suppressHeaderMenuButton) && /* @__PURE__ */ e(
|
|
234
|
+
ee,
|
|
236
235
|
{
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
"aria-label": `${t} ${C("gridHeader.columnSettings")}`,
|
|
242
|
-
onClick: (r) => {
|
|
243
|
-
r.stopPropagation(), i && i.openMenu(h, r.currentTarget);
|
|
244
|
-
},
|
|
245
|
-
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" }) })
|
|
236
|
+
ref: k,
|
|
237
|
+
columnId: m,
|
|
238
|
+
gridApi: i,
|
|
239
|
+
displayName: t
|
|
246
240
|
}
|
|
247
|
-
)
|
|
241
|
+
)
|
|
248
242
|
]
|
|
249
243
|
}
|
|
250
244
|
)
|
|
@@ -253,5 +247,5 @@ const ne = ({ api: o }) => {
|
|
|
253
247
|
);
|
|
254
248
|
};
|
|
255
249
|
export {
|
|
256
|
-
|
|
250
|
+
Se as CustomHeader
|
|
257
251
|
};
|
|
@@ -1,31 +1,35 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { HeaderInfo as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
function
|
|
7
|
-
const { displayName:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
};
|
|
15
|
-
return !e && u === !1 ? null : /* @__PURE__ */ c("div", { className: "flex w-full min-w-0 items-center overflow-hidden", children: [
|
|
16
|
-
/* @__PURE__ */ a(
|
|
17
|
-
"span",
|
|
1
|
+
import { jsxs as d, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as p } from "react";
|
|
3
|
+
import { HeaderInfo as m } from "./components/header-info.js";
|
|
4
|
+
import { useAgGridTruncationTooltip as c } from "../use-ag-grid-truncation-tooltip.js";
|
|
5
|
+
import { ColumnGroupSettingsMenu as f } from "./column-menu/column-header-settings-menu.js";
|
|
6
|
+
function I(t) {
|
|
7
|
+
const { displayName: a, setTooltip: l, showInfoIcon: s = !1, columnGroup: i, api: u } = t, r = p(null), e = a || "";
|
|
8
|
+
if (c(l, e, r, "ellipsis", "group"), !e && s === !1)
|
|
9
|
+
return null;
|
|
10
|
+
const n = i?.getGroupId();
|
|
11
|
+
return /* @__PURE__ */ d("div", { className: "ag-grid-header-label-cluster", children: [
|
|
12
|
+
n ? /* @__PURE__ */ o(
|
|
13
|
+
f,
|
|
18
14
|
{
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
columnGroupId: n,
|
|
16
|
+
gridApi: u,
|
|
17
|
+
headerLabelRef: r,
|
|
18
|
+
children: e
|
|
19
|
+
}
|
|
20
|
+
) : /* @__PURE__ */ o(
|
|
21
|
+
"button",
|
|
22
|
+
{
|
|
23
|
+
type: "button",
|
|
24
|
+
ref: r,
|
|
25
|
+
className: "ag-grid-header-label-text border-0 bg-transparent p-0 text-left font-bold text-content",
|
|
22
26
|
children: e
|
|
23
27
|
}
|
|
24
28
|
),
|
|
25
|
-
/* @__PURE__ */
|
|
29
|
+
/* @__PURE__ */ o(m, { ...t, className: "shrink-0" })
|
|
26
30
|
] });
|
|
27
31
|
}
|
|
28
32
|
export {
|
|
29
|
-
|
|
30
|
-
|
|
33
|
+
I as CustomHeaderGroup,
|
|
34
|
+
I as CustomInnerHeaderGroup
|
|
31
35
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ExtendedHeaderComponentParams, InfoContent } from '../ag-grid.types';
|
|
2
|
+
type RawHeaderParams = ExtendedHeaderComponentParams & {
|
|
3
|
+
displayType?: string;
|
|
4
|
+
content?: InfoContent | {
|
|
5
|
+
sections?: InfoContent['sections'];
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
/** Normalize legacy + minimal header info params for CustomHeader / CustomInnerHeaderGroup. */
|
|
9
|
+
export declare function resolveHeaderInfoParams(headerParams: RawHeaderParams, displayName?: string): ExtendedHeaderComponentParams;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
function e(o, i) {
|
|
2
|
+
if (!(!o || typeof o != "object") && "sections" in o && Array.isArray(o.sections))
|
|
3
|
+
return {
|
|
4
|
+
title: "title" in o && typeof o.title == "string" ? o.title : i,
|
|
5
|
+
sections: o.sections
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
function f(o, i) {
|
|
9
|
+
const n = o.displayMode ?? (o.displayType === "tooltip" || o.displayType === "modal" ? o.displayType : void 0), t = o.infoData ?? e(o.content, i), l = !!o.infoTooltip?.trim(), s = !!(t?.sections?.length || t?.title), c = o.showInfoIcon === !0 || o.showInfoIcon !== !1 && (s || l);
|
|
10
|
+
return {
|
|
11
|
+
...o,
|
|
12
|
+
displayMode: n ?? o.displayMode ?? "tooltip",
|
|
13
|
+
infoData: t,
|
|
14
|
+
showInfoIcon: c
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
f as resolveHeaderInfoParams
|
|
19
|
+
};
|