angular-switchery
Advanced tools
Comparing version 0.3.3 to 0.4.0
@@ -51,2 +51,4 @@ import { CommonModule } from '@angular/common'; | ||
} | ||
this.onChangeCallback(this.checked); | ||
this.onTouchedCallback(this.checked); | ||
}; | ||
@@ -65,2 +67,4 @@ /** | ||
this.checked = !!checked; | ||
this.onChangeCallback(this.checked); | ||
this.onTouchedCallback(this.checked); | ||
}; | ||
@@ -67,0 +71,0 @@ /** |
@@ -47,2 +47,4 @@ import { CommonModule } from '@angular/common'; | ||
} | ||
this.onChangeCallback(this.checked); | ||
this.onTouchedCallback(this.checked); | ||
} | ||
@@ -61,2 +63,4 @@ /** | ||
this.checked = !!checked; | ||
this.onChangeCallback(this.checked); | ||
this.onTouchedCallback(this.checked); | ||
} | ||
@@ -63,0 +67,0 @@ /** |
@@ -53,2 +53,4 @@ (function (global, factory) { | ||
} | ||
this.onChangeCallback(this.checked); | ||
this.onTouchedCallback(this.checked); | ||
}; | ||
@@ -67,2 +69,4 @@ /** | ||
this.checked = !!checked; | ||
this.onChangeCallback(this.checked); | ||
this.onTouchedCallback(this.checked); | ||
}; | ||
@@ -69,0 +73,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@angular/core"),require("@angular/forms")):"function"==typeof define&&define.amd?define(["exports","@angular/common","@angular/core","@angular/forms"],t):t(e.angularSwitchery=e.angularSwitchery||{},e.ng.common,e.ng.core,e._angular_forms)}(this,function(e,t,o,n){"use strict";var i=function(){function e(){this.checked=!1,this.className="switchery",this.change=new o.EventEmitter,this.onTouchedCallback=function(e){},this.onChangeCallback=function(e){},this.onClick=function(){this.isDisabled()||(this.checked=!this.checked,this.change.emit(this.checked),this.onChangeCallback(this.checked),this.onTouchedCallback(this.checked))}}return Object.defineProperty(e.prototype,"disabled",{set:function(e){this._disabled=!1!==e},enumerable:!0,configurable:!0}),e.prototype.onKeyDown=function(e){39===e.keyCode&&(this.checked=!0),37===e.keyCode&&(this.checked=!1),32===e.keyCode&&(this.checked=!this.checked)},e.prototype.isDisabled=function(){return this._disabled},e.prototype.writeValue=function(e){this.checked=!!e},e.prototype.registerOnChange=function(e){this.onChangeCallback=e},e.prototype.registerOnTouched=function(e){this.onTouchedCallback=e},e}();i.decorators=[{type:o.Component,args:[{selector:"angular-switchery",styles:[".switchery { background-color: #64bd63; border: 1px solid #dfdfdf; border-radius: 20px; cursor: pointer; display: inline-block; height: 30px; position: relative; vertical-align: middle; width: 50px; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; user-select: none; -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; -webkit-background-clip: content-box; background-clip: content-box; } .switchery > small { background: #fff; border-radius: 100%; box-shadow: 0 1px 3px #dfdfdf; height: 30px; position: absolute; top: 0; width: 30px; } .switchery > small.checked { right: 0px; } /* Switchery sizes. */ .switchery-small { border-radius: 20px; height: 20px; width: 33px; } .switchery-small > small { height: 20px; width: 20px; } .switchery-large { border-radius: 40px; height: 40px; width: 66px; } .switchery-large > small { height: 40px; width: 40px; } .disabled { opacity: .50; cursor: not-allowed; } "],template:'<span (keydown)="onKeyDown($event)" tabindex="0" [class]="className" (click)="onClick()" [class.disabled]="isDisabled()">\n <small [ngClass]="{\'checked\': checked}"></small></span>',providers:[{provide:n.NG_VALUE_ACCESSOR,useExisting:o.forwardRef(function(){return i}),multi:!0}]}]}],i.ctorParameters=function(){return[]},i.propDecorators={className:[{type:o.Input}],disabled:[{type:o.Input}],change:[{type:o.Output}]};var r=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[]}},e}();r.decorators=[{type:o.NgModule,args:[{declarations:[i],exports:[i],imports:[t.CommonModule]}]}],r.ctorParameters=function(){return[]},e.AngularSwitcheryModule=r,e.ɵa=i,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@angular/core"),require("@angular/forms")):"function"==typeof define&&define.amd?define(["exports","@angular/common","@angular/core","@angular/forms"],t):t(e.angularSwitchery=e.angularSwitchery||{},e.ng.common,e.ng.core,e._angular_forms)}(this,function(e,t,o,i){"use strict";var n=function(){function e(){this.checked=!1,this.className="switchery",this.change=new o.EventEmitter,this.onTouchedCallback=function(e){},this.onChangeCallback=function(e){},this.onClick=function(){this.isDisabled()||(this.checked=!this.checked,this.change.emit(this.checked),this.onChangeCallback(this.checked),this.onTouchedCallback(this.checked))}}return Object.defineProperty(e.prototype,"disabled",{set:function(e){this._disabled=!1!==e},enumerable:!0,configurable:!0}),e.prototype.onKeyDown=function(e){39===e.keyCode&&(this.checked=!0),37===e.keyCode&&(this.checked=!1),32===e.keyCode&&(this.checked=!this.checked),this.onChangeCallback(this.checked),this.onTouchedCallback(this.checked)},e.prototype.isDisabled=function(){return this._disabled},e.prototype.writeValue=function(e){this.checked=!!e,this.onChangeCallback(this.checked),this.onTouchedCallback(this.checked)},e.prototype.registerOnChange=function(e){this.onChangeCallback=e},e.prototype.registerOnTouched=function(e){this.onTouchedCallback=e},e}();n.decorators=[{type:o.Component,args:[{selector:"angular-switchery",styles:[".switchery { background-color: #64bd63; border: 1px solid #dfdfdf; border-radius: 20px; cursor: pointer; display: inline-block; height: 30px; position: relative; vertical-align: middle; width: 50px; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; user-select: none; -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; -webkit-background-clip: content-box; background-clip: content-box; } .switchery > small { background: #fff; border-radius: 100%; box-shadow: 0 1px 3px #dfdfdf; height: 30px; position: absolute; top: 0; width: 30px; } .switchery > small.checked { right: 0px; } /* Switchery sizes. */ .switchery-small { border-radius: 20px; height: 20px; width: 33px; } .switchery-small > small { height: 20px; width: 20px; } .switchery-large { border-radius: 40px; height: 40px; width: 66px; } .switchery-large > small { height: 40px; width: 40px; } .disabled { opacity: .50; cursor: not-allowed; } "],template:'<span (keydown)="onKeyDown($event)" tabindex="0" [class]="className" (click)="onClick()" [class.disabled]="isDisabled()">\n <small [ngClass]="{\'checked\': checked}"></small></span>',providers:[{provide:i.NG_VALUE_ACCESSOR,useExisting:o.forwardRef(function(){return n}),multi:!0}]}]}],n.ctorParameters=function(){return[]},n.propDecorators={className:[{type:o.Input}],disabled:[{type:o.Input}],change:[{type:o.Output}]};var c=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[]}},e}();c.decorators=[{type:o.NgModule,args:[{declarations:[n],exports:[n],imports:[t.CommonModule]}]}],c.ctorParameters=function(){return[]},e.AngularSwitcheryModule=c,e.ɵa=n,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=angular-switchery.umd.min.js.map |
{ | ||
"name": "angular-switchery", | ||
"version": "0.3.3", | ||
"version": "0.4.0", | ||
"description": "Angular Switchery, an Angular library", | ||
@@ -5,0 +5,0 @@ "main": "./bundles/angular-switchery.umd.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
52457
468