@angular-bootstrap/ngbootstrap 2.0.2 → 2.1.0

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 i0 from '@angular/core';
2
- import { EventEmitter, AfterViewInit, OnDestroy, ElementRef, ChangeDetectorRef, TemplateRef, AfterContentInit, OnChanges, SimpleChanges, InjectionToken, OnInit, AfterViewChecked, QueryList } from '@angular/core';
2
+ import { EventEmitter, AfterViewInit, OnDestroy, ElementRef, ChangeDetectorRef, TemplateRef, OnInit, OnChanges, SimpleChanges, AfterContentInit, InjectionToken, AfterViewChecked, QueryList } from '@angular/core';
3
3
  import { AbstractControl, FormGroup, FormControl, ControlValueAccessor } from '@angular/forms';
4
4
  import { Observable } from 'rxjs';
5
5
  import * as _angular_bootstrap_ngbootstrap from '@angular-bootstrap/ngbootstrap';
@@ -11,13 +11,13 @@ type NgbFilterOperator = 'contains' | 'doesnotcontain' | 'eq' | 'neq' | 'startsw
11
11
  interface NgbFilterDescriptor {
12
12
  field: string;
13
13
  operator: NgbFilterOperator;
14
- value?: any;
14
+ value?: unknown;
15
15
  ignoreCase?: boolean;
16
16
  }
17
17
  /** Single condition in a column filter menu or layout-toolbar filter tool. */
18
18
  interface NgbMenuFilterConditionDraft {
19
19
  operator: NgbFilterOperator;
20
- value: any;
20
+ value: unknown;
21
21
  }
22
22
  interface NgbCompositeFilterDescriptor {
23
23
  logic: 'and' | 'or';
@@ -47,7 +47,7 @@ declare function ngbOperatorRequiresFilterValue(operator: NgbFilterOperator): bo
47
47
  * Returns a new composite filter with the field set (or removed when value is empty).
48
48
  * Supports manual `filterChange(root)` updates from custom filter templates.
49
49
  */
50
- declare function ngbSetFieldFilter(composite: NgbCompositeFilterDescriptor, field: string, operator: NgbFilterOperator, value?: any, options?: {
50
+ declare function ngbSetFieldFilter(composite: NgbCompositeFilterDescriptor, field: string, operator: NgbFilterOperator, value?: unknown, options?: {
51
51
  requiresValue?: (operator: NgbFilterOperator) => boolean;
52
52
  }): NgbCompositeFilterDescriptor;
53
53
 
@@ -79,7 +79,7 @@ interface ColumnDef<T = any> {
79
79
  type?: ColumnType;
80
80
  options?: Array<{
81
81
  label: string;
82
- value: any;
82
+ value: unknown;
83
83
  }>;
84
84
  width?: number;
85
85
  /** Groups cells in stacked card layout (`tableOptions.stackedLayout = 'cards'`). */
@@ -232,109 +232,19 @@ declare function ngbResolveDatagridPagerSettings(pageable: boolean | NgbDatagrid
232
232
  pageSizeOptions?: number[];
233
233
  }): NgbPagerSettings | null;
234
234
 
235
- interface CellCtx<T = any> {
236
- $implicit: any;
237
- row: T;
238
- col: ColumnDef<T>;
239
- index: number;
240
- }
241
- interface EditCtx<T = any> {
242
- $implicit: AbstractControl | null;
243
- control: AbstractControl | null;
244
- row: T;
245
- col: ColumnDef<T>;
246
- form: FormGroup;
247
- index: number;
248
- isNew: boolean;
249
- }
250
- interface FilterCtx<T = any> {
251
- $implicit: AbstractControl | null;
252
- control: AbstractControl | null;
253
- col: ColumnDef<T>;
254
- /** Column field name (same as `col.field`). */
255
- field: string;
256
- descriptor: NgbFilterDescriptor | null;
257
- /** Current composite filter root (clone). Use with `filterChange` for custom filter templates. */
258
- filter: NgbCompositeFilterDescriptor;
259
- operators: NgbFilterOperator[];
260
- setOperator: (operator: NgbFilterOperator) => void;
261
- setValue: (value: any) => void;
262
- clear: () => void;
263
- /** Replaces the grid filter state and emits `filterChange` when enabled. */
264
- filterChange: (filter: NgbCompositeFilterDescriptor) => void;
265
- /** Sets this column's field filter in the current descriptor and commits. */
266
- setFieldFilter: (operator: NgbFilterOperator, value?: any) => void;
267
- }
268
- interface GlobalFilterCtx {
269
- $implicit: AbstractControl;
270
- }
271
- interface PagerCtx<T = any> {
272
- grid: T;
273
- page: number;
274
- pageSize: number;
275
- total: number;
276
- pageCount: number;
277
- }
278
- declare class NgbCellTemplate<T = any> {
279
- readonly template: TemplateRef<CellCtx<T>>;
280
- field: string;
281
- constructor(template: TemplateRef<CellCtx<T>>);
282
- static ɵfac: i0.ɵɵFactoryDeclaration<NgbCellTemplate<any>, never>;
283
- static ɵdir: i0.ɵɵDirectiveDeclaration<NgbCellTemplate<any>, "ng-template[ngbCell]", never, { "field": { "alias": "ngbCell"; "required": false; }; }, {}, never, never, true, never>;
284
- }
285
- declare class NgbEditorTemplate<T = any> {
286
- readonly template: TemplateRef<EditCtx<T>>;
287
- field: string;
288
- constructor(template: TemplateRef<EditCtx<T>>);
289
- static ɵfac: i0.ɵɵFactoryDeclaration<NgbEditorTemplate<any>, never>;
290
- static ɵdir: i0.ɵɵDirectiveDeclaration<NgbEditorTemplate<any>, "ng-template[ngbEditor]", never, { "field": { "alias": "ngbEditor"; "required": false; }; }, {}, never, never, true, never>;
291
- }
292
- declare class NgbFilterTemplate<T = any> {
293
- readonly template: TemplateRef<FilterCtx<T>>;
294
- field: string;
295
- constructor(template: TemplateRef<FilterCtx<T>>);
296
- static ɵfac: i0.ɵɵFactoryDeclaration<NgbFilterTemplate<any>, never>;
297
- static ɵdir: i0.ɵɵDirectiveDeclaration<NgbFilterTemplate<any>, "ng-template[ngbFilter]", never, { "field": { "alias": "ngbFilter"; "required": false; }; }, {}, never, never, true, never>;
298
- }
299
- declare class NgbFilterMenuTemplate<T = any> {
300
- readonly template: TemplateRef<FilterCtx<T>>;
301
- field: string;
302
- constructor(template: TemplateRef<FilterCtx<T>>);
303
- static ɵfac: i0.ɵɵFactoryDeclaration<NgbFilterMenuTemplate<any>, never>;
304
- static ɵdir: i0.ɵɵDirectiveDeclaration<NgbFilterMenuTemplate<any>, "ng-template[ngbFilterMenu]", never, { "field": { "alias": "ngbFilterMenu"; "required": false; }; }, {}, never, never, true, never>;
305
- }
306
- declare class NgbGlobalFilterTemplate {
307
- readonly template: TemplateRef<GlobalFilterCtx>;
308
- constructor(template: TemplateRef<GlobalFilterCtx>);
309
- static ɵfac: i0.ɵɵFactoryDeclaration<NgbGlobalFilterTemplate, never>;
310
- static ɵdir: i0.ɵɵDirectiveDeclaration<NgbGlobalFilterTemplate, "ng-template[ngbGlobalFilter]", never, {}, {}, never, never, true, never>;
311
- }
312
- declare class NgbRowDetailTemplate<T = any> {
313
- readonly template: TemplateRef<{
314
- $implicit: T;
315
- index: number;
316
- }>;
317
- constructor(template: TemplateRef<{
318
- $implicit: T;
319
- index: number;
320
- }>);
321
- static ɵfac: i0.ɵɵFactoryDeclaration<NgbRowDetailTemplate<any>, never>;
322
- static ɵdir: i0.ɵɵDirectiveDeclaration<NgbRowDetailTemplate<any>, "ng-template[ngbRowDetail]", never, {}, {}, never, never, true, never>;
323
- }
324
- declare class NgbPagerTemplate<T = any> {
325
- readonly template: TemplateRef<PagerCtx<T>>;
326
- constructor(template: TemplateRef<PagerCtx<T>>);
327
- static ɵfac: i0.ɵɵFactoryDeclaration<NgbPagerTemplate<any>, never>;
328
- static ɵdir: i0.ɵɵDirectiveDeclaration<NgbPagerTemplate<any>, "ng-template[ngbPager]", never, {}, {}, never, never, true, never>;
329
- }
330
- /** Handy constant to import in consumer apps */
331
- declare const DATAGRID_TEMPLATE_DIRECTIVES: (typeof NgbCellTemplate | typeof NgbFilterTemplate | typeof NgbGlobalFilterTemplate | typeof NgbPagerTemplate)[];
332
-
333
235
  type NgbDataGridSortDirection = 'asc' | 'desc';
334
236
  interface NgbDataGridSortDescriptor {
335
237
  field: string;
336
238
  direction: NgbDataGridSortDirection;
337
239
  }
240
+ interface NgbDataGridGroupDescriptor {
241
+ field: string;
242
+ dir?: NgbDataGridSortDirection;
243
+ aggregates?: NgbDataGridAggregateDescriptor[];
244
+ }
245
+ interface NgbDataGridGroupChange {
246
+ group: NgbDataGridGroupDescriptor[];
247
+ }
338
248
  interface NgbDataGridState {
339
249
  /** 1-based page number used by the DataGrid pager. */
340
250
  page?: number;
@@ -344,18 +254,26 @@ interface NgbDataGridState {
344
254
  skip?: number;
345
255
  pageSize?: number;
346
256
  sort?: NgbDataGridSortDescriptor[];
257
+ group?: NgbDataGridGroupDescriptor[];
347
258
  filter?: NgbCompositeFilterDescriptor;
348
259
  globalFilter?: string;
349
260
  }
350
- type NgbDataGridAggregateFunction = 'count' | 'sum' | 'average' | 'min' | 'max';
261
+ type NgbDataGridAggregateFunction = 'count' | 'sum' | 'average' | 'avg' | 'min' | 'max';
262
+ type NgbDataGridAggregateType = NgbDataGridAggregateFunction;
351
263
  interface NgbDataGridAggregateDescriptor {
352
264
  field: string;
353
265
  aggregate: NgbDataGridAggregateFunction;
354
266
  }
355
267
  type NgbDataGridAggregateResults = Record<string, Partial<Record<NgbDataGridAggregateFunction, number | string | Date | null>>>;
268
+ interface NgbDataGridGroupingSettings {
269
+ showFooter?: boolean;
270
+ stickyHeaders?: boolean;
271
+ stickyFooters?: boolean;
272
+ }
356
273
  interface NgbDataGridProcessOptions<T = unknown> {
357
274
  state?: NgbDataGridState | null;
358
275
  aggregates?: NgbDataGridAggregateDescriptor[];
276
+ groupedData?: NgbDataGridGroupResult<T>[] | null;
359
277
  globalFilterFields?: string[];
360
278
  columns?: Array<{
361
279
  field: Extract<keyof T, string> | string;
@@ -372,6 +290,16 @@ interface NgbDataGridDataResult<T = unknown> {
372
290
  data: T[];
373
291
  total: number;
374
292
  aggregates?: NgbDataGridAggregateResults;
293
+ groupedData?: NgbDataGridGroupResult<T>[];
294
+ }
295
+ interface NgbDataGridGroupResult<T = unknown> {
296
+ field: string;
297
+ value: unknown;
298
+ dir: NgbDataGridSortDirection;
299
+ level: number;
300
+ count: number;
301
+ aggregates?: NgbDataGridAggregateResults;
302
+ items: Array<NgbDataGridGroupResult<T> | T>;
375
303
  }
376
304
  type NgbDataGridExportType = 'pdf' | 'excel' | 'both';
377
305
  type NgbDataGridExportPages = 'all' | 'current' | 'selection';
@@ -411,6 +339,7 @@ type NgbEditMode = 'inline' | 'incell' | 'external' | 'toolbar';
411
339
  /** Labels and visibility for the built-in multi-checkbox filter menu footer. */
412
340
  /** Segment returned by {@link Datagrid.getSearchHighlightSegments} for match highlighting. */
413
341
  interface NgbSearchHighlightSegment {
342
+ key: string;
414
343
  text: string;
415
344
  match: boolean;
416
345
  }
@@ -419,7 +348,7 @@ interface NgbColumnReorderOptions {
419
348
  /** When true (default), inserts before the column at the destination index. When false, inserts after it. */
420
349
  before?: boolean;
421
350
  }
422
- interface NgbColumnReorderEvent<T = any> {
351
+ interface NgbColumnReorderEvent<T = unknown> {
423
352
  /** Visible columns in their new order. */
424
353
  columns: Array<{
425
354
  field: string;
@@ -441,22 +370,156 @@ interface NgbMultiCheckboxFilterOptions {
441
370
  showCancel?: boolean;
442
371
  }
443
372
 
444
- type NgbDatagridTrackByFn<T> = (index: number, row: T) => any;
373
+ interface CellCtx<T = any> {
374
+ $implicit: any;
375
+ row: T;
376
+ col: ColumnDef<T>;
377
+ index: number;
378
+ }
379
+ interface EditCtx<T = any> {
380
+ $implicit: AbstractControl | null;
381
+ control: AbstractControl | null;
382
+ row: T;
383
+ col: ColumnDef<T>;
384
+ form: FormGroup;
385
+ index: number;
386
+ isNew: boolean;
387
+ }
388
+ interface FilterCtx<T = any> {
389
+ $implicit: AbstractControl | null;
390
+ control: AbstractControl | null;
391
+ col: ColumnDef<T>;
392
+ /** Column field name (same as `col.field`). */
393
+ field: string;
394
+ descriptor: NgbFilterDescriptor | null;
395
+ /** Current composite filter root (clone). Use with `filterChange` for custom filter templates. */
396
+ filter: NgbCompositeFilterDescriptor;
397
+ operators: NgbFilterOperator[];
398
+ setOperator: (operator: NgbFilterOperator) => void;
399
+ setValue: (value: any) => void;
400
+ clear: () => void;
401
+ /** Replaces the grid filter state and emits `filterChange` when enabled. */
402
+ filterChange: (filter: NgbCompositeFilterDescriptor) => void;
403
+ /** Sets this column's field filter in the current descriptor and commits. */
404
+ setFieldFilter: (operator: NgbFilterOperator, value?: any) => void;
405
+ }
406
+ interface GlobalFilterCtx {
407
+ $implicit: AbstractControl;
408
+ }
409
+ interface PagerCtx<T = any> {
410
+ grid: T;
411
+ page: number;
412
+ pageSize: number;
413
+ total: number;
414
+ pageCount: number;
415
+ }
416
+ interface GroupHeaderCtx<T = any> {
417
+ $implicit: NgbDataGridGroupResult<T>;
418
+ group: NgbDataGridGroupResult<T>;
419
+ field: string;
420
+ value: unknown;
421
+ items: Array<NgbDataGridGroupResult<T> | T>;
422
+ level: number;
423
+ count: number;
424
+ aggregates: NgbDataGridAggregateResults;
425
+ }
426
+ interface GroupColumnCtx<T = any> extends GroupHeaderCtx<T> {
427
+ col: ColumnDef<T>;
428
+ }
429
+ declare class NgbCellTemplate<T = any> {
430
+ readonly template: TemplateRef<CellCtx<T>>;
431
+ field: string;
432
+ constructor(template: TemplateRef<CellCtx<T>>);
433
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgbCellTemplate<any>, never>;
434
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgbCellTemplate<any>, "ng-template[ngbCell]", never, { "field": { "alias": "ngbCell"; "required": false; }; }, {}, never, never, true, never>;
435
+ }
436
+ declare class NgbEditorTemplate<T = any> {
437
+ readonly template: TemplateRef<EditCtx<T>>;
438
+ field: string;
439
+ constructor(template: TemplateRef<EditCtx<T>>);
440
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgbEditorTemplate<any>, never>;
441
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgbEditorTemplate<any>, "ng-template[ngbEditor]", never, { "field": { "alias": "ngbEditor"; "required": false; }; }, {}, never, never, true, never>;
442
+ }
443
+ declare class NgbFilterTemplate<T = any> {
444
+ readonly template: TemplateRef<FilterCtx<T>>;
445
+ field: string;
446
+ constructor(template: TemplateRef<FilterCtx<T>>);
447
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgbFilterTemplate<any>, never>;
448
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgbFilterTemplate<any>, "ng-template[ngbFilter]", never, { "field": { "alias": "ngbFilter"; "required": false; }; }, {}, never, never, true, never>;
449
+ }
450
+ declare class NgbFilterMenuTemplate<T = any> {
451
+ readonly template: TemplateRef<FilterCtx<T>>;
452
+ field: string;
453
+ constructor(template: TemplateRef<FilterCtx<T>>);
454
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgbFilterMenuTemplate<any>, never>;
455
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgbFilterMenuTemplate<any>, "ng-template[ngbFilterMenu]", never, { "field": { "alias": "ngbFilterMenu"; "required": false; }; }, {}, never, never, true, never>;
456
+ }
457
+ declare class NgbGlobalFilterTemplate {
458
+ readonly template: TemplateRef<GlobalFilterCtx>;
459
+ constructor(template: TemplateRef<GlobalFilterCtx>);
460
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgbGlobalFilterTemplate, never>;
461
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgbGlobalFilterTemplate, "ng-template[ngbGlobalFilter]", never, {}, {}, never, never, true, never>;
462
+ }
463
+ declare class NgbRowDetailTemplate<T = any> {
464
+ readonly template: TemplateRef<{
465
+ $implicit: T;
466
+ index: number;
467
+ }>;
468
+ constructor(template: TemplateRef<{
469
+ $implicit: T;
470
+ index: number;
471
+ }>);
472
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgbRowDetailTemplate<any>, never>;
473
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgbRowDetailTemplate<any>, "ng-template[ngbRowDetail]", never, {}, {}, never, never, true, never>;
474
+ }
475
+ declare class NgbPagerTemplate<T = any> {
476
+ readonly template: TemplateRef<PagerCtx<T>>;
477
+ constructor(template: TemplateRef<PagerCtx<T>>);
478
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgbPagerTemplate<any>, never>;
479
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgbPagerTemplate<any>, "ng-template[ngbPager]", never, {}, {}, never, never, true, never>;
480
+ }
481
+ declare class NgbDataGridGroupHeaderTemplateDirective<T = any> {
482
+ readonly template: TemplateRef<GroupHeaderCtx<T>>;
483
+ constructor(template: TemplateRef<GroupHeaderCtx<T>>);
484
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgbDataGridGroupHeaderTemplateDirective<any>, never>;
485
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgbDataGridGroupHeaderTemplateDirective<any>, "ng-template[ngbDatagridGroupHeaderTemplate], ng-template[ngbGroupHeader]", never, {}, {}, never, never, true, never>;
486
+ }
487
+ declare class NgbDataGridGroupHeaderColumnTemplateDirective<T = any> {
488
+ readonly template: TemplateRef<GroupColumnCtx<T>>;
489
+ field: string;
490
+ set legacyField(value: string);
491
+ constructor(template: TemplateRef<GroupColumnCtx<T>>);
492
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgbDataGridGroupHeaderColumnTemplateDirective<any>, never>;
493
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgbDataGridGroupHeaderColumnTemplateDirective<any>, "ng-template[ngbDatagridGroupHeaderColumnTemplate], ng-template[ngbGroupHeaderColumn]", never, { "field": { "alias": "ngbDatagridGroupHeaderColumnTemplate"; "required": false; }; "legacyField": { "alias": "ngbGroupHeaderColumn"; "required": false; }; }, {}, never, never, true, never>;
494
+ }
495
+ declare class NgbDataGridGroupFooterTemplateDirective<T = any> {
496
+ readonly template: TemplateRef<GroupColumnCtx<T>>;
497
+ field: string;
498
+ set legacyField(value: string);
499
+ constructor(template: TemplateRef<GroupColumnCtx<T>>);
500
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgbDataGridGroupFooterTemplateDirective<any>, never>;
501
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgbDataGridGroupFooterTemplateDirective<any>, "ng-template[ngbDatagridGroupFooterTemplate], ng-template[ngbGroupFooter]", never, { "field": { "alias": "ngbDatagridGroupFooterTemplate"; "required": false; }; "legacyField": { "alias": "ngbGroupFooter"; "required": false; }; }, {}, never, never, true, never>;
502
+ }
503
+ /** Handy constant to import in consumer apps */
504
+ declare const DATAGRID_TEMPLATE_DIRECTIVES: (typeof NgbCellTemplate | typeof NgbFilterTemplate | typeof NgbGlobalFilterTemplate | typeof NgbPagerTemplate | typeof NgbDataGridGroupHeaderTemplateDirective)[];
505
+
506
+ type NgbDatagridRowId = unknown;
507
+ type NgbDatagridTrackByFn<T> = (index: number, row: T) => NgbDatagridRowId;
445
508
  interface NgbDatagridEditService<T> {
446
509
  /**
447
510
  * Create a new row in the provided data set.
448
511
  * Implementations may mark the row as "new" until `saveChanges` is called.
449
512
  */
450
- create(data: readonly T[], newRow: T, rowIndex: number, rowId: any): T[];
513
+ create(data: readonly T[], newRow: T, rowIndex: number, rowId: NgbDatagridRowId): T[];
451
514
  /**
452
515
  * Update an existing row in the provided data set.
453
516
  * Implementations may snapshot the original row to support `cancelChanges` and `hasChanges`.
454
517
  */
455
- update(data: readonly T[], updatedRow: T, rowIndex: number, rowId: any): T[];
518
+ update(data: readonly T[], updatedRow: T, rowIndex: number, rowId: NgbDatagridRowId): T[];
456
519
  /**
457
520
  * Remove a row from the provided data set.
458
521
  */
459
- remove(data: readonly T[], rowIndex: number, rowId: any): T[];
522
+ remove(data: readonly T[], rowIndex: number, rowId: NgbDatagridRowId): T[];
460
523
  /**
461
524
  * Used by the datagrid while editing to compute a new row instance.
462
525
  * Default behavior is a shallow merge of the values into the row.
@@ -465,31 +528,31 @@ interface NgbDatagridEditService<T> {
465
528
  /**
466
529
  * Whether this row is considered newly created (not yet saved).
467
530
  */
468
- isNew(rowId: any): boolean;
531
+ isNew(rowId: NgbDatagridRowId): boolean;
469
532
  /**
470
533
  * Whether the row differs from its captured baseline (after `update`/`create` starts tracking).
471
534
  */
472
- hasChanges(rowId: any, currentRow: T): boolean;
535
+ hasChanges(rowId: NgbDatagridRowId, currentRow: T): boolean;
473
536
  /**
474
537
  * Commit current changes (and clear tracking state) for the row.
475
538
  */
476
- saveChanges(data: readonly T[], rowIndex: number, rowId: any, currentRow: T): T[];
539
+ saveChanges(data: readonly T[], rowIndex: number, rowId: NgbDatagridRowId, currentRow: T): T[];
477
540
  /**
478
541
  * Revert tracked changes for the row (or remove it if it was new).
479
542
  */
480
- cancelChanges(data: readonly T[], rowIndex: number, rowId: any): T[];
543
+ cancelChanges(data: readonly T[], rowIndex: number, rowId: NgbDatagridRowId): T[];
481
544
  }
482
545
  declare class NgbDatagridDefaultEditService<T> implements NgbDatagridEditService<T> {
483
546
  private originals;
484
547
  private newRows;
485
- create(data: readonly T[], newRow: T, _rowIndex: number, rowId: any): T[];
486
- update(data: readonly T[], updatedRow: T, rowIndex: number, rowId: any): T[];
487
- remove(data: readonly T[], rowIndex: number, rowId: any): T[];
548
+ create(data: readonly T[], newRow: T, _rowIndex: number, rowId: NgbDatagridRowId): T[];
549
+ update(data: readonly T[], updatedRow: T, rowIndex: number, rowId: NgbDatagridRowId): T[];
550
+ remove(data: readonly T[], rowIndex: number, rowId: NgbDatagridRowId): T[];
488
551
  assignValues(row: T, values: Partial<T>): T;
489
- isNew(rowId: any): boolean;
490
- hasChanges(rowId: any, currentRow: T): boolean;
491
- saveChanges(data: readonly T[], _rowIndex: number, rowId: any, currentRow: T): T[];
492
- cancelChanges(data: readonly T[], rowIndex: number, rowId: any): T[];
552
+ isNew(rowId: NgbDatagridRowId): boolean;
553
+ hasChanges(rowId: NgbDatagridRowId, currentRow: T): boolean;
554
+ saveChanges(data: readonly T[], _rowIndex: number, rowId: NgbDatagridRowId, _currentRow: T): T[];
555
+ cancelChanges(data: readonly T[], rowIndex: number, rowId: NgbDatagridRowId): T[];
493
556
  private replaceRow;
494
557
  private removeRow;
495
558
  }
@@ -504,8 +567,22 @@ declare class ExportButtonDirective {
504
567
  }
505
568
 
506
569
  interface HighlightItem {
507
- row: any;
508
- columnKey?: any;
570
+ row: NgbDatagridRowId;
571
+ columnKey?: unknown;
572
+ }
573
+ type RowKeyFn = (row: unknown, rowIndex: number) => NgbDatagridRowId;
574
+ type ColKeyFn = (column: unknown, columnIndex: number) => unknown;
575
+ declare class NgbGridHighlightDirective implements OnInit, OnChanges {
576
+ private grid;
577
+ rowKey?: string | RowKeyFn;
578
+ highlightColumnIndex?: string | ColKeyFn;
579
+ highlightedIndex: HighlightItem[];
580
+ constructor(grid: Datagrid<unknown>);
581
+ ngOnInit(): void;
582
+ ngOnChanges(_ch: SimpleChanges): void;
583
+ private apply;
584
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgbGridHighlightDirective, [{ optional: true; }]>;
585
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgbGridHighlightDirective, "[ngbGridHighlight]", never, { "rowKey": { "alias": "ngbGridHighlight"; "required": false; }; "highlightColumnIndex": { "alias": "highlightColumnIndex"; "required": false; }; "highlightedIndex": { "alias": "highlightedIndex"; "required": false; }; }, {}, never, never, true, never>;
509
586
  }
510
587
 
511
588
  interface NgbDndDropEvent<T> {
@@ -516,7 +593,7 @@ interface NgbDndDropEvent<T> {
516
593
  toList: T[];
517
594
  sameList: boolean;
518
595
  }
519
- interface DndCanDropPayload<T = any> {
596
+ interface DndCanDropPayload<T = unknown> {
520
597
  dragItem: T;
521
598
  srcList: T[];
522
599
  srcIndex: number;
@@ -525,7 +602,7 @@ interface DndCanDropPayload<T = any> {
525
602
  isExternal: boolean;
526
603
  }
527
604
  /** Guard function; return true to allow, false to block */
528
- type DndCanDropFn<T = any> = (payload: DndCanDropPayload<T>) => boolean;
605
+ type DndCanDropFn<T = unknown> = (payload: DndCanDropPayload<T>) => boolean;
529
606
  declare class NgbDndListDirective<T = unknown> {
530
607
  private el;
531
608
  private state;
@@ -541,7 +618,7 @@ declare class NgbDndListDirective<T = unknown> {
541
618
  /** NEW: custom clone function */
542
619
  dndCloneFn?: (item: T) => T;
543
620
  dndIsPalette: boolean;
544
- dndCanDrop: boolean | DndCanDropFn<any>;
621
+ dndCanDrop: boolean | DndCanDropFn<T>;
545
622
  private _denied;
546
623
  get denied(): boolean;
547
624
  dndAriaLabel?: string;
@@ -582,6 +659,7 @@ declare class NgbDndListDirective<T = unknown> {
582
659
  */
583
660
  private _computeDropIndex;
584
661
  private _allowDrop;
662
+ emitDropEvent(event: NgbDndDropEvent<T>): void;
585
663
  private performDrop;
586
664
  static ɵfac: i0.ɵɵFactoryDeclaration<NgbDndListDirective<any>, never>;
587
665
  static ɵdir: i0.ɵɵDirectiveDeclaration<NgbDndListDirective<any>, "[ngbDndList]", never, { "dndChildrenKey": { "alias": "dndChildrenKey"; "required": false; }; "list": { "alias": "ngbDndList"; "required": false; }; "dndGroup": { "alias": "dndGroup"; "required": false; }; "dndDisabled": { "alias": "dndDisabled"; "required": false; }; "dndCloneOnDrop": { "alias": "dndCloneOnDrop"; "required": false; }; "dndCloneFn": { "alias": "dndCloneFn"; "required": false; }; "dndIsPalette": { "alias": "dndIsPalette"; "required": false; }; "dndCanDrop": { "alias": "dndCanDrop"; "required": false; }; "dndAriaLabel": { "alias": "dndAriaLabel"; "required": false; }; }, { "dndDropped": "dndDropped"; }, never, never, true, never>;
@@ -643,7 +721,37 @@ declare function ngbFormatDatagridLabel(template: string, tokens: Record<string,
643
721
 
644
722
  type SortDir = 'asc' | 'desc' | '';
645
723
  type KeyOf<T> = Extract<keyof T, string>;
724
+ type DraftValues<T> = Partial<Record<KeyOf<T>, unknown>>;
646
725
  type UtilityColumnKind = 'selection' | 'detail' | 'sticky-toggle' | 'actions';
726
+ type StackedGroup = 'start' | 'center' | 'end';
727
+ type MultiCheckboxOption = {
728
+ label: string;
729
+ value: unknown;
730
+ };
731
+ type GroupSortDir = 'asc' | 'desc';
732
+ interface NgbDatagridGroupRenderRow<T> {
733
+ kind: 'group';
734
+ key: string;
735
+ group: NgbDataGridGroupResult<T>;
736
+ collapsed: boolean;
737
+ level: number;
738
+ startIndex: number;
739
+ }
740
+ interface NgbDatagridGroupFooterRenderRow<T> {
741
+ kind: 'group-footer';
742
+ key: string;
743
+ group: NgbDataGridGroupResult<T>;
744
+ level: number;
745
+ startIndex: number;
746
+ }
747
+ interface NgbDatagridDataRenderRow<T> {
748
+ kind: 'data';
749
+ key: NgbDatagridRowId;
750
+ row: T;
751
+ pagedIndex: number;
752
+ level: number;
753
+ }
754
+ type NgbDatagridRenderRow<T> = NgbDatagridGroupRenderRow<T> | NgbDatagridGroupFooterRenderRow<T> | NgbDatagridDataRenderRow<T>;
647
755
  type NgbTableResponsive = true | false | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
648
756
  interface NgbTableOptions {
649
757
  stripedRows?: boolean;
@@ -673,8 +781,8 @@ type NgbDataLayoutMode = 'tabular' | 'stacked';
673
781
  type NgbSelectionMode = 'none' | 'single' | 'multiple';
674
782
  type NgbSelectionBehavior = 'row' | 'checkbox' | 'both';
675
783
  type NgbSelectionKeyMode = 'desktop' | 'mobile';
676
- type NgbRowKey = string | ((row: any, rowIndex: number) => any);
677
- type NgbColKey = string | ((column: any, columnIndex: number) => any);
784
+ type NgbRowKey = string | ((row: unknown, rowIndex: number) => NgbDatagridRowId);
785
+ type NgbColKey = string | ((column: unknown, columnIndex: number) => unknown);
678
786
  interface NgbSelectionLabels {
679
787
  selectAll?: string;
680
788
  unselectAll?: string;
@@ -684,6 +792,7 @@ interface NgbSelectionLabels {
684
792
  declare class Datagrid<T = any> implements AfterContentInit, OnChanges {
685
793
  /** Column definitions to render */
686
794
  private _columns;
795
+ renderTick: number;
687
796
  get columns(): ColumnDef<T>[];
688
797
  set columns(value: ColumnDef<T>[] | null | undefined);
689
798
  /** Row data to display */
@@ -721,13 +830,24 @@ declare class Datagrid<T = any> implements AfterContentInit, OnChanges {
721
830
  private _filter;
722
831
  get filter(): NgbCompositeFilterDescriptor | null;
723
832
  set filter(value: NgbCompositeFilterDescriptor | null | undefined);
724
- filterOperators?: Partial<Record<ColumnType, NgbFilterOperator[]>>;
833
+ private _filterOperators?;
834
+ get filterOperators(): Partial<Record<ColumnType, NgbFilterOperator[]>> | undefined;
835
+ set filterOperators(value: Partial<Record<ColumnType, NgbFilterOperator[]>> | undefined);
725
836
  filterManual: boolean;
726
837
  externalFiltering: boolean;
727
838
  /** Opts local arrays into the reusable DataGrid operation helper for filter/sort/page processing. */
728
839
  private _dataOperations;
729
840
  get dataOperations(): boolean | NgbDataGridProcessOptions<T>;
730
841
  set dataOperations(value: boolean | NgbDataGridProcessOptions<T> | null | undefined);
842
+ private _groupable;
843
+ get groupable(): boolean | NgbDataGridGroupingSettings;
844
+ set groupable(value: boolean | NgbDataGridGroupingSettings | null | undefined);
845
+ private _group;
846
+ get group(): NgbDataGridGroupDescriptor[];
847
+ set group(value: NgbDataGridGroupDescriptor[] | null | undefined);
848
+ private _groupedData;
849
+ get groupedData(): NgbDataGridGroupResult<T>[] | null;
850
+ set groupedData(value: NgbDataGridGroupResult<T>[] | null | undefined);
731
851
  /**
732
852
  * Optional controlled data-operation state. When provided, the grid syncs page, pageSize,
733
853
  * sort, filter, and global filter from this object.
@@ -805,10 +925,14 @@ declare class Datagrid<T = any> implements AfterContentInit, OnChanges {
805
925
  globalFilterAriaLabel: string;
806
926
  /** Placeholder for the built-in global search input. */
807
927
  globalFilterPlaceholder: string;
928
+ private _searchHighlightTerm;
808
929
  /** When set, matching substrings in visible cells are wrapped with `.grid-search-highlight`. */
809
- searchHighlightTerm: string;
930
+ get searchHighlightTerm(): string;
931
+ set searchHighlightTerm(value: string | null | undefined);
932
+ private _searchHighlightFields;
810
933
  /** Column fields included in search highlighting; all visible columns when empty. */
811
- searchHighlightFields: string[] | null;
934
+ get searchHighlightFields(): string[] | null;
935
+ set searchHighlightFields(value: string[] | null | undefined);
812
936
  /** Accessible label announced when expanding a row. */
813
937
  expandRowAriaLabel: string;
814
938
  /** Accessible label announced when collapsing a row. */
@@ -818,7 +942,7 @@ declare class Datagrid<T = any> implements AfterContentInit, OnChanges {
818
942
  /** Accessible label for the Excel export button. */
819
943
  exportExcelAriaLabel: string;
820
944
  /** Optional defaults for new rows */
821
- newRowDefaults: Partial<Record<KeyOf<T>, any>> | (() => Partial<Record<KeyOf<T>, any>>) | null;
945
+ newRowDefaults: DraftValues<T> | (() => DraftValues<T>) | null;
822
946
  strictEmail: boolean;
823
947
  editOnRowClick: boolean;
824
948
  /** Row editing interaction: inline actions, in-cell, external dialog, or toolbar selection. */
@@ -831,7 +955,9 @@ declare class Datagrid<T = any> implements AfterContentInit, OnChanges {
831
955
  set exportOptions(value: NgbDataGridExportOptions | null | undefined);
832
956
  theme: NgbDataGridTheme;
833
957
  responsive: NgbDataGridResponsiveOptions | boolean;
834
- trackBy?: NgbDatagridTrackByFn<T>;
958
+ private _trackBy?;
959
+ get trackBy(): NgbDatagridTrackByFn<T> | undefined;
960
+ set trackBy(value: NgbDatagridTrackByFn<T> | undefined);
835
961
  rowClass?: string | string[] | Record<string, boolean> | ((row: T, rowIndex: number) => string | string[] | Record<string, boolean>);
836
962
  rowStyle?: Record<string, string | number> | ((row: T, rowIndex: number) => Record<string, string | number> | null | undefined);
837
963
  rowReorderable: boolean;
@@ -857,8 +983,8 @@ declare class Datagrid<T = any> implements AfterContentInit, OnChanges {
857
983
  /** Enables arrow-key cell focus, Space selection, Alt+Page paging, and F3 filter shortcuts. */
858
984
  keyboardNavigation: boolean;
859
985
  editService?: NgbDatagridEditService<T>;
860
- dataProviderAll?: () => Observable<any[]> | Promise<any[]> | any[];
861
- dataProviderSelection?: () => any[];
986
+ dataProviderAll?: () => Observable<T[]> | Promise<T[]> | T[];
987
+ dataProviderSelection?: () => T[];
862
988
  exportButtonDir?: ExportButtonDirective;
863
989
  bodyScroller?: ElementRef<HTMLElement>;
864
990
  headerScroller?: ElementRef<HTMLElement>;
@@ -890,6 +1016,7 @@ declare class Datagrid<T = any> implements AfterContentInit, OnChanges {
890
1016
  row: T;
891
1017
  index: number;
892
1018
  }>;
1019
+ groupChange: EventEmitter<NgbDataGridGroupChange>;
893
1020
  sortChange: EventEmitter<{
894
1021
  active: string | null;
895
1022
  direction: "asc" | "desc" | "";
@@ -921,13 +1048,14 @@ declare class Datagrid<T = any> implements AfterContentInit, OnChanges {
921
1048
  columnReorder: EventEmitter<NgbColumnReorderEvent<ColumnDef<T>>>;
922
1049
  rowDetailTpl?: NgbRowDetailTemplate<T>;
923
1050
  pagerTpl?: NgbPagerTemplate<T>;
1051
+ groupHeaderTpl?: NgbDataGridGroupHeaderTemplateDirective<T>;
924
1052
  private exporter;
925
1053
  expanded: Set<number>;
926
1054
  private fb;
927
1055
  filterForm: FormGroup;
928
1056
  globalFilterCtrl: FormControl<string>;
929
1057
  addingNew: boolean;
930
- draftNew: Partial<Record<KeyOf<T>, any>> | null;
1058
+ draftNew: DraftValues<T> | null;
931
1059
  errorsNew: Partial<Record<KeyOf<T>, string>>;
932
1060
  private _sort;
933
1061
  get sort(): {
@@ -938,8 +1066,8 @@ declare class Datagrid<T = any> implements AfterContentInit, OnChanges {
938
1066
  active: Extract<keyof T, string> | null;
939
1067
  direction: SortDir;
940
1068
  } | null | undefined);
941
- stickyRowIds: Set<any>;
942
- selectedRowIds: Set<any>;
1069
+ stickyRowIds: Set<NgbDatagridRowId>;
1070
+ selectedRowIds: Set<NgbDatagridRowId>;
943
1071
  private selectionAnchor;
944
1072
  private highlightRowMap;
945
1073
  private _globalFilter;
@@ -959,7 +1087,7 @@ declare class Datagrid<T = any> implements AfterContentInit, OnChanges {
959
1087
  menuDrafts: Record<string, NgbMenuFilterConditionDraft[]>;
960
1088
  /** Join logic between conditions in a column filter menu (And / Or). */
961
1089
  menuDraftJoinLogic: Record<string, 'and' | 'or'>;
962
- multiCheckboxDrafts: Record<string, any[]>;
1090
+ multiCheckboxDrafts: Record<string, unknown[]>;
963
1091
  multiCheckboxSearch: Record<string, string>;
964
1092
  private syncingFilterForm;
965
1093
  private _page;
@@ -1001,16 +1129,46 @@ declare class Datagrid<T = any> implements AfterContentInit, OnChanges {
1001
1129
  private filteredCache;
1002
1130
  private sortedCache;
1003
1131
  private pagedCache;
1132
+ private renderRowsCache;
1133
+ stickyGroupHeaderRows: NgbDatagridGroupRenderRow<T>[];
1134
+ stickyGroupFooterRows: NgbDatagridGroupFooterRenderRow<T>[];
1135
+ stickyGroupOverlayColumnWidths: number[];
1136
+ stickyGroupHeaderTranslateY: number;
1137
+ stickyGroupFooterTranslateY: number;
1004
1138
  private resolvedColumnsDirty;
1005
1139
  private visibleColumnsDirty;
1006
1140
  private filteredDirty;
1007
1141
  private sortedDirty;
1008
1142
  private pagedDirty;
1009
- private rowIndexMap;
1010
- private rowIndexMapSource;
1143
+ private renderRowsDirty;
1144
+ private stickyGroupSyncQueued;
1145
+ private rowMetaMap;
1146
+ private rowMetaSource;
1147
+ private rowMetaTrackBy;
1148
+ private filterOperatorsCache;
1149
+ private searchHighlightCache;
1150
+ private multiCheckboxOptionsCache;
1151
+ private multiCheckboxVisibleOptionsCache;
1152
+ private stackedColumnsCache;
1153
+ private stackedCardGroupsCache;
1154
+ private tableClassListCache;
1155
+ private responsiveWrapperClassesCache;
1156
+ private collapsedGroupKeys;
1157
+ private groupRenderRowLookup;
1158
+ private groupFooterRenderRowLookup;
1159
+ groupDragField: string | null;
1160
+ groupPanelDragActive: boolean;
1161
+ groupPanelDragDenied: boolean;
1011
1162
  private norm;
1012
1163
  private keyOf;
1164
+ private readFieldValue;
1013
1165
  private getDefaults;
1166
+ private toDraftValues;
1167
+ private formDraftValues;
1168
+ private assignDraftValues;
1169
+ private patchFieldValue;
1170
+ private compareSortValues;
1171
+ private readModifierKeys;
1014
1172
  private defaultFor;
1015
1173
  private numberValidator;
1016
1174
  private dateValidator;
@@ -1025,11 +1183,46 @@ declare class Datagrid<T = any> implements AfterContentInit, OnChanges {
1025
1183
  private invalidateFilteredCaches;
1026
1184
  private invalidateSortedCaches;
1027
1185
  private invalidatePagedCache;
1186
+ private invalidateRowIdentityCache;
1028
1187
  private invalidateDataCaches;
1029
1188
  private markGridForCheck;
1030
- private ensureRowIndexMap;
1189
+ private scheduleViewRefresh;
1190
+ private ensureRowMetaMap;
1191
+ private resolveRowMeta;
1031
1192
  private dataIndexOf;
1032
1193
  private syncColumnOrder;
1194
+ isGroupingEnabled(): boolean;
1195
+ isGroupingActive(): boolean;
1196
+ isColumnGroupable(col: ColumnDef<T>): boolean;
1197
+ isFieldGrouped(field: string): boolean;
1198
+ groupedColumns(): NgbDataGridGroupDescriptor[];
1199
+ groupingSettings(): NgbDataGridGroupingSettings;
1200
+ showGroupFooters(): boolean;
1201
+ showStickyGroupHeaders(): boolean;
1202
+ showStickyGroupFooters(): boolean;
1203
+ hasStickyGroupHeaders(): boolean;
1204
+ hasStickyGroupFooters(): boolean;
1205
+ groupColumnHeader(field: string): string;
1206
+ groupHandleAriaLabel(col: ColumnDef<T>): string;
1207
+ groupDirectionAriaLabel(descriptor: NgbDataGridGroupDescriptor): string;
1208
+ groupRemoveAriaLabel(descriptor: NgbDataGridGroupDescriptor): string;
1209
+ groupPanelLabel(): string;
1210
+ groupFieldLabel(descriptor: NgbDataGridGroupDescriptor): string;
1211
+ groupDirectionLabel(descriptor: NgbDataGridGroupDescriptor): string;
1212
+ toggleGroupField(field: string): void;
1213
+ addGroupField(field: string, dir?: GroupSortDir, emit?: boolean): void;
1214
+ removeGroupField(field: string, emit?: boolean): void;
1215
+ toggleGroupDirection(field: string): void;
1216
+ private setGroupDescriptors;
1217
+ private normalizeGroupDescriptors;
1218
+ private syncCollapsedGroups;
1219
+ private clearGroupDragState;
1220
+ private canAcceptGroupedField;
1221
+ onGroupHandleDragStart(event: DragEvent, field: string): void;
1222
+ onGroupHandleDragEnd(): void;
1223
+ onGroupPanelDragOver(event: DragEvent): void;
1224
+ onGroupPanelDragLeave(event: DragEvent): void;
1225
+ onGroupPanelDrop(event: DragEvent): void;
1033
1226
  isColumnReorderEnabled(): boolean;
1034
1227
  isColumnReorderable(col: ColumnDef<T>): boolean;
1035
1228
  onColumnDragStart(event: DragEvent, col: ColumnDef<T>, fromIndex: number): void;
@@ -1065,10 +1258,34 @@ declare class Datagrid<T = any> implements AfterContentInit, OnChanges {
1065
1258
  isSearchHighlightEnabled(): boolean;
1066
1259
  shouldHighlightSearchInColumn(field: string): boolean;
1067
1260
  formatCellDisplayValue(value: unknown): string;
1068
- getSearchHighlightSegments(value: unknown, field: string): Array<{
1069
- text: string;
1070
- match: boolean;
1071
- }>;
1261
+ private groupColumn;
1262
+ groupColumnField(col: ColumnDef<T>): string;
1263
+ private formatGroupValue;
1264
+ groupRowLabel(group: NgbDataGridGroupResult<T>): string;
1265
+ groupRowCountLabel(group: NgbDataGridGroupResult<T>): string;
1266
+ groupLeadColumnField(group: NgbDataGridGroupResult<T>): string | null;
1267
+ isGroupLeadColumn(col: ColumnDef<T>, group: NgbDataGridGroupResult<T>): boolean;
1268
+ shouldRenderGroupCell(col: ColumnDef<T>, group: NgbDataGridGroupResult<T>): boolean;
1269
+ groupCellColspan(col: ColumnDef<T>, group: NgbDataGridGroupResult<T>): number | null;
1270
+ hasGroupHeaderColumnTemplate(field: string): boolean;
1271
+ hasGroupFooterTemplate(field: string): boolean;
1272
+ groupHeaderColumnTemplate(field: string): NgbDataGridGroupHeaderColumnTemplateDirective<T> | null;
1273
+ groupFooterTemplate(field: string): NgbDataGridGroupFooterTemplateDirective<T> | null;
1274
+ groupHeaderContext(group: NgbDataGridGroupResult<T>): GroupHeaderCtx<T>;
1275
+ groupColumnContext(group: NgbDataGridGroupResult<T>, col: ColumnDef<T>): GroupColumnCtx<T>;
1276
+ groupRowIndent(level: number): number;
1277
+ private groupLeadColumnSpan;
1278
+ private isCoveredByGroupLeadSpan;
1279
+ private groupLeadColumnIndex;
1280
+ private groupColumnIndex;
1281
+ private groupKeyFor;
1282
+ isGroupCollapsed(group: NgbDataGridGroupResult<T>, level: number, startIndex: number): boolean;
1283
+ toggleGroupCollapsed(group: NgbDataGridGroupResult<T>, level: number, startIndex: number): void;
1284
+ private isGroupResult;
1285
+ private cloneAggregateDescriptors;
1286
+ private cloneAggregateResults;
1287
+ private cloneGroupResults;
1288
+ getSearchHighlightSegments(value: unknown, field: string): NgbSearchHighlightSegment[];
1072
1289
  rowFilterEmptyOptionLabel(col: ColumnDef<T>): string;
1073
1290
  booleanFilterOptionLabel(value: boolean): string;
1074
1291
  isRowFilterMenuOpen(field: string): boolean;
@@ -1120,21 +1337,15 @@ declare class Datagrid<T = any> implements AfterContentInit, OnChanges {
1120
1337
  toggleFilterMenu(field: string, anchor?: HTMLElement | null): void;
1121
1338
  applyMenuFilter(col: ColumnDef<T>): void;
1122
1339
  clearMenuFilter(col: ColumnDef<T>): void;
1123
- multiCheckboxOptions(col: ColumnDef<T>): Array<{
1124
- label: string;
1125
- value: any;
1126
- }>;
1127
- multiCheckboxVisibleOptions(col: ColumnDef<T>): Array<{
1128
- label: string;
1129
- value: any;
1130
- }>;
1131
- multiCheckboxValueLabel(col: ColumnDef<T>, value: any): string;
1340
+ multiCheckboxOptions(col: ColumnDef<T>): MultiCheckboxOption[];
1341
+ multiCheckboxVisibleOptions(col: ColumnDef<T>): MultiCheckboxOption[];
1342
+ multiCheckboxValueLabel(col: ColumnDef<T>, value: unknown): string;
1132
1343
  private multiCheckboxValueKey;
1133
- ensureMultiCheckboxDraft(col: ColumnDef<T>): any[];
1344
+ ensureMultiCheckboxDraft(col: ColumnDef<T>): unknown[];
1134
1345
  multiCheckboxSelectedCount(col: ColumnDef<T>): number;
1135
1346
  multiCheckboxTotalCount(col: ColumnDef<T>): number;
1136
- isMultiCheckboxChecked(col: ColumnDef<T>, value: any): boolean;
1137
- toggleMultiCheckboxValue(col: ColumnDef<T>, value: any): void;
1347
+ isMultiCheckboxChecked(col: ColumnDef<T>, value: unknown): boolean;
1348
+ toggleMultiCheckboxValue(col: ColumnDef<T>, value: unknown): void;
1138
1349
  isMultiCheckboxAllSelected(col: ColumnDef<T>): boolean;
1139
1350
  toggleMultiCheckboxAll(col: ColumnDef<T>): void;
1140
1351
  multiCheckboxToggleLabel(col: ColumnDef<T>): string;
@@ -1154,8 +1365,15 @@ declare class Datagrid<T = any> implements AfterContentInit, OnChanges {
1154
1365
  /** Collection size passed to the built-in pager. */
1155
1366
  pagerCollectionSize(): number;
1156
1367
  get paged(): T[];
1368
+ get renderRows(): NgbDatagridRenderRow<T>[];
1369
+ hasRenderableRows(): boolean;
1157
1370
  private shouldUseLocalDataOperations;
1158
1371
  private localDataOperationsResult;
1372
+ private usingProvidedGroupedData;
1373
+ private groupingResults;
1374
+ private ensureRenderRows;
1375
+ private rebuildGroupedRowLookups;
1376
+ private groupingSourceRows;
1159
1377
  get anyFilterable(): boolean;
1160
1378
  get startIndex(): number;
1161
1379
  get endIndex(): number;
@@ -1179,6 +1397,13 @@ declare class Datagrid<T = any> implements AfterContentInit, OnChanges {
1179
1397
  get resolvedPageSizeOptions(): number[];
1180
1398
  get shouldEnableScroll(): boolean;
1181
1399
  onBodyHorizontalScroll(): void;
1400
+ onWindowResize(): void;
1401
+ private scheduleStickyGroupSync;
1402
+ private syncStickyGroupOverlays;
1403
+ private collectStickyGroupMeasurements;
1404
+ private resolveStickyHeaderRows;
1405
+ private resolveStickyFooterRows;
1406
+ private measurementStackHeight;
1182
1407
  get isHeaderSticky(): boolean;
1183
1408
  get isFooterSticky(): boolean;
1184
1409
  get detailColspan(): number;
@@ -1201,6 +1426,8 @@ declare class Datagrid<T = any> implements AfterContentInit, OnChanges {
1201
1426
  get externalEditableColumns(): ColumnDef<T>[];
1202
1427
  isCellInEditMode(pagedIndex: number, col: ColumnDef<T>): boolean;
1203
1428
  onCellClick(ev: MouseEvent, pagedIndex: number, col: ColumnDef<T>): void;
1429
+ onCellMouseDown(ev: MouseEvent, pagedIndex: number, col: ColumnDef<T>): void;
1430
+ private tryStartIncellEdit;
1204
1431
  onCellKeydown(ev: KeyboardEvent, pagedIndex: number, col: ColumnDef<T>, colIndex: number): void;
1205
1432
  startIncellEdit(pagedIndex: number, field: string): void;
1206
1433
  private focusInlineEditor;
@@ -1237,9 +1464,9 @@ declare class Datagrid<T = any> implements AfterContentInit, OnChanges {
1237
1464
  get densityMode(): 'comfortable' | 'compact';
1238
1465
  isStackedLayout(): boolean;
1239
1466
  isStackedCardsLayout(): boolean;
1240
- stackedGroupFor(col: ColumnDef<T>): 'start' | 'center' | 'end';
1241
- stackedColumnsInGroup(group: 'start' | 'center' | 'end'): ColumnDef<T>[];
1242
- stackedCardGroups(): Array<'start' | 'center' | 'end'>;
1467
+ stackedGroupFor(col: ColumnDef<T>): StackedGroup;
1468
+ stackedColumnsInGroup(group: StackedGroup): ColumnDef<T>[];
1469
+ stackedCardGroups(): StackedGroup[];
1243
1470
  visibleColumnIndex(col: ColumnDef<T>): number;
1244
1471
  stackedCardColspan(): number;
1245
1472
  clearSorting(emit?: boolean): void;
@@ -1297,6 +1524,8 @@ declare class Datagrid<T = any> implements AfterContentInit, OnChanges {
1297
1524
  private filterTplQ;
1298
1525
  private filterMenuTplQ;
1299
1526
  private globalTplQ;
1527
+ private groupHeaderColumnTplQ;
1528
+ private groupFooterTplQ;
1300
1529
  private gridColumnQ;
1301
1530
  /** Internal lookup maps */
1302
1531
  cellTpls: Record<string, NgbCellTemplate<T>>;
@@ -1304,6 +1533,8 @@ declare class Datagrid<T = any> implements AfterContentInit, OnChanges {
1304
1533
  filterTpls: Record<string, NgbFilterTemplate<T>>;
1305
1534
  filterMenuTpls: Record<string, NgbFilterMenuTemplate<T>>;
1306
1535
  globalTpl: NgbGlobalFilterTemplate | null;
1536
+ groupHeaderColumnTpls: Record<string, NgbDataGridGroupHeaderColumnTemplateDirective<T>>;
1537
+ groupFooterTpls: Record<string, NgbDataGridGroupFooterTemplateDirective<T>>;
1307
1538
  private warnedDeclarativeColumns;
1308
1539
  private toRecord;
1309
1540
  export(kind: 'pdf' | 'excel'): Promise<void>;
@@ -1312,8 +1543,9 @@ declare class Datagrid<T = any> implements AfterContentInit, OnChanges {
1312
1543
  ngOnChanges(ch: SimpleChanges): void;
1313
1544
  private resetEditingState;
1314
1545
  private getRowId;
1546
+ private selectedDataRows;
1315
1547
  /** Apply selection ids and refresh checkbox UI (for programmatic / OnPush sync). */
1316
- setSelectionIds(ids: Iterable<any>, options?: {
1548
+ setSelectionIds(ids: Iterable<NgbDatagridRowId>, options?: {
1317
1549
  emit?: boolean;
1318
1550
  }): void;
1319
1551
  private getEditService;
@@ -1327,9 +1559,9 @@ declare class Datagrid<T = any> implements AfterContentInit, OnChanges {
1327
1559
  saveEdit(i: number): void;
1328
1560
  cancelEdit(i: number): void;
1329
1561
  onNewDraftChange(col: ColumnDef<T>): void;
1330
- validateInto(col: ColumnDef<T>, targetDraft: Partial<Record<KeyOf<T>, any>> | null, targetErrors: Partial<Record<KeyOf<T>, string>>): void;
1562
+ validateInto(col: ColumnDef<T>, targetDraft: DraftValues<T> | null, targetErrors: Partial<Record<KeyOf<T>, string>>): void;
1331
1563
  deleteRow(i: number): void;
1332
- trackRow: (index: number, row: T) => any;
1564
+ trackRow: (index: number, row: T) => unknown;
1333
1565
  private rowKeyValue;
1334
1566
  private colKeyValue;
1335
1567
  isRowHighlighted(row: T, rowIndex: number): boolean;
@@ -1338,6 +1570,7 @@ declare class Datagrid<T = any> implements AfterContentInit, OnChanges {
1338
1570
  onGlobalFilterChange(): void;
1339
1571
  onColumnFilterChange(): void;
1340
1572
  onDocumentClick(event: MouseEvent): void;
1573
+ private isEventInsideSelector;
1341
1574
  canCancelToolbarEdit(): boolean;
1342
1575
  isToolbarEditActive(): boolean;
1343
1576
  isToolbarSaveDisabled(): boolean;
@@ -1356,7 +1589,7 @@ declare class Datagrid<T = any> implements AfterContentInit, OnChanges {
1356
1589
  onPage(p: number): void;
1357
1590
  onPageSize(sz: number | string): void;
1358
1591
  onRowDrop(event: NgbDndDropEvent<T>): void;
1359
- asBool(v: any): boolean;
1592
+ asBool(v: unknown): boolean;
1360
1593
  triggerExport(kind: 'pdf' | 'excel'): void;
1361
1594
  isResponsiveEnabled(): boolean;
1362
1595
  isRowSticky(row: T, pagedIndex: number): boolean;
@@ -1381,7 +1614,7 @@ declare class Datagrid<T = any> implements AfterContentInit, OnChanges {
1381
1614
  rowSelectionLabel(index: number): string;
1382
1615
  onRowSelect(ev: MouseEvent, pagedIndex: number): void;
1383
1616
  static ɵfac: i0.ɵɵFactoryDeclaration<Datagrid<any>, never>;
1384
- static ɵcmp: i0.ɵɵComponentDeclaration<Datagrid<any>, "ngb-datagrid", never, { "columns": { "alias": "columns"; "required": false; }; "data": { "alias": "data"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "total": { "alias": "total"; "required": false; }; "enableSorting": { "alias": "enableSorting"; "required": false; }; "enableFiltering": { "alias": "enableFiltering"; "required": false; }; "filterable": { "alias": "filterable"; "required": false; }; "enableGlobalFilter": { "alias": "enableGlobalFilter"; "required": false; }; "filterMode": { "alias": "filterMode"; "required": false; }; "filter": { "alias": "filter"; "required": false; }; "filterOperators": { "alias": "filterOperators"; "required": false; }; "filterManual": { "alias": "filterManual"; "required": false; }; "externalFiltering": { "alias": "externalFiltering"; "required": false; }; "dataOperations": { "alias": "dataOperations"; "required": false; }; "state": { "alias": "state"; "required": false; }; "multiCheckboxFilterOptions": { "alias": "multiCheckboxFilterOptions"; "required": false; }; "enablePagination": { "alias": "enablePagination"; "required": false; }; "pageable": { "alias": "pageable"; "required": false; }; "enableEdit": { "alias": "enableEdit"; "required": false; }; "enableDelete": { "alias": "enableDelete"; "required": false; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; }; "enableAdd": { "alias": "enableAdd"; "required": false; }; "addButtonAriaLabel": { "alias": "addButtonAriaLabel"; "required": false; }; "addButtonText": { "alias": "addButtonText"; "required": false; }; "stickyRows": { "alias": "stickyRows"; "required": false; }; "stickyHeader": { "alias": "stickyHeader"; "required": false; }; "stickyFooter": { "alias": "stickyFooter"; "required": false; }; "scrollable": { "alias": "scrollable"; "required": false; }; "stickyRowHeight": { "alias": "stickyRowHeight"; "required": false; }; "stickyHeaderHeight": { "alias": "stickyHeaderHeight"; "required": false; }; "stickyFooterHeight": { "alias": "stickyFooterHeight"; "required": false; }; "tableOptions": { "alias": "tableOptions"; "required": false; }; "dataLayoutMode": { "alias": "dataLayoutMode"; "required": false; }; "selectionMode": { "alias": "selectionMode"; "required": false; }; "selectionBehavior": { "alias": "selectionBehavior"; "required": false; }; "selectionKeyMode": { "alias": "selectionKeyMode"; "required": false; }; "selectAllEnabled": { "alias": "selectAllEnabled"; "required": false; }; "selectionA11yLabels": { "alias": "selectionA11yLabels"; "required": false; }; "selectionDisabledFn": { "alias": "selectionDisabledFn"; "required": false; }; "highlightedIndex": { "alias": "highlightedIndex"; "required": false; }; "highlightRowKey": { "alias": "highlightRowKey"; "required": false; }; "highlightColKey": { "alias": "highlightColKey"; "required": false; }; "globalFilterAriaLabel": { "alias": "globalFilterAriaLabel"; "required": false; }; "globalFilterPlaceholder": { "alias": "globalFilterPlaceholder"; "required": false; }; "searchHighlightTerm": { "alias": "searchHighlightTerm"; "required": false; }; "searchHighlightFields": { "alias": "searchHighlightFields"; "required": false; }; "expandRowAriaLabel": { "alias": "expandRowAriaLabel"; "required": false; }; "collapseRowAriaLabel": { "alias": "collapseRowAriaLabel"; "required": false; }; "exportPdfAriaLabel": { "alias": "exportPdfAriaLabel"; "required": false; }; "exportExcelAriaLabel": { "alias": "exportExcelAriaLabel"; "required": false; }; "newRowDefaults": { "alias": "newRowDefaults"; "required": false; }; "strictEmail": { "alias": "strictEmail"; "required": false; }; "editOnRowClick": { "alias": "editOnRowClick"; "required": false; }; "editMode": { "alias": "editMode"; "required": false; }; "toolbarEditHint": { "alias": "toolbarEditHint"; "required": false; }; "singleExpand": { "alias": "singleExpand"; "required": false; }; "exportOptions": { "alias": "exportOptions"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "responsive": { "alias": "responsive"; "required": false; }; "trackBy": { "alias": "trackBy"; "required": false; }; "rowClass": { "alias": "rowClass"; "required": false; }; "rowStyle": { "alias": "rowStyle"; "required": false; }; "rowReorderable": { "alias": "rowReorderable"; "required": false; }; "columnReorderable": { "alias": "columnReorderable"; "required": false; }; "resizable": { "alias": "resizable"; "required": false; }; "actionDisplay": { "alias": "actionDisplay"; "required": false; }; "showStickyRowBadge": { "alias": "showStickyRowBadge"; "required": false; }; "stickyRowBadgeField": { "alias": "stickyRowBadgeField"; "required": false; }; "stickyRowBadgeLabel": { "alias": "stickyRowBadgeLabel"; "required": false; }; "labels": { "alias": "labels"; "required": false; }; "locale": { "alias": "locale"; "required": false; }; "dir": { "alias": "dir"; "required": false; }; "keyboardNavigation": { "alias": "keyboardNavigation"; "required": false; }; "editService": { "alias": "editService"; "required": false; }; "dataProviderAll": { "alias": "dataProviderAll"; "required": false; }; "dataProviderSelection": { "alias": "dataProviderSelection"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; }, { "rowAdd": "rowAdd"; "rowEdit": "rowEdit"; "rowSave": "rowSave"; "rowCancel": "rowCancel"; "rowDelete": "rowDelete"; "sortChange": "sortChange"; "filterChange": "filterChange"; "filtersChange": "filtersChange"; "pageChange": "pageChange"; "dataStateChange": "dataStateChange"; "selectionChange": "selectionChange"; "rowReorder": "rowReorder"; "columnReorder": "columnReorder"; }, ["exportButtonDir", "rowDetailTpl", "pagerTpl", "cellTplQ", "editTplQ", "filterTplQ", "filterMenuTplQ", "globalTplQ", "gridColumnQ"], ["ngb-datagrid-layout-toolbar"], true, never>;
1617
+ static ɵcmp: i0.ɵɵComponentDeclaration<Datagrid<any>, "ngb-datagrid", never, { "columns": { "alias": "columns"; "required": false; }; "data": { "alias": "data"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "total": { "alias": "total"; "required": false; }; "enableSorting": { "alias": "enableSorting"; "required": false; }; "enableFiltering": { "alias": "enableFiltering"; "required": false; }; "filterable": { "alias": "filterable"; "required": false; }; "enableGlobalFilter": { "alias": "enableGlobalFilter"; "required": false; }; "filterMode": { "alias": "filterMode"; "required": false; }; "filter": { "alias": "filter"; "required": false; }; "filterOperators": { "alias": "filterOperators"; "required": false; }; "filterManual": { "alias": "filterManual"; "required": false; }; "externalFiltering": { "alias": "externalFiltering"; "required": false; }; "dataOperations": { "alias": "dataOperations"; "required": false; }; "groupable": { "alias": "groupable"; "required": false; }; "group": { "alias": "group"; "required": false; }; "groupedData": { "alias": "groupedData"; "required": false; }; "state": { "alias": "state"; "required": false; }; "multiCheckboxFilterOptions": { "alias": "multiCheckboxFilterOptions"; "required": false; }; "enablePagination": { "alias": "enablePagination"; "required": false; }; "pageable": { "alias": "pageable"; "required": false; }; "enableEdit": { "alias": "enableEdit"; "required": false; }; "enableDelete": { "alias": "enableDelete"; "required": false; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; }; "enableAdd": { "alias": "enableAdd"; "required": false; }; "addButtonAriaLabel": { "alias": "addButtonAriaLabel"; "required": false; }; "addButtonText": { "alias": "addButtonText"; "required": false; }; "stickyRows": { "alias": "stickyRows"; "required": false; }; "stickyHeader": { "alias": "stickyHeader"; "required": false; }; "stickyFooter": { "alias": "stickyFooter"; "required": false; }; "scrollable": { "alias": "scrollable"; "required": false; }; "stickyRowHeight": { "alias": "stickyRowHeight"; "required": false; }; "stickyHeaderHeight": { "alias": "stickyHeaderHeight"; "required": false; }; "stickyFooterHeight": { "alias": "stickyFooterHeight"; "required": false; }; "tableOptions": { "alias": "tableOptions"; "required": false; }; "dataLayoutMode": { "alias": "dataLayoutMode"; "required": false; }; "selectionMode": { "alias": "selectionMode"; "required": false; }; "selectionBehavior": { "alias": "selectionBehavior"; "required": false; }; "selectionKeyMode": { "alias": "selectionKeyMode"; "required": false; }; "selectAllEnabled": { "alias": "selectAllEnabled"; "required": false; }; "selectionA11yLabels": { "alias": "selectionA11yLabels"; "required": false; }; "selectionDisabledFn": { "alias": "selectionDisabledFn"; "required": false; }; "highlightedIndex": { "alias": "highlightedIndex"; "required": false; }; "highlightRowKey": { "alias": "highlightRowKey"; "required": false; }; "highlightColKey": { "alias": "highlightColKey"; "required": false; }; "globalFilterAriaLabel": { "alias": "globalFilterAriaLabel"; "required": false; }; "globalFilterPlaceholder": { "alias": "globalFilterPlaceholder"; "required": false; }; "searchHighlightTerm": { "alias": "searchHighlightTerm"; "required": false; }; "searchHighlightFields": { "alias": "searchHighlightFields"; "required": false; }; "expandRowAriaLabel": { "alias": "expandRowAriaLabel"; "required": false; }; "collapseRowAriaLabel": { "alias": "collapseRowAriaLabel"; "required": false; }; "exportPdfAriaLabel": { "alias": "exportPdfAriaLabel"; "required": false; }; "exportExcelAriaLabel": { "alias": "exportExcelAriaLabel"; "required": false; }; "newRowDefaults": { "alias": "newRowDefaults"; "required": false; }; "strictEmail": { "alias": "strictEmail"; "required": false; }; "editOnRowClick": { "alias": "editOnRowClick"; "required": false; }; "editMode": { "alias": "editMode"; "required": false; }; "toolbarEditHint": { "alias": "toolbarEditHint"; "required": false; }; "singleExpand": { "alias": "singleExpand"; "required": false; }; "exportOptions": { "alias": "exportOptions"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "responsive": { "alias": "responsive"; "required": false; }; "trackBy": { "alias": "trackBy"; "required": false; }; "rowClass": { "alias": "rowClass"; "required": false; }; "rowStyle": { "alias": "rowStyle"; "required": false; }; "rowReorderable": { "alias": "rowReorderable"; "required": false; }; "columnReorderable": { "alias": "columnReorderable"; "required": false; }; "resizable": { "alias": "resizable"; "required": false; }; "actionDisplay": { "alias": "actionDisplay"; "required": false; }; "showStickyRowBadge": { "alias": "showStickyRowBadge"; "required": false; }; "stickyRowBadgeField": { "alias": "stickyRowBadgeField"; "required": false; }; "stickyRowBadgeLabel": { "alias": "stickyRowBadgeLabel"; "required": false; }; "labels": { "alias": "labels"; "required": false; }; "locale": { "alias": "locale"; "required": false; }; "dir": { "alias": "dir"; "required": false; }; "keyboardNavigation": { "alias": "keyboardNavigation"; "required": false; }; "editService": { "alias": "editService"; "required": false; }; "dataProviderAll": { "alias": "dataProviderAll"; "required": false; }; "dataProviderSelection": { "alias": "dataProviderSelection"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; }, { "rowAdd": "rowAdd"; "rowEdit": "rowEdit"; "rowSave": "rowSave"; "rowCancel": "rowCancel"; "rowDelete": "rowDelete"; "groupChange": "groupChange"; "sortChange": "sortChange"; "filterChange": "filterChange"; "filtersChange": "filtersChange"; "pageChange": "pageChange"; "dataStateChange": "dataStateChange"; "selectionChange": "selectionChange"; "rowReorder": "rowReorder"; "columnReorder": "columnReorder"; }, ["exportButtonDir", "rowDetailTpl", "pagerTpl", "groupHeaderTpl", "cellTplQ", "editTplQ", "filterTplQ", "filterMenuTplQ", "globalTplQ", "groupHeaderColumnTplQ", "groupFooterTplQ", "gridColumnQ"], ["ngb-datagrid-layout-toolbar"], true, never>;
1385
1618
  }
1386
1619
 
1387
1620
  /** Injection token for the active `ngb-datagrid` instance (layout toolbar tools). */
@@ -1438,11 +1671,16 @@ declare class NgbDatagridFloatingPanelDirective implements OnChanges, AfterViewI
1438
1671
  static ɵdir: i0.ɵɵDirectiveDeclaration<NgbDatagridFloatingPanelDirective, "[ngbDatagridFloatingPanel]", never, { "ngbDatagridFloatingPanelAnchor": { "alias": "ngbDatagridFloatingPanelAnchor"; "required": false; }; "ngbDatagridFloatingPanelPlacement": { "alias": "ngbDatagridFloatingPanelPlacement"; "required": false; }; }, {}, never, never, true, never>;
1439
1672
  }
1440
1673
 
1674
+ interface PdfExportOptions {
1675
+ pageSize?: 'A4' | 'Letter' | string;
1676
+ landscape?: boolean;
1677
+ margins?: [number, number, number, number];
1678
+ }
1441
1679
  interface PdfExportPayload {
1442
1680
  fileName: string;
1443
1681
  columns: string[];
1444
- rows: any[];
1445
- options?: any;
1682
+ rows: Array<Record<string, unknown>>;
1683
+ options?: PdfExportOptions;
1446
1684
  }
1447
1685
  interface ExcelExportPayload {
1448
1686
  fileName: string;
@@ -1451,7 +1689,7 @@ interface ExcelExportPayload {
1451
1689
  key: string;
1452
1690
  title: string;
1453
1691
  }>;
1454
- rows: any[];
1692
+ rows: Array<Record<string, unknown>>;
1455
1693
  }
1456
1694
  declare abstract class PdfExportAdapter {
1457
1695
  abstract export(p: PdfExportPayload): Promise<void>;
@@ -1469,7 +1707,15 @@ declare class NgbExportService {
1469
1707
  }
1470
1708
 
1471
1709
  declare class JsPdfAdapter implements PdfExportAdapter {
1472
- export({ fileName, columns, rows, options }: PdfExportPayload): Promise<void>;
1710
+ export(payload: PdfExportPayload): Promise<void>;
1711
+ private createPdf;
1712
+ private resolveMargin;
1713
+ private toTableLines;
1714
+ private contentStream;
1715
+ private chunk;
1716
+ private printable;
1717
+ private pdfText;
1718
+ private serializePdf;
1473
1719
  }
1474
1720
 
1475
1721
  declare class BrowserExcelExportAdapter implements ExcelExportAdapter {
@@ -1499,7 +1745,7 @@ declare class NgbGridColumnDirective<T = any> implements ColumnDef<T> {
1499
1745
  type?: ColumnType;
1500
1746
  options?: Array<{
1501
1747
  label: string;
1502
- value: any;
1748
+ value: unknown;
1503
1749
  }>;
1504
1750
  width?: number;
1505
1751
  stackedGroup?: 'start' | 'center' | 'end';
@@ -1885,7 +2131,7 @@ interface NgbAdvancedSearchOperator {
1885
2131
  interface NgbAdvancedSearchRule {
1886
2132
  field: string;
1887
2133
  operator: NgbFilterOperator;
1888
- value: any;
2134
+ value: unknown;
1889
2135
  }
1890
2136
  declare class NgbAdvancedSearchComponent {
1891
2137
  private _fields;
@@ -1992,12 +2238,14 @@ declare class NgbDatagridThemePickerComponent {
1992
2238
  }
1993
2239
 
1994
2240
  declare function ngbApplyDataGridOperations<T>(data: readonly T[] | null | undefined, options?: NgbDataGridProcessOptions<T>): NgbDataGridDataResult<T>;
2241
+ declare function ngbGroupData<T>(data: readonly T[] | null | undefined, descriptors: readonly NgbDataGridGroupDescriptor[] | null | undefined): NgbDataGridGroupResult<T>[];
1995
2242
  declare function ngbCalculateDataGridAggregates<T>(data: readonly T[] | null | undefined, descriptors: readonly NgbDataGridAggregateDescriptor[] | null | undefined): NgbDataGridAggregateResults;
1996
2243
 
1997
2244
  type DndI18n = {
1998
2245
  listLabel: (name?: string) => string;
1999
2246
  pickedUp: () => string;
2000
2247
  dropped: () => string;
2248
+ canceled?: () => string;
2001
2249
  moveToIndex: (pos: number, total: number) => string;
2002
2250
  dropHere: () => string;
2003
2251
  cannotDropHere: () => string;
@@ -2055,8 +2303,16 @@ declare class NgbDndItemDirective<T = unknown> {
2055
2303
  role: string;
2056
2304
  tabIndex: number;
2057
2305
  private sessionId;
2306
+ private keyboardDragState;
2307
+ private sourceList;
2308
+ private resolveIndex;
2309
+ private beginDragSession;
2310
+ private endDragSession;
2058
2311
  onDragStart(ev: DragEvent): void;
2059
2312
  onDragEnd(): void;
2313
+ private moveWithinKeyboardList;
2314
+ private emitKeyboardDrop;
2315
+ private cancelKeyboardDrag;
2060
2316
  onKeydown(ev: KeyboardEvent): void;
2061
2317
  static ɵfac: i0.ɵɵFactoryDeclaration<NgbDndItemDirective<any>, [{ optional: true; }]>;
2062
2318
  static ɵdir: i0.ɵɵDirectiveDeclaration<NgbDndItemDirective<any>, "[ngbDndItem]", never, { "item": { "alias": "ngbDndItem"; "required": false; }; "dndGroup": { "alias": "dndGroup"; "required": false; }; "dndIndex": { "alias": "dndIndex"; "required": false; }; "dndSourceList": { "alias": "dndSourceList"; "required": false; }; "dndDisabled": { "alias": "dndDisabled"; "required": false; }; }, { "dndDragStart": "dndDragStart"; "dndDragEnd": "dndDragEnd"; }, never, never, true, never>;
@@ -2441,5 +2697,5 @@ declare class NgbChipsComponent {
2441
2697
  static ɵcmp: i0.ɵɵComponentDeclaration<NgbChipsComponent, "ngb-chips", never, { "items": { "alias": "items"; "required": false; }; "removable": { "alias": "removable"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "removeLabel": { "alias": "removeLabel"; "required": false; }; }, { "remove": "remove"; }, never, never, true, never>;
2442
2698
  }
2443
2699
 
2444
- export { BrowserExcelExportAdapter, DATAGRID_COLUMN_DIRECTIVES, DATAGRID_TEMPLATE_DIRECTIVES, DND_I18N, DND_LIVE_ANNOUNCE, Datagrid, ExcelExportAdapter, ExportButtonDirective, JsPdfAdapter, NGB_BOOLEAN_FILTER_OPERATORS, NGB_DATAGRID_DEFAULT_LABELS, NGB_DATAGRID_DEFAULT_PAGEABLE, NGB_DATAGRID_HOST, NGB_DATAGRID_KEYBOARD_SHORTCUTS, NGB_DATAGRID_PAGER_BREAKPOINTS, NGB_DATAGRID_THEME_OPTIONS, NGB_DATE_FILTER_OPERATORS, NGB_NUMERIC_FILTER_OPERATORS, NGB_PAGER_BREAKPOINTS, NGB_PAGER_DEFAULT_SETTINGS, NGB_SELECT_FILTER_OPERATORS, NGB_TEXT_FILTER_OPERATORS, NgbAdvancedSearchComponent, NgbCellTemplate, NgbChipsComponent, NgbDataChartComponent, NgbDataSparklineComponent, NgbDatagridButtonDirective, NgbDatagridColumnChooserToolComponent, NgbDatagridControlDirective, NgbDatagridDefaultEditService, NgbDatagridFieldShellComponent, NgbDatagridFilterToolComponent, NgbDatagridFloatingPanelDirective, NgbDatagridLayoutToolbarComponent, NgbDatagridLayoutToolbarSpacerComponent, NgbDatagridSortToolComponent, NgbDatagridSurfaceCardComponent, NgbDatagridThemePickerComponent, NgbDndHandleDirective, NgbDndItemDirective, NgbDndListDirective, NgbDndState, NgbEditorTemplate, NgbExportService, NgbFilterMenuTemplate, NgbFilterTemplate, NgbGlobalFilterTemplate, NgbGridChartComponent, NgbGridColumnDirective, NgbJsonPreviewComponent, NgbLiveAnnouncer, NgbPagerComponent, NgbPagerTemplate, NgbPaginationComponent, NgbRowDetailTemplate, NgbSearchHighlightComponent, NgbSplitterComponent, NgbSplitterPaneComponent, NgbStepLabelDirective, NgbStepperComponent, NgbTreeComponent, NgbTypeaheadComponent, PdfExportAdapter, defaultDndI18n, ngbAggregateValues, ngbAllowedFilterOperators, ngbApplyDataGridOperations, ngbBuildChartJsConfig, ngbBuildColumnSelectionChartData, ngbBuildFullGridChartData, ngbBuildRowSelectionChartData, ngbBuildSparklinePoints, ngbCalculateDataGridAggregates, ngbChartPalette, ngbColumnTypeToFilterType, ngbDatagridPagerSettings, ngbDefaultFilterOperator, ngbFilterOperatorLabel, ngbFindFieldFilterDescriptor, ngbFlattenFilterDescriptors, ngbFormatDatagridLabel, ngbFormatPagerRangeLabel, ngbIsCompositeFilter, ngbOperatorRequiresFilterValue, ngbPagerButtonCountForDensity, ngbResolveDatagridPagerSettings, ngbResolvePageableSettings, ngbResolvePagerDensity, ngbResolvePagerPageSizeOptions, ngbResolvePagerSettings, ngbSetFieldFilter };
2445
- export type { CellCtx, ColumnDef, ColumnType, DndCanDropFn, DndCanDropPayload, DndI18n, DndSession, EditCtx, ExcelExportPayload, ExportButtonContext, FilterCtx, GlobalFilterCtx, NgbAdvancedSearchField, NgbAdvancedSearchOperator, NgbAdvancedSearchRule, NgbChip, NgbColKey, NgbColumnFilterType, NgbColumnReorderEvent, NgbColumnReorderOptions, NgbColumnSelectionChartOptions, NgbCompositeFilterDescriptor, NgbDataAggregate, NgbDataChartConfig, NgbDataChartSeries, NgbDataChartType, NgbDataDimensionDef, NgbDataGridAggregateDescriptor, NgbDataGridAggregateFunction, NgbDataGridAggregateResults, NgbDataGridDataResult, NgbDataGridExportOptions, NgbDataGridExportPages, NgbDataGridExportType, NgbDataGridProcessOptions, NgbDataGridResponsiveOptions, NgbDataGridSortDescriptor, NgbDataGridSortDirection, NgbDataGridState, NgbDataGridTheme, NgbDataGridThemeOption, NgbDataLayoutMode, NgbDataMetricDef, NgbDatagridButtonVariant, NgbDatagridEditService, NgbDatagridFloatingPanelPlacement, NgbDatagridLabels, NgbDatagridPageableSettings, NgbDatagridPagerDensity, NgbDatagridPagerPosition, NgbDatagridPagerType, NgbDatagridTextDirection, NgbDatagridTrackByFn, NgbDndDropEvent, NgbEditMode, NgbFilterDescriptor, NgbFilterMode, NgbFilterOperator, NgbFilterState, NgbFilterable, NgbFullGridChartOptions, NgbGridChartConfig, NgbGridChartMode, NgbGridChartSelectionChange, NgbGridChartSparklineOptions, NgbMenuFilterConditionDraft, NgbMultiCheckboxFilterOptions, NgbPagerDensity, NgbPagerSettings, NgbPagerType, NgbRowKey, NgbRowSelectionChartOptions, NgbSearchHighlightField, NgbSearchHighlightSegment, NgbSearchHighlightSelectionChange, NgbSelectionBehavior, NgbSelectionKeyMode, NgbSelectionLabels, NgbSelectionMode, NgbSparklinePoint, NgbSplitterOrientation, NgbSplitterPaneSize, NgbStepperContentPosition, NgbStepperLabelPosition, NgbStepperOrientation, NgbStepperSelectionChangeEvent, NgbStepperState, NgbStepperStep, NgbStepperTheme, NgbTableOptions, NgbTableResponsive, NgbTreeI18n, NgbTreeNode, NgbTreeType, NgbTypeaheadI18n, NgbTypeaheadItem, PagerCtx, PdfExportPayload };
2700
+ export { BrowserExcelExportAdapter, DATAGRID_COLUMN_DIRECTIVES, DATAGRID_TEMPLATE_DIRECTIVES, DND_I18N, DND_LIVE_ANNOUNCE, Datagrid, ExcelExportAdapter, ExportButtonDirective, JsPdfAdapter, NGB_BOOLEAN_FILTER_OPERATORS, NGB_DATAGRID_DEFAULT_LABELS, NGB_DATAGRID_DEFAULT_PAGEABLE, NGB_DATAGRID_HOST, NGB_DATAGRID_KEYBOARD_SHORTCUTS, NGB_DATAGRID_PAGER_BREAKPOINTS, NGB_DATAGRID_THEME_OPTIONS, NGB_DATE_FILTER_OPERATORS, NGB_NUMERIC_FILTER_OPERATORS, NGB_PAGER_BREAKPOINTS, NGB_PAGER_DEFAULT_SETTINGS, NGB_SELECT_FILTER_OPERATORS, NGB_TEXT_FILTER_OPERATORS, NgbAdvancedSearchComponent, NgbCellTemplate, NgbChipsComponent, NgbDataChartComponent, NgbDataGridGroupFooterTemplateDirective, NgbDataGridGroupHeaderColumnTemplateDirective, NgbDataGridGroupHeaderTemplateDirective, NgbDataSparklineComponent, NgbDatagridButtonDirective, NgbDatagridColumnChooserToolComponent, NgbDatagridControlDirective, NgbDatagridDefaultEditService, NgbDatagridFieldShellComponent, NgbDatagridFilterToolComponent, NgbDatagridFloatingPanelDirective, NgbDatagridLayoutToolbarComponent, NgbDatagridLayoutToolbarSpacerComponent, NgbDatagridSortToolComponent, NgbDatagridSurfaceCardComponent, NgbDatagridThemePickerComponent, NgbDndHandleDirective, NgbDndItemDirective, NgbDndListDirective, NgbDndState, NgbEditorTemplate, NgbExportService, NgbFilterMenuTemplate, NgbFilterTemplate, NgbGlobalFilterTemplate, NgbGridChartComponent, NgbGridColumnDirective, NgbGridHighlightDirective, NgbJsonPreviewComponent, NgbLiveAnnouncer, NgbPagerComponent, NgbPagerTemplate, NgbPaginationComponent, NgbRowDetailTemplate, NgbSearchHighlightComponent, NgbSplitterComponent, NgbSplitterPaneComponent, NgbStepLabelDirective, NgbStepperComponent, NgbTreeComponent, NgbTypeaheadComponent, PdfExportAdapter, defaultDndI18n, ngbAggregateValues, ngbAllowedFilterOperators, ngbApplyDataGridOperations, ngbBuildChartJsConfig, ngbBuildColumnSelectionChartData, ngbBuildFullGridChartData, ngbBuildRowSelectionChartData, ngbBuildSparklinePoints, ngbCalculateDataGridAggregates, ngbChartPalette, ngbColumnTypeToFilterType, ngbDatagridPagerSettings, ngbDefaultFilterOperator, ngbFilterOperatorLabel, ngbFindFieldFilterDescriptor, ngbFlattenFilterDescriptors, ngbFormatDatagridLabel, ngbFormatPagerRangeLabel, ngbGroupData, ngbIsCompositeFilter, ngbOperatorRequiresFilterValue, ngbPagerButtonCountForDensity, ngbResolveDatagridPagerSettings, ngbResolvePageableSettings, ngbResolvePagerDensity, ngbResolvePagerPageSizeOptions, ngbResolvePagerSettings, ngbSetFieldFilter };
2701
+ export type { CellCtx, ColumnDef, ColumnType, DndCanDropFn, DndCanDropPayload, DndI18n, DndSession, EditCtx, ExcelExportPayload, ExportButtonContext, FilterCtx, GlobalFilterCtx, GroupColumnCtx, GroupHeaderCtx, HighlightItem, NgbAdvancedSearchField, NgbAdvancedSearchOperator, NgbAdvancedSearchRule, NgbChip, NgbColKey, NgbColumnFilterType, NgbColumnReorderEvent, NgbColumnReorderOptions, NgbColumnSelectionChartOptions, NgbCompositeFilterDescriptor, NgbDataAggregate, NgbDataChartConfig, NgbDataChartSeries, NgbDataChartType, NgbDataDimensionDef, NgbDataGridAggregateDescriptor, NgbDataGridAggregateFunction, NgbDataGridAggregateResults, NgbDataGridAggregateType, NgbDataGridDataResult, NgbDataGridExportOptions, NgbDataGridExportPages, NgbDataGridExportType, NgbDataGridGroupChange, NgbDataGridGroupDescriptor, NgbDataGridGroupResult, NgbDataGridGroupingSettings, NgbDataGridProcessOptions, NgbDataGridResponsiveOptions, NgbDataGridSortDescriptor, NgbDataGridSortDirection, NgbDataGridState, NgbDataGridTheme, NgbDataGridThemeOption, NgbDataLayoutMode, NgbDataMetricDef, NgbDatagridButtonVariant, NgbDatagridEditService, NgbDatagridFloatingPanelPlacement, NgbDatagridLabels, NgbDatagridPageableSettings, NgbDatagridPagerDensity, NgbDatagridPagerPosition, NgbDatagridPagerType, NgbDatagridRowId, NgbDatagridTextDirection, NgbDatagridTrackByFn, NgbDndDropEvent, NgbEditMode, NgbFilterDescriptor, NgbFilterMode, NgbFilterOperator, NgbFilterState, NgbFilterable, NgbFullGridChartOptions, NgbGridChartConfig, NgbGridChartMode, NgbGridChartSelectionChange, NgbGridChartSparklineOptions, NgbMenuFilterConditionDraft, NgbMultiCheckboxFilterOptions, NgbPagerDensity, NgbPagerSettings, NgbPagerType, NgbRowKey, NgbRowSelectionChartOptions, NgbSearchHighlightField, NgbSearchHighlightSegment, NgbSearchHighlightSelectionChange, NgbSelectionBehavior, NgbSelectionKeyMode, NgbSelectionLabels, NgbSelectionMode, NgbSparklinePoint, NgbSplitterOrientation, NgbSplitterPaneSize, NgbStepperContentPosition, NgbStepperLabelPosition, NgbStepperOrientation, NgbStepperSelectionChangeEvent, NgbStepperState, NgbStepperStep, NgbStepperTheme, NgbTableOptions, NgbTableResponsive, NgbTreeI18n, NgbTreeNode, NgbTreeType, NgbTypeaheadI18n, NgbTypeaheadItem, PagerCtx, PdfExportOptions, PdfExportPayload };