/**
* @file LazyComponent
* @description
* @author fex
*/
///
import React from 'react';
import { ThemeProps } from '../theme';
export interface LazyComponentProps extends ThemeProps {
component?: React.ElementType;
getComponent?: () => Promise;
placeholder?: React.ReactNode;
unMountOnHidden?: boolean;
childProps?: object;
defaultVisible?: boolean;
className?: string;
[propName: string]: any;
}
export interface LazyComponentState {
visible: boolean;
component?: React.ElementType;
}
export declare class LazyComponent extends React.Component {
static defaultProps: {
placeholder: React.JSX.Element;
unMountOnHidden: boolean;
partialVisibility: boolean;
};
mounted: boolean;
constructor(props: LazyComponentProps);
componentDidMount(): void;
componentWillUnmount(): void;
handleVisibleChange(visible: boolean, entry?: any): void;
render(): React.ReactNode;
}
declare const themedLazyComponent: {
new (props: Omit & import("../theme").ThemeOuterProps): {
ref: any;
childRef(ref: any): void;
getWrappedInstance(): any;
render(): React.JSX.Element;
context: unknown;
setState(state: {} | ((prevState: Readonly<{}>, props: Readonly & import("../theme").ThemeOuterProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
forceUpdate(callback?: (() => void) | undefined): void;
readonly props: Readonly & import("../theme").ThemeOuterProps>;
state: Readonly<{}>;
refs: {
[key: string]: React.ReactInstance;
};
componentDidMount?(): void;
shouldComponentUpdate?(nextProps: Readonly & import("../theme").ThemeOuterProps>, nextState: Readonly<{}>, nextContext: any): boolean;
componentWillUnmount?(): void;
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
getSnapshotBeforeUpdate?(prevProps: Readonly & import("../theme").ThemeOuterProps>, prevState: Readonly<{}>): any;
componentDidUpdate?(prevProps: Readonly & import("../theme").ThemeOuterProps>, prevState: Readonly<{}>, snapshot?: any): void;
componentWillMount?(): void;
UNSAFE_componentWillMount?(): void;
componentWillReceiveProps?(nextProps: Readonly & import("../theme").ThemeOuterProps>, nextContext: any): void;
UNSAFE_componentWillReceiveProps?(nextProps: Readonly & import("../theme").ThemeOuterProps>, nextContext: any): void;
componentWillUpdate?(nextProps: Readonly & import("../theme").ThemeOuterProps>, nextState: Readonly<{}>, nextContext: any): void;
UNSAFE_componentWillUpdate?(nextProps: Readonly & import("../theme").ThemeOuterProps>, nextState: Readonly<{}>, nextContext: any): void;
};
displayName: string;
contextType: React.Context;
ComposedComponent: React.ComponentType;
} & import("hoist-non-react-statics").NonReactStatics & {
ComposedComponent: typeof LazyComponent;
};
export default themedLazyComponent;