impact-nova 2.2.0 → 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/README.md +6 -0
- 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/data/expandable-list-item/expandable-list-item-attributes.js +7 -6
- 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/feedback/tooltip/tab-tooltip-render.js +3 -2
- 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 +26 -11
- package/dist/components/forms/select/components/LabelWithSequence.d.ts +0 -13
- package/dist/components/forms/select/components/LabelWithSequence.js +0 -18
package/README.md
CHANGED
|
@@ -14,6 +14,12 @@
|
|
|
14
14
|
[](#internationalization-i18n)
|
|
15
15
|
[](https://impact-nova.iaproducts.ai/)
|
|
16
16
|
[](https://www.npmjs.com/package/impact-nova-mcp)
|
|
17
|
+
[](https://vitest.dev/)
|
|
18
|
+
[](https://testing-library.com/docs/react-testing-library/intro/)
|
|
19
|
+
[](https://playwright.dev/)
|
|
20
|
+
[](https://storybook.js.org/docs/writing-tests)
|
|
21
|
+
[](https://storybook.js.org/docs/writing-tests/accessibility-testing)
|
|
22
|
+
[](https://impact-nova.iaproducts.ai/?path=/docs/brand-identity-testing-quality--documentation)
|
|
17
23
|
|
|
18
24
|
</div>
|
|
19
25
|
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** DOM hooks shared by header truncation CSS and tooltip overflow checks. */
|
|
2
|
+
export declare const AG_GRID_HEADER_LABEL_CLUSTER_CLASS = "ag-grid-header-label-cluster";
|
|
3
|
+
export declare const AG_GRID_HEADER_LABEL_TEXT_CLASS = "ag-grid-header-label-text";
|
|
4
|
+
export declare const AG_GRID_HEADER_GROUP_LABEL_SELECTOR = ".ag-header-group-cell-label";
|
|
5
|
+
export declare const AG_GRID_HEADER_CELL_LABEL_SELECTOR = ".ag-header-cell-label";
|
|
6
|
+
export declare const AG_GRID_HEADER_LABEL_CLUSTER_SELECTOR = ".ag-grid-header-label-cluster";
|
|
7
|
+
export type AgGridHeaderTooltipKind = 'group' | 'leaf';
|
|
8
|
+
export declare function resolveAgGridHeaderLabelShellSelector(headerKind: AgGridHeaderTooltipKind): string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const E = "ag-grid-header-label-cluster", _ = ".ag-header-group-cell-label", L = ".ag-header-cell-label", l = `.${E}`;
|
|
2
|
+
function r(e) {
|
|
3
|
+
return e === "group" ? _ : L;
|
|
4
|
+
}
|
|
5
|
+
export {
|
|
6
|
+
L as AG_GRID_HEADER_CELL_LABEL_SELECTOR,
|
|
7
|
+
_ as AG_GRID_HEADER_GROUP_LABEL_SELECTOR,
|
|
8
|
+
E as AG_GRID_HEADER_LABEL_CLUSTER_CLASS,
|
|
9
|
+
l as AG_GRID_HEADER_LABEL_CLUSTER_SELECTOR,
|
|
10
|
+
r as resolveAgGridHeaderLabelShellSelector
|
|
11
|
+
};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { AgGridHeaderTooltipKind } from './ag-grid-header-dom';
|
|
2
|
+
export type AgGridTooltipOverflowMode = 'line-clamp' | 'ellipsis';
|
|
2
3
|
/** Matches AG Grid `_isElementOverflowingCallback` (horizontal or vertical). */
|
|
3
4
|
export declare function isAgGridTextOverflowing(element: HTMLElement, mode?: AgGridTooltipOverflowMode): boolean;
|
|
5
|
+
/** Header label tooltips: ellipsis on the text node, else content wider than the label shell. */
|
|
6
|
+
export declare function isAgGridHeaderLabelTooltipOverflowing(element: HTMLElement, headerKind: AgGridHeaderTooltipKind): boolean;
|
|
@@ -1,6 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { resolveAgGridHeaderLabelShellSelector as c, AG_GRID_HEADER_LABEL_CLUSTER_SELECTOR as s } from "./ag-grid-header-dom.js";
|
|
2
|
+
function d(l, t = "line-clamp") {
|
|
3
|
+
return t === "ellipsis" ? l.clientWidth < l.scrollWidth : l.clientHeight < l.scrollHeight || l.clientWidth < l.scrollWidth;
|
|
4
|
+
}
|
|
5
|
+
function h(l, t) {
|
|
6
|
+
if (l.clientWidth < l.scrollWidth)
|
|
7
|
+
return !0;
|
|
8
|
+
const i = l.closest(c(t));
|
|
9
|
+
if (!i || typeof i.clientWidth != "number")
|
|
10
|
+
return !1;
|
|
11
|
+
const o = i, r = l.closest(s);
|
|
12
|
+
return (r && typeof r.scrollWidth == "number" ? r.scrollWidth : l.scrollWidth) > o.clientWidth;
|
|
3
13
|
}
|
|
4
14
|
export {
|
|
5
|
-
|
|
15
|
+
h as isAgGridHeaderLabelTooltipOverflowing,
|
|
16
|
+
d as isAgGridTextOverflowing
|
|
6
17
|
};
|
package/dist/components/data/ag-grid-react/headers/column-menu/column-header-settings-menu.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { GridApi } from 'ag-grid-community';
|
|
3
|
+
export interface ColumnHeaderSettingsMenuHandle {
|
|
4
|
+
openMenu: () => void;
|
|
5
|
+
}
|
|
6
|
+
interface ColumnHeaderSettingsMenuProps {
|
|
7
|
+
columnId: string;
|
|
8
|
+
gridApi: GridApi;
|
|
9
|
+
displayName: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const ColumnHeaderSettingsMenu: React.ForwardRefExoticComponent<ColumnHeaderSettingsMenuProps & React.RefAttributes<ColumnHeaderSettingsMenuHandle>>;
|
|
12
|
+
interface ColumnGroupSettingsMenuProps {
|
|
13
|
+
columnGroupId: string;
|
|
14
|
+
gridApi: GridApi;
|
|
15
|
+
headerLabelRef: React.RefObject<HTMLButtonElement | null>;
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
export declare const ColumnGroupSettingsMenu: React.FC<ColumnGroupSettingsMenuProps>;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { jsxs as u, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import m, { useState as l, useImperativeHandle as g } from "react";
|
|
3
|
+
import { DropdownMenu as p, DropdownMenuTrigger as C } from "../../../../feedback/dropdown-menu/dropdown-menu.js";
|
|
4
|
+
import { cn as f } from "../../../../../lib/utils.js";
|
|
5
|
+
import { useImpactNovaI18n as h } from "../../../../../i18n/use-impact-nova-i18n.js";
|
|
6
|
+
import { ColumnSettingsMenuContent as c } from "./column-settings-menu.js";
|
|
7
|
+
const v = m.forwardRef(({ columnId: o, gridApi: r, displayName: a }, i) => {
|
|
8
|
+
const { t: s } = h(), [n, e] = l(!1);
|
|
9
|
+
return g(i, () => ({
|
|
10
|
+
openMenu: () => e(!0)
|
|
11
|
+
})), /* @__PURE__ */ u(p, { open: n, onOpenChange: e, children: [
|
|
12
|
+
/* @__PURE__ */ t("div", { className: "custom-ag-header-icons relative", children: /* @__PURE__ */ t(C, { asChild: !0, children: /* @__PURE__ */ t(
|
|
13
|
+
"button",
|
|
14
|
+
{
|
|
15
|
+
type: "button",
|
|
16
|
+
className: f(
|
|
17
|
+
"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-content-tertiary hover:text-brand-variant-hover",
|
|
18
|
+
n ? "opacity-100 w-auto" : "w-0 opacity-0 group-hover:w-auto group-hover:opacity-100"
|
|
19
|
+
),
|
|
20
|
+
"aria-label": `${a} ${s("gridHeader.columnSettings")}`,
|
|
21
|
+
onClick: (d) => d.stopPropagation(),
|
|
22
|
+
children: /* @__PURE__ */ t("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ t("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" }) })
|
|
23
|
+
}
|
|
24
|
+
) }) }),
|
|
25
|
+
/* @__PURE__ */ t(
|
|
26
|
+
c,
|
|
27
|
+
{
|
|
28
|
+
columnId: o,
|
|
29
|
+
gridApi: r,
|
|
30
|
+
variant: "column",
|
|
31
|
+
onClose: () => e(!1)
|
|
32
|
+
}
|
|
33
|
+
)
|
|
34
|
+
] });
|
|
35
|
+
});
|
|
36
|
+
v.displayName = "ColumnHeaderSettingsMenu";
|
|
37
|
+
const O = ({
|
|
38
|
+
columnGroupId: o,
|
|
39
|
+
gridApi: r,
|
|
40
|
+
headerLabelRef: a,
|
|
41
|
+
children: i
|
|
42
|
+
}) => {
|
|
43
|
+
const [s, n] = l(!1);
|
|
44
|
+
return /* @__PURE__ */ u(p, { open: s, onOpenChange: n, children: [
|
|
45
|
+
/* @__PURE__ */ t(C, { asChild: !0, children: /* @__PURE__ */ t(
|
|
46
|
+
"button",
|
|
47
|
+
{
|
|
48
|
+
type: "button",
|
|
49
|
+
ref: a,
|
|
50
|
+
className: "ag-grid-header-label-text border-0 bg-transparent p-0 text-left font-bold text-content",
|
|
51
|
+
onClick: (e) => {
|
|
52
|
+
e.preventDefault(), e.stopPropagation();
|
|
53
|
+
},
|
|
54
|
+
onContextMenu: (e) => {
|
|
55
|
+
e.preventDefault(), e.stopPropagation(), n(!0);
|
|
56
|
+
},
|
|
57
|
+
children: i
|
|
58
|
+
}
|
|
59
|
+
) }),
|
|
60
|
+
/* @__PURE__ */ t(
|
|
61
|
+
c,
|
|
62
|
+
{
|
|
63
|
+
columnId: o,
|
|
64
|
+
gridApi: r,
|
|
65
|
+
variant: "group",
|
|
66
|
+
onClose: () => n(!1)
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
] });
|
|
70
|
+
};
|
|
71
|
+
export {
|
|
72
|
+
O as ColumnGroupSettingsMenu,
|
|
73
|
+
v as ColumnHeaderSettingsMenu
|
|
74
|
+
};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { GridApi } from 'ag-grid-community';
|
|
3
|
-
interface
|
|
4
|
-
isOpen: boolean;
|
|
3
|
+
export interface ColumnSettingsMenuContentProps {
|
|
5
4
|
onClose: () => void;
|
|
6
5
|
columnId: string;
|
|
7
6
|
gridApi: GridApi;
|
|
8
|
-
anchor: HTMLElement | null;
|
|
9
7
|
/** Variant determines menu items shown: 'column' shows full menu, 'group' shows only Choose/Reset Columns */
|
|
10
8
|
variant?: 'column' | 'group';
|
|
11
9
|
}
|
|
12
|
-
export declare const
|
|
13
|
-
|
|
10
|
+
export declare const ColumnSettingsMenuContent: React.FC<ColumnSettingsMenuContentProps>;
|
|
11
|
+
/** @deprecated Use ColumnSettingsMenuContent with a colocated DropdownMenu trigger. */
|
|
12
|
+
export declare const ColumnSettingsMenu: React.FC<ColumnSettingsMenuContentProps>;
|
|
@@ -1,167 +1,133 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as e, jsxs as r, Fragment as G } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { Settings as
|
|
4
|
-
import {
|
|
5
|
-
import { useImpactNovaI18n as
|
|
6
|
-
import { useGridHeader as
|
|
7
|
-
import { setActiveSearchColumnId as
|
|
8
|
-
import { notifyColumnIndicatorSync as
|
|
9
|
-
const
|
|
10
|
-
isOpen: S,
|
|
3
|
+
import { Settings as L, Checkmark as m, Search as R } from "impact-nova-icons";
|
|
4
|
+
import { DropdownMenuContent as M, DropdownMenuItem as s, DropdownMenuLabel as O, DropdownMenuSeparator as A, DropdownMenuSub as p, DropdownMenuSubTrigger as C, DropdownMenuSubContent as g } from "../../../../feedback/dropdown-menu/dropdown-menu.js";
|
|
5
|
+
import { useImpactNovaI18n as V } from "../../../../../i18n/use-impact-nova-i18n.js";
|
|
6
|
+
import { useGridHeader as E } from "../context/grid-header-context.js";
|
|
7
|
+
import { setActiveSearchColumnId as W } from "../header-search-active-state.js";
|
|
8
|
+
import { notifyColumnIndicatorSync as B } from "../../notify-column-indicator-sync.js";
|
|
9
|
+
const _ = ({
|
|
11
10
|
onClose: a,
|
|
12
|
-
columnId:
|
|
13
|
-
gridApi:
|
|
14
|
-
|
|
15
|
-
variant: d = "column"
|
|
11
|
+
columnId: i,
|
|
12
|
+
gridApi: l,
|
|
13
|
+
variant: c = "column"
|
|
16
14
|
}) => {
|
|
17
|
-
const { t } =
|
|
18
|
-
if (
|
|
19
|
-
const
|
|
15
|
+
const { t: n } = V(), u = E(), d = c === "column" ? l.getColumn(i) : null;
|
|
16
|
+
if (c === "column" && !d) return null;
|
|
17
|
+
const o = d?.getColDef(), S = d?.getSort(), x = d?.getPinned(), F = c === "column" && o?.sortable !== !1, H = o?.filter || "agTextColumnFilter", y = H === "agNumberColumnFilter" || (Array.isArray(o?.type) ? o.type.includes("numericColumn") : o?.type === "numericColumn"), b = H === "agDateColumnFilter" || (Array.isArray(o?.type) ? o.type.includes("dateColumn") : o?.type === "dateColumn"), P = l.getGridOption("suppressRowVirtualisation") !== !0, h = (t) => {
|
|
20
18
|
queueMicrotask(() => {
|
|
21
|
-
|
|
22
|
-
state: [{ colId:
|
|
19
|
+
l.applyColumnState({
|
|
20
|
+
state: [{ colId: i, sort: t }],
|
|
23
21
|
defaultState: { sort: null }
|
|
24
22
|
});
|
|
25
23
|
}), a();
|
|
26
|
-
}, f = (
|
|
24
|
+
}, f = (t) => {
|
|
27
25
|
queueMicrotask(() => {
|
|
28
|
-
|
|
29
|
-
state: [{ colId:
|
|
26
|
+
l.applyColumnState({
|
|
27
|
+
state: [{ colId: i, pinned: t }]
|
|
30
28
|
});
|
|
31
29
|
}), a();
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
},
|
|
30
|
+
}, k = (t) => {
|
|
31
|
+
t ? l.autoSizeAllColumns() : l.autoSizeColumns([i]), a();
|
|
32
|
+
}, w = () => {
|
|
35
33
|
queueMicrotask(() => {
|
|
36
|
-
|
|
34
|
+
l.showColumnChooser();
|
|
37
35
|
}), a();
|
|
38
|
-
},
|
|
36
|
+
}, N = () => {
|
|
39
37
|
queueMicrotask(() => {
|
|
40
|
-
|
|
38
|
+
l.resetColumnState();
|
|
41
39
|
}), a();
|
|
42
|
-
},
|
|
43
|
-
if (
|
|
44
|
-
|
|
40
|
+
}, j = () => {
|
|
41
|
+
if (u)
|
|
42
|
+
u.openSearch(i);
|
|
45
43
|
else {
|
|
46
|
-
const
|
|
47
|
-
|
|
44
|
+
const t = l.getGridOption("context") || {};
|
|
45
|
+
l.setGridOption("context", { ...t, activeSearchColumnId: i }), W(i), B(l);
|
|
48
46
|
}
|
|
49
47
|
a();
|
|
50
|
-
},
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
},
|
|
54
|
-
return
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
] })
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
48
|
+
}, T = () => {
|
|
49
|
+
const t = o?.headerComponentParams;
|
|
50
|
+
t?.onAdvanceSearchClick ? t.onAdvanceSearchClick(d) : t?.toggleAdvanceSearch ? t.toggleAdvanceSearch(i) : u && u.openAdvancedFilter(i), a();
|
|
51
|
+
}, D = o?.headerComponentParams, z = c === "column" && D?.isSearchable, v = c === "column" && D?.advanceSearchEnabled, q = n(P ? "gridHeader.autosizeAllVisibleColumns" : "gridHeader.autosizeAllColumns");
|
|
52
|
+
return c === "group" ? /* @__PURE__ */ e(
|
|
53
|
+
M,
|
|
54
|
+
{
|
|
55
|
+
align: "end",
|
|
56
|
+
side: "bottom",
|
|
57
|
+
sideOffset: 5,
|
|
58
|
+
className: "w-[200px] p-2 rounded-[8px] border-none !shadow-elevation-settings",
|
|
59
|
+
onCloseAutoFocus: (t) => t.preventDefault(),
|
|
60
|
+
children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
|
|
61
|
+
/* @__PURE__ */ e(s, { onClick: w, children: n("gridHeader.chooseColumns") }),
|
|
62
|
+
/* @__PURE__ */ e(s, { onClick: N, children: n("gridHeader.resetColumns") })
|
|
63
|
+
] })
|
|
64
|
+
}
|
|
65
|
+
) : /* @__PURE__ */ e(
|
|
66
|
+
M,
|
|
67
|
+
{
|
|
68
|
+
align: "end",
|
|
69
|
+
side: "bottom",
|
|
70
|
+
sideOffset: 5,
|
|
71
|
+
className: "w-[200px] p-2 rounded-[8px] border-none !shadow-elevation-settings",
|
|
72
|
+
onCloseAutoFocus: (t) => t.preventDefault(),
|
|
73
|
+
children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
|
|
74
|
+
/* @__PURE__ */ r(O, { className: "flex items-center gap-2 text-content-tertiary", children: [
|
|
75
|
+
/* @__PURE__ */ e(L, { size: "xs" }),
|
|
76
|
+
" ",
|
|
77
|
+
n("gridHeader.columnSettings")
|
|
78
|
+
] }),
|
|
79
|
+
/* @__PURE__ */ e(A, {}),
|
|
80
|
+
F && /* @__PURE__ */ r(p, { children: [
|
|
81
|
+
/* @__PURE__ */ e(C, { inset: !0, children: n("gridHeader.sort") }),
|
|
82
|
+
/* @__PURE__ */ r(g, { sideOffset: 10, alignOffset: -5, children: [
|
|
83
|
+
/* @__PURE__ */ e(s, { onClick: () => h("asc"), children: /* @__PURE__ */ r("span", { className: "flex items-center w-full justify-between", children: [
|
|
84
|
+
/* @__PURE__ */ e("span", { children: n(y ? "gridHeader.sortAscNumber" : b ? "gridHeader.sortAscDate" : "gridHeader.sortAscText") }),
|
|
85
|
+
S === "asc" && /* @__PURE__ */ e(m, { size: "sm", className: "ml-2 text-content-tertiary" })
|
|
86
|
+
] }) }),
|
|
87
|
+
/* @__PURE__ */ e(s, { onClick: () => h("desc"), children: /* @__PURE__ */ r("span", { className: "flex items-center w-full justify-between", children: [
|
|
88
|
+
/* @__PURE__ */ e("span", { children: n(y ? "gridHeader.sortDescNumber" : b ? "gridHeader.sortDescDate" : "gridHeader.sortDescText") }),
|
|
89
|
+
S === "desc" && /* @__PURE__ */ e(m, { size: "sm", className: "ml-2 text-content-tertiary" })
|
|
90
|
+
] }) }),
|
|
91
|
+
/* @__PURE__ */ e(s, { onClick: () => h(null), children: /* @__PURE__ */ e("span", { children: n("gridHeader.reset") }) })
|
|
92
|
+
] })
|
|
93
|
+
] }),
|
|
94
|
+
/* @__PURE__ */ r(p, { children: [
|
|
95
|
+
/* @__PURE__ */ e(C, { inset: !0, children: n("gridHeader.freezeColumn") }),
|
|
96
|
+
/* @__PURE__ */ r(g, { className: "z-[120]", sideOffset: 10, alignOffset: -5, children: [
|
|
97
|
+
/* @__PURE__ */ e(s, { onClick: () => f("left"), children: /* @__PURE__ */ r("span", { className: "flex items-center w-full justify-between", children: [
|
|
98
|
+
/* @__PURE__ */ e("span", { children: n("gridHeader.pinLeft") }),
|
|
99
|
+
x === "left" && /* @__PURE__ */ e(m, { size: "sm", className: "ml-2 text-content-tertiary" })
|
|
100
|
+
] }) }),
|
|
101
|
+
/* @__PURE__ */ e(s, { onClick: () => f("right"), children: /* @__PURE__ */ r("span", { className: "flex items-center w-full justify-between", children: [
|
|
102
|
+
/* @__PURE__ */ e("span", { children: n("gridHeader.pinRight") }),
|
|
103
|
+
x === "right" && /* @__PURE__ */ e(m, { size: "sm", className: "ml-2 text-content-tertiary" })
|
|
104
|
+
] }) }),
|
|
105
|
+
/* @__PURE__ */ e(s, { onClick: () => f(null), children: /* @__PURE__ */ e("span", { children: n("gridHeader.noPin") }) })
|
|
106
|
+
] })
|
|
107
|
+
] }),
|
|
108
|
+
/* @__PURE__ */ r(p, { children: [
|
|
109
|
+
/* @__PURE__ */ e(C, { inset: !0, children: n("gridHeader.columnWidth") }),
|
|
110
|
+
/* @__PURE__ */ r(g, { className: "z-[120]", sideOffset: 10, alignOffset: -5, children: [
|
|
111
|
+
/* @__PURE__ */ e(s, { onClick: () => k(!1), children: n("gridHeader.autosizeThisColumn") }),
|
|
112
|
+
/* @__PURE__ */ e(s, { onClick: () => k(!0), children: q })
|
|
113
|
+
] })
|
|
114
|
+
] }),
|
|
115
|
+
/* @__PURE__ */ e(s, { inset: !0, onClick: w, children: n("gridHeader.chooseColumns") }),
|
|
116
|
+
/* @__PURE__ */ e(s, { inset: !0, onClick: N, children: n("gridHeader.resetColumns") }),
|
|
117
|
+
(z || v) && /* @__PURE__ */ r(G, { children: [
|
|
118
|
+
/* @__PURE__ */ e(A, {}),
|
|
119
|
+
/* @__PURE__ */ r(O, { className: "flex items-center gap-2 text-content-tertiary", children: [
|
|
120
|
+
/* @__PURE__ */ e(R, { size: "xs" }),
|
|
109
121
|
" ",
|
|
110
|
-
|
|
122
|
+
n("gridHeader.searchOptions")
|
|
111
123
|
] }),
|
|
112
|
-
/* @__PURE__ */ e(j,
|
|
113
|
-
|
|
114
|
-
/* @__PURE__ */ e(C, { inset: !0, children: t("gridHeader.sort") }),
|
|
115
|
-
/* @__PURE__ */ r(x, { sideOffset: 10, alignOffset: -5, children: [
|
|
116
|
-
/* @__PURE__ */ e(i, { onClick: () => p("asc"), children: /* @__PURE__ */ r("span", { className: "flex items-center w-full justify-between", children: [
|
|
117
|
-
/* @__PURE__ */ e("span", { children: t(b ? "gridHeader.sortAscNumber" : k ? "gridHeader.sortAscDate" : "gridHeader.sortAscText") }),
|
|
118
|
-
y === "asc" && /* @__PURE__ */ e(m, { size: "sm", className: "ml-2 text-content-tertiary" })
|
|
119
|
-
] }) }),
|
|
120
|
-
/* @__PURE__ */ e(i, { onClick: () => p("desc"), children: /* @__PURE__ */ r("span", { className: "flex items-center w-full justify-between", children: [
|
|
121
|
-
/* @__PURE__ */ e("span", { children: t(b ? "gridHeader.sortDescNumber" : k ? "gridHeader.sortDescDate" : "gridHeader.sortDescText") }),
|
|
122
|
-
y === "desc" && /* @__PURE__ */ e(m, { size: "sm", className: "ml-2 text-content-tertiary" })
|
|
123
|
-
] }) }),
|
|
124
|
-
/* @__PURE__ */ e(i, { onClick: () => p(null), children: /* @__PURE__ */ e("span", { children: t("gridHeader.reset") }) })
|
|
125
|
-
] })
|
|
126
|
-
] }),
|
|
127
|
-
/* @__PURE__ */ r(g, { children: [
|
|
128
|
-
/* @__PURE__ */ e(C, { inset: !0, children: t("gridHeader.freezeColumn") }),
|
|
129
|
-
/* @__PURE__ */ r(x, { className: "z-[120]", sideOffset: 10, alignOffset: -5, children: [
|
|
130
|
-
/* @__PURE__ */ e(i, { onClick: () => f("left"), children: /* @__PURE__ */ r("span", { className: "flex items-center w-full justify-between", children: [
|
|
131
|
-
/* @__PURE__ */ e("span", { children: t("gridHeader.pinLeft") }),
|
|
132
|
-
w === "left" && /* @__PURE__ */ e(m, { size: "sm", className: "ml-2 text-content-tertiary" })
|
|
133
|
-
] }) }),
|
|
134
|
-
/* @__PURE__ */ e(i, { onClick: () => f("right"), children: /* @__PURE__ */ r("span", { className: "flex items-center w-full justify-between", children: [
|
|
135
|
-
/* @__PURE__ */ e("span", { children: t("gridHeader.pinRight") }),
|
|
136
|
-
w === "right" && /* @__PURE__ */ e(m, { size: "sm", className: "ml-2 text-content-tertiary" })
|
|
137
|
-
] }) }),
|
|
138
|
-
/* @__PURE__ */ e(i, { onClick: () => f(null), children: /* @__PURE__ */ e("span", { children: t("gridHeader.noPin") }) })
|
|
139
|
-
] })
|
|
140
|
-
] }),
|
|
141
|
-
/* @__PURE__ */ r(g, { children: [
|
|
142
|
-
/* @__PURE__ */ e(C, { inset: !0, children: t("gridHeader.columnWidth") }),
|
|
143
|
-
/* @__PURE__ */ r(x, { className: "z-[120]", sideOffset: 10, alignOffset: -5, children: [
|
|
144
|
-
/* @__PURE__ */ e(i, { onClick: () => N(!1), children: t("gridHeader.autosizeThisColumn") }),
|
|
145
|
-
/* @__PURE__ */ e(i, { onClick: () => N(!0), children: V })
|
|
146
|
-
] })
|
|
147
|
-
] }),
|
|
148
|
-
/* @__PURE__ */ e(i, { inset: !0, onClick: D, children: t("gridHeader.chooseColumns") }),
|
|
149
|
-
/* @__PURE__ */ e(i, { inset: !0, onClick: v, children: t("gridHeader.resetColumns") }),
|
|
150
|
-
(M || O) && /* @__PURE__ */ r(B, { children: [
|
|
151
|
-
/* @__PURE__ */ e(j, {}),
|
|
152
|
-
/* @__PURE__ */ r(T, { className: "flex items-center gap-2 text-content-tertiary", children: [
|
|
153
|
-
/* @__PURE__ */ e(I, { size: "xs" }),
|
|
154
|
-
" ",
|
|
155
|
-
t("gridHeader.searchOptions")
|
|
156
|
-
] }),
|
|
157
|
-
M && /* @__PURE__ */ e(i, { inset: !0, onClick: R, children: t("gridHeader.search") }),
|
|
158
|
-
O && /* @__PURE__ */ e(i, { inset: !0, onClick: L, children: t("gridHeader.advanceSearch") })
|
|
159
|
-
] })
|
|
124
|
+
z && /* @__PURE__ */ e(s, { inset: !0, onClick: j, children: n("gridHeader.search") }),
|
|
125
|
+
v && /* @__PURE__ */ e(s, { inset: !0, onClick: T, children: n("gridHeader.advanceSearch") })
|
|
160
126
|
] })
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
|
|
127
|
+
] })
|
|
128
|
+
}
|
|
129
|
+
);
|
|
164
130
|
};
|
|
165
131
|
export {
|
|
166
|
-
|
|
132
|
+
_ as ColumnSettingsMenuContent
|
|
167
133
|
};
|
|
@@ -22,8 +22,9 @@ export declare const TooltipInfoTrigger: ({ content, className, onInfoClick, lab
|
|
|
22
22
|
* Modal-enabled Info Trigger
|
|
23
23
|
* Only this component allocates a useState hook.
|
|
24
24
|
*/
|
|
25
|
-
export declare const ModalInfoTrigger: ({ infoData, className, onInfoClick, label, }: {
|
|
25
|
+
export declare const ModalInfoTrigger: ({ infoData, displayName, className, onInfoClick, label, }: {
|
|
26
26
|
infoData?: InfoContent;
|
|
27
|
+
displayName?: string;
|
|
27
28
|
className?: string;
|
|
28
29
|
onInfoClick?: (e: React.MouseEvent) => void;
|
|
29
30
|
label: string;
|