blob: c4b5f7825b5235c671f4e0767bb983b6f541abef [file] [log] [blame]
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/cdk/collections"),require("@angular/cdk/coercion"),require("rxjs")):"function"==typeof define&&define.amd?define("@angular/cdk/accordion",["exports","@angular/core","@angular/cdk/collections","@angular/cdk/coercion","rxjs"],t):t(((e=e||self).ng=e.ng||{},e.ng.cdk=e.ng.cdk||{},e.ng.cdk.accordion={}),e.ng.core,e.ng.cdk.collections,e.ng.cdk.coercion,e.rxjs)}(this,(function(e,t,o,n,i){"use strict";
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/var c=0,r=new t.InjectionToken("CdkAccordion"),s=function(){function e(){this._stateChanges=new i.Subject,this._openCloseAllActions=new i.Subject,this.id="cdk-accordion-"+c++,this._multi=!1}return Object.defineProperty(e.prototype,"multi",{get:function(){return this._multi},set:function(e){this._multi=n.coerceBooleanProperty(e)},enumerable:!1,configurable:!0}),e.prototype.openAll=function(){this._multi&&this._openCloseAllActions.next(!0)},e.prototype.closeAll=function(){this._openCloseAllActions.next(!1)},e.prototype.ngOnChanges=function(e){this._stateChanges.next(e)},e.prototype.ngOnDestroy=function(){this._stateChanges.complete(),this._openCloseAllActions.complete()},e}();s.decorators=[{type:t.Directive,args:[{selector:"cdk-accordion, [cdkAccordion]",exportAs:"cdkAccordion",providers:[{provide:r,useExisting:s}]}]}],s.propDecorators={multi:[{type:t.Input}]};
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
var d,p=0,a=function(){function e(e,o,n){var c=this;this.accordion=e,this._changeDetectorRef=o,this._expansionDispatcher=n,this._openCloseAllSubscription=i.Subscription.EMPTY,this.closed=new t.EventEmitter,this.opened=new t.EventEmitter,this.destroyed=new t.EventEmitter,this.expandedChange=new t.EventEmitter,this.id="cdk-accordion-child-"+p++,this._expanded=!1,this._disabled=!1,this._removeUniqueSelectionListener=function(){},this._removeUniqueSelectionListener=n.listen((function(e,t){c.accordion&&!c.accordion.multi&&c.accordion.id===t&&c.id!==e&&(c.expanded=!1)})),this.accordion&&(this._openCloseAllSubscription=this._subscribeToOpenCloseAllActions())}return Object.defineProperty(e.prototype,"expanded",{get:function(){return this._expanded},set:function(e){e=n.coerceBooleanProperty(e),this._expanded!==e&&(this._expanded=e,this.expandedChange.emit(e),e?(this.opened.emit(),this._expansionDispatcher.notify(this.id,this.accordion?this.accordion.id:this.id)):this.closed.emit(),this._changeDetectorRef.markForCheck())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled},set:function(e){this._disabled=n.coerceBooleanProperty(e)},enumerable:!1,configurable:!0}),e.prototype.ngOnDestroy=function(){this.opened.complete(),this.closed.complete(),this.destroyed.emit(),this.destroyed.complete(),this._removeUniqueSelectionListener(),this._openCloseAllSubscription.unsubscribe()},e.prototype.toggle=function(){this.disabled||(this.expanded=!this.expanded)},e.prototype.close=function(){this.disabled||(this.expanded=!1)},e.prototype.open=function(){this.disabled||(this.expanded=!0)},e.prototype._subscribeToOpenCloseAllActions=function(){var e=this;return this.accordion._openCloseAllActions.subscribe((function(t){e.disabled||(e.expanded=t)}))},e}();a.decorators=[{type:t.Directive,args:[{selector:"cdk-accordion-item, [cdkAccordionItem]",exportAs:"cdkAccordionItem",providers:[{provide:r,useValue:void 0}]}]}],a.ctorParameters=function(){return[{type:s,decorators:[{type:t.Optional},{type:t.Inject,args:[r]},{type:t.SkipSelf}]},{type:t.ChangeDetectorRef},{type:o.UniqueSelectionDispatcher}]},a.propDecorators={closed:[{type:t.Output}],opened:[{type:t.Output}],destroyed:[{type:t.Output}],expandedChange:[{type:t.Output}],expanded:[{type:t.Input}],disabled:[{type:t.Input}]},(d=function d(){}).decorators=[{type:t.NgModule,args:[{exports:[s,a],declarations:[s,a]}]}],
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
e.CdkAccordion=s,e.CdkAccordionItem=a,e.CdkAccordionModule=d,eangular_material_src_cdk_accordion_accordion_a=r,Object.defineProperty(e,"__esModule",{value:!0})}));