1 | /**
|
---|
2 | * @license
|
---|
3 | * Copyright Google LLC All Rights Reserved.
|
---|
4 | *
|
---|
5 | * Use of this source code is governed by an MIT-style license that can be
|
---|
6 | * found in the LICENSE file at https://angular.io/license
|
---|
7 | */
|
---|
8 | import { EventEmitter, OnDestroy, ChangeDetectorRef } from '@angular/core';
|
---|
9 | import { UniqueSelectionDispatcher } from '@angular/cdk/collections';
|
---|
10 | import { CdkAccordion } from './accordion';
|
---|
11 | import { BooleanInput } from '@angular/cdk/coercion';
|
---|
12 | /**
|
---|
13 | * An basic directive expected to be extended and decorated as a component. Sets up all
|
---|
14 | * events and attributes needed to be managed by a CdkAccordion parent.
|
---|
15 | */
|
---|
16 | export declare class CdkAccordionItem implements OnDestroy {
|
---|
17 | accordion: CdkAccordion;
|
---|
18 | private _changeDetectorRef;
|
---|
19 | protected _expansionDispatcher: UniqueSelectionDispatcher;
|
---|
20 | /** Subscription to openAll/closeAll events. */
|
---|
21 | private _openCloseAllSubscription;
|
---|
22 | /** Event emitted every time the AccordionItem is closed. */
|
---|
23 | readonly closed: EventEmitter<void>;
|
---|
24 | /** Event emitted every time the AccordionItem is opened. */
|
---|
25 | readonly opened: EventEmitter<void>;
|
---|
26 | /** Event emitted when the AccordionItem is destroyed. */
|
---|
27 | readonly destroyed: EventEmitter<void>;
|
---|
28 | /**
|
---|
29 | * Emits whenever the expanded state of the accordion changes.
|
---|
30 | * Primarily used to facilitate two-way binding.
|
---|
31 | * @docs-private
|
---|
32 | */
|
---|
33 | readonly expandedChange: EventEmitter<boolean>;
|
---|
34 | /** The unique AccordionItem id. */
|
---|
35 | readonly id: string;
|
---|
36 | /** Whether the AccordionItem is expanded. */
|
---|
37 | get expanded(): boolean;
|
---|
38 | set expanded(expanded: boolean);
|
---|
39 | private _expanded;
|
---|
40 | /** Whether the AccordionItem is disabled. */
|
---|
41 | get disabled(): boolean;
|
---|
42 | set disabled(disabled: boolean);
|
---|
43 | private _disabled;
|
---|
44 | /** Unregister function for _expansionDispatcher. */
|
---|
45 | private _removeUniqueSelectionListener;
|
---|
46 | constructor(accordion: CdkAccordion, _changeDetectorRef: ChangeDetectorRef, _expansionDispatcher: UniqueSelectionDispatcher);
|
---|
47 | /** Emits an event for the accordion item being destroyed. */
|
---|
48 | ngOnDestroy(): void;
|
---|
49 | /** Toggles the expanded state of the accordion item. */
|
---|
50 | toggle(): void;
|
---|
51 | /** Sets the expanded state of the accordion item to false. */
|
---|
52 | close(): void;
|
---|
53 | /** Sets the expanded state of the accordion item to true. */
|
---|
54 | open(): void;
|
---|
55 | private _subscribeToOpenCloseAllActions;
|
---|
56 | static ngAcceptInputType_expanded: BooleanInput;
|
---|
57 | static ngAcceptInputType_disabled: BooleanInput;
|
---|
58 | }
|
---|