bs-dropdown.directive.d.ts 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. import { ElementRef, EventEmitter, OnDestroy, OnInit, Renderer2, ViewContainerRef } from '@angular/core';
  2. import { ComponentLoaderFactory } from 'ngx-bootstrap/component-loader';
  3. import { BsDropdownConfig } from './bs-dropdown.config';
  4. import { BsDropdownState } from './bs-dropdown.state';
  5. import { AnimationBuilder } from '@angular/animations';
  6. export declare class BsDropdownDirective implements OnInit, OnDestroy {
  7. private _elementRef;
  8. private _renderer;
  9. private _viewContainerRef;
  10. private _cis;
  11. private _state;
  12. private _config;
  13. /**
  14. * Placement of a popover. Accepts: "top", "bottom", "left", "right"
  15. */
  16. placement: string;
  17. /**
  18. * Specifies events that should trigger. Supports a space separated list of
  19. * event names.
  20. */
  21. triggers: string;
  22. /**
  23. * A selector specifying the element the popover should be appended to.
  24. */
  25. container: string;
  26. /**
  27. * This attribute indicates that the dropdown should be opened upwards
  28. */
  29. dropup: boolean;
  30. /**
  31. * Indicates that dropdown will be closed on item or document click,
  32. * and after pressing ESC
  33. */
  34. autoClose: boolean;
  35. /**
  36. * Indicates that dropdown will be animated
  37. */
  38. isAnimated: boolean;
  39. /**
  40. * This attribute indicates that the dropdown shouldn't close on inside click when autoClose is set to true
  41. */
  42. insideClick: boolean;
  43. /**
  44. * Disables dropdown toggle and hides dropdown menu if opened
  45. */
  46. isDisabled: boolean;
  47. /**
  48. * Returns whether or not the popover is currently being shown
  49. */
  50. isOpen: boolean;
  51. /**
  52. * Emits an event when isOpen change
  53. */
  54. isOpenChange: EventEmitter<boolean>;
  55. /**
  56. * Emits an event when the popover is shown
  57. */
  58. onShown: EventEmitter<boolean>;
  59. /**
  60. * Emits an event when the popover is hidden
  61. */
  62. onHidden: EventEmitter<boolean>;
  63. readonly isBs4: boolean;
  64. private _dropdown;
  65. private readonly _showInline;
  66. private _isInlineOpen;
  67. private _inlinedMenu;
  68. private _isDisabled;
  69. private _subscriptions;
  70. private _isInited;
  71. private _factoryDropDownAnimation;
  72. constructor(_elementRef: ElementRef, _renderer: Renderer2, _viewContainerRef: ViewContainerRef, _cis: ComponentLoaderFactory, _state: BsDropdownState, _config: BsDropdownConfig, _builder: AnimationBuilder);
  73. ngOnInit(): void;
  74. /**
  75. * Opens an element’s popover. This is considered a “manual” triggering of
  76. * the popover.
  77. */
  78. show(): void;
  79. /**
  80. * Closes an element’s popover. This is considered a “manual” triggering of
  81. * the popover.
  82. */
  83. hide(): void;
  84. /**
  85. * Toggles an element’s popover. This is considered a “manual” triggering of
  86. * the popover. With parameter <code>true</code> allows toggling, with parameter <code>false</code>
  87. * only hides opened dropdown. Parameter usage will be removed in ngx-bootstrap v3
  88. */
  89. toggle(value?: boolean): void;
  90. /** @internal */
  91. _contains(event: any): boolean;
  92. ngOnDestroy(): void;
  93. private addBs4Polyfills;
  94. private playAnimation;
  95. private addShowClass;
  96. private removeShowClass;
  97. private checkRightAlignment;
  98. private addDropupStyles;
  99. private removeDropupStyles;
  100. }