@thkl/agrid 0.1.11 → 0.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { Signal, WritableSignal, DestroyRef } from '@angular/core';
2
+ import { Signal, WritableSignal, Type, DestroyRef, OnChanges, InjectionToken } from '@angular/core';
3
3
  import * as _thkl_agrid from '@thkl/agrid';
4
4
 
5
5
  /** Guarded access to browser-only APIs used by the grid. @internal */
@@ -34,6 +34,9 @@ declare class AgridBrowserAdapter {
34
34
  writeClipboard(text: string): Promise<boolean>;
35
35
  /** Downloads text through a temporary object URL and anchor element. */
36
36
  downloadText(filename: string, text: string, mimeType: string): boolean;
37
+ /** Downloads raw bytes (e.g. a generated `.xlsx`) through a temporary object URL. */
38
+ downloadBytes(filename: string, bytes: Uint8Array, mimeType: string): boolean;
39
+ private downloadBlob;
37
40
  }
38
41
 
39
42
  /**
@@ -80,6 +83,15 @@ interface ColumnFilter {
80
83
  /** Upper-bound operand used only when {@link operator} is `'between'`. */
81
84
  operand2?: string | null;
82
85
  }
86
+ /** Transient row indication state produced by {@link AgridControl.indicate}. */
87
+ interface AgridRowIndication {
88
+ /** CSS color shown while the row flash is active. */
89
+ color: string;
90
+ /** Fade duration in milliseconds. */
91
+ durationMs: number;
92
+ /** `true` while the row flash is present. */
93
+ active: boolean;
94
+ }
83
95
  /** Serializable snapshot of the grid's UI state. Used with `toJSON` / `fromJSON`. */
84
96
  interface AgridControlState {
85
97
  /** Per-field column width overrides in pixels. */
@@ -115,6 +127,15 @@ interface AgridControlState {
115
127
  /** Per-field aggregate function set via the column menu. Only built-in string values are serializable. */
116
128
  aggregates?: Record<string, 'sum' | 'avg' | 'min' | 'max' | 'count'>;
117
129
  }
130
+ /** Detached, JSON-safe filter/search/sort state for {@link AgridControl}. */
131
+ interface AgridFilterModel {
132
+ /** Per-field column filter and sort state. */
133
+ filters: Record<string, ColumnFilter>;
134
+ /** Global quick-filter text. Empty or omitted means inactive. */
135
+ quickFilter?: string;
136
+ /** Ordered sorted fields, from highest to lowest priority. */
137
+ sortOrder?: string[];
138
+ }
118
139
  /**
119
140
  * Signal-based container for mutable grid UI state such as column widths and active filters.
120
141
  *
@@ -150,12 +171,40 @@ declare class AgridControl {
150
171
  private readonly _loading;
151
172
  private readonly _readonly;
152
173
  private readonly _autoAddRows;
174
+ private readonly _filterReapplyRevision;
175
+ private readonly _filterReapplyNeeded;
176
+ private readonly _rowIndications;
177
+ private readonly _changedCells;
178
+ private readonly rowIndicationTimers;
153
179
  /** @param state Optional initial state, e.g. deserialized from storage. */
154
180
  constructor(state?: Partial<AgridControlState>);
155
181
  /** Whether the grid displays its loading overlay. This transient state is not serialized. */
156
182
  readonly loading: Signal<boolean>;
157
183
  /** Show or hide the grid loading overlay. */
158
184
  setLoading(value: boolean): void;
185
+ /** Transient row flash indicators keyed by original datasource row index. */
186
+ readonly rowIndications: Signal<ReadonlyMap<number, AgridRowIndication>>;
187
+ /**
188
+ * Flash one datasource row with `color`, then fade back over `durationMs`.
189
+ * This is transient UI state and is not serialized.
190
+ */
191
+ indicate(rowIndex: number, color: string, durationMs?: number): void;
192
+ private clearRowIndicationTimers;
193
+ /** Changed-cell markers keyed by original datasource row index and field. */
194
+ readonly changedCells: Signal<ReadonlySet<string>>;
195
+ /** Mark one cell as changed. Used by the grid when `showChangedCellIndicator` is enabled. */
196
+ markChangedCell(rowIndex: number, field: string): void;
197
+ /**
198
+ * Clears changed-cell markers after persistence succeeds.
199
+ * Omit `rowIndex` to clear every marker; omit `fields` to clear the whole row.
200
+ */
201
+ clearChangedCells(rowIndex?: number, fields?: readonly string[]): void;
202
+ /** Returns whether one cell is currently marked as changed. */
203
+ isCellChanged(rowIndex: number, field: string): boolean;
204
+ /** Reconciles changed-cell markers after a datasource row is removed. */
205
+ reconcileChangedCellsAfterRemoval(removedIndex: number): void;
206
+ private changedCellKey;
207
+ private parseChangedCellKey;
159
208
  /** Whether all grid editing and mutation UI is disabled. This transient state is not serialized. */
160
209
  readonly readonly: Signal<boolean>;
161
210
  /** Enable or disable readonly mode at runtime. */
@@ -164,6 +213,20 @@ declare class AgridControl {
164
213
  readonly autoAddRows: Signal<boolean>;
165
214
  /** Enable or disable automatic row insertion at runtime. */
166
215
  setAutoAddRows(value: boolean): void;
216
+ /**
217
+ * Reapply active filters to rows that were inserted while filters were already active.
218
+ * By default, newly inserted rows stay visible until this method is called.
219
+ */
220
+ reapplyFilters(): void;
221
+ /**
222
+ * `true` when inserted rows are currently bypassing active filters or sorts.
223
+ * Bind this to visual feedback for a "Reapply filters" action.
224
+ */
225
+ readonly filterReapplyNeeded: Signal<boolean>;
226
+ /** @internal Updates {@link filterReapplyNeeded} from the rendered grid projection. */
227
+ ɵsetFilterReapplyNeeded(value: boolean): void;
228
+ /** @internal Emits whenever {@link reapplyFilters} is called. */
229
+ readonly ɵfilterReapplyRevision: Signal<number>;
167
230
  /**
168
231
  * When `true`, the control column shows a drag handle and rows can be
169
232
  * reordered by dragging. Requires `showControlColumn` to be enabled on the grid.
@@ -322,6 +385,15 @@ declare class AgridControl {
322
385
  * Returns a default (inactive) filter when no state is stored for the field.
323
386
  */
324
387
  getFilter(field: string): ColumnFilter;
388
+ /** Replace the complete filter/sort state for one field. */
389
+ setFilter(field: string, filter: ColumnFilter): void;
390
+ /** Return a detached JSON-safe snapshot of active column filters, quick filter, and sort order. */
391
+ getFilterModel(): AgridFilterModel;
392
+ /**
393
+ * Replace active column filters, quick filter, and sort order from a filter model.
394
+ * Pass `null` to clear all filters and sorts.
395
+ */
396
+ setFilterModel(model: AgridFilterModel | null): void;
325
397
  /**
326
398
  * Set the free-text filter for a column.
327
399
  * An empty string removes the text filter for that column.
@@ -378,6 +450,7 @@ declare class AgridControl {
378
450
  toJSON(): AgridControlState;
379
451
  /** Restore an `AgridControl` from a previously serialized state. */
380
452
  static fromJSON(state: Partial<AgridControlState>): AgridControl;
453
+ private cloneFilters;
381
454
  }
382
455
 
383
456
  /**
@@ -401,6 +474,7 @@ declare class AgridDataSource<T extends object = any> {
401
474
  private readonly _rows;
402
475
  private _writableLinkedRows;
403
476
  private readonly _rowAdded;
477
+ private readonly _unfilteredAddedRows;
404
478
  private _changeSequence;
405
479
  /**
406
480
  * @param initialData Rows to seed the data source with.
@@ -417,6 +491,12 @@ declare class AgridDataSource<T extends object = any> {
417
491
  index: number;
418
492
  sequence: number;
419
493
  } | null>;
494
+ /**
495
+ * Rows inserted since filters were last explicitly reapplied.
496
+ * Attached grids include these rows even when they do not match active filters.
497
+ * @internal
498
+ */
499
+ readonly ɵunfilteredAddedRows: Signal<ReadonlySet<number>>;
420
500
  /**
421
501
  * Link an external row signal to this data source.
422
502
  *
@@ -469,6 +549,8 @@ declare class AgridDataSource<T extends object = any> {
469
549
  private updateRows;
470
550
  /** Replace the backing row array without copying. Intended for specialized datasource models. */
471
551
  protected setRows(rows: T[]): void;
552
+ /** @internal Clears the transient filter bypass applied to newly inserted rows. */
553
+ ɵreapplyFiltersToAddedRows(): void;
472
554
  }
473
555
 
474
556
  /** Sort entry sent to a server-side row datasource. */
@@ -503,6 +585,11 @@ interface AgridServerSideRowModelConfig<T extends object> {
503
585
  /** Known initial total. Omit when the server determines it from the first request. */
504
586
  initialRowCount?: number;
505
587
  }
588
+ /** Refresh behavior for server-side block cache invalidation. */
589
+ interface AgridServerSideRefreshOptions {
590
+ /** When `true`, clear all cached rows and replace them with placeholders. @default true */
591
+ purge?: boolean;
592
+ }
506
593
  /**
507
594
  * Sparse datasource that lazy-loads row blocks while retaining global datasource indices.
508
595
  * Attach it to an `AgridProvider` through `serverSideRowModel`.
@@ -514,6 +601,7 @@ declare class AgridServerSideRowModel<T extends object = any> extends AgridDataS
514
601
  private slots;
515
602
  private readonly loadedBlocks;
516
603
  private readonly loadingBlocks;
604
+ private readonly failedBlocks;
517
605
  private query;
518
606
  private queryKey;
519
607
  private generation;
@@ -531,8 +619,14 @@ declare class AgridServerSideRowModel<T extends object = any> extends AgridDataS
531
619
  constructor(config: AgridServerSideRowModelConfig<T>);
532
620
  /** Update server query state. A changed query invalidates cached blocks and starts at row zero. */
533
621
  setQuery(control: AgridControl | null, sortFields: readonly string[]): boolean;
534
- /** Invalidate all cached blocks while preserving a known total row count. */
535
- refresh(): void;
622
+ /** Invalidate cached blocks while preserving the current query and known total row count. */
623
+ refresh(options?: AgridServerSideRefreshOptions): void;
624
+ /** Clear the block cache and show placeholders until requested blocks are reloaded. */
625
+ purgeCache(): void;
626
+ /** Retry the most recently failed block, or a specific block index when supplied. */
627
+ retryFailedBlock(block?: number): void;
628
+ /** Failed block indices that can be passed to {@link retryFailedBlock}. */
629
+ failedBlockIndices(): number[];
536
630
  /** Ensure every block intersecting the requested half-open range is loaded. */
537
631
  ensureRange(startRow: number, endRow: number): void;
538
632
  /** Whether a logical datasource row has not been loaded yet. */
@@ -567,6 +661,7 @@ interface AgridLocaleText {
567
661
  close: string;
568
662
  columnMenu: string;
569
663
  columns: string;
664
+ collapse: string;
570
665
  detail: string;
571
666
  toggleDetail: string;
572
667
  hiddenColumn: string;
@@ -606,6 +701,7 @@ interface AgridLocaleText {
606
701
  lastPage: string;
607
702
  loading: string;
608
703
  markRow: string;
704
+ moreInformation: string;
609
705
  next: string;
610
706
  noRows: string;
611
707
  pagination: string;
@@ -622,6 +718,7 @@ interface AgridLocaleText {
622
718
  unpinRow: string;
623
719
  previous: string;
624
720
  resizeColumn: string;
721
+ expand: string;
625
722
  rows: (count: number) => string;
626
723
  quickFilterPlaceholder: string;
627
724
  searchValuesPlaceholder: string;
@@ -632,6 +729,11 @@ interface AgridLocaleText {
632
729
  ungroup: string;
633
730
  unpinColumn: string;
634
731
  save: string;
732
+ saveConfig: string;
733
+ export: string;
734
+ exportCsv: string;
735
+ exportXlsx: string;
736
+ templates: string;
635
737
  }
636
738
  /** Partial locale text supplied to {@link AgridProvider.addLocalization}. */
637
739
  type AgridLocaleTextOverrides = Partial<AgridLocaleText>;
@@ -696,8 +798,12 @@ interface AgridProviderConfig<T extends object = any> extends Partial<AGridOptio
696
798
  autoAddRows?: boolean;
697
799
  /** Show a 24 px control column with a drag handle and right-click context menu. */
698
800
  showControlColumn?: boolean;
801
+ /** Show automatic row numbers in the control column instead of the drag-handle glyph. @default false */
802
+ showRowNumbers?: boolean;
699
803
  /** Show row-marking checkboxes in a 48 px control column for clipboard inclusion. @default false */
700
804
  enableRowMarking?: boolean;
805
+ /** Allow clicking column headers to mark complete columns. @default false */
806
+ enableColumnMarking?: boolean;
701
807
  /** Show the sidebar panel. */
702
808
  showSidebar?: boolean;
703
809
  /** Automatically open the detail panel when a row is selected. */
@@ -716,6 +822,12 @@ interface AgridProviderConfig<T extends object = any> extends Partial<AGridOptio
716
822
  * instead of filtering locally. @default false
717
823
  */
718
824
  enableQuickFilter?: boolean;
825
+ /**
826
+ * Show an Excel-style formula/input bar above the grid body. It displays the selected cell's raw
827
+ * value and lets users edit it in a wider input. Useful for formula and long text cells.
828
+ * @default false
829
+ */
830
+ showFormulaBar?: boolean;
719
831
  /**
720
832
  * Optional command bar rendered above the column headers. Buttons and dropdown items emit
721
833
  * their id through the grid's single `(menuBarAction)` output.
@@ -752,6 +864,12 @@ interface AgridProviderConfig<T extends object = any> extends Partial<AGridOptio
752
864
  cellMenuItems?: (CellContextMenuItem<T> | null)[];
753
865
  /** Shade every other row slightly for easier reading. @default false */
754
866
  zebraStripes?: boolean;
867
+ /**
868
+ * Render only the scrollable columns near the horizontal viewport once the scrollable-column
869
+ * count exceeds this threshold. Lower it to virtualize sooner, or set a very large value
870
+ * (e.g. `Infinity`) to disable column virtualization entirely. @default 30
871
+ */
872
+ columnVirtualizationThreshold?: number;
755
873
  /** Show a color marker on cells changed through grid editing. @default false */
756
874
  showChangedCellIndicator?: boolean;
757
875
  /** Ask for confirmation before grid row-delete actions. @default false */
@@ -777,6 +895,14 @@ interface AgridProviderConfig<T extends object = any> extends Partial<AGridOptio
777
895
  row: T;
778
896
  index: number;
779
897
  }) => string;
898
+ /**
899
+ * Optional application-owned predicate applied after built-in client-side filters and quick
900
+ * filter. Use this for filters that live outside the column menu.
901
+ */
902
+ externalFilter?: (params: {
903
+ row: T;
904
+ index: number;
905
+ }) => boolean;
780
906
  /**
781
907
  * Designate rows to pin to the top or bottom of the grid body. Pinned rows stay visible during
782
908
  * vertical scroll and are excluded from grouping and pagination, but remain fully interactive
@@ -808,8 +934,18 @@ interface AgridProviderConfig<T extends object = any> extends Partial<AGridOptio
808
934
  detailRenderer?: (params: {
809
935
  row: T;
810
936
  }) => string;
937
+ /** Column displayed as a multiline editable field beneath the custom detail renderer. */
938
+ detailColumnField?: AgridField<T>;
939
+ /** Optional text-template buttons shown above the editable master/detail textarea. */
940
+ detailActions?: DetailAction<T>[];
811
941
  /** Fixed height in pixels of an expanded detail panel row. @default 200 */
812
942
  detailRowHeight?: number;
943
+ /** this is the id of the grid its stored in the provider the grid will read it as signal */
944
+ gridId?: string;
945
+ /** Hides the grids status bar if set to true. @default false */
946
+ hideGridStatusBar?: boolean;
947
+ /** Enable Menubuttons for csv and xsls export @default false */
948
+ enableExportButtons?: boolean;
813
949
  }
814
950
  /**
815
951
  * Bundles a grid's data source, control state, columns, and display options.
@@ -817,6 +953,15 @@ interface AgridProviderConfig<T extends object = any> extends Partial<AGridOptio
817
953
  * Create one provider per independent grid instance. A provider may be selected
818
954
  * from an array when a component renders multiple grids.
819
955
  */
956
+ /**
957
+ * Live export hooks installed by the rendered grid component so the provider can export the
958
+ * grid's current filtered/visible projection without the caller holding a component reference.
959
+ * @internal
960
+ */
961
+ interface AgridExportBridge {
962
+ csv: (filename: string) => void;
963
+ xlsx: (filename: string) => void;
964
+ }
820
965
  declare class AgridProvider<T extends object = any> {
821
966
  /** Mutable row data consumed by the grid. */
822
967
  datasource: AgridDataSource<T>;
@@ -840,6 +985,29 @@ declare class AgridProvider<T extends object = any> {
840
985
  /** Shared grid options such as locale. */
841
986
  options: AGridOptions;
842
987
  private readonly _localizations;
988
+ private exportBridge;
989
+ private readonly _visibleRows;
990
+ private readonly _serverQuery;
991
+ /**
992
+ * The grid's currently filtered and sorted rows, as published by the rendered grid component.
993
+ * Falls back to every datasource row when no grid is attached. Link a chart to this signal to
994
+ * keep it in sync with the grid's filters and sorting.
995
+ */
996
+ readonly visibleRows: Signal<readonly T[]>;
997
+ /**
998
+ * Complete server-side filter/sort/page query published by the rendered grid.
999
+ * Useful for signal-backed stores that fetch data from an API. `null` means the grid is not in
1000
+ * server-side filtering or pagination mode.
1001
+ */
1002
+ readonly serverQuery: Signal<AgridServerQuery | null>;
1003
+ /**
1004
+ * @internal Published by the rendered grid whenever its filtered/sorted projection changes.
1005
+ * Pass `null` on teardown so {@link visibleRows} falls back to the raw datasource. The grid works
1006
+ * in terms of record rows; the public {@link visibleRows} re-types them as `T`.
1007
+ */
1008
+ ɵsetVisibleRows(rows: readonly Record<string, unknown>[] | null): void;
1009
+ /** @internal Published by the rendered grid whenever the server-side query state changes. */
1010
+ ɵsetServerQuery(query: AgridServerQuery | null): void;
843
1011
  /** Read-only view of registered per-locale text overrides. Used by the grid to resolve locale text. */
844
1012
  get localizations(): ReadonlyMap<string, AgridLocaleTextOverrides>;
845
1013
  /**
@@ -861,8 +1029,12 @@ declare class AgridProvider<T extends object = any> {
861
1029
  allowAddRows: boolean;
862
1030
  /** Whether the control column is rendered. */
863
1031
  showControlColumn: boolean;
1032
+ /** Whether the control column displays automatic row numbers. */
1033
+ showRowNumbers: boolean;
864
1034
  /** Whether rows can be marked for inclusion in clipboard copies. */
865
1035
  enableRowMarking: boolean;
1036
+ /** Whether complete columns can be marked from their headers. */
1037
+ enableColumnMarking: boolean;
866
1038
  /** Whether the sidebar is available. */
867
1039
  showSidebar: boolean;
868
1040
  /** Whether selecting a row automatically opens its detail panel. */
@@ -873,6 +1045,8 @@ declare class AgridProvider<T extends object = any> {
873
1045
  filterDebounceMs: number;
874
1046
  /** Whether the global quick-filter box is shown above the grid. */
875
1047
  enableQuickFilter: boolean;
1048
+ /** Whether the formula/input bar is shown above the grid body. */
1049
+ showFormulaBar: boolean;
876
1050
  /** Commands rendered in the optional menu bar above the column headers. */
877
1051
  menuBarItems: AgridMenuBarItem<T>[];
878
1052
  /** Enabled sorting mode. */
@@ -891,6 +1065,8 @@ declare class AgridProvider<T extends object = any> {
891
1065
  cellMenuItems: (CellContextMenuItem<T> | null)[];
892
1066
  /** Whether alternating data rows receive stripe styling. */
893
1067
  zebraStripes: boolean;
1068
+ /** Scrollable-column count above which column virtualization activates. */
1069
+ columnVirtualizationThreshold: number;
894
1070
  /** Whether committed cell changes receive a visual marker. */
895
1071
  showChangedCellIndicator: boolean;
896
1072
  /** Whether grid row-delete actions require in-row confirmation. */
@@ -904,6 +1080,11 @@ declare class AgridProvider<T extends object = any> {
904
1080
  row: T;
905
1081
  index: number;
906
1082
  }) => string;
1083
+ /** Optional application-owned row predicate applied by the client-side projection. */
1084
+ externalFilter?: (params: {
1085
+ row: T;
1086
+ index: number;
1087
+ }) => boolean;
907
1088
  /** Optional callback designating rows pinned to the top or bottom of the body. */
908
1089
  pinRow?: (row: T, index: number) => 'top' | 'bottom' | undefined;
909
1090
  /** Whether master/detail expandable detail rows are enabled. */
@@ -912,8 +1093,18 @@ declare class AgridProvider<T extends object = any> {
912
1093
  detailRenderer?: (params: {
913
1094
  row: T;
914
1095
  }) => string;
1096
+ /** Column displayed as a multiline field inside expanded detail panels. */
1097
+ detailColumnField?: AgridField<T>;
1098
+ /** Text-template buttons shown above the editable master/detail textarea. */
1099
+ detailActions: DetailAction<T>[];
915
1100
  /** Fixed height in pixels of an expanded detail panel row. */
916
1101
  detailRowHeight: number;
1102
+ /** its used to save the config */
1103
+ gridId?: string;
1104
+ /** Hides the summary status bar */
1105
+ hideGridStatusBar?: boolean;
1106
+ /** Enables export Menu if true */
1107
+ enableExportButtons?: boolean;
917
1108
  /** @deprecated Use `control.loading` and `control.setLoading()` instead. */
918
1109
  readonly loading: WritableSignal<boolean>;
919
1110
  /** @deprecated Use `control.readonly` and `control.setReadonly()` instead. */
@@ -933,6 +1124,31 @@ declare class AgridProvider<T extends object = any> {
933
1124
  * signal-backed. Unknown versions and pivot fields fail early with actionable errors.
934
1125
  */
935
1126
  loadSettings(settings: AgridSettings): void;
1127
+ /**
1128
+ * Download the grid's current filtered, visible rows as a CSV file.
1129
+ *
1130
+ * Uses display values (value-list labels, formatters) and respects column visibility; group
1131
+ * header rows are excluded. Requires a rendered `<agrid>` bound to this provider — when no grid
1132
+ * is mounted (e.g. before first render) this is a no-op.
1133
+ *
1134
+ * @param filename Output filename, defaults to `'export.csv'`.
1135
+ */
1136
+ exportCsv(filename?: string): void;
1137
+ /**
1138
+ * Download the grid's current filtered, visible rows as an `.xlsx` workbook.
1139
+ *
1140
+ * Numbers and dates are written as native, sortable/summable cells; value-list columns and
1141
+ * custom formatters fall back to display text. Requires a rendered `<agrid>` bound to this
1142
+ * provider — a no-op when no grid is mounted. Generated with zero third-party dependencies.
1143
+ *
1144
+ * @param filename Output filename, defaults to `'export.xlsx'`.
1145
+ */
1146
+ exportXlsx(filename?: string): void;
1147
+ /**
1148
+ * @internal Installed by the rendered `<agrid>` so {@link exportCsv}/{@link exportXlsx} reach the
1149
+ * live projection. Pass `null` on teardown.
1150
+ */
1151
+ ɵattachExport(bridge: AgridExportBridge | null): void;
936
1152
  }
937
1153
 
938
1154
  /** String-valued property names available on a row type. */
@@ -970,6 +1186,8 @@ interface CellReadonlyParams<T extends object = any, K extends AgridField<T> = A
970
1186
  }
971
1187
  /** Parameters passed to a row-aware cell formatting resolver. */
972
1188
  type CellFormatParams<T extends object = any, K extends AgridField<T> = AgridField<T>> = CellReadonlyParams<T, K>;
1189
+ /** Parameters passed to a row-aware horizontal cell-span resolver. */
1190
+ type CellSpanParams<T extends object = any, K extends AgridField<T> = AgridField<T>> = CellReadonlyParams<T, K>;
973
1191
  /** Supported visual overrides returned by {@link ColDefBase.cellFormat}. */
974
1192
  interface CellFormat {
975
1193
  /** CSS background color, such as `'#fff4cc'` or `'var(--warning-bg)'`. */
@@ -1078,6 +1296,34 @@ interface ValueOption<TValue = unknown> {
1078
1296
  /** Human-readable label shown in the cell, dropdown, and filter menu. */
1079
1297
  label: string;
1080
1298
  }
1299
+ /**
1300
+ * Built-in editor surfaces available without registering a custom Angular component.
1301
+ *
1302
+ * - `'text'` uses the default single-line input.
1303
+ * - `'largeText'` uses a multiline textarea for longer content.
1304
+ * - `'richSelect'` uses a searchable select surface backed by `values` or `asyncValues`.
1305
+ * - `'formula'` uses a formula-friendly input. Pair it with {@link ColDefBase.formula} to
1306
+ * evaluate strings that start with `=`.
1307
+ */
1308
+ type AgridBuiltInEditor = 'text' | 'largeText' | 'richSelect' | 'formula';
1309
+ /** Parameters passed to {@link ColDefBase.asyncValues} when the rich-select editor opens. */
1310
+ interface AsyncValueOptionsParams<T extends object = any, K extends AgridField<T> = AgridField<T>> {
1311
+ /** Row currently being edited. */
1312
+ row: T;
1313
+ /** Current raw value stored in the edited cell. */
1314
+ value: T[K];
1315
+ /** Column definition for the edited cell. */
1316
+ column: ColDef<T, K>;
1317
+ /** Original datasource index for the edited row. */
1318
+ originalIndex: number;
1319
+ }
1320
+ /**
1321
+ * Sync or async value options used by the built-in rich-select editor.
1322
+ *
1323
+ * Strings are stored and displayed as-is. {@link ValueOption} entries display `label` while
1324
+ * committing `value` into the datasource.
1325
+ */
1326
+ type AgridAsyncValues<TValue = unknown> = readonly (string | ValueOption<TValue>)[] | Promise<readonly (string | ValueOption<TValue>)[]>;
1081
1327
  /** Width sentinel that makes a column fill the remaining horizontal space. */
1082
1328
  declare const ColDefAutoSize = -1;
1083
1329
  /** Label definition for a group displayed above contiguous column headers. */
@@ -1087,6 +1333,21 @@ interface HeaderGroup {
1087
1333
  /** Text displayed in the grouped header row. */
1088
1334
  label: string;
1089
1335
  }
1336
+ /** Custom command appended to a column's header menu. */
1337
+ interface AgridColumnHeaderMenuItem {
1338
+ /** Stable key emitted through `(columnHeaderAction)`. */
1339
+ key: string;
1340
+ /** Visible command label. */
1341
+ label: string;
1342
+ /** Optional compact icon or glyph shown before the label. */
1343
+ icon?: string;
1344
+ /** Disable the command without hiding it. */
1345
+ disabled?: boolean;
1346
+ /** Class a optional classes for the icon */
1347
+ iconClasses?: string[];
1348
+ /** Classes to apply on the complete button */
1349
+ itemClasses?: string[];
1350
+ }
1090
1351
  /** Defines the behavior shared by every typed column. */
1091
1352
  interface ColDefBase<T extends object, K extends AgridField<T>> {
1092
1353
  /** Data field name — must match a key in the row object. */
@@ -1095,6 +1356,8 @@ interface ColDefBase<T extends object, K extends AgridField<T>> {
1095
1356
  header: string;
1096
1357
  /** Optional header-group identifier configured through `AgridProvider.headerGroups`. */
1097
1358
  group?: string;
1359
+ /** Custom commands appended to this column's header menu. */
1360
+ headerMenuItems?: AgridColumnHeaderMenuItem[];
1098
1361
  /**
1099
1362
  * Default column width in pixels. Can be overridden at runtime via {@link AgridControl}.
1100
1363
  * Use `-1` (or omit) to make the column auto-scale and fill available space (`1fr`).
@@ -1141,6 +1404,24 @@ interface ColDefBase<T extends object, K extends AgridField<T>> {
1141
1404
  * ```
1142
1405
  */
1143
1406
  cellFormat?: (params: CellFormatParams<T, K>) => CellFormat | null | undefined;
1407
+ /**
1408
+ * Default horizontal alignment for every cell in this column.
1409
+ * A `textAlign` returned by {@link cellFormat} overrides this value for that cell.
1410
+ */
1411
+ textAlign?: 'left' | 'center' | 'right' | Signal<'left' | 'center' | 'right'>;
1412
+ /**
1413
+ * Number of adjacent visible columns occupied by this cell.
1414
+ *
1415
+ * Spans are clamped to the current left-pinned, scrollable, or right-pinned pane and never
1416
+ * cross a pane boundary. Covered cells remain part of the data model but are not rendered.
1417
+ * Return `1` (the default) to render a normal cell.
1418
+ *
1419
+ * @example
1420
+ * ```ts
1421
+ * { field: 'name', colSpan: ({ row }) => row.isSummary ? 3 : 1 }
1422
+ * ```
1423
+ */
1424
+ colSpan?: number | ((params: CellSpanParams<T, K>) => number);
1144
1425
  /**
1145
1426
  * Fixed list of allowed values shown in a `<select>` dropdown when editing.
1146
1427
  *
@@ -1149,6 +1430,24 @@ interface ColDefBase<T extends object, K extends AgridField<T>> {
1149
1430
  * displayed label (`label`). Useful when the dataset stores IDs but should show names.
1150
1431
  */
1151
1432
  values?: string[] | ValueOption<T[K]>[];
1433
+ /**
1434
+ * Built-in editor to use for this column.
1435
+ * - `'richSelect'` renders a searchable select surface and can load async values.
1436
+ * - `'largeText'` renders a multiline textarea for longer notes.
1437
+ * - `'formula'` renders a formula input. Pair with `formula: true` to evaluate formulas.
1438
+ * - `'text'` forces the default text input.
1439
+ */
1440
+ editor?: AgridBuiltInEditor;
1441
+ /**
1442
+ * Values loaded when the built-in rich-select editor opens. Use this for large or remote option
1443
+ * lists. Static `values` are used immediately; `asyncValues` can return a Promise.
1444
+ */
1445
+ asyncValues?: (params: AsyncValueOptionsParams<T, K>) => AgridAsyncValues<T[K]>;
1446
+ /**
1447
+ * Evaluate strings beginning with `=` as row-local formulas for display, filtering, and export.
1448
+ * Formulas support arithmetic, parentheses, and field-name references from the same row.
1449
+ */
1450
+ formula?: boolean;
1152
1451
  /**
1153
1452
  * Optional display formatter applied when the column has no `values` list.
1154
1453
  * Receives the raw cell value and returns the string to display in the cell.
@@ -1183,6 +1482,16 @@ interface ColDefBase<T extends object, K extends AgridField<T>> {
1183
1482
  * At least one filterable column must exist for the filter row to appear.
1184
1483
  */
1185
1484
  filterable?: boolean;
1485
+ /**
1486
+ * Custom component rendered inside this column's filter menu.
1487
+ * The component injects `AGRID_FILTER_CONTEXT` to read and update the field filter.
1488
+ */
1489
+ filterComponent?: Type<unknown>;
1490
+ /**
1491
+ * Maximum number of value-filter choices rendered at once. Search still runs against the full
1492
+ * value list, then caps the displayed matches. Defaults to `250`.
1493
+ */
1494
+ filterValueLimit?: number;
1186
1495
  /**
1187
1496
  * Set to `true` to allow grouping the grid by this column.
1188
1497
  * When set, the filter dropdown shows a "Group by" toggle for this column.
@@ -1241,10 +1550,26 @@ interface ColDefBase<T extends object, K extends AgridField<T>> {
1241
1550
  * ```
1242
1551
  */
1243
1552
  validate?: (value: T[K], row: T) => string | null | undefined;
1553
+ /**
1554
+ * Custom component rendered for the cell's display (read) state, instead of the plain text value.
1555
+ * The component injects {@link AGRID_RENDERER_CONTEXT} to read the value, row, and column. Unlike
1556
+ * {@link cellRenderer}, this supports full Angular bindings, event handlers, and child components
1557
+ * with no manual escaping.
1558
+ *
1559
+ * @example
1560
+ * ```ts
1561
+ * { field: 'status', cellRendererComponent: StatusBadgeComponent }
1562
+ * ```
1563
+ */
1564
+ cellRendererComponent?: Type<unknown>;
1244
1565
  /**
1245
1566
  * Custom cell renderer. Returns an HTML string displayed instead of the plain text value.
1246
1567
  * Angular's built-in HTML sanitization is applied automatically.
1247
1568
  *
1569
+ * @deprecated Use {@link cellRendererComponent} instead. A component renderer supports Angular
1570
+ * bindings and event handlers, and avoids the HTML-string escaping/sanitization caveats. The
1571
+ * string renderer remains supported for now but will be removed in a future release.
1572
+ *
1248
1573
  * @example
1249
1574
  * ```ts
1250
1575
  * { field: 'status', cellRenderer: ({ value }) =>
@@ -1255,6 +1580,18 @@ interface ColDefBase<T extends object, K extends AgridField<T>> {
1255
1580
  value: T[K];
1256
1581
  row: T;
1257
1582
  }) => string;
1583
+ /**
1584
+ * Custom editor component shown while the cell is in edit mode, instead of the built-in
1585
+ * text input / dropdown / checkbox. The component injects {@link AGRID_EDITOR_CONTEXT} to read
1586
+ * the current value and stage drafts; the grid keeps ownership of validation, history, and the
1587
+ * commit/cancel lifecycle, so Tab, Enter, and Escape work without extra wiring.
1588
+ *
1589
+ * @example
1590
+ * ```ts
1591
+ * { field: 'rating', cellEditor: RatingEditor }
1592
+ * ```
1593
+ */
1594
+ cellEditor?: Type<unknown>;
1258
1595
  /**
1259
1596
  * Show a right-aligned info button in this column's cells.
1260
1597
  * Pass a predicate to show it only for selected rows or values.
@@ -1285,6 +1622,21 @@ interface GroupAction {
1285
1622
  /** Called with the group's display label when the item is clicked. */
1286
1623
  action: (groupLabel: string) => void;
1287
1624
  }
1625
+ /** Parameters passed to a master/detail text-template action. */
1626
+ interface DetailActionParams<T extends object = any> {
1627
+ /** Row shown by the expanded detail panel. */
1628
+ row: T;
1629
+ /** Original datasource index of the row. */
1630
+ rowIndex: number;
1631
+ }
1632
+ /** Text-template button shown above the editable master/detail textarea. */
1633
+ interface DetailAction<T extends object = any> {
1634
+ id: string;
1635
+ /** Button text. */
1636
+ label: string;
1637
+ /** Text inserted into the detail textarea, or a row-aware resolver. */
1638
+ text?: string | ((params: DetailActionParams<T>) => string);
1639
+ }
1288
1640
  /**
1289
1641
  * Internal row item used in the virtual scroll list.
1290
1642
  * - `{ row, originalIndex }` — a real data row
@@ -1511,7 +1863,7 @@ interface ValidationFailedEvent<T extends object = any> {
1511
1863
  /** Message returned by the `validate` hook. */
1512
1864
  message: string;
1513
1865
  /** Which editing surface produced the rejected edit. */
1514
- source: 'inline' | 'sidebar';
1866
+ source: 'inline' | 'sidebar' | 'detail';
1515
1867
  }
1516
1868
  /** Emitted by `(cellEdit)` after the user commits a cell change. */
1517
1869
  type GridEditEvent<T extends object = any> = {
@@ -1541,6 +1893,32 @@ type CellInfoEvent<T extends object = any> = {
1541
1893
  column: ColDef<T, K>;
1542
1894
  };
1543
1895
  }[AgridField<T>];
1896
+ /** Current selected row returned by {@link AgridComponent.getCurrentRow}. */
1897
+ interface AgridCurrentRow<T extends object = any> {
1898
+ /** Selected datasource row. */
1899
+ row: T;
1900
+ /** Zero-based row index in the datasource. */
1901
+ originalIndex: number;
1902
+ }
1903
+ /** Current selected cell returned by {@link AgridComponent.getCurrentCell} and emitted by `(cellSelect)`. */
1904
+ type AgridCurrentCell<T extends object = any> = {
1905
+ [K in AgridField<T>]: {
1906
+ /** Selected cell position. */
1907
+ position: CellPosition;
1908
+ /** Datasource row containing the selected cell. */
1909
+ row: T;
1910
+ /** Zero-based row index in the datasource. */
1911
+ originalIndex: number;
1912
+ /** Selected column field. */
1913
+ field: K;
1914
+ /** Current raw field value. */
1915
+ value: T[K];
1916
+ /** Column definition for the selected cell. */
1917
+ column: ColDef<T, K>;
1918
+ };
1919
+ }[AgridField<T>];
1920
+ /** Emitted when the selected cell changes. `null` means the cell selection was cleared. */
1921
+ type CellSelectEvent<T extends object = any> = AgridCurrentCell<T>;
1544
1922
  /**
1545
1923
  * Emitted asynchronously after an edit changes a row and the data source has been updated.
1546
1924
  *
@@ -1573,6 +1951,45 @@ interface RowSelectEvent<T extends object = any> {
1573
1951
  originalIndex: number;
1574
1952
  }[];
1575
1953
  }
1954
+ /** Emitted when a row is marked or unmarked through the row header or marker checkbox. */
1955
+ interface RowMarkEvent<T extends object = any> {
1956
+ /** Row whose mark state changed. */
1957
+ row: T;
1958
+ /** Zero-based index of the row in the data source. */
1959
+ originalIndex: number;
1960
+ /** Current mark state after the interaction. */
1961
+ marked: boolean;
1962
+ }
1963
+ /** Emitted when a column is marked or unmarked from its header. */
1964
+ interface ColumnMarkEvent<T extends object = any> {
1965
+ column: ColDef<T>;
1966
+ field: AgridField<T>;
1967
+ marked: boolean;
1968
+ }
1969
+ /** Emitted when a custom column-header menu command is selected. */
1970
+ interface ColumnHeaderActionEvent<T extends object = any> {
1971
+ column: ColDef<T>;
1972
+ key: string;
1973
+ }
1974
+ /** Emitted once after the grid first renders with rows from its active datasource. */
1975
+ interface FirstDataRenderedEvent<T extends object = any> {
1976
+ /** Rows present in the datasource for the first non-empty render. */
1977
+ rows: readonly T[];
1978
+ /** Number of rows present for that render. */
1979
+ rowCount: number;
1980
+ /** Provider attached to the rendered grid. */
1981
+ provider: AgridProvider<T>;
1982
+ /** Active datasource that supplied the rows. */
1983
+ datasource: AgridDataSource<T>;
1984
+ }
1985
+ /** Live numeric statistics for the active cell or range selection. */
1986
+ interface AgridSelectionSummary {
1987
+ count: number;
1988
+ sum: number;
1989
+ average: number;
1990
+ min: number;
1991
+ max: number;
1992
+ }
1576
1993
  /** Emitted when the user clicks a data row. */
1577
1994
  interface RowClickEvent<T extends object = any> {
1578
1995
  /** Snapshot of the clicked row. */
@@ -1604,6 +2021,14 @@ interface RowUpdateEvent<T extends object = any> {
1604
2021
  /** Zero-based index of the updated row in the data source. */
1605
2022
  originalIndex: number;
1606
2023
  }
2024
+ interface RowDetailActionEvent<T extends object = any> {
2025
+ /** the id of the button */
2026
+ id: string;
2027
+ /** Updated row data. */
2028
+ row: T;
2029
+ /** Zero-based index of the updated row in the data source. */
2030
+ originalIndex: number;
2031
+ }
1607
2032
  /**
1608
2033
  * Emitted by `(rowReorder)` when the user finishes dragging a row to a new position.
1609
2034
  * The grid does **not** reorder data itself — call `dataSource.moveRow(oldIndex, newIndex)`
@@ -1636,12 +2061,49 @@ interface PageChangeEvent {
1636
2061
  /** Zero-based index of the last row on this page (inclusive). */
1637
2062
  endRow: number;
1638
2063
  }
1639
- /** Emitted when a header text filter or column-menu condition changes server-side. */
2064
+ /** Sort entry used by server-side query snapshots. */
2065
+ interface AgridServerSort {
2066
+ /** Field name of the sorted column. */
2067
+ field: string;
2068
+ /** Sort direction for this field. */
2069
+ direction: 'asc' | 'desc';
2070
+ }
2071
+ /**
2072
+ * Complete server-side query snapshot derived from `AgridControl`.
2073
+ *
2074
+ * It is emitted by `(serverQueryChange)` and published as `AgridProvider.serverQuery` whenever
2075
+ * `serverSideFiltering` is enabled or `AgridControl.totalRows` enables server-side pagination.
2076
+ * `endRow` follows the existing `(pageChange)` event: it is inclusive. Server totals are not part
2077
+ * of the query so updating `control.setTotalRows(...)` after a response does not itself trigger a
2078
+ * second fetch.
2079
+ */
2080
+ interface AgridServerQuery {
2081
+ /** Active column filters keyed by field. */
2082
+ filters: Readonly<Record<string, ColumnFilter>>;
2083
+ /** Ordered sort stack after the grid's `sortOption` is applied. */
2084
+ sort: readonly AgridServerSort[];
2085
+ /** Global quick-filter text. Empty string when inactive. */
2086
+ quickFilter: string;
2087
+ /** Current page number (1-based). */
2088
+ page: number;
2089
+ /** Rows per page. `0` means no page size is configured. */
2090
+ pageSize: number;
2091
+ /** Zero-based index of the first requested row. */
2092
+ startRow: number;
2093
+ /** Zero-based index of the last requested row (inclusive), or `-1` when no rows are known. */
2094
+ endRow: number;
2095
+ }
2096
+ /** Emitted when a header text, value, or column-menu condition changes server-side. */
1640
2097
  interface FilterChangeEvent {
1641
2098
  /** Field name of the filtered column. */
1642
2099
  field: string;
1643
2100
  /** Current free-text filter value. An empty string clears the text filter. */
1644
2101
  value: string;
2102
+ /**
2103
+ * Current value-checklist selection.
2104
+ * `null` means all values are selected / no value filter is active.
2105
+ */
2106
+ selectedValues?: readonly string[] | null;
1645
2107
  /**
1646
2108
  * Text, number, or date condition operator from the column-menu UI.
1647
2109
  * `null` clears the condition.
@@ -1675,6 +2137,50 @@ interface NewRecord<T extends object = any> {
1675
2137
  /** Exact data source containing the inserted row. */
1676
2138
  datasource: AgridDataSource<T>;
1677
2139
  }
2140
+ /**
2141
+ * Precomputed per-column header state. @internal
2142
+ *
2143
+ * The header/filter rows would otherwise call a dozen helpers per column on every
2144
+ * change-detection pass (e.g. `getSort`, `hasActiveFilter`, `isColDragging`). The header
2145
+ * view-model computeds resolve all of that once per column — and only when an underlying
2146
+ * signal changes — so the template reads plain fields instead.
2147
+ */
2148
+ interface AgridHeaderColumn {
2149
+ col: ColDef;
2150
+ field: string;
2151
+ ariaColIndex: number;
2152
+ sort: 'asc' | 'desc' | null;
2153
+ sortPriority: number;
2154
+ hasFilter: boolean;
2155
+ dragging: boolean;
2156
+ dropSide: 'before' | 'after' | null;
2157
+ reorderOffset: number;
2158
+ grouped: boolean;
2159
+ lastPinned: boolean;
2160
+ firstRightPinned: boolean;
2161
+ columnWidth: number;
2162
+ textFilter: string;
2163
+ menuFilterType: 'text' | 'number' | 'date' | null;
2164
+ hasCondition: boolean;
2165
+ conditionLabel: string;
2166
+ }
2167
+ /**
2168
+ * Precomputed per-column state for the data-row, footer, and ghost cell loops. @internal
2169
+ *
2170
+ * Deliberately leaner than {@link AgridHeaderColumn}: it omits sort/filter state so the body
2171
+ * view-model only changes on column layout, drag, or pinning — sorting or filtering does not
2172
+ * invalidate it (and therefore does not force every rendered cell to re-render).
2173
+ */
2174
+ interface AgridBodyColumn {
2175
+ col: ColDef;
2176
+ field: string;
2177
+ visibleColIndex: number;
2178
+ ariaColIndex: number;
2179
+ dragging: boolean;
2180
+ reorderOffset: number;
2181
+ lastPinned: boolean;
2182
+ firstRightPinned: boolean;
2183
+ }
1678
2184
 
1679
2185
  /** View state for the floating column header shown during a reorder drag. @internal */
1680
2186
  interface AgridColumnDragPreview {
@@ -1731,17 +2237,26 @@ interface AgridColumnMenuValueItem {
1731
2237
  /** Position and target field of the open column menu. @internal */
1732
2238
  type AgridColumnMenuState = {
1733
2239
  field: string;
2240
+ mode: 'column' | 'condition';
1734
2241
  x: number;
1735
2242
  y: number;
1736
2243
  };
1737
2244
 
1738
- /** One contiguous segment in the optional grouped-header row. @internal */
1739
- interface AgridHeaderGroupRun {
1740
- key: string;
1741
- id: string | null;
1742
- label: string;
1743
- fields: string[];
1744
- span: number;
2245
+ /**
2246
+ * The contiguous slice of scrollable columns to render, plus the pixel widths of the
2247
+ * hidden columns on either side (used to size leading/trailing spacer grid items so the
2248
+ * full column layout and scroll width are preserved).
2249
+ * @internal
2250
+ */
2251
+ interface AgridColumnWindow {
2252
+ /** Index of the first rendered scrollable column (inclusive). */
2253
+ start: number;
2254
+ /** Index just past the last rendered scrollable column (exclusive). */
2255
+ end: number;
2256
+ /** Combined width of the hidden columns before {@link start}. */
2257
+ leftWidth: number;
2258
+ /** Combined width of the hidden columns from {@link end} onward. */
2259
+ rightWidth: number;
1745
2260
  }
1746
2261
 
1747
2262
  /** Rectangular bounds in projected row and visible column coordinates. @internal */
@@ -1752,6 +2267,20 @@ type VisibleCellBounds = {
1752
2267
  colEnd: number;
1753
2268
  };
1754
2269
 
2270
+ /** One contiguous segment in the optional grouped-header row. @internal */
2271
+ interface AgridHeaderGroupRun {
2272
+ key: string;
2273
+ id: string | null;
2274
+ label: string;
2275
+ fields: string[];
2276
+ span: number;
2277
+ }
2278
+ /** A grouped-header run enriched with reactive lock/drag state. @internal */
2279
+ interface AgridHeaderGroup extends AgridHeaderGroupRun {
2280
+ locked: boolean;
2281
+ dragging: boolean;
2282
+ }
2283
+
1755
2284
  /** Dependencies and callbacks required by {@link AgridDragHandler}. @internal */
1756
2285
  interface AgridDragHandlerOptions {
1757
2286
  dataSource: Signal<AgridDataSource>;
@@ -1858,7 +2387,7 @@ interface AgridSidebarDetailField {
1858
2387
  }
1859
2388
 
1860
2389
  /**
1861
- * Excel-like data grid for Angular 21.
2390
+ * Excel-like data grid for Angular 21 and 22.
1862
2391
  *
1863
2392
  * ## Minimal setup
1864
2393
  * ```html
@@ -1880,23 +2409,27 @@ interface AgridSidebarDetailField {
1880
2409
  * | Escape | Close any open menu or cancel edit |
1881
2410
  * | Tab / Enter (while editing) | Commit and move according to navigation settings |
1882
2411
  */
1883
- declare class AgridComponent<T extends object = any> {
2412
+ declare class AgridComponent<T extends object = any> implements OnChanges {
1884
2413
  /** Grid provider containing columns, data source, control, and options. */
1885
2414
  provider: _angular_core.InputSignal<AgridProvider<T>>;
2415
+ private restoredProvider?;
1886
2416
  readonly rowHeight: Signal<number>;
1887
2417
  readonly minHeight: Signal<string | undefined>;
1888
2418
  readonly maxHeight: Signal<string | undefined>;
1889
2419
  readonly allowAddRows: Signal<boolean>;
1890
2420
  readonly autoAddRows: Signal<boolean>;
1891
2421
  readonly enableRowMarking: Signal<boolean>;
2422
+ readonly enableColumnMarking: Signal<boolean>;
2423
+ readonly showRowNumbers: Signal<boolean>;
1892
2424
  readonly showControlColumn: Signal<boolean>;
1893
- readonly controlColumnWidth: Signal<48 | 24>;
2425
+ readonly controlColumnWidth: Signal<number>;
1894
2426
  readonly showSidebar: Signal<boolean>;
1895
2427
  readonly autoOpenDetail: Signal<boolean>;
1896
2428
  readonly serverSideFiltering: Signal<boolean>;
1897
2429
  readonly filterDebounceMs: Signal<number>;
1898
2430
  readonly enableQuickFilter: Signal<boolean>;
1899
- readonly menuBarItems: Signal<AgridMenuBarItem<T>[]>;
2431
+ readonly showFormulaBar: Signal<boolean>;
2432
+ readonly menuBarItems: Signal<_thkl_agrid.AgridMenuBarItem<T>[]>;
1900
2433
  readonly quickFilterValue: Signal<string>;
1901
2434
  readonly sortOption: Signal<"single" | "multi" | "none">;
1902
2435
  readonly rowSelection: Signal<"single" | "multi" | "none">;
@@ -1915,11 +2448,16 @@ declare class AgridComponent<T extends object = any> {
1915
2448
  readonly loading: Signal<boolean>;
1916
2449
  readonly emptyText: Signal<string | undefined>;
1917
2450
  readonly useSidebarEditor: Signal<boolean>;
2451
+ readonly hideGridStatusBar: Signal<boolean | undefined>;
1918
2452
  /** Host callback for per-row CSS classes, or `undefined`. */
1919
2453
  readonly rowClassFn: Signal<((params: {
1920
2454
  row: Record<string, unknown>;
1921
2455
  index: number;
1922
2456
  }) => string) | undefined>;
2457
+ readonly externalFilterFn: Signal<((params: {
2458
+ row: Record<string, unknown>;
2459
+ index: number;
2460
+ }) => boolean) | undefined>;
1923
2461
  /** Host callback designating pinned rows, or `undefined`. */
1924
2462
  readonly pinRowFn: Signal<((row: Record<string, unknown>, index: number) => "top" | "bottom" | undefined) | undefined>;
1925
2463
  readonly pivotRowColumnField: Signal<Extract<keyof T, string> | undefined>;
@@ -1934,6 +2472,10 @@ declare class AgridComponent<T extends object = any> {
1934
2472
  readonly masterDetail: Signal<boolean>;
1935
2473
  /** Fixed detail-panel height in pixels. */
1936
2474
  readonly detailRowHeight: Signal<number>;
2475
+ /** Column configured as the expanded panel's multiline detail field. */
2476
+ readonly detailColumn: Signal<ColDefBase<any, string> | null>;
2477
+ /** Text-template buttons configured for the expanded panel's multiline detail field. */
2478
+ readonly detailActions: Signal<DetailAction<T>[]>;
1937
2479
  /** Read-only pivot rows and generated columns, or `null` in the normal datasource view. */
1938
2480
  private readonly pivotResult;
1939
2481
  /** Reactive row projection linked into a stable datasource instance for pivot mode. */
@@ -1954,6 +2496,8 @@ declare class AgridComponent<T extends object = any> {
1954
2496
  readonly localeText: Signal<AgridLocaleText>;
1955
2497
  /** Effective empty-state label. */
1956
2498
  readonly emptyTextLabel: Signal<string>;
2499
+ readonly gridId: Signal<string | undefined>;
2500
+ readonly enableExportButtons: Signal<boolean | undefined>;
1957
2501
  /** Emitted after the user commits a cell edit. */
1958
2502
  cellEdit: _angular_core.OutputEmitterRef<GridEditEvent<T>>;
1959
2503
  /**
@@ -1969,6 +2513,14 @@ declare class AgridComponent<T extends object = any> {
1969
2513
  rowReorder: _angular_core.OutputEmitterRef<RowReorderEvent<T>>;
1970
2514
  /** Emitted when the row selection changes. `null` = selection cleared. */
1971
2515
  rowSelect: _angular_core.OutputEmitterRef<RowSelectEvent<T> | null>;
2516
+ /** Emitted when a row is marked or unmarked from its row header. */
2517
+ rowMark: _angular_core.OutputEmitterRef<RowMarkEvent<T>>;
2518
+ /** Emitted when a complete column is marked or unmarked from its header. */
2519
+ columnMark: _angular_core.OutputEmitterRef<ColumnMarkEvent<T>>;
2520
+ /** Emitted when a custom column-header menu command is selected. */
2521
+ columnHeaderAction: _angular_core.OutputEmitterRef<ColumnHeaderActionEvent<T>>;
2522
+ /** Emitted once after the first non-empty datasource render has completed. */
2523
+ firstDataRendered: _angular_core.OutputEmitterRef<FirstDataRenderedEvent<T>>;
1972
2524
  rowDoubleClicked: _angular_core.OutputEmitterRef<RowClickEvent<T>>;
1973
2525
  /** Emitted when the user single-clicks a data row. */
1974
2526
  rowClick: _angular_core.OutputEmitterRef<RowClickEvent<T>>;
@@ -1993,6 +2545,8 @@ declare class AgridComponent<T extends object = any> {
1993
2545
  filterChange: _angular_core.OutputEmitterRef<FilterChangeEvent>;
1994
2546
  /** Emitted when a column sort changes in server-side filtering mode. */
1995
2547
  sortChange: _angular_core.OutputEmitterRef<SortChangeEvent>;
2548
+ /** Emitted with the complete server-side filter/sort/page query snapshot. */
2549
+ serverQueryChange: _angular_core.OutputEmitterRef<AgridServerQuery>;
1996
2550
  /**
1997
2551
  * Emitted (debounced) when the global quick-filter text changes in server-side filtering mode.
1998
2552
  * The host should refetch rows matching the text. Not emitted in client mode, where the grid
@@ -2003,12 +2557,15 @@ declare class AgridComponent<T extends object = any> {
2003
2557
  validationFailed: _angular_core.OutputEmitterRef<ValidationFailedEvent<any>>;
2004
2558
  /** Emitted when a column's optional cell information button is clicked. */
2005
2559
  cellInfo: _angular_core.OutputEmitterRef<CellInfoEvent<T>>;
2560
+ /** Emitted when the selected cell changes. `null` = cell selection cleared. */
2561
+ cellSelect: _angular_core.OutputEmitterRef<CellSelectEvent<T> | null>;
2006
2562
  /** Emitted for every enabled menu-bar button or dropdown item, carrying its configured id. */
2007
2563
  menuBarAction: _angular_core.OutputEmitterRef<string>;
2564
+ /** Emitted if there is a Detail pane Action without text property */
2565
+ detailAction: _angular_core.OutputEmitterRef<RowDetailActionEvent<T>>;
2008
2566
  /** Currently focused cell, or `null`. */
2009
2567
  readonly selectedCell: _angular_core.WritableSignal<CellPosition | null>;
2010
- /** Original index of the row awaiting delete confirmation, or `null`. */
2011
- readonly pendingDeleteRow: _angular_core.WritableSignal<number | null>;
2568
+ private lastEmittedCell;
2012
2569
  /** Original indices of rows whose master/detail panel is currently expanded. */
2013
2570
  private readonly _expandedDetailIds;
2014
2571
  /**
@@ -2017,13 +2574,17 @@ declare class AgridComponent<T extends object = any> {
2017
2574
  * provider predicate by {@link effectivePinRow}.
2018
2575
  */
2019
2576
  private readonly _pinnedRows;
2577
+ readonly formulaBarDraft: _angular_core.WritableSignal<string>;
2578
+ private readonly formulaBarFocused;
2579
+ private formulaBarEditCell;
2020
2580
  private readonly markedIndices;
2581
+ private readonly markedFields;
2582
+ private firstDataRenderedEmitted;
2583
+ private serverQueryProvider;
2021
2584
  /** Original datasource indices marked for inclusion in copy operations. */
2022
2585
  readonly markedRowIndices: Signal<ReadonlySet<number>>;
2023
- /** Horizontal position of the delete prompt inside the scrollable row. */
2024
- readonly deleteConfirmationLeft: _angular_core.WritableSignal<number>;
2025
- /** Visible width available to the delete prompt. */
2026
- readonly deleteConfirmationWidth: _angular_core.WritableSignal<number>;
2586
+ /** Fields currently marked as complete columns. */
2587
+ readonly markedColumnFields: Signal<ReadonlySet<string>>;
2027
2588
  /** Rectangular cell range selected by Shift+arrow or Shift+click. */
2028
2589
  readonly selectedRange: _angular_core.WritableSignal<CellRange | null>;
2029
2590
  /** @internal Stable callback passed to child components for row-aware editability checks. */
@@ -2038,6 +2599,13 @@ declare class AgridComponent<T extends object = any> {
2038
2599
  get editSeedChar(): _angular_core.WritableSignal<string>;
2039
2600
  /** Whether the active text editor should select all text when it opens. */
2040
2601
  get selectTextOnEdit(): _angular_core.WritableSignal<boolean>;
2602
+ /** Return the first currently selected row, or `null` when no row is selected. */
2603
+ getCurrentRow(): AgridCurrentRow<T> | null;
2604
+ /** Return the currently selected cell with row, field, value, and column metadata. */
2605
+ getCurrentCell(): AgridCurrentCell<T> | null;
2606
+ readonly formulaBarLabel: Signal<string>;
2607
+ private resolveCurrentCell;
2608
+ private sameCell;
2041
2609
  /** Toggle the sidebar open/closed. */
2042
2610
  toggleSidebar(): void;
2043
2611
  /** @internal */
@@ -2050,25 +2618,20 @@ declare class AgridComponent<T extends object = any> {
2050
2618
  loadSettings(settings: AgridSettings): void;
2051
2619
  /** Emit when the active state is JSON-safe; custom function aggregates remain host-owned. */
2052
2620
  private emitSettingsChange;
2621
+ ngOnChanges(): void;
2053
2622
  /** @internal */
2054
2623
  onSidebarDetailEdit(event: AgridSidebarEdit): void;
2055
2624
  /** @internal Commit an edit made via the detail panel. */
2056
2625
  commitDetailEdit(field: string, col: ColDef, stringValue: string): void;
2057
2626
  onSidebarDetailSave(_event: AgridSidebarDetailField[]): void;
2058
- /**
2059
- * Download the currently visible, filtered rows as a CSV file.
2060
- * Uses display values (ValueOption labels, formatters) and respects column visibility.
2061
- * Group header rows are excluded — only data rows are exported.
2062
- *
2063
- * @param filename Output filename, defaults to `'export.csv'`.
2064
- */
2065
- exportCsv(filename?: string): void;
2066
2627
  /** @internal */ goToFirstPage(): void;
2067
2628
  /** @internal */ goToLastPage(): void;
2068
2629
  /** @internal */ goToNextPage(): void;
2069
2630
  /** @internal */ goToPrevPage(): void;
2070
2631
  /** Resize every visible column to fit its header and current row values. */
2071
2632
  autosizeAllColumns(): void;
2633
+ /** return yes if we have saved config so a autosize from the client can be surpressed */
2634
+ hasSavedSizeConfig(): boolean;
2072
2635
  /**
2073
2636
  * Clears changed-cell markers after persistence succeeds.
2074
2637
  * Omit `originalIndex` to clear every marker; omit `fields` to clear the whole row.
@@ -2076,6 +2639,12 @@ declare class AgridComponent<T extends object = any> {
2076
2639
  clearChangedCells(originalIndex?: number, fields?: readonly string[]): void;
2077
2640
  /** @internal Whether a cell has an unsaved-change marker. */
2078
2641
  isCellChanged(originalIndex: number, field: string): boolean;
2642
+ /** @internal Whether a row is currently in the colored phase of a control indication. */
2643
+ rowIndicationActive(originalIndex: number): boolean;
2644
+ /** @internal CSS color for a transient row indication. */
2645
+ rowIndicationColor(originalIndex: number): string | null;
2646
+ /** @internal Fade duration for a transient row indication. */
2647
+ rowIndicationDuration(originalIndex: number): number | null;
2079
2648
  /** @internal Full display value for a cell — used as the `title` tooltip attribute. */
2080
2649
  getCellTitle(col: ColDef, value: unknown): string;
2081
2650
  /** @internal Dynamic CSS class string for a cell from `ColDef.cellClass`. */
@@ -2111,6 +2680,35 @@ declare class AgridComponent<T extends object = any> {
2111
2680
  readonly pinnedHeaderGroupRuns: Signal<AgridHeaderGroupRun[]>;
2112
2681
  readonly scrollableHeaderGroupRuns: Signal<AgridHeaderGroupRun[]>;
2113
2682
  readonly rightHeaderGroupRuns: Signal<AgridHeaderGroupRun[]>;
2683
+ /** @internal Header view-model for the left-pinned, scrollable, and right-pinned panes. */
2684
+ readonly pinnedHeaderColumns: Signal<AgridHeaderColumn[]>;
2685
+ readonly scrollableHeaderColumns: Signal<AgridHeaderColumn[]>;
2686
+ readonly rightHeaderColumns: Signal<AgridHeaderColumn[]>;
2687
+ /** @internal Grouped-header view-model per pane (run + reactive lock/drag state). */
2688
+ readonly pinnedHeaderGroups: Signal<AgridHeaderGroup[]>;
2689
+ readonly scrollableHeaderGroups: Signal<AgridHeaderGroup[]>;
2690
+ readonly rightHeaderGroups: Signal<AgridHeaderGroup[]>;
2691
+ /**
2692
+ * Resolves every per-column header/filter binding into a flat view-model. Called from the
2693
+ * pane header computeds; reads the same signal-backed helpers the template used directly, so
2694
+ * the result is memoized and recomputed only when sort/filter/drag/sizing state changes.
2695
+ */
2696
+ private buildHeaderColumns;
2697
+ private buildHeaderGroups;
2698
+ /** @internal Body view-model for the left-pinned, scrollable, and right-pinned panes. */
2699
+ readonly pinnedBodyColumns: Signal<AgridBodyColumn[]>;
2700
+ readonly scrollableBodyColumns: Signal<AgridBodyColumn[]>;
2701
+ readonly rightBodyColumns: Signal<AgridBodyColumn[]>;
2702
+ /** @internal Whether a pane needs per-cell span resolution. */
2703
+ readonly pinnedPaneHasSpans: Signal<boolean>;
2704
+ readonly scrollablePaneHasSpans: Signal<boolean>;
2705
+ readonly rightPaneHasSpans: Signal<boolean>;
2706
+ /**
2707
+ * Resolves the per-column bindings shared by every data, footer, and ghost cell. Reads only
2708
+ * layout/drag/pinning signals, so the result is reused across all rows and recomputes only
2709
+ * when columns move, resize, drag, or change pinning.
2710
+ */
2711
+ private buildBodyColumns;
2114
2712
  private readonly columnState;
2115
2713
  private readonly projection;
2116
2714
  private readonly editController;
@@ -2142,14 +2740,36 @@ declare class AgridComponent<T extends object = any> {
2142
2740
  readonly totalWidth: Signal<number>;
2143
2741
  readonly pinnedPaneWidth: Signal<number>;
2144
2742
  readonly scrollableTotalWidth: Signal<number>;
2743
+ /** Live horizontal scroll metrics of the scrollable pane, fed to column virtualization. */
2744
+ private readonly colScrollLeft;
2745
+ private readonly colViewportWidth;
2746
+ /** Scrollable-column count above which column virtualization activates. */
2747
+ readonly columnVirtualizationThreshold: Signal<number>;
2748
+ /** Windows the scrollable-pane columns to those near the horizontal viewport. */
2749
+ private readonly columnVirtualization;
2750
+ /** @internal Current rendered column window (full set + zero spacers when inactive). */
2751
+ readonly columnWindow: Signal<AgridColumnWindow>;
2752
+ /** @internal Scrollable body columns sliced to the active window. */
2753
+ readonly virtualScrollableBodyColumns: Signal<AgridBodyColumn[]>;
2754
+ /** @internal Number of hidden scrollable columns after the window (trailing spacer span). */
2755
+ readonly columnWindowRightSpan: Signal<number>;
2145
2756
  /**
2146
2757
  * Filtered, sorted, and optionally grouped row list for `*cdkVirtualFor`.
2147
2758
  * Appends `null` when the explicit add-row placeholder is active.
2148
2759
  */
2149
2760
  readonly filteredItems: Signal<GridItem[]>;
2761
+ /**
2762
+ * @internal The full filtered + sorted row set (grouping/pagination ignored). Reused for export
2763
+ * and published to the provider as `visibleRows` so charts and consumers can react to filters.
2764
+ */
2765
+ readonly ɵvisibleRows: Signal<Record<string, unknown>[]>;
2150
2766
  /** Virtual scroll source — injects ghost row during a reorder drag. */
2151
2767
  /** Maps originalIndex → true if the data row should receive the odd-row stripe. Counts only data rows, so group headers don't shift the pattern. */
2152
2768
  readonly dataRowIsOdd: Signal<Map<number, boolean>>;
2769
+ /** Maps originalIndex → 1-based filtered/sorted row number for the control column. */
2770
+ readonly rowNumbers: Signal<Map<number, number>>;
2771
+ /** Width needed for the largest currently rendered row number. */
2772
+ readonly rowNumberColumnWidth: Signal<number>;
2153
2773
  readonly displayItems: Signal<GridItem[]>;
2154
2774
  /** Rows pinned to the top of the body (rendered in a fixed container, outside virtual scroll). */
2155
2775
  readonly pinnedTopItems: Signal<{
@@ -2186,6 +2806,16 @@ declare class AgridComponent<T extends object = any> {
2186
2806
  private readonly browser;
2187
2807
  private viewReady;
2188
2808
  private readonly rangeController;
2809
+ /** Live numeric statistics for the active cell or rectangular range. */
2810
+ readonly selectionSummary: Signal<AgridSelectionSummary | null>;
2811
+ /** Locale-formatted status-bar values derived from {@link selectionSummary}. */
2812
+ readonly selectionSummaryDisplay: Signal<{
2813
+ count: string;
2814
+ sum: string;
2815
+ average: string;
2816
+ min: string;
2817
+ max: string;
2818
+ } | null>;
2189
2819
  private readonly columnSizing;
2190
2820
  private readonly columnMenuController;
2191
2821
  readonly filterMenu: _angular_core.WritableSignal<AgridColumnMenuState | null>;
@@ -2206,18 +2836,29 @@ declare class AgridComponent<T extends object = any> {
2206
2836
  readonly findQuery: _angular_core.WritableSignal<string>;
2207
2837
  readonly findActiveIndex: _angular_core.WritableSignal<number>;
2208
2838
  readonly findMatches: Signal<AgridFindMatch[]>;
2839
+ private readonly detailController;
2840
+ /** @internal Detail-field editor state, re-exported for the template. */
2841
+ readonly detailEditingRow: _angular_core.WritableSignal<number | null>;
2842
+ readonly detailDraft: _angular_core.WritableSignal<string>;
2843
+ readonly detailValidationError: _angular_core.WritableSignal<string | null>;
2209
2844
  private readonly navigationController;
2845
+ /** Maps logical covered columns to a rendered span anchor (or past it when moving right). */
2846
+ private resolveSpannedColumn;
2210
2847
  private readonly rowController;
2211
2848
  readonly selectedRowIndices: Signal<ReadonlySet<number>>;
2212
2849
  readonly selectedRowIndex: Signal<number | null>;
2213
2850
  readonly contextMenu: _angular_core.WritableSignal<AgridRowContextMenu | null>;
2214
2851
  readonly cellContextMenuState: _angular_core.WritableSignal<AgridCellContextMenu | null>;
2852
+ readonly pendingDeleteRow: _angular_core.WritableSignal<number | null>;
2853
+ readonly deleteConfirmationLeft: _angular_core.WritableSignal<number>;
2854
+ readonly deleteConfirmationWidth: _angular_core.WritableSignal<number>;
2855
+ private readonly menuBarController;
2215
2856
  /** Id of the menu-bar button whose dropdown is open, or `null`. */
2216
2857
  readonly openMenuBarItemId: _angular_core.WritableSignal<string | null>;
2217
2858
  /** Runtime state passed to menu-bar visibility, active, and disabled resolvers. */
2218
- readonly menuBarContext: Signal<AgridMenuBarContext<T>>;
2859
+ readonly menuBarContext: Signal<_thkl_agrid.AgridMenuBarContext<T>>;
2219
2860
  /** Menu-bar buttons currently allowed by their visibility resolvers. */
2220
- readonly visibleMenuBarItems: Signal<AgridMenuBarItem<T>[]>;
2861
+ readonly visibleMenuBarItems: Signal<(_thkl_agrid.AgridMenuBarItem<any> | _thkl_agrid.AgridMenuBarItem<T>)[]>;
2221
2862
  private readonly sidebarController;
2222
2863
  readonly sidebarOpen: _angular_core.WritableSignal<boolean>;
2223
2864
  /** @internal Per-field sidebar validation messages. */
@@ -2233,6 +2874,8 @@ declare class AgridComponent<T extends object = any> {
2233
2874
  readonly columnDragPreview: _angular_core.WritableSignal<AgridColumnDragPreview | null>;
2234
2875
  /** @internal Start a column header drag. */
2235
2876
  onColHeaderPointerDown(event: PointerEvent, field: string): void;
2877
+ /** @internal Toggles a complete column when its non-interactive header surface is clicked. */
2878
+ onColHeaderClick(event: MouseEvent, field: string): void;
2236
2879
  /** @internal Start dragging all columns in one contiguous grouped-header segment. */
2237
2880
  onHeaderGroupPointerDown(event: PointerEvent, fields: string[], label: string): void;
2238
2881
  /** @internal Whether any field in a grouped-header segment is being dragged. */
@@ -2249,20 +2892,21 @@ declare class AgridComponent<T extends object = any> {
2249
2892
  private readonly _seededControls;
2250
2893
  private readonly dirtyInlineRows;
2251
2894
  private dirtyRowsDataSource;
2252
- private readonly changedCells;
2253
2895
  private changedCellsDataSource;
2896
+ private dirtyInlineRowsIdleTimer;
2897
+ private readonly dirtyInlineRowsIdleFlushMs;
2254
2898
  private emitEditEvents;
2255
2899
  private emitSidebarEditEvents;
2256
2900
  private emitRecordEdit;
2257
2901
  private markInlineRowDirty;
2258
2902
  private markCellChanged;
2259
- private changedCellKey;
2260
- private parseChangedCellKey;
2261
2903
  private flushDirtyInlineRows;
2904
+ private scheduleDirtyInlineRowsIdleFlush;
2905
+ private clearDirtyInlineRowsIdleFlush;
2262
2906
  private reconcileDirtyInlineRowsAfterRemoval;
2263
- private reconcileChangedCellsAfterRemoval;
2264
2907
  private emitRowChanged;
2265
2908
  private createRecordEvent;
2909
+ private buildServerQuery;
2266
2910
  constructor();
2267
2911
  /** @internal */
2268
2912
  isDataRowItem(item: GridItem): item is {
@@ -2284,12 +2928,31 @@ declare class AgridComponent<T extends object = any> {
2284
2928
  isPathTreeNodeItem(item: GridItem): boolean;
2285
2929
  /** @internal */
2286
2930
  getItemOriginalIndex(item: GridItem): number | null;
2931
+ /** @internal 1-based row number for visible data rows. */
2932
+ visibleRowNumber(item: GridItem): number | null;
2287
2933
  /** @internal True when the item is a master/detail panel row. */
2288
2934
  isDetailRowItem(item: GridItem): item is DetailRowItem;
2289
2935
  /** @internal Rendered pixel height of a virtual-scroll item (detail panels are taller). */
2290
2936
  rowPx(item: GridItem): number;
2291
2937
  /** @internal Resolved HTML for an expanded detail panel (auto-sanitized by `[innerHTML]`). */
2292
2938
  detailHtml(item: GridItem): string;
2939
+ /** @internal Formatted value shown while a configured detail field is not being edited. */
2940
+ detailFieldDisplay(item: DetailRowItem): string;
2941
+ /** @internal Whether the configured detail field can be edited for this row. */
2942
+ isDetailFieldEditable(item: DetailRowItem): boolean;
2943
+ /** @internal Enter multiline editing for one expanded detail row. */
2944
+ startDetailFieldEdit(item: DetailRowItem, event?: Event): void;
2945
+ /** @internal Keep the multiline draft synchronized with textarea input. */
2946
+ onDetailDraftInput(event: Event): void;
2947
+ /** @internal Commit on blur or Ctrl/Cmd+Enter, and cancel on Escape. */
2948
+ onDetailEditorKeydown(item: DetailRowItem, event: KeyboardEvent): void;
2949
+ /** @internal Insert a configured text template into the active detail textarea. */
2950
+ applyDetailAction(item: DetailRowItem, action: DetailAction, event: Event): void;
2951
+ private focusDetailEditorFromKeyboard;
2952
+ /** @internal Commit a multiline detail edit through normal grid edit semantics. */
2953
+ commitDetailFieldEdit(item: DetailRowItem): void;
2954
+ /** @internal Discard the active multiline detail draft. */
2955
+ cancelDetailFieldEdit(): void;
2293
2956
  /** @internal Resolved per-row CSS classes from the host `getRowClass` callback. */
2294
2957
  getRowClass(row: Record<string, unknown>, index: number): string;
2295
2958
  /** Whether the master/detail panel for `originalIndex` is currently expanded. */
@@ -2369,6 +3032,8 @@ declare class AgridComponent<T extends object = any> {
2369
3032
  /** @internal Whether more than one column is currently sorted. */
2370
3033
  hasMultiSort(): boolean;
2371
3034
  getTextFilter(field: string): string;
3035
+ /** @internal Complete filter snapshot for custom filter components. */
3036
+ getColumnFilter(field: string): ColumnFilter;
2372
3037
  /** @internal Condition input type for a column, or `null` when unsupported. */
2373
3038
  getMenuFilterType(field: string): 'text' | 'number' | 'date' | null;
2374
3039
  /** @internal Short label for an active header condition. */
@@ -2428,6 +3093,22 @@ declare class AgridComponent<T extends object = any> {
2428
3093
  onStartEdit(originalIndex: number, ci: number): void;
2429
3094
  /** @internal */
2430
3095
  onDraftChange(value: unknown): void;
3096
+ /** @internal */
3097
+ onFormulaBarFocus(): void;
3098
+ /** @internal */
3099
+ onFormulaBarInput(event: Event): void;
3100
+ /** @internal */
3101
+ onFormulaBarBlur(): void;
3102
+ /** @internal */
3103
+ onFormulaBarKeydown(event: KeyboardEvent): void;
3104
+ /** @internal */
3105
+ commitFormulaBar(targetCell?: CellPosition | null): boolean;
3106
+ private finishFormulaBarInteraction;
3107
+ private resetFormulaBarDraft;
3108
+ /** @internal A custom cell editor requested a commit (e.g. picking a value). */
3109
+ onEditorCommit(): void;
3110
+ /** @internal A custom cell editor requested cancellation. */
3111
+ onEditorCancel(): void;
2431
3112
  private quickFilterTimer;
2432
3113
  /**
2433
3114
  * @internal Quick-filter input handler. Stores the text on the control (drives the bound value
@@ -2444,6 +3125,7 @@ declare class AgridComponent<T extends object = any> {
2444
3125
  onCellPointerDown(event: PointerEvent, originalIndex: number, colIndex: number): void;
2445
3126
  /** @internal Main keyboard handler delegated from the wrapper div. */
2446
3127
  onKeyDown(event: KeyboardEvent): void;
3128
+ private isToolbarInputEvent;
2447
3129
  /** @internal Clears cell navigation while a header filter control owns focus. */
2448
3130
  onGridFocusIn(event: FocusEvent): void;
2449
3131
  /** Open the find panel and focus its input. */
@@ -2461,12 +3143,24 @@ declare class AgridComponent<T extends object = any> {
2461
3143
  onHandlePointerDown(event: PointerEvent, originalIndex: number): void;
2462
3144
  /** @internal Handles the control column without letting the row receive a second pointer event. */
2463
3145
  onControlPointerDown(event: PointerEvent, originalIndex: number): void;
2464
- /** @internal Toggle whether a row is included in subsequent copy operations. */
3146
+ /** @internal Marks a row when its control-column header surface is clicked. */
3147
+ onControlCellClick(event: MouseEvent, originalIndex: number): void;
3148
+ /** Toggle whether a row is included in subsequent copy operations and emit its new state. */
2465
3149
  toggleRowMarked(originalIndex: number): void;
3150
+ /** Set one row's mark state and emit `rowMark` when that state changes. */
3151
+ setRowMarked(originalIndex: number, marked: boolean): void;
2466
3152
  /** @internal Returns whether a row is marked for copying. */
2467
3153
  isRowMarked(originalIndex: number): boolean;
2468
3154
  /** Clear every row marked for clipboard inclusion. */
2469
3155
  clearMarkedRows(): void;
3156
+ /** Set one complete column's mark state and emit `columnMark` when it changes. */
3157
+ setColumnMarked(field: string, marked: boolean): void;
3158
+ /** Toggle one complete column's mark state. */
3159
+ toggleColumnMarked(field: string): void;
3160
+ /** Clear all marked columns. */
3161
+ clearMarkedColumns(): void;
3162
+ /** @internal Emits a custom header command for its typed column and closes the menu. */
3163
+ onColumnHeaderAction(field: string, key: string): void;
2470
3164
  /** @internal Copy the active range or cell as TSV. */
2471
3165
  onCopy(event: ClipboardEvent): void;
2472
3166
  /** @internal Paste TSV/CSV-like plain text into the current cell. */
@@ -2487,28 +3181,12 @@ declare class AgridComponent<T extends object = any> {
2487
3181
  closeCellContextMenu(): void;
2488
3182
  /** @internal Closes any row, cell, menu-bar, group-action, or column menu owned by this grid. */
2489
3183
  closeOpenMenus(): boolean;
2490
- /** @internal Resolves a menu-bar state callback against the current grid state. */
2491
- resolveMenuBarState(state: AgridMenuBarState<T> | undefined, fallback: boolean): boolean;
2492
- /** @internal Whether a menu-bar button or dropdown item should be rendered. */
2493
- isMenuBarItemVisible(item: AgridMenuBarMenuItem<T>): boolean;
2494
- /** @internal Whether a menu-bar button or dropdown item is active. */
2495
- isMenuBarItemActive(item: AgridMenuBarMenuItem<T>): boolean;
2496
- /** @internal Whether a menu-bar button or dropdown item is disabled. */
2497
- isMenuBarItemDisabled(item: AgridMenuBarMenuItem<T>): boolean;
2498
- /** @internal Visible dropdown entries for a menu-bar button. */
2499
- visibleMenuBarChildren(item: AgridMenuBarItem<T>): AgridMenuBarMenuItem<T>[];
2500
- /** @internal Emits one menu-bar action and closes its dropdown. */
2501
- runMenuBarAction(event: Event, item: AgridMenuBarMenuItem<T>): void;
2502
- /** @internal Opens or closes a split button's additional command menu. */
2503
- toggleMenuBarMenu(event: Event, item: AgridMenuBarItem<T>): void;
2504
- /** @internal Opens a dropdown from the keyboard and focuses its first/last enabled item. */
2505
- onMenuBarTriggerKeydown(event: KeyboardEvent, item: AgridMenuBarItem<T>): void;
2506
- /** @internal Provides standard keyboard navigation within an open menu-bar dropdown. */
2507
- onMenuBarMenuKeydown(event: KeyboardEvent): void;
2508
3184
  /** @internal Closes the currently open menu-bar dropdown. */
2509
3185
  closeMenuBarMenu(): void;
2510
3186
  /** @internal Synchronizes dropdown state and closes competing grid menus when one opens. */
2511
3187
  onMenuBarOpenItemChange(id: string | null): void;
3188
+ /** @internal Dispatches a menu-bar action (or persists config for the built-in save entry). */
3189
+ onMenuBarAction(id: string): void;
2512
3190
  /** @internal Runs a typed provider context-menu action against erased controller state. */
2513
3191
  runCellMenuItem(item: CellContextMenuItem<T>, menu: AgridCellContextMenu): void;
2514
3192
  /** @internal Copy one field from the target and marked rows. */
@@ -2525,8 +3203,6 @@ declare class AgridComponent<T extends object = any> {
2525
3203
  confirmPendingRowDelete(): void;
2526
3204
  /** @internal Cancel the active row-delete confirmation. */
2527
3205
  cancelRowDelete(): void;
2528
- private deleteRowImmediately;
2529
- private updateDeleteConfirmationPosition;
2530
3206
  /** @internal */
2531
3207
  onGroupHeaderClick(label: string): void;
2532
3208
  /** Expand all groups. No-op when grouping is not active. */
@@ -2544,7 +3220,7 @@ declare class AgridComponent<T extends object = any> {
2544
3220
  /** @internal */
2545
3221
  onTextFilterChange(event: Event, field: string): void;
2546
3222
  /** @internal */
2547
- openFilterMenu(event: MouseEvent, field: string): void;
3223
+ openFilterMenu(event: MouseEvent, field: string, mode?: 'column' | 'condition'): void;
2548
3224
  /** @internal */
2549
3225
  closeFilterMenu(): void;
2550
3226
  /** @internal */
@@ -2564,14 +3240,23 @@ declare class AgridComponent<T extends object = any> {
2564
3240
  /** @internal */
2565
3241
  onMenuToggleValue(field: string, rawStr: string): void;
2566
3242
  /** @internal */
3243
+ onMenuReplaceFilter(field: string, filter: ColumnFilter): void;
3244
+ /** @internal */
2567
3245
  onSidebarToggleColumn(field: string): void;
2568
3246
  /** @internal Sets every column in a sidebar header group to the requested visibility. */
2569
3247
  onSidebarToggleColumnGroup(fields: string[], visible: boolean): void;
2570
3248
  /** @internal Mirrors vertical scrolling from the main viewport into both pinned panes. */
2571
3249
  onBodyScroll(): void;
2572
3250
  private ensureServerRowsVisible;
3251
+ /** Refresh the attached server-side row model and optionally reset vertical scroll to row zero. */
3252
+ refreshServerSideRows(options?: {
3253
+ purge?: boolean;
3254
+ resetScroll?: boolean;
3255
+ }): void;
2573
3256
  /** @internal Keeps the row-delete prompt visible while columns scroll horizontally. */
2574
3257
  onHorizontalScroll(): void;
3258
+ /** @internal Refreshes the scroll offset / viewport width driving column virtualization. */
3259
+ private syncColumnViewportMetrics;
2575
3260
  /** @internal */
2576
3261
  onRightPinnedBodyScroll(): void;
2577
3262
  /** @internal */
@@ -2606,7 +3291,7 @@ declare class AgridComponent<T extends object = any> {
2606
3291
  getColumnWidth(col: ColDef): number;
2607
3292
  private getColumnWidthToken;
2608
3293
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AgridComponent<any>, never>;
2609
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<AgridComponent<any>, "agrid", never, { "provider": { "alias": "provider"; "required": false; "isSignal": true; }; }, { "cellEdit": "cellEdit"; "recordEdit": "recordEdit"; "rowRemoved": "rowRemoved"; "prepareAddRecord": "prepareAddRecord"; "rowReorder": "rowReorder"; "rowSelect": "rowSelect"; "rowDoubleClicked": "rowDoubleClicked"; "rowClick": "rowClick"; "treeNodeClick": "treeNodeClick"; "settingsChange": "settingsChange"; "treeNodeDoubleClicked": "treeNodeDoubleClicked"; "rowChanged": "rowChanged"; "pageChange": "pageChange"; "filterChange": "filterChange"; "sortChange": "sortChange"; "quickFilterChange": "quickFilterChange"; "validationFailed": "validationFailed"; "cellInfo": "cellInfo"; "menuBarAction": "menuBarAction"; }, never, never, true, never>;
3294
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AgridComponent<any>, "agrid", never, { "provider": { "alias": "provider"; "required": false; "isSignal": true; }; }, { "cellEdit": "cellEdit"; "recordEdit": "recordEdit"; "rowRemoved": "rowRemoved"; "prepareAddRecord": "prepareAddRecord"; "rowReorder": "rowReorder"; "rowSelect": "rowSelect"; "rowMark": "rowMark"; "columnMark": "columnMark"; "columnHeaderAction": "columnHeaderAction"; "firstDataRendered": "firstDataRendered"; "rowDoubleClicked": "rowDoubleClicked"; "rowClick": "rowClick"; "treeNodeClick": "treeNodeClick"; "settingsChange": "settingsChange"; "treeNodeDoubleClicked": "treeNodeDoubleClicked"; "rowChanged": "rowChanged"; "pageChange": "pageChange"; "filterChange": "filterChange"; "sortChange": "sortChange"; "serverQueryChange": "serverQueryChange"; "quickFilterChange": "quickFilterChange"; "validationFailed": "validationFailed"; "cellInfo": "cellInfo"; "cellSelect": "cellSelect"; "menuBarAction": "menuBarAction"; "detailAction": "detailAction"; }, never, never, true, never>;
2610
3295
  }
2611
3296
 
2612
3297
  /** Identifier supported by the standalone page selector. */
@@ -2708,6 +3393,7 @@ type StandaloneTreeItem<T extends object> = TreeRowItem<T> | PathTreeNodeItem;
2708
3393
  /** Standalone accessible tree control backed by the same projection logic as `AgridComponent`. */
2709
3394
  declare class AgridTreeComponent<T extends object = any> {
2710
3395
  provider: _angular_core.InputSignal<AgridTreeProvider<T>>;
3396
+ localeText: _angular_core.InputSignal<AgridLocaleText>;
2711
3397
  nodeClick: _angular_core.OutputEmitterRef<AgridTreeNodeEvent<T>>;
2712
3398
  nodeDoubleClicked: _angular_core.OutputEmitterRef<AgridTreeNodeEvent<T>>;
2713
3399
  selectionChange: _angular_core.OutputEmitterRef<AgridTreeSelectionEvent<T>>;
@@ -2747,9 +3433,317 @@ declare class AgridTreeComponent<T extends object = any> {
2747
3433
  private focusNode;
2748
3434
  private findParentIndex;
2749
3435
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AgridTreeComponent<any>, never>;
2750
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<AgridTreeComponent<any>, "agrid-tree", never, { "provider": { "alias": "provider"; "required": true; "isSignal": true; }; }, { "nodeClick": "nodeClick"; "nodeDoubleClicked": "nodeDoubleClicked"; "selectionChange": "selectionChange"; }, never, never, true, never>;
3436
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AgridTreeComponent<any>, "agrid-tree", never, { "provider": { "alias": "provider"; "required": true; "isSignal": true; }; "localeText": { "alias": "localeText"; "required": false; "isSignal": true; }; }, { "nodeClick": "nodeClick"; "nodeDoubleClicked": "nodeDoubleClicked"; "selectionChange": "selectionChange"; }, never, never, true, never>;
3437
+ }
3438
+
3439
+ /**
3440
+ * Context handed to a custom cell editor component through dependency injection.
3441
+ *
3442
+ * A custom editor is any standalone component referenced by {@link ColDef.cellEditor}.
3443
+ * The grid instantiates it while a cell is in edit mode and provides this context via the
3444
+ * {@link AGRID_EDITOR_CONTEXT} token. The editor is purely an *input surface*: it reads the
3445
+ * current value and pushes drafts back through {@link setDraft}. The grid keeps full ownership
3446
+ * of validation, history (undo/redo), and the commit/cancel lifecycle — so Tab, Enter, and
3447
+ * Escape continue to work without the editor doing anything.
3448
+ *
3449
+ * @example
3450
+ * ```ts
3451
+ * @Component({
3452
+ * selector: 'rating-editor',
3453
+ * template: `
3454
+ * <select #s [value]="ctx.value()" (change)="ctx.setDraft(+s.value); ctx.commit()">
3455
+ * @for (n of [1,2,3,4,5]; track n) { <option [value]="n">{{ n }} ★</option> }
3456
+ * </select>`,
3457
+ * })
3458
+ * export class RatingEditor {
3459
+ * readonly ctx = inject(AGRID_EDITOR_CONTEXT);
3460
+ * }
3461
+ *
3462
+ * // ColDef: { field: 'rating', cellEditor: RatingEditor }
3463
+ * ```
3464
+ */
3465
+ interface AgridEditorContext<TValue = unknown> {
3466
+ /** The cell's current value at the moment editing started. */
3467
+ readonly value: Signal<TValue>;
3468
+ /** The full row record the cell belongs to. */
3469
+ readonly row: Signal<Record<string, unknown>>;
3470
+ /** The column definition this cell is rendered from. */
3471
+ readonly column: Signal<ColDef>;
3472
+ /**
3473
+ * The printable character that triggered type-to-edit, or `''` when editing started another
3474
+ * way (double-click, Enter, F2). Useful for seeding a free-text editor.
3475
+ */
3476
+ readonly seedChar: Signal<string>;
3477
+ /** Stage a new value. The grid commits whatever was last staged on Tab/Enter. */
3478
+ setDraft(value: unknown): void;
3479
+ /** Programmatically commit the staged value (same as the user pressing Enter). */
3480
+ commit(): void;
3481
+ /** Programmatically discard the edit (same as the user pressing Escape). */
3482
+ cancel(): void;
3483
+ }
3484
+ /** DI token a custom {@link ColDef.cellEditor} component injects to talk to the grid. */
3485
+ declare const AGRID_EDITOR_CONTEXT: InjectionToken<AgridEditorContext<unknown>>;
3486
+
3487
+ /**
3488
+ * Context handed to a custom cell renderer component through dependency injection.
3489
+ *
3490
+ * A custom renderer is any standalone component referenced by {@link ColDef.cellRendererComponent}.
3491
+ * The grid instantiates it for the cell's *display* (read) state and provides this context via the
3492
+ * {@link AGRID_RENDERER_CONTEXT} token. Unlike the HTML-string {@link ColDef.cellRenderer}, a
3493
+ * component renderer supports full Angular bindings, event handlers, and child components — and
3494
+ * needs no manual escaping or sanitization.
3495
+ *
3496
+ * @example
3497
+ * ```ts
3498
+ * @Component({
3499
+ * selector: 'status-badge',
3500
+ * template: `<span class="badge" [class]="'badge--' + value()">{{ value() }}</span>`,
3501
+ * })
3502
+ * export class StatusBadge {
3503
+ * private readonly ctx = inject(AGRID_RENDERER_CONTEXT);
3504
+ * readonly value = computed(() => String(this.ctx.value() ?? ''));
3505
+ * }
3506
+ *
3507
+ * // ColDef: { field: 'status', cellRendererComponent: StatusBadge }
3508
+ * ```
3509
+ */
3510
+ interface AgridRendererContext<TValue = unknown> {
3511
+ /** The cell's current value. */
3512
+ readonly value: Signal<TValue>;
3513
+ /** The full row record the cell belongs to. */
3514
+ readonly row: Signal<Record<string, unknown>>;
3515
+ /** The column definition this cell is rendered from. */
3516
+ readonly column: Signal<ColDef>;
3517
+ }
3518
+ /** DI token a custom {@link ColDef.cellRendererComponent} component injects to read cell data. */
3519
+ declare const AGRID_RENDERER_CONTEXT: InjectionToken<AgridRendererContext<unknown>>;
3520
+
3521
+ /**
3522
+ * Runtime context handed to a custom column-filter component through dependency injection.
3523
+ *
3524
+ * Custom filters should write normal {@link ColumnFilter} state through {@link setFilter}. That
3525
+ * keeps filter persistence, server query generation, and the active-filter header state aligned
3526
+ * with built-in filters.
3527
+ *
3528
+ * @example
3529
+ * ```ts
3530
+ * const ctx = inject(AGRID_FILTER_CONTEXT);
3531
+ * ctx.setFilter({ ...ctx.filter(), text: 'active' });
3532
+ * ```
3533
+ */
3534
+ interface AgridFilterContext {
3535
+ /** Field currently being filtered. */
3536
+ readonly field: string;
3537
+ /** Column definition for the active filter menu. */
3538
+ readonly column: ColDef;
3539
+ /** Shared grid control that owns filter state. */
3540
+ readonly control: AgridControl | null;
3541
+ /** Current filter snapshot for this field. */
3542
+ readonly filter: Signal<ColumnFilter>;
3543
+ /** Replace this field's filter state, preserving any fields the component copies forward. */
3544
+ setFilter(filter: ColumnFilter): void;
3545
+ /** Clear this field's filter state. */
3546
+ clear(): void;
3547
+ /** Close the column menu. */
3548
+ close(): void;
3549
+ }
3550
+ /**
3551
+ * DI token a custom {@link ColDef.filterComponent} injects to control column filtering.
3552
+ *
3553
+ * The token is only available while the component is rendered inside an aGrid column menu.
3554
+ */
3555
+ declare const AGRID_FILTER_CONTEXT: InjectionToken<AgridFilterContext>;
3556
+
3557
+ /**
3558
+ * Zero-dependency chart geometry. Pure math that turns a typed dataset + a diagram type into flat
3559
+ * SVG primitives (bars, line/area paths, pie slices, gridlines, labels), so the chart component
3560
+ * only has to emit elements. No charting library — same hand-rolled approach as the xlsx writer
3561
+ * and the sparkline helper.
3562
+ */
3563
+ /** Supported diagram types. */
3564
+ type AgridChartType = 'column' | 'bar' | 'line' | 'area' | 'pie' | 'donut';
3565
+ /** One data series (a row of values aligned to {@link AgridChartData.categories}). */
3566
+ interface AgridChartSeries {
3567
+ /** Series name shown in the legend. */
3568
+ name?: string;
3569
+ /** Explicit colour; falls back to the palette by index. */
3570
+ color?: string;
3571
+ values: number[];
3572
+ }
3573
+ /** The dataset fed to a chart: one or more series sharing a category axis. */
3574
+ interface AgridChartData {
3575
+ /** Category labels (x-axis ticks, or pie/donut slice labels). */
3576
+ categories?: string[];
3577
+ series: AgridChartSeries[];
3578
+ }
3579
+ /** Box dimensions and styling knobs the dataset is laid out into. */
3580
+ interface AgridChartOptions {
3581
+ width: number;
3582
+ height: number;
3583
+ palette?: string[];
3584
+ /** Whether value/category axes and gridlines are produced (cartesian types only). */
3585
+ showAxis?: boolean;
3586
+ }
3587
+ interface ChartBar {
3588
+ x: number;
3589
+ y: number;
3590
+ width: number;
3591
+ height: number;
3592
+ color: string;
3593
+ value: number;
3594
+ seriesIndex: number;
3595
+ categoryIndex: number;
3596
+ }
3597
+ interface ChartPath {
3598
+ d: string;
3599
+ color: string;
3600
+ name: string;
3601
+ }
3602
+ interface ChartPoint {
3603
+ x: number;
3604
+ y: number;
3605
+ color: string;
3606
+ }
3607
+ interface ChartSlice {
3608
+ d: string;
3609
+ color: string;
3610
+ value: number;
3611
+ label: string;
3612
+ percentText: string;
3613
+ labelX: number;
3614
+ labelY: number;
3615
+ full: boolean;
3616
+ }
3617
+ interface ChartGridline {
3618
+ x1: number;
3619
+ y1: number;
3620
+ x2: number;
3621
+ y2: number;
3622
+ }
3623
+ interface ChartLabel {
3624
+ x: number;
3625
+ y: number;
3626
+ text: string;
3627
+ anchor: 'start' | 'middle' | 'end';
3628
+ baseline: 'auto' | 'middle' | 'hanging';
3629
+ }
3630
+ interface ChartLegendItem {
3631
+ name: string;
3632
+ color: string;
3633
+ }
3634
+ /** Flat, drawable primitives for a chart. */
3635
+ interface AgridChartLayout {
3636
+ type: AgridChartType;
3637
+ width: number;
3638
+ height: number;
3639
+ bars: ChartBar[];
3640
+ areas: ChartPath[];
3641
+ lines: ChartPath[];
3642
+ points: ChartPoint[];
3643
+ slices: ChartSlice[];
3644
+ gridlines: ChartGridline[];
3645
+ axisLabels: ChartLabel[];
3646
+ legend: ChartLegendItem[];
3647
+ }
3648
+ /** Default qualitative palette (colour-blind-friendly-ish, distinct hues). */
3649
+ declare const AGRID_CHART_PALETTE: string[];
3650
+ /** Builds drawable geometry for a chart. Empty/invalid input yields an empty layout. */
3651
+ declare function buildChart(type: AgridChartType, data: AgridChartData, options: AgridChartOptions): AgridChartLayout;
3652
+
3653
+ /**
3654
+ * Construction options for an {@link AgridChartProvider}.
3655
+ *
3656
+ * Provide a static {@link data} set, or link a live {@link source} (e.g. a grid provider's
3657
+ * `visibleRows`) together with a {@link transform} so the chart follows the grid's filtering and
3658
+ * sorting automatically.
3659
+ */
3660
+ interface AgridChartProviderConfig<T = any> {
3661
+ /** Diagram type: column, bar, line, area, pie, or donut. */
3662
+ type: AgridChartType;
3663
+ /** Static dataset. Ignored when {@link source} + {@link transform} are provided. */
3664
+ data?: AgridChartData;
3665
+ /**
3666
+ * A reactive row source to derive the dataset from — typically a grid provider's `visibleRows`,
3667
+ * which reflects the grid's current filters and sorting. Requires {@link transform}.
3668
+ */
3669
+ source?: Signal<readonly T[]>;
3670
+ /**
3671
+ * Turns the {@link source} rows (and the current chart type) into a chart dataset. Re-runs
3672
+ * whenever the source rows or the chart type change.
3673
+ */
3674
+ transform?: (rows: readonly T[], type: AgridChartType) => AgridChartData;
3675
+ /** Chart height in pixels (width follows the host). @default 220 */
3676
+ height?: number;
3677
+ /** Show the series/category legend below the chart. @default true */
3678
+ showLegend?: boolean;
3679
+ /** Draw value/category axes for cartesian types. @default true */
3680
+ showAxis?: boolean;
3681
+ /** Override the colour palette. */
3682
+ palette?: string[];
3683
+ }
3684
+ /**
3685
+ * Bundles a chart's type, dataset, and display options behind one object, so a chart is configured
3686
+ * exactly like a grid: `<agrid-chart [provider]="chartProvider" />`.
3687
+ *
3688
+ * @example Static data
3689
+ * ```ts
3690
+ * new AgridChartProvider({ type: 'column', data: { categories: ['Q1','Q2'], series: [{ values: [10, 14] }] } });
3691
+ * ```
3692
+ *
3693
+ * @example Linked to a grid (follows filters/sorting)
3694
+ * ```ts
3695
+ * new AgridChartProvider({
3696
+ * type: 'column',
3697
+ * source: gridProvider.visibleRows,
3698
+ * transform: (rows, type) => ({ categories: rows.map(r => r.region), series: [{ values: rows.map(r => r.total) }] }),
3699
+ * });
3700
+ * ```
3701
+ */
3702
+ declare class AgridChartProvider<T = any> {
3703
+ /** Diagram type. Writable — set it to switch chart type at runtime. */
3704
+ readonly type: WritableSignal<AgridChartType>;
3705
+ /** The dataset rendered by the chart (derived from the source when linked). */
3706
+ readonly data: Signal<AgridChartData>;
3707
+ /** Chart height in pixels. */
3708
+ readonly height: WritableSignal<number>;
3709
+ /** Whether the legend is shown. */
3710
+ readonly showLegend: WritableSignal<boolean>;
3711
+ /** Whether cartesian axes are drawn. */
3712
+ readonly showAxis: WritableSignal<boolean>;
3713
+ /** Colour palette override, or `undefined` for the default. */
3714
+ readonly palette: WritableSignal<string[] | undefined>;
3715
+ /** Writable backing store in static mode; `null` when the data is derived from a source. */
3716
+ private readonly _data;
3717
+ constructor(config: AgridChartProviderConfig<T>);
3718
+ /** Replace the dataset. Only valid in static mode (no linked {@link AgridChartProviderConfig.source}). */
3719
+ setData(data: AgridChartData): void;
3720
+ }
3721
+
3722
+ /**
3723
+ * Zero-dependency chart component. Configured exactly like the grid — hand it an
3724
+ * {@link AgridChartProvider} and it renders an SVG column / bar / line / area / pie / donut chart
3725
+ * with no charting library. The chart sizes itself to the host width (observed) and the provider's
3726
+ * height.
3727
+ *
3728
+ * @example
3729
+ * ```html
3730
+ * <agrid-chart [provider]="chartProvider" />
3731
+ * ```
3732
+ */
3733
+ declare class AgridChartComponent {
3734
+ /** All chart configuration — type, data, and display options. */
3735
+ readonly provider: _angular_core.InputSignal<AgridChartProvider<any>>;
3736
+ private readonly host;
3737
+ protected readonly width: _angular_core.WritableSignal<number>;
3738
+ protected readonly height: _angular_core.Signal<number>;
3739
+ protected readonly showLegend: _angular_core.Signal<boolean>;
3740
+ protected readonly sliceLabels: _angular_core.Signal<boolean>;
3741
+ protected readonly layout: _angular_core.Signal<_thkl_agrid.AgridChartLayout>;
3742
+ constructor();
3743
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AgridChartComponent, never>;
3744
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AgridChartComponent, "agrid-chart", never, { "provider": { "alias": "provider"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
2751
3745
  }
2752
3746
 
2753
- export { AGRID_LOCALE_TEXT, AgridComponent, AgridControl, AgridDataSource, AgridPageSelectorComponent, AgridProvider, AgridServerSideRowModel, AgridTreeComponent, AgridTreeProvider, ColDefAutoSize };
2754
- export type { AgridAggregate, AgridControlState, AgridEnterEditAction, AgridField, AgridLocaleKey, AgridLocaleText, AgridLocaleTextOverrides, AgridMenuBarContext, AgridMenuBarItem, AgridMenuBarMenuItem, AgridMenuBarState, AgridPageId, AgridPageItem, AgridParentTreeConfig, AgridPathSegmentParams, AgridPathTreeConfig, AgridPivotConfig, AgridPivotSettings, AgridProviderConfig, AgridServerSideDatasource, AgridServerSideRequest, AgridServerSideResult, AgridServerSideRowModelConfig, AgridServerSideSort, AgridSettings, AgridTreeConfig, AgridTreeNodeEvent, AgridTreeProviderConfig, AgridTreeSelectionEvent, AgridTreeSelectionMode, CellContextMenuItem, CellFormat, CellFormatParams, CellInfoEvent, CellPosition, CellReadonlyParams, ColDef, ColumnFilter, DetailRowItem, FilterChangeEvent, FilterOperator, GridEditEvent, GroupAction, HeaderGroup, HistoryEntry, HistoryItem, InputMaskParams, NewRecord, PageChangeEvent, PathTreeNodeItem, RecordEditEvent, RowClickEvent, RowRemovedEvent, RowReorderEvent, RowSelectEvent, RowUpdateEvent, SortChangeEvent, TreeNodeClickEvent, TreeRowItem, ValidationFailedEvent, ValueOption };
3747
+ export { AGRID_CHART_PALETTE, AGRID_EDITOR_CONTEXT, AGRID_FILTER_CONTEXT, AGRID_LOCALE_TEXT, AGRID_RENDERER_CONTEXT, AgridBrowserAdapter, AgridChartComponent, AgridChartProvider, AgridComponent, AgridControl, AgridDataSource, AgridPageSelectorComponent, AgridProvider, AgridServerSideRowModel, AgridTreeComponent, AgridTreeProvider, ColDefAutoSize, buildChart };
3748
+ export type { AgridAggregate, AgridAsyncValues, AgridBuiltInEditor, AgridChartData, AgridChartLayout, AgridChartOptions, AgridChartProviderConfig, AgridChartSeries, AgridChartType, AgridColumnHeaderMenuItem, AgridControlState, AgridCurrentCell, AgridCurrentRow, AgridEditorContext, AgridEnterEditAction, AgridField, AgridFilterContext, AgridLocaleKey, AgridLocaleText, AgridLocaleTextOverrides, AgridMenuBarContext, AgridMenuBarItem, AgridMenuBarMenuItem, AgridMenuBarState, AgridPageId, AgridPageItem, AgridParentTreeConfig, AgridPathSegmentParams, AgridPathTreeConfig, AgridPivotConfig, AgridPivotSettings, AgridProviderConfig, AgridRendererContext, AgridRowIndication, AgridSelectionSummary, AgridServerQuery, AgridServerSideDatasource, AgridServerSideRefreshOptions, AgridServerSideRequest, AgridServerSideResult, AgridServerSideRowModelConfig, AgridServerSideSort, AgridServerSort, AgridSettings, AgridTreeConfig, AgridTreeNodeEvent, AgridTreeProviderConfig, AgridTreeSelectionEvent, AgridTreeSelectionMode, AsyncValueOptionsParams, CellContextMenuItem, CellFormat, CellFormatParams, CellInfoEvent, CellPosition, CellReadonlyParams, CellSelectEvent, CellSpanParams, ColDef, ColumnFilter, ColumnHeaderActionEvent, ColumnMarkEvent, DetailAction, DetailActionParams, DetailRowItem, FilterChangeEvent, FilterOperator, FirstDataRenderedEvent, GridEditEvent, GroupAction, HeaderGroup, HistoryEntry, HistoryItem, InputMaskParams, NewRecord, PageChangeEvent, PathTreeNodeItem, RecordEditEvent, RowClickEvent, RowMarkEvent, RowRemovedEvent, RowReorderEvent, RowSelectEvent, RowUpdateEvent, SortChangeEvent, TreeNodeClickEvent, TreeRowItem, ValidationFailedEvent, ValueOption };
2755
3749
  //# sourceMappingURL=thkl-agrid.d.ts.map