UNPKG

@data-cafe/datagrid

Version:

A very generic datagrid component for data-café applications

46 lines (45 loc) 1.5 kB
import { EventEmitter } from '@angular/core'; import { ClrLoadingState } from '@clr/angular'; import { ActionsInput, ItemsInput, TextsInput } from '../io'; import { EditOutput } from '../io/edit.output'; import { Column, Data, Item, UI } from '../model'; import * as i0 from "@angular/core"; export declare class DatagridComponent<I extends Item> { readonly NO_ITEMS: Array<I>; readonly NO_COLS: Array<Column>; readonly ClrLoadingState: typeof ClrLoadingState; data?: Data<I>; ui: UI; /** * Customize all texts in component for i18n purposes. */ texts?: TextsInput; /** * Define custom action buttons. */ actions?: ActionsInput; /** * Dispatch everytime an item is updated in the datagrid. * * @see editable */ edit: EventEmitter<EditOutput<I>>; constructor(); /** * Set the data to be displayed. * @param value */ set items(value: ItemsInput<I> | undefined | null); /** * Transform the grid editable. * * @param something * * @see edit */ set editable(something: unknown); onEdit(item: I, property: string, modification: any): void; private updateUI; static ɵfac: i0.ɵɵFactoryDeclaration<DatagridComponent<any>, never>; static ɵcmp: i0.ɵɵComponentDeclaration<DatagridComponent<any>, "dt-datagrid", never, { "texts": "texts"; "actions": "actions"; "items": "items"; "editable": "editable"; }, { "edit": "edit"; }, never, never>; }