@swimlane/ngx-datatable 23.0.1 → 24.0.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.
package/index.d.ts DELETED
@@ -1,1695 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Provider, PipeTransform, TemplateRef, EventEmitter, OnChanges, OnInit, OnDestroy, DoCheck, SimpleChanges, ChangeDetectorRef, TrackByFunction, AfterViewInit, AfterContentInit, QueryList, KeyValueDiffer, ViewContainerRef, ModuleWithProviders } from '@angular/core';
3
- import { Subscription, Observable } from 'rxjs';
4
- import { NgStyle } from '@angular/common';
5
-
6
- /** Interface for messages to override default table texts. */
7
- interface NgxDatatableMessages {
8
- /** Message to show when the array is present but empty */
9
- emptyMessage: string;
10
- /** Footer total message */
11
- totalMessage: string;
12
- /** Footer selected message */
13
- selectedMessage: string;
14
- /** Pager screen reader message for the first page button */
15
- ariaFirstPageMessage: string;
16
- /**
17
- * Pager screen reader message for the n-th page button.
18
- * It will be rendered as: `{{ariaPageNMessage}} {{n}}`.
19
- */
20
- ariaPageNMessage: string;
21
- /** Pager screen reader message for the previous page button */
22
- ariaPreviousPageMessage: string;
23
- /** Pager screen reader message for the next page button */
24
- ariaNextPageMessage: string;
25
- /** Pager screen reader message for the last page button */
26
- ariaLastPageMessage: string;
27
- }
28
- /** CSS classes for icons that override the default table icons. */
29
- interface NgxDatatableCssClasses {
30
- sortAscending: string;
31
- sortDescending: string;
32
- sortUnset: string;
33
- pagerLeftArrow: string;
34
- pagerRightArrow: string;
35
- pagerPrevious: string;
36
- pagerNext: string;
37
- }
38
- /**
39
- * Interface definition for ngx-datatable global configuration
40
- */
41
- interface NgxDatatableConfig {
42
- messages?: NgxDatatableMessages;
43
- cssClasses?: NgxDatatableCssClasses;
44
- headerHeight?: number;
45
- footerHeight?: number;
46
- rowHeight?: number;
47
- defaultColumnWidth?: number;
48
- }
49
- /**
50
- * This makes all properties recursively optional.
51
- *
52
- * @internal
53
- */
54
- type AllPartial<T> = {
55
- [K in keyof T]?: AllPartial<T[K]>;
56
- };
57
- /**
58
- * Provides a global configuration for ngx-datatable.
59
- *
60
- * @param overrides The overrides of the table configuration.
61
- */
62
- declare function providedNgxDatatableConfig(overrides: AllPartial<NgxDatatableConfig>): Provider;
63
-
64
- /**
65
- * Column property that indicates how to retrieve this column's
66
- * value from a row.
67
- * 'a.deep.value', 'normalprop', 0 (numeric)
68
- */
69
- type TableColumnProp = string | number;
70
- /**
71
- * Column Type
72
- */
73
- interface TableColumn<TRow extends Row = any> {
74
- /**
75
- * Determines if column is checkbox
76
- */
77
- checkboxable?: boolean;
78
- /**
79
- * Determines if the column is frozen to the left
80
- */
81
- frozenLeft?: boolean;
82
- /**
83
- * Determines if the column is frozen to the right
84
- */
85
- frozenRight?: boolean;
86
- /**
87
- * The grow factor relative to other columns. Same as the flex-grow
88
- * API from http =//www.w3.org/TR/css3-flexbox/. Basically;
89
- * take any available extra width and distribute it proportionally
90
- * according to all columns' flexGrow values.
91
- */
92
- flexGrow?: number;
93
- /**
94
- * Min width of the column
95
- */
96
- minWidth?: number;
97
- /**
98
- * Max width of the column
99
- */
100
- maxWidth?: number;
101
- /**
102
- * The default width of the column, in pixels
103
- */
104
- width?: number;
105
- /**
106
- * Can the column be resized
107
- */
108
- resizeable?: boolean;
109
- /**
110
- * Custom sort comparator
111
- */
112
- comparator?: (valueA: any, valueB: any, rowA: TRow, rowB: TRow, sortDir: 'desc' | 'asc') => number;
113
- /**
114
- * Custom pipe transforms
115
- */
116
- pipe?: PipeTransform;
117
- /**
118
- * Can the column be sorted
119
- */
120
- sortable?: boolean;
121
- /**
122
- * Can the column be re-arranged by dragging
123
- */
124
- draggable?: boolean;
125
- /**
126
- * Whether the column can automatically resize to fill space in the table.
127
- */
128
- canAutoResize?: boolean;
129
- /**
130
- * Column name or label
131
- */
132
- name?: string;
133
- /**
134
- * Property to bind to the row. Example:
135
- *
136
- * `someField` or `some.field.nested`, 0 (numeric)
137
- *
138
- * If left blank, will use the name as camel case conversion
139
- */
140
- prop?: TableColumnProp;
141
- /**
142
- * By default, the property is bound using normal data binding `<span>{{content}}</span>`.
143
- * If this property is set to true, the property will be bound as `<span [innerHTML]="content" />`.
144
- *
145
- * **DANGER** If enabling this feature, make sure the source of the data is trusted. This can be a vector for HTML injection attacks.
146
- */
147
- bindAsUnsafeHtml?: boolean;
148
- /**
149
- * Cell template ref
150
- */
151
- cellTemplate?: TemplateRef<CellContext<TRow>>;
152
- /**
153
- * Ghost Cell template ref
154
- */
155
- ghostCellTemplate?: TemplateRef<any>;
156
- /**
157
- * Header template ref
158
- */
159
- headerTemplate?: TemplateRef<HeaderCellContext>;
160
- /**
161
- * Tree toggle template ref
162
- */
163
- treeToggleTemplate?: any;
164
- /**
165
- * CSS Classes for the cell
166
- */
167
- cellClass?: string | ((data: {
168
- row: TRow;
169
- group?: TRow[];
170
- column: TableColumn<TRow>;
171
- value: any;
172
- rowHeight: number;
173
- }) => string | Record<string, boolean>);
174
- /**
175
- * CSS classes for the header
176
- */
177
- headerClass?: string | ((data: {
178
- column: TableColumn;
179
- }) => string | Record<string, boolean>);
180
- /**
181
- * Header checkbox enabled
182
- */
183
- headerCheckboxable?: boolean;
184
- /**
185
- * Is tree displayed on this column
186
- */
187
- isTreeColumn?: boolean;
188
- /**
189
- * Width of the tree level indent
190
- */
191
- treeLevelIndent?: number;
192
- /**
193
- * Summary function
194
- *
195
- * Null and undefined have different meanings:
196
- * - undefined will use the default summary function
197
- * - null will not compute a summary
198
- */
199
- summaryFunc?: ((cells: any[]) => any) | null;
200
- /**
201
- * Summary cell template ref
202
- */
203
- summaryTemplate?: TemplateRef<any>;
204
- }
205
-
206
- interface SortPropDir {
207
- dir: SortDirection | 'desc' | 'asc';
208
- prop: TableColumnProp;
209
- }
210
- declare enum SortDirection {
211
- asc = "asc",
212
- desc = "desc"
213
- }
214
- interface SortEvent {
215
- column: TableColumn;
216
- prevValue: SortDirection | undefined;
217
- newValue: SortDirection | undefined;
218
- sorts: SortPropDir[];
219
- }
220
- declare enum SortType {
221
- single = "single",
222
- multi = "multi"
223
- }
224
- declare enum ColumnMode {
225
- standard = "standard",
226
- flex = "flex",
227
- force = "force"
228
- }
229
- type TreeStatus = 'collapsed' | 'expanded' | 'loading' | 'disabled';
230
- interface ActivateEvent<TRow> {
231
- type: 'checkbox' | 'click' | 'dblclick' | 'keydown' | 'mouseenter';
232
- event: Event;
233
- row: TRow;
234
- group?: TRow[];
235
- rowHeight?: number;
236
- column?: TableColumn;
237
- value?: any;
238
- cellElement?: HTMLElement;
239
- treeStatus?: TreeStatus;
240
- cellIndex?: number;
241
- rowElement: HTMLElement;
242
- }
243
- interface HeaderCellContext {
244
- column: TableColumn;
245
- sortDir: SortDirection | 'asc' | 'desc' | undefined;
246
- sortFn: () => void;
247
- allRowsSelected?: boolean;
248
- selectFn: () => void;
249
- }
250
- interface GroupContext<TRow extends Row = any> {
251
- group: Group<TRow>;
252
- expanded: boolean;
253
- rowIndex: number;
254
- }
255
- interface CellContext<TRow extends Row = any> {
256
- onCheckboxChangeFn: (event: Event) => void;
257
- activateFn: (event: ActivateEvent<TRow>) => void;
258
- row: TRow;
259
- group?: TRow[];
260
- value: any;
261
- column: TableColumn;
262
- rowHeight: number;
263
- isSelected?: boolean;
264
- rowIndex: number;
265
- rowInGroupIndex?: number;
266
- treeStatus?: TreeStatus;
267
- disabled?: boolean;
268
- onTreeAction: () => void;
269
- expanded?: boolean;
270
- }
271
- interface FooterContext {
272
- rowCount: number;
273
- pageSize: number;
274
- selectedCount: number;
275
- curPage: number;
276
- offset: number;
277
- }
278
- declare enum ContextmenuType {
279
- header = "header",
280
- body = "body"
281
- }
282
- /** A Group row */
283
- interface Group<TRow> {
284
- /** The value by which to rows are grouped. */
285
- key: TRow[keyof TRow];
286
- /** All rows that are part of the group. */
287
- value: TRow[];
288
- }
289
- /** Type for either a row or a group */
290
- type RowOrGroup<TRow> = TRow | Group<TRow>;
291
- interface RowDetailContext<TRow extends Row = any> {
292
- row: TRow;
293
- expanded: boolean;
294
- rowIndex: number;
295
- disabled?: boolean;
296
- }
297
- /**
298
- * Consumer provided rows should extend this interface
299
- * to get access to implicit row properties which are set by the datatable if required.
300
- */
301
- interface Row {
302
- [key: TableColumnProp]: any;
303
- treeStatus?: TreeStatus;
304
- level?: number;
305
- }
306
- interface ReorderEvent {
307
- column: TableColumn;
308
- prevValue: number;
309
- newValue: number;
310
- }
311
- interface PageEvent {
312
- count: number;
313
- pageSize: number;
314
- /** @deprecated Use {@link pageSize} instead. */
315
- limit: number | undefined;
316
- offset: number;
317
- sorts: SortPropDir[];
318
- }
319
- interface PagerPageEvent {
320
- page: number;
321
- }
322
- interface ColumnResizeEvent {
323
- column: TableColumn;
324
- prevValue: number;
325
- newValue: number;
326
- }
327
- interface ScrollEvent {
328
- offsetY: number;
329
- offsetX: number;
330
- }
331
- interface GroupToggleEvent<TRow> {
332
- type: 'group';
333
- value: Group<TRow>;
334
- }
335
- interface AllGroupsToggleEvent {
336
- type: 'all';
337
- value: boolean;
338
- }
339
- type GroupToggleEvents<TRow> = GroupToggleEvent<TRow> | AllGroupsToggleEvent;
340
- interface DetailToggleEvent<TRow> {
341
- type: 'row';
342
- value: TRow;
343
- }
344
- interface AllDetailToggleEvent {
345
- type: 'all';
346
- value: boolean;
347
- }
348
- type DetailToggleEvents<TRow> = DetailToggleEvent<TRow> | AllDetailToggleEvent;
349
- declare enum SelectionType {
350
- single = "single",
351
- multi = "multi",
352
- multiClick = "multiClick",
353
- cell = "cell",
354
- checkbox = "checkbox"
355
- }
356
- interface SelectEvent<TRow> {
357
- selected: TRow[];
358
- }
359
- interface ContextMenuEventBody<TRow> {
360
- event: MouseEvent;
361
- type: ContextmenuType.body;
362
- content: RowOrGroup<TRow>;
363
- }
364
- interface ContextMenuEvenHeader {
365
- event: MouseEvent;
366
- type: ContextmenuType.header;
367
- content: TableColumn;
368
- }
369
- type ContextMenuEvent<TRow> = ContextMenuEventBody<TRow> | ContextMenuEvenHeader;
370
- type DragEventType = 'drag' | 'dragend' | 'dragenter' | 'dragleave' | 'dragover' | 'dragstart' | 'drop';
371
- interface DragEventData {
372
- event: DragEvent;
373
- srcElement: HTMLElement;
374
- targetElement?: HTMLElement;
375
- eventType: DragEventType;
376
- dragRow: any;
377
- dropRow?: any;
378
- }
379
-
380
- declare class DataTableFooterTemplateDirective {
381
- static ngTemplateContextGuard(directive: DataTableFooterTemplateDirective, context: unknown): context is FooterContext;
382
- static ɵfac: i0.ɵɵFactoryDeclaration<DataTableFooterTemplateDirective, never>;
383
- static ɵdir: i0.ɵɵDirectiveDeclaration<DataTableFooterTemplateDirective, "[ngx-datatable-footer-template]", never, {}, {}, never, never, true, never>;
384
- }
385
-
386
- declare class DatatableGroupHeaderDirective<TRow extends Row = any> {
387
- /**
388
- * Row height is required when virtual scroll is enabled.
389
- */
390
- rowHeight: number | ((group?: Group<TRow>, index?: number) => number);
391
- /**
392
- * Show checkbox at group header to select all rows of the group.
393
- */
394
- checkboxable: boolean;
395
- _templateInput?: TemplateRef<GroupContext<TRow>>;
396
- _templateQuery?: TemplateRef<GroupContext<TRow>>;
397
- get template(): TemplateRef<GroupContext<TRow>> | undefined;
398
- /**
399
- * Track toggling of group visibility
400
- */
401
- toggle: EventEmitter<GroupToggleEvents<TRow>>;
402
- /**
403
- * Toggle the expansion of a group
404
- */
405
- toggleExpandGroup(group: Group<TRow>): void;
406
- /**
407
- * Expand all groups
408
- */
409
- expandAllGroups(): void;
410
- /**
411
- * Collapse all groups
412
- */
413
- collapseAllGroups(): void;
414
- static ɵfac: i0.ɵɵFactoryDeclaration<DatatableGroupHeaderDirective<any>, never>;
415
- static ɵdir: i0.ɵɵDirectiveDeclaration<DatatableGroupHeaderDirective<any>, "ngx-datatable-group-header", never, { "rowHeight": { "alias": "rowHeight"; "required": false; }; "checkboxable": { "alias": "checkboxable"; "required": false; }; "_templateInput": { "alias": "template"; "required": false; }; }, { "toggle": "toggle"; }, ["_templateQuery"], never, true, never>;
416
- }
417
-
418
- declare class DataTableColumnDirective<TRow extends Row> implements TableColumn, OnChanges {
419
- private columnChangesService;
420
- name?: string;
421
- prop?: TableColumnProp;
422
- bindAsUnsafeHtml?: boolean;
423
- frozenLeft?: boolean;
424
- frozenRight?: boolean;
425
- flexGrow?: number;
426
- resizeable?: boolean;
427
- comparator?: (valueA: any, valueB: any, rowA: TRow, rowB: TRow, sortDir: 'desc' | 'asc') => number;
428
- pipe?: PipeTransform;
429
- sortable?: boolean;
430
- draggable?: boolean;
431
- canAutoResize?: boolean;
432
- minWidth?: number;
433
- width?: number;
434
- maxWidth?: number;
435
- checkboxable?: boolean;
436
- headerCheckboxable?: boolean;
437
- headerClass?: string | ((data: {
438
- column: TableColumn;
439
- }) => string | Record<string, boolean>);
440
- cellClass?: string | ((data: {
441
- row: TRow;
442
- group?: TRow[];
443
- column: TableColumn<TRow>;
444
- value: any;
445
- rowHeight: number;
446
- }) => string | Record<string, boolean>);
447
- isTreeColumn?: boolean;
448
- treeLevelIndent?: number;
449
- summaryFunc?: (cells: any[]) => any;
450
- summaryTemplate?: TemplateRef<any>;
451
- _cellTemplateInput?: TemplateRef<CellContext<TRow>>;
452
- _cellTemplateQuery?: TemplateRef<CellContext<TRow>>;
453
- get cellTemplate(): TemplateRef<CellContext<TRow>> | undefined;
454
- _headerTemplateInput?: TemplateRef<HeaderCellContext>;
455
- _headerTemplateQuery?: TemplateRef<HeaderCellContext>;
456
- get headerTemplate(): TemplateRef<HeaderCellContext> | undefined;
457
- _treeToggleTemplateInput?: TemplateRef<any>;
458
- _treeToggleTemplateQuery?: TemplateRef<any>;
459
- get treeToggleTemplate(): TemplateRef<any> | undefined;
460
- _ghostCellTemplateInput?: TemplateRef<void>;
461
- _ghostCellTemplateQuery?: TemplateRef<void>;
462
- get ghostCellTemplate(): TemplateRef<void> | undefined;
463
- private isFirstChange;
464
- ngOnChanges(): void;
465
- static ɵfac: i0.ɵɵFactoryDeclaration<DataTableColumnDirective<any>, never>;
466
- static ɵdir: i0.ɵɵDirectiveDeclaration<DataTableColumnDirective<any>, "ngx-datatable-column", never, { "name": { "alias": "name"; "required": false; }; "prop": { "alias": "prop"; "required": false; }; "bindAsUnsafeHtml": { "alias": "bindAsUnsafeHtml"; "required": false; }; "frozenLeft": { "alias": "frozenLeft"; "required": false; }; "frozenRight": { "alias": "frozenRight"; "required": false; }; "flexGrow": { "alias": "flexGrow"; "required": false; }; "resizeable": { "alias": "resizeable"; "required": false; }; "comparator": { "alias": "comparator"; "required": false; }; "pipe": { "alias": "pipe"; "required": false; }; "sortable": { "alias": "sortable"; "required": false; }; "draggable": { "alias": "draggable"; "required": false; }; "canAutoResize": { "alias": "canAutoResize"; "required": false; }; "minWidth": { "alias": "minWidth"; "required": false; }; "width": { "alias": "width"; "required": false; }; "maxWidth": { "alias": "maxWidth"; "required": false; }; "checkboxable": { "alias": "checkboxable"; "required": false; }; "headerCheckboxable": { "alias": "headerCheckboxable"; "required": false; }; "headerClass": { "alias": "headerClass"; "required": false; }; "cellClass": { "alias": "cellClass"; "required": false; }; "isTreeColumn": { "alias": "isTreeColumn"; "required": false; }; "treeLevelIndent": { "alias": "treeLevelIndent"; "required": false; }; "summaryFunc": { "alias": "summaryFunc"; "required": false; }; "summaryTemplate": { "alias": "summaryTemplate"; "required": false; }; "_cellTemplateInput": { "alias": "cellTemplate"; "required": false; }; "_headerTemplateInput": { "alias": "headerTemplate"; "required": false; }; "_treeToggleTemplateInput": { "alias": "treeToggleTemplate"; "required": false; }; "_ghostCellTemplateInput": { "alias": "ghostCellTemplate"; "required": false; }; }, {}, ["_cellTemplateQuery", "_headerTemplateQuery", "_treeToggleTemplateQuery", "_ghostCellTemplateQuery"], never, true, never>;
467
- static ngAcceptInputType_bindAsUnsafeHtml: unknown;
468
- static ngAcceptInputType_frozenLeft: unknown;
469
- static ngAcceptInputType_frozenRight: unknown;
470
- static ngAcceptInputType_flexGrow: unknown;
471
- static ngAcceptInputType_resizeable: unknown;
472
- static ngAcceptInputType_sortable: unknown;
473
- static ngAcceptInputType_draggable: unknown;
474
- static ngAcceptInputType_canAutoResize: unknown;
475
- static ngAcceptInputType_minWidth: unknown;
476
- static ngAcceptInputType_width: unknown;
477
- static ngAcceptInputType_maxWidth: unknown;
478
- static ngAcceptInputType_checkboxable: unknown;
479
- static ngAcceptInputType_headerCheckboxable: unknown;
480
- static ngAcceptInputType_isTreeColumn: unknown;
481
- }
482
-
483
- declare class DatatableRowDetailDirective<TRow extends Row = any> {
484
- /**
485
- * The detail row height is required especially
486
- * when virtual scroll is enabled.
487
- */
488
- rowHeight: number | ((row?: TRow, index?: number) => number);
489
- _templateInput?: TemplateRef<RowDetailContext<TRow>>;
490
- _templateQuery?: TemplateRef<RowDetailContext<TRow>>;
491
- get template(): TemplateRef<RowDetailContext<TRow>> | undefined;
492
- /**
493
- * Row detail row visbility was toggled.
494
- */
495
- toggle: EventEmitter<DetailToggleEvents<TRow>>;
496
- /**
497
- * Toggle the expansion of the row
498
- */
499
- toggleExpandRow(row: TRow): void;
500
- /**
501
- * API method to expand all the rows.
502
- */
503
- expandAllRows(): void;
504
- /**
505
- * API method to collapse all the rows.
506
- */
507
- collapseAllRows(): void;
508
- static ɵfac: i0.ɵɵFactoryDeclaration<DatatableRowDetailDirective<any>, never>;
509
- static ɵdir: i0.ɵɵDirectiveDeclaration<DatatableRowDetailDirective<any>, "ngx-datatable-row-detail", never, { "rowHeight": { "alias": "rowHeight"; "required": false; }; "_templateInput": { "alias": "template"; "required": false; }; }, { "toggle": "toggle"; }, ["_templateQuery"], never, true, never>;
510
- }
511
-
512
- declare class DatatableFooterDirective {
513
- _templateInput?: TemplateRef<FooterContext>;
514
- _templateQuery?: TemplateRef<FooterContext>;
515
- get template(): TemplateRef<FooterContext> | undefined;
516
- static ɵfac: i0.ɵɵFactoryDeclaration<DatatableFooterDirective, never>;
517
- static ɵdir: i0.ɵɵDirectiveDeclaration<DatatableFooterDirective, "ngx-datatable-footer", never, { "_templateInput": { "alias": "template"; "required": false; }; }, {}, ["_templateQuery"], never, true, never>;
518
- }
519
-
520
- declare class ScrollerComponent implements OnInit, OnDestroy {
521
- private renderer;
522
- scrollbarV?: boolean;
523
- scrollbarH?: boolean;
524
- scrollHeight?: number;
525
- scrollWidth?: number;
526
- scroll: EventEmitter<any>;
527
- scrollYPos: number;
528
- scrollXPos: number;
529
- prevScrollYPos: number;
530
- prevScrollXPos: number;
531
- element: HTMLElement;
532
- parentElement?: HTMLElement;
533
- private _scrollEventListener;
534
- ngOnInit(): void;
535
- ngOnDestroy(): void;
536
- setOffset(offsetY: number): void;
537
- onScrolled(event: MouseEvent): void;
538
- updateOffset(): void;
539
- static ɵfac: i0.ɵɵFactoryDeclaration<ScrollerComponent, never>;
540
- static ɵcmp: i0.ɵɵComponentDeclaration<ScrollerComponent, "datatable-scroller", never, { "scrollbarV": { "alias": "scrollbarV"; "required": false; }; "scrollbarH": { "alias": "scrollbarH"; "required": false; }; "scrollHeight": { "alias": "scrollHeight"; "required": false; }; "scrollWidth": { "alias": "scrollWidth"; "required": false; }; }, { "scroll": "scroll"; }, never, ["*"], true, never>;
541
- }
542
-
543
- /**
544
- * This object contains the cache of the various row heights that are present inside
545
- * the data table. Its based on Fenwick tree data structure that helps with
546
- * querying sums that have time complexity of log n.
547
- *
548
- * Fenwick Tree Credits: http://petr-mitrichev.blogspot.com/2013/05/fenwick-tree-range-updates.html
549
- * https://github.com/mikolalysenko/fenwick-tree
550
- *
551
- */
552
- declare class RowHeightCache {
553
- /**
554
- * Tree Array stores the cumulative information of the row heights to perform efficient
555
- * range queries and updates. Currently the tree is initialized to the base row
556
- * height instead of the detail row height.
557
- */
558
- private treeArray;
559
- /**
560
- * Clear the Tree array.
561
- */
562
- clearCache(): void;
563
- /**
564
- * Initialize the Fenwick tree with row Heights.
565
- *
566
- * @param rows The array of rows which contain the expanded status.
567
- * @param rowHeight The row height.
568
- * @param detailRowHeight The detail row height.
569
- */
570
- initCache(details: any): void;
571
- /**
572
- * Given the ScrollY position i.e. sum, provide the rowIndex
573
- * that is present in the current view port. Below handles edge cases.
574
- */
575
- getRowIndex(scrollY: number): number;
576
- /**
577
- * When a row is expanded or rowHeight is changed, update the height. This can
578
- * be utilized in future when Angular Data table supports dynamic row heights.
579
- */
580
- update(atRowIndex: number, byRowHeight: number): void;
581
- /**
582
- * Range Sum query from 1 to the rowIndex
583
- */
584
- query(atIndex: number): number;
585
- /**
586
- * Find the total height between 2 row indexes
587
- */
588
- queryBetween(atIndexA: number, atIndexB: number): number;
589
- /**
590
- * Given the ScrollY position i.e. sum, provide the rowIndex
591
- * that is present in the current view port.
592
- */
593
- private calcRowIndex;
594
- }
595
-
596
- type ValueGetter = (obj: any, prop: TableColumnProp) => any;
597
-
598
- type PinDirection = 'left' | 'center' | 'right';
599
- interface PinnedColumns {
600
- type: PinDirection;
601
- columns: TableColumnInternal[];
602
- }
603
- interface ColumnGroupWidth {
604
- left: number;
605
- center: number;
606
- right: number;
607
- total: number;
608
- }
609
- interface TargetChangedEvent {
610
- newIndex?: number;
611
- prevIndex: number;
612
- initialIndex: number;
613
- }
614
- interface ColumnResizeEventInternal {
615
- column: TableColumnInternal;
616
- prevValue: number;
617
- newValue: number;
618
- }
619
- interface ReorderEventInternal {
620
- column: TableColumnInternal;
621
- prevValue: number;
622
- newValue: number;
623
- }
624
- interface InnerSortEvent {
625
- column: SortableTableColumnInternal;
626
- prevValue: SortDirection | undefined;
627
- newValue: SortDirection | undefined;
628
- }
629
- interface CellActiveEvent<TRow> {
630
- type: 'checkbox' | 'click' | 'dblclick' | 'keydown' | 'mouseenter';
631
- event: Event;
632
- row: TRow;
633
- group?: TRow[];
634
- rowHeight?: number;
635
- column?: TableColumn;
636
- value?: any;
637
- cellElement?: HTMLElement;
638
- treeStatus?: TreeStatus;
639
- }
640
- interface BaseTableColumnInternal<TRow extends Row = any> extends TableColumn<TRow> {
641
- /** Internal unique id */
642
- $$id: string;
643
- /** Internal for column width distributions */
644
- $$oldWidth?: number;
645
- /** Internal for setColumnDefaults */
646
- $$valueGetter: ValueGetter;
647
- dragging?: boolean;
648
- isTarget?: boolean;
649
- targetMarkerContext?: any;
650
- name: string;
651
- width: number;
652
- }
653
- interface StandardTableColumnInternal<TRow extends Row = any> extends BaseTableColumnInternal<TRow> {
654
- sortable?: false;
655
- }
656
- interface SortableTableColumnInternal<TRow extends Row = any> extends BaseTableColumnInternal<TRow> {
657
- comparator: Exclude<TableColumn['comparator'], undefined>;
658
- prop: TableColumnProp;
659
- sortable: true;
660
- }
661
- type TableColumnInternal<TRow extends Row = any> = StandardTableColumnInternal<TRow> | SortableTableColumnInternal<TRow>;
662
- /** Represents the index of a row. */
663
- interface RowIndex {
664
- /** Index of the row. If the row is inside a group, it will hold the index the group. */
665
- index: number;
666
- /** Index of a row inside a group. Only present if the row is inside a group. */
667
- indexInGroup?: number;
668
- }
669
-
670
- declare class DataTableBodyRowComponent<TRow extends Row = any> implements DoCheck, OnChanges {
671
- private cd;
672
- set columns(val: TableColumnInternal[]);
673
- get columns(): TableColumnInternal[];
674
- set innerWidth(val: number);
675
- get innerWidth(): number;
676
- expanded?: boolean;
677
- rowClass?: (row: TRow) => string | Record<string, boolean>;
678
- row: TRow;
679
- group?: TRow[];
680
- isSelected?: boolean;
681
- rowIndex: RowIndex;
682
- displayCheck?: (row: TRow, column: TableColumnInternal, value?: any) => boolean;
683
- treeStatus?: TreeStatus;
684
- verticalScrollVisible: boolean;
685
- disabled?: boolean;
686
- get cssClass(): string;
687
- rowHeight: number;
688
- get columnsTotalWidths(): number;
689
- activate: EventEmitter<ActivateEvent<TRow>>;
690
- treeAction: EventEmitter<any>;
691
- _element: HTMLElement;
692
- _columnGroupWidths: ColumnGroupWidth;
693
- _columnsByPin: PinnedColumns[];
694
- _columns: TableColumnInternal[];
695
- _innerWidth: number;
696
- private _rowDiffer;
697
- ngOnChanges(changes: SimpleChanges): void;
698
- ngDoCheck(): void;
699
- onActivate(event: CellActiveEvent<TRow>, index: number): void;
700
- onKeyDown(event: KeyboardEvent): void;
701
- onMouseenter(event: MouseEvent): void;
702
- recalculateColumns(val?: TableColumnInternal<TRow>[]): void;
703
- onTreeAction(): void;
704
- /** Returns the row index, or if in a group, the index within a group. */
705
- private get innerRowIndex();
706
- static ɵfac: i0.ɵɵFactoryDeclaration<DataTableBodyRowComponent<any>, never>;
707
- static ɵcmp: i0.ɵɵComponentDeclaration<DataTableBodyRowComponent<any>, "datatable-body-row", never, { "columns": { "alias": "columns"; "required": false; }; "innerWidth": { "alias": "innerWidth"; "required": false; }; "expanded": { "alias": "expanded"; "required": false; }; "rowClass": { "alias": "rowClass"; "required": false; }; "row": { "alias": "row"; "required": false; }; "group": { "alias": "group"; "required": false; }; "isSelected": { "alias": "isSelected"; "required": false; }; "rowIndex": { "alias": "rowIndex"; "required": false; }; "displayCheck": { "alias": "displayCheck"; "required": false; }; "treeStatus": { "alias": "treeStatus"; "required": false; }; "verticalScrollVisible": { "alias": "verticalScrollVisible"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "rowHeight": { "alias": "rowHeight"; "required": false; }; }, { "activate": "activate"; "treeAction": "treeAction"; }, never, never, true, never>;
708
- }
709
-
710
- declare enum Keys {
711
- up = "ArrowUp",
712
- down = "ArrowDown",
713
- return = "Enter",
714
- escape = "Escape",
715
- left = "ArrowLeft",
716
- right = "ArrowRight"
717
- }
718
-
719
- declare class DataTableBodyComponent<TRow extends Row = any> implements OnInit, OnDestroy {
720
- cd: ChangeDetectorRef;
721
- rowDefTemplate?: TemplateRef<any>;
722
- scrollbarV?: boolean;
723
- scrollbarH?: boolean;
724
- loadingIndicator?: boolean;
725
- ghostLoadingIndicator?: boolean;
726
- externalPaging?: boolean;
727
- rowHeight: number | 'auto' | ((row?: any) => number);
728
- offsetX: number;
729
- selectionType?: SelectionType;
730
- selected: any[];
731
- rowIdentity: (x: RowOrGroup<TRow>) => unknown;
732
- rowDetail?: DatatableRowDetailDirective;
733
- groupHeader?: DatatableGroupHeaderDirective;
734
- selectCheck?: (value: TRow, index: number, array: TRow[]) => boolean;
735
- displayCheck?: (row: TRow, column: TableColumnInternal, value?: any) => boolean;
736
- trackByProp?: string;
737
- rowClass?: (row: TRow) => string | Record<string, boolean>;
738
- groupedRows?: Group<TRow>[];
739
- groupExpansionDefault?: boolean;
740
- innerWidth: number;
741
- groupRowsBy?: keyof TRow;
742
- virtualization?: boolean;
743
- summaryRow?: boolean;
744
- summaryPosition: string;
745
- summaryHeight: number;
746
- rowDraggable?: boolean;
747
- rowDragEvents: EventEmitter<DragEventData>;
748
- disableRowCheck?: (row: TRow) => boolean | undefined;
749
- set pageSize(val: number);
750
- get pageSize(): number;
751
- set rows(val: (TRow | undefined)[]);
752
- get rows(): (TRow | undefined)[];
753
- set columns(val: TableColumnInternal[]);
754
- get columns(): any[];
755
- set offset(val: number);
756
- get offset(): number;
757
- set rowCount(val: number);
758
- get rowCount(): number;
759
- get bodyWidth(): string;
760
- set bodyHeight(val: number | string);
761
- get bodyHeight(): number | string;
762
- verticalScrollVisible: boolean;
763
- scroll: EventEmitter<ScrollEvent>;
764
- page: EventEmitter<number>;
765
- activate: EventEmitter<ActivateEvent<TRow>>;
766
- select: EventEmitter<SelectEvent<TRow>>;
767
- rowContextmenu: EventEmitter<{
768
- event: MouseEvent;
769
- row: RowOrGroup<TRow>;
770
- }>;
771
- treeAction: EventEmitter<{
772
- row: TRow;
773
- }>;
774
- scroller: ScrollerComponent;
775
- /**
776
- * Returns if selection is enabled.
777
- */
778
- get selectEnabled(): boolean;
779
- /**
780
- * Property that would calculate the height of scroll bar
781
- * based on the row heights cache for virtual scroll and virtualization. Other scenarios
782
- * calculate scroll height automatically (as height will be undefined).
783
- */
784
- scrollHeight: i0.Signal<number>;
785
- rowsToRender: i0.Signal<RowOrGroup<TRow>[]>;
786
- rowHeightsCache: i0.WritableSignal<RowHeightCache>;
787
- offsetY: number;
788
- indexes: i0.WritableSignal<{
789
- first: number;
790
- last: number;
791
- }>;
792
- columnGroupWidths: ColumnGroupWidth;
793
- rowTrackingFn: TrackByFunction<RowOrGroup<TRow> | undefined>;
794
- listener: any;
795
- rowExpansions: any[];
796
- _rows: (TRow | undefined)[];
797
- _bodyHeight: string;
798
- _columns: TableColumnInternal[];
799
- _rowCount: number;
800
- _offset: number;
801
- _pageSize: number;
802
- _offsetEvent: number;
803
- private _draggedRow?;
804
- private _draggedRowElement?;
805
- /**
806
- * Creates an instance of DataTableBodyComponent.
807
- */
808
- constructor();
809
- /**
810
- * Called after the constructor, initializing input properties
811
- */
812
- ngOnInit(): void;
813
- private toggleStateChange;
814
- /**
815
- * Called once, before the instance is destroyed.
816
- */
817
- ngOnDestroy(): void;
818
- /**
819
- * Updates the Y offset given a new offset.
820
- */
821
- updateOffsetY(offset?: number): void;
822
- /**
823
- * Body was scrolled, this is mainly useful for
824
- * when a user is server-side pagination via virtual scroll.
825
- */
826
- onBodyScroll(event: any): void;
827
- /**
828
- * Updates the page given a direction.
829
- */
830
- updatePage(direction: string): void;
831
- /**
832
- * Updates the rows in the view port
833
- */
834
- updateRows(): (RowOrGroup<TRow> | undefined)[];
835
- /**
836
- * Get the row height
837
- */
838
- getRowHeight(row: RowOrGroup<TRow>): number;
839
- /**
840
- * @param group the group with all rows
841
- */
842
- getGroupHeight(group: Group<TRow>): number;
843
- /**
844
- * Calculate row height based on the expanded state of the row.
845
- */
846
- getRowAndDetailHeight(row: TRow): number;
847
- /**
848
- * Get the height of the detail row.
849
- */
850
- getDetailRowHeight: (row?: TRow, index?: number) => number;
851
- getGroupHeaderRowHeight: (row?: any, index?: any) => number;
852
- /**
853
- * Calculates the offset of the rendered rows.
854
- * As virtual rows are not shown, we have to move all rendered rows
855
- * by the total size of previous non-rendered rows.
856
- * If each row has a size of 10px and the first 10 rows are not rendered due to scroll,
857
- * then we have a renderOffset of 100px.
858
- */
859
- renderOffset: i0.Signal<string>;
860
- /**
861
- * Updates the index of the rows in the viewport
862
- */
863
- updateIndexes(): void;
864
- /**
865
- * Refreshes the full Row Height cache. Should be used
866
- * when the entire row array state has changed.
867
- */
868
- refreshRowHeightCache(): void;
869
- /**
870
- * Toggle the Expansion of the row i.e. if the row is expanded then it will
871
- * collapse and vice versa. Note that the expanded status is stored as
872
- * a part of the row object itself as we have to preserve the expanded row
873
- * status in case of sorting and filtering of the row set.
874
- */
875
- toggleRowExpansion(row: TRow): void;
876
- /**
877
- * Expand/Collapse all the rows no matter what their state is.
878
- */
879
- toggleAllRows(expanded: boolean): void;
880
- /**
881
- * Recalculates the table
882
- */
883
- recalcLayout(): void;
884
- /**
885
- * Returns if the row was expanded and set default row expansion when row expansion is empty
886
- */
887
- getRowExpanded(row: RowOrGroup<TRow>): boolean;
888
- getRowExpandedIdx(row: RowOrGroup<TRow>, expanded: RowOrGroup<TRow>[]): number;
889
- onTreeAction(row: TRow): void;
890
- dragOver(event: DragEvent, dropRow: RowOrGroup<TRow>): void;
891
- drag(event: DragEvent, dragRow: RowOrGroup<TRow>, rowComponent: DataTableBodyRowComponent<TRow>): void;
892
- drop(event: DragEvent, dropRow: RowOrGroup<TRow>, rowComponent: DataTableBodyRowComponent<TRow>): void;
893
- dragEnter(event: DragEvent, dropRow: RowOrGroup<TRow>, rowComponent: DataTableBodyRowComponent<TRow>): void;
894
- dragLeave(event: DragEvent, dropRow: RowOrGroup<TRow>, rowComponent: DataTableBodyRowComponent<TRow>): void;
895
- dragEnd(event: DragEvent, dragRow: RowOrGroup<TRow>): void;
896
- updateColumnGroupWidths(): void;
897
- prevIndex?: number;
898
- selectRow(event: Event, index: number, row: TRow): void;
899
- onActivate(model: ActivateEvent<TRow>, index: number): void;
900
- onKeyboardFocus(model: ActivateEvent<TRow>): void;
901
- focusRow(rowElement: HTMLElement, key: Keys): void;
902
- getPrevNextRow(rowElement: HTMLElement, key: Keys): any;
903
- focusCell(cellElement: HTMLElement, rowElement: HTMLElement, key: Keys, cellIndex: number): void;
904
- getRowSelected(row: TRow): boolean;
905
- getRowSelectedIdx(row: TRow, selected: any[]): number;
906
- protected isGroup(row: RowOrGroup<TRow>[]): row is Group<TRow>[];
907
- protected isGroup(row: RowOrGroup<TRow>): row is Group<TRow>;
908
- protected isRow(row: RowOrGroup<TRow> | undefined): row is TRow;
909
- static ɵfac: i0.ɵɵFactoryDeclaration<DataTableBodyComponent<any>, never>;
910
- static ɵcmp: i0.ɵɵComponentDeclaration<DataTableBodyComponent<any>, "datatable-body", never, { "rowDefTemplate": { "alias": "rowDefTemplate"; "required": false; }; "scrollbarV": { "alias": "scrollbarV"; "required": false; }; "scrollbarH": { "alias": "scrollbarH"; "required": false; }; "loadingIndicator": { "alias": "loadingIndicator"; "required": false; }; "ghostLoadingIndicator": { "alias": "ghostLoadingIndicator"; "required": false; }; "externalPaging": { "alias": "externalPaging"; "required": false; }; "rowHeight": { "alias": "rowHeight"; "required": false; }; "offsetX": { "alias": "offsetX"; "required": false; }; "selectionType": { "alias": "selectionType"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "rowIdentity": { "alias": "rowIdentity"; "required": false; }; "rowDetail": { "alias": "rowDetail"; "required": false; }; "groupHeader": { "alias": "groupHeader"; "required": false; }; "selectCheck": { "alias": "selectCheck"; "required": false; }; "displayCheck": { "alias": "displayCheck"; "required": false; }; "trackByProp": { "alias": "trackByProp"; "required": false; }; "rowClass": { "alias": "rowClass"; "required": false; }; "groupedRows": { "alias": "groupedRows"; "required": false; }; "groupExpansionDefault": { "alias": "groupExpansionDefault"; "required": false; }; "innerWidth": { "alias": "innerWidth"; "required": false; }; "groupRowsBy": { "alias": "groupRowsBy"; "required": false; }; "virtualization": { "alias": "virtualization"; "required": false; }; "summaryRow": { "alias": "summaryRow"; "required": false; }; "summaryPosition": { "alias": "summaryPosition"; "required": false; }; "summaryHeight": { "alias": "summaryHeight"; "required": false; }; "rowDraggable": { "alias": "rowDraggable"; "required": false; }; "rowDragEvents": { "alias": "rowDragEvents"; "required": false; }; "disableRowCheck": { "alias": "disableRowCheck"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "offset": { "alias": "offset"; "required": false; }; "rowCount": { "alias": "rowCount"; "required": false; }; "bodyHeight": { "alias": "bodyHeight"; "required": false; }; "verticalScrollVisible": { "alias": "verticalScrollVisible"; "required": false; }; }, { "scroll": "scroll"; "page": "page"; "activate": "activate"; "select": "select"; "rowContextmenu": "rowContextmenu"; "treeAction": "treeAction"; }, never, ["[loading-indicator]", "[empty-content]"], true, never>;
911
- }
912
-
913
- declare class DataTableHeaderComponent implements OnDestroy, OnChanges {
914
- private cd;
915
- private scrollbarHelper;
916
- sortAscendingIcon?: string;
917
- sortDescendingIcon?: string;
918
- sortUnsetIcon?: string;
919
- scrollbarH?: boolean;
920
- dealsWithGroup?: boolean;
921
- targetMarkerTemplate?: TemplateRef<unknown>;
922
- enableClearingSortState: boolean;
923
- set innerWidth(val: number);
924
- get innerWidth(): number;
925
- sorts: SortPropDir[];
926
- sortType: SortType;
927
- allRowsSelected?: boolean;
928
- selectionType?: SelectionType;
929
- reorderable?: boolean;
930
- verticalScrollVisible: boolean;
931
- dragEventTarget?: MouseEvent | TouchEvent;
932
- set headerHeight(val: any);
933
- get headerHeight(): any;
934
- set columns(val: TableColumnInternal[]);
935
- get columns(): any[];
936
- set offsetX(val: number);
937
- get offsetX(): number;
938
- sort: EventEmitter<SortEvent>;
939
- reorder: EventEmitter<ReorderEventInternal>;
940
- resize: EventEmitter<ColumnResizeEventInternal>;
941
- resizing: EventEmitter<ColumnResizeEventInternal>;
942
- select: EventEmitter<void>;
943
- columnContextmenu: EventEmitter<{
944
- event: MouseEvent;
945
- column: TableColumnInternal;
946
- }>;
947
- _columnsByPin: PinnedColumns[];
948
- _columnGroupWidths: any;
949
- _innerWidth: number;
950
- _offsetX: number;
951
- _columns: TableColumnInternal[];
952
- _headerHeight: string;
953
- _styleByGroup: {
954
- left: NgStyle['ngStyle'];
955
- center: NgStyle['ngStyle'];
956
- right: NgStyle['ngStyle'];
957
- };
958
- private destroyed;
959
- ngOnChanges(changes: SimpleChanges): void;
960
- ngOnDestroy(): void;
961
- onLongPressStart({ event, model }: {
962
- event: MouseEvent | TouchEvent;
963
- model: TableColumnInternal<Row>;
964
- }): void;
965
- onLongPressEnd({ model }: {
966
- model: TableColumnInternal<Row>;
967
- }): void;
968
- get headerWidth(): string;
969
- onColumnResized({ width, column }: {
970
- width: number;
971
- column: TableColumnInternal;
972
- }): void;
973
- onColumnResizing({ width, column }: {
974
- width: number;
975
- column: TableColumnInternal;
976
- }): void;
977
- private makeResizeEvent;
978
- onColumnReordered(event: ReorderEventInternal): void;
979
- onTargetChanged({ prevIndex, newIndex, initialIndex }: TargetChangedEvent): void;
980
- getColumn(index: number): any;
981
- onSort({ column, prevValue, newValue }: InnerSortEvent): void;
982
- calcNewSorts(column: SortableTableColumnInternal, prevValue: SortDirection | undefined, newValue: SortDirection | undefined): SortPropDir[];
983
- setStylesByGroup(): void;
984
- calcStylesByGroup(group: 'center' | 'right' | 'left'): NgStyle['ngStyle'];
985
- static ɵfac: i0.ɵɵFactoryDeclaration<DataTableHeaderComponent, never>;
986
- static ɵcmp: i0.ɵɵComponentDeclaration<DataTableHeaderComponent, "datatable-header", never, { "sortAscendingIcon": { "alias": "sortAscendingIcon"; "required": false; }; "sortDescendingIcon": { "alias": "sortDescendingIcon"; "required": false; }; "sortUnsetIcon": { "alias": "sortUnsetIcon"; "required": false; }; "scrollbarH": { "alias": "scrollbarH"; "required": false; }; "dealsWithGroup": { "alias": "dealsWithGroup"; "required": false; }; "targetMarkerTemplate": { "alias": "targetMarkerTemplate"; "required": false; }; "enableClearingSortState": { "alias": "enableClearingSortState"; "required": false; }; "innerWidth": { "alias": "innerWidth"; "required": false; }; "sorts": { "alias": "sorts"; "required": false; }; "sortType": { "alias": "sortType"; "required": false; }; "allRowsSelected": { "alias": "allRowsSelected"; "required": false; }; "selectionType": { "alias": "selectionType"; "required": false; }; "reorderable": { "alias": "reorderable"; "required": false; }; "verticalScrollVisible": { "alias": "verticalScrollVisible"; "required": false; }; "headerHeight": { "alias": "headerHeight"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "offsetX": { "alias": "offsetX"; "required": false; }; }, { "sort": "sort"; "reorder": "reorder"; "resize": "resize"; "resizing": "resizing"; "select": "select"; "columnContextmenu": "columnContextmenu"; }, never, never, true, never>;
987
- }
988
-
989
- declare class DatatableComponent<TRow extends Row = any> implements OnInit, DoCheck, AfterViewInit, AfterContentInit, OnDestroy {
990
- private scrollbarHelper;
991
- private cd;
992
- private columnChangesService;
993
- private configuration;
994
- /**
995
- * Template for the target marker of drag target columns.
996
- */
997
- targetMarkerTemplate?: TemplateRef<unknown>;
998
- /**
999
- * Rows that are displayed in the table.
1000
- */
1001
- set rows(val: (TRow | undefined)[] | null | undefined);
1002
- /**
1003
- * Gets the rows.
1004
- */
1005
- get rows(): (TRow | undefined)[];
1006
- /**
1007
- * This attribute allows the user to set the name of the column to group the data with
1008
- */
1009
- set groupRowsBy(val: keyof TRow | undefined);
1010
- get groupRowsBy(): keyof TRow | undefined;
1011
- /**
1012
- * This attribute allows the user to set a grouped array in the following format:
1013
- * [
1014
- * {groupid=1} [
1015
- * {id=1 name="test1"},
1016
- * {id=2 name="test2"},
1017
- * {id=3 name="test3"}
1018
- * ]},
1019
- * {groupid=2>[
1020
- * {id=4 name="test4"},
1021
- * {id=5 name="test5"},
1022
- * {id=6 name="test6"}
1023
- * ]}
1024
- * ]
1025
- */
1026
- groupedRows?: Group<TRow>[];
1027
- /**
1028
- * Columns to be displayed.
1029
- */
1030
- set columns(val: TableColumn[]);
1031
- /**
1032
- * Get the columns.
1033
- */
1034
- get columns(): TableColumn[];
1035
- /**
1036
- * List of row objects that should be
1037
- * represented as selected in the grid.
1038
- * Default value: `[]`
1039
- */
1040
- selected: TRow[];
1041
- /**
1042
- * Enable vertical scrollbars
1043
- */
1044
- scrollbarV: boolean;
1045
- /**
1046
- * Enable vertical scrollbars dynamically on demand.
1047
- * Property `scrollbarV` needs to be set `true` too.
1048
- * Width that is gained when no scrollbar is needed
1049
- * is added to the inner table width.
1050
- */
1051
- scrollbarVDynamic: boolean;
1052
- /**
1053
- * Enable horz scrollbars
1054
- */
1055
- scrollbarH: boolean;
1056
- /**
1057
- * The row height; which is necessary
1058
- * to calculate the height for the lazy rendering.
1059
- */
1060
- rowHeight: number | 'auto' | ((row: TRow) => number);
1061
- /**
1062
- * Type of column width distribution formula.
1063
- * Example: flex, force, standard
1064
- */
1065
- columnMode: ColumnMode | keyof typeof ColumnMode;
1066
- /**
1067
- * The minimum header height in pixels.
1068
- * Pass a falsey for no header
1069
- */
1070
- headerHeight: number;
1071
- /**
1072
- * The minimum footer height in pixels.
1073
- * Pass falsey for no footer
1074
- */
1075
- footerHeight: number;
1076
- /**
1077
- * If the table should use external paging
1078
- * otherwise its assumed that all data is preloaded.
1079
- */
1080
- externalPaging: boolean;
1081
- /**
1082
- * If the table should use external sorting or
1083
- * the built-in basic sorting.
1084
- */
1085
- externalSorting: boolean;
1086
- /**
1087
- * The page size to be shown.
1088
- * Default value: `undefined`
1089
- */
1090
- set limit(val: number | undefined);
1091
- /**
1092
- * Gets the limit.
1093
- */
1094
- get limit(): number | undefined;
1095
- /**
1096
- * The total count of all rows.
1097
- * Default value: `0`
1098
- */
1099
- set count(val: number);
1100
- /**
1101
- * Gets the count.
1102
- */
1103
- get count(): number;
1104
- /**
1105
- * The current offset ( page - 1 ) shown.
1106
- * Default value: `0`
1107
- */
1108
- set offset(val: number);
1109
- get offset(): number;
1110
- /**
1111
- * Show the linear loading bar.
1112
- * Default value: `false`
1113
- */
1114
- loadingIndicator: boolean;
1115
- /**
1116
- * Show ghost loaders on each cell.
1117
- * Default value: `false`
1118
- */
1119
- set ghostLoadingIndicator(val: boolean);
1120
- get ghostLoadingIndicator(): boolean;
1121
- /**
1122
- * Type of row selection. Options are:
1123
- *
1124
- * - `single`
1125
- * - `multi`
1126
- * - `checkbox`
1127
- * - `multiClick`
1128
- * - `cell`
1129
- *
1130
- * For no selection pass a `falsey`.
1131
- * Default value: `undefined`
1132
- */
1133
- selectionType?: SelectionType;
1134
- /**
1135
- * Enable/Disable ability to re-order columns
1136
- * by dragging them.
1137
- */
1138
- reorderable: boolean;
1139
- /**
1140
- * Swap columns on re-order columns or
1141
- * move them.
1142
- */
1143
- swapColumns: boolean;
1144
- /**
1145
- * The type of sorting
1146
- */
1147
- sortType: SortType;
1148
- /**
1149
- * Array of sorted columns by property and type.
1150
- * Default value: `[]`
1151
- */
1152
- sorts: SortPropDir[];
1153
- /**
1154
- * Css class overrides
1155
- */
1156
- cssClasses: Partial<Required<NgxDatatableConfig>['cssClasses']>;
1157
- /**
1158
- * Message overrides for localization
1159
- *
1160
- * @defaultValue
1161
- * ```
1162
- * {
1163
- * emptyMessage: 'No data to display',
1164
- * totalMessage: 'total',
1165
- * selectedMessage: 'selected',
1166
- * ariaFirstPageMessage: 'go to first page',
1167
- * ariaPreviousPageMessage: 'go to previous page',
1168
- * ariaPageNMessage: 'page',
1169
- * ariaNextPageMessage: 'go to next page',
1170
- * ariaLastPageMessage: 'go to last page'
1171
- * }
1172
- * ```
1173
- */
1174
- messages: Partial<Required<NgxDatatableConfig>['messages']>;
1175
- /**
1176
- * A function which is called with the row and should return either:
1177
- * - a string: `"class-1 class-2`
1178
- * - a Record<string, boolean>: `{ 'class-1': true, 'class-2': false }`
1179
- */
1180
- rowClass?: (row: TRow) => string | Record<string, boolean>;
1181
- /**
1182
- * A boolean/function you can use to check whether you want
1183
- * to select a particular row based on a criteria. Example:
1184
- *
1185
- * (selection) => {
1186
- * return selection !== 'Ethel Price';
1187
- * }
1188
- */
1189
- selectCheck?: (value: TRow, index: number, array: TRow[]) => boolean;
1190
- /**
1191
- * A function you can use to check whether you want
1192
- * to show the checkbox for a particular row based on a criteria. Example:
1193
- *
1194
- * (row, column, value) => {
1195
- * return row.name !== 'Ethel Price';
1196
- * }
1197
- */
1198
- displayCheck?: (row: TRow, column: TableColumn, value?: any) => boolean;
1199
- /**
1200
- * A boolean you can use to set the detault behaviour of rows and groups
1201
- * whether they will start expanded or not. If ommited the default is NOT expanded.
1202
- *
1203
- */
1204
- groupExpansionDefault: boolean;
1205
- /**
1206
- * Property to which you can use for custom tracking of rows.
1207
- * Example: 'name'
1208
- */
1209
- trackByProp?: string;
1210
- /**
1211
- * Property to which you can use for determining select all
1212
- * rows on current page or not.
1213
- */
1214
- selectAllRowsOnPage: boolean;
1215
- /**
1216
- * A flag for row virtualization on / off
1217
- */
1218
- virtualization: boolean;
1219
- /**
1220
- * Tree from relation
1221
- */
1222
- treeFromRelation?: string;
1223
- /**
1224
- * Tree to relation
1225
- */
1226
- treeToRelation?: string;
1227
- /**
1228
- * A flag for switching summary row on / off
1229
- */
1230
- summaryRow: boolean;
1231
- /**
1232
- * A height of summary row
1233
- */
1234
- summaryHeight: number;
1235
- /**
1236
- * A property holds a summary row position: top/bottom
1237
- */
1238
- summaryPosition: string;
1239
- /**
1240
- * A function you can use to check whether you want
1241
- * to disable a row. Example:
1242
- *
1243
- * (row) => {
1244
- * return row.name !== 'Ethel Price';
1245
- * }
1246
- */
1247
- disableRowCheck?: (row: TRow) => boolean;
1248
- /**
1249
- * A flag to enable drag behavior of native HTML5 drag and drop API on rows.
1250
- * If set to true, {@link rowDragEvents} will emit dragstart and dragend events.
1251
- */
1252
- rowDraggable: boolean;
1253
- /**
1254
- * A flag to controll behavior of sort states.
1255
- * By default sort on column toggles between ascending and descending without getting removed.
1256
- * Set true to clear sorting of column after performing ascending and descending sort on that column.
1257
- */
1258
- enableClearingSortState: boolean;
1259
- /**
1260
- * Body was scrolled typically in a `scrollbarV:true` scenario.
1261
- */
1262
- scroll: EventEmitter<ScrollEvent>;
1263
- /**
1264
- * A cell or row was focused via keyboard or mouse click.
1265
- */
1266
- activate: EventEmitter<ActivateEvent<TRow>>;
1267
- /**
1268
- * A cell or row was selected.
1269
- */
1270
- select: EventEmitter<SelectEvent<TRow>>;
1271
- /**
1272
- * Column sort was invoked.
1273
- */
1274
- sort: EventEmitter<SortEvent>;
1275
- /**
1276
- * The table was paged either triggered by the pager or the body scroll.
1277
- */
1278
- page: EventEmitter<PageEvent>;
1279
- /**
1280
- * Columns were re-ordered.
1281
- */
1282
- reorder: EventEmitter<ReorderEvent>;
1283
- /**
1284
- * Column was resized.
1285
- */
1286
- resize: EventEmitter<ColumnResizeEvent>;
1287
- /**
1288
- * The context menu was invoked on the table.
1289
- * type indicates whether the header or the body was clicked.
1290
- * content contains either the column or the row that was clicked.
1291
- */
1292
- tableContextmenu: EventEmitter<ContextMenuEvent<TRow>>;
1293
- /**
1294
- * A row was expanded ot collapsed for tree
1295
- */
1296
- treeAction: EventEmitter<{
1297
- row: TRow;
1298
- rowIndex: number;
1299
- }>;
1300
- /**
1301
- * Emits HTML5 native drag events.
1302
- * Only emits dragenter, dragover, drop events by default.
1303
- * Set {@link rowDraggble} to true for dragstart and dragend.
1304
- */
1305
- rowDragEvents: EventEmitter<DragEventData>;
1306
- /**
1307
- * CSS class applied if the header height if fixed height.
1308
- */
1309
- get isFixedHeader(): boolean;
1310
- /**
1311
- * CSS class applied to the root element if
1312
- * the row heights are fixed heights.
1313
- */
1314
- get isFixedRow(): boolean;
1315
- /**
1316
- * CSS class applied to root element if
1317
- * vertical scrolling is enabled.
1318
- */
1319
- get isVertScroll(): boolean;
1320
- /**
1321
- * CSS class applied to root element if
1322
- * virtualization is enabled.
1323
- */
1324
- get isVirtualized(): boolean;
1325
- /**
1326
- * CSS class applied to the root element
1327
- * if the horziontal scrolling is enabled.
1328
- */
1329
- get isHorScroll(): boolean;
1330
- /**
1331
- * CSS class applied to root element is selectable.
1332
- */
1333
- get isSelectable(): boolean;
1334
- /**
1335
- * CSS class applied to root is checkbox selection.
1336
- */
1337
- get isCheckboxSelection(): boolean;
1338
- /**
1339
- * CSS class applied to root if cell selection.
1340
- */
1341
- get isCellSelection(): boolean;
1342
- /**
1343
- * CSS class applied to root if single select.
1344
- */
1345
- get isSingleSelection(): boolean;
1346
- /**
1347
- * CSS class added to root element if mulit select
1348
- */
1349
- get isMultiSelection(): boolean;
1350
- /**
1351
- * CSS class added to root element if mulit click select
1352
- */
1353
- get isMultiClickSelection(): boolean;
1354
- /**
1355
- * Column templates gathered from `ContentChildren`
1356
- * if described in your markup.
1357
- */
1358
- columnTemplates: QueryList<DataTableColumnDirective<TRow>>;
1359
- /**
1360
- * Row Detail templates gathered from the ContentChild
1361
- */
1362
- rowDetail?: DatatableRowDetailDirective;
1363
- /**
1364
- * Group Header templates gathered from the ContentChild
1365
- */
1366
- groupHeader?: DatatableGroupHeaderDirective;
1367
- /**
1368
- * Footer template gathered from the ContentChild
1369
- */
1370
- footer?: DatatableFooterDirective;
1371
- /**
1372
- * Reference to the body component for manually
1373
- * invoking functions on the body.
1374
- */
1375
- bodyComponent: DataTableBodyComponent<TRow & {
1376
- treeStatus?: TreeStatus;
1377
- }>;
1378
- /**
1379
- * Reference to the header component for manually
1380
- * invoking functions on the header.
1381
- */
1382
- headerComponent: DataTableHeaderComponent;
1383
- private bodyElement;
1384
- rowDefTemplate?: TemplateRef<any>;
1385
- /**
1386
- * Returns if all rows are selected.
1387
- */
1388
- get allRowsSelected(): boolean;
1389
- element: HTMLElement;
1390
- rowDiffer: KeyValueDiffer<TRow, TRow>;
1391
- _innerWidth: number;
1392
- pageSize: number;
1393
- bodyHeight: number;
1394
- rowCount: number;
1395
- _offsetX: number;
1396
- _limit: number | undefined;
1397
- _count: number;
1398
- _offset: number;
1399
- _rows: (TRow | undefined)[];
1400
- _groupRowsBy?: keyof TRow;
1401
- _internalRows: (TRow | undefined)[];
1402
- _internalColumns: TableColumnInternal<TRow>[];
1403
- _columns: TableColumn[];
1404
- _subscriptions: Subscription[];
1405
- _ghostLoadingIndicator: boolean;
1406
- _defaultColumnWidth?: number;
1407
- protected verticalScrollVisible: boolean;
1408
- private _rowInitDone;
1409
- constructor();
1410
- /**
1411
- * Lifecycle hook that is called after data-bound
1412
- * properties of a directive are initialized.
1413
- */
1414
- ngOnInit(): void;
1415
- /**
1416
- * Lifecycle hook that is called after a component's
1417
- * view has been fully initialized.
1418
- */
1419
- ngAfterViewInit(): void;
1420
- /**
1421
- * Lifecycle hook that is called after a component's
1422
- * content has been fully initialized.
1423
- */
1424
- ngAfterContentInit(): void;
1425
- /**
1426
- * This will be used when displaying or selecting rows.
1427
- * when tracking/comparing them, we'll use the value of this fn,
1428
- *
1429
- * (`fn(x) === fn(y)` instead of `x === y`)
1430
- */
1431
- rowIdentity: (x: RowOrGroup<TRow>) => unknown;
1432
- /**
1433
- * Translates the templates to the column objects
1434
- */
1435
- translateColumns(val: QueryList<DataTableColumnDirective<TRow>>): void;
1436
- /**
1437
- * Creates a map with the data grouped by the user choice of grouping index
1438
- *
1439
- * @param originalArray the original array passed via parameter
1440
- * @param groupBy the key of the column to group the data by
1441
- */
1442
- groupArrayBy(originalArray: (TRow | undefined)[], groupBy: keyof TRow): {
1443
- key: TRow[keyof TRow];
1444
- value: TRow[];
1445
- }[];
1446
- ngDoCheck(): void;
1447
- /**
1448
- * Recalc's the sizes of the grid.
1449
- *
1450
- * Updated automatically on changes to:
1451
- *
1452
- * - Columns
1453
- * - Rows
1454
- * - Paging related
1455
- *
1456
- * Also can be manually invoked or upon window resize.
1457
- */
1458
- recalculate(): void;
1459
- /**
1460
- * Window resize handler to update sizes.
1461
- */
1462
- onWindowResize(): void;
1463
- /**
1464
- * Recalulcates the column widths based on column width
1465
- * distribution mode and scrollbar offsets.
1466
- */
1467
- recalculateColumns(columns?: TableColumnInternal[], forceIdx?: number, allowBleed?: boolean): TableColumn[] | undefined;
1468
- /**
1469
- * Recalculates the dimensions of the table size.
1470
- * Internally calls the page size and row count calcs too.
1471
- *
1472
- */
1473
- recalculateDims(): void;
1474
- /**
1475
- * Recalculates the pages after a update.
1476
- */
1477
- recalculatePages(): void;
1478
- /**
1479
- * Body triggered a page event.
1480
- */
1481
- onBodyPage(offset: number): void;
1482
- /**
1483
- * The body triggered a scroll event.
1484
- */
1485
- onBodyScroll(event: ScrollEvent): void;
1486
- /**
1487
- * The footer triggered a page event.
1488
- */
1489
- onFooterPage(event: PagerPageEvent): void;
1490
- /**
1491
- * Recalculates the sizes of the page
1492
- */
1493
- calcPageSize(): number;
1494
- /**
1495
- * Calculates the row count.
1496
- */
1497
- calcRowCount(): number;
1498
- /**
1499
- * The header triggered a contextmenu event.
1500
- */
1501
- onColumnContextmenu({ event, column }: {
1502
- event: MouseEvent;
1503
- column: TableColumn;
1504
- }): void;
1505
- /**
1506
- * The body triggered a contextmenu event.
1507
- */
1508
- onRowContextmenu({ event, row }: {
1509
- event: MouseEvent;
1510
- row: RowOrGroup<TRow>;
1511
- }): void;
1512
- /**
1513
- * The header triggered a column resize event.
1514
- */
1515
- onColumnResize({ column, newValue, prevValue }: ColumnResizeEventInternal): void;
1516
- onColumnResizing({ column, newValue }: ColumnResizeEventInternal): void;
1517
- /**
1518
- * The header triggered a column re-order event.
1519
- */
1520
- onColumnReorder(event: ReorderEventInternal): void;
1521
- /**
1522
- * The header triggered a column sort event.
1523
- */
1524
- onColumnSort(event: SortEvent): void;
1525
- /**
1526
- * Toggle all row selection
1527
- */
1528
- onHeaderSelect(): void;
1529
- /**
1530
- * A row was selected from body
1531
- */
1532
- onBodySelect(event: SelectEvent<TRow>): void;
1533
- /**
1534
- * A row was expanded or collapsed for tree
1535
- */
1536
- onTreeAction(event: {
1537
- row: TRow;
1538
- }): void;
1539
- ngOnDestroy(): void;
1540
- /**
1541
- * listen for changes to input bindings of all DataTableColumnDirective and
1542
- * trigger the columnTemplates.changes observable to emit
1543
- */
1544
- private listenForColumnInputChanges;
1545
- private sortInternalRows;
1546
- static ɵfac: i0.ɵɵFactoryDeclaration<DatatableComponent<any>, never>;
1547
- static ɵcmp: i0.ɵɵComponentDeclaration<DatatableComponent<any>, "ngx-datatable", never, { "targetMarkerTemplate": { "alias": "targetMarkerTemplate"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "groupRowsBy": { "alias": "groupRowsBy"; "required": false; }; "groupedRows": { "alias": "groupedRows"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "scrollbarV": { "alias": "scrollbarV"; "required": false; }; "scrollbarVDynamic": { "alias": "scrollbarVDynamic"; "required": false; }; "scrollbarH": { "alias": "scrollbarH"; "required": false; }; "rowHeight": { "alias": "rowHeight"; "required": false; }; "columnMode": { "alias": "columnMode"; "required": false; }; "headerHeight": { "alias": "headerHeight"; "required": false; }; "footerHeight": { "alias": "footerHeight"; "required": false; }; "externalPaging": { "alias": "externalPaging"; "required": false; }; "externalSorting": { "alias": "externalSorting"; "required": false; }; "limit": { "alias": "limit"; "required": false; }; "count": { "alias": "count"; "required": false; }; "offset": { "alias": "offset"; "required": false; }; "loadingIndicator": { "alias": "loadingIndicator"; "required": false; }; "ghostLoadingIndicator": { "alias": "ghostLoadingIndicator"; "required": false; }; "selectionType": { "alias": "selectionType"; "required": false; }; "reorderable": { "alias": "reorderable"; "required": false; }; "swapColumns": { "alias": "swapColumns"; "required": false; }; "sortType": { "alias": "sortType"; "required": false; }; "sorts": { "alias": "sorts"; "required": false; }; "cssClasses": { "alias": "cssClasses"; "required": false; }; "messages": { "alias": "messages"; "required": false; }; "rowClass": { "alias": "rowClass"; "required": false; }; "selectCheck": { "alias": "selectCheck"; "required": false; }; "displayCheck": { "alias": "displayCheck"; "required": false; }; "groupExpansionDefault": { "alias": "groupExpansionDefault"; "required": false; }; "trackByProp": { "alias": "trackByProp"; "required": false; }; "selectAllRowsOnPage": { "alias": "selectAllRowsOnPage"; "required": false; }; "virtualization": { "alias": "virtualization"; "required": false; }; "treeFromRelation": { "alias": "treeFromRelation"; "required": false; }; "treeToRelation": { "alias": "treeToRelation"; "required": false; }; "summaryRow": { "alias": "summaryRow"; "required": false; }; "summaryHeight": { "alias": "summaryHeight"; "required": false; }; "summaryPosition": { "alias": "summaryPosition"; "required": false; }; "disableRowCheck": { "alias": "disableRowCheck"; "required": false; }; "rowDraggable": { "alias": "rowDraggable"; "required": false; }; "enableClearingSortState": { "alias": "enableClearingSortState"; "required": false; }; "rowIdentity": { "alias": "rowIdentity"; "required": false; }; }, { "scroll": "scroll"; "activate": "activate"; "select": "select"; "sort": "sort"; "page": "page"; "reorder": "reorder"; "resize": "resize"; "tableContextmenu": "tableContextmenu"; "treeAction": "treeAction"; "rowDragEvents": "rowDragEvents"; }, ["rowDetail", "groupHeader", "footer", "rowDefTemplate", "columnTemplates"], ["[loading-indicator]", "[empty-content]"], true, never>;
1548
- static ngAcceptInputType_scrollbarV: unknown;
1549
- static ngAcceptInputType_scrollbarVDynamic: unknown;
1550
- static ngAcceptInputType_scrollbarH: unknown;
1551
- static ngAcceptInputType_headerHeight: unknown;
1552
- static ngAcceptInputType_footerHeight: unknown;
1553
- static ngAcceptInputType_externalPaging: unknown;
1554
- static ngAcceptInputType_externalSorting: unknown;
1555
- static ngAcceptInputType_limit: unknown;
1556
- static ngAcceptInputType_count: unknown;
1557
- static ngAcceptInputType_offset: unknown;
1558
- static ngAcceptInputType_loadingIndicator: unknown;
1559
- static ngAcceptInputType_ghostLoadingIndicator: unknown;
1560
- static ngAcceptInputType_reorderable: unknown;
1561
- static ngAcceptInputType_swapColumns: unknown;
1562
- static ngAcceptInputType_groupExpansionDefault: unknown;
1563
- static ngAcceptInputType_selectAllRowsOnPage: unknown;
1564
- static ngAcceptInputType_virtualization: unknown;
1565
- static ngAcceptInputType_summaryRow: unknown;
1566
- static ngAcceptInputType_summaryHeight: unknown;
1567
- static ngAcceptInputType_rowDraggable: unknown;
1568
- static ngAcceptInputType_enableClearingSortState: unknown;
1569
- }
1570
-
1571
- declare class DatatableRowDetailTemplateDirective {
1572
- static ngTemplateContextGuard(directive: DatatableRowDetailTemplateDirective, context: unknown): context is RowDetailContext;
1573
- static ɵfac: i0.ɵɵFactoryDeclaration<DatatableRowDetailTemplateDirective, never>;
1574
- static ɵdir: i0.ɵɵDirectiveDeclaration<DatatableRowDetailTemplateDirective, "[ngx-datatable-row-detail-template]", never, {}, {}, never, never, true, never>;
1575
- }
1576
-
1577
- declare class DataTableColumnHeaderDirective {
1578
- static ngTemplateContextGuard(directive: DataTableColumnHeaderDirective, context: unknown): context is HeaderCellContext;
1579
- static ɵfac: i0.ɵɵFactoryDeclaration<DataTableColumnHeaderDirective, never>;
1580
- static ɵdir: i0.ɵɵDirectiveDeclaration<DataTableColumnHeaderDirective, "[ngx-datatable-header-template]", never, {}, {}, never, never, true, never>;
1581
- }
1582
-
1583
- declare class DataTableColumnCellDirective {
1584
- template: TemplateRef<CellContext<any>>;
1585
- static ngTemplateContextGuard(dir: DataTableColumnCellDirective, ctx: any): ctx is CellContext;
1586
- static ɵfac: i0.ɵɵFactoryDeclaration<DataTableColumnCellDirective, never>;
1587
- static ɵdir: i0.ɵɵDirectiveDeclaration<DataTableColumnCellDirective, "[ngx-datatable-cell-template]", never, {}, {}, never, never, true, never>;
1588
- }
1589
-
1590
- declare class DataTableColumnGhostCellDirective {
1591
- static ngTemplateContextGuard(directive: DataTableColumnGhostCellDirective, context: unknown): context is void;
1592
- static ɵfac: i0.ɵɵFactoryDeclaration<DataTableColumnGhostCellDirective, never>;
1593
- static ɵdir: i0.ɵɵDirectiveDeclaration<DataTableColumnGhostCellDirective, "[ngx-datatable-ghost-cell-template]", never, {}, {}, never, never, true, never>;
1594
- }
1595
-
1596
- declare class DataTableColumnCellTreeToggle {
1597
- template: TemplateRef<any>;
1598
- static ɵfac: i0.ɵɵFactoryDeclaration<DataTableColumnCellTreeToggle, never>;
1599
- static ɵdir: i0.ɵɵDirectiveDeclaration<DataTableColumnCellTreeToggle, "[ngx-datatable-tree-toggle]", never, {}, {}, never, never, true, never>;
1600
- }
1601
-
1602
- declare class DatatableGroupHeaderTemplateDirective {
1603
- static ngTemplateContextGuard(directive: DatatableGroupHeaderTemplateDirective, context: unknown): context is GroupContext;
1604
- static ɵfac: i0.ɵɵFactoryDeclaration<DatatableGroupHeaderTemplateDirective, never>;
1605
- static ɵdir: i0.ɵɵDirectiveDeclaration<DatatableGroupHeaderTemplateDirective, "[ngx-datatable-group-header-template]", never, {}, {}, never, never, true, never>;
1606
- }
1607
-
1608
- /**
1609
- * Row Disable Directive
1610
- * Use this to disable/enable all children elements
1611
- * Usage:
1612
- * To disable
1613
- * <div [disabled]="true" disable-row >
1614
- * </div>
1615
- * To enable
1616
- * <div [disabled]="false" disable-row >
1617
- * </div>
1618
- */
1619
- declare class DisableRowDirective {
1620
- private readonly elementRef;
1621
- readonly disabled: i0.InputSignalWithTransform<boolean, unknown>;
1622
- constructor();
1623
- private disableAllElements;
1624
- static ɵfac: i0.ɵɵFactoryDeclaration<DisableRowDirective, never>;
1625
- static ɵdir: i0.ɵɵDirectiveDeclaration<DisableRowDirective, "[disable-row]", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1626
- }
1627
-
1628
- /**
1629
- * This component is passed as ng-template and rendered by BodyComponent.
1630
- * BodyComponent uses rowDefInternal to first inject actual row template.
1631
- * This component will render that actual row template.
1632
- */
1633
- declare class DatatableRowDefComponent {
1634
- rowDef: DatatableRowDefInternalDirective;
1635
- rowContext: {
1636
- disabled: boolean;
1637
- template: TemplateRef<unknown>;
1638
- rowTemplate: TemplateRef<unknown>;
1639
- row: RowOrGroup<unknown>;
1640
- index: number;
1641
- };
1642
- static ɵfac: i0.ɵɵFactoryDeclaration<DatatableRowDefComponent, never>;
1643
- static ɵcmp: i0.ɵɵComponentDeclaration<DatatableRowDefComponent, "datatable-row-def", never, {}, {}, never, never, true, never>;
1644
- }
1645
- declare class DatatableRowDefDirective {
1646
- static ngTemplateContextGuard(_dir: DatatableRowDefDirective, ctx: unknown): ctx is RowDefContext;
1647
- static ɵfac: i0.ɵɵFactoryDeclaration<DatatableRowDefDirective, never>;
1648
- static ɵdir: i0.ɵɵDirectiveDeclaration<DatatableRowDefDirective, "[rowDef]", never, {}, {}, never, never, true, never>;
1649
- }
1650
- /**
1651
- * @internal To be used internally by ngx-datatable.
1652
- */
1653
- declare class DatatableRowDefInternalDirective implements OnInit {
1654
- vc: ViewContainerRef;
1655
- rowDefInternal: RowDefContext;
1656
- rowDefInternalDisabled?: boolean;
1657
- ngOnInit(): void;
1658
- static ɵfac: i0.ɵɵFactoryDeclaration<DatatableRowDefInternalDirective, never>;
1659
- static ɵdir: i0.ɵɵDirectiveDeclaration<DatatableRowDefInternalDirective, "[rowDefInternal]", never, { "rowDefInternal": { "alias": "rowDefInternal"; "required": false; }; "rowDefInternalDisabled": { "alias": "rowDefInternalDisabled"; "required": false; }; }, {}, never, never, true, never>;
1660
- }
1661
- type RowDefContext = {
1662
- template: TemplateRef<unknown>;
1663
- rowTemplate: TemplateRef<unknown>;
1664
- row: RowOrGroup<unknown>;
1665
- index: number;
1666
- };
1667
-
1668
- declare class NgxDatatableModule {
1669
- /**
1670
- * Configure global configuration via INgxDatatableConfig
1671
- * @param configuration
1672
- */
1673
- static forRoot(configuration: AllPartial<NgxDatatableConfig>): ModuleWithProviders<NgxDatatableModule>;
1674
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxDatatableModule, never>;
1675
- static ɵmod: i0.ɵɵNgModuleDeclaration<NgxDatatableModule, never, [typeof DataTableFooterTemplateDirective, typeof DatatableComponent, typeof DataTableColumnDirective, typeof DatatableRowDetailDirective, typeof DatatableGroupHeaderDirective, typeof DatatableRowDetailTemplateDirective, typeof DataTableColumnHeaderDirective, typeof DataTableColumnCellDirective, typeof DataTableColumnGhostCellDirective, typeof DataTableColumnCellTreeToggle, typeof DatatableFooterDirective, typeof DatatableGroupHeaderTemplateDirective, typeof DisableRowDirective, typeof DatatableRowDefComponent, typeof DatatableRowDefDirective], [typeof DatatableComponent, typeof DatatableRowDetailDirective, typeof DatatableGroupHeaderDirective, typeof DatatableRowDetailTemplateDirective, typeof DataTableColumnDirective, typeof DataTableColumnHeaderDirective, typeof DataTableColumnCellDirective, typeof DataTableColumnGhostCellDirective, typeof DataTableColumnCellTreeToggle, typeof DataTableFooterTemplateDirective, typeof DatatableFooterDirective, typeof DatatableGroupHeaderTemplateDirective, typeof DisableRowDirective, typeof DatatableRowDefComponent, typeof DatatableRowDefDirective]>;
1676
- static ɵinj: i0.ɵɵInjectorDeclaration<NgxDatatableModule>;
1677
- }
1678
-
1679
- /**
1680
- * service to make DatatableComponent aware of changes to
1681
- * input bindings of DataTableColumnDirective
1682
- */
1683
- declare class ColumnChangesService {
1684
- private columnInputChanges;
1685
- get columnInputChanges$(): Observable<void>;
1686
- onInputChange(): void;
1687
- static ɵfac: i0.ɵɵFactoryDeclaration<ColumnChangesService, never>;
1688
- static ɵprov: i0.ɵɵInjectableDeclaration<ColumnChangesService>;
1689
- }
1690
-
1691
- declare function toInternalColumn<T extends Row>(columns: TableColumn<T>[] | QueryList<DataTableColumnDirective<T>>, defaultColumnWidth?: number): TableColumnInternal<T>[];
1692
- declare function isNullOrUndefined<T>(value: T | null | undefined): value is null | undefined;
1693
-
1694
- export { ColumnChangesService, ColumnMode, ContextmenuType, DataTableColumnCellDirective, DataTableColumnCellTreeToggle, DataTableColumnDirective, DataTableColumnGhostCellDirective, DataTableColumnHeaderDirective, DataTableFooterTemplateDirective, DatatableComponent, DatatableFooterDirective, DatatableGroupHeaderDirective, DatatableGroupHeaderTemplateDirective, DatatableRowDefComponent, DatatableRowDefDirective, DatatableRowDefInternalDirective, DatatableRowDetailDirective, DatatableRowDetailTemplateDirective, DisableRowDirective, NgxDatatableModule, SelectionType, SortDirection, SortType, isNullOrUndefined, providedNgxDatatableConfig, toInternalColumn };
1695
- export type { ActivateEvent, AllDetailToggleEvent, AllGroupsToggleEvent, CellContext, ColumnResizeEvent, ContextMenuEvenHeader, ContextMenuEvent, ContextMenuEventBody, DetailToggleEvent, DetailToggleEvents, DragEventData, DragEventType, FooterContext, Group, GroupContext, GroupToggleEvent, GroupToggleEvents, HeaderCellContext, NgxDatatableConfig, NgxDatatableCssClasses, NgxDatatableMessages, PageEvent, PagerPageEvent, ReorderEvent, Row, RowDetailContext, RowOrGroup, ScrollEvent, SelectEvent, SortEvent, SortPropDir, TableColumn, TableColumnProp, TreeStatus };