impact-nova 3.0.0-alpha.12 → 3.0.0-alpha.14
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-list.d.ts +3 -1
- package/dist/components/data/ag-grid-react/ag-grid-list.demo-board.d.ts +46 -0
- package/dist/components/data/ag-grid-react/ag-grid-list.js +9 -8
- package/dist/components/data/ag-grid-react/ag-grid-list.key-attributes.d.ts +1 -0
- package/dist/components/data/ag-grid-react/ag-grid.types.d.ts +50 -3
- package/dist/components/data/ag-grid-react/build-list-drag-column-defs.d.ts +8 -0
- package/dist/components/data/ag-grid-react/build-list-drag-column-defs.js +28 -0
- package/dist/components/data/ag-grid-react/cell-renderers/drag-handle-cell-renderer.d.ts +18 -0
- package/dist/components/data/ag-grid-react/cell-renderers/drag-handle-cell-renderer.js +32 -0
- package/dist/components/data/ag-grid-react/cell-renderers/editors/list-select-cell-editor.js +66 -55
- package/dist/components/data/ag-grid-react/headers/custom-header.js +109 -107
- package/dist/components/data/ag-grid-react/index.d.ts +5 -1
- package/dist/components/data/ag-grid-react/index.js +250 -201
- package/dist/components/data/ag-grid-react/list-drag-grid-options.d.ts +21 -0
- package/dist/components/data/ag-grid-react/list-drag-grid-options.js +46 -0
- package/dist/components/data/ag-grid-react/list-row-move.d.ts +84 -0
- package/dist/components/data/ag-grid-react/list-row-move.js +74 -0
- package/dist/components/data/ag-grid-react/use-ag-grid-list-drag.d.ts +59 -0
- package/dist/components/data/ag-grid-react/use-ag-grid-list-drag.js +139 -0
- package/dist/components/data/ag-grid-react/use-list-drag-preview.d.ts +17 -0
- package/dist/components/data/ag-grid-react/use-list-drag-preview.js +49 -0
- package/dist/components/data/ag-grid-react/use-list-row-drop-zones.d.ts +44 -0
- package/dist/components/data/ag-grid-react/use-list-row-drop-zones.js +73 -0
- package/dist/components/data/data-table/data-table-list-header.d.ts +7 -0
- package/dist/components/data/data-table/data-table-list-header.js +31 -0
- package/dist/components/data/data-table/data-table.js +35 -34
- package/dist/components/data/data-table/data-table.types.d.ts +12 -2
- package/dist/components/data/data-table/index.d.ts +6 -0
- package/dist/components/data/data-table/index.js +63 -57
- package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +3 -2
- package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +3 -2
- package/dist/components/feedback/tooltip/tab-tooltip-render.js +3 -2
- package/dist/components/flows/command-palette/shortcut-settings.js +10 -10
- package/dist/components/flows/filter-panel/filter-panel.js +4 -4
- package/dist/components/forms/select/components/SelectTriggerValue.js +3 -2
- package/dist/components/forms/select/components/Submenu.js +3 -2
- package/dist/components/primitives/iris/iris.js +20 -18
- package/dist/impact-nova-components.css +71 -0
- package/dist/impact-nova-tokens.scss +2 -0
- package/dist/impact-nova.css +1 -1
- package/dist/index.js +314 -308
- package/dist/llms/rules/ag-grid.js +1 -1
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/real-world-patterns.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/dist/tailwind.config.js +3 -0
- package/dist/theme/tailwind-colors.js +3 -0
- package/package.json +1 -1
|
@@ -1,111 +1,121 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { lazy as
|
|
3
|
-
import { ModuleRegistry as
|
|
4
|
-
import { AllEnterpriseModule as
|
|
5
|
-
import { AgGridReact as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
1
|
+
import { jsxs as Pe, jsx as w } from "react/jsx-runtime";
|
|
2
|
+
import { lazy as Ne, useRef as _, useState as P, useId as Ve, useEffect as Z, useCallback as f, useMemo as h, Suspense as We } from "react";
|
|
3
|
+
import { ModuleRegistry as Ke, AllCommunityModule as $e } from "ag-grid-community";
|
|
4
|
+
import { AllEnterpriseModule as Ue } from "ag-grid-enterprise";
|
|
5
|
+
import { AgGridReact as qe } from "ag-grid-react";
|
|
6
|
+
import { useAgGridDragList as ze } from "./use-ag-grid-list-drag.js";
|
|
7
|
+
import { customAgGridTheme as Xe } from "./theme.js";
|
|
8
|
+
import { AG_GRID_LIST_ROW_HEIGHT_PX as Je, customAgGridListTheme as Ze } from "./ag-grid-list.js";
|
|
9
|
+
import { AG_GRID_LIST_RANK_GRADIENT as Lt } from "./ag-grid-list.js";
|
|
10
|
+
import { syncAgGridThemeMode as Be } from "./sync-ag-grid-theme-mode.js";
|
|
11
|
+
import { CustomHeader as Qe } from "./headers/custom-header.js";
|
|
12
|
+
import { CustomHeaderGroup as B } from "./headers/custom-inner-header-group.js";
|
|
13
|
+
import { mergeColumnGroupDefsWithDefault as Ye } from "./merge-column-group-defs.js";
|
|
14
|
+
import { DefaultTextCellRenderer as et } from "./cell-renderers/default-text-cell-renderer.js";
|
|
15
|
+
import { GridHeaderContext as tt } from "./headers/context/grid-header-context.js";
|
|
16
|
+
import { convertToAgGridFilterModel as rt, getMultiFilterIndices as nt, convertFromAgGridFilterModel as ot } from "./headers/utils/filter-utils.js";
|
|
17
|
+
import { AG_GRID_VALUE_FORMATTERS as lt } from "./value-formatters.js";
|
|
18
|
+
import { useGridAutoSizeStrategyOnResize as it } from "./useGridAutoSizeStrategyOnResize.js";
|
|
19
|
+
import { subscribeGridApiEvent as Ht, subscribeGridApiEvents as jt } from "./grid-api-event-subscription.js";
|
|
20
|
+
import { notifyColumnIndicatorSync as D } from "./notify-column-indicator-sync.js";
|
|
21
|
+
import { setActiveSearchColumnId as N, clearHeaderSearchActiveState as at } from "./headers/header-search-active-state.js";
|
|
20
22
|
/* empty css */
|
|
21
|
-
import { useAgGridTruncationTooltip as
|
|
22
|
-
import {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
import { useAgGridTruncationTooltip as _t } from "./use-ag-grid-truncation-tooltip.js";
|
|
24
|
+
import { useListRowDropZones as Nt } from "./use-list-row-drop-zones.js";
|
|
25
|
+
import { isAgGridHeaderLabelTooltipOverflowing as Wt, isAgGridTextOverflowing as Kt } from "./ag-grid-tooltip-overflow.js";
|
|
26
|
+
const st = Ne(
|
|
27
|
+
() => import("./headers/advanced-filter/advanced-filter-dialog.js").then((s) => ({
|
|
28
|
+
default: s.AdvancedFilterDialog
|
|
26
29
|
}))
|
|
27
30
|
);
|
|
28
|
-
|
|
29
|
-
const
|
|
30
|
-
if (!
|
|
31
|
-
const n =
|
|
31
|
+
Ke.registerModules([$e, Ue]);
|
|
32
|
+
const S = "", V = "", Q = (s) => {
|
|
33
|
+
if (!s) return;
|
|
34
|
+
const n = s.cellRendererParams?.splits;
|
|
32
35
|
if (Array.isArray(n) && n.length > 0) return n;
|
|
33
|
-
const
|
|
34
|
-
if (Array.isArray(
|
|
35
|
-
},
|
|
36
|
-
const
|
|
37
|
-
for (const
|
|
38
|
-
const
|
|
39
|
-
if (!
|
|
40
|
-
|
|
36
|
+
const a = s.cellEditorParams?.splits;
|
|
37
|
+
if (Array.isArray(a) && a.length > 0) return a;
|
|
38
|
+
}, Y = (s, n) => {
|
|
39
|
+
const a = [];
|
|
40
|
+
for (const C of n) {
|
|
41
|
+
const v = C?.field?.split(".").pop();
|
|
42
|
+
if (!v) {
|
|
43
|
+
a.push("");
|
|
41
44
|
continue;
|
|
42
45
|
}
|
|
43
|
-
const
|
|
44
|
-
if (
|
|
45
|
-
|
|
46
|
+
const d = s[v];
|
|
47
|
+
if (d == null) {
|
|
48
|
+
a.push("");
|
|
46
49
|
continue;
|
|
47
50
|
}
|
|
48
|
-
if (typeof
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
+
if (typeof d == "object" && "value" in d) {
|
|
52
|
+
const p = d.value;
|
|
53
|
+
a.push(p == null ? "" : String(p));
|
|
51
54
|
continue;
|
|
52
55
|
}
|
|
53
|
-
if (typeof
|
|
54
|
-
|
|
56
|
+
if (typeof d != "object") {
|
|
57
|
+
a.push(String(d));
|
|
55
58
|
continue;
|
|
56
59
|
}
|
|
57
|
-
|
|
60
|
+
a.push("");
|
|
58
61
|
}
|
|
59
|
-
return
|
|
60
|
-
}, ee = (
|
|
62
|
+
return a;
|
|
63
|
+
}, ee = (s) => {
|
|
61
64
|
if (typeof navigator < "u" && navigator.clipboard?.writeText) {
|
|
62
|
-
navigator.clipboard.writeText(
|
|
65
|
+
navigator.clipboard.writeText(s).catch(() => te(s));
|
|
63
66
|
return;
|
|
64
67
|
}
|
|
65
|
-
te(
|
|
66
|
-
}, te = (
|
|
68
|
+
te(s);
|
|
69
|
+
}, te = (s) => {
|
|
67
70
|
if (typeof document > "u") return;
|
|
68
71
|
const n = document.createElement("textarea");
|
|
69
|
-
n.value =
|
|
72
|
+
n.value = s, 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);
|
|
70
73
|
try {
|
|
71
74
|
n.select(), document.execCommand("copy");
|
|
72
75
|
} finally {
|
|
73
76
|
document.body.removeChild(n);
|
|
74
77
|
}
|
|
75
78
|
};
|
|
76
|
-
function
|
|
77
|
-
children:
|
|
79
|
+
function Mt({
|
|
80
|
+
children: s,
|
|
78
81
|
defaultColDef: n,
|
|
79
|
-
defaultColGroupDef:
|
|
80
|
-
columnDefs:
|
|
81
|
-
valueFormatters:
|
|
82
|
-
onGridReady:
|
|
83
|
-
onGridPreDestroyed:
|
|
82
|
+
defaultColGroupDef: a,
|
|
83
|
+
columnDefs: C,
|
|
84
|
+
valueFormatters: v,
|
|
85
|
+
onGridReady: d,
|
|
86
|
+
onGridPreDestroyed: p,
|
|
84
87
|
onFilterChanged: x,
|
|
85
|
-
onSelectionChanged:
|
|
86
|
-
onModelUpdated:
|
|
87
|
-
ensureDomOrder:
|
|
88
|
-
autoSizeStrategy:
|
|
89
|
-
tooltipShowMode:
|
|
90
|
-
tooltipShowDelay:
|
|
88
|
+
onSelectionChanged: y,
|
|
89
|
+
onModelUpdated: F,
|
|
90
|
+
ensureDomOrder: M = !1,
|
|
91
|
+
autoSizeStrategy: T,
|
|
92
|
+
tooltipShowMode: I = "whenTruncated",
|
|
93
|
+
tooltipShowDelay: L = 500,
|
|
91
94
|
tooltipHideDelay: re = 5e3,
|
|
92
95
|
tooltipInteraction: ne = !0,
|
|
93
96
|
themeOverride: oe,
|
|
94
97
|
variant: W = "table",
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
+
listRowGradient: le,
|
|
99
|
+
listDragPreview: ie,
|
|
100
|
+
listHeader: ae = "columns",
|
|
101
|
+
onRowReorder: se,
|
|
102
|
+
isRowDragDisabled: ce,
|
|
103
|
+
getRowDragHandleLabel: ue,
|
|
104
|
+
canDropRow: de,
|
|
105
|
+
rowLoading: pe = !1,
|
|
106
|
+
className: K,
|
|
107
|
+
...c
|
|
98
108
|
}) {
|
|
99
|
-
const
|
|
100
|
-
|
|
109
|
+
const u = _(null), R = _(null), [$, U] = P(null), q = Ve(), b = _(q);
|
|
110
|
+
b.current = q, it($, R, T), Z(() => {
|
|
101
111
|
const e = document.documentElement, t = () => {
|
|
102
|
-
|
|
112
|
+
Be(e.classList.contains("dark") ? "dark" : "light", e);
|
|
103
113
|
};
|
|
104
114
|
t();
|
|
105
115
|
const o = new MutationObserver(t);
|
|
106
116
|
return o.observe(e, { attributes: !0, attributeFilter: ["class"] }), () => o.disconnect();
|
|
107
117
|
}, []);
|
|
108
|
-
const [
|
|
118
|
+
const [me, z] = P(!1), [fe, X] = P(null), ge = f(() => [], []), he = h(() => ({
|
|
109
119
|
numericColumn: {
|
|
110
120
|
cellClass: "ag-right-aligned-cell",
|
|
111
121
|
headerClass: "ag-right-aligned-header",
|
|
@@ -127,16 +137,16 @@ function ft({
|
|
|
127
137
|
filter: "agDateColumnFilter"
|
|
128
138
|
}
|
|
129
139
|
}), []), k = h(() => ({
|
|
130
|
-
gridScopeId:
|
|
140
|
+
gridScopeId: b.current,
|
|
131
141
|
openSearch: (e) => {
|
|
132
|
-
if (!
|
|
133
|
-
const t =
|
|
134
|
-
|
|
142
|
+
if (!u.current) return;
|
|
143
|
+
const t = u.current.getGridOption("context") || {};
|
|
144
|
+
u.current.setGridOption("context", { ...t, activeSearchColumnId: e }), N(b.current, e), D(u.current);
|
|
135
145
|
},
|
|
136
146
|
closeSearch: () => {
|
|
137
|
-
if (!
|
|
138
|
-
const e =
|
|
139
|
-
|
|
147
|
+
if (!u.current) return;
|
|
148
|
+
const e = u.current.getGridOption("context") || {};
|
|
149
|
+
u.current.setGridOption("context", { ...e, activeSearchColumnId: null }), N(b.current, null), D(u.current);
|
|
140
150
|
},
|
|
141
151
|
openAdvancedFilter: (e) => {
|
|
142
152
|
X(e || null), z(!0);
|
|
@@ -145,41 +155,41 @@ function ft({
|
|
|
145
155
|
z(!1), X(null);
|
|
146
156
|
},
|
|
147
157
|
applyAdvancedFilter: (e) => {
|
|
148
|
-
if (!
|
|
149
|
-
const t =
|
|
150
|
-
|
|
158
|
+
if (!u.current) return;
|
|
159
|
+
const t = rt(e);
|
|
160
|
+
u.current.setFilterModel(t), u.current.onFilterChanged(), D(u.current);
|
|
151
161
|
}
|
|
152
|
-
}), []),
|
|
153
|
-
|
|
162
|
+
}), []), Ce = f((e) => {
|
|
163
|
+
u.current = e.api, U(e.api);
|
|
154
164
|
const t = e.api.getGridOption("context") || {};
|
|
155
165
|
e.api.setGridOption("context", {
|
|
156
166
|
...t,
|
|
157
167
|
activeSearchColumnId: null,
|
|
158
|
-
headerSearchScopeId:
|
|
159
|
-
}), N(
|
|
160
|
-
}, [
|
|
168
|
+
headerSearchScopeId: b.current
|
|
169
|
+
}), N(b.current, null), d && d(e);
|
|
170
|
+
}, [d]), ve = f(
|
|
161
171
|
(e) => {
|
|
162
|
-
|
|
172
|
+
at(b.current), u.current = null, U(null), p?.(e);
|
|
163
173
|
},
|
|
164
|
-
[
|
|
165
|
-
),
|
|
174
|
+
[p]
|
|
175
|
+
), ye = f(
|
|
166
176
|
(e) => {
|
|
167
|
-
|
|
177
|
+
D(e.api), x?.(e);
|
|
168
178
|
},
|
|
169
179
|
[x]
|
|
170
|
-
),
|
|
180
|
+
), be = f(
|
|
171
181
|
(e) => {
|
|
172
|
-
|
|
182
|
+
y?.(e);
|
|
173
183
|
},
|
|
174
|
-
[
|
|
175
|
-
),
|
|
184
|
+
[y]
|
|
185
|
+
), xe = f(
|
|
176
186
|
(e) => {
|
|
177
|
-
|
|
187
|
+
F?.(e);
|
|
178
188
|
},
|
|
179
|
-
[
|
|
189
|
+
[F]
|
|
180
190
|
);
|
|
181
|
-
|
|
182
|
-
const e =
|
|
191
|
+
Z(() => {
|
|
192
|
+
const e = R.current;
|
|
183
193
|
if (!e) return;
|
|
184
194
|
const t = (o) => {
|
|
185
195
|
if (o.key !== "Enter" && o.key !== " ") return;
|
|
@@ -192,12 +202,12 @@ function ft({
|
|
|
192
202
|
};
|
|
193
203
|
return e.addEventListener("keydown", t, !0), () => e.removeEventListener("keydown", t, !0);
|
|
194
204
|
}, []);
|
|
195
|
-
const
|
|
196
|
-
headerComponent:
|
|
205
|
+
const Se = h(() => ({
|
|
206
|
+
headerComponent: Qe,
|
|
197
207
|
// Default cell renderer wraps text in a span so display:flex centering
|
|
198
208
|
// and text-overflow:ellipsis both work (ellipsis doesn't work on
|
|
199
209
|
// anonymous flex text nodes, but works on flex child elements).
|
|
200
|
-
cellRenderer:
|
|
210
|
+
cellRenderer: et,
|
|
201
211
|
...n,
|
|
202
212
|
suppressHeaderKeyboardEvent: (e) => {
|
|
203
213
|
const { event: t } = e, o = t.target;
|
|
@@ -216,41 +226,41 @@ function ft({
|
|
|
216
226
|
headerComponentParams: {
|
|
217
227
|
...n?.headerComponentParams
|
|
218
228
|
}
|
|
219
|
-
}), [n]),
|
|
220
|
-
...
|
|
229
|
+
}), [n]), H = h(() => ({
|
|
230
|
+
...a,
|
|
221
231
|
headerGroupComponentParams: {
|
|
222
|
-
...
|
|
223
|
-
innerHeaderGroupComponent:
|
|
232
|
+
...a?.headerGroupComponentParams,
|
|
233
|
+
innerHeaderGroupComponent: a?.headerGroupComponentParams?.innerHeaderGroupComponent ?? "CustomInnerHeaderGroup"
|
|
224
234
|
}
|
|
225
|
-
}), [
|
|
226
|
-
() =>
|
|
227
|
-
[
|
|
228
|
-
),
|
|
229
|
-
...
|
|
235
|
+
}), [a]), we = h(
|
|
236
|
+
() => Ye(C ?? void 0, H),
|
|
237
|
+
[C, H]
|
|
238
|
+
), Fe = h(() => ({
|
|
239
|
+
...lt,
|
|
230
240
|
// Always available - value formatters
|
|
231
|
-
CustomInnerHeaderGroup:
|
|
232
|
-
CustomHeaderGroup:
|
|
233
|
-
...
|
|
241
|
+
CustomInnerHeaderGroup: B,
|
|
242
|
+
CustomHeaderGroup: B,
|
|
243
|
+
...c.components,
|
|
234
244
|
// User components override
|
|
235
|
-
...
|
|
245
|
+
...v
|
|
236
246
|
// Optional custom formatters override defaults
|
|
237
|
-
}), [
|
|
247
|
+
}), [v, c.components]), Re = f((e) => {
|
|
238
248
|
const t = e.value;
|
|
239
249
|
if (t != null && typeof t == "object") {
|
|
240
|
-
const i =
|
|
250
|
+
const i = Q(e.column?.getColDef());
|
|
241
251
|
if (i && i.length > 0) {
|
|
242
|
-
const l =
|
|
252
|
+
const l = Y(t, i);
|
|
243
253
|
if (i.length === 1) {
|
|
244
|
-
const
|
|
254
|
+
const j = i[0]?.field?.split(".").pop(), g = j ? t[j] : void 0;
|
|
245
255
|
return g && typeof g == "object" && "value" in g ? g.value ?? "" : l[0];
|
|
246
256
|
}
|
|
247
|
-
return V + l.join(
|
|
257
|
+
return V + l.join(S);
|
|
248
258
|
}
|
|
249
259
|
const r = Object.entries(t).map(([, l]) => l && typeof l == "object" && "value" in l ? l.value : typeof l != "object" && typeof l < "u" ? l : null).filter((l) => l != null);
|
|
250
|
-
return r.length === 0 ? "" : r.length === 1 ? r[0] : r.join(
|
|
260
|
+
return r.length === 0 ? "" : r.length === 1 ? r[0] : r.join(S);
|
|
251
261
|
}
|
|
252
262
|
return t == null ? t : e.column?.getColDef()?.useValueFormatterForExport === !0 ? e.formatValue?.(t) ?? t : t;
|
|
253
|
-
}, []),
|
|
263
|
+
}, []), Ae = f((e) => {
|
|
254
264
|
if (typeof e.value == "string") {
|
|
255
265
|
const t = e.value.trim();
|
|
256
266
|
if (t.startsWith("{") || t.startsWith("["))
|
|
@@ -261,9 +271,9 @@ function ft({
|
|
|
261
271
|
}
|
|
262
272
|
}
|
|
263
273
|
return e.value;
|
|
264
|
-
}, []),
|
|
274
|
+
}, []), Ee = f((e) => {
|
|
265
275
|
const t = e?.data ?? "";
|
|
266
|
-
if (!t.includes(
|
|
276
|
+
if (!t.includes(S) && !t.includes(V)) {
|
|
267
277
|
ee(t);
|
|
268
278
|
return;
|
|
269
279
|
}
|
|
@@ -275,26 +285,26 @@ function ft({
|
|
|
275
285
|
o.push("");
|
|
276
286
|
continue;
|
|
277
287
|
}
|
|
278
|
-
const g = l.split(" ").map((
|
|
279
|
-
if (
|
|
280
|
-
o.push(g.map((
|
|
288
|
+
const g = l.split(" ").map((m) => m.startsWith(V) ? { isSplit: !0, slots: m.slice(1).split(S) } : { isSplit: !1, slots: m.split(S) }), O = Math.max(1, ...g.map((m) => m.slots.length));
|
|
289
|
+
if (O === 1) {
|
|
290
|
+
o.push(g.map((m) => m.slots[0] ?? "").join(" "));
|
|
281
291
|
continue;
|
|
282
292
|
}
|
|
283
|
-
for (let
|
|
284
|
-
const
|
|
285
|
-
o.push(
|
|
293
|
+
for (let m = 0; m < O; m++) {
|
|
294
|
+
const _e = g.map((G) => !G.isSplit && G.slots.length === 1 ? G.slots[0] : G.slots[m] ?? "");
|
|
295
|
+
o.push(_e.join(" "));
|
|
286
296
|
}
|
|
287
297
|
}
|
|
288
298
|
ee(o.join(`
|
|
289
299
|
`));
|
|
290
|
-
}, []),
|
|
300
|
+
}, []), A = f((e) => {
|
|
291
301
|
const t = e.value;
|
|
292
302
|
if (t == null) return "";
|
|
293
303
|
if (typeof t != "object")
|
|
294
304
|
return e.column?.getColDef()?.useValueFormatterForExport === !0 ? String(e.formatValue?.(t) ?? t) : String(t);
|
|
295
|
-
const o =
|
|
305
|
+
const o = Q(e.column?.getColDef());
|
|
296
306
|
if (o && o.length > 0) {
|
|
297
|
-
const r =
|
|
307
|
+
const r = Y(t, o);
|
|
298
308
|
return o.length === 1 ? r[0] : r.join(`
|
|
299
309
|
`);
|
|
300
310
|
}
|
|
@@ -310,110 +320,149 @@ function ft({
|
|
|
310
320
|
}
|
|
311
321
|
return i.length === 0 ? "" : i.length === 1 ? i[0] : i.join(`
|
|
312
322
|
`);
|
|
313
|
-
}, []),
|
|
314
|
-
processCellCallback:
|
|
315
|
-
...
|
|
316
|
-
}), [
|
|
317
|
-
processCellCallback:
|
|
318
|
-
...
|
|
319
|
-
}), [
|
|
320
|
-
|
|
321
|
-
|
|
323
|
+
}, []), Ge = h(() => ({
|
|
324
|
+
processCellCallback: A,
|
|
325
|
+
...c.defaultCsvExportParams ?? {}
|
|
326
|
+
}), [A, c.defaultCsvExportParams]), De = h(() => ({
|
|
327
|
+
processCellCallback: A,
|
|
328
|
+
...c.defaultExcelExportParams ?? {}
|
|
329
|
+
}), [A, c.defaultExcelExportParams]), {
|
|
330
|
+
isDragList: Me,
|
|
331
|
+
isListVariant: E,
|
|
332
|
+
hideColumnHeader: Te,
|
|
333
|
+
dragListColumnDefs: Ie,
|
|
334
|
+
dragListGridProps: Le,
|
|
335
|
+
listHeaderGridProps: ke,
|
|
336
|
+
dragPreviewPortal: He,
|
|
337
|
+
liveRegion: je
|
|
338
|
+
} = ze({
|
|
339
|
+
variant: W,
|
|
340
|
+
listHeader: ae,
|
|
341
|
+
columnDefs: C,
|
|
342
|
+
mergedColumnDefs: we,
|
|
343
|
+
listRowGradient: le,
|
|
344
|
+
listDragPreview: ie,
|
|
345
|
+
isRowDragDisabled: ce,
|
|
346
|
+
getRowDragHandleLabel: ue,
|
|
347
|
+
canDropRow: de,
|
|
348
|
+
onRowReorder: se,
|
|
349
|
+
getRowStyle: c.getRowStyle,
|
|
350
|
+
getRowId: c.getRowId,
|
|
351
|
+
rowData: c.rowData,
|
|
352
|
+
rowDragManaged: c.rowDragManaged,
|
|
353
|
+
rowDragText: c.rowDragText,
|
|
354
|
+
onRowDragEnter: c.onRowDragEnter,
|
|
355
|
+
onRowDragMove: c.onRowDragMove,
|
|
356
|
+
onRowDragCancel: c.onRowDragCancel,
|
|
357
|
+
onRowDragEnd: c.onRowDragEnd,
|
|
358
|
+
gridContainerRef: R,
|
|
359
|
+
gridApiRef: u
|
|
360
|
+
}), J = c.rowHeight ?? Je, Oe = oe ?? (E ? Ze : Xe);
|
|
361
|
+
return /* @__PURE__ */ Pe(tt.Provider, { value: k, children: [
|
|
362
|
+
/* @__PURE__ */ w(
|
|
322
363
|
"div",
|
|
323
364
|
{
|
|
324
|
-
ref:
|
|
365
|
+
ref: R,
|
|
325
366
|
"data-component": "ag-grid-react",
|
|
326
|
-
"data-variant": W,
|
|
327
|
-
"data-
|
|
328
|
-
|
|
367
|
+
"data-variant": E ? "list" : W,
|
|
368
|
+
"data-list-drag": Me ? "true" : void 0,
|
|
369
|
+
"data-list-header": Te ? "none" : void 0,
|
|
370
|
+
"data-row-loading": pe ? "true" : "false",
|
|
371
|
+
className: `table-with-loader${K ? ` ${K}` : ""}`,
|
|
329
372
|
style: {
|
|
330
373
|
width: "100%",
|
|
331
374
|
height: "100%",
|
|
332
|
-
...
|
|
375
|
+
...E ? { "--ag-row-height": `${J}px` } : null
|
|
333
376
|
},
|
|
334
|
-
children: /* @__PURE__ */
|
|
335
|
-
|
|
377
|
+
children: /* @__PURE__ */ w(
|
|
378
|
+
qe,
|
|
336
379
|
{
|
|
337
|
-
theme:
|
|
338
|
-
defaultColDef:
|
|
339
|
-
columnDefs:
|
|
380
|
+
theme: Oe,
|
|
381
|
+
defaultColDef: Se,
|
|
382
|
+
columnDefs: Ie,
|
|
340
383
|
cellSelection: !0,
|
|
341
|
-
defaultColGroupDef:
|
|
342
|
-
onGridReady:
|
|
343
|
-
onGridPreDestroyed:
|
|
344
|
-
onFilterChanged:
|
|
345
|
-
onSelectionChanged:
|
|
346
|
-
onModelUpdated:
|
|
347
|
-
tooltipShowMode:
|
|
348
|
-
tooltipShowDelay:
|
|
384
|
+
defaultColGroupDef: H,
|
|
385
|
+
onGridReady: Ce,
|
|
386
|
+
onGridPreDestroyed: ve,
|
|
387
|
+
onFilterChanged: ye,
|
|
388
|
+
onSelectionChanged: be,
|
|
389
|
+
onModelUpdated: xe,
|
|
390
|
+
tooltipShowMode: I,
|
|
391
|
+
tooltipShowDelay: L,
|
|
349
392
|
tooltipHideDelay: re,
|
|
350
393
|
tooltipInteraction: ne,
|
|
351
|
-
processCellForClipboard:
|
|
352
|
-
processCellFromClipboard:
|
|
353
|
-
sendToClipboard:
|
|
354
|
-
ensureDomOrder:
|
|
394
|
+
processCellForClipboard: Re,
|
|
395
|
+
processCellFromClipboard: Ae,
|
|
396
|
+
sendToClipboard: Ee,
|
|
397
|
+
ensureDomOrder: M,
|
|
355
398
|
suppressHeaderFocus: !1,
|
|
356
399
|
suppressFocusAfterRefresh: !0,
|
|
357
400
|
suppressGroupRowsSticky: !0,
|
|
358
401
|
hidePaddedHeaderRows: !0,
|
|
359
402
|
suppressServerSideFullWidthLoadingRow: !0,
|
|
360
|
-
columnTypes:
|
|
361
|
-
autoSizeStrategy:
|
|
362
|
-
...
|
|
363
|
-
...
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
403
|
+
columnTypes: he,
|
|
404
|
+
autoSizeStrategy: T,
|
|
405
|
+
...c,
|
|
406
|
+
...E ? { rowHeight: J } : null,
|
|
407
|
+
...ke,
|
|
408
|
+
...Le,
|
|
409
|
+
components: Fe,
|
|
410
|
+
defaultCsvExportParams: Ge,
|
|
411
|
+
defaultExcelExportParams: De,
|
|
412
|
+
getMainMenuItems: ge
|
|
368
413
|
}
|
|
369
414
|
)
|
|
370
415
|
}
|
|
371
416
|
),
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
417
|
+
He,
|
|
418
|
+
je,
|
|
419
|
+
s,
|
|
420
|
+
/* @__PURE__ */ w(
|
|
421
|
+
ct,
|
|
375
422
|
{
|
|
376
|
-
isOpen:
|
|
377
|
-
columnId:
|
|
378
|
-
gridApi:
|
|
423
|
+
isOpen: me,
|
|
424
|
+
columnId: fe,
|
|
425
|
+
gridApi: $,
|
|
379
426
|
onClose: k.closeAdvancedFilter,
|
|
380
427
|
onApply: k.applyAdvancedFilter
|
|
381
428
|
}
|
|
382
429
|
)
|
|
383
430
|
] });
|
|
384
431
|
}
|
|
385
|
-
function
|
|
386
|
-
isOpen:
|
|
432
|
+
function ct({
|
|
433
|
+
isOpen: s,
|
|
387
434
|
columnId: n,
|
|
388
|
-
gridApi:
|
|
389
|
-
onClose:
|
|
390
|
-
onApply:
|
|
435
|
+
gridApi: a,
|
|
436
|
+
onClose: C,
|
|
437
|
+
onApply: v
|
|
391
438
|
}) {
|
|
392
|
-
if (!
|
|
393
|
-
const
|
|
394
|
-
if (!
|
|
395
|
-
const
|
|
396
|
-
return /* @__PURE__ */
|
|
397
|
-
|
|
439
|
+
if (!s || !n || !a) return null;
|
|
440
|
+
const d = a.getColumn(n);
|
|
441
|
+
if (!d) return null;
|
|
442
|
+
const p = d.getColDef(), x = p.headerComponentParams, y = nt(p), F = y.text !== -1 || y.number !== -1 || y.date !== -1, M = y.set !== -1, I = p.filter === "agMultiColumnFilter" && (F || M) ? "multi" : p.filter === "agNumberColumnFilter" ? "number" : p.filter === "agDateColumnFilter" ? "date" : p.filter === "agSetColumnFilter" || x?.selectOptions ? "select" : "text", L = ot(a.getFilterModel());
|
|
443
|
+
return /* @__PURE__ */ w(We, { fallback: null, children: /* @__PURE__ */ w(
|
|
444
|
+
st,
|
|
398
445
|
{
|
|
399
|
-
isOpen:
|
|
400
|
-
onClose:
|
|
401
|
-
onApply:
|
|
446
|
+
isOpen: s,
|
|
447
|
+
onClose: C,
|
|
448
|
+
onApply: v,
|
|
402
449
|
columnId: n,
|
|
403
|
-
columnLabel:
|
|
404
|
-
columnType:
|
|
450
|
+
columnLabel: p.headerName || n,
|
|
451
|
+
columnType: I,
|
|
405
452
|
selectOptions: x?.selectOptions,
|
|
406
453
|
isMultiSelect: x?.isMultiSelect,
|
|
407
|
-
initialModel:
|
|
408
|
-
api:
|
|
454
|
+
initialModel: L,
|
|
455
|
+
api: a
|
|
409
456
|
}
|
|
410
457
|
) });
|
|
411
458
|
}
|
|
412
459
|
export {
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
460
|
+
Lt as AG_GRID_LIST_RANK_GRADIENT,
|
|
461
|
+
Mt as AgGridWrapper,
|
|
462
|
+
Wt as isAgGridHeaderLabelTooltipOverflowing,
|
|
463
|
+
Kt as isAgGridTextOverflowing,
|
|
464
|
+
Ht as subscribeGridApiEvent,
|
|
465
|
+
jt as subscribeGridApiEvents,
|
|
466
|
+
_t as useAgGridTruncationTooltip,
|
|
467
|
+
Nt as useListRowDropZones
|
|
419
468
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IRowNode, RowDragEndEvent, RowDragMoveEvent } from 'ag-grid-community';
|
|
2
|
+
import { AgGridReactProps } from 'ag-grid-react';
|
|
3
|
+
import { ListDropPosition, isListDropAllowed } from './list-row-move';
|
|
4
|
+
import { AgGridVisualVariant, AgGridWrapperProps } from './ag-grid.types';
|
|
5
|
+
/** Card-row skin on `DataTableContent` / `AgGridWrapper`. */
|
|
6
|
+
export declare function isAgGridListVariant(variant: AgGridVisualVariant | undefined): boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Row drag on the list skin: `variant="list"` plus `onRowReorder` plus `getRowId`.
|
|
9
|
+
* Handles are not shown without a callback — the host must own `rowData`.
|
|
10
|
+
*/
|
|
11
|
+
export declare function isAgGridListDragEnabled(options: {
|
|
12
|
+
variant: AgGridVisualVariant | undefined;
|
|
13
|
+
onRowReorder?: unknown;
|
|
14
|
+
getRowId?: unknown;
|
|
15
|
+
}): boolean;
|
|
16
|
+
export declare function readDragRowId<TData>(node: IRowNode<TData> | undefined): string | undefined;
|
|
17
|
+
export declare function dropPositionFromEvent<TData>(event: RowDragMoveEvent<TData> | RowDragEndEvent<TData>): ListDropPosition;
|
|
18
|
+
export declare function itemIdFromGetRowId<TData>(getRowId: AgGridReactProps<TData>['getRowId'], data: TData): string | undefined;
|
|
19
|
+
export declare function createDefaultRowDragText<TData>(columnDefs: AgGridReactProps<TData>['columnDefs']): NonNullable<AgGridReactProps<TData>['rowDragText']>;
|
|
20
|
+
export declare function createListRowStyle<TData>(listRowGradient: AgGridWrapperProps<TData>['listRowGradient'], userGetRowStyle: AgGridReactProps<TData>['getRowStyle']): AgGridReactProps<TData>['getRowStyle'];
|
|
21
|
+
export { isListDropAllowed };
|