UNPKG

2.28 kBTypeScriptView Raw
1import { ElementRef, EventEmitter, NgZone, OnInit } from '@angular/core';
2import { NgbCollapseConfig } from './collapse-config';
3import * as i0 from "@angular/core";
4/**
5 * A directive to provide a simple way of hiding and showing elements on the
6 * page.
7 */
8export declare class NgbCollapse implements OnInit {
9 private _element;
10 private _zone;
11 /**
12 * If `true`, collapse will be animated.
13 *
14 * Animation is triggered only when clicked on triggering element
15 * or via the `.toggle()` function
16 *
17 * @since 8.0.0
18 */
19 animation: any;
20 /**
21 * Flag used to track if the collapse setter is invoked during initialization
22 * or not. This distinction is made in order to avoid running the transition during initialization.
23 */
24 private _afterInit;
25 private _isCollapsed;
26 /**
27 * If `true`, will collapse the element or show it otherwise.
28 */
29 set collapsed(isCollapsed: boolean);
30 ngbCollapseChange: EventEmitter<boolean>;
31 /**
32 * If `true`, will collapse horizontally.
33 *
34 * @since 13.1.0
35 */
36 horizontal: boolean;
37 /**
38 * An event emitted when the collapse element is shown, after the transition.
39 * It has no payload.
40 *
41 * @since 8.0.0
42 */
43 shown: EventEmitter<void>;
44 /**
45 * An event emitted when the collapse element is hidden, after the transition.
46 * It has no payload.
47 *
48 * @since 8.0.0
49 */
50 hidden: EventEmitter<void>;
51 constructor(_element: ElementRef, config: NgbCollapseConfig, _zone: NgZone);
52 ngOnInit(): void;
53 /**
54 * Triggers collapsing programmatically.
55 *
56 * If there is a collapsing transition running already, it will be reversed.
57 * If the animations are turned off this happens synchronously.
58 *
59 * @since 8.0.0
60 */
61 toggle(open?: boolean): void;
62 private _runTransition;
63 private _runTransitionWithEvents;
64 static ɵfac: i0.ɵɵFactoryDeclaration<NgbCollapse, never>;
65 static ɵdir: i0.ɵɵDirectiveDeclaration<NgbCollapse, "[ngbCollapse]", ["ngbCollapse"], { "animation": "animation"; "collapsed": "ngbCollapse"; "horizontal": "horizontal"; }, { "ngbCollapseChange": "ngbCollapseChange"; "shown": "shown"; "hidden": "hidden"; }, never, never, false>;
66}