@alilc/lowcode-editor-skeleton
Version:
alibaba lowcode editor skeleton
60 lines (59 loc) • 1.62 kB
TypeScript
import { ReactNode, Component, PureComponent } from 'react';
import './style.less';
export interface PopupExtProps {
width?: number;
hasMask?: boolean;
trigger?: ReactNode;
canCloseByOutSideClick?: boolean;
className?: string;
safeNode?: string[];
}
interface PopupProps extends PopupExtProps {
content?: ReactNode;
title?: ReactNode;
actionKey?: string;
}
export declare const PopupContext: import("react").Context<PopupPipe>;
export declare class PopupPipe {
private emitter;
private currentId?;
create(props?: PopupExtProps): {
send: (content: ReactNode, title: ReactNode) => void;
show: (target: Element) => void;
};
private popup;
onPopupChange(fn: (props: PopupProps, target?: Element) => void): () => void;
purge(): void;
}
export default class PopupService extends Component<{
popupPipe?: PopupPipe;
actionKey?: string;
safeId?: string;
popupContainer?: string;
}> {
private popupPipe;
componentWillUnmount(): void;
render(): import("react").JSX.Element;
}
interface StateType extends PopupProps {
visible?: boolean;
offsetX?: number;
pos?: {
top: number;
height: number;
};
}
export declare class PopupContent extends PureComponent<{
safeId?: string;
popupContainer?: string;
}> {
static contextType: import("react").Context<PopupPipe>;
popupContainerId: string;
state: StateType;
private dispose;
componentDidMount(): void;
componentWillUnmount(): void;
onClose: () => void;
render(): import("react").JSX.Element;
}
export {};