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

@angular/forms

Package Overview
Dependencies
Maintainers
1
Versions
842
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@angular/forms - npm Package Compare versions

Comparing version 2.1.0-beta.0 to 2.1.0-rc.0

6

package.json
{
"name": "@angular/forms",
"version": "2.1.0-beta.0",
"version": "2.1.0-rc.0",
"description": "Angular - directives and services for creating forms",

@@ -11,4 +11,4 @@ "main": "bundles/forms.umd.js",

"peerDependencies": {
"@angular/core": "2.1.0-beta.0",
"@angular/common": "2.1.0-beta.0"
"@angular/core": "2.1.0-rc.0",
"@angular/common": "2.1.0-rc.0"
},

@@ -15,0 +15,0 @@ "repository": {

@@ -30,16 +30,4 @@ /**

/**
* A list of all the form directives.
*
* A list of all the form directives used as part of a `@Component` annotation.
*
* This is a shorthand for importing them each individually.
*
* ### Example
*
* ```typescript
* @Component({
* selector: 'my-app',
* directives: [FORM_DIRECTIVES]
* })
* class MyApp {}
* ```
* @stable

@@ -46,0 +34,0 @@ */

@@ -49,16 +49,4 @@ /**

/**
* A list of all the form directives.
*
* A list of all the form directives used as part of a `@Component` annotation.
*
* This is a shorthand for importing them each individually.
*
* ### Example
*
* ```typescript
* @Component({
* selector: 'my-app',
* directives: [FORM_DIRECTIVES]
* })
* class MyApp {}
* ```
* @stable

@@ -65,0 +53,0 @@ */

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

import { ListWrapper } from '../../facade/collection';
import { isBlank } from '../../facade/lang';
import { NG_ASYNC_VALIDATORS, NG_VALIDATORS, Validators } from '../../validators';

@@ -162,3 +161,3 @@ import { ControlContainer } from '../control_container';

FormGroupDirective.prototype._checkFormPresent = function () {
if (isBlank(this.form)) {
if (!this.form) {
ReactiveErrors.missingFormException();

@@ -165,0 +164,0 @@ }

@@ -24,5 +24,5 @@ /**

export function setUpControl(control, dir) {
if (isBlank(control))
if (!control)
_throwError(dir, 'Cannot find control with');
if (isBlank(dir.valueAccessor))
if (!dir.valueAccessor)
_throwError(dir, 'No value accessor for form control with');

@@ -114,3 +114,3 @@ control.validator = Validators.compose([control.validator, dir.validator]);

export function selectValueAccessor(dir, valueAccessors) {
if (isBlank(valueAccessors))
if (!valueAccessors)
return null;

@@ -117,0 +117,0 @@ var defaultAccessor;

@@ -17,20 +17,2 @@ export declare class MapWrapper {

export declare class StringMapWrapper {
static get<V>(map: {
[key: string]: V;
}, key: string): V;
static set<V>(map: {
[key: string]: V;
}, key: string, value: V): void;
static keys(map: {
[key: string]: any;
}): string[];
static values<T>(map: {
[key: string]: T;
}): T[];
static isEmpty(map: {
[key: string]: any;
}): boolean;
static forEach<K, V>(map: {
[key: string]: V;
}, callback: (v: V, K: string) => void): void;
static merge<V>(m1: {

@@ -87,6 +69,1 @@ [key: string]: V;

export declare function iterateListLike(obj: any, fn: Function): void;
export declare class SetWrapper {
static createFromList<T>(lst: T[]): Set<T>;
static has<T>(s: Set<T>, key: T): boolean;
static delete<K>(m: Set<K>, k: K): void;
}

@@ -106,22 +106,2 @@ /**

}
StringMapWrapper.get = function (map, key) {
return map.hasOwnProperty(key) ? map[key] : undefined;
};
StringMapWrapper.set = function (map, key, value) { map[key] = value; };
StringMapWrapper.keys = function (map) { return Object.keys(map); };
StringMapWrapper.values = function (map) {
return Object.keys(map).map(function (k) { return map[k]; });
};
StringMapWrapper.isEmpty = function (map) {
for (var prop in map) {
return false;
}
return true;
};
StringMapWrapper.forEach = function (map, callback) {
for (var _i = 0, _a = Object.keys(map); _i < _a.length; _i++) {
var k = _a[_i];
callback(map[k], k);
}
};
StringMapWrapper.merge = function (m1, m2) {

@@ -320,29 +300,2 @@ var m = {};

}
// Safari and Internet Explorer do not support the iterable parameter to the
// Set constructor. We work around that by manually adding the items.
var createSetFromList = (function () {
var test = new Set([1, 2, 3]);
if (test.size === 3) {
return function createSetFromList(lst) { return new Set(lst); };
}
else {
return function createSetAndPopulateFromList(lst) {
var res = new Set(lst);
if (res.size !== lst.length) {
for (var i = 0; i < lst.length; i++) {
res.add(lst[i]);
}
}
return res;
};
}
})();
export var SetWrapper = (function () {
function SetWrapper() {
}
SetWrapper.createFromList = function (lst) { return createSetFromList(lst); };
SetWrapper.has = function (s, key) { return s.has(key); };
SetWrapper.delete = function (m, k) { m.delete(k); };
return SetWrapper;
}());
//# sourceMappingURL=collection.js.map

@@ -34,4 +34,2 @@

export declare function getTypeNameForDebugging(type: any): string;
export declare var Math: any;
export declare var Date: DateConstructor;
export declare function isPresent(obj: any): boolean;

@@ -50,5 +48,2 @@ export declare function isBlank(obj: any): boolean;

export declare function stringify(token: any): string;
export declare function serializeEnum(val: any): number;
export declare function deserializeEnum(val: any, values: Map<number, any>): any;
export declare function resolveEnumToken(enumValue: any, val: any): string;
export declare class StringWrapper {

@@ -100,10 +95,2 @@ static fromCharCode(code: number): string;

}
export declare class DateWrapper {
static create(year: number, month?: number, day?: number, hour?: number, minutes?: number, seconds?: number, milliseconds?: number): Date;
static fromISOString(str: string): Date;
static fromMillis(ms: number): Date;
static toMillis(date: Date): number;
static now(): Date;
static toJson(date: Date): string;
}
export declare function setValueOnPath(global: any, path: string, value: any): void;

@@ -110,0 +97,0 @@ export declare function getSymbolIterator(): string | symbol;

@@ -29,9 +29,4 @@ /**

export function getTypeNameForDebugging(type) {
if (type['name']) {
return type['name'];
}
return typeof type;
return type['name'] || typeof type;
}
export var Math = _global.Math;
export var Date = _global.Date;
// TODO: remove calls to assert in production environment

@@ -93,15 +88,4 @@ // Note: Can't just export this and import in in other files

var newLineIndex = res.indexOf('\n');
return (newLineIndex === -1) ? res : res.substring(0, newLineIndex);
return newLineIndex === -1 ? res : res.substring(0, newLineIndex);
}
// serialize / deserialize enum exist only for consistency with dart API
// enums in typescript don't need to be serialized
export function serializeEnum(val) {
return val;
}
export function deserializeEnum(val, values) {
return val;
}
export function resolveEnumToken(enumValue, val) {
return enumValue[val];
}
export var StringWrapper = (function () {

@@ -268,21 +252,2 @@ function StringWrapper() {

}());
export var DateWrapper = (function () {
function DateWrapper() {
}
DateWrapper.create = function (year, month, day, hour, minutes, seconds, milliseconds) {
if (month === void 0) { month = 1; }
if (day === void 0) { day = 1; }
if (hour === void 0) { hour = 0; }
if (minutes === void 0) { minutes = 0; }
if (seconds === void 0) { seconds = 0; }
if (milliseconds === void 0) { milliseconds = 0; }
return new Date(year, month - 1, day, hour, minutes, seconds, milliseconds);
};
DateWrapper.fromISOString = function (str) { return new Date(str); };
DateWrapper.fromMillis = function (ms) { return new Date(ms); };
DateWrapper.toMillis = function (date) { return date.getTime(); };
DateWrapper.now = function () { return new Date(); };
DateWrapper.toJson = function (date) { return date.toJSON(); };
return DateWrapper;
}());
export function setValueOnPath(global, path, value) {

@@ -289,0 +254,0 @@ var parts = path.split('.');

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

{"__symbolic":"module","version":1,"metadata":{"Math":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":4,"context":{"name":"_global"}},"Date":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":4,"context":{"name":"_global"}},"isPresent":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"undefined"}},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isBlank":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"undefined"}},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isBoolean":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":87,"character":9},"right":"boolean"}},"isNumber":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":91,"character":9},"right":"number"}},"isString":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":95,"character":9},"right":"string"}},"isFunction":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":99,"character":9},"right":"function"}},"isType":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isFunction"},"arguments":[{"__symbolic":"reference","name":"obj"}]}},"isStringMap":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":107,"character":9},"right":"object"},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isStrictStringMap":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isStringMap"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"getPrototypeOf"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"getPrototypeOf"},"arguments":[{}]}}}},"isArray":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Array"},"member":"isArray"},"arguments":[{"__symbolic":"reference","name":"obj"}]}},"isDate":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"instanceof","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"Date"}},"right":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"obj"},"member":"valueOf"}}]}}}},"serializeEnum":{"__symbolic":"function","parameters":["val"],"value":{"__symbolic":"reference","name":"val"}},"deserializeEnum":{"__symbolic":"function","parameters":["val","values"],"value":{"__symbolic":"reference","name":"val"}},"resolveEnumToken":{"__symbolic":"function","parameters":["enumValue","val"],"value":{"__symbolic":"index","expression":{"__symbolic":"reference","name":"enumValue"},"index":{"__symbolic":"reference","name":"val"}}},"RegExp":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":4,"context":{"name":"_global"}},"looseIdentical":{"__symbolic":"function","parameters":["a","b"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"a"},"right":{"__symbolic":"reference","name":"b"}},"right":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":287,"character":20},"right":"number"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":287,"character":45},"right":"number"}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"a"}]}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"b"}]}}}},"getMapKey":{"__symbolic":"function","parameters":["value"],"value":{"__symbolic":"reference","name":"value"}},"normalizeBlank":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"if","condition":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isBlank"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"thenExpression":null,"elseExpression":{"__symbolic":"reference","name":"obj"}}},"normalizeBool":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"if","condition":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isBlank"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"thenExpression":false,"elseExpression":{"__symbolic":"reference","name":"obj"}}},"isJsObject":{"__symbolic":"function","parameters":["o"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"o"},"right":null},"right":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":305,"character":24},"right":"function"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":305,"character":51},"right":"object"}}}},"isPrimitive":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isJsObject"},"arguments":[{"__symbolic":"reference","name":"obj"}]}}},"hasConstructor":{"__symbolic":"function","parameters":["value","type"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"value"},"member":"constructor"},"right":{"__symbolic":"reference","name":"type"}}},"escape":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":4,"context":{"name":"_global"}}},"escapeRegExp":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"error","message":"Expression form not supported","line":402,"character":19}}}}
{"__symbolic":"module","version":1,"metadata":{"getTypeNameForDebugging":{"__symbolic":"function","parameters":["type"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"index","expression":{"__symbolic":"reference","name":"type"},"index":"name"},"right":{"__symbolic":"error","message":"Expression form not supported","line":61,"character":25}}},"isPresent":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"undefined"}},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isBlank":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"undefined"}},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isBoolean":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":80,"character":9},"right":"boolean"}},"isNumber":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":84,"character":9},"right":"number"}},"isString":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":88,"character":9},"right":"string"}},"isFunction":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":92,"character":9},"right":"function"}},"isType":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isFunction"},"arguments":[{"__symbolic":"reference","name":"obj"}]}},"isStringMap":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":100,"character":9},"right":"object"},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isStrictStringMap":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isStringMap"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"getPrototypeOf"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"getPrototypeOf"},"arguments":[{}]}}}},"isArray":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Array"},"member":"isArray"},"arguments":[{"__symbolic":"reference","name":"obj"}]}},"isDate":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"instanceof","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"Date"}},"right":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"obj"},"member":"valueOf"}}]}}}},"RegExp":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":4,"context":{"name":"_global"}},"looseIdentical":{"__symbolic":"function","parameters":["a","b"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"a"},"right":{"__symbolic":"reference","name":"b"}},"right":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":265,"character":20},"right":"number"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":265,"character":45},"right":"number"}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"a"}]}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"b"}]}}}},"getMapKey":{"__symbolic":"function","parameters":["value"],"value":{"__symbolic":"reference","name":"value"}},"normalizeBlank":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"if","condition":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isBlank"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"thenExpression":null,"elseExpression":{"__symbolic":"reference","name":"obj"}}},"normalizeBool":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"if","condition":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isBlank"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"thenExpression":false,"elseExpression":{"__symbolic":"reference","name":"obj"}}},"isJsObject":{"__symbolic":"function","parameters":["o"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"o"},"right":null},"right":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":283,"character":24},"right":"function"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":283,"character":51},"right":"object"}}}},"isPrimitive":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isJsObject"},"arguments":[{"__symbolic":"reference","name":"obj"}]}}},"hasConstructor":{"__symbolic":"function","parameters":["value","type"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"value"},"member":"constructor"},"right":{"__symbolic":"reference","name":"type"}}},"escape":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":4,"context":{"name":"_global"}}},"escapeRegExp":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"error","message":"Expression form not supported","line":367,"character":19}}}}

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

import { Injectable } from '@angular/core';
import { StringMapWrapper } from './facade/collection';
import { isArray, isPresent } from './facade/lang';

@@ -45,4 +44,4 @@ import { FormArray, FormControl, FormGroup } from './model';

var controls = this._reduceControls(controlsConfig);
var validator = isPresent(extra) ? StringMapWrapper.get(extra, 'validator') : null;
var asyncValidator = isPresent(extra) ? StringMapWrapper.get(extra, 'asyncValidator') : null;
var validator = isPresent(extra) ? extra['validator'] : null;
var asyncValidator = isPresent(extra) ? extra['asyncValidator'] : null;
return new FormGroup(controls, validator, asyncValidator);

@@ -78,4 +77,4 @@ };

var controls = {};
StringMapWrapper.forEach(controlsConfig, function (controlConfig, controlName) {
controls[controlName] = _this._createControl(controlConfig);
Object.keys(controlsConfig).forEach(function (controlName) {
controls[controlName] = _this._createControl(controlsConfig[controlName]);
});

@@ -82,0 +81,0 @@ return controls;

@@ -331,2 +331,4 @@ import { AsyncValidatorFn, ValidatorFn } from './directives/validators';

* which includes both the value and whether or not the control is disabled.
* You can't use the value key without the disabled key; both are required
* to use this way of initialization.
*

@@ -333,0 +335,0 @@ * ```ts

@@ -16,3 +16,3 @@ /**

import { EventEmitter } from './facade/async';
import { ListWrapper, StringMapWrapper } from './facade/collection';
import { ListWrapper } from './facade/collection';
import { isBlank, isPresent, isStringMap, normalizeBool } from './facade/lang';

@@ -480,3 +480,3 @@ import { isPromise } from './private_import_core';

if (isPresent(control) && isPresent(control._errors)) {
return StringMapWrapper.get(control._errors, errorCode);
return control._errors[errorCode];
}

@@ -592,2 +592,4 @@ else {

* which includes both the value and whether or not the control is disabled.
* You can't use the value key without the disabled key; both are required
* to use this way of initialization.
*

@@ -892,5 +894,5 @@ * ```ts

this._checkAllValuesPresent(value);
StringMapWrapper.forEach(value, function (newValue, name) {
Object.keys(value).forEach(function (name) {
_this._throwIfControlMissing(name);
_this.controls[name].setValue(newValue, { onlySelf: true });
_this.controls[name].setValue(value[name], { onlySelf: true });
});

@@ -923,5 +925,5 @@ this.updateValueAndValidity({ onlySelf: onlySelf });

var onlySelf = (_a === void 0 ? {} : _a).onlySelf;
StringMapWrapper.forEach(value, function (newValue, name) {
Object.keys(value).forEach(function (name) {
if (_this.controls[name]) {
_this.controls[name].patchValue(newValue, { onlySelf: true });
_this.controls[name].patchValue(value[name], { onlySelf: true });
}

@@ -996,3 +998,4 @@ });

FormGroup.prototype._forEachChild = function (cb) {
StringMapWrapper.forEach(this.controls, cb);
var _this = this;
Object.keys(this.controls).forEach(function (k) { return cb(_this.controls[k], k); });
};

@@ -999,0 +1002,0 @@ /** @internal */

@@ -91,4 +91,2 @@ /**

return function (control) {
if (isPresent(Validators.required(control)))
return null;
var regex = new RegExp("^" + pattern + "$");

@@ -109,3 +107,3 @@ var v = control.value;

Validators.compose = function (validators) {
if (isBlank(validators))
if (!validators)
return null;

@@ -120,3 +118,3 @@ var presentValidators = validators.filter(isPresent);

Validators.composeAsync = function (validators) {
if (isBlank(validators))
if (!validators)
return null;

@@ -146,4 +144,4 @@ var presentValidators = validators.filter(isPresent);

}, {});
return StringMapWrapper.isEmpty(res) ? null : res;
return Object.keys(res).length === 0 ? null : res;
}
//# sourceMappingURL=validators.js.map

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

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

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