import { IObject, IUpdateConfig, PromiseType, TypeOrFn } from '../interface'; import { getHistory } from '../umiExports'; import { AllReady, batchedUpdates, PageReady, registerExternal } from './base'; import { initCustomThemeColor } from './tool'; import { NGWebWorker } from './WebWorker'; export * from './observer'; export { baseNG as NG, history, emptyFn, borderStyle, AllReady, PageReady, initCustomThemeColor, NGWebWorker, setGlobalVar }; export declare function startScheduleTask(currentTask: any): void; type FO = IObject | Function; export declare function getSubscribeCondition(listenerKey: any): (param: any) => any; declare const baseUtil: { execServer(funcName: string, paramObj: IObject, successCallback?: Function): Promise; external: any; getObserver(): import("./observer").NGObserver; getPageObserver(): import("./observer").NGObserver; getRoot(): string; GetWFrame: () => IObject; isReactElement: (obj: any) => boolean; getHttpUrl(url: string, root?: any): string; request: import("../request").CreateRequest; isRunMaster: boolean; getPageInstance(): any; getCompMap(): any; getPageLang(): any; getPageUI(): any; getPageState(): any; getCmp(id: string): import("../interface").ICurrentObject; getCmpByType(type: string): import("../interface").ICurrentObject; getCmpApi(id: string): any; getComponentRef(id: string): any; getForms(): any; getGrids(): any; compIns: any; query(type: string): any; getUser>(): T; setUser(user?: IObject | undefined): void; isNGFrame: () => boolean; isWebFrame: () => boolean; isReactFrame(): any; alert(content: import("react").ReactNode, others?: IObject): Promise; confirm(content: import("react").ReactNode, others?: IObject): Promise; showLoading(visible?: string | boolean): void; message(msg: string, type?: string): any; isPromise(obj: any): obj is Promise; isArray(arr: any): arr is any[]; isFunction(fn: any): fn is Function; isObject(obj: any): obj is IObject; isNumber(v: any): v is number; isString(str: any): str is string; isBoolean(obj: any): boolean; isDate(date: any): date is Date; isNullOrEmpty(val: any, except?: "" | null | undefined): boolean; toFirstUpperCase(str: string): string; extend: (...args: any[]) => any; assign: (objA: any, objB: any) => any; clearObject: (obj: any) => void; numberPrecision(value: any, precision?: number): number; thousandNumber(value: any, options?: { separator?: string | undefined; includeDecimal?: boolean | undefined; precision?: number | undefined; }): any; uniqueId(key?: string, n?: number): string; deepCopyEx: (obj: any) => any; deepCopy(obj: any, structuredClone?: boolean): any; copyText(text: any): void; deepMerge(objA: any, objB: any): any; getAggregate: (type: any, dataArr: any[], key?: string) => number | "-"; flatArray: (arr: any[], depth?: number) => any; filterTree: (nodes: any, predicate: (node: any) => boolean, { childrenKey, leafKey }?: { childrenKey?: string | undefined; leafKey?: string | undefined; }) => any; groupBy: (dataArr: any[], f: (arg0: any) => any) => any; isPropsEqual(props: any, nextProps: any, config?: { shallow?: boolean | undefined; exclude?: string[] | undefined; }): boolean; isArrayEqual(arr1: any[], arr2: any[]): boolean; firstCase(str: any): any; getValueByPath: (obj: any, path: string) => any; jsonString: (json: any, undefinedValue?: any) => any; parseJson: (jsonStr: any) => any; getBirthDay({ idCard, format }: { idCard: any; format?: string | undefined; }): any; getAge({ idCard, birth, format }: { idCard?: string | undefined; birth?: string | undefined; format?: string | undefined; }): any; strToDate(dateStr: any): Date; formatDate(dateStr: any, format?: string): any; addDate(date: any, count: number, type?: "year" | "month" | "date" | "hours" | "minutes" | "seconds" | "milliseconds", format?: string | undefined): any; regExpTest: (regExp: string | Function, value: any) => any; convertData: (data: any, dataType: import("../interface").ValueTypeEnum, format?: string) => any; getScrollBarInfo(container?: HTMLElement, cache?: boolean): any; getQueryValue(queryName?: string, options?: string | { search?: string | undefined; ignoreCase?: boolean | undefined; decode?: boolean | undefined; cache?: boolean | undefined; } | undefined): any; getCookie(name: any, dv?: any): any; handleData: typeof import("./tool").handleData; handleUrl: typeof import("./tool").handleURL; debounce: (func: any, wait: number, immediate?: boolean | undefined) => (...payload: any[]) => any; throttle: (func: any, wait: number, options?: { leading?: boolean | undefined; trailing?: boolean | undefined; } | undefined) => (...payload: any[]) => any; closest(el: any, fn: (el: any) => boolean): any; getStyle(dom: any, attr: any): any; delay: (timestamp: number) => Promise; getCursorPosition(): any; getSelectionEnd(): any; setCursorPosition(ctrl: any, pos: any): void; classNames(...cls: (string | IObject | undefined)[]): string; CryptoJS: { encode(word: any, opt?: Partial<{ keyStr: string; mode: any; encodePadding: any; decodePadding: any; }>): any; decode(word: any, opt?: Partial<{ keyStr: string; mode: any; encodePadding: any; decodePadding: any; }>): any; getCryptoJS(): any; }; NGBase64: { encode(data: any, useCryptoJS?: boolean): any; decode(encodedData: string, useCryptoJS?: boolean | "Utf8" | "Utf16" | "Utf16BE" | "Utf16LE"): any; }; setCache(key: string, value: any, option?: { type: "local" | "session"; } | undefined): void; getCache(key: string, option?: boolean | { type?: "local" | "session" | undefined; toObject?: boolean | undefined; }): T_1; removeCache(key: string, option?: { type: "local" | "session"; } | undefined): void; downLoad({ url, filename, blob }: { url?: string | undefined; filename?: string | undefined; blob?: Blob | undefined; }): void; getAbsoluteUrl(url: any): string; debug(param: string | { msg: any; type?: "error" | "log" | "warn" | undefined; }): void; loopChildren(data: any, todo: any, level?: number, count?: number): false | undefined; getObjValue(obj: any, pathKeys: any, nullValue?: any): any; setObjValue(obj: any, pathKeys: any, value: any): void; split(str: any, _split?: string): any; strLen(str: string): number; addAnimationend(el: any, callback: any): () => void; stopPropagation(e: any): void; }; /** * 监听click的前置事件 * @param effect 处理事件,返回false取消事件向下执行 * @param key 监听控件key,相同key情况建议用 containerId.key 的方式区分,containerId为button的容器id * @param options {onlyEvent: boolean, loading:boolean|string} 唯一事件或者加载中的状态,loading为string时表示自定义加载文案 */ type ActionEffectType = (effect: (params: { key: string; args: any[]; containerId: string; [others: string]: any; } & T, preEffect: Function) => PromiseType, keys: string | string[], options?: { onlyEvent?: boolean; loading?: boolean | string; }) => void; export interface IPageCallbackParams { /** * */ subscribe: (callback: Function, eventType: string) => Function; /** * 原子事件处理器,useClick、useBeforeClick等等都是基于此方法扩展 */ useAction: (type: string) => ActionEffectType; /** * 监听click的前置事件 */ useBeforeClick: ActionEffectType<{ instance: IObject; }>; /** * 监听click事件 */ useClick: ActionEffectType<{ instance: IObject; }>; /** * 监听表单字段值变化 */ useValuesChange: ActionEffectType; /** * 监听表格行数据变化 */ useUpdateRow: ActionEffectType; /** * 监听表格字段值变化,目前仅支持pc表格 */ useDataIndexChange: ActionEffectType; /** * 监听表格所有行记录变化 */ useUpdateRows: ActionEffectType; } type PageCallbackType = (page: any, params: IPageCallbackParams, util: typeof baseUtil) => void; declare const emptyFn: Function; type ItemType = Array; declare const baseNG: { getHistory: typeof getHistory; AllReady: (pageCallback: PageCallbackType, listPageCallback?: PageCallbackType | null, delay?: boolean) => void; PageReady: typeof PageReady; registerExternal: typeof registerExternal; updateUI: (uiInfo: IObject[] | Function, config?: IUpdateConfig) => void; updateState: (payload: FO, config?: IUpdateConfig) => void; fastDp: { statusKey: symbol; itemsKey: symbol; updateDevUI: (devUi: { toolbar?: FO; form?: FO; table?: FO; query?: FO; }, config?: IUpdateConfig) => void; toolbar: { updateProps: ({ id, props }: { id: string; props: IObject; }, config?: IUpdateConfig) => void; addItems: ({ id, items, insertIndex }: { id: string; items: ItemType<{ id: string; }>; insertIndex?: number | undefined; }, config?: IUpdateConfig) => void; updateItems: ({ id, items }: { id: string; items: ItemType<{ id: string; }>; }, config?: IUpdateConfig) => void; deleteItems: ({ id, items }: { id: string; items: string[]; }, config?: IUpdateConfig) => void; setItems: ({ id, items }: { id: string; items: TypeOrFn, any[]>; }, config?: IUpdateConfig) => void; }; form: { updateProps: ({ id, props }: { id: string; props: IObject; }, config?: IUpdateConfig) => void; addItems: ({ id, items, insertIndex }: { id: string; items: ItemType<{ name: string; }>; insertIndex?: number | undefined; }, config?: IUpdateConfig) => void; updateItems: ({ id, items }: { id: string; items: ItemType<{ name: string; }>; }, config?: IUpdateConfig) => void; deleteItems: ({ id, items }: { id: string; items: string[]; }, config?: IUpdateConfig) => void; setItems: ({ id, items }: { id: string; items: TypeOrFn, any[]>; }, config?: IUpdateConfig) => void; }; table: { updateProps: ({ id, props }: { id: string; props: IObject; }, config?: IUpdateConfig) => void; addItems: ({ id, items, insertIndex }: { id: string; items: ItemType<{ dataIndex: string; }>; insertIndex?: number | undefined; }, config?: IUpdateConfig) => void; updateItems: ({ id, items }: { id: string; items: ItemType<{ dataIndex: string; }>; }, config?: IUpdateConfig) => void; deleteItems: ({ id, items }: { id: string; items: string[]; }, config?: IUpdateConfig) => void; setItems: ({ id, items }: { id: string; items: TypeOrFn, any[]>; }, config?: IUpdateConfig) => void; }; query: { updateProps: ({ id, props }: { id: string; props: IObject; }, config?: IUpdateConfig) => void; updateItems: ({ id, items }: { id: string; items: ItemType>; }, config?: IUpdateConfig) => void; }; }; batchedUpdates: typeof batchedUpdates; getDispatch(): any; execServer(funcName: string, paramObj: IObject, successCallback?: Function): Promise; external: any; getObserver(): import("./observer").NGObserver; getPageObserver(): import("./observer").NGObserver; getRoot(): string; GetWFrame: () => IObject; isReactElement: (obj: any) => boolean; getHttpUrl(url: string, root?: any): string; request: import("../request").CreateRequest; isRunMaster: boolean; getPageInstance(): any; getCompMap(): any; getPageLang(): any; getPageUI(): any; getPageState(): any; getCmp(id: string): import("../interface").ICurrentObject; getCmpByType(type: string): import("../interface").ICurrentObject; getCmpApi(id: string): any; getComponentRef(id: string): any; getForms(): any; getGrids(): any; compIns: any; query(type: string): any; getUser>(): T; setUser(user?: IObject | undefined): void; isNGFrame: () => boolean; isWebFrame: () => boolean; isReactFrame(): any; alert(content: import("react").ReactNode, others?: IObject): Promise; confirm(content: import("react").ReactNode, others?: IObject): Promise; showLoading(visible?: string | boolean): void; message(msg: string, type?: string): any; isPromise(obj: any): obj is Promise; isArray(arr: any): arr is any[]; isFunction(fn: any): fn is Function; isObject(obj: any): obj is IObject; isNumber(v: any): v is number; isString(str: any): str is string; isBoolean(obj: any): boolean; isDate(date: any): date is Date; isNullOrEmpty(val: any, except?: "" | null | undefined): boolean; toFirstUpperCase(str: string): string; extend: (...args: any[]) => any; assign: (objA: any, objB: any) => any; clearObject: (obj: any) => void; numberPrecision(value: any, precision?: number): number; thousandNumber(value: any, options?: { separator?: string | undefined; includeDecimal?: boolean | undefined; precision?: number | undefined; }): any; uniqueId(key?: string, n?: number): string; deepCopyEx: (obj: any) => any; deepCopy(obj: any, structuredClone?: boolean): any; copyText(text: any): void; deepMerge(objA: any, objB: any): any; getAggregate: (type: any, dataArr: any[], key?: string) => number | "-"; flatArray: (arr: any[], depth?: number) => any; filterTree: (nodes: any, predicate: (node: any) => boolean, { childrenKey, leafKey }?: { childrenKey?: string | undefined; leafKey?: string | undefined; }) => any; groupBy: (dataArr: any[], f: (arg0: any) => any) => any; isPropsEqual(props: any, nextProps: any, config?: { shallow?: boolean | undefined; exclude?: string[] | undefined; }): boolean; isArrayEqual(arr1: any[], arr2: any[]): boolean; firstCase(str: any): any; getValueByPath: (obj: any, path: string) => any; jsonString: (json: any, undefinedValue?: any) => any; parseJson: (jsonStr: any) => any; getBirthDay({ idCard, format }: { idCard: any; format?: string | undefined; }): any; getAge({ idCard, birth, format }: { idCard?: string | undefined; birth?: string | undefined; format?: string | undefined; }): any; strToDate(dateStr: any): Date; formatDate(dateStr: any, format?: string): any; addDate(date: any, count: number, type?: "year" | "month" | "date" | "hours" | "minutes" | "seconds" | "milliseconds", format?: string | undefined): any; regExpTest: (regExp: string | Function, value: any) => any; convertData: (data: any, dataType: import("../interface").ValueTypeEnum, format?: string) => any; getScrollBarInfo(container?: HTMLElement, cache?: boolean): any; getQueryValue(queryName?: string, options?: string | { search?: string | undefined; ignoreCase?: boolean | undefined; decode?: boolean | undefined; cache?: boolean | undefined; } | undefined): any; getCookie(name: any, dv?: any): any; handleData: typeof import("./tool").handleData; handleUrl: typeof import("./tool").handleURL; debounce: (func: any, wait: number, immediate?: boolean | undefined) => (...payload: any[]) => any; throttle: (func: any, wait: number, options?: { leading?: boolean | undefined; trailing?: boolean | undefined; } | undefined) => (...payload: any[]) => any; closest(el: any, fn: (el: any) => boolean): any; getStyle(dom: any, attr: any): any; delay: (timestamp: number) => Promise; getCursorPosition(): any; getSelectionEnd(): any; setCursorPosition(ctrl: any, pos: any): void; classNames(...cls: (string | IObject | undefined)[]): string; CryptoJS: { encode(word: any, opt?: Partial<{ keyStr: string; mode: any; encodePadding: any; decodePadding: any; }>): any; decode(word: any, opt?: Partial<{ keyStr: string; mode: any; encodePadding: any; decodePadding: any; }>): any; getCryptoJS(): any; }; NGBase64: { encode(data: any, useCryptoJS?: boolean): any; decode(encodedData: string, useCryptoJS?: boolean | "Utf8" | "Utf16" | "Utf16BE" | "Utf16LE"): any; }; setCache(key: string, value: any, option?: { type: "local" | "session"; } | undefined): void; getCache(key: string, option?: boolean | { type?: "local" | "session" | undefined; toObject?: boolean | undefined; }): T_1; removeCache(key: string, option?: { type: "local" | "session"; } | undefined): void; downLoad({ url, filename, blob }: { url?: string | undefined; filename?: string | undefined; blob?: Blob | undefined; }): void; getAbsoluteUrl(url: any): string; debug(param: string | { msg: any; type?: "error" | "log" | "warn" | undefined; }): void; loopChildren(data: any, todo: any, level?: number, count?: number): false | undefined; getObjValue(obj: any, pathKeys: any, nullValue?: any): any; setObjValue(obj: any, pathKeys: any, value: any): void; split(str: any, _split?: string): any; strLen(str: string): number; addAnimationend(el: any, callback: any): () => void; stopPropagation(e: any): void; }; type positionType = 'top' | 'right' | 'bottom' | 'left'; declare const borderStyle: (position?: positionType | Array | '', px?: number) => {}; declare const history: import("history-with-query").History; declare function setGlobalVar(key: any, value: any, app?: boolean): void;