1 | import { EventEmitter, TemplateRef } from '@angular/core';
|
2 | import { NbBooleanInput, NbNullableInput } from '../helpers';
|
3 |
|
4 | interface NbSortHeaderColumnDef {
|
5 | name: string;
|
6 | }
|
7 | export interface NbSortRequest {
|
8 | column: string;
|
9 | direction: NbSortDirection;
|
10 | }
|
11 | export interface NbSortable {
|
12 | sort(sortRequest: NbSortRequest): any;
|
13 | }
|
14 | export declare type NbSortDirectionValues = 'asc' | 'desc' | '';
|
15 | export declare enum NbSortDirection {
|
16 | ASCENDING = "asc",
|
17 | DESCENDING = "desc",
|
18 | NONE = ""
|
19 | }
|
20 |
|
21 |
|
22 |
|
23 | export declare class NbSortDirective {
|
24 | sortable: NbSortable;
|
25 | static ngAcceptInputType_sortable: NbSortable | NbNullableInput;
|
26 | sort: EventEmitter<NbSortRequest>;
|
27 | emitSort(sortRequest: NbSortRequest): void;
|
28 | }
|
29 | export interface NbSortHeaderIconDirectiveContext {
|
30 | $implicit: NbSortDirection;
|
31 | isAscending: boolean;
|
32 | isDescending: boolean;
|
33 | isNone: boolean;
|
34 | }
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 | export declare class NbSortHeaderIconDirective {
|
41 | }
|
42 | export declare class NbSortIconComponent {
|
43 | direction: NbSortDirection;
|
44 | isAscending(): boolean;
|
45 | isDescending(): boolean;
|
46 | isDirectionSet(): boolean;
|
47 | }
|
48 |
|
49 |
|
50 |
|
51 | export declare class NbSortHeaderComponent {
|
52 | private sort;
|
53 | private columnDef;
|
54 | sortIcon: TemplateRef<NbSortHeaderIconDirectiveContext>;
|
55 | |
56 |
|
57 |
|
58 |
|
59 | direction: NbSortDirection;
|
60 | static ngAcceptInputType_direction: NbSortDirectionValues;
|
61 | private disabledValue;
|
62 | |
63 |
|
64 |
|
65 | set disabled(value: boolean);
|
66 | get disabled(): boolean;
|
67 | static ngAcceptInputType_disabled: NbBooleanInput;
|
68 | sortIfEnabled(): void;
|
69 | constructor(sort: NbSortDirective, columnDef: NbSortHeaderColumnDef);
|
70 | isAscending(): boolean;
|
71 | isDescending(): boolean;
|
72 | sortData(): void;
|
73 | getIconContext(): NbSortHeaderIconDirectiveContext;
|
74 | getDisabledAttributeValue(): '' | null;
|
75 | private createSortRequest;
|
76 | private getNextDirection;
|
77 | }
|
78 | export {};
|