UNPKG

3.4 kBTypeScriptView Raw
1import { CdkDragDrop } from '@angular/cdk/drag-drop';
2import { ChangeDetectorRef, EventEmitter, OnChanges, OnInit, SimpleChanges, TemplateRef } from '@angular/core';
3import { ApiType, Columns, Config, Pagination } from '../..';
4import { PaginationRange } from '../pagination/pagination.component';
5import { StyleService } from '../../services/style.service';
6import { Subject, Subscription } from 'rxjs';
7declare type ColumnKeyType = string | number | boolean;
8interface RowContextMenuPosition {
9 top: string | null;
10 left: string | null;
11 value: any | null;
12}
13export declare class BaseComponent implements OnInit, OnChanges {
14 private readonly cdr;
15 readonly styleService: StyleService;
16 selectedRow: number;
17 selectedCol: number;
18 term: any;
19 filterCount: number;
20 filteredCountSubject: Subject<number>;
21 subscription: Subscription;
22 tableClass: string | null;
23 globalSearchTerm: string;
24 grouped: any;
25 isSelected: boolean;
26 page: number;
27 count: null | number;
28 sortState: Map<any, any>;
29 sortKey: string | null;
30 rowContextMenuPosition: RowContextMenuPosition;
31 limit: any;
32 sortBy: {
33 key: string;
34 } & {
35 order: string;
36 };
37 selectedDetailsTemplateRowId: Set<unknown>;
38 loadingHeight: string;
39 config: Config;
40 configuration: Config;
41 data: any[];
42 pagination: Pagination;
43 groupRowsBy: string;
44 id: string;
45 toggleRowIndex: any;
46 detailsTemplate: TemplateRef<any>;
47 summaryTemplate: TemplateRef<{
48 total: number;
49 limit: number;
50 page: number;
51 }>;
52 groupRowsHeaderTemplate: TemplateRef<any>;
53 filtersTemplate: TemplateRef<any>;
54 selectAllTemplate: TemplateRef<any>;
55 noResultsTemplate: TemplateRef<void>;
56 loadingTemplate: TemplateRef<void>;
57 additionalActionsTemplate: TemplateRef<void>;
58 rowContextMenu: TemplateRef<any>;
59 columns: Columns[];
60 readonly event: EventEmitter<{
61 event: string;
62 value: any;
63 }>;
64 rowTemplate: TemplateRef<any>;
65 private paginationComponent;
66 contextMenu: any;
67 onContextMenuClick(targetElement: any): void;
68 constructor(cdr: ChangeDetectorRef, styleService: StyleService);
69 ngOnInit(): void;
70 ngOnChanges(changes: SimpleChanges): void;
71 orderBy(column: Columns): void;
72 onClick($event: MouseEvent, row: object, key: ColumnKeyType, colIndex: any, rowIndex: number): void;
73 onDoubleClick($event: MouseEvent, row: object, key: ColumnKeyType, colIndex: any, rowIndex: number): void;
74 onCheckboxSelect($event: object, row: object, rowIndex: number): void;
75 onSelectAll(): void;
76 onSearch($event: Array<{
77 key: string;
78 value: string;
79 }>): void;
80 onGlobalSearch(value: string): void;
81 onPagination(pagination: PaginationRange): void;
82 collapseRow(rowIndex: number): void;
83 private doDecodePersistedState;
84 isRowCollapsed(rowIndex: number): boolean;
85 readonly isLoading: boolean;
86 getLoadingHeight(rows: any): void;
87 readonly arrowDefinition: boolean;
88 onRowContextMenu($event: MouseEvent, row: object, key: ColumnKeyType, colIndex: any, rowIndex: number): void;
89 private doApplyData;
90 onDrop(event: CdkDragDrop<string[]>): void;
91 apiEvent(event: ApiType): void | number;
92 private bindApi;
93 private setColumnOrder;
94 emitEvent(event: string, value: any): void;
95}
96export {};