import { Instance } from 'mobx-state-tree'; import { Api, fetchOptions, ActionObject } from '../types'; import type { MatchSorterOptions } from 'match-sorter'; interface MatchFunc { (items: any, itemsRaw: any, /** 相关配置 */ options?: { query: Record; columns: any; /** * match-sorter 匹配函数 * @doc https://github.com/kentcdodds/match-sorter */ matchSorter: (items: any[], value: string, options?: MatchSorterOptions) => any[]; }): any; } export declare const CRUDStore: import("mobx-state-tree").IModelType<{ id: import("mobx-state-tree").ISimpleType; path: import("mobx-state-tree").IType; storeType: import("mobx-state-tree").ISimpleType; disposed: import("mobx-state-tree").IType; parentId: import("mobx-state-tree").IType; childrenIds: import("mobx-state-tree").IOptionalIType>, [undefined]>; } & { hasRemoteData: import("mobx-state-tree").IOptionalIType, [undefined]>; data: import("mobx-state-tree").IOptionalIType, [undefined]>; initedAt: import("mobx-state-tree").IType; updatedAt: import("mobx-state-tree").IType; pristine: import("mobx-state-tree").IOptionalIType, [undefined]>; pristineRaw: import("mobx-state-tree").IOptionalIType, [undefined]>; upStreamData: import("mobx-state-tree").IOptionalIType, [undefined]>; action: import("mobx-state-tree").IOptionalIType, [undefined]>; dialogSchema: import("mobx-state-tree").IType; dialogOpen: import("mobx-state-tree").IType; dialogData: import("mobx-state-tree").IOptionalIType, [undefined]>; drawerSchema: import("mobx-state-tree").IType; drawerOpen: import("mobx-state-tree").IType; drawerData: import("mobx-state-tree").IOptionalIType, [undefined]>; } & { msg: import("mobx-state-tree").IType; error: import("mobx-state-tree").IType; fetching: import("mobx-state-tree").IType; saving: import("mobx-state-tree").IType; busying: import("mobx-state-tree").IType; checking: import("mobx-state-tree").IType; initializing: import("mobx-state-tree").IType; schema: import("mobx-state-tree").IOptionalIType, [undefined]>; schemaKey: import("mobx-state-tree").IType; } & { pristineQuery: import("mobx-state-tree").IOptionalIType, [undefined]>; query: import("mobx-state-tree").IOptionalIType, [undefined]>; prevPage: import("mobx-state-tree").IType; page: import("mobx-state-tree").IType; perPage: import("mobx-state-tree").IType; total: import("mobx-state-tree").IType; mode: import("mobx-state-tree").IType; hasNext: import("mobx-state-tree").IType; selectedAction: import("mobx-state-tree").IType; columns: import("mobx-state-tree").IType; items: import("mobx-state-tree").IOptionalIType>, [undefined]>; selectedItems: import("mobx-state-tree").IOptionalIType>, [undefined]>; unSelectedItems: import("mobx-state-tree").IOptionalIType>, [undefined]>; filterTogglable: import("mobx-state-tree").IType; filterVisible: import("mobx-state-tree").IType; hasInnerModalOpen: import("mobx-state-tree").IType; }, { readonly parentStore: any; readonly __: any; readonly hasChildren: boolean; readonly children: any[]; } & { onChildStoreDispose(child: any): void; syncProps(props: any, prevProps: any, list?: string[]): void; dispose: (callback?: (() => void) | undefined) => void; addChildId: (id: string) => void; removeChildId: (id: string) => void; } & { getValueByName(name: string, canAccessSuper?: boolean): any; getPristineValueByName(name: string): any; readonly pristineDiff: any; } & { setTopStore(value: any): void; initData(data?: object, skipSetPristine?: boolean, changeReason?: import("../types").DataChangeReason | undefined): void; temporaryUpdateGlobalVars(globalVar: any): void; unDoTemporaryUpdateGlobalVars(): void; reset(): void; updateData(data?: object, tag?: object | undefined, replace?: boolean | undefined, concatFields?: string | string[] | undefined, changeReason?: import("../types").DataChangeReason | undefined): void; changeValue(name: string, value: any, changePristine?: boolean | undefined, force?: boolean | undefined, otherModifier?: ((data: Object) => void) | undefined, changeReason?: import("../types").DataChangeReason | undefined): void; setCurrentAction(action: any, resolveDefinitions?: ((schema: any) => any) | undefined): void; openDialog(ctx: any, additonal?: object | undefined, callback?: ((confirmed: boolean, values: any) => void) | undefined, scoped?: import("..").IScopedContext | undefined): void; closeDialog(confirmed?: any, data?: any): void; openDrawer(ctx: any, additonal?: object | undefined, callback?: ((confirmed: boolean, ret: any) => void) | undefined, scoped?: import("..").IScopedContext | undefined): void; closeDrawer(confirmed?: any, data?: any): void; getDialogScoped(): import("..").IScopedContext | null; getDrawerScoped(): import("..").IScopedContext | null; } & { readonly loading: boolean; } & { markFetching: (fetching?: boolean) => void; markSaving: (saving?: boolean) => void; markBusying: (busying?: boolean) => void; fetchInitData: (api: Api, data?: object | undefined, options?: fetchOptions | undefined) => Promise; fetchData: (api: Api, data?: object | undefined, options?: fetchOptions | undefined) => Promise; reInitData: (data: object | undefined, replace?: boolean, concatFields?: string | string[] | undefined) => void; updateMessage: (msg?: string | undefined, error?: boolean) => void; clearMessage: () => void; setHasRemoteData: () => void; saveRemote: (api: Api, data?: object | undefined, options?: fetchOptions | undefined) => Promise; fetchSchema: (api: Api, data?: object | undefined, options?: fetchOptions | undefined) => Promise; checkRemote: (api: Api, data?: object | undefined, options?: fetchOptions | undefined) => Promise; } & { readonly lastPage: number; readonly filterData: object; readonly toolbarData: object; readonly mergedData: any; readonly hasModalOpened: boolean; readonly selectedItemsAsArray: any[]; readonly itemsAsArray: any[]; fetchCtxOf(data: any, options: { pageField?: string; perPageField?: string; }): object; readonly eventContext: { items: any[]; selectedItems: any[]; unSelectedItems: any[]; selectedIndexes: string[]; }; readonly offset: number; } & { getData: (superData: any) => any; updateSelectData: (selected: Array, unSelected: Array) => void; setPristineQuery: () => void; updateQuery: (values: object, updater?: Function, pageField?: string, perPageField?: string, replace?: boolean) => void; fetchInitData: (api: Api, data?: object, options?: fetchOptions & { forceReload?: boolean; loadDataOnce?: boolean; source?: string; loadDataMode?: boolean; syncResponse2Query?: boolean; columns?: Array; matchFunc?: MatchFunc; filterOnAllColumns?: boolean; isTable2?: Boolean; minLoadingTime?: number; dataAppendTo?: 'top' | 'bottom'; totalField?: string; }) => Promise; changePage: (page: number | string, perPage?: number | string) => void; changePerPage: (perPage: number | string) => void; selectAction: (action: ActionObject) => void; saveRemote: (api: Api, data?: object, options?: fetchOptions) => Promise; setFilterTogglable: (togglable: boolean, filterVisible?: boolean) => void; setFilterVisible: (visible: boolean) => void; setSelectedItems: (items: Array) => void; setUnSelectedItems: (items: Array) => void; setInnerModalOpened: (value: boolean) => void; initFromScope: (scope: any, source: string, options: { columns?: Array; matchFunc?: MatchFunc | null; totalField?: string; }) => void; exportAsCSV: (options?: { loadDataOnce?: boolean | undefined; api?: Api | undefined; data?: any; filename?: string | undefined; pageField?: string | undefined; perPageField?: string | undefined; }) => Promise; updateColumns: (columns: Array) => void; updateTotal: (total: number) => void; resetSelection: () => void; replaceItems(items: Array): void; }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>; export type ICRUDStore = Instance; export {};