UNPKG

ngx-bootstrap-ci

Version:
2 lines 2.29 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("ngx-bootstrap/collapse",["exports","@angular/core"],t):t((e["ngx-bootstrap"]=e["ngx-bootstrap"]||{},e["ngx-bootstrap"].collapse={}),e.ng.core)}(this,function(e,s){"use strict";var t=function(){function e(e,t){this._el=e,this._renderer=t,this.collapsed=new s.EventEmitter,this.expanded=new s.EventEmitter,this.isExpanded=!0,this.isCollapsed=!1,this.isCollapse=!0,this.isCollapsing=!1}return Object.defineProperty(e.prototype,"collapse",{get:function(){return this.isExpanded},set:function(e){this.isExpanded=e,this.toggle()},enumerable:!0,configurable:!0}),e.prototype.toggle=function(){this.isExpanded?this.hide():this.show()},e.prototype.hide=function(){this.isCollapse=!1,this.isCollapsing=!0,this.isExpanded=!1,this.isCollapsed=!0,this.isCollapse=!0,this.isCollapsing=!1,this.display="none",this.collapsed.emit(this)},e.prototype.show=function(){this.isCollapse=!1,this.isCollapsing=!0,this.isExpanded=!0,this.isCollapsed=!1,this.display="block",this.isCollapse=!0,this.isCollapsing=!1,this._renderer.setStyle(this._el.nativeElement,"overflow","visible"),this._renderer.setStyle(this._el.nativeElement,"height","auto"),this.expanded.emit(this)},e.decorators=[{type:s.Directive,args:[{selector:"[collapse]",exportAs:"bs-collapse",host:{"[class.collapse]":"true"}}]}],e.ctorParameters=function(){return[{type:s.ElementRef},{type:s.Renderer2}]},e.propDecorators={collapsed:[{type:s.Output}],expanded:[{type:s.Output}],display:[{type:s.HostBinding,args:["style.display"]}],isExpanded:[{type:s.HostBinding,args:["class.in"]},{type:s.HostBinding,args:["class.show"]},{type:s.HostBinding,args:["attr.aria-expanded"]}],isCollapsed:[{type:s.HostBinding,args:["attr.aria-hidden"]}],isCollapse:[{type:s.HostBinding,args:["class.collapse"]}],isCollapsing:[{type:s.HostBinding,args:["class.collapsing"]}],collapse:[{type:s.Input}]},e}(),i=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[]}},e.decorators=[{type:s.NgModule,args:[{declarations:[t],exports:[t]}]}],e}();e.CollapseDirective=t,e.CollapseModule=i,Object.defineProperty(e,"__esModule",{value:!0})}); //# sourceMappingURL=ngx-bootstrap-collapse.umd.min.js.map