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