tooltip.directive.d.ts 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. import { ElementRef, EventEmitter, OnDestroy, OnInit, Renderer2, TemplateRef, ViewContainerRef } from '@angular/core';
  2. import { TooltipConfig } from './tooltip.config';
  3. import { ComponentLoaderFactory } from 'ngx-bootstrap/component-loader';
  4. import { PositioningService } from 'ngx-bootstrap/positioning';
  5. export declare class TooltipDirective implements OnInit, OnDestroy {
  6. private _elementRef;
  7. private _renderer;
  8. private _positionService;
  9. tooltipId: number;
  10. /** sets disable adaptive position */
  11. adaptivePosition: boolean;
  12. /**
  13. * Content to be displayed as tooltip.
  14. */
  15. tooltip: string | TemplateRef<any>;
  16. /** Fired when tooltip content changes */
  17. tooltipChange: EventEmitter<string | TemplateRef<any>>;
  18. /**
  19. * Placement of a tooltip. Accepts: "top", "bottom", "left", "right"
  20. */
  21. placement: string;
  22. /**
  23. * Specifies events that should trigger. Supports a space separated list of
  24. * event names.
  25. */
  26. triggers: string;
  27. /**
  28. * A selector specifying the element the tooltip should be appended to.
  29. */
  30. container: string;
  31. /**
  32. * Css class for tooltip container
  33. */
  34. containerClass: string;
  35. /**
  36. * Returns whether or not the tooltip is currently being shown
  37. */
  38. isOpen: boolean;
  39. /**
  40. * Allows to disable tooltip
  41. */
  42. isDisabled: boolean;
  43. /**
  44. * Delay before showing the tooltip
  45. */
  46. delay: number;
  47. /**
  48. * Emits an event when the tooltip is shown
  49. */
  50. onShown: EventEmitter<any>;
  51. /**
  52. * Emits an event when the tooltip is hidden
  53. */
  54. onHidden: EventEmitter<any>;
  55. /** @deprecated - please use `tooltip` instead */
  56. htmlContent: string | TemplateRef<any>;
  57. /** @deprecated - please use `placement` instead */
  58. _placement: string;
  59. /** @deprecated - please use `isOpen` instead */
  60. _isOpen: boolean;
  61. /** @deprecated - please use `isDisabled` instead */
  62. _enable: boolean;
  63. /** @deprecated - please use `container="body"` instead */
  64. _appendToBody: boolean;
  65. /** @deprecated - removed, will be added to configuration */
  66. tooltipAnimation: boolean;
  67. /** @deprecated - will replaced with customClass */
  68. _popupClass: string;
  69. /** @deprecated - removed */
  70. _tooltipContext: any;
  71. /** @deprecated */
  72. _tooltipPopupDelay: number;
  73. /** @deprecated */
  74. tooltipFadeDuration: number;
  75. /** @deprecated - please use `triggers` instead */
  76. _tooltipTrigger: string | string[];
  77. ariaDescribedby: string;
  78. /** @deprecated */
  79. tooltipStateChanged: EventEmitter<boolean>;
  80. protected _delayTimeoutId: number | any;
  81. protected _tooltipCancelShowFn: Function;
  82. private _tooltip;
  83. constructor(_viewContainerRef: ViewContainerRef, cis: ComponentLoaderFactory, config: TooltipConfig, _elementRef: ElementRef, _renderer: Renderer2, _positionService: PositioningService);
  84. ngOnInit(): void;
  85. /**
  86. * Toggles an element’s tooltip. This is considered a “manual” triggering of
  87. * the tooltip.
  88. */
  89. toggle(): void;
  90. /**
  91. * Opens an element’s tooltip. This is considered a “manual” triggering of
  92. * the tooltip.
  93. */
  94. show(): void;
  95. /**
  96. * Closes an element’s tooltip. This is considered a “manual” triggering of
  97. * the tooltip.
  98. */
  99. hide(): void;
  100. ngOnDestroy(): void;
  101. }