UNPKG

@gravity-ui/graph

Version:

Modern graph editor component

36 lines (35 loc) 1.66 kB
import { CoreComponent, CoreComponentContext, CoreComponentProps } from "./CoreComponent"; export type TComponentState = Record<string, unknown>; export type TComponentProps = CoreComponentProps; export type TComponentContext = CoreComponentContext; export declare class Component<Props extends CoreComponentProps = CoreComponentProps, State extends TComponentState = TComponentState, Context extends CoreComponentContext = CoreComponentContext> extends CoreComponent<Props, Context> { protected firstIterate: boolean; protected firstRender: boolean; protected firstUpdateChildren: boolean; protected shouldRender: boolean; protected shouldUpdateChildren: boolean; protected shouldRenderChildren: boolean; state: State; protected __data: { nextProps: Props | undefined; nextState: State | undefined; }; constructor(props: Props, parent: CoreComponent); protected willMount(): void; setContext<K extends keyof Context>(context: Pick<Context, K>): void; setProps<K extends keyof Props>(props?: Pick<Props, K>): void; protected setState<K extends keyof State>(state: Pick<State, K>): void; protected propsChanged(_nextProps: Props): void; protected stateChanged(_nextState: State): void; protected checkData(): void; protected willRender(): void; protected didRender(): void; protected renderLifeCycle(): void; protected willUpdateChildren(): void; protected didUpdateChildren(): void; protected childrenLifeCycle(): void; protected willIterate(): void; protected didIterate(): void; protected willNotRender(): void; iterate(): boolean; }