import * as i0 from '@angular/core'; import { EventEmitter, ElementRef, ChangeDetectorRef, OnDestroy, AfterContentInit } from '@angular/core'; import { AnimationReferenceMetadata } from '@angular/animations'; import { IBaseEventArgs, CancelableEventArgs, AnimationPlayer, AnimationService } from 'igniteui-angular/core'; import { Subject } from 'rxjs'; interface IgxExpansionPanelBase { id: string; cssClass: string; /** @hidden @internal */ headerId: string; collapsed: boolean; animationSettings: { openAnimation: AnimationReferenceMetadata; closeAnimation: AnimationReferenceMetadata; }; contentCollapsed: EventEmitter; contentCollapsing: EventEmitter; contentExpanded: EventEmitter; contentExpanding: EventEmitter; collapse(evt?: Event): any; expand(evt?: Event): any; toggle(evt?: Event): any; } interface IExpansionPanelEventArgs extends IBaseEventArgs { event: Event; } interface IExpansionPanelCancelableEventArgs extends IExpansionPanelEventArgs, CancelableEventArgs { } declare abstract class HeaderContentBaseDirective { protected element: ElementRef; /** * Returns the `textContent` of an element * * ```html * * Tooltip content * * ``` * * or the `title` content * * ```html * * * ``` * * If both are provided, returns the `title` content. * * @param element * @returns tooltip content for an element */ getTooltipContent: (element: ElementRef) => string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class IgxExpansionPanelBodyComponent { panel: IgxExpansionPanelBase; element: ElementRef; cdr: ChangeDetectorRef; /** * @hidden */ cssClass: string; /** * Gets/sets the `role` attribute of the panel body * Default is 'region'; * Get * ```typescript * const currentRole = this.panel.body.role; * ``` * Set * ```typescript * this.panel.body.role = 'content'; * ``` * ```html * * ``` */ role: string; private _labelledBy; private _label; /** * Gets the `aria-label` attribute of the panel body * Defaults to the panel id with '-region' in the end; * Get * ```typescript * const currentLabel = this.panel.body.label; * ``` */ get label(): string; /** * Sets the `aria-label` attribute of the panel body * ```typescript * this.panel.body.label = 'my-custom-label'; * ``` * ```html * * ``` */ set label(val: string); /** * Gets the `aria-labelledby` attribute of the panel body * Defaults to the panel header id; * Get * ```typescript * const currentLabel = this.panel.body.labelledBy; * ``` */ get labelledBy(): string; /** * Sets the `aria-labelledby` attribute of the panel body * ```typescript * this.panel.body.labelledBy = 'my-custom-id'; * ``` * ```html * * ``` */ set labelledBy(val: string); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * @hidden */ declare const ExpansionPanelHeaderIconPosition: { readonly LEFT: "left"; readonly NONE: "none"; readonly RIGHT: "right"; }; type ExpansionPanelHeaderIconPosition = (typeof ExpansionPanelHeaderIconPosition)[keyof typeof ExpansionPanelHeaderIconPosition]; declare class IgxExpansionPanelHeaderComponent { panel: IgxExpansionPanelBase; cdr: ChangeDetectorRef; elementRef: ElementRef; /** * Returns a reference to the `igx-expansion-panel-icon` element; * If `iconPosition` is `NONE` - return null; */ get iconRef(): ElementRef; /** * @hidden */ set iconTemplate(val: boolean); /** * @hidden */ get iconTemplate(): boolean; /** * Gets/sets the `aria-level` attribute of the header * Get * ```typescript * const currentAriaLevel = this.panel.header.lv; * ``` * Set * ```typescript * this.panel.header.lv = '5'; * ``` * ```html * * ``` */ lv: string; /** * Gets/sets the `role` attribute of the header * Get * ```typescript * const currentRole = this.panel.header.role; * ``` * Set * ```typescript * this.panel.header.role = '5'; * ``` * ```html * * ``` */ role: string; /** * @hidden */ get controls(): string; /** * @hidden @internal */ get innerElement(): any; /** * Gets/sets the position of the expansion-panel-header expand/collapse icon * Accepts `left`, `right` or `none` * ```typescript * const currentIconPosition = this.panel.header.iconPosition; * ``` * Set * ```typescript * this.panel.header.iconPosition = 'left'; * ``` * ```html * * ``` */ iconPosition: ExpansionPanelHeaderIconPosition; /** * Emitted whenever a user interacts with the header host * ```typescript * handleInteraction(event: IExpansionPanelCancelableEventArgs) { * ... * } * ``` * ```html * * ... * * ``` */ interaction: EventEmitter; /** * @hidden */ cssClass: string; /** * @hidden */ get isExpanded(): boolean; /** * Gets/sets the whether the header is disabled * When disabled, the header will not handle user events and will stop their propagation * * ```typescript * const isDisabled = this.panel.header.disabled; * ``` * Set * ```typescript * this.panel.header.disabled = true; * ``` * ```html * * ... * * ``` */ get disabled(): boolean; set disabled(val: boolean); /** @hidden @internal */ private customIconRef; /** @hidden @internal */ private defaultIconRef; /** * Sets/gets the `id` of the expansion panel header. * ```typescript * let panelHeaderId = this.panel.header.id; * ``` * * @memberof IgxExpansionPanelComponent */ id: string; /** @hidden @internal */ tabIndex: number; private _iconTemplate; private _disabled; constructor(); /** * @hidden */ onAction(evt?: Event): void; /** @hidden @internal */ openPanel(event: KeyboardEvent): void; /** @hidden @internal */ closePanel(event: KeyboardEvent): void; /** * @hidden */ get iconPositionClass(): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; static ngAcceptInputType_disabled: unknown; } /**@hidden @internal */ interface ToggleAnimationSettings { openAnimation: AnimationReferenceMetadata; closeAnimation: AnimationReferenceMetadata; } interface ToggleAnimationOwner { animationSettings: ToggleAnimationSettings; openAnimationStart: EventEmitter; openAnimationDone: EventEmitter; closeAnimationStart: EventEmitter; closeAnimationDone: EventEmitter; openAnimationPlayer: AnimationPlayer; closeAnimationPlayer: AnimationPlayer; playOpenAnimation(element: ElementRef, onDone: () => void): void; playCloseAnimation(element: ElementRef, onDone: () => void): void; } /**@hidden @internal */ declare abstract class ToggleAnimationPlayer implements ToggleAnimationOwner, OnDestroy { protected animationService: AnimationService; /** @hidden @internal */ openAnimationDone: EventEmitter; /** @hidden @internal */ closeAnimationDone: EventEmitter; /** @hidden @internal */ openAnimationStart: EventEmitter; /** @hidden @internal */ closeAnimationStart: EventEmitter; get animationSettings(): ToggleAnimationSettings; set animationSettings(value: ToggleAnimationSettings); /** @hidden @internal */ openAnimationPlayer: AnimationPlayer; /** @hidden @internal */ closeAnimationPlayer: AnimationPlayer; protected destroy$: Subject; protected players: Map; protected _animationSettings: ToggleAnimationSettings; private closeInterrupted; private openInterrupted; private _defaultClosedCallback; private _defaultOpenedCallback; private onClosedCallback; private onOpenedCallback; /** @hidden @internal */ playOpenAnimation(targetElement: ElementRef, onDone?: () => void): void; /** @hidden @internal */ playCloseAnimation(targetElement: ElementRef, onDone?: () => void): void; /** @hidden @internal */ ngOnDestroy(): void; private startPlayer; private initializePlayer; private onDoneHandler; private setCallback; private cleanUpPlayer; private getPlayer; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class IgxExpansionPanelComponent extends ToggleAnimationPlayer implements IgxExpansionPanelBase, AfterContentInit { private cdr; private elementRef; /** * Sets/gets the animation settings of the expansion panel component * Open and Close animation should be passed * * Get * ```typescript * const currentAnimations = this.panel.animationSettings; * ``` * Set * ```typescript * import { slideInLeft, slideOutRight } from 'igniteui-angular'; * ... * this.panel.animationsSettings = { * openAnimation: slideInLeft, * closeAnimation: slideOutRight * }; * ``` * or via template * ```typescript * import { slideInLeft, slideOutRight } from 'igniteui-angular'; * ... * myCustomAnimationObject = { * openAnimation: slideInLeft, * closeAnimation: slideOutRight * }; * ```html * * ... * * ``` */ get animationSettings(): ToggleAnimationSettings; set animationSettings(value: ToggleAnimationSettings); /** * Sets/gets the `id` of the expansion panel component. * If not set, `id` will have value `"igx-expansion-panel-0"`; * ```html * * ``` * ```typescript * let panelId = this.panel.id; * ``` * * @memberof IgxExpansionPanelComponent */ id: string; /** * @hidden */ cssClass: string; /** * @hidden */ protected opened: boolean; /** * @hidden @internal */ get panelExpanded(): boolean; /** * Gets/sets whether the component is collapsed (its content is hidden) * Get * ```typescript * const myPanelState: boolean = this.panel.collapsed; * ``` * Set * ```html * this.panel.collapsed = true; * ``` * * Two-way data binding: * ```html * * ``` */ collapsed: boolean; /** * @hidden */ collapsedChange: EventEmitter; /** * Emitted when the expansion panel starts collapsing * ```typescript * handleCollapsing(event: IExpansionPanelCancelableEventArgs) * ``` * ```html * * ... * * ``` */ contentCollapsing: EventEmitter; /** * Emitted when the expansion panel finishes collapsing * ```typescript * handleCollapsed(event: IExpansionPanelEventArgs) * ``` * ```html * * ... * * ``` */ contentCollapsed: EventEmitter; /** * Emitted when the expansion panel starts expanding * ```typescript * handleExpanding(event: IExpansionPanelCancelableEventArgs) * ``` * ```html * * ... * * ``` */ contentExpanding: EventEmitter; /** * Emitted when the expansion panel finishes expanding * ```typescript * handleExpanded(event: IExpansionPanelEventArgs) * ``` * ```html * * ... * * ``` */ contentExpanded: EventEmitter; /** * @hidden */ get headerId(): string; /** * @hidden @internal */ get nativeElement(): any; /** * @hidden */ body: IgxExpansionPanelBodyComponent; /** * @hidden */ header: IgxExpansionPanelHeaderComponent; /** @hidden */ ngAfterContentInit(): void; /** * Collapses the panel * * ```html * * ... * * * ``` */ collapse(evt?: Event): void; /** * Expands the panel * * ```html * * ... * * * ``` */ expand(evt?: Event): void; /** * Toggles the panel * * ```html * * ... * * * ``` */ toggle(evt?: Event): void; open(evt?: Event): void; close(evt?: Event): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; static ngAcceptInputType_collapsed: unknown; } /** @hidden @internal */ declare class IgxExpansionPanelTitleDirective extends HeaderContentBaseDirective { cssClass: string; private get title(); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** @hidden @internal */ declare class IgxExpansionPanelDescriptionDirective extends HeaderContentBaseDirective { cssClass: string; private get title(); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** @hidden @internal */ declare class IgxExpansionPanelIconDirective { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare const IGX_EXPANSION_PANEL_DIRECTIVES: readonly [typeof IgxExpansionPanelComponent, typeof IgxExpansionPanelHeaderComponent, typeof IgxExpansionPanelBodyComponent, typeof IgxExpansionPanelDescriptionDirective, typeof IgxExpansionPanelTitleDirective, typeof IgxExpansionPanelIconDirective]; /** * @hidden * IMPORTANT: The following is NgModule exported for backwards-compatibility before standalone components */ declare class IgxExpansionPanelModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export { ExpansionPanelHeaderIconPosition, IGX_EXPANSION_PANEL_DIRECTIVES, IgxExpansionPanelBodyComponent, IgxExpansionPanelComponent, IgxExpansionPanelDescriptionDirective, IgxExpansionPanelHeaderComponent, IgxExpansionPanelIconDirective, IgxExpansionPanelModule, IgxExpansionPanelTitleDirective, ToggleAnimationPlayer }; export type { IExpansionPanelCancelableEventArgs, IExpansionPanelEventArgs, IgxExpansionPanelBase, ToggleAnimationSettings };