@sanity/form-builder
Version:
Sanity form builder
87 lines • 5.68 kB
TypeScript
import React from 'react';
import { Path, SanityDocument, SlugSchemaType, Marker } from '@sanity/types';
import { PatchEvent } from '../../PatchEvent';
export interface Slug {
_type: 'slug';
current?: string;
}
declare type Props = {
type: SlugSchemaType;
level: number;
value?: Slug;
compareValue?: Slug;
readOnly?: boolean;
document: SanityDocument;
onChange: (ev: PatchEvent) => void;
onFocus: (pathOrEvent?: Path | React.FocusEvent<any>) => void;
getValuePath: () => Path;
markers: Marker[];
presence: any;
};
declare const _default: {
new (props: Omit<Omit<Props & React.RefAttributes<HTMLInputElement>, "document">, "getValuePath"> | Readonly<Omit<Omit<Props & React.RefAttributes<HTMLInputElement>, "document">, "getValuePath">>): {
_input: any;
_didShowFocusWarning: boolean;
focus(): void;
setRef: (input: any) => void;
render(): React.JSX.Element;
context: any;
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<Omit<Props & React.RefAttributes<HTMLInputElement>, "document">, "getValuePath">>) => {} | Pick<{}, K>) | Pick<{}, K>, callback?: () => void): void;
forceUpdate(callback?: () => void): void;
readonly props: Readonly<Omit<Omit<Props & React.RefAttributes<HTMLInputElement>, "document">, "getValuePath">> & Readonly<{
children?: React.ReactNode;
}>;
state: Readonly<{}>;
refs: {
[key: string]: React.ReactInstance;
};
componentDidMount?(): void;
shouldComponentUpdate?(nextProps: Readonly<Omit<Omit<Props & React.RefAttributes<HTMLInputElement>, "document">, "getValuePath">>, nextState: Readonly<{}>, nextContext: any): boolean;
componentWillUnmount?(): void;
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<Omit<Props & React.RefAttributes<HTMLInputElement>, "document">, "getValuePath">>, prevState: Readonly<{}>): any;
componentDidUpdate?(prevProps: Readonly<Omit<Omit<Props & React.RefAttributes<HTMLInputElement>, "document">, "getValuePath">>, prevState: Readonly<{}>, snapshot?: any): void;
componentWillMount?(): void;
UNSAFE_componentWillMount?(): void;
componentWillReceiveProps?(nextProps: Readonly<Omit<Omit<Props & React.RefAttributes<HTMLInputElement>, "document">, "getValuePath">>, nextContext: any): void;
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<Omit<Props & React.RefAttributes<HTMLInputElement>, "document">, "getValuePath">>, nextContext: any): void;
componentWillUpdate?(nextProps: Readonly<Omit<Omit<Props & React.RefAttributes<HTMLInputElement>, "document">, "getValuePath">>, nextState: Readonly<{}>, nextContext: any): void;
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<Omit<Props & React.RefAttributes<HTMLInputElement>, "document">, "getValuePath">>, nextState: Readonly<{}>, nextContext: any): void;
};
new (props: Omit<Omit<Props & React.RefAttributes<HTMLInputElement>, "document">, "getValuePath">, context: any): {
_input: any;
_didShowFocusWarning: boolean;
focus(): void;
setRef: (input: any) => void;
render(): React.JSX.Element;
context: any;
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<Omit<Props & React.RefAttributes<HTMLInputElement>, "document">, "getValuePath">>) => {} | Pick<{}, K>) | Pick<{}, K>, callback?: () => void): void;
forceUpdate(callback?: () => void): void;
readonly props: Readonly<Omit<Omit<Props & React.RefAttributes<HTMLInputElement>, "document">, "getValuePath">> & Readonly<{
children?: React.ReactNode;
}>;
state: Readonly<{}>;
refs: {
[key: string]: React.ReactInstance;
};
componentDidMount?(): void;
shouldComponentUpdate?(nextProps: Readonly<Omit<Omit<Props & React.RefAttributes<HTMLInputElement>, "document">, "getValuePath">>, nextState: Readonly<{}>, nextContext: any): boolean;
componentWillUnmount?(): void;
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<Omit<Props & React.RefAttributes<HTMLInputElement>, "document">, "getValuePath">>, prevState: Readonly<{}>): any;
componentDidUpdate?(prevProps: Readonly<Omit<Omit<Props & React.RefAttributes<HTMLInputElement>, "document">, "getValuePath">>, prevState: Readonly<{}>, snapshot?: any): void;
componentWillMount?(): void;
UNSAFE_componentWillMount?(): void;
componentWillReceiveProps?(nextProps: Readonly<Omit<Omit<Props & React.RefAttributes<HTMLInputElement>, "document">, "getValuePath">>, nextContext: any): void;
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<Omit<Props & React.RefAttributes<HTMLInputElement>, "document">, "getValuePath">>, nextContext: any): void;
componentWillUpdate?(nextProps: Readonly<Omit<Omit<Props & React.RefAttributes<HTMLInputElement>, "document">, "getValuePath">>, nextState: Readonly<{}>, nextContext: any): void;
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<Omit<Props & React.RefAttributes<HTMLInputElement>, "document">, "getValuePath">>, nextState: Readonly<{}>, nextContext: any): void;
};
displayName: string;
contextTypes: {
getValuePath: import("prop-types").Requireable<any>;
};
contextType?: React.Context<any>;
};
export default _default;
//# sourceMappingURL=SlugInput.d.ts.map