ng-zorro-antd
Version:
An enterprise-class UI components based on Ant Design and Angular
86 lines (85 loc) • 5.65 kB
TypeScript
import { Directionality } from '@angular/cdk/bidi';
import { ChangeDetectorRef, ComponentRef, ElementRef, EventEmitter, OnDestroy, QueryList, Renderer2, TemplateRef, ViewContainerRef } from '@angular/core';
import { Observable, Subject } from 'rxjs';
import { NzButtonType } from 'ng-zorro-antd/button';
import { NzConfigKey, NzConfigService } from 'ng-zorro-antd/core/config';
import { NzNoAnimationDirective } from 'ng-zorro-antd/core/no-animation';
import { BooleanInput, NgStyleInterface, NzSafeAny, NzTSType } from 'ng-zorro-antd/core/types';
import { NzTooltipBaseDirective, NzToolTipComponent, NzTooltipTrigger, PropertyMapping } from 'ng-zorro-antd/tooltip';
import * as i0 from "@angular/core";
export type NzAutoFocusType = null | 'ok' | 'cancel';
export declare class NzPopconfirmDirective extends NzTooltipBaseDirective {
readonly _nzModuleName: NzConfigKey;
static ngAcceptInputType_nzOkDanger: BooleanInput;
static ngAcceptInputType_nzCondition: BooleanInput;
static ngAcceptInputType_nzPopconfirmShowArrow: BooleanInput;
static ngAcceptInputType_nzPopconfirmArrowPointAtCenter: BooleanInput;
arrowPointAtCenter?: boolean;
title?: NzTSType;
directiveTitle?: NzTSType | null;
trigger?: NzTooltipTrigger;
placement?: string | string[];
origin?: ElementRef<HTMLElement>;
mouseEnterDelay?: number;
mouseLeaveDelay?: number;
overlayClassName?: string;
overlayStyle?: NgStyleInterface;
visible?: boolean;
nzOkText?: string;
nzOkType?: string;
nzOkDanger?: boolean;
nzCancelText?: string;
nzBeforeConfirm?: () => Observable<boolean> | Promise<boolean> | boolean;
nzIcon?: string | TemplateRef<void>;
nzCondition: boolean;
nzPopconfirmShowArrow: boolean;
nzPopconfirmBackdrop?: boolean;
nzAutofocus: NzAutoFocusType;
readonly visibleChange: EventEmitter<boolean>;
readonly nzOnCancel: EventEmitter<void>;
readonly nzOnConfirm: EventEmitter<void>;
protected readonly componentRef: ComponentRef<NzPopconfirmComponent>;
protected getProxyPropertyMap(): PropertyMapping;
constructor(elementRef: ElementRef, hostView: ViewContainerRef, renderer: Renderer2, noAnimation?: NzNoAnimationDirective, nzConfigService?: NzConfigService);
/**
* @override
*/
protected createComponent(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<NzPopconfirmDirective, [null, null, null, { optional: true; host: true; }, null]>;
static ɵdir: i0.ɵɵDirectiveDeclaration<NzPopconfirmDirective, "[nz-popconfirm]", ["nzPopconfirm"], { "arrowPointAtCenter": { "alias": "nzPopconfirmArrowPointAtCenter"; "required": false; }; "title": { "alias": "nzPopconfirmTitle"; "required": false; }; "directiveTitle": { "alias": "nz-popconfirm"; "required": false; }; "trigger": { "alias": "nzPopconfirmTrigger"; "required": false; }; "placement": { "alias": "nzPopconfirmPlacement"; "required": false; }; "origin": { "alias": "nzPopconfirmOrigin"; "required": false; }; "mouseEnterDelay": { "alias": "nzPopconfirmMouseEnterDelay"; "required": false; }; "mouseLeaveDelay": { "alias": "nzPopconfirmMouseLeaveDelay"; "required": false; }; "overlayClassName": { "alias": "nzPopconfirmOverlayClassName"; "required": false; }; "overlayStyle": { "alias": "nzPopconfirmOverlayStyle"; "required": false; }; "visible": { "alias": "nzPopconfirmVisible"; "required": false; }; "nzOkText": { "alias": "nzOkText"; "required": false; }; "nzOkType": { "alias": "nzOkType"; "required": false; }; "nzOkDanger": { "alias": "nzOkDanger"; "required": false; }; "nzCancelText": { "alias": "nzCancelText"; "required": false; }; "nzBeforeConfirm": { "alias": "nzBeforeConfirm"; "required": false; }; "nzIcon": { "alias": "nzIcon"; "required": false; }; "nzCondition": { "alias": "nzCondition"; "required": false; }; "nzPopconfirmShowArrow": { "alias": "nzPopconfirmShowArrow"; "required": false; }; "nzPopconfirmBackdrop": { "alias": "nzPopconfirmBackdrop"; "required": false; }; "nzAutofocus": { "alias": "nzAutofocus"; "required": false; }; }, { "visibleChange": "nzPopconfirmVisibleChange"; "nzOnCancel": "nzOnCancel"; "nzOnConfirm": "nzOnConfirm"; }, never, never, true, never>;
}
export declare class NzPopconfirmComponent extends NzToolTipComponent implements OnDestroy {
private elementRef;
okBtn: QueryList<ElementRef>;
cancelBtn: QueryList<ElementRef>;
nzCancelText?: string;
nzCondition: boolean;
nzPopconfirmShowArrow: boolean;
nzIcon?: string | TemplateRef<void>;
nzOkText?: string;
nzOkType: NzButtonType | 'danger';
nzOkDanger: boolean;
nzAutoFocus: NzAutoFocusType;
nzBeforeConfirm: (() => Observable<boolean> | Promise<boolean> | boolean) | null;
readonly nzOnCancel: Subject<void>;
readonly nzOnConfirm: Subject<void>;
protected _trigger: NzTooltipTrigger;
private elementFocusedBeforeModalWasOpened;
private document;
_prefix: string;
confirmLoading: boolean;
constructor(cdr: ChangeDetectorRef, elementRef: ElementRef, directionality: Directionality, document: NzSafeAny, noAnimation?: NzNoAnimationDirective);
ngOnDestroy(): void;
/**
* @override
*/
show(): void;
hide(): void;
handleConfirm(): void;
onCancel(): void;
onConfirm(): void;
private capturePreviouslyFocusedElement;
private restoreFocus;
static ɵfac: i0.ɵɵFactoryDeclaration<NzPopconfirmComponent, [null, null, { optional: true; }, { optional: true; }, { optional: true; host: true; }]>;
static ɵcmp: i0.ɵɵComponentDeclaration<NzPopconfirmComponent, "nz-popconfirm", ["nzPopconfirmComponent"], {}, {}, never, never, true, never>;
}