declare type Subscriber = (payload: S) => void; interface Subscription { notify?: (payload: S) => void | boolean; filter?: (payload: S) => any; } interface INode { type?: string; after?: Node; depth?: number; } declare type Node = IdentifierNode | WildcardOperatorNode | GroupExpressionNode | RangeExpressionNode | DestructorExpressionNode | ObjectPatternNode | ArrayPatternNode | DotOperatorNode | ExpandOperatorNode | INode; declare type IdentifierNode = { type: 'Identifier'; value: string; arrayIndex?: boolean; } & INode; declare type DotOperatorNode = { type: 'DotOperator'; } & INode; declare type WildcardOperatorNode = { type: 'WildcardOperator'; filter?: GroupExpressionNode | RangeExpressionNode; optional?: boolean; } & INode; declare type ExpandOperatorNode = { type: 'ExpandOperator'; } & INode; declare type GroupExpressionNode = { type: 'GroupExpression'; value: Node[]; isExclude?: boolean; } & INode; declare type RangeExpressionNode = { type: 'RangeExpression'; start?: IdentifierNode; end?: IdentifierNode; } & INode; declare type DestructorExpressionNode = { type: 'DestructorExpression'; value?: ObjectPatternNode | ArrayPatternNode; source?: string; } & INode; declare type ObjectPatternNode = { type: 'ObjectPattern'; properties: ObjectPatternPropertyNode[]; } & INode; declare type ObjectPatternPropertyNode = { type: 'ObjectPatternProperty'; key: IdentifierNode; value?: ObjectPatternNode[] | ArrayPatternNode[] | IdentifierNode; } & INode; declare type ArrayPatternNode = { type: 'ArrayPattern'; elements: ObjectPatternNode[] | ArrayPatternNode[] | IdentifierNode[]; } & INode; declare type MatcherFunction = ((path: Segments) => boolean) & { path: Path; }; declare type Pattern = string | number | Path | Segments | MatcherFunction | RegExp; declare type Segments = Array; declare class Path { entire: string | RegExp; segments: Segments; isMatchPattern: boolean; isWildMatchPattern: boolean; isRegExp: boolean; haveRelativePattern: boolean; haveExcludePattern: boolean; matchScore: number; tree: Node; private matchCache; private includesCache; constructor(input: Pattern, base?: Pattern); toString(): string; toArr(): (string | number)[]; get length(): number; concat: (...args: Pattern[]) => Path; slice: (start?: number, end?: number) => Path; push: (...items: Pattern[]) => Path; pop: () => Path; splice: (start: number, deleteCount?: number, ...items: Array) => Path; forEach: (callback: (key: string | number) => any) => void; map: (callback: (key: string | number) => any) => any[]; reduce: (callback: (buf: T, item: string | number, index: number) => T, initial: T) => T; parent: () => Path; includes: (pattern: Pattern) => any; transform: (regexp: string | RegExp, callback: (...args: string[]) => T) => string | T; match: (pattern: Pattern) => boolean; matchAliasGroup: (name: Pattern, alias: Pattern) => boolean; existIn: (source?: any, start?: number | Path) => any; getIn: (source?: any) => any; setIn: (source?: any, value?: any) => any; deleteIn: (source?: any) => any; ensureIn: (source?: any, defaults?: any) => any; static match(pattern: Pattern): { (target: any): boolean; path: Path; }; static isPathPattern(target: any): target is Pattern; static transform(pattern: Pattern, regexp: string | RegExp, callback: (...args: string[]) => T): any; static parse(path?: Pattern, base?: Pattern): Path; static getIn: (source: any, pattern: Pattern) => any; static setIn: (source: any, pattern: Pattern, value: any) => any; static deleteIn: (source: any, pattern: Pattern) => any; static existIn: (source: any, pattern: Pattern, start?: number | Path) => any; static ensureIn: (source: any, pattern: Pattern, defaultValue?: any) => any; } declare class Subscribable { subscribers: { index?: number; [key: number]: Subscriber; }; subscription: Subscription; subscribe: (callback?: Subscriber) => number; unsubscribe: (index?: number) => void; notify: (payload?: Payload, silent?: boolean) => void; } declare type ValidatorFormats = 'url' | 'email' | 'ipv6' | 'ipv4' | 'number' | 'integer' | 'idcard' | 'qq' | 'phone' | 'money' | 'zh' | 'date' | 'zip' | (string & {}); interface IValidateResult { type: 'error' | 'warning' | 'success' | (string & {}); message: string; } declare type ValidatorFunctionResponse = null | string | boolean | IValidateResult; declare type ValidatorFunction = (value: any, rule: IValidatorRules, ctx: Context, render: (message: string, scope?: any) => string) => ValidatorFunctionResponse | Promise | null; declare type ValidatorTriggerType = 'onInput' | 'onFocus' | 'onBlur' | (string & {}); interface IValidatorRules { triggerType?: ValidatorTriggerType; format?: ValidatorFormats; validator?: ValidatorFunction; required?: boolean; pattern?: RegExp | string; max?: number; maximum?: number; maxItems?: number; minItems?: number; maxLength?: number; minLength?: number; exclusiveMaximum?: number; exclusiveMinimum?: number; minimum?: number; min?: number; len?: number; whitespace?: boolean; enum?: any[]; const?: any; multipleOf?: number; uniqueItems?: boolean; maxProperties?: number; minProperties?: number; message?: string; [key: string]: any; } declare type ValidatorDescription = ValidatorFormats | ValidatorFunction | IValidatorRules; declare type MultiValidator = ValidatorDescription[]; declare type Validator = ValidatorDescription | MultiValidator; declare type NonFunctionPropertyNames = { [K in keyof T]: T[K] extends (...args: any) => any ? never : K; }[keyof T]; declare type JSXComponent = any; declare type LifeCycleHandler = (payload: T, context: any) => void; declare enum LifeCycleTypes { /** * Form LifeCycle **/ ON_FORM_INIT = "onFormInit", ON_FORM_MOUNT = "onFormMount", ON_FORM_UNMOUNT = "onFormUnmount", ON_FORM_INPUT_CHANGE = "onFormInputChange", ON_FORM_VALUES_CHANGE = "onFormValuesChange", ON_FORM_INITIAL_VALUES_CHANGE = "onFormInitialValuesChange", ON_FORM_SUBMIT = "onFormSubmit", ON_FORM_RESET = "onFormReset", ON_FORM_SUBMIT_START = "onFormSubmitStart", ON_FORM_SUBMITTING = "onFormSubmitting", ON_FORM_SUBMIT_END = "onFormSubmitEnd", ON_FORM_SUBMIT_VALIDATE_START = "onFormSubmitValidateStart", ON_FORM_SUBMIT_VALIDATE_SUCCESS = "onFormSubmitValidateSuccess", ON_FORM_SUBMIT_VALIDATE_FAILED = "onFormSubmitValidateFailed", ON_FORM_SUBMIT_VALIDATE_END = "onFormSubmitValidateEnd", ON_FORM_SUBMIT_SUCCESS = "onFormSubmitSuccess", ON_FORM_SUBMIT_FAILED = "onFormSubmitFailed", ON_FORM_VALIDATE_START = "onFormValidateStart", ON_FORM_VALIDATING = "onFormValidating", ON_FORM_VALIDATE_SUCCESS = "onFormValidateSuccess", ON_FORM_VALIDATE_FAILED = "onFormValidateFailed", ON_FORM_VALIDATE_END = "onFormValidateEnd", ON_FORM_GRAPH_CHANGE = "onFormGraphChange", ON_FORM_LOADING = "onFormLoading", /** * Field LifeCycle **/ ON_FIELD_INIT = "onFieldInit", ON_FIELD_INPUT_VALUE_CHANGE = "onFieldInputValueChange", ON_FIELD_VALUE_CHANGE = "onFieldValueChange", ON_FIELD_INITIAL_VALUE_CHANGE = "onFieldInitialValueChange", ON_FIELD_SUBMIT = "onFieldSubmit", ON_FIELD_SUBMIT_START = "onFieldSubmitStart", ON_FIELD_SUBMITTING = "onFieldSubmitting", ON_FIELD_SUBMIT_END = "onFieldSubmitEnd", ON_FIELD_SUBMIT_VALIDATE_START = "onFieldSubmitValidateStart", ON_FIELD_SUBMIT_VALIDATE_SUCCESS = "onFieldSubmitValidateSuccess", ON_FIELD_SUBMIT_VALIDATE_FAILED = "onFieldSubmitValidateFailed", ON_FIELD_SUBMIT_VALIDATE_END = "onFieldSubmitValidateEnd", ON_FIELD_SUBMIT_SUCCESS = "onFieldSubmitSuccess", ON_FIELD_SUBMIT_FAILED = "onFieldSubmitFailed", ON_FIELD_VALIDATE_START = "onFieldValidateStart", ON_FIELD_VALIDATING = "onFieldValidating", ON_FIELD_VALIDATE_SUCCESS = "onFieldValidateSuccess", ON_FIELD_VALIDATE_FAILED = "onFieldValidateFailed", ON_FIELD_VALIDATE_END = "onFieldValidateEnd", ON_FIELD_LOADING = "onFieldLoading", ON_FIELD_RESET = "onFieldReset", ON_FIELD_MOUNT = "onFieldMount", ON_FIELD_UNMOUNT = "onFieldUnmount" } declare type HeartSubscriber = ({ type, payload, }: { type: string; payload: any; }) => void; interface IHeartProps { lifecycles?: LifeCycle[]; context?: Context; } interface IFieldFeedback { triggerType?: FieldFeedbackTriggerTypes; type?: FieldFeedbackTypes; code?: FieldFeedbackCodeTypes; messages?: FeedbackMessage; } declare type IFormFeedback = IFieldFeedback & { path?: string; address?: string; }; interface ISearchFeedback { triggerType?: FieldFeedbackTriggerTypes; type?: FieldFeedbackTypes; code?: FieldFeedbackCodeTypes; address?: FormPathPattern; path?: FormPathPattern; messages?: FeedbackMessage; } declare type FeedbackMessage = any[]; declare type IFieldUpdate = { pattern: Path; callbacks: ((...args: any[]) => any)[]; }; interface IFormRequests { validate?: number; submit?: number; loading?: number; updates?: IFieldUpdate[]; updateIndexes?: Record; } declare type IFormFields = Record; declare type FieldFeedbackTypes = 'error' | 'success' | 'warning'; declare type FieldFeedbackTriggerTypes = ValidatorTriggerType; declare type FieldFeedbackCodeTypes = 'ValidateError' | 'ValidateSuccess' | 'ValidateWarning' | 'EffectError' | 'EffectSuccess' | 'EffectWarning' | (string & {}); declare type FormPatternTypes = 'editable' | 'readOnly' | 'disabled' | 'readPretty' | ({} & string); declare type FormDisplayTypes = 'none' | 'hidden' | 'visible' | ({} & string); declare type FormPathPattern = string | number | Array | Path | RegExp | (((address: Array) => boolean) & { path: Path; }); declare type OmitState

= Omit; declare type IFieldState = Partial>>>>; declare type IVoidFieldState = Partial>>>>; declare type IFormState = any> = Pick, NonFunctionPropertyNames>>>; declare type IFormGraph = Record; interface IFormProps { values?: Partial; initialValues?: Partial; pattern?: FormPatternTypes; display?: FormDisplayTypes; hidden?: boolean; visible?: boolean; editable?: boolean; disabled?: boolean; readOnly?: boolean; readPretty?: boolean; effects?: (form: Form) => void; validateFirst?: boolean; validatePattern?: FormPatternTypes[]; validateDisplay?: FormDisplayTypes[]; designable?: boolean; } declare type IFormMergeStrategy = 'overwrite' | 'merge' | 'deepMerge' | 'shallowMerge'; interface IFieldFactoryProps extends IFieldProps { name: FormPathPattern; basePath?: FormPathPattern; } interface IVoidFieldFactoryProps extends IVoidFieldProps { name: FormPathPattern; basePath?: FormPathPattern; } interface IFieldRequests { validate?: number; submit?: number; loading?: number; batch?: () => void; } interface IFieldCaches { value?: any; initialValue?: any; inputting?: boolean; } declare type FieldDisplayTypes = 'none' | 'hidden' | 'visible' | ({} & string); declare type FieldPatternTypes = 'editable' | 'readOnly' | 'disabled' | 'readPretty' | ({} & string); declare type FieldValidatorContext = IValidatorRules & { field?: Field; form?: Form; value?: any; }; declare type FieldValidator = Validator; declare type FieldDataSource = { label?: any; value?: any; title?: any; key?: any; text?: any; children?: FieldDataSource; [key: string]: any; }[]; declare type FieldComponent = [Component] | [Component, ComponentProps] | boolean | any[]; declare type FieldDecorator = [Decorator] | [Decorator, ComponentProps] | boolean | any[]; declare type FieldReaction = (field: Field) => void; interface IFieldProps { name: FormPathPattern; basePath?: FormPathPattern; title?: TextType; description?: TextType; value?: ValueType; initialValue?: ValueType; required?: boolean; display?: FieldDisplayTypes; pattern?: FieldPatternTypes; hidden?: boolean; visible?: boolean; editable?: boolean; disabled?: boolean; readOnly?: boolean; readPretty?: boolean; dataSource?: FieldDataSource; validateFirst?: boolean; validatePattern?: FieldPatternTypes[]; validateDisplay?: FieldDisplayTypes[]; validator?: FieldValidator; decorator?: FieldDecorator; component?: FieldComponent; reactions?: FieldReaction[] | FieldReaction; content?: any; data?: any; } interface IVoidFieldProps { name: FormPathPattern; basePath?: FormPathPattern; title?: TextType; description?: TextType; display?: FieldDisplayTypes; pattern?: FieldPatternTypes; hidden?: boolean; visible?: boolean; editable?: boolean; disabled?: boolean; readOnly?: boolean; readPretty?: boolean; decorator?: FieldDecorator; component?: FieldComponent; reactions?: FieldReaction[] | FieldReaction; content?: any; data?: any; } interface IFieldResetOptions { forceClear?: boolean; validate?: boolean; } declare type IGeneralFieldState = IFieldState & IVoidFieldState; declare type GeneralField = Field | VoidField | ArrayField | ObjectField; interface IQueryProps { pattern: FormPathPattern; base: FormPathPattern; form: Form; } interface IModelSetter

{ (setter: (state: P) => void): void; (setter: Partial

): void; (): void; } interface IModelGetter

{ any>(getter: Getter): ReturnType; (): P; } declare type FieldMatchPattern = FormPathPattern | Query | GeneralField; interface IFieldStateSetter { (pattern: FieldMatchPattern, setter: (state: IFieldState) => void): void; (pattern: FieldMatchPattern, setter: Partial): void; } interface IFieldStateGetter { any>(pattern: FieldMatchPattern, getter: Getter): ReturnType; (pattern: FieldMatchPattern): IGeneralFieldState; } interface IFieldActions { [key: string]: (...args: any[]) => any; } declare type LifeCycleParams = Array | { [key: string]: LifeCycleHandler; }>; declare class LifeCycle { private listener; constructor(...params: LifeCycleParams); buildListener: (params: any[]) => (payload: { type: string; payload: Payload; }, ctx: any) => void; notify: (type: any, payload?: Payload_1, ctx?: any) => void; } declare class Heart extends Subscribable { lifecycles: LifeCycle[]; outerLifecycles: Map[]>; context: Context; constructor({ lifecycles, context }?: IHeartProps); buildLifeCycles: (lifecycles: LifeCycle[]) => any; addLifeCycles: (id: any, lifecycles?: LifeCycle[]) => void; hasLifeCycles: (id: any) => boolean; removeLifeCycles: (id: any) => void; setLifeCycles: (lifecycles?: LifeCycle[]) => void; publish: (type: any, payload?: P, context?: C) => void; clear: () => void; } declare class Query { private pattern; private addresses; private form; constructor(props: IQueryProps); take(): GeneralField | undefined; take(getter: (field: GeneralField, address: Path) => Result): Result; map(): GeneralField[]; map(iterator?: (field: GeneralField, address: Path) => Result): Result[]; forEach(iterator: (field: GeneralField, address: Path) => Result): void; reduce(reducer: (value: Result, field: GeneralField, address: Path) => Result, initial?: Result): Result; get(key: K): IGeneralFieldState[K]; getIn(pattern?: Pattern): any; value(): any; initialValue(): any; } declare class BaseField { title: TextType; description: TextType; selfDisplay: FieldDisplayTypes; selfPattern: FieldPatternTypes; initialized: boolean; mounted: boolean; unmounted: boolean; content: any; data: any; decoratorType: Decorator; decoratorProps: Record; componentType: Component; componentProps: Record; designable: boolean; address: Path; path: Path; form: Form; disposers: (() => void)[]; actions: IFieldActions; locate(address: Pattern): void; get indexes(): number[]; get index(): number; get records(): any[]; get record(): any; get component(): FieldComponent; set component(value: FieldComponent); get decorator(): FieldDecorator; set decorator(value: FieldDecorator); get parent(): GeneralField; get display(): FieldDisplayTypes; get pattern(): FieldPatternTypes; get editable(): boolean; get disabled(): boolean; get readOnly(): boolean; get readPretty(): boolean; get hidden(): boolean; get visible(): boolean; get destroyed(): boolean; set hidden(hidden: boolean); set visible(visible: boolean); set editable(editable: boolean); set readOnly(readOnly: boolean); set disabled(disabled: boolean); set readPretty(readPretty: boolean); set pattern(pattern: FieldPatternTypes); set display(display: FieldDisplayTypes); setTitle: (title?: TextType) => void; setDescription: (description?: TextType) => void; setDisplay: (type?: FieldDisplayTypes) => void; setPattern: (type?: FieldPatternTypes) => void; setComponent: (component?: C, props?: ComponentProps) => void; setComponentProps: (props?: ComponentProps) => void; setDecorator: (component?: D, props?: ComponentProps) => void; setDecoratorProps: (props?: ComponentProps) => void; setData: (data: any) => void; setContent: (content: any) => void; onInit: () => void; onMount: () => void; onUnmount: () => void; query: (pattern: Pattern | RegExp) => Query; notify: (type: LifeCycleTypes, payload?: any) => void; dispose: () => void; destroy: (forceClear?: boolean) => void; match: (pattern: Pattern) => boolean; inject: (actions: IFieldActions) => void; invoke: (name: string, ...args: any[]) => any; } declare class Field extends BaseField { displayName: string; props: IFieldProps; loading: boolean; validating: boolean; submitting: boolean; active: boolean; visited: boolean; selfModified: boolean; modified: boolean; inputValue: ValueType; inputValues: any[]; dataSource: FieldDataSource; validator: FieldValidator; feedbacks: IFieldFeedback[]; caches: IFieldCaches; requests: IFieldRequests; constructor(address: Pattern, props: IFieldProps, form: Form, designable: boolean); protected initialize(): void; protected makeObservable(): void; protected makeReactive(): void; get selfErrors(): FeedbackMessage; get errors(): IFormFeedback[]; get selfWarnings(): FeedbackMessage; get warnings(): IFormFeedback[]; get selfSuccesses(): FeedbackMessage; get successes(): IFormFeedback[]; get selfValid(): boolean; get valid(): boolean; get selfInvalid(): boolean; get invalid(): boolean; get value(): ValueType; get initialValue(): ValueType; get required(): boolean; get validateStatus(): "validating" | "error" | "warning" | "success"; set required(required: boolean); set value(value: ValueType); set initialValue(initialValue: ValueType); set selfErrors(messages: FeedbackMessage); set selfWarnings(messages: FeedbackMessage); set selfSuccesses(messages: FeedbackMessage); setDataSource: (dataSource?: FieldDataSource) => void; setFeedback: (feedback?: IFieldFeedback) => void; setSelfErrors: (messages?: FeedbackMessage) => void; setSelfWarnings: (messages?: FeedbackMessage) => void; setSelfSuccesses: (messages?: FeedbackMessage) => void; setValidator: (validator?: FieldValidator) => void; setValidatorRule: (name: string, value: any) => void; setRequired: (required?: boolean) => void; setValue: (value?: ValueType) => void; setInitialValue: (initialValue?: ValueType) => void; setLoading: (loading?: boolean) => void; setValidating: (validating?: boolean) => void; setSubmitting: (submitting?: boolean) => void; setState: IModelSetter; getState: IModelGetter; onInput: (...args: any[]) => Promise; onFocus: (...args: any[]) => Promise; onBlur: (...args: any[]) => Promise; validate: (triggerType?: ValidatorTriggerType) => any; submit: (onSubmit?: (values: any) => void | Promise) => Promise; reset: (options?: IFieldResetOptions) => Promise; queryFeedbacks: (search?: ISearchFeedback) => IFieldFeedback[]; modify: () => void; } declare class ArrayField extends Field { displayName: string; constructor(address: FormPathPattern, props: IFieldProps, form: Form, designable: boolean); protected makeAutoCleanable(): void; push: (...items: any[]) => Promise; pop: () => Promise; insert: (index: number, ...items: any[]) => Promise; remove: (index: number) => Promise; shift: () => Promise; unshift: (...items: any[]) => Promise; move: (fromIndex: number, toIndex: number) => Promise; moveUp: (index: number) => Promise; moveDown: (index: number) => Promise; } declare class ObjectField extends Field> { displayName: string; private additionalProperties; constructor(address: FormPathPattern, props: IFieldProps, form: Form, designable: boolean); protected makeAutoCleanable(): void; addProperty: (key: string, value: any) => Promise; removeProperty: (key: string) => Promise; existProperty: (key: string) => any; } declare class VoidField extends BaseField { displayName: 'VoidField'; props: IVoidFieldProps; constructor(address: Pattern, props: IVoidFieldProps, form: Form, designable: boolean); protected initialize(): void; protected makeObservable(): void; protected makeReactive(): void; setState: IModelSetter; getState: IModelGetter; } declare class Form { displayName: string; id: string; initialized: boolean; validating: boolean; submitting: boolean; loading: boolean; modified: boolean; pattern: FormPatternTypes; display: FormDisplayTypes; values: ValueType; initialValues: ValueType; mounted: boolean; unmounted: boolean; props: IFormProps; heart: Heart; graph: Graph; fields: IFormFields; requests: IFormRequests; indexes: Record; disposers: (() => void)[]; constructor(props: IFormProps); protected initialize(props: IFormProps): void; protected makeValues(): void; protected makeObservable(): void; protected makeReactive(): void; get valid(): boolean; get invalid(): boolean; get errors(): IFormFeedback[]; get warnings(): IFormFeedback[]; get successes(): IFormFeedback[]; get lifecycles(): LifeCycle[]; get hidden(): boolean; get visible(): boolean; set hidden(hidden: boolean); set visible(visible: boolean); get editable(): boolean; set editable(editable: boolean); get readOnly(): boolean; set readOnly(readOnly: boolean); get disabled(): boolean; set disabled(disabled: boolean); get readPretty(): boolean; set readPretty(readPretty: boolean); /** 创建字段 **/ createField: (props: IFieldFactoryProps) => Field; createArrayField: (props: IFieldFactoryProps) => ArrayField; createObjectField: (props: IFieldFactoryProps) => ObjectField; createVoidField: (props: IVoidFieldFactoryProps) => VoidField; /** 状态操作模型 **/ setValues: (values: any, strategy?: IFormMergeStrategy) => void; setInitialValues: (initialValues: any, strategy?: IFormMergeStrategy) => void; setValuesIn: (pattern: Pattern, value: any) => void; deleteValuesIn: (pattern: Pattern) => void; existValuesIn: (pattern: Pattern) => any; getValuesIn: (pattern: Pattern) => any; setInitialValuesIn: (pattern: Pattern, initialValue: any) => void; deleteInitialValuesIn: (pattern: Pattern) => void; existInitialValuesIn: (pattern: Pattern) => any; getInitialValuesIn: (pattern: Pattern) => any; setLoading: (loading: boolean) => void; setSubmitting: (submitting: boolean) => void; setValidating: (validating: boolean) => void; setDisplay: (display: FormDisplayTypes) => void; setPattern: (pattern: FormPatternTypes) => void; addEffects: (id: any, effects: IFormProps['effects']) => void; removeEffects: (id: any) => void; setEffects: (effects: IFormProps['effects']) => void; clearErrors: (pattern?: Pattern) => void; clearWarnings: (pattern?: Pattern) => void; clearSuccesses: (pattern?: Pattern) => void; query: (pattern: Pattern) => Query; queryFeedbacks: (search: ISearchFeedback) => IFormFeedback[]; notify: (type: string, payload?: any) => void; subscribe: (subscriber?: HeartSubscriber) => number; unsubscribe: (id: number) => void; /**事件钩子**/ onInit: () => void; onMount: () => void; onUnmount: () => void; setState: IModelSetter>; getState: IModelGetter>; setFormState: IModelSetter>; getFormState: IModelGetter>; setFieldState: IFieldStateSetter; getFieldState: IFieldStateGetter; getFormGraph: () => IFormGraph; setFormGraph: (graph: IFormGraph) => void; clearFormGraph: (pattern?: Pattern, forceClear?: boolean) => void; validate: (pattern?: Pattern) => any; submit: (onSubmit?: (values: ValueType) => void | Promise) => Promise; reset: (pattern?: Pattern, options?: IFieldResetOptions) => Promise; } declare class Graph { form: Form; constructor(form: Form); getGraph: () => IFormGraph; setGraph: (graph: IFormGraph) => void; } declare type SchemaEnum = Array; declare type SchemaTypes = 'string' | 'object' | 'array' | 'number' | 'boolean' | 'void' | 'date' | 'datetime' | (string & {}); declare type SchemaProperties = Record>; declare type SchemaPatch = (schema: ISchema) => ISchema; declare type SchemaKey = string | number; declare type SchemaEffectTypes = 'onFieldInit' | 'onFieldMount' | 'onFieldUnmount' | 'onFieldValueChange' | 'onFieldInputValueChange' | 'onFieldInitialValueChange' | 'onFieldValidateStart' | 'onFieldValidateEnd' | 'onFieldValidateFailed' | 'onFieldValidateSuccess'; declare type SchemaReaction = { dependencies?: Array | Record; when?: string | boolean; target?: string; effects?: (SchemaEffectTypes | (string & {}))[]; fulfill?: { state?: Stringify; schema?: ISchema; run?: string; }; otherwise?: { state?: Stringify; schema?: ISchema; run?: string; }; [key: string]: any; } | ((field: Field, scope: IScopeContext) => void); declare type SchemaReactions = SchemaReaction | SchemaReaction[]; declare type SchemaItems = ISchema | ISchema[]; declare type SchemaComponents = Record; interface ISchemaFieldUpdateRequest { state?: Stringify; schema?: ISchema; run?: string; } interface IScopeContext { [key: string]: any; } interface IFieldStateSetterOptions { field: GeneralField; target?: FormPathPattern; request: ISchemaFieldUpdateRequest; runner?: string; scope?: IScopeContext; } interface ISchemaTransformerOptions { scope?: IScopeContext; } declare type Slot = { target: string; isRenderProp?: boolean; }; declare type Stringify

= { [key in keyof P]?: P[key] | (string & {}); }; declare type ISchema = Stringify<{ version?: string; name?: SchemaKey; title?: Message; description?: Message; default?: any; readOnly?: boolean; writeOnly?: boolean; type?: SchemaTypes; enum?: SchemaEnum; const?: any; multipleOf?: number; maximum?: number; exclusiveMaximum?: number; minimum?: number; exclusiveMinimum?: number; maxLength?: number; minLength?: number; pattern?: string | RegExp; maxItems?: number; minItems?: number; uniqueItems?: boolean; maxProperties?: number; minProperties?: number; required?: string[] | boolean | string; format?: string; $ref?: string; $namespace?: string; /** nested json schema spec **/ definitions?: SchemaProperties; properties?: SchemaProperties; items?: SchemaItems; additionalItems?: ISchema; patternProperties?: SchemaProperties; additionalProperties?: ISchema; ['x-value']?: any; ['x-index']?: number; ['x-pattern']?: Pattern; ['x-display']?: Display; ['x-validator']?: Validator; ['x-decorator']?: Decorator | (string & {}) | ((...args: any[]) => any); ['x-decorator-props']?: DecoratorProps; ['x-component']?: Component | (string & {}) | ((...args: any[]) => any); ['x-component-props']?: ComponentProps; ['x-reactions']?: SchemaReactions; ['x-content']?: any; ['x-data']?: any; ['x-visible']?: boolean; ['x-hidden']?: boolean; ['x-disabled']?: boolean; ['x-editable']?: boolean; ['x-read-only']?: boolean; ['x-read-pretty']?: boolean; ['x-compile-omitted']?: string[]; [key: `x-${string | number}` | symbol]: any; }>; declare class Schema implements ISchema { parent?: Schema; root?: Schema; name?: SchemaKey; title?: Message; description?: Message; default?: any; readOnly?: boolean; writeOnly?: boolean; type?: SchemaTypes; enum?: SchemaEnum; const?: any; multipleOf?: number; maximum?: number; exclusiveMaximum?: number; minimum?: number; exclusiveMinimum?: number; maxLength?: number; minLength?: number; pattern?: string | RegExp; maxItems?: number; minItems?: number; uniqueItems?: boolean; maxProperties?: number; minProperties?: number; required?: string[] | boolean | string; format?: string; /** nested json schema spec **/ definitions?: Record>; properties?: Record>; items?: Schema | Schema[]; additionalItems?: Schema; patternProperties?: Record>; additionalProperties?: Schema; ['x-index']?: number; ['x-pattern']?: Pattern; ['x-display']?: Display; ['x-validator']?: Validator; ['x-decorator']?: Decorator; ['x-decorator-props']?: DecoratorProps; ['x-component']?: Component; ['x-component-props']?: ComponentProps; ['x-reactions']?: SchemaReaction[]; ['x-content']?: any; ['x-data']?: any; ['x-visible']?: boolean; ['x-hidden']?: boolean; ['x-disabled']?: boolean; ['x-editable']?: boolean; ['x-read-only']?: boolean; ['x-read-pretty']?: boolean; ['x-compile-omitted']?: string[]; ['x-slot-node']?: Slot; [key: `x-${string | number}` | symbol]: any; _isJSONSchemaObject: boolean; version: string; constructor(json: ISchema, parent?: Schema); addProperty: (key: SchemaKey, schema: ISchema) => Schema; removeProperty: (key: SchemaKey) => Schema; setProperties: (properties: SchemaProperties) => this; addPatternProperty: (key: SchemaKey, schema: ISchema) => Schema; removePatternProperty: (key: SchemaKey) => Schema; setPatternProperties: (properties: SchemaProperties) => this; setAdditionalProperties: (properties: ISchema) => Schema; setItems: (schema: ISchema | ISchema[]) => Schema | Schema[]; setAdditionalItems: (items: ISchema) => Schema; findDefinitions: (ref: string) => any; mapProperties: (callback?: (schema: Schema, key: SchemaKey, index: number) => T) => T[]; mapPatternProperties: (callback?: (schema: Schema, key: SchemaKey, index: number) => T) => T[]; reduceProperties: (callback?: (buffer: P, schema: Schema, key: SchemaKey, index: number) => R, predicate?: P) => R; reducePatternProperties: (callback?: (buffer: P, schema: Schema, key: SchemaKey, index: number) => R, predicate?: P) => R; compile: (scope?: any) => Schema; fromJSON: (json: ISchema) => Schema; toJSON: (recursion?: boolean) => ISchema; toFieldProps: (options?: ISchemaTransformerOptions) => IFieldFactoryProps; static getOrderProperties: (schema?: ISchema, propertiesName?: keyof ISchema) => any[]; static compile: (expression: any, scope?: any) => any; static shallowCompile: (expression: any, scope?: any) => any; static isSchemaInstance: (value: any) => value is Schema; static registerCompiler: (compiler: (expression: string, scope: any) => any) => void; static registerPatches: (...args: SchemaPatch[]) => void; static registerVoidComponents: (components: string[]) => void; static registerTypeDefaultComponents: (maps: Record) => void; static registerPolyfills: (version: string, patch: SchemaPatch) => void; static enablePolyfills: (versions?: string[]) => void; static silent: (value?: boolean) => void; } export { IFieldStateSetterOptions, ISchema, ISchemaFieldUpdateRequest, ISchemaTransformerOptions, IScopeContext, Schema, SchemaComponents, SchemaEffectTypes, SchemaEnum, SchemaItems, SchemaKey, SchemaPatch, SchemaProperties, SchemaReaction, SchemaReactions, SchemaTypes, Slot, Stringify };