imng-prime-table-odata
Version:
This library was generated with [Nx](https://nx.dev).
77 lines (76 loc) • 3.55 kB
TypeScript
import { Observable } from 'rxjs';
import { OnInit, OnDestroy } from '@angular/core';
import { IPrimeODataTableFacade } from './prime-odata-table-facade';
import { Router } from '@angular/router';
import { Subscribable, Subscriptions } from 'imng-ngrx-utils';
import { CompositeFilter, Expander, Filter } from 'imng-odata-client';
import { getRelatedValue, IdType, IRelatedFieldOptions } from 'imng-nrsrx-client-utils';
import { PrimeTableState } from './models/prime-table-state';
import { SortMeta } from 'primeng/api';
import { EnumProperties, getEnumDisplayText } from 'openapi-ts-generator/enums';
import * as i0 from "@angular/core";
export declare abstract class ImngPrimeODataTableBaseComponent<ENTITY extends {
id?: IdType | null | undefined;
}, FACADE extends IPrimeODataTableFacade<ENTITY>> implements OnInit, OnDestroy, Subscribable {
readonly facade: FACADE;
private readonly state;
readonly router: Router | null;
readonly tableRefresh$: Observable<unknown> | null;
readonly allSubscriptions: Subscriptions;
readonly ENUM_DISPLAY_TEXT = EnumProperties.DISPLAY_TEXT;
readonly ENUM_NAME = EnumProperties.NAME;
readonly getEnumDisplayText: typeof getEnumDisplayText;
/**
* This sets the amount of the maximum amount of sortable columns for this component. Default = 5.
*/
maxSortedColumnCount: number;
/**
* This will allow you to provide a visual indicator that some of the columns have been hidden.
*/
hasHiddenColumns$: Observable<boolean>;
tableStateQueryKey: string;
tableState: PrimeTableState;
tableData$: Observable<ENTITY[]>;
activeEffectCount$: Observable<number>;
rowsPerPageOptions: number[];
/**
* A properties enum to make prime table columns definitions type safe
* {@example <td>{{ dataItem[props.FIELD_NAME] }}</td>}
*/
abstract readonly props: any;
protected expanders?: Expander[];
protected appliedTransformations?: string;
readonly getRelatedValue: typeof getRelatedValue;
constructor(facade: FACADE, state: PrimeTableState | Observable<PrimeTableState>, router?: Router | null, //NOSONAR
tableRefresh$?: Observable<unknown> | null);
ngOnInit(): void;
ngOnDestroy(): void;
getExportFileName(exportName: string): string;
/**
* Naming convetion:
* . => Parent table navigation separator
* / => Child table navigation separator
* @param segments
* @returns
*/
getRelatedField(...segments: (string | IRelatedFieldOptions)[]): string | null;
deserializeTableState(stateQueryParam: string): PrimeTableState;
/**
* This method ensures the proper handling of date filters in an OData query
* @param filter
*/
normalizeFilters(filter: Filter | CompositeFilter): void;
serializeTableState(primeTableState: PrimeTableState): string;
/**
* Will reset filters to initialGrid state passed into the constructor
*/
resetFilters(): void;
dataStateChange(primeTableState: PrimeTableState): void;
excelData: () => Observable<ENTITY[]>;
loadEntities(primeTableState: PrimeTableState): void;
validateSortParameters(multiSortMeta?: SortMeta[]): SortMeta[];
updateRouterState(state: PrimeTableState): void;
reloadEntities(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<ImngPrimeODataTableBaseComponent<any, any>, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<ImngPrimeODataTableBaseComponent<any, any>, "ng-component", never, {}, {}, never, never, false, never>;
}