@anglr/grid
Version:
Angular module displaying grid
126 lines • 4.7 kB
TypeScript
import { Type, OnInit, ViewContainerRef } from '@angular/core';
import { RecursivePartial } from '@jscrpt/common';
import { Observable, BehaviorSubject } from 'rxjs';
import { ContentRenderer, DataLoader, Grid, GridInitializer, GridOptions, GridPlugin, MetadataGatherer, MetadataSelector, NoDataRenderer, Ordering, Paging, RowSelector, GridPluginInstances } from '../../interfaces';
import { GridAction, GridFunction } from '../../misc/types';
import { GridPluginType } from '../../misc/enums';
import * as i0 from "@angular/core";
/**
* Grid component used for rendering grid
*/
export declare class GridComponent implements OnInit, Grid {
/**
* Object storing current used plugin type
*/
protected pluginTypes: Record<GridPluginType, Type<GridPlugin> | undefined | null>;
/**
* Grid plugin instances available for grid
*/
protected pluginInstances: GridPluginInstances;
/**
* Metadata gatherer instance
*/
protected get metadataGatherer(): MetadataGatherer | undefined | null;
/**
* Grid options
*/
protected ɵgridOptions: GridOptions;
/**
* Instance that allows changing state of initialized plugins
*/
protected pluginsOptionsInitialization: {
contentRenderer: BehaviorSubject<boolean>;
dataLoader: BehaviorSubject<boolean>;
gridInitializer: BehaviorSubject<boolean>;
metadataSelector: BehaviorSubject<boolean>;
noDataRenderer: BehaviorSubject<boolean>;
ordering: BehaviorSubject<boolean>;
paging: BehaviorSubject<boolean>;
rowSelector: BehaviorSubject<boolean>;
};
/**
* Subject used for indication that grid was initialized
*/
protected initializedSubject: BehaviorSubject<boolean>;
/**
* @inheritdoc
*/
get gridOptions(): GridOptions;
set gridOptions(options: RecursivePartial<GridOptions>);
/**
* @inheritdoc
*/
get initialized(): Observable<boolean>;
/**
* @inheritdoc
*/
pluginsOptionsInitialized: Observable<boolean>;
/**
* Container used for rendering metadata selector plugin
*/
protected metadataSelectorContainer: ViewContainerRef;
/**
* Container used for rendering data loader plugin
*/
protected dataLoaderContainer: ViewContainerRef;
/**
* Container used for rendering row selector plugin
*/
protected rowSelectorContainer: ViewContainerRef;
/**
* Container used for rendering grid initializer plugin
*/
protected gridInitializerContainer: ViewContainerRef;
/**
* Container used for rendering ordering plugin
*/
protected orderingContainer: ViewContainerRef;
/**
* Container used for rendering content renderer plugin
*/
protected contentRendererContainer: ViewContainerRef;
/**
* Container used for rendering no data renderer plugin
*/
protected noDataRendererContainer: ViewContainerRef;
/**
* Container used for rendering paging plugin
*/
protected pagingContainer: ViewContainerRef;
/**
* Metadata gatherer instance
*/
protected metadataGathererChild: MetadataGatherer | undefined | null;
constructor(options?: RecursivePartial<GridOptions>, pagingType?: Type<Paging>, orderingType?: Type<Ordering>, gridInitializerType?: Type<GridInitializer>, dataLoaderType?: Type<DataLoader>, contentRendererType?: Type<ContentRenderer>, metadataSelectorType?: Type<MetadataSelector>, noDataRendererType?: Type<NoDataRenderer>, rowSelectorType?: Type<RowSelector>);
/**
* Initialize component
*/
ngOnInit(): void;
/**
* @inheritdoc
*/
initialize(force: boolean): Promise<void>;
/**
* @inheritdoc
*/
initOptions(): Promise<void>;
/**
* @inheritdoc
*/
getPlugin<PluginInstance extends GridPlugin>(pluginId: GridPluginType): PluginInstance;
/**
* @inheritdoc
*/
setGridPluginInstances(plugin: GridPlugin): void;
/**
* @inheritdoc
*/
execute(...actions: GridAction[]): Promise<void>;
/**
* @inheritdoc
*/
executeAndReturn<TResult>(func: GridFunction<TResult>): TResult;
static ɵfac: i0.ɵɵFactoryDeclaration<GridComponent, [{ optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }]>;
static ɵcmp: i0.ɵɵComponentDeclaration<GridComponent, "ng-grid", never, { "gridOptions": { "alias": "gridOptions"; "required": false; }; }, {}, ["metadataGathererChild"], never, true, never>;
}
//# sourceMappingURL=grid.component.d.ts.map