UNPKG

bs-datatable

Version:

A data table based on Bootstrap 5

57 lines (56 loc) 2.71 kB
import { Tooltip } from "bootstrap"; import { BSEvent, BSEventHandler, BSInputControlOptions, BSValidationOptions, ControlValidationModel } from "../commonTypes/common-types"; export declare class BSValidationHelper { static CreateControlOptions(ctrlOptions: (options: BSInputControlOptions) => void | BSInputControlOptions): BSInputControlOptions; } export declare class BSValidationService { Options: BSValidationOptions; ValidationResult: ControlValidationModel[]; IsValid: boolean; constructor(options?: BSValidationOptions); notifyListeners(eventType: string, payload: BSEvent): void; /** * Add handler to the events raised by the data table * @param eventName * @param callback * @param verifyDSName */ addHandler(eventName: string, callback: BSEventHandler, verifyDSName?: boolean): void; removeHandler(eventName: string): void; /** * * @param ctrlOptions * @returns Returns the control which is being verified */ GetControl(ctrlOptions: BSInputControlOptions): HTMLInputElement; AddValidationFor(ctrlOptions: (options: BSInputControlOptions) => void | BSInputControlOptions): this; _GetMessageNode(ctrl: HTMLInputElement): HTMLElement; _GetTooltip(ctrl: HTMLInputElement): Tooltip; RegisterHandler(ctrlOptions: BSInputControlOptions): void; RegisterHandlers(): void; _SetMessage(model: ControlValidationModel): void; _SetMessageNode(model: ControlValidationModel): void; _SetToolTip(model: ControlValidationModel): void; _ResetToolTip(model: ControlValidationModel): void; _ResetMessageNode(model: ControlValidationModel): void; _ResetMessage(model: ControlValidationModel): void; ResetAll(): void; Clear(): void; ValidateAll(): void; Validate(model: ControlValidationModel): boolean; AppendMessageNode(control: Element, cls: string): HTMLDivElement; AddWrapper(wrapper: HTMLElement, nodes: HTMLElement): void; } export declare class BSFluentValidationBuilder { Options: BSValidationOptions; constructor(options?: BSValidationOptions); static CreateBuilder(): BSFluentValidationBuilder; AddValidationFor(ctrlOptions: (options: BSInputControlOptions) => void | BSInputControlOptions): this; ErrorMessageClass(cls: string): this; ShowMessagesAsToolTips(val: boolean): this; TooltipClass(val: string): this; ControlErrorClass(cls: string): this; OnValidated(callback: (sender: any, args: any) => void): this; Build(): BSValidationService; _ConfigureControl(ctrlOptions: (options: BSInputControlOptions) => void | BSInputControlOptions): this; }