popconfirm.d.ts 5.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. import { ElementRef, EventEmitter, OnDestroy, QueryList, TemplateRef } from '@angular/core';
  2. import { Observable, Subject } from 'rxjs';
  3. import { NzButtonType } from 'ng-zorro-antd/button';
  4. import { NzConfigKey } from 'ng-zorro-antd/core/config';
  5. import { NgStyleInterface, NzTSType } from 'ng-zorro-antd/core/types';
  6. import { NzToolTipComponent, NzTooltipBaseDirective, NzTooltipTrigger, PropertyMapping } from 'ng-zorro-antd/tooltip';
  7. import * as i0 from "@angular/core";
  8. export type NzAutoFocusType = null | 'ok' | 'cancel';
  9. export declare class NzPopconfirmDirective extends NzTooltipBaseDirective {
  10. readonly _nzModuleName: NzConfigKey;
  11. arrowPointAtCenter?: boolean;
  12. title?: NzTSType;
  13. titleContext?: object | null;
  14. directiveTitle?: NzTSType | null;
  15. trigger?: NzTooltipTrigger;
  16. placement?: string | string[];
  17. origin?: ElementRef<HTMLElement>;
  18. mouseEnterDelay?: number;
  19. mouseLeaveDelay?: number;
  20. overlayClassName?: string;
  21. overlayStyle?: NgStyleInterface;
  22. visible?: boolean;
  23. nzOkText?: string;
  24. nzOkType?: string;
  25. nzOkDisabled?: boolean;
  26. nzOkDanger?: boolean;
  27. nzCancelText?: string;
  28. nzBeforeConfirm?: () => Observable<boolean> | Promise<boolean> | boolean;
  29. nzIcon?: string | TemplateRef<void>;
  30. nzCondition: boolean;
  31. nzPopconfirmShowArrow: boolean;
  32. nzPopconfirmBackdrop?: boolean;
  33. nzAutofocus: NzAutoFocusType;
  34. directiveContent?: NzTSType | null;
  35. content?: NzTSType | null;
  36. overlayClickable?: boolean;
  37. readonly visibleChange: EventEmitter<boolean>;
  38. readonly nzOnCancel: EventEmitter<void>;
  39. readonly nzOnConfirm: EventEmitter<void>;
  40. protected getProxyPropertyMap(): PropertyMapping;
  41. constructor();
  42. /**
  43. * @override
  44. */
  45. protected createComponent(): void;
  46. static ɵfac: i0.ɵɵFactoryDeclaration<NzPopconfirmDirective, never>;
  47. static ɵdir: i0.ɵɵDirectiveDeclaration<NzPopconfirmDirective, "[nz-popconfirm]", ["nzPopconfirm"], { "arrowPointAtCenter": { "alias": "nzPopconfirmArrowPointAtCenter"; "required": false; }; "title": { "alias": "nzPopconfirmTitle"; "required": false; }; "titleContext": { "alias": "nzPopconfirmTitleContext"; "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; }; "nzOkDisabled": { "alias": "nzOkDisabled"; "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>;
  48. static ngAcceptInputType_arrowPointAtCenter: unknown;
  49. static ngAcceptInputType_nzOkDisabled: unknown;
  50. static ngAcceptInputType_nzOkDanger: unknown;
  51. static ngAcceptInputType_nzCondition: unknown;
  52. static ngAcceptInputType_nzPopconfirmShowArrow: unknown;
  53. }
  54. export declare class NzPopconfirmComponent extends NzToolTipComponent implements OnDestroy {
  55. private elementRef;
  56. okBtn: QueryList<ElementRef>;
  57. cancelBtn: QueryList<ElementRef>;
  58. nzCancelText?: string;
  59. nzCondition: boolean;
  60. nzPopconfirmShowArrow: boolean;
  61. nzIcon?: string | TemplateRef<void>;
  62. nzOkText?: string;
  63. nzOkType: NzButtonType | 'danger';
  64. nzOkDanger: boolean;
  65. nzOkDisabled: boolean;
  66. nzAutoFocus: NzAutoFocusType;
  67. nzBeforeConfirm: (() => Observable<boolean> | Promise<boolean> | boolean) | null;
  68. readonly nzOnCancel: Subject<void>;
  69. readonly nzOnConfirm: Subject<void>;
  70. protected _trigger: NzTooltipTrigger;
  71. private elementFocusedBeforeModalWasOpened;
  72. private document;
  73. _prefix: string;
  74. confirmLoading: boolean;
  75. constructor(elementRef: ElementRef);
  76. ngOnDestroy(): void;
  77. /**
  78. * @override
  79. */
  80. show(): void;
  81. hide(): void;
  82. handleConfirm(): void;
  83. onCancel(): void;
  84. onConfirm(): void;
  85. private capturePreviouslyFocusedElement;
  86. private restoreFocus;
  87. static ɵfac: i0.ɵɵFactoryDeclaration<NzPopconfirmComponent, never>;
  88. static ɵcmp: i0.ɵɵComponentDeclaration<NzPopconfirmComponent, "nz-popconfirm", ["nzPopconfirmComponent"], {}, {}, never, never, true, never>;
  89. }