jsonata-visual-editor
Version:
Visual editor for JSONata expressions. Themeable to your needs, default theme is Boostrap 4
26 lines (25 loc) • 1.33 kB
TypeScript
/// <reference types="react" />
import { BinaryNode } from "jsonata-ui-core";
import { AST, Container } from "./Types";
import * as _consts from "./Consts";
import * as Types from "./Types";
import _paths from "./schema/PathSuggester";
import * as SchemaProvider from "./schema/SchemaProvider";
export * from "./Theme";
export * from "./Types";
export { SchemaProvider };
export declare const Consts: typeof _consts;
export declare const PathSuggester: typeof _paths;
export declare const Context: import("unstated-next").Container<Container, Container>;
export declare const isNumberNode: (n: import("jsonata-ui-core").JsonataASTNode) => boolean;
export declare const isPathNode: (n: import("jsonata-ui-core").JsonataASTNode) => boolean;
export declare const isMath: (n: import("jsonata-ui-core").JsonataASTNode) => n is BinaryNode;
export declare function Editor(props: Types.EditorProps): JSX.Element;
export declare function defaultIsValidBasicExpression(ast: AST): string | null;
declare type IDEEditorProps = {
text: string;
onChange: (text: string) => void;
setToggleBlock: (text: string | null) => void;
isValidBasicExpression(ast: AST): string | null;
};
export declare function IDEEditor({ text, onChange, setToggleBlock, isValidBasicExpression }: IDEEditorProps): JSX.Element;