1 | import { AfterContentChecked, EventEmitter, QueryList, TemplateRef } from '@angular/core';
|
2 | import { NgbAccordionConfig } from './accordion-config';
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | export interface NgbPanelHeaderContext {
|
9 | |
10 |
|
11 |
|
12 | opened: boolean;
|
13 | }
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 | export declare class NgbPanelHeader {
|
24 | templateRef: TemplateRef<any>;
|
25 | constructor(templateRef: TemplateRef<any>);
|
26 | }
|
27 | /**
|
28 | * A directive that wraps only the panel title with HTML markup inside.
|
29 | *
|
30 | * You can also use [`NgbPanelHeader`](#/components/accordion/api#NgbPanelHeader) to customize the full panel header.
|
31 | */
|
32 | export declare class NgbPanelTitle {
|
33 | templateRef: TemplateRef<any>;
|
34 | constructor(templateRef: TemplateRef<any>);
|
35 | }
|
36 | /**
|
37 | * A directive that wraps the accordion panel content.
|
38 | */
|
39 | export declare class NgbPanelContent {
|
40 | templateRef: TemplateRef<any>;
|
41 | constructor(templateRef: TemplateRef<any>);
|
42 | }
|
43 | /**
|
44 | * A directive that wraps an individual accordion panel with title and collapsible content.
|
45 | */
|
46 | export declare class NgbPanel implements AfterContentChecked {
|
47 | |
48 |
|
49 |
|
50 | disabled: boolean;
|
51 | |
52 |
|
53 |
|
54 |
|
55 |
|
56 | id: string;
|
57 | isOpen: boolean;
|
58 | |
59 |
|
60 |
|
61 |
|
62 |
|
63 | title: string;
|
64 | |
65 |
|
66 |
|
67 |
|
68 |
|
69 |
|
70 | type: string;
|
71 | |
72 |
|
73 |
|
74 |
|
75 |
|
76 | cardClass: string;
|
77 | titleTpl: NgbPanelTitle;
|
78 | headerTpl: NgbPanelHeader;
|
79 | contentTpl: NgbPanelContent;
|
80 | titleTpls: QueryList<NgbPanelTitle>;
|
81 | headerTpls: QueryList<NgbPanelHeader>;
|
82 | contentTpls: QueryList<NgbPanelContent>;
|
83 | ngAfterContentChecked(): void;
|
84 | }
|
85 |
|
86 |
|
87 |
|
88 | export interface NgbPanelChangeEvent {
|
89 | |
90 |
|
91 |
|
92 | panelId: string;
|
93 | |
94 |
|
95 |
|
96 |
|
97 |
|
98 | nextState: boolean;
|
99 | |
100 |
|
101 |
|
102 | preventDefault: () => void;
|
103 | }
|
104 |
|
105 |
|
106 |
|
107 |
|
108 |
|
109 |
|
110 | export declare class NgbAccordion implements AfterContentChecked {
|
111 | panels: QueryList<NgbPanel>;
|
112 | |
113 |
|
114 |
|
115 |
|
116 |
|
117 |
|
118 | activeIds: string | readonly string[];
|
119 | |
120 |
|
121 |
|
122 |
|
123 |
|
124 | closeOtherPanels: boolean;
|
125 | |
126 |
|
127 |
|
128 | destroyOnHide: boolean;
|
129 | |
130 |
|
131 |
|
132 |
|
133 |
|
134 |
|
135 | type: string;
|
136 | |
137 |
|
138 |
|
139 |
|
140 |
|
141 | panelChange: EventEmitter<NgbPanelChangeEvent>;
|
142 | constructor(config: NgbAccordionConfig);
|
143 | /**
|
144 | * Checks if a panel with a given id is expanded.
|
145 | */
|
146 | isExpanded(panelId: string): boolean;
|
147 | /**
|
148 | * Expands a panel with a given id.
|
149 | *
|
150 | * Has no effect if the panel is already expanded or disabled.
|
151 | */
|
152 | expand(panelId: string): void;
|
153 | /**
|
154 | * Expands all panels, if `[closeOthers]` is `false`.
|
155 | *
|
156 | * If `[closeOthers]` is `true`, it will expand the first panel, unless there is already a panel opened.
|
157 | */
|
158 | expandAll(): void;
|
159 | /**
|
160 | * Collapses a panel with the given id.
|
161 | *
|
162 | * Has no effect if the panel is already collapsed or disabled.
|
163 | */
|
164 | collapse(panelId: string): void;
|
165 | /**
|
166 | * Collapses all opened panels.
|
167 | */
|
168 | collapseAll(): void;
|
169 | /**
|
170 | * Toggles a panel with the given id.
|
171 | *
|
172 | * Has no effect if the panel is disabled.
|
173 | */
|
174 | toggle(panelId: string): void;
|
175 | ngAfterContentChecked(): void;
|
176 | private _changeOpenState;
|
177 | private _closeOthers;
|
178 | private _findPanelById;
|
179 | private _updateActiveIds;
|
180 | }
|
181 | /**
|
182 | * A directive to put on a button that toggles panel opening and closing.
|
183 | *
|
184 | * To be used inside the [`NgbPanelHeader`](#/components/accordion/api#NgbPanelHeader)
|
185 | *
|
186 | * @since 4.1.0
|
187 | */
|
188 | export declare class NgbPanelToggle {
|
189 | accordion: NgbAccordion;
|
190 | panel: NgbPanel;
|
191 | static ngAcceptInputType_ngbPanelToggle: NgbPanel | '';
|
192 | set ngbPanelToggle(panel: NgbPanel);
|
193 | constructor(accordion: NgbAccordion, panel: NgbPanel);
|
194 | }
|