UNPKG

armisa-models

Version:
65 lines (64 loc) 2.82 kB
import { AxiosInstance } from "axios"; import { EnumValidateState } from "../enums"; import { ElementFactory } from "../Page/ElementsOfFormFactory/ElementFactory"; import { IMainStateFactory } from "../Types"; import { StructrulCodeFactory } from "./StructructrulCode/StructrulCodeFactory"; export type IResultOfValidate = true | [string, EnumValidateState]; export type ISelectCustomerState = 'clear' | 'ok' | 'dirty' | 'withoutParent' | 'newCode'; export type ISelectCustomerTypeOfCode = 'actually' | 'potential'; export type ISelectCustomerUseCaseType = 'MainPageCode' | 'Filter' | 'SelectCode'; export interface IFullName { id: number; code: string; name: string; } export declare class SelectCustomerFactory extends ElementFactory { #private; useCaseType: ISelectCustomerUseCaseType; required: boolean; onlyLastLevel: boolean; caption: string; structrulCodeFactory: StructrulCodeFactory; axiosData: { axios: (controllerPath: string) => AxiosInstance; controllerPotentialPath: string; controllerActuallyPath: string; listPotentialViewActionPath?: string; listActuallyActionPath?: string; }; showHasChangeFlag: boolean; tabIndex?: number | undefined; onChange?: ((e: SelectCustomerFactory) => void) | undefined; forceUpdate: () => void; get any(): any; swapTypeOfCode: () => void; focusToElement: () => void; showPotentialListView?: () => void; showListView?: (value?: string) => void; private setCachedData; clearData: () => void; id: number | null; fullName: IFullName[]; name: string; typeOfCode: ISelectCustomerTypeOfCode; codeValueState: ISelectCustomerState; childCount: number; validate: () => IResultOfValidate; get text(): string; setText(text: string): void; get value(): string | null; get code(): string; setValue(code: string): void; deseriallize: (e?: string | null) => void; private _defaultValue; restartDefaultValue: () => void; refreshHasChange: () => void; constructor(_mainStateFactory: IMainStateFactory, _fieldName: string, _dispose: () => void, useCaseType: ISelectCustomerUseCaseType, required: boolean, onlyLastLevel: boolean, caption: string, structrulCodeFactory: StructrulCodeFactory, axiosData: { axios: (controllerPath: string) => AxiosInstance; controllerPotentialPath: string; controllerActuallyPath: string; listPotentialViewActionPath?: string; listActuallyActionPath?: string; }, showHasChangeFlag: boolean, tabIndex?: number | undefined, payLoadKey?: string, responseKey?: string, onChange?: ((e: SelectCustomerFactory) => void) | undefined); forceUpdateSpinner: () => void; }