UNPKG

@ribajs/core

Version:

Core module of Riba.js

26 lines (25 loc) 1.08 kB
import { Component, ScopeBase } from "@ribajs/core"; export type AttributeType = string; export interface TemplateAttribute { name: string; type?: AttributeType; required?: boolean; } export type TemplateAttributes = Array<TemplateAttribute>; export interface Scope extends ScopeBase { items?: Array<any>; } export declare abstract class TemplatesComponent extends Component { protected templateAttributes: TemplateAttributes; protected templateReady: boolean; abstract scope: Scope; protected connectedCallback(): void; protected ready(): boolean; protected transformTemplateAttribute(name: string, value: any, type?: AttributeType): any; protected transformTemplateAttributes(attributes: any, index: number): any; protected getTemplateAttributes(tpl: HTMLTemplateElement | HTMLElement, index: number): any; protected addItemByTemplate(tpl: HTMLTemplateElement | HTMLElement, index: number): void; protected addItemsByTemplate(): void; protected removeTemplates(): void; protected hasOnlyTemplateChilds(): boolean; }