@yoozly/ngrx-form
Advanced tools
Comparing version 0.0.7 to 0.0.8
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@ngrx/store'), require('rxjs/operators'), require('rxjs'), require('@angular/core'), require('@angular/forms')) : | ||
typeof define === 'function' && define.amd ? define('@yoozly/ngrx-form', ['exports', '@ngrx/store', 'rxjs/operators', 'rxjs', '@angular/core', '@angular/forms'], factory) : | ||
(factory((global.yoozly = global.yoozly || {}, global.yoozly['ngrx-form'] = {}),global.store,global.rxjs.operators,global.rxjs,global.ng.core,global.ng.forms)); | ||
}(this, (function (exports,store,operators,rxjs,i0,i1) { 'use strict'; | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('@ngrx/store'), require('rxjs/operators'), require('rxjs')) : | ||
typeof define === 'function' && define.amd ? define('@yoozly/ngrx-form', ['exports', '@angular/core', '@angular/forms', '@ngrx/store', 'rxjs/operators', 'rxjs'], factory) : | ||
(factory((global.yoozly = global.yoozly || {}, global.yoozly['ngrx-form'] = {}),global.ng.core,global.ng.forms,global.store,global.rxjs.operators,global.rxjs)); | ||
}(this, (function (exports,core,forms,store,operators,rxjs) { 'use strict'; | ||
@@ -81,4 +81,4 @@ /*! ***************************************************************************** | ||
*/ | ||
function NgrxFormReducer(forms) { | ||
return forms.reduce(( /** | ||
function NgrxFormReducer(forms$$1) { | ||
return forms$$1.reduce(( /** | ||
* @param {?} results | ||
@@ -142,5 +142,5 @@ * @param {?} key | ||
/** @type {?} */ | ||
var NGRX_FORMS_FEATURE = new i0.InjectionToken('Feature Name'); | ||
var NGRX_FORMS_FEATURE = new core.InjectionToken('Feature Name'); | ||
/** @type {?} */ | ||
var FEATURE_REDUCER_TOKEN = new i0.InjectionToken('Feature Reducers'); | ||
var FEATURE_REDUCER_TOKEN = new core.InjectionToken('Feature Reducers'); | ||
@@ -151,100 +151,4 @@ /** | ||
*/ | ||
var FormService = /** @class */ (function () { | ||
function FormService(fb) { | ||
this.fb = fb; | ||
} | ||
/** | ||
* @param {?} formDatas | ||
* @param {?} formObject | ||
* @return {?} | ||
*/ | ||
FormService.prototype.updateForm = /** | ||
* @param {?} formDatas | ||
* @param {?} formObject | ||
* @return {?} | ||
*/ | ||
function (formDatas, formObject) { | ||
var _this = this; | ||
Object.keys(formDatas).map(( /** | ||
* @param {?} key | ||
* @return {?} | ||
*/function (key) { | ||
/** @type {?} */ | ||
var values = formDatas[key]; | ||
// FormArray | ||
if (values instanceof Array) { | ||
// The array contains FormGroup items so we need | ||
// to create the groups before adding them to the array | ||
if (values[0] instanceof Object) { | ||
/** @type {?} */ | ||
var arrayOfControls = values.map(( /** | ||
* @param {?} field | ||
* @return {?} | ||
*/function (field) { return _this.fb.group(field); })); | ||
formObject.setControl(key, _this.fb.array(arrayOfControls)); | ||
} | ||
else { | ||
formObject.setControl(key, _this.fb.array(values)); | ||
} | ||
// FormGroup | ||
} | ||
else if (values instanceof Object) { | ||
_this.updateForm(values, ( /** @type {?} */(formObject.get(key)))); | ||
} | ||
})); | ||
}; | ||
/** | ||
* @param {?} formGroup | ||
* @return {?} | ||
*/ | ||
FormService.prototype.getErrors = /** | ||
* @param {?} formGroup | ||
* @return {?} | ||
*/ | ||
function (formGroup) { | ||
var _this = this; | ||
return Object.keys(formGroup.controls).reduce(( /** | ||
* @param {?} acc | ||
* @param {?} key | ||
* @return {?} | ||
*/function (acc, key) { | ||
var _a; | ||
/** @type {?} */ | ||
var control = formGroup.get(key); | ||
acc = acc === undefined ? {} : acc; | ||
if (control instanceof i1.FormControl && control.errors) { | ||
return __assign({}, acc, (_a = {}, _a[key] = control.errors, _a)); | ||
} | ||
else if (control instanceof i1.FormGroup) { | ||
return __assign({}, acc, _this.getErrors(control)); | ||
} | ||
else { | ||
return acc; | ||
} | ||
}), {}); | ||
}; | ||
FormService.decorators = [ | ||
{ type: i0.Injectable, args: [{ providedIn: 'root' },] } | ||
]; | ||
/** @nocollapse */ | ||
FormService.ctorParameters = function () { | ||
return [ | ||
{ type: i1.FormBuilder } | ||
]; | ||
}; | ||
/** @nocollapse */ FormService.ngInjectableDef = i0.defineInjectable({ factory: function FormService_Factory() { return new FormService(i0.inject(i1.FormBuilder)); }, token: FormService, providedIn: "root" }); | ||
return FormService; | ||
}()); | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
var NgrxFormDirective = /** @class */ (function () { | ||
function NgrxFormDirective(featureName, formGroupDirective, store$$1, cd, formService) { | ||
function NgrxFormDirective(featureName, formGroupDirective, store$$1, cd, fb) { | ||
this.featureName = featureName; | ||
@@ -254,3 +158,3 @@ this.formGroupDirective = formGroupDirective; | ||
this.cd = cd; | ||
this.formService = formService; | ||
this.fb = fb; | ||
this.componentDestroy$ = new rxjs.Subject(); | ||
@@ -300,3 +204,3 @@ } | ||
*/function (formObject) { | ||
_this.formService.updateForm(formObject, _this.formGroupDirective.form); | ||
_this.updateForm(formObject, _this.formGroupDirective.form); | ||
_this.formGroupDirective.form.patchValue(formObject); | ||
@@ -349,3 +253,3 @@ _this.cd.markForCheck(); | ||
value: formDatas, | ||
errors: this.formService.getErrors(this.formGroupDirective.form), | ||
errors: this.getErrors(this.formGroupDirective.form), | ||
pristine: this.formGroupDirective.pristine, | ||
@@ -357,4 +261,78 @@ valid: this.formGroupDirective.valid | ||
/** | ||
* @private | ||
* @param {?} formDatas | ||
* @param {?} formObject | ||
* @return {?} | ||
*/ | ||
NgrxFormDirective.prototype.updateForm = /** | ||
* @private | ||
* @param {?} formDatas | ||
* @param {?} formObject | ||
* @return {?} | ||
*/ | ||
function (formDatas, formObject) { | ||
var _this = this; | ||
Object.keys(formDatas).map(( /** | ||
* @param {?} key | ||
* @return {?} | ||
*/function (key) { | ||
/** @type {?} */ | ||
var values = formDatas[key]; | ||
// FormArray | ||
if (values instanceof Array) { | ||
// The array contains FormGroup items so we need | ||
// to create the groups before adding them to the array | ||
if (values[0] instanceof Object) { | ||
/** @type {?} */ | ||
var arrayOfControls = values.map(( /** | ||
* @param {?} field | ||
* @return {?} | ||
*/function (field) { return _this.fb.group(field); })); | ||
formObject.setControl(key, _this.fb.array(arrayOfControls)); | ||
} | ||
else { | ||
formObject.setControl(key, _this.fb.array(values)); | ||
} | ||
// FormGroup | ||
} | ||
else if (values instanceof Object) { | ||
_this.updateForm(values, ( /** @type {?} */(formObject.get(key)))); | ||
} | ||
})); | ||
}; | ||
/** | ||
* @private | ||
* @param {?} formGroup | ||
* @return {?} | ||
*/ | ||
NgrxFormDirective.prototype.getErrors = /** | ||
* @private | ||
* @param {?} formGroup | ||
* @return {?} | ||
*/ | ||
function (formGroup) { | ||
var _this = this; | ||
return Object.keys(formGroup.controls).reduce(( /** | ||
* @param {?} acc | ||
* @param {?} key | ||
* @return {?} | ||
*/function (acc, key) { | ||
var _a; | ||
/** @type {?} */ | ||
var control = formGroup.get(key); | ||
acc = acc === undefined ? {} : acc; | ||
if (control instanceof forms.FormControl && control.errors) { | ||
return __assign({}, acc, (_a = {}, _a[key] = control.errors, _a)); | ||
} | ||
else if (control instanceof forms.FormGroup) { | ||
return __assign({}, acc, _this.getErrors(control)); | ||
} | ||
else { | ||
return acc; | ||
} | ||
}), {}); | ||
}; | ||
/** | ||
* @return {?} | ||
*/ | ||
NgrxFormDirective.prototype.ngOnDestroy = /** | ||
@@ -368,3 +346,3 @@ * @return {?} | ||
NgrxFormDirective.decorators = [ | ||
{ type: i0.Directive, args: [{ | ||
{ type: core.Directive, args: [{ | ||
selector: '[NgrxFormConnect]' | ||
@@ -376,11 +354,11 @@ },] } | ||
return [ | ||
{ type: String, decorators: [{ type: i0.Inject, args: [NGRX_FORMS_FEATURE,] }] }, | ||
{ type: i1.FormGroupDirective }, | ||
{ type: String, decorators: [{ type: core.Inject, args: [NGRX_FORMS_FEATURE,] }] }, | ||
{ type: forms.FormGroupDirective }, | ||
{ type: store.Store }, | ||
{ type: i0.ChangeDetectorRef }, | ||
{ type: FormService } | ||
{ type: core.ChangeDetectorRef }, | ||
{ type: forms.FormBuilder } | ||
]; | ||
}; | ||
NgrxFormDirective.propDecorators = { | ||
path: [{ type: i0.Input, args: ['NgrxFormConnect',] }] | ||
path: [{ type: core.Input, args: ['NgrxFormConnect',] }] | ||
}; | ||
@@ -417,3 +395,3 @@ return NgrxFormDirective; | ||
NgrxFormModule.decorators = [ | ||
{ type: i0.NgModule, args: [{ | ||
{ type: core.NgModule, args: [{ | ||
declarations: [NgrxFormDirective], | ||
@@ -440,3 +418,2 @@ exports: [NgrxFormDirective], | ||
exports.ɵa = NgrxFormDirective; | ||
exports.ɵb = FormService; | ||
@@ -443,0 +420,0 @@ Object.defineProperty(exports, '__esModule', { value: true }); |
@@ -1,2 +0,2 @@ | ||
!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@ngrx/store"),require("rxjs/operators"),require("rxjs"),require("@angular/core"),require("@angular/forms")):"function"==typeof define&&define.amd?define("@yoozly/ngrx-form",["exports","@ngrx/store","rxjs/operators","rxjs","@angular/core","@angular/forms"],e):e((r.yoozly=r.yoozly||{},r.yoozly["ngrx-form"]={}),r.store,r.rxjs.operators,r.rxjs,r.ng.core,r.ng.forms)}(this,function(r,t,n,i,o,a){"use strict";var c=function(){return(c=Object.assign||function(r){for(var e,t=1,o=arguments.length;t<o;t++)for(var n in e=arguments[t])Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}).apply(this,arguments)};function s(r,e){var t="function"==typeof Symbol&&r[Symbol.iterator];if(!t)return r;var o,n,i=t.call(r),a=[];try{for(;(void 0===e||0<e--)&&!(o=i.next()).done;)a.push(o.value)}catch(s){n={error:s}}finally{try{o&&!o.done&&(t=i["return"])&&t.call(i)}finally{if(n)throw n.error}}return a}function u(r){return void 0===r&&(r={}),{value:r,errors:{},pristine:!0,valid:!1}}var f=function d(r){this.payload=r,this.type="[NgrxForm] Update Form"},p=new o.InjectionToken("Feature Name"),e=new o.InjectionToken("Feature Reducers"),m=function(){function r(r){this.fb=r}return r.prototype.updateForm=function(o,n){var i=this;Object.keys(o).map(function(r){var e=o[r];if(e instanceof Array)if(e[0]instanceof Object){var t=e.map(function(r){return i.fb.group(r)});n.setControl(r,i.fb.array(t))}else n.setControl(r,i.fb.array(e));else e instanceof Object&&i.updateForm(e,n.get(r))})},r.prototype.getErrors=function(n){var i=this;return Object.keys(n.controls).reduce(function(r,e){var t,o=n.get(e);return r=r===undefined?{}:r,o instanceof a.FormControl&&o.errors?c({},r,((t={})[e]=o.errors,t)):o instanceof a.FormGroup?c({},r,i.getErrors(o)):r},{})},r.decorators=[{type:o.Injectable,args:[{providedIn:"root"}]}],r.ctorParameters=function(){return[{type:a.FormBuilder}]},r.ngInjectableDef=o.defineInjectable({factory:function(){return new r(o.inject(a.FormBuilder))},token:r,providedIn:"root"}),r}(),l=function(){function r(r,e,t,o,n){this.featureName=r,this.formGroupDirective=e,this.store=t,this.cd=o,this.formService=n,this.componentDestroy$=new i.Subject}return r.prototype.ngOnInit=function(){this.subscriptions(),this.storeToForm(),this.formToStore()},r.prototype.subscriptions=function(){var e=this;this.formChanges$=this.formGroupDirective.form.valueChanges.pipe(n.debounceTime(300)),this.storeDatas$=this.store.pipe(t.select(function(r){return r[e.featureName][e.path].value}))},r.prototype.storeToForm=function(){var e=this;this.storeDatas$.pipe(n.map(function(r){e.formService.updateForm(r,e.formGroupDirective.form),e.formGroupDirective.form.patchValue(r),e.cd.markForCheck()}),n.takeUntil(this.componentDestroy$)).subscribe()},r.prototype.formToStore=function(){var o=this;this.formChanges$.pipe(n.withLatestFrom(this.storeDatas$),n.filter(function(r){var e=s(r,2),t=e[0],o=e[1];return JSON.stringify(t)!==JSON.stringify(o)}),n.map(function(r){var e=s(r,2),t=e[0];e[1];return o.store.dispatch(new f(o.mapActionPayload(t)))}),n.takeUntil(this.componentDestroy$)).subscribe()},r.prototype.mapActionPayload=function(r){return{feature:this.featureName,path:this.path,form:{value:r,errors:this.formService.getErrors(this.formGroupDirective.form),pristine:this.formGroupDirective.pristine,valid:this.formGroupDirective.valid}}},r.prototype.ngOnDestroy=function(){this.componentDestroy$.next(),this.componentDestroy$.complete()},r.decorators=[{type:o.Directive,args:[{selector:"[NgrxFormConnect]"}]}],r.ctorParameters=function(){return[{type:String,decorators:[{type:o.Inject,args:[p]}]},{type:a.FormGroupDirective},{type:t.Store},{type:o.ChangeDetectorRef},{type:m}]},r.propDecorators={path:[{type:o.Input,args:["NgrxFormConnect"]}]},r}(),y=function(){function e(){}return e.forFeature=function(r){return{ngModule:e,providers:[{provide:p,useValue:r}]}},e.decorators=[{type:o.NgModule,args:[{declarations:[l],exports:[l],imports:[]}]}],e}();r.getInitialState=u,r.NgrxFormReducer=function h(r){return r.reduce(function(r,e){var t;return c({},r,((t={})[e]=function(r,e){return void 0===r&&(r=u()),r},t))},{})},r.ngrxForm=function v(u){return function(r,e){var t,o;if("[NgrxForm] Update Form"==e.type){var n=e.payload,i=n.feature,a=n.path,s=n.form;r=c({},r,((t={})[i]=c({},r[i],((o={})[a]=c({},r[i][a],s),o)),t))}return u(r,e)}},r.Updateform=f,r.NGRX_FORMS_FEATURE=p,r.FEATURE_REDUCER_TOKEN=e,r.NgrxFormModule=y,r.ɵa=l,r.ɵb=m,Object.defineProperty(r,"__esModule",{value:!0})}); | ||
!function(r,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/forms"),require("@ngrx/store"),require("rxjs/operators"),require("rxjs")):"function"==typeof define&&define.amd?define("@yoozly/ngrx-form",["exports","@angular/core","@angular/forms","@ngrx/store","rxjs/operators","rxjs"],t):t((r.yoozly=r.yoozly||{},r.yoozly["ngrx-form"]={}),r.ng.core,r.ng.forms,r.store,r.rxjs.operators,r.rxjs)}(this,function(r,e,s,o,n,i){"use strict";var c=function(){return(c=Object.assign||function(r){for(var t,e=1,o=arguments.length;e<o;e++)for(var n in t=arguments[e])Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}).apply(this,arguments)};function a(r,t){var e="function"==typeof Symbol&&r[Symbol.iterator];if(!e)return r;var o,n,i=e.call(r),s=[];try{for(;(void 0===t||0<t--)&&!(o=i.next()).done;)s.push(o.value)}catch(a){n={error:a}}finally{try{o&&!o.done&&(e=i["return"])&&e.call(i)}finally{if(n)throw n.error}}return s}function u(r){return void 0===r&&(r={}),{value:r,errors:{},pristine:!0,valid:!1}}var p=function l(r){this.payload=r,this.type="[NgrxForm] Update Form"},f=new e.InjectionToken("Feature Name"),t=new e.InjectionToken("Feature Reducers"),m=function(){function r(r,t,e,o,n){this.featureName=r,this.formGroupDirective=t,this.store=e,this.cd=o,this.fb=n,this.componentDestroy$=new i.Subject}return r.prototype.ngOnInit=function(){this.subscriptions(),this.storeToForm(),this.formToStore()},r.prototype.subscriptions=function(){var t=this;this.formChanges$=this.formGroupDirective.form.valueChanges.pipe(n.debounceTime(300)),this.storeDatas$=this.store.pipe(o.select(function(r){return r[t.featureName][t.path].value}))},r.prototype.storeToForm=function(){var t=this;this.storeDatas$.pipe(n.map(function(r){t.updateForm(r,t.formGroupDirective.form),t.formGroupDirective.form.patchValue(r),t.cd.markForCheck()}),n.takeUntil(this.componentDestroy$)).subscribe()},r.prototype.formToStore=function(){var o=this;this.formChanges$.pipe(n.withLatestFrom(this.storeDatas$),n.filter(function(r){var t=a(r,2),e=t[0],o=t[1];return JSON.stringify(e)!==JSON.stringify(o)}),n.map(function(r){var t=a(r,2),e=t[0];t[1];return o.store.dispatch(new p(o.mapActionPayload(e)))}),n.takeUntil(this.componentDestroy$)).subscribe()},r.prototype.mapActionPayload=function(r){return{feature:this.featureName,path:this.path,form:{value:r,errors:this.getErrors(this.formGroupDirective.form),pristine:this.formGroupDirective.pristine,valid:this.formGroupDirective.valid}}},r.prototype.updateForm=function(o,n){var i=this;Object.keys(o).map(function(r){var t=o[r];if(t instanceof Array)if(t[0]instanceof Object){var e=t.map(function(r){return i.fb.group(r)});n.setControl(r,i.fb.array(e))}else n.setControl(r,i.fb.array(t));else t instanceof Object&&i.updateForm(t,n.get(r))})},r.prototype.getErrors=function(n){var i=this;return Object.keys(n.controls).reduce(function(r,t){var e,o=n.get(t);return r=r===undefined?{}:r,o instanceof s.FormControl&&o.errors?c({},r,((e={})[t]=o.errors,e)):o instanceof s.FormGroup?c({},r,i.getErrors(o)):r},{})},r.prototype.ngOnDestroy=function(){this.componentDestroy$.next(),this.componentDestroy$.complete()},r.decorators=[{type:e.Directive,args:[{selector:"[NgrxFormConnect]"}]}],r.ctorParameters=function(){return[{type:String,decorators:[{type:e.Inject,args:[f]}]},{type:s.FormGroupDirective},{type:o.Store},{type:e.ChangeDetectorRef},{type:s.FormBuilder}]},r.propDecorators={path:[{type:e.Input,args:["NgrxFormConnect"]}]},r}(),y=function(){function t(){}return t.forFeature=function(r){return{ngModule:t,providers:[{provide:f,useValue:r}]}},t.decorators=[{type:e.NgModule,args:[{declarations:[m],exports:[m],imports:[]}]}],t}();r.getInitialState=u,r.NgrxFormReducer=function h(r){return r.reduce(function(r,t){var e;return c({},r,((e={})[t]=function(r,t){return void 0===r&&(r=u()),r},e))},{})},r.ngrxForm=function d(u){return function(r,t){var e,o;if("[NgrxForm] Update Form"==t.type){var n=t.payload,i=n.feature,s=n.path,a=n.form;r=c({},r,((e={})[i]=c({},r[i],((o={})[s]=c({},r[i][s],a),o)),e))}return u(r,t)}},r.Updateform=p,r.NGRX_FORMS_FEATURE=f,r.FEATURE_REDUCER_TOKEN=t,r.NgrxFormModule=y,r.ɵa=m,Object.defineProperty(r,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=yoozly-ngrx-form.umd.min.js.map |
@@ -6,3 +6,3 @@ /** | ||
import { Directive, Input, Inject, ChangeDetectorRef } from '@angular/core'; | ||
import { FormGroupDirective } from '@angular/forms'; | ||
import { FormGroupDirective, FormGroup, FormBuilder, FormControl } from '@angular/forms'; | ||
import { Store, select } from '@ngrx/store'; | ||
@@ -12,3 +12,2 @@ import { debounceTime, takeUntil, filter, map, withLatestFrom } from 'rxjs/operators'; | ||
import { NGRX_FORMS_FEATURE } from '../services/form.tokens'; | ||
import * as fromService from '../services'; | ||
import * as fromAction from '../store/form.actions'; | ||
@@ -21,5 +20,5 @@ export class NgrxFormDirective { | ||
* @param {?} cd | ||
* @param {?} formService | ||
* @param {?} fb | ||
*/ | ||
constructor(featureName, formGroupDirective, store, cd, formService) { | ||
constructor(featureName, formGroupDirective, store, cd, fb) { | ||
this.featureName = featureName; | ||
@@ -29,3 +28,3 @@ this.formGroupDirective = formGroupDirective; | ||
this.cd = cd; | ||
this.formService = formService; | ||
this.fb = fb; | ||
this.componentDestroy$ = new Subject(); | ||
@@ -64,3 +63,3 @@ } | ||
(formObject) => { | ||
this.formService.updateForm(formObject, this.formGroupDirective.form); | ||
this.updateForm(formObject, this.formGroupDirective.form); | ||
this.formGroupDirective.form.patchValue(formObject); | ||
@@ -99,3 +98,3 @@ this.cd.markForCheck(); | ||
value: formDatas, | ||
errors: this.formService.getErrors(this.formGroupDirective.form), | ||
errors: this.getErrors(this.formGroupDirective.form), | ||
pristine: this.formGroupDirective.pristine, | ||
@@ -107,4 +106,67 @@ valid: this.formGroupDirective.valid | ||
/** | ||
* @private | ||
* @param {?} formDatas | ||
* @param {?} formObject | ||
* @return {?} | ||
*/ | ||
updateForm(formDatas, formObject) { | ||
Object.keys(formDatas).map((/** | ||
* @param {?} key | ||
* @return {?} | ||
*/ | ||
key => { | ||
/** @type {?} */ | ||
const values = formDatas[key]; | ||
// FormArray | ||
if (values instanceof Array) { | ||
// The array contains FormGroup items so we need | ||
// to create the groups before adding them to the array | ||
if (values[0] instanceof Object) { | ||
/** @type {?} */ | ||
const arrayOfControls = values.map((/** | ||
* @param {?} field | ||
* @return {?} | ||
*/ | ||
field => this.fb.group(field))); | ||
formObject.setControl(key, this.fb.array(arrayOfControls)); | ||
} | ||
else { | ||
formObject.setControl(key, this.fb.array(values)); | ||
} | ||
// FormGroup | ||
} | ||
else if (values instanceof Object) { | ||
this.updateForm(values, (/** @type {?} */ (formObject.get(key)))); | ||
} | ||
})); | ||
} | ||
/** | ||
* @private | ||
* @param {?} formGroup | ||
* @return {?} | ||
*/ | ||
getErrors(formGroup) { | ||
return Object.keys(formGroup.controls).reduce((/** | ||
* @param {?} acc | ||
* @param {?} key | ||
* @return {?} | ||
*/ | ||
(acc, key) => { | ||
/** @type {?} */ | ||
const control = formGroup.get(key); | ||
acc = acc === undefined ? {} : acc; | ||
if (control instanceof FormControl && control.errors) { | ||
return Object.assign({}, acc, { [key]: control.errors }); | ||
} | ||
else if (control instanceof FormGroup) { | ||
return Object.assign({}, acc, this.getErrors(control)); | ||
} | ||
else { | ||
return acc; | ||
} | ||
}), {}); | ||
} | ||
/** | ||
* @return {?} | ||
*/ | ||
ngOnDestroy() { | ||
@@ -126,3 +188,3 @@ this.componentDestroy$.next(); | ||
{ type: ChangeDetectorRef }, | ||
{ type: fromService.FormService } | ||
{ type: FormBuilder } | ||
]; | ||
@@ -171,4 +233,4 @@ NgrxFormDirective.propDecorators = { | ||
*/ | ||
NgrxFormDirective.prototype.formService; | ||
NgrxFormDirective.prototype.fb; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybS5kaXJlY3RpdmVzLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQHlvb3pseS9uZ3J4LWZvcm0vIiwic291cmNlcyI6WyJsaWIvZGlyZWN0aXZlcy9mb3JtLmRpcmVjdGl2ZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFFLE1BQU0sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUM1RSxPQUFPLEVBQUUsa0JBQW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mdpZnkoc3RvcmVEYXRhcylcbiAgICAgICAgKSxcbiAgICAgICAgbWFwKChbZm9ybURhdGFzLCBzdG9yZURhdGFzXSkgPT5cbiAgICAgICAgICB0aGlzLnN0b3JlLmRpc3BhdGNoKFxuICAgICAgICAgICAgbmV3IGZyb21BY3Rpb24uVXBkYXRlZm9ybSh0aGlzLm1hcEFjdGlvblBheWxvYWQoZm9ybURhdGFzKSlcbiAgICAgICAgICApXG4gICAgICAgICksXG4gICAgICAgIHRha2VVbnRpbCh0aGlzLmNvbXBvbmVudERlc3Ryb3kkKVxuICAgICAgKVxuICAgICAgLnN1YnNjcmliZSgpO1xuICB9XG5cbiAgcHJpdmF0ZSBtYXBBY3Rpb25QYXlsb2FkKGZvcm1EYXRhczogRm9ybUdyb3VwKTogVXBkYXRlRm9ybVBheWxvYWQ8YW55PiB7XG4gICAgcmV0dXJuIHtcbiAgICAgIGZlYXR1cmU6IHRoaXMuZmVhdHVyZU5hbWUsXG4gICAgICBwYXRoOiB0aGlzLnBhdGgsXG4gICAgICBmb3JtOiB7XG4gICAgICAgIHZhbHVlOiBmb3JtRGF0YXMsXG4gICAgICAgIGVycm9yczogdGhpcy5mb3JtU2VydmljZS5nZXRFcnJvcnModGhpcy5mb3JtR3JvdXBEaXJlY3RpdmUuZm9ybSksXG4gICAgICAgIHByaXN0aW5lOiB0aGlzLmZvcm1Hcm91cERpcmVjdGl2ZS5wcmlzdGluZSxcbiAgICAgICAgdmFsaWQ6IHRoaXMuZm9ybUdyb3VwRGlyZWN0aXZlLnZhbGlkXG4gICAgICB9XG4gICAgfTtcbiAgfVxuXG4gIG5nT25EZXN0cm95KCkge1xuICAgIHRoaXMuY29tcG9uZW50RGVzdHJveSQubmV4dCgpO1xuICAgIHRoaXMuY29tcG9uZW50RGVzdHJveSQuY29tcGxldGUoKTtcbiAgfVxufVxuIl19 | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybS5kaXJlY3Rpd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Jyb3JzKGNvbnRyb2wpIH07XG4gICAgICB9IGVsc2Uge1xuICAgICAgICByZXR1cm4gYWNjO1xuICAgICAgfVxuICAgIH0sIHt9KTtcbiAgfVxuXG4gIG5nT25EZXN0cm95KCkge1xuICAgIHRoaXMuY29tcG9uZW50RGVzdHJveSQubmV4dCgpO1xuICAgIHRoaXMuY29tcG9uZW50RGVzdHJveSQuY29tcGxldGUoKTtcbiAgfVxufVxuIl19 |
@@ -10,3 +10,2 @@ /** | ||
export { NgrxFormDirective as ɵa } from './lib/directives/form.directives'; | ||
export { FormService as ɵb } from './lib/services'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoieW9vemx5LW5ncngtZm9ybS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0B5b296bHkvbmdyeC1mb3JtLyIsInNvdXJjZXMiOlsieW9vemx5LW5ncngtZm9ybS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBSUEsa0lBQWMsY0FBYyxDQUFDO0FBRTdCLE9BQU8sRUFBQyxpQkFBaUIsSUFBSSxFQUFFLEVBQUMsTUFBTSxrQ0FBa0MsQ0FBQztBQUN6RSxPQUFPLEVBQUMsV0FBVyxJQUFJLEVBQUUsRUFBQyxNQUFNLGdCQUFnQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL3B1YmxpY19hcGknO1xuXG5leHBvcnQge05ncnhGb3JtRGlyZWN0aXZlIGFzIMm1YX0gZnJvbSAnLi9saWIvZGlyZWN0aXZlcy9mb3JtLmRpcmVjdGl2ZXMnO1xuZXhwb3J0IHtGb3JtU2VydmljZSBhcyDJtWJ9IGZyb20gJy4vbGliL3NlcnZpY2VzJzsiXX0= | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoieW9vemx5LW5ncngtZm9ybS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0B5b296bHkvbmdyeC1mb3JtLyIsInNvdXJjZXMiOlsieW9vemx5LW5ncngtZm9ybS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBSUEsa0lBQWMsY0FBYyxDQUFDO0FBRTdCLE9BQU8sRUFBQyxpQkFBaUIsSUFBSSxFQUFFLEVBQUMsTUFBTSxrQ0FBa0MsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWNfYXBpJztcblxuZXhwb3J0IHtOZ3J4Rm9ybURpcmVjdGl2ZSBhcyDJtWF9IGZyb20gJy4vbGliL2RpcmVjdGl2ZXMvZm9ybS5kaXJlY3RpdmVzJzsiXX0= |
@@ -7,3 +7,3 @@ /** | ||
import { Directive, Input, Inject, ChangeDetectorRef } from '@angular/core'; | ||
import { FormGroupDirective } from '@angular/forms'; | ||
import { FormGroupDirective, FormGroup, FormBuilder, FormControl } from '@angular/forms'; | ||
import { Store, select } from '@ngrx/store'; | ||
@@ -13,6 +13,5 @@ import { debounceTime, takeUntil, filter, map, withLatestFrom } from 'rxjs/operators'; | ||
import { NGRX_FORMS_FEATURE } from '../services/form.tokens'; | ||
import * as fromService from '../services'; | ||
import * as fromAction from '../store/form.actions'; | ||
var NgrxFormDirective = /** @class */ (function () { | ||
function NgrxFormDirective(featureName, formGroupDirective, store, cd, formService) { | ||
function NgrxFormDirective(featureName, formGroupDirective, store, cd, fb) { | ||
this.featureName = featureName; | ||
@@ -22,3 +21,3 @@ this.formGroupDirective = formGroupDirective; | ||
this.cd = cd; | ||
this.formService = formService; | ||
this.fb = fb; | ||
this.componentDestroy$ = new Subject(); | ||
@@ -70,3 +69,3 @@ } | ||
function (formObject) { | ||
_this.formService.updateForm(formObject, _this.formGroupDirective.form); | ||
_this.updateForm(formObject, _this.formGroupDirective.form); | ||
_this.formGroupDirective.form.patchValue(formObject); | ||
@@ -121,3 +120,3 @@ _this.cd.markForCheck(); | ||
value: formDatas, | ||
errors: this.formService.getErrors(this.formGroupDirective.form), | ||
errors: this.getErrors(this.formGroupDirective.form), | ||
pristine: this.formGroupDirective.pristine, | ||
@@ -129,4 +128,81 @@ valid: this.formGroupDirective.valid | ||
/** | ||
* @private | ||
* @param {?} formDatas | ||
* @param {?} formObject | ||
* @return {?} | ||
*/ | ||
NgrxFormDirective.prototype.updateForm = /** | ||
* @private | ||
* @param {?} formDatas | ||
* @param {?} formObject | ||
* @return {?} | ||
*/ | ||
function (formDatas, formObject) { | ||
var _this = this; | ||
Object.keys(formDatas).map((/** | ||
* @param {?} key | ||
* @return {?} | ||
*/ | ||
function (key) { | ||
/** @type {?} */ | ||
var values = formDatas[key]; | ||
// FormArray | ||
if (values instanceof Array) { | ||
// The array contains FormGroup items so we need | ||
// to create the groups before adding them to the array | ||
if (values[0] instanceof Object) { | ||
/** @type {?} */ | ||
var arrayOfControls = values.map((/** | ||
* @param {?} field | ||
* @return {?} | ||
*/ | ||
function (field) { return _this.fb.group(field); })); | ||
formObject.setControl(key, _this.fb.array(arrayOfControls)); | ||
} | ||
else { | ||
formObject.setControl(key, _this.fb.array(values)); | ||
} | ||
// FormGroup | ||
} | ||
else if (values instanceof Object) { | ||
_this.updateForm(values, (/** @type {?} */ (formObject.get(key)))); | ||
} | ||
})); | ||
}; | ||
/** | ||
* @private | ||
* @param {?} formGroup | ||
* @return {?} | ||
*/ | ||
NgrxFormDirective.prototype.getErrors = /** | ||
* @private | ||
* @param {?} formGroup | ||
* @return {?} | ||
*/ | ||
function (formGroup) { | ||
var _this = this; | ||
return Object.keys(formGroup.controls).reduce((/** | ||
* @param {?} acc | ||
* @param {?} key | ||
* @return {?} | ||
*/ | ||
function (acc, key) { | ||
var _a; | ||
/** @type {?} */ | ||
var control = formGroup.get(key); | ||
acc = acc === undefined ? {} : acc; | ||
if (control instanceof FormControl && control.errors) { | ||
return tslib_1.__assign({}, acc, (_a = {}, _a[key] = control.errors, _a)); | ||
} | ||
else if (control instanceof FormGroup) { | ||
return tslib_1.__assign({}, acc, _this.getErrors(control)); | ||
} | ||
else { | ||
return acc; | ||
} | ||
}), {}); | ||
}; | ||
/** | ||
* @return {?} | ||
*/ | ||
NgrxFormDirective.prototype.ngOnDestroy = /** | ||
@@ -150,3 +226,3 @@ * @return {?} | ||
{ type: ChangeDetectorRef }, | ||
{ type: fromService.FormService } | ||
{ type: FormBuilder } | ||
]; }; | ||
@@ -198,4 +274,4 @@ NgrxFormDirective.propDecorators = { | ||
*/ | ||
NgrxFormDirective.prototype.formService; | ||
NgrxFormDirective.prototype.fb; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybS5kaXJlY3RpdmVzLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQHlvb3pseS9uZ3J4LWZvcm0vIiwic291cmNlcyI6WyJsaWIvZGlyZWN0aXZlcy9mb3JtLmRpcmVjdGl2ZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLEtBQUssRUFBRSxNQUFNLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDNUUsT0FBTyxFQUFFLGtCQUFrQixFQUFhLE1BQU0sZ0JBQWdCLENBQUM7QUFDL0QsT0FBTyxFQUFFLEtBQUssRUFBRSxNQUFNLEVBQUUsTUFBTSxhQUFhLENBQUM7QUFDNUMsT0FBTyxFQUNMLFlBQVksRUFDWixTQUFTLEVBQ1QsTUFBTSxFQUNOLEdBQUcsRUFDSCxjQUFjLEVBQ2YsTUFBTSxnQkFBZ0IsQ0FBQztBQUN4QixPQUFPLEVBQUUsT0FBTyxFQUFjLE1BQU0s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YXMsIHN0b3JlRGF0YXNdKSA9PlxuICAgICAgICAgIHRoaXMuc3RvcmUuZGlzcGF0Y2goXG4gICAgICAgICAgICBuZXcgZnJvbUFjdGlvbi5VcGRhdGVmb3JtKHRoaXMubWFwQWN0aW9uUGF5bG9hZChmb3JtRGF0YXMpKVxuICAgICAgICAgIClcbiAgICAgICAgKSxcbiAgICAgICAgdGFrZVVudGlsKHRoaXMuY29tcG9uZW50RGVzdHJveSQpXG4gICAgICApXG4gICAgICAuc3Vic2NyaWJlKCk7XG4gIH1cblxuICBwcml2YXRlIG1hcEFjdGlvblBheWxvYWQoZm9ybURhdGFzOiBGb3JtR3JvdXApOiBVcGRhdGVGb3JtUGF5bG9hZDxhbnk+IHtcbiAgICByZXR1cm4ge1xuICAgICAgZmVhdHVyZTogdGhpcy5mZWF0dXJlTmFtZSxcbiAgICAgIHBhdGg6IHRoaXMucGF0aCxcbiAgICAgIGZvcm06IHtcbiAgICAgICAgdmFsdWU6IGZvcm1EYXRhcyxcbiAgICAgICAgZXJyb3JzOiB0aGlzLmZvcm1TZXJ2aWNlLmdldEVycm9ycyh0aGlzLmZvcm1Hcm91cERpcmVjdGl2ZS5mb3JtKSxcbiAgICAgICAgcHJpc3RpbmU6IHRoaXMuZm9ybUdyb3VwRGlyZWN0aXZlLnByaXN0aW5lLFxuICAgICAgICB2YWxpZDogdGhpcy5mb3JtR3JvdXBEaXJlY3RpdmUudmFsaWRcbiAgICAgIH1cbiAgICB9O1xuICB9XG5cbiAgbmdPbkRlc3Ryb3koKSB7XG4gICAgdGhpcy5jb21wb25lbnREZXN0cm95JC5uZXh0KCk7XG4gICAgdGhpcy5jb21wb25lbnREZXN0cm95JC5jb21wbGV0ZSgpO1xuICB9XG59XG4iXX0= | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybS5kaXJlY3RpdmVzLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQHlvb3pseS9uZ3J4LWZvcm0v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YztcbiAgICAgIGlmIChjb250cm9sIGluc3RhbmNlb2YgRm9ybUNvbnRyb2wgJiYgY29udHJvbC5lcnJvcnMpIHtcbiAgICAgICAgcmV0dXJuIHsgLi4uYWNjLCAuLi57IFtrZXldOiBjb250cm9sLmVycm9ycyB9IH07XG4gICAgICB9IGVsc2UgaWYgKGNvbnRyb2wgaW5zdGFuY2VvZiBGb3JtR3JvdXApIHtcbiAgICAgICAgcmV0dXJuIHsgLi4uYWNjLCAuLi50aGlzLmdldEVycm9ycyhjb250cm9sKSB9O1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgcmV0dXJuIGFjYztcbiAgICAgIH1cbiAgICB9LCB7fSk7XG4gIH1cblxuICBuZ09uRGVzdHJveSgpIHtcbiAgICB0aGlzLmNvbXBvbmVudERlc3Ryb3kkLm5leHQoKTtcbiAgICB0aGlzLmNvbXBvbmVudERlc3Ryb3kkLmNvbXBsZXRlKCk7XG4gIH1cbn1cbiJdfQ== |
@@ -10,3 +10,2 @@ /** | ||
export { NgrxFormDirective as ɵa } from './lib/directives/form.directives'; | ||
export { FormService as ɵb } from './lib/services'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoieW9vemx5LW5ncngtZm9ybS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0B5b296bHkvbmdyeC1mb3JtLyIsInNvdXJjZXMiOlsieW9vemx5LW5ncngtZm9ybS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBSUEsa0lBQWMsY0FBYyxDQUFDO0FBRTdCLE9BQU8sRUFBQyxpQkFBaUIsSUFBSSxFQUFFLEVBQUMsTUFBTSxrQ0FBa0MsQ0FBQztBQUN6RSxPQUFPLEVBQUMsV0FBVyxJQUFJLEVBQUUsRUFBQyxNQUFNLGdCQUFnQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL3B1YmxpY19hcGknO1xuXG5leHBvcnQge05ncnhGb3JtRGlyZWN0aXZlIGFzIMm1YX0gZnJvbSAnLi9saWIvZGlyZWN0aXZlcy9mb3JtLmRpcmVjdGl2ZXMnO1xuZXhwb3J0IHtGb3JtU2VydmljZSBhcyDJtWJ9IGZyb20gJy4vbGliL3NlcnZpY2VzJzsiXX0= | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoieW9vemx5LW5ncngtZm9ybS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0B5b296bHkvbmdyeC1mb3JtLyIsInNvdXJjZXMiOlsieW9vemx5LW5ncngtZm9ybS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBSUEsa0lBQWMsY0FBYyxDQUFDO0FBRTdCLE9BQU8sRUFBQyxpQkFBaUIsSUFBSSxFQUFFLEVBQUMsTUFBTSxrQ0FBa0MsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWNfYXBpJztcblxuZXhwb3J0IHtOZ3J4Rm9ybURpcmVjdGl2ZSBhcyDJtWF9IGZyb20gJy4vbGliL2RpcmVjdGl2ZXMvZm9ybS5kaXJlY3RpdmVzJzsiXX0= |
@@ -0,6 +1,6 @@ | ||
import { InjectionToken, Directive, Input, Inject, ChangeDetectorRef, NgModule } from '@angular/core'; | ||
import { FormGroupDirective, FormGroup, FormBuilder, FormControl } from '@angular/forms'; | ||
import { Store, select } from '@ngrx/store'; | ||
import { debounceTime, takeUntil, filter, map, withLatestFrom } from 'rxjs/operators'; | ||
import { Subject } from 'rxjs'; | ||
import { InjectionToken, Injectable, Directive, Input, Inject, ChangeDetectorRef, NgModule, defineInjectable, inject } from '@angular/core'; | ||
import { FormGroup, FormBuilder, FormControl, FormGroupDirective } from '@angular/forms'; | ||
@@ -103,89 +103,2 @@ /** | ||
*/ | ||
class FormService { | ||
/** | ||
* @param {?} fb | ||
*/ | ||
constructor(fb) { | ||
this.fb = fb; | ||
} | ||
/** | ||
* @param {?} formDatas | ||
* @param {?} formObject | ||
* @return {?} | ||
*/ | ||
updateForm(formDatas, formObject) { | ||
Object.keys(formDatas).map((/** | ||
* @param {?} key | ||
* @return {?} | ||
*/ | ||
key => { | ||
/** @type {?} */ | ||
const values = formDatas[key]; | ||
// FormArray | ||
if (values instanceof Array) { | ||
// The array contains FormGroup items so we need | ||
// to create the groups before adding them to the array | ||
if (values[0] instanceof Object) { | ||
/** @type {?} */ | ||
const arrayOfControls = values.map((/** | ||
* @param {?} field | ||
* @return {?} | ||
*/ | ||
field => this.fb.group(field))); | ||
formObject.setControl(key, this.fb.array(arrayOfControls)); | ||
} | ||
else { | ||
formObject.setControl(key, this.fb.array(values)); | ||
} | ||
// FormGroup | ||
} | ||
else if (values instanceof Object) { | ||
this.updateForm(values, (/** @type {?} */ (formObject.get(key)))); | ||
} | ||
})); | ||
} | ||
/** | ||
* @param {?} formGroup | ||
* @return {?} | ||
*/ | ||
getErrors(formGroup) { | ||
return Object.keys(formGroup.controls).reduce((/** | ||
* @param {?} acc | ||
* @param {?} key | ||
* @return {?} | ||
*/ | ||
(acc, key) => { | ||
/** @type {?} */ | ||
const control = formGroup.get(key); | ||
acc = acc === undefined ? {} : acc; | ||
if (control instanceof FormControl && control.errors) { | ||
return Object.assign({}, acc, { [key]: control.errors }); | ||
} | ||
else if (control instanceof FormGroup) { | ||
return Object.assign({}, acc, this.getErrors(control)); | ||
} | ||
else { | ||
return acc; | ||
} | ||
}), {}); | ||
} | ||
} | ||
FormService.decorators = [ | ||
{ type: Injectable, args: [{ providedIn: 'root' },] } | ||
]; | ||
/** @nocollapse */ | ||
FormService.ctorParameters = () => [ | ||
{ type: FormBuilder } | ||
]; | ||
/** @nocollapse */ FormService.ngInjectableDef = defineInjectable({ factory: function FormService_Factory() { return new FormService(inject(FormBuilder)); }, token: FormService, providedIn: "root" }); | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
class NgrxFormDirective { | ||
@@ -197,5 +110,5 @@ /** | ||
* @param {?} cd | ||
* @param {?} formService | ||
* @param {?} fb | ||
*/ | ||
constructor(featureName, formGroupDirective, store, cd, formService) { | ||
constructor(featureName, formGroupDirective, store, cd, fb) { | ||
this.featureName = featureName; | ||
@@ -205,3 +118,3 @@ this.formGroupDirective = formGroupDirective; | ||
this.cd = cd; | ||
this.formService = formService; | ||
this.fb = fb; | ||
this.componentDestroy$ = new Subject(); | ||
@@ -240,3 +153,3 @@ } | ||
(formObject) => { | ||
this.formService.updateForm(formObject, this.formGroupDirective.form); | ||
this.updateForm(formObject, this.formGroupDirective.form); | ||
this.formGroupDirective.form.patchValue(formObject); | ||
@@ -275,3 +188,3 @@ this.cd.markForCheck(); | ||
value: formDatas, | ||
errors: this.formService.getErrors(this.formGroupDirective.form), | ||
errors: this.getErrors(this.formGroupDirective.form), | ||
pristine: this.formGroupDirective.pristine, | ||
@@ -283,4 +196,67 @@ valid: this.formGroupDirective.valid | ||
/** | ||
* @private | ||
* @param {?} formDatas | ||
* @param {?} formObject | ||
* @return {?} | ||
*/ | ||
updateForm(formDatas, formObject) { | ||
Object.keys(formDatas).map((/** | ||
* @param {?} key | ||
* @return {?} | ||
*/ | ||
key => { | ||
/** @type {?} */ | ||
const values = formDatas[key]; | ||
// FormArray | ||
if (values instanceof Array) { | ||
// The array contains FormGroup items so we need | ||
// to create the groups before adding them to the array | ||
if (values[0] instanceof Object) { | ||
/** @type {?} */ | ||
const arrayOfControls = values.map((/** | ||
* @param {?} field | ||
* @return {?} | ||
*/ | ||
field => this.fb.group(field))); | ||
formObject.setControl(key, this.fb.array(arrayOfControls)); | ||
} | ||
else { | ||
formObject.setControl(key, this.fb.array(values)); | ||
} | ||
// FormGroup | ||
} | ||
else if (values instanceof Object) { | ||
this.updateForm(values, (/** @type {?} */ (formObject.get(key)))); | ||
} | ||
})); | ||
} | ||
/** | ||
* @private | ||
* @param {?} formGroup | ||
* @return {?} | ||
*/ | ||
getErrors(formGroup) { | ||
return Object.keys(formGroup.controls).reduce((/** | ||
* @param {?} acc | ||
* @param {?} key | ||
* @return {?} | ||
*/ | ||
(acc, key) => { | ||
/** @type {?} */ | ||
const control = formGroup.get(key); | ||
acc = acc === undefined ? {} : acc; | ||
if (control instanceof FormControl && control.errors) { | ||
return Object.assign({}, acc, { [key]: control.errors }); | ||
} | ||
else if (control instanceof FormGroup) { | ||
return Object.assign({}, acc, this.getErrors(control)); | ||
} | ||
else { | ||
return acc; | ||
} | ||
}), {}); | ||
} | ||
/** | ||
* @return {?} | ||
*/ | ||
ngOnDestroy() { | ||
@@ -302,3 +278,3 @@ this.componentDestroy$.next(); | ||
{ type: ChangeDetectorRef }, | ||
{ type: FormService } | ||
{ type: FormBuilder } | ||
]; | ||
@@ -348,4 +324,4 @@ NgrxFormDirective.propDecorators = { | ||
export { getInitialState, NgrxFormReducer, ngrxForm, Updateform, NGRX_FORMS_FEATURE, FEATURE_REDUCER_TOKEN, NgrxFormModule, NgrxFormDirective as ɵa, FormService as ɵb }; | ||
export { getInitialState, NgrxFormReducer, ngrxForm, Updateform, NGRX_FORMS_FEATURE, FEATURE_REDUCER_TOKEN, NgrxFormModule, NgrxFormDirective as ɵa }; | ||
//# sourceMappingURL=yoozly-ngrx-form.js.map |
@@ -0,7 +1,7 @@ | ||
import { __read, __assign } from 'tslib'; | ||
import { InjectionToken, Directive, Input, Inject, ChangeDetectorRef, NgModule } from '@angular/core'; | ||
import { FormGroupDirective, FormGroup, FormBuilder, FormControl } from '@angular/forms'; | ||
import { Store, select } from '@ngrx/store'; | ||
import { debounceTime, takeUntil, filter, map, withLatestFrom } from 'rxjs/operators'; | ||
import { Subject } from 'rxjs'; | ||
import { __read, __assign } from 'tslib'; | ||
import { InjectionToken, Injectable, NgModule, Directive, Inject, ChangeDetectorRef, Input, defineInjectable, inject } from '@angular/core'; | ||
import { FormGroup, FormBuilder, FormControl, FormGroupDirective } from '@angular/forms'; | ||
@@ -108,101 +108,4 @@ /** | ||
*/ | ||
var FormService = /** @class */ (function () { | ||
function FormService(fb) { | ||
this.fb = fb; | ||
} | ||
/** | ||
* @param {?} formDatas | ||
* @param {?} formObject | ||
* @return {?} | ||
*/ | ||
FormService.prototype.updateForm = /** | ||
* @param {?} formDatas | ||
* @param {?} formObject | ||
* @return {?} | ||
*/ | ||
function (formDatas, formObject) { | ||
var _this = this; | ||
Object.keys(formDatas).map((/** | ||
* @param {?} key | ||
* @return {?} | ||
*/ | ||
function (key) { | ||
/** @type {?} */ | ||
var values = formDatas[key]; | ||
// FormArray | ||
if (values instanceof Array) { | ||
// The array contains FormGroup items so we need | ||
// to create the groups before adding them to the array | ||
if (values[0] instanceof Object) { | ||
/** @type {?} */ | ||
var arrayOfControls = values.map((/** | ||
* @param {?} field | ||
* @return {?} | ||
*/ | ||
function (field) { return _this.fb.group(field); })); | ||
formObject.setControl(key, _this.fb.array(arrayOfControls)); | ||
} | ||
else { | ||
formObject.setControl(key, _this.fb.array(values)); | ||
} | ||
// FormGroup | ||
} | ||
else if (values instanceof Object) { | ||
_this.updateForm(values, (/** @type {?} */ (formObject.get(key)))); | ||
} | ||
})); | ||
}; | ||
/** | ||
* @param {?} formGroup | ||
* @return {?} | ||
*/ | ||
FormService.prototype.getErrors = /** | ||
* @param {?} formGroup | ||
* @return {?} | ||
*/ | ||
function (formGroup) { | ||
var _this = this; | ||
return Object.keys(formGroup.controls).reduce((/** | ||
* @param {?} acc | ||
* @param {?} key | ||
* @return {?} | ||
*/ | ||
function (acc, key) { | ||
var _a; | ||
/** @type {?} */ | ||
var control = formGroup.get(key); | ||
acc = acc === undefined ? {} : acc; | ||
if (control instanceof FormControl && control.errors) { | ||
return __assign({}, acc, (_a = {}, _a[key] = control.errors, _a)); | ||
} | ||
else if (control instanceof FormGroup) { | ||
return __assign({}, acc, _this.getErrors(control)); | ||
} | ||
else { | ||
return acc; | ||
} | ||
}), {}); | ||
}; | ||
FormService.decorators = [ | ||
{ type: Injectable, args: [{ providedIn: 'root' },] } | ||
]; | ||
/** @nocollapse */ | ||
FormService.ctorParameters = function () { return [ | ||
{ type: FormBuilder } | ||
]; }; | ||
/** @nocollapse */ FormService.ngInjectableDef = defineInjectable({ factory: function FormService_Factory() { return new FormService(inject(FormBuilder)); }, token: FormService, providedIn: "root" }); | ||
return FormService; | ||
}()); | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
var NgrxFormDirective = /** @class */ (function () { | ||
function NgrxFormDirective(featureName, formGroupDirective, store, cd, formService) { | ||
function NgrxFormDirective(featureName, formGroupDirective, store, cd, fb) { | ||
this.featureName = featureName; | ||
@@ -212,3 +115,3 @@ this.formGroupDirective = formGroupDirective; | ||
this.cd = cd; | ||
this.formService = formService; | ||
this.fb = fb; | ||
this.componentDestroy$ = new Subject(); | ||
@@ -260,3 +163,3 @@ } | ||
function (formObject) { | ||
_this.formService.updateForm(formObject, _this.formGroupDirective.form); | ||
_this.updateForm(formObject, _this.formGroupDirective.form); | ||
_this.formGroupDirective.form.patchValue(formObject); | ||
@@ -311,3 +214,3 @@ _this.cd.markForCheck(); | ||
value: formDatas, | ||
errors: this.formService.getErrors(this.formGroupDirective.form), | ||
errors: this.getErrors(this.formGroupDirective.form), | ||
pristine: this.formGroupDirective.pristine, | ||
@@ -319,4 +222,81 @@ valid: this.formGroupDirective.valid | ||
/** | ||
* @private | ||
* @param {?} formDatas | ||
* @param {?} formObject | ||
* @return {?} | ||
*/ | ||
NgrxFormDirective.prototype.updateForm = /** | ||
* @private | ||
* @param {?} formDatas | ||
* @param {?} formObject | ||
* @return {?} | ||
*/ | ||
function (formDatas, formObject) { | ||
var _this = this; | ||
Object.keys(formDatas).map((/** | ||
* @param {?} key | ||
* @return {?} | ||
*/ | ||
function (key) { | ||
/** @type {?} */ | ||
var values = formDatas[key]; | ||
// FormArray | ||
if (values instanceof Array) { | ||
// The array contains FormGroup items so we need | ||
// to create the groups before adding them to the array | ||
if (values[0] instanceof Object) { | ||
/** @type {?} */ | ||
var arrayOfControls = values.map((/** | ||
* @param {?} field | ||
* @return {?} | ||
*/ | ||
function (field) { return _this.fb.group(field); })); | ||
formObject.setControl(key, _this.fb.array(arrayOfControls)); | ||
} | ||
else { | ||
formObject.setControl(key, _this.fb.array(values)); | ||
} | ||
// FormGroup | ||
} | ||
else if (values instanceof Object) { | ||
_this.updateForm(values, (/** @type {?} */ (formObject.get(key)))); | ||
} | ||
})); | ||
}; | ||
/** | ||
* @private | ||
* @param {?} formGroup | ||
* @return {?} | ||
*/ | ||
NgrxFormDirective.prototype.getErrors = /** | ||
* @private | ||
* @param {?} formGroup | ||
* @return {?} | ||
*/ | ||
function (formGroup) { | ||
var _this = this; | ||
return Object.keys(formGroup.controls).reduce((/** | ||
* @param {?} acc | ||
* @param {?} key | ||
* @return {?} | ||
*/ | ||
function (acc, key) { | ||
var _a; | ||
/** @type {?} */ | ||
var control = formGroup.get(key); | ||
acc = acc === undefined ? {} : acc; | ||
if (control instanceof FormControl && control.errors) { | ||
return __assign({}, acc, (_a = {}, _a[key] = control.errors, _a)); | ||
} | ||
else if (control instanceof FormGroup) { | ||
return __assign({}, acc, _this.getErrors(control)); | ||
} | ||
else { | ||
return acc; | ||
} | ||
}), {}); | ||
}; | ||
/** | ||
* @return {?} | ||
*/ | ||
NgrxFormDirective.prototype.ngOnDestroy = /** | ||
@@ -340,3 +320,3 @@ * @return {?} | ||
{ type: ChangeDetectorRef }, | ||
{ type: FormService } | ||
{ type: FormBuilder } | ||
]; }; | ||
@@ -395,4 +375,4 @@ NgrxFormDirective.propDecorators = { | ||
export { getInitialState, NgrxFormReducer, ngrxForm, Updateform, NGRX_FORMS_FEATURE, FEATURE_REDUCER_TOKEN, NgrxFormModule, NgrxFormDirective as ɵa, FormService as ɵb }; | ||
export { getInitialState, NgrxFormReducer, ngrxForm, Updateform, NGRX_FORMS_FEATURE, FEATURE_REDUCER_TOKEN, NgrxFormModule, NgrxFormDirective as ɵa }; | ||
//# sourceMappingURL=yoozly-ngrx-form.js.map |
import { ChangeDetectorRef } from '@angular/core'; | ||
import { FormGroupDirective } from '@angular/forms'; | ||
import { FormGroupDirective, FormBuilder } from '@angular/forms'; | ||
import { Store } from '@ngrx/store'; | ||
import * as fromService from '../services'; | ||
export declare class NgrxFormDirective { | ||
@@ -10,3 +9,3 @@ featureName: string; | ||
private cd; | ||
private formService; | ||
private fb; | ||
path: string; | ||
@@ -16,3 +15,3 @@ private componentDestroy$; | ||
private storeDatas$; | ||
constructor(featureName: string, formGroupDirective: FormGroupDirective, store: Store<any>, cd: ChangeDetectorRef, formService: fromService.FormService); | ||
constructor(featureName: string, formGroupDirective: FormGroupDirective, store: Store<any>, cd: ChangeDetectorRef, fb: FormBuilder); | ||
ngOnInit(): void; | ||
@@ -23,3 +22,5 @@ private subscriptions; | ||
private mapActionPayload; | ||
private updateForm; | ||
private getErrors; | ||
ngOnDestroy(): void; | ||
} |
{ | ||
"name": "@yoozly/ngrx-form", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"author": "Guillaume Doutriaux", | ||
"description": "Angular Lib that binds reactive-forms and @ngrx/store together.", | ||
"homepage": "https://github.com/guillaumedoutriaux/ngrx-form-binding", | ||
"keywords": [ | ||
"ngrx", | ||
"store", | ||
"reactive-forms", | ||
"angular" | ||
], | ||
"peerDependencies": { | ||
@@ -6,0 +14,0 @@ "@angular/core": "~7.2.0", |
@@ -6,2 +6,1 @@ /** | ||
export { NgrxFormDirective as ɵa } from './lib/directives/form.directives'; | ||
export { FormService as ɵb } from './lib/services'; |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":4,"exports":[{"from":"./lib/form.reducers"},{"from":"./lib/form.actions"}],"metadata":{"NGRX_FORMS_FEATURE":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":38},"arguments":["Feature Name"]},"FEATURE_REDUCER_TOKEN":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":4,"character":41},"arguments":["Feature Reducers"]},"NgrxFormModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":5,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"ɵa"}],"exports":[{"__symbolic":"reference","name":"ɵa"}],"imports":[]}]}],"members":{},"statics":{"forFeature":{"__symbolic":"function","parameters":["feature"],"value":{"ngModule":{"__symbolic":"reference","name":"NgrxFormModule"},"providers":[{"provide":{"__symbolic":"reference","name":"NGRX_FORMS_FEATURE"},"useValue":{"__symbolic":"reference","name":"feature"}}]}}}},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":18,"character":1},"arguments":[{"selector":"[NgrxFormConnect]"}]}],"members":{"path":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":22,"character":3},"arguments":["NgrxFormConnect"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":29,"character":5},"arguments":[{"__symbolic":"reference","name":"NGRX_FORMS_FEATURE"}]}],null,null,null,null],"parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"@angular/forms","name":"FormGroupDirective","line":30,"character":32},{"__symbolic":"reference","name":"Store","module":"@ngrx/store","arguments":[{"__symbolic":"reference","name":"any"}]},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":32,"character":16},{"__symbolic":"reference","name":"ɵb"}]}],"ngOnInit":[{"__symbolic":"method"}],"subscriptions":[{"__symbolic":"method"}],"storeToForm":[{"__symbolic":"method"}],"formToStore":[{"__symbolic":"method"}],"mapActionPayload":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]}}},"origins":{"NGRX_FORMS_FEATURE":"./lib/services/form.tokens","FEATURE_REDUCER_TOKEN":"./lib/services/form.tokens","NgrxFormModule":"./lib/ngrx-form.module","ɵa":"./lib/directives/form.directives","ɵb":"./lib/services"},"importAs":"@yoozly/ngrx-form"} | ||
{"__symbolic":"module","version":4,"exports":[{"from":"./lib/form.reducers"},{"from":"./lib/form.actions"}],"metadata":{"NGRX_FORMS_FEATURE":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":38},"arguments":["Feature Name"]},"FEATURE_REDUCER_TOKEN":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":4,"character":41},"arguments":["Feature Reducers"]},"NgrxFormModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":5,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"ɵa"}],"exports":[{"__symbolic":"reference","name":"ɵa"}],"imports":[]}]}],"members":{},"statics":{"forFeature":{"__symbolic":"function","parameters":["feature"],"value":{"ngModule":{"__symbolic":"reference","name":"NgrxFormModule"},"providers":[{"provide":{"__symbolic":"reference","name":"NGRX_FORMS_FEATURE"},"useValue":{"__symbolic":"reference","name":"feature"}}]}}}},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":22,"character":1},"arguments":[{"selector":"[NgrxFormConnect]"}]}],"members":{"path":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":26,"character":3},"arguments":["NgrxFormConnect"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":33,"character":5},"arguments":[{"__symbolic":"reference","name":"NGRX_FORMS_FEATURE"}]}],null,null,null,null],"parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"@angular/forms","name":"FormGroupDirective","line":34,"character":32},{"__symbolic":"reference","name":"Store","module":"@ngrx/store","arguments":[{"__symbolic":"reference","name":"any"}]},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":36,"character":16},{"__symbolic":"reference","module":"@angular/forms","name":"FormBuilder","line":37,"character":16}]}],"ngOnInit":[{"__symbolic":"method"}],"subscriptions":[{"__symbolic":"method"}],"storeToForm":[{"__symbolic":"method"}],"formToStore":[{"__symbolic":"method"}],"mapActionPayload":[{"__symbolic":"method"}],"updateForm":[{"__symbolic":"method"}],"getErrors":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]}}},"origins":{"NGRX_FORMS_FEATURE":"./lib/services/form.tokens","FEATURE_REDUCER_TOKEN":"./lib/services/form.tokens","NgrxFormModule":"./lib/ngrx-form.module","ɵa":"./lib/directives/form.directives"},"importAs":"@yoozly/ngrx-form"} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
2
226622
42
2020