impact-nova 2.1.0-alpha.4 → 2.1.0-alpha.5
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 +156 -148
- package/dist/components/data/ag-grid-react/theme.js +3 -0
- 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/data-table-column-apply.d.ts +16 -0
- package/dist/components/data/data-table/data-table-column-apply.js +18 -0
- package/dist/components/data/data-table/data-table-column-list.d.ts +13 -3
- package/dist/components/data/data-table/data-table-column-list.js +198 -191
- 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 +1 -1
- 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 +131 -113
- 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/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/select.js +86 -86
- package/dist/components/forms/select/select.variants.js +4 -4
- 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 +97 -0
- 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 +446 -413
- 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/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,67 +1,67 @@
|
|
|
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 Ce, jsx as v } from "react/jsx-runtime";
|
|
2
|
+
import { lazy as ye, useRef as S, useState as j, useCallback as f, useMemo as y, useEffect as ve, Suspense as be } from "react";
|
|
3
|
+
import { ModuleRegistry as xe, AllCommunityModule as Se, ValidationModule as Fe } from "ag-grid-community";
|
|
4
|
+
import { AllEnterpriseModule as Me } from "ag-grid-enterprise";
|
|
5
|
+
import { AgGridReact as Ee } from "ag-grid-react";
|
|
6
|
+
import { customAgGridTheme as Ae } from "./theme.js";
|
|
7
|
+
import { CustomHeader as Re } from "./headers/custom-header.js";
|
|
8
|
+
import { CustomHeaderGroup as Ge } from "./headers/custom-header-group.js";
|
|
9
|
+
import { DefaultTextCellRenderer as ke } from "./cell-renderers/default-text-cell-renderer.js";
|
|
10
|
+
import { GridHeaderContext as we } from "./headers/context/grid-header-context.js";
|
|
11
|
+
import { convertToAgGridFilterModel as je, getMultiFilterIndices as Te, convertFromAgGridFilterModel as Ie } from "./headers/utils/filter-utils.js";
|
|
12
|
+
import { ColumnSettingsMenu as Oe } from "./headers/column-menu/column-settings-menu.js";
|
|
13
|
+
import { AG_GRID_VALUE_FORMATTERS as Pe } from "./value-formatters.js";
|
|
14
|
+
import { useGridAutoSizeStrategyOnResize as De } from "./useGridAutoSizeStrategyOnResize.js";
|
|
15
|
+
import { subscribeGridApiEvent as ot, subscribeGridApiEvents as lt } from "./grid-api-event-subscription.js";
|
|
16
16
|
/* empty css */
|
|
17
|
-
const
|
|
17
|
+
const He = ye(
|
|
18
18
|
() => import("./headers/advanced-filter/advanced-filter-dialog.js").then((l) => ({
|
|
19
19
|
default: l.AdvancedFilterDialog
|
|
20
20
|
}))
|
|
21
21
|
);
|
|
22
|
-
|
|
23
|
-
const F = "",
|
|
24
|
-
function
|
|
22
|
+
xe.registerModules([Se, Me, Fe]);
|
|
23
|
+
const F = "", N = "";
|
|
24
|
+
function $(l) {
|
|
25
25
|
return l.getColumns()?.some((n) => n.getColDef().headerCheckboxSelection) ?? !1;
|
|
26
26
|
}
|
|
27
|
-
const
|
|
27
|
+
const q = (l) => {
|
|
28
28
|
if (!l) return;
|
|
29
29
|
const n = l.cellRendererParams?.splits;
|
|
30
30
|
if (Array.isArray(n) && n.length > 0) return n;
|
|
31
31
|
const i = l.cellEditorParams?.splits;
|
|
32
32
|
if (Array.isArray(i) && i.length > 0) return i;
|
|
33
|
-
},
|
|
33
|
+
}, z = (l, n) => {
|
|
34
34
|
const i = [];
|
|
35
|
-
for (const
|
|
36
|
-
const m =
|
|
35
|
+
for (const g of n) {
|
|
36
|
+
const m = g?.field?.split(".").pop();
|
|
37
37
|
if (!m) {
|
|
38
38
|
i.push("");
|
|
39
39
|
continue;
|
|
40
40
|
}
|
|
41
|
-
const
|
|
42
|
-
if (
|
|
41
|
+
const a = l[m];
|
|
42
|
+
if (a == null) {
|
|
43
43
|
i.push("");
|
|
44
44
|
continue;
|
|
45
45
|
}
|
|
46
|
-
if (typeof
|
|
47
|
-
const u =
|
|
46
|
+
if (typeof a == "object" && "value" in a) {
|
|
47
|
+
const u = a.value;
|
|
48
48
|
i.push(u == null ? "" : String(u));
|
|
49
49
|
continue;
|
|
50
50
|
}
|
|
51
|
-
if (typeof
|
|
52
|
-
i.push(String(
|
|
51
|
+
if (typeof a != "object") {
|
|
52
|
+
i.push(String(a));
|
|
53
53
|
continue;
|
|
54
54
|
}
|
|
55
55
|
i.push("");
|
|
56
56
|
}
|
|
57
57
|
return i;
|
|
58
|
-
},
|
|
58
|
+
}, B = (l) => {
|
|
59
59
|
if (typeof navigator < "u" && navigator.clipboard?.writeText) {
|
|
60
|
-
navigator.clipboard.writeText(l).catch(() =>
|
|
60
|
+
navigator.clipboard.writeText(l).catch(() => J(l));
|
|
61
61
|
return;
|
|
62
62
|
}
|
|
63
|
-
|
|
64
|
-
},
|
|
63
|
+
J(l);
|
|
64
|
+
}, J = (l) => {
|
|
65
65
|
if (typeof document > "u") return;
|
|
66
66
|
const n = document.createElement("textarea");
|
|
67
67
|
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 +71,28 @@ const U = (l) => {
|
|
|
71
71
|
document.body.removeChild(n);
|
|
72
72
|
}
|
|
73
73
|
};
|
|
74
|
-
function
|
|
74
|
+
function tt({
|
|
75
75
|
children: l,
|
|
76
76
|
defaultColDef: n,
|
|
77
77
|
defaultColGroupDef: i,
|
|
78
|
-
columnDefs:
|
|
78
|
+
columnDefs: g,
|
|
79
79
|
valueFormatters: m,
|
|
80
|
-
onGridReady:
|
|
80
|
+
onGridReady: a,
|
|
81
81
|
onGridPreDestroyed: u,
|
|
82
82
|
onFilterChanged: b,
|
|
83
|
-
onSelectionChanged:
|
|
83
|
+
onSelectionChanged: h,
|
|
84
84
|
onModelUpdated: M,
|
|
85
|
-
ensureDomOrder:
|
|
86
|
-
autoSizeStrategy:
|
|
87
|
-
|
|
85
|
+
ensureDomOrder: T = !1,
|
|
86
|
+
autoSizeStrategy: I,
|
|
87
|
+
tooltipShowMode: O = "whenTruncated",
|
|
88
|
+
tooltipShowDelay: P = 500,
|
|
89
|
+
tooltipHideDelay: X = 5e3,
|
|
90
|
+
tooltipInteraction: Q = !0,
|
|
91
|
+
...C
|
|
88
92
|
}) {
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
const [
|
|
93
|
+
const c = S(null), D = S(null), [H, _] = j(null);
|
|
94
|
+
De(H, D, I);
|
|
95
|
+
const [Y, V] = j(!1), [Z, W] = j(null), [ee, K] = j(!1), E = S(null), L = S(null), A = S(null), te = f(() => [], []), re = y(() => ({
|
|
92
96
|
numericColumn: {
|
|
93
97
|
cellClass: "ag-right-aligned-cell",
|
|
94
98
|
headerClass: "ag-right-aligned-header",
|
|
@@ -111,31 +115,31 @@ function Qe({
|
|
|
111
115
|
}
|
|
112
116
|
}), []), R = y(() => ({
|
|
113
117
|
openSearch: (e) => {
|
|
114
|
-
if (!
|
|
115
|
-
const t =
|
|
116
|
-
|
|
118
|
+
if (!c.current) return;
|
|
119
|
+
const t = c.current.getGridOption("context") || {};
|
|
120
|
+
c.current.setGridOption("context", { ...t, activeSearchColumnId: e }), c.current.refreshHeader();
|
|
117
121
|
},
|
|
118
122
|
closeSearch: () => {
|
|
119
|
-
if (!
|
|
120
|
-
const e =
|
|
121
|
-
|
|
123
|
+
if (!c.current) return;
|
|
124
|
+
const e = c.current.getGridOption("context") || {};
|
|
125
|
+
c.current.setGridOption("context", { ...e, activeSearchColumnId: null }), c.current.refreshHeader();
|
|
122
126
|
},
|
|
123
127
|
openAdvancedFilter: (e) => {
|
|
124
|
-
|
|
128
|
+
W(e || null), V(!0);
|
|
125
129
|
},
|
|
126
130
|
closeAdvancedFilter: () => {
|
|
127
|
-
|
|
131
|
+
V(!1), W(null);
|
|
128
132
|
},
|
|
129
133
|
applyAdvancedFilter: (e) => {
|
|
130
|
-
if (!
|
|
131
|
-
const t =
|
|
132
|
-
|
|
134
|
+
if (!c.current) return;
|
|
135
|
+
const t = je(e);
|
|
136
|
+
c.current.setFilterModel(t), c.current.onFilterChanged(), c.current.refreshHeader();
|
|
133
137
|
},
|
|
134
138
|
openMenu: (e, t, o = "column") => {
|
|
135
|
-
E.current = e,
|
|
139
|
+
E.current = e, L.current = t, A.current = o, K(!0);
|
|
136
140
|
},
|
|
137
141
|
closeMenu: () => {
|
|
138
|
-
E.current = null,
|
|
142
|
+
E.current = null, L.current = null, A.current = null, K(!1);
|
|
139
143
|
},
|
|
140
144
|
// Getters read from refs - O(1) per header, no memory allocation
|
|
141
145
|
get activeMenuColumnId() {
|
|
@@ -144,33 +148,33 @@ function Qe({
|
|
|
144
148
|
get activeMenuVariant() {
|
|
145
149
|
return A.current;
|
|
146
150
|
}
|
|
147
|
-
}), []),
|
|
148
|
-
|
|
151
|
+
}), []), ne = f((e) => {
|
|
152
|
+
c.current = e.api, _(e.api);
|
|
149
153
|
const t = e.api.getGridOption("context") || {};
|
|
150
|
-
e.api.setGridOption("context", { ...t, activeSearchColumnId: null }),
|
|
151
|
-
}, [
|
|
154
|
+
e.api.setGridOption("context", { ...t, activeSearchColumnId: null }), a && a(e);
|
|
155
|
+
}, [a]), oe = f(
|
|
152
156
|
(e) => {
|
|
153
|
-
|
|
157
|
+
c.current = null, _(null), u?.(e);
|
|
154
158
|
},
|
|
155
159
|
[u]
|
|
156
|
-
),
|
|
160
|
+
), le = f(
|
|
157
161
|
(e) => {
|
|
158
162
|
e.api.getGridOption("context")?.activeSearchColumnId || e.api.refreshHeader(), b?.(e);
|
|
159
163
|
},
|
|
160
164
|
[b]
|
|
161
|
-
),
|
|
165
|
+
), ie = f(
|
|
162
166
|
(e) => {
|
|
163
|
-
|
|
167
|
+
$(e.api) && e.api.refreshHeader(), h?.(e);
|
|
164
168
|
},
|
|
165
|
-
[
|
|
166
|
-
),
|
|
169
|
+
[h]
|
|
170
|
+
), se = f(
|
|
167
171
|
(e) => {
|
|
168
|
-
e.api.getGridOption("rowModelType") !== "serverSide" &&
|
|
172
|
+
e.api.getGridOption("rowModelType") !== "serverSide" && $(e.api) && e.api.refreshHeader(), M?.(e);
|
|
169
173
|
},
|
|
170
174
|
[M]
|
|
171
175
|
);
|
|
172
|
-
|
|
173
|
-
const e =
|
|
176
|
+
ve(() => {
|
|
177
|
+
const e = D.current;
|
|
174
178
|
if (!e) return;
|
|
175
179
|
const t = (o) => {
|
|
176
180
|
if (o.key !== "Enter" && o.key !== " ") return;
|
|
@@ -183,12 +187,12 @@ function Qe({
|
|
|
183
187
|
};
|
|
184
188
|
return e.addEventListener("keydown", t, !0), () => e.removeEventListener("keydown", t, !0);
|
|
185
189
|
}, []);
|
|
186
|
-
const
|
|
187
|
-
headerComponent:
|
|
190
|
+
const ae = y(() => ({
|
|
191
|
+
headerComponent: Re,
|
|
188
192
|
// Default cell renderer wraps text in a span so display:flex centering
|
|
189
193
|
// and text-overflow:ellipsis both work (ellipsis doesn't work on
|
|
190
194
|
// anonymous flex text nodes, but works on flex child elements).
|
|
191
|
-
cellRenderer:
|
|
195
|
+
cellRenderer: ke,
|
|
192
196
|
...n,
|
|
193
197
|
suppressHeaderKeyboardEvent: (e) => {
|
|
194
198
|
const { event: t } = e, o = t.target;
|
|
@@ -207,34 +211,34 @@ function Qe({
|
|
|
207
211
|
headerComponentParams: {
|
|
208
212
|
...n?.headerComponentParams
|
|
209
213
|
}
|
|
210
|
-
}), [n]),
|
|
211
|
-
headerGroupComponent:
|
|
214
|
+
}), [n]), ce = y(() => ({
|
|
215
|
+
headerGroupComponent: Ge,
|
|
212
216
|
...i,
|
|
213
217
|
headerGroupComponentParams: {
|
|
214
218
|
...i?.headerGroupComponentParams
|
|
215
219
|
}
|
|
216
|
-
}), [i]),
|
|
217
|
-
...
|
|
220
|
+
}), [i]), ue = y(() => ({
|
|
221
|
+
...Pe,
|
|
218
222
|
// Always available - value formatters
|
|
219
|
-
...
|
|
223
|
+
...C.components,
|
|
220
224
|
// User components override
|
|
221
225
|
...m
|
|
222
226
|
// Optional custom formatters override defaults
|
|
223
|
-
}), [m,
|
|
227
|
+
}), [m, C.components]), de = f((e) => {
|
|
224
228
|
const t = e.value;
|
|
225
229
|
if (t == null || typeof t != "object") return t;
|
|
226
|
-
const o =
|
|
230
|
+
const o = q(e.column?.getColDef());
|
|
227
231
|
if (o && o.length > 0) {
|
|
228
|
-
const r =
|
|
232
|
+
const r = z(t, o);
|
|
229
233
|
if (o.length === 1) {
|
|
230
234
|
const d = o[0]?.field?.split(".").pop(), x = d ? t[d] : void 0;
|
|
231
235
|
return x && typeof x == "object" && "value" in x ? x.value ?? "" : r[0];
|
|
232
236
|
}
|
|
233
|
-
return
|
|
237
|
+
return N + r.join(F);
|
|
234
238
|
}
|
|
235
239
|
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
240
|
return s.length === 0 ? "" : s.length === 1 ? s[0] : s.join(F);
|
|
237
|
-
}, []),
|
|
241
|
+
}, []), pe = f((e) => {
|
|
238
242
|
if (typeof e.value == "string") {
|
|
239
243
|
const t = e.value.trim();
|
|
240
244
|
if (t.startsWith("{") || t.startsWith("["))
|
|
@@ -245,10 +249,10 @@ function Qe({
|
|
|
245
249
|
}
|
|
246
250
|
}
|
|
247
251
|
return e.value;
|
|
248
|
-
}, []),
|
|
252
|
+
}, []), fe = f((e) => {
|
|
249
253
|
const t = e?.data ?? "";
|
|
250
|
-
if (!t.includes(F) && !t.includes(
|
|
251
|
-
|
|
254
|
+
if (!t.includes(F) && !t.includes(N)) {
|
|
255
|
+
B(t);
|
|
252
256
|
return;
|
|
253
257
|
}
|
|
254
258
|
const o = [], s = t.split(`
|
|
@@ -259,25 +263,25 @@ function Qe({
|
|
|
259
263
|
o.push("");
|
|
260
264
|
continue;
|
|
261
265
|
}
|
|
262
|
-
const k = d.split(" ").map((p) => p.startsWith(
|
|
263
|
-
if (
|
|
266
|
+
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));
|
|
267
|
+
if (U === 1) {
|
|
264
268
|
o.push(k.map((p) => p.slots[0] ?? "").join(" "));
|
|
265
269
|
continue;
|
|
266
270
|
}
|
|
267
|
-
for (let p = 0; p <
|
|
268
|
-
const
|
|
269
|
-
o.push(
|
|
271
|
+
for (let p = 0; p < U; p++) {
|
|
272
|
+
const he = k.map((w) => !w.isSplit && w.slots.length === 1 ? w.slots[0] : w.slots[p] ?? "");
|
|
273
|
+
o.push(he.join(" "));
|
|
270
274
|
}
|
|
271
275
|
}
|
|
272
|
-
|
|
276
|
+
B(o.join(`
|
|
273
277
|
`));
|
|
274
278
|
}, []), G = f((e) => {
|
|
275
279
|
const t = e.value;
|
|
276
280
|
if (t == null) return "";
|
|
277
281
|
if (typeof t != "object") return String(t);
|
|
278
|
-
const o =
|
|
282
|
+
const o = q(e.column?.getColDef());
|
|
279
283
|
if (o && o.length > 0) {
|
|
280
|
-
const r =
|
|
284
|
+
const r = z(t, o);
|
|
281
285
|
return o.length === 1 ? r[0] : r.join(`
|
|
282
286
|
`);
|
|
283
287
|
}
|
|
@@ -293,118 +297,122 @@ function Qe({
|
|
|
293
297
|
}
|
|
294
298
|
return s.length === 0 ? "" : s.length === 1 ? s[0] : s.join(`
|
|
295
299
|
`);
|
|
296
|
-
}, []),
|
|
300
|
+
}, []), me = y(() => ({
|
|
297
301
|
processCellCallback: G,
|
|
298
|
-
...
|
|
299
|
-
}), [G,
|
|
302
|
+
...C.defaultCsvExportParams ?? {}
|
|
303
|
+
}), [G, C.defaultCsvExportParams]), ge = y(() => ({
|
|
300
304
|
processCellCallback: G,
|
|
301
|
-
...
|
|
302
|
-
}), [G,
|
|
303
|
-
return /* @__PURE__ */
|
|
304
|
-
/* @__PURE__ */ v("div", { ref:
|
|
305
|
-
|
|
305
|
+
...C.defaultExcelExportParams ?? {}
|
|
306
|
+
}), [G, C.defaultExcelExportParams]);
|
|
307
|
+
return /* @__PURE__ */ Ce(we.Provider, { value: R, children: [
|
|
308
|
+
/* @__PURE__ */ v("div", { ref: D, "data-component": "ag-grid-react", style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ v(
|
|
309
|
+
Ee,
|
|
306
310
|
{
|
|
307
|
-
theme:
|
|
308
|
-
defaultColDef:
|
|
309
|
-
columnDefs:
|
|
311
|
+
theme: Ae,
|
|
312
|
+
defaultColDef: ae,
|
|
313
|
+
columnDefs: g,
|
|
310
314
|
cellSelection: !0,
|
|
311
|
-
defaultColGroupDef:
|
|
312
|
-
onGridReady:
|
|
313
|
-
onGridPreDestroyed:
|
|
314
|
-
onFilterChanged:
|
|
315
|
-
onSelectionChanged:
|
|
316
|
-
onModelUpdated:
|
|
317
|
-
components:
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
315
|
+
defaultColGroupDef: ce,
|
|
316
|
+
onGridReady: ne,
|
|
317
|
+
onGridPreDestroyed: oe,
|
|
318
|
+
onFilterChanged: le,
|
|
319
|
+
onSelectionChanged: ie,
|
|
320
|
+
onModelUpdated: se,
|
|
321
|
+
components: ue,
|
|
322
|
+
tooltipShowMode: O,
|
|
323
|
+
tooltipShowDelay: P,
|
|
324
|
+
tooltipHideDelay: X,
|
|
325
|
+
tooltipInteraction: Q,
|
|
326
|
+
processCellForClipboard: de,
|
|
327
|
+
processCellFromClipboard: pe,
|
|
328
|
+
sendToClipboard: fe,
|
|
329
|
+
ensureDomOrder: T,
|
|
322
330
|
suppressHeaderFocus: !1,
|
|
323
331
|
suppressFocusAfterRefresh: !0,
|
|
324
332
|
suppressGroupRowsSticky: !0,
|
|
325
333
|
hidePaddedHeaderRows: !0,
|
|
326
334
|
suppressServerSideFullWidthLoadingRow: !0,
|
|
327
|
-
columnTypes:
|
|
328
|
-
autoSizeStrategy:
|
|
329
|
-
...
|
|
330
|
-
defaultCsvExportParams:
|
|
331
|
-
defaultExcelExportParams:
|
|
332
|
-
getMainMenuItems:
|
|
335
|
+
columnTypes: re,
|
|
336
|
+
autoSizeStrategy: I,
|
|
337
|
+
...C,
|
|
338
|
+
defaultCsvExportParams: me,
|
|
339
|
+
defaultExcelExportParams: ge,
|
|
340
|
+
getMainMenuItems: te
|
|
333
341
|
}
|
|
334
342
|
) }),
|
|
335
343
|
l,
|
|
336
344
|
/* @__PURE__ */ v(
|
|
337
|
-
|
|
345
|
+
Le,
|
|
338
346
|
{
|
|
339
|
-
isOpen:
|
|
340
|
-
columnId:
|
|
341
|
-
gridApi:
|
|
347
|
+
isOpen: Y,
|
|
348
|
+
columnId: Z,
|
|
349
|
+
gridApi: H,
|
|
342
350
|
onClose: R.closeAdvancedFilter,
|
|
343
351
|
onApply: R.applyAdvancedFilter
|
|
344
352
|
}
|
|
345
353
|
),
|
|
346
354
|
/* @__PURE__ */ v(
|
|
347
|
-
|
|
355
|
+
Ne,
|
|
348
356
|
{
|
|
349
|
-
isOpen:
|
|
357
|
+
isOpen: ee,
|
|
350
358
|
columnId: E.current,
|
|
351
|
-
gridApi:
|
|
352
|
-
anchor:
|
|
359
|
+
gridApi: H,
|
|
360
|
+
anchor: L.current,
|
|
353
361
|
variant: A.current,
|
|
354
362
|
onClose: R.closeMenu
|
|
355
363
|
}
|
|
356
364
|
)
|
|
357
365
|
] });
|
|
358
366
|
}
|
|
359
|
-
function
|
|
367
|
+
function Le({
|
|
360
368
|
isOpen: l,
|
|
361
369
|
columnId: n,
|
|
362
370
|
gridApi: i,
|
|
363
|
-
onClose:
|
|
371
|
+
onClose: g,
|
|
364
372
|
onApply: m
|
|
365
373
|
}) {
|
|
366
374
|
if (!l || !n || !i) return null;
|
|
367
|
-
const
|
|
368
|
-
if (!
|
|
369
|
-
const u =
|
|
370
|
-
return /* @__PURE__ */ v(
|
|
371
|
-
|
|
375
|
+
const a = i.getColumn(n);
|
|
376
|
+
if (!a) return null;
|
|
377
|
+
const u = a.getColDef(), b = u.headerComponentParams, h = Te(u), M = h.text !== -1 || h.number !== -1 || h.date !== -1, T = h.set !== -1, O = u.filter === "agMultiColumnFilter" && (M || T) ? "multi" : u.filter === "agNumberColumnFilter" ? "number" : u.filter === "agDateColumnFilter" ? "date" : u.filter === "agSetColumnFilter" || b?.selectOptions ? "select" : "text", P = Ie(i.getFilterModel());
|
|
378
|
+
return /* @__PURE__ */ v(be, { fallback: null, children: /* @__PURE__ */ v(
|
|
379
|
+
He,
|
|
372
380
|
{
|
|
373
381
|
isOpen: l,
|
|
374
|
-
onClose:
|
|
382
|
+
onClose: g,
|
|
375
383
|
onApply: m,
|
|
376
384
|
columnId: n,
|
|
377
385
|
columnLabel: u.headerName || n,
|
|
378
|
-
columnType:
|
|
386
|
+
columnType: O,
|
|
379
387
|
selectOptions: b?.selectOptions,
|
|
380
388
|
isMultiSelect: b?.isMultiSelect,
|
|
381
|
-
initialModel:
|
|
389
|
+
initialModel: P,
|
|
382
390
|
api: i
|
|
383
391
|
}
|
|
384
392
|
) });
|
|
385
393
|
}
|
|
386
|
-
function
|
|
394
|
+
function Ne({
|
|
387
395
|
isOpen: l,
|
|
388
396
|
columnId: n,
|
|
389
397
|
gridApi: i,
|
|
390
|
-
anchor:
|
|
398
|
+
anchor: g,
|
|
391
399
|
variant: m,
|
|
392
|
-
onClose:
|
|
400
|
+
onClose: a
|
|
393
401
|
}) {
|
|
394
402
|
return !l || !n || !i ? null : /* @__PURE__ */ v(
|
|
395
|
-
|
|
403
|
+
Oe,
|
|
396
404
|
{
|
|
397
405
|
isOpen: l,
|
|
398
406
|
columnId: n,
|
|
399
407
|
gridApi: i,
|
|
400
|
-
anchor:
|
|
408
|
+
anchor: g,
|
|
401
409
|
variant: m || "column",
|
|
402
|
-
onClose:
|
|
410
|
+
onClose: a
|
|
403
411
|
}
|
|
404
412
|
);
|
|
405
413
|
}
|
|
406
414
|
export {
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
415
|
+
tt as AgGridWrapper,
|
|
416
|
+
ot as subscribeGridApiEvent,
|
|
417
|
+
lt as subscribeGridApiEvents
|
|
410
418
|
};
|
|
@@ -40,6 +40,9 @@ const d = e.withPart(r).withParams({
|
|
|
40
40
|
menuBorder: !1,
|
|
41
41
|
menuShadow: "#00000040 0px 0px 2px 0px",
|
|
42
42
|
menuTextColor: "#1F2B4D",
|
|
43
|
+
tooltipBackgroundColor: "#1F2B4D",
|
|
44
|
+
tooltipTextColor: "#FFFFFF",
|
|
45
|
+
tooltipBorder: !1,
|
|
43
46
|
pinnedRowBackgroundColor: "#F4F1F9",
|
|
44
47
|
pinnedSourceRowBackgroundColor: "#F4F1F9",
|
|
45
48
|
pinnedRowBorder: !1
|
|
@@ -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,16 @@
|
|
|
1
|
+
import { ColumnPinnedType, GridApi } from 'ag-grid-community';
|
|
2
|
+
/** Debounce window for coalescing external grid column events into one UI sync. */
|
|
3
|
+
export declare const EXTERNAL_SYNC_DEBOUNCE_MS = 150;
|
|
4
|
+
/**
|
|
5
|
+
* Fallback when AG Grid may asynchronously reject a new pin (pinned viewport full).
|
|
6
|
+
* Event-driven detection is primary; this only covers the "no rejection fired" path.
|
|
7
|
+
*/
|
|
8
|
+
export declare const GRID_AUTO_UNPIN_WAIT_MS = 300;
|
|
9
|
+
export type NormalizedColumnPin = 'left' | 'right' | null;
|
|
10
|
+
export declare function normalizeColumnPinned(pinned: ColumnPinnedType | boolean | null | undefined): NormalizedColumnPin;
|
|
11
|
+
export declare function readGridColumnPinned(gridApi: GridApi, columnId: string): NormalizedColumnPin;
|
|
12
|
+
/**
|
|
13
|
+
* Run after `applyColumnState` returns. AG Grid applies pin/order/hide synchronously;
|
|
14
|
+
* `queueMicrotask` lets any same-turn grid events finish before we release the panel lock.
|
|
15
|
+
*/
|
|
16
|
+
export declare function afterSynchronousColumnApply(onSettled: () => void): void;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const e = 150, o = 300;
|
|
2
|
+
function u(n) {
|
|
3
|
+
return n === "left" || n === !0 ? "left" : n === "right" ? "right" : null;
|
|
4
|
+
}
|
|
5
|
+
function l(n, r) {
|
|
6
|
+
const t = n.getColumn(r);
|
|
7
|
+
return t ? u(t.getPinned()) : null;
|
|
8
|
+
}
|
|
9
|
+
function i(n) {
|
|
10
|
+
queueMicrotask(n);
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
e as EXTERNAL_SYNC_DEBOUNCE_MS,
|
|
14
|
+
o as GRID_AUTO_UNPIN_WAIT_MS,
|
|
15
|
+
i as afterSynchronousColumnApply,
|
|
16
|
+
u as normalizeColumnPinned,
|
|
17
|
+
l as readGridColumnPinned
|
|
18
|
+
};
|
|
@@ -1,8 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Column visibility, order, and pin picker backed by AG Grid `gridApi`.
|
|
3
|
+
* Must render inside `DataTable` (reads `useDataTable().gridApi`).
|
|
4
|
+
*/
|
|
5
|
+
export type DataTableColumnListProps = {
|
|
6
|
+
/**
|
|
7
|
+
* When `true`, column changes stay staged until the user clicks Apply (Discard resets).
|
|
8
|
+
* When `false` (default), visibility, order, and pin updates apply to the grid immediately.
|
|
9
|
+
*/
|
|
2
10
|
enableApplyDiscard?: boolean;
|
|
11
|
+
/** Show the search field that filters the column tree. Default `true`. */
|
|
3
12
|
showSearch?: boolean;
|
|
13
|
+
/** Show the select-all control for column visibility. Default `true`. */
|
|
4
14
|
showSelectAll?: boolean;
|
|
15
|
+
/** Show collapse/expand controls on nested column group headers. Default `true`. */
|
|
5
16
|
showCollapse?: boolean;
|
|
6
|
-
}
|
|
17
|
+
};
|
|
7
18
|
export declare const DataTableColumnList: ({ enableApplyDiscard, showSearch, showSelectAll, showCollapse }: DataTableColumnListProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export {};
|