armisa-models
Version:
models of armisa!
54 lines (53 loc) • 2.24 kB
TypeScript
import { AxiosInstance } from "axios";
import { IMainStateFactory, IResultOfValidate, MainStateManager } from "../..";
import { TokenInfo } from "../AmisaAuth/Models/StorageManager/TokenInfo";
import { ElementFactory } from "../Page/ElementsOfFormFactory/ElementFactory";
export declare class AttachedFilesFactory extends ElementFactory {
#private;
axiosData: {
axios: (controllerPath: string) => AxiosInstance;
controllerPath: string;
actionUploadPath: string;
actionDownloadPath: string;
};
caption: string;
maxLength: number | null;
maxSize: number | null;
placeHolder?: string | undefined;
tabIndex?: number | undefined;
restartDefaultValue: () => void;
refreshHasChange: () => void;
deseriallize: (jsonValue: any) => void;
clearData: () => void;
get value(): any;
forceUpdate: () => void;
get tokenInfo(): TokenInfo;
validation: IResultOfValidate;
validate: () => void;
get selectElement(): HTMLInputElement;
element?: HTMLDivElement;
get hasChange(): boolean;
get files(): AttachedFile[];
addFiles: (file: File) => void;
clearFiles(): void;
mainStateManager: MainStateManager;
constructor(mainStateFactory: IMainStateFactory, fieldName: string, dispose: () => void, axiosData: {
axios: (controllerPath: string) => AxiosInstance;
controllerPath: string;
actionUploadPath: string;
actionDownloadPath: string;
}, caption: string, maxLength: number | null, maxSize: number | null, placeHolder?: string | undefined, tabIndex?: number | undefined, payLoadKey?: string, responseKey?: string);
save: (id: number) => Promise<import("axios").AxiosResponse<any, any>>;
download: (id: number, fileName: string) => void;
}
type IAttachedFileType = 'excel' | 'pdf' | 'zip' | 'doc' | 'txt' | 'image' | 'others';
export declare class AttachedFile {
name: string;
size: number;
tozihat: string;
file?: File | undefined;
id?: number | undefined;
type: IAttachedFileType;
constructor(name: string, size: number, tozihat: string, file?: File | undefined, id?: number | undefined);
}
export {};