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

@ngneat/forms-manager

Package Overview
Dependencies
Maintainers
3
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ngneat/forms-manager - npm Package Compare versions

Comparing version 2.2.0 to 2.3.0

2

bundles/ngneat-forms-manager.umd.min.js

@@ -15,3 +15,3 @@ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/forms"),require("rxjs/operators"),require("rxjs")):"function"==typeof define&&define.amd?define("@ngneat/forms-manager",["exports","@angular/core","@angular/forms","rxjs/operators","rxjs"],e):e(((t=t||self).ngneat=t.ngneat||{},t.ngneat["forms-manager"]={}),t.ng.core,t.ng.forms,t.rxjs.operators,t.rxjs)}(this,(function(t,e,r,n,o){"use strict";

PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var i=function(){return(i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function a(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function s(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function u(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(s(arguments[e]));return t}var l=function(t){return t.pipe(n.filter((function(t){return null!=t})))};function c(t){return null==t?[]:Array.isArray(t)?t:[t]}function f(t){return p(t)?i({},t):Array.isArray(t)?u(t):t}function p(t){return!(null==t||Array.isArray(t)||(e=t,e&&"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e)))&&"object"==typeof t;var e}var h=["dirty","disabled","invalid","pending","errors","pristine","touched","valid"];function g(t,e){return t.reduce((function(t,r,n){return t[n]=y(r,e),t}),[])}function y(t,e){var r,n,o={};try{for(var i=a(Object.keys(t)),s=i.next();!s.done;s=i.next()){var u=s.value,l=t[u];!1===e(u)&&(p(l)?o[u]=y(l,e):Array.isArray(l)&&"controls"===u?o[u]=g(l,e):o[u]=l)}}catch(t){r={error:t}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return o}function d(){return"undefined"!=typeof window}var v=function(){function t(t){this.state=t,this.store=new o.BehaviorSubject(t)}return t.prototype.select=function(t){return this.store.asObservable().pipe(n.map(t),n.distinctUntilChanged())},t.prototype.getValue=function(){return this.store.getValue()},t.prototype.set=function(t){this.store.next(t)},t.prototype.update=function(t){this.store.next(Object.assign({},this.getValue(),t))},t}();var m={storage:{key:"ngFormsManager"},debounceTime:300};var b=function(){function t(t){void 0===t&&(t={}),this.config=t}return t.prototype.merge=function(t){return void 0===t&&(t={}),function(t,e,r){return void 0===e&&(e={}),i(i(i(i({},t),{storage:i(i(i({},t.storage),e.storage),r.storage)}),e),r)}(m,this.config,t)},t}();var $=new e.InjectionToken("NG_FORMS_MANAGER_CONFIG",{providedIn:"root",factory:function(){return new b}});function C(t,e){if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){if(t.constructor!==e.constructor)return!1;var r,n,o;if(Array.isArray(t)){if((r=t.length)!=e.length)return!1;for(n=r;0!=n--;)if(!C(t[n],e[n]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();if((r=(o=Object.keys(t)).length)!==Object.keys(e).length)return!1;for(n=r;0!=n--;)if(!Object.prototype.hasOwnProperty.call(e,o[n]))return!1;for(n=r;0!=n--;){var i=o[n];if(!C(t[i],e[i]))return!1}return!0}return t!=t&&e!=e}function V(t,e){var n,o,i;if(e instanceof r.FormControl)return i=j(e);if(e instanceof r.FormGroup||e instanceof r.FormArray){i=j(e);try{for(var s=a(Object.keys(e.controls)),u=s.next();!u.done;u=s.next()){var l=u.value,c=e.controls[l];c instanceof r.FormGroup||c instanceof r.FormArray?i.controls[l]=V(t,c):i.controls[l]=j(c)}}catch(t){n={error:t}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}}return i}function O(t,e){var r=s(e.split(".")),n=r[0],o=r.slice(1);return 0===o.length?t.controls[n]:o.reduce((function(t,e){return t.controls.hasOwnProperty(e)?t.controls[e]:null}),t.controls[n])}function j(t){var e={value:f(t.value),rawValue:t.getRawValue?t.getRawValue():null,valid:t.valid,dirty:t.dirty,invalid:t.invalid,disabled:t.disabled,errors:t.errors,touched:t.touched,pristine:t.pristine,pending:t.pending};return(t instanceof r.FormGroup||t instanceof r.FormArray)&&(e.controls=t instanceof r.FormArray?[]:{}),e}function S(t){for(;0!==t.length;)t.removeAt(0)}var w=Symbol("NO_DEBOUNCE"),A=function(){function t(t){this.config=t,this.valueChanges$$=new Map,this.instances$$=new Map,this.initialValues$$=new Map,this.destroy$$=new o.Subject,this.store=new v({})}return t.prototype.validityChanges=function(t,e){return this.controlChanges(t,e).pipe(n.map((function(t){return t.valid})))},t.prototype.isValid=function(t){return this.hasControl(t)&&this.getControl(t).valid},t.prototype.dirtyChanges=function(t,e){return this.controlChanges(t,e).pipe(n.map((function(t){return t.dirty})))},t.prototype.disableChanges=function(t,e){return this.controlChanges(t,e).pipe(n.map((function(t){return t.disabled})))},t.prototype.valueChanges=function(t,e){return this.controlChanges(t,e).pipe(n.map((function(t){return t.value})))},t.prototype.errorsChanges=function(t,e){return this.controlChanges(t,e).pipe(n.map((function(t){return t.errors})))},t.prototype.controlChanges=function(t,e){var r=this.store.select((function(e){return e[t]})).pipe(l);return e?r.pipe(n.map((function(t){return O(t,e)})),n.distinctUntilChanged((function(t,e){return C(t,e)}))):r.pipe(n.distinctUntilChanged((function(t,e){return C(t,e)})))},t.prototype.initialValueChanged=function(t){var e=this;return!1===this.initialValues$$.has(t)&&console.error("You should set the withInitialValue option to the "+t+" control"),this.valueChanges(t).pipe(n.map((function(r){return!1===C(r,e.initialValues$$.get(t))})))},t.prototype.controlDestroyed=function(t){return this.destroy$$.asObservable().pipe(n.filter((function(e){return t===e||"$$ALL"===e})))},t.prototype.getControl=function(t,e){return e?this.hasControl(t)?O(this.getControl(t),e):null:this.store.getValue()[t]},t.prototype.getInitialValue=function(t){return this.initialValues$$.get(t)},t.prototype.hasControl=function(t,e){return!!this.getControl(t,e)},t.prototype.patchValue=function(t,e,r){this.instances$$.has(t)&&this.instances$$.get(t).patchValue(e,r)},t.prototype.setValue=function(t,e,r){this.instances$$.has(t)&&this.instances$$.get(t).setValue(e,r)},t.prototype.setInitialValue=function(t,e){this.initialValues$$.set(t,e)},t.prototype.unsubscribe=function(t){var e,r,n=this;if(t){var o=c(t);try{for(var i=a(o),s=i.next();!s.done;s=i.next()){var u=s.value;this.valueChanges$$.has(u)&&this.valueChanges$$.get(u).unsubscribe(),this.valueChanges$$.delete(u),this.instances$$.delete(u),this.destroy$$.next(u)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}}else this.valueChanges$$.forEach((function(t){t.unsubscribe(),n.destroy$$.next("$$ALL")})),this.valueChanges$$.clear(),this.instances$$.clear()},t.prototype.clear=function(t){t?this.deleteControl(t):this.store.set({}),this.removeFromStorage(),this.removeInitialValue(t)},t.prototype.destroy=function(t){this.unsubscribe(t),this.clear(t)},t.prototype.upsert=function(t,e,r){var i,a=this;void 0===r&&(r={});var s=this.config.merge(r);if(s.withInitialValue&&!1===this.initialValues$$.has(t)&&this.setInitialValue(t,e.value),d()&&r.persistState&&!1===this.hasControl(t)){var l=this.getFromStorage(s.storage.key);l[t]&&this.store.update(((i={})[t]=function t(e){for(var r,n,o=[],i=1;i<arguments.length;i++)o[i-1]=arguments[i];if(!o.length)return e;var a=o.shift();if(p(e)&&p(a))for(var s in a)p(a[s])?(e[s]||Object.assign(e,((r={})[s]={},r)),t(e[s],a[s])):Object.assign(e,((n={})[s]=a[s],n));return t.apply(void 0,u([e],o))}(V(t,e),l[t]),i))}if(!0===this.hasControl(t))e.patchValue(this.toControlValue(t,e,s.arrControlFactory),{emitEvent:!1});else{var c=this.updateStore(t,e);this.updateStorage(t,c,s)}var f=o.merge.apply(void 0,u([e.statusChanges.pipe(n.distinctUntilChanged())],this.getValueChangeStreams(e))).pipe(n.debounce((function(t){return t===w?o.EMPTY:o.timer(s.debounceTime)}))).subscribe((function(){var r=a.updateStore(t,e);a.updateStorage(t,r,s)}));return this.valueChanges$$.set(t,f),this.instances$$.set(t,e),this},t.prototype.getValueChangeStreams=function(t){var e=[];if("blur"===t.updateOn)e.push(t.valueChanges.pipe(n.mapTo(w)));else if(e.push(t.valueChanges),t instanceof r.FormGroup)return Object.keys(t.controls).reduce((function(e,r){return"blur"===t.get(r).updateOn?u(e,[t.get(r).valueChanges.pipe(n.mapTo(w))]):u(e)}),e);return e},t.prototype.removeFromStorage=function(){localStorage.setItem(this.config.merge().storage.key,JSON.stringify(this.store.getValue()))},t.prototype.updateStorage=function(t,e,r){if(d()&&r.persistState){var n=this.getFromStorage(r.storage.key);n[t]=function(t){return y(t,(function(t){return h.includes(t)}))}(e),localStorage.setItem(r.storage.key,JSON.stringify(n))}},t.prototype.getFromStorage=function(t){return JSON.parse(localStorage.getItem(t)||"{}")},t.prototype.deleteControl=function(t){var e,r;this.store.set((e=this.store.getValue(),r=c(t),Object.keys(e).reduce((function(t,n){return!1===r.includes(n)&&(t[n]=e[n]),t}),{})))},t.prototype.toControlValue=function(t,e,n){var o=this.getControl(t),i=o.value;return o.controls?(function(t,e,n){if(e instanceof r.FormArray){if(S(e),!n)throw new Error("Please provide arrControlFactory");t.forEach((function(t,r){return e.insert(r,n(t))}))}else Object.keys(t).forEach((function(o){var i=t[o];if(Array.isArray(i)&&e.get(o)instanceof r.FormArray){if(!n||n&&!(o in n))throw new Error("Please provide arrControlFactory for "+o);var a=e.get(o),s=n[o];S(a),i.forEach((function(t,e){return a.insert(e,s(t))}))}}))}(i,e,n),i):i},t.prototype.updateStore=function(t,e){var r,n=V(t,e);return this.store.update(((r={})[t]=n,r)),n},t.prototype.removeInitialValue=function(t){var e=this;c(t).forEach((function(t){return e.initialValues$$.delete(t)}))},t.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:b,decorators:[{type:e.Optional},{type:e.Inject,args:[$]}]}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject($,8))},token:t,providedIn:"root"}),t}();t.NG_FORMS_MANAGER_CONFIG=$,t.NgFormsManager=A,t.NgFormsManagerConfig=b,t.setAsyncValidators=function(t,e){t.setValidators(c(e)),t.updateValueAndValidity()},t.setValidators=function(t,e){t.setValidators(c(e)),t.updateValueAndValidity()},Object.defineProperty(t,"__esModule",{value:!0})}));
***************************************************************************** */var i=function(){return(i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function a(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function s(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function u(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(s(arguments[e]));return t}var c=function(t){return t.pipe(n.filter((function(t){return null!=t})))};function l(t){return null==t?[]:Array.isArray(t)?t:[t]}function f(t){return p(t)?i({},t):Array.isArray(t)?u(t):t}function p(t){return!(null==t||Array.isArray(t)||(e=t,e&&"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e)))&&"object"==typeof t;var e}var h=["dirty","disabled","invalid","pending","errors","pristine","touched","valid"];function g(t,e){return t.reduce((function(t,r,n){return t[n]=y(r,e),t}),[])}function y(t,e){var r,n,o={};try{for(var i=a(Object.keys(t)),s=i.next();!s.done;s=i.next()){var u=s.value,c=t[u];!1===e(u)&&(p(c)?o[u]=y(c,e):Array.isArray(c)&&"controls"===u?o[u]=g(c,e):o[u]=c)}}catch(t){r={error:t}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return o}function d(){return"undefined"!=typeof window}var v=function(){function t(t){this.state=t,this.store=new o.BehaviorSubject(t)}return t.prototype.select=function(t){return this.store.asObservable().pipe(n.map(t),n.distinctUntilChanged())},t.prototype.getValue=function(){return this.store.getValue()},t.prototype.set=function(t){this.store.next(t)},t.prototype.update=function(t){this.store.next(Object.assign({},this.getValue(),t))},t}();var $={storage:{key:"ngFormsManager"},debounceTime:300};var m=function(){function t(t){void 0===t&&(t={}),this.config=t}return t.prototype.merge=function(t){return void 0===t&&(t={}),function(t,e,r){return void 0===e&&(e={}),i(i(i(i({},t),{storage:i(i(i({},t.storage),e.storage),r.storage)}),e),r)}($,this.config,t)},t}();var b=new e.InjectionToken("NG_FORMS_MANAGER_CONFIG",{providedIn:"root",factory:function(){return new m}});function C(t,e){if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){if(t.constructor!==e.constructor)return!1;var r,n,o;if(Array.isArray(t)){if((r=t.length)!=e.length)return!1;for(n=r;0!=n--;)if(!C(t[n],e[n]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();if((r=(o=Object.keys(t)).length)!==Object.keys(e).length)return!1;for(n=r;0!=n--;)if(!Object.prototype.hasOwnProperty.call(e,o[n]))return!1;for(n=r;0!=n--;){var i=o[n];if(!C(t[i],e[i]))return!1}return!0}return t!=t&&e!=e}function A(t,e){var n,o,i;if(e instanceof r.FormControl)return i=V(e);if(e instanceof r.FormGroup||e instanceof r.FormArray){i=V(e);try{for(var s=a(Object.keys(e.controls)),u=s.next();!u.done;u=s.next()){var c=u.value,l=e.controls[c];l instanceof r.FormGroup||l instanceof r.FormArray?i.controls[c]=A(t,l):i.controls[c]=V(l)}}catch(t){n={error:t}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}}return i}function S(t,e){var r=s(e.split(".")),n=r[0],o=r.slice(1);return 0===o.length?t.controls[n]:o.reduce((function(t,e){return t.controls.hasOwnProperty(e)?t.controls[e]:null}),t.controls[n])}function V(t){var e={value:f(t.value),rawValue:t.getRawValue?t.getRawValue():null,valid:t.valid,dirty:t.dirty,invalid:t.invalid,disabled:t.disabled,errors:t.errors,touched:t.touched,pristine:t.pristine,pending:t.pending,untouched:t.untouched};return(t instanceof r.FormGroup||t instanceof r.FormArray)&&(e.controls=t instanceof r.FormArray?[]:{}),e}function O(t){for(;0!==t.length;)t.removeAt(0)}var j=Symbol("NO_DEBOUNCE"),k=function(){function t(t){this.config=t,this.valueChanges$$=new Map,this.instances$$=new Map,this.initialValues$$=new Map,this.destroy$$=new o.Subject,this.store=new v({})}return t.prototype.validityChanges=function(t,e){return this.controlChanges(t,e).pipe(n.map((function(t){return t.valid})))},t.prototype.isValid=function(t){return this.hasControl(t)&&this.getControl(t).valid},t.prototype.dirtyChanges=function(t,e){return this.controlChanges(t,e).pipe(n.map((function(t){return t.dirty})))},t.prototype.disableChanges=function(t,e){return this.controlChanges(t,e).pipe(n.map((function(t){return t.disabled})))},t.prototype.valueChanges=function(t,e){return this.controlChanges(t,e).pipe(n.map((function(t){return t.value})))},t.prototype.errorsChanges=function(t,e){return this.controlChanges(t,e).pipe(n.map((function(t){return t.errors})))},t.prototype.controlChanges=function(t,e){var r=this.store.select((function(e){return e[t]})).pipe(c);return e?r.pipe(n.map((function(t){return S(t,e)})),n.distinctUntilChanged((function(t,e){return C(t,e)}))):r.pipe(n.distinctUntilChanged((function(t,e){return C(t,e)})))},t.prototype.initialValueChanged=function(t){var e=this;return!1===this.initialValues$$.has(t)&&console.error("You should set the withInitialValue option to the "+t+" control"),this.valueChanges(t).pipe(n.map((function(r){return!1===C(r,e.initialValues$$.get(t))})))},t.prototype.controlDestroyed=function(t){return this.destroy$$.asObservable().pipe(n.filter((function(e){return t===e||"$$ALL"===e})))},t.prototype.getControl=function(t,e){return e?this.hasControl(t)?S(this.getControl(t),e):null:this.store.getValue()[t]},t.prototype.getInitialValue=function(t){return this.initialValues$$.get(t)},t.prototype.hasControl=function(t,e){return!!this.getControl(t,e)},t.prototype.patchValue=function(t,e,r){this.instances$$.has(t)&&this.instances$$.get(t).patchValue(e,r)},t.prototype.setValue=function(t,e,r){this.instances$$.has(t)&&this.instances$$.get(t).setValue(e,r)},t.prototype.setInitialValue=function(t,e){this.initialValues$$.set(t,e)},t.prototype.markAllAsTouched=function(t){this.instances$$.has(t)&&(this.instances$$.get(t).markAllAsTouched(),this.updateStore(t,this.instances$$.get(t)))},t.prototype.markAsTouched=function(t,e){this.instances$$.has(t)&&(this.instances$$.get(t).markAsTouched(e),this.updateStore(t,this.instances$$.get(t)))},t.prototype.markAllAsDirty=function(t,e){if(this.instances$$.has(t)){var r=this.instances$$.get(t);this.markDescendantsAsDirty(r,e),this.updateStore(t,r)}},t.prototype.markAsDirty=function(t,e){this.instances$$.has(t)&&(this.instances$$.get(t).markAsDirty(e),this.updateStore(t,this.instances$$.get(t)))},t.prototype.markAsPending=function(t,e){this.instances$$.has(t)&&(this.instances$$.get(t).markAsPending(e),this.updateStore(t,this.instances$$.get(t)))},t.prototype.markAsPristine=function(t,e){this.instances$$.has(t)&&(this.instances$$.get(t).markAsPristine(e),this.updateStore(t,this.instances$$.get(t)))},t.prototype.markAsUntouched=function(t,e){this.instances$$.has(t)&&(this.instances$$.get(t).markAsUntouched(e),this.updateStore(t,this.instances$$.get(t)))},t.prototype.unsubscribe=function(t){var e,r,n=this;if(t){var o=l(t);try{for(var i=a(o),s=i.next();!s.done;s=i.next()){var u=s.value;this.valueChanges$$.has(u)&&this.valueChanges$$.get(u).unsubscribe(),this.valueChanges$$.delete(u),this.instances$$.delete(u),this.destroy$$.next(u)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}}else this.valueChanges$$.forEach((function(t){t.unsubscribe(),n.destroy$$.next("$$ALL")})),this.valueChanges$$.clear(),this.instances$$.clear()},t.prototype.clear=function(t){t?this.deleteControl(t):this.store.set({}),this.removeFromStorage(),this.removeInitialValue(t)},t.prototype.destroy=function(t){this.unsubscribe(t),this.clear(t)},t.prototype.upsert=function(t,e,r){var i,a=this;void 0===r&&(r={});var s=this.config.merge(r);if(s.withInitialValue&&!1===this.initialValues$$.has(t)&&this.setInitialValue(t,e.value),d()&&r.persistState&&!1===this.hasControl(t)){var c=this.getFromStorage(s.storage.key);c[t]&&this.store.update(((i={})[t]=function t(e){for(var r,n,o=[],i=1;i<arguments.length;i++)o[i-1]=arguments[i];if(!o.length)return e;var a=o.shift();if(p(e)&&p(a))for(var s in a)p(a[s])?(e[s]||Object.assign(e,((r={})[s]={},r)),t(e[s],a[s])):Object.assign(e,((n={})[s]=a[s],n));return t.apply(void 0,u([e],o))}(A(t,e),c[t]),i))}if(!0===this.hasControl(t))e.patchValue(this.toControlValue(t,e,s.arrControlFactory),{emitEvent:!1});else{var l=this.updateStore(t,e);this.updateStorage(t,l,s)}var f=o.merge.apply(void 0,u([e.statusChanges.pipe(n.distinctUntilChanged())],this.getValueChangeStreams(e))).pipe(n.debounce((function(t){return t===j?o.EMPTY:o.timer(s.debounceTime)}))).subscribe((function(){var r=a.updateStore(t,e);a.updateStorage(t,r,s)}));return this.valueChanges$$.set(t,f),this.instances$$.set(t,e),this},t.prototype.getValueChangeStreams=function(t){var e=[];if("blur"===t.updateOn)e.push(t.valueChanges.pipe(n.mapTo(j)));else if(e.push(t.valueChanges),t instanceof r.FormGroup)return Object.keys(t.controls).reduce((function(e,r){return"blur"===t.get(r).updateOn?u(e,[t.get(r).valueChanges.pipe(n.mapTo(j))]):u(e)}),e);return e},t.prototype.removeFromStorage=function(){localStorage.setItem(this.config.merge().storage.key,JSON.stringify(this.store.getValue()))},t.prototype.updateStorage=function(t,e,r){if(d()&&r.persistState){var n=this.getFromStorage(r.storage.key);n[t]=function(t){return y(t,(function(t){return h.includes(t)}))}(e),localStorage.setItem(r.storage.key,JSON.stringify(n))}},t.prototype.getFromStorage=function(t){return JSON.parse(localStorage.getItem(t)||"{}")},t.prototype.deleteControl=function(t){var e,r;this.store.set((e=this.store.getValue(),r=l(t),Object.keys(e).reduce((function(t,n){return!1===r.includes(n)&&(t[n]=e[n]),t}),{})))},t.prototype.toControlValue=function(t,e,n){var o=this.getControl(t),i=o.value;return o.controls?(function(t,e,n){if(e instanceof r.FormArray){if(O(e),!n)throw new Error("Please provide arrControlFactory");t.forEach((function(t,r){return e.insert(r,n(t))}))}else Object.keys(t).forEach((function(o){var i=t[o];if(Array.isArray(i)&&e.get(o)instanceof r.FormArray){if(!n||n&&!(o in n))throw new Error("Please provide arrControlFactory for "+o);var a=e.get(o),s=n[o];O(a),i.forEach((function(t,e){return a.insert(e,s(t))}))}}))}(i,e,n),i):i},t.prototype.updateStore=function(t,e){var r,n=A(t,e);return this.store.update(((r={})[t]=n,r)),n},t.prototype.removeInitialValue=function(t){var e=this;l(t).forEach((function(t){return e.initialValues$$.delete(t)}))},t.prototype.markDescendantsAsDirty=function(t,e){var n=this;(t.markAsDirty(e),t instanceof r.FormGroup||t instanceof r.FormArray)&&Object.keys(t.controls).map((function(e){return t.controls[e]})).forEach((function(t){t.markAsDirty(e),t.controls&&n.markDescendantsAsDirty(t,e)}))},t.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:m,decorators:[{type:e.Optional},{type:e.Inject,args:[b]}]}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(b,8))},token:t,providedIn:"root"}),t}();t.NG_FORMS_MANAGER_CONFIG=b,t.NgFormsManager=k,t.NgFormsManagerConfig=m,t.setAsyncValidators=function(t,e){t.setValidators(l(e)),t.updateValueAndValidity()},t.setValidators=function(t,e){t.setValidators(l(e)),t.updateValueAndValidity()},Object.defineProperty(t,"__esModule",{value:!0})}));
//# sourceMappingURL=ngneat-forms-manager.umd.min.js.map

@@ -137,2 +137,3 @@ /**

pending: control.pending,
untouched: control.untouched,
};

@@ -153,2 +154,2 @@ if (control instanceof FormGroup || control instanceof FormArray) {

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVpbGRlcnMuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AbmduZWF0L2Zvcm1zLW1hbmFnZXIvIiwic291cmNlcyI6WyJsaWIvYnVpbGRlcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxPQUFPLEVBQW1CLFNBQVMsRUFBRSxXQUFXLEVBQUUsU0FBUyxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFFcEYsT0FBTyxFQUFFLEtBQUssRUFBRSxNQUFNLFNBQVMsQ0FBQzs7Ozs7OztBQUVoQyxNQUFNLFVBQVUsT0FBTyxDQUFhLElBQXNCLEVBQUUsT0FBd0I7O1FBQzlFLEtBQUs7SUFFVCxJQUFJLE9BQU8sWUFBWSxXQUFXLEVBQUU7UUFDbEMsS0FBSyxHQUFHLFVBQVUsQ0FBQy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bmUgb2JqZWN0IHRvIHByZXZlbnQgaXNzdWUgd2l0aCB0aGlyZCBwYXJ0eSB0aGF0IHdvdWxkIGJlIGFmZmVjdGVkIGJ5IHN0b3JlIGZyZWV6aW5nLlxuICAgIHJhd1ZhbHVlOiAoY29udHJvbCBhcyBhbnkpLmdldFJhd1ZhbHVlID8gKGNvbnRyb2wgYXMgYW55KS5nZXRSYXdWYWx1ZSgpIDogbnVsbCxcbiAgICB2YWxpZDogY29udHJvbC52YWxpZCxcbiAgICBkaXJ0eTogY29udHJvbC5kaXJ0eSxcbiAgICBpbnZhbGlkOiBjb250cm9sLmludmFsaWQsXG4gICAgZGlzYWJsZWQ6IGNvbnRyb2wuZGlzYWJsZWQsXG4gICAgZXJyb3JzOiBjb250cm9sLmVycm9ycyxcbiAgICB0b3VjaGVkOiBjb250cm9sLnRvdWNoZWQsXG4gICAgcHJpc3RpbmU6IGNvbnRyb2wucHJpc3RpbmUsXG4gICAgcGVuZGluZzogY29udHJvbC5wZW5kaW5nLFxuICAgIHVudG91Y2hlZDogY29udHJvbC51bnRvdWNoZWQsXG4gIH07XG5cbiAgaWYgKGNvbnRyb2wgaW5zdGFuY2VvZiBGb3JtR3JvdXAgfHwgY29udHJvbCBpbnN0YW5jZW9mIEZvcm1BcnJheSkge1xuICAgIHZhbHVlWydjb250cm9scyddID0gY29udHJvbCBpbnN0YW5jZW9mIEZvcm1BcnJheSA/IFtdIDoge307XG4gIH1cblxuICByZXR1cm4gdmFsdWU7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBjbGVhckZvcm1BcnJheShjb250cm9sOiBGb3JtQXJyYXkpIHtcbiAgd2hpbGUgKGNvbnRyb2wubGVuZ3RoICE9PSAwKSB7XG4gICAgY29udHJvbC5yZW1vdmVBdCgwKTtcbiAgfVxufVxuIl19

@@ -7,3 +7,3 @@ /**

import { Inject, Injectable, Optional } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { FormGroup, FormArray } from '@angular/forms';
import { coerceArray, filterControlKeys, filterNil, isBrowser, mergeDeep } from './utils';

@@ -307,2 +307,129 @@ import { EMPTY, merge, Subject, timer } from 'rxjs';

*
* A proxy to the original `markAllAsTouched` method
*
* manager.markAllAsTouched('login');
*
* @param {?} name
* @return {?}
*/
markAllAsTouched(name) {
if (this.instances$$.has(name)) {
this.instances$$.get(name).markAllAsTouched();
this.updateStore(name, this.instances$$.get(name));
}
}
/**
*
* \@example
*
* A proxy to the original `markAsTouched` method
*
* manager.markAsTouched('login');
*
* @param {?} name
* @param {?=} options
* @return {?}
*/
markAsTouched(name, options) {
if (this.instances$$.has(name)) {
this.instances$$.get(name).markAsTouched(options);
this.updateStore(name, this.instances$$.get(name));
}
}
/**
*
* \@example
*
* Marks the control and all its descendant controls as dirty.
*
* manager.markAllAsDirty('login');
*
* @param {?} name
* @param {?=} options
* @return {?}
*/
markAllAsDirty(name, options) {
if (this.instances$$.has(name)) {
/** @type {?} */
let control = this.instances$$.get(name);
this.markDescendantsAsDirty(control, options);
this.updateStore(name, control);
}
}
/**
*
* \@example
*
* A proxy to the original `markAsDirty` method
*
* manager.markAsDirty('login');
*
* @param {?} name
* @param {?=} options
* @return {?}
*/
markAsDirty(name, options) {
if (this.instances$$.has(name)) {
this.instances$$.get(name).markAsDirty(options);
this.updateStore(name, this.instances$$.get(name));
}
}
/**
*
* \@example
*
* A proxy to the original `markAsPending` method
*
* manager.markAsPending('login');
*
* @param {?} name
* @param {?=} options
* @return {?}
*/
markAsPending(name, options) {
if (this.instances$$.has(name)) {
this.instances$$.get(name).markAsPending(options);
this.updateStore(name, this.instances$$.get(name));
}
}
/**
*
* \@example
*
* A proxy to the original `markAsPristine` method
*
* manager.markAsPristine('login');
*
* @param {?} name
* @param {?=} options
* @return {?}
*/
markAsPristine(name, options) {
if (this.instances$$.has(name)) {
this.instances$$.get(name).markAsPristine(options);
this.updateStore(name, this.instances$$.get(name));
}
}
/**
*
* \@example
*
* A proxy to the original `markAsUntouched` method
*
* manager.markAsUntouched('login');
*
* @param {?} name
* @param {?=} options
* @return {?}
*/
markAsUntouched(name, options) {
if (this.instances$$.has(name)) {
this.instances$$.get(name).markAsUntouched(options);
this.updateStore(name, this.instances$$.get(name));
}
}
/**
*
* \@example
*
* manager.unsubscribe('login');

@@ -543,2 +670,29 @@ *

}
/**
* @private
* @param {?} control
* @param {?=} options
* @return {?}
*/
markDescendantsAsDirty(control, options) {
control.markAsDirty(options);
if (control instanceof FormGroup || control instanceof FormArray) {
/** @type {?} */
let controls = Object.keys(control.controls).map((/**
* @param {?} controlName
* @return {?}
*/
controlName => control.controls[controlName]));
controls.forEach((/**
* @param {?} control
* @return {?}
*/
control => {
control.markAsDirty(options);
if (((/** @type {?} */ (control))).controls) {
this.markDescendantsAsDirty(control, options);
}
}));
}
}
}

@@ -585,2 +739,2 @@ NgFormsManager.decorators = [

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybXMtbWFuYWdlci5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BuZ25lYXQvZm9ybXMtbWFuYWdlci8iLCJzb3VyY2VzIjpbImxpYi9mb3Jtcy1tYW5hZ2VyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsT0FBTyxFQUFFLE1BQU0sRUFBRSxVQUFVLEVBQUUsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzdELE9BQU8sRUFBbUIsU0FBUyxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFDNUQsT0FBTyxFQUFFLFdBQVcsRUFBRSxpQkFBaUIsRUFBRSxTQUFTLEVBQUUsU0FBUyxFQUFFLFNBQVMsRUFBRSxNQUFNLFNBQVMsQ0FBQztBQUMxRixPQUFPLEVBQUUsS0FBSyxFQUFFLEtBQUssRUFBYyxPQUFPLEVBQWdCLEtBQUssRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUM5RSxPQUFPLEVBQUUsUUFBUSxFQUFFLG9CQUFvQix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4gICAgY29udHJvbDogQWJzdHJhY3RDb250cm9sLFxuICAgIG9wdGlvbnM/OiB7XG4gICAgICBvbmx5U2VsZj86IGJvb2xlYW47XG4gICAgICBlbWl0RXZlbnQ/OiBib29sZWFuO1xuICAgIH1cbiAgKSB7XG4gICAgY29udHJvbC5tYXJrQXNEaXJ0eShvcHRpb25zKTtcblxuICAgIGlmIChjb250cm9sIGluc3RhbmNlb2YgRm9ybUdyb3VwIHx8IGNvbnRyb2wgaW5zdGFuY2VvZiBGb3JtQXJyYXkpIHtcbiAgICAgIGxldCBjb250cm9sczogQWJzdHJhY3RDb250cm9sW10gPSBPYmplY3Qua2V5cyhjb250cm9sLmNvbnRyb2xzKS5tYXAoXG4gICAgICAgIGNvbnRyb2xOYW1lID0+IGNvbnRyb2wuY29udHJvbHNbY29udHJvbE5hbWVdXG4gICAgICApO1xuXG4gICAgICBjb250cm9scy5mb3JFYWNoKGNvbnRyb2wgPT4ge1xuICAgICAgICBjb250cm9sLm1hcmtBc0RpcnR5KG9wdGlvbnMpO1xuXG4gICAgICAgIGlmICgoY29udHJvbCBhcyBGb3JtR3JvdXAgfCBGb3JtQXJyYXkpLmNvbnRyb2xzKSB7XG4gICAgICAgICAgdGhpcy5tYXJrRGVzY2VuZGFudHNBc0RpcnR5KGNvbnRyb2wsIG9wdGlvbnMpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9XG4gIH1cbn1cbiJdfQ==

@@ -25,2 +25,2 @@ /**

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AbmduZWF0L2Zvcm1zLW1hbmFnZXIvIiwic291cmNlcyI6WyJsaWIvdHlwZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBU0EsNkJBRUM7Ozs7QUFJRCxrQ0FLQzs7O0lBSkMsb0NBQXVCOztJQUN2QixvQ0FBc0I7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G51bWJlcjtcbiAgYXJyQ29udHJvbEZhY3Rvcnk/OiBDb250cm9sRmFjdG9yeSB8IEhhc2hNYXA8Q29udHJvbEZhY3Rvcnk+O1xuICB3aXRoSW5pdGlhbFZhbHVlPzogYm9vbGVhbjtcbn1cbiJdfQ==

@@ -151,2 +151,3 @@ /**

pending: control.pending,
untouched: control.untouched,
};

@@ -167,2 +168,2 @@ if (control instanceof FormGroup || control instanceof FormArray) {

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVpbGRlcnMuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AbmduZWF0L2Zvcm1zLW1hbmFnZXIvIiwic291cmNlcyI6WyJsaWIvYnVpbGRlcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQUEsT0FBTyxFQUFtQixTQUFTLEVBQUUsV0FBVyxFQUFFLFNBQVMsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBRXBGLE9BQU8sRUFBRSxLQUFLLEVBQUUsTUFBTSxTQUFTLENBQUM7Ozs7Ozs7QUFFaEMsTUFBTSxVQUFVLE9BQU8sQ0FBYSxJQUFzQixFQUFFLE9BQXdCOzs7UUFDOUUsS0FBSztJQUVULElBQUksT0FBTyxZQUFZLFdBQVcsRUFBRTtRQUNsQyxLQUFLLEdBQUcsVUFBVSxDQUFDLE9BQU8sQ0FBQyxDQUFDO1FBQzVCLE9BQU8sS0FBSyxDQUFDO0tBQ2Q7SUFFRCxJQUFJLE9BQU8sWUFBWSxTQUFTLElBQUksT0FBTyxZQUFZLFNBQVMsRUFBRTtRQUNoRSxLQUFLLEdBQUcsVUFBVSxDQUFDLE9BQU8sQ0FBQyxDQUFDOztZQUU1QixLQUFrQixJQUFBLEtBQUEsU0FBQSxNQUFNLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxRQUFRLENBQUMsQ0FBQSxnQkFBQSw0QkFBRTtnQkFBNUMsSUFBTSxH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2xvbmUoY29udHJvbC52YWx1ZSksIC8vIENsb25lIG9iamVjdCB0byBwcmV2ZW50IGlzc3VlIHdpdGggdGhpcmQgcGFydHkgdGhhdCB3b3VsZCBiZSBhZmZlY3RlZCBieSBzdG9yZSBmcmVlemluZy5cbiAgICByYXdWYWx1ZTogKGNvbnRyb2wgYXMgYW55KS5nZXRSYXdWYWx1ZSA/IChjb250cm9sIGFzIGFueSkuZ2V0UmF3VmFsdWUoKSA6IG51bGwsXG4gICAgdmFsaWQ6IGNvbnRyb2wudmFsaWQsXG4gICAgZGlydHk6IGNvbnRyb2wuZGlydHksXG4gICAgaW52YWxpZDogY29udHJvbC5pbnZhbGlkLFxuICAgIGRpc2FibGVkOiBjb250cm9sLmRpc2FibGVkLFxuICAgIGVycm9yczogY29udHJvbC5lcnJvcnMsXG4gICAgdG91Y2hlZDogY29udHJvbC50b3VjaGVkLFxuICAgIHByaXN0aW5lOiBjb250cm9sLnByaXN0aW5lLFxuICAgIHBlbmRpbmc6IGNvbnRyb2wucGVuZGluZyxcbiAgfTtcblxuICBpZiAoY29udHJvbCBpbnN0YW5jZW9mIEZvcm1Hcm91cCB8fCBjb250cm9sIGluc3RhbmNlb2YgRm9ybUFycmF5KSB7XG4gICAgdmFsdWVbJ2NvbnRyb2xzJ10gPSBjb250cm9sIGluc3RhbmNlb2YgRm9ybUFycmF5ID8gW10gOiB7fTtcbiAgfVxuXG4gIHJldHVybiB2YWx1ZTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGNsZWFyRm9ybUFycmF5KGNvbnRyb2w6IEZvcm1BcnJheSkge1xuICB3aGlsZSAoY29udHJvbC5sZW5ndGggIT09IDApIHtcbiAgICBjb250cm9sLnJlbW92ZUF0KDApO1xuICB9XG59XG4iXX0=
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVpbGRlcnMuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AbmduZWF0L2Zvcm1zLW1hbmFnZX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SW5pdGlhbFZhbHVlPzogYm9vbGVhbjtcbn1cbiJdfQ==

@@ -476,2 +476,3 @@ import { InjectionToken, Injectable, Optional, Inject, ɵɵdefineInjectable, ɵɵinject } from '@angular/core';

pending: control.pending,
untouched: control.untouched,
};

@@ -787,2 +788,129 @@ if (control instanceof FormGroup || control instanceof FormArray) {

*
* A proxy to the original `markAllAsTouched` method
*
* manager.markAllAsTouched('login');
*
* @param {?} name
* @return {?}
*/
markAllAsTouched(name) {
if (this.instances$$.has(name)) {
this.instances$$.get(name).markAllAsTouched();
this.updateStore(name, this.instances$$.get(name));
}
}
/**
*
* \@example
*
* A proxy to the original `markAsTouched` method
*
* manager.markAsTouched('login');
*
* @param {?} name
* @param {?=} options
* @return {?}
*/
markAsTouched(name, options) {
if (this.instances$$.has(name)) {
this.instances$$.get(name).markAsTouched(options);
this.updateStore(name, this.instances$$.get(name));
}
}
/**
*
* \@example
*
* Marks the control and all its descendant controls as dirty.
*
* manager.markAllAsDirty('login');
*
* @param {?} name
* @param {?=} options
* @return {?}
*/
markAllAsDirty(name, options) {
if (this.instances$$.has(name)) {
/** @type {?} */
let control = this.instances$$.get(name);
this.markDescendantsAsDirty(control, options);
this.updateStore(name, control);
}
}
/**
*
* \@example
*
* A proxy to the original `markAsDirty` method
*
* manager.markAsDirty('login');
*
* @param {?} name
* @param {?=} options
* @return {?}
*/
markAsDirty(name, options) {
if (this.instances$$.has(name)) {
this.instances$$.get(name).markAsDirty(options);
this.updateStore(name, this.instances$$.get(name));
}
}
/**
*
* \@example
*
* A proxy to the original `markAsPending` method
*
* manager.markAsPending('login');
*
* @param {?} name
* @param {?=} options
* @return {?}
*/
markAsPending(name, options) {
if (this.instances$$.has(name)) {
this.instances$$.get(name).markAsPending(options);
this.updateStore(name, this.instances$$.get(name));
}
}
/**
*
* \@example
*
* A proxy to the original `markAsPristine` method
*
* manager.markAsPristine('login');
*
* @param {?} name
* @param {?=} options
* @return {?}
*/
markAsPristine(name, options) {
if (this.instances$$.has(name)) {
this.instances$$.get(name).markAsPristine(options);
this.updateStore(name, this.instances$$.get(name));
}
}
/**
*
* \@example
*
* A proxy to the original `markAsUntouched` method
*
* manager.markAsUntouched('login');
*
* @param {?} name
* @param {?=} options
* @return {?}
*/
markAsUntouched(name, options) {
if (this.instances$$.has(name)) {
this.instances$$.get(name).markAsUntouched(options);
this.updateStore(name, this.instances$$.get(name));
}
}
/**
*
* \@example
*
* manager.unsubscribe('login');

@@ -1023,2 +1151,29 @@ *

}
/**
* @private
* @param {?} control
* @param {?=} options
* @return {?}
*/
markDescendantsAsDirty(control, options) {
control.markAsDirty(options);
if (control instanceof FormGroup || control instanceof FormArray) {
/** @type {?} */
let controls = Object.keys(control.controls).map((/**
* @param {?} controlName
* @return {?}
*/
controlName => control.controls[controlName]));
controls.forEach((/**
* @param {?} control
* @return {?}
*/
control => {
control.markAsDirty(options);
if (((/** @type {?} */ (control))).controls) {
this.markDescendantsAsDirty(control, options);
}
}));
}
}
}

@@ -1025,0 +1180,0 @@ NgFormsManager.decorators = [

@@ -530,2 +530,3 @@ import { __assign, __spread, __values, __read } from 'tslib';

pending: control.pending,
untouched: control.untouched,
};

@@ -1095,2 +1096,275 @@ if (control instanceof FormGroup || control instanceof FormArray) {

*
* A proxy to the original `markAllAsTouched` method
*
* manager.markAllAsTouched('login');
*
*/
/**
*
* \@example
*
* A proxy to the original `markAllAsTouched` method
*
* manager.markAllAsTouched('login');
*
* @param {?} name
* @return {?}
*/
NgFormsManager.prototype.markAllAsTouched = /**
*
* \@example
*
* A proxy to the original `markAllAsTouched` method
*
* manager.markAllAsTouched('login');
*
* @param {?} name
* @return {?}
*/
function (name) {
if (this.instances$$.has(name)) {
this.instances$$.get(name).markAllAsTouched();
this.updateStore(name, this.instances$$.get(name));
}
};
/**
*
* @example
*
* A proxy to the original `markAsTouched` method
*
* manager.markAsTouched('login');
*
*/
/**
*
* \@example
*
* A proxy to the original `markAsTouched` method
*
* manager.markAsTouched('login');
*
* @param {?} name
* @param {?=} options
* @return {?}
*/
NgFormsManager.prototype.markAsTouched = /**
*
* \@example
*
* A proxy to the original `markAsTouched` method
*
* manager.markAsTouched('login');
*
* @param {?} name
* @param {?=} options
* @return {?}
*/
function (name, options) {
if (this.instances$$.has(name)) {
this.instances$$.get(name).markAsTouched(options);
this.updateStore(name, this.instances$$.get(name));
}
};
/**
*
* @example
*
* Marks the control and all its descendant controls as dirty.
*
* manager.markAllAsDirty('login');
*
*/
/**
*
* \@example
*
* Marks the control and all its descendant controls as dirty.
*
* manager.markAllAsDirty('login');
*
* @param {?} name
* @param {?=} options
* @return {?}
*/
NgFormsManager.prototype.markAllAsDirty = /**
*
* \@example
*
* Marks the control and all its descendant controls as dirty.
*
* manager.markAllAsDirty('login');
*
* @param {?} name
* @param {?=} options
* @return {?}
*/
function (name, options) {
if (this.instances$$.has(name)) {
/** @type {?} */
var control = this.instances$$.get(name);
this.markDescendantsAsDirty(control, options);
this.updateStore(name, control);
}
};
/**
*
* @example
*
* A proxy to the original `markAsDirty` method
*
* manager.markAsDirty('login');
*
*/
/**
*
* \@example
*
* A proxy to the original `markAsDirty` method
*
* manager.markAsDirty('login');
*
* @param {?} name
* @param {?=} options
* @return {?}
*/
NgFormsManager.prototype.markAsDirty = /**
*
* \@example
*
* A proxy to the original `markAsDirty` method
*
* manager.markAsDirty('login');
*
* @param {?} name
* @param {?=} options
* @return {?}
*/
function (name, options) {
if (this.instances$$.has(name)) {
this.instances$$.get(name).markAsDirty(options);
this.updateStore(name, this.instances$$.get(name));
}
};
/**
*
* @example
*
* A proxy to the original `markAsPending` method
*
* manager.markAsPending('login');
*
*/
/**
*
* \@example
*
* A proxy to the original `markAsPending` method
*
* manager.markAsPending('login');
*
* @param {?} name
* @param {?=} options
* @return {?}
*/
NgFormsManager.prototype.markAsPending = /**
*
* \@example
*
* A proxy to the original `markAsPending` method
*
* manager.markAsPending('login');
*
* @param {?} name
* @param {?=} options
* @return {?}
*/
function (name, options) {
if (this.instances$$.has(name)) {
this.instances$$.get(name).markAsPending(options);
this.updateStore(name, this.instances$$.get(name));
}
};
/**
*
* @example
*
* A proxy to the original `markAsPristine` method
*
* manager.markAsPristine('login');
*
*/
/**
*
* \@example
*
* A proxy to the original `markAsPristine` method
*
* manager.markAsPristine('login');
*
* @param {?} name
* @param {?=} options
* @return {?}
*/
NgFormsManager.prototype.markAsPristine = /**
*
* \@example
*
* A proxy to the original `markAsPristine` method
*
* manager.markAsPristine('login');
*
* @param {?} name
* @param {?=} options
* @return {?}
*/
function (name, options) {
if (this.instances$$.has(name)) {
this.instances$$.get(name).markAsPristine(options);
this.updateStore(name, this.instances$$.get(name));
}
};
/**
*
* @example
*
* A proxy to the original `markAsUntouched` method
*
* manager.markAsUntouched('login');
*
*/
/**
*
* \@example
*
* A proxy to the original `markAsUntouched` method
*
* manager.markAsUntouched('login');
*
* @param {?} name
* @param {?=} options
* @return {?}
*/
NgFormsManager.prototype.markAsUntouched = /**
*
* \@example
*
* A proxy to the original `markAsUntouched` method
*
* manager.markAsUntouched('login');
*
* @param {?} name
* @param {?=} options
* @return {?}
*/
function (name, options) {
if (this.instances$$.has(name)) {
this.instances$$.get(name).markAsUntouched(options);
this.updateStore(name, this.instances$$.get(name));
}
};
/**
*
* @example
*
* manager.unsubscribe('login');

@@ -1480,2 +1754,36 @@ *

};
/**
* @private
* @param {?} control
* @param {?=} options
* @return {?}
*/
NgFormsManager.prototype.markDescendantsAsDirty = /**
* @private
* @param {?} control
* @param {?=} options
* @return {?}
*/
function (control, options) {
var _this = this;
control.markAsDirty(options);
if (control instanceof FormGroup || control instanceof FormArray) {
/** @type {?} */
var controls = Object.keys(control.controls).map((/**
* @param {?} controlName
* @return {?}
*/
function (controlName) { return control.controls[controlName]; }));
controls.forEach((/**
* @param {?} control
* @return {?}
*/
function (control) {
control.markAsDirty(options);
if (((/** @type {?} */ (control))).controls) {
_this.markDescendantsAsDirty(control, options);
}
}));
}
};
NgFormsManager.decorators = [

@@ -1482,0 +1790,0 @@ { type: Injectable, args: [{ providedIn: 'root' },] }

@@ -184,2 +184,90 @@ import { AbstractControl } from '@angular/forms';

*
* A proxy to the original `markAllAsTouched` method
*
* manager.markAllAsTouched('login');
*
*/
markAllAsTouched(name: keyof FormsState): void;
/**
*
* @example
*
* A proxy to the original `markAsTouched` method
*
* manager.markAsTouched('login');
*
*/
markAsTouched(name: keyof FormsState, options?: {
onlySelf?: boolean;
emitEvent?: boolean;
}): void;
/**
*
* @example
*
* Marks the control and all its descendant controls as dirty.
*
* manager.markAllAsDirty('login');
*
*/
markAllAsDirty(name: keyof FormsState, options?: {
onlySelf?: boolean;
emitEvent?: boolean;
}): void;
/**
*
* @example
*
* A proxy to the original `markAsDirty` method
*
* manager.markAsDirty('login');
*
*/
markAsDirty(name: keyof FormsState, options?: {
onlySelf?: boolean;
emitEvent?: boolean;
}): void;
/**
*
* @example
*
* A proxy to the original `markAsPending` method
*
* manager.markAsPending('login');
*
*/
markAsPending(name: keyof FormsState, options?: {
onlySelf?: boolean;
emitEvent?: boolean;
}): void;
/**
*
* @example
*
* A proxy to the original `markAsPristine` method
*
* manager.markAsPristine('login');
*
*/
markAsPristine(name: keyof FormsState, options?: {
onlySelf?: boolean;
emitEvent?: boolean;
}): void;
/**
*
* @example
*
* A proxy to the original `markAsUntouched` method
*
* manager.markAsUntouched('login');
*
*/
markAsUntouched(name: keyof FormsState, options?: {
onlySelf?: boolean;
emitEvent?: boolean;
}): void;
/**
*
* @example
*
* manager.unsubscribe('login');

@@ -231,2 +319,3 @@ *

private removeInitialValue;
private markDescendantsAsDirty;
}
import { AbstractControl } from '@angular/forms';
export declare type Control<T = any> = Pick<AbstractControl, 'valid' | 'invalid' | 'disabled' | 'errors' | 'touched' | 'pristine' | 'pending' | 'dirty'> & {
export declare type Control<T = any> = Pick<AbstractControl, 'valid' | 'invalid' | 'disabled' | 'errors' | 'touched' | 'pristine' | 'pending' | 'dirty' | 'untouched'> & {
rawValue: T;

@@ -4,0 +4,0 @@ value: T;

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

{"__symbolic":"module","version":4,"metadata":{"NgFormsManager":{"__symbolic":"class","arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":13,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":21,"character":15}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":21,"character":27},"arguments":[{"__symbolic":"reference","name":"NG_FORMS_MANAGER_CONFIG"}]}]],"parameters":[{"__symbolic":"reference","name":"NgFormsManagerConfig"}]}],"validityChanges":[{"__symbolic":"method"}],"isValid":[{"__symbolic":"method"}],"dirtyChanges":[{"__symbolic":"method"}],"disableChanges":[{"__symbolic":"method"}],"valueChanges":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"errorsChanges":[{"__symbolic":"method"}],"controlChanges":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"initialValueChanged":[{"__symbolic":"method"}],"controlDestroyed":[{"__symbolic":"method"}],"getControl":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"getInitialValue":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"hasControl":[{"__symbolic":"method"}],"patchValue":[{"__symbolic":"method"}],"setValue":[{"__symbolic":"method"}],"setInitialValue":[{"__symbolic":"method"}],"unsubscribe":[{"__symbolic":"method"}],"clear":[{"__symbolic":"method"}],"destroy":[{"__symbolic":"method"}],"upsert":[{"__symbolic":"method"}],"getValueChangeStreams":[{"__symbolic":"method"}],"removeFromStorage":[{"__symbolic":"method"}],"updateStorage":[{"__symbolic":"method"}],"getFromStorage":[{"__symbolic":"method"}],"deleteControl":[{"__symbolic":"method"}],"toControlValue":[{"__symbolic":"method"}],"updateStore":[{"__symbolic":"method"}],"removeInitialValue":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"setAsyncValidators":{"__symbolic":"function"},"setValidators":{"__symbolic":"function"},"NgFormsManagerConfig":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":34,"character":30,"context":{"typeName":"Partial"},"module":"./lib/config"}]}],"merge":[{"__symbolic":"method"}]}},"NG_FORMS_MANAGER_CONFIG":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":41,"character":43},"arguments":["NG_FORMS_MANAGER_CONFIG",{"__symbolic":"error","message":"Lambda not supported","line":45,"character":13,"module":"./lib/config"}]}},"origins":{"NgFormsManager":"./lib/forms-manager","setAsyncValidators":"./lib/validators","setValidators":"./lib/validators","NgFormsManagerConfig":"./lib/config","NG_FORMS_MANAGER_CONFIG":"./lib/config"},"importAs":"@ngneat/forms-manager"}
{"__symbolic":"module","version":4,"metadata":{"NgFormsManager":{"__symbolic":"class","arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":13,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":21,"character":15}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":21,"character":27},"arguments":[{"__symbolic":"reference","name":"NG_FORMS_MANAGER_CONFIG"}]}]],"parameters":[{"__symbolic":"reference","name":"NgFormsManagerConfig"}]}],"validityChanges":[{"__symbolic":"method"}],"isValid":[{"__symbolic":"method"}],"dirtyChanges":[{"__symbolic":"method"}],"disableChanges":[{"__symbolic":"method"}],"valueChanges":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"errorsChanges":[{"__symbolic":"method"}],"controlChanges":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"initialValueChanged":[{"__symbolic":"method"}],"controlDestroyed":[{"__symbolic":"method"}],"getControl":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"getInitialValue":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"hasControl":[{"__symbolic":"method"}],"patchValue":[{"__symbolic":"method"}],"setValue":[{"__symbolic":"method"}],"setInitialValue":[{"__symbolic":"method"}],"markAllAsTouched":[{"__symbolic":"method"}],"markAsTouched":[{"__symbolic":"method"}],"markAllAsDirty":[{"__symbolic":"method"}],"markAsDirty":[{"__symbolic":"method"}],"markAsPending":[{"__symbolic":"method"}],"markAsPristine":[{"__symbolic":"method"}],"markAsUntouched":[{"__symbolic":"method"}],"unsubscribe":[{"__symbolic":"method"}],"clear":[{"__symbolic":"method"}],"destroy":[{"__symbolic":"method"}],"upsert":[{"__symbolic":"method"}],"getValueChangeStreams":[{"__symbolic":"method"}],"removeFromStorage":[{"__symbolic":"method"}],"updateStorage":[{"__symbolic":"method"}],"getFromStorage":[{"__symbolic":"method"}],"deleteControl":[{"__symbolic":"method"}],"toControlValue":[{"__symbolic":"method"}],"updateStore":[{"__symbolic":"method"}],"removeInitialValue":[{"__symbolic":"method"}],"markDescendantsAsDirty":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"setAsyncValidators":{"__symbolic":"function"},"setValidators":{"__symbolic":"function"},"NgFormsManagerConfig":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":34,"character":30,"context":{"typeName":"Partial"},"module":"./lib/config"}]}],"merge":[{"__symbolic":"method"}]}},"NG_FORMS_MANAGER_CONFIG":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":41,"character":43},"arguments":["NG_FORMS_MANAGER_CONFIG",{"__symbolic":"error","message":"Lambda not supported","line":45,"character":13,"module":"./lib/config"}]}},"origins":{"NgFormsManager":"./lib/forms-manager","setAsyncValidators":"./lib/validators","setValidators":"./lib/validators","NgFormsManagerConfig":"./lib/config","NG_FORMS_MANAGER_CONFIG":"./lib/config"},"importAs":"@ngneat/forms-manager"}
{
"name": "@ngneat/forms-manager",
"version": "2.2.0",
"version": "2.3.0",
"description": "Forms Manager library for Angular",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -152,2 +152,3 @@ <br />

pending: boolean,
untouched: boolean,
}

@@ -174,2 +175,44 @@ ```

- `markAllAsTouched()` - A proxy to the original `markAllAsTouched` method
```ts
formsManager.markAllAsTouched('onboarding', options);
```
- `markAsTouched()` - A proxy to the original `markAsTouched` method
```ts
formsManager.markAsTouched('onboarding', options);
```
- `markAllAsDirty()` - Marks the control and all its descendant controls as dirty
```ts
formsManager.markAllAsDirty('onboarding', options);
```
- `markAsDirty()` - A proxy to the original `markAsDirty` method
```ts
formsManager.markAsDirty('onboarding', options);
```
- `markAsPending()` - A proxy to the original `markAsPending` method
```ts
formsManager.markAsPending('onboarding', options);
```
- `markAsPristine()` - A proxy to the original `markAsPristine` method
```ts
formsManager.markAsPristine('onboarding', options);
```
- `markAsUntouched()` - A proxy to the original `markAsUntouched` method
```ts
formsManager.markAsUntouched('onboarding', options);
```
- `unsubscribe()` - Unsubscribe from the form's `valueChanges` observable (always call it on `ngOnDestroy`)

@@ -241,3 +284,3 @@

*/
this.formsManager.selectValue<number>('settings', 'minPrice')
this.formsManager.valueChanges<number>('settings', 'minPrice')
.subscribe(minPrice => setValidators(this.form.get('price'), Validators.min(minPrice));

@@ -402,11 +445,12 @@ }

<tr>
<td align="center"><a href="https://www.netbasal.com"><img src="https://avatars1.githubusercontent.com/u/6745730?v=4" width="100px;" alt=""/><br /><sub><b>Netanel Basal</b></sub></a><br /><a href="https://github.com/ngneat/forms-manager/commits?author=NetanelBasal" title="Code">💻</a> <a href="https://github.com/ngneat/forms-manager/commits?author=NetanelBasal" title="Documentation">📖</a> <a href="#ideas-NetanelBasal" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center"><a href="https://github.com/Coly010"><img src="https://avatars2.githubusercontent.com/u/12140467?v=4" width="100px;" alt=""/><br /><sub><b>Colum Ferry</b></sub></a><br /><a href="https://github.com/ngneat/forms-manager/commits?author=Coly010" title="Code">💻</a> <a href="https://github.com/ngneat/forms-manager/commits?author=Coly010" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/mehmet-erim"><img src="https://avatars0.githubusercontent.com/u/34455572?v=4" width="100px;" alt=""/><br /><sub><b>Mehmet Erim</b></sub></a><br /><a href="https://github.com/ngneat/forms-manager/commits?author=mehmet-erim" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/dspeirs7"><img src="https://avatars2.githubusercontent.com/u/739058?v=4" width="100px;" alt=""/><br /><sub><b>David Speirs</b></sub></a><br /><a href="https://github.com/ngneat/forms-manager/commits?author=dspeirs7" title="Code">💻</a> <a href="https://github.com/ngneat/forms-manager/commits?author=dspeirs7" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/manudss"><img src="https://avatars3.githubusercontent.com/u/1046806?v=4" width="100px;" alt=""/><br /><sub><b>Emmanuel De Saint Steban</b></sub></a><br /><a href="https://github.com/ngneat/forms-manager/commits?author=manudss" title="Code">💻</a> <a href="https://github.com/ngneat/forms-manager/commits?author=manudss" title="Documentation">📖</a></td>
<td align="center"><a href="https://www.netbasal.com"><img src="https://avatars1.githubusercontent.com/u/6745730?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Netanel Basal</b></sub></a><br /><a href="https://github.com/ngneat/forms-manager/commits?author=NetanelBasal" title="Code">💻</a> <a href="https://github.com/ngneat/forms-manager/commits?author=NetanelBasal" title="Documentation">📖</a> <a href="#ideas-NetanelBasal" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center"><a href="https://github.com/Coly010"><img src="https://avatars2.githubusercontent.com/u/12140467?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Colum Ferry</b></sub></a><br /><a href="https://github.com/ngneat/forms-manager/commits?author=Coly010" title="Code">💻</a> <a href="https://github.com/ngneat/forms-manager/commits?author=Coly010" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/mehmet-erim"><img src="https://avatars0.githubusercontent.com/u/34455572?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Mehmet Erim</b></sub></a><br /><a href="https://github.com/ngneat/forms-manager/commits?author=mehmet-erim" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/dspeirs7"><img src="https://avatars2.githubusercontent.com/u/739058?v=4?s=100" width="100px;" alt=""/><br /><sub><b>David Speirs</b></sub></a><br /><a href="https://github.com/ngneat/forms-manager/commits?author=dspeirs7" title="Code">💻</a> <a href="https://github.com/ngneat/forms-manager/commits?author=dspeirs7" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/manudss"><img src="https://avatars3.githubusercontent.com/u/1046806?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Emmanuel De Saint Steban</b></sub></a><br /><a href="https://github.com/ngneat/forms-manager/commits?author=manudss" title="Code">💻</a> <a href="https://github.com/ngneat/forms-manager/commits?author=manudss" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/adrianriepl"><img src="https://avatars2.githubusercontent.com/u/11076678?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Adrian Riepl</b></sub></a><br /><a href="https://github.com/ngneat/forms-manager/commits?author=adrianriepl" title="Code">💻</a> <a href="https://github.com/ngneat/forms-manager/commits?author=adrianriepl" title="Documentation">📖</a></td>
</tr>
</table>
<!-- markdownlint-enable -->
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->

@@ -413,0 +457,0 @@

Sorry, the diff of this file is too big to display

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 too big to display

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