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.1.0 to 2.1.2

913

bundles/ngneat-forms-manager.umd.js
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('rxjs'), require('rxjs/operators'), require('@angular/core'), require('@angular/forms')) :
typeof define === 'function' && define.amd ? define('@ngneat/forms-manager', ['exports', 'rxjs', 'rxjs/operators', '@angular/core', '@angular/forms'], factory) :
(factory((global.ngneat = global.ngneat || {}, global.ngneat['forms-manager'] = {}),global.rxjs,global.rxjs.operators,global.ng.core,global.ng.forms));
}(this, (function (exports,rxjs,operators,i0,forms) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs/operators'), require('rxjs'), require('@angular/forms')) :
typeof define === 'function' && define.amd ? define('@ngneat/forms-manager', ['exports', '@angular/core', 'rxjs/operators', 'rxjs', '@angular/forms'], factory) :
(global = global || self, factory((global.ngneat = global.ngneat || {}, global.ngneat['forms-manager'] = {}), global.ng.core, global.rxjs.operators, global.rxjs, global.ng.forms));
}(this, (function (exports, core, operators, rxjs, forms) { 'use strict';
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
Copyright (c) Microsoft Corporation.
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var __assign = function () {
/* global Reflect, Promise */
var extendStatics = function(d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
function __extends(d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
var __assign = function() {
__assign = Object.assign || function __assign(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s)
if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}

@@ -33,38 +46,106 @@ return t;

};
function __rest(s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
}
function __decorate(decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
}
function __param(paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
}
function __metadata(metadataKey, metadataValue) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
}
function __awaiter(thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
}
function __generator(thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
}
function __createBinding(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}
function __exportStar(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p];
}
function __values(o) {
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
if (m)
return m.call(o);
return {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length)
o = void 0;
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
function __read(o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m)
return o;
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
ar.push(r.value);
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) {
e = { error: error };
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"]))
m.call(i);
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally {
if (e)
throw e.error;
}
finally { if (e) throw e.error; }
}
return ar;
}
function __spread() {

@@ -76,2 +157,72 @@ for (var ar = [], i = 0; i < arguments.length; i++)

function __spreadArrays() {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
};
function __await(v) {
return this instanceof __await ? (this.v = v, this) : new __await(v);
}
function __asyncGenerator(thisArg, _arguments, generator) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var g = generator.apply(thisArg, _arguments || []), i, q = [];
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
function fulfill(value) { resume("next", value); }
function reject(value) { resume("throw", value); }
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
}
function __asyncDelegator(o) {
var i, p;
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
}
function __asyncValues(o) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var m = o[Symbol.asyncIterator], i;
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
}
function __makeTemplateObject(cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
return cooked;
};
function __importStar(mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result.default = mod;
return result;
}
function __importDefault(mod) {
return (mod && mod.__esModule) ? mod : { default: mod };
}
function __classPrivateFieldGet(receiver, privateMap) {
if (!privateMap.has(receiver)) {
throw new TypeError("attempted to get private field on non-instance");
}
return privateMap.get(receiver);
}
function __classPrivateFieldSet(receiver, privateMap, value) {
if (!privateMap.has(receiver)) {
throw new TypeError("attempted to set private field on non-instance");
}
privateMap.set(receiver, value);
return value;
}
/**

@@ -83,11 +234,13 @@ * @fileoverview added by tsickle

/** @type {?} */
var filterNil = ( /**
var filterNil = (/**
* @template T
* @param {?} source
* @return {?}
*/function (source) {
return source.pipe(operators.filter(( /**
*/
function (source) {
return source.pipe(operators.filter((/**
* @param {?} value
* @return {?}
*/function (value) { return value !== null && typeof value !== 'undefined'; })));
*/
function (value) { return value !== null && typeof value !== 'undefined'; })));
});

@@ -120,2 +273,9 @@ /**

/**
* @param {?} value
* @return {?}
*/
function isValidDate(value) {
return value && Object.prototype.toString.call(value) === '[object Date]' && !isNaN(value);
}
/**
* @param {?} val

@@ -125,3 +285,3 @@ * @return {?}

function isObject(val) {
if (val == null || Array.isArray(val)) {
if (val == null || Array.isArray(val) || isValidDate(val)) {
return false;

@@ -147,6 +307,7 @@ }

function filterControlKeys(value) {
return filterKeys(value, ( /**
return filterKeys(value, (/**
* @param {?} key
* @return {?}
*/function (key) { return removeKeys.includes(key); }));
*/
function (key) { return removeKeys.includes(key); }));
}

@@ -159,3 +320,3 @@ /**

function filtrArrayKeys(arr, cb) {
return arr.reduce(( /**
return arr.reduce((/**
* @param {?} acc

@@ -165,3 +326,4 @@ * @param {?} control

* @return {?}
*/function (acc, control, index) {
*/
function (acc, control, index) {
acc[index] = filterKeys(control, cb);

@@ -198,14 +360,8 @@ return acc;

}
catch (e_1_1) {
e_1 = { error: e_1_1 };
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return))
_a.call(_b);
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally {
if (e_1)
throw e_1.error;
}
finally { if (e_1) throw e_1.error; }
}

@@ -226,2 +382,3 @@ return filtered;

function mergeDeep(target) {
var _a, _b;
var sources = [];

@@ -231,3 +388,2 @@ for (var _i = 1; _i < arguments.length; _i++) {

}
var _a, _b;
if (!sources.length) {

@@ -264,3 +420,4 @@ return target;

* @template S
*/ FormsStore = /** @class */ (function () {
*/
FormsStore = /** @class */ (function () {
function FormsStore(state) {

@@ -280,5 +437,5 @@ this.state = state;

*/
function (project) {
return this.store.asObservable().pipe(operators.map(project), operators.distinctUntilChanged());
};
function (project) {
return this.store.asObservable().pipe(operators.map(project), operators.distinctUntilChanged());
};
/**

@@ -290,5 +447,5 @@ * @return {?}

*/
function () {
return this.store.getValue();
};
function () {
return this.store.getValue();
};
/**

@@ -302,5 +459,5 @@ * @param {?} state

*/
function (state) {
this.store.next(state);
};
function (state) {
this.store.next(state);
};
/**

@@ -314,7 +471,19 @@ * @param {?} state

*/
function (state) {
this.store.next(Object.assign({}, this.getValue(), state));
};
function (state) {
this.store.next(Object.assign({}, this.getValue(), state));
};
return FormsStore;
}());
if (false) {
/**
* @type {?}
* @private
*/
FormsStore.prototype.store;
/**
* @type {?}
* @private
*/
FormsStore.prototype.state;
}

@@ -340,12 +509,8 @@ /**

function mergeConfig(defaults, providerConfig, inlineConfig) {
if (providerConfig === void 0) {
providerConfig = {};
}
return ( /** @type {?} */(__assign({}, defaults, { storage: __assign({}, defaults.storage, providerConfig.storage, inlineConfig.storage) }, providerConfig, inlineConfig)));
if (providerConfig === void 0) { providerConfig = {}; }
return (/** @type {?} */ (__assign(__assign(__assign(__assign({}, defaults), { storage: __assign(__assign(__assign({}, defaults.storage), providerConfig.storage), inlineConfig.storage) }), providerConfig), inlineConfig)));
}
var NgFormsManagerConfig = /** @class */ (function () {
function NgFormsManagerConfig(config) {
if (config === void 0) {
config = {};
}
if (config === void 0) { config = {}; }
this.config = config;

@@ -361,16 +526,22 @@ }

*/
function (inline) {
if (inline === void 0) {
inline = {};
}
return mergeConfig(defaults, this.config, inline);
};
function (inline) {
if (inline === void 0) { inline = {}; }
return mergeConfig(defaults, this.config, inline);
};
return NgFormsManagerConfig;
}());
if (false) {
/**
* @type {?}
* @private
*/
NgFormsManagerConfig.prototype.config;
}
/** @type {?} */
var NG_FORMS_MANAGER_CONFIG = new i0.InjectionToken('NG_FORMS_MANAGER_CONFIG', {
var NG_FORMS_MANAGER_CONFIG = new core.InjectionToken('NG_FORMS_MANAGER_CONFIG', {
providedIn: 'root',
factory: ( /**
factory: (/**
* @return {?}
*/function () {
*/
function () {
return new NgFormsManagerConfig();

@@ -483,14 +654,8 @@ }),

}
catch (e_1_1) {
e_1 = { error: e_1_1 };
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return))
_a.call(_b);
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally {
if (e_1)
throw e_1.error;
}
finally { if (e_1) throw e_1.error; }
}

@@ -508,19 +673,21 @@ }

if (control instanceof forms.FormArray) {
clearFormArray(( /** @type {?} */(control)));
clearFormArray((/** @type {?} */ (control)));
if (!arrControlFactory) {
throw new Error('Please provide arrControlFactory');
}
formValue.forEach(( /**
formValue.forEach((/**
* @param {?} v
* @param {?} i
* @return {?}
*/function (v, i) {
return (( /** @type {?} */(control))).insert(i, (( /** @type {?} */(arrControlFactory)))(v));
*/
function (v, i) {
return ((/** @type {?} */ (control))).insert(i, ((/** @type {?} */ (arrControlFactory)))(v));
}));
}
else {
Object.keys(formValue).forEach(( /**
Object.keys(formValue).forEach((/**
* @param {?} controlName
* @return {?}
*/function (controlName) {
*/
function (controlName) {
/** @type {?} */

@@ -533,11 +700,12 @@ var value = formValue[controlName];

/** @type {?} */
var current_1 = ( /** @type {?} */(control.get(controlName)));
var current_1 = (/** @type {?} */ (control.get(controlName)));
/** @type {?} */
var fc_1 = arrControlFactory[controlName];
clearFormArray(current_1);
value.forEach(( /**
value.forEach((/**
* @param {?} v
* @param {?} i
* @return {?}
*/function (v, i) { return current_1.insert(i, fc_1(v)); }));
*/
function (v, i) { return current_1.insert(i, fc_1(v)); }));
}

@@ -553,7 +721,8 @@ }));

function deleteControl(snapshot, controls) {
return Object.keys(snapshot).reduce(( /**
return Object.keys(snapshot).reduce((/**
* @param {?} acc
* @param {?} currentFormName
* @return {?}
*/function (acc, currentFormName) {
*/
function (acc, currentFormName) {
if (controls.includes(currentFormName) === false) {

@@ -575,7 +744,8 @@ acc[currentFormName] = snapshot[currentFormName];

}
return rest.reduce(( /**
return rest.reduce((/**
* @param {?} current
* @param {?} name
* @return {?}
*/function (current, name) {
*/
function (current, name) {
return current.controls.hasOwnProperty(name) ? current.controls[name] : null;

@@ -593,3 +763,3 @@ }), control.controls[first]);

// Clone object to prevent issue with third party that would be affected by store freezing.
rawValue: (( /** @type {?} */(control))).getRawValue ? (( /** @type {?} */(control))).getRawValue() : null,
rawValue: ((/** @type {?} */ (control))).getRawValue ? ((/** @type {?} */ (control))).getRawValue() : null,
valid: control.valid,

@@ -634,3 +804,3 @@ dirty: control.dirty,

this.destroy$$ = new rxjs.Subject();
this.store = new FormsStore(( /** @type {?} */({})));
this.store = new FormsStore((/** @type {?} */ ({})));
}

@@ -670,8 +840,9 @@ /**

*/
function (name, path) {
return this.controlChanges(name, path).pipe(operators.map(( /**
* @param {?} control
* @return {?}
*/function (control) { return control.valid; })));
};
function (name, path) {
return this.controlChanges(name, path).pipe(operators.map((/**
* @param {?} control
* @return {?}
*/
function (control) { return control.valid; })));
};
/**

@@ -708,5 +879,5 @@ *

*/
function (name) {
return this.hasControl(name) && this.getControl(name).valid;
};
function (name) {
return this.hasControl(name) && this.getControl(name).valid;
};
/**

@@ -745,8 +916,9 @@ *

*/
function (name, path) {
return this.controlChanges(name, path).pipe(operators.map(( /**
* @param {?} control
* @return {?}
*/function (control) { return control.dirty; })));
};
function (name, path) {
return this.controlChanges(name, path).pipe(operators.map((/**
* @param {?} control
* @return {?}
*/
function (control) { return control.dirty; })));
};
/**

@@ -785,8 +957,9 @@ *

*/
function (name, path) {
return this.controlChanges(name, path).pipe(operators.map(( /**
* @param {?} control
* @return {?}
*/function (control) { return control.disabled; })));
};
function (name, path) {
return this.controlChanges(name, path).pipe(operators.map((/**
* @param {?} control
* @return {?}
*/
function (control) { return control.disabled; })));
};
/**

@@ -802,8 +975,9 @@ * @param {?} name

*/
function (name, path) {
return this.controlChanges(name, path).pipe(operators.map(( /**
* @param {?} control
* @return {?}
*/function (control) { return control.value; })));
};
function (name, path) {
return this.controlChanges(name, path).pipe(operators.map((/**
* @param {?} control
* @return {?}
*/
function (control) { return control.value; })));
};
/**

@@ -847,8 +1021,9 @@ *

*/
function (name, path) {
return this.controlChanges(name, path).pipe(operators.map(( /**
* @param {?} control
* @return {?}
*/function (control) { return ( /** @type {?} */(control.errors)); })));
};
function (name, path) {
return this.controlChanges(name, path).pipe(operators.map((/**
* @param {?} control
* @return {?}
*/
function (control) { return (/** @type {?} */ (control.errors)); })));
};
/**

@@ -864,24 +1039,28 @@ * @param {?} name

*/
function (name, path) {
/** @type {?} */
var control$ = this.store.select(( /**
* @param {?} state
* @return {?}
*/function (state) { return state[( /** @type {?} */(name))]; })).pipe(filterNil);
if (!path) {
return control$.pipe(operators.distinctUntilChanged(( /**
* @param {?} a
* @param {?} b
* @return {?}
*/function (a, b) { return isEqual(a, b); })));
}
return control$.pipe(operators.map(( /**
* @param {?} control
* @return {?}
*/function (control) { return findControl(control, path); })), operators.distinctUntilChanged(( /**
function (name, path) {
/** @type {?} */
var control$ = this.store.select((/**
* @param {?} state
* @return {?}
*/
function (state) { return state[(/** @type {?} */ (name))]; })).pipe(filterNil);
if (!path) {
return control$.pipe(operators.distinctUntilChanged((/**
* @param {?} a
* @param {?} b
* @return {?}
*/function (a, b) { return isEqual(a, b); })));
};
*/
function (a, b) { return isEqual(a, b); })));
}
return control$.pipe(operators.map((/**
* @param {?} control
* @return {?}
*/
function (control) { return findControl(control, path); })), operators.distinctUntilChanged((/**
* @param {?} a
* @param {?} b
* @return {?}
*/
function (a, b) { return isEqual(a, b); })));
};
/**

@@ -918,12 +1097,13 @@ *

*/
function (name) {
var _this = this;
if (this.initialValues$$.has(name) === false) {
console.error("You should set the withInitialValue option to the " + name + " control");
}
return this.valueChanges(name).pipe(operators.map(( /**
* @param {?} current
* @return {?}
*/function (current) { return isEqual(current, _this.initialValues$$.get(name)) === false; })));
};
function (name) {
var _this = this;
if (this.initialValues$$.has(name) === false) {
console.error("You should set the withInitialValue option to the " + name + " control");
}
return this.valueChanges(name).pipe(operators.map((/**
* @param {?} current
* @return {?}
*/
function (current) { return isEqual(current, _this.initialValues$$.get(name)) === false; })));
};
/**

@@ -960,10 +1140,11 @@ *

*/
function (name) {
return this.destroy$$
.asObservable()
.pipe(operators.filter(( /**
function (name) {
return this.destroy$$
.asObservable()
.pipe(operators.filter((/**
* @param {?} controlName
* @return {?}
*/function (controlName) { return name === controlName || controlName === '$$ALL'; })));
};
*/
function (controlName) { return name === controlName || controlName === '$$ALL'; })));
};
/**

@@ -979,13 +1160,13 @@ * @param {?} name

*/
function (name, path) {
if (!path) {
return ( /** @type {?} */(this.store.getValue()[name]));
}
if (this.hasControl(name)) {
/** @type {?} */
var control = this.getControl(name);
return findControl(control, path);
}
return null;
};
function (name, path) {
if (!path) {
return (/** @type {?} */ (this.store.getValue()[name]));
}
if (this.hasControl(name)) {
/** @type {?} */
var control = this.getControl(name);
return findControl(control, path);
}
return null;
};
/**

@@ -1027,5 +1208,5 @@ *

*/
function (name, path) {
return !!this.getControl(name, path);
};
function (name, path) {
return !!this.getControl(name, path);
};
/**

@@ -1068,7 +1249,7 @@ *

*/
function (name, value, options) {
if (this.instances$$.has(name)) {
this.instances$$.get(name).patchValue(value, options);
}
};
function (name, value, options) {
if (this.instances$$.has(name)) {
this.instances$$.get(name).patchValue(value, options);
}
};
/**

@@ -1111,7 +1292,7 @@ *

*/
function (name, value, options) {
if (this.instances$$.has(name)) {
this.instances$$.get(name).setValue(value, options);
}
};
function (name, value, options) {
if (this.instances$$.has(name)) {
this.instances$$.get(name).setValue(value, options);
}
};
/**

@@ -1150,5 +1331,5 @@ *

*/
function (name, value) {
this.initialValues$$.set(name, value);
};
function (name, value) {
this.initialValues$$.set(name, value);
};
/**

@@ -1179,45 +1360,40 @@ *

*/
function (name) {
var _this = this;
var e_1, _a;
if (name) {
/** @type {?} */
var names = coerceArray(name);
try {
for (var names_1 = __values(names), names_1_1 = names_1.next(); !names_1_1.done; names_1_1 = names_1.next()) {
var name_1 = names_1_1.value;
if (this.valueChanges$$.has(name_1)) {
this.valueChanges$$.get(name_1).unsubscribe();
}
this.valueChanges$$.delete(name_1);
this.instances$$.delete(name_1);
this.destroy$$.next(name_1);
function (name) {
var e_1, _a;
var _this = this;
if (name) {
/** @type {?} */
var names = coerceArray(name);
try {
for (var names_1 = __values(names), names_1_1 = names_1.next(); !names_1_1.done; names_1_1 = names_1.next()) {
var name_1 = names_1_1.value;
if (this.valueChanges$$.has(name_1)) {
this.valueChanges$$.get(name_1).unsubscribe();
}
this.valueChanges$$.delete(name_1);
this.instances$$.delete(name_1);
this.destroy$$.next(name_1);
}
catch (e_1_1) {
e_1 = { error: e_1_1 };
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (names_1_1 && !names_1_1.done && (_a = names_1.return)) _a.call(names_1);
}
finally {
try {
if (names_1_1 && !names_1_1.done && (_a = names_1.return))
_a.call(names_1);
}
finally {
if (e_1)
throw e_1.error;
}
}
finally { if (e_1) throw e_1.error; }
}
else {
this.valueChanges$$.forEach(( /**
* @param {?} subscription
* @return {?}
*/function (subscription) {
subscription.unsubscribe();
_this.destroy$$.next('$$ALL');
}));
this.valueChanges$$.clear();
this.instances$$.clear();
}
};
}
else {
this.valueChanges$$.forEach((/**
* @param {?} subscription
* @return {?}
*/
function (subscription) {
subscription.unsubscribe();
_this.destroy$$.next('$$ALL');
}));
this.valueChanges$$.clear();
this.instances$$.clear();
}
};
/**

@@ -1254,7 +1430,7 @@ *

*/
function (name) {
name ? this.deleteControl(name) : this.store.set(( /** @type {?} */({})));
this.removeFromStorage();
this.removeInitialValue(name);
};
function (name) {
name ? this.deleteControl(name) : this.store.set((/** @type {?} */ ({})));
this.removeFromStorage();
this.removeInitialValue(name);
};
/**

@@ -1291,6 +1467,6 @@ *

*/
function (name) {
this.unsubscribe(name);
this.clear(name);
};
function (name) {
this.unsubscribe(name);
this.clear(name);
};
/**

@@ -1347,47 +1523,46 @@ *

*/
function (name, control, config) {
var _this = this;
if (config === void 0) {
config = {};
}
var _a;
function (name, control, config) {
var _a;
var _this = this;
if (config === void 0) { config = {}; }
/** @type {?} */
var mergedConfig = (/** @type {?} */ (this)).config.merge(config);
if (mergedConfig.withInitialValue && (/** @type {?} */ (this)).initialValues$$.has(name) === false) {
(/** @type {?} */ (this)).setInitialValue(name, control.value);
}
if (isBrowser() && config.persistState && (/** @type {?} */ (this)).hasControl(name) === false) {
/** @type {?} */
var mergedConfig = ( /** @type {?} */(this)).config.merge(config);
if (mergedConfig.withInitialValue && ( /** @type {?} */(this)).initialValues$$.has(name) === false) {
( /** @type {?} */(this)).setInitialValue(name, control.value);
var storageValue = (/** @type {?} */ (this)).getFromStorage(mergedConfig.storage.key);
if (storageValue[name]) {
(/** @type {?} */ (this)).store.update((/** @type {?} */ (_a = {},
_a[name] = mergeDeep(toStore(name, control), storageValue[name]),
_a)));
}
if (isBrowser() && config.persistState && ( /** @type {?} */(this)).hasControl(name) === false) {
/** @type {?} */
var storageValue = ( /** @type {?} */(this)).getFromStorage(mergedConfig.storage.key);
if (storageValue[name]) {
( /** @type {?} */(this)).store.update(( /** @type {?} */(_a = {},
_a[name] = mergeDeep(toStore(name, control), storageValue[name]),
_a)));
}
}
/** If the control already exist, patch the control with the store value */
if (( /** @type {?} */(this)).hasControl(name) === true) {
control.patchValue(( /** @type {?} */(this)).toControlValue(name, control, mergedConfig.arrControlFactory), {
emitEvent: false,
});
}
else {
/** @type {?} */
var value = ( /** @type {?} */(this)).updateStore(name, control);
( /** @type {?} */(this)).updateStorage(name, value, mergedConfig);
}
}
/** If the control already exist, patch the control with the store value */
if ((/** @type {?} */ (this)).hasControl(name) === true) {
control.patchValue((/** @type {?} */ (this)).toControlValue(name, control, mergedConfig.arrControlFactory), {
emitEvent: false,
});
}
else {
/** @type {?} */
var unsubscribe = rxjs.merge(control.valueChanges, control.statusChanges.pipe(operators.distinctUntilChanged()))
.pipe(operators.debounceTime(mergedConfig.debounceTime))
.subscribe(( /**
var value = (/** @type {?} */ (this)).updateStore(name, control);
(/** @type {?} */ (this)).updateStorage(name, value, mergedConfig);
}
/** @type {?} */
var unsubscribe = rxjs.merge(control.valueChanges, control.statusChanges.pipe(operators.distinctUntilChanged()))
.pipe(operators.debounceTime(mergedConfig.debounceTime))
.subscribe((/**
* @return {?}
*/function () {
/** @type {?} */
var value = ( /** @type {?} */(_this)).updateStore(name, control);
( /** @type {?} */(_this)).updateStorage(name, value, mergedConfig);
}));
( /** @type {?} */(this)).valueChanges$$.set(name, unsubscribe);
( /** @type {?} */(this)).instances$$.set(name, control);
return ( /** @type {?} */(this));
};
*/
function () {
/** @type {?} */
var value = (/** @type {?} */ (_this)).updateStore(name, control);
(/** @type {?} */ (_this)).updateStorage(name, value, mergedConfig);
}));
(/** @type {?} */ (this)).valueChanges$$.set(name, unsubscribe);
(/** @type {?} */ (this)).instances$$.set(name, control);
return (/** @type {?} */ (this));
};
/**

@@ -1401,5 +1576,5 @@ * @private

*/
function () {
localStorage.setItem(this.config.merge().storage.key, JSON.stringify(this.store.getValue()));
};
function () {
localStorage.setItem(this.config.merge().storage.key, JSON.stringify(this.store.getValue()));
};
/**

@@ -1419,10 +1594,10 @@ * @private

*/
function (name, value, config) {
if (isBrowser() && config.persistState) {
/** @type {?} */
var storageValue = this.getFromStorage(config.storage.key);
storageValue[name] = filterControlKeys(value);
localStorage.setItem(config.storage.key, JSON.stringify(storageValue));
}
};
function (name, value, config) {
if (isBrowser() && config.persistState) {
/** @type {?} */
var storageValue = this.getFromStorage(config.storage.key);
storageValue[name] = filterControlKeys(value);
localStorage.setItem(config.storage.key, JSON.stringify(storageValue));
}
};
/**

@@ -1438,5 +1613,5 @@ * @private

*/
function (key) {
return JSON.parse(localStorage.getItem(key) || '{}');
};
function (key) {
return JSON.parse(localStorage.getItem(key) || '{}');
};
/**

@@ -1452,5 +1627,5 @@ * @private

*/
function (name) {
this.store.set(( /** @type {?} */(deleteControl(this.store.getValue(), coerceArray(name)))));
};
function (name) {
this.store.set((/** @type {?} */ (deleteControl(this.store.getValue(), coerceArray(name)))));
};
/**

@@ -1470,14 +1645,14 @@ * @private

*/
function (name, control, arrControlFactory) {
/** @type {?} */
var currentControl = this.getControl(name);
/** @type {?} */
var value = currentControl.value;
/** It means it's not a FormGroup or FormArray */
if (!currentControl.controls) {
return value;
}
handleFormArray(value, control, arrControlFactory);
function (name, control, arrControlFactory) {
/** @type {?} */
var currentControl = this.getControl(name);
/** @type {?} */
var value = currentControl.value;
/** It means it's not a FormGroup or FormArray */
if (!currentControl.controls) {
return value;
};
}
handleFormArray(value, control, arrControlFactory);
return value;
};
/**

@@ -1495,11 +1670,11 @@ * @private

*/
function (name, control) {
var _a;
/** @type {?} */
var value = toStore(name, control);
this.store.update(( /** @type {?} */(_a = {},
_a[name] = value,
_a)));
return value;
};
function (name, control) {
var _a;
/** @type {?} */
var value = toStore(name, control);
this.store.update((/** @type {?} */ (_a = {},
_a[name] = value,
_a)));
return value;
};
/**

@@ -1515,21 +1690,52 @@ * @private

*/
function (name) {
var _this = this;
coerceArray(name).forEach(( /**
* @param {?} name
* @return {?}
*/function (name) { return _this.initialValues$$.delete(name); }));
};
function (name) {
var _this = this;
coerceArray(name).forEach((/**
* @param {?} name
* @return {?}
*/
function (name) { return _this.initialValues$$.delete(name); }));
};
NgFormsManager.decorators = [
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
{ type: core.Injectable, args: [{ providedIn: 'root' },] }
];
/** @nocollapse */
NgFormsManager.ctorParameters = function () {
return [
{ type: NgFormsManagerConfig, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [NG_FORMS_MANAGER_CONFIG,] }] }
];
};
/** @nocollapse */ NgFormsManager.ngInjectableDef = i0.defineInjectable({ factory: function NgFormsManager_Factory() { return new NgFormsManager(i0.inject(NG_FORMS_MANAGER_CONFIG, 8)); }, token: NgFormsManager, providedIn: "root" });
NgFormsManager.ctorParameters = function () { return [
{ type: NgFormsManagerConfig, decorators: [{ type: core.Optional }, { type: core.Inject, args: [NG_FORMS_MANAGER_CONFIG,] }] }
]; };
/** @nocollapse */ NgFormsManager.ɵprov = core.ɵɵdefineInjectable({ factory: function NgFormsManager_Factory() { return new NgFormsManager(core.ɵɵinject(NG_FORMS_MANAGER_CONFIG, 8)); }, token: NgFormsManager, providedIn: "root" });
return NgFormsManager;
}());
if (false) {
/**
* @type {?}
* @private
*/
NgFormsManager.prototype.store;
/**
* @type {?}
* @private
*/
NgFormsManager.prototype.valueChanges$$;
/**
* @type {?}
* @private
*/
NgFormsManager.prototype.instances$$;
/**
* @type {?}
* @private
*/
NgFormsManager.prototype.initialValues$$;
/**
* @type {?}
* @private
*/
NgFormsManager.prototype.destroy$$;
/**
* @type {?}
* @private
*/
NgFormsManager.prototype.config;
}

@@ -1560,19 +1766,7 @@ /**

/**
* @fileoverview added by tsickle
* Generated from: public_api.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* Generated from: ngneat-forms-manager.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
exports.NG_FORMS_MANAGER_CONFIG = NG_FORMS_MANAGER_CONFIG;
exports.NgFormsManager = NgFormsManager;
exports.NgFormsManagerConfig = NgFormsManagerConfig;
exports.setAsyncValidators = setAsyncValidators;
exports.setValidators = setValidators;
exports.NgFormsManagerConfig = NgFormsManagerConfig;
exports.NG_FORMS_MANAGER_CONFIG = NG_FORMS_MANAGER_CONFIG;

@@ -1582,3 +1776,2 @@ Object.defineProperty(exports, '__esModule', { value: true });

})));
//# sourceMappingURL=ngneat-forms-manager.umd.js.map
//# sourceMappingURL=ngneat-forms-manager.umd.js.map

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

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("rxjs"),require("rxjs/operators"),require("@angular/core"),require("@angular/forms")):"function"==typeof define&&define.amd?define("@ngneat/forms-manager",["exports","rxjs","rxjs/operators","@angular/core","@angular/forms"],e):e((t.ngneat=t.ngneat||{},t.ngneat["forms-manager"]={}),t.rxjs,t.rxjs.operators,t.ng.core,t.ng.forms)}(this,function(t,l,f,e,p){"use strict";var o=function(){return(o=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 h(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}}function i(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||0<e--)&&!(n=i.next()).done;)a.push(n.value)}catch(s){o={error:s}}finally{try{n&&!n.done&&(r=i["return"])&&r.call(i)}finally{if(o)throw o.error}}return a}function g(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(i(arguments[e]));return t}var n=function(t){return t.pipe(f.filter(function(t){return null!=t}))};function c(t){return function e(t){return null===t||t===undefined}(t)?[]:Array.isArray(t)?t:[t]}function y(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}var a=["dirty","disabled","invalid","pending","errors","pristine","touched","valid"];function d(t,n){return t.reduce(function(t,e,r){return t[r]=v(e,n),t},[])}function v(t,e){var r,n,o={};try{for(var i=h(Object.keys(t)),a=i.next();!a.done;a=i.next()){var s=a.value,u=t[s];!1===e(s)&&(y(u)?o[s]=v(u,e):Array.isArray(u)&&"controls"===s?o[s]=d(u,e):o[s]=u)}}catch(c){r={error:c}}finally{try{a&&!a.done&&(n=i["return"])&&n.call(i)}finally{if(r)throw r.error}}return o}function m(){return"undefined"!=typeof window}var r=(s.prototype.select=function(t){return this.store.asObservable().pipe(f.map(t),f.distinctUntilChanged())},s.prototype.getValue=function(){return this.store.getValue()},s.prototype.set=function(t){this.store.next(t)},s.prototype.update=function(t){this.store.next(Object.assign({},this.getValue(),t))},s);function s(t){this.state=t,this.store=new l.BehaviorSubject(t)}var u={storage:{key:"ngFormsManager"},debounceTime:300};var $=(b.prototype.merge=function(t){return void 0===t&&(t={}),function n(t,e,r){return void 0===e&&(e={}),o({},t,{storage:o({},t.storage,e.storage,r.storage)},e,r)}(u,this.config,t)},b);function b(t){void 0===t&&(t={}),this.config=t}var C=new e.InjectionToken("NG_FORMS_MANAGER_CONFIG",{providedIn:"root",factory:function(){return new $}});function V(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(!V(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(!V(t[i],e[i]))return!1}return!0}return t!=t&&e!=e}function j(t,e){var r,n,o;if(e instanceof p.FormControl)return o=S(e);if(e instanceof p.FormGroup||e instanceof p.FormArray){o=S(e);try{for(var i=h(Object.keys(e.controls)),a=i.next();!a.done;a=i.next()){var s=a.value,u=e.controls[s];u instanceof p.FormGroup||u instanceof p.FormArray?o.controls[s]=j(t,u):o.controls[s]=S(u)}}catch(c){r={error:c}}finally{try{a&&!a.done&&(n=i["return"])&&n.call(i)}finally{if(r)throw r.error}}}return o}function O(t,e){var r=i(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 S(t){var e={value:function r(t){return y(t)?o({},t):Array.isArray(t)?g(t):t}(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 p.FormGroup||t instanceof p.FormArray)&&(e.controls=t instanceof p.FormArray?[]:{}),e}function A(t){for(;0!==t.length;)t.removeAt(0)}var w=(F.prototype.validityChanges=function(t,e){return this.controlChanges(t,e).pipe(f.map(function(t){return t.valid}))},F.prototype.isValid=function(t){return this.hasControl(t)&&this.getControl(t).valid},F.prototype.dirtyChanges=function(t,e){return this.controlChanges(t,e).pipe(f.map(function(t){return t.dirty}))},F.prototype.disableChanges=function(t,e){return this.controlChanges(t,e).pipe(f.map(function(t){return t.disabled}))},F.prototype.valueChanges=function(t,e){return this.controlChanges(t,e).pipe(f.map(function(t){return t.value}))},F.prototype.errorsChanges=function(t,e){return this.controlChanges(t,e).pipe(f.map(function(t){return t.errors}))},F.prototype.controlChanges=function(e,r){var t=this.store.select(function(t){return t[e]}).pipe(n);return r?t.pipe(f.map(function(t){return O(t,r)}),f.distinctUntilChanged(function(t,e){return V(t,e)})):t.pipe(f.distinctUntilChanged(function(t,e){return V(t,e)}))},F.prototype.initialValueChanged=function(e){var r=this;return!1===this.initialValues$$.has(e)&&console.error("You should set the withInitialValue option to the "+e+" control"),this.valueChanges(e).pipe(f.map(function(t){return!1===V(t,r.initialValues$$.get(e))}))},F.prototype.controlDestroyed=function(e){return this.destroy$$.asObservable().pipe(f.filter(function(t){return e===t||"$$ALL"===t}))},F.prototype.getControl=function(t,e){return e?this.hasControl(t)?O(this.getControl(t),e):null:this.store.getValue()[t]},F.prototype.hasControl=function(t,e){return!!this.getControl(t,e)},F.prototype.patchValue=function(t,e,r){this.instances$$.has(t)&&this.instances$$.get(t).patchValue(e,r)},F.prototype.setValue=function(t,e,r){this.instances$$.has(t)&&this.instances$$.get(t).setValue(e,r)},F.prototype.setInitialValue=function(t,e){this.initialValues$$.set(t,e)},F.prototype.unsubscribe=function(t){var e,r,n=this;if(t){var o=c(t);try{for(var i=h(o),a=i.next();!a.done;a=i.next()){var s=a.value;this.valueChanges$$.has(s)&&this.valueChanges$$.get(s).unsubscribe(),this.valueChanges$$["delete"](s),this.instances$$["delete"](s),this.destroy$$.next(s)}}catch(u){e={error:u}}finally{try{a&&!a.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()},F.prototype.clear=function(t){t?this.deleteControl(t):this.store.set({}),this.removeFromStorage(),this.removeInitialValue(t)},F.prototype.destroy=function(t){this.unsubscribe(t),this.clear(t)},F.prototype.upsert=function(e,r,t){var n,o=this;void 0===t&&(t={});var i=this.config.merge(t);if(i.withInitialValue&&!1===this.initialValues$$.has(e)&&this.setInitialValue(e,r.value),m()&&t.persistState&&!1===this.hasControl(e)){var a=this.getFromStorage(i.storage.key);a[e]&&this.store.update(((n={})[e]=function c(t){for(var e,r,n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];if(!n.length)return t;var i=n.shift();if(y(t)&&y(i))for(var a in i)y(i[a])?(t[a]||Object.assign(t,((e={})[a]={},e)),c(t[a],i[a])):Object.assign(t,((r={})[a]=i[a],r));return c.apply(void 0,g([t],n))}(j(e,r),a[e]),n))}if(!0===this.hasControl(e))r.patchValue(this.toControlValue(e,r,i.arrControlFactory),{emitEvent:!1});else{var s=this.updateStore(e,r);this.updateStorage(e,s,i)}var u=l.merge(r.valueChanges,r.statusChanges.pipe(f.distinctUntilChanged())).pipe(f.debounceTime(i.debounceTime)).subscribe(function(){var t=o.updateStore(e,r);o.updateStorage(e,t,i)});return this.valueChanges$$.set(e,u),this.instances$$.set(e,r),this},F.prototype.removeFromStorage=function(){localStorage.setItem(this.config.merge().storage.key,JSON.stringify(this.store.getValue()))},F.prototype.updateStorage=function(t,e,r){if(m()&&r.persistState){var n=this.getFromStorage(r.storage.key);n[t]=function o(t){return v(t,function(t){return a.includes(t)})}(e),localStorage.setItem(r.storage.key,JSON.stringify(n))}},F.prototype.getFromStorage=function(t){return JSON.parse(localStorage.getItem(t)||"{}")},F.prototype.deleteControl=function(t){this.store.set(function e(r,n){return Object.keys(r).reduce(function(t,e){return!1===n.includes(e)&&(t[e]=r[e]),t},{})}(this.store.getValue(),c(t)))},F.prototype.toControlValue=function(t,e,r){var n=this.getControl(t),o=n.value;return n.controls&&function s(o,i,a){if(i instanceof p.FormArray){if(A(i),!a)throw new Error("Please provide arrControlFactory");o.forEach(function(t,e){return i.insert(e,a(t))})}else Object.keys(o).forEach(function(t){var e=o[t];if(Array.isArray(e)&&i.get(t)instanceof p.FormArray){if(!a||a&&!(t in a))throw new Error("Please provide arrControlFactory for "+t);var r=i.get(t),n=a[t];A(r),e.forEach(function(t,e){return r.insert(e,n(t))})}})}(o,e,r),o},F.prototype.updateStore=function(t,e){var r,n=j(t,e);return this.store.update(((r={})[t]=n,r)),n},F.prototype.removeInitialValue=function(t){var e=this;c(t).forEach(function(t){return e.initialValues$$["delete"](t)})},F.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],F.ctorParameters=function(){return[{type:$,decorators:[{type:e.Optional},{type:e.Inject,args:[C]}]}]},F.ngInjectableDef=e.defineInjectable({factory:function(){return new F(e.inject(C,8))},token:F,providedIn:"root"}),F);function F(t){this.config=t,this.valueChanges$$=new Map,this.instances$$=new Map,this.initialValues$$=new Map,this.destroy$$=new l.Subject,this.store=new r({})}t.NgFormsManager=w,t.setAsyncValidators=function x(t,e){t.setValidators(c(e)),t.updateValueAndValidity()},t.setValidators=function I(t,e){t.setValidators(c(e)),t.updateValueAndValidity()},t.NgFormsManagerConfig=$,t.NG_FORMS_MANAGER_CONFIG=C,Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("rxjs/operators"),require("rxjs"),require("@angular/forms")):"function"==typeof define&&define.amd?define("@ngneat/forms-manager",["exports","@angular/core","rxjs/operators","rxjs","@angular/forms"],e):e(((t=t||self).ngneat=t.ngneat||{},t.ngneat["forms-manager"]={}),t.ng.core,t.rxjs.operators,t.rxjs,t.ng.forms)}(this,(function(t,e,r,n,o){"use strict";
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
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(r.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 n.BehaviorSubject(t)}return t.prototype.select=function(t){return this.store.asObservable().pipe(r.map(t),r.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 r,n,i;if(e instanceof o.FormControl)return i=O(e);if(e instanceof o.FormGroup||e instanceof o.FormArray){i=O(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 o.FormGroup||c instanceof o.FormArray?i.controls[l]=V(t,c):i.controls[l]=O(c)}}catch(t){r={error:t}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}}return i}function j(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 O(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 o.FormGroup||t instanceof o.FormArray)&&(e.controls=t instanceof o.FormArray?[]:{}),e}function S(t){for(;0!==t.length;)t.removeAt(0)}var w=function(){function t(t){this.config=t,this.valueChanges$$=new Map,this.instances$$=new Map,this.initialValues$$=new Map,this.destroy$$=new n.Subject,this.store=new v({})}return t.prototype.validityChanges=function(t,e){return this.controlChanges(t,e).pipe(r.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(r.map((function(t){return t.dirty})))},t.prototype.disableChanges=function(t,e){return this.controlChanges(t,e).pipe(r.map((function(t){return t.disabled})))},t.prototype.valueChanges=function(t,e){return this.controlChanges(t,e).pipe(r.map((function(t){return t.value})))},t.prototype.errorsChanges=function(t,e){return this.controlChanges(t,e).pipe(r.map((function(t){return t.errors})))},t.prototype.controlChanges=function(t,e){var n=this.store.select((function(e){return e[t]})).pipe(l);return e?n.pipe(r.map((function(t){return j(t,e)})),r.distinctUntilChanged((function(t,e){return C(t,e)}))):n.pipe(r.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(r.map((function(r){return!1===C(r,e.initialValues$$.get(t))})))},t.prototype.controlDestroyed=function(t){return this.destroy$$.asObservable().pipe(r.filter((function(e){return t===e||"$$ALL"===e})))},t.prototype.getControl=function(t,e){return e?this.hasControl(t)?j(this.getControl(t),e):null:this.store.getValue()[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,o){var i,a=this;void 0===o&&(o={});var s=this.config.merge(o);if(s.withInitialValue&&!1===this.initialValues$$.has(t)&&this.setInitialValue(t,e.value),d()&&o.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=n.merge(e.valueChanges,e.statusChanges.pipe(r.distinctUntilChanged())).pipe(r.debounceTime(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.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,r){var n=this.getControl(t),i=n.value;return n.controls?(function(t,e,r){if(e instanceof o.FormArray){if(S(e),!r)throw new Error("Please provide arrControlFactory");t.forEach((function(t,n){return e.insert(n,r(t))}))}else Object.keys(t).forEach((function(n){var i=t[n];if(Array.isArray(i)&&e.get(n)instanceof o.FormArray){if(!r||r&&!(n in r))throw new Error("Please provide arrControlFactory for "+n);var a=e.get(n),s=r[n];S(a),i.forEach((function(t,e){return a.insert(e,s(t))}))}}))}(i,e,r),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=w,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})}));
//# sourceMappingURL=ngneat-forms-manager.umd.min.js.map

@@ -21,3 +21,3 @@ /**

export function mergeConfig(defaults, providerConfig = {}, inlineConfig) {
return (/** @type {?} */ (Object.assign({}, defaults, { storage: Object.assign({}, defaults.storage, providerConfig.storage, inlineConfig.storage) }, providerConfig, inlineConfig)));
return (/** @type {?} */ (Object.assign(Object.assign(Object.assign(Object.assign({}, defaults), { storage: Object.assign(Object.assign(Object.assign({}, defaults.storage), providerConfig.storage), inlineConfig.storage) }), providerConfig), inlineConfig)));
}

@@ -56,2 +56,2 @@ export class NgFormsManager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0dXJuIHtcbiAgICAuLi5kZWZhdWx0cyxcbiAgICBzdG9yYWdlOiB7XG4gICAgICAuLi5kZWZhdWx0cy5zdG9yYWdlLFxuICAgICAgLi4ucHJvdmlkZXJDb25maWcuc3RvcmFnZSxcbiAgICAgIC4uLmlubGluZUNvbmZpZy5zdG9yYWdlLFxuICAgIH0sXG4gICAgLi4ucHJvdmlkZXJDb25maWcsXG4gICAgLi4uaW5saW5lQ29uZmlnLFxuICB9IGFzIENvbmZpZztcbn1cblxuZXhwb3J0IGNsYXNzIE5nRm9ybXNNYW5hZ2VyQ29uZmlnIHtcbiAgY29uc3RydWN0b3IocHJpdmF0ZSBjb25maWc6IFBhcnRpYWw8Q29uZmlnPiA9IHt9KSB7fVxuXG4gIG1lcmdlKGlubGluZTogUGFydGlhbDxDb25maWc+ID0ge30pOiBDb25maWcge1xuICAgIHJldHVybiBtZXJnZUNvbmZpZyhkZWZhdWx0cywgdGhpcy5jb25maWcsIGlubGluZSk7XG4gIH1cbn1cblxuZXhwb3J0IGNvbnN0IE5HX0ZPUk1TX01BTkFHRVJfQ09ORklHID0gbmV3IEluamVjdGlvblRva2VuPE5nRm9ybXNNYW5hZ2VyQ29uZmlnPihcbiAgJ05HX0ZPUk1TX01BTkFHRVJfQ09ORklHJyxcbiAge1xuICAgIHByb3ZpZGVkSW46ICdyb290JyxcbiAgICBmYWN0b3J5OiAoKSA9PiB7XG4gICAgICByZXR1cm4gbmV3IE5nRm9ybXNNYW5hZ2VyQ29uZmlnKCk7XG4gICAgfSxcbiAgfVxuKTtcbiJdfQ==

@@ -509,3 +509,3 @@ /**

];
/** @nocollapse */ NgFormsManager.ngInjectableDef = i0.defineInjectable({ factory: function NgFormsManager_Factory() { return new NgFormsManager(i0.inject(i1.NG_FORMS_MANAGER_CONFIG, 8)); }, token: NgFormsManager, providedIn: "root" });
/** @nocollapse */ NgFormsManager.ɵprov = i0.ɵɵdefineInjectable({ factory: function NgFormsManager_Factory() { return new NgFormsManager(i0.ɵɵinject(i1.NG_FORMS_MANAGER_CONFIG, 8)); }, token: NgFormsManager, providedIn: "root" });
if (false) {

@@ -512,0 +512,0 @@ /**

@@ -44,2 +44,9 @@ /**

/**
* @param {?} value
* @return {?}
*/
export function isValidDate(value) {
return value && Object.prototype.toString.call(value) === '[object Date]' && !isNaN(value);
}
/**
* @param {?} val

@@ -49,3 +56,3 @@ * @return {?}

export function isObject(val) {
if (val == null || Array.isArray(val)) {
if (val == null || Array.isArray(val) || isValidDate(val)) {
return false;

@@ -151,2 +158,2 @@ }

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AbmduZWF0L2Zvcm1zLW1hbmFnZXIvIiwic291cmNlcyI6WyJsaWIvdXRpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFDQSxPQUFPLEVBQUUsTUFBTSxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7O0FBSXhDLE1BQU0sT0FBTyxTQUFTOzs7OztBQUFHLENBQUksTUFBd0MsRUFBRSxFQUFFLENBQ3ZFLE1BQU0sQ0FBQyxJQUFJLENBQ1QsTUFBTTs7OztBQUNKLENBQUMsS0FBSyxFQUFzQyxFQUFFLENBQUMsS0FBSyxLQUFLLElBQUksSUFBSSxPQUFPLEtBQUssS0FBSyxXQUFXLEVBQzlGLENBQ0YsQ0FBQTs7Ozs7O0FBRUgsTUFBTSxVQUFVLFdBQVcsQ0FBSSxLQUFjO0lBQzNDLElBQUksS0FBSyxDQUFDLEtBQUssQ0FBQyxFQUFFO1FBQ2hCLE9BQU8sRUFBRSxDQUFDO0tBQ1g7SUFDRCxPQUFPLEtBQUssQ0FBQyxPQUFPLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQyxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQyxLQUFLLENBQUMsQ0FBQztBQUNoRCxDQUFDOzs7OztBQU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uXG5leHBvcnQgZnVuY3Rpb24gaXNCcm93c2VyKCkge1xuICByZXR1cm4gdHlwZW9mIHdpbmRvdyAhPT0gJ3VuZGVmaW5lZCc7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBtZXJnZURlZXAodGFyZ2V0LCAuLi5zb3VyY2VzKSB7XG4gIGlmICghc291cmNlcy5sZW5ndGgpIHtcbiAgICByZXR1cm4gdGFyZ2V0O1xuICB9XG4gIGNvbnN0IHNvdXJjZSA9IHNvdXJjZXMuc2hpZnQoKTtcblxuICBpZiAoaXNPYmplY3QodGFyZ2V0KSAmJiBpc09iamVjdChzb3VyY2UpKSB7XG4gICAgZm9yIChjb25zdCBrZXkgaW4gc291cmNlKSB7XG4gICAgICBpZiAoaXNPYmplY3Qoc291cmNlW2tleV0pKSB7XG4gICAgICAgIGlmICghdGFyZ2V0W2tleV0pIHtcbiAgICAgICAgICBPYmplY3QuYXNzaWduKHRhcmdldCwgeyBba2V5XToge30gfSk7XG4gICAgICAgIH1cbiAgICAgICAgbWVyZ2VEZWVwKHRhcmdldFtrZXldLCBzb3VyY2Vba2V5XSk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBPYmplY3QuYXNzaWduKHRhcmdldCwgeyBba2V5XTogc291cmNlW2tleV0gfSk7XG4gICAgICB9XG4gICAgfVxuICB9XG5cbiAgcmV0dXJuIG1lcmdlRGVlcCh0YXJnZXQsIC4uLnNvdXJjZXMpO1xufVxuIl19
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AbmduZWF0L2Zvcm1zLW1hbmFnZXIvIiwic291cmNlcyI6WyJsaWIvdXRpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFDQSxPQUFPLEVBQUUsTUFBTSxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7O0FBSXhDLE1BQU0sT0FBTyxTQUFTOzs7Ozt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kb3cgIT09ICd1bmRlZmluZWQnO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gbWVyZ2VEZWVwKHRhcmdldCwgLi4uc291cmNlcykge1xuICBpZiAoIXNvdXJjZXMubGVuZ3RoKSB7XG4gICAgcmV0dXJuIHRhcmdldDtcbiAgfVxuICBjb25zdCBzb3VyY2UgPSBzb3VyY2VzLnNoaWZ0KCk7XG5cbiAgaWYgKGlzT2JqZWN0KHRhcmdldCkgJiYgaXNPYmplY3Qoc291cmNlKSkge1xuICAgIGZvciAoY29uc3Qga2V5IGluIHNvdXJjZSkge1xuICAgICAgaWYgKGlzT2JqZWN0KHNvdXJjZVtrZXldKSkge1xuICAgICAgICBpZiAoIXRhcmdldFtrZXldKSB7XG4gICAgICAgICAgT2JqZWN0LmFzc2lnbih0YXJnZXQsIHsgW2tleV06IHt9IH0pO1xuICAgICAgICB9XG4gICAgICAgIG1lcmdlRGVlcCh0YXJnZXRba2V5XSwgc291cmNlW2tleV0pO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgT2JqZWN0LmFzc2lnbih0YXJnZXQsIHsgW2tleV06IHNvdXJjZVtrZXldIH0pO1xuICAgICAgfVxuICAgIH1cbiAgfVxuXG4gIHJldHVybiBtZXJnZURlZXAodGFyZ2V0LCAuLi5zb3VyY2VzKTtcbn1cbiJdfQ==

@@ -6,3 +6,3 @@ /**

*/
import * as tslib_1 from "tslib";
import { __read, __values } from "tslib";
import { FormArray, FormControl, FormGroup } from '@angular/forms';

@@ -27,3 +27,3 @@ import { clone } from './utils';

try {
for (var _b = tslib_1.__values(Object.keys(control.controls)), _c = _b.next(); !_c.done; _c = _b.next()) {
for (var _b = __values(Object.keys(control.controls)), _c = _b.next(); !_c.done; _c = _b.next()) {
var key = _c.value;

@@ -122,3 +122,3 @@ /** @type {?} */

export function findControl(control, path) {
var _a = tslib_1.__read(path.split('.')), first = _a[0], rest = _a.slice(1);
var _a = __read(path.split('.')), first = _a[0], rest = _a.slice(1);
if (rest.length === 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vcm1Hcm91cCB8fCBjb250cm9sIGluc3RhbmNlb2YgRm9ybUFycmF5KSB7XG4gICAgdmFsdWVbJ2NvbnRyb2xzJ10gPSBjb250cm9sIGluc3RhbmNlb2YgRm9ybUFycmF5ID8gW10gOiB7fTtcbiAgfVxuXG4gIHJldHVybiB2YWx1ZTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGNsZWFyRm9ybUFycmF5KGNvbnRyb2w6IEZvcm1BcnJheSkge1xuICB3aGlsZSAoY29udHJvbC5sZW5ndGggIT09IDApIHtcbiAgICBjb250cm9sLnJlbW92ZUF0KDApO1xuICB9XG59XG4iXX0=

@@ -6,3 +6,3 @@ /**

*/
import * as tslib_1 from "tslib";
import { __assign } from "tslib";
import { InjectionToken } from '@angular/core';

@@ -24,3 +24,3 @@ /** @type {?} */

if (providerConfig === void 0) { providerConfig = {}; }
return (/** @type {?} */ (tslib_1.__assign({}, defaults, { storage: tslib_1.__assign({}, defaults.storage, providerConfig.storage, inlineConfig.storage) }, providerConfig, inlineConfig)));
return (/** @type {?} */ (__assign(__assign(__assign(__assign({}, defaults), { storage: __assign(__assign(__assign({}, defaults.storage), providerConfig.storage), inlineConfig.storage) }), providerConfig), inlineConfig)));
}

@@ -64,2 +64,2 @@ var NgFormsManagerConfig = /** @class */ (function () {

});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlnLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQG5nbmVhdC9mb3Jtcy1tYW5hZ2VyLyIsInNvdXJjZXMiOlsibGliL2NvbmZpZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7QUFBQSxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sZUFBZSxDQUFDOztJQVN6QyxRQUFRLEdBQVc7SUFDdkIsT0FBTyxFQUFFO1FBQ1AsR0FBRyxFQUFFLGdCQUFnQjtLQUN0QjtJQUNELFlBQVksRUFBRSxHQUFHO0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IC4uLnByb3ZpZGVyQ29uZmlnLFxuICAgIC4uLmlubGluZUNvbmZpZyxcbiAgfSBhcyBDb25maWc7XG59XG5cbmV4cG9ydCBjbGFzcyBOZ0Zvcm1zTWFuYWdlckNvbmZpZyB7XG4gIGNvbnN0cnVjdG9yKHByaXZhdGUgY29uZmlnOiBQYXJ0aWFsPENvbmZpZz4gPSB7fSkge31cblxuICBtZXJnZShpbmxpbmU6IFBhcnRpYWw8Q29uZmlnPiA9IHt9KTogQ29uZmlnIHtcbiAgICByZXR1cm4gbWVyZ2VDb25maWcoZGVmYXVsdHMsIHRoaXMuY29uZmlnLCBpbmxpbmUpO1xuICB9XG59XG5cbmV4cG9ydCBjb25zdCBOR19GT1JNU19NQU5BR0VSX0NPTkZJRyA9IG5ldyBJbmplY3Rpb25Ub2tlbjxOZ0Zvcm1zTWFuYWdlckNvbmZpZz4oXG4gICdOR19GT1JNU19NQU5BR0VSX0NPTkZJRycsXG4gIHtcbiAgICBwcm92aWRlZEluOiAncm9vdCcsXG4gICAgZmFjdG9yeTogKCkgPT4ge1xuICAgICAgcmV0dXJuIG5ldyBOZ0Zvcm1zTWFuYWdlckNvbmZpZygpO1xuICAgIH0sXG4gIH1cbik7XG4iXX0=

@@ -6,3 +6,3 @@ /**

*/
import * as tslib_1 from "tslib";
import { __values } from "tslib";
import { Inject, Injectable, Optional } from '@angular/core';

@@ -570,4 +570,4 @@ import { coerceArray, filterControlKeys, filterNil, isBrowser, mergeDeep } from './utils';

function (name) {
var e_1, _a;
var _this = this;
var e_1, _a;
if (name) {

@@ -577,3 +577,3 @@ /** @type {?} */

try {
for (var names_1 = tslib_1.__values(names), names_1_1 = names_1.next(); !names_1_1.done; names_1_1 = names_1.next()) {
for (var names_1 = __values(names), names_1_1 = names_1.next(); !names_1_1.done; names_1_1 = names_1.next()) {
var name_1 = names_1_1.value;

@@ -732,5 +732,5 @@ if (this.valueChanges$$.has(name_1)) {

function (name, control, config) {
var _a;
var _this = this;
if (config === void 0) { config = {}; }
var _a;
/** @type {?} */

@@ -907,3 +907,3 @@ var mergedConfig = (/** @type {?} */ (this)).config.merge(config);

]; };
/** @nocollapse */ NgFormsManager.ngInjectableDef = i0.defineInjectable({ factory: function NgFormsManager_Factory() { return new NgFormsManager(i0.inject(i1.NG_FORMS_MANAGER_CONFIG, 8)); }, token: NgFormsManager, providedIn: "root" });
/** @nocollapse */ NgFormsManager.ɵprov = i0.ɵɵdefineInjectable({ factory: function NgFormsManager_Factory() { return new NgFormsManager(i0.ɵɵinject(i1.NG_FORMS_MANAGER_CONFIG, 8)); }, token: NgFormsManager, providedIn: "root" });
return NgFormsManager;

@@ -944,2 +944,2 @@ }());

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybXMtbWFuYWdlci5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BuZ25lYXQvZm9ybXMtbWFuYWdlci8iLCJzb3VyY2VzIjpbImxpYi9mb3Jtcy1tYW5hZ2VyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7OztBQUFBLE9BQU8sRUFBRSxNQUFNLEVBQUUsVUFBVSxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUU3RCxPQUFPLEVBQUUsV0FBVyxFQUFFLGlCQUFpQixFQUFFLFNBQVMsRUFBRSxTQUFTLEVBQVksU0FBUyxFQUFFLE1BQU0sU0FBUyxDQUFDO0FBQ3BHLE9BQU8sRUFBRSxLQUFLLEVBQWMsT0FBTyxFQUFnQixNQUFNLE1BQU0sQ0FBQztBQUNoRSxPQUFPLEVBQUUsWUFBWSxFQUFFLG9CQUFvQixFQUFFLE1BQU0sRUFBRSxHQUFHLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUNqRixPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sdUJBQXVCLENBQUM7QUFFbkQsT0FBTyxFQUFVLHVCQUF1QixFQUFFLG9CQUFvQixFQUFFL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1ZTtcbiAgfVxuXG4gIHByaXZhdGUgdXBkYXRlU3RvcmUobmFtZToga2V5b2YgRm9ybXNTdGF0ZSwgY29udHJvbDogQWJzdHJhY3RDb250cm9sKSB7XG4gICAgY29uc3QgdmFsdWUgPSB0b1N0b3JlPEZvcm1zU3RhdGU+KG5hbWUsIGNvbnRyb2wpO1xuICAgIHRoaXMuc3RvcmUudXBkYXRlKHtcbiAgICAgIFtuYW1lXTogdmFsdWUsXG4gICAgfSBhcyBhbnkpO1xuXG4gICAgcmV0dXJuIHZhbHVlO1xuICB9XG5cbiAgcHJpdmF0ZSByZW1vdmVJbml0aWFsVmFsdWUobmFtZTogRm9ybUtleXM8Rm9ybXNTdGF0ZT4pIHtcbiAgICBjb2VyY2VBcnJheShuYW1lKS5mb3JFYWNoKG5hbWUgPT4gdGhpcy5pbml0aWFsVmFsdWVzJCQuZGVsZXRlKG5hbWUpKTtcbiAgfVxufVxuIl19

@@ -6,3 +6,3 @@ /**

*/
import * as tslib_1 from "tslib";
import { __assign, __read, __spread, __values } from "tslib";
import { filter } from 'rxjs/operators';

@@ -45,5 +45,12 @@ /** @type {?} */

export function clone(value) {
return isObject(value) ? tslib_1.__assign({}, value) : Array.isArray(value) ? tslib_1.__spread(value) : value;
return isObject(value) ? __assign({}, value) : Array.isArray(value) ? __spread(value) : value;
}
/**
* @param {?} value
* @return {?}
*/
export function isValidDate(value) {
return value && Object.prototype.toString.call(value) === '[object Date]' && !isNaN(value);
}
/**
* @param {?} val

@@ -53,3 +60,3 @@ * @return {?}

export function isObject(val) {
if (val == null || Array.isArray(val)) {
if (val == null || Array.isArray(val) || isValidDate(val)) {
return false;

@@ -108,3 +115,3 @@ }

try {
for (var _b = tslib_1.__values(Object.keys(obj)), _c = _b.next(); !_c.done; _c = _b.next()) {
for (var _b = __values(Object.keys(obj)), _c = _b.next(); !_c.done; _c = _b.next()) {
var key = _c.value;

@@ -147,2 +154,3 @@ /** @type {?} */

export function mergeDeep(target) {
var _a, _b;
var sources = [];

@@ -152,3 +160,2 @@ for (var _i = 1; _i < arguments.length; _i++) {

}
var _a, _b;
if (!sources.length) {

@@ -172,4 +179,4 @@ return target;

}
return mergeDeep.apply(void 0, tslib_1.__spread([target], sources));
return mergeDeep.apply(void 0, __spread([target], sources));
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AbmduZWF0L2Zvcm1zLW1hbmFnZXIvIiwic291cmNlcyI6WyJsaWIvdXRpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQ0EsT0FBTyxFQUFFLE1BQU0sRUFBRSxNQUFNLGdCQUFnQixDQUFDOztBQUl4QyxNQUFNLEtBQU8sU0FBUzs7Ozs7QUFBRyxVQUFJLE1BQXdDO0lBQ25FLE9BQUEsTUFBTSxDQUFDLElBQUksQ0FDVCxNQUFNOzs7O0lBQ0osVUFBQyxLQUFLLElBQXlDLE9BQUEsS0FBSyxLQUFLLElBQUksSUFBSSxPQUFPLEtBQUssS0FBSyxXQUFXLEVBQTlDLENBQThDLEVBQzlGLENBQ0Y7QUFKRCxDQUlDLENBQUE7Ozs7OztBQUVILE1BQU0sVUFBVSxXQUFXLENBQUksS0FBYztJQUMzQyxJQUFJLEtBQUssQ0FBQyxLQUFLLENBQUMsRUFBRTtRQUNoQixPQUFPLEVBQUUsQ0FBQztLQUNYO0lBQ0QsT0FBTyxLQUFLLENBQUMsT0FBTyxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQyxLQUFLLENBQUMsQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDLENBQUM7QUFDaEQsQ0FBQzs7Ozs7QUFFRCxNQUFNLFVBQVUsS0FBSyxDQUFDLENBQUM7SUFDckIsT0FBTyxDQUFDLEtBQUssSUFBSSxJQUFJLENBQUMsS0FBSyxTQUFTLENBQUM7QUFDdkMsQ0FBQzs7Ozs7QU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5kb3cgIT09ICd1bmRlZmluZWQnO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gbWVyZ2VEZWVwKHRhcmdldCwgLi4uc291cmNlcykge1xuICBpZiAoIXNvdXJjZXMubGVuZ3RoKSB7XG4gICAgcmV0dXJuIHRhcmdldDtcbiAgfVxuICBjb25zdCBzb3VyY2UgPSBzb3VyY2VzLnNoaWZ0KCk7XG5cbiAgaWYgKGlzT2JqZWN0KHRhcmdldCkgJiYgaXNPYmplY3Qoc291cmNlKSkge1xuICAgIGZvciAoY29uc3Qga2V5IGluIHNvdXJjZSkge1xuICAgICAgaWYgKGlzT2JqZWN0KHNvdXJjZVtrZXldKSkge1xuICAgICAgICBpZiAoIXRhcmdldFtrZXldKSB7XG4gICAgICAgICAgT2JqZWN0LmFzc2lnbih0YXJnZXQsIHsgW2tleV06IHt9IH0pO1xuICAgICAgICB9XG4gICAgICAgIG1lcmdlRGVlcCh0YXJnZXRba2V5XSwgc291cmNlW2tleV0pO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgT2JqZWN0LmFzc2lnbih0YXJnZXQsIHsgW2tleV06IHNvdXJjZVtrZXldIH0pO1xuICAgICAgfVxuICAgIH1cbiAgfVxuXG4gIHJldHVybiBtZXJnZURlZXAodGFyZ2V0LCAuLi5zb3VyY2VzKTtcbn1cbiJdfQ==

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

import { BehaviorSubject, merge, Subject } from 'rxjs';
import { filter, distinctUntilChanged, map, debounceTime } from 'rxjs/operators';
import { InjectionToken, Inject, Injectable, Optional, defineInjectable, inject } from '@angular/core';
import { FormArray, FormControl, FormGroup } from '@angular/forms';
import { InjectionToken, Injectable, Optional, Inject, ɵɵdefineInjectable, ɵɵinject } from '@angular/core';
import { filter, map, distinctUntilChanged, debounceTime } from 'rxjs/operators';
import { BehaviorSubject, Subject, merge } from 'rxjs';
import { FormControl, FormGroup, FormArray } from '@angular/forms';

@@ -48,2 +48,9 @@ /**

/**
* @param {?} value
* @return {?}
*/
function isValidDate(value) {
return value && Object.prototype.toString.call(value) === '[object Date]' && !isNaN(value);
}
/**
* @param {?} val

@@ -53,3 +60,3 @@ * @return {?}

function isObject(val) {
if (val == null || Array.isArray(val)) {
if (val == null || Array.isArray(val) || isValidDate(val)) {
return false;

@@ -201,2 +208,14 @@ }

}
if (false) {
/**
* @type {?}
* @private
*/
FormsStore.prototype.store;
/**
* @type {?}
* @private
*/
FormsStore.prototype.state;
}

@@ -222,3 +241,3 @@ /**

function mergeConfig(defaults, providerConfig = {}, inlineConfig) {
return (/** @type {?} */ (Object.assign({}, defaults, { storage: Object.assign({}, defaults.storage, providerConfig.storage, inlineConfig.storage) }, providerConfig, inlineConfig)));
return (/** @type {?} */ (Object.assign(Object.assign(Object.assign(Object.assign({}, defaults), { storage: Object.assign(Object.assign(Object.assign({}, defaults.storage), providerConfig.storage), inlineConfig.storage) }), providerConfig), inlineConfig)));
}

@@ -240,2 +259,9 @@ class NgFormsManagerConfig {

}
if (false) {
/**
* @type {?}
* @private
*/
NgFormsManagerConfig.prototype.config;
}
/** @type {?} */

@@ -969,3 +995,35 @@ const NG_FORMS_MANAGER_CONFIG = new InjectionToken('NG_FORMS_MANAGER_CONFIG', {

];
/** @nocollapse */ NgFormsManager.ngInjectableDef = defineInjectable({ factory: function NgFormsManager_Factory() { return new NgFormsManager(inject(NG_FORMS_MANAGER_CONFIG, 8)); }, token: NgFormsManager, providedIn: "root" });
/** @nocollapse */ NgFormsManager.ɵprov = ɵɵdefineInjectable({ factory: function NgFormsManager_Factory() { return new NgFormsManager(ɵɵinject(NG_FORMS_MANAGER_CONFIG, 8)); }, token: NgFormsManager, providedIn: "root" });
if (false) {
/**
* @type {?}
* @private
*/
NgFormsManager.prototype.store;
/**
* @type {?}
* @private
*/
NgFormsManager.prototype.valueChanges$$;
/**
* @type {?}
* @private
*/
NgFormsManager.prototype.instances$$;
/**
* @type {?}
* @private
*/
NgFormsManager.prototype.initialValues$$;
/**
* @type {?}
* @private
*/
NgFormsManager.prototype.destroy$$;
/**
* @type {?}
* @private
*/
NgFormsManager.prototype.config;
}

@@ -1008,4 +1066,3 @@ /**

export { NgFormsManager, setAsyncValidators, setValidators, NgFormsManagerConfig, NG_FORMS_MANAGER_CONFIG };
//# sourceMappingURL=ngneat-forms-manager.js.map
export { NG_FORMS_MANAGER_CONFIG, NgFormsManager, NgFormsManagerConfig, setAsyncValidators, setValidators };
//# sourceMappingURL=ngneat-forms-manager.js.map

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

import { BehaviorSubject, merge, Subject } from 'rxjs';
import { filter, distinctUntilChanged, map, debounceTime } from 'rxjs/operators';
import { InjectionToken, Inject, Injectable, Optional, defineInjectable, inject } from '@angular/core';
import { __assign, __values, __spread, __read } from 'tslib';
import { FormArray, FormControl, FormGroup } from '@angular/forms';
import { __assign, __spread, __values, __read } from 'tslib';
import { InjectionToken, Injectable, Optional, Inject, ɵɵdefineInjectable, ɵɵinject } from '@angular/core';
import { filter, map, distinctUntilChanged, debounceTime } from 'rxjs/operators';
import { BehaviorSubject, Subject, merge } from 'rxjs';
import { FormControl, FormGroup, FormArray } from '@angular/forms';

@@ -51,2 +51,9 @@ /**

/**
* @param {?} value
* @return {?}
*/
function isValidDate(value) {
return value && Object.prototype.toString.call(value) === '[object Date]' && !isNaN(value);
}
/**
* @param {?} val

@@ -56,3 +63,3 @@ * @return {?}

function isObject(val) {
if (val == null || Array.isArray(val)) {
if (val == null || Array.isArray(val) || isValidDate(val)) {
return false;

@@ -149,2 +156,3 @@ }

function mergeDeep(target) {
var _a, _b;
var sources = [];

@@ -154,3 +162,2 @@ for (var _i = 1; _i < arguments.length; _i++) {

}
var _a, _b;
if (!sources.length) {

@@ -239,2 +246,14 @@ return target;

}());
if (false) {
/**
* @type {?}
* @private
*/
FormsStore.prototype.store;
/**
* @type {?}
* @private
*/
FormsStore.prototype.state;
}

@@ -261,3 +280,3 @@ /**

if (providerConfig === void 0) { providerConfig = {}; }
return (/** @type {?} */ (__assign({}, defaults, { storage: __assign({}, defaults.storage, providerConfig.storage, inlineConfig.storage) }, providerConfig, inlineConfig)));
return (/** @type {?} */ (__assign(__assign(__assign(__assign({}, defaults), { storage: __assign(__assign(__assign({}, defaults.storage), providerConfig.storage), inlineConfig.storage) }), providerConfig), inlineConfig)));
}

@@ -283,2 +302,9 @@ var NgFormsManagerConfig = /** @class */ (function () {

}());
if (false) {
/**
* @type {?}
* @private
*/
NgFormsManagerConfig.prototype.config;
}
/** @type {?} */

@@ -1084,4 +1110,4 @@ var NG_FORMS_MANAGER_CONFIG = new InjectionToken('NG_FORMS_MANAGER_CONFIG', {

function (name) {
var e_1, _a;
var _this = this;
var e_1, _a;
if (name) {

@@ -1245,5 +1271,5 @@ /** @type {?} */

function (name, control, config) {
var _a;
var _this = this;
if (config === void 0) { config = {}; }
var _a;
/** @type {?} */

@@ -1420,5 +1446,37 @@ var mergedConfig = (/** @type {?} */ (this)).config.merge(config);

]; };
/** @nocollapse */ NgFormsManager.ngInjectableDef = defineInjectable({ factory: function NgFormsManager_Factory() { return new NgFormsManager(inject(NG_FORMS_MANAGER_CONFIG, 8)); }, token: NgFormsManager, providedIn: "root" });
/** @nocollapse */ NgFormsManager.ɵprov = ɵɵdefineInjectable({ factory: function NgFormsManager_Factory() { return new NgFormsManager(ɵɵinject(NG_FORMS_MANAGER_CONFIG, 8)); }, token: NgFormsManager, providedIn: "root" });
return NgFormsManager;
}());
if (false) {
/**
* @type {?}
* @private
*/
NgFormsManager.prototype.store;
/**
* @type {?}
* @private
*/
NgFormsManager.prototype.valueChanges$$;
/**
* @type {?}
* @private
*/
NgFormsManager.prototype.instances$$;
/**
* @type {?}
* @private
*/
NgFormsManager.prototype.initialValues$$;
/**
* @type {?}
* @private
*/
NgFormsManager.prototype.destroy$$;
/**
* @type {?}
* @private
*/
NgFormsManager.prototype.config;
}

@@ -1461,4 +1519,3 @@ /**

export { NgFormsManager, setAsyncValidators, setValidators, NgFormsManagerConfig, NG_FORMS_MANAGER_CONFIG };
//# sourceMappingURL=ngneat-forms-manager.js.map
export { NG_FORMS_MANAGER_CONFIG, NgFormsManager, NgFormsManagerConfig, setAsyncValidators, setValidators };
//# sourceMappingURL=ngneat-forms-manager.js.map

@@ -107,3 +107,3 @@ import { AbstractControl } from '@angular/forms';

*/
controlDestroyed(name: keyof FormsState): Observable<{}>;
controlDestroyed(name: keyof FormsState): Observable<unknown>;
/**

@@ -110,0 +110,0 @@ *

@@ -7,2 +7,3 @@ import { Observable } from 'rxjs';

export declare function clone(value: any): any;
export declare function isValidDate(value: any): boolean;
export declare function isObject(val: any): boolean;

@@ -9,0 +10,0 @@ export declare function filterControlKeys(value: any): {};

@@ -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":11,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":19,"character":15}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":19,"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"}],"hasControl":[{"__symbolic":"method"}],"patchValue":[{"__symbolic":"method"}],"setValue":[{"__symbolic":"method"}],"setInitialValue":[{"__symbolic":"method"}],"unsubscribe":[{"__symbolic":"method"}],"clear":[{"__symbolic":"method"}],"destroy":[{"__symbolic":"method"}],"upsert":[{"__symbolic":"method"}],"removeFromStorage":[{"__symbolic":"method"}],"updateStorage":[{"__symbolic":"method"}],"getFromStorage":[{"__symbolic":"method"}],"deleteControl":[{"__symbolic":"method"}],"toControlValue":[{"__symbolic":"method"}],"updateStore":[{"__symbolic":"method"}],"removeInitialValue":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}},"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":11,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":19,"character":15}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":19,"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"}],"hasControl":[{"__symbolic":"method"}],"patchValue":[{"__symbolic":"method"}],"setValue":[{"__symbolic":"method"}],"setInitialValue":[{"__symbolic":"method"}],"unsubscribe":[{"__symbolic":"method"}],"clear":[{"__symbolic":"method"}],"destroy":[{"__symbolic":"method"}],"upsert":[{"__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"}
{
"name": "@ngneat/forms-manager",
"version": "2.1.0",
"version": "2.1.2",
"description": "Forms Manager library for Angular",

@@ -36,4 +36,4 @@ "license": "MIT",

"dependencies": {
"tslib": "^1.9.0"
"tslib": "^1.10.0"
}
}

@@ -71,3 +71,3 @@ <br />

name: [null, Validators.required],
age: [null, Validators.required]),
age: [null, Validators.required],
city: [null, Validators.required]

@@ -124,3 +124,3 @@ });

const errors$ = formsManager.errorsChanges<Errors>('onboarding');
const nameErros$ = formsManager.errorsChanges<Errors>('onboarding', 'name');
const nameErrors$ = formsManager.errorsChanges<Errors>('onboarding', 'name');
```

@@ -159,6 +159,6 @@

- `hasForm()` - Whether the form exists
- `hasControl()` - Whether the control exists
```ts
const hasForm = formsManager.hasForm('onboarding');
const hasControl = formsManager.hasControl('onboarding');
```

@@ -395,2 +395,3 @@

<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>
</tr>

@@ -397,0 +398,0 @@ </table>

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc