dfx-bootstrap-table
Version:
Angular table CDK implementation for Bootstrap with filtering, sorting and pagination.
83 lines (82 loc) • 4.09 kB
TypeScript
import { AfterViewInit, OnDestroy, OnInit } from '@angular/core';
import { NgbSort, NgbSortable, SortHeaderArrowPosition } from './sort';
import { SortDirection } from './sort-direction';
import * as i0 from "@angular/core";
/** Column definition associated with a `NgbSortHeader`. */
interface NgbSortHeaderColumnDef {
name: string;
}
/**
* Applies sorting behavior (click to change sort) and styles to an element, including an
* arrow to display the current sort direction.
*
* Must be provided with an id and contained within a parent NgbSort directive.
*
* If used on header cells in a CdkTable, it will automatically default its id from its containing
* column definition.
*/
export declare class NgbSortHeader implements NgbSortable, OnDestroy, OnInit, AfterViewInit {
_sort: NgbSort;
_columnDef: NgbSortHeaderColumnDef | null;
private _changeDetectorRef;
private _focusMonitor;
private _elementRef;
private _ariaDescriber;
private _renderChanges;
protected _animationModule: "NoopAnimations" | "BrowserAnimations" | null;
/**
* Indicates which state was just cleared from the sort header.
* Will be reset on the next interaction. Used for coordinating animations.
*/
protected _recentlyCleared: import("@angular/core").WritableSignal<SortDirection | null>;
/**
* The element with role="button" inside this component's view. We need this
* in order to apply a description with AriaDescriber.
*/
private _sortButton;
/**
* ID of this sort header. If used within the context of a CdkColumnDef, this will default to
* the column's name.
*/
id: string;
/** Sets the position of the arrow that displays when sorted. */
arrowPosition: SortHeaderArrowPosition;
/** Overrides the sort start value of the containing NgbSort for this NgbSortable. */
start: SortDirection;
/** whether the sort header is disabled. */
disabled: boolean;
/**
* Description applied to NgbSortHeader's button element with aria-describedby. This text should
* describe the action that will occur when the user clicks the sort header.
*/
get sortActionDescription(): string;
set sortActionDescription(value: string);
private _sortActionDescription;
/** Overrides the disable clear value of the containing NgbSort for this NgbSortable. */
disableClear: boolean;
constructor(...args: unknown[]);
ngOnInit(): void;
ngAfterViewInit(): void;
ngOnDestroy(): void;
/** Triggers the sort on this sort header and removes the indicator hint. */
_toggleOnInteraction(): void;
_handleKeydown(event: KeyboardEvent): void;
/** Whether this NgbSortHeader is currently sorted in either ascending or descending order. */
_isSorted(): boolean;
_isDisabled(): boolean;
/**
* Gets the aria-sort attribute that should be applied to this sort header. If this header
* is not sorted, returns null so that the attribute is removed from the host element. Aria spec
* says that the aria-sort property should only be present on one header at a time, so removing
* ensures this is true.
*/
_getAriaSortAttribute(): "none" | "ascending" | "descending";
/** Whether the arrow inside the sort header should be rendered. */
_renderArrow(): boolean;
private _updateSortActionDescription;
static ɵfac: i0.ɵɵFactoryDeclaration<NgbSortHeader, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<NgbSortHeader, "[ngb-sort-header]", ["ngbSortHeader"], { "id": { "alias": "ngb-sort-header"; "required": false; }; "arrowPosition": { "alias": "arrowPosition"; "required": false; }; "start": { "alias": "start"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "sortActionDescription": { "alias": "sortActionDescription"; "required": false; }; "disableClear": { "alias": "disableClear"; "required": false; }; }, {}, never, ["*"], true, never>;
static ngAcceptInputType_disabled: unknown;
static ngAcceptInputType_disableClear: unknown;
}
export {};