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.23 to 0.0.24

12

angular-hybrid-forms.es5.js

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

* @param {?} formGroupNameDirective
* @param {?} cd
*/
function FormGroupNameDirective(self, formGroupDirective, formGroupNameDirective, cd) {
function FormGroupNameDirective(self, formGroupDirective, formGroupNameDirective) {
this.self = self;
this.formGroupDirective = formGroupDirective;
this.formGroupNameDirective = formGroupNameDirective;
this.cd = cd;
this.validValueChangeDebounce = defaultValidValueChangeDebounce;

@@ -78,6 +76,3 @@ this.formControlValueChange = new EventEmitter();

this.formGroup = this.self.form;
this.cd.detach();
addControl(this.formGroupNameDirective, this.formGroupDirective, this.formGroupName, this.formGroup, this.formControlValueChange, this.formControlValidValueChange, this.formControlValidValueDebounceStarted, this.validValueChangeDebounce);
this.cd.reattach();
this.cd.markForCheck();
};

@@ -94,3 +89,2 @@ FormGroupNameDirective.decorators = [

{ type: FormGroupNameDirective, decorators: [{ type: Optional }, { type: SkipSelf },] },
{ type: ChangeDetectorRef, },
]; };

@@ -183,6 +177,6 @@ FormGroupNameDirective.propDecorators = {

FormControlNameDirective.prototype.ngOnInit = function () {
var _this = this;
this.cd.detach();
addControl(this.formGroupNameDirective, this.formGroupDirective, this.formControlName, this.formControl, this.formControlValueChange, this.formControlValidValueChange, this.formControlValidValueDebounceStarted, this.validValueChangeDebounce);
this.cd.reattach();
this.cd.markForCheck();
setTimeout(function () { return _this.cd.reattach(); }, 0);
};

@@ -189,0 +183,0 @@ FormControlNameDirective.decorators = [

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

* @param {?} formGroupNameDirective
* @param {?} cd
*/
constructor(self, formGroupDirective, formGroupNameDirective, cd) {
constructor(self, formGroupDirective, formGroupNameDirective) {
this.self = self;
this.formGroupDirective = formGroupDirective;
this.formGroupNameDirective = formGroupNameDirective;
this.cd = cd;
this.validValueChangeDebounce = defaultValidValueChangeDebounce;

@@ -78,6 +76,3 @@ this.formControlValueChange = new EventEmitter();

this.formGroup = this.self.form;
this.cd.detach();
addControl(this.formGroupNameDirective, this.formGroupDirective, this.formGroupName, this.formGroup, this.formControlValueChange, this.formControlValidValueChange, this.formControlValidValueDebounceStarted, this.validValueChangeDebounce);
this.cd.reattach();
this.cd.markForCheck();
}

@@ -95,3 +90,2 @@ }

{ type: FormGroupNameDirective, decorators: [{ type: Optional }, { type: SkipSelf },] },
{ type: ChangeDetectorRef, },
];

@@ -164,4 +158,3 @@ FormGroupNameDirective.propDecorators = {

addControl(this.formGroupNameDirective, this.formGroupDirective, this.formControlName, this.formControl, this.formControlValueChange, this.formControlValidValueChange, this.formControlValidValueDebounceStarted, this.validValueChangeDebounce);
this.cd.reattach();
this.cd.markForCheck();
setTimeout(() => this.cd.reattach(), 0);
}

@@ -168,0 +161,0 @@ }

@@ -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"}}],null],"parameters":[{"__symbolic":"reference","module":"@angular/forms","name":"FormGroupDirective"},{"__symbolic":"reference","name":"ɵc"},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef"}]}],"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],[formGroup]"}]}],"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":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self"}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__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"}}],null],"parameters":[{"__symbolic":"reference","module":"@angular/forms","name":"FormGroupDirective"},{"__symbolic":"reference","module":"@angular/forms","name":"FormGroupDirective"},{"__symbolic":"reference","name":"ɵc"},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef"}]}],"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 class=\"hf-field\"\n [class.hf-field--required]=\"required\" \n [class.hf-field--invalid]=\"!valid\" \n [class.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"}
{"__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"}}],null],"parameters":[{"__symbolic":"reference","module":"@angular/forms","name":"FormGroupDirective"},{"__symbolic":"reference","name":"ɵc"},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef"}]}],"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],[formGroup]"}]}],"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":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self"}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__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","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 class=\"hf-field\"\n [class.hf-field--required]=\"required\" \n [class.hf-field--invalid]=\"!valid\" \n [class.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"}

@@ -58,9 +58,7 @@ (function (global, factory) {

* @param {?} formGroupNameDirective
* @param {?} cd
*/
function FormGroupNameDirective(self, formGroupDirective, formGroupNameDirective, cd) {
function FormGroupNameDirective(self, formGroupDirective, formGroupNameDirective) {
this.self = self;
this.formGroupDirective = formGroupDirective;
this.formGroupNameDirective = formGroupNameDirective;
this.cd = cd;
this.validValueChangeDebounce = defaultValidValueChangeDebounce;

@@ -78,6 +76,3 @@ this.formControlValueChange = new _angular_core.EventEmitter();

this.formGroup = this.self.form;
this.cd.detach();
addControl(this.formGroupNameDirective, this.formGroupDirective, this.formGroupName, this.formGroup, this.formControlValueChange, this.formControlValidValueChange, this.formControlValidValueDebounceStarted, this.validValueChangeDebounce);
this.cd.reattach();
this.cd.markForCheck();
};

@@ -94,3 +89,2 @@ FormGroupNameDirective.decorators = [

{ type: FormGroupNameDirective, decorators: [{ type: _angular_core.Optional }, { type: _angular_core.SkipSelf },] },
{ type: _angular_core.ChangeDetectorRef, },
]; };

@@ -183,6 +177,6 @@ FormGroupNameDirective.propDecorators = {

FormControlNameDirective.prototype.ngOnInit = function () {
var _this = this;
this.cd.detach();
addControl(this.formGroupNameDirective, this.formGroupDirective, this.formControlName, this.formControl, this.formControlValueChange, this.formControlValidValueChange, this.formControlValidValueDebounceStarted, this.validValueChangeDebounce);
this.cd.reattach();
this.cd.markForCheck();
setTimeout(function () { return _this.cd.reattach(); }, 0);
};

@@ -189,0 +183,0 @@ FormControlNameDirective.decorators = [

@@ -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 a(e,r,t,o,n,i,a,l){var c=e&&e.formGroup||r&&r.form;c!=o&&(u(c,t,o),o.valueChanges.subscribe(function(e){return n.emit(e)}),o.valueChanges.subscribe(function(e){return o.valid?a.next(e):null}),o.valueChanges.debounceTime(l).subscribe(function(e){return o.valid?i.emit(e):null}))}function u(e,r,t){e&&(l(e,r),e.addControl(r,t))}function l(e,r){if(e.get(r))throw new Error("A control of named: '"+r+"' already exists on parent: "+JSON.stringify(e.value)+". Perhaps you did not name your group or control?")}var c=400,s=function(){function e(e,t,n,a){this.self=e,this.formGroupDirective=t,this.formGroupNameDirective=n,this.cd=a,this.validValueChangeDebounce=c,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(){this.formGroupName||(this.formGroup=this.self.form),this.cd.detach(),a(this.formGroupNameDirective,this.formGroupDirective,this.formGroupName,this.formGroup,this.formControlValueChange,this.formControlValidValueChange,this.formControlValidValueDebounceStarted,this.validValueChangeDebounce),this.cd.reattach(),this.cd.markForCheck()},e.decorators=[{type:r.Directive,args:[{selector:"[formGroupName],[formGroup]"}]}],e.ctorParameters=function(){return[{type:o.FormGroupDirective,decorators:[{type:r.Optional},{type:r.Self}]},{type:o.FormGroupDirective,decorators:[{type:r.Optional},{type:r.SkipSelf}]},{type:e,decorators:[{type:r.Optional},{type:r.SkipSelf}]},{type:r.ChangeDetectorRef}]},e.propDecorators={formGroupName:[{type:r.Input}],validValueChangeDebounce:[{type:r.Input}],formControlValueChange:[{type:r.Output}],formControlValidValueChange:[{type:r.Output}]},e}(),f=function(){function e(e,t,n){this.formGroupDirective=e,this.formGroupNameDirective=t,this.cd=n,this.validValueChangeDebounce=c,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(){this.cd.detach(),a(this.formGroupNameDirective,this.formGroupDirective,this.formControlName,this.formControl,this.formControlValueChange,this.formControlValidValueChange,this.formControlValidValueDebounceStarted,this.validValueChangeDebounce),this.cd.reattach(),this.cd.markForCheck()},e.decorators=[{type:r.Directive,args:[{selector:"[formControlName]"}]}],e.ctorParameters=function(){return[{type:o.FormGroupDirective,decorators:[{type:r.SkipSelf}]},{type:s,decorators:[{type:r.Optional},{type:r.SkipSelf}]},{type:r.ChangeDetectorRef}]},e.propDecorators={formControlName:[{type:r.Input}],validValueChangeDebounce:[{type:r.Input}],formControlValueChange:[{type:r.Output}],formControlValidValueChange:[{type:r.Output}],formControlValue:[{type:r.Input}]},e}(),m=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}(),p=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&&this.formControlNameDirective.errors},enumerable:!0,configurable:!0}),e.decorators=[{type:r.Component,args:[{selector:"hf-form-control",template:'\n <div class="hf-field"\n [class.hf-field--required]="required" \n [class.hf-field--invalid]="!valid" \n [class.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:[f]}]},e}(),d=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:[s]}]},e}(),h=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}(),g=function(){function e(){}return e.decorators=[{type:r.NgModule,args:[{imports:[t.CommonModule,o.ReactiveFormsModule],declarations:[h,f,m,p,d,s],exports:[h,f,m,p,d,s]}]}],e.ctorParameters=function(){return[]},e}();e.HybridFormsModule=g,e.ɵe=p,e.ɵf=d,e.ɵa=h,e.ɵb=f,e.ɵc=s,e.ɵd=m,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 a(e,r,t,o,n,i,a,l){var s=e&&e.formGroup||r&&r.form;s!=o&&(u(s,t,o),o.valueChanges.subscribe(function(e){return n.emit(e)}),o.valueChanges.subscribe(function(e){return o.valid?a.next(e):null}),o.valueChanges.debounceTime(l).subscribe(function(e){return o.valid?i.emit(e):null}))}function u(e,r,t){e&&(l(e,r),e.addControl(r,t))}function l(e,r){if(e.get(r))throw new Error("A control of named: '"+r+"' already exists on parent: "+JSON.stringify(e.value)+". Perhaps you did not name your group or control?")}var s=400,c=function(){function e(e,t,n){this.self=e,this.formGroupDirective=t,this.formGroupNameDirective=n,this.validValueChangeDebounce=s,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(){this.formGroupName||(this.formGroup=this.self.form),a(this.formGroupNameDirective,this.formGroupDirective,this.formGroupName,this.formGroup,this.formControlValueChange,this.formControlValidValueChange,this.formControlValidValueDebounceStarted,this.validValueChangeDebounce)},e.decorators=[{type:r.Directive,args:[{selector:"[formGroupName],[formGroup]"}]}],e.ctorParameters=function(){return[{type:o.FormGroupDirective,decorators:[{type:r.Optional},{type:r.Self}]},{type:o.FormGroupDirective,decorators:[{type:r.Optional},{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}(),f=function(){function e(e,t,n){this.formGroupDirective=e,this.formGroupNameDirective=t,this.cd=n,this.validValueChangeDebounce=s,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(){var e=this;this.cd.detach(),a(this.formGroupNameDirective,this.formGroupDirective,this.formControlName,this.formControl,this.formControlValueChange,this.formControlValidValueChange,this.formControlValidValueDebounceStarted,this.validValueChangeDebounce),setTimeout(function(){return e.cd.reattach()},0)},e.decorators=[{type:r.Directive,args:[{selector:"[formControlName]"}]}],e.ctorParameters=function(){return[{type:o.FormGroupDirective,decorators:[{type:r.SkipSelf}]},{type:c,decorators:[{type:r.Optional},{type:r.SkipSelf}]},{type:r.ChangeDetectorRef}]},e.propDecorators={formControlName:[{type:r.Input}],validValueChangeDebounce:[{type:r.Input}],formControlValueChange:[{type:r.Output}],formControlValidValueChange:[{type:r.Output}],formControlValue:[{type:r.Input}]},e}(),m=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}(),p=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&&this.formControlNameDirective.errors},enumerable:!0,configurable:!0}),e.decorators=[{type:r.Component,args:[{selector:"hf-form-control",template:'\n <div class="hf-field"\n [class.hf-field--required]="required" \n [class.hf-field--invalid]="!valid" \n [class.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:[f]}]},e}(),d=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:[c]}]},e}(),h=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}(),g=function(){function e(){}return e.decorators=[{type:r.NgModule,args:[{imports:[t.CommonModule,o.ReactiveFormsModule],declarations:[h,f,m,p,d,c],exports:[h,f,m,p,d,c]}]}],e.ctorParameters=function(){return[]},e}();e.HybridFormsModule=g,e.ɵe=p,e.ɵf=d,e.ɵa=h,e.ɵb=f,e.ɵc=c,e.ɵd=m,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=angular-hybrid-forms.umd.min.js.map
{
"name": "angular-hybrid-forms",
"version": "0.0.23",
"version": "0.0.24",
"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,2 +0,2 @@

import { ChangeDetectorRef, EventEmitter, OnInit } from '@angular/core';
import { EventEmitter, OnInit } from '@angular/core';
import { FormGroup, FormGroupDirective } from '@angular/forms';

@@ -8,3 +8,2 @@ import { Subject } from 'rxjs/Subject';

private formGroupNameDirective;
private cd;
formGroupName: string;

@@ -16,4 +15,4 @@ validValueChangeDebounce: number;

formGroup: FormGroup;
constructor(self: FormGroupDirective, formGroupDirective: FormGroupDirective, formGroupNameDirective: FormGroupNameDirective, cd: ChangeDetectorRef);
constructor(self: FormGroupDirective, formGroupDirective: FormGroupDirective, formGroupNameDirective: FormGroupNameDirective);
ngOnInit(): 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