@itwin/core-react
Version:
A react component library of iTwin.js UI general purpose components
77 lines • 5.92 kB
TypeScript
/** @packageDocumentation
* @module Base
*/
import * as React from "react";
import type { CommonDivProps } from "../utils/Props.js";
/** Div element with Outside Click behavior
* @public
* @deprecated in 4.12.0. Use props of a basic component, like {@link https://itwinui.bentley.com/docs/popover iTwinUI popover `closeOnOutsideClick`} or {@link useOnOutsideClick} hook.
*/
export declare const DivWithOutsideClick: {
new (props: CommonDivProps & import("../hocs/withOnOutsideClick.js").WithOnOutsideClickProps): {
outsideClickContainerDiv?: HTMLDivElement | null;
isDownOutside: boolean;
isInCorePopup(element: HTMLElement): boolean;
onOutsideClick(e: MouseEvent): any;
handleDocumentClick: (e: MouseEvent) => any;
handleDocumentPointerDown: (e: PointerEvent) => void;
handleDocumentPointerUp: (e: PointerEvent) => void;
handleOutsideClickContainerDivSet: (outsideClickContainerDiv: HTMLDivElement | null) => void;
getParentDocument(): Document;
componentDidMount(): void;
componentWillUnmount(): void;
render(): React.JSX.Element;
context: unknown;
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<CommonDivProps & import("../hocs/withOnOutsideClick.js").WithOnOutsideClickProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
forceUpdate(callback?: (() => void) | undefined): void;
readonly props: Readonly<CommonDivProps & import("../hocs/withOnOutsideClick.js").WithOnOutsideClickProps>;
state: Readonly<{}>;
refs: {
[key: string]: React.ReactInstance;
};
shouldComponentUpdate?(nextProps: Readonly<CommonDivProps & import("../hocs/withOnOutsideClick.js").WithOnOutsideClickProps>, nextState: Readonly<{}>, nextContext: any): boolean;
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
getSnapshotBeforeUpdate?(prevProps: Readonly<CommonDivProps & import("../hocs/withOnOutsideClick.js").WithOnOutsideClickProps>, prevState: Readonly<{}>): any;
componentDidUpdate?(prevProps: Readonly<CommonDivProps & import("../hocs/withOnOutsideClick.js").WithOnOutsideClickProps>, prevState: Readonly<{}>, snapshot?: any): void;
componentWillMount?(): void;
UNSAFE_componentWillMount?(): void;
componentWillReceiveProps?(nextProps: Readonly<CommonDivProps & import("../hocs/withOnOutsideClick.js").WithOnOutsideClickProps>, nextContext: any): void;
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<CommonDivProps & import("../hocs/withOnOutsideClick.js").WithOnOutsideClickProps>, nextContext: any): void;
componentWillUpdate?(nextProps: Readonly<CommonDivProps & import("../hocs/withOnOutsideClick.js").WithOnOutsideClickProps>, nextState: Readonly<{}>, nextContext: any): void;
UNSAFE_componentWillUpdate?(nextProps: Readonly<CommonDivProps & import("../hocs/withOnOutsideClick.js").WithOnOutsideClickProps>, nextState: Readonly<{}>, nextContext: any): void;
};
new (props: CommonDivProps & import("../hocs/withOnOutsideClick.js").WithOnOutsideClickProps, context: any): {
outsideClickContainerDiv?: HTMLDivElement | null;
isDownOutside: boolean;
isInCorePopup(element: HTMLElement): boolean;
onOutsideClick(e: MouseEvent): any;
handleDocumentClick: (e: MouseEvent) => any;
handleDocumentPointerDown: (e: PointerEvent) => void;
handleDocumentPointerUp: (e: PointerEvent) => void;
handleOutsideClickContainerDivSet: (outsideClickContainerDiv: HTMLDivElement | null) => void;
getParentDocument(): Document;
componentDidMount(): void;
componentWillUnmount(): void;
render(): React.JSX.Element;
context: unknown;
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<CommonDivProps & import("../hocs/withOnOutsideClick.js").WithOnOutsideClickProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
forceUpdate(callback?: (() => void) | undefined): void;
readonly props: Readonly<CommonDivProps & import("../hocs/withOnOutsideClick.js").WithOnOutsideClickProps>;
state: Readonly<{}>;
refs: {
[key: string]: React.ReactInstance;
};
shouldComponentUpdate?(nextProps: Readonly<CommonDivProps & import("../hocs/withOnOutsideClick.js").WithOnOutsideClickProps>, nextState: Readonly<{}>, nextContext: any): boolean;
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
getSnapshotBeforeUpdate?(prevProps: Readonly<CommonDivProps & import("../hocs/withOnOutsideClick.js").WithOnOutsideClickProps>, prevState: Readonly<{}>): any;
componentDidUpdate?(prevProps: Readonly<CommonDivProps & import("../hocs/withOnOutsideClick.js").WithOnOutsideClickProps>, prevState: Readonly<{}>, snapshot?: any): void;
componentWillMount?(): void;
UNSAFE_componentWillMount?(): void;
componentWillReceiveProps?(nextProps: Readonly<CommonDivProps & import("../hocs/withOnOutsideClick.js").WithOnOutsideClickProps>, nextContext: any): void;
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<CommonDivProps & import("../hocs/withOnOutsideClick.js").WithOnOutsideClickProps>, nextContext: any): void;
componentWillUpdate?(nextProps: Readonly<CommonDivProps & import("../hocs/withOnOutsideClick.js").WithOnOutsideClickProps>, nextState: Readonly<{}>, nextContext: any): void;
UNSAFE_componentWillUpdate?(nextProps: Readonly<CommonDivProps & import("../hocs/withOnOutsideClick.js").WithOnOutsideClickProps>, nextState: Readonly<{}>, nextContext: any): void;
};
contextType?: React.Context<any> | undefined;
};
//# sourceMappingURL=DivWithOutsideClick.d.ts.map