ngx-tiptap-editor
Version:
[](https://github.com/HuiiBuh/ngx-tiptap-editor/actions/workflows/publish.yml) [ • 2.04 kB
TypeScript
import { ApplicationRef, ComponentRef, InjectionToken, NgZone, OnDestroy, OnInit } from '@angular/core';
import { Subject } from 'rxjs';
import * as i0 from "@angular/core";
export declare const TIP_DIALOG_DATA: InjectionToken<DialogData<any>>;
export interface OverlayData<D> {
data?: D;
autoClose: boolean;
maxWidth: string;
width: string;
backdropColor: string;
}
export interface DialogData<D> extends OverlayData<D> {
type: 'dialog';
position: 'top' | 'center';
}
export interface PopoverData<D> extends OverlayData<D> {
type: 'popover';
position: {
x: number;
y: number;
};
}
export interface ResultData<D> {
data: ResultData<D>['status'] extends 'canceled' ? null : D;
status: 'success' | 'canceled';
}
export declare class DialogRef<RESULT, CONFIG_DATA, COMPONENT> {
private _component;
private appRef;
private dialogWrapperComponentRef;
private config;
private subject$;
result$: import("rxjs").Observable<ResultData<RESULT | null>>;
private _done;
constructor(_component: COMPONENT, appRef: ApplicationRef, dialogWrapperComponentRef: {
component?: ComponentRef<DialogBaseClass>;
}, config: DialogData<CONFIG_DATA> | PopoverData<CONFIG_DATA>);
get component(): COMPONENT;
get done(): boolean;
get dialogConfig(): Omit<DialogData<CONFIG_DATA>, 'data'> | Omit<PopoverData<CONFIG_DATA>, 'data'>;
private get dialogWrapperComponent();
submit(data: RESULT): void;
cancel(): void;
private sendResult;
}
export declare abstract class DialogBaseClass implements OnInit, OnDestroy {
protected abstract ngZone: NgZone;
protected abstract document: Document;
protected abstract dialogRef: DialogRef<any, any, any>;
protected destroy$: Subject<boolean>;
ngOnInit(): void;
ngOnDestroy(): void;
closeDialog(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<DialogBaseClass, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<DialogBaseClass, never, never, {}, {}, never>;
}