1 |
|
2 |
|
3 |
|
4 |
|
5 | import * as React from "react";
|
6 | import { Constructor } from "./legacyCommon";
|
7 | export declare const CONTEXTMENU_WARN_DECORATOR_NO_METHOD = "[Blueprint] @ContextMenuTarget-decorated class should implement renderContextMenu.";
|
8 | export declare const CONTEXTMENU_WARN_DECORATOR_NEEDS_REACT_ELEMENT = "[Blueprint] \"@ContextMenuTarget-decorated components must return a single JSX.Element or an empty render.";
|
9 | export interface ContextMenuTargetLegacyComponent extends React.Component {
|
10 | render(): React.ReactElement<any> | null | undefined;
|
11 | renderContextMenu: (e: React.MouseEvent<HTMLElement>) => JSX.Element | undefined;
|
12 | onContextMenuClose?: () => void;
|
13 | }
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 | export declare function ContextMenuTargetLegacy<T extends Constructor<ContextMenuTargetLegacyComponent>>(WrappedComponent: T): {
|
21 | new (...args: any[]): {
|
22 | render(): React.ReactElement<any, string | React.JSXElementConstructor<any>> | null | undefined;
|
23 | renderContextMenu: (e: React.MouseEvent<HTMLElement, MouseEvent>) => JSX.Element | undefined;
|
24 | onContextMenuClose?: (() => void) | undefined;
|
25 | context: any;
|
26 | setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<{}>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
27 | forceUpdate(callback?: (() => void) | undefined): void;
|
28 | readonly props: Readonly<{}> & Readonly<{
|
29 | children?: React.ReactNode;
|
30 | }>;
|
31 | state: Readonly<{}>;
|
32 | refs: {
|
33 | [key: string]: React.ReactInstance;
|
34 | };
|
35 | componentDidMount?(): void;
|
36 | shouldComponentUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): boolean;
|
37 | componentWillUnmount?(): void;
|
38 | componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
39 | getSnapshotBeforeUpdate?(prevProps: Readonly<{}>, prevState: Readonly<{}>): any;
|
40 | componentDidUpdate?(prevProps: Readonly<{}>, prevState: Readonly<{}>, snapshot?: any): void;
|
41 | componentWillMount?(): void;
|
42 | UNSAFE_componentWillMount?(): void;
|
43 | componentWillReceiveProps?(nextProps: Readonly<{}>, nextContext: any): void;
|
44 | UNSAFE_componentWillReceiveProps?(nextProps: Readonly<{}>, nextContext: any): void;
|
45 | componentWillUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): void;
|
46 | UNSAFE_componentWillUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): void;
|
47 | };
|
48 | displayName: string;
|
49 | } & T;
|
50 |
|
\ | No newline at end of file |