@masterteam/data-grid 0.0.0-stage → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3422 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { InjectionToken, Type, Signal, TemplateRef, ElementRef, ComponentRef, OutputRefSubscription, ApplicationRef } from '@angular/core';
3
+
4
+ type GridIconName = 'sort-asc' | 'sort-desc' | 'sort-none' | 'reset' | 'expand' | 'collapse' | 'pdf' | 'export' | 'asc' | 'desc' | 'hide' | 'blocked' | 'pin' | 'columns' | 'chevron' | 'chevron-start' | 'check' | 'menu' | 'move' | 'left' | 'right' | 'close' | 'copy' | 'cut' | 'paste' | 'save' | 'tree-open' | 'tree-closed' | 'group' | 'csv' | 'excel' | 'search' | 'filter' | 'cancel' | 'small-down' | 'grip' | 'arrows' | 'tree-indeterminate' | 'aggregation' | 'pivot' | 'filter-add' | 'cross' | 'chevron-up' | 'chevron-down' | 'first' | 'previous' | 'next' | 'last' | 'chart' | 'maximize' | 'minimize' | 'chart-link' | 'chart-unlink' | 'chart-edit' | 'chevron-right' | 'eye-off' | 'minus' | 'values' | 'download' | 'link' | 'unlink' | 'settings' | 'chevron-left' | 'chevron-end' | 'filter-active' | 'filters-panel' | 'pin-left' | 'pin-right' | 'unpin' | 'autosize' | 'chart-bar' | 'chart-line' | 'chart-pie' | 'chart-area' | 'chart-scatter' | 'data' | 'format' | 'plus' | 'eye' | 'loading';
5
+ /** Trusted application-owned SVG markup. Missing names retain the built-in DS stroke icon. */
6
+ declare const MT_GRID_ICONS: InjectionToken<Partial<Record<GridIconName, string>>>;
7
+
8
+ interface MtValueParams<T> {
9
+ readonly data: T;
10
+ readonly rowIndex: number;
11
+ readonly column: MtColumnDef<T>;
12
+ readonly value: unknown;
13
+ }
14
+ /** What a cell renderer, cell class rule or cell style callback receives. */
15
+ interface MtCellRendererParams<T> extends MtValueParams<T> {
16
+ /** The value through the column's `valueFormatter` (or its text). */
17
+ readonly valueFormatted: string;
18
+ readonly node: MtRowNode<T>;
19
+ readonly api: MtGridApi<T>;
20
+ /** The column's `cellRendererParams`, merged in. */
21
+ readonly [extra: string]: unknown;
22
+ }
23
+ /** A function renderer: text (rendered as sanitised HTML), an element, or nothing for the plain text. */
24
+ type MtCellRendererFn<T> = (params: MtCellRendererParams<T>) => string | HTMLElement | null | undefined;
25
+ /** A component renderer declares `readonly params = input.required<MtCellRendererParams<T>>()`. */
26
+ interface MtCellRendererComponent<T> {
27
+ readonly params: Signal<MtCellRendererParams<T>>;
28
+ }
29
+ /** A header component owns its label/controls; resizing and column dragging stay with the grid. */
30
+ interface MtHeaderRendererParams<T> {
31
+ readonly column: MtColumnDef<T>;
32
+ readonly displayName: string;
33
+ readonly api: MtGridApi<T>;
34
+ readonly [extra: string]: unknown;
35
+ }
36
+ interface MtHeaderRendererComponent<T> {
37
+ readonly params: Signal<MtHeaderRendererParams<T>>;
38
+ }
39
+ /**
40
+ * Built-in renderers: `checkbox` (a read-only checkbox of a boolean value), `sparkline` (a
41
+ * line / area / column / bar of a number list, `cellRendererParams.sparklineOptions`),
42
+ * `animateShowChange` (the value with its ↑ / ↓ delta and a highlight on change) and
43
+ * `group` (the expand toggle of a master row — or a group row — before the value).
44
+ */
45
+ type MtBuiltInCellRenderer = 'checkbox' | 'sparkline' | 'animateShowChange' | 'group';
46
+ type MtCellRenderer<T> = MtBuiltInCellRenderer | MtCellRendererFn<T> | Type<MtCellRendererComponent<T>>;
47
+ type MtSparklineType = 'line' | 'area' | 'column' | 'bar';
48
+ interface MtSparklineOptions {
49
+ /** Default `line`. */
50
+ readonly type?: MtSparklineType;
51
+ /** The line / bar colour (default the focus blue). */
52
+ readonly stroke?: string;
53
+ readonly strokeWidth?: number;
54
+ /** The area fill (default the stroke at 25%). */
55
+ readonly fill?: string;
56
+ /** Space around the plot (default 3px). */
57
+ readonly padding?: number;
58
+ /** Widen the vertical domain. */
59
+ readonly min?: number;
60
+ readonly max?: number;
61
+ /** The nearest point's marker and tooltip while hovering (default true). */
62
+ readonly highlight?: boolean;
63
+ readonly tooltipFormatter?: (value: number, index: number) => string;
64
+ }
65
+ type MtCellClassParams<T> = MtCellRendererParams<T>;
66
+ type MtCellClass<T> = string | readonly string[] | ((params: MtCellClassParams<T>) => string | readonly string[] | null | undefined);
67
+ type MtCellClassRules<T> = Readonly<Record<string, (params: MtCellClassParams<T>) => boolean>>;
68
+ type MtCellStyle<T> = Readonly<Record<string, string>> | ((params: MtCellClassParams<T>) => Readonly<Record<string, string>> | null | undefined);
69
+ /** The nested grid of a detail row (the built-in detail renderer). */
70
+ interface MtDetailGridOptions<D> {
71
+ readonly columnDefs: readonly MtColDef<D>[];
72
+ readonly getRowId?: (data: D) => string;
73
+ /** Default 42. */
74
+ readonly rowHeight?: number;
75
+ /** Default 48. */
76
+ readonly headerHeight?: number;
77
+ }
78
+ interface MtGetDetailRowDataParams<T, D> {
79
+ readonly data: T;
80
+ readonly node: MtRowNode<T>;
81
+ /** Hands the detail rows to the grid (synchronously or later). */
82
+ readonly successCallback: (rows: readonly D[]) => void;
83
+ }
84
+ /** `detailCellRendererParams`: the nested grid and its rows, plus anything a custom detail renderer reads. */
85
+ interface MtDetailCellRendererParams<T, D = unknown> {
86
+ readonly detailGridOptions?: MtDetailGridOptions<D>;
87
+ readonly getDetailRowData?: (params: MtGetDetailRowDataParams<T, D>) => void;
88
+ readonly [extra: string]: unknown;
89
+ }
90
+ type MtCellEditorKind = 'text' | 'number' | 'select' | 'checkbox' | 'richSelect';
91
+ /** How the rich select matches typed text: the start of a value, anywhere in it, or its letters in order. */
92
+ type MtRichSelectSearchType = 'match' | 'matchAny' | 'fuzzy';
93
+ interface MtCellEditorParams {
94
+ /** The select and rich select editors' options. */
95
+ readonly values?: readonly unknown[];
96
+ /** Rich select: the value area is a text field (typing searches; with `filterList` it filters the rows). */
97
+ readonly allowTyping?: boolean;
98
+ /** Rich select: typed text filters the rows (default: it moves the highlight to the first match). */
99
+ readonly filterList?: boolean;
100
+ /** Rich select: how typed text matches a row (default `fuzzy`). */
101
+ readonly searchType?: MtRichSelectSearchType;
102
+ /** Rich select: the matched letters of each row are marked. */
103
+ readonly highlightMatch?: boolean;
104
+ /** Rich select: the list's maximum height in px (default: the room under the cell inside the grid). */
105
+ readonly valueListMaxHeight?: number;
106
+ /** Rich select: the list's maximum width in px (default: the cell's width). */
107
+ readonly valueListMaxWidth?: number;
108
+ /** Rich select: the height of a list row in px (observed default 24). */
109
+ readonly cellHeight?: number;
110
+ /** Rich select: the text shown for a value (default `String(value)`). */
111
+ readonly formatValue?: (value: unknown) => string;
112
+ /** Rich select without `allowTyping`: the pause after which typed letters start a new search, in ms (default 300). */
113
+ readonly searchDebounceDelay?: number;
114
+ readonly [extra: string]: unknown;
115
+ }
116
+ interface MtValueSetterParams<T> {
117
+ readonly data: T;
118
+ readonly node: MtRowNode<T>;
119
+ readonly column: MtColumnDef<T>;
120
+ readonly colId: string;
121
+ readonly oldValue: unknown;
122
+ readonly newValue: unknown;
123
+ }
124
+ interface MtValueParserParams<T> {
125
+ readonly data: T;
126
+ readonly column: MtColumnDef<T>;
127
+ readonly oldValue: unknown;
128
+ readonly newValue: unknown;
129
+ }
130
+ /** Where a committed value came from. */
131
+ type MtCellValueChangedSource = 'edit' | 'paste' | 'cut' | 'fill' | 'undo' | 'redo' | 'api';
132
+ interface MtCellValueChangedEvent<T> {
133
+ readonly data: T;
134
+ readonly node: MtRowNode<T>;
135
+ readonly column: MtColumnDef<T>;
136
+ readonly colId: string;
137
+ readonly rowIndex: number;
138
+ readonly oldValue: unknown;
139
+ readonly newValue: unknown;
140
+ readonly source: MtCellValueChangedSource;
141
+ }
142
+ interface MtCellEditingStartedEvent<T> {
143
+ readonly data: T;
144
+ readonly node: MtRowNode<T>;
145
+ readonly column: MtColumnDef<T>;
146
+ readonly colId: string;
147
+ readonly rowIndex: number;
148
+ readonly value: unknown;
149
+ }
150
+ interface MtCellEditingStoppedEvent<T> extends MtCellEditingStartedEvent<T> {
151
+ readonly oldValue: unknown;
152
+ readonly newValue: unknown;
153
+ readonly valueChanged: boolean;
154
+ }
155
+ interface MtPasteEvent {
156
+ readonly source: 'ui' | 'api';
157
+ }
158
+ interface MtFillEvent {
159
+ /** Rows and columns written by the fill. */
160
+ readonly rows: number;
161
+ readonly columns: readonly string[];
162
+ }
163
+ interface MtStartEditingCellParams {
164
+ readonly rowIndex: number;
165
+ readonly colKey: string;
166
+ /** A key that starts the editor with its own value. */
167
+ readonly key?: string;
168
+ }
169
+ interface MtEditingCell {
170
+ readonly rowIndex: number;
171
+ readonly colId: string;
172
+ readonly rowId: string;
173
+ }
174
+ interface MtPaginationChangedEvent {
175
+ readonly newPage: boolean;
176
+ readonly newPageSize: boolean;
177
+ /** Zero-based. */
178
+ readonly currentPage: number;
179
+ readonly pageSize: number;
180
+ readonly totalPages: number;
181
+ readonly rowCount: number;
182
+ }
183
+ /** `rightAligned`: cells and header at the end; `numericColumn` is the same plus the numeric intent. */
184
+ type MtColumnType = 'rightAligned' | 'numericColumn' | 'currency' | 'percent';
185
+ /** Physical pinned side; `left` stays on the left in RTL like the reference. */
186
+ type MtColumnPinned = 'left' | 'right' | null;
187
+ /** One category identity of a record: a stable id, its localized label and an optional authored colour. */
188
+ interface MtChartCategoryValue {
189
+ /** Stable identity (an option key, a user id); never a display label. */
190
+ readonly id: string;
191
+ readonly label: string;
192
+ /** Authored semantic colour (hex). Absent or null → the chart's stable palette mapping. */
193
+ readonly color?: string | null;
194
+ }
195
+ interface MtChartCategoryParams<T> {
196
+ readonly value: unknown;
197
+ readonly data: T;
198
+ readonly column: MtColumnDef<T>;
199
+ }
200
+ /**
201
+ * Typed category semantics for charts. Charts group records by `id`, show `label`
202
+ * and use `color`; a record with several values belongs to each of them once.
203
+ * Columns without this definition group by their formatted text.
204
+ */
205
+ interface MtChartCategoryDef<T> {
206
+ readonly values: (params: MtChartCategoryParams<T>) => readonly MtChartCategoryValue[] | MtChartCategoryValue | null | undefined;
207
+ /** A record may carry several identities, so category totals can exceed the record count. */
208
+ readonly multiValue?: boolean;
209
+ }
210
+ interface MtColumnDef<T> {
211
+ /** Integrated chart role; omitted roles are inferred from raw cell values. */
212
+ readonly chartDataType?: MtChartDataType;
213
+ /** Identity, label and colour semantics for charting this column as a category. */
214
+ readonly chartCategory?: MtChartCategoryDef<T>;
215
+ /**
216
+ * Unit of a numeric series per record (a currency code, a percent sign). One
217
+ * consistent unit joins the series name ("Amount (SAR)"); mixed units leave
218
+ * the name alone and flag the series.
219
+ */
220
+ readonly chartUnit?: (params: MtChartCategoryParams<T>) => string | null | undefined;
221
+ readonly field?: Extract<keyof T, string>;
222
+ readonly colId?: string;
223
+ readonly headerName?: string;
224
+ readonly headerRenderer?: Type<MtHeaderRendererComponent<T>>;
225
+ readonly headerRendererParams?: Readonly<Record<string, unknown>>;
226
+ readonly width?: number;
227
+ readonly initialWidth?: number;
228
+ readonly minWidth?: number;
229
+ readonly maxWidth?: number;
230
+ /** Keep this column's width when fitting the grid (for fixed action/selection columns). */
231
+ readonly suppressSizeToFit?: boolean;
232
+ /** Stateful: `undefined` keeps the current visibility on a definition update. */
233
+ readonly hide?: boolean;
234
+ readonly initialHide?: boolean;
235
+ /** Stateful: `undefined` keeps the current pinned side; `null` unpins. */
236
+ readonly pinned?: MtColumnPinned;
237
+ readonly initialPinned?: 'left' | 'right';
238
+ readonly sortable?: boolean;
239
+ readonly resizable?: boolean;
240
+ /** Hides this header's menu button; Alt+ArrowDown and right-click still open the menu. */
241
+ readonly suppressHeaderMenuButton?: boolean;
242
+ readonly suppressHeaderFilterButton?: boolean;
243
+ readonly mainMenuItems?: readonly MtMainMenuItem<T>[] | ((params: MtGetMainMenuItemsParams<T>) => readonly MtMainMenuItem<T>[]);
244
+ readonly cellDataType?: 'text' | 'number' | 'boolean' | 'date' | 'currency' | 'percent';
245
+ /** Groups the rows by this column; several grouped columns nest in `rowGroupIndex` order. */
246
+ readonly rowGroup?: boolean;
247
+ readonly rowGroupIndex?: number | null;
248
+ /** Render the group cell here when groupDisplayType is custom. */
249
+ readonly showRowGroup?: boolean | string;
250
+ /** Populated on generated pivot results before processPivotResultColDef runs. */
251
+ readonly pivotKeys?: readonly (string | null)[];
252
+ readonly pivotValueColumn?: string;
253
+ /** Lets the column be grouped from the header menu ("Group by …") and the row group panel. */
254
+ readonly enableRowGroup?: boolean;
255
+ /** Aggregation shown on group rows: a built-in name, a name registered in `aggFuncs`, or a function. */
256
+ readonly aggFunc?: MtAggFuncName | string | MtAggFunc<T> | null;
257
+ /** Lets the column be dropped on the Columns tool panel's Values zone (and aggregated from there). */
258
+ readonly enableValue?: boolean;
259
+ /** The aggregation a Values drop applies (reference default `sum`). */
260
+ readonly defaultAggFunc?: MtAggFuncName | string;
261
+ /** The functions the Values chip offers; by default the built-ins in the reference's order. */
262
+ readonly allowedAggFuncs?: readonly string[];
263
+ /** Lets the column be dropped on the Column Labels zone (pivot mode). */
264
+ readonly enablePivot?: boolean;
265
+ /** Pivots by this column (a column label); several nest in `pivotIndex` order. */
266
+ readonly pivot?: boolean;
267
+ readonly pivotIndex?: number | null;
268
+ /** This column's context menu items; a list or a callback over the default items. Wins over `getContextMenuItems`. */
269
+ readonly contextMenuItems?: readonly MtContextMenuItem<T>[] | ((params: MtGetContextMenuItemsParams<T>) => readonly MtContextMenuItem<T>[]);
270
+ /**
271
+ * Keeps the column at a physical edge (`true` = `'left'`; in RTL the left edge is the
272
+ * logical end). It cannot be dragged or API-moved, and other columns cannot be moved
273
+ * across it (column-locks observations).
274
+ */
275
+ readonly lockPosition?: boolean | 'left' | 'right';
276
+ /** Blocks dragging this header; API moves still apply. */
277
+ readonly suppressMovable?: boolean;
278
+ /** Blocks pinning or unpinning by drag; API and state pinning still apply. */
279
+ readonly lockPinned?: boolean;
280
+ /** Blocks hiding or showing from the UI (drag out of the grid, Choose Columns); the API still applies. */
281
+ readonly lockVisible?: boolean;
282
+ /**
283
+ * Inside a column group: shown only while the group is open (`'open'`) or closed
284
+ * (`'closed'`); without it the column shows in both states.
285
+ */
286
+ readonly columnGroupShow?: MtColumnGroupShow;
287
+ readonly valueGetter?: (params: Omit<MtValueParams<T>, 'value'>) => unknown;
288
+ readonly valueFormatter?: (params: MtValueParams<T>) => string;
289
+ /**
290
+ * `rightAligned` / `numericColumn`: the cells and the header align to the end
291
+ * (`mt-grid-right-aligned-cell`, observed `ag-right-aligned-cell` on the currency columns).
292
+ */
293
+ readonly type?: MtColumnType | readonly MtColumnType[];
294
+ /**
295
+ * Renders the cell: a built-in (`checkbox`, `sparkline`, `animateShowChange`), a function
296
+ * returning text / HTML / an element, or a standalone component with a `params` input.
297
+ */
298
+ readonly cellRenderer?: MtCellRenderer<T>;
299
+ /** Optional group-key content. The grid retains its expander, count, keyboard and drag behavior. */
300
+ readonly groupValueRenderer?: MtCellRenderer<T>;
301
+ /** Extra parameters merged into the renderer's params (`sparklineOptions` for the sparkline). */
302
+ readonly cellRendererParams?: Readonly<Record<string, unknown>>;
303
+ /** Extra classes on the cell: a string, a list, or a callback per cell. */
304
+ readonly cellClass?: MtCellClass<T>;
305
+ /** Classes applied while their rule holds, re-evaluated when the value changes. */
306
+ readonly cellClassRules?: MtCellClassRules<T>;
307
+ /** Inline styles on the cell (an object or a callback per cell). */
308
+ readonly cellStyle?: MtCellStyle<T>;
309
+ /** The cell edits (double-click, Enter, F2, typing); a callback decides per cell. */
310
+ readonly editable?: boolean | ((params: MtCellRendererParams<T>) => boolean);
311
+ /** The editor: `text` / `number` (by the value's type by default), `select` (`cellEditorParams.values`), `checkbox`. */
312
+ readonly cellEditor?: MtCellEditorKind;
313
+ readonly cellEditorParams?: MtCellEditorParams;
314
+ /** Writes the committed value (returns whether it changed) instead of `data[field]`. */
315
+ readonly valueSetter?: (params: MtValueSetterParams<T>) => boolean;
316
+ /** Turns the editor's value into the stored value before it is written. */
317
+ readonly valueParser?: (params: MtValueParserParams<T>) => unknown;
318
+ /** Keeps paste and the fill handle off this column. */
319
+ readonly suppressPaste?: boolean;
320
+ readonly suppressFillHandle?: boolean;
321
+ readonly comparator?: (a: unknown, b: unknown, dataA: T, dataB: T) => number;
322
+ /**
323
+ * Column filter: `true` or `'text'` for the text filter, `'number'`, `'date'` (the value
324
+ * must be a `Date`). Without it the column has no filter button, no floating filter
325
+ * input and `setFilterModel` ignores it (filter-basics-observations.json).
326
+ */
327
+ readonly filter?: MtColumnFilter;
328
+ readonly filterValueGetter?: (params: Omit<MtValueParams<T>, 'value'>) => unknown;
329
+ readonly getQuickFilterText?: (params: Omit<MtValueParams<T>, 'value'> & {
330
+ value: unknown;
331
+ }) => string;
332
+ readonly excludeFromQuickFilter?: boolean;
333
+ readonly suppressFiltersToolPanel?: boolean;
334
+ /** Shows the column's input in the floating-filter row under the headers. */
335
+ readonly floatingFilter?: boolean;
336
+ readonly filterParams?: MtFilterParams;
337
+ /**
338
+ * Shows a row-drag handle at the start of this column's cells (a function decides per
339
+ * row). Dragging reports `rowDragEnter`/`rowDragMove`/`rowDragLeave`/`rowDragEnd`; with
340
+ * `rowDragManaged` the grid reorders its rows while dragging (selection-3 observations).
341
+ */
342
+ readonly rowDrag?: boolean | ((node: MtRowNode<T>) => boolean);
343
+ /** The drag ghost label; by default the dragged row's value in this column or `N rows`. */
344
+ readonly rowDragText?: (nodes: readonly MtRowNode<T>[]) => string;
345
+ }
346
+ /**
347
+ * A column group: its children (columns or nested groups) share a group header cell.
348
+ * Without a groupId the grid numbers groups in definition pre-order like the reference.
349
+ */
350
+ interface MtColumnGroupDef<T> {
351
+ readonly groupId?: string;
352
+ readonly headerName?: string;
353
+ readonly children: readonly MtColDef<T>[];
354
+ /** Open state of a newly introduced group; a known group keeps its state on a definition update. */
355
+ readonly openByDefault?: boolean;
356
+ /** Inside a parent group: shown only while the parent is open or closed. */
357
+ readonly columnGroupShow?: MtColumnGroupShow;
358
+ /**
359
+ * Keeps the group's columns together: a dragged child stays inside the group, a column
360
+ * dragged into it lands at its edge, and `moveColumns` calls that would split it do
361
+ * nothing.
362
+ */
363
+ readonly marryChildren?: boolean;
364
+ }
365
+ /**
366
+ * When a column or child group shows inside its group. A group can be opened and closed
367
+ * (expand icon, Enter) only when its open and closed states show different children.
368
+ */
369
+ type MtColumnGroupShow = 'open' | 'closed';
370
+ /** A columnDefs entry: a column or a column group. */
371
+ type MtColDef<T> = MtColumnDef<T> | MtColumnGroupDef<T>;
372
+ interface MtRowNode<T> {
373
+ readonly id: string;
374
+ /** The row's data; absent (`undefined`) on grouping's group and total rows and on tree filler rows; a tree row with children keeps it. */
375
+ readonly data: T;
376
+ /** Index in `rowData`; -1 on group and total rows. */
377
+ readonly sourceIndex: number;
378
+ /** A group row (or a total row) built by row grouping. */
379
+ readonly group?: boolean;
380
+ /** The group's key: the grouped column's value as text, null for an empty value. */
381
+ readonly key?: string | null;
382
+ /** The grouped column's field (or id) the group is keyed on. */
383
+ readonly field?: string;
384
+ readonly rowGroupColumn?: string;
385
+ /** 0 for a top-level group; -1 for the grand total row. */
386
+ readonly level?: number;
387
+ readonly parent?: MtRowNode<T>;
388
+ readonly leafGroup?: boolean;
389
+ readonly expanded?: boolean;
390
+ /** Direct children: the next level's groups, or the leaf rows. */
391
+ readonly childrenAfterGroup?: readonly MtRowNode<T>[];
392
+ /** Every leaf row under the group. */
393
+ readonly allLeafChildren?: readonly MtRowNode<T>[];
394
+ /** Aggregated values by column id. */
395
+ readonly aggData?: Readonly<Record<string, unknown>>;
396
+ /** A total row (a group's total or the grand total). */
397
+ readonly footer?: boolean;
398
+ /** A master row (`masterDetail`): `expanded` tells whether its detail row shows. */
399
+ readonly master?: boolean;
400
+ /** The detail row under an expanded master (`detail_<master id>`); `data` is the master's. */
401
+ readonly detail?: boolean;
402
+ }
403
+ interface MtSortModel {
404
+ readonly colId: string;
405
+ readonly sort: 'asc' | 'desc';
406
+ }
407
+ interface MtCellFocusedEvent {
408
+ readonly rowIndex: number;
409
+ readonly rowId: string;
410
+ readonly colId: string;
411
+ }
412
+ interface MtColumnWidth {
413
+ readonly colId: string;
414
+ readonly width: number;
415
+ }
416
+ interface MtColumnResizedEvent {
417
+ readonly columns: readonly MtColumnWidth[];
418
+ readonly finished: boolean;
419
+ readonly source: 'api' | 'uiColumnResized' | 'autosizeColumns';
420
+ }
421
+ /** Where a column-state change came from. `columnMenu` covers the header menu and its chooser. */
422
+ type MtColumnEventSource = 'api' | 'uiColumnMoved' | 'uiColumnDragged' | 'columnMenu' | 'contextMenu' | 'rowGroupChanged' | 'toolPanelUi';
423
+ interface MtColumnMovedEvent {
424
+ /** Moved columns; for state application, every column whose index changed, in previous order. */
425
+ readonly columns: readonly string[];
426
+ /** New index in the full column order; `null` when several columns moved by state application. */
427
+ readonly toIndex: number | null;
428
+ readonly finished: boolean;
429
+ readonly source: 'api' | 'uiColumnMoved' | 'columnMenu';
430
+ }
431
+ interface MtColumnPinnedEvent {
432
+ readonly columns: readonly string[];
433
+ /** `null` also when the changed columns ended on different sides. */
434
+ readonly pinned: MtColumnPinned;
435
+ readonly source: MtColumnEventSource;
436
+ }
437
+ interface MtColumnVisibleEvent {
438
+ readonly columns: readonly string[];
439
+ /** `null` when the changed columns did not all become visible or all hidden. */
440
+ readonly visible: boolean | null;
441
+ readonly source: MtColumnEventSource;
442
+ }
443
+ /** One column's saved state; `getColumnState()` lists every column, hidden ones included, in order. */
444
+ interface MtColumnState {
445
+ readonly colId: string;
446
+ readonly width: number;
447
+ readonly hide: boolean;
448
+ readonly pinned: MtColumnPinned;
449
+ readonly sort: 'asc' | 'desc' | null;
450
+ /** Multi-sort priority; `null` when unsorted or when applied without an index. */
451
+ readonly sortIndex: number | null;
452
+ }
453
+ type MtColumnStateUpdate = {
454
+ readonly colId: string;
455
+ } & Partial<Omit<MtColumnState, 'colId'>>;
456
+ interface MtApplyColumnStateParams {
457
+ /** Missing properties keep the current value; `pinned: null` / `sort: null` clear. */
458
+ readonly state?: readonly MtColumnStateUpdate[];
459
+ /** Listed columns move to the front in the given order; others keep their relative order after them. */
460
+ readonly applyOrder?: boolean;
461
+ /** Applied to every column that is not listed in `state`. */
462
+ readonly defaultState?: Partial<Omit<MtColumnState, 'colId'>>;
463
+ }
464
+ /** One column group's open state; `getColumnGroupState()` lists every group. */
465
+ interface MtColumnGroupState {
466
+ readonly groupId: string;
467
+ readonly open: boolean;
468
+ /** Always `null`, as the reference reports for these groups. */
469
+ readonly headerName: null;
470
+ }
471
+ interface MtColumnGroupRef {
472
+ readonly groupId: string;
473
+ readonly expanded: boolean;
474
+ }
475
+ interface MtColumnGroupOpenedEvent {
476
+ /** The changed group, or `null` when several changed at once. */
477
+ readonly columnGroup: MtColumnGroupRef | null;
478
+ readonly columnGroups: readonly MtColumnGroupRef[];
479
+ }
480
+ /** Column filter kinds; `true` is the text filter. */
481
+ type MtColumnFilter = boolean | 'text' | 'number' | 'date' | 'set' | 'multi';
482
+ type MtTextFilterType = 'contains' | 'notContains' | 'equals' | 'notEqual' | 'startsWith' | 'endsWith' | 'blank' | 'notBlank';
483
+ /** Number and date filters share these; `inRange` excludes both bounds unless `inRangeInclusive`. */
484
+ type MtScalarFilterType = 'equals' | 'notEqual' | 'greaterThan' | 'greaterThanOrEqual' | 'lessThan' | 'lessThanOrEqual' | 'inRange' | 'blank' | 'notBlank';
485
+ interface MtTextFilterModel {
486
+ readonly filterType: 'text';
487
+ readonly type: MtTextFilterType | (string & {});
488
+ readonly filter?: string | null;
489
+ readonly filterTo?: string | null;
490
+ }
491
+ interface MtNumberFilterModel {
492
+ readonly filterType: 'number';
493
+ readonly type: MtScalarFilterType | (string & {});
494
+ readonly filter?: number | null;
495
+ readonly filterTo?: number | null;
496
+ }
497
+ /** Dates are `YYYY-MM-DD` (optionally ` HH:mm:ss`), compared by calendar day. */
498
+ interface MtDateFilterModel {
499
+ readonly filterType: 'date';
500
+ readonly type: MtScalarFilterType | (string & {});
501
+ readonly dateFrom?: string | null;
502
+ readonly dateTo?: string | null;
503
+ }
504
+ type MtSimpleFilterModel = MtTextFilterModel | MtNumberFilterModel | MtDateFilterModel;
505
+ /** Two (or more) conditions of one column joined by AND or OR. */
506
+ interface MtCombinedFilterModel<M extends MtSimpleFilterModel = MtSimpleFilterModel> {
507
+ readonly filterType: M['filterType'];
508
+ readonly operator: 'AND' | 'OR';
509
+ readonly conditions: readonly M[];
510
+ }
511
+ /**
512
+ * The set filter (live-pivot-setfilter observations): the selected values as their text keys;
513
+ * `null` stands for blank cells ("(Blanks)"). A model with every value selected is no filter.
514
+ */
515
+ interface MtSetFilterModel {
516
+ readonly filterType: 'set';
517
+ readonly values: readonly (string | null)[];
518
+ }
519
+ interface MtMultiFilterModel {
520
+ readonly filterType: 'multi';
521
+ readonly filterModels: readonly (MtColumnFilterModel | null)[];
522
+ }
523
+ interface MtFilterOption {
524
+ readonly displayKey: string;
525
+ readonly displayName: string;
526
+ readonly predicate: (values: readonly unknown[], cellValue: unknown) => boolean;
527
+ readonly numberOfInputs?: 0 | 1 | 2;
528
+ }
529
+ interface MtMultiFilterDef {
530
+ readonly filter: 'text' | 'number' | 'date' | 'set';
531
+ readonly filterParams?: MtFilterParams;
532
+ readonly display?: 'inline' | 'subMenu' | 'accordion';
533
+ readonly title?: string;
534
+ }
535
+ interface MtFiltersToolPanelInstance {
536
+ expandFilters(colIds?: readonly string[]): void;
537
+ collapseFilters(colIds?: readonly string[]): void;
538
+ syncLayoutWithGrid(): void;
539
+ }
540
+ interface MtFiltersToolPanelDef {
541
+ readonly suppressExpandAll?: boolean;
542
+ readonly suppressFilterSearch?: boolean;
543
+ readonly suppressSyncLayoutWithGrid?: boolean;
544
+ }
545
+ type MtColumnFilterModel = MtSimpleFilterModel | MtCombinedFilterModel | MtSetFilterModel | MtMultiFilterModel;
546
+ /** `getFilterModel()`: the active column filters by column id (the quick filter is not part of it). */
547
+ type MtFilterModel = Readonly<Record<string, MtColumnFilterModel>>;
548
+ /** One option of a remote set filter: the key the model keeps and the text the list shows. */
549
+ interface MtSetFilterOption {
550
+ readonly value: string;
551
+ readonly label: string;
552
+ }
553
+ /** An observable-like search result (an RxJS `Observable` fits); a stale search is unsubscribed. */
554
+ interface MtSetFilterSubscribable<V> {
555
+ subscribe(observer: {
556
+ next: (value: V) => void;
557
+ error: (error: unknown) => void;
558
+ complete: () => void;
559
+ }): {
560
+ unsubscribe(): void;
561
+ };
562
+ }
563
+ type MtSetFilterSearchResult = PromiseLike<readonly MtSetFilterOption[]> | MtSetFilterSubscribable<readonly MtSetFilterOption[]>;
564
+ /**
565
+ * A set filter whose options come from a search (usually a server) instead of the column's
566
+ * values. The popup searches as the user types, lists the matches in the order returned and
567
+ * keeps the chosen option values in the model; choosing nothing is no filter. Chosen values
568
+ * stay listed (with their remembered labels) when a later search does not return them.
569
+ */
570
+ interface MtSetFilterRemoteSearch {
571
+ /** The options matching the trimmed search text (`''` when the popup opens). */
572
+ readonly search: (text: string) => MtSetFilterSearchResult;
573
+ /** One value at a time, for a server that filters by one key (default false). */
574
+ readonly single?: boolean;
575
+ /** Delay between typing and searching (default 300ms). */
576
+ readonly debounceMs?: number;
577
+ /** Shorter texts do not search; the popup asks the user to type (default 0). */
578
+ readonly minLength?: number;
579
+ }
580
+ interface MtFilterParams {
581
+ /** Delay between typing and applying the filter (observed default 500ms for text, number and date). */
582
+ readonly debounceMs?: number;
583
+ /** Conditions the popup offers (default 2). */
584
+ readonly maxNumConditions?: number;
585
+ /** The operator selected for a new condition (default `contains` / `equals`). */
586
+ readonly defaultOption?: string;
587
+ readonly defaultJoinOperator?: 'AND' | 'OR';
588
+ /** Text filter: compare case-sensitively (default false). */
589
+ readonly caseSensitive?: boolean;
590
+ /** Number and date filters: `inRange` includes its bounds (default false). */
591
+ readonly inRangeInclusive?: boolean;
592
+ /** Popup buttons; with `apply` the filter applies on the button or Enter instead of while typing. */
593
+ readonly buttons?: readonly ('apply' | 'clear' | 'reset' | 'cancel')[];
594
+ /** Set filter: the values offered instead of the column's distinct values. */
595
+ readonly values?: readonly unknown[] | ((params: {
596
+ success: (values: readonly unknown[]) => void;
597
+ }) => void);
598
+ readonly filters?: readonly MtMultiFilterDef[];
599
+ readonly filterOptions?: readonly (string | MtFilterOption)[];
600
+ readonly numAlwaysVisibleConditions?: number;
601
+ readonly closeOnApply?: boolean;
602
+ readonly readOnly?: boolean;
603
+ readonly trimInput?: boolean;
604
+ readonly textFormatter?: (value: string) => string;
605
+ readonly textMatcher?: (params: {
606
+ filterOption: string;
607
+ value: string;
608
+ filterText: string;
609
+ }) => boolean;
610
+ readonly allowedCharPattern?: string;
611
+ readonly numberParser?: (text: string) => number | null;
612
+ readonly numberFormatter?: (value: number | null) => string | null;
613
+ readonly comparator?: (a: any, b: any) => number;
614
+ readonly browserDatePicker?: boolean;
615
+ readonly minValidYear?: number;
616
+ readonly maxValidYear?: number;
617
+ readonly minValidDate?: string | Date;
618
+ readonly maxValidDate?: string | Date;
619
+ readonly includeBlanksInEquals?: boolean;
620
+ readonly includeBlanksInNotEqual?: boolean;
621
+ readonly includeBlanksInLessThan?: boolean;
622
+ readonly includeBlanksInGreaterThan?: boolean;
623
+ readonly includeBlanksInRange?: boolean;
624
+ readonly filterPlaceholder?: string | ((params: {
625
+ filterOption: string;
626
+ placeholder: string;
627
+ }) => string);
628
+ readonly applyMiniFilterWhileTyping?: boolean;
629
+ readonly excelMode?: 'windows' | 'mac';
630
+ readonly valueFormatter?: (params: {
631
+ value: any;
632
+ }) => string;
633
+ readonly suppressSorting?: boolean;
634
+ readonly defaultToNothingSelected?: boolean;
635
+ readonly newRowsAction?: 'keep' | 'reset';
636
+ readonly showTooltips?: boolean;
637
+ readonly refreshValuesOnOpen?: boolean;
638
+ readonly keyCreator?: (params: {
639
+ value: any;
640
+ }) => string;
641
+ readonly treeList?: boolean;
642
+ readonly treeListPathGetter?: (value: any) => readonly string[] | null;
643
+ readonly treeListFormatter?: (pathKey: string | null, level: number, parentPathKeys: readonly string[]) => string;
644
+ /** Set filter: hides the "Search..." mini filter. */
645
+ readonly suppressMiniFilter?: boolean;
646
+ /** Set filter: hides the "(Select All)" row. */
647
+ readonly suppressSelectAll?: boolean;
648
+ /** Set filter: search the options remotely as the user types (no "(Select All)"). */
649
+ readonly remoteSearch?: MtSetFilterRemoteSearch;
650
+ }
651
+ type MtFilterChangedSource = 'api' | 'quickFilter' | 'columnFilter';
652
+ interface MtFilterChangedEvent {
653
+ readonly source: MtFilterChangedSource;
654
+ /** Columns whose filter changed; empty for the quick filter, external filter and `onFilterChanged()`. */
655
+ readonly columns: readonly string[];
656
+ /** Set when a floating-filter input made the change. */
657
+ readonly afterFloatingFilter?: boolean;
658
+ }
659
+ /** A filter input changed before its debounce applied it. */
660
+ interface MtFilterModifiedEvent {
661
+ readonly colId: string;
662
+ }
663
+ interface MtFilterOpenedEvent {
664
+ readonly colId: string;
665
+ readonly source: 'COLUMN_MENU';
666
+ }
667
+ /** The selection column's id in column state, like the reference's (selection-2 observations). */
668
+ declare const SELECTION_COLUMN_ID = "ag-Grid-SelectionColumn";
669
+ /** The row-numbers column's id in column state (live-selection observations). */
670
+ declare const ROW_NUMBERS_COLUMN_ID = "ag-Grid-RowNumbersColumn";
671
+ /** The auto group column's id (the reference's), shown while rows are grouped. */
672
+ declare const AUTO_GROUP_COLUMN_ID = "ag-Grid-AutoColumn";
673
+ type MtRowSelectionMode = 'singleRow' | 'multiRow';
674
+ /** Rows the header checkbox, `selectAll()` and Ctrl+A act on. */
675
+ type MtSelectAllMode = 'all' | 'filtered';
676
+ interface MtRowSelectionOptions<T> {
677
+ readonly groupSelects?: 'self' | 'descendants' | 'filteredDescendants';
678
+ readonly mode: MtRowSelectionMode;
679
+ /** Checkbox cells in the selection column (default true). */
680
+ readonly checkboxes?: boolean;
681
+ /** The header select-all checkbox (default true; `multiRow` only). */
682
+ readonly headerCheckbox?: boolean;
683
+ /**
684
+ * Clicking a row's cells selects it: `true` selects and deselects (Ctrl+click),
685
+ * `'enableSelection'` only selects, `'enableDeselection'` only deselects. Default false:
686
+ * clicks focus the cell and report `rowClicked` without selecting.
687
+ */
688
+ readonly enableClickSelection?: boolean | 'enableSelection' | 'enableDeselection';
689
+ /** In `multiRow`, a plain click adds to the selection like Ctrl+click. */
690
+ readonly enableSelectionWithoutKeys?: boolean;
691
+ /** Default `'all'`: the header checkbox selects every row, filtered out or not. */
692
+ readonly selectAll?: MtSelectAllMode;
693
+ /** Rows returning false cannot be selected; their checkbox is disabled. */
694
+ readonly isRowSelectable?: (node: MtRowNode<T>) => boolean;
695
+ /** Hides the checkbox of rows that are not selectable instead of disabling it. */
696
+ readonly hideDisabledCheckboxes?: boolean;
697
+ }
698
+ /** Overrides for the selection column (width, pinned side, header text, resizing). */
699
+ type MtSelectionColumnDef<T> = Partial<Pick<MtColumnDef<T>, 'headerName' | 'width' | 'minWidth' | 'maxWidth' | 'pinned' | 'resizable' | 'lockPinned'>>;
700
+ interface MtRowNumbersOptions {
701
+ readonly width?: number;
702
+ readonly minWidth?: number;
703
+ readonly maxWidth?: number;
704
+ readonly resizable?: boolean;
705
+ readonly headerName?: string;
706
+ }
707
+ type MtSelectionSource = 'api' | 'apiSelectAll' | 'apiSelectAllFiltered' | 'checkboxSelected' | 'rowClicked' | 'spaceKey' | 'uiSelectAll' | 'uiSelectAllFiltered' | 'keyboardSelectAll' | 'rowDataChanged' | 'selectableChanged';
708
+ interface MtRowSelectedEvent<T> {
709
+ readonly node: MtRowNode<T>;
710
+ readonly selected: boolean;
711
+ readonly source: MtSelectionSource;
712
+ }
713
+ interface MtSelectionChangedEvent<T> {
714
+ readonly source: MtSelectionSource;
715
+ /** In selection order. */
716
+ readonly selectedNodes: readonly MtRowNode<T>[];
717
+ }
718
+ interface MtRowClickedEvent<T> {
719
+ readonly node: MtRowNode<T>;
720
+ readonly rowIndex: number;
721
+ readonly event: MouseEvent;
722
+ }
723
+ interface MtSetNodesSelectedParams<T> {
724
+ readonly nodes: readonly MtRowNode<T>[];
725
+ readonly newValue: boolean;
726
+ readonly source?: MtSelectionSource;
727
+ }
728
+ interface MtRowDragEvent<T> {
729
+ /** The row whose handle is dragged. */
730
+ readonly node: MtRowNode<T>;
731
+ /** The dragged rows: the selected rows with `rowDragMultiRow`, otherwise `[node]`. */
732
+ readonly nodes: readonly MtRowNode<T>[];
733
+ /** Displayed index under the pointer. */
734
+ readonly overIndex: number;
735
+ readonly overNode: MtRowNode<T> | undefined;
736
+ /** Pointer offset from the top of the rows, scrolled rows included. */
737
+ readonly y: number;
738
+ readonly vDirection: 'up' | 'down' | null;
739
+ readonly event: PointerEvent;
740
+ }
741
+ interface MtCellSelectionOptions {
742
+ /**
743
+ * The handle on the only range's bottom-right cell (default true, a range handle);
744
+ * `{ mode: 'fill' }` makes it the fill handle (dragging writes the range's values on).
745
+ */
746
+ readonly handle?: boolean | {
747
+ readonly mode: 'range' | 'fill';
748
+ };
749
+ /** Ctrl+drag/Ctrl+click add ranges unless suppressed. */
750
+ readonly suppressMultiRanges?: boolean;
751
+ /** Highlights the headers of the ranged columns (default true); row numbers always highlight. */
752
+ readonly enableHeaderHighlight?: boolean;
753
+ }
754
+ /** A range in displayed coordinates; `startRow`/`startCol` is the anchor (the focused cell). */
755
+ interface MtCellRange {
756
+ readonly startRow: number;
757
+ readonly endRow: number;
758
+ /** Column ids from the start column to the end column in displayed order. */
759
+ readonly columns: readonly string[];
760
+ }
761
+ interface MtCellSelectionChangedEvent {
762
+ /** True while a pointer drag defines the range. */
763
+ readonly started: boolean;
764
+ readonly finished: boolean;
765
+ readonly ranges: readonly MtCellRange[];
766
+ }
767
+ interface MtAddCellRangeParams {
768
+ readonly rowStartIndex: number;
769
+ readonly rowEndIndex: number;
770
+ /** Column ids, or a start/end pair of ids (displayed order between them). */
771
+ readonly columns?: readonly string[];
772
+ readonly columnStart?: string;
773
+ readonly columnEnd?: string;
774
+ }
775
+ type MtStatusBarPanel = 'totalAndFilteredRowCount' | 'totalRowCount' | 'filteredRowCount' | 'selectedRowCount' | 'aggregation';
776
+ interface MtStatusBarOptions {
777
+ /** Panels in display order; the aggregation panel sits at the right (observed). */
778
+ readonly panels: readonly MtStatusBarPanel[];
779
+ }
780
+ /** Built-in context actions. Cut/Paste require editable targets; export suppression removes items. */
781
+ type MtDefaultMenuItem = 'cut' | 'copy' | 'copyWithHeaders' | 'copyWithGroupHeaders' | 'paste' | 'separator' | 'export' | 'csvExport' | 'excelExport' | 'pdfExport' | 'expandAll' | 'contractAll' | 'chartRange' | 'autoSizeAll' | 'resetColumns';
782
+ type MtDefaultMainMenuItem = 'sortAscending' | 'sortDescending' | 'sortUnSort' | 'separator' | 'pinSubMenu' | 'autoSizeThis' | 'autoSizeAll' | 'rowGroup' | 'rowUnGroup' | 'valueAgg' | 'pivot' | 'columnChooser' | 'resetColumns' | 'columnFilter' | 'expandAll' | 'contractAll';
783
+ type MtMainMenuItem<T> = MtDefaultMainMenuItem | MtMenuItemDef<T>;
784
+ interface MtGetMainMenuItemsParams<T> extends MtMenuActionParams<T> {
785
+ readonly defaultItems: readonly MtDefaultMainMenuItem[];
786
+ }
787
+ /** A custom context menu item. */
788
+ interface MtMenuItemDef<T> {
789
+ readonly name: string;
790
+ readonly action?: (params: MtMenuActionParams<T>) => void;
791
+ readonly disabled?: boolean;
792
+ readonly shortcut?: string;
793
+ /** A grid icon name (asc, desc, pin, columns, copy, cut, paste, save, …). */
794
+ readonly icon?: GridIconName | string | HTMLElement;
795
+ readonly subMenu?: readonly (MtContextMenuItem<T> | MtDefaultMainMenuItem)[];
796
+ readonly checked?: boolean;
797
+ readonly tooltip?: string;
798
+ readonly cssClasses?: readonly string[];
799
+ }
800
+ type MtContextMenuItem<T> = MtDefaultMenuItem | MtMenuItemDef<T>;
801
+ interface MtMenuActionParams<T> {
802
+ readonly api: MtGridApi<T>;
803
+ readonly node: MtRowNode<T> | null;
804
+ readonly column: MtColumnDef<T> | null;
805
+ readonly value: unknown;
806
+ }
807
+ interface MtGetContextMenuItemsParams<T> extends MtMenuActionParams<T> {
808
+ readonly defaultItems: readonly MtDefaultMenuItem[];
809
+ }
810
+ interface MtContextMenuVisibleChangedEvent {
811
+ readonly visible: boolean;
812
+ readonly source: 'ui' | 'api';
813
+ readonly rowIndex: number | null;
814
+ readonly colId: string | null;
815
+ }
816
+ interface MtShowContextMenuParams {
817
+ /** Displayed row index and column; defaults to the focused cell. */
818
+ readonly rowIndex?: number;
819
+ readonly colId?: string;
820
+ /** Viewport coordinates; default: the cell's centre. */
821
+ readonly x?: number;
822
+ readonly y?: number;
823
+ }
824
+ /** What copySelectedRangeToClipboard / copyToClipboard add above the values. */
825
+ interface MtCopyParams {
826
+ readonly includeHeaders?: boolean;
827
+ readonly includeGroupHeaders?: boolean;
828
+ readonly copySelectedRows?: boolean;
829
+ }
830
+ interface MtClipboardCellParams<T> extends MtExportCellParams<T> {
831
+ readonly formatValue: (value?: unknown) => string;
832
+ }
833
+ interface MtClipboardHeaderParams<T> {
834
+ readonly column: MtColumnDef<T>;
835
+ }
836
+ interface MtClipboardGroupHeaderParams {
837
+ readonly groupId: string;
838
+ readonly headerName: string;
839
+ }
840
+ interface MtExportCell {
841
+ readonly data: {
842
+ readonly value: unknown;
843
+ readonly type?: string;
844
+ };
845
+ readonly styleId?: string;
846
+ }
847
+ interface MtExportRow {
848
+ readonly cells: readonly MtExportCell[];
849
+ readonly height?: number;
850
+ }
851
+ type MtExportContent = string | readonly (readonly unknown[] | MtExportRow)[];
852
+ interface MtExcelStyle {
853
+ readonly id: string;
854
+ readonly font?: {
855
+ readonly bold?: boolean;
856
+ readonly italic?: boolean;
857
+ readonly color?: string;
858
+ readonly size?: number;
859
+ readonly fontName?: string;
860
+ };
861
+ readonly interior?: {
862
+ readonly color?: string;
863
+ readonly pattern?: string;
864
+ };
865
+ readonly alignment?: {
866
+ readonly horizontal?: string;
867
+ readonly vertical?: string;
868
+ readonly wrapText?: boolean;
869
+ readonly indent?: number;
870
+ };
871
+ readonly numberFormat?: {
872
+ readonly format: string;
873
+ };
874
+ readonly borders?: Readonly<Record<string, {
875
+ readonly color?: string;
876
+ readonly lineStyle?: string;
877
+ readonly weight?: number;
878
+ }>>;
879
+ }
880
+ interface MtExportCellParams<T> {
881
+ readonly value: unknown;
882
+ readonly node: MtRowNode<T>;
883
+ readonly column: MtColumnDef<T>;
884
+ readonly exportType?: 'csv' | 'excel' | 'pdf' | 'clipboard';
885
+ /** Format with the grid's column/group-key formatter without changing the raw callback value. */
886
+ readonly formatValue?: (value?: unknown) => string;
887
+ }
888
+ /** Options shared by the CSV and Excel exports (ag-grid archive 36.2.0 csv-export). */
889
+ interface MtExportParams<T> {
890
+ /** File name; the extension is appended when missing (defaults export.csv / export.xlsx). */
891
+ readonly fileName?: string;
892
+ readonly skipColumnHeaders?: boolean;
893
+ readonly skipColumnGroupHeaders?: boolean;
894
+ /** Every column, hidden ones included (default: the displayed columns). */
895
+ readonly allColumns?: boolean;
896
+ /** Only these columns, in this order. */
897
+ readonly columnKeys?: readonly string[];
898
+ readonly onlySelected?: boolean;
899
+ readonly onlySelectedAllPages?: boolean;
900
+ readonly skipRowGroups?: boolean;
901
+ readonly skipPinnedTop?: boolean;
902
+ readonly skipPinnedBottom?: boolean;
903
+ readonly prependContent?: MtExportContent;
904
+ readonly appendContent?: MtExportContent;
905
+ readonly getCustomContentBelowRow?: (params: {
906
+ node: MtRowNode<T>;
907
+ }) => MtExportContent | undefined;
908
+ readonly processRowGroupCallback?: (params: {
909
+ node: MtRowNode<T>;
910
+ }) => string;
911
+ /** `filteredAndSorted` (default) or every row in source order. */
912
+ readonly exportedRows?: 'all' | 'filteredAndSorted';
913
+ readonly processCellCallback?: (params: MtExportCellParams<T>) => unknown;
914
+ readonly processHeaderCallback?: (params: {
915
+ column: MtColumnDef<T>;
916
+ }) => string;
917
+ readonly processGroupHeaderCallback?: (params: {
918
+ groupId: string;
919
+ headerName: string;
920
+ }) => string;
921
+ readonly shouldRowBeSkipped?: (params: {
922
+ node: MtRowNode<T>;
923
+ }) => boolean;
924
+ }
925
+ interface MtCsvExportParams<T> extends MtExportParams<T> {
926
+ /** Default ','. */
927
+ readonly columnSeparator?: string;
928
+ /** Writes bare values (default false: every value double-quoted, quotes doubled). */
929
+ readonly suppressQuotes?: boolean;
930
+ }
931
+ interface MtExcelExportParams<T> extends MtExportParams<T> {
932
+ /** Default 'mt-grid'. */
933
+ readonly sheetName?: string;
934
+ /** Workbook author property (default 'Masterteam Data Grid'). */
935
+ readonly author?: string;
936
+ /** Column width in px, one for all or per column (default: the rendered width). */
937
+ readonly columnWidth?: number | ((params: {
938
+ column: MtColumnDef<T>;
939
+ }) => number);
940
+ /** Header row height in px; none written unless given (Excel's default then). */
941
+ readonly headerRowHeight?: number;
942
+ /** Data row height in px; none written unless given (Excel's default then). */
943
+ readonly rowHeight?: number;
944
+ /** Default 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'. */
945
+ readonly mimeType?: string;
946
+ }
947
+ interface MtPdfExportParams<T> extends MtExportParams<T> {
948
+ readonly title?: string;
949
+ readonly sheetName?: string;
950
+ readonly orientation?: 'portrait' | 'landscape';
951
+ readonly pageSize?: 'A4' | 'Letter';
952
+ }
953
+ /** The built-in aggregation functions. */
954
+ type MtAggFuncName = 'sum' | 'min' | 'max' | 'count' | 'avg' | 'first' | 'last';
955
+ interface MtAggFuncParams<T> {
956
+ /** The leaf values of the group for the column (`undefined` entries included). */
957
+ readonly values: readonly unknown[];
958
+ readonly colId: string;
959
+ readonly rowNode: MtRowNode<T>;
960
+ }
961
+ type MtAggFunc<T> = (params: MtAggFuncParams<T>) => unknown;
962
+ /** What `avg` returns (the reference's shape): the mean and the count it was taken over. */
963
+ interface MtAvgResult {
964
+ readonly count: number;
965
+ readonly value: number | null;
966
+ /** The mean, so `Number(value)` in a formatter works (NaN when there was no number). */
967
+ valueOf(): number;
968
+ toString(): string;
969
+ }
970
+ /** When the row group panel above the header shows (default never). */
971
+ type MtRowGroupPanelShow = 'never' | 'always' | 'onlyWhenGrouping';
972
+ type MtGroupDisplayType = 'singleColumn' | 'multipleColumns' | 'groupRows' | 'custom';
973
+ interface MtPivotMaxColumnsExceededEvent {
974
+ readonly maxColumns: number;
975
+ readonly generatedColumns: number;
976
+ }
977
+ interface MtDisplayedColumnsChangedEvent {
978
+ readonly source: MtColumnEventSource;
979
+ }
980
+ interface MtColumnsToolPanelInstance<T> {
981
+ expandColumnGroups(groupIds?: readonly string[]): void;
982
+ collapseColumnGroups(groupIds?: readonly string[]): void;
983
+ setColumnLayout(layout: readonly MtColDef<T>[]): void;
984
+ getColumnLayout(): readonly MtColDef<T>[];
985
+ }
986
+ /** The auto group column's definition overrides (header "Group", width 200 by default). */
987
+ interface MtAutoGroupColumnDef<T> extends Partial<MtColumnDef<T>> {
988
+ readonly cellRendererParams?: {
989
+ /** Hides the child count after the group key. */
990
+ readonly suppressCount?: boolean;
991
+ };
992
+ }
993
+ interface MtRowGroupOpenedEvent<T> {
994
+ readonly node: MtRowNode<T>;
995
+ readonly expanded: boolean;
996
+ }
997
+ interface MtColumnRowGroupChangedEvent {
998
+ /** The grouped column ids in group order. */
999
+ readonly columns: readonly string[];
1000
+ readonly source: MtColumnEventSource;
1001
+ }
1002
+ interface MtExpandOrCollapseAllEvent {
1003
+ readonly source: 'expandAll' | 'collapseAll';
1004
+ }
1005
+ type MtToolPanelKind = 'columns' | 'filters';
1006
+ /** Options of the Columns tool panel. */
1007
+ interface MtColumnsToolPanelParams {
1008
+ readonly [key: string]: unknown;
1009
+ readonly suppressRowGroups?: boolean;
1010
+ readonly suppressValues?: boolean;
1011
+ readonly suppressPivots?: boolean;
1012
+ readonly suppressPivotMode?: boolean;
1013
+ /** Hides the search box. */
1014
+ readonly suppressColumnFilter?: boolean;
1015
+ readonly suppressColumnSelectAll?: boolean;
1016
+ readonly suppressColumnExpandAll?: boolean;
1017
+ /** Starts the column list with every group collapsed. */
1018
+ readonly contractColumnSelection?: boolean;
1019
+ }
1020
+ interface MtToolPanelDef {
1021
+ /** The key `openToolPanel` and the events use. */
1022
+ readonly id: string;
1023
+ readonly labelDefault: string;
1024
+ readonly iconKey?: 'columns' | 'filter';
1025
+ readonly toolPanel: MtToolPanelKind | 'agColumnsToolPanel' | 'agFiltersToolPanel' | Type<unknown>;
1026
+ readonly toolPanelParams?: MtColumnsToolPanelParams;
1027
+ /** Panel width in px (the reference's 250). */
1028
+ readonly width?: number;
1029
+ readonly minWidth?: number;
1030
+ readonly maxWidth?: number;
1031
+ }
1032
+ interface MtSideBarDef {
1033
+ readonly toolPanels: readonly (MtToolPanelKind | MtToolPanelDef)[];
1034
+ /** The panel open at start; without it the side bar shows its buttons only. */
1035
+ readonly defaultToolPanel?: string;
1036
+ readonly hiddenByDefault?: boolean;
1037
+ readonly position?: 'left' | 'right';
1038
+ }
1039
+ /** `true` = Columns and Filters; a kind or a list of kinds; or the full definition. */
1040
+ type MtSideBar = boolean | MtToolPanelKind | readonly MtToolPanelKind[] | MtSideBarDef;
1041
+ type MtToolPanelVisibleSource = 'sideBarButtonClicked' | 'sideBarInitializing' | 'api';
1042
+ interface MtToolPanelVisibleChangedEvent {
1043
+ readonly key: string;
1044
+ readonly visible: boolean;
1045
+ /** True when another panel opens or closes in the same click. */
1046
+ readonly switchingToolPanel: boolean;
1047
+ readonly source: MtToolPanelVisibleSource;
1048
+ }
1049
+ interface MtToolPanelSizeChangedEvent {
1050
+ readonly key: string;
1051
+ readonly width: number;
1052
+ readonly started: boolean;
1053
+ readonly ended: boolean;
1054
+ }
1055
+ interface MtColumnValueChangedEvent {
1056
+ /** The value (aggregated) column ids. */
1057
+ readonly columns: readonly string[];
1058
+ readonly source: MtColumnEventSource;
1059
+ }
1060
+ interface MtColumnPivotChangedEvent {
1061
+ readonly columns: readonly string[];
1062
+ readonly source: MtColumnEventSource;
1063
+ }
1064
+ interface MtColumnPivotModeChangedEvent {
1065
+ readonly pivotMode: boolean;
1066
+ }
1067
+ type MtChartType = 'groupedColumn' | 'stackedColumn' | 'normalizedColumn' | 'groupedBar' | 'stackedBar' | 'normalizedBar' | 'pie' | 'donut' | 'line' | 'stackedLine' | 'normalizedLine' | 'area' | 'stackedArea' | 'normalizedArea' | 'scatter' | 'bubble' | 'radarLine' | 'radarArea' | 'nightingale' | 'radialColumn' | 'radialBar' | 'boxPlot' | 'histogram' | 'rangeBar' | 'rangeArea' | 'treemap' | 'sunburst' | 'heatmap' | 'waterfall' | 'funnel' | 'coneFunnel' | 'pyramid' | 'columnLineCombo' | 'areaColumnCombo' | 'customCombo';
1068
+ type MtChartDataType = 'category' | 'series' | 'time' | 'excluded';
1069
+ type MtChartToolbarItem = 'chartMenu' | 'chartLink' | 'chartUnlink' | 'chartDownload';
1070
+ /** Inclusive indexes into displayed rows, before pagination. */
1071
+ interface MtChartCellRange {
1072
+ readonly rowStartIndex?: number | null;
1073
+ readonly rowEndIndex?: number | null;
1074
+ readonly columns: readonly string[];
1075
+ /** Optional stable selection. null follows all matching rows; [] selects none.
1076
+ * When supplied, identities take precedence over positional bounds.
1077
+ */
1078
+ readonly rowIds?: readonly string[] | null;
1079
+ }
1080
+ interface MtSeriesChartType {
1081
+ readonly colId: string;
1082
+ readonly chartType: MtChartType;
1083
+ readonly secondaryAxis?: boolean;
1084
+ }
1085
+ /** Owned theme schema; see CHARTS.md for the common and per-series override keys. */
1086
+ type MtChartThemeOverrides = Readonly<Record<string, unknown>>;
1087
+ interface MtChartTheme {
1088
+ readonly palette: {
1089
+ readonly fills: readonly string[];
1090
+ readonly strokes?: readonly string[];
1091
+ };
1092
+ readonly overrides?: MtChartThemeOverrides;
1093
+ }
1094
+ type MtChartToolPanel = 'settings' | 'data' | 'format';
1095
+ interface MtChartToolPanelsDef {
1096
+ readonly panels?: readonly MtChartToolPanel[];
1097
+ readonly defaultToolPanel?: MtChartToolPanel;
1098
+ readonly settingsPanel?: {
1099
+ readonly chartGroupsDef?: Readonly<Record<string, readonly MtChartType[] | boolean>>;
1100
+ };
1101
+ readonly dataPanel?: {
1102
+ readonly groups?: readonly ('categories' | 'series' | 'switchCategorySeries' | 'aggregation' | 'range')[];
1103
+ };
1104
+ readonly formatPanel?: {
1105
+ readonly groups?: readonly ('chart' | 'legend' | 'axes' | 'series' | 'tooltip' | 'navigator')[];
1106
+ };
1107
+ }
1108
+ interface MtCreateRangeChartParams {
1109
+ readonly cellRange: MtChartCellRange;
1110
+ /** Additional disjoint ranges, read after cellRange. */
1111
+ readonly cellRanges?: readonly MtChartCellRange[];
1112
+ readonly chartType?: MtChartType;
1113
+ readonly title?: string;
1114
+ readonly chartThemeName?: string;
1115
+ /** Human-readable source path, such as level / record / module. Separate from the authored title. */
1116
+ readonly chartContext?: string;
1117
+ readonly chartContainer?: HTMLElement;
1118
+ readonly suppressChartRanges?: boolean;
1119
+ readonly unlinkChart?: boolean;
1120
+ readonly aggFunc?: MtAggFuncName;
1121
+ readonly seriesChartTypes?: readonly MtSeriesChartType[];
1122
+ readonly switchCategorySeries?: boolean;
1123
+ readonly chartThemeOverrides?: Readonly<Record<string, unknown>>;
1124
+ readonly categoryId?: string;
1125
+ /** Checked series in display order; an empty list deliberately charts no series. */
1126
+ readonly seriesIds?: readonly string[];
1127
+ }
1128
+ interface MtChartModel {
1129
+ readonly chartId: string;
1130
+ readonly chartType: MtChartType;
1131
+ readonly cellRange: MtChartCellRange;
1132
+ readonly cellRanges: readonly MtChartCellRange[];
1133
+ readonly chart: {
1134
+ readonly title: string;
1135
+ };
1136
+ readonly chartContext?: string;
1137
+ readonly chartThemeName: string;
1138
+ readonly chartThemeOverrides: MtChartThemeOverrides;
1139
+ readonly categoryId: string;
1140
+ readonly seriesIds: readonly string[];
1141
+ readonly unlinked: boolean;
1142
+ readonly aggFunc?: MtAggFuncName;
1143
+ readonly switchCategorySeries: boolean;
1144
+ readonly seriesChartTypes: readonly MtSeriesChartType[];
1145
+ /** Current derived data, also available for chart integrations without reading canvas pixels. */
1146
+ readonly data: {
1147
+ readonly category: {
1148
+ readonly id: string;
1149
+ readonly name: string;
1150
+ readonly labels: readonly string[];
1151
+ /** Category identities behind the labels; present for identity-grouped charts. */
1152
+ readonly ids?: readonly string[];
1153
+ /** Resolved category colours (authored or stable palette); present for identity-grouped charts. */
1154
+ readonly colors?: readonly (string | null)[];
1155
+ };
1156
+ readonly series: readonly {
1157
+ readonly id: string;
1158
+ readonly name: string;
1159
+ readonly values: readonly (number | null)[];
1160
+ /** A count measure (`records`, `nonEmpty`, `distinct`) rather than a numeric column. */
1161
+ readonly measure?: MtChartMeasureKind;
1162
+ /** The one unit every charted record shares (`chartUnit`); absent when none or mixed. */
1163
+ readonly unit?: string;
1164
+ }[];
1165
+ };
1166
+ }
1167
+ /** Count measures offered beside numeric series: distinct records, records with a value, distinct values. */
1168
+ type MtChartMeasureKind = 'records' | 'nonEmpty' | 'distinct';
1169
+ interface MtChartImageParams {
1170
+ readonly fileName?: string;
1171
+ readonly dimensions?: {
1172
+ readonly width: number;
1173
+ readonly height: number;
1174
+ };
1175
+ }
1176
+ interface MtChartRef {
1177
+ readonly chartId: string;
1178
+ readonly chartElement: HTMLElement;
1179
+ destroyChart(): void;
1180
+ focusChart(): void;
1181
+ getChartImageDataURL(params?: MtChartImageParams): string | undefined;
1182
+ downloadChart(params?: MtChartImageParams): void;
1183
+ }
1184
+ interface MtRangeChartUpdateParams {
1185
+ readonly type: 'rangeChartUpdate';
1186
+ readonly chartId: string;
1187
+ readonly chartType?: MtChartType;
1188
+ readonly cellRange?: MtChartCellRange;
1189
+ readonly cellRanges?: readonly MtChartCellRange[];
1190
+ readonly aggFunc?: MtAggFuncName;
1191
+ readonly seriesChartTypes?: readonly MtSeriesChartType[];
1192
+ readonly switchCategorySeries?: boolean;
1193
+ readonly chartThemeName?: string;
1194
+ readonly chartThemeOverrides?: MtChartThemeOverrides;
1195
+ readonly categoryId?: string;
1196
+ readonly seriesIds?: readonly string[];
1197
+ }
1198
+ interface MtCreatePivotChartParams {
1199
+ readonly chartType: MtChartType;
1200
+ readonly chartContainer?: HTMLElement;
1201
+ readonly unlinkChart?: boolean;
1202
+ }
1203
+ interface MtChartCreatedEvent {
1204
+ readonly chartId: string;
1205
+ }
1206
+ interface MtChartDestroyedEvent {
1207
+ readonly chartId: string;
1208
+ }
1209
+ interface MtChartRangeSelectionChangedEvent {
1210
+ readonly chartId: string;
1211
+ readonly cellRange: MtChartCellRange;
1212
+ }
1213
+ interface MtChartOptionsChangedEvent {
1214
+ readonly chartId: string;
1215
+ readonly chartType: MtChartType;
1216
+ readonly chartThemeName: string;
1217
+ readonly chartOptions: MtChartThemeOverrides;
1218
+ }
1219
+ interface MtGridApi<T> {
1220
+ getDisplayedRowCount(): number;
1221
+ /** The displayed row (group rows included) at the index, or undefined. */
1222
+ getDisplayedRowAtIndex(index: number): MtRowNode<T> | undefined;
1223
+ /** The grouped column ids in group order. */
1224
+ getRowGroupColumns(): readonly string[];
1225
+ /** Replaces the grouped columns (API source: columns stay visible). */
1226
+ setRowGroupColumns(colIds: readonly string[]): void;
1227
+ addRowGroupColumns(colIds: readonly string[]): void;
1228
+ removeRowGroupColumns(colIds: readonly string[]): void;
1229
+ expandAll(): void;
1230
+ collapseAll(): void;
1231
+ setRowNodeExpanded(node: MtRowNode<T>, expanded: boolean, expandParents?: boolean): void;
1232
+ /** The side bar definition in use, or null without one. */
1233
+ getSideBar(): MtSideBarDef | null;
1234
+ setSideBarVisible(show: boolean): void;
1235
+ isSideBarVisible(): boolean;
1236
+ setSideBarPosition(position: 'left' | 'right'): void;
1237
+ /** Opens the panel with the key (`columns` / `filters` by default); unknown keys do nothing. */
1238
+ openToolPanel(key: string): void;
1239
+ closeToolPanel(): void;
1240
+ getOpenedToolPanel(): string | null;
1241
+ isToolPanelShowing(): boolean;
1242
+ refreshToolPanel(): void;
1243
+ getToolPanelInstance<TPanel = MtColumnsToolPanelInstance<T>>(id: string): TPanel | undefined;
1244
+ /** The aggregated (value) column ids in definition order. */
1245
+ getValueColumns(): readonly string[];
1246
+ /** Named aggregations can be persisted; anonymous functions are excluded. */
1247
+ getValueColumnState(): readonly {
1248
+ readonly colId: string;
1249
+ readonly aggFunc: string;
1250
+ }[];
1251
+ /** Replaces the value columns; new ones take their `defaultAggFunc` (or `sum`). */
1252
+ setValueColumns(colIds: readonly string[]): void;
1253
+ addValueColumns(colIds: readonly string[]): void;
1254
+ removeValueColumns(colIds: readonly string[]): void;
1255
+ /** Sets or clears (`null`) the aggregation of one column. */
1256
+ setColumnAggFunc(colId: string, aggFunc: MtAggFuncName | string | null): void;
1257
+ /** Creates a linked chart (requires enableCharts). */
1258
+ createRangeChart(params: MtCreateRangeChartParams): MtChartRef | undefined;
1259
+ createPivotChart(params: MtCreatePivotChartParams): MtChartRef | undefined;
1260
+ getChartRef(chartId: string): MtChartRef | undefined;
1261
+ updateChart(params: MtRangeChartUpdateParams): void;
1262
+ downloadChart(params: MtChartImageParams & {
1263
+ readonly chartId: string;
1264
+ }): void;
1265
+ getChartImageDataURL(params: MtChartImageParams & {
1266
+ readonly chartId: string;
1267
+ }): string | undefined;
1268
+ getChartModels(): readonly MtChartModel[];
1269
+ /** Closes a chart dialog (its range highlight clears). */
1270
+ destroyChart(chartId: string): void;
1271
+ isPivotMode(): boolean;
1272
+ setPivotMode(enabled: boolean): void;
1273
+ /** The pivot result column ids (`pivot_<field>_<key>_<valueColId>`) while pivoting. */
1274
+ getPivotResultColumns(): readonly string[];
1275
+ getPivotColumns(): readonly string[];
1276
+ setPivotColumns(colIds: readonly string[]): void;
1277
+ addPivotColumns(colIds: readonly string[]): void;
1278
+ removePivotColumns(colIds: readonly string[]): void;
1279
+ startEditingCell(params: MtStartEditingCellParams): void;
1280
+ /** Commits (or cancels) the open editor. */
1281
+ stopEditing(cancel?: boolean): void;
1282
+ getEditingCells(): readonly MtEditingCell[];
1283
+ undoCellEditing(): void;
1284
+ redoCellEditing(): void;
1285
+ getCurrentUndoSize(): number;
1286
+ getCurrentRedoSize(): number;
1287
+ /** Pastes the clipboard's text at the focused cell / range (needs clipboard permission). */
1288
+ pasteFromClipboard(): Promise<void>;
1289
+ cutToClipboard(params?: MtCopyParams): Promise<void>;
1290
+ paginationGoToPage(page: number): void;
1291
+ paginationGetCurrentPage(): number;
1292
+ paginationGetTotalPages(): number;
1293
+ paginationGetPageSize(): number;
1294
+ paginationSetPageSize(size: number): void;
1295
+ paginationGoToNextPage(): void;
1296
+ paginationGoToPreviousPage(): void;
1297
+ paginationGoToFirstPage(): void;
1298
+ paginationGoToLastPage(): void;
1299
+ /** Every displayed row across the pages. */
1300
+ paginationGetRowCount(): number;
1301
+ getCellRanges(): readonly MtCellRange[];
1302
+ /** Adds a range (Ctrl+drag semantics); ranges need `cellSelection`. */
1303
+ addCellRange(params: MtAddCellRangeParams): void;
1304
+ clearCellSelection(): void;
1305
+ /** Copies the ranges (or the focused cell) as tab-separated text with CRLF rows. */
1306
+ copySelectedRangeToClipboard(params?: MtCopyParams): Promise<void>;
1307
+ /** Copies the selected rows' displayed columns as tab-separated text. */
1308
+ copySelectedRowsToClipboard(params?: MtCopyParams): Promise<void>;
1309
+ copySelectedRangeDown(): void;
1310
+ getRowNode(id: string): MtRowNode<T> | undefined;
1311
+ /** Every row in grid order (after managed row drags), filtered out or not. */
1312
+ forEachNode(callback: (node: MtRowNode<T>, index: number) => void): void;
1313
+ forEachNodeAfterFilterAndSort(callback: (node: MtRowNode<T>, index: number) => void): void;
1314
+ /** Selected rows' data in selection order. */
1315
+ getSelectedRows(): readonly T[];
1316
+ getSelectedNodes(): readonly MtRowNode<T>[];
1317
+ isRowSelected(rowId: string): boolean;
1318
+ /**
1319
+ * Selects or deselects the listed rows; one `rowSelected` per changed row (source
1320
+ * `api`) then one `selectionChanged`. In `singleRow` more than one node is ignored.
1321
+ */
1322
+ setNodesSelected(params: MtSetNodesSelectedParams<T>): void;
1323
+ /** Selects every selectable row (`multiRow` only); source `apiSelectAll`. */
1324
+ selectAll(): void;
1325
+ /** Deselects every row; the reference reports source `apiSelectAll` here too. */
1326
+ deselectAll(): void;
1327
+ /** Selects the rows that pass the filters; source `apiSelectAllFiltered`. */
1328
+ selectAllFiltered(): void;
1329
+ deselectAllFiltered(): void;
1330
+ getDisplayedRowAtIndex(index: number): MtRowNode<T> | undefined;
1331
+ getSortModel(): readonly MtSortModel[];
1332
+ setSortModel(model: readonly MtSortModel[]): void;
1333
+ ensureIndexVisible(index: number): void;
1334
+ setFocusedCell(rowIndex: number, colId: string): void;
1335
+ getColumnWidths(): readonly MtColumnWidth[];
1336
+ setColumnWidths(widths: readonly MtColumnWidth[], finished?: boolean): void;
1337
+ getColumnState(): readonly MtColumnState[];
1338
+ /** Returns false when any listed column is unknown; the known entries are still applied. */
1339
+ applyColumnState(params: MtApplyColumnStateParams): boolean;
1340
+ resetColumnState(): void;
1341
+ moveColumns(colIds: readonly string[], toIndex: number): void;
1342
+ setColumnsPinned(colIds: readonly string[], pinned: MtColumnPinned): void;
1343
+ setColumnsVisible(colIds: readonly string[], visible: boolean): void;
1344
+ /**
1345
+ * Sizes columns to their rendered content: the widest rendered cell and (unless
1346
+ * `skipHeader`) the header, plus `autoSizePadding`. Only rendered (not hidden or
1347
+ * virtualised-out) columns change; one finished `columnResized` reports them.
1348
+ */
1349
+ autoSizeColumns(colIds: readonly string[], skipHeader?: boolean): void;
1350
+ autoSizeAllColumns(skipHeader?: boolean): void;
1351
+ /** Fit displayed columns to the viewport, respecting min/max and suppressSizeToFit. */
1352
+ sizeColumnsToFit(): void;
1353
+ /**
1354
+ * Opens or closes a column group by its groupId. Unknown ids, and the generated
1355
+ * groups around ungrouped columns, are ignored; a change emits `columnGroupOpened`.
1356
+ */
1357
+ setColumnGroupOpened(groupId: string, open: boolean): void;
1358
+ /**
1359
+ * Every group in definition order, children before their group, including the
1360
+ * generated groups that pad ungrouped columns to the tree depth (always closed).
1361
+ */
1362
+ getColumnGroupState(): readonly MtColumnGroupState[];
1363
+ /** Applies the listed open states; unknown ids are ignored. One event reports every change. */
1364
+ setColumnGroupState(state: readonly Pick<MtColumnGroupState, 'groupId' | 'open'>[]): void;
1365
+ /** Returns every group to its `openByDefault`. */
1366
+ resetColumnGroupState(): void;
1367
+ /** Opens the header menu of a displayed column, anchored to its header. */
1368
+ showColumnMenu(colId: string): void;
1369
+ hidePopupMenu(): void;
1370
+ /** Opens the cell context menu (default: at the focused cell's centre). */
1371
+ showContextMenu(params?: MtShowContextMenuParams): void;
1372
+ /** Copies the ranges (or the focused cell) with optional header lines (Copy with Headers / Group Headers). */
1373
+ copyToClipboard(params?: MtCopyParams): Promise<void>;
1374
+ /** The CSV text (with its BOM) for the displayed columns and rows. */
1375
+ getDataAsCsv(params?: MtCsvExportParams<T>): string;
1376
+ /** Downloads the CSV (default export.csv). */
1377
+ exportDataAsCsv(params?: MtCsvExportParams<T>): void;
1378
+ /** The workbook as a Blob; the xlsx writer loads on first use. */
1379
+ getDataAsExcel(params?: MtExcelExportParams<T>): Promise<Blob>;
1380
+ /** Downloads the workbook (default export.xlsx). */
1381
+ exportDataAsExcel(params?: MtExcelExportParams<T>): Promise<void>;
1382
+ getDataAsPdf(params?: MtPdfExportParams<T>): Blob;
1383
+ exportDataAsPdf(params?: MtPdfExportParams<T>): void;
1384
+ /**
1385
+ * Replaces every column filter; `null` clears them. Columns without a filter and unknown
1386
+ * ids are ignored. One `filterChanged` (source `api`) lists the columns whose model
1387
+ * changed; nothing is emitted when none did.
1388
+ */
1389
+ setFilterModel(model: MtFilterModel | null): void;
1390
+ getFilterModel(): MtFilterModel;
1391
+ getColumnFilterModel(colId: string): MtColumnFilterModel | null;
1392
+ setColumnFilterModel(colId: string, model: MtColumnFilterModel | null): void;
1393
+ /** Column filters, the quick filter or an external filter present. */
1394
+ isAnyFilterPresent(): boolean;
1395
+ isColumnFilterPresent(): boolean;
1396
+ isQuickFilterPresent(): boolean;
1397
+ /** Re-runs the filters (after an external filter changed); emits `filterChanged` (source `api`, no columns). */
1398
+ onFilterChanged(): void;
1399
+ /** Clears one column's filter like `setColumnFilterModel(colId, null)`. */
1400
+ destroyFilter(colId: string): void;
1401
+ /** Opens the filter popup of a displayed column, anchored to its header. */
1402
+ showColumnFilter(colId: string): void;
1403
+ getQuickFilter(): string | undefined;
1404
+ /** Clears the quick filter (`quickFilterText`). */
1405
+ resetQuickFilter(): void;
1406
+ }
1407
+ interface MtGridReadyEvent<T> {
1408
+ readonly api: MtGridApi<T>;
1409
+ }
1410
+ /** A detail row's id: this prefix and its master's id. */
1411
+ declare const DETAIL_ROW_ID_PREFIX = "detail_";
1412
+
1413
+ /** Application defaults for built-in Columns panels; explicit panel params win. */
1414
+ declare const MT_GRID_COLUMNS_TOOL_PANEL_DEFAULTS: InjectionToken<MtColumnsToolPanelParams>;
1415
+ /** One side bar button and the panel it opens. */
1416
+ interface SideBarButton {
1417
+ readonly key: string;
1418
+ readonly label: string;
1419
+ readonly icon: GridIconName;
1420
+ }
1421
+ interface SideBarResize {
1422
+ readonly width: number;
1423
+ readonly started: boolean;
1424
+ readonly ended: boolean;
1425
+ }
1426
+ /** A tool panel after normalisation. */
1427
+ interface SideBarPanelDef {
1428
+ readonly key: string;
1429
+ readonly label: string;
1430
+ readonly icon: GridIconName;
1431
+ readonly kind: MtToolPanelKind | 'custom';
1432
+ readonly component?: Type<unknown>;
1433
+ readonly params: MtColumnsToolPanelParams;
1434
+ readonly width?: number;
1435
+ readonly minWidth?: number;
1436
+ readonly maxWidth?: number;
1437
+ }
1438
+ interface NormalizedSideBar {
1439
+ readonly panels: readonly SideBarPanelDef[];
1440
+ readonly position: 'left' | 'right';
1441
+ readonly defaultToolPanel?: string;
1442
+ readonly hiddenByDefault: boolean;
1443
+ }
1444
+
1445
+ interface ColumnGeometry<T> {
1446
+ readonly id: string;
1447
+ readonly definition: MtColumnDef<T>;
1448
+ /** Logical displayed index: left-pinned, centre, then right-pinned columns. */
1449
+ readonly index: number;
1450
+ /**
1451
+ * Offset inside the column's own section: from the physical left in the left-pinned
1452
+ * section (it flows left to right in RTL too, observed), from the inline start elsewhere.
1453
+ */
1454
+ readonly start: number;
1455
+ readonly width: number;
1456
+ readonly pinned: MtColumnPinned;
1457
+ }
1458
+
1459
+ /** The grid's own selection and row-numbers columns (never user definitions). */
1460
+ declare function isSyntheticColumn(id: string | undefined): boolean;
1461
+ interface DisplayedColumns<T> {
1462
+ readonly left: readonly ColumnGeometry<T>[];
1463
+ readonly center: readonly ColumnGeometry<T>[];
1464
+ readonly right: readonly ColumnGeometry<T>[];
1465
+ /** Logical order: left-pinned, centre, right-pinned (aria-colindex order). */
1466
+ readonly all: readonly ColumnGeometry<T>[];
1467
+ readonly leftWidth: number;
1468
+ readonly centerWidth: number;
1469
+ readonly rightWidth: number;
1470
+ }
1471
+
1472
+ /** Classes of one cell across the ranges (edge classes per range; the count suffix). */
1473
+ interface CellRangeClasses {
1474
+ /** Number of ranges covering the cell (0 = none). */
1475
+ readonly count: number;
1476
+ readonly top: boolean;
1477
+ readonly bottom: boolean;
1478
+ readonly left: boolean;
1479
+ readonly right: boolean;
1480
+ /** The only cell of the only range. */
1481
+ readonly single: boolean;
1482
+ /** The bottom-right cell of the only range (the fill handle sits here). */
1483
+ readonly handle: boolean;
1484
+ }
1485
+ interface RangeAggregates {
1486
+ /** Every cell in every range (overlaps counted once per range, like the observation). */
1487
+ readonly count: number;
1488
+ readonly sum: number | null;
1489
+ readonly min: number | null;
1490
+ readonly max: number | null;
1491
+ readonly avg: number | null;
1492
+ }
1493
+
1494
+ /**
1495
+ * Vertical layout of the displayed rows: a uniform height, or per-row heights (detail rows)
1496
+ * with prefix offsets. Every query is O(1) on a uniform layout and O(log n) otherwise.
1497
+ */
1498
+ interface RowLayout {
1499
+ readonly count: number;
1500
+ /** The shared row height when every row has it, else null. */
1501
+ readonly uniform: number | null;
1502
+ readonly total: number;
1503
+ top(index: number): number;
1504
+ height(index: number): number;
1505
+ /** The row at a vertical offset (clamped into the rows). */
1506
+ indexAt(y: number): number;
1507
+ }
1508
+ /**
1509
+ * Lays `count` rows out at `rowHeight`, with `override(index)` giving another height for
1510
+ * some rows (a detail row's). Without an override the layout stays uniform.
1511
+ */
1512
+ declare function buildRowLayout(count: number, rowHeight: number, override?: (index: number) => number | undefined): RowLayout;
1513
+ /** The half-open row window covering the viewport, with `buffer` rows either side. */
1514
+ declare function rowWindowFor(layout: RowLayout, scroll: number, viewport: number, buffer?: number): {
1515
+ start: number;
1516
+ end: number;
1517
+ };
1518
+
1519
+ /** A plotted value of a line / area sparkline. */
1520
+ interface SparklinePoint {
1521
+ readonly index: number;
1522
+ readonly value: number;
1523
+ readonly x: number;
1524
+ readonly y: number;
1525
+ }
1526
+ /** A bar of a column / bar sparkline (`x`, `y`, `w`, `h` in SVG units). */
1527
+ interface SparklineBar {
1528
+ readonly index: number;
1529
+ readonly value: number;
1530
+ readonly x: number;
1531
+ readonly y: number;
1532
+ readonly w: number;
1533
+ readonly h: number;
1534
+ }
1535
+ interface SparklineGeometry {
1536
+ readonly type: MtSparklineType;
1537
+ readonly points: readonly SparklinePoint[];
1538
+ /** The line through the points (`M … L …`), broken at non-finite values. */
1539
+ readonly path: string;
1540
+ /** The line closed down to the baseline (area sparklines). */
1541
+ readonly area: string;
1542
+ readonly bars: readonly SparklineBar[];
1543
+ /** The zero line (or the domain's edge when zero is outside it), in SVG units. */
1544
+ readonly baseline: number;
1545
+ readonly min: number;
1546
+ readonly max: number;
1547
+ }
1548
+ /**
1549
+ * Lays the values out in a `width` x `height` box: the finite values span the vertical
1550
+ * domain (`options.min` / `options.max` widen it; columns and bars always include zero),
1551
+ * equal x steps for a line / area, equal slots for columns (vertical) and bars (horizontal),
1552
+ * and a baseline at zero when zero is inside the domain, else at its nearer edge.
1553
+ */
1554
+ declare function sparklineGeometry(values: readonly number[], width: number, height: number, options?: MtSparklineOptions): SparklineGeometry;
1555
+ /** Turns a sparkline value into numbers: `number[]`, or `[x, y]` tuples (the y). */
1556
+ declare function sparklineValues(value: unknown): readonly number[];
1557
+ interface SparklineTooltipState {
1558
+ /** Offsets inside the grid host, at the highlighted point's top. */
1559
+ readonly left: number;
1560
+ readonly top: number;
1561
+ readonly text: string;
1562
+ }
1563
+ /**
1564
+ * The one tooltip the grid shows for its sparklines (a cell clips its own overflow, so the
1565
+ * tooltip lives at the grid root). Provided per grid.
1566
+ */
1567
+ declare class SparklineTooltip {
1568
+ private host;
1569
+ readonly state: _angular_core.WritableSignal<SparklineTooltipState | null>;
1570
+ attach(host: HTMLElement): this;
1571
+ show(anchor: DOMRect, x: number, y: number, text: string): void;
1572
+ hide(): void;
1573
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SparklineTooltip, never>;
1574
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<SparklineTooltip>;
1575
+ }
1576
+
1577
+ type HeaderCheckboxState = 'checked' | 'indeterminate' | 'unchecked';
1578
+
1579
+ /** A column group as the grid identifies it (groupId, or a generated pre-order number). */
1580
+ interface ColumnGroupInfo {
1581
+ readonly id: string;
1582
+ readonly label: string;
1583
+ }
1584
+ /** A group's direct children, for open/close (`columnGroupShow`). */
1585
+ interface ColumnGroupNode {
1586
+ readonly id: string;
1587
+ readonly openByDefault: boolean;
1588
+ /** Its columns stay together: moves that would split them are skipped or refused. */
1589
+ readonly marryChildren: boolean;
1590
+ /** Direct children in definition order: columns by column id, groups by group id. */
1591
+ readonly children: readonly {
1592
+ readonly kind: 'column' | 'group';
1593
+ readonly id: string;
1594
+ readonly show?: MtColumnGroupShow;
1595
+ }[];
1596
+ /** Every column under the group. */
1597
+ readonly leaves: readonly string[];
1598
+ }
1599
+ /** Leaf definitions in definition order with the groups above each leaf, outermost first. */
1600
+ interface ColumnGroupTree<T> {
1601
+ readonly leaves: readonly MtColumnDef<T>[];
1602
+ readonly paths: ReadonlyMap<string, readonly ColumnGroupInfo[]>;
1603
+ /** Number of group header rows (the deepest path). */
1604
+ readonly depth: number;
1605
+ readonly groups: ReadonlyMap<string, ColumnGroupNode>;
1606
+ /**
1607
+ * Group state order (group-open-close-2-observations.json state-order-*): definition
1608
+ * order with children before their group, including the generated padding groups that
1609
+ * bring every column to the tree depth. A group whose children are all columns gets one
1610
+ * padding chain shared by them; elsewhere (the root, a group that also holds groups)
1611
+ * each column gets its own (group-ids-observations.json pad-*, group-ids-2 shallow-*).
1612
+ * Padding groups are numbered after the unnamed real groups, in definition order, the
1613
+ * one nearest the columns first.
1614
+ */
1615
+ readonly stateOrder: readonly string[];
1616
+ /** Padding id of each column padded by a single generated group (kept across updates). */
1617
+ readonly padding: ReadonlyMap<string, string>;
1618
+ }
1619
+ /**
1620
+ * One rendered group header cell: a contiguous run of the group's non-hidden children in
1621
+ * one section, rendered when at least one of them is displayed (children closed away by
1622
+ * a group's open state count in the run but take no width).
1623
+ */
1624
+ interface GroupCell {
1625
+ /** `<groupId>_<instance>`, instances counted per group in section order (observed). */
1626
+ readonly key: string;
1627
+ readonly groupId: string;
1628
+ readonly label: string;
1629
+ /** Offset inside the section, same convention as ColumnGeometry.start. */
1630
+ readonly start: number;
1631
+ /** Sum of the displayed children's widths. */
1632
+ readonly width: number;
1633
+ /** Logical displayed index of the first displayed child. */
1634
+ readonly index: number;
1635
+ /** First child of the run, displayed or closed away (its aria-colindex is the cell's). */
1636
+ readonly firstId: string;
1637
+ /** Number of children in the run, closed-away ones included (aria-colspan). */
1638
+ readonly span: number;
1639
+ /** Displayed children, in order. */
1640
+ readonly shownIds: readonly string[];
1641
+ /** Every child in the run, displayed or closed away. */
1642
+ readonly runIds: readonly string[];
1643
+ }
1644
+
1645
+ /** Source messages are stable keys; interpolation parameters never contain markup. */
1646
+ type MtGridLocaleText = Readonly<Record<string, string>>;
1647
+ type MtGridLocaleParams = Readonly<Record<string, string | number>>;
1648
+ type MtGridLocaleTextResolver = (key: string, defaultValue: string, params: MtGridLocaleParams) => string | undefined;
1649
+ /** Each grid owns a locale scope, inherited by its panels and external chart dock. */
1650
+ declare class MtGridLocalizer {
1651
+ readonly dictionary: _angular_core.WritableSignal<Readonly<Record<string, string>>>;
1652
+ readonly resolver: _angular_core.WritableSignal<MtGridLocaleTextResolver | undefined>;
1653
+ text(message: string, params?: MtGridLocaleParams): string;
1654
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<MtGridLocalizer, never>;
1655
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<MtGridLocalizer>;
1656
+ }
1657
+
1658
+ interface MenuItem {
1659
+ readonly id: string;
1660
+ readonly label: string;
1661
+ readonly icon?: GridIconName | string | HTMLElement;
1662
+ readonly shortcut?: string;
1663
+ readonly disabled?: boolean;
1664
+ readonly role?: 'menuitem' | 'menuitemcheckbox';
1665
+ readonly checked?: boolean;
1666
+ readonly separatorBefore?: boolean;
1667
+ readonly children?: readonly MenuItem[];
1668
+ readonly tooltip?: string;
1669
+ readonly cssClasses?: readonly string[];
1670
+ }
1671
+ /** Viewport (position: fixed) coordinates; exactly one of left/right is set. */
1672
+ interface MenuPosition {
1673
+ readonly top: number;
1674
+ readonly left?: number;
1675
+ readonly right?: number;
1676
+ }
1677
+ /** The box a menu stays inside (the grid's root, observed: the popup parent). */
1678
+ interface MenuBounds {
1679
+ readonly top: number;
1680
+ readonly left: number;
1681
+ readonly right: number;
1682
+ readonly bottom: number;
1683
+ }
1684
+
1685
+ interface ChooserColumn {
1686
+ readonly id: string;
1687
+ readonly label: string;
1688
+ readonly visible: boolean;
1689
+ /** lockVisible: shown with a disabled checkbox and never toggled from the dialog. */
1690
+ readonly locked: boolean;
1691
+ }
1692
+
1693
+ type FilterKind = 'text' | 'number' | 'date' | 'set' | 'multi';
1694
+
1695
+ /** One row of the set filter list. */
1696
+ interface SetFilterValue {
1697
+ readonly key: string | null;
1698
+ readonly text: string;
1699
+ readonly raw?: unknown;
1700
+ readonly path?: readonly string[];
1701
+ }
1702
+
1703
+ type Side = 'left' | 'center' | 'right';
1704
+ interface Section<T> {
1705
+ readonly kind: Side;
1706
+ readonly columns: readonly ColumnGeometry<T>[];
1707
+ readonly width: number;
1708
+ }
1709
+ /**
1710
+ * Observed ghost icons: pin over a pin target, a physical arrow while auto-scrolling,
1711
+ * hide outside the grid, blocked when lockPinned refuses a pin target.
1712
+ */
1713
+ type DragIcon = 'pin' | 'move' | 'left' | 'right' | 'hide' | 'blocked' | 'arrows' | 'group' | 'aggregation' | 'pivot';
1714
+ /** The header-drag ghost that follows the pointer. */
1715
+ interface DragGhost {
1716
+ readonly ids: readonly string[];
1717
+ readonly label: string;
1718
+ readonly x: number;
1719
+ readonly y: number;
1720
+ readonly icon: DragIcon;
1721
+ /** A row drag: the ghost spaces its icon and label like the reference's row ghost. */
1722
+ readonly row?: boolean;
1723
+ }
1724
+
1725
+ /** One row of the column list: a column or a column group, in grid order. */
1726
+ interface ColumnPanelItem {
1727
+ readonly id: string;
1728
+ readonly label: string;
1729
+ readonly level: number;
1730
+ readonly kind: 'column' | 'group';
1731
+ /** A group reads `'some'` while only part of its columns show. */
1732
+ readonly visible: boolean | 'some';
1733
+ /** No toggleable column (lockVisible): the checkbox is disabled. */
1734
+ readonly locked: boolean;
1735
+ readonly groupable: boolean;
1736
+ readonly aggregatable: boolean;
1737
+ readonly pivotable: boolean;
1738
+ /** The toggleable column ids under the row (the column itself unless locked). */
1739
+ readonly leaves: readonly string[];
1740
+ }
1741
+ /** A chip in a drop zone. */
1742
+ interface ColumnPanelChip {
1743
+ readonly preview?: boolean;
1744
+ readonly id: string;
1745
+ readonly label: string;
1746
+ /** Values zone: the aggregation shown as `func(label)`. */
1747
+ readonly func?: string;
1748
+ readonly allowedAggFuncs?: readonly string[];
1749
+ }
1750
+ type ColumnPanelZone = 'rowGroups' | 'values' | 'pivots';
1751
+ /** A list-item drag in flight, rendered by the grid's ghost. */
1752
+ interface ColumnPanelGhost {
1753
+ readonly id: string;
1754
+ readonly label: string;
1755
+ readonly x: number;
1756
+ readonly y: number;
1757
+ readonly icon: DragIcon;
1758
+ }
1759
+
1760
+ /** A filterable column offered by the Filters tool panel. */
1761
+ interface FilterPanelColumn {
1762
+ readonly id: string;
1763
+ readonly label: string;
1764
+ readonly kind: FilterKind;
1765
+ readonly params: MtFilterParams;
1766
+ /** Set filter values. */
1767
+ readonly values?: readonly SetFilterValue[];
1768
+ readonly formatValue?: (value: unknown) => string;
1769
+ }
1770
+
1771
+ interface ChartCategoryPosition {
1772
+ readonly signature: string;
1773
+ readonly start: number;
1774
+ }
1775
+ interface ChartCategoryViewport extends ChartCategoryPosition {
1776
+ readonly key: string;
1777
+ readonly axis: 'x' | 'y';
1778
+ readonly index: number;
1779
+ readonly total: number;
1780
+ readonly visible: number;
1781
+ readonly zoomIndex: number;
1782
+ readonly rect: ChartRect;
1783
+ readonly unit: number;
1784
+ }
1785
+
1786
+ /** Pixel layout shared by every renderer. All coordinates are inside the chart canvas. */
1787
+ type Option = Record<string, any>;
1788
+ interface ChartRect {
1789
+ x: number;
1790
+ y: number;
1791
+ width: number;
1792
+ height: number;
1793
+ }
1794
+ interface LegendItem {
1795
+ name: string;
1796
+ label: string;
1797
+ width: number;
1798
+ color: string;
1799
+ }
1800
+ interface ChartLayout {
1801
+ plot: ChartRect;
1802
+ legend: ChartRect;
1803
+ pages: readonly (readonly (readonly LegendItem[])[])[];
1804
+ titleHeight: number;
1805
+ categoryViewports: readonly ChartCategoryViewport[];
1806
+ option: Option;
1807
+ }
1808
+
1809
+ /** The record-count measure: distinct records per category. */
1810
+ declare const CHART_RECORD_COUNT_ID = "__count__";
1811
+ /** Group of records whose category value is missing. */
1812
+ declare const CHART_MISSING_CATEGORY_ID = "__missing__";
1813
+ declare function chartNonEmptyMeasureId(columnId: string): string;
1814
+ declare function chartDistinctMeasureId(columnId: string): string;
1815
+ /** Decode a measure id; null for numeric columns. */
1816
+ declare function chartMeasure(id: string): {
1817
+ readonly kind: MtChartMeasureKind;
1818
+ readonly columnId?: string;
1819
+ } | null;
1820
+ interface ChartPoint {
1821
+ readonly rowIndex: number;
1822
+ readonly rowId: string;
1823
+ readonly category: string;
1824
+ readonly categories: readonly string[];
1825
+ readonly values: Readonly<Record<string, number | null>>;
1826
+ /** Category identities per category column id (empty when the value is missing). */
1827
+ readonly identities: Readonly<Record<string, readonly MtChartCategoryValue[]>>;
1828
+ /** After identity grouping: the group's identity, resolved colour and distinct records. */
1829
+ readonly categoryId?: string;
1830
+ readonly color?: string | null;
1831
+ readonly recordCount?: number;
1832
+ }
1833
+ interface ChartCategoryChoice {
1834
+ readonly id: string;
1835
+ readonly name: string;
1836
+ readonly labels: readonly string[];
1837
+ readonly numeric?: boolean;
1838
+ readonly time?: boolean;
1839
+ /** The column supplies identity/label/colour semantics (`chartCategory`). */
1840
+ readonly semantic?: boolean;
1841
+ readonly multiValue?: boolean;
1842
+ /** Distinct identities and records without a value among the charted rows. */
1843
+ readonly cardinality?: number;
1844
+ readonly missing?: number;
1845
+ }
1846
+ interface ChartSeriesEntry {
1847
+ readonly id: string;
1848
+ readonly name: string;
1849
+ readonly values: readonly (number | null)[];
1850
+ readonly formatValue?: (value: number) => string;
1851
+ /** A count measure; absent for numeric columns. */
1852
+ readonly measure?: MtChartMeasureKind;
1853
+ /** The column a non-empty/distinct measure counts. */
1854
+ readonly columnId?: string;
1855
+ readonly integer?: boolean;
1856
+ /** The one unit every charted record shares (`chartUnit`), already part of `name`. */
1857
+ readonly unit?: string;
1858
+ /** Records disagree on the unit: values still aggregate, the name stays bare. */
1859
+ readonly mixedUnits?: boolean;
1860
+ }
1861
+ interface DerivedChartData {
1862
+ readonly categories?: readonly ChartCategoryChoice[];
1863
+ readonly availableSeries?: readonly ChartSeriesEntry[];
1864
+ readonly category: {
1865
+ readonly id: string;
1866
+ readonly name: string;
1867
+ readonly labels: readonly string[];
1868
+ readonly ids?: readonly string[];
1869
+ readonly colors?: readonly (string | null)[];
1870
+ readonly semantic?: boolean;
1871
+ readonly multiValue?: boolean;
1872
+ };
1873
+ readonly categoryColumns: readonly {
1874
+ id: string;
1875
+ name: string;
1876
+ }[];
1877
+ readonly series: readonly ChartSeriesEntry[];
1878
+ readonly points: readonly ChartPoint[];
1879
+ /** Distinct records behind the points, before any grouping. */
1880
+ readonly recordCount?: number;
1881
+ /** Points were merged per category identity (count measures or an aggregation). */
1882
+ readonly grouped?: boolean;
1883
+ }
1884
+
1885
+ interface ChartPanelSeries {
1886
+ readonly id: string;
1887
+ readonly name: string;
1888
+ /** A count measure (records, non-empty values or distinct values of a column). */
1889
+ readonly measure?: MtChartMeasureKind;
1890
+ readonly columnId?: string;
1891
+ }
1892
+ interface ChartPanelState {
1893
+ readonly type: MtChartType;
1894
+ readonly theme: string;
1895
+ readonly title: string;
1896
+ readonly themes: Readonly<Record<string, MtChartTheme>>;
1897
+ readonly categories: readonly ChartCategoryChoice[];
1898
+ readonly categoryId: string;
1899
+ readonly series: readonly ChartPanelSeries[];
1900
+ readonly seriesIds: readonly string[];
1901
+ readonly seriesChartTypes: readonly MtSeriesChartType[];
1902
+ readonly switchCategorySeries: boolean;
1903
+ readonly aggFunc?: MtAggFuncName;
1904
+ readonly ranges: readonly MtChartCellRange[];
1905
+ readonly overrides: MtChartThemeOverrides;
1906
+ readonly definition?: MtChartToolPanelsDef;
1907
+ readonly navigator: boolean;
1908
+ /** Chart types suited to the current category/measure, and unsuitable ones with a reason key. */
1909
+ readonly recommended?: readonly MtChartType[];
1910
+ readonly unavailable?: Readonly<Partial<Record<MtChartType, string>>>;
1911
+ /** The chosen category can hold several values per record. */
1912
+ readonly multiValue?: boolean;
1913
+ /** Distinct records behind the chart's source rows. */
1914
+ readonly recordCount?: number;
1915
+ /** Points are merged per category identity. */
1916
+ readonly grouped?: boolean;
1917
+ }
1918
+ type ChartPanelChange = Omit<MtRangeChartUpdateParams, 'type' | 'chartId'>;
1919
+
1920
+ /** Dialog geometry in its current coordinate space (grid or page viewport), in px. */
1921
+ interface ChartBox {
1922
+ readonly left: number;
1923
+ readonly top: number;
1924
+ readonly width: number;
1925
+ readonly height: number;
1926
+ }
1927
+ interface ChartBounds {
1928
+ readonly width: number;
1929
+ readonly height: number;
1930
+ }
1931
+ type Edge = 'n' | 's' | 'e' | 'w' | 'ne' | 'nw' | 'se' | 'sw';
1932
+ /**
1933
+ * Lazy-rendered chart with measured plot reservations, an accessible legend and a
1934
+ * docked editor. Unlinked dialogs float in the page viewport; embedded charts
1935
+ * share the renderer and menu without the movable dialog chrome.
1936
+ */
1937
+ declare class ChartDialog {
1938
+ protected readonly locale: MtGridLocalizer;
1939
+ readonly chartId: _angular_core.InputSignal<string>;
1940
+ /** External containers need the grid's tokens even though they are outside its DOM tree. */
1941
+ readonly themeSource: _angular_core.InputSignal<HTMLElement | undefined>;
1942
+ readonly embedded: _angular_core.InputSignal<boolean>;
1943
+ readonly unlinked: _angular_core.InputSignal<boolean>;
1944
+ readonly closeOnEscape: _angular_core.InputSignal<boolean>;
1945
+ readonly sourceAvailable: _angular_core.InputSignal<boolean>;
1946
+ readonly toolbarItems: _angular_core.InputSignal<readonly MtChartToolbarItem[]>;
1947
+ readonly linkChange: _angular_core.OutputEmitterRef<void>;
1948
+ readonly panelState: _angular_core.InputSignal<ChartPanelState | undefined>;
1949
+ readonly panelChange: _angular_core.OutputEmitterRef<ChartPanelChange>;
1950
+ readonly selectRange: _angular_core.OutputEmitterRef<void>;
1951
+ protected readonly panel: _angular_core.WritableSignal<"Chart" | "Data" | "Format" | null>;
1952
+ protected readonly panelWidth: _angular_core.WritableSignal<number>;
1953
+ private readonly lastTab;
1954
+ protected readonly activeTab: _angular_core.Signal<MtChartToolPanel>;
1955
+ protected readonly showLink: _angular_core.Signal<boolean>;
1956
+ readonly title: _angular_core.InputSignal<string>;
1957
+ readonly context: _angular_core.InputSignal<string>;
1958
+ protected readonly dialogTitle: _angular_core.Signal<string>;
1959
+ readonly box: _angular_core.InputSignal<ChartBox>;
1960
+ readonly bounds: _angular_core.InputSignal<ChartBounds>;
1961
+ readonly chartType: _angular_core.InputSignal<MtChartType>;
1962
+ /** The echarts option to draw (plain data; the component loads echarts on first use). */
1963
+ readonly option: _angular_core.InputSignal<Record<string, unknown>>;
1964
+ readonly boxChange: _angular_core.OutputEmitterRef<ChartBox>;
1965
+ readonly typeChange: _angular_core.OutputEmitterRef<MtChartType>;
1966
+ readonly closed: _angular_core.OutputEmitterRef<void>;
1967
+ private readonly host;
1968
+ private readonly destroyRef;
1969
+ private readonly injector;
1970
+ private readonly canvas;
1971
+ protected readonly maximized: _angular_core.WritableSignal<boolean>;
1972
+ protected readonly menu: _angular_core.WritableSignal<{
1973
+ position: MenuPosition;
1974
+ key: number;
1975
+ } | null>;
1976
+ private menuKey;
1977
+ protected readonly floatingBox: _angular_core.WritableSignal<ChartBox | null>;
1978
+ private readonly viewportBounds;
1979
+ private readonly dialogBox;
1980
+ private readonly dialogBounds;
1981
+ private popupParent;
1982
+ protected readonly shownBox: _angular_core.Signal<ChartBox>;
1983
+ protected readonly menuItems: _angular_core.Signal<readonly MenuItem[]>;
1984
+ protected readonly layout: _angular_core.WritableSignal<ChartLayout | null>;
1985
+ protected readonly legendPage: _angular_core.WritableSignal<number>;
1986
+ protected readonly legendRows: _angular_core.Signal<readonly (readonly LegendItem[])[]>;
1987
+ protected readonly selectedLegend: _angular_core.WritableSignal<ReadonlySet<string>>;
1988
+ protected readonly empty: _angular_core.Signal<boolean>;
1989
+ protected changeLegendPage(delta: number): void;
1990
+ protected toggleLegend(name: string): void;
1991
+ protected hoverLegend(name: string, on: boolean): void;
1992
+ private chart;
1993
+ private optionRevision;
1994
+ private renderedSize;
1995
+ private readonly categoryPositions;
1996
+ private disposed;
1997
+ private observer?;
1998
+ private themeObserver?;
1999
+ constructor();
2000
+ /** Release the source grid's DOM; a scoped popup remains a native chart. */
2001
+ detachSource(): void;
2002
+ private observeTheme;
2003
+ /** Move the existing view, preserving its chart, editor and focused control. */
2004
+ private placeDialog;
2005
+ private changeBox;
2006
+ protected toggleMaximize(): void;
2007
+ protected close(): void;
2008
+ protected onKey(event: KeyboardEvent): void;
2009
+ /** Linked dialogs stay inside the grid; unlinked dialogs move across the viewport. */
2010
+ protected onTitlePointerDown(event: PointerEvent): void;
2011
+ protected onResizePointerDown(event: PointerEvent, edge: Edge): void;
2012
+ private track;
2013
+ protected toggleMenu(event: MouseEvent): void;
2014
+ private removeOutside?;
2015
+ protected closeMenu(): void;
2016
+ protected onMenuItem(id: string): void;
2017
+ protected togglePanel(): void;
2018
+ setChartPanel(options: {
2019
+ open?: boolean;
2020
+ tab?: MtChartToolPanel;
2021
+ }): void;
2022
+ protected panelResize(event: PointerEvent): void;
2023
+ protected panelResizeKey(event: KeyboardEvent): void;
2024
+ protected scrollCategory(event: Event, viewport: ChartCategoryViewport): void;
2025
+ protected categoryKey(event: KeyboardEvent, viewport: ChartCategoryViewport): void;
2026
+ protected categoryWheel(event: WheelEvent): void;
2027
+ private draw;
2028
+ private withHostFont;
2029
+ focusChart(): void;
2030
+ getChartImageDataURL(params?: MtChartImageParams): string | undefined;
2031
+ downloadChart(params?: MtChartImageParams): void;
2032
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChartDialog, never>;
2033
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChartDialog, "mt-data-grid-chart-dialog", never, { "chartId": { "alias": "chartId"; "required": true; "isSignal": true; }; "themeSource": { "alias": "themeSource"; "required": false; "isSignal": true; }; "embedded": { "alias": "embedded"; "required": false; "isSignal": true; }; "unlinked": { "alias": "unlinked"; "required": false; "isSignal": true; }; "closeOnEscape": { "alias": "closeOnEscape"; "required": false; "isSignal": true; }; "sourceAvailable": { "alias": "sourceAvailable"; "required": false; "isSignal": true; }; "toolbarItems": { "alias": "toolbarItems"; "required": false; "isSignal": true; }; "panelState": { "alias": "panelState"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "context": { "alias": "context"; "required": false; "isSignal": true; }; "box": { "alias": "box"; "required": true; "isSignal": true; }; "bounds": { "alias": "bounds"; "required": true; "isSignal": true; }; "chartType": { "alias": "chartType"; "required": true; "isSignal": true; }; "option": { "alias": "option"; "required": true; "isSignal": true; }; }, { "linkChange": "linkChange"; "panelChange": "panelChange"; "selectRange": "selectRange"; "boxChange": "boxChange"; "typeChange": "typeChange"; "closed": "closed"; }, never, never, true, never>;
2034
+ }
2035
+
2036
+ /** The open inline editor. */
2037
+ interface EditingState {
2038
+ readonly rowId: string;
2039
+ readonly colId: string;
2040
+ readonly rowIndex: number;
2041
+ readonly kind: MtCellEditorKind;
2042
+ readonly initial: unknown;
2043
+ readonly key: string | null;
2044
+ readonly keepValue: boolean;
2045
+ }
2046
+ declare class MtDataGridComponent<T extends object> {
2047
+ readonly rowData: _angular_core.InputSignal<readonly T[]>;
2048
+ /** The host owns the complete query. Sort/filter controls emit state without processing this page. */
2049
+ readonly dataProcessing: _angular_core.InputSignal<"external" | "client">;
2050
+ /** Columns and column groups (MtColumnGroupDef with children, nestable). */
2051
+ readonly columnDefs: _angular_core.InputSignal<readonly MtColDef<T>[]>;
2052
+ readonly getRowId: _angular_core.InputSignal<((data: T) => string) | undefined>;
2053
+ readonly height: _angular_core.InputSignal<number>;
2054
+ /**
2055
+ * Size the grid by its content instead of `height`: the header band, the chrome
2056
+ * and every row. Open detail rows always count in full; `autoHeightMaxRows`
2057
+ * caps the plain rows (the viewport then scrolls them), `autoHeightMinRows`
2058
+ * keeps room for the loading and no-rows states.
2059
+ */
2060
+ readonly autoHeight: _angular_core.InputSignal<boolean>;
2061
+ readonly autoHeightMaxRows: _angular_core.InputSignal<number | undefined>;
2062
+ readonly autoHeightMinRows: _angular_core.InputSignal<number>;
2063
+ readonly rowHeight: _angular_core.InputSignal<number | undefined>;
2064
+ /** Fade newly rendered rows; reduced-motion hosts suppress it. */
2065
+ readonly animateRows: _angular_core.InputSignal<boolean>;
2066
+ readonly headerHeight: _angular_core.InputSignal<number | undefined>;
2067
+ /** Height of each column-group header row; the reference defaults it to headerHeight. */
2068
+ readonly groupHeaderHeight: _angular_core.InputSignal<number | undefined>;
2069
+ readonly direction: _angular_core.InputSignal<"ltr" | "rtl">;
2070
+ readonly localeText: _angular_core.InputSignal<Readonly<Record<string, string>>>;
2071
+ readonly localeTextResolver: _angular_core.InputSignal<MtGridLocaleTextResolver | undefined>;
2072
+ protected readonly locale: MtGridLocalizer;
2073
+ private readonly columnsToolPanelDefaults;
2074
+ readonly ariaLabel: _angular_core.InputSignal<string>;
2075
+ readonly loading: _angular_core.InputSignal<boolean>;
2076
+ readonly noRowsText: _angular_core.InputSignal<string>;
2077
+ readonly loadingText: _angular_core.InputSignal<string>;
2078
+ readonly noRowsTemplate: _angular_core.InputSignal<TemplateRef<unknown> | undefined>;
2079
+ protected readonly emptyOverlay: _angular_core.Type<{
2080
+ readonly params: unknown;
2081
+ }> | null;
2082
+ protected readonly emptyOverlayInputs: Signal<{
2083
+ params: {
2084
+ message: string;
2085
+ filtered: boolean;
2086
+ clearFilters: () => void;
2087
+ };
2088
+ }>;
2089
+ /** Opt in to fitting on mount, viewport resize and visible-column changes; manual sizing survives other actions. */
2090
+ readonly autoSizeStrategy: _angular_core.InputSignal<{
2091
+ readonly type: "fitGridWidth";
2092
+ } | undefined>;
2093
+ /** Header column menu (the reference's Enterprise column menu). False matches a Community grid. */
2094
+ readonly columnMenu: _angular_core.InputSignal<boolean>;
2095
+ readonly mainMenuItems: _angular_core.InputSignal<readonly MtMainMenuItem<T>[] | ((params: MtGetMainMenuItemsParams<T>) => readonly MtMainMenuItem<T>[]) | undefined>;
2096
+ /** Pixels added after autosize measurement (reference default 20; negative values apply as given). */
2097
+ readonly autoSizePadding: _angular_core.InputSignal<number>;
2098
+ /** Quick filter text: every word must appear in a displayed column's value (case-insensitive). */
2099
+ readonly quickFilterText: _angular_core.InputSignal<string>;
2100
+ /** Render the owned quick-filter box in the panel row. */
2101
+ readonly showQuickFilter: _angular_core.InputSignal<boolean>;
2102
+ readonly includeHiddenColumnsInQuickFilter: _angular_core.InputSignal<boolean>;
2103
+ readonly quickFilterParser: _angular_core.InputSignal<((text: string) => readonly string[]) | undefined>;
2104
+ readonly quickFilterMatcher: _angular_core.InputSignal<((parts: readonly string[], text: string) => boolean) | undefined>;
2105
+ readonly cacheQuickFilter: _angular_core.InputSignal<boolean>;
2106
+ readonly applyQuickFilterBeforePivotOrAgg: _angular_core.InputSignal<boolean>;
2107
+ readonly filtersToolPanelDef: _angular_core.InputSignal<MtFiltersToolPanelDef>;
2108
+ private readonly quickColumns;
2109
+ private readonly quickCache;
2110
+ private quickParts;
2111
+ /** External filter: while it reports present, rows must pass `doesExternalFilterPass`. */
2112
+ readonly isExternalFilterPresent: _angular_core.InputSignal<(() => boolean) | undefined>;
2113
+ readonly doesExternalFilterPass: _angular_core.InputSignal<((node: MtRowNode<T>) => boolean) | undefined>;
2114
+ /** Floating-filter height; defaults to the Classic 40px token (fixture reference: 48px). */
2115
+ readonly floatingFiltersHeight: _angular_core.InputSignal<number | undefined>;
2116
+ /**
2117
+ * Row selection. `{ mode: 'multiRow' }` alone adds the selection column (checkbox
2118
+ * cells and a header select-all) as the first column; clicks on other cells select only
2119
+ * with `enableClickSelection` (selection-observations.json).
2120
+ */
2121
+ readonly rowSelection: _angular_core.InputSignal<MtRowSelectionOptions<T> | undefined>;
2122
+ /** Overrides for the selection column (width, pinned side, header text). */
2123
+ readonly selectionColumnDef: _angular_core.InputSignal<Partial<Pick<MtColumnDef<T>, "width" | "pinned" | "headerName" | "minWidth" | "maxWidth" | "resizable" | "lockPinned">> | undefined>;
2124
+ /** A pinned row-numbers column before every other column (live-selection observations). */
2125
+ readonly rowNumbers: _angular_core.InputSignal<boolean | MtRowNumbersOptions>;
2126
+ /** The grid reorders its rows while a row is dragged (inert while sorted or filtered). */
2127
+ readonly rowDragManaged: _angular_core.InputSignal<boolean>;
2128
+ /** Any cell of a row starts the drag, not only the handle. */
2129
+ readonly rowDragEntireRow: _angular_core.InputSignal<boolean>;
2130
+ /** Dragging a selected row drags every selected row (`multiRow` selection). */
2131
+ readonly rowDragMultiRow: _angular_core.InputSignal<boolean>;
2132
+ /** Managed reorder happens on release instead of while dragging. */
2133
+ readonly suppressMoveWhenRowDragging: _angular_core.InputSignal<boolean>;
2134
+ /**
2135
+ * Cell range selection (live-range observations): a click makes a single-cell range on
2136
+ * the focused cell, a drag, Shift+click or Shift+arrows a rectangle, Ctrl adds ranges,
2137
+ * Ctrl+A covers every cell; Ctrl+C copies the ranges as tab-separated text.
2138
+ */
2139
+ readonly cellSelection: _angular_core.InputSignal<boolean | MtCellSelectionOptions>;
2140
+ /** The status bar under the rows: row counts, the selected count, range aggregates. */
2141
+ readonly statusBar: _angular_core.InputSignal<MtStatusBarOptions | undefined>;
2142
+ /** No cell context menu (the browser's own shows). */
2143
+ readonly suppressContextMenu: _angular_core.InputSignal<boolean>;
2144
+ /** Keeps the grid's menu while Ctrl is held (default: Ctrl+right-click leaves the browser's menu, observed). */
2145
+ readonly allowContextMenuWithControlKey: _angular_core.InputSignal<boolean>;
2146
+ /** Suppresses the browser's menu even where the grid shows none. */
2147
+ readonly preventDefaultOnContextMenu: _angular_core.InputSignal<boolean>;
2148
+ /** The items for a cell's context menu; receives the default item names. */
2149
+ readonly getContextMenuItems: _angular_core.InputSignal<((params: MtGetContextMenuItemsParams<T>) => readonly MtContextMenuItem<T>[]) | undefined>;
2150
+ readonly suppressCsvExport: _angular_core.InputSignal<boolean>;
2151
+ readonly suppressExcelExport: _angular_core.InputSignal<boolean>;
2152
+ readonly suppressPdfExport: _angular_core.InputSignal<boolean>;
2153
+ readonly defaultPdfExportParams: _angular_core.InputSignal<MtPdfExportParams<T> | undefined>;
2154
+ readonly excelStyles: _angular_core.InputSignal<readonly MtExcelStyle[]>;
2155
+ readonly processCellForClipboard: _angular_core.InputSignal<((params: MtClipboardCellParams<T>) => unknown) | undefined>;
2156
+ readonly processHeaderForClipboard: _angular_core.InputSignal<((params: MtClipboardHeaderParams<T>) => string) | undefined>;
2157
+ readonly processGroupHeaderForClipboard: _angular_core.InputSignal<((params: MtClipboardGroupHeaderParams) => string) | undefined>;
2158
+ readonly copySelectedRows: _angular_core.InputSignal<boolean>;
2159
+ readonly copyHeadersToClipboard: _angular_core.InputSignal<boolean>;
2160
+ readonly copyGroupHeadersToClipboard: _angular_core.InputSignal<boolean>;
2161
+ readonly clipboardDelimiter: _angular_core.InputSignal<string>;
2162
+ readonly suppressCopyRowsToClipboard: _angular_core.InputSignal<boolean>;
2163
+ readonly suppressCopySingleCellRanges: _angular_core.InputSignal<boolean>;
2164
+ readonly suppressCutToClipboard: _angular_core.InputSignal<boolean>;
2165
+ protected readonly copiedCells: _angular_core.WritableSignal<ReadonlySet<string>>;
2166
+ private copyFlashTimer?;
2167
+ readonly defaultCsvExportParams: _angular_core.InputSignal<MtCsvExportParams<T> | undefined>;
2168
+ readonly defaultExcelExportParams: _angular_core.InputSignal<MtExcelExportParams<T> | undefined>;
2169
+ /** The row group panel above the header: never (default), always, onlyWhenGrouping. */
2170
+ readonly groupDisplayType: _angular_core.InputSignal<MtGroupDisplayType>;
2171
+ readonly groupRowRenderer: _angular_core.InputSignal<MtCellRenderer<T> | undefined>;
2172
+ readonly groupRowRendererParams: _angular_core.InputSignal<Readonly<Record<string, unknown>>>;
2173
+ readonly suppressGroupRowsSticky: _angular_core.InputSignal<boolean>;
2174
+ readonly groupHideOpenParents: _angular_core.InputSignal<boolean>;
2175
+ readonly groupHideParentOfSingleChild: _angular_core.InputSignal<boolean>;
2176
+ readonly groupRemoveSingleChildren: _angular_core.InputSignal<boolean>;
2177
+ readonly groupRemoveLowestSingleChildren: _angular_core.InputSignal<boolean>;
2178
+ readonly showOpenedGroup: _angular_core.InputSignal<boolean>;
2179
+ readonly groupAggFiltering: _angular_core.InputSignal<boolean>;
2180
+ readonly suppressAggFilteredOnly: _angular_core.InputSignal<boolean>;
2181
+ readonly aggregateOnlyChangedColumns: _angular_core.InputSignal<boolean>;
2182
+ readonly suppressColumnMoveAnimation: _angular_core.InputSignal<boolean>;
2183
+ readonly pivotRowTotals: _angular_core.InputSignal<"before" | "after" | undefined>;
2184
+ readonly pivotColumnGroupTotals: _angular_core.InputSignal<"before" | "after" | undefined>;
2185
+ readonly pivotMaxGeneratedColumns: _angular_core.InputSignal<number | undefined>;
2186
+ readonly pivotDefaultExpanded: _angular_core.InputSignal<number>;
2187
+ readonly pivotSuppressAutoColumn: _angular_core.InputSignal<boolean>;
2188
+ readonly suppressExpandablePivotGroups: _angular_core.InputSignal<boolean>;
2189
+ readonly processPivotResultColDef: _angular_core.InputSignal<((def: { -readonly [K in keyof MtColumnDef<T>]: MtColumnDef<T>[K]; }) => void) | undefined>;
2190
+ readonly processPivotResultColGroupDef: _angular_core.InputSignal<((def: { -readonly [K in keyof MtColumnGroupDef<T>]: MtColumnGroupDef<T>[K]; }) => void) | undefined>;
2191
+ readonly processUnpinnedColumns: _angular_core.InputSignal<((params: {
2192
+ columns: readonly string[];
2193
+ viewportWidth: number;
2194
+ }) => readonly string[]) | undefined>;
2195
+ readonly displayedColumnsChanged: _angular_core.OutputEmitterRef<MtDisplayedColumnsChangedEvent>;
2196
+ readonly columnEverythingChanged: _angular_core.OutputEmitterRef<MtDisplayedColumnsChangedEvent>;
2197
+ readonly pivotMaxColumnsExceeded: _angular_core.OutputEmitterRef<MtPivotMaxColumnsExceededEvent>;
2198
+ readonly rowGroupPanelShow: _angular_core.InputSignal<MtRowGroupPanelShow>;
2199
+ /** Column Labels zone, independent of the Row Groups zone. */
2200
+ readonly pivotPanelShow: _angular_core.InputSignal<"never" | "always" | "onlyWhenPivoting">;
2201
+ readonly pivotPanelHint: _angular_core.InputSignal<string>;
2202
+ /** -1 opens every group, n the groups above level n, 0 (default) none. */
2203
+ readonly groupDefaultExpanded: _angular_core.InputSignal<number>;
2204
+ readonly autoGroupColumnDef: _angular_core.InputSignal<MtAutoGroupColumnDef<T> | undefined>;
2205
+ readonly groupTotalRow: _angular_core.InputSignal<"bottom" | "top" | undefined>;
2206
+ readonly grandTotalRow: _angular_core.InputSignal<"bottom" | "top" | undefined>;
2207
+ /** Custom aggregation functions by name, for `aggFunc`. */
2208
+ readonly aggFuncs: _angular_core.InputSignal<Readonly<Record<string, MtAggFunc<T>>> | undefined>;
2209
+ /** Grouping from the UI hides the grouped column unless suppressed (observed). */
2210
+ readonly suppressRowGroupHidesColumns: _angular_core.InputSignal<boolean>;
2211
+ readonly suppressMakeColumnVisibleAfterUnGroup: _angular_core.InputSignal<boolean>;
2212
+ /**
2213
+ * The side bar (live-sidebar observations): `true` for the Columns and Filters tool
2214
+ * panels, one kind, a list of kinds, or a definition with `defaultToolPanel`,
2215
+ * `hiddenByDefault` and `position`. Without `defaultToolPanel` the bar opens closed.
2216
+ */
2217
+ readonly sideBar: _angular_core.InputSignal<MtSideBar>;
2218
+ /** Pivot mode (the Columns tool panel's switch); pivoting itself arrives with the pivot batch. */
2219
+ readonly pivotMode: _angular_core.InputSignal<boolean>;
2220
+ /** Headers of aggregated columns read `func(Name)` while grouped unless suppressed (observed). */
2221
+ readonly suppressAggFuncInHeader: _angular_core.InputSignal<boolean>;
2222
+ /** Range charts: the context menu's "Chart Range" and `createRangeChart` (live-charts observations). */
2223
+ readonly enableCharts: _angular_core.InputSignal<boolean>;
2224
+ readonly chartThemes: _angular_core.InputSignal<readonly string[] | undefined>;
2225
+ readonly customChartThemes: _angular_core.InputSignal<Readonly<Record<string, MtChartTheme>> | undefined>;
2226
+ readonly chartToolPanelsDef: _angular_core.InputSignal<MtChartToolPanelsDef | undefined>;
2227
+ readonly chartThemeOverrides: _angular_core.InputSignal<Readonly<Record<string, unknown>> | undefined>;
2228
+ /** Optional source path displayed with native chart titles and retained by detached charts. */
2229
+ readonly chartContext: _angular_core.InputSignal<string>;
2230
+ /** Name of the records this grid shows ("Tasks"): the record-count measure and its titles. */
2231
+ readonly chartRecordsLabel: _angular_core.InputSignal<string | undefined>;
2232
+ readonly getChartToolbarItems: _angular_core.InputSignal<(() => readonly MtChartToolbarItem[]) | undefined>;
2233
+ /** Keeps groups in order of first appearance instead of sorting them by key. */
2234
+ readonly groupMaintainOrder: _angular_core.InputSignal<boolean>;
2235
+ /**
2236
+ * Tree data: `getDataPath` places every row in a hierarchy (HR demo observations). A row
2237
+ * with children is a group row at its own level, a row without is a plain row, a missing
2238
+ * ancestor is a filler group; the auto group column shows the keys.
2239
+ */
2240
+ readonly treeData: _angular_core.InputSignal<boolean>;
2241
+ readonly getDataPath: _angular_core.InputSignal<((data: T) => readonly string[]) | undefined>;
2242
+ /**
2243
+ * Master / detail: every data row (or those `isRowMaster` accepts) opens a detail row
2244
+ * below it — the nested grid of `detailCellRendererParams.detailGridOptions` fed by
2245
+ * `getDetailRowData`, or `detailCellRenderer`. A column with `cellRenderer: 'group'`
2246
+ * shows the toggle (Inventory demo observations).
2247
+ */
2248
+ readonly masterDetail: _angular_core.InputSignal<boolean>;
2249
+ readonly isRowMaster: _angular_core.InputSignal<((data: T) => boolean) | undefined>;
2250
+ readonly detailCellRenderer: _angular_core.InputSignal<MtCellRenderer<T> | undefined>;
2251
+ readonly detailCellRendererParams: _angular_core.InputSignal<MtDetailCellRendererParams<T, any> | undefined>;
2252
+ /** The detail row's height (default 300) unless `detailRowAutoHeight` sizes it by its content. */
2253
+ readonly detailRowHeight: _angular_core.InputSignal<number>;
2254
+ readonly detailRowAutoHeight: _angular_core.InputSignal<boolean>;
2255
+ /** A single click starts editing (double-click by default). */
2256
+ readonly singleClickEdit: _angular_core.InputSignal<boolean>;
2257
+ /** Clicks never start editing (keys and the API still do). */
2258
+ readonly suppressClickEdit: _angular_core.InputSignal<boolean>;
2259
+ /** Commits the open editor when focus leaves the grid (by default it stays open). */
2260
+ readonly stopEditingWhenCellsLoseFocus: _angular_core.InputSignal<boolean>;
2261
+ /** Ctrl+Z / Ctrl+Y (or Ctrl+Shift+Z) undo and redo committed edits, up to the limit. */
2262
+ readonly undoRedoCellEditing: _angular_core.InputSignal<boolean>;
2263
+ readonly undoRedoCellEditingLimit: _angular_core.InputSignal<number>;
2264
+ readonly pagination: _angular_core.InputSignal<boolean>;
2265
+ readonly paginationPanelShow: _angular_core.InputSignal<"always" | "whenNeeded">;
2266
+ readonly paginationPageSize: _angular_core.InputSignal<number>;
2267
+ /** Known total for an externally loaded page; the supplied rows are already paged. */
2268
+ readonly paginationTotalRows: _angular_core.InputSignal<number | undefined>;
2269
+ /** Zero-based external page. Omit it for the grid's ordinary client pagination. */
2270
+ readonly paginationCurrentPage: _angular_core.InputSignal<number | undefined>;
2271
+ /** The page sizes the paging panel offers (false for no picker). */
2272
+ readonly paginationPageSizeSelector: _angular_core.InputSignal<false | readonly number[]>;
2273
+ /** A click on a panel chip sorts the grouped column unless suppressed. */
2274
+ readonly rowGroupPanelSuppressSort: _angular_core.InputSignal<boolean>;
2275
+ private readonly checkedAutoSizePadding;
2276
+ readonly gridReady: _angular_core.OutputEmitterRef<MtGridReadyEvent<T>>;
2277
+ readonly sortChanged: _angular_core.OutputEmitterRef<readonly MtSortModel[]>;
2278
+ readonly cellFocused: _angular_core.OutputEmitterRef<MtCellFocusedEvent>;
2279
+ readonly columnResized: _angular_core.OutputEmitterRef<MtColumnResizedEvent>;
2280
+ readonly columnMoved: _angular_core.OutputEmitterRef<MtColumnMovedEvent>;
2281
+ readonly columnPinned: _angular_core.OutputEmitterRef<MtColumnPinnedEvent>;
2282
+ readonly columnVisible: _angular_core.OutputEmitterRef<MtColumnVisibleEvent>;
2283
+ readonly columnGroupOpened: _angular_core.OutputEmitterRef<MtColumnGroupOpenedEvent>;
2284
+ readonly filterChanged: _angular_core.OutputEmitterRef<MtFilterChangedEvent>;
2285
+ readonly filterModified: _angular_core.OutputEmitterRef<MtFilterModifiedEvent>;
2286
+ readonly filterOpened: _angular_core.OutputEmitterRef<MtFilterOpenedEvent>;
2287
+ /** One per row whose selection changed, before `selectionChanged`. */
2288
+ readonly rowSelected: _angular_core.OutputEmitterRef<MtRowSelectedEvent<T>>;
2289
+ readonly selectionChanged: _angular_core.OutputEmitterRef<MtSelectionChangedEvent<T>>;
2290
+ /** A click on a body cell (not on a checkbox or drag handle). */
2291
+ readonly rowClicked: _angular_core.OutputEmitterRef<MtRowClickedEvent<T>>;
2292
+ readonly rowDragEnter: _angular_core.OutputEmitterRef<MtRowDragEvent<T>>;
2293
+ readonly rowDragMove: _angular_core.OutputEmitterRef<MtRowDragEvent<T>>;
2294
+ readonly rowDragLeave: _angular_core.OutputEmitterRef<MtRowDragEvent<T>>;
2295
+ readonly rowDragEnd: _angular_core.OutputEmitterRef<MtRowDragEvent<T>>;
2296
+ /** Ranges changed: `started` while a pointer drag defines one, `finished` at the end. */
2297
+ readonly cellSelectionChanged: _angular_core.OutputEmitterRef<MtCellSelectionChangedEvent>;
2298
+ readonly contextMenuVisibleChanged: _angular_core.OutputEmitterRef<MtContextMenuVisibleChangedEvent>;
2299
+ readonly rowGroupOpened: _angular_core.OutputEmitterRef<MtRowGroupOpenedEvent<T>>;
2300
+ readonly columnRowGroupChanged: _angular_core.OutputEmitterRef<MtColumnRowGroupChangedEvent>;
2301
+ readonly expandOrCollapseAll: _angular_core.OutputEmitterRef<MtExpandOrCollapseAllEvent>;
2302
+ readonly cellEditingStarted: _angular_core.OutputEmitterRef<MtCellEditingStartedEvent<T>>;
2303
+ readonly cellEditingStopped: _angular_core.OutputEmitterRef<MtCellEditingStoppedEvent<T>>;
2304
+ readonly cellValueChanged: _angular_core.OutputEmitterRef<MtCellValueChangedEvent<T>>;
2305
+ readonly pasteStart: _angular_core.OutputEmitterRef<MtPasteEvent>;
2306
+ readonly pasteEnd: _angular_core.OutputEmitterRef<MtPasteEvent>;
2307
+ readonly fillStart: _angular_core.OutputEmitterRef<MtFillEvent>;
2308
+ readonly fillEnd: _angular_core.OutputEmitterRef<MtFillEvent>;
2309
+ readonly paginationChanged: _angular_core.OutputEmitterRef<MtPaginationChangedEvent>;
2310
+ readonly toolPanelVisibleChanged: _angular_core.OutputEmitterRef<MtToolPanelVisibleChangedEvent>;
2311
+ readonly toolPanelSizeChanged: _angular_core.OutputEmitterRef<MtToolPanelSizeChangedEvent>;
2312
+ readonly columnValueChanged: _angular_core.OutputEmitterRef<MtColumnValueChangedEvent>;
2313
+ readonly columnPivotChanged: _angular_core.OutputEmitterRef<MtColumnPivotChangedEvent>;
2314
+ readonly columnPivotModeChanged: _angular_core.OutputEmitterRef<MtColumnPivotModeChangedEvent>;
2315
+ readonly chartCreated: _angular_core.OutputEmitterRef<MtChartCreatedEvent>;
2316
+ readonly chartDestroyed: _angular_core.OutputEmitterRef<MtChartDestroyedEvent>;
2317
+ readonly chartRangeSelectionChanged: _angular_core.OutputEmitterRef<MtChartRangeSelectionChangedEvent>;
2318
+ readonly chartOptionsChanged: _angular_core.OutputEmitterRef<MtChartOptionsChangedEvent>;
2319
+ protected readonly viewport: Signal<ElementRef<HTMLElement> | undefined>;
2320
+ private readonly host;
2321
+ /** The one sparkline tooltip of this grid, shown at the grid root (a cell clips its overflow). */
2322
+ protected readonly sparklineTooltip: SparklineTooltip;
2323
+ private readonly destroyRef;
2324
+ private readonly injector;
2325
+ /** Leaf columns and the group path above each (column-groups-observations.json). */
2326
+ /** Keeps the previous tree so generated ids can carry over an update (depth 1). */
2327
+ /**
2328
+ * The selection column definition, or null when neither checkboxes nor a header
2329
+ * checkbox show. Only the options that shape the column take part, and an equal
2330
+ * definition keeps its identity, so other option changes are not definition updates
2331
+ * (review P1-2). Defaults are initial values: column state applied later holds.
2332
+ */
2333
+ private readonly selectionColumn;
2334
+ private readonly rowNumbersColumn;
2335
+ /** The host's groups and leaves; the grid's own columns stay outside the tree (review P2-2). */
2336
+ protected readonly groupTree: _angular_core.WritableSignal<ColumnGroupTree<T>>;
2337
+ /**
2338
+ * Row numbers, then the selection column, then the host's leaves. A host leaf without
2339
+ * colId or field keeps the positional id it has without the grid's columns.
2340
+ */
2341
+ /**
2342
+ * The displayed column tree: the host's tree, or in pivot mode the pivot result tree
2343
+ * (groups per key, the value columns as leaves) — with no column label, the host's
2344
+ * tree narrowed to the value columns (live-pivot-setfilter observations).
2345
+ */
2346
+ protected readonly displayTree: Signal<ColumnGroupTree<T>>;
2347
+ private readonly pivotTree;
2348
+ private readonly pivotColDefs;
2349
+ /** The host's data columns with the grid's own columns first, whatever pivot mode shows. */
2350
+ private readonly primaryDefinitions;
2351
+ protected readonly definitions: Signal<readonly MtColumnDef<T>[]>;
2352
+ private composeDefinitions;
2353
+ protected readonly depth: Signal<number>;
2354
+ protected readonly scrollY: _angular_core.WritableSignal<number>;
2355
+ protected readonly scrollX: _angular_core.WritableSignal<number>;
2356
+ protected readonly viewportWidth: _angular_core.WritableSignal<number>;
2357
+ protected readonly viewportHeight: _angular_core.WritableSignal<number>;
2358
+ protected readonly sort: _angular_core.WritableSignal<readonly MtSortModel[]>;
2359
+ /** Reported sortIndex overrides from applied column state (see SortIndices). */
2360
+ private readonly sortIndices;
2361
+ /** Active column filters by column id (`getFilterModel()`); only complete models are stored. */
2362
+ protected readonly filterModel: _angular_core.WritableSignal<Readonly<Record<string, MtColumnFilterModel>>>;
2363
+ /** The quick filter text; the input feeds it and `resetQuickFilter()` clears it. */
2364
+ protected readonly quickText: _angular_core.WritableSignal<string>;
2365
+ /** Bumped by `onFilterChanged()` so an external filter is re-evaluated. */
2366
+ private readonly filterVersion;
2367
+ /** Columns with a filter, by id, with their matching options. */
2368
+ private readonly filterable;
2369
+ private readonly externalFilter;
2370
+ protected readonly focus: _angular_core.WritableSignal<{
2371
+ rowId: string;
2372
+ colId: string;
2373
+ /** Displayed row index when focused; a filter change keeps the index, not the row. */
2374
+ rowIndex: number;
2375
+ } | null>;
2376
+ /** Selected row ids in selection order (`getSelectedRows()` order). */
2377
+ private readonly selection;
2378
+ private readonly selectedSet;
2379
+ /** Displayed index of the last row clicked or toggled with Space (Shift ranges). */
2380
+ private anchorIndex;
2381
+ /** The mode the current selection was made in. */
2382
+ private selectionMode;
2383
+ private lastRowData?;
2384
+ protected readonly synthetic: typeof isSyntheticColumn;
2385
+ protected readonly SELECTION_COLUMN_ID = "ag-Grid-SelectionColumn";
2386
+ protected readonly ROW_NUMBERS_COLUMN_ID = "ag-Grid-RowNumbersColumn";
2387
+ protected readonly showCellCheckbox: Signal<boolean>;
2388
+ protected readonly showHeaderCheckbox: Signal<boolean>;
2389
+ private readonly selectAllMode;
2390
+ protected readonly headerCheckbox: Signal<HeaderCheckboxState>;
2391
+ /** Rows being dragged (rendered half transparent). */
2392
+ protected readonly dragging: _angular_core.WritableSignal<ReadonlySet<string>>;
2393
+ /** Ranges in displayed coordinates; the last one is the active (extending) range. */
2394
+ private readonly ranges;
2395
+ /** Ends a range drag whose release was never delivered (destroy, a new press). */
2396
+ private stopRangeDrag?;
2397
+ /** Ranges clamped to the displayed rows and columns, anchors kept (review P3-7). */
2398
+ private readonly clampedRanges;
2399
+ protected readonly cellSelectionOn: Signal<boolean>;
2400
+ private readonly cellSelectionOptions;
2401
+ /** Columns a range can cover, in displayed order: every column but the row numbers. */
2402
+ private readonly rangeColumns;
2403
+ private readonly pinnedSideById;
2404
+ private readonly rangeColumnIndex;
2405
+ private readonly normalisedRanges;
2406
+ protected readonly rangeHandleOn: Signal<boolean>;
2407
+ protected readonly rangeHeaderHighlight: Signal<boolean>;
2408
+ /** Column ids inside any range (header highlight). */
2409
+ protected readonly rangedColumns: Signal<Set<string>>;
2410
+ /** The status-bar aggregation over the ranges (text-range-status observation). */
2411
+ protected readonly rangeAggregates: Signal<RangeAggregates>;
2412
+ protected readonly statusBarHeight: Signal<0 | 47>;
2413
+ /** The viewport box under the status bar, never negative (recheck N6). */
2414
+ protected readonly viewportBoxHeight: Signal<number>;
2415
+ protected readonly skeletonRows: Signal<number[]>;
2416
+ protected readonly statusPanels: Signal<{
2417
+ key: string;
2418
+ label: string;
2419
+ value: string;
2420
+ hidden: boolean;
2421
+ side: "left" | "right";
2422
+ }[]>;
2423
+ protected readonly statusLeft: Signal<{
2424
+ key: string;
2425
+ label: string;
2426
+ value: string;
2427
+ hidden: boolean;
2428
+ side: "left" | "right";
2429
+ }[]>;
2430
+ protected readonly statusRight: Signal<{
2431
+ key: string;
2432
+ label: string;
2433
+ value: string;
2434
+ hidden: boolean;
2435
+ side: "left" | "right";
2436
+ }[]>;
2437
+ private readonly layout;
2438
+ private hostLayout?;
2439
+ private hostSort;
2440
+ private pivotSort;
2441
+ private pivotOrder;
2442
+ private pivotTotalsOrderKey;
2443
+ private readonly pivotDefaultWidths;
2444
+ private readonly pivotLayoutCache;
2445
+ private rememberPivotLayout;
2446
+ private readonly everythingEvent;
2447
+ private definitionChange?;
2448
+ /**
2449
+ * Open state per group id: a known group keeps it across definition updates, a new
2450
+ * one starts at openByDefault (group-open-close-observations.json definitions-update).
2451
+ */
2452
+ private readonly groupOpen;
2453
+ /** Hover state never changes the public layout or emits column/role events. */
2454
+ protected readonly rolePreview: _angular_core.WritableSignal<{
2455
+ zone: ColumnPanelZone;
2456
+ ids: readonly string[];
2457
+ index: number;
2458
+ } | null>;
2459
+ protected previewChip(id: string, zone: ColumnPanelZone): boolean;
2460
+ private roleIds;
2461
+ protected previewRoleIds(zone: ColumnPanelZone): readonly string[];
2462
+ private readonly previewLayout;
2463
+ /** Groups that can open and close, and the columns their state closes away. */
2464
+ protected readonly groupView: Signal<{
2465
+ expandable: ReadonlySet<string>;
2466
+ closedAway: ReadonlySet<string>;
2467
+ }>;
2468
+ protected readonly displayed: Signal<DisplayedColumns<T>>;
2469
+ protected readonly totalWidth: Signal<number>;
2470
+ private readonly fitRequest;
2471
+ /** Width of the scrolling (centre) region between the pinned sections. */
2472
+ private readonly centerViewport;
2473
+ /** The reference renders 200px of columns beyond each edge of the centre region. */
2474
+ protected readonly visibleCenter: Signal<readonly ColumnGeometry<T>[]>;
2475
+ /**
2476
+ * Column-group header rows (column-groups-observations.json): per level, one cell per
2477
+ * contiguous run of displayed children in each section; the centre renders the cells
2478
+ * that overlap its 200px-buffered window, each at its full width.
2479
+ */
2480
+ protected readonly groupLevels: Signal<{
2481
+ level: number;
2482
+ sections: {
2483
+ kind: Side;
2484
+ width: number;
2485
+ cells: readonly GroupCell[];
2486
+ }[];
2487
+ }[]>;
2488
+ /**
2489
+ * aria-colindex counts hidden columns too: every column in displayed order (left,
2490
+ * centre, right), hidden ones in place; aria-colcount is the column count
2491
+ * (column-groups-observations.json hidden-ltr: 20 columns, Extra 2 at 5).
2492
+ */
2493
+ private readonly ariaIndexes;
2494
+ protected ariaIndex(id: string): number | null;
2495
+ /** A header cell below a group: it draws the 1px separator above itself (observed). */
2496
+ protected underGroup(id: string): boolean;
2497
+ /** Leaf headers stretch up through levels where they have no group (observed). */
2498
+ protected leafSpan(id: string): {
2499
+ top: number;
2500
+ height: number;
2501
+ } | null;
2502
+ protected readonly sections: Signal<readonly Section<T>[]>;
2503
+ /**
2504
+ * Rows also keep the focused cell's centre column rendered when it leaves the window,
2505
+ * so DOM focus survives width changes that push it out; the reference keeps the
2506
+ * focused cell while its header leaves (independent review P2-6, columns-check
2507
+ * focus-kept-after-autosize).
2508
+ */
2509
+ protected readonly rowSections: Signal<readonly Section<T>[]>;
2510
+ /** Arrow state and multi-sort position (1-based, only when several columns sort). */
2511
+ protected sortMark(colId: string): {
2512
+ sort: 'asc' | 'desc';
2513
+ order: number | null;
2514
+ } | null;
2515
+ /**
2516
+ * Arrow-key order follows the physical order on screen. In RTL the right-pinned
2517
+ * section and the centre flow right to left, while the left-pinned section keeps a
2518
+ * left-to-right flow (observed), so only that section is walked in reverse.
2519
+ */
2520
+ private readonly navigation;
2521
+ private readonly sourceRows;
2522
+ /**
2523
+ * Row order after managed row drags (null = source order). A rowData update keeps the
2524
+ * dragged order for the ids it still has and places new rows at their source index.
2525
+ */
2526
+ private readonly managedOrder;
2527
+ /** Source rows in grid order (managed drags applied). */
2528
+ private readonly orderedSourceRows;
2529
+ /** Keyed on the source rows: a managed reorder does not rebuild it (review P3-15). */
2530
+ private readonly nodesById;
2531
+ /** Rows after the column filters, the quick filter and the external filter, in source order. */
2532
+ private readonly filteredRows;
2533
+ /** The leaf rows after the filters and the sort (the displayed rows when nothing is grouped). */
2534
+ protected readonly leafRows: Signal<readonly MtRowNode<T>[]>;
2535
+ /**
2536
+ * Grouped column ids in group order: `rowGroup`/`rowGroupIndex` on the definitions,
2537
+ * then the UI and API changes (stateful like width: an undefined `rowGroup` keeps the
2538
+ * state on a definitions update, true/false applies).
2539
+ */
2540
+ readonly rowGroupColumns: _angular_core.WritableSignal<readonly string[]>;
2541
+ /** Explicit expand/collapse toggles by group id; expandAll/collapseAll reset them. */
2542
+ private readonly groupExpansion;
2543
+ private readonly expandAllMode;
2544
+ /** Tree data is on: `treeData` with a `getDataPath`. */
2545
+ protected readonly treeOn: Signal<boolean>;
2546
+ protected readonly grouping: Signal<boolean>;
2547
+ private readonly groupColumns;
2548
+ /** The auto group column ("Group", 200px) while rows are grouped. */
2549
+ private readonly autoGroupColumn;
2550
+ /** Columns with an aggFunc: a built-in, a registered name, or a function. */
2551
+ private readonly aggregations;
2552
+ private readonly grouped;
2553
+ /**
2554
+ * The displayed rows: the leaves, or the group tree flattened by its expansion; in
2555
+ * pivot mode the group rows alone (their pivot aggregates merged in), or one root row
2556
+ * aggregating every leaf when nothing is grouped (observed ROOT_NODE_ID, level -1).
2557
+ */
2558
+ private readonly baseRows;
2559
+ /** Ids of the master rows whose detail is open. */
2560
+ private readonly detailOpen;
2561
+ /** Detail rows per master id, from `getDetailRowData`. */
2562
+ private readonly detailData;
2563
+ /** Measured heights of auto-height detail rows, by detail row id. */
2564
+ private readonly detailHeights;
2565
+ /** A data row that can open a detail (`masterDetail`, `isRowMaster`). */
2566
+ protected isMaster(row: MtRowNode<T>): boolean;
2567
+ /** Every displayed row, with a detail row under each open master (`detail_<id>`, level 1). */
2568
+ protected readonly displayedAll: Signal<readonly MtRowNode<T>[]>;
2569
+ private readonly pageIndex;
2570
+ protected readonly pagingRowCount: Signal<number>;
2571
+ private readonly pageSizeOverride;
2572
+ protected readonly pageSize: Signal<number>;
2573
+ protected readonly pageCount: Signal<number>;
2574
+ protected readonly currentPage: Signal<number>;
2575
+ private readonly hostChartColors;
2576
+ private readonly skinPagerHeight;
2577
+ private readonly skinFloatingHeight;
2578
+ private readonly skinRowHeight;
2579
+ private readonly skinHeaderHeight;
2580
+ protected readonly pagerHeight: Signal<number>;
2581
+ protected readonly showPager: Signal<boolean>;
2582
+ /** The rows on screen: every displayed row, or the current page of them. */
2583
+ protected readonly rows: Signal<readonly MtRowNode<T>[]>;
2584
+ private paginationEvent;
2585
+ protected goToPage(page: number): void;
2586
+ protected setPageSize(size: number): void;
2587
+ /** The synthetic column a custom detail renderer's params refer to. */
2588
+ protected readonly detailColumn: Signal<MtColumnDef<T>>;
2589
+ /** Opens or closes a master's detail (its rows are fetched on the first opening); reports rowGroupOpened. */
2590
+ private setDetailExpanded;
2591
+ protected detailRows(row: MtRowNode<T>): readonly object[];
2592
+ /** An auto-height detail row reports its content height. */
2593
+ protected onDetailSized(row: MtRowNode<T>, height: number): void;
2594
+ /** The nested grid's height: its header band plus its rows (auto height), else the detail row less its padding. */
2595
+ protected detailGridHeight(row: MtRowNode<T>): number;
2596
+ /** Header-only sizing at result creation; subsequent user widths live in the result cache. */
2597
+ private pivotHeaderWidth;
2598
+ /** The pivot result columns and aggregates (null outside pivot mode). */
2599
+ private readonly pivotData;
2600
+ private readonly pivotLimitEvent;
2601
+ protected readonly showRowGroupPanel: Signal<boolean>;
2602
+ protected readonly showPivotPanel: Signal<boolean>;
2603
+ protected readonly showPanelRow: Signal<boolean>;
2604
+ protected onQuickFilterInput(event: Event): void;
2605
+ protected readonly rowGroupPanelHeight: Signal<0 | 48>;
2606
+ /** The floating-filter row exists when any column asks for one. */
2607
+ protected readonly hasFloatingFilters: Signal<boolean>;
2608
+ protected readonly checkedFloatingHeight: Signal<number>;
2609
+ protected readonly checkedHeight: Signal<number>;
2610
+ /** The viewport's horizontal scrollbar, when its content is wider than its box. */
2611
+ private readonly horizontalScrollbar;
2612
+ /**
2613
+ * Auto height: the plain rows exceed their cap, so the viewport scrolls them.
2614
+ * Otherwise the content fits by construction and the viewport never scrolls
2615
+ * vertically, which keeps its width (and so its columns and horizontal
2616
+ * scrollbar) from oscillating with a classic scrollbar.
2617
+ */
2618
+ protected readonly autoHeightScrolls: Signal<boolean>;
2619
+ /** The chart scope's page-level host size, when it hosts this grid's chart popups. */
2620
+ private readonly chartHostSize;
2621
+ /** Chart popups are bounded by the scope's host when it has one, else by this grid. */
2622
+ private readonly chartBounds;
2623
+ /** Auto height: chrome + the capped plain rows + every open detail + the viewport border. */
2624
+ private readonly autoHeightValue;
2625
+ protected readonly checkedRowHeight: Signal<number>;
2626
+ protected readonly checkedHeaderHeight: Signal<number>;
2627
+ protected readonly checkedGroupHeight: Signal<number>;
2628
+ /** Group rows, the column header row and its bottom border. */
2629
+ protected readonly headerBandHeight: Signal<number>;
2630
+ /** Header rows above the body: group rows, the header row and the floating-filter row. */
2631
+ protected readonly headerRows: Signal<number>;
2632
+ /** Row tops and heights: uniform, or with the detail rows' own heights. */
2633
+ protected readonly rowLayout: Signal<RowLayout>;
2634
+ protected readonly range: Signal<{
2635
+ start: number;
2636
+ end: number;
2637
+ }>;
2638
+ protected readonly visibleRows: Signal<MtRowNode<T>[]>;
2639
+ private readonly tabStop;
2640
+ protected readonly drag: _angular_core.WritableSignal<DragGhost | null>;
2641
+ protected readonly menu: _angular_core.WritableSignal<{
2642
+ colId: string;
2643
+ position: MenuPosition;
2644
+ /** The grid box when the menu was placed: the menu follows it through page scrolling. */
2645
+ box: MenuBounds;
2646
+ /** Every open renders a fresh menu, so no item state leaks between columns. */
2647
+ key: number;
2648
+ } | null>;
2649
+ private menuKey;
2650
+ /** The open cell context menu: its items, the cell it opened on, the box it stays in. */
2651
+ protected readonly contextMenu: _angular_core.WritableSignal<{
2652
+ rowIndex: number | null;
2653
+ colId: string | null;
2654
+ items: readonly MenuItem[];
2655
+ position: MenuPosition;
2656
+ bounds: MenuBounds;
2657
+ key: number;
2658
+ } | null>;
2659
+ private contextMenuKey;
2660
+ /** Custom item actions by generated item id. */
2661
+ private contextMenuActions;
2662
+ private mainMenuActions;
2663
+ /** The open column filter popup. */
2664
+ protected readonly filterPopup: _angular_core.WritableSignal<{
2665
+ colId: string;
2666
+ kind: FilterKind;
2667
+ params: MtFilterParams;
2668
+ position: MenuPosition;
2669
+ anchorTop?: number;
2670
+ key: number;
2671
+ } | null>;
2672
+ private filterKey;
2673
+ /** Floating-filter texts typed but not applied yet (debounce), by column id. */
2674
+ private readonly floatingDrafts;
2675
+ private readonly floatingTimers;
2676
+ protected readonly chooser: _angular_core.WritableSignal<{
2677
+ colId: string;
2678
+ position: {
2679
+ top: number;
2680
+ left: number;
2681
+ };
2682
+ } | null>;
2683
+ protected readonly menuItems: Signal<readonly MenuItem[]>;
2684
+ protected readonly chooserColumns: Signal<readonly ChooserColumn[]>;
2685
+ private resizeObserver?;
2686
+ private focusRender?;
2687
+ private emittedSort;
2688
+ private stopResize?;
2689
+ private resizeDefinitions?;
2690
+ private resizeDirection?;
2691
+ /** A header drag's release must not also sort the column it started on. */
2692
+ private suppressClick;
2693
+ private menuRestore;
2694
+ private quickInputSeen;
2695
+ /** Set while the grid re-focuses a cell itself (no cellFocused event). */
2696
+ private silentFocus;
2697
+ /** Words of the quick filter last applied (a same-words change emits nothing). */
2698
+ private quickApplied;
2699
+ private externalSeen;
2700
+ private removeOutsideListener?;
2701
+ private removeReposition?;
2702
+ /** The header-drag session, driven through the grid's own state and private methods. */
2703
+ private readonly dragger;
2704
+ /** Content autosize, driven the same way. */
2705
+ private readonly autosizer;
2706
+ readonly api: MtGridApi<T>;
2707
+ constructor();
2708
+ /** A column's definition: the host's columns first, then (pivoting) the pivot result leaves. */
2709
+ private definition;
2710
+ /**
2711
+ * The reference skips unknown column IDs in move/pin/visibility/autosize calls and
2712
+ * applies the known ones; an all-unknown call does nothing (columns-check
2713
+ * api-unknown-ids, autosize-unknown-and-repeat).
2714
+ */
2715
+ private keepsLocks;
2716
+ private knownIds;
2717
+ /**
2718
+ * Commits a layout and emits the reference's event families in its observed order:
2719
+ * resized, pinned, visible, sort, moved (columns-observations.json state-apply/reset).
2720
+ */
2721
+ private commit;
2722
+ private emitLayoutChanges;
2723
+ private lastDisplayedSignature;
2724
+ private displayedSignature;
2725
+ private notifyDisplayedColumns;
2726
+ /** Includes generated/group-closed-away columns and synthetic columns added by grouping. */
2727
+ private readonly displayedColumnEvent;
2728
+ private readonly pinHistory;
2729
+ private fitPinnedWidth;
2730
+ private readonly pinnedViewportGuard;
2731
+ private applyColumnState;
2732
+ private resetColumnState;
2733
+ /**
2734
+ * Reference rule (columns-check api-move-unknown-index): `toIndex` is checked against
2735
+ * every listed ID, unknown ones included — beyond `columns - listed` nothing happens;
2736
+ * otherwise the known IDs move, and with none known a `columnMoved` with no columns
2737
+ * is still emitted. Negative or fractional indices stay owned errors.
2738
+ */
2739
+ protected onChooserMove(event: {
2740
+ id: string;
2741
+ toIndex: number;
2742
+ }): void;
2743
+ private moveColumns;
2744
+ private setPinned;
2745
+ private setVisible;
2746
+ /** Moving a node in the DOM blurs it; column changes re-focus the same logical target. */
2747
+ private captureFocus;
2748
+ private findTarget;
2749
+ private restoreFocus;
2750
+ private sizeColumnsToFit;
2751
+ protected groupFieldText(row: MtRowNode<T>): string;
2752
+ private emitColumnWidths;
2753
+ private setColumnWidths;
2754
+ /** Pinned columns resize from the edge that faces the centre (observed in LTR). */
2755
+ protected handleAtStart(column: ColumnGeometry<T>): boolean;
2756
+ private neighbor;
2757
+ private focusFloating;
2758
+ protected onFloatingKey(event: KeyboardEvent, colId: string): void;
2759
+ protected onHeaderKey(event: KeyboardEvent, column: ColumnGeometry<T>): void;
2760
+ private resizeBy;
2761
+ protected startResize(event: PointerEvent, column: ColumnGeometry<T>): void;
2762
+ /** Displayed columns of a layout, without the columns closed away by group state. */
2763
+ private shownColumns;
2764
+ protected isGroupOpen(groupId: string): boolean;
2765
+ /**
2766
+ * Applies open states in order and reports them in one columnGroupOpened: one entry per
2767
+ * entry that changed the state at its turn (a group listed twice can appear twice), each
2768
+ * with the final state; `columnGroup` only when there is one entry
2769
+ * (group-open-close-observations.json api-ltr; open/close review R6). Unknown and padding
2770
+ * group ids are ignored; nothing changed emits nothing.
2771
+ */
2772
+ private setGroupsOpen;
2773
+ /** The expand icon and Enter on an expandable group cell toggle it (observed; Space does not). */
2774
+ protected toggleGroup(groupId: string): void;
2775
+ protected groupResizable(cell: GroupCell): boolean;
2776
+ protected autoSizeGroup(cell: GroupCell): void;
2777
+ private resizeGroup;
2778
+ protected startGroupResize(event: PointerEvent, cell: GroupCell, side: Side): void;
2779
+ protected onGroupKey(event: KeyboardEvent, groupId: string): void;
2780
+ protected autoSizeFromHandle(column: ColumnGeometry<T>): void;
2781
+ protected startHeaderDrag(event: PointerEvent, column: ColumnGeometry<T>): void;
2782
+ /**
2783
+ * Dragging a group header moves all the group's columns as one block, hidden and
2784
+ * closed-away ones included, with the ghost showing the group label; pin, hide,
2785
+ * auto-scroll and events work as for a column. A group with a lockPosition or
2786
+ * suppressMovable column does not drag (group-drag-observations.json).
2787
+ */
2788
+ protected startGroupDrag(event: PointerEvent, cell: GroupCell, side: Side): void;
2789
+ /** Columns of every marryChildren group. */
2790
+ private marriedLeaves;
2791
+ private anchorFor;
2792
+ protected toggleMenu(column: ColumnGeometry<T>, event: MouseEvent): void;
2793
+ protected openContextMenu(event: MouseEvent, column: ColumnGeometry<T>): void;
2794
+ private showColumnMenu;
2795
+ private openMenu;
2796
+ /** Pointer presses outside an open menu close it without moving focus (observed). */
2797
+ private listenOutside;
2798
+ /** Keeps the outside listener while any popup is open. */
2799
+ private releaseOutsideListener;
2800
+ protected closePopups(restore: boolean, source?: 'ui' | 'api'): void;
2801
+ private readonly columnsPanel;
2802
+ private readonly filtersPanel;
2803
+ protected readonly panelColumnLayout: _angular_core.WritableSignal<readonly MtColDef<T>[] | null>;
2804
+ protected readonly panelLayout: Signal<readonly MtColDef<T>[]>;
2805
+ protected onPanelLayout(layout: readonly MtColDef<T>[]): void;
2806
+ protected readonly dropIndicator: _angular_core.WritableSignal<{
2807
+ x: number;
2808
+ y: number;
2809
+ height: number;
2810
+ } | null>;
2811
+ protected showPivotHint(event: Event): void;
2812
+ protected hidePivotHint(event: Event): void;
2813
+ protected readonly panelDragging: _angular_core.WritableSignal<string | null>;
2814
+ protected readonly panelInsertion: _angular_core.WritableSignal<{
2815
+ id: string;
2816
+ after: boolean;
2817
+ } | null>;
2818
+ private stopPanelDrag?;
2819
+ protected onGroupChipPointer(event: PointerEvent, id: string): void;
2820
+ protected onPanelDragStart(spec: {
2821
+ event: PointerEvent;
2822
+ id: string;
2823
+ label: string;
2824
+ from?: ColumnPanelZone;
2825
+ group?: boolean;
2826
+ }): void;
2827
+ private readonly customPanel;
2828
+ protected readonly customPanelInputs: Signal<{
2829
+ params: {
2830
+ api: MtGridApi<T>;
2831
+ suppressRowGroups?: boolean;
2832
+ suppressValues?: boolean;
2833
+ suppressPivots?: boolean;
2834
+ suppressPivotMode?: boolean;
2835
+ suppressColumnFilter?: boolean;
2836
+ suppressColumnSelectAll?: boolean;
2837
+ suppressColumnExpandAll?: boolean;
2838
+ contractColumnSelection?: boolean;
2839
+ };
2840
+ }>;
2841
+ private readonly toolPanelRefresh;
2842
+ private refreshToolPanel;
2843
+ private getToolPanelInstance;
2844
+ private readonly toolPanelInitializing;
2845
+ protected readonly sideBarDef: Signal<NormalizedSideBar | null>;
2846
+ protected readonly sideBarVisible: _angular_core.WritableSignal<boolean>;
2847
+ protected readonly sideBarPosition: _angular_core.WritableSignal<"left" | "right">;
2848
+ /** The open panel's key; `defaultToolPanel` opens one at start, otherwise none (observed). */
2849
+ protected readonly openedToolPanel: _angular_core.WritableSignal<string | null>;
2850
+ protected readonly openedPanelDef: Signal<SideBarPanelDef | null>;
2851
+ protected readonly filterPanelOptions: Signal<MtFiltersToolPanelDef>;
2852
+ protected readonly openedPanelParams: Signal<{
2853
+ [key: string]: unknown;
2854
+ suppressRowGroups?: boolean;
2855
+ suppressValues?: boolean;
2856
+ suppressPivots?: boolean;
2857
+ suppressPivotMode?: boolean;
2858
+ suppressColumnFilter?: boolean;
2859
+ suppressColumnSelectAll?: boolean;
2860
+ suppressColumnExpandAll?: boolean;
2861
+ contractColumnSelection?: boolean;
2862
+ }>;
2863
+ protected readonly toolPanelWidth: _angular_core.WritableSignal<number>;
2864
+ protected readonly sideBarButtons: Signal<readonly SideBarButton[]>;
2865
+ protected readonly pivotModeOn: _angular_core.WritableSignal<boolean>;
2866
+ /** Column label ids in pivot order: `pivot`/`pivotIndex` on the definitions, then the UI and API changes (stateful). */
2867
+ readonly pivotColumns: _angular_core.WritableSignal<readonly string[]>;
2868
+ /** Aggregation overrides from the Values zone or the API, by column id (`null` = none). */
2869
+ private readonly aggFuncState;
2870
+ private effectiveAggFunc;
2871
+ private readonly valueOrder;
2872
+ /** Definition order initially; explicit Values drops/API order is retained afterwards. */
2873
+ protected readonly valueColumns: Signal<readonly string[]>;
2874
+ private aggFuncName;
2875
+ /** The header text: `func(Name)` on an aggregated column while rows are grouped (observed). */
2876
+ protected headerText(column: ColumnGeometry<T>): string;
2877
+ /** `func(text)` for an aggregated column (the pivot result headers too), else the text. */
2878
+ private aggLabel;
2879
+ private setValueColumns;
2880
+ private setColumnAggFunc;
2881
+ private setPivotColumns;
2882
+ /** The `pivotMode` input follows the same path as the switch, so changes report the event. */
2883
+ private readonly pivotModeInput;
2884
+ private setPivotMode;
2885
+ /** A side button: the open panel closes, another panel replaces it (observed). */
2886
+ protected onToolPanelToggle(key: string, source?: MtToolPanelVisibleSource): void;
2887
+ private openToolPanel;
2888
+ private closeToolPanel;
2889
+ protected onToolPanelResize(event: SideBarResize): void;
2890
+ /**
2891
+ * The Columns tool panel list in grid order: a named group row opens before its first
2892
+ * column of a run (a group split by moves lists twice), columns at the group's depth.
2893
+ */
2894
+ protected readonly columnPanelItems: Signal<readonly ColumnPanelItem[]>;
2895
+ protected readonly rowGroupChips: Signal<readonly ColumnPanelChip[]>;
2896
+ protected readonly valueChips: Signal<readonly ColumnPanelChip[]>;
2897
+ protected readonly pivotChips: Signal<readonly ColumnPanelChip[]>;
2898
+ protected readonly filterPanelColumns: Signal<readonly FilterPanelColumn[]>;
2899
+ protected onPanelGhost(ghost: ColumnPanelGhost | null): void;
2900
+ protected onPanelVisibility(event: {
2901
+ ids: readonly string[];
2902
+ visible: boolean;
2903
+ }): void;
2904
+ protected onPanelRowGroupAdd(id: string): void;
2905
+ protected onPanelRowGroupRemove(id: string): void;
2906
+ protected onPanelValueAdd(id: string): void;
2907
+ protected onPanelValueRemove(id: string): void;
2908
+ protected onPanelAggFunc(event: {
2909
+ id: string;
2910
+ func: string;
2911
+ }): void;
2912
+ protected onPanelPivotAdd(id: string): void;
2913
+ protected onPanelPivotRemove(id: string): void;
2914
+ protected onPanelPivotMode(on: boolean): void;
2915
+ protected onFilterPanelModel(event: {
2916
+ id: string;
2917
+ model: MtColumnFilterModel | null;
2918
+ }): void;
2919
+ private readonly chartApp;
2920
+ private readonly chartEnvironment;
2921
+ private readonly chartRefs;
2922
+ protected readonly charts: _angular_core.WritableSignal<readonly {
2923
+ id: string;
2924
+ params: MtCreateRangeChartParams;
2925
+ ranges: readonly MtChartCellRange[];
2926
+ box: ChartBox;
2927
+ snapshot?: DerivedChartData;
2928
+ }[]>;
2929
+ private readonly chartScope;
2930
+ private chartSequence;
2931
+ private chartViewSettings;
2932
+ private selectingChartRange?;
2933
+ protected readonly hostSize: _angular_core.WritableSignal<{
2934
+ width: number;
2935
+ height: number;
2936
+ }>;
2937
+ /** Identity charts follow the filtered data, independently of group expansion. */
2938
+ private readonly identityChartRows;
2939
+ private chartDataColumns;
2940
+ /** Live chart source for ranges: displayed rows, or the filtered identity rows for identity ranges. */
2941
+ private chartRawData;
2942
+ private readonly chartViews;
2943
+ protected readonly chartModels: Signal<readonly MtChartModel[]>;
2944
+ private chartCellRange;
2945
+ protected chartClasses(rowIndex: number, colId: string): {
2946
+ chart: boolean;
2947
+ category: boolean;
2948
+ };
2949
+ private chartSelectedRange;
2950
+ private chartRange;
2951
+ private createRangeChart;
2952
+ private createPivotChart;
2953
+ private updateChart;
2954
+ private toggleChartLink;
2955
+ protected destroyChart(chartId: string): void;
2956
+ protected onChartBox(chartId: string, box: ChartBox): void;
2957
+ protected readonly AUTO_GROUP_COLUMN_ID = "ag-Grid-AutoColumn";
2958
+ protected readonly GROUP_INDENT = 28;
2959
+ /** Groups sort by key ascending unless the grouped (or auto) column carries a sort. */
2960
+ private groupSortFor;
2961
+ private setRowGroups;
2962
+ protected toggleRowGroup(node: MtRowNode<T>, event?: Event): void;
2963
+ private setGroupExpanded;
2964
+ private expandOrCollapseAllGroups;
2965
+ /** The auto column's key text: the group key, or the total row's label. */
2966
+ protected groupKeyText(row: MtRowNode<T>): string;
2967
+ protected groupValueColumn(row: MtRowNode<T>): MtColumnDef<T> | undefined;
2968
+ /** "(17)" after the key (observed), unless suppressed. */
2969
+ protected groupCountText(row: MtRowNode<T>): string | null;
2970
+ /** A leaf's text in the auto column: its value for the auto column's field, if any. */
2971
+ protected groupLeafText(row: MtRowNode<T>, column?: MtColumnDef<T>): string;
2972
+ /** 28px per level (observed); leaves sit one level deeper than the last group. */
2973
+ protected groupIndent(row: MtRowNode<T>): number;
2974
+ protected onFullGroupKey(event: KeyboardEvent, row: MtRowNode<T>): void;
2975
+ protected isGroupColumn(id: string | undefined): boolean;
2976
+ protected groupCellNode(row: MtRowNode<T>, id: string): MtRowNode<T> | null;
2977
+ protected readonly stickyRows: Signal<{
2978
+ top: number;
2979
+ translate: number;
2980
+ row: MtRowNode<T>;
2981
+ index: number;
2982
+ }[]>;
2983
+ protected groupChipLabel(id: string): string;
2984
+ protected groupChipSort(id: string): 'asc' | 'desc' | null;
2985
+ /** Observed: a chip click sorts the grouped column ascending, then descending, then not. */
2986
+ protected onGroupChipClick(id: string): void;
2987
+ protected removeRowGroup(id: string): void;
2988
+ private previewRoleDrop;
2989
+ private finishRoleDrop;
2990
+ private rowGroupDropZone;
2991
+ private canRowGroup;
2992
+ private dropOnRowGroupPanel;
2993
+ /** The grid's box is the popup parent: menus stay inside it (observed). */
2994
+ private popupBounds;
2995
+ protected onCellContextMenu(event: MouseEvent, rowIndex: number, column: ColumnGeometry<T>): void;
2996
+ private showContextMenu;
2997
+ /** The default item names; cut and paste wait for editing and show disabled. */
2998
+ private defaultContextMenuItems;
2999
+ private openContextMenuAt;
3000
+ private buildMenuItems;
3001
+ private builtInMenuItem;
3002
+ private mainMenuItem;
3003
+ private customMenuItem;
3004
+ protected onContextMenuItem(id: string): void;
3005
+ protected onContextMenuEscape(): void;
3006
+ protected closeContextMenu(restore: boolean, source?: 'ui' | 'api'): void;
3007
+ private copyText;
3008
+ private copyRowsText;
3009
+ private transferableColumn;
3010
+ private transferValue;
3011
+ private transferText;
3012
+ private clipboardValue;
3013
+ protected isCopied(rowId: string, colId: string): boolean;
3014
+ private flashCopied;
3015
+ private exportColumn;
3016
+ /** Full traversal: exports never inherit the UI's collapsed groups or current page. */
3017
+ private exportNodes;
3018
+ /** The displayed (or chosen) host columns and the displayed (or every) rows as plain values. */
3019
+ private exportTable;
3020
+ private csvText;
3021
+ private exportCsv;
3022
+ /** The workbook as a Blob; the xlsx writer loads on first use. */
3023
+ private excelBlob;
3024
+ private exportExcel;
3025
+ private pdfBlob;
3026
+ private exportPdf;
3027
+ private columnFilterParams;
3028
+ private floatingParamsOf;
3029
+ protected floatingReadOnly(colId: string): boolean;
3030
+ protected floatingInputType(colId: string, kind: FilterKind): string;
3031
+ protected filterKindOf(colId: string): FilterKind | null;
3032
+ protected isFiltered(colId: string): boolean;
3033
+ protected filterModelOf(colId: string): MtColumnFilterModel | null;
3034
+ /** "<Header> Filter Input"; a date column's read-only summary reads "Date Filter Input" (observed). */
3035
+ protected floatingLabel(column: MtColumnDef<T>, summary?: boolean): string;
3036
+ /** Toggles the filter popup from its header or floating-row button. */
3037
+ protected toggleFilter(column: ColumnGeometry<T>, event: MouseEvent): void;
3038
+ /**
3039
+ * Opens the filter popup 2px below its trigger, aligned to its start edge,
3040
+ * clamped to the viewport; emits `filterOpened`.
3041
+ */
3042
+ private openFilter;
3043
+ /** Popup position: 2px below the trigger, start-aligned and clamped to the viewport. */
3044
+ private filterPosition;
3045
+ /** Closes the filter popup; Escape and the trigger return focus to the header cell. */
3046
+ protected closeFilterPopup(restore: boolean): void;
3047
+ /**
3048
+ * The popup follows its trigger through page and grid scrolling and column moves
3049
+ * (review P1-4): the position is recomputed from the trigger's current box.
3050
+ */
3051
+ private listenReposition;
3052
+ /**
3053
+ * The header and context menus are fixed-positioned inside the grid's box (the popup
3054
+ * parent); when the page scrolls or the grid moves they shift with the box, like the
3055
+ * reference's popups that live inside its root element.
3056
+ */
3057
+ private repositionMenus;
3058
+ private repositionFilter;
3059
+ protected onFilterPopupModel(colId: string, model: MtColumnFilterModel | null): void;
3060
+ /**
3061
+ * What a floating-filter cell shows: the typed draft, the applied simple value, or a
3062
+ * read-only summary for models the input cannot hold (ranges, blank, two conditions).
3063
+ */
3064
+ /** Distinct set-filter values of a column over every row (or `filterParams.values`), blanks first. */
3065
+ protected setFilterValues(colId: string): readonly SetFilterValue[];
3066
+ private readonly filterValueFormatters;
3067
+ protected filterValueFormatter(colId: string): ((value: unknown) => string) | undefined;
3068
+ protected readonly resolvedSetValues: _angular_core.WritableSignal<ReadonlyMap<string, ReadonlyMap<MtFilterParams, readonly SetFilterValue[]>>>;
3069
+ protected onSetValues(colId: string, event: {
3070
+ params: MtFilterParams;
3071
+ values: readonly SetFilterValue[];
3072
+ }): void;
3073
+ private readonly setFilterValueMap;
3074
+ protected floatingState(colId: string): {
3075
+ kind: FilterKind;
3076
+ value: string;
3077
+ summary: string | null;
3078
+ } | null;
3079
+ private conditionText;
3080
+ /**
3081
+ * Typing in a floating input: the model applies after the debounce; the reference
3082
+ * reports one `filterModified` then (not per keystroke, unlike the popup).
3083
+ */
3084
+ protected onFloatingInput(colId: string, event: Event): void;
3085
+ protected clearFloating(colId: string): void;
3086
+ private scheduleFloating;
3087
+ /** The model a floating text amounts to: the applied operator (or the default) with that value. */
3088
+ private floatingModel;
3089
+ protected onMenuItem(id: string): void;
3090
+ protected onChooserToggle(change: {
3091
+ id: string;
3092
+ visible: boolean;
3093
+ }): void;
3094
+ protected onChooserToggleAll(visible: boolean): void;
3095
+ protected readonly editing: _angular_core.WritableSignal<EditingState | null>;
3096
+ private readonly editorRef;
3097
+ /** Bumped after every committed value, so the cells re-read their (mutated) row data. */
3098
+ private readonly dataVersion;
3099
+ private readonly undoStack;
3100
+ private readonly redoStack;
3101
+ /** The cells a fill drag will write (normalised, displayed coordinates). */
3102
+ private readonly fillPreview;
3103
+ private stopFillDrag;
3104
+ /** `cellSelection.handle: { mode: 'fill' }`: the range handle fills instead of extending. */
3105
+ protected readonly fillHandleOn: Signal<boolean>;
3106
+ /** The ranged column ids in displayed order. */
3107
+ private rangeColumnIds;
3108
+ protected isEditable(row: MtRowNode<T>, column: MtColumnDef<T>): boolean;
3109
+ protected isEditing(row: MtRowNode<T>, colId: string): boolean;
3110
+ protected editorOptions(column: MtColumnDef<T>): readonly unknown[];
3111
+ protected editorParams(column: MtColumnDef<T>): MtCellEditorParams;
3112
+ protected inFillPreview(rowIndex: number, colId: string): boolean;
3113
+ /**
3114
+ * Opens the inline editor on an editable cell (observed: Enter / double-click select the
3115
+ * value, a typed key replaces it, F2 keeps it with the caret at the end). A checkbox
3116
+ * cell toggles instead of opening an editor.
3117
+ */
3118
+ startEditing(rowIndex: number, colId: string, key?: string | null, keepValue?: boolean): boolean;
3119
+ private editingTarget;
3120
+ /**
3121
+ * Focus left the editor: a click on another cell commits (that cell keeps the focus);
3122
+ * focus leaving the grid commits only with stopEditingWhenCellsLoseFocus, else the
3123
+ * editor stays open.
3124
+ */
3125
+ protected commitOnBlur(event: {
3126
+ value: unknown;
3127
+ target: Element | null;
3128
+ }): void;
3129
+ /** Commits what the editor holds, re-focuses the cell (observed: Enter keeps focus there). */
3130
+ protected commitEditing(raw: unknown, refocus?: boolean): void;
3131
+ private commitCurrentEditor;
3132
+ /** Escape: the value stays, focus returns to the cell. */
3133
+ protected cancelEditing(): void;
3134
+ /** Tab / Shift+Tab after the commit: the next editable cell of the row (then the next row) edits. */
3135
+ protected tabEditing(direction: number): void;
3136
+ /**
3137
+ * Writes a value through `valueSetter` or into `data[field]`, bumps the data version so
3138
+ * the cells re-read, reports cellValueChanged and records the undo step.
3139
+ */
3140
+ private writeCell;
3141
+ private applyEdit;
3142
+ private undoEdit;
3143
+ private redoEdit;
3144
+ protected onCellDoubleClick(event: MouseEvent, rowIndex: number, row: MtRowNode<T>, column: ColumnGeometry<T>): void;
3145
+ /** The keys that edit (observed: Enter, F2, a printable key; Delete / Backspace; Ctrl+X / Z / Y). */
3146
+ private handleEditingKey;
3147
+ /** The editable cells of the ranges, or of the focused cell when no range is drawn: rows x column ids. */
3148
+ private selectedCells;
3149
+ protected editableCellsInSelection(): boolean;
3150
+ private clearCells;
3151
+ /** Cut: the copy, then the editable cells of the range cleared. */
3152
+ private cutCells;
3153
+ private copyRangeDown;
3154
+ protected onPaste(event: ClipboardEvent): void;
3155
+ private pasteFromClipboard;
3156
+ /**
3157
+ * Pastes a grid of text at the first range's top-left (or the focused cell): a single
3158
+ * value fills the whole range, a block writes cell by cell into editable cells (columns
3159
+ * with `suppressPaste` skipped).
3160
+ */
3161
+ private pasteText;
3162
+ /**
3163
+ * The fill handle (observed on the reference as the range's bottom-right square): dragging
3164
+ * it down / up / right / left previews the cells the range's values will be written on,
3165
+ * continuing a numeric sequence or repeating the pattern (`editing.ts`).
3166
+ */
3167
+ protected onFillPointerDown(event: PointerEvent): void;
3168
+ private applyFill;
3169
+ /** Per-node renderer params, reused while the value and its text are unchanged. */
3170
+ private readonly cellParamsCache;
3171
+ protected cellParams(row: MtRowNode<T>, column: MtColumnDef<T>): MtCellRendererParams<T>;
3172
+ protected hasType(column: MtColumnDef<T>, type: MtColumnType): boolean;
3173
+ /** `rightAligned` and `numericColumn` columns align their cells and header to the end. */
3174
+ protected rightAligned(column: MtColumnDef<T>): boolean;
3175
+ /** The column's `cellClass` plus the `cellClassRules` that hold, or null. */
3176
+ protected cellClassList(row: MtRowNode<T>, column: MtColumnDef<T>): readonly string[] | null;
3177
+ protected cellStyleOf(row: MtRowNode<T>, column: MtColumnDef<T>): Readonly<Record<string, string>> | null;
3178
+ protected text(row: MtRowNode<T>, column: MtColumnDef<T>): string;
3179
+ protected label(column: MtColumnDef<T>): string;
3180
+ protected tabIndex(row: MtRowNode<T>, column: ColumnGeometry<T>): number;
3181
+ protected ariaSort(id: string): 'ascending' | 'descending' | 'none';
3182
+ protected onScroll(event: Event): void;
3183
+ /**
3184
+ * Replaces the column filters. Columns without a filter, unknown ids and inactive models
3185
+ * are dropped; one `filterChanged` lists the columns whose model changed, in current
3186
+ * then new order, and nothing is emitted when none did (filter-basics observations
3187
+ * two-columns-and-clear, unknown column).
3188
+ */
3189
+ private setFilterModel;
3190
+ private setColumnFilter;
3191
+ /** Sets the quick filter text; a change emits `filterChanged` (source `quickFilter`). */
3192
+ private setQuickFilter;
3193
+ /**
3194
+ * Applies a filter change and emits `filterChanged`. The focused cell keeps its row
3195
+ * index like the reference (filter-with-sort-and-focus): the cell at that index is
3196
+ * focused afterwards, without a `cellFocused` event.
3197
+ */
3198
+ private commitFilters;
3199
+ /** Opens the filter popup of a displayed column (API `showColumnFilter`). */
3200
+ private showColumnFilter;
3201
+ private setSortModel;
3202
+ private emitSortModel;
3203
+ protected toggleSort(column: ColumnGeometry<T>, event: MouseEvent): void;
3204
+ protected onCellFocus(index: number, row: MtRowNode<T>, column: ColumnGeometry<T>): void;
3205
+ private ensureIndexVisible;
3206
+ /**
3207
+ * `domFocus: false` moves the grid's focus without taking DOM focus (a menu is about to).
3208
+ * `immediate` (keyboard navigation) focuses a rendered target synchronously, like the
3209
+ * reference: a key pressed right after an arrow must land on the new cell. A target that
3210
+ * has to render first (a far PageDown) still waits for the render pass below.
3211
+ */
3212
+ private setFocusedCell;
3213
+ /** Pinned columns are always in view; centre columns scroll within the centre region. */
3214
+ private ensureColumnVisible;
3215
+ protected isSelected(rowId: string): boolean;
3216
+ protected selectable(row: MtRowNode<T>): boolean;
3217
+ private groupSelectionLeaves;
3218
+ protected rowCheckboxState(row: MtRowNode<T>): 'checked' | 'indeterminate' | 'unchecked';
3219
+ protected checkboxLabel(row: MtRowNode<T>): string;
3220
+ /**
3221
+ * Applies a selection change: the rows to select (reported first, in the given order)
3222
+ * and to deselect, one `rowSelected` per changed row, then one `selectionChanged`.
3223
+ * Rows that are not selectable, unknown ids and no-op changes report nothing.
3224
+ */
3225
+ private applySelection;
3226
+ private selectionScope;
3227
+ /** Select-all over the configured scope; deselecting reports in selection order. */
3228
+ private selectAllRows;
3229
+ private setNodesSelected;
3230
+ protected onHeaderCheckbox(event: Event): void;
3231
+ protected onRowCheckbox(event: MouseEvent, row: MtRowNode<T>, rowIndex: number): void;
3232
+ /** Space toggles the focused row; Shift+Space adds the range from the anchor (multiRow). */
3233
+ private toggleBySpace;
3234
+ protected onCellClick(event: MouseEvent, rowIndex: number, row: MtRowNode<T>, column?: ColumnGeometry<T>): void;
3235
+ private readonly rowDragger;
3236
+ /** The column whose cells carry the drag handle (the first with `rowDrag`). */
3237
+ private readonly rowDragColumn;
3238
+ protected dragHandle(row: MtRowNode<T>, column: MtColumnDef<T>): boolean;
3239
+ private rowDragLabel;
3240
+ protected startRowDrag(event: PointerEvent, row: MtRowNode<T>, rowIndex: number): void;
3241
+ protected onCellPointerDown(event: PointerEvent, row: MtRowNode<T>, rowIndex: number, column: ColumnGeometry<T>): void;
3242
+ /** Managed reorder: the block takes `toIndex` in the order without it (row-drag observations). */
3243
+ private moveManagedRows;
3244
+ /** Raw value of a ranged cell (the clipboard and aggregates use values, not text). */
3245
+ private rangeValue;
3246
+ protected rangeClasses(rowIndex: number, colId: string): CellRangeClasses;
3247
+ /** Row-number cell state: the row touched by a range, or covered end to end. */
3248
+ protected rowNumberRange(rowIndex: number): 'none' | 'highlight' | 'selected';
3249
+ private toCellRange;
3250
+ private setRanges;
3251
+ /** A single-cell range on the cell (a click, an arrow move). */
3252
+ private rangeAt;
3253
+ /** Extends the active range's end (Shift+click, Shift+arrows, a drag). */
3254
+ private extendRange;
3255
+ private fullRowRange;
3256
+ /**
3257
+ * A press on a cell with cell selection: Shift extends the active range to the cell,
3258
+ * Ctrl starts a new range beside the others, otherwise a single-cell range replaces
3259
+ * them; a press on a row number ranges the whole row. The drag that may follow
3260
+ * extends the new range to the cell under the pointer (live-range observations).
3261
+ */
3262
+ private beginRange;
3263
+ /** Tab-separated text of the ranges, or of the focused cell alone (Ctrl+C observation). */
3264
+ private clipboardText;
3265
+ private clipboardHeaders;
3266
+ protected onCopy(event: ClipboardEvent): void;
3267
+ private selectedRowsText;
3268
+ private addCellRange;
3269
+ protected onKey(event: KeyboardEvent, rowIndex: number, colId: string): void;
3270
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<MtDataGridComponent<any>, never>;
3271
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<MtDataGridComponent<any>, "mt-data-grid", never, { "rowData": { "alias": "rowData"; "required": false; "isSignal": true; }; "dataProcessing": { "alias": "dataProcessing"; "required": false; "isSignal": true; }; "columnDefs": { "alias": "columnDefs"; "required": false; "isSignal": true; }; "getRowId": { "alias": "getRowId"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "autoHeight": { "alias": "autoHeight"; "required": false; "isSignal": true; }; "autoHeightMaxRows": { "alias": "autoHeightMaxRows"; "required": false; "isSignal": true; }; "autoHeightMinRows": { "alias": "autoHeightMinRows"; "required": false; "isSignal": true; }; "rowHeight": { "alias": "rowHeight"; "required": false; "isSignal": true; }; "animateRows": { "alias": "animateRows"; "required": false; "isSignal": true; }; "headerHeight": { "alias": "headerHeight"; "required": false; "isSignal": true; }; "groupHeaderHeight": { "alias": "groupHeaderHeight"; "required": false; "isSignal": true; }; "direction": { "alias": "direction"; "required": false; "isSignal": true; }; "localeText": { "alias": "localeText"; "required": false; "isSignal": true; }; "localeTextResolver": { "alias": "localeTextResolver"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "noRowsText": { "alias": "noRowsText"; "required": false; "isSignal": true; }; "loadingText": { "alias": "loadingText"; "required": false; "isSignal": true; }; "noRowsTemplate": { "alias": "noRowsTemplate"; "required": false; "isSignal": true; }; "autoSizeStrategy": { "alias": "autoSizeStrategy"; "required": false; "isSignal": true; }; "columnMenu": { "alias": "columnMenu"; "required": false; "isSignal": true; }; "mainMenuItems": { "alias": "mainMenuItems"; "required": false; "isSignal": true; }; "autoSizePadding": { "alias": "autoSizePadding"; "required": false; "isSignal": true; }; "quickFilterText": { "alias": "quickFilterText"; "required": false; "isSignal": true; }; "showQuickFilter": { "alias": "showQuickFilter"; "required": false; "isSignal": true; }; "includeHiddenColumnsInQuickFilter": { "alias": "includeHiddenColumnsInQuickFilter"; "required": false; "isSignal": true; }; "quickFilterParser": { "alias": "quickFilterParser"; "required": false; "isSignal": true; }; "quickFilterMatcher": { "alias": "quickFilterMatcher"; "required": false; "isSignal": true; }; "cacheQuickFilter": { "alias": "cacheQuickFilter"; "required": false; "isSignal": true; }; "applyQuickFilterBeforePivotOrAgg": { "alias": "applyQuickFilterBeforePivotOrAgg"; "required": false; "isSignal": true; }; "filtersToolPanelDef": { "alias": "filtersToolPanelDef"; "required": false; "isSignal": true; }; "isExternalFilterPresent": { "alias": "isExternalFilterPresent"; "required": false; "isSignal": true; }; "doesExternalFilterPass": { "alias": "doesExternalFilterPass"; "required": false; "isSignal": true; }; "floatingFiltersHeight": { "alias": "floatingFiltersHeight"; "required": false; "isSignal": true; }; "rowSelection": { "alias": "rowSelection"; "required": false; "isSignal": true; }; "selectionColumnDef": { "alias": "selectionColumnDef"; "required": false; "isSignal": true; }; "rowNumbers": { "alias": "rowNumbers"; "required": false; "isSignal": true; }; "rowDragManaged": { "alias": "rowDragManaged"; "required": false; "isSignal": true; }; "rowDragEntireRow": { "alias": "rowDragEntireRow"; "required": false; "isSignal": true; }; "rowDragMultiRow": { "alias": "rowDragMultiRow"; "required": false; "isSignal": true; }; "suppressMoveWhenRowDragging": { "alias": "suppressMoveWhenRowDragging"; "required": false; "isSignal": true; }; "cellSelection": { "alias": "cellSelection"; "required": false; "isSignal": true; }; "statusBar": { "alias": "statusBar"; "required": false; "isSignal": true; }; "suppressContextMenu": { "alias": "suppressContextMenu"; "required": false; "isSignal": true; }; "allowContextMenuWithControlKey": { "alias": "allowContextMenuWithControlKey"; "required": false; "isSignal": true; }; "preventDefaultOnContextMenu": { "alias": "preventDefaultOnContextMenu"; "required": false; "isSignal": true; }; "getContextMenuItems": { "alias": "getContextMenuItems"; "required": false; "isSignal": true; }; "suppressCsvExport": { "alias": "suppressCsvExport"; "required": false; "isSignal": true; }; "suppressExcelExport": { "alias": "suppressExcelExport"; "required": false; "isSignal": true; }; "suppressPdfExport": { "alias": "suppressPdfExport"; "required": false; "isSignal": true; }; "defaultPdfExportParams": { "alias": "defaultPdfExportParams"; "required": false; "isSignal": true; }; "excelStyles": { "alias": "excelStyles"; "required": false; "isSignal": true; }; "processCellForClipboard": { "alias": "processCellForClipboard"; "required": false; "isSignal": true; }; "processHeaderForClipboard": { "alias": "processHeaderForClipboard"; "required": false; "isSignal": true; }; "processGroupHeaderForClipboard": { "alias": "processGroupHeaderForClipboard"; "required": false; "isSignal": true; }; "copySelectedRows": { "alias": "copySelectedRows"; "required": false; "isSignal": true; }; "copyHeadersToClipboard": { "alias": "copyHeadersToClipboard"; "required": false; "isSignal": true; }; "copyGroupHeadersToClipboard": { "alias": "copyGroupHeadersToClipboard"; "required": false; "isSignal": true; }; "clipboardDelimiter": { "alias": "clipboardDelimiter"; "required": false; "isSignal": true; }; "suppressCopyRowsToClipboard": { "alias": "suppressCopyRowsToClipboard"; "required": false; "isSignal": true; }; "suppressCopySingleCellRanges": { "alias": "suppressCopySingleCellRanges"; "required": false; "isSignal": true; }; "suppressCutToClipboard": { "alias": "suppressCutToClipboard"; "required": false; "isSignal": true; }; "defaultCsvExportParams": { "alias": "defaultCsvExportParams"; "required": false; "isSignal": true; }; "defaultExcelExportParams": { "alias": "defaultExcelExportParams"; "required": false; "isSignal": true; }; "groupDisplayType": { "alias": "groupDisplayType"; "required": false; "isSignal": true; }; "groupRowRenderer": { "alias": "groupRowRenderer"; "required": false; "isSignal": true; }; "groupRowRendererParams": { "alias": "groupRowRendererParams"; "required": false; "isSignal": true; }; "suppressGroupRowsSticky": { "alias": "suppressGroupRowsSticky"; "required": false; "isSignal": true; }; "groupHideOpenParents": { "alias": "groupHideOpenParents"; "required": false; "isSignal": true; }; "groupHideParentOfSingleChild": { "alias": "groupHideParentOfSingleChild"; "required": false; "isSignal": true; }; "groupRemoveSingleChildren": { "alias": "groupRemoveSingleChildren"; "required": false; "isSignal": true; }; "groupRemoveLowestSingleChildren": { "alias": "groupRemoveLowestSingleChildren"; "required": false; "isSignal": true; }; "showOpenedGroup": { "alias": "showOpenedGroup"; "required": false; "isSignal": true; }; "groupAggFiltering": { "alias": "groupAggFiltering"; "required": false; "isSignal": true; }; "suppressAggFilteredOnly": { "alias": "suppressAggFilteredOnly"; "required": false; "isSignal": true; }; "aggregateOnlyChangedColumns": { "alias": "aggregateOnlyChangedColumns"; "required": false; "isSignal": true; }; "suppressColumnMoveAnimation": { "alias": "suppressColumnMoveAnimation"; "required": false; "isSignal": true; }; "pivotRowTotals": { "alias": "pivotRowTotals"; "required": false; "isSignal": true; }; "pivotColumnGroupTotals": { "alias": "pivotColumnGroupTotals"; "required": false; "isSignal": true; }; "pivotMaxGeneratedColumns": { "alias": "pivotMaxGeneratedColumns"; "required": false; "isSignal": true; }; "pivotDefaultExpanded": { "alias": "pivotDefaultExpanded"; "required": false; "isSignal": true; }; "pivotSuppressAutoColumn": { "alias": "pivotSuppressAutoColumn"; "required": false; "isSignal": true; }; "suppressExpandablePivotGroups": { "alias": "suppressExpandablePivotGroups"; "required": false; "isSignal": true; }; "processPivotResultColDef": { "alias": "processPivotResultColDef"; "required": false; "isSignal": true; }; "processPivotResultColGroupDef": { "alias": "processPivotResultColGroupDef"; "required": false; "isSignal": true; }; "processUnpinnedColumns": { "alias": "processUnpinnedColumns"; "required": false; "isSignal": true; }; "rowGroupPanelShow": { "alias": "rowGroupPanelShow"; "required": false; "isSignal": true; }; "pivotPanelShow": { "alias": "pivotPanelShow"; "required": false; "isSignal": true; }; "pivotPanelHint": { "alias": "pivotPanelHint"; "required": false; "isSignal": true; }; "groupDefaultExpanded": { "alias": "groupDefaultExpanded"; "required": false; "isSignal": true; }; "autoGroupColumnDef": { "alias": "autoGroupColumnDef"; "required": false; "isSignal": true; }; "groupTotalRow": { "alias": "groupTotalRow"; "required": false; "isSignal": true; }; "grandTotalRow": { "alias": "grandTotalRow"; "required": false; "isSignal": true; }; "aggFuncs": { "alias": "aggFuncs"; "required": false; "isSignal": true; }; "suppressRowGroupHidesColumns": { "alias": "suppressRowGroupHidesColumns"; "required": false; "isSignal": true; }; "suppressMakeColumnVisibleAfterUnGroup": { "alias": "suppressMakeColumnVisibleAfterUnGroup"; "required": false; "isSignal": true; }; "sideBar": { "alias": "sideBar"; "required": false; "isSignal": true; }; "pivotMode": { "alias": "pivotMode"; "required": false; "isSignal": true; }; "suppressAggFuncInHeader": { "alias": "suppressAggFuncInHeader"; "required": false; "isSignal": true; }; "enableCharts": { "alias": "enableCharts"; "required": false; "isSignal": true; }; "chartThemes": { "alias": "chartThemes"; "required": false; "isSignal": true; }; "customChartThemes": { "alias": "customChartThemes"; "required": false; "isSignal": true; }; "chartToolPanelsDef": { "alias": "chartToolPanelsDef"; "required": false; "isSignal": true; }; "chartThemeOverrides": { "alias": "chartThemeOverrides"; "required": false; "isSignal": true; }; "chartContext": { "alias": "chartContext"; "required": false; "isSignal": true; }; "chartRecordsLabel": { "alias": "chartRecordsLabel"; "required": false; "isSignal": true; }; "getChartToolbarItems": { "alias": "getChartToolbarItems"; "required": false; "isSignal": true; }; "groupMaintainOrder": { "alias": "groupMaintainOrder"; "required": false; "isSignal": true; }; "treeData": { "alias": "treeData"; "required": false; "isSignal": true; }; "getDataPath": { "alias": "getDataPath"; "required": false; "isSignal": true; }; "masterDetail": { "alias": "masterDetail"; "required": false; "isSignal": true; }; "isRowMaster": { "alias": "isRowMaster"; "required": false; "isSignal": true; }; "detailCellRenderer": { "alias": "detailCellRenderer"; "required": false; "isSignal": true; }; "detailCellRendererParams": { "alias": "detailCellRendererParams"; "required": false; "isSignal": true; }; "detailRowHeight": { "alias": "detailRowHeight"; "required": false; "isSignal": true; }; "detailRowAutoHeight": { "alias": "detailRowAutoHeight"; "required": false; "isSignal": true; }; "singleClickEdit": { "alias": "singleClickEdit"; "required": false; "isSignal": true; }; "suppressClickEdit": { "alias": "suppressClickEdit"; "required": false; "isSignal": true; }; "stopEditingWhenCellsLoseFocus": { "alias": "stopEditingWhenCellsLoseFocus"; "required": false; "isSignal": true; }; "undoRedoCellEditing": { "alias": "undoRedoCellEditing"; "required": false; "isSignal": true; }; "undoRedoCellEditingLimit": { "alias": "undoRedoCellEditingLimit"; "required": false; "isSignal": true; }; "pagination": { "alias": "pagination"; "required": false; "isSignal": true; }; "paginationPanelShow": { "alias": "paginationPanelShow"; "required": false; "isSignal": true; }; "paginationPageSize": { "alias": "paginationPageSize"; "required": false; "isSignal": true; }; "paginationTotalRows": { "alias": "paginationTotalRows"; "required": false; "isSignal": true; }; "paginationCurrentPage": { "alias": "paginationCurrentPage"; "required": false; "isSignal": true; }; "paginationPageSizeSelector": { "alias": "paginationPageSizeSelector"; "required": false; "isSignal": true; }; "rowGroupPanelSuppressSort": { "alias": "rowGroupPanelSuppressSort"; "required": false; "isSignal": true; }; }, { "displayedColumnsChanged": "displayedColumnsChanged"; "columnEverythingChanged": "columnEverythingChanged"; "pivotMaxColumnsExceeded": "pivotMaxColumnsExceeded"; "gridReady": "gridReady"; "sortChanged": "sortChanged"; "cellFocused": "cellFocused"; "columnResized": "columnResized"; "columnMoved": "columnMoved"; "columnPinned": "columnPinned"; "columnVisible": "columnVisible"; "columnGroupOpened": "columnGroupOpened"; "filterChanged": "filterChanged"; "filterModified": "filterModified"; "filterOpened": "filterOpened"; "rowSelected": "rowSelected"; "selectionChanged": "selectionChanged"; "rowClicked": "rowClicked"; "rowDragEnter": "rowDragEnter"; "rowDragMove": "rowDragMove"; "rowDragLeave": "rowDragLeave"; "rowDragEnd": "rowDragEnd"; "cellSelectionChanged": "cellSelectionChanged"; "contextMenuVisibleChanged": "contextMenuVisibleChanged"; "rowGroupOpened": "rowGroupOpened"; "columnRowGroupChanged": "columnRowGroupChanged"; "expandOrCollapseAll": "expandOrCollapseAll"; "cellEditingStarted": "cellEditingStarted"; "cellEditingStopped": "cellEditingStopped"; "cellValueChanged": "cellValueChanged"; "pasteStart": "pasteStart"; "pasteEnd": "pasteEnd"; "fillStart": "fillStart"; "fillEnd": "fillEnd"; "paginationChanged": "paginationChanged"; "toolPanelVisibleChanged": "toolPanelVisibleChanged"; "toolPanelSizeChanged": "toolPanelSizeChanged"; "columnValueChanged": "columnValueChanged"; "columnPivotChanged": "columnPivotChanged"; "columnPivotModeChanged": "columnPivotModeChanged"; "chartCreated": "chartCreated"; "chartDestroyed": "chartDestroyed"; "chartRangeSelectionChanged": "chartRangeSelectionChanged"; "chartOptionsChanged": "chartOptionsChanged"; }, never, never, true, never>;
3272
+ }
3273
+
3274
+ interface MtGridEmptyOverlayParams {
3275
+ readonly message: string;
3276
+ readonly filtered: boolean;
3277
+ readonly clearFilters: () => void;
3278
+ }
3279
+ /** Optional host artwork; the independent engine has no design-system dependency. */
3280
+ declare const MT_GRID_EMPTY_OVERLAY: InjectionToken<Type<{
3281
+ readonly params: unknown;
3282
+ }>>;
3283
+
3284
+ /** Configuration only. Row data, row selection and expanded workspaces are intentionally excluded. */
3285
+ interface MtGridViewState {
3286
+ readonly version: 1;
3287
+ readonly columns: readonly MtColumnState[];
3288
+ readonly sort: readonly MtSortModel[];
3289
+ readonly filters: MtFilterModel;
3290
+ readonly rowGroups: readonly string[];
3291
+ readonly values: readonly {
3292
+ readonly colId: string;
3293
+ readonly aggFunc: string;
3294
+ }[];
3295
+ readonly pivot: {
3296
+ readonly enabled: boolean;
3297
+ readonly columns: readonly string[];
3298
+ };
3299
+ }
3300
+ /** Untrusted storage is parsed at the boundary. Unknown members never survive into the saved document. */
3301
+ declare function parseGridViewState(value: unknown): MtGridViewState | null;
3302
+ declare function captureGridViewState<T>(api: MtGridApi<T>): MtGridViewState;
3303
+ /** Removed/unauthorised fields are discarded before any state is applied. */
3304
+ declare function applyGridViewState<T>(api: MtGridApi<T>, state: MtGridViewState): void;
3305
+
3306
+ /** The editor a column uses: its `cellEditor`, else by the value's type (text by default). */
3307
+ declare function editorKindFor<T>(column: MtColumnDef<T>, value: unknown): MtCellEditorKind;
3308
+ /**
3309
+ * The committed value of an editor: a number editor yields a number (an empty field null,
3310
+ * other text is left as typed so a `valueParser` can decide), a checkbox a boolean, the
3311
+ * rest the text.
3312
+ */
3313
+ declare function parseEditedValue(kind: MtCellEditorKind, raw: unknown): unknown;
3314
+ /**
3315
+ * Splits pasted text into rows and cells: lines by `\n` (a trailing `\r` dropped), cells by
3316
+ * tabs; one trailing empty line (the clipboard's final newline) is ignored.
3317
+ */
3318
+ declare function parseClipboardText(text: string): string[][];
3319
+ /**
3320
+ * The values a fill drag writes into `count` cells after `source`: a numeric source of two
3321
+ * or more values continues its linear sequence (the average step), a single number
3322
+ * repeats, anything else repeats the source pattern.
3323
+ */
3324
+ declare function fillValues(source: readonly unknown[], count: number): unknown[];
3325
+
3326
+ interface ChartMenuGroup {
3327
+ readonly id: string;
3328
+ readonly label: string;
3329
+ readonly items: readonly {
3330
+ readonly type: MtChartType;
3331
+ readonly label: string;
3332
+ }[];
3333
+ }
3334
+ declare const CHART_MENU_GROUPS: readonly ChartMenuGroup[];
3335
+ declare const CHART_TYPES: readonly MtChartType[];
3336
+ declare function chartTypeLabel(type: MtChartType): string;
3337
+
3338
+ /**
3339
+ * Stable identity to palette colour mapping. Identities are sorted, hashed into a
3340
+ * palette slot and probed to the next free slot, so filtering, sorting, locale or
3341
+ * chart-type changes never reassign a category's colour; only a hash collision
3342
+ * within one chart moves a category to its neighbouring slot.
3343
+ */
3344
+ declare function stableCategoryColors(ids: readonly string[], fills?: readonly string[]): ReadonlyMap<string, string>;
3345
+ /** Runtime colours resolved by the host token bridge, before explicit theme overrides. */
3346
+ interface HostChartColors {
3347
+ background: string;
3348
+ foreground: string;
3349
+ secondary: string;
3350
+ border: string;
3351
+ gridline?: string;
3352
+ tooltipBackground: string;
3353
+ tooltipColor: string;
3354
+ }
3355
+
3356
+ interface MtClientQuery {
3357
+ readonly filters?: MtFilterModel;
3358
+ readonly sort?: readonly MtSortModel[];
3359
+ readonly search?: string;
3360
+ readonly quickFilterColumns?: readonly string[];
3361
+ }
3362
+ /** Apply the grid's own semantics to a verified complete client dataset (for analysis/export scopes). */
3363
+ declare function queryClientRows<T>(rows: readonly T[], columns: readonly MtColumnDef<T>[], query: MtClientQuery, getRowId: (row: T) => string): readonly T[];
3364
+
3365
+ type MtExcelCellValue = string | number | boolean | Date | null;
3366
+ interface MtExcelWorkbookSheet {
3367
+ readonly name: string;
3368
+ readonly headers: readonly string[];
3369
+ readonly rows: readonly (readonly MtExcelCellValue[])[];
3370
+ }
3371
+ /** Serialize already-authorized query results; data acquisition stays with the consuming application. */
3372
+ declare function createExcelWorkbook(sheets: readonly MtExcelWorkbookSheet[], rtl?: boolean): Promise<Blob>;
3373
+
3374
+ interface ChartViewSettings {
3375
+ readonly customThemes?: Readonly<Record<string, MtChartTheme>>;
3376
+ readonly themeNames?: readonly string[];
3377
+ readonly panels?: MtChartToolPanelsDef;
3378
+ readonly colors: HostChartColors;
3379
+ readonly text: MtGridLocalizer['text'];
3380
+ }
3381
+
3382
+ /** Provide at a page/schema boundary to retain unlinked charts across source-grid destruction. */
3383
+ declare class MtGridChartScope {
3384
+ private readonly dialogs;
3385
+ private sequence;
3386
+ /** Optional surviving grid/theme anchor, owned by the page rather than a module tab. */
3387
+ themeSource?: HTMLElement;
3388
+ /**
3389
+ * Optional page-level host for linked chart popups: they are appended to it and
3390
+ * sized by it instead of by the source grid, so a chart from a small nested grid
3391
+ * still gets the whole page. It must be positioned (`position: relative`).
3392
+ */
3393
+ chartHost?: HTMLElement;
3394
+ constructor();
3395
+ /** Close every chart when the owning data/security scope changes. */
3396
+ clear(): void;
3397
+ /** @internal */
3398
+ nextChartId(): string;
3399
+ /** @internal */
3400
+ add(dialog: ChartDialogHandle): void;
3401
+ /** @internal */
3402
+ remove(dialog: ChartDialogHandle): void;
3403
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<MtGridChartScope, never>;
3404
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<MtGridChartScope>;
3405
+ }
3406
+ /** A movable chart's ownership; never retain a dead grid's component or subscriptions. */
3407
+ declare class ChartDialogHandle {
3408
+ readonly component: ComponentRef<ChartDialog>;
3409
+ private readonly app;
3410
+ private readonly scope;
3411
+ readonly api: MtChartRef;
3412
+ readonly subscriptions: OutputRefSubscription[];
3413
+ destroy: () => void;
3414
+ private disposed;
3415
+ constructor(chartId: string, component: ComponentRef<ChartDialog>, app: ApplicationRef, scope: MtGridChartScope | null);
3416
+ retain(rawData: DerivedChartData, initial: MtCreateRangeChartParams, ranges: readonly MtChartCellRange[], settings: ChartViewSettings): void;
3417
+ dispose(): void;
3418
+ private unsubscribeSource;
3419
+ }
3420
+
3421
+ export { AUTO_GROUP_COLUMN_ID, CHART_MENU_GROUPS, CHART_MISSING_CATEGORY_ID, CHART_RECORD_COUNT_ID, CHART_TYPES, DETAIL_ROW_ID_PREFIX, MT_GRID_COLUMNS_TOOL_PANEL_DEFAULTS, MT_GRID_EMPTY_OVERLAY, MT_GRID_ICONS, MtDataGridComponent, MtGridChartScope, ROW_NUMBERS_COLUMN_ID, SELECTION_COLUMN_ID, applyGridViewState, buildRowLayout, captureGridViewState, chartDistinctMeasureId, chartMeasure, chartNonEmptyMeasureId, chartTypeLabel, createExcelWorkbook, editorKindFor, fillValues, parseClipboardText, parseEditedValue, parseGridViewState, queryClientRows, rowWindowFor, sparklineGeometry, sparklineValues, stableCategoryColors };
3422
+ export type { GridIconName, MtAddCellRangeParams, MtAggFunc, MtAggFuncName, MtAggFuncParams, MtApplyColumnStateParams, MtAutoGroupColumnDef, MtAvgResult, MtBuiltInCellRenderer, MtCellClass, MtCellClassParams, MtCellClassRules, MtCellEditingStartedEvent, MtCellEditingStoppedEvent, MtCellEditorKind, MtCellEditorParams, MtCellFocusedEvent, MtCellRange, MtCellRenderer, MtCellRendererComponent, MtCellRendererFn, MtCellRendererParams, MtCellSelectionChangedEvent, MtCellSelectionOptions, MtCellStyle, MtCellValueChangedEvent, MtCellValueChangedSource, MtChartCategoryDef, MtChartCategoryParams, MtChartCategoryValue, MtChartCellRange, MtChartCreatedEvent, MtChartDataType, MtChartDestroyedEvent, MtChartImageParams, MtChartMeasureKind, MtChartModel, MtChartOptionsChangedEvent, MtChartRangeSelectionChangedEvent, MtChartRef, MtChartTheme, MtChartThemeOverrides, MtChartToolPanel, MtChartToolPanelsDef, MtChartToolbarItem, MtChartType, MtClientQuery, MtClipboardCellParams, MtClipboardGroupHeaderParams, MtClipboardHeaderParams, MtColDef, MtColumnDef, MtColumnEventSource, MtColumnFilter, MtColumnFilterModel, MtColumnGroupDef, MtColumnGroupOpenedEvent, MtColumnGroupRef, MtColumnGroupShow, MtColumnGroupState, MtColumnMovedEvent, MtColumnPinned, MtColumnPinnedEvent, MtColumnPivotChangedEvent, MtColumnPivotModeChangedEvent, MtColumnResizedEvent, MtColumnRowGroupChangedEvent, MtColumnState, MtColumnStateUpdate, MtColumnType, MtColumnValueChangedEvent, MtColumnVisibleEvent, MtColumnWidth, MtColumnsToolPanelInstance, MtColumnsToolPanelParams, MtCombinedFilterModel, MtContextMenuItem, MtContextMenuVisibleChangedEvent, MtCopyParams, MtCreatePivotChartParams, MtCreateRangeChartParams, MtCsvExportParams, MtDateFilterModel, MtDefaultMainMenuItem, MtDefaultMenuItem, MtDetailCellRendererParams, MtDetailGridOptions, MtDisplayedColumnsChangedEvent, MtEditingCell, MtExcelCellValue, MtExcelExportParams, MtExcelStyle, MtExcelWorkbookSheet, MtExpandOrCollapseAllEvent, MtExportCell, MtExportCellParams, MtExportContent, MtExportParams, MtExportRow, MtFillEvent, MtFilterChangedEvent, MtFilterChangedSource, MtFilterModel, MtFilterModifiedEvent, MtFilterOpenedEvent, MtFilterOption, MtFilterParams, MtFiltersToolPanelDef, MtFiltersToolPanelInstance, MtGetContextMenuItemsParams, MtGetDetailRowDataParams, MtGetMainMenuItemsParams, MtGridApi, MtGridEmptyOverlayParams, MtGridLocaleParams, MtGridLocaleText, MtGridLocaleTextResolver, MtGridReadyEvent, MtGridViewState, MtGroupDisplayType, MtHeaderRendererComponent, MtHeaderRendererParams, MtMainMenuItem, MtMenuActionParams, MtMenuItemDef, MtMultiFilterDef, MtMultiFilterModel, MtNumberFilterModel, MtPaginationChangedEvent, MtPasteEvent, MtPdfExportParams, MtPivotMaxColumnsExceededEvent, MtRangeChartUpdateParams, MtRowClickedEvent, MtRowDragEvent, MtRowGroupOpenedEvent, MtRowGroupPanelShow, MtRowNode, MtRowNumbersOptions, MtRowSelectedEvent, MtRowSelectionMode, MtRowSelectionOptions, MtScalarFilterType, MtSelectAllMode, MtSelectionChangedEvent, MtSelectionColumnDef, MtSelectionSource, MtSeriesChartType, MtSetFilterOption, MtSetFilterRemoteSearch, MtSetFilterSearchResult, MtSetFilterSubscribable, MtSetNodesSelectedParams, MtShowContextMenuParams, MtSideBar, MtSideBarDef, MtSimpleFilterModel, MtSortModel, MtSparklineOptions, MtSparklineType, MtStartEditingCellParams, MtStatusBarOptions, MtStatusBarPanel, MtTextFilterModel, MtTextFilterType, MtToolPanelDef, MtToolPanelKind, MtToolPanelSizeChangedEvent, MtToolPanelVisibleChangedEvent, MtToolPanelVisibleSource, MtValueParams, MtValueParserParams, MtValueSetterParams, RowLayout, SparklineBar, SparklineGeometry, SparklinePoint };