blob: 4d99ff34daa78ae271256f96d053ecbb55a44f54 [file] [log] [blame]
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/cdk/accordion"),require("@angular/cdk/portal"),require("@angular/common"),require("@angular/core"),require("@angular/material/core"),require("@angular/cdk/coercion"),require("@angular/cdk/a11y"),require("rxjs/operators"),require("@angular/cdk/keycodes"),require("@angular/platform-browser/animations"),require("rxjs"),require("@angular/animations"),require("@angular/cdk/collections")):"function"==typeof define&&define.amd?define("@angular/material/expansion",["exports","@angular/cdk/accordion","@angular/cdk/portal","@angular/common","@angular/core","@angular/material/core","@angular/cdk/coercion","@angular/cdk/a11y","rxjs/operators","@angular/cdk/keycodes","@angular/platform-browser/animations","rxjs","@angular/animations","@angular/cdk/collections"],t):t(((e=e||self).ng=e.ng||{},e.ng.material=e.ng.material||{},e.ng.material.expansion={}),e.ng.cdk.accordion,e.ng.cdk.portal,e.ng.common,e.ng.core,e.ng.material.core,e.ng.cdk.coercion,e.ng.cdk.a11y,e.rxjs.operators,e.ng.cdk.keycodes,e.ng.platformBrowser.animations,e.rxjs,e.ng.animations,e.ng.cdk.collections)}(this,(function(e,t,n,o,a,i,r,s,p,d,c,l,g,u){"use strict";
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var m=function(e,t){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}m(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function f(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,a,i=n.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(o=i.next()).done;)r.push(o.value)}catch(e){a={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return r}function x(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(f(arguments[t]));return e}
/**
* @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 y,b=new a.InjectionToken("MAT_ACCORDION"),_={indicatorRotate:g.trigger("indicatorRotate",[g.state("collapsed, void",g.style({transform:"rotate(0deg)"})),g.state("expanded",g.style({transform:"rotate(180deg)"})),g.transition("expanded <=> collapsed, void => collapsed",g.animate("225ms cubic-bezier(0.4,0.0,0.2,1)"))]),bodyExpansion:g.trigger("bodyExpansion",[g.state("collapsed, void",g.style({height:"0px",visibility:"hidden"})),g.state("expanded",g.style({height:"*",visibility:"visible"})),g.transition("expanded <=> collapsed, void => collapsed",g.animate("225ms cubic-bezier(0.4,0.0,0.2,1)"))])};
/**
* @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
*/(y=function y(e){this._template=e}).decorators=[{type:a.Directive,args:[{selector:"ng-template[matExpansionPanelContent]"}]}],y.ctorParameters=function(){return[{type:a.TemplateRef}]};var v,w=0,E=new a.InjectionToken("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS"),P=function(e){function t(t,n,o,i,r,s,d){var c=e.call(this,t,n,o)||this;return c._viewContainerRef=i,c._animationMode=s,c._hideToggle=!1,c.afterExpand=new a.EventEmitter,c.afterCollapse=new a.EventEmitter,c._inputChanges=new l.Subject,c._headerId="mat-expansion-panel-header-"+w++,c._bodyAnimationDone=new l.Subject,c.accordion=t,c._document=r,c._bodyAnimationDone.pipe(p.distinctUntilChanged((function(e,t){return e.fromState===t.fromState&&e.toState===t.toState}))).subscribe((function(e){"void"!==e.fromState&&("expanded"===e.toState?c.afterExpand.emit():"collapsed"===e.toState&&c.afterCollapse.emit())})),d&&(c.hideToggle=d.hideToggle),c}return h(t,e),Object.defineProperty(t.prototype,"hideToggle",{get:function(){return this._hideToggle||this.accordion&&this.accordion.hideToggle},set:function(e){this._hideToggle=r.coerceBooleanProperty(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"togglePosition",{get:function(){return this._togglePosition||this.accordion&&this.accordion.togglePosition},set:function(e){this._togglePosition=e},enumerable:!1,configurable:!0}),t.prototype._hasSpacing=function(){return!!this.accordion&&this.expanded&&"default"===this.accordion.displayMode},t.prototype._getExpandedState=function(){return this.expanded?"expanded":"collapsed"},t.prototype.toggle=function(){this.expanded=!this.expanded},t.prototype.close=function(){this.expanded=!1},t.prototype.open=function(){this.expanded=!0},t.prototype.ngAfterContentInit=function(){var e=this;this._lazyContent&&this.opened.pipe(p.startWith(null),p.filter((function(){return e.expanded&&!e._portal})),p.take(1)).subscribe((function(){e._portal=new n.TemplatePortal(e._lazyContent._template,e._viewContainerRef)}))},t.prototype.ngOnChanges=function(e){this._inputChanges.next(e)},t.prototype.ngOnDestroy=function(){e.prototype.ngOnDestroy.call(this),this._bodyAnimationDone.complete(),this._inputChanges.complete()},t.prototype._containsFocus=function(){if(this._body){var e=this._document.activeElement,t=this._body.nativeElement;return e===t||t.contains(e)}return!1},t}(t.CdkAccordionItem);P.decorators=[{type:a.Component,args:[{selector:"mat-expansion-panel",exportAs:"matExpansionPanel",template:'<ng-content select="mat-expansion-panel-header"></ng-content>\n<div class="mat-expansion-panel-content"\n role="region"\n [@bodyExpansion]="_getExpandedState()"\n (@bodyExpansion.done)="_bodyAnimationDone.next($event)"\n [attr.aria-labelledby]="_headerId"\n [id]="id"\n #body>\n <div class="mat-expansion-panel-body">\n <ng-content></ng-content>\n <ng-template [cdkPortalOutlet]="_portal"></ng-template>\n </div>\n <ng-content select="mat-action-row"></ng-content>\n</div>\n',encapsulation:a.ViewEncapsulation.None,changeDetection:a.ChangeDetectionStrategy.OnPush,inputs:["disabled","expanded"],outputs:["opened","closed","expandedChange"],animations:[_.bodyExpansion],providers:[{provide:b,useValue:void 0}],host:{class:"mat-expansion-panel","[class.mat-expanded]":"expanded","[class._mat-animation-noopable]":'_animationMode === "NoopAnimations"',"[class.mat-expansion-panel-spacing]":"_hasSpacing()"},styles:[".mat-expansion-panel{box-sizing:content-box;display:block;margin:0;border-radius:4px;overflow:hidden;transition:margin 225ms cubic-bezier(0.4, 0, 0.2, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);position:relative}.mat-accordion .mat-expansion-panel:not(.mat-expanded),.mat-accordion .mat-expansion-panel:not(.mat-expansion-panel-spacing){border-radius:0}.mat-accordion .mat-expansion-panel:first-of-type{border-top-right-radius:4px;border-top-left-radius:4px}.mat-accordion .mat-expansion-panel:last-of-type{border-bottom-right-radius:4px;border-bottom-left-radius:4px}.cdk-high-contrast-active .mat-expansion-panel{outline:solid 1px}.mat-expansion-panel.ng-animate-disabled,.ng-animate-disabled .mat-expansion-panel,.mat-expansion-panel._mat-animation-noopable{transition:none}.mat-expansion-panel-content{display:flex;flex-direction:column;overflow:visible}.mat-expansion-panel-body{padding:0 24px 16px}.mat-expansion-panel-spacing{margin:16px 0}.mat-accordion>.mat-expansion-panel-spacing:first-child,.mat-accordion>*:first-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-top:0}.mat-accordion>.mat-expansion-panel-spacing:last-child,.mat-accordion>*:last-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-bottom:0}.mat-action-row{border-top-style:solid;border-top-width:1px;display:flex;flex-direction:row;justify-content:flex-end;padding:16px 8px 16px 24px}.mat-action-row button.mat-button-base,.mat-action-row button.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-action-row button.mat-button-base,[dir=rtl] .mat-action-row button.mat-mdc-button-base{margin-left:0;margin-right:8px}\n"]}]}],P.ctorParameters=function(){return[{type:void 0,decorators:[{type:a.Optional},{type:a.SkipSelf},{type:a.Inject,args:[b]}]},{type:a.ChangeDetectorRef},{type:u.UniqueSelectionDispatcher},{type:a.ViewContainerRef},{type:void 0,decorators:[{type:a.Inject,args:[o.DOCUMENT]}]},{type:String,decorators:[{type:a.Optional},{type:a.Inject,args:[c.ANIMATION_MODULE_TYPE]}]},{type:void 0,decorators:[{type:a.Inject,args:[E]},{type:a.Optional}]}]},P.propDecorators={hideToggle:[{type:a.Input}],togglePosition:[{type:a.Input}],afterExpand:[{type:a.Output}],afterCollapse:[{type:a.Output}],_lazyContent:[{type:a.ContentChild,args:[y]}],_body:[{type:a.ViewChild,args:["body"]}]},(v=function v(){}).decorators=[{type:a.Directive,args:[{selector:"mat-action-row",host:{class:"mat-action-row"}}]}];
/**
* @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 k,C,M=function(){function e(e,t,n,o,a,i){var r=this;this.panel=e,this._element=t,this._focusMonitor=n,this._changeDetectorRef=o,this._animationMode=i,this._parentChangeSubscription=l.Subscription.EMPTY;var s=e.accordion?e.accordion._stateChanges.pipe(p.filter((function(e){return!(!e.hideToggle&&!e.togglePosition)}))):l.EMPTY;this._parentChangeSubscription=l.merge(e.opened,e.closed,s,e._inputChanges.pipe(p.filter((function(e){return!!(e.hideToggle||e.disabled||e.togglePosition)})))).subscribe((function(){return r._changeDetectorRef.markForCheck()})),e.closed.pipe(p.filter((function(){return e._containsFocus()}))).subscribe((function(){return n.focusVia(t,"program")})),a&&(this.expandedHeight=a.expandedHeight,this.collapsedHeight=a.collapsedHeight)}return Object.defineProperty(e.prototype,"disabled",{get:function(){return this.panel.disabled},enumerable:!1,configurable:!0}),e.prototype._toggle=function(){this.disabled||this.panel.toggle()},e.prototype._isExpanded=function(){return this.panel.expanded},e.prototype._getExpandedState=function(){return this.panel._getExpandedState()},e.prototype._getPanelId=function(){return this.panel.id},e.prototype._getTogglePosition=function(){return this.panel.togglePosition},e.prototype._showToggle=function(){return!this.panel.hideToggle&&!this.panel.disabled},e.prototype._getHeaderHeight=function(){var e=this._isExpanded();return e&&this.expandedHeight?this.expandedHeight:!e&&this.collapsedHeight?this.collapsedHeight:null},e.prototype._keydown=function(e){switch(e.keyCode){case d.SPACE:case d.ENTER:d.hasModifierKey(e)||(e.preventDefault(),this._toggle());break;default:return void(this.panel.accordion&&this.panel.accordion._handleHeaderKeydown(e))}},e.prototype.focus=function(e,t){e?this._focusMonitor.focusVia(this._element,e,t):this._element.nativeElement.focus(t)},e.prototype.ngAfterViewInit=function(){var e=this;this._focusMonitor.monitor(this._element).subscribe((function(t){t&&e.panel.accordion&&e.panel.accordion._handleHeaderFocus(e)}))},e.prototype.ngOnDestroy=function(){this._parentChangeSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._element)},e}();M.decorators=[{type:a.Component,args:[{selector:"mat-expansion-panel-header",template:'<span class="mat-content">\n <ng-content select="mat-panel-title"></ng-content>\n <ng-content select="mat-panel-description"></ng-content>\n <ng-content></ng-content>\n</span>\n<span [@indicatorRotate]="_getExpandedState()" *ngIf="_showToggle()"\n class="mat-expansion-indicator"></span>\n',encapsulation:a.ViewEncapsulation.None,changeDetection:a.ChangeDetectionStrategy.OnPush,animations:[_.indicatorRotate],host:{class:"mat-expansion-panel-header mat-focus-indicator",role:"button","[attr.id]":"panel._headerId","[attr.tabindex]":"disabled ? -1 : 0","[attr.aria-controls]":"_getPanelId()","[attr.aria-expanded]":"_isExpanded()","[attr.aria-disabled]":"panel.disabled","[class.mat-expanded]":"_isExpanded()","[class.mat-expansion-toggle-indicator-after]":"_getTogglePosition() === 'after'","[class.mat-expansion-toggle-indicator-before]":"_getTogglePosition() === 'before'","[class._mat-animation-noopable]":'_animationMode === "NoopAnimations"',"[style.height]":"_getHeaderHeight()","(click)":"_toggle()","(keydown)":"_keydown($event)"},styles:['.mat-expansion-panel-header{display:flex;flex-direction:row;align-items:center;padding:0 24px;border-radius:inherit;transition:height 225ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel-header._mat-animation-noopable{transition:none}.mat-expansion-panel-header:focus,.mat-expansion-panel-header:hover{outline:none}.mat-expansion-panel-header.mat-expanded:focus,.mat-expansion-panel-header.mat-expanded:hover{background:inherit}.mat-expansion-panel-header:not([aria-disabled=true]){cursor:pointer}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before{flex-direction:row-reverse}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 16px 0 0}[dir=rtl] .mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 0 0 16px}.mat-content{display:flex;flex:1;flex-direction:row;overflow:hidden}.mat-expansion-panel-header-title,.mat-expansion-panel-header-description{display:flex;flex-grow:1;margin-right:16px}[dir=rtl] .mat-expansion-panel-header-title,[dir=rtl] .mat-expansion-panel-header-description{margin-right:0;margin-left:16px}.mat-expansion-panel-header-description{flex-grow:2}.mat-expansion-indicator::after{border-style:solid;border-width:0 2px 2px 0;content:"";display:inline-block;padding:3px;transform:rotate(45deg);vertical-align:middle}.cdk-high-contrast-active .mat-expansion-panel .mat-expansion-panel-header.cdk-keyboard-focused:not([aria-disabled=true])::before,.cdk-high-contrast-active .mat-expansion-panel .mat-expansion-panel-header.cdk-program-focused:not([aria-disabled=true])::before,.cdk-high-contrast-active .mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:hover:not([aria-disabled=true])::before{top:0;left:0;right:0;bottom:0;position:absolute;box-sizing:border-box;pointer-events:none;border:3px solid;border-radius:4px;content:""}\n']}]}],M.ctorParameters=function(){return[{type:P,decorators:[{type:a.Host}]},{type:a.ElementRef},{type:s.FocusMonitor},{type:a.ChangeDetectorRef},{type:void 0,decorators:[{type:a.Inject,args:[E]},{type:a.Optional}]},{type:String,decorators:[{type:a.Optional},{type:a.Inject,args:[c.ANIMATION_MODULE_TYPE]}]}]},M.propDecorators={expandedHeight:[{type:a.Input}],collapsedHeight:[{type:a.Input}]},(k=function k(){}).decorators=[{type:a.Directive,args:[{selector:"mat-panel-description",host:{class:"mat-expansion-panel-header-description"}}]}],(C=function C(){}).decorators=[{type:a.Directive,args:[{selector:"mat-panel-title",host:{class:"mat-expansion-panel-header-title"}}]}];var T,O=function(e){function t(){var t=e.apply(this,x(arguments))||this;return t._ownHeaders=new a.QueryList,t._hideToggle=!1,t.displayMode="default",t.togglePosition="after",t}return h(t,e),Object.defineProperty(t.prototype,"hideToggle",{get:function(){return this._hideToggle},set:function(e){this._hideToggle=r.coerceBooleanProperty(e)},enumerable:!1,configurable:!0}),t.prototype.ngAfterContentInit=function(){var e=this;this._headers.changes.pipe(p.startWith(this._headers)).subscribe((function(t){e._ownHeaders.reset(t.filter((function(t){return t.panel.accordion===e}))),e._ownHeaders.notifyOnChanges()})),this._keyManager=new s.FocusKeyManager(this._ownHeaders).withWrap().withHomeAndEnd()},t.prototype._handleHeaderKeydown=function(e){this._keyManager.onKeydown(e)},t.prototype._handleHeaderFocus=function(e){this._keyManager.updateActiveItem(e)},t.prototype.ngOnDestroy=function(){e.prototype.ngOnDestroy.call(this),this._ownHeaders.destroy()},t}(t.CdkAccordion);O.decorators=[{type:a.Directive,args:[{selector:"mat-accordion",exportAs:"matAccordion",inputs:["multi"],providers:[{provide:b,useExisting:O}],host:{class:"mat-accordion","[class.mat-accordion-multi]":"this.multi"}}]}],O.propDecorators={_headers:[{type:a.ContentChildren,args:[M,{descendants:!0}]}],hideToggle:[{type:a.Input}],displayMode:[{type:a.Input}],togglePosition:[{type:a.Input}]},(T=function T(){}).decorators=[{type:a.NgModule,args:[{imports:[o.CommonModule,i.MatCommonModule,t.CdkAccordionModule,n.PortalModule],exports:[O,P,v,M,C,k,y],declarations:[O,P,v,M,C,k,y]}]}],
/**
* @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.EXPANSION_PANEL_ANIMATION_TIMING="225ms cubic-bezier(0.4,0.0,0.2,1)",e.MAT_ACCORDION=b,e.MAT_EXPANSION_PANEL_DEFAULT_OPTIONS=E,e.MatAccordion=O,e.MatExpansionModule=T,e.MatExpansionPanel=P,e.MatExpansionPanelActionRow=v,e.MatExpansionPanelContent=y,e.MatExpansionPanelDescription=k,e.MatExpansionPanelHeader=M,e.MatExpansionPanelTitle=C,e.matExpansionAnimations=_,e0=void 0,Object.defineProperty(e,"__esModule",{value:!0})}));