1 | import React from 'react';
|
2 | import type * as CM from 'codemirror';
|
3 | import { FragmentDefinitionNode, GraphQLSchema, GraphQLType, ValidationRule } from 'graphql';
|
4 | import { SizerComponent } from '../utility/CodeMirrorSizer';
|
5 | declare type QueryEditorProps = {
|
6 | schema?: GraphQLSchema;
|
7 | validationRules?: ValidationRule[];
|
8 | value?: string;
|
9 | onEdit?: (value: string) => void;
|
10 | readOnly?: boolean;
|
11 | onHintInformationRender: (elem: HTMLDivElement) => void;
|
12 | onClickReference?: (reference: GraphQLType) => void;
|
13 | onCopyQuery?: () => void;
|
14 | onPrettifyQuery?: () => void;
|
15 | onMergeQuery?: () => void;
|
16 | onRunQuery?: () => void;
|
17 | editorTheme?: string;
|
18 | externalFragments?: string | FragmentDefinitionNode[];
|
19 | };
|
20 | export declare class QueryEditor extends React.Component<QueryEditorProps, {}> implements SizerComponent {
|
21 | cachedValue: string | undefined;
|
22 | editor: (CM.Editor & {
|
23 | options: any;
|
24 | showHint: any;
|
25 | }) | null;
|
26 | ignoreChangeEvent: boolean;
|
27 | _node: HTMLElement | null;
|
28 | constructor(props: QueryEditorProps);
|
29 | componentDidMount(): void;
|
30 | componentDidUpdate(prevProps: QueryEditorProps): void;
|
31 | componentWillUnmount(): void;
|
32 | render(): JSX.Element;
|
33 | getCodeMirror(): CM.Editor;
|
34 | getClientHeight(): number | null;
|
35 | private _onKeyUp;
|
36 | private _onEdit;
|
37 | private _onHasCompletion;
|
38 | private _onBeforeChange;
|
39 | }
|
40 | export {};
|
41 |
|
\ | No newline at end of file |