UNPKG

@deepkit/desktop-ui

Version:

Library for desktop UI widgets in Angular 10+

126 lines (125 loc) 7.16 kB
import { AfterViewInit, ApplicationRef, ChangeDetectorRef, ComponentRef, ElementRef, EventEmitter, Injector, OnChanges, OnDestroy, SimpleChanges, TemplateRef, Type, ViewContainerRef } from '@angular/core'; import { Overlay, OverlayRef } from '@angular/cdk/overlay'; import { WindowRegistry } from '../window/window-state'; import { WindowComponent } from '../window/window.component'; import { RenderComponentDirective } from '../core/render-component.directive'; import { OverlayStack, OverlayStackItem } from '../app'; import { Subscription } from 'rxjs'; import { ButtonComponent } from '../button'; import * as i0 from "@angular/core"; export declare class DialogWrapperComponent { protected cd: ChangeDetectorRef; component?: Type<any>; componentInputs: { [name: string]: any; }; actions?: TemplateRef<any> | undefined; container?: TemplateRef<any> | undefined; content?: TemplateRef<any> | undefined; class: string; renderComponentDirective?: RenderComponentDirective; constructor(cd: ChangeDetectorRef); setActions(actions: TemplateRef<any> | undefined): void; setDialogContainer(container: TemplateRef<any> | undefined): void; static ɵfac: i0.ɵɵFactoryDeclaration<DialogWrapperComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<DialogWrapperComponent, "ng-component", never, { "component": { "alias": "component"; "required": false; }; "componentInputs": { "alias": "componentInputs"; "required": false; }; }, {}, never, ["*"], false, never>; } export declare class DialogComponent implements AfterViewInit, OnDestroy, OnChanges { protected applicationRef: ApplicationRef; protected overlayStack: OverlayStack; protected viewContainerRef: ViewContainerRef; protected cd: ChangeDetectorRef; protected overlay: Overlay; protected injector: Injector; protected registry: WindowRegistry; protected cdParent?: ChangeDetectorRef | undefined; protected window?: WindowComponent | undefined; title: string; visible: boolean; visibleChange: EventEmitter<boolean>; class: string; noPadding: boolean | ''; minWidth?: number | string; minHeight?: number | string; width?: number | string; height?: number | string; maxWidth?: number | string; maxHeight?: number | string; center: boolean; backDropCloses: boolean; component?: Type<any>; componentInputs: { [name: string]: any; }; closed: EventEmitter<any>; open: EventEmitter<any>; template?: TemplateRef<any>; actions?: TemplateRef<any> | undefined; container?: TemplateRef<any> | undefined; overlayRef?: OverlayRef; wrapperComponentRef?: ComponentRef<DialogWrapperComponent>; protected lastOverlayStackItem?: OverlayStackItem; constructor(applicationRef: ApplicationRef, overlayStack: OverlayStack, viewContainerRef: ViewContainerRef, cd: ChangeDetectorRef, overlay: Overlay, injector: Injector, registry: WindowRegistry, cdParent?: ChangeDetectorRef | undefined, window?: WindowComponent | undefined); toPromise(): Promise<any>; setDialogContainer(container: TemplateRef<any> | undefined): void; setActions(actions: TemplateRef<any> | undefined): void; ngOnChanges(changes: SimpleChanges): void; show(): void; protected beforeUnload(): void; ngAfterViewInit(): void; close(v?: any): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration<DialogComponent, [null, null, null, null, null, null, null, { optional: true; skipSelf: true; }, { optional: true; }]>; static ɵcmp: i0.ɵɵComponentDeclaration<DialogComponent, "dui-dialog", never, { "title": { "alias": "title"; "required": false; }; "visible": { "alias": "visible"; "required": false; }; "class": { "alias": "class"; "required": false; }; "noPadding": { "alias": "noPadding"; "required": false; }; "minWidth": { "alias": "minWidth"; "required": false; }; "minHeight": { "alias": "minHeight"; "required": false; }; "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "maxWidth": { "alias": "maxWidth"; "required": false; }; "maxHeight": { "alias": "maxHeight"; "required": false; }; "center": { "alias": "center"; "required": false; }; "backDropCloses": { "alias": "backDropCloses"; "required": false; }; "component": { "alias": "component"; "required": false; }; "componentInputs": { "alias": "componentInputs"; "required": false; }; }, { "visibleChange": "visibleChange"; "closed": "closed"; "open": "open"; }, never, ["*"], false, never>; } /** * This directive is necessary if you want to load and render the dialog content * only when opening the dialog. Without it, it is immediately rendered, which can cause * performance and injection issues. */ export declare class DialogDirective { protected dialog: DialogComponent; template: TemplateRef<any>; constructor(dialog: DialogComponent, template: TemplateRef<any>); static ɵfac: i0.ɵɵFactoryDeclaration<DialogDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<DialogDirective, "[dialogContainer]", never, {}, {}, never, never, false, never>; } export declare class DialogActionsComponent implements AfterViewInit, OnDestroy { protected dialog: DialogComponent; template: TemplateRef<any>; constructor(dialog: DialogComponent); ngAfterViewInit(): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration<DialogActionsComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<DialogActionsComponent, "dui-dialog-actions", never, {}, {}, never, ["*"], false, never>; } export declare class DialogErrorComponent { static ɵfac: i0.ɵɵFactoryDeclaration<DialogErrorComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<DialogErrorComponent, "dui-dialog-error", never, {}, {}, never, ["*"], false, never>; } export declare class CloseDialogDirective { protected dialog: DialogComponent; closeDialog: any; constructor(dialog: DialogComponent); onClick(): void; static ɵfac: i0.ɵɵFactoryDeclaration<CloseDialogDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<CloseDialogDirective, "[closeDialog]", never, { "closeDialog": { "alias": "closeDialog"; "required": false; }; }, {}, never, never, false, never>; } /** * A directive to open the given dialog on regular left click. */ export declare class OpenDialogDirective implements AfterViewInit, OnChanges, OnDestroy { protected elementRef: ElementRef; protected button?: ButtonComponent | undefined; openDialog?: DialogComponent; openSub?: Subscription; hiddenSub?: Subscription; constructor(elementRef: ElementRef, button?: ButtonComponent | undefined); ngOnDestroy(): void; ngOnChanges(): void; ngAfterViewInit(): void; protected link(): void; onClick(): void; static ɵfac: i0.ɵɵFactoryDeclaration<OpenDialogDirective, [null, { optional: true; }]>; static ɵdir: i0.ɵɵDirectiveDeclaration<OpenDialogDirective, "[openDialog]", never, { "openDialog": { "alias": "openDialog"; "required": false; }; }, {}, never, never, false, never>; }