@fe6/water-pro
Version:
An enterprise-class UI design language and Vue-based implementation
58 lines (57 loc) • 1.91 kB
TypeScript
/**
* Creates an DOM-Element out of a string (Single element).
* @param html HTML representing a single element
* @returns {Element | null} The element.
*/
export function createElementFromString(html: any): Element | null;
/**
* Creates a new html element, every element which has
* a ':ref' attribute will be saved in a object (which will be returned)
* where the value of ':ref' is the object-key and the value the HTMLElement.
*
* It's possible to create a hierarchy if you add a ':obj' attribute. Every
* sibling will be added to the object which will get the name from the 'data-con' attribute.
*
* If you want to create an Array out of multiple elements, you can use the ':arr' attribute,
* the value defines the key and all elements, which has the same parent and the same 'data-arr' attribute,
* would be added to it.
*
* @param str - The HTML String.
*/
export function createFromTemplate(str: any): {};
/**
* Polyfill for safari & firefox for the eventPath event property.
* @param evt The event object.
* @return [String] event path.
*/
export function eventPath(evt: any): any;
/**
* Resolves a HTMLElement by query.
* @param val
* @returns {null|Document|Element}
*/
export function resolveElement(val: any): null | Document | Element;
/**
* Creates the ability to change numbers in an input field with the scroll-wheel.
* @param el
* @param mapper
*/
export function adjustableInputNumbers(el: any, mapper?: (v: any) => any): void;
/**
* Add event(s) to element(s).
* @param elements DOM-Elements
* @param events Event names
* @param fn Callback
* @param options Optional options
* @return Array passed arguments
*/
export const on: any;
/**
* Remove event(s) from element(s).
* @param elements DOM-Elements
* @param events Event names
* @param fn Callback
* @param options Optional options
* @return Array passed arguments
*/
export const off: any;