Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angular-hybrid-forms

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-hybrid-forms - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

18

angular-hybrid-forms.es5.js

@@ -260,7 +260,12 @@ import { Component, ContentChild, Directive, EventEmitter, Input, NgModule, Optional, Output, Pipe, SkipSelf } from '@angular/core';

}
/**
* @return {?}
*/
FormGroupComponent.prototype.ngOnInit = function () {
};
Object.defineProperty(FormGroupComponent.prototype, "group", {
/**
* @return {?}
*/
get: function () {
return this.formGroupNameDirective.formGroup;
},
enumerable: true,
configurable: true
});
FormGroupComponent.decorators = [

@@ -276,2 +281,5 @@ { type: Component, args: [{

FormGroupComponent.ctorParameters = function () { return []; };
FormGroupComponent.propDecorators = {
'formGroupNameDirective': [{ type: ContentChild, args: [FormGroupNameDirective,] },],
};
return FormGroupComponent;

@@ -278,0 +286,0 @@ }());

@@ -224,8 +224,7 @@ import { Component, ContentChild, Directive, EventEmitter, Input, NgModule, Optional, Output, Pipe, SkipSelf } from '@angular/core';

class FormGroupComponent {
constructor() {
}
/**
* @return {?}
*/
ngOnInit() {
get group() {
return this.formGroupNameDirective.formGroup;
}

@@ -243,2 +242,5 @@ }

FormGroupComponent.ctorParameters = () => [];
FormGroupComponent.propDecorators = {
'formGroupNameDirective': [{ type: ContentChild, args: [FormGroupNameDirective,] },],
};

@@ -245,0 +247,0 @@ class FormComponent {

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

{"__symbolic":"module","version":3,"metadata":{"HybridFormsModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"},{"__symbolic":"reference","module":"@angular/forms","name":"ReactiveFormsModule"}],"declarations":[{"__symbolic":"reference","name":"ɵa"},{"__symbolic":"reference","name":"ɵb"},{"__symbolic":"reference","name":"ɵd"},{"__symbolic":"reference","name":"ɵe"},{"__symbolic":"reference","name":"ɵf"},{"__symbolic":"reference","name":"ɵc"}],"exports":[{"__symbolic":"reference","name":"ɵa"},{"__symbolic":"reference","name":"ɵb"},{"__symbolic":"reference","name":"ɵd"},{"__symbolic":"reference","name":"ɵe"},{"__symbolic":"reference","name":"ɵf"},{"__symbolic":"reference","name":"ɵc"}]}]}],"members":{}},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"hf-form","template":"\n <form [formGroup]=\"group\" (submit)=\"onSubmit($event)\" class=\"hf-form\" novalidate>\n <div class=\"hf-form__content\">\n <ng-content></ng-content>\n </div>\n <div class=\"hf-form__buttons\">\n </div>\n </form>\n "}]}],"members":{"buttons":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"validSubmit":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"onSubmit":[{"__symbolic":"method"}]}},"ɵb":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[formControlName]"}]}],"members":{"formControlName":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"validValueChangeDebounce":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"formControlValueChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"formControlValidValueChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"SkipSelf"}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"SkipSelf"}}]],"parameters":[{"__symbolic":"reference","module":"@angular/forms","name":"FormGroupDirective"},{"__symbolic":"reference","name":"ɵc"}]}],"formControlValue":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"ngOnInit":[{"__symbolic":"method"}]}},"ɵc":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[formGroupName]"}]}],"members":{"formGroupName":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"validValueChangeDebounce":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"formControlValueChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"formControlValidValueChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"SkipSelf"}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"SkipSelf"}}]],"parameters":[{"__symbolic":"reference","module":"@angular/forms","name":"FormGroupDirective"},{"__symbolic":"reference","name":"ɵc"}]}],"ngOnInit":[{"__symbolic":"method"}]}},"ɵd":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe"},"arguments":[{"name":"formGroup"}]}],"members":{"transform":[{"__symbolic":"method"}]}},"ɵe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"hf-form-control","template":"\n <div [ngClass]=\"{'hf-field': true, 'hf-field--required': required, 'hf-field--invalid': !valid, 'hf-field--valid-value-changes': validValueChanges}\">\n <label class=\"hf-field__label\">{{label}}</label>\n <span class=\"hf-field__control\"><ng-content></ng-content></span>\n <label *ngIf=\"!valid\" class=\"hf-field__errors\">{{errors|json}}</label>\n </div>"}]}],"members":{"label":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"requiredValidator":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild"},"arguments":[{"__symbolic":"reference","module":"@angular/forms","name":"RequiredValidator"}]}]}],"formControlNameDirective":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild"},"arguments":[{"__symbolic":"reference","name":"ɵb"}]}]}],"ngAfterContentInit":[{"__symbolic":"method"}]}},"ɵf":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"hf-form-group","template":"<ng-content></ng-content>"}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}]}}},"origins":{"HybridFormsModule":"./src/hybrid-forms.module","ɵa":"./src/component/form.component","ɵb":"./src/directive/form-control-name.directive","ɵc":"./src/directive/form-group-name.directive","ɵd":"./src/pipe/form-group.pipe","ɵe":"./src/component/form-control.component","ɵf":"./src/component/form-group.component"},"importAs":"angular-hybrid-forms"}
{"__symbolic":"module","version":3,"metadata":{"HybridFormsModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"},{"__symbolic":"reference","module":"@angular/forms","name":"ReactiveFormsModule"}],"declarations":[{"__symbolic":"reference","name":"ɵa"},{"__symbolic":"reference","name":"ɵb"},{"__symbolic":"reference","name":"ɵd"},{"__symbolic":"reference","name":"ɵe"},{"__symbolic":"reference","name":"ɵf"},{"__symbolic":"reference","name":"ɵc"}],"exports":[{"__symbolic":"reference","name":"ɵa"},{"__symbolic":"reference","name":"ɵb"},{"__symbolic":"reference","name":"ɵd"},{"__symbolic":"reference","name":"ɵe"},{"__symbolic":"reference","name":"ɵf"},{"__symbolic":"reference","name":"ɵc"}]}]}],"members":{}},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"hf-form","template":"\n <form [formGroup]=\"group\" (submit)=\"onSubmit($event)\" class=\"hf-form\" novalidate>\n <div class=\"hf-form__content\">\n <ng-content></ng-content>\n </div>\n <div class=\"hf-form__buttons\">\n </div>\n </form>\n "}]}],"members":{"buttons":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"validSubmit":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"onSubmit":[{"__symbolic":"method"}]}},"ɵb":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[formControlName]"}]}],"members":{"formControlName":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"validValueChangeDebounce":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"formControlValueChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"formControlValidValueChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"SkipSelf"}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"SkipSelf"}}]],"parameters":[{"__symbolic":"reference","module":"@angular/forms","name":"FormGroupDirective"},{"__symbolic":"reference","name":"ɵc"}]}],"formControlValue":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"ngOnInit":[{"__symbolic":"method"}]}},"ɵc":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[formGroupName]"}]}],"members":{"formGroupName":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"validValueChangeDebounce":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"formControlValueChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"formControlValidValueChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"SkipSelf"}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"SkipSelf"}}]],"parameters":[{"__symbolic":"reference","module":"@angular/forms","name":"FormGroupDirective"},{"__symbolic":"reference","name":"ɵc"}]}],"ngOnInit":[{"__symbolic":"method"}]}},"ɵd":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe"},"arguments":[{"name":"formGroup"}]}],"members":{"transform":[{"__symbolic":"method"}]}},"ɵe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"hf-form-control","template":"\n <div [ngClass]=\"{'hf-field': true, 'hf-field--required': required, 'hf-field--invalid': !valid, 'hf-field--valid-value-changes': validValueChanges}\">\n <label class=\"hf-field__label\">{{label}}</label>\n <span class=\"hf-field__control\"><ng-content></ng-content></span>\n <label *ngIf=\"!valid\" class=\"hf-field__errors\">{{errors|json}}</label>\n </div>"}]}],"members":{"label":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"requiredValidator":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild"},"arguments":[{"__symbolic":"reference","module":"@angular/forms","name":"RequiredValidator"}]}]}],"formControlNameDirective":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild"},"arguments":[{"__symbolic":"reference","name":"ɵb"}]}]}],"ngAfterContentInit":[{"__symbolic":"method"}]}},"ɵf":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"hf-form-group","template":"<ng-content></ng-content>"}]}],"members":{"formGroupNameDirective":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild"},"arguments":[{"__symbolic":"reference","name":"ɵc"}]}]}]}}},"origins":{"HybridFormsModule":"./src/hybrid-forms.module","ɵa":"./src/component/form.component","ɵb":"./src/directive/form-control-name.directive","ɵc":"./src/directive/form-group-name.directive","ɵd":"./src/pipe/form-group.pipe","ɵe":"./src/component/form-control.component","ɵf":"./src/component/form-group.component"},"importAs":"angular-hybrid-forms"}

@@ -260,7 +260,12 @@ (function (global, factory) {

}
/**
* @return {?}
*/
FormGroupComponent.prototype.ngOnInit = function () {
};
Object.defineProperty(FormGroupComponent.prototype, "group", {
/**
* @return {?}
*/
get: function () {
return this.formGroupNameDirective.formGroup;
},
enumerable: true,
configurable: true
});
FormGroupComponent.decorators = [

@@ -276,2 +281,5 @@ { type: _angular_core.Component, args: [{

FormGroupComponent.ctorParameters = function () { return []; };
FormGroupComponent.propDecorators = {
'formGroupNameDirective': [{ type: _angular_core.ContentChild, args: [FormGroupNameDirective,] },],
};
return FormGroupComponent;

@@ -278,0 +286,0 @@ }());

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

!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("@angular/core"),require("@angular/common"),require("@angular/forms"),require("rxjs/add/operator/debounceTime"),require("rxjs/Subject")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/common","@angular/forms","rxjs/add/operator/debounceTime","rxjs/Subject"],r):r(e.angularHybridForms=e.angularHybridForms||{},e.ng.core,e.ng.common,e.ng.forms,null,e.rxjs_Subject)}(this,function(e,r,t,o,n,i){"use strict";function u(e,r,t,o,n,i,u,l){var f=e?e.formGroup:r.form;a(t),f.addControl(t,o),o.valueChanges.subscribe(function(e){return n.emit(e)}),o.valueChanges.subscribe(function(e){return o.valid?u.next(e):null}),o.valueChanges.debounceTime(l).subscribe(function(e){return o.valid?i.emit(e):null})}function a(e){if(!e)throw new Error("A name must be provided for all form controls or groups. Did you forget to put 'formControlName' or 'formGroupName' on 'hf-form-group' or 'hf-form-control'?")}var l=400,f=function(){function e(e,t){this.formGroupDirective=e,this.formGroupNameDirective=t,this.validValueChangeDebounce=l,this.formControlValueChange=new r.EventEmitter,this.formControlValidValueChange=new r.EventEmitter,this.formControlValidValueDebounceStarted=new i.Subject,this.formGroup=new o.FormGroup({})}return e.prototype.ngOnInit=function(){u(this.formGroupNameDirective,this.formGroupDirective,this.formGroupName,this.formGroup,this.formControlValueChange,this.formControlValidValueChange,this.formControlValidValueDebounceStarted,this.validValueChangeDebounce)},e.decorators=[{type:r.Directive,args:[{selector:"[formGroupName]"}]}],e.ctorParameters=function(){return[{type:o.FormGroupDirective,decorators:[{type:r.SkipSelf}]},{type:e,decorators:[{type:r.Optional},{type:r.SkipSelf}]}]},e.propDecorators={formGroupName:[{type:r.Input}],validValueChangeDebounce:[{type:r.Input}],formControlValueChange:[{type:r.Output}],formControlValidValueChange:[{type:r.Output}]},e}(),c=function(){function e(e,t){this.formGroupDirective=e,this.formGroupNameDirective=t,this.validValueChangeDebounce=l,this.formControlValueChange=new r.EventEmitter,this.formControlValidValueChange=new r.EventEmitter,this.formControlValidValueDebounceStarted=new i.Subject,this.formControl=new o.FormControl}return Object.defineProperty(e.prototype,"formControlValue",{get:function(){return this.formControl.value},set:function(e){this.formControl.setValue(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"valid",{get:function(){return this.formControl.valid},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pristine",{get:function(){return this.formControl.pristine},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"groupSubmitted",{get:function(){return this.formGroupDirective.submitted},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"errors",{get:function(){return this.formControl.errors},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){u(this.formGroupNameDirective,this.formGroupDirective,this.formControlName,this.formControl,this.formControlValueChange,this.formControlValidValueChange,this.formControlValidValueDebounceStarted,this.validValueChangeDebounce)},e.decorators=[{type:r.Directive,args:[{selector:"[formControlName]"}]}],e.ctorParameters=function(){return[{type:o.FormGroupDirective,decorators:[{type:r.SkipSelf}]},{type:f,decorators:[{type:r.Optional},{type:r.SkipSelf}]}]},e.propDecorators={formControlName:[{type:r.Input}],validValueChangeDebounce:[{type:r.Input}],formControlValueChange:[{type:r.Output}],formControlValidValueChange:[{type:r.Output}],formControlValue:[{type:r.Input}]},e}(),s=function(){function e(){}return e.prototype.transform=function(){return new o.FormGroup({})},e.decorators=[{type:r.Pipe,args:[{name:"formGroup"}]}],e.ctorParameters=function(){return[]},e}(),m=function(){function e(){this.validValueChanges=!1}return e.prototype.ngAfterContentInit=function(){var e=this;this.formControlNameDirective.formControlValidValueDebounceStarted.subscribe(function(r){return e.validValueChanges=!0}),this.formControlNameDirective.formControlValidValueChange.subscribe(function(r){return e.validValueChanges=!1})},Object.defineProperty(e.prototype,"required",{get:function(){return this.requiredValidator&&this.requiredValidator.required},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"valid",{get:function(){return this.formControlNameDirective&&(this.formControlNameDirective.groupSubmitted&&this.formControlNameDirective.pristine||this.formControlNameDirective.valid)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"errors",{get:function(){return this.formControlNameDirective.errors},enumerable:!0,configurable:!0}),e.decorators=[{type:r.Component,args:[{selector:"hf-form-control",template:'\n <div [ngClass]="{\'hf-field\': true, \'hf-field--required\': required, \'hf-field--invalid\': !valid, \'hf-field--valid-value-changes\': validValueChanges}">\n <label class="hf-field__label">{{label}}</label>\n <span class="hf-field__control"><ng-content></ng-content></span>\n <label *ngIf="!valid" class="hf-field__errors">{{errors|json}}</label>\n </div>'}]}],e.ctorParameters=function(){return[]},e.propDecorators={label:[{type:r.Input}],requiredValidator:[{type:r.ContentChild,args:[o.RequiredValidator]}],formControlNameDirective:[{type:r.ContentChild,args:[c]}]},e}(),p=function(){function e(){}return e.prototype.ngOnInit=function(){},e.decorators=[{type:r.Component,args:[{selector:"hf-form-group",template:"<ng-content></ng-content>"}]}],e.ctorParameters=function(){return[]},e}(),d=function(){function e(){this.validSubmit=new r.EventEmitter,this.group=new o.FormGroup({})}return e.prototype.onSubmit=function(e){this.group.valid&&this.validSubmit.emit(e)},e.decorators=[{type:r.Component,args:[{selector:"hf-form",template:'\n <form [formGroup]="group" (submit)="onSubmit($event)" class="hf-form" novalidate>\n <div class="hf-form__content">\n <ng-content></ng-content>\n </div>\n <div class="hf-form__buttons">\n </div>\n </form>\n '}]}],e.ctorParameters=function(){return[]},e.propDecorators={buttons:[{type:r.Input}],validSubmit:[{type:r.Output}]},e}(),h=function(){function e(){}return e.decorators=[{type:r.NgModule,args:[{imports:[t.CommonModule,o.ReactiveFormsModule],declarations:[d,c,s,m,p,f],exports:[d,c,s,m,p,f]}]}],e.ctorParameters=function(){return[]},e}();e.HybridFormsModule=h,e.ɵe=m,e.ɵf=p,e.ɵa=d,e.ɵb=c,e.ɵc=f,e.ɵd=s,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("@angular/core"),require("@angular/common"),require("@angular/forms"),require("rxjs/add/operator/debounceTime"),require("rxjs/Subject")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/common","@angular/forms","rxjs/add/operator/debounceTime","rxjs/Subject"],r):r(e.angularHybridForms=e.angularHybridForms||{},e.ng.core,e.ng.common,e.ng.forms,null,e.rxjs_Subject)}(this,function(e,r,t,o,n,i){"use strict";function u(e,r,t,o,n,i,u,l){var f=e?e.formGroup:r.form;a(t),f.addControl(t,o),o.valueChanges.subscribe(function(e){return n.emit(e)}),o.valueChanges.subscribe(function(e){return o.valid?u.next(e):null}),o.valueChanges.debounceTime(l).subscribe(function(e){return o.valid?i.emit(e):null})}function a(e){if(!e)throw new Error("A name must be provided for all form controls or groups. Did you forget to put 'formControlName' or 'formGroupName' on 'hf-form-group' or 'hf-form-control'?")}var l=400,f=function(){function e(e,t){this.formGroupDirective=e,this.formGroupNameDirective=t,this.validValueChangeDebounce=l,this.formControlValueChange=new r.EventEmitter,this.formControlValidValueChange=new r.EventEmitter,this.formControlValidValueDebounceStarted=new i.Subject,this.formGroup=new o.FormGroup({})}return e.prototype.ngOnInit=function(){u(this.formGroupNameDirective,this.formGroupDirective,this.formGroupName,this.formGroup,this.formControlValueChange,this.formControlValidValueChange,this.formControlValidValueDebounceStarted,this.validValueChangeDebounce)},e.decorators=[{type:r.Directive,args:[{selector:"[formGroupName]"}]}],e.ctorParameters=function(){return[{type:o.FormGroupDirective,decorators:[{type:r.SkipSelf}]},{type:e,decorators:[{type:r.Optional},{type:r.SkipSelf}]}]},e.propDecorators={formGroupName:[{type:r.Input}],validValueChangeDebounce:[{type:r.Input}],formControlValueChange:[{type:r.Output}],formControlValidValueChange:[{type:r.Output}]},e}(),c=function(){function e(e,t){this.formGroupDirective=e,this.formGroupNameDirective=t,this.validValueChangeDebounce=l,this.formControlValueChange=new r.EventEmitter,this.formControlValidValueChange=new r.EventEmitter,this.formControlValidValueDebounceStarted=new i.Subject,this.formControl=new o.FormControl}return Object.defineProperty(e.prototype,"formControlValue",{get:function(){return this.formControl.value},set:function(e){this.formControl.setValue(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"valid",{get:function(){return this.formControl.valid},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pristine",{get:function(){return this.formControl.pristine},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"groupSubmitted",{get:function(){return this.formGroupDirective.submitted},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"errors",{get:function(){return this.formControl.errors},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){u(this.formGroupNameDirective,this.formGroupDirective,this.formControlName,this.formControl,this.formControlValueChange,this.formControlValidValueChange,this.formControlValidValueDebounceStarted,this.validValueChangeDebounce)},e.decorators=[{type:r.Directive,args:[{selector:"[formControlName]"}]}],e.ctorParameters=function(){return[{type:o.FormGroupDirective,decorators:[{type:r.SkipSelf}]},{type:f,decorators:[{type:r.Optional},{type:r.SkipSelf}]}]},e.propDecorators={formControlName:[{type:r.Input}],validValueChangeDebounce:[{type:r.Input}],formControlValueChange:[{type:r.Output}],formControlValidValueChange:[{type:r.Output}],formControlValue:[{type:r.Input}]},e}(),s=function(){function e(){}return e.prototype.transform=function(){return new o.FormGroup({})},e.decorators=[{type:r.Pipe,args:[{name:"formGroup"}]}],e.ctorParameters=function(){return[]},e}(),m=function(){function e(){this.validValueChanges=!1}return e.prototype.ngAfterContentInit=function(){var e=this;this.formControlNameDirective.formControlValidValueDebounceStarted.subscribe(function(r){return e.validValueChanges=!0}),this.formControlNameDirective.formControlValidValueChange.subscribe(function(r){return e.validValueChanges=!1})},Object.defineProperty(e.prototype,"required",{get:function(){return this.requiredValidator&&this.requiredValidator.required},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"valid",{get:function(){return this.formControlNameDirective&&(this.formControlNameDirective.groupSubmitted&&this.formControlNameDirective.pristine||this.formControlNameDirective.valid)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"errors",{get:function(){return this.formControlNameDirective.errors},enumerable:!0,configurable:!0}),e.decorators=[{type:r.Component,args:[{selector:"hf-form-control",template:'\n <div [ngClass]="{\'hf-field\': true, \'hf-field--required\': required, \'hf-field--invalid\': !valid, \'hf-field--valid-value-changes\': validValueChanges}">\n <label class="hf-field__label">{{label}}</label>\n <span class="hf-field__control"><ng-content></ng-content></span>\n <label *ngIf="!valid" class="hf-field__errors">{{errors|json}}</label>\n </div>'}]}],e.ctorParameters=function(){return[]},e.propDecorators={label:[{type:r.Input}],requiredValidator:[{type:r.ContentChild,args:[o.RequiredValidator]}],formControlNameDirective:[{type:r.ContentChild,args:[c]}]},e}(),p=function(){function e(){}return Object.defineProperty(e.prototype,"group",{get:function(){return this.formGroupNameDirective.formGroup},enumerable:!0,configurable:!0}),e.decorators=[{type:r.Component,args:[{selector:"hf-form-group",template:"<ng-content></ng-content>"}]}],e.ctorParameters=function(){return[]},e.propDecorators={formGroupNameDirective:[{type:r.ContentChild,args:[f]}]},e}(),d=function(){function e(){this.validSubmit=new r.EventEmitter,this.group=new o.FormGroup({})}return e.prototype.onSubmit=function(e){this.group.valid&&this.validSubmit.emit(e)},e.decorators=[{type:r.Component,args:[{selector:"hf-form",template:'\n <form [formGroup]="group" (submit)="onSubmit($event)" class="hf-form" novalidate>\n <div class="hf-form__content">\n <ng-content></ng-content>\n </div>\n <div class="hf-form__buttons">\n </div>\n </form>\n '}]}],e.ctorParameters=function(){return[]},e.propDecorators={buttons:[{type:r.Input}],validSubmit:[{type:r.Output}]},e}(),h=function(){function e(){}return e.decorators=[{type:r.NgModule,args:[{imports:[t.CommonModule,o.ReactiveFormsModule],declarations:[d,c,s,m,p,f],exports:[d,c,s,m,p,f]}]}],e.ctorParameters=function(){return[]},e}();e.HybridFormsModule=h,e.ɵe=m,e.ɵf=p,e.ɵa=d,e.ɵb=c,e.ɵc=f,e.ɵd=s,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=angular-hybrid-forms.umd.min.js.map
{
"name": "angular-hybrid-forms",
"version": "0.0.7",
"version": "0.0.8",
"description": "An Angular form library offering a middleground between a template-driven, reactive forms and more",

@@ -5,0 +5,0 @@ "main": "./bundles/quickstart-lib.umd.js",

@@ -1,5 +0,6 @@

import { OnInit } from '@angular/core';
export declare class FormGroupComponent implements OnInit {
constructor();
ngOnInit(): void;
import { FormGroupNameDirective } from '../directive/form-group-name.directive';
import { FormGroup } from '@angular/forms';
export declare class FormGroupComponent {
formGroupNameDirective: FormGroupNameDirective;
readonly group: FormGroup;
}
import { EventEmitter } from '@angular/core';
import { FormGroup } from '@angular/forms';
export declare class FormComponent {
buttons: 'ok' | 'cancel' | ['ok', 'cancel'];
validSubmit: EventEmitter<{}>;
private group;
group: FormGroup;
onSubmit(e: any): void;
}

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

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