right-angled
Version:
Lightweight and easy to use angular data grids. Integrates with your markup and styles rather than generating its own.
55 lines • 2.41 kB
TypeScript
import { SortDirectionStr, SortParameter } from '../../core/sort-parameter';
import * as i0 from "@angular/core";
/**
* Provides sorting functionality.
* @note This type is configured to use with {@link FiltersService}.
*/
export declare class RTSortingsService {
/**
* Sortings that were selected by the user and must be applied on next request of data.
*
* @note This property is ready to use with {@link FiltersService} since it has {@link filter} annotation.
*/
sortings: SortParameter[];
private defaultSortingsInternal;
/**
* Default sortings that will be used by service.
*/
get defaultSortings(): SortParameter[];
/**
* If called when {@link sortings} is empty then applied value will be copied to {@link sortings} immediately.
*/
set defaultSortings(value: SortParameter[]);
/**
* Sets {@link sortings} according to specified parameters.
* @param fieldName name of the field by which sorting must be executed on server. This value will be used as {@link SortParameter.fieldName}.
*
* In case when sorting with the same field name is already specified, direction of this sorting will be toggled to reversed value and this sorting will be pushed to the end of {@link sortings} array.
* So it will be applied last.
* @param savePrevious `true` to keep previously applied sortings in {@link sortings} array.
*
* @param startDirectionStr - sort direction
*/
setSort(fieldName: string, savePrevious: boolean, startDirectionStr?: SortDirectionStr): void;
/**
* Removes sort with specified field name from {@link sortings} array.
* @param fieldName name of the sort to remove.
*/
removeSort(fieldName: string): void;
/**
* Removes all sortings from {@link sortings} array.
*/
removeAllSortings(): void;
/**
* Performs service destroy.
*/
destroy(): void;
/**
* Internal method for default sortings cloning.
* This method is used as {@link FilterConfig.defaultValue} as well as for copying to {@link sortings} when {@link defaultSortings} setter is used and {@link sortings} is empty.
*/
private cloneDefaultSortings;
static ɵfac: i0.ɵɵFactoryDeclaration<RTSortingsService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<RTSortingsService>;
}
//# sourceMappingURL=sortings.service.d.ts.map