impact-nova 1.3.0 → 1.5.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/README.md +49 -0
- package/dist/components/layout/dashboard-layout.d.ts +15 -1
- package/dist/components/ui/accordion-nested-list/accordion-nested-list.js +65 -64
- package/dist/components/ui/accordion.js +38 -34
- package/dist/components/ui/ag-grid-react/cell-renderers/badge-cell-renderer.js +1 -1
- package/dist/components/ui/ag-grid-react/cell-renderers/cell-renderer-utils.d.ts +58 -0
- package/dist/components/ui/ag-grid-react/cell-renderers/cell-renderer-utils.js +104 -0
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/input-cell-editor.js +62 -54
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.d.ts +4 -6
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.js +54 -68
- package/dist/components/ui/ag-grid-react/cell-renderers/index.d.ts +3 -1
- package/dist/components/ui/ag-grid-react/cell-renderers/index.js +33 -27
- package/dist/components/ui/ag-grid-react/cell-renderers/input-display-renderer.d.ts +3 -0
- package/dist/components/ui/ag-grid-react/cell-renderers/input-display-renderer.js +28 -12
- package/dist/components/ui/ag-grid-react/cell-renderers/link-with-batch-cell-renderer.d.ts +2 -0
- package/dist/components/ui/ag-grid-react/cell-renderers/link-with-batch-cell-renderer.js +45 -44
- package/dist/components/ui/ag-grid-react/cell-renderers/split-cell-renderer.d.ts +4 -6
- package/dist/components/ui/ag-grid-react/cell-renderers/split-cell-renderer.js +23 -37
- package/dist/components/ui/ag-grid-react/cell-renderers/types.d.ts +33 -17
- package/dist/components/ui/ag-grid-react/editable-utils.d.ts +27 -0
- package/dist/components/ui/ag-grid-react/editable-utils.js +62 -0
- package/dist/components/ui/ag-grid-react/headers/advanced-filter/advanced-filter-dialog.js +99 -98
- package/dist/components/ui/ag-grid-react/headers/advanced-filter/column-filter-section.js +110 -143
- package/dist/components/ui/ag-grid-react/headers/column-menu/column-settings-menu.js +72 -69
- package/dist/components/ui/ag-grid-react/headers/components/header-info.js +36 -35
- package/dist/components/ui/ag-grid-react/headers/components/info-modal.js +14 -12
- package/dist/components/ui/ag-grid-react/headers/custom-header.js +111 -110
- package/dist/components/ui/ag-grid-react/headers/header-search-input.js +204 -203
- package/dist/components/ui/alert.js +62 -58
- package/dist/components/ui/breadcrumb.js +81 -74
- package/dist/components/ui/calendar.js +354 -354
- package/dist/components/ui/chart/chart.js +63 -62
- package/dist/components/ui/chips.js +42 -38
- package/dist/components/ui/command-palette/command-palette-context.d.ts +52 -0
- package/dist/components/ui/command-palette/command-palette-context.js +110 -0
- package/dist/components/ui/command-palette/command-palette.d.ts +67 -0
- package/dist/components/ui/command-palette/command-palette.js +402 -0
- package/dist/components/ui/command-palette/index.d.ts +23 -0
- package/dist/components/ui/command-palette/index.js +44 -0
- package/dist/components/ui/command-palette/kbd.d.ts +28 -0
- package/dist/components/ui/command-palette/kbd.js +52 -0
- package/dist/components/ui/command-palette/shortcut-registry.d.ts +68 -0
- package/dist/components/ui/command-palette/shortcut-registry.js +183 -0
- package/dist/components/ui/command-palette/shortcut-scope-provider.d.ts +55 -0
- package/dist/components/ui/command-palette/shortcut-scope-provider.js +55 -0
- package/dist/components/ui/command-palette/shortcut-settings.d.ts +27 -0
- package/dist/components/ui/command-palette/shortcut-settings.js +266 -0
- package/dist/components/ui/command-palette/use-browser-shortcuts.d.ts +32 -0
- package/dist/components/ui/command-palette/use-browser-shortcuts.js +48 -0
- package/dist/components/ui/command-palette/use-global-shortcut.d.ts +3 -0
- package/dist/components/ui/command-palette/use-global-shortcut.js +7 -0
- package/dist/components/ui/command-palette/use-shortcut.d.ts +47 -0
- package/dist/components/ui/command-palette/use-shortcut.js +49 -0
- package/dist/components/ui/command-palette/utils.d.ts +119 -0
- package/dist/components/ui/command-palette/utils.js +248 -0
- package/dist/components/ui/data-table/data-table-column-list.js +87 -86
- package/dist/components/ui/data-table/data-table-format-options.js +45 -44
- package/dist/components/ui/data-table/data-table-view-options.js +39 -38
- package/dist/components/ui/date-picker/date-picker.js +89 -87
- package/dist/components/ui/date-picker/date-range-picker.js +140 -138
- package/dist/components/ui/date-picker/month-picker.js +82 -81
- package/dist/components/ui/date-picker/month-range-picker.js +108 -105
- package/dist/components/ui/date-picker/multi-date-picker.js +68 -66
- package/dist/components/ui/date-picker/multi-month-picker.js +59 -58
- package/dist/components/ui/date-picker/multi-week-picker.js +80 -78
- package/dist/components/ui/date-picker/week-picker.js +117 -115
- package/dist/components/ui/date-picker/week-range-picker.js +166 -164
- package/dist/components/ui/dialog.js +78 -73
- package/dist/components/ui/drawer.js +71 -66
- package/dist/components/ui/file-upload.js +131 -127
- package/dist/components/ui/filter-panel/filter-panel.js +98 -94
- package/dist/components/ui/filter-strip/filter-strip.js +95 -91
- package/dist/components/ui/filter-strip/filter-summary.js +91 -90
- package/dist/components/ui/header.js +57 -53
- package/dist/components/ui/horizontal-scroller/horizontal-scroller.js +78 -76
- package/dist/components/ui/loader.js +17 -16
- package/dist/components/ui/nested-list/components/NestedListHeader.d.ts +1 -0
- package/dist/components/ui/nested-list/components/NestedListHeader.js +51 -48
- package/dist/components/ui/nested-list/components/SortableItem.js +60 -59
- package/dist/components/ui/nested-list/nested-list.js +184 -182
- package/dist/components/ui/notification-panel/notification-panel.js +60 -53
- package/dist/components/ui/popover.js +45 -40
- package/dist/components/ui/prompt.js +90 -86
- package/dist/components/ui/select/select.js +206 -209
- package/dist/components/ui/sheet.d.ts +1 -0
- package/dist/components/ui/sheet.js +50 -48
- package/dist/components/ui/sidebar.js +273 -267
- package/dist/components/ui/stepper.js +75 -63
- package/dist/components/ui/tag.js +48 -44
- package/dist/components/ui/toast.js +46 -41
- package/dist/i18n/ImpactNovaI18nContext.d.ts +21 -0
- package/dist/i18n/ImpactNovaI18nContext.js +76 -0
- package/dist/i18n/defaultMessages.d.ts +231 -0
- package/dist/i18n/defaultMessages.js +206 -0
- package/dist/i18n/getDateFnsLocale.d.ts +11 -0
- package/dist/i18n/getDateFnsLocale.js +21 -0
- package/dist/i18n/index.d.ts +5 -0
- package/dist/i18n/locales/de.d.ts +2 -0
- package/dist/i18n/locales/de.js +206 -0
- package/dist/i18n/locales/es.d.ts +2 -0
- package/dist/i18n/locales/es.js +206 -0
- package/dist/i18n/locales/hi.d.ts +2 -0
- package/dist/i18n/locales/hi.js +206 -0
- package/dist/i18n/locales/index.d.ts +4 -0
- package/dist/i18n/locales/kn.d.ts +2 -0
- package/dist/i18n/locales/kn.js +206 -0
- package/dist/icons/assets/boxAdd.svg.js +5 -0
- package/dist/icons/assets/boxed.svg.js +5 -0
- package/dist/icons/assets/trolley.svg.js +5 -0
- package/dist/icons/assets/unlocked.svg.js +5 -0
- package/dist/icons/index.d.ts +4 -0
- package/dist/icons/index.js +179 -171
- package/dist/impact-nova.css +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +232 -172
- package/package.json +36 -4
- package/dist/components/ui/ag-grid-react/cell-renderers/types.js +0 -74
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
1
|
+
import { jsx as n, jsxs as p, Fragment as h } from "react/jsx-runtime";
|
|
2
|
+
import { useState as I } from "react";
|
|
3
3
|
import { cn as f } from "../../../../../lib/utils.js";
|
|
4
|
-
import { Info as
|
|
5
|
-
import { LazyTooltip as
|
|
4
|
+
import { Info as u } from "../../../../../icons/index.js";
|
|
5
|
+
import { LazyTooltip as m } from "./lazy-tooltip.js";
|
|
6
6
|
import { InfoModal as g } from "./info-modal.js";
|
|
7
|
-
|
|
7
|
+
import { useImpactNovaI18n as k } from "../../../../../i18n/ImpactNovaI18nContext.js";
|
|
8
|
+
const d = ({ onClick: t, className: r }) => {
|
|
8
9
|
const o = (i) => {
|
|
9
|
-
i.stopPropagation(),
|
|
10
|
+
i.stopPropagation(), t && t(i);
|
|
10
11
|
};
|
|
11
|
-
return /* @__PURE__ */
|
|
12
|
+
return /* @__PURE__ */ n(
|
|
12
13
|
"span",
|
|
13
14
|
{
|
|
14
15
|
className: f(
|
|
@@ -17,24 +18,24 @@ const m = ({ onClick: n, className: r }) => {
|
|
|
17
18
|
),
|
|
18
19
|
onClick: o,
|
|
19
20
|
role: "button",
|
|
20
|
-
children: /* @__PURE__ */
|
|
21
|
+
children: /* @__PURE__ */ n(u, { size: 16 })
|
|
21
22
|
}
|
|
22
23
|
);
|
|
23
24
|
}, C = ({
|
|
24
|
-
content:
|
|
25
|
+
content: t,
|
|
25
26
|
className: r,
|
|
26
27
|
onInfoClick: o
|
|
27
|
-
}) => /* @__PURE__ */
|
|
28
|
-
infoData:
|
|
28
|
+
}) => /* @__PURE__ */ n(m, { content: t, children: /* @__PURE__ */ n(d, { onClick: o, className: r }) }), v = ({
|
|
29
|
+
infoData: t,
|
|
29
30
|
className: r,
|
|
30
31
|
onInfoClick: o
|
|
31
32
|
}) => {
|
|
32
|
-
const
|
|
33
|
-
e.stopPropagation(),
|
|
33
|
+
const { t: i } = k(), [a, s] = I(!1), l = (e) => {
|
|
34
|
+
e.stopPropagation(), s(!0);
|
|
34
35
|
};
|
|
35
36
|
return /* @__PURE__ */ p(h, { children: [
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
|
|
37
|
+
/* @__PURE__ */ n(m, { content: i("gridHeader.clickForDetails"), children: /* @__PURE__ */ n(
|
|
38
|
+
d,
|
|
38
39
|
{
|
|
39
40
|
onClick: (e) => {
|
|
40
41
|
l(e), o && o(e);
|
|
@@ -45,51 +46,51 @@ const m = ({ onClick: n, className: r }) => {
|
|
|
45
46
|
)
|
|
46
47
|
}
|
|
47
48
|
) }),
|
|
48
|
-
|
|
49
|
+
a && t && // Stop propagation to prevent the click from bubbling to the header group
|
|
49
50
|
// regardless of whether the modal is portaled or not.
|
|
50
|
-
/* @__PURE__ */
|
|
51
|
+
/* @__PURE__ */ n("div", { onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ n(
|
|
51
52
|
g,
|
|
52
53
|
{
|
|
53
|
-
open:
|
|
54
|
-
onClose: () =>
|
|
55
|
-
data:
|
|
54
|
+
open: a,
|
|
55
|
+
onClose: () => s(!1),
|
|
56
|
+
data: t
|
|
56
57
|
}
|
|
57
58
|
) })
|
|
58
59
|
] });
|
|
59
|
-
},
|
|
60
|
+
}, M = (t) => {
|
|
60
61
|
const {
|
|
61
62
|
showInfoIcon: r,
|
|
62
63
|
displayName: o,
|
|
63
64
|
displayMode: i = "tooltip",
|
|
64
65
|
infoTooltip: a,
|
|
65
|
-
infoData:
|
|
66
|
-
className:
|
|
67
|
-
onInfoClick:
|
|
68
|
-
} =
|
|
66
|
+
infoData: s,
|
|
67
|
+
className: l,
|
|
68
|
+
onInfoClick: e
|
|
69
|
+
} = t;
|
|
69
70
|
if (!r || !o || o.trim() === "") return null;
|
|
70
71
|
const c = () => {
|
|
71
|
-
|
|
72
|
+
e && e(t);
|
|
72
73
|
};
|
|
73
|
-
return i === "modal" ? /* @__PURE__ */
|
|
74
|
-
|
|
74
|
+
return i === "modal" ? /* @__PURE__ */ n(
|
|
75
|
+
v,
|
|
75
76
|
{
|
|
76
|
-
infoData:
|
|
77
|
+
infoData: s,
|
|
77
78
|
displayName: o,
|
|
78
|
-
className:
|
|
79
|
+
className: l,
|
|
79
80
|
onInfoClick: c
|
|
80
81
|
}
|
|
81
|
-
) : /* @__PURE__ */
|
|
82
|
+
) : /* @__PURE__ */ n(
|
|
82
83
|
C,
|
|
83
84
|
{
|
|
84
85
|
content: a || `Info about ${o}`,
|
|
85
|
-
className:
|
|
86
|
+
className: l,
|
|
86
87
|
onInfoClick: c
|
|
87
88
|
}
|
|
88
89
|
);
|
|
89
90
|
};
|
|
90
91
|
export {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
92
|
+
M as HeaderInfo,
|
|
93
|
+
d as InfoIconTrigger,
|
|
94
|
+
v as ModalInfoTrigger,
|
|
94
95
|
C as TooltipInfoTrigger
|
|
95
96
|
};
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { Dialog as
|
|
4
|
-
import { SectionRenderer as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
import { Dialog as c, DialogContent as p, DialogHeader as d, DialogTitle as g, DialogBody as f } from "../../../dialog.js";
|
|
4
|
+
import { SectionRenderer as h } from "./section-renderers.js";
|
|
5
|
+
import { useImpactNovaI18n as x } from "../../../../../i18n/ImpactNovaI18nContext.js";
|
|
6
|
+
const H = ({ open: a, onClose: l, data: r }) => {
|
|
7
|
+
const { t } = x();
|
|
8
|
+
if (!r) return null;
|
|
9
|
+
const { title: m, sections: n = [] } = r;
|
|
10
|
+
return /* @__PURE__ */ e(c, { open: a, onOpenChange: (o) => !o && l(), children: /* @__PURE__ */ i(p, { className: "max-w-2xl", children: [
|
|
11
|
+
/* @__PURE__ */ e(d, { children: /* @__PURE__ */ e(g, { children: m || t("gridHeader.information") }) }),
|
|
12
|
+
/* @__PURE__ */ i(f, { className: "space-y-6 py-8", children: [
|
|
13
|
+
n.map((o, s) => /* @__PURE__ */ e(h, { section: o }, `${o.type}-${s}`)),
|
|
14
|
+
n.length === 0 && /* @__PURE__ */ e("p", { className: "text-sm text-slate-500 text-center py-4", children: t("gridHeader.noInformationAvailable") })
|
|
13
15
|
] })
|
|
14
16
|
] }) });
|
|
15
17
|
};
|
|
16
18
|
export {
|
|
17
|
-
|
|
19
|
+
H as InfoModal
|
|
18
20
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { jsx as e, jsxs as h, Fragment as A } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { useGridHeader as
|
|
5
|
-
import { HeaderInfo as
|
|
6
|
-
import { Checkbox as
|
|
7
|
-
import { HeaderSearchInput as
|
|
8
|
-
|
|
2
|
+
import { useState as F, useEffect as J } from "react";
|
|
3
|
+
import { cn as C } from "../../../../lib/utils.js";
|
|
4
|
+
import { useGridHeader as Q } from "./context/grid-header-context.js";
|
|
5
|
+
import { HeaderInfo as W } from "./components/header-info.js";
|
|
6
|
+
import { Checkbox as X } from "../../checkbox.js";
|
|
7
|
+
import { HeaderSearchInput as Y } from "./header-search-input.js";
|
|
8
|
+
import { useImpactNovaI18n as V } from "../../../../i18n/ImpactNovaI18nContext.js";
|
|
9
|
+
const $ = () => /* @__PURE__ */ h(A, { children: [
|
|
9
10
|
/* @__PURE__ */ e("span", { className: "sort-asc-icon inline-flex transition-colors text-[#60697D] hover:text-[#3649C6]", children: /* @__PURE__ */ h(
|
|
10
11
|
"svg",
|
|
11
12
|
{
|
|
@@ -48,75 +49,75 @@ const X = () => /* @__PURE__ */ h(A, { children: [
|
|
|
48
49
|
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
50
|
}
|
|
50
51
|
) })
|
|
51
|
-
] }),
|
|
52
|
-
const
|
|
53
|
-
|
|
52
|
+
] }), ee = ({ api: r }) => {
|
|
53
|
+
const { t } = V(), [g, N] = F(!1), [S, c] = F(!1);
|
|
54
|
+
J(() => {
|
|
54
55
|
if (!r) return;
|
|
55
|
-
const
|
|
56
|
-
let
|
|
57
|
-
if (
|
|
58
|
-
const
|
|
59
|
-
if (
|
|
60
|
-
const { selectAll: a, toggledNodes:
|
|
61
|
-
a && !
|
|
56
|
+
const u = r.getGridOption?.("rowModelType") === "serverSide", v = () => {
|
|
57
|
+
let n = !1, i = !1;
|
|
58
|
+
if (u) {
|
|
59
|
+
const f = r.getServerSideSelectionState?.();
|
|
60
|
+
if (f) {
|
|
61
|
+
const { selectAll: a, toggledNodes: b } = f, x = b && b.length > 0;
|
|
62
|
+
a && !x ? (n = !0, i = !1) : a && x || !a && x ? (n = !1, i = !0) : (n = !1, i = !1);
|
|
62
63
|
}
|
|
63
64
|
} else {
|
|
64
|
-
const
|
|
65
|
-
|
|
65
|
+
const f = r.getSelectedRows().length, a = r.getDisplayedRowCount();
|
|
66
|
+
f === 0 ? (n = !1, i = !1) : f === a && a > 0 ? (n = !0, i = !1) : (n = !1, i = !0);
|
|
66
67
|
}
|
|
67
|
-
|
|
68
|
+
N(n), c(i);
|
|
68
69
|
};
|
|
69
|
-
|
|
70
|
-
const
|
|
71
|
-
|
|
70
|
+
v();
|
|
71
|
+
const m = () => {
|
|
72
|
+
v();
|
|
72
73
|
};
|
|
73
|
-
return r.addEventListener("selectionChanged",
|
|
74
|
-
r.removeEventListener("selectionChanged",
|
|
74
|
+
return r.addEventListener("selectionChanged", m), r.addEventListener("modelUpdated", m), () => {
|
|
75
|
+
r.removeEventListener("selectionChanged", m), r.removeEventListener("modelUpdated", m);
|
|
75
76
|
};
|
|
76
77
|
}, [r]);
|
|
77
|
-
const
|
|
78
|
-
|
|
78
|
+
const s = (u) => {
|
|
79
|
+
u === !0 ? r.selectAll() : r.deselectAll();
|
|
79
80
|
};
|
|
80
81
|
return /* @__PURE__ */ e(A, { children: /* @__PURE__ */ e(
|
|
81
|
-
|
|
82
|
+
X,
|
|
82
83
|
{
|
|
83
|
-
checked:
|
|
84
|
-
onCheckedChange: (
|
|
85
|
-
|
|
84
|
+
checked: S ? "indeterminate" : g,
|
|
85
|
+
onCheckedChange: (u) => {
|
|
86
|
+
s(u);
|
|
86
87
|
},
|
|
87
|
-
"aria-label": "
|
|
88
|
+
"aria-label": t("aria.toggleSelection"),
|
|
88
89
|
className: "m-0"
|
|
89
90
|
}
|
|
90
91
|
) });
|
|
91
|
-
},
|
|
92
|
+
}, de = (r) => {
|
|
92
93
|
const {
|
|
93
94
|
displayName: t,
|
|
94
|
-
enableSorting:
|
|
95
|
-
enableMenu:
|
|
96
|
-
progressSort:
|
|
95
|
+
enableSorting: g,
|
|
96
|
+
enableMenu: N,
|
|
97
|
+
progressSort: S,
|
|
97
98
|
column: c,
|
|
98
|
-
api:
|
|
99
|
-
handleInlineSearch:
|
|
100
|
-
handleClearSearchInline:
|
|
101
|
-
onColumnSearchClick:
|
|
102
|
-
onAdvanceSearchClick:
|
|
103
|
-
toggleAdvanceSearch:
|
|
104
|
-
isSearchable:
|
|
105
|
-
advanceSearchEnabled:
|
|
99
|
+
api: s,
|
|
100
|
+
handleInlineSearch: u,
|
|
101
|
+
handleClearSearchInline: v,
|
|
102
|
+
onColumnSearchClick: m,
|
|
103
|
+
onAdvanceSearchClick: n,
|
|
104
|
+
toggleAdvanceSearch: i,
|
|
105
|
+
isSearchable: f = !1,
|
|
106
|
+
advanceSearchEnabled: a = !1,
|
|
106
107
|
// Select params
|
|
107
|
-
selectOptions:
|
|
108
|
-
isMultiSelect:
|
|
109
|
-
onSelectScrollToBottom:
|
|
110
|
-
onSelectSearchChange:
|
|
111
|
-
onSelectOpen:
|
|
112
|
-
isLoadingSelect:
|
|
108
|
+
selectOptions: b,
|
|
109
|
+
isMultiSelect: x,
|
|
110
|
+
onSelectScrollToBottom: T,
|
|
111
|
+
onSelectSearchChange: P,
|
|
112
|
+
onSelectOpen: _,
|
|
113
|
+
isLoadingSelect: Z,
|
|
113
114
|
// Pattern parsing options
|
|
114
|
-
enableSpaceSplitting:
|
|
115
|
-
enableBooleanParsing:
|
|
116
|
-
enableDateParsing:
|
|
117
|
-
} = r, d =
|
|
118
|
-
|
|
119
|
-
const
|
|
115
|
+
enableSpaceSplitting: B,
|
|
116
|
+
enableBooleanParsing: E,
|
|
117
|
+
enableDateParsing: R
|
|
118
|
+
} = r, d = Q(), { t: k } = V(), o = c.getColDef(), p = c.getColId(), y = c.isFilterActive(), j = c.getSort(), H = c.getSortIndex(), O = !!j, z = H != null && (H > 0 || s.getColumnState().filter((l) => l.sort).length > 1), G = O && z, I = o?.filter || "agTextColumnFilter", w = I === "agNumberColumnFilter" || (Array.isArray(o?.type) ? o.type.some((l) => l === "number" || l === "numericColumn") : o?.type === "number" || o?.type === "numericColumn");
|
|
119
|
+
I === "agDateColumnFilter" || (Array.isArray(o?.type) ? o.type.includes("dateColumn") : o?.type);
|
|
120
|
+
const L = s.getGridOption("context")?.activeSearchColumnId === p, M = ![
|
|
120
121
|
"agTextColumnFilter",
|
|
121
122
|
"agNumberColumnFilter",
|
|
122
123
|
"agDateColumnFilter",
|
|
@@ -126,48 +127,48 @@ const X = () => /* @__PURE__ */ h(A, { children: [
|
|
|
126
127
|
// Defaults to text/set
|
|
127
128
|
void 0
|
|
128
129
|
// Defaults to text
|
|
129
|
-
].includes(o?.filter),
|
|
130
|
-
l.stopPropagation(),
|
|
131
|
-
},
|
|
132
|
-
if (l.stopPropagation(),
|
|
133
|
-
|
|
130
|
+
].includes(o?.filter), D = (l) => {
|
|
131
|
+
l.stopPropagation(), g && S && S(l.shiftKey);
|
|
132
|
+
}, U = (l) => {
|
|
133
|
+
if (l.stopPropagation(), m && m(r), M) {
|
|
134
|
+
s.showColumnFilter ? s.showColumnFilter(p) : s.showColumnMenu(p);
|
|
134
135
|
return;
|
|
135
136
|
}
|
|
136
|
-
d && (
|
|
137
|
-
},
|
|
138
|
-
|
|
137
|
+
d && (L ? d.closeSearch() : d.openSearch(p));
|
|
138
|
+
}, K = (l) => /* @__PURE__ */ e("span", { onClick: (q) => q.stopPropagation(), children: /* @__PURE__ */ e(
|
|
139
|
+
W,
|
|
139
140
|
{
|
|
140
141
|
...r,
|
|
141
142
|
className: l
|
|
142
143
|
}
|
|
143
144
|
) });
|
|
144
|
-
return
|
|
145
|
-
|
|
145
|
+
return L && d && !M ? /* @__PURE__ */ e(
|
|
146
|
+
Y,
|
|
146
147
|
{
|
|
147
148
|
column: c,
|
|
148
|
-
api:
|
|
149
|
+
api: s,
|
|
149
150
|
onClose: () => d.closeSearch(),
|
|
150
|
-
handleInlineSearch:
|
|
151
|
-
handleClearSearchInline:
|
|
152
|
-
onAdvanceSearchClick:
|
|
153
|
-
toggleAdvanceSearch:
|
|
154
|
-
advanceSearchEnabled:
|
|
155
|
-
selectOptions:
|
|
156
|
-
isMultiSelect:
|
|
157
|
-
onSelectScrollToBottom:
|
|
158
|
-
onSelectSearchChange:
|
|
159
|
-
onSelectOpen:
|
|
160
|
-
isLoadingSelect:
|
|
161
|
-
enableSpaceSplitting:
|
|
162
|
-
enableBooleanParsing:
|
|
163
|
-
enableDateParsing:
|
|
151
|
+
handleInlineSearch: u,
|
|
152
|
+
handleClearSearchInline: v ? () => v(r) : void 0,
|
|
153
|
+
onAdvanceSearchClick: n,
|
|
154
|
+
toggleAdvanceSearch: i,
|
|
155
|
+
advanceSearchEnabled: a,
|
|
156
|
+
selectOptions: b,
|
|
157
|
+
isMultiSelect: x,
|
|
158
|
+
onSelectScrollToBottom: T,
|
|
159
|
+
onSelectSearchChange: P,
|
|
160
|
+
onSelectOpen: _,
|
|
161
|
+
isLoadingSelect: Z,
|
|
162
|
+
enableSpaceSplitting: B,
|
|
163
|
+
enableBooleanParsing: E,
|
|
164
|
+
enableDateParsing: R
|
|
164
165
|
}
|
|
165
166
|
) : /* @__PURE__ */ h(
|
|
166
167
|
"div",
|
|
167
168
|
{
|
|
168
|
-
className:
|
|
169
|
+
className: C(
|
|
169
170
|
"ag-header-cell-label flex items-center w-full group min-w-0 h-full",
|
|
170
|
-
|
|
171
|
+
w ? "flex-row-reverse" : "flex-row",
|
|
171
172
|
// Center the content area if it's a selection column
|
|
172
173
|
o?.headerCheckboxSelection && (!t || t.trim() === "") ? "justify-center" : ""
|
|
173
174
|
),
|
|
@@ -176,25 +177,25 @@ const X = () => /* @__PURE__ */ h(A, { children: [
|
|
|
176
177
|
/* @__PURE__ */ e(
|
|
177
178
|
"div",
|
|
178
179
|
{
|
|
179
|
-
className:
|
|
180
|
+
className: C(
|
|
180
181
|
"ag-header-cell-text relative group flex items-center min-w-0 h-full",
|
|
181
182
|
// Remove flex-1 if we are centering via parent's justify-center
|
|
182
183
|
!(o?.headerCheckboxSelection && (!t || t.trim() === "")) && "flex-1",
|
|
183
|
-
|
|
184
|
-
|
|
184
|
+
w ? "flex-row-reverse" : "flex-row",
|
|
185
|
+
g ? "sortable cursor-pointer" : ""
|
|
185
186
|
),
|
|
186
|
-
onClick:
|
|
187
|
-
children: /* @__PURE__ */ h("div", { className:
|
|
187
|
+
onClick: g ? D : void 0,
|
|
188
|
+
children: /* @__PURE__ */ h("div", { className: C(
|
|
188
189
|
"flex items-center min-w-0 h-full",
|
|
189
|
-
|
|
190
|
+
w ? "flex-row-reverse" : "flex-row",
|
|
190
191
|
// If it's a checkbox-only header, ensure it shrinks to content for centering
|
|
191
192
|
o?.headerCheckboxSelection && (!t || t.trim() === "") ? "justify-center" : "gap-1 flex-1"
|
|
192
193
|
), children: [
|
|
193
|
-
o?.headerCheckboxSelection && /* @__PURE__ */ e(
|
|
194
|
-
t && t.trim() !== "" && /* @__PURE__ */ e("span", { className: "block truncate", children: t !== "
|
|
195
|
-
t && t.trim() !== "" &&
|
|
194
|
+
o?.headerCheckboxSelection && /* @__PURE__ */ e(ee, { api: s }),
|
|
195
|
+
t && t.trim() !== "" && /* @__PURE__ */ e("span", { className: "block truncate", children: t !== k("gridHeader.selection") && t }),
|
|
196
|
+
t && t.trim() !== "" && K(C(
|
|
196
197
|
"text-[#60697D] hover:text-[#3649C6] transition-colors",
|
|
197
|
-
|
|
198
|
+
w ? "mr-1" : "ml-1"
|
|
198
199
|
))
|
|
199
200
|
] })
|
|
200
201
|
}
|
|
@@ -202,46 +203,46 @@ const X = () => /* @__PURE__ */ h(A, { children: [
|
|
|
202
203
|
!(o?.headerCheckboxSelection && (!t || t.trim() === "")) && /* @__PURE__ */ h(
|
|
203
204
|
"div",
|
|
204
205
|
{
|
|
205
|
-
className:
|
|
206
|
+
className: C(
|
|
206
207
|
"flex items-center shrink-0 group gap-1",
|
|
207
|
-
|
|
208
|
+
w ? "flex-row-reverse" : "flex-row"
|
|
208
209
|
),
|
|
209
210
|
children: [
|
|
210
|
-
|
|
211
|
+
g && /* @__PURE__ */ h(
|
|
211
212
|
"div",
|
|
212
213
|
{
|
|
213
214
|
className: "ag-sort-indicator-container cursor-pointer flex items-center",
|
|
214
|
-
onClick:
|
|
215
|
+
onClick: D,
|
|
215
216
|
children: [
|
|
216
|
-
|
|
217
|
-
/* @__PURE__ */ e("span", { className: "ag-sort-indicator-icon", children: /* @__PURE__ */ e(
|
|
217
|
+
G && /* @__PURE__ */ e("span", { className: "ag-sort-order text-[10px] font-bold text-[#60697D] mr-0.5", children: H + 1 }),
|
|
218
|
+
/* @__PURE__ */ e("span", { className: "ag-sort-indicator-icon", children: /* @__PURE__ */ e($, {}) })
|
|
218
219
|
]
|
|
219
220
|
}
|
|
220
221
|
),
|
|
221
|
-
|
|
222
|
+
f && /* @__PURE__ */ h(
|
|
222
223
|
"span",
|
|
223
224
|
{
|
|
224
|
-
className:
|
|
225
|
+
className: C(
|
|
225
226
|
"relative cursor-pointer flex items-center shrink-0 duration-200 text-[#60697D] hover:text-[#3649C6] transition-colors",
|
|
226
|
-
|
|
227
|
+
y ? "opacity-100 w-auto" : "opacity-0 w-0 overflow-hidden group-hover:opacity-100 group-hover:w-auto"
|
|
227
228
|
),
|
|
228
|
-
onClick:
|
|
229
|
-
title:
|
|
229
|
+
onClick: U,
|
|
230
|
+
title: k(y ? "gridHeader.activeFilter" : "gridHeader.search"),
|
|
230
231
|
children: [
|
|
231
232
|
/* @__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
|
-
|
|
233
|
+
y && /* @__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
|
]
|
|
234
235
|
}
|
|
235
236
|
),
|
|
236
|
-
|
|
237
|
+
N && !o?.suppressHeaderMenuButton && /* @__PURE__ */ e("div", { className: "custom-ag-header-icons relative", children: /* @__PURE__ */ e(
|
|
237
238
|
"button",
|
|
238
239
|
{
|
|
239
|
-
className:
|
|
240
|
+
className: C(
|
|
240
241
|
"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 ===
|
|
242
|
+
d?.activeMenuColumnId === p ? "opacity-100 w-auto text-[#3649C6]" : "w-0 opacity-0 group-hover:w-auto group-hover:opacity-100"
|
|
242
243
|
),
|
|
243
244
|
onClick: (l) => {
|
|
244
|
-
l.stopPropagation(), d && d.openMenu(
|
|
245
|
+
l.stopPropagation(), d && d.openMenu(p, l.currentTarget);
|
|
245
246
|
},
|
|
246
247
|
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
|
}
|
|
@@ -254,5 +255,5 @@ const X = () => /* @__PURE__ */ h(A, { children: [
|
|
|
254
255
|
);
|
|
255
256
|
};
|
|
256
257
|
export {
|
|
257
|
-
|
|
258
|
+
de as CustomHeader
|
|
258
259
|
};
|