@anglify/components
Advanced tools
Comparing version 0.4.0 to 0.4.1
@@ -32,3 +32,3 @@ import { __decorate } from "tslib"; | ||
this.valid$ = merge(this.statusChanged$, this.inputEvent$, fromEvent(this.nativeElement, 'focusout')).pipe(startWith(false), switchMap((_, index) => { | ||
var _a, _b; | ||
var _a, _b, _c; | ||
const value = this.nativeElement.value; | ||
@@ -40,2 +40,5 @@ const length = value.length; | ||
const pattern = this.nativeElement.getAttribute('pattern'); | ||
if ((_a = this.ngControl) === null || _a === void 0 ? void 0 : _a.disabled) { | ||
return of(null); | ||
} | ||
// these checks must be ignored on first emit, because of startWith(false) | ||
@@ -48,3 +51,3 @@ if (index > 0) { | ||
} | ||
return of((_b = (_a = this.ngControl.errors) === null || _a === void 0 ? void 0 : _a.message) !== null && _b !== void 0 ? _b : 'This field is invalid'); | ||
return of((_c = (_b = this.ngControl.errors) === null || _b === void 0 ? void 0 : _b.message) !== null && _c !== void 0 ? _c : 'This field is invalid'); | ||
} | ||
@@ -104,2 +107,2 @@ // If no reactive forms or if reactive form valid, validate native validation | ||
}] }]; } }); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5wdXQuZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYW5nbGlmeS9zcmMvbW9kdWxlcy9mb3JtLWZpZWxkL2RpcmVjdGl2ZXMvaW5wdXQuZGlyZWN0aXZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFzQixRQUFRLEVBQUUsSUFBSSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzlFLE9BQU8sRUFBRSxZQUFZLEVBQUUsb0JBQW9CLEVBQUUsR0FBRyxFQUFFLFdBQVcsRUFBRSxTQUFTLEVBQUUsU0FBUyxFQUFFLE1BQU0sZ0JBQWdCLENBQU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7XG4gICAgICBhYnN0cmFjdENvbnRyb2w/LnN0YXR1c0NoYW5nZXMucGlwZSh1bnRpbERlc3Ryb3llZCh0aGlzKSkuc3Vic2NyaWJlKCgpID0+IHRoaXMuc3RhdHVzQ2hhbmdlZCQubmV4dCgpKTtcbiAgICB9XG4gIH1cbn1cbiJdfQ== |
{ | ||
"name": "@anglify/components", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"peerDependencies": { | ||
@@ -5,0 +5,0 @@ "@angular/common": "^12.1.0", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
888177
5540