1 | import { AfterContentChecked, AfterContentInit, ChangeDetectorRef, EventEmitter, OnDestroy } from '@angular/core';
|
2 | import { NgbAccordionConfig } from './accordion-config';
|
3 | import { NgbCollapse } from '../collapse/collapse';
|
4 | import * as i0 from "@angular/core";
|
5 | import * as i1 from "../collapse/collapse";
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 | export declare class NgbAccordionBody implements AfterContentChecked, OnDestroy {
|
15 | private _appRef;
|
16 | private _element;
|
17 | private _item;
|
18 | private _viewRef;
|
19 | private _bodyTpl;
|
20 | ngAfterContentChecked(): void;
|
21 | ngOnDestroy(): void;
|
22 | private _destroyViewIfExists;
|
23 | private _createViewIfNotExists;
|
24 | static ɵfac: i0.ɵɵFactoryDeclaration<NgbAccordionBody, never>;
|
25 | static ɵdir: i0.ɵɵDirectiveDeclaration<NgbAccordionBody, "[ngbAccordionBody]", never, {}, {}, ["_bodyTpl"], never, true, never>;
|
26 | }
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 | export declare class NgbAccordionCollapse {
|
35 | item: NgbAccordionItem;
|
36 | ngbCollapse: NgbCollapse;
|
37 | constructor(item: NgbAccordionItem, ngbCollapse: NgbCollapse);
|
38 | static ɵfac: i0.ɵɵFactoryDeclaration<NgbAccordionCollapse, never>;
|
39 | static ɵdir: i0.ɵɵDirectiveDeclaration<NgbAccordionCollapse, "[ngbAccordionCollapse]", ["ngbAccordionCollapse"], {}, {}, never, never, true, [{ directive: typeof i1.NgbCollapse; inputs: {}; outputs: {}; }]>;
|
40 | }
|
41 |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 | export declare class NgbAccordionToggle {
|
50 | item: NgbAccordionItem;
|
51 | accordion: NgbAccordionDirective;
|
52 | constructor(item: NgbAccordionItem, accordion: NgbAccordionDirective);
|
53 | static ɵfac: i0.ɵɵFactoryDeclaration<NgbAccordionToggle, never>;
|
54 | static ɵdir: i0.ɵɵDirectiveDeclaration<NgbAccordionToggle, "[ngbAccordionToggle]", never, {}, {}, never, never, true, never>;
|
55 | }
|
56 |
|
57 |
|
58 |
|
59 |
|
60 |
|
61 |
|
62 |
|
63 | export declare class NgbAccordionButton {
|
64 | item: NgbAccordionItem;
|
65 | constructor(item: NgbAccordionItem);
|
66 | static ɵfac: i0.ɵɵFactoryDeclaration<NgbAccordionButton, never>;
|
67 | static ɵdir: i0.ɵɵDirectiveDeclaration<NgbAccordionButton, "button[ngbAccordionButton]", never, {}, {}, never, never, true, [{ directive: typeof NgbAccordionToggle; inputs: {}; outputs: {}; }]>;
|
68 | }
|
69 |
|
70 |
|
71 |
|
72 |
|
73 |
|
74 | export declare class NgbAccordionHeader {
|
75 | item: NgbAccordionItem;
|
76 | constructor(item: NgbAccordionItem);
|
77 | static ɵfac: i0.ɵɵFactoryDeclaration<NgbAccordionHeader, never>;
|
78 | static ɵdir: i0.ɵɵDirectiveDeclaration<NgbAccordionHeader, "[ngbAccordionHeader]", never, {}, {}, never, never, true, never>;
|
79 | }
|
80 |
|
81 |
|
82 |
|
83 |
|
84 |
|
85 |
|
86 |
|
87 |
|
88 |
|
89 |
|
90 | export declare class NgbAccordionItem implements AfterContentInit, OnDestroy {
|
91 | private _accordion;
|
92 | private _cd;
|
93 | constructor(_accordion: NgbAccordionDirective, _cd: ChangeDetectorRef);
|
94 | private _subscriptions;
|
95 | private _collapsed;
|
96 | private _id;
|
97 | animatingBodyCollapse: boolean;
|
98 | private _collapse;
|
99 | /**
|
100 | * Sets the custom ID of the accordion item. It must be unique for the document.
|
101 | *
|
102 | * @param id The ID of the accordion item, must be a non-empty string
|
103 | */
|
104 | set id(id: string);
|
105 | /**
|
106 | * If `true`, the content of the accordion item's body will be removed from the DOM. It will be just hidden otherwise.
|
107 | *
|
108 | * This property can also be set up on the parent [`NgbAccordion` directive](#/components/accordion/api#NgbAccordionDirective).
|
109 | */
|
110 | destroyOnHide: boolean;
|
111 | /**
|
112 | * If `true`, the accordion item will be disabled.
|
113 | * It won't react to user's clicks, but still will be toggelable programmatically.
|
114 | */
|
115 | disabled: boolean;
|
116 | /**
|
117 | * If `true`, the accordion item will be collapsed. Otherwise, it will be expanded.
|
118 | *
|
119 | * @param collapsed New state of the accordion item.
|
120 | */
|
121 | set collapsed(collapsed: boolean);
|
122 | /**
|
123 | * Event emitted when the expanding animation is finished. It has no payload.
|
124 | */
|
125 | shown: EventEmitter<void>;
|
126 | /**
|
127 | * Event emitted when the collapsing animation is finished and before the content is removed from DOM.
|
128 | * It has no payload.
|
129 | */
|
130 | hidden: EventEmitter<void>;
|
131 | get collapsed(): boolean;
|
132 | get id(): string;
|
133 | get toggleId(): string;
|
134 | get collapseId(): string;
|
135 | ngAfterContentInit(): void;
|
136 | ngOnDestroy(): void;
|
137 | /**
|
138 | * Toggles an accordion item.
|
139 | */
|
140 | toggle(): void;
|
141 | /**
|
142 | * Expands an accordion item.
|
143 | */
|
144 | expand(): void;
|
145 | /**
|
146 | * Collapses an accordion item.
|
147 | */
|
148 | collapse(): void;
|
149 | static ɵfac: i0.ɵɵFactoryDeclaration<NgbAccordionItem, never>;
|
150 | static ɵdir: i0.ɵɵDirectiveDeclaration<NgbAccordionItem, "[ngbAccordionItem]", ["ngbAccordionItem"], { "id": { "alias": "ngbAccordionItem"; "required": false; }; "destroyOnHide": { "alias": "destroyOnHide"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "collapsed": { "alias": "collapsed"; "required": false; }; }, { "shown": "shown"; "hidden": "hidden"; }, ["_collapse"], never, true, never>;
|
151 | }
|
152 |
|
153 |
|
154 |
|
155 |
|
156 |
|
157 |
|
158 |
|
159 | export declare class NgbAccordionDirective {
|
160 | private _items?;
|
161 | |
162 |
|
163 |
|
164 | animation: boolean;
|
165 | |
166 |
|
167 |
|
168 | closeOthers: boolean;
|
169 | |
170 |
|
171 |
|
172 |
|
173 |
|
174 | destroyOnHide: boolean;
|
175 | |
176 |
|
177 |
|
178 | shown: EventEmitter<string>;
|
179 | |
180 |
|
181 |
|
182 |
|
183 | hidden: EventEmitter<string>;
|
184 | private _anItemWasAlreadyExpandedDuringInitialisation;
|
185 | constructor(config: NgbAccordionConfig);
|
186 | /**
|
187 | * Toggles an item with the given id.
|
188 | *
|
189 | * It will toggle an item, even if it is disabled.
|
190 | *
|
191 | * @param itemId The id of the item to toggle.
|
192 | */
|
193 | toggle(itemId: string): void;
|
194 | /**
|
195 | * Expands an item with the given id.
|
196 | *
|
197 | * If `closeOthers` is `true`, it will collapse other panels.
|
198 | *
|
199 | * @param itemId The id of the item to expand.
|
200 | */
|
201 | expand(itemId: string): void;
|
202 | /**
|
203 | * Expands all items.
|
204 | *
|
205 | * If `closeOthers` is `true` and all items are closed, it will open the first one. Otherwise, it will keep the opened one.
|
206 | */
|
207 | expandAll(): void;
|
208 | /**
|
209 | * Collapses an item with the given id.
|
210 | *
|
211 | * Has no effect if the `itemId` does not correspond to any item.
|
212 | *
|
213 | * @param itemId The id of the item to collapse.
|
214 | */
|
215 | collapse(itemId: string): void;
|
216 | /**
|
217 | * Collapses all items.
|
218 | */
|
219 | collapseAll(): void;
|
220 | /**
|
221 | * Checks if an item with the given id is expanded.
|
222 | *
|
223 | * If the `itemId` does not correspond to any item, it returns `false`.
|
224 | *
|
225 | * @param itemId The id of the item to check.
|
226 | */
|
227 | isExpanded(itemId: string): boolean;
|
228 | /**
|
229 | * It checks, if the item can be expanded in the current state of the accordion.
|
230 | * With `closeOthers` there can be only one expanded item at a time.
|
231 | *
|
232 | * @internal
|
233 | */
|
234 | _ensureCanExpand(toExpand: NgbAccordionItem): boolean;
|
235 | private _getItem;
|
236 | static ɵfac: i0.ɵɵFactoryDeclaration<NgbAccordionDirective, never>;
|
237 | static ɵdir: i0.ɵɵDirectiveDeclaration<NgbAccordionDirective, "[ngbAccordion]", ["ngbAccordion"], { "animation": { "alias": "animation"; "required": false; }; "closeOthers": { "alias": "closeOthers"; "required": false; }; "destroyOnHide": { "alias": "destroyOnHide"; "required": false; }; }, { "shown": "shown"; "hidden": "hidden"; }, ["_items"], never, true, never>;
|
238 | }
|