-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path4354.bda31d38cbdd0f52.js
1 lines (1 loc) · 5.56 KB
/
4354.bda31d38cbdd0f52.js
1
"use strict";(self.webpackChunkmaterial_angular_io=self.webpackChunkmaterial_angular_io||[]).push([[4354],{3452:(g,p,i)=>{i.d(p,{XD:()=>C,dD:()=>a,xI:()=>d});var e=i(5879),m=i(8337),r=i(2495),_=i(2079),u=i(7902);let t=0;const c=new e.OlP("CdkAccordion");let d=(()=>{class o{constructor(){this._stateChanges=new _.xQ,this._openCloseAllActions=new _.xQ,this.id="cdk-accordion-"+t++,this._multi=!1}get multi(){return this._multi}set multi(n){this._multi=(0,r.Ig)(n)}openAll(){this._multi&&this._openCloseAllActions.next(!0)}closeAll(){this._openCloseAllActions.next(!1)}ngOnChanges(n){this._stateChanges.next(n)}ngOnDestroy(){this._stateChanges.complete(),this._openCloseAllActions.complete()}}return o.\u0275fac=function(n){return new(n||o)},o.\u0275dir=e.lG2({type:o,selectors:[["cdk-accordion"],["","cdkAccordion",""]],inputs:{multi:"multi"},exportAs:["cdkAccordion"],features:[e._Bn([{provide:c,useExisting:o}]),e.TTD]}),o})(),s=0,a=(()=>{class o{get expanded(){return this._expanded}set expanded(n){n=(0,r.Ig)(n),this._expanded!==n&&(this._expanded=n,this.expandedChange.emit(n),n?(this.opened.emit(),this._expansionDispatcher.notify(this.id,this.accordion?this.accordion.id:this.id)):this.closed.emit(),this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled}set disabled(n){this._disabled=(0,r.Ig)(n)}constructor(n,h,x){this.accordion=n,this._changeDetectorRef=h,this._expansionDispatcher=x,this._openCloseAllSubscription=u.w.EMPTY,this.closed=new e.vpe,this.opened=new e.vpe,this.destroyed=new e.vpe,this.expandedChange=new e.vpe,this.id="cdk-accordion-child-"+s++,this._expanded=!1,this._disabled=!1,this._removeUniqueSelectionListener=()=>{},this._removeUniqueSelectionListener=x.listen((A,f)=>{this.accordion&&!this.accordion.multi&&this.accordion.id===f&&this.id!==A&&(this.expanded=!1)}),this.accordion&&(this._openCloseAllSubscription=this._subscribeToOpenCloseAllActions())}ngOnDestroy(){this.opened.complete(),this.closed.complete(),this.destroyed.emit(),this.destroyed.complete(),this._removeUniqueSelectionListener(),this._openCloseAllSubscription.unsubscribe()}toggle(){this.disabled||(this.expanded=!this.expanded)}close(){this.disabled||(this.expanded=!1)}open(){this.disabled||(this.expanded=!0)}_subscribeToOpenCloseAllActions(){return this.accordion._openCloseAllActions.subscribe(n=>{this.disabled||(this.expanded=n)})}}return o.\u0275fac=function(n){return new(n||o)(e.Y36(c,12),e.Y36(e.sBO),e.Y36(m.A8))},o.\u0275dir=e.lG2({type:o,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:"expanded",disabled:"disabled"},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[e._Bn([{provide:c,useValue:void 0}])]}),o})(),C=(()=>{class o{}return o.\u0275fac=function(n){return new(n||o)},o.\u0275mod=e.oAB({type:o}),o.\u0275inj=e.cJS({}),o})()},4354:(g,p,i)=>{i.r(p),i.d(p,{CdkAccordionOverviewExample:()=>u});var e=i(5879),m=i(6814),r=i(3452);function _(t,c){if(1&t){const d=e.EpF();e.TgZ(0,"cdk-accordion-item",2,3)(2,"div",4),e.NdJ("click",function(){e.CHM(d);const a=e.MAs(1);return e.KtG(a.toggle())}),e._uU(3),e.TgZ(4,"span",5),e._uU(5),e.qZA()(),e.TgZ(6,"div",6),e._uU(7," Lorem ipsum dolor, sit amet consectetur adipisicing elit. Perferendis excepturi incidunt ipsum deleniti labore, tempore non nam doloribus blanditiis veritatis illo autem iure aliquid ullam rem tenetur deserunt velit culpa? "),e.qZA()()}if(2&t){const d=c.$implicit,s=c.index,a=e.MAs(1);e.uIk("id","accordion-header-"+s)("aria-expanded",a.expanded)("aria-controls","accordion-body-"+s),e.xp6(3),e.hij(" ",d," "),e.xp6(2),e.hij(" Click to ",a.expanded?"close":"open"," "),e.xp6(1),e.Udp("display",a.expanded?"":"none"),e.uIk("id","accordion-body-"+s)("aria-labelledby","accordion-header-"+s)}}let u=(()=>{class t{constructor(){this.items=["Item 1","Item 2","Item 3","Item 4","Item 5"],this.expandedIndex=0}}return t.\u0275fac=function(d){return new(d||t)},t.\u0275cmp=e.Xpm({type:t,selectors:[["cdk-accordion-overview-example"]],standalone:!0,features:[e.jDz],decls:2,vars:1,consts:[[1,"example-accordion"],["class","example-accordion-item","role","button","tabindex","0",4,"ngFor","ngForOf"],["role","button","tabindex","0",1,"example-accordion-item"],["accordionItem","cdkAccordionItem"],[1,"example-accordion-item-header",3,"click"],[1,"example-accordion-item-description"],["role","region",1,"example-accordion-item-body"]],template:function(d,s){1&d&&(e.TgZ(0,"cdk-accordion",0),e.YNc(1,_,8,9,"cdk-accordion-item",1),e.qZA()),2&d&&(e.xp6(1),e.Q6J("ngForOf",s.items))},dependencies:[r.XD,r.xI,r.dD,m.ax],styles:[".example-accordion[_ngcontent-%COMP%] {\n display: block;\n max-width: 500px;\n}\n\n.example-accordion-item[_ngcontent-%COMP%] {\n display: block;\n border: solid 1px #ccc;\n}\n\n.example-accordion-item[_ngcontent-%COMP%] + .example-accordion-item[_ngcontent-%COMP%] {\n border-top: none;\n}\n\n.example-accordion-item-header[_ngcontent-%COMP%] {\n display: flex;\n align-content: center;\n justify-content: space-between;\n}\n\n.example-accordion-item-description[_ngcontent-%COMP%] {\n font-size: 0.85em;\n color: #999;\n}\n\n.example-accordion-item-header[_ngcontent-%COMP%], .example-accordion-item-body[_ngcontent-%COMP%] {\n padding: 16px;\n}\n\n.example-accordion-item-header[_ngcontent-%COMP%]:hover {\n cursor: pointer;\n background-color: #eee;\n}\n\n.example-accordion-item[_ngcontent-%COMP%]:first-child {\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n}\n\n.example-accordion-item[_ngcontent-%COMP%]:last-child {\n border-bottom-left-radius: 4px;\n border-bottom-right-radius: 4px;\n}"]}),t})()}}]);