1 |
|
2 |
|
3 |
|
4 |
|
5 | import * as React from "react";
|
6 | import { type 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 React.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>) => React.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>) => React.JSX.Element | undefined;
|
24 | onContextMenuClose?: (() => void) | undefined;
|
25 | context: unknown;
|
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<{}>;
|
29 | state: Readonly<{}>;
|
30 | refs: {
|
31 | [key: string]: React.ReactInstance;
|
32 | };
|
33 | componentDidMount?(): void;
|
34 | shouldComponentUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): boolean;
|
35 | componentWillUnmount?(): void;
|
36 | componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
37 | getSnapshotBeforeUpdate?(prevProps: Readonly<{}>, prevState: Readonly<{}>): any;
|
38 | componentDidUpdate?(prevProps: Readonly<{}>, prevState: Readonly<{}>, snapshot?: any): void;
|
39 | componentWillMount?(): void;
|
40 | UNSAFE_componentWillMount?(): void;
|
41 | componentWillReceiveProps?(nextProps: Readonly<{}>, nextContext: any): void;
|
42 | UNSAFE_componentWillReceiveProps?(nextProps: Readonly<{}>, nextContext: any): void;
|
43 | componentWillUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): void;
|
44 | UNSAFE_componentWillUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): void;
|
45 | };
|
46 | displayName: string;
|
47 | } & T;
|
48 |
|
\ | No newline at end of file |