@smartsoft001/angular 1.1.799 → 1.1.800

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4733,8 +4733,18 @@
4733
4733
  ]);
4734
4734
  };
4735
4735
  InputPasswordComponent.prototype.onChangePasswordStrength = function (valid) {
4736
+ var _a;
4736
4737
  this.valid = valid;
4737
- this.control.updateValueAndValidity();
4738
+ if (this.valid) {
4739
+ if ((_a = this.control.errors) === null || _a === void 0 ? void 0 : _a.passwordStrength) {
4740
+ this.control.setErrors(Object.keys(this.control.errors).length === 1 ?
4741
+ null : Object.assign(Object.assign({}, this.control.errors), { passwordStrength: null }));
4742
+ }
4743
+ }
4744
+ else {
4745
+ var errors = this.control.errors ? Object.assign(Object.assign({}, this.control.errors), { passwordStrength: true }) : { passwordStrength: true };
4746
+ this.control.setErrors(errors);
4747
+ }
4738
4748
  };
4739
4749
  return InputPasswordComponent;
4740
4750
  }(InputBaseComponent));