racquetjs
Version:
one more js framework
123 lines (122 loc) • 2.56 kB
TypeScript
export declare abstract class Component {
private elementRef;
private hash;
private componentService;
private children;
private controls;
constructor();
/**
* ________METHODS TO OVERRIDE________
*/
/**
* Method for creating default template
* METHOD FOR OVERRIDE
*
* @returns {string}
*/
protected createTemplate(): string;
/**
* Method for setting event handlers here
* METHOD FOR OVERRIDE
*
* @returns {void}
*/
protected abstract setHandlers(): void;
/**
* Default method for doing something after component view rendered
* METHOD FOR OVERRIDE
*
* @returns {void}
*/
protected abstract afterViewInit(): void;
/**
* ________METHODS U CAN USE IN YOUR COMPONENT________
*/
/**
* Update current component element
*
* @returns {void}
*/
render(): void;
/**
* Create child none
*
* @param component
*
* @returns {string}
*/
protected createChild(component: Component): string;
/**
* Get current component DOM element link
*
* @returns {HTMLElement}
*/
getElementRef(): Element;
/**
* Add new control to component controls and returns component hash name
*
* @param {string} controlName
*
* @returns {string}
*/
addControlByName(controlName: string): string;
/**
* Get control hash name by its name
*
* @param {string} controlName
*
* @return {hash}
*/
getControlHashByName(controlName: string): string;
/**
* ________LOCAL METHODS NOT TO USE OUTSIDE THIS CLASS________
*/
/**
* Creates html tag for template with hash name
*
* @private
*
* @returns {string}
*/
createElementRoot(): string;
/**
* Create local HTMLElement
*
* @private
*
* @returns {void}
*/
attach(): void;
/**
* Invoke attach and render methods for each child components
*
* @private
*
* @returns {void}
*/
private renderChildren();
/**
* What we should do before component render start
*
* @private
*
* @returns {void}
*/
private prerender();
/**
* Reset component children
*
* @private
*
* @returns {void}
*/
private refreshChildren();
/**
* Reset component children
*
* @private
*
* @returns {void}
*/
private refreshControls();
}