New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

design-angular-kit

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

design-angular-kit - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

2

bundles/design-angular-kit.umd.min.js

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("io-ts"),require("@angular/core"),require("@angular/forms"),require("@angular/common")):"function"==typeof define&&define.amd?define("design-angular-kit",["exports","io-ts","@angular/core","@angular/forms","@angular/common"],t):t(e["design-angular-kit"]={},null,e.ng.core,e.ng.forms,e.ng.common)}(this,function(e,t,i,n,o){"use strict";var r=t.keyof({primary:null,secondary:null,danger:null,warning:null,info:null,success:null,light:null,dark:null}),a="primary",s="light",c=0,u=function(){function e(){this.progressbarId="it-progress-bar-"+c++,this._height=e.PROGRESS_BAR_DEFAULT_HEIGHT,this._min=e.PROGRESS_BAR_DEFAULT_MIN,this._max=e.PROGRESS_BAR_DEFAULT_MAX,this._value=e.PROGRESS_BAR_DEFAULT_VALUE,this._label=e.PROGRESS_BAR_DEFAULT_LABEL,this._color=a}return Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(e){this._height=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"min",{get:function(){return this._min},set:function(e){this._min=Math.round(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){return this._max},set:function(e){this._max=Math.round(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){this._value=Math.min(Math.max(e,this._min),this._max)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"label",{get:function(){return this._label},set:function(e){this._label=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){return this._color},set:function(e){r.is(e)?this._color=e:this._color=a},enumerable:!0,configurable:!0}),e.prototype.valuePercentage=function(){return 100*(this.value-this.min)/(this.max-this.min)},e.prototype.pgStyle=function(){return{width:this.valuePercentage()+"%"}},e.prototype.pgClass=function(){var e={"progress-bar":!0};return this.color&&(e["bg-"+this.color]=!0),e},e.PROGRESS_BAR_DEFAULT_MIN=0,e.PROGRESS_BAR_DEFAULT_MAX=100,e.PROGRESS_BAR_DEFAULT_VALUE=0,e.PROGRESS_BAR_DEFAULT_HEIGHT=20,e.PROGRESS_BAR_DEFAULT_LABEL="",e.decorators=[{type:i.Component,args:[{selector:"it-progress-bar",template:'<div class="progress" [ngStyle]="{\'height\': height + \'px\'}">\n <div role="progressbar" [id]="progressbarId" [ngClass]="pgClass()" [ngStyle]="pgStyle()"\n [attr.aria-valuenow]="value" [attr.aria-valuemin]="min" [attr.aria-valuemax]="max" >\n {{label}}\n </div>\n</div>',styles:[""],changeDetection:i.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[]},e.propDecorators={height:[{type:i.Input}],min:[{type:i.Input}],max:[{type:i.Input}],value:[{type:i.Input}],label:[{type:i.Input}],color:[{type:i.Input}]},e}(),h=0,l=function d(){},p=function(){function e(e){this._changeDetectorRef=e,this._checked=!1,this._disabled=!1,this.change=new i.EventEmitter,this.inputId="checkbox-"+h++,this._onTouched=function(){},this._controlValueAccessorChangeFn=function(){}}return Object.defineProperty(e.prototype,"checked",{get:function(){return this._checked},set:function(e){e!==this.checked&&(this._checked=e,this._changeDetectorRef.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled},set:function(e){e!==this.disabled&&(this._disabled=e,this._changeDetectorRef.markForCheck())},enumerable:!0,configurable:!0}),e.prototype.writeValue=function(e){this.checked=!!e},e.prototype.registerOnChange=function(e){this._controlValueAccessorChangeFn=e},e.prototype.registerOnTouched=function(e){this._onTouched=e},e.prototype.handleChange=function(e){e.stopPropagation(),this.disabled||(this._toggle(),this._emitChangeEvent())},e.prototype._toggle=function(){this.checked=!this.checked},e.prototype._emitChangeEvent=function(){var e=new l;e.source=this,e.checked=this.checked,this._controlValueAccessorChangeFn(this.checked),this.change.emit(e)},e.decorators=[{type:i.Component,args:[{selector:"it-checkbox",template:"<div class=form-check>\n <input type=checkbox\n [id]=inputId\n [checked]=checked\n [disabled]=disabled\n (change)=handleChange($event)>\n <label\n [attr.for]=inputId>{{label}}</label>\n</div>\n",styles:[""],providers:[{provide:n.NG_VALUE_ACCESSOR,useExisting:i.forwardRef(function(){return e}),multi:!0}],changeDetection:i.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[{type:i.ChangeDetectorRef}]},e.propDecorators={checked:[{type:i.Input}],label:[{type:i.Input}],disabled:[{type:i.Input}],change:[{type:i.Output}]},e}(),g=0,f=function _(){},y=function(){function e(e){this._changeDetectorRef=e,this._checked=!1,this._disabled=!1,this.change=new i.EventEmitter,this.inputId="toggle-"+g++,this._onTouched=function(){},this._controlValueAccessorChangeFn=function(){}}return Object.defineProperty(e.prototype,"checked",{get:function(){return this._checked},set:function(e){e!==this.checked&&(this._checked=e,this._changeDetectorRef.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled},set:function(e){e!==this.disabled&&(this._disabled=e,this._changeDetectorRef.markForCheck())},enumerable:!0,configurable:!0}),e.prototype.writeValue=function(e){this.checked=!!e},e.prototype.registerOnChange=function(e){this._controlValueAccessorChangeFn=e},e.prototype.registerOnTouched=function(e){this._onTouched=e},e.prototype.handleChange=function(e){e.stopPropagation(),this.disabled||(this._toggle(),this._emitChangeEvent())},e.prototype._toggle=function(){this.checked=!this.checked},e.prototype._emitChangeEvent=function(){var e=new f;e.source=this,e.checked=this.checked,this._controlValueAccessorChangeFn(this.checked),this.change.emit(e)},e.decorators=[{type:i.Component,args:[{selector:"it-toggle",template:'<div class="form-check">\n <div class="toggles">\n <label [attr.for]=inputId>\n {{label}}\n <input type=checkbox\n [id]=inputId\n [checked]=checked\n [disabled]=disabled\n (change)=handleChange($event)>\n <span class="lever"></span>\n </label>\n </div>\n</div>',styles:[""],providers:[{provide:n.NG_VALUE_ACCESSOR,useExisting:i.forwardRef(function(){return e}),multi:!0}],changeDetection:i.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[{type:i.ChangeDetectorRef}]},e.propDecorators={checked:[{type:i.Input}],label:[{type:i.Input}],disabled:[{type:i.Input}],change:[{type:i.Output}]},e}();var b=function(){function e(){this._listeners=[]}return e.prototype.notify=function(e,t){try{for(var n=function o(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}(this._listeners),i=n.next();!i.done;i=n.next()){(0,i.value)(e,t)}}catch(s){r={error:s}}finally{try{i&&!i.done&&(a=n["return"])&&a.call(n)}finally{if(r)throw r.error}}var r,a},e.prototype.listen=function(t){var e=this;return this._listeners.push(t),function(){e._listeners=e._listeners.filter(function(e){return t!==e})}},e.prototype.ngOnDestroy=function(){this._listeners=[]},e.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}],e.ngInjectableDef=i.defineInjectable({factory:function t(){return new e},token:e,providedIn:"root"}),e}(),m=0;function v(e){return null!=e&&""+e!="false"}var k=function C(e,t){this.source=e,this.value=t},R=function(){function e(e){this._changeDetector=e,this.role="radiogroup",this._value=null,this._name="it-radio-group-"+m++,this._selected=null,this._isInitialized=!1,this._disabled=!1,this.change=new i.EventEmitter,this._controlValueAccessorChangeFn=function(){},this.onTouched=function(){}}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){this._name=e,this._updateRadioButtonNames()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){this._value!==e&&(this._value=e,this._updateSelectedRadioFromValue(),this._checkSelectedRadioButton())},enumerable:!0,configurable:!0}),e.prototype._checkSelectedRadioButton=function(){this._selected&&!this._selected.checked&&(this._selected.checked=!0)},Object.defineProperty(e.prototype,"selected",{get:function(){return this._selected},set:function(e){this._selected=e,this.value=e?e.value:null,this._checkSelectedRadioButton()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled},set:function(e){this._disabled=v(e),this._markRadiosForCheck()},enumerable:!0,configurable:!0}),e.prototype.ngAfterContentInit=function(){this._isInitialized=!0},e.prototype._touch=function(){this.onTouched&&this.onTouched()},e.prototype._updateRadioButtonNames=function(){var t=this;this._radios&&this._radios.forEach(function(e){e.name=t.name})},e.prototype._updateSelectedRadioFromValue=function(){var t=this;this._selected=null,this._radios.forEach(function(e){e.checked=t.value===e.value,e.checked&&(t._selected=e)})},e.prototype._emitChangeEvent=function(){this._isInitialized&&this.change.emit(new k(this._selected,this._value))},e.prototype._markRadiosForCheck=function(){this._radios&&this._radios.forEach(function(e){return e._markForCheck()})},e.prototype.writeValue=function(e){this.value=e,this._changeDetector.markForCheck()},e.prototype.registerOnChange=function(e){this._controlValueAccessorChangeFn=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.decorators=[{type:i.Directive,args:[{selector:"it-radio-group",exportAs:"itRadioGroup",providers:[{provide:n.NG_VALUE_ACCESSOR,useExisting:i.forwardRef(function(){return e}),multi:!0}]}]}],e.ctorParameters=function(){return[{type:i.ChangeDetectorRef}]},e.propDecorators={role:[{type:i.HostBinding,args:["attr.role"]}],change:[{type:i.Output}],_radios:[{type:i.ContentChildren,args:[i.forwardRef(function(){return P}),{descendants:!0}]}],name:[{type:i.Input}],value:[{type:i.Input}],selected:[{type:i.Input}],disabled:[{type:i.Input}]},e}(),P=function(){function e(e,t,n){var o=this;this._changeDetector=t,this._radioDispatcher=n,this.id="radio-"+m++,this.change=new i.EventEmitter,this._checked=!1,this._value=null,this._removeUniqueSelectionListener=function(){},this.radioGroup=e,this._removeUniqueSelectionListener=n.listen(function(e,t){e!==o.id&&t===o.name&&(o.checked=!1)})}return Object.defineProperty(e.prototype,"checked",{get:function(){return this._checked},set:function(e){var t=v(e);this._checked!==t&&((this._checked=t)&&this.radioGroup&&this.radioGroup.value!==this.value?this.radioGroup.selected=this:!t&&this.radioGroup&&this.radioGroup.value===this.value&&(this.radioGroup.selected=null),t&&this._radioDispatcher.notify(this.id,this.name),this._changeDetector.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){this._value!==e&&(this._value=e,null!==this.radioGroup&&(this.checked||(this.checked=this.radioGroup.value===e),this.checked&&(this.radioGroup.selected=this)))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled||null!==this.radioGroup&&this.radioGroup.disabled},set:function(e){var t=!!e;this._disabled!==t&&(this._disabled=t,this._changeDetector.markForCheck())},enumerable:!0,configurable:!0}),e.prototype._markForCheck=function(){this._changeDetector.markForCheck()},e.prototype.ngOnInit=function(){this.radioGroup&&(this.checked=this.radioGroup.value===this._value,this.name=this.radioGroup.name)},e.prototype.ngOnDestroy=function(){this._removeUniqueSelectionListener()},e.prototype._emitChangeEvent=function(){this.change.emit(new k(this,this._value))},e.prototype._onInputChange=function(e){e.stopPropagation();var t=this.radioGroup&&this.value!==this.radioGroup.value;this.checked=!0,this._emitChangeEvent(),this.radioGroup&&(this.radioGroup._controlValueAccessorChangeFn(this.value),this.radioGroup._touch(),t&&this.radioGroup._emitChangeEvent())},e.decorators=[{type:i.Component,args:[{selector:"it-radio-button",template:'<div class="form-check">\n <input type="radio"\n [id]="id"\n [checked]="checked"\n [disabled]="disabled"\n [attr.name]="name"\n (change)="_onInputChange($event)">\n <label\n [attr.for]="id">{{label}}</label>\n</div>\n',styles:[""],exportAs:"itRadioButton",changeDetection:i.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[{type:R,decorators:[{type:i.Optional}]},{type:i.ChangeDetectorRef},{type:b}]},e.propDecorators={name:[{type:i.Input}],label:[{type:i.Input}],checked:[{type:i.Input}],value:[{type:i.Input}],disabled:[{type:i.Input}],change:[{type:i.Output}]},e}(),E=function(){function e(){}return e.coerceBooleanProperty=function(e){return null!=e&&""+e!="false"},e}(),O=function(){function e(e){this.el=e,this._badgeColor=s,this._badgeText="",this._isPill=!1}return Object.defineProperty(e.prototype,"badgeColor",{get:function(){return this._badgeColor},set:function(e){r.is(e)?this._badgeColor=e:this._badgeColor=s},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"badgeText",{get:function(){return this._badgeText},set:function(e){this._badgeText=e||""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isPill",{get:function(){return this._isPill},set:function(e){this._isPill=E.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),e.prototype.getBadgeColorClassName=function(){return"badge-"+this._badgeColor},Object.defineProperty(e.prototype,"hostClasses",{get:function(){return["badge",this.getBadgeColorClassName(),this.isPill?"badge-pill":""].join(" ")},enumerable:!0,configurable:!0}),e.decorators=[{type:i.Directive,args:[{selector:"[it-badge]",exportAs:"itBadge"}]}],e.ctorParameters=function(){return[{type:i.ElementRef}]},e.propDecorators={badgeColor:[{type:i.Input}],badgeText:[{type:i.Input,args:["it-badge"]},{type:i.HostBinding,args:["innerText"]}],isPill:[{type:i.Input}],hostClasses:[{type:i.HostBinding,args:["class"]}]},e}(),D=function(){function e(){}return e.decorators=[{type:i.NgModule,args:[{imports:[o.CommonModule,n.FormsModule],declarations:[p,y,R,P,O,u],exports:[p,y,R,P,O,u]}]}],e}();e.ProgressBarComponent=u,e.CheckboxChange=l,e.CheckboxComponent=p,e.ToggleChange=f,e.ToggleComponent=y,e.RadioChange=k,e.RadioGroupDirective=R,e.RadioButtonComponent=P,e.BadgeDirective=O,e.DesignAngularKitModule=D,e.ɵa=b,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("io-ts"),require("@angular/core"),require("@angular/forms"),require("@angular/common")):"function"==typeof define&&define.amd?define("design-angular-kit",["exports","io-ts","@angular/core","@angular/forms","@angular/common"],t):t(e["design-angular-kit"]={},null,e.ng.core,e.ng.forms,e.ng.common)}(this,function(e,t,i,n,o){"use strict";var r=t.keyof({primary:null,secondary:null,danger:null,warning:null,info:null,success:null,light:null,dark:null}),a="primary",s="light",c=0,u=function(){function e(){this.progressbarId="it-progress-bar-"+c++,this._height=e.PROGRESS_BAR_DEFAULT_HEIGHT,this._min=e.PROGRESS_BAR_DEFAULT_MIN,this._max=e.PROGRESS_BAR_DEFAULT_MAX,this._value=e.PROGRESS_BAR_DEFAULT_VALUE,this._label=e.PROGRESS_BAR_DEFAULT_LABEL,this._color=a}return Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(e){this._height=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"min",{get:function(){return this._min},set:function(e){this._min=Math.round(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){return this._max},set:function(e){this._max=Math.round(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){this._value=Math.min(Math.max(e,this._min),this._max)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"label",{get:function(){return this._label},set:function(e){this._label=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){return this._color},set:function(e){r.is(e)?this._color=e:this._color=a},enumerable:!0,configurable:!0}),e.prototype.valuePercentage=function(){return 100*(this.value-this.min)/(this.max-this.min)},e.prototype.pgStyle=function(){return{width:this.valuePercentage()+"%"}},e.prototype.pgClass=function(){var e={"progress-bar":!0};return this.color&&(e["bg-"+this.color]=!0),e},e.PROGRESS_BAR_DEFAULT_MIN=0,e.PROGRESS_BAR_DEFAULT_MAX=100,e.PROGRESS_BAR_DEFAULT_VALUE=0,e.PROGRESS_BAR_DEFAULT_HEIGHT=20,e.PROGRESS_BAR_DEFAULT_LABEL="",e.decorators=[{type:i.Component,args:[{selector:"it-progress-bar",template:'<div class="progress" [ngStyle]="{\'height\': height + \'px\'}">\n <div role="progressbar" [id]="progressbarId" [ngClass]="pgClass()" [ngStyle]="pgStyle()"\n [attr.aria-valuenow]="value" [attr.aria-valuemin]="min" [attr.aria-valuemax]="max" >\n {{label}}\n </div>\n</div>',styles:[""],changeDetection:i.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[]},e.propDecorators={height:[{type:i.Input}],min:[{type:i.Input}],max:[{type:i.Input}],value:[{type:i.Input}],label:[{type:i.Input}],color:[{type:i.Input}]},e}(),h=0,l=function d(){},p=function(){function e(e){this._changeDetectorRef=e,this._checked=!1,this._disabled=!1,this.change=new i.EventEmitter,this.inputId="checkbox-"+h++,this._onTouched=function(){},this._controlValueAccessorChangeFn=function(){}}return Object.defineProperty(e.prototype,"checked",{get:function(){return this._checked},set:function(e){e!==this.checked&&(this._checked=e,this._changeDetectorRef.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled},set:function(e){e!==this.disabled&&(this._disabled=e,this._changeDetectorRef.markForCheck())},enumerable:!0,configurable:!0}),e.prototype.writeValue=function(e){this.checked=!!e},e.prototype.registerOnChange=function(e){this._controlValueAccessorChangeFn=e},e.prototype.registerOnTouched=function(e){this._onTouched=e},e.prototype.handleChange=function(e){e.stopPropagation(),this.disabled||(this._toggle(),this._emitChangeEvent())},e.prototype._toggle=function(){this.checked=!this.checked},e.prototype._emitChangeEvent=function(){var e=new l;e.source=this,e.checked=this.checked,this._controlValueAccessorChangeFn(this.checked),this.change.emit(e)},e.decorators=[{type:i.Component,args:[{selector:"it-checkbox",template:"<div class=form-check>\n <input type=checkbox\n [id]=inputId\n [checked]=checked\n [disabled]=disabled\n (change)=handleChange($event)>\n <label\n [attr.for]=inputId>{{label}}</label>\n</div>\n",styles:[""],providers:[{provide:n.NG_VALUE_ACCESSOR,useExisting:i.forwardRef(function(){return e}),multi:!0}],changeDetection:i.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[{type:i.ChangeDetectorRef}]},e.propDecorators={checked:[{type:i.Input}],label:[{type:i.Input}],disabled:[{type:i.Input}],change:[{type:i.Output}]},e}(),g=0,f=function _(){},y=function(){function e(e){this._changeDetectorRef=e,this._checked=!1,this._disabled=!1,this.change=new i.EventEmitter,this.inputId="toggle-"+g++,this._onTouched=function(){},this._controlValueAccessorChangeFn=function(){}}return Object.defineProperty(e.prototype,"checked",{get:function(){return this._checked},set:function(e){e!==this.checked&&(this._checked=e,this._changeDetectorRef.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled},set:function(e){e!==this.disabled&&(this._disabled=e,this._changeDetectorRef.markForCheck())},enumerable:!0,configurable:!0}),e.prototype.writeValue=function(e){this.checked=!!e},e.prototype.registerOnChange=function(e){this._controlValueAccessorChangeFn=e},e.prototype.registerOnTouched=function(e){this._onTouched=e},e.prototype.handleChange=function(e){e.stopPropagation(),this.disabled||(this._toggle(),this._emitChangeEvent())},e.prototype._toggle=function(){this.checked=!this.checked},e.prototype._emitChangeEvent=function(){var e=new f;e.source=this,e.checked=this.checked,this._controlValueAccessorChangeFn(this.checked),this.change.emit(e)},e.decorators=[{type:i.Component,args:[{selector:"it-toggle",template:'<div class="form-check">\n <div class="toggles">\n <label [attr.for]=inputId>\n {{label}}\n <input type=checkbox\n [id]=inputId\n [checked]=checked\n [disabled]=disabled\n (change)=handleChange($event)>\n <span class="lever"></span>\n </label>\n </div>\n</div>',styles:[""],providers:[{provide:n.NG_VALUE_ACCESSOR,useExisting:i.forwardRef(function(){return e}),multi:!0}],changeDetection:i.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[{type:i.ChangeDetectorRef}]},e.propDecorators={checked:[{type:i.Input}],label:[{type:i.Input}],disabled:[{type:i.Input}],change:[{type:i.Output}]},e}();var b=function(){function e(){this._listeners=[]}return e.prototype.notify=function(e,t){try{for(var n=function o(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}(this._listeners),i=n.next();!i.done;i=n.next()){(0,i.value)(e,t)}}catch(s){r={error:s}}finally{try{i&&!i.done&&(a=n["return"])&&a.call(n)}finally{if(r)throw r.error}}var r,a},e.prototype.listen=function(t){var e=this;return this._listeners.push(t),function(){e._listeners=e._listeners.filter(function(e){return t!==e})}},e.prototype.ngOnDestroy=function(){this._listeners=[]},e.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}],e.ngInjectableDef=i.defineInjectable({factory:function(){return new e},token:e,providedIn:"root"}),e}(),m=0;function v(e){return null!=e&&""+e!="false"}var k=function C(e,t){this.source=e,this.value=t},R=function(){function e(e){this._changeDetector=e,this.role="radiogroup",this._value=null,this._name="it-radio-group-"+m++,this._selected=null,this._isInitialized=!1,this._disabled=!1,this.change=new i.EventEmitter,this._controlValueAccessorChangeFn=function(){},this.onTouched=function(){}}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){this._name=e,this._updateRadioButtonNames()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){this._value!==e&&(this._value=e,this._updateSelectedRadioFromValue(),this._checkSelectedRadioButton())},enumerable:!0,configurable:!0}),e.prototype._checkSelectedRadioButton=function(){this._selected&&!this._selected.checked&&(this._selected.checked=!0)},Object.defineProperty(e.prototype,"selected",{get:function(){return this._selected},set:function(e){this._selected=e,this.value=e?e.value:null,this._checkSelectedRadioButton()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled},set:function(e){this._disabled=v(e),this._markRadiosForCheck()},enumerable:!0,configurable:!0}),e.prototype.ngAfterContentInit=function(){this._isInitialized=!0},e.prototype._touch=function(){this.onTouched&&this.onTouched()},e.prototype._updateRadioButtonNames=function(){var t=this;this._radios&&this._radios.forEach(function(e){e.name=t.name})},e.prototype._updateSelectedRadioFromValue=function(){var t=this;this._selected=null,this._radios.forEach(function(e){e.checked=t.value===e.value,e.checked&&(t._selected=e)})},e.prototype._emitChangeEvent=function(){this._isInitialized&&this.change.emit(new k(this._selected,this._value))},e.prototype._markRadiosForCheck=function(){this._radios&&this._radios.forEach(function(e){return e._markForCheck()})},e.prototype.writeValue=function(e){this.value=e,this._changeDetector.markForCheck()},e.prototype.registerOnChange=function(e){this._controlValueAccessorChangeFn=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.decorators=[{type:i.Directive,args:[{selector:"it-radio-group",exportAs:"itRadioGroup",providers:[{provide:n.NG_VALUE_ACCESSOR,useExisting:i.forwardRef(function(){return e}),multi:!0}]}]}],e.ctorParameters=function(){return[{type:i.ChangeDetectorRef}]},e.propDecorators={role:[{type:i.HostBinding,args:["attr.role"]}],change:[{type:i.Output}],_radios:[{type:i.ContentChildren,args:[i.forwardRef(function(){return P}),{descendants:!0}]}],name:[{type:i.Input}],value:[{type:i.Input}],selected:[{type:i.Input}],disabled:[{type:i.Input}]},e}(),P=function(){function e(e,t,n){var o=this;this._changeDetector=t,this._radioDispatcher=n,this.id="radio-"+m++,this.change=new i.EventEmitter,this._checked=!1,this._value=null,this._removeUniqueSelectionListener=function(){},this.radioGroup=e,this._removeUniqueSelectionListener=n.listen(function(e,t){e!==o.id&&t===o.name&&(o.checked=!1)})}return Object.defineProperty(e.prototype,"checked",{get:function(){return this._checked},set:function(e){var t=v(e);this._checked!==t&&((this._checked=t)&&this.radioGroup&&this.radioGroup.value!==this.value?this.radioGroup.selected=this:!t&&this.radioGroup&&this.radioGroup.value===this.value&&(this.radioGroup.selected=null),t&&this._radioDispatcher.notify(this.id,this.name),this._changeDetector.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){this._value!==e&&(this._value=e,null!==this.radioGroup&&(this.checked||(this.checked=this.radioGroup.value===e),this.checked&&(this.radioGroup.selected=this)))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled||null!==this.radioGroup&&this.radioGroup.disabled},set:function(e){var t=!!e;this._disabled!==t&&(this._disabled=t,this._changeDetector.markForCheck())},enumerable:!0,configurable:!0}),e.prototype._markForCheck=function(){this._changeDetector.markForCheck()},e.prototype.ngOnInit=function(){this.radioGroup&&(this.checked=this.radioGroup.value===this._value,this.name=this.radioGroup.name)},e.prototype.ngOnDestroy=function(){this._removeUniqueSelectionListener()},e.prototype._emitChangeEvent=function(){this.change.emit(new k(this,this._value))},e.prototype._onInputChange=function(e){e.stopPropagation();var t=this.radioGroup&&this.value!==this.radioGroup.value;this.checked=!0,this._emitChangeEvent(),this.radioGroup&&(this.radioGroup._controlValueAccessorChangeFn(this.value),this.radioGroup._touch(),t&&this.radioGroup._emitChangeEvent())},e.decorators=[{type:i.Component,args:[{selector:"it-radio-button",template:'<div class="form-check">\n <input type="radio"\n [id]="id"\n [checked]="checked"\n [disabled]="disabled"\n [attr.name]="name"\n (change)="_onInputChange($event)">\n <label\n [attr.for]="id">{{label}}</label>\n</div>\n',styles:[""],exportAs:"itRadioButton",changeDetection:i.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[{type:R,decorators:[{type:i.Optional}]},{type:i.ChangeDetectorRef},{type:b}]},e.propDecorators={name:[{type:i.Input}],label:[{type:i.Input}],checked:[{type:i.Input}],value:[{type:i.Input}],disabled:[{type:i.Input}],change:[{type:i.Output}]},e}(),E=function(){function e(){}return e.coerceBooleanProperty=function(e){return null!=e&&""+e!="false"},e}(),O=function(){function e(e){this.el=e,this._badgeColor=s,this._badgeText="",this._isPill=!1}return Object.defineProperty(e.prototype,"badgeColor",{get:function(){return this._badgeColor},set:function(e){r.is(e)?this._badgeColor=e:this._badgeColor=s},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"badgeText",{get:function(){return this._badgeText},set:function(e){this._badgeText=e||""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isPill",{get:function(){return this._isPill},set:function(e){this._isPill=E.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),e.prototype.getBadgeColorClassName=function(){return"badge-"+this._badgeColor},Object.defineProperty(e.prototype,"hostClasses",{get:function(){return["badge",this.getBadgeColorClassName(),this.isPill?"badge-pill":""].join(" ")},enumerable:!0,configurable:!0}),e.decorators=[{type:i.Directive,args:[{selector:"[it-badge]",exportAs:"itBadge"}]}],e.ctorParameters=function(){return[{type:i.ElementRef}]},e.propDecorators={badgeColor:[{type:i.Input}],badgeText:[{type:i.Input,args:["it-badge"]},{type:i.HostBinding,args:["innerText"]}],isPill:[{type:i.Input}],hostClasses:[{type:i.HostBinding,args:["class"]}]},e}(),D=function(){function e(){}return e.decorators=[{type:i.NgModule,args:[{imports:[o.CommonModule,n.FormsModule],declarations:[p,y,R,P,O,u],exports:[p,y,R,P,O,u]}]}],e}();e.ProgressBarComponent=u,e.CheckboxChange=l,e.CheckboxComponent=p,e.ToggleChange=f,e.ToggleComponent=y,e.RadioChange=k,e.RadioGroupDirective=R,e.RadioButtonComponent=P,e.BadgeDirective=O,e.DesignAngularKitModule=D,e.ɵa=b,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=design-angular-kit.umd.min.js.map
{
"name": "design-angular-kit",
"version": "0.2.0",
"version": "0.2.1",
"license": " BSD-3-Clause",

@@ -12,3 +12,3 @@ "repository": {

"@angular/core": "^6.0.0-rc.0 || ^6.0.0",
"@angular/form": "^6.0.0-rc.0 || ^6.0.0",
"@angular/forms": "^6.0.0-rc.0 || ^6.0.0",
"bootstrap-italia": "^0.9.1"

@@ -15,0 +15,0 @@ },

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc