impact-nova 2.1.0-alpha.4 → 2.1.0-alpha.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 +3 -0
- package/dist/components/data/ag-grid-react/ag-grid-tooltip-overflow.js +6 -0
- package/dist/components/data/ag-grid-react/ag-grid.types.d.ts +15 -21
- package/dist/components/data/ag-grid-react/cell-renderers/date-display-renderer.js +1 -1
- package/dist/components/data/ag-grid-react/cell-renderers/default-text-cell-renderer.d.ts +1 -2
- package/dist/components/data/ag-grid-react/cell-renderers/default-text-cell-renderer.js +12 -6
- package/dist/components/data/ag-grid-react/cell-renderers/editors/textarea-cell-editor.js +19 -19
- package/dist/components/data/ag-grid-react/cell-renderers/select-display-renderer.js +1 -1
- package/dist/components/data/ag-grid-react/cell-renderers/switch-display-renderer.js +15 -15
- package/dist/components/data/ag-grid-react/headers/advanced-filter/advanced-filter-dialog.js +1 -1
- package/dist/components/data/ag-grid-react/headers/advanced-filter/column-filter-section.js +33 -33
- package/dist/components/data/ag-grid-react/headers/components/header-info.js +66 -62
- package/dist/components/data/ag-grid-react/headers/components/info-modal.js +6 -6
- package/dist/components/data/ag-grid-react/headers/components/section-renderers.js +18 -18
- package/dist/components/data/ag-grid-react/headers/custom-header-group.js +40 -29
- package/dist/components/data/ag-grid-react/headers/custom-header.js +102 -98
- package/dist/components/data/ag-grid-react/index.d.ts +1 -1
- package/dist/components/data/ag-grid-react/index.js +136 -127
- package/dist/components/data/ag-grid-react/notify-column-indicator-sync.d.ts +7 -0
- package/dist/components/data/ag-grid-react/notify-column-indicator-sync.js +6 -0
- package/dist/components/data/ag-grid-react/theme.js +8 -4
- package/dist/components/data/ag-grid-react/use-ag-grid-truncation-tooltip.d.ts +5 -0
- package/dist/components/data/ag-grid-react/use-ag-grid-truncation-tooltip.js +13 -0
- package/dist/components/data/ag-grid-react/useGridAutoSizeStrategyOnResize.js +8 -5
- package/dist/components/data/data-table/build-column-tree-from-grid.d.ts +14 -0
- package/dist/components/data/data-table/build-column-tree-from-grid.js +95 -0
- package/dist/components/data/data-table/data-table-column-apply.d.ts +29 -0
- package/dist/components/data/data-table/data-table-column-apply.js +102 -0
- package/dist/components/data/data-table/data-table-column-def-pin.d.ts +25 -0
- package/dist/components/data/data-table/data-table-column-def-pin.js +66 -0
- package/dist/components/data/data-table/data-table-column-list-sync.d.ts +8 -0
- package/dist/components/data/data-table/data-table-column-list-sync.js +15 -0
- package/dist/components/data/data-table/data-table-column-list.d.ts +14 -4
- package/dist/components/data/data-table/data-table-column-list.js +74 -277
- package/dist/components/data/data-table/data-table-constants.d.ts +3 -4
- package/dist/components/data/data-table/data-table-context.d.ts +3 -6
- package/dist/components/data/data-table/data-table-context.js +21 -10
- package/dist/components/data/data-table/data-table-saved-views.js +26 -26
- package/dist/components/data/data-table/data-table-sheet-portal-store.d.ts +13 -0
- package/dist/components/data/data-table/data-table-sheet-portal-store.js +36 -0
- package/dist/components/data/data-table/data-table-sheet.d.ts +3 -6
- package/dist/components/data/data-table/data-table-sheet.js +4 -2
- package/dist/components/data/data-table/data-table-view-menu.js +40 -40
- package/dist/components/data/data-table/data-table.d.ts +8 -10
- package/dist/components/data/data-table/data-table.js +138 -111
- package/dist/components/data/data-table/data-table.types.d.ts +35 -0
- package/dist/components/data/data-table/index.js +28 -27
- package/dist/components/data/data-table/indicator-legend.js +6 -6
- package/dist/components/data/data-table/use-data-table-column-list-sync.d.ts +16 -0
- package/dist/components/data/data-table/use-data-table-column-list-sync.js +222 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-attributes.d.ts +8 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +72 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-context.d.ts +13 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-context.js +25 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-metrics.d.ts +6 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +41 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-parts.d.ts +31 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-parts.js +233 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-preset.d.ts +18 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-preset.js +133 -0
- package/dist/components/data/expandable-list-item/expandable-list-item.d.ts +5 -0
- package/dist/components/data/{expandable-sku/expandable-sku.types.d.ts → expandable-list-item/expandable-list-item.types.d.ts} +7 -7
- package/dist/components/data/expandable-list-item/index.d.ts +5 -0
- package/dist/components/data/expandable-list-item/index.js +19 -0
- package/dist/components/data/nested-list/components/NestedListHeader.js +11 -11
- package/dist/components/data/nested-list/components/SortableItem.js +2 -2
- package/dist/components/data-display/avatar/avatar.types.d.ts +2 -0
- package/dist/components/data-display/badge/badge.types.d.ts +2 -0
- package/dist/components/data-display/calendar/calendar-day-picker-classnames.js +11 -11
- package/dist/components/data-display/calendar/calendar-month-picker-panel.js +7 -7
- package/dist/components/data-display/calendar/calendar-week-number-cell.js +31 -31
- package/dist/components/data-display/card/card.js +8 -8
- package/dist/components/data-display/chart/chart.types.d.ts +9 -0
- package/dist/components/data-display/skeleton/skeleton.js +6 -6
- package/dist/components/data-display/statistics-card/statistics-card.js +14 -14
- package/dist/components/feedback/alert-dialog/alert-dialog.js +19 -19
- package/dist/components/feedback/dialog/dialog.js +1 -1
- package/dist/components/feedback/drawer/drawer.js +18 -18
- package/dist/components/feedback/dropdown-menu/dropdown-menu.js +70 -57
- package/dist/components/feedback/popover/popover.js +1 -1
- package/dist/components/feedback/sheet/sheet.js +1 -1
- package/dist/components/feedback/tooltip/tooltip.js +22 -22
- package/dist/components/feedback/tooltip/tooltip.variants.js +1 -1
- package/dist/components/flows/command-palette/command-palette.js +104 -104
- package/dist/components/flows/command-palette/shortcut-settings.js +34 -34
- package/dist/components/flows/filter-strip/filter-tag-list.js +4 -4
- package/dist/components/flows/notification-panel/notification-list.js +17 -17
- package/dist/components/flows/notification-panel/notification-panel.js +4 -4
- package/dist/components/flows/notification-panel/notification-panel.types.d.ts +3 -0
- package/dist/components/flows/wizard/wizard.js +8 -8
- package/dist/components/forms/combobox/combobox.js +20 -20
- package/dist/components/forms/date-picker/date-picker.js +17 -17
- package/dist/components/forms/date-picker/date-range-picker.js +3 -3
- package/dist/components/forms/date-picker/month-picker.js +1 -1
- package/dist/components/forms/date-picker/month-range-picker.js +42 -42
- package/dist/components/forms/date-picker/week-picker.js +15 -15
- package/dist/components/forms/date-picker/week-range-picker.js +3 -3
- package/dist/components/forms/file-upload/file-upload.js +33 -33
- package/dist/components/forms/input/input.js +8 -8
- package/dist/components/forms/input/input.variants.js +3 -3
- package/dist/components/forms/select/components/SelectMenuPanel.d.ts +1 -2
- package/dist/components/forms/select/components/SelectMenuPanel.js +18 -20
- package/dist/components/forms/select/components/SelectTrigger.d.ts +9 -6
- package/dist/components/forms/select/components/SelectTrigger.js +120 -122
- package/dist/components/forms/select/components/Submenu.js +8 -8
- package/dist/components/forms/select/hooks/useSelectKeyboardHandlers.d.ts +1 -1
- package/dist/components/forms/select/hooks/useSelectValueState.d.ts +19 -0
- package/dist/components/forms/select/hooks/useSelectValueState.js +41 -0
- package/dist/components/forms/select/index.js +4 -3
- package/dist/components/forms/select/select.js +180 -175
- package/dist/components/forms/select/select.types.d.ts +3 -2
- package/dist/components/forms/select/select.variants.js +4 -4
- package/dist/components/forms/select/utils/select.d.ts +2 -1
- package/dist/components/forms/select/utils/select.js +47 -37
- package/dist/components/layout/sidebar/sidebar.d.ts +7 -50
- package/dist/components/layout/sidebar/sidebar.js +12 -11
- package/dist/components/layout/sidebar/sidebar.types.d.ts +35 -1
- package/dist/components/primitives/button-group/button-group.js +32 -32
- package/dist/components/primitives/chips/chips.variants.js +5 -5
- package/dist/components/primitives/empty-container/empty-container.types.d.ts +3 -0
- package/dist/components/primitives/kbd/kbd.variants.js +3 -3
- package/dist/components/primitives/stepper/stepper.js +6 -6
- package/dist/impact-nova-components.css +113 -7
- package/dist/impact-nova-tokens.scss +2 -4
- package/dist/impact-nova.css +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +467 -433
- package/dist/lib/compose-refs.d.ts +8 -0
- package/dist/lib/compose-refs.js +14 -0
- package/dist/lib/primitives/field.types.d.ts +8 -2
- package/dist/lib/virtualized/index.d.ts +3 -0
- package/dist/lib/virtualized/index.js +33 -16
- package/dist/lib/virtualized/useVirtualizedList.d.ts +2 -0
- package/dist/lib/virtualized/useVirtualizedList.js +115 -109
- package/dist/lib/virtualized/virtualized-list-context.d.ts +12 -0
- package/dist/lib/virtualized/virtualized-list-context.js +21 -0
- package/dist/lib/virtualized/virtualized-list-parts.d.ts +51 -0
- package/dist/lib/virtualized/virtualized-list-parts.js +175 -0
- package/dist/lib/virtualized/virtualized-list-utils.d.ts +5 -0
- package/dist/lib/virtualized/virtualized-list-utils.js +6 -0
- package/dist/llms/rules/ag-grid.js +1 -1
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/migration.js +1 -1
- package/dist/llms/rules/real-world-patterns.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/package.json +24 -15
- package/tailwind.config.js +1 -0
- package/dist/components/data/ag-grid-react/headers/components/truncated-text.d.ts +0 -15
- package/dist/components/data/ag-grid-react/headers/components/truncated-text.js +0 -27
- package/dist/components/data/expandable-sku/expandable-sku.d.ts +0 -38
- package/dist/components/data/expandable-sku/expandable-sku.js +0 -245
- package/dist/components/data/expandable-sku/index.d.ts +0 -2
- package/dist/components/data/expandable-sku/index.js +0 -4
|
@@ -1,39 +1,40 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { lazy as
|
|
3
|
-
import { ModuleRegistry as
|
|
4
|
-
import { AllEnterpriseModule as
|
|
5
|
-
import { AgGridReact as
|
|
6
|
-
import { customAgGridTheme as
|
|
7
|
-
import { CustomHeader as
|
|
8
|
-
import { CustomHeaderGroup as
|
|
9
|
-
import { DefaultTextCellRenderer as
|
|
10
|
-
import { GridHeaderContext as
|
|
11
|
-
import { convertToAgGridFilterModel as
|
|
12
|
-
import { ColumnSettingsMenu as
|
|
13
|
-
import { AG_GRID_VALUE_FORMATTERS as
|
|
14
|
-
import { useGridAutoSizeStrategyOnResize as
|
|
15
|
-
import { subscribeGridApiEvent as
|
|
1
|
+
import { jsxs as ye, jsx as v } from "react/jsx-runtime";
|
|
2
|
+
import { lazy as ve, useRef as S, useState as j, useCallback as f, useMemo as y, useEffect as be, Suspense as xe } from "react";
|
|
3
|
+
import { ModuleRegistry as Se, AllCommunityModule as Fe, ValidationModule as Me } from "ag-grid-community";
|
|
4
|
+
import { AllEnterpriseModule as Ee } from "ag-grid-enterprise";
|
|
5
|
+
import { AgGridReact as Ae } from "ag-grid-react";
|
|
6
|
+
import { customAgGridTheme as Re } from "./theme.js";
|
|
7
|
+
import { CustomHeader as Ge } from "./headers/custom-header.js";
|
|
8
|
+
import { CustomHeaderGroup as ke } from "./headers/custom-header-group.js";
|
|
9
|
+
import { DefaultTextCellRenderer as we } from "./cell-renderers/default-text-cell-renderer.js";
|
|
10
|
+
import { GridHeaderContext as je } from "./headers/context/grid-header-context.js";
|
|
11
|
+
import { convertToAgGridFilterModel as Ie, getMultiFilterIndices as Te, convertFromAgGridFilterModel as Oe } from "./headers/utils/filter-utils.js";
|
|
12
|
+
import { ColumnSettingsMenu as Pe } from "./headers/column-menu/column-settings-menu.js";
|
|
13
|
+
import { AG_GRID_VALUE_FORMATTERS as De } from "./value-formatters.js";
|
|
14
|
+
import { useGridAutoSizeStrategyOnResize as He } from "./useGridAutoSizeStrategyOnResize.js";
|
|
15
|
+
import { subscribeGridApiEvent as it, subscribeGridApiEvents as st } from "./grid-api-event-subscription.js";
|
|
16
|
+
import { notifyColumnIndicatorSync as $ } from "./notify-column-indicator-sync.js";
|
|
16
17
|
/* empty css */
|
|
17
|
-
const
|
|
18
|
+
const Le = ve(
|
|
18
19
|
() => import("./headers/advanced-filter/advanced-filter-dialog.js").then((l) => ({
|
|
19
20
|
default: l.AdvancedFilterDialog
|
|
20
21
|
}))
|
|
21
22
|
);
|
|
22
|
-
|
|
23
|
-
const F = "",
|
|
24
|
-
function
|
|
23
|
+
Se.registerModules([Fe, Ee, Me]);
|
|
24
|
+
const F = "", N = "";
|
|
25
|
+
function q(l) {
|
|
25
26
|
return l.getColumns()?.some((n) => n.getColDef().headerCheckboxSelection) ?? !1;
|
|
26
27
|
}
|
|
27
|
-
const
|
|
28
|
+
const z = (l) => {
|
|
28
29
|
if (!l) return;
|
|
29
30
|
const n = l.cellRendererParams?.splits;
|
|
30
31
|
if (Array.isArray(n) && n.length > 0) return n;
|
|
31
32
|
const i = l.cellEditorParams?.splits;
|
|
32
33
|
if (Array.isArray(i) && i.length > 0) return i;
|
|
33
|
-
},
|
|
34
|
+
}, B = (l, n) => {
|
|
34
35
|
const i = [];
|
|
35
|
-
for (const
|
|
36
|
-
const m =
|
|
36
|
+
for (const g of n) {
|
|
37
|
+
const m = g?.field?.split(".").pop();
|
|
37
38
|
if (!m) {
|
|
38
39
|
i.push("");
|
|
39
40
|
continue;
|
|
@@ -55,13 +56,13 @@ const U = (l) => {
|
|
|
55
56
|
i.push("");
|
|
56
57
|
}
|
|
57
58
|
return i;
|
|
58
|
-
},
|
|
59
|
+
}, J = (l) => {
|
|
59
60
|
if (typeof navigator < "u" && navigator.clipboard?.writeText) {
|
|
60
|
-
navigator.clipboard.writeText(l).catch(() =>
|
|
61
|
+
navigator.clipboard.writeText(l).catch(() => X(l));
|
|
61
62
|
return;
|
|
62
63
|
}
|
|
63
|
-
|
|
64
|
-
},
|
|
64
|
+
X(l);
|
|
65
|
+
}, X = (l) => {
|
|
65
66
|
if (typeof document > "u") return;
|
|
66
67
|
const n = document.createElement("textarea");
|
|
67
68
|
n.value = l, n.setAttribute("readonly", ""), n.style.position = "fixed", n.style.top = "0", n.style.left = "0", n.style.opacity = "0", n.style.pointerEvents = "none", document.body.appendChild(n);
|
|
@@ -71,24 +72,28 @@ const U = (l) => {
|
|
|
71
72
|
document.body.removeChild(n);
|
|
72
73
|
}
|
|
73
74
|
};
|
|
74
|
-
function
|
|
75
|
+
function nt({
|
|
75
76
|
children: l,
|
|
76
77
|
defaultColDef: n,
|
|
77
78
|
defaultColGroupDef: i,
|
|
78
|
-
columnDefs:
|
|
79
|
+
columnDefs: g,
|
|
79
80
|
valueFormatters: m,
|
|
80
81
|
onGridReady: c,
|
|
81
82
|
onGridPreDestroyed: u,
|
|
82
83
|
onFilterChanged: b,
|
|
83
|
-
onSelectionChanged:
|
|
84
|
+
onSelectionChanged: h,
|
|
84
85
|
onModelUpdated: M,
|
|
85
|
-
ensureDomOrder: I = !
|
|
86
|
+
ensureDomOrder: I = !1,
|
|
86
87
|
autoSizeStrategy: T,
|
|
87
|
-
|
|
88
|
+
tooltipShowMode: O = "whenTruncated",
|
|
89
|
+
tooltipShowDelay: P = 500,
|
|
90
|
+
tooltipHideDelay: Q = 5e3,
|
|
91
|
+
tooltipInteraction: Y = !0,
|
|
92
|
+
...C
|
|
88
93
|
}) {
|
|
89
|
-
const a = S(null),
|
|
90
|
-
|
|
91
|
-
const [
|
|
94
|
+
const a = S(null), D = S(null), [H, _] = j(null);
|
|
95
|
+
He(H, D, T);
|
|
96
|
+
const [Z, V] = j(!1), [ee, W] = j(null), [te, K] = j(!1), E = S(null), L = S(null), A = S(null), re = f(() => [], []), ne = y(() => ({
|
|
92
97
|
numericColumn: {
|
|
93
98
|
cellClass: "ag-right-aligned-cell",
|
|
94
99
|
headerClass: "ag-right-aligned-header",
|
|
@@ -113,29 +118,29 @@ function Qe({
|
|
|
113
118
|
openSearch: (e) => {
|
|
114
119
|
if (!a.current) return;
|
|
115
120
|
const t = a.current.getGridOption("context") || {};
|
|
116
|
-
a.current.setGridOption("context", { ...t, activeSearchColumnId: e }), a.current.refreshHeader();
|
|
121
|
+
a.current.setGridOption("context", { ...t, activeSearchColumnId: e }), a.current.refreshHeader(), $(a.current);
|
|
117
122
|
},
|
|
118
123
|
closeSearch: () => {
|
|
119
124
|
if (!a.current) return;
|
|
120
125
|
const e = a.current.getGridOption("context") || {};
|
|
121
|
-
a.current.setGridOption("context", { ...e, activeSearchColumnId: null }), a.current.refreshHeader();
|
|
126
|
+
a.current.setGridOption("context", { ...e, activeSearchColumnId: null }), a.current.refreshHeader(), $(a.current);
|
|
122
127
|
},
|
|
123
128
|
openAdvancedFilter: (e) => {
|
|
124
|
-
|
|
129
|
+
W(e || null), V(!0);
|
|
125
130
|
},
|
|
126
131
|
closeAdvancedFilter: () => {
|
|
127
|
-
|
|
132
|
+
V(!1), W(null);
|
|
128
133
|
},
|
|
129
134
|
applyAdvancedFilter: (e) => {
|
|
130
135
|
if (!a.current) return;
|
|
131
|
-
const t =
|
|
136
|
+
const t = Ie(e);
|
|
132
137
|
a.current.setFilterModel(t), a.current.onFilterChanged(), a.current.refreshHeader();
|
|
133
138
|
},
|
|
134
139
|
openMenu: (e, t, o = "column") => {
|
|
135
|
-
E.current = e,
|
|
140
|
+
E.current = e, L.current = t, A.current = o, K(!0);
|
|
136
141
|
},
|
|
137
142
|
closeMenu: () => {
|
|
138
|
-
E.current = null,
|
|
143
|
+
E.current = null, L.current = null, A.current = null, K(!1);
|
|
139
144
|
},
|
|
140
145
|
// Getters read from refs - O(1) per header, no memory allocation
|
|
141
146
|
get activeMenuColumnId() {
|
|
@@ -144,33 +149,33 @@ function Qe({
|
|
|
144
149
|
get activeMenuVariant() {
|
|
145
150
|
return A.current;
|
|
146
151
|
}
|
|
147
|
-
}), []),
|
|
148
|
-
a.current = e.api,
|
|
152
|
+
}), []), oe = f((e) => {
|
|
153
|
+
a.current = e.api, _(e.api);
|
|
149
154
|
const t = e.api.getGridOption("context") || {};
|
|
150
155
|
e.api.setGridOption("context", { ...t, activeSearchColumnId: null }), c && c(e);
|
|
151
|
-
}, [c]),
|
|
156
|
+
}, [c]), le = f(
|
|
152
157
|
(e) => {
|
|
153
|
-
a.current = null,
|
|
158
|
+
a.current = null, _(null), u?.(e);
|
|
154
159
|
},
|
|
155
160
|
[u]
|
|
156
|
-
),
|
|
161
|
+
), ie = f(
|
|
157
162
|
(e) => {
|
|
158
163
|
e.api.getGridOption("context")?.activeSearchColumnId || e.api.refreshHeader(), b?.(e);
|
|
159
164
|
},
|
|
160
165
|
[b]
|
|
161
|
-
),
|
|
166
|
+
), se = f(
|
|
162
167
|
(e) => {
|
|
163
|
-
|
|
168
|
+
q(e.api) && e.api.refreshHeader(), h?.(e);
|
|
164
169
|
},
|
|
165
|
-
[
|
|
166
|
-
),
|
|
170
|
+
[h]
|
|
171
|
+
), ae = f(
|
|
167
172
|
(e) => {
|
|
168
|
-
e.api.getGridOption("rowModelType") !== "serverSide" &&
|
|
173
|
+
e.api.getGridOption("rowModelType") !== "serverSide" && q(e.api) && e.api.refreshHeader(), M?.(e);
|
|
169
174
|
},
|
|
170
175
|
[M]
|
|
171
176
|
);
|
|
172
|
-
|
|
173
|
-
const e =
|
|
177
|
+
be(() => {
|
|
178
|
+
const e = D.current;
|
|
174
179
|
if (!e) return;
|
|
175
180
|
const t = (o) => {
|
|
176
181
|
if (o.key !== "Enter" && o.key !== " ") return;
|
|
@@ -183,12 +188,12 @@ function Qe({
|
|
|
183
188
|
};
|
|
184
189
|
return e.addEventListener("keydown", t, !0), () => e.removeEventListener("keydown", t, !0);
|
|
185
190
|
}, []);
|
|
186
|
-
const
|
|
187
|
-
headerComponent:
|
|
191
|
+
const ce = y(() => ({
|
|
192
|
+
headerComponent: Ge,
|
|
188
193
|
// Default cell renderer wraps text in a span so display:flex centering
|
|
189
194
|
// and text-overflow:ellipsis both work (ellipsis doesn't work on
|
|
190
195
|
// anonymous flex text nodes, but works on flex child elements).
|
|
191
|
-
cellRenderer:
|
|
196
|
+
cellRenderer: we,
|
|
192
197
|
...n,
|
|
193
198
|
suppressHeaderKeyboardEvent: (e) => {
|
|
194
199
|
const { event: t } = e, o = t.target;
|
|
@@ -207,34 +212,34 @@ function Qe({
|
|
|
207
212
|
headerComponentParams: {
|
|
208
213
|
...n?.headerComponentParams
|
|
209
214
|
}
|
|
210
|
-
}), [n]),
|
|
211
|
-
headerGroupComponent:
|
|
215
|
+
}), [n]), ue = y(() => ({
|
|
216
|
+
headerGroupComponent: ke,
|
|
212
217
|
...i,
|
|
213
218
|
headerGroupComponentParams: {
|
|
214
219
|
...i?.headerGroupComponentParams
|
|
215
220
|
}
|
|
216
|
-
}), [i]),
|
|
217
|
-
...
|
|
221
|
+
}), [i]), de = y(() => ({
|
|
222
|
+
...De,
|
|
218
223
|
// Always available - value formatters
|
|
219
|
-
...
|
|
224
|
+
...C.components,
|
|
220
225
|
// User components override
|
|
221
226
|
...m
|
|
222
227
|
// Optional custom formatters override defaults
|
|
223
|
-
}), [m,
|
|
228
|
+
}), [m, C.components]), pe = f((e) => {
|
|
224
229
|
const t = e.value;
|
|
225
230
|
if (t == null || typeof t != "object") return t;
|
|
226
|
-
const o =
|
|
231
|
+
const o = z(e.column?.getColDef());
|
|
227
232
|
if (o && o.length > 0) {
|
|
228
|
-
const r =
|
|
233
|
+
const r = B(t, o);
|
|
229
234
|
if (o.length === 1) {
|
|
230
235
|
const d = o[0]?.field?.split(".").pop(), x = d ? t[d] : void 0;
|
|
231
236
|
return x && typeof x == "object" && "value" in x ? x.value ?? "" : r[0];
|
|
232
237
|
}
|
|
233
|
-
return
|
|
238
|
+
return N + r.join(F);
|
|
234
239
|
}
|
|
235
240
|
const s = 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);
|
|
236
241
|
return s.length === 0 ? "" : s.length === 1 ? s[0] : s.join(F);
|
|
237
|
-
}, []),
|
|
242
|
+
}, []), fe = f((e) => {
|
|
238
243
|
if (typeof e.value == "string") {
|
|
239
244
|
const t = e.value.trim();
|
|
240
245
|
if (t.startsWith("{") || t.startsWith("["))
|
|
@@ -245,10 +250,10 @@ function Qe({
|
|
|
245
250
|
}
|
|
246
251
|
}
|
|
247
252
|
return e.value;
|
|
248
|
-
}, []),
|
|
253
|
+
}, []), me = f((e) => {
|
|
249
254
|
const t = e?.data ?? "";
|
|
250
|
-
if (!t.includes(F) && !t.includes(
|
|
251
|
-
|
|
255
|
+
if (!t.includes(F) && !t.includes(N)) {
|
|
256
|
+
J(t);
|
|
252
257
|
return;
|
|
253
258
|
}
|
|
254
259
|
const o = [], s = t.split(`
|
|
@@ -259,25 +264,25 @@ function Qe({
|
|
|
259
264
|
o.push("");
|
|
260
265
|
continue;
|
|
261
266
|
}
|
|
262
|
-
const k = d.split(" ").map((p) => p.startsWith(
|
|
263
|
-
if (
|
|
267
|
+
const k = d.split(" ").map((p) => p.startsWith(N) ? { isSplit: !0, slots: p.slice(1).split(F) } : { isSplit: !1, slots: p.split(F) }), U = Math.max(1, ...k.map((p) => p.slots.length));
|
|
268
|
+
if (U === 1) {
|
|
264
269
|
o.push(k.map((p) => p.slots[0] ?? "").join(" "));
|
|
265
270
|
continue;
|
|
266
271
|
}
|
|
267
|
-
for (let p = 0; p <
|
|
268
|
-
const
|
|
269
|
-
o.push(
|
|
272
|
+
for (let p = 0; p < U; p++) {
|
|
273
|
+
const Ce = k.map((w) => !w.isSplit && w.slots.length === 1 ? w.slots[0] : w.slots[p] ?? "");
|
|
274
|
+
o.push(Ce.join(" "));
|
|
270
275
|
}
|
|
271
276
|
}
|
|
272
|
-
|
|
277
|
+
J(o.join(`
|
|
273
278
|
`));
|
|
274
279
|
}, []), G = f((e) => {
|
|
275
280
|
const t = e.value;
|
|
276
281
|
if (t == null) return "";
|
|
277
282
|
if (typeof t != "object") return String(t);
|
|
278
|
-
const o =
|
|
283
|
+
const o = z(e.column?.getColDef());
|
|
279
284
|
if (o && o.length > 0) {
|
|
280
|
-
const r =
|
|
285
|
+
const r = B(t, o);
|
|
281
286
|
return o.length === 1 ? r[0] : r.join(`
|
|
282
287
|
`);
|
|
283
288
|
}
|
|
@@ -293,118 +298,122 @@ function Qe({
|
|
|
293
298
|
}
|
|
294
299
|
return s.length === 0 ? "" : s.length === 1 ? s[0] : s.join(`
|
|
295
300
|
`);
|
|
296
|
-
}, []),
|
|
301
|
+
}, []), ge = y(() => ({
|
|
297
302
|
processCellCallback: G,
|
|
298
|
-
...
|
|
299
|
-
}), [G,
|
|
303
|
+
...C.defaultCsvExportParams ?? {}
|
|
304
|
+
}), [G, C.defaultCsvExportParams]), he = y(() => ({
|
|
300
305
|
processCellCallback: G,
|
|
301
|
-
...
|
|
302
|
-
}), [G,
|
|
303
|
-
return /* @__PURE__ */
|
|
304
|
-
/* @__PURE__ */ v("div", { ref:
|
|
305
|
-
|
|
306
|
+
...C.defaultExcelExportParams ?? {}
|
|
307
|
+
}), [G, C.defaultExcelExportParams]);
|
|
308
|
+
return /* @__PURE__ */ ye(je.Provider, { value: R, children: [
|
|
309
|
+
/* @__PURE__ */ v("div", { ref: D, "data-component": "ag-grid-react", style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ v(
|
|
310
|
+
Ae,
|
|
306
311
|
{
|
|
307
|
-
theme:
|
|
308
|
-
defaultColDef:
|
|
309
|
-
columnDefs:
|
|
312
|
+
theme: Re,
|
|
313
|
+
defaultColDef: ce,
|
|
314
|
+
columnDefs: g,
|
|
310
315
|
cellSelection: !0,
|
|
311
|
-
defaultColGroupDef:
|
|
312
|
-
onGridReady:
|
|
313
|
-
onGridPreDestroyed:
|
|
314
|
-
onFilterChanged:
|
|
315
|
-
onSelectionChanged:
|
|
316
|
-
onModelUpdated:
|
|
317
|
-
components:
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
316
|
+
defaultColGroupDef: ue,
|
|
317
|
+
onGridReady: oe,
|
|
318
|
+
onGridPreDestroyed: le,
|
|
319
|
+
onFilterChanged: ie,
|
|
320
|
+
onSelectionChanged: se,
|
|
321
|
+
onModelUpdated: ae,
|
|
322
|
+
components: de,
|
|
323
|
+
tooltipShowMode: O,
|
|
324
|
+
tooltipShowDelay: P,
|
|
325
|
+
tooltipHideDelay: Q,
|
|
326
|
+
tooltipInteraction: Y,
|
|
327
|
+
processCellForClipboard: pe,
|
|
328
|
+
processCellFromClipboard: fe,
|
|
329
|
+
sendToClipboard: me,
|
|
321
330
|
ensureDomOrder: I,
|
|
322
331
|
suppressHeaderFocus: !1,
|
|
323
332
|
suppressFocusAfterRefresh: !0,
|
|
324
333
|
suppressGroupRowsSticky: !0,
|
|
325
334
|
hidePaddedHeaderRows: !0,
|
|
326
335
|
suppressServerSideFullWidthLoadingRow: !0,
|
|
327
|
-
columnTypes:
|
|
336
|
+
columnTypes: ne,
|
|
328
337
|
autoSizeStrategy: T,
|
|
329
|
-
...
|
|
330
|
-
defaultCsvExportParams:
|
|
331
|
-
defaultExcelExportParams:
|
|
332
|
-
getMainMenuItems:
|
|
338
|
+
...C,
|
|
339
|
+
defaultCsvExportParams: ge,
|
|
340
|
+
defaultExcelExportParams: he,
|
|
341
|
+
getMainMenuItems: re
|
|
333
342
|
}
|
|
334
343
|
) }),
|
|
335
344
|
l,
|
|
336
345
|
/* @__PURE__ */ v(
|
|
337
|
-
|
|
346
|
+
Ne,
|
|
338
347
|
{
|
|
339
|
-
isOpen:
|
|
340
|
-
columnId:
|
|
341
|
-
gridApi:
|
|
348
|
+
isOpen: Z,
|
|
349
|
+
columnId: ee,
|
|
350
|
+
gridApi: H,
|
|
342
351
|
onClose: R.closeAdvancedFilter,
|
|
343
352
|
onApply: R.applyAdvancedFilter
|
|
344
353
|
}
|
|
345
354
|
),
|
|
346
355
|
/* @__PURE__ */ v(
|
|
347
|
-
|
|
356
|
+
_e,
|
|
348
357
|
{
|
|
349
|
-
isOpen:
|
|
358
|
+
isOpen: te,
|
|
350
359
|
columnId: E.current,
|
|
351
|
-
gridApi:
|
|
352
|
-
anchor:
|
|
360
|
+
gridApi: H,
|
|
361
|
+
anchor: L.current,
|
|
353
362
|
variant: A.current,
|
|
354
363
|
onClose: R.closeMenu
|
|
355
364
|
}
|
|
356
365
|
)
|
|
357
366
|
] });
|
|
358
367
|
}
|
|
359
|
-
function
|
|
368
|
+
function Ne({
|
|
360
369
|
isOpen: l,
|
|
361
370
|
columnId: n,
|
|
362
371
|
gridApi: i,
|
|
363
|
-
onClose:
|
|
372
|
+
onClose: g,
|
|
364
373
|
onApply: m
|
|
365
374
|
}) {
|
|
366
375
|
if (!l || !n || !i) return null;
|
|
367
376
|
const c = i.getColumn(n);
|
|
368
377
|
if (!c) return null;
|
|
369
|
-
const u = c.getColDef(), b = u.headerComponentParams,
|
|
370
|
-
return /* @__PURE__ */ v(
|
|
371
|
-
|
|
378
|
+
const u = c.getColDef(), b = u.headerComponentParams, h = Te(u), M = h.text !== -1 || h.number !== -1 || h.date !== -1, I = h.set !== -1, O = u.filter === "agMultiColumnFilter" && (M || I) ? "multi" : u.filter === "agNumberColumnFilter" ? "number" : u.filter === "agDateColumnFilter" ? "date" : u.filter === "agSetColumnFilter" || b?.selectOptions ? "select" : "text", P = Oe(i.getFilterModel());
|
|
379
|
+
return /* @__PURE__ */ v(xe, { fallback: null, children: /* @__PURE__ */ v(
|
|
380
|
+
Le,
|
|
372
381
|
{
|
|
373
382
|
isOpen: l,
|
|
374
|
-
onClose:
|
|
383
|
+
onClose: g,
|
|
375
384
|
onApply: m,
|
|
376
385
|
columnId: n,
|
|
377
386
|
columnLabel: u.headerName || n,
|
|
378
|
-
columnType:
|
|
387
|
+
columnType: O,
|
|
379
388
|
selectOptions: b?.selectOptions,
|
|
380
389
|
isMultiSelect: b?.isMultiSelect,
|
|
381
|
-
initialModel:
|
|
390
|
+
initialModel: P,
|
|
382
391
|
api: i
|
|
383
392
|
}
|
|
384
393
|
) });
|
|
385
394
|
}
|
|
386
|
-
function
|
|
395
|
+
function _e({
|
|
387
396
|
isOpen: l,
|
|
388
397
|
columnId: n,
|
|
389
398
|
gridApi: i,
|
|
390
|
-
anchor:
|
|
399
|
+
anchor: g,
|
|
391
400
|
variant: m,
|
|
392
401
|
onClose: c
|
|
393
402
|
}) {
|
|
394
403
|
return !l || !n || !i ? null : /* @__PURE__ */ v(
|
|
395
|
-
|
|
404
|
+
Pe,
|
|
396
405
|
{
|
|
397
406
|
isOpen: l,
|
|
398
407
|
columnId: n,
|
|
399
408
|
gridApi: i,
|
|
400
|
-
anchor:
|
|
409
|
+
anchor: g,
|
|
401
410
|
variant: m || "column",
|
|
402
411
|
onClose: c
|
|
403
412
|
}
|
|
404
413
|
);
|
|
405
414
|
}
|
|
406
415
|
export {
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
416
|
+
nt as AgGridWrapper,
|
|
417
|
+
it as subscribeGridApiEvent,
|
|
418
|
+
st as subscribeGridApiEvents
|
|
410
419
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { GridApi } from 'ag-grid-community';
|
|
2
|
+
/**
|
|
3
|
+
* Column-picker indicators read `activeSearchColumnId` from grid context.
|
|
4
|
+
* Opening/closing inline header search only updates context + refreshHeader,
|
|
5
|
+
* so notify indicator listeners through the existing filterChanged channel.
|
|
6
|
+
*/
|
|
7
|
+
export declare function notifyColumnIndicatorSync<TData = unknown>(gridApi: GridApi<TData>): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { themeQuartz as e, iconSetMaterial as r } from "ag-grid-enterprise";
|
|
2
|
-
const
|
|
2
|
+
const t = e.withPart(r).withParams({
|
|
3
3
|
accentColor: "#4259EE",
|
|
4
4
|
advancedFilterBuilderButtonBarBorder: !0,
|
|
5
5
|
borderColor: "#D9DDE7",
|
|
@@ -15,6 +15,7 @@ const d = e.withPart(r).withParams({
|
|
|
15
15
|
columnBorder: !0,
|
|
16
16
|
columnDropCellBorder: !0,
|
|
17
17
|
fontFamily: "inherit",
|
|
18
|
+
fontWeight: "inherit",
|
|
18
19
|
footerRowBorder: !0,
|
|
19
20
|
foregroundColor: "#0D152C",
|
|
20
21
|
headerBackgroundColor: "#F5F6FA",
|
|
@@ -23,7 +24,7 @@ const d = e.withPart(r).withParams({
|
|
|
23
24
|
headerFontSize: 14,
|
|
24
25
|
headerHeight: 40,
|
|
25
26
|
headerFontWeight: 700,
|
|
26
|
-
headerRowBorder:
|
|
27
|
+
headerRowBorder: { style: "solid", width: 1, color: "#D9DDE7" },
|
|
27
28
|
headerVerticalPaddingScale: 1,
|
|
28
29
|
headerColumnResizeHandleWidth: 0,
|
|
29
30
|
inputBorder: !1,
|
|
@@ -31,7 +32,7 @@ const d = e.withPart(r).withParams({
|
|
|
31
32
|
inputFocusBorder: !1,
|
|
32
33
|
inputFocusShadow: "none",
|
|
33
34
|
focusShadow: "none",
|
|
34
|
-
rowBorder:
|
|
35
|
+
rowBorder: { style: "solid", width: 1, color: "#D9DDE7" },
|
|
35
36
|
tabBarBorder: !0,
|
|
36
37
|
wrapperBorder: !0,
|
|
37
38
|
wrapperBorderRadius: 0,
|
|
@@ -40,10 +41,13 @@ const d = e.withPart(r).withParams({
|
|
|
40
41
|
menuBorder: !1,
|
|
41
42
|
menuShadow: "#00000040 0px 0px 2px 0px",
|
|
42
43
|
menuTextColor: "#1F2B4D",
|
|
44
|
+
tooltipBackgroundColor: "#1F2B4D",
|
|
45
|
+
tooltipTextColor: "#FFFFFF",
|
|
46
|
+
tooltipBorder: !1,
|
|
43
47
|
pinnedRowBackgroundColor: "#F4F1F9",
|
|
44
48
|
pinnedSourceRowBackgroundColor: "#F4F1F9",
|
|
45
49
|
pinnedRowBorder: !1
|
|
46
50
|
});
|
|
47
51
|
export {
|
|
48
|
-
|
|
52
|
+
t as customAgGridTheme
|
|
49
53
|
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
import { AgGridTooltipOverflowMode } from './ag-grid-tooltip-overflow';
|
|
3
|
+
type AgGridSetTooltip = (value: string, shouldDisplayTooltip?: () => boolean) => void;
|
|
4
|
+
export declare function useAgGridTruncationTooltip(setTooltip: AgGridSetTooltip | undefined, text: string, elementRef: RefObject<HTMLElement | null>, mode?: AgGridTooltipOverflowMode): void;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { useEffect as c } from "react";
|
|
2
|
+
import { isAgGridTextOverflowing as e } from "./ag-grid-tooltip-overflow.js";
|
|
3
|
+
function m(r, i, n, f = "line-clamp") {
|
|
4
|
+
c(() => {
|
|
5
|
+
!r || !i.trim() || r(i, () => {
|
|
6
|
+
const u = n.current;
|
|
7
|
+
return u ? e(u, f) : !1;
|
|
8
|
+
});
|
|
9
|
+
}, [r, i, n, f]);
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
m as useAgGridTruncationTooltip
|
|
13
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useEffect as a } from "react";
|
|
2
|
-
import { subscribeGridApiEvents as
|
|
3
|
-
import { refreshGridAutoSizeStrategy as
|
|
2
|
+
import { subscribeGridApiEvents as f } from "./grid-api-event-subscription.js";
|
|
3
|
+
import { refreshGridAutoSizeStrategy as l } from "./refreshGridAutoSizeStrategy.js";
|
|
4
4
|
function v(e, s, o) {
|
|
5
5
|
a(() => {
|
|
6
6
|
if (!e || !o)
|
|
@@ -11,16 +11,19 @@ function v(e, s, o) {
|
|
|
11
11
|
let n = 0, r = 0;
|
|
12
12
|
const c = () => {
|
|
13
13
|
cancelAnimationFrame(r), r = requestAnimationFrame(() => {
|
|
14
|
-
e.isDestroyed() ||
|
|
14
|
+
e.isDestroyed() || l(e);
|
|
15
15
|
});
|
|
16
16
|
}, m = new ResizeObserver(() => {
|
|
17
17
|
const i = t.clientWidth;
|
|
18
18
|
i <= 0 || i === n || (n = i, c());
|
|
19
19
|
});
|
|
20
20
|
n = t.clientWidth, m.observe(t);
|
|
21
|
-
const u =
|
|
21
|
+
const u = f(
|
|
22
22
|
e,
|
|
23
|
-
|
|
23
|
+
// columnVisible: user toggled column visibility in settings.
|
|
24
|
+
// Do NOT subscribe to displayedColumnsChanged — it fires during horizontal
|
|
25
|
+
// scroll when column virtualization swaps cells and would re-run autoSize.
|
|
26
|
+
["columnVisible"],
|
|
24
27
|
c
|
|
25
28
|
);
|
|
26
29
|
return () => {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { GridApi } from 'ag-grid-community';
|
|
2
|
+
import { NestedListItem } from '../nested-list/nested-list.types';
|
|
3
|
+
export interface ColumnItemData extends Record<string, unknown> {
|
|
4
|
+
hasSortApplied?: boolean;
|
|
5
|
+
hasFilterApplied?: boolean;
|
|
6
|
+
pinned?: 'left' | 'right' | null;
|
|
7
|
+
}
|
|
8
|
+
export interface BuildColumnTreeLabels {
|
|
9
|
+
frozenColumns: string;
|
|
10
|
+
scrollableColumns: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function buildColumnTreeFromGrid(gridApi: GridApi, labels: BuildColumnTreeLabels): NestedListItem[] | null;
|
|
13
|
+
export declare function findColumnTreeLeaf(items: NestedListItem[], columnId: string): NestedListItem | undefined;
|
|
14
|
+
export declare function countPinnedNestedColumns(gridApi: GridApi, prefix?: string): number;
|