import { DBManager, DBModule, DBRemote, ObjectData, Scope, Structure, Variable, FunctionData, BasicType } from '@cyklang/core'; import { DirtyManager, VariableReact } from './cykReact'; export declare const structure: Structure; export declare const dbRemote: DBRemote; export declare let CURRENCY: string; export declare const getDBManager: () => Promise; /** * function devMode * if we are using Vite then the server is at localhost:3000 * @param url * @returns */ export declare const devMode: (url: string) => string; /** * * @param username * @param password * @param recaptcha_token */ declare function signin_username(username: string, password: string, recaptchaToken: string): Promise; /** * */ export declare function adminUser(): boolean; /** * */ declare function signout(): Promise; /** * */ declare function saveSourceEdit(): Promise; /** * * @param table * @param where * @param orderBy * @param fields * @returns */ export declare function selectFromTable(table: string, where?: string, orderBy?: string, fields?: string): Promise; declare function arrayRecords(objectTable: ObjectData, fields?: string): any[]; /** * * @param userGroups * @param resourceACL * @param resourceName * @param accessRequired * @returns */ export declare function verifyAccessRight(userGroups: string, resourceACL: string, resourceName: string, accessRequired: string): void; export declare function getVarValue(variable: Variable | undefined): string | number | null | undefined; /** * * @param value * @returns */ export declare function toNumber(value: BasicType): number | undefined; /** * * @param variable * @param nval */ export declare function setVarValue(variable: Variable, nval: string | number | null | undefined): void; export declare function useCykLang(): { structure: Structure; dbRemote: DBRemote; getDBManager: () => Promise; signin_username: typeof signin_username; signout: typeof signout; saveSourceEdit: typeof saveSourceEdit; arrayRecords: typeof arrayRecords; verifyAccessRight: typeof verifyAccessRight; }; export declare class ComponentModel { objectData: ObjectData | undefined; model: Variable | undefined; variableReact: VariableReact | undefined; dirtyManager?: DirtyManager | undefined; attributes: { [key: string]: BasicType; }; validationFunction: ValidationFunction | undefined; validationFunctionSetter: ValidationFunctionSetter | undefined; promise: Promise | undefined; resolve: ((value: void | PromiseLike) => void) | undefined; constructor(objectData: ObjectData | undefined, model: Variable | undefined, variableReact?: VariableReact, dirtyManager?: DirtyManager); interpolateAttributes(): Promise; } export type ValidationFunction = () => Promise; export type ValidationFunctionSetter = (validationFunction: ValidationFunction) => void; export type PushModalDialogFunction = (dialogComponent: ComponentModel) => Promise; export type PopModalDialogFunction = () => Promise; /** * class ChangeWorker * receive change events and trigger onchangeFunction */ export declare class ChangeWorker { onchangeFunction: FunctionData; callerScope: Scope; scheduled: boolean; isRunning: boolean; constructor(onchangeFunction: FunctionData, callerScope: Scope); onchangeRequired(): void; execute(): void; } /** * * @param object * @param name * @param defaultValue * @returns */ export declare function objectParameter(object: ObjectData, name: string, defaultValue: type): type; /** * * @param variable */ export declare function buildComponentModel(variable: Variable): ComponentModel; /** * * @param text * @returns */ export declare function xlate(text: string): any; /** * * @param module */ export declare function moduleExist(module: string): Promise; /** * * @param module * @returns */ export declare function fetchModule(module: string): Promise; export {};