@alilc/lowcode-editor-skeleton
Version:
alibaba lowcode editor skeleton
52 lines (51 loc) • 1.51 kB
TypeScript
import { ReactNode } from 'react';
import { WidgetConfig } from '../types';
import { ISkeleton } from '../skeleton';
import { IPublicTypeTitleContent, IPublicTypeWidgetBaseConfig } from '@alilc/lowcode-types';
export interface IWidget {
readonly name: string;
readonly content: ReactNode;
readonly align?: string;
readonly isWidget: true;
readonly visible: boolean;
readonly disabled?: boolean;
readonly body: ReactNode;
readonly skeleton: ISkeleton;
readonly config: IPublicTypeWidgetBaseConfig;
getName(): string;
getContent(): any;
show(): void;
hide(): void;
toggle(): void;
enable?(): void;
disable?(): void;
}
export declare class Widget implements IWidget {
readonly skeleton: ISkeleton;
readonly config: WidgetConfig;
readonly isWidget = true;
readonly id: string;
readonly name: string;
readonly align?: string;
private _visible;
get visible(): boolean;
inited: boolean;
private _disabled;
private _body;
get body(): ReactNode;
get content(): ReactNode;
readonly title: IPublicTypeTitleContent;
constructor(skeleton: ISkeleton, config: WidgetConfig);
getId(): string;
getName(): string;
getContent(): ReactNode;
hide(): void;
show(): void;
setVisible(flag: boolean): void;
toggle(): void;
private setDisabled;
disable(): void;
enable(): void;
get disabled(): boolean;
}
export declare function isWidget(obj: any): obj is IWidget;