import * as i9 from '@angular/cdk/table'; import { CdkCell, CdkColumnDef, CdkCellDef, CdkHeaderCell, CdkHeaderCellDef, CdkHeaderRow, CdkHeaderRowDef, CdkRow, CdkRowDef, DataSource, CdkTable } from '@angular/cdk/table'; import * as i0 from '@angular/core'; import { EventEmitter, OnDestroy, OnInit, ElementRef, Renderer2, ChangeDetectorRef, AfterViewInit, OnChanges, SimpleChanges, AfterContentInit } from '@angular/core'; import { NovoLabelService } from 'novo-elements/services'; import * as i14 from 'novo-elements/elements/dropdown'; import { NovoDropdownElement } from 'novo-elements/elements/dropdown'; import { Observable } from 'rxjs'; import * as i8 from 'novo-elements/elements/date-picker'; import * as i10 from '@angular/common'; import * as i11 from '@angular/forms'; import * as i12 from 'novo-elements/elements/common'; import * as i13 from 'novo-elements/elements/button'; import * as i15 from 'novo-elements/elements/form'; import * as i16 from 'novo-elements/elements/loading'; import * as i17 from 'novo-elements/elements/tiles'; import * as i18 from 'novo-elements/elements/search'; import * as i19 from 'novo-elements/elements/select'; import * as i20 from 'novo-elements/elements/checkbox'; declare class ActivityTableRenderers { static propertyRenderer(prop: string): Function; static dateRenderer(prop: string): Function; } interface SimpleTableColumn { id: string; label: string; renderType?: 'text' | 'link'; renderer: Function; customClass?: (row?: T) => string; onClick?(row: T): any; width?: number; config?: { sortable?: boolean; filterable?: boolean; transforms?: { filter?: Function; sort?: Function; }; sortTransform?: Function; filterConfig?: SimpleTableColumnFilterConfig; }; } interface SimpleTablePaginationOptions { page?: number; pageSize?: number; pageSizeOptions?: number[]; } interface SimpleTableColumnFilterConfig { type: 'text' | 'date' | 'select'; options?: string[] | SimpleTableColumnFilterOption[]; allowCustomRange?: boolean; } interface SimpleTableColumnFilterOption { label: string; value?: any; min?: number; max?: number; } interface SimpleTableSearchOptions { placeholder?: string; tooltip?: string; } interface SimpleTableActionColumnOption { label: string; onClick(row: T): string; disabled?: boolean; disabledCheck?(row: T): boolean; } interface SimpleTableActionColumn { id: string; icon?: string; label?: string; disabled?: boolean; disabledCheck?(row: T): boolean; options?: SimpleTableActionColumnOption[]; onClick?(row: T): void; } interface NovoSimpleSortFilter { id: string; direction?: string; active?: boolean; filter?: string | boolean; } interface NovoSimpleTableChange { sort?: { id: string; value: string; }; filter?: { id: string; value: string; }; page?: number; pageSize?: number; globalSearch?: string; } interface NovoSimpleSelectionChange { selected: any[]; } interface NovoSimplePaginationEvent { page: number; pageSize: number; length: number; } declare class NovoActivityTableState { id: number; sort: { id: string; value: string; }; filter: { id: string; value: string; }; page: number; pageSize: number; globalSearch: string; selectedRows: Map; outsideFilter: any; updates: EventEmitter; onReset: EventEmitter; get userFiltered(): boolean; reset(fireUpdate?: boolean, persistUserFilters?: boolean): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class NovoSortFilter { private state; constructor(state: NovoActivityTableState); filter(id: string, value: any, transform: Function): void; sort(id: string, value: string, transform: Function): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class NovoSelection implements OnDestroy { state: NovoActivityTableState; novoSelectAllToggle: EventEmitter; allRows: Map; private throttleTimeout; constructor(state: NovoActivityTableState); register(id: any, row: any): void; deregister(id: any): void; ngOnDestroy(): void; toggle(id: string, selected: boolean, row: any): void; selectAll(value: boolean): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** Workaround for https://github.com/angular/angular/issues/17849 */ declare const _NovoCellDef: typeof CdkCellDef; declare const _NovoHeaderCellDef: typeof CdkHeaderCellDef; declare const _NovoColumnDef: typeof CdkColumnDef; declare const _NovoHeaderCell: typeof CdkHeaderCell; declare const _NovoCell: typeof CdkCell; declare class NovoSimpleCellDef extends _NovoCellDef { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class NovoSimpleHeaderCellDef extends _NovoHeaderCellDef { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class NovoSimpleColumnDef extends _NovoColumnDef { get name(): string; set name(name: string); /** * This has been extracted to a util because of TS 4 and VE. * View Engine doesn't support property rename inheritance. * TS 4.0 doesn't allow properties to override accessors or vice-versa. * @docs-private */ protected _setNameInput(value: string): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class NovoSimpleHeaderCell extends _NovoHeaderCell implements OnInit { private elementRef; private renderer; role: string; column: SimpleTableColumn; constructor(columnDef: CdkColumnDef, elementRef: ElementRef, renderer: Renderer2); ngOnInit(): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵdir: i0.ɵɵDirectiveDeclaration, "novo-simple-header-cell", never, { "column": { "alias": "column"; "required": false; }; }, {}, never, never, false, never>; } declare class NovoSimpleEmptyHeaderCell extends _NovoHeaderCell { role: string; constructor(columnDef: CdkColumnDef, elementRef: ElementRef, renderer: Renderer2); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class NovoSimpleCheckboxHeaderCell extends _NovoHeaderCell implements OnDestroy { private _selection; role: string; selectAll: boolean; private selectAllSubscription; constructor(columnDef: CdkColumnDef, elementRef: ElementRef, renderer: Renderer2, ref: ChangeDetectorRef, _selection: NovoSelection); ngOnDestroy(): void; toggle(value: boolean): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class NovoSimpleCell extends _NovoCell implements OnInit { private elementRef; private renderer; role: string; row: any; column: SimpleTableColumn; constructor(columnDef: CdkColumnDef, elementRef: ElementRef, renderer: Renderer2); ngOnInit(): void; onClick(event: MouseEvent): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "novo-simple-cell", never, { "row": { "alias": "row"; "required": false; }; "column": { "alias": "column"; "required": false; }; }, {}, never, never, false, never>; } declare class NovoSimpleCheckboxCell extends _NovoCell implements OnDestroy, OnInit { columnDef: CdkColumnDef; _selection: NovoSelection; role: string; row: any; index: any; selected: boolean; private selectAllSubscription; constructor(columnDef: CdkColumnDef, elementRef: ElementRef, renderer: Renderer2, _selection: NovoSelection); ngOnInit(): void; ngOnDestroy(): void; toggle(value: boolean): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class NovoSimpleActionCell extends _NovoCell implements OnInit { private elementRef; private renderer; labels: NovoLabelService; role: string; row: T; column: SimpleTableActionColumn; constructor(columnDef: CdkColumnDef, elementRef: ElementRef, renderer: Renderer2, labels: NovoLabelService); ngOnInit(): void; isDisabled(check: SimpleTableActionColumn | SimpleTableActionColumnOption, row: T): boolean; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "novo-simple-action-cell", never, { "row": { "alias": "row"; "required": false; }; "column": { "alias": "column"; "required": false; }; }, {}, never, never, false, never>; } declare class NovoSimpleFilterFocus implements AfterViewInit { private element; constructor(element: ElementRef); ngAfterViewInit(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class NovoSimpleCellHeader implements NovoSimpleSortFilter, OnInit, OnDestroy { private changeDetectorRef; labels: NovoLabelService; private state; _sort: NovoSortFilter; _cdkColumnDef: CdkColumnDef; dropdown: NovoDropdownElement; defaultSort: { id: string; value: string; }; get config(): { sortable: boolean; filterable: boolean; transforms?: { filter?: Function; sort?: Function; }; filterConfig: SimpleTableColumnFilterConfig; }; set config(v: { sortable: boolean; filterable: boolean; transforms?: { filter?: Function; sort?: Function; }; filterConfig: SimpleTableColumnFilterConfig; }); private _config; private _rerenderSubscription; private changeTimeout; icon: string; id: string; filter: string | boolean; direction: string; filterActive: boolean; sortActive: boolean; showCustomRange: boolean; activeDateFilter: string; constructor(changeDetectorRef: ChangeDetectorRef, labels: NovoLabelService, state: NovoActivityTableState, _sort: NovoSortFilter, _cdkColumnDef: CdkColumnDef); ngOnInit(): void; ngOnDestroy(): void; sort(): void; toggleCustomRange(event: Event, value: boolean): void; filterData(filter?: any): void; clearFilter(): void; private getNextSortDirection; private getDefaultDateFilterOptions; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class NovoSimpleTablePagination implements OnInit, OnDestroy { private changeDetectorRef; labels: NovoLabelService; private state; private _initialized; get page(): number; set page(page: number); _page: number; get length(): number; set length(length: number); _length: number; get pageSize(): number; set pageSize(pageSize: number); private _pageSize; get pageSizeOptions(): number[]; set pageSizeOptions(pageSizeOptions: number[]); private _pageSizeOptions; pageChange: EventEmitter; displayedPageSizeOptions: number[]; longRangeLabel: string; shortRangeLabel: string; private resetSubscription; constructor(changeDetectorRef: ChangeDetectorRef, labels: NovoLabelService, state: NovoActivityTableState); ngOnInit(): void; ngOnDestroy(): void; nextPage(): void; previousPage(): void; hasPreviousPage(): boolean; hasNextPage(): boolean; changePageSize(pageSize: number): void; private updateDisplayedPageSizeOptions; private emitPageEvent; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } interface Page { num: number; text: string; active: boolean; } declare class Pagination implements OnInit, OnChanges { labels: NovoLabelService; page: number; totalItems: number; itemsPerPage: number; rowOptions: any; label: string; get disablePageSelection(): boolean; set disablePageSelection(val: boolean); pageChange: EventEmitter; itemsPerPageChange: EventEmitter; onPageChange: EventEmitter; pageSelectDisabled: boolean; maxPagesDisplayed: number; totalPages: number; pages: Array; constructor(labels: NovoLabelService); ngOnInit(): void; ngOnChanges(changes?: SimpleChanges): void; getDefaultRowOptions(): { value: number; label: string; }[]; onPageSizeChanged(event: any): void; selectPage(page: number, event?: MouseEvent): void; noPrevious(): boolean; noNext(): boolean; makePage(num: number, text: string, isActive: boolean): Page; getPages(currentPage: number, totalPages: number): Page[]; calculateTotalPages(): number; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** Workaround for https://github.com/angular/angular/issues/17849 */ declare const _NovoHeaderRowDef: typeof CdkHeaderRowDef; declare const _NovoCdkRowDef: typeof CdkRowDef; declare const _NovoHeaderRow: typeof CdkHeaderRow; declare const _NovoRow: typeof CdkRow; declare class NovoSimpleHeaderRowDef extends _NovoHeaderRowDef { columns: any; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class NovoSimpleRowDef extends _NovoCdkRowDef { columns: any; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵdir: i0.ɵɵDirectiveDeclaration, "[novoSimpleRowDef]", never, { "columns": { "alias": "novoSimpleRowDefColumns"; "required": false; }; }, {}, never, never, false, never>; } declare class NovoSimpleHeaderRow extends _NovoHeaderRow { rowClass: string; role: string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class NovoSimpleRow extends _NovoRow { rowClass: string; role: string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } interface ActivityTableService { getTableResults(sort: { id: string; value: string; transform?: Function; }, filter: { id: string; value: string; transform?: Function; }, page: number, pageSize: number, globalSearch?: string, outsideFilter?: any): Observable<{ results: T[]; total: number; }>; } declare abstract class RemoteActivityTableService implements ActivityTableService { abstract getTableResults(sort: { id: string; value: string; transform?: Function; }, filter: { id: string; value: string; transform?: Function; }, page: number, pageSize: number, globalSearch?: string, outsideFilter?: any): Observable<{ results: T[]; total: number; }>; } declare class StaticActivityTableService implements ActivityTableService { private data; constructor(data?: T[]); getTableResults(sort: { id: string; value: string; transform?: Function; }, filter: { id: string; value: string; transform?: Function; }, page: number, pageSize: number, globalSearch?: string, outsideFilter?: any): Observable<{ results: T[]; total: number; }>; } declare class ActivityTableDataSource extends DataSource { private tableService; private state; private ref; total: number; current: number; loading: boolean; pristine: boolean; get totallyEmpty(): boolean; get currentlyEmpty(): boolean; constructor(tableService: ActivityTableService, state: NovoActivityTableState, ref: ChangeDetectorRef); connect(): Observable; disconnect(): void; } declare class NovoTable extends CdkTable { static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "novo-simple-table", never, {}, {}, never, never, false, never>; } declare class NovoActivityTableActions { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class NovoActivityTableCustomHeader { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class NovoActivityTableCustomFilter { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class NovoActivityTableEmptyMessage { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class NovoActivityTableNoResultsMessage { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class NovoActivityTable implements AfterContentInit, OnChanges, OnDestroy { labels: NovoLabelService; private ref; state: NovoActivityTableState; globalSearchHiddenClassToggle: boolean; activityService: ActivityTableService; columns: SimpleTableColumn[]; displayedColumns: string[]; actionColumns: SimpleTableActionColumn[]; paginationOptions: SimpleTablePaginationOptions; searchOptions: SimpleTableSearchOptions; defaultSort: { id: string; value: string; }; outsideFilter: EventEmitter; set customFilter(v: boolean); get customFilter(): boolean; private _customFilter; set forceShowHeader(v: boolean); get forceShowHeader(): boolean; private _forceShowHeader; set hideGlobalSearch(v: boolean); get hideGlobalSearch(): boolean; private _hideGlobalSearch; set debug(v: boolean); get debug(): boolean; private _debug; dataSource: ActivityTableDataSource; loading: boolean; private outsideFilterSubscription; get empty(): boolean; get loadingClass(): boolean; constructor(labels: NovoLabelService, ref: ChangeDetectorRef, state: NovoActivityTableState); ngOnChanges(changes: SimpleChanges): void; ngOnDestroy(): void; ngAfterContentInit(): void; onSearchChange(term: string): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "novo-activity-table", never, { "activityService": { "alias": "activityService"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "displayedColumns": { "alias": "displayedColumns"; "required": false; }; "actionColumns": { "alias": "actionColumns"; "required": false; }; "paginationOptions": { "alias": "paginationOptions"; "required": false; }; "searchOptions": { "alias": "searchOptions"; "required": false; }; "defaultSort": { "alias": "defaultSort"; "required": false; }; "outsideFilter": { "alias": "outsideFilter"; "required": false; }; "customFilter": { "alias": "customFilter"; "required": false; }; "forceShowHeader": { "alias": "forceShowHeader"; "required": false; }; "hideGlobalSearch": { "alias": "hideGlobalSearch"; "required": false; }; "debug": { "alias": "debug"; "required": false; }; }, {}, never, ["[novo-activity-table-custom-header]", "[novo-activity-table-actions]", "[novo-activity-table-custom-filter]", "*", "[novo-activity-table-no-results-message]", "[novo-activity-table-empty-message]"], false, never>; } declare class NovoSimpleTableModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export { ActivityTableDataSource, ActivityTableRenderers, NovoActivityTable, NovoActivityTableActions, NovoActivityTableCustomFilter, NovoActivityTableCustomHeader, NovoActivityTableEmptyMessage, NovoActivityTableNoResultsMessage, NovoActivityTableState, NovoSelection, NovoSimpleActionCell, NovoSimpleCell, NovoSimpleCellDef, NovoSimpleCellHeader, NovoSimpleCheckboxCell, NovoSimpleCheckboxHeaderCell, NovoSimpleColumnDef, NovoSimpleEmptyHeaderCell, NovoSimpleFilterFocus, NovoSimpleHeaderCell, NovoSimpleHeaderCellDef, NovoSimpleHeaderRow, NovoSimpleHeaderRowDef, NovoSimpleRow, NovoSimpleRowDef, NovoSimpleTableModule, NovoSimpleTablePagination, NovoSortFilter, NovoTable, Pagination, RemoteActivityTableService, StaticActivityTableService, _NovoCdkRowDef, _NovoCell, _NovoCellDef, _NovoColumnDef, _NovoHeaderCell, _NovoHeaderCellDef, _NovoHeaderRow, _NovoHeaderRowDef, _NovoRow }; export type { ActivityTableService, NovoSimplePaginationEvent, NovoSimpleSelectionChange, NovoSimpleSortFilter, NovoSimpleTableChange, SimpleTableActionColumn, SimpleTableActionColumnOption, SimpleTableColumn, SimpleTableColumnFilterConfig, SimpleTableColumnFilterOption, SimpleTablePaginationOptions, SimpleTableSearchOptions };