///
export declare interface IFeastBlockRefs {
[index: string]: HTMLElement;
}
export declare interface IFeastBlockIds {
[index: string]: Block;
}
export declare interface IFeastBlockContext {
[index: string]: Object;
}
export declare interface IFeastBlockOptions {
target?: HTMLElement;
replace?: boolean;
}
export declare interface IBlockConfig {
name: string;
isolate: boolean;
isolateEvents: boolean;
immutable: boolean;
notVisualAttributes: {[attr: string]: boolean};
events: {[name: string]: string};
blocks: {[name: string]: BlockConstructor};
attrChanged: {[attr: string]: Function};
styleSheet: {[name: string]: string};
template: string | (() => JSX.Element);
defaults: A;
}
export declare interface GenericBlockDecorator {
(target: BlockConstructor): any
}
export declare function configure(config: Partial> & {name: string}): GenericBlockDecorator;
export declare interface BlockConstructor {
new(attrs?: Partial, context?: any): Block;
}
export declare class Block implements Partial> {
attrs: A;
defaults: A;
props: A;
state: null;
mounted: boolean;
destroyed: boolean;
el: HTMLElement;
ids: IFeastBlockIds;
refs: IFeastBlockRefs;
protected context: IFeastBlockContext;
constructor(attrs?: Partial, context?: any);
template(attrs?: Partial): JSX.Element;
didMount(): void;
didUnmount(): void;
$on(el: HTMLElement, name: string, fn: (evt) => void): void;
$off(el: HTMLElement, name?: string, fn?: (evt) => void): void;
one(el: HTMLElement, name?: string, fn?: (evt) => void): void;
on(name: string, fn: (evt) => void): void;
off(name: string, fn: (evt) => void): void;
broadcast(name: string, details?: object, originalEvent?): void;
set(attrs: Partial): this;
set(attrs: Partial, value: null, withoutRender: boolean): this;
set(key: K, value: A[K]): this;
get(key: K): A[K];
is(key: K): boolean;
invert(key: K): boolean;
render(): JSX.Element;
renderTo(el: HTMLElement, options?: IFeastBlockOptions): this;
forceUpdate(): void;
setState(): void;
setTemplateMatch(name: string, match: Function): void;
destroy(): void;
}