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

ng-recaptcha

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng-recaptcha - npm Package Compare versions

Comparing version 2.2.0 to 3.0.0

15

CHANGELOG.md

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

<a name="3.0.0"></a>
# [3.0.0](https://github.com/DethAriel/ng-recaptcha/compare/v2.2.0...v3.0.0) (2017-08-30)
### Bug Fixes
* **component:** fix server-side rendering ([7a5bc6c](https://github.com/DethAriel/ng-recaptcha/commit/7a5bc6c)), closes [#34](https://github.com/DethAriel/ng-recaptcha/issues/34)
### BREAKING CHANGES
* **component:** Angular v2.x.x is no longer supported due to dependency on Platform capabilities that were added in [v4.0.0-rc.1](https://github.com/angular/angular/blob/master/CHANGELOG.md#features-20)
<a name="2.2.0"></a>

@@ -2,0 +17,0 @@ # [2.2.0](https://github.com/DethAriel/ng-recaptcha/compare/v2.1.1...v2.2.0) (2017-08-18)

6

package.json
{
"name": "ng-recaptcha",
"version": "2.2.0",
"version": "3.0.0",
"description": "Angular component for Google reCAPTCHA",

@@ -38,3 +38,3 @@ "scripts": {

"peerDependencies": {
"@angular/core": "^4.0.0 || ^2.0.0"
"@angular/core": "^4.0.0 || ^5.0.0-beta.1"
},

@@ -56,3 +56,3 @@ "devDependencies": {

"rxjs": "^5.2.0",
"tslint": "^5.1.0",
"tslint": "~5.7.0",
"typescript": "^2.2.1",

@@ -59,0 +59,0 @@ "zone.js": "^0.8.5"

/// <reference types="grecaptcha" />
import { OpaqueToken } from '@angular/core';
import 'rxjs/add/observable/of';
import { Observable } from 'rxjs/Observable';
export declare const RECAPTCHA_LANGUAGE: OpaqueToken;
export declare class RecaptchaLoaderService {
private readonly platformId;
ready: Observable<ReCaptchaV2.ReCaptcha>;
constructor(language?: string);
constructor(platformId: {}, language?: string);
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var common_1 = require("@angular/common");
var core_1 = require("@angular/core");
require("rxjs/add/observable/of");
var BehaviorSubject_1 = require("rxjs/BehaviorSubject");
var Observable_1 = require("rxjs/Observable");
exports.RECAPTCHA_LANGUAGE = new core_1.OpaqueToken('recaptcha-language');
var RecaptchaLoaderService = (function () {
function RecaptchaLoaderService(language) {
function RecaptchaLoaderService(platformId, language) {
this.platformId = platformId;
this.language = language;
this.init();
this.ready = RecaptchaLoaderService.ready.asObservable();
this.ready = common_1.isPlatformBrowser(this.platformId) ? RecaptchaLoaderService.ready.asObservable() : Observable_1.Observable.of();
}

@@ -17,13 +21,15 @@ /** @internal */

}
window.ng2recaptchaloaded = function () {
RecaptchaLoaderService.ready.next(grecaptcha);
};
RecaptchaLoaderService.ready = new BehaviorSubject_1.BehaviorSubject(null);
var script = document.createElement('script');
script.innerHTML = '';
var langParam = this.language ? '&hl=' + this.language : '';
script.src = "https://www.google.com/recaptcha/api.js?render=explicit&onload=ng2recaptchaloaded" + langParam;
script.async = true;
script.defer = true;
document.head.appendChild(script);
if (common_1.isPlatformBrowser(this.platformId)) {
window.ng2recaptchaloaded = function () {
RecaptchaLoaderService.ready.next(grecaptcha);
};
RecaptchaLoaderService.ready = new BehaviorSubject_1.BehaviorSubject(null);
var script = document.createElement('script');
script.innerHTML = '';
var langParam = this.language ? '&hl=' + this.language : '';
script.src = "https://www.google.com/recaptcha/api.js?render=explicit&onload=ng2recaptchaloaded" + langParam;
script.async = true;
script.defer = true;
document.head.appendChild(script);
}
};

@@ -35,2 +41,3 @@ RecaptchaLoaderService.decorators = [

RecaptchaLoaderService.ctorParameters = function () { return [
{ type: undefined, decorators: [{ type: core_1.Inject, args: [core_1.PLATFORM_ID,] },] },
{ type: undefined, decorators: [{ type: core_1.Optional }, { type: core_1.Inject, args: [exports.RECAPTCHA_LANGUAGE,] },] },

@@ -37,0 +44,0 @@ ]; };

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

[{"__symbolic":"module","version":3,"metadata":{"RECAPTCHA_LANGUAGE":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"OpaqueToken"},"arguments":["recaptcha-language"]},"RecaptchaLoaderService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","name":"RECAPTCHA_LANGUAGE"}]}]],"parameters":[{"__symbolic":"reference","name":"string"}]}],"init":[{"__symbolic":"method"}]},"statics":{"ready":{"__symbolic":"error","message":"Variable not initialized","line":17,"character":17}}}}},{"__symbolic":"module","version":1,"metadata":{"RECAPTCHA_LANGUAGE":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"OpaqueToken"},"arguments":["recaptcha-language"]},"RecaptchaLoaderService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","name":"RECAPTCHA_LANGUAGE"}]}]],"parameters":[{"__symbolic":"reference","name":"string"}]}],"init":[{"__symbolic":"method"}]},"statics":{"ready":{"__symbolic":"error","message":"Variable not initialized","line":17,"character":17}}}}}]
[{"__symbolic":"module","version":3,"metadata":{"RECAPTCHA_LANGUAGE":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"OpaqueToken"},"arguments":["recaptcha-language"]},"RecaptchaLoaderService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"@angular/core","name":"PLATFORM_ID"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","name":"RECAPTCHA_LANGUAGE"}]}]],"parameters":[{"__symbolic":"error","message":"Expression form not supported","line":28,"character":54},{"__symbolic":"reference","name":"string"}]}],"init":[{"__symbolic":"method"}]},"statics":{"ready":{"__symbolic":"error","message":"Variable not initialized","line":20,"character":17}}}}},{"__symbolic":"module","version":1,"metadata":{"RECAPTCHA_LANGUAGE":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"OpaqueToken"},"arguments":["recaptcha-language"]},"RecaptchaLoaderService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"@angular/core","name":"PLATFORM_ID"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","name":"RECAPTCHA_LANGUAGE"}]}]],"parameters":[{"__symbolic":"error","message":"Expression form not supported","line":28,"character":54},{"__symbolic":"reference","name":"string"}]}],"init":[{"__symbolic":"method"}]},"statics":{"ready":{"__symbolic":"error","message":"Variable not initialized","line":20,"character":17}}}}}]
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