popover.directive.d.ts 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. import { ElementRef, EventEmitter, OnDestroy, OnInit, Renderer2, TemplateRef, ViewContainerRef } from '@angular/core';
  2. import { PopoverConfig } from './popover.config';
  3. import { ComponentLoaderFactory } from 'ngx-bootstrap/component-loader';
  4. import { PositioningService } from 'ngx-bootstrap/positioning';
  5. /**
  6. * A lightweight, extensible directive for fancy popover creation.
  7. */
  8. export declare class PopoverDirective implements OnInit, OnDestroy {
  9. private _positionService;
  10. /** sets disable adaptive position */
  11. adaptivePosition: boolean;
  12. /**
  13. * Content to be displayed as popover.
  14. */
  15. popover: string | TemplateRef<any>;
  16. /**
  17. * Context to be used if popover is a template.
  18. */
  19. popoverContext: any;
  20. /**
  21. * Title of a popover.
  22. */
  23. popoverTitle: string;
  24. /**
  25. * Placement of a popover. Accepts: "top", "bottom", "left", "right"
  26. */
  27. placement: 'top' | 'bottom' | 'left' | 'right' | 'auto';
  28. /**
  29. * Close popover on outside click
  30. */
  31. outsideClick: boolean;
  32. /**
  33. * Specifies events that should trigger. Supports a space separated list of
  34. * event names.
  35. */
  36. triggers: string;
  37. /**
  38. * A selector specifying the element the popover should be appended to.
  39. */
  40. container: string;
  41. /**
  42. * Css class for popover container
  43. */
  44. containerClass: string;
  45. /**
  46. * Returns whether or not the popover is currently being shown
  47. */
  48. isOpen: boolean;
  49. /**
  50. * Emits an event when the popover is shown
  51. */
  52. onShown: EventEmitter<any>;
  53. /**
  54. * Emits an event when the popover is hidden
  55. */
  56. onHidden: EventEmitter<any>;
  57. private _popover;
  58. private _isInited;
  59. constructor(_config: PopoverConfig, _elementRef: ElementRef, _renderer: Renderer2, _viewContainerRef: ViewContainerRef, cis: ComponentLoaderFactory, _positionService: PositioningService);
  60. /**
  61. * Opens an element’s popover. This is considered a “manual” triggering of
  62. * the popover.
  63. */
  64. show(): void;
  65. /**
  66. * Closes an element’s popover. This is considered a “manual” triggering of
  67. * the popover.
  68. */
  69. hide(): void;
  70. /**
  71. * Toggles an element’s popover. This is considered a “manual” triggering of
  72. * the popover.
  73. */
  74. toggle(): void;
  75. ngOnInit(): void;
  76. ngOnDestroy(): void;
  77. }