import { ShowValidationErrorParameters, ValidationHelper, WithValidation } from "jb-validation"; import { EventTypeWithTarget } from "jb-core"; import { JBButtonWebComponent } from "jb-button"; //#region modules/jb-file-input/web-component/lib/types.d.ts type ElementObjects = { componentWrapper: HTMLDivElement; virtualInput: HTMLInputElement; placeholder: { section: HTMLButtonElement; wrapper: HTMLSpanElement; title: HTMLSpanElement; }; file: { section: HTMLDivElement; wrapper: HTMLButtonElement; fileName: HTMLSpanElement; }; uploader: { bg: HTMLDivElement; }; overlay: { wrapper: HTMLDivElement; reselect: HTMLButtonElement; delete: JBButtonWebComponent; download: JBButtonWebComponent; }; }; type ValidationErrorType = "REQUIRED"; type FileInputStatus = "empty" | "selected"; type ValidationValue = { file: File | null; }; type JBFileInputEventType = EventTypeWithTarget; //#endregion //#region modules/jb-file-input/web-component/lib/jb-file-input.d.ts declare class JBFileInputWebComponent extends HTMLElement implements WithValidation { #private; static formAssociated: boolean; set required(value: boolean); get required(): boolean; get name(): string | null | undefined; set name(value: string | null | undefined); get acceptTypes(): string; set acceptTypes(value: string); get value(): File | null; set value(value: File | null); get status(): FileInputStatus; get selectedFileType(): string | null; get uploadPercent(): number | null; set uploadPercent(value: number | null); get validation(): ValidationHelper; get isAutoValidationDisabled(): boolean; set isAutoValidationDisabled(value: boolean); constructor(); initWebComponent(): void; initProp(): void; registerEventListener(): void; openFileSelector(): void; static get observedAttributes(): string[]; attributeChangedCallback(name: string, oldValue: string, newValue: string): void; onAttributeChange(name: string, value: string): void; setStatus(status: FileInputStatus): void; showValidationError(error: ShowValidationErrorParameters): void; clearValidationError(): void; resetValue(): void; /** * @public * @description this method used to check for validity but doesn't show error to user and just return the result * this method used by #internal of component */ checkValidity(): boolean; /** * @public * @description this method used to check for validity and show error to user */ reportValidity(): boolean; get validationMessage(): string | null; } //#endregion export { ElementObjects, FileInputStatus, JBFileInputEventType, JBFileInputWebComponent, ValidationErrorType, ValidationValue }; //# sourceMappingURL=jb-file-input.d.ts.map