@reforgium/data-grid 1.1.0 → 2.0.1

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,12 +1,13 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { TemplateRef, ElementRef } from '@angular/core';
2
+ import { TemplateRef, InjectionToken, EnvironmentProviders, ElementRef } from '@angular/core';
3
+ import * as _reforgium_data_grid from '@reforgium/data-grid';
3
4
 
4
5
  /**
5
6
  * Directive for defining type-specific cell templates in a data grid.
6
7
  *
7
8
  * This directive allows developers to create custom cell renderers for specific data types
8
9
  * within the data grid component. It binds a template to a type identifier, enabling
9
- * the grid to dynamically select and render the appropriate template based on column type.
10
+ * the grid to dynamically select and render the appropriate template based on a column type.
10
11
  *
11
12
  * Example usage:
12
13
  * ```html
@@ -81,6 +82,356 @@ declare class DataGridHeaderTemplateDirective {
81
82
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<DataGridHeaderTemplateDirective, "ng-template[reDataGridHeader]", never, { "key": { "alias": "reDataGridHeader"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
82
83
  }
83
84
 
85
+ /**
86
+ * Represents a key of an object that is also a string, or any string.
87
+ * Used for identifying data properties in rows.
88
+ */
89
+ type DataKey<Data> = (keyof Data & string) | string;
90
+ /**
91
+ * Function type that resolves a value of type `Return` from an argument of type `Arg`.
92
+ * Often used to transform row data or extract specific properties.
93
+ */
94
+ type KeyResolver<Arg = AnyType, Return = string> = (arg: Arg) => Return;
95
+ /**
96
+ * Union type for row identification.
97
+ * Can be either a property key (string) or a resolver function.
98
+ */
99
+ type RowKeyFn<Data> = DataKey<Data> | KeyResolver<Data, string | number>;
100
+ /**
101
+ * Type alias for `any`.
102
+ */
103
+ type AnyType = any;
104
+ /**
105
+ * Represents an object with string keys and values of any type.
106
+ * Common base type for row data.
107
+ */
108
+ type AnyDict = Record<string, AnyType>;
109
+
110
+ /**
111
+ * Horizontal alignment options for grid cell content.
112
+ *
113
+ * - `'left'` - Align content to the left
114
+ * - `'center'` - Center align content
115
+ * - `'right'` - Align content to the right
116
+ */
117
+ type GridCellAlign = 'left' | 'center' | 'right';
118
+ type GridTooltipContext<Data extends AnyDict = AnyDict> = {
119
+ $implicit: Data;
120
+ row: Data;
121
+ col: GridColumn<Data>;
122
+ index: number;
123
+ value: AnyType;
124
+ };
125
+ type GridColumnTooltip<Data extends AnyDict = AnyDict> = string | ((row: Data) => string) | TemplateRef<GridTooltipContext<AnyDict>>;
126
+ /**
127
+ * Sticky column side.
128
+ *
129
+ * - `'left'` - Stick to the left edge
130
+ * - `'right'` - Stick to the right edge
131
+ */
132
+ type GridStickySide = 'left' | 'right';
133
+ /**
134
+ * Built-in cell renderer types for common data display formats.
135
+ *
136
+ * - `'plain'` - Display raw text value (default)
137
+ * - `'date'` - Format and display date values
138
+ * - `'number'` - Format and display numeric values
139
+ * - `'index'` - Display row index number
140
+ * - `'checkbox'` - Display checkbox for selection
141
+ */
142
+ type GridCellRendererType = 'plain' | 'date' | 'number' | 'index' | 'checkbox';
143
+ /**
144
+ * Array of column definitions for the data grid.
145
+ *
146
+ * @template Data - Type of data objects displayed in the grid rows
147
+ */
148
+ type GridColumns<Data extends AnyDict = AnyDict> = GridColumn<Data>[];
149
+ /**
150
+ * Union type representing different column definition variants.
151
+ *
152
+ * A column can use built-in renderers, custom value functions, or Angular templates
153
+ * for rendering cell content.
154
+ *
155
+ * @template Data - Type of data objects displayed in the grid rows
156
+ */
157
+ type GridColumn<Data extends AnyDict = AnyDict> = _DefaultGridColumn<Data> | _ValuedGridColumn<Data> | _TemplatedGridColumn<Data>;
158
+ /**
159
+ * Column definition using built-in cell renderer types.
160
+ *
161
+ * Extends the base column with an optional renderer type specification.
162
+ * If no type is specified, defaults to `'plain'` renderer.
163
+ *
164
+ * @template Data - Type of data objects displayed in the grid rows
165
+ */
166
+ type _DefaultGridColumn<Data extends AnyDict = AnyDict> = BaseGridColumn<Data> & {
167
+ /**
168
+ * Built-in renderer type for formatting cell values.
169
+ */
170
+ type?: GridCellRendererType;
171
+ /**
172
+ * Optional configuration or formatting options passed to the renderer (e.g., date/number format). *[NEW in 1.1.0]*
173
+ */
174
+ typeParams?: AnyType;
175
+ /**
176
+ * Fallback value used when the raw cell value is `null` or `undefined`.
177
+ */
178
+ defaultValue?: AnyType;
179
+ };
180
+ /**
181
+ * Column definition using a custom value renderer function.
182
+ *
183
+ * Allows custom logic for transforming row data into display values.
184
+ * Requires a tracking function for change detection optimization.
185
+ *
186
+ * @template Data - Type of data objects displayed in the grid rows
187
+ */
188
+ type _ValuedGridColumn<Data extends AnyDict = AnyDict> = BaseGridColumn<Data> & {
189
+ /**
190
+ * Function returning unique identifier for the row (for change detection).
191
+ */
192
+ track: (row: Data) => string;
193
+ /**
194
+ * Function that resolves cell display value from row data.
195
+ */
196
+ value: GridCellRenderer<Data>;
197
+ };
198
+ /**
199
+ * Column definition using an Angular template for cell rendering.
200
+ *
201
+ * Provides maximum flexibility by allowing custom HTML templates
202
+ * with full access to row data, column config, and cell context.
203
+ * Requires a tracking function for change detection optimization.
204
+ *
205
+ * @template Data - Type of data objects displayed in the grid rows
206
+ */
207
+ type _TemplatedGridColumn<Data extends AnyDict = AnyDict> = BaseGridColumn<Data> & {
208
+ /**
209
+ * Function returning unique identifier for the row (for change detection).
210
+ */
211
+ track: (row: Data) => string;
212
+ /**
213
+ * Angular TemplateRef for rendering cell content.
214
+ */
215
+ renderTemplate: TemplateRef<RenderTemplateData<Data>>;
216
+ };
217
+ /**
218
+ * Base properties shared by all column definition types.
219
+ *
220
+ * Contains configuration for column identification, header display,
221
+ * sizing, alignment, visibility, and behavior.
222
+ *
223
+ * @template Data - Type of data objects displayed in the grid rows
224
+ */
225
+ type BaseGridColumn<Data extends AnyDict = AnyDict> = {
226
+ /**
227
+ * Data property key this column displays.
228
+ */
229
+ key: DataKey<Data>;
230
+ /**
231
+ * Optional alternative key for sorting (if different from a display key).
232
+ */
233
+ sortKey?: string;
234
+ /**
235
+ * Column header text string.
236
+ */
237
+ header: string;
238
+ /**
239
+ * Optional Angular template for custom header rendering.
240
+ * If provided, overrides the default text header.
241
+ */
242
+ headerTemplate?: TemplateRef<HeaderTemplateData>;
243
+ /**
244
+ * Horizontal alignment of cell content.
245
+ */
246
+ align?: GridCellAlign;
247
+ /**
248
+ * CSS class(es) to apply to cells.
249
+ * Can be a static string or a resolver function that returns a class string based on row data.
250
+ */
251
+ cellClass?: KeyResolver<Data> | string;
252
+ /**
253
+ * Fixed column width in pixels.
254
+ */
255
+ width?: number;
256
+ /**
257
+ * Minimum column width in pixels.
258
+ */
259
+ minWidth?: number;
260
+ /**
261
+ * Maximum column width in pixels.
262
+ */
263
+ maxWidth?: number;
264
+ /**
265
+ * Flex grow factor for flexible width columns.
266
+ */
267
+ flex?: number;
268
+ /**
269
+ * Whether the column is disabled.
270
+ */
271
+ disabled?: boolean;
272
+ /**
273
+ * Whether the column is visible.
274
+ */
275
+ visible?: boolean;
276
+ /**
277
+ * Whether the column remains fixed during the horizontal scroll.
278
+ *
279
+ * Use `'left'` or `'right'` to pin to the corresponding side.
280
+ * The `true` value is kept for backward compatibility and behaves as `'left'`.
281
+ */
282
+ sticky?: GridStickySide | true;
283
+ /**
284
+ * Optional tooltip content shown on cell hover.
285
+ */
286
+ tooltip?: GridColumnTooltip<Data>;
287
+ /**
288
+ * Data key to use for expanding/collapsing row details.
289
+ */
290
+ expandBy?: DataKey<Data>;
291
+ };
292
+ /**
293
+ * Type for custom cell value resolver functions.
294
+ *
295
+ * Function that takes row data and returns a string or number for display.
296
+ * Used in `_ValuedGridColumn` to customize how cell values are extracted and formatted.
297
+ *
298
+ * @template Data - Type of data objects displayed in the grid rows
299
+ */
300
+ type GridCellRenderer<Data> = KeyResolver<Data, string | number>;
301
+ /**
302
+ * Context data provided to the header template.
303
+ *
304
+ * Implicit value is the header text string.
305
+ */
306
+ type HeaderTemplateData = {
307
+ /**
308
+ * The column header text string.
309
+ */
310
+ $implicit: string;
311
+ };
312
+ /**
313
+ * Context data provided to cell render template.
314
+ *
315
+ * Provides comprehensive access to cell, row, and column information
316
+ * for use within custom Angular templates.
317
+ *
318
+ * @template Data - Type of data objects displayed in the grid rows
319
+ */
320
+ type RenderTemplateData<Data extends AnyDict = AnyDict> = {
321
+ /**
322
+ * The cell's display value as string (implicit context).
323
+ */
324
+ $implicit: string;
325
+ /**
326
+ * The cell's display value as string (same as $implicit).
327
+ */
328
+ value: string;
329
+ /**
330
+ * Complete data object for the current row.
331
+ */
332
+ row: Data;
333
+ /**
334
+ * Column definition configuration object.
335
+ */
336
+ col: GridColumn<Data>;
337
+ /**
338
+ * Zero-based row index in the current data set.
339
+ */
340
+ index: number;
341
+ };
342
+ type DeclarativeColumnDef<Data extends AnyDict = AnyDict> = {
343
+ key: DataKey<Data>;
344
+ header?: string;
345
+ headerTemplate?: TemplateRef<HeaderTemplateData>;
346
+ cellTemplate?: TemplateRef<AnyType>;
347
+ align?: GridCellAlign;
348
+ sortKey?: string;
349
+ sticky?: GridStickySide | true;
350
+ expandBy?: DataKey<Data>;
351
+ disabled?: boolean;
352
+ visible?: boolean;
353
+ width?: number;
354
+ minWidth?: number;
355
+ maxWidth?: number;
356
+ flex?: number;
357
+ type?: GridCellRendererType;
358
+ typeParams?: AnyType;
359
+ defaultValue?: AnyType;
360
+ value?: GridCellRenderer<Data>;
361
+ track?: (row: Data) => string;
362
+ tooltip?: GridColumnTooltip<Data>;
363
+ };
364
+
365
+ type DataGridRowTemplateContext<Data extends AnyDict> = {
366
+ $implicit: Data;
367
+ index: number;
368
+ columns: GridColumn<Data>[];
369
+ rowHeight: number;
370
+ isSticky: boolean;
371
+ };
372
+ /**
373
+ * Directive for providing a custom template for data grid rows.
374
+ *
375
+ * Used as a structural directive on `<ng-template>` elements within data grid components.
376
+ * The template receives row data, index, columns, and layout helpers.
377
+ *
378
+ * Example:
379
+ * ```html
380
+ * <ng-template reDataGridRow let-row let-index="index">
381
+ * <div class="my-row">{{ index + 1 }} - {{ row.name }}</div>
382
+ * </ng-template>
383
+ * ```
384
+ *
385
+ * Template context:
386
+ * - `$implicit: Data` — row data
387
+ * - `index: number` — row index
388
+ * - `columns: GridColumn<Data>[]` — visible columns
389
+ * - `rowHeight: number` — row height in pixels
390
+ * - `isSticky: boolean` — sticky row flag
391
+ */
392
+ declare class DataGridRowDirective<Data extends AnyDict> {
393
+ tpl: TemplateRef<any>;
394
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<DataGridRowDirective<any>, never>;
395
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<DataGridRowDirective<any>, "ng-template[reDataGridRow]", never, {}, {}, never, never, true, never>;
396
+ }
397
+
398
+ declare class DataGridDeclarativeColumn<Data extends AnyDict = AnyDict> {
399
+ key: _angular_core.InputSignal<DataKey<Data>>;
400
+ header: _angular_core.InputSignal<string | undefined>;
401
+ align: _angular_core.InputSignal<GridCellAlign | undefined>;
402
+ sortKey: _angular_core.InputSignal<string | undefined>;
403
+ sticky: _angular_core.InputSignal<true | GridStickySide | undefined>;
404
+ expandBy: _angular_core.InputSignal<DataKey<Data> | undefined>;
405
+ disabled: _angular_core.InputSignalWithTransform<boolean, string | boolean | undefined>;
406
+ visible: _angular_core.InputSignalWithTransform<boolean, string | boolean | undefined>;
407
+ width: _angular_core.InputSignalWithTransform<number | undefined, string | number | undefined>;
408
+ minWidth: _angular_core.InputSignalWithTransform<number | undefined, string | number | undefined>;
409
+ maxWidth: _angular_core.InputSignalWithTransform<number | undefined, string | number | undefined>;
410
+ flex: _angular_core.InputSignalWithTransform<number | undefined, string | number | undefined>;
411
+ type: _angular_core.InputSignal<GridCellRendererType | undefined>;
412
+ typeParams: _angular_core.InputSignal<any>;
413
+ defaultValue: _angular_core.InputSignal<any>;
414
+ value: _angular_core.InputSignal<GridCellRenderer<Data> | undefined>;
415
+ track: _angular_core.InputSignal<((row: Data) => string) | undefined>;
416
+ tooltip: _angular_core.InputSignal<GridColumnTooltip<Data> | undefined>;
417
+ private headerTplRef;
418
+ private cellTplRef;
419
+ toDeclarativeColumn(): DeclarativeColumnDef<Data>;
420
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<DataGridDeclarativeColumn<any>, never>;
421
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<DataGridDeclarativeColumn<any>, "re-dg-column", never, { "key": { "alias": "key"; "required": true; "isSignal": true; }; "header": { "alias": "header"; "required": false; "isSignal": true; }; "align": { "alias": "align"; "required": false; "isSignal": true; }; "sortKey": { "alias": "sortKey"; "required": false; "isSignal": true; }; "sticky": { "alias": "sticky"; "required": false; "isSignal": true; }; "expandBy": { "alias": "expandBy"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "visible": { "alias": "visible"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "minWidth": { "alias": "minWidth"; "required": false; "isSignal": true; }; "maxWidth": { "alias": "maxWidth"; "required": false; "isSignal": true; }; "flex": { "alias": "flex"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "typeParams": { "alias": "typeParams"; "required": false; "isSignal": true; }; "defaultValue": { "alias": "defaultValue"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "track": { "alias": "track"; "required": false; "isSignal": true; }; "tooltip": { "alias": "tooltip"; "required": false; "isSignal": true; }; }, {}, ["headerTplRef", "cellTplRef"], ["*"], true, never>;
422
+ }
423
+
424
+ declare class DataGridDeclarativeHeaderDirective {
425
+ tpl: TemplateRef<any>;
426
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<DataGridDeclarativeHeaderDirective, never>;
427
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<DataGridDeclarativeHeaderDirective, "ng-template[reHeader]", never, {}, {}, never, never, true, never>;
428
+ }
429
+ declare class DataGridDeclarativeCellDirective {
430
+ tpl: TemplateRef<any>;
431
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<DataGridDeclarativeCellDirective, never>;
432
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<DataGridDeclarativeCellDirective, "ng-template[reCell]", never, {}, {}, never, never, true, never>;
433
+ }
434
+
84
435
  /**
85
436
  * Directive for providing a custom template to display when the data grid has no data.
86
437
  *
@@ -124,6 +475,33 @@ declare class DataGridCellLoadingDirective {
124
475
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<DataGridCellLoadingDirective, "ng-template[reDataGridLoading]", never, {}, {}, never, never, true, never>;
125
476
  }
126
477
 
478
+ type DataGridStickyRowTemplateContext<Data> = {
479
+ $implicit: Data;
480
+ index: number;
481
+ };
482
+ /**
483
+ * Directive for providing a custom template for sticky rows.
484
+ *
485
+ * Used as a structural directive on `<ng-template>` elements within data grid components.
486
+ * The template receives row data and its index.
487
+ *
488
+ * Example:
489
+ * ```html
490
+ * <ng-template reDataGridStickyRow let-row let-index="index">
491
+ * <div class="my-sticky-row">{{ index }} - {{ row.name }}</div>
492
+ * </ng-template>
493
+ * ```
494
+ *
495
+ * Template context:
496
+ * - `$implicit: Data` — row data
497
+ * - `index: number` — row index
498
+ */
499
+ declare class DataGridStickyRowDirective<Data> {
500
+ tpl: TemplateRef<any>;
501
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<DataGridStickyRowDirective<any>, never>;
502
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<DataGridStickyRowDirective<any>, "ng-template[reDataGridStickyRow]", never, {}, {}, never, never, true, never>;
503
+ }
504
+
127
505
  declare class DataGridSortIconDirective {
128
506
  tpl: TemplateRef<any>;
129
507
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<DataGridSortIconDirective, never>;
@@ -135,43 +513,6 @@ declare class DataGridExpanderIconDirective {
135
513
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<DataGridExpanderIconDirective, "ng-template[reDataGridExpanderIcon]", never, {}, {}, never, never, true, never>;
136
514
  }
137
515
 
138
- declare class DataGridPaginator {
139
- current: _angular_core.InputSignalWithTransform<number, string | number | undefined>;
140
- totalElements: _angular_core.InputSignalWithTransform<number, string | number | undefined>;
141
- pageSize: _angular_core.InputSignalWithTransform<number, string | number | undefined>;
142
- maxShowPages: _angular_core.InputSignalWithTransform<number, string | number | undefined>;
143
- pageChange: _angular_core.OutputEmitterRef<number>;
144
- totalPages: _angular_core.Signal<number>;
145
- pages: _angular_core.Signal<number[]>;
146
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<DataGridPaginator, never>;
147
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<DataGridPaginator, "re-data-grid-paginator", never, { "current": { "alias": "current"; "required": false; "isSignal": true; }; "totalElements": { "alias": "totalElements"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "maxShowPages": { "alias": "maxShowPages"; "required": false; "isSignal": true; }; }, { "pageChange": "pageChange"; }, never, never, true, never>;
148
- }
149
-
150
- /**
151
- * Represents a key of an object that is also a string, or any string.
152
- * Used for identifying data properties in rows.
153
- */
154
- type DataKey<Data> = (keyof Data & string) | string;
155
- /**
156
- * Function type that resolves a value of type `Return` from an argument of type `Arg`.
157
- * Often used to transform row data or extract specific properties.
158
- */
159
- type KeyResolver<Arg = AnyType, Return = string> = (arg: Arg) => Return;
160
- /**
161
- * Union type for row identification.
162
- * Can be either a property key (string) or a resolver function.
163
- */
164
- type RowKeyFn<Data> = DataKey<Data> | KeyResolver<Data, string | number>;
165
- /**
166
- * Type alias for `any`.
167
- */
168
- type AnyType = any;
169
- /**
170
- * Represents an object with string keys and values of any type.
171
- * Common base type for row data.
172
- */
173
- type AnyDict = Record<string, AnyType>;
174
-
175
516
  /**
176
517
  * Defines how pagination is displayed and handled in the data grid.
177
518
  *
@@ -188,44 +529,20 @@ type GridPaginationMode = 'none' | 'pagination' | 'infinity';
188
529
  */
189
530
  type GridPinnedPosition = 'top' | 'bottom';
190
531
  /**
191
- * Row selection mode for the data grid.
192
- *
193
- * - `'single'` - Allow selecting only one row at a time
194
- * - `'multi'` - Allow selecting multiple rows
195
- * - `'none'` - Disable row selection
196
- */
197
- type GridSelectMode = 'single' | 'multi' | 'none';
198
- /**
199
- * Sort direction for grid columns.
200
- *
201
- * - `'asc'` - Ascending order (A to Z, 0 to 9)
202
- * - `'desc'` - Descending order (Z to A, 9 to 0)
203
- */
204
- type GridSortOrder = 'asc' | 'desc';
205
- /**
206
- * Horizontal alignment options for grid cell content.
207
- *
208
- * - `'left'` - Align content to the left
209
- * - `'center'` - Center align content
210
- * - `'right'` - Align content to the right
211
- */
212
- type GridCellAlign = 'left' | 'center' | 'right';
213
- /**
214
- * Built-in cell renderer types for common data display formats.
532
+ * Row selection mode for the data grid.
215
533
  *
216
- * - `'plain'` - Display raw text value (default)
217
- * - `'date'` - Format and display date values
218
- * - `'number'` - Format and display numeric values
219
- * - `'index'` - Display row index number
220
- * - `'checkbox'` - Display checkbox for selection
534
+ * - `'single'` - Allow selecting only one row at a time
535
+ * - `'multi'` - Allow selecting multiple rows
536
+ * - `'none'` - Disable row selection
221
537
  */
222
- type GridCellRendererType = 'plain' | 'date' | 'number' | 'index' | 'checkbox';
538
+ type GridSelectMode = 'single' | 'multi' | 'none';
223
539
  /**
224
- * Array of column definitions for the data grid.
540
+ * Sort direction for grid columns.
225
541
  *
226
- * @template Data - Type of data objects displayed in the grid rows
542
+ * - `'asc'` - Ascending order (A to Z, 0 to 9)
543
+ * - `'desc'` - Descending order (Z to A, 9 to 0)
227
544
  */
228
- type GridColumns<Data extends AnyDict = AnyDict> = GridColumn<Data>[];
545
+ type GridSortOrder = 'asc' | 'desc';
229
546
  /**
230
547
  * Array of pinned row definitions for the data grid.
231
548
  *
@@ -301,187 +618,62 @@ type GridPinnedRow<Data extends AnyDict = AnyDict> = {
301
618
  $implicit: Partial<Data>;
302
619
  }>;
303
620
  };
304
- /**
305
- * Union type representing different column definition variants.
306
- *
307
- * A column can use built-in renderers, custom value functions, or Angular templates
308
- * for rendering cell content.
309
- *
310
- * @template Data - Type of data objects displayed in the grid rows
311
- */
312
- type GridColumn<Data extends AnyDict = AnyDict> = _DefaultGridColumn<Data> | _ValuedGridColumn<Data> | _TemplatedGridColumn<Data>;
313
- /**
314
- * Base properties shared by all column definition types.
315
- *
316
- * Contains configuration for column identification, header display,
317
- * sizing, alignment, visibility, and behavior.
318
- *
319
- * @template Data - Type of data objects displayed in the grid rows
320
- */
321
- type _BaseGridColumn<Data extends AnyDict = AnyDict> = {
322
- /**
323
- * Data property key this column displays.
324
- */
325
- key: DataKey<Data>;
326
- /**
327
- * Optional alternative key for sorting (if different from a display key).
328
- */
329
- sortKey?: string;
330
- /**
331
- * Column header text string.
332
- */
333
- header: string;
334
- /**
335
- * Optional Angular template for custom header rendering.
336
- * If provided, overrides the default text header.
337
- */
338
- headerTemplate?: TemplateRef<HeaderTemplateData>;
339
- /**
340
- * Horizontal alignment of cell content.
341
- */
342
- align?: GridCellAlign;
343
- /**
344
- * CSS class(es) to apply to cells.
345
- * Can be a static string or a resolver function that returns a class string based on row data.
346
- */
347
- cellClass?: KeyResolver<Data> | string;
348
- /**
349
- * Fixed column width in pixels.
350
- */
351
- width?: number;
352
- /**
353
- * Minimum column width in pixels.
354
- */
355
- minWidth?: number;
356
- /**
357
- * Maximum column width in pixels.
358
- */
359
- maxWidth?: number;
360
- /**
361
- * Flex grow factor for flexible width columns.
362
- */
363
- flex?: number;
364
- /**
365
- * Whether the column is disabled.
366
- */
367
- disabled?: boolean;
368
- /**
369
- * Whether the column is visible.
370
- */
371
- visible?: boolean;
372
- /**
373
- * Whether the column remains fixed during the horizontal scroll.
374
- */
375
- sticky?: boolean;
376
- /**
377
- * Data key to use for expanding/collapsing row details.
378
- */
379
- expandBy?: DataKey<Data>;
380
- };
381
- /**
382
- * Column definition using built-in cell renderer types.
383
- *
384
- * Extends the base column with an optional renderer type specification.
385
- * If no type is specified, defaults to `'plain'` renderer.
386
- *
387
- * @template Data - Type of data objects displayed in the grid rows
388
- */
389
- type _DefaultGridColumn<Data extends AnyDict = AnyDict> = _BaseGridColumn<Data> & {
390
- /**
391
- * Built-in renderer type for formatting cell values.
392
- */
393
- type?: GridCellRendererType;
394
- /**
395
- * Optional configuration or formatting options passed to the renderer (e.g., date/number format). *[NEW in 1.1.0]*
396
- */
397
- typeParams?: AnyType;
398
- };
399
- /**
400
- * Column definition using a custom value renderer function.
401
- *
402
- * Allows custom logic for transforming row data into display values.
403
- * Requires a tracking function for change detection optimization.
404
- *
405
- * @template Data - Type of data objects displayed in the grid rows
406
- */
407
- type _ValuedGridColumn<Data extends AnyDict = AnyDict> = _BaseGridColumn<Data> & {
408
- /**
409
- * Function returning unique identifier for the row (for change detection).
410
- */
411
- track: (row: Data) => string;
412
- /**
413
- * Function that resolves cell display value from row data.
414
- */
415
- value: GridCellRenderer<Data>;
416
- };
417
- /**
418
- * Column definition using an Angular template for cell rendering.
419
- *
420
- * Provides maximum flexibility by allowing custom HTML templates
421
- * with full access to row data, column config, and cell context.
422
- * Requires a tracking function for change detection optimization.
423
- *
424
- * @template Data - Type of data objects displayed in the grid rows
425
- */
426
- type _TemplatedGridColumn<Data extends AnyDict = AnyDict> = _BaseGridColumn<Data> & {
427
- /**
428
- * Function returning unique identifier for the row (for change detection).
429
- */
430
- track: (row: Data) => string;
431
- /**
432
- * Angular TemplateRef for rendering cell content.
433
- */
434
- renderTemplate: TemplateRef<RenderTemplateData<Data>>;
621
+
622
+ type DataGridTranslations = {
623
+ emptyState: string;
624
+ itemsPerPageLabel: string;
625
+ nextPageLabel: string;
626
+ prevPageLabel: string;
435
627
  };
436
628
  /**
437
- * Type for custom cell value resolver functions.
438
- *
439
- * Function that takes row data and returns a string or number for display.
440
- * Used in `_ValuedGridColumn` to customize how cell values are extracted and formatted.
441
- *
442
- * @template Data - Type of data objects displayed in the grid rows
443
- */
444
- type GridCellRenderer<Data> = KeyResolver<Data, string | number>;
445
- /**
446
- * Context data provided to the header template.
629
+ * Global default configuration for all `re-data-grid` instances.
447
630
  *
448
- * Implicit value is the header text string.
631
+ * Use this shape in `provideDataGridDefaults(...)` to override base behavior
632
+ * (pagination mode, row sizes, buffering, labels, debounce timings, etc.)
633
+ * application-wide or within a scoped injector.
449
634
  */
450
- type HeaderTemplateData = {
451
- /**
452
- * The column header text string.
453
- */
454
- $implicit: string;
635
+ type DataGridConfigProvider = {
636
+ /** Pagination mode for the data grid. */
637
+ mode: GridPaginationMode;
638
+ /** Whether to display an index column with row numbers. */
639
+ hasIndexColumn: boolean;
640
+ /** Row selection configuration, including selection mode and behavior. */
641
+ selection: GridSelection;
642
+ /** Number of items to display per page. */
643
+ pageSize: number;
644
+ /** Height of each data row in pixels. */
645
+ rowHeight: number;
646
+ /** Height of the header row in pixels. */
647
+ headerHeight: number;
648
+ /** Grid height: a number in pixels, 'full' for 100% height, or 'default' for auto-calculated height. */
649
+ height: number | 'full' | 'default';
650
+ /** Number of extra rows to render above and below the visible viewport for smoother scrolling. */
651
+ virtualBuffer: number;
652
+ /** Loading indicator style: 'spinner' shows a loading spinner, 'skeleton' shows skeleton placeholders. */
653
+ loadingMode: 'spinner' | 'skeleton';
654
+ /** Whether pagination starts from page 0 (true) or page 1 (false). */
655
+ pageStartFromZero: boolean;
656
+ /** Text strings for UI labels and messages. */
657
+ translations: DataGridTranslations;
658
+ /** Debounce timings in milliseconds for resize and scroll events to optimize performance. */
659
+ debounce: {
660
+ resize: number;
661
+ scroll: number;
662
+ };
455
663
  };
664
+ declare const DEFAULT_DATA_GRID_DEFAULTS: DataGridConfigProvider;
665
+ declare const DATA_GRID_CONFIG: InjectionToken<DataGridConfigProvider>;
456
666
  /**
457
- * Context data provided to cell render template.
458
- *
459
- * Provides comprehensive access to cell, row, and column information
460
- * for use within custom Angular templates.
667
+ * Provides default configuration for Data Grid, overriding base settings.
461
668
  *
462
- * @template Data - Type of data objects displayed in the grid rows
669
+ * @param config Partial configuration object to be merged with current settings.
670
+ * @returns EnvironmentProviders for use in application or component configuration.
463
671
  */
464
- type RenderTemplateData<Data extends AnyDict = AnyDict> = {
465
- /**
466
- * The cell's display value as string (implicit context).
467
- */
468
- $implicit: string;
469
- /**
470
- * The cell's display value as string (same as $implicit).
471
- */
472
- value: string;
473
- /**
474
- * Complete data object for the current row.
475
- */
476
- row: Data;
477
- /**
478
- * Column definition configuration object.
479
- */
480
- col: GridColumn<Data>;
481
- /**
482
- * Zero-based row index in the current data set.
483
- */
484
- index: number;
672
+ declare function provideDataGridDefaults(config: Partial<DataGridConfigProvider>): EnvironmentProviders;
673
+
674
+ type DeclarativeColumnsResult<Data extends AnyDict = AnyDict> = {
675
+ columns: GridColumns<Data>;
676
+ rowCellTemplatesByKey: Map<string, TemplateRef<AnyType>>;
485
677
  };
486
678
 
487
679
  /**
@@ -533,6 +725,7 @@ type GridSelectEvent<Data extends AnyDict = AnyDict> = {
533
725
  type GridRowClickEvent<Data extends AnyDict = AnyDict> = {
534
726
  row: Data;
535
727
  index: number;
728
+ event: Event;
536
729
  };
537
730
  /**
538
731
  * Event emitted when a specific cell is clicked in the data grid.
@@ -546,6 +739,97 @@ type GridCellClickEvent<Data extends AnyDict = AnyDict> = {
546
739
  row: Data;
547
740
  col: GridColumn<Data>;
548
741
  index: number;
742
+ event: Event;
743
+ };
744
+ /**
745
+ * Event emitted when a row is right-clicked (context menu) in the data grid.
746
+ *
747
+ * Provides access to the clicked row's data object, its index, and the native mouse event.
748
+ */
749
+ type GridRowContextEvent<Data extends AnyDict = AnyDict> = {
750
+ row: Data;
751
+ index: number;
752
+ event: MouseEvent;
753
+ };
754
+ /**
755
+ * Event emitted when a specific cell is right-clicked (context menu) in the data grid.
756
+ *
757
+ * Provides access to the clicked cell, row data, index, and the native mouse event.
758
+ */
759
+ type GridCellContextEvent<Data extends AnyDict = AnyDict> = {
760
+ row: Data;
761
+ col: GridColumn<Data>;
762
+ index: number;
763
+ event: MouseEvent;
764
+ };
765
+ /**
766
+ * Event emitted when a row is double-clicked in the data grid.
767
+ *
768
+ * Provides access to the clicked row's data object, its index, and the native mouse event.
769
+ */
770
+ type GridRowDoubleClickEvent<Data extends AnyDict = AnyDict> = {
771
+ row: Data;
772
+ index: number;
773
+ event: MouseEvent;
774
+ };
775
+ /**
776
+ * Event emitted when a specific cell is double-clicked in the data grid.
777
+ *
778
+ * Provides access to the clicked cell, row data, index, and the native mouse event.
779
+ */
780
+ type GridCellDoubleClickEvent<Data extends AnyDict = AnyDict> = {
781
+ row: Data;
782
+ col: GridColumn<Data>;
783
+ index: number;
784
+ event: MouseEvent;
785
+ };
786
+
787
+ type TemplatedHeader = {
788
+ titleTemplate: TemplateRef<HeaderTemplateData>;
789
+ };
790
+ type PlainHeader = {
791
+ title: string;
792
+ align?: GridCellAlign;
793
+ };
794
+ /**
795
+ * Defines a header group configuration for grouping multiple columns under a single header.
796
+ *
797
+ * @template Data - The data type of the grid rows
798
+ *
799
+ * @property {string} key - Unique identifier for the header group
800
+ * @property {DataKey<Data>} from - The starting column key where the header group begins
801
+ * @property {DataKey<Data>} [to] - Optional ending column key where the header group ends.
802
+ * If not provided, the group spans only the 'from' column
803
+ * @property {string} [title] - Plain text title for the header group (when using PlainHeader)
804
+ * @property {GridCellAlign} [align] - Text alignment for the header group title (when using PlainHeader)
805
+ * @property {TemplateRef<HeaderTemplateData>} [titleTemplate] - Custom template for rendering the header group title
806
+ * (when using TemplatedHeader)
807
+ */
808
+ type GridHeaderGroup<Data extends AnyDict = AnyDict> = {
809
+ key: string;
810
+ from: DataKey<Data>;
811
+ to?: DataKey<Data>;
812
+ } & (TemplatedHeader | PlainHeader);
813
+ /**
814
+ * Internal normalized representation of a header group after processing.
815
+ * Used by the grid component to render header groups with calculated dimensions.
816
+ *
817
+ * @property {string} key - Unique identifier for the normalized header
818
+ * @property {string} [title] - Plain text title for the header
819
+ * @property {TemplateRef<HeaderTemplateData>} [titleTemplate] - Custom template for rendering the header title
820
+ * @property {GridCellAlign} [align] - Text alignment for the header title
821
+ * @property {number} widthPx - Calculated width of the header in pixels
822
+ * @property {string} [startKey] - Column key where the header group starts
823
+ * @property {string} [endKey] - Column key where the header group ends
824
+ */
825
+ type NormalizedHeader = {
826
+ key: string;
827
+ title?: string;
828
+ titleTemplate?: TemplateRef<HeaderTemplateData>;
829
+ align?: GridCellAlign;
830
+ widthPx: number;
831
+ startKey?: string;
832
+ endKey?: string;
549
833
  };
550
834
 
551
835
  /**
@@ -586,6 +870,7 @@ declare class DataGridVm<Data extends AnyDict> {
586
870
  * Each row includes data, position ('top' or 'bottom'), and optional ordering.
587
871
  */
588
872
  pinnedRows: _angular_core.WritableSignal<GridPinnedRow<Data>[]>;
873
+ headerGroups: _angular_core.WritableSignal<GridHeaderGroup<Data>[]>;
589
874
  /**
590
875
  * Current width of the grid container in pixels.
591
876
  *
@@ -625,6 +910,9 @@ declare class DataGridVm<Data extends AnyDict> {
625
910
  */
626
911
  globalTypeCellTpls: Map<GridCellRendererType, TemplateRef<Data>>;
627
912
  globalDataCellTpls: Map<string | keyof Data, TemplateRef<Data>>;
913
+ globalRowCellTpls: Map<string | keyof Data, TemplateRef<Data>>;
914
+ pinnedTop: _angular_core.WritableSignal<GridPinnedRow<Data>[]>;
915
+ pinnedBottom: _angular_core.WritableSignal<GridPinnedRow<Data>[]>;
628
916
  /**
629
917
  * Computed an array of non-sticky columns to display in the scrollable area.
630
918
  *
@@ -633,20 +921,18 @@ declare class DataGridVm<Data extends AnyDict> {
633
921
  * Recalculates whenever columns or container width changes.
634
922
  */
635
923
  columnsToShow: _angular_core.Signal<GridColumn<Data>[]>;
924
+ contentWidth: _angular_core.Signal<number>;
636
925
  /**
637
- * Computed array of rows pinned to the top of the grid.
926
+ * Computed array of normalized header groups with calculated widths.
638
927
  *
639
- * Filters pinned rows by 'top' position and sorts them by order property.
640
- * Rows with lower order values appear first.
641
- */
642
- pinnedTop: _angular_core.Signal<GridPinnedRow<Data>[]>;
643
- /**
644
- * Computed array of rows pinned to the bottom of the grid.
928
+ * Transforms raw header group configurations into normalized structures
929
+ * that include computed column widths for layout rendering. Returns an empty
930
+ * array if no headers or columns are configured. Recalculates whenever
931
+ * header groups or visible columns change.
645
932
  *
646
- * Filters pinned rows by 'bottom' position and sorts them by order property.
647
- * Rows with lower order values appear first.
933
+ * @returns Array of normalized header configurations with width calculations
648
934
  */
649
- pinnedBottom: _angular_core.Signal<GridPinnedRow<Data>[]>;
935
+ normalizedHeaderGroups: _angular_core.Signal<NormalizedHeader[]>;
650
936
  constructor();
651
937
  /**
652
938
  * Returns the computed width for a column by its key.
@@ -744,14 +1030,14 @@ declare class Selector<Data extends AnyDict> {
744
1030
  * - `false` if no rows are selected
745
1031
  * - `'mixed'` if some but not all rows are selected
746
1032
  *
747
- * Useful for implementing "select all" checkbox with indeterminate state.
1033
+ * Useful for implementing the "select all" checkbox with an indeterminate state.
748
1034
  */
749
1035
  isAllSelected: _angular_core.Signal<boolean | "mixed">;
750
1036
  /**
751
1037
  * Checks whether a specific row is currently selected.
752
1038
  *
753
1039
  * Compares the row's key value against the list of selected keys.
754
- * Returns `false` if selection mode is 'none' or key is not configured.
1040
+ * Returns `false` if the selection mode is 'none' or the key is not configured.
755
1041
  *
756
1042
  * @param row - The data row to check selection status for.
757
1043
  * @returns `true` if the row is selected, `false` otherwise.
@@ -785,6 +1071,14 @@ declare class Selector<Data extends AnyDict> {
785
1071
  select(row: Data): (string | Data[DataKey<Data>])[];
786
1072
  }
787
1073
 
1074
+ type TooltipState = {
1075
+ text?: string;
1076
+ tpl?: TemplateRef<GridTooltipContext<AnyDict>>;
1077
+ ctx?: GridTooltipContext<AnyDict>;
1078
+ x: number;
1079
+ y: number;
1080
+ visible: boolean;
1081
+ };
788
1082
  /**
789
1083
  * Data grid component with virtual scrolling, sorting, selection, and pagination support.
790
1084
  *
@@ -807,6 +1101,7 @@ declare class Selector<Data extends AnyDict> {
807
1101
  * ```
808
1102
  */
809
1103
  declare class DataGrid<Data extends AnyDict> {
1104
+ protected defaults: _reforgium_data_grid.DataGridConfigProvider;
810
1105
  /**
811
1106
  * Array of data to display in the table.
812
1107
  *
@@ -820,7 +1115,7 @@ declare class DataGrid<Data extends AnyDict> {
820
1115
  * Defines how each column should be rendered, sorted, and styled.
821
1116
  * Supports custom templates, sorting keys, and expandable columns.
822
1117
  */
823
- columns: _angular_core.InputSignal<GridColumn<Data>[]>;
1118
+ columns: _angular_core.InputSignal<GridColumns<Data>>;
824
1119
  /**
825
1120
  * Pagination mode: 'none', 'pagination', or 'infinity'.
826
1121
  *
@@ -836,12 +1131,26 @@ declare class DataGrid<Data extends AnyDict> {
836
1131
  * Useful for totals, summaries, or always-visible items.
837
1132
  */
838
1133
  pinnedRows: _angular_core.InputSignal<GridPinnedRow<Data>[]>;
1134
+ /**
1135
+ * Function to determine if a row should become sticky at the top.
1136
+ *
1137
+ * When provided, rows matching this predicate will stick to the top
1138
+ * of the scroll area as the user scrolls.
1139
+ */
1140
+ isRowSticky: _angular_core.InputSignal<((row: Data, index: number) => boolean) | undefined>;
1141
+ /**
1142
+ * Function to choose a custom template for a row.
1143
+ *
1144
+ * If it returns a template, the row will be rendered with it;
1145
+ * otherwise, the default row rendering is used.
1146
+ */
1147
+ getRowTemplate: _angular_core.InputSignal<((row: Data, index: number) => TemplateRef<Data> | undefined | null) | undefined>;
839
1148
  /**
840
1149
  * Whether to add an index column showing row numbers.
841
1150
  *
842
1151
  * When enabled, it automatically adds a column displaying sequential row numbers.
843
1152
  */
844
- hasIndexColumn: _angular_core.InputSignalWithTransform<boolean, string | number | undefined>;
1153
+ hasIndexColumn: _angular_core.InputSignalWithTransform<boolean, string | boolean | undefined>;
845
1154
  /**
846
1155
  * Row selection configuration.
847
1156
  *
@@ -879,9 +1188,29 @@ declare class DataGrid<Data extends AnyDict> {
879
1188
  * Size of the virtual scroll buffer.
880
1189
  *
881
1190
  * Number of extra rows to render above and below the viewport
882
- * to reduce flickering during fast scrolling. Default is 6.
1191
+ * to reduce flickering during fast scrolling. Default is 8.
883
1192
  */
884
1193
  virtualBuffer: _angular_core.InputSignal<number>;
1194
+ /**
1195
+ * Header group configuration for creating multi-level column headers.
1196
+ *
1197
+ * Allows grouping multiple columns under a common header label.
1198
+ * Each group spans from a starting column to an ending column and can have a custom alignment.
1199
+ *
1200
+ * @example
1201
+ * ```typescript
1202
+ * headerGroups = [
1203
+ * {
1204
+ * key: 'personal-info',
1205
+ * title: 'Personal Information',
1206
+ * from: 'name',
1207
+ * to: 'email',
1208
+ * align: 'center'
1209
+ * }
1210
+ * ];
1211
+ * ```
1212
+ */
1213
+ headerGroups: _angular_core.InputSignal<GridHeaderGroup<Data>[]>;
885
1214
  /**
886
1215
  * Loading state indicator.
887
1216
  *
@@ -889,8 +1218,9 @@ declare class DataGrid<Data extends AnyDict> {
889
1218
  * Useful during async data fetching operations.
890
1219
  */
891
1220
  loading: _angular_core.InputSignalWithTransform<boolean, string | boolean | undefined>;
1221
+ loadingMode: _angular_core.InputSignal<"spinner" | "skeleton">;
892
1222
  /**
893
- * Function or property name for obtaining a unique row key.
1223
+ * Function or property name for getting a unique row key.
894
1224
  *
895
1225
  * Used for efficient change detection and row tracking.
896
1226
  * Can be a property name (string) or a function that returns a unique identifier.
@@ -944,42 +1274,89 @@ declare class DataGrid<Data extends AnyDict> {
944
1274
  * Contains the clicked row data and its index.
945
1275
  */
946
1276
  rowClick: _angular_core.OutputEmitterRef<GridRowClickEvent<Data>>;
1277
+ /**
1278
+ * Event emitted when a row is right-clicked (context menu).
1279
+ *
1280
+ * Contains the clicked row data, its index, and the native mouse event.
1281
+ */
1282
+ rowContext: _angular_core.OutputEmitterRef<GridRowContextEvent<Data>>;
1283
+ /**
1284
+ * Event emitted when a row is double-clicked.
1285
+ *
1286
+ * Contains the clicked row data, its index, and the native mouse event.
1287
+ */
1288
+ rowDoubleClick: _angular_core.OutputEmitterRef<GridRowDoubleClickEvent<Data>>;
947
1289
  /**
948
1290
  * Event emitted when a cell is clicked.
949
1291
  *
950
1292
  * Contains the clicked row, column configuration, and row index.
951
1293
  */
952
1294
  cellClick: _angular_core.OutputEmitterRef<GridCellClickEvent<Data>>;
1295
+ /**
1296
+ * Event emitted when a cell is right-clicked (context menu).
1297
+ *
1298
+ * Contains the clicked row, column configuration, row index, and the native mouse event.
1299
+ */
1300
+ cellContext: _angular_core.OutputEmitterRef<GridCellContextEvent<Data>>;
1301
+ /**
1302
+ * Event emitted when a cell is double-clicked.
1303
+ *
1304
+ * Contains the clicked row, column configuration, row index, and the native mouse event.
1305
+ */
1306
+ cellDoubleClick: _angular_core.OutputEmitterRef<GridCellDoubleClickEvent<Data>>;
953
1307
  vm: DataGridVm<Data>;
954
1308
  selector: Selector<Data>;
955
1309
  private rootEl;
956
1310
  private scrollEl;
957
1311
  private headerEl;
1312
+ private ngZone;
958
1313
  private cellTypedSlotRefs;
959
1314
  private cellDataSlotRefs;
1315
+ private declarativeColumnRefs;
960
1316
  private headerSlotRefs;
961
1317
  private emptySlotRefs;
962
1318
  private loadingSlotRefs;
963
1319
  private sortIcSlotRefs;
964
1320
  private expanderIcSlotRefs;
965
- protected emptyTpl: _angular_core.Signal<DataGridCellEmptyDirective>;
1321
+ private stickyRowSlotRefs;
1322
+ private rowSlotRefs;
1323
+ protected emptyTpl: _angular_core.Signal<DataGridCellEmptyDirective | undefined>;
966
1324
  protected loadingTpl: _angular_core.Signal<DataGridCellLoadingDirective>;
967
1325
  protected sortTpl: _angular_core.Signal<DataGridSortIconDirective | undefined>;
968
1326
  protected expanderTpl: _angular_core.Signal<DataGridExpanderIconDirective | undefined>;
969
- protected visibleRows: _angular_core.WritableSignal<Data[]>;
1327
+ protected stickyRowTpl: _angular_core.Signal<DataGridStickyRowDirective<any> | undefined>;
1328
+ protected rowTpl: _angular_core.Signal<DataGridRowDirective<any> | undefined>;
1329
+ protected renderSlots: _angular_core.WritableSignal<number[]>;
1330
+ protected renderCount: number;
1331
+ private lastStartIndex;
1332
+ private lastEndIndex;
970
1333
  protected startIndex: number;
971
1334
  protected headerHeight: _angular_core.WritableSignal<number>;
1335
+ protected stickyRowIndex: _angular_core.WritableSignal<number | null>;
1336
+ protected stickyRowTopPx: _angular_core.WritableSignal<number>;
1337
+ protected stickyRowData: _angular_core.Signal<Data | null>;
1338
+ private stickyIndexes;
972
1339
  protected expanderMap: _angular_core.WritableSignal<Map<DataKey<Data>, boolean>>;
1340
+ protected declarativeColumns: _angular_core.Signal<DeclarativeColumnsResult<Data>>;
1341
+ protected sourceColumns: _angular_core.Signal<GridColumn<Data>[]>;
973
1342
  protected extendedColumns: _angular_core.Signal<GridColumn<Data>[]>;
974
1343
  /**
975
1344
  * Computed CSS height value based on height setting.
976
1345
  */
977
1346
  styleHeight: _angular_core.Signal<string>;
978
1347
  private hideSbTimeout?;
1348
+ private scrollRafId;
1349
+ private scrollbarRafId;
1350
+ private stickyRafId;
1351
+ private lastInfinityPageRequested;
1352
+ private lastInfinityTotal;
979
1353
  currentSortField?: string;
980
1354
  currentSortOrder: GridSortOrder;
981
1355
  private subscription;
982
1356
  private observer;
1357
+ private resizeSubject;
1358
+ private lastResizeWidth;
1359
+ private lastResizeHeight;
983
1360
  constructor();
984
1361
  protected resolvePinnedData(pr: GridPinnedRow): Partial<Data>;
985
1362
  /**
@@ -1001,8 +1378,11 @@ declare class DataGrid<Data extends AnyDict> {
1001
1378
  * @param row - Data row that was clicked
1002
1379
  * @param col - Column configuration of the clicked cell
1003
1380
  * @param index - Row index in the dataset
1381
+ * @param event
1004
1382
  */
1005
- protected onCellClick(row: Data, col: GridColumn<Data>, index: number): void;
1383
+ protected onCellClick(row: Data, col: GridColumn<Data>, index: number, event: Event): void;
1384
+ protected onCellContext(row: Data, col: GridColumn<Data>, index: number, event: MouseEvent): void;
1385
+ protected onCellDoubleClick(row: Data, col: GridColumn<Data>, index: number, event: MouseEvent): void;
1006
1386
  protected isExpandable(column: GridColumn<Data>): boolean;
1007
1387
  /**
1008
1388
  * Handles column expand/collapse toggle.
@@ -1037,9 +1417,16 @@ declare class DataGrid<Data extends AnyDict> {
1037
1417
  protected showScrollbar(): void;
1038
1418
  protected hideScrollbarSoon(delay?: number): void;
1039
1419
  protected trackPinnedRow: (row: GridPinnedRow) => number | undefined;
1040
- protected trackByRow: (row: Data) => string | number | Data | Data[DataKey<Data>];
1041
1420
  protected cellClass(col: GridColumn<Data>, row: Data): string | undefined;
1042
1421
  protected ariaSort(col: GridColumn<Data>): 'ascending' | 'descending' | 'none';
1422
+ private tooltipEl;
1423
+ protected tooltipState: _angular_core.WritableSignal<TooltipState>;
1424
+ protected resolveTooltip(row: Data, col: GridColumn<Data>): string | TemplateRef<GridTooltipContext<AnyDict>> | null;
1425
+ protected showTooltip(event: MouseEvent, row: Data, col: GridColumn<Data>, index: number): void;
1426
+ protected hideTooltip(): void;
1427
+ private positionTooltip;
1428
+ protected isStickyRowIndex(index: number): boolean;
1429
+ protected resolveRowTemplate(row: Data, index: number): TemplateRef<AnyType> | null;
1043
1430
  private initVm;
1044
1431
  private initSelector;
1045
1432
  private initRefs;
@@ -1048,10 +1435,20 @@ declare class DataGrid<Data extends AnyDict> {
1048
1435
  private initScroll;
1049
1436
  private initObserver;
1050
1437
  private initExpander;
1438
+ private scheduleScrollbarUpdate;
1439
+ private scheduleScrollTick;
1440
+ private clearScrollRaf;
1441
+ private ensureRenderSlots;
1442
+ private clearScrollbarRaf;
1443
+ private scheduleStickyUpdate;
1444
+ private clearStickyRaf;
1445
+ private updateStickyRow;
1446
+ private updateStickyFromScroll;
1447
+ private findStickyIndexBefore;
1051
1448
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<DataGrid<any>, never>;
1052
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<DataGrid<any>, "re-data-grid", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "pinnedRows": { "alias": "pinnedRows"; "required": false; "isSignal": true; }; "hasIndexColumn": { "alias": "hasIndexColumn"; "required": false; "isSignal": true; }; "selection": { "alias": "selection"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "rowHeight": { "alias": "rowHeight"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "virtualBuffer": { "alias": "virtualBuffer"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "rowKey": { "alias": "rowKey"; "required": false; "isSignal": true; }; "pageStartFromZero": { "alias": "pageStartFromZero"; "required": false; "isSignal": true; }; }, { "pageChange": "pageChange"; "sortChange": "sortChange"; "selectChange": "selectChange"; "rowClick": "rowClick"; "cellClick": "cellClick"; }, ["cellTypedSlotRefs", "cellDataSlotRefs", "headerSlotRefs", "emptySlotRefs", "loadingSlotRefs", "sortIcSlotRefs", "expanderIcSlotRefs"], never, true, never>;
1449
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<DataGrid<any>, "re-data-grid", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "pinnedRows": { "alias": "pinnedRows"; "required": false; "isSignal": true; }; "isRowSticky": { "alias": "isRowSticky"; "required": false; "isSignal": true; }; "getRowTemplate": { "alias": "getRowTemplate"; "required": false; "isSignal": true; }; "hasIndexColumn": { "alias": "hasIndexColumn"; "required": false; "isSignal": true; }; "selection": { "alias": "selection"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "rowHeight": { "alias": "rowHeight"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "virtualBuffer": { "alias": "virtualBuffer"; "required": false; "isSignal": true; }; "headerGroups": { "alias": "headerGroups"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "loadingMode": { "alias": "loadingMode"; "required": false; "isSignal": true; }; "rowKey": { "alias": "rowKey"; "required": false; "isSignal": true; }; "pageStartFromZero": { "alias": "pageStartFromZero"; "required": false; "isSignal": true; }; }, { "pageChange": "pageChange"; "sortChange": "sortChange"; "selectChange": "selectChange"; "rowClick": "rowClick"; "rowContext": "rowContext"; "rowDoubleClick": "rowDoubleClick"; "cellClick": "cellClick"; "cellContext": "cellContext"; "cellDoubleClick": "cellDoubleClick"; }, ["cellTypedSlotRefs", "cellDataSlotRefs", "declarativeColumnRefs", "headerSlotRefs", "emptySlotRefs", "loadingSlotRefs", "sortIcSlotRefs", "expanderIcSlotRefs", "stickyRowSlotRefs", "rowSlotRefs"], never, true, never>;
1053
1450
  }
1054
1451
 
1055
- export { DataGrid, DataGridCellEmptyDirective, DataGridCellLoadingDirective, DataGridCellTemplateDirective, DataGridExpanderIconDirective, DataGridHeaderTemplateDirective, DataGridPaginator, DataGridSortIconDirective, DataGridTypeCellTemplateDirective };
1056
- export type { GridCellClickEvent, GridCellRenderer, GridColumn, GridColumns, GridPageChangeEvent, GridPinnedRow, GridPinnedRows, GridRowClickEvent, GridSelectEvent, GridSelection, GridSortEvent };
1452
+ export { DATA_GRID_CONFIG, DEFAULT_DATA_GRID_DEFAULTS, DataGrid, DataGridCellEmptyDirective, DataGridCellLoadingDirective, DataGridCellTemplateDirective, DataGridDeclarativeCellDirective, DataGridDeclarativeColumn, DataGridDeclarativeHeaderDirective, DataGridExpanderIconDirective, DataGridHeaderTemplateDirective, DataGridRowDirective, DataGridSortIconDirective, DataGridStickyRowDirective, DataGridTypeCellTemplateDirective, provideDataGridDefaults };
1453
+ export type { DataGridConfigProvider, DataGridRowTemplateContext, DataGridStickyRowTemplateContext, DeclarativeColumnDef, GridCellClickEvent, GridCellContextEvent, GridCellDoubleClickEvent, GridCellRenderer, GridColumn, GridColumns, GridHeaderGroup, GridPageChangeEvent, GridPinnedRow, GridPinnedRows, GridRowClickEvent, GridRowContextEvent, GridRowDoubleClickEvent, GridSelectEvent, GridSelection, GridSortEvent, RenderTemplateData };
1057
1454
  //# sourceMappingURL=reforgium-data-grid.d.ts.map