/// import * as types from '../../types'; /** * A class to hold information about static rendering options * @class * @memberof static */ export declare class StaticRendererBuilder { /** * @constructor */ constructor(); readonly: boolean | ((data: any) => boolean); parts: types.Part.CustomPartSet; language: types.Language.LanguageCodePack; languageCode: string; customParser: types.Static.CustomParserSet; context: types.Context; /** * Set the custom parts * @function * @param parts {Object} * @returns {Object} a {@link static.renderStatic.StaticRenderBuilder StaticRenderBuilder} instance */ withParts(parts: types.Part.CustomPartSet): this; /** * Set the language pack * @function * @param language {Object} * @returns {Object} a {@link static.renderStatic.StaticRenderBuilder StaticRenderBuilder} instance */ withLanguage(language: types.Language.LanguageCodePack): this; /** * Set the language code * @function * @param languageCode {String} language code to refer to specific language code in language pack. Default "en" * @returns {Object} a {@link static.renderStatic.StaticRenderBuilder StaticRenderBuilder} instance */ withLanguageCode(languageCode: string): this; /** * Set custom parser * @function * @param customParser {Object} * @returns {Object} a {@link static.renderStatic.StaticRenderBuilder StaticRenderBuilder} instance */ withCustomParser(customParser: types.Static.CustomParserSet): this; /** * Set context * @function * @param context {Object} * @returns {Object} a {@link static.renderStatic.StaticRenderBuilder StaticRenderBuilder} instance */ withContext(context: types.Context): this; /** * Add a context to specific id * @param id {String} element id this context refer to * @param context {Object} the context for element * @returns {Object} a {@link static.renderStatic.StaticRenderBuilder StaticRenderBuilder} instance */ addContext(id: string, context: any): this; /** * Set the rendering setting * @param props {Object} setting object * @returns {Object} a {@link static.renderStatic.StaticRenderBuilder StaticRenderBuilder} instance */ withSetting(props: { readonly?: boolean | ((data: any) => boolean); }): this; /** * Render a static webform from xml string * @function * @param xml {String} xml string * @returns a renderEngine object */ fromXml(xml: string): { render: (targetElement: HTMLElement, initialData?: any) => any; }; /** * Render a static webform from html dom element * @param dom {Object} html dom element contains the elements to render * @returns a renderEngine object */ fromDOM(dom: any): { render: (targetElement: HTMLElement, initialData?: any) => any; }; }