bs-datatable
Version:
A data table based on Bootstrap 5
77 lines (76 loc) • 2.34 kB
TypeScript
declare class BSDataTableBase {
element: HTMLElement;
children: BSDataTableBase[];
constructor();
/**
* Add handler to the events raised by the DOM
*/
addEventHandler(eventName: string, handler: EventListener): void;
set title(val: string);
get title(): string;
_dataSourceName: string;
get dataSourceName(): string;
set dataSourceName(v: string);
_isReadOnly: boolean;
get isReadOnly(): boolean;
set isReadOnly(v: boolean);
get width(): string;
set width(width: string);
get visible(): boolean;
set visible(val: boolean);
getCss(t: string): any;
setCss(k: string, v: any): void;
set css(css: any);
/**
*
* @param {object[]} props
*/
props(props: any): void;
/**
* Sets the value of an attribute
* @param key
* @param value
* @returns
*/
prop(key: string, value: any): HTMLElement;
getProp(key: string): string;
findElements(selector: string): NodeListOf<Element>;
findById(id: string): HTMLElement;
removeElement(el: Element): void;
addClass(cssClass: string): this;
removeClass(cssClass: string): this;
hasClass(cssClass: string): boolean;
hasClasses(cssClasses: string): boolean;
setText(txt: string): this;
getText(): string;
/**
*
* @param {BSDataTableBase} elem
*/
append(elem: BSDataTableBase, pushToChildrenArray?: boolean): this;
focus(): void;
isEmptyObj(obj: any): boolean;
get id(): string;
set id(v: string);
clone(): BSDataTableBase;
/**
* a shallow clone
* @param {object} obj
* @returns
*/
shClone(obj: any): any;
childrenNodes(): HTMLCollection;
appendChild(node: Node): void;
wrap(wrapper: Element, nodes: HTMLCollection | Element): void;
addDragHandlers(node: Element, dragHandlers: {
dragStart: (ev: DragEvent) => any;
dragLeave: (ev: DragEvent) => any;
dragEnter: (ev: DragEvent) => any;
dragOver: (ev: DragEvent) => any;
dragEnd: (ev: DragEvent) => any;
drop: (ev: DragEvent) => any;
}): void;
matches(elem: Element, filter: string): boolean;
siblings(selector: string): Element[];
}
export { BSDataTableBase };