@matt-block/react-recaptcha-v2
Advanced tools
Comparing version 1.0.2 to 1.0.3
import React, { Component } from 'react'; | ||
import nanoid from 'nanoid'; | ||
/*! ***************************************************************************** | ||
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 | ||
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. | ||
See the Apache Version 2.0 License for specific language governing permissions | ||
and limitations under the License. | ||
***************************************************************************** */ | ||
/* global Reflect, Promise */ | ||
var extendStatics = function(d, b) { | ||
@@ -22,2 +38,3 @@ extendStatics = Object.setPrototypeOf || | ||
_this.scriptSrc = "https://www.google.com/recaptcha/api.js"; | ||
_this.testSiteKey = "6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI"; | ||
_this.observer = new MutationObserver(_this.mutationCallbackGenerator()); | ||
@@ -107,3 +124,4 @@ _this.hiddenDiv = document.createElement("div"); | ||
ReCaptcha.prototype.render = function () { | ||
return (React.createElement("div", { id: this.id, className: "g-recaptcha", "data-sitekey": this.props.siteKey, "data-theme": this.props.theme, "data-size": this.props.size, "data-callback": this.successCallbackId, "data-expired-callback": this.expiredCallbackId, "data-error-callback": this.errorCallbackId })); | ||
var _a = this.props, siteKey = _a.siteKey, theme = _a.theme, size = _a.size; | ||
return (React.createElement("div", { id: this.id, className: "g-recaptcha", "data-sitekey": siteKey === "test" ? this.testSiteKey : siteKey, "data-theme": theme, "data-size": size, "data-callback": this.successCallbackId, "data-expired-callback": this.expiredCallbackId, "data-error-callback": this.errorCallbackId })); | ||
}; | ||
@@ -110,0 +128,0 @@ return ReCaptcha; |
{ | ||
"name": "@matt-block/react-recaptcha-v2", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Google reCAPTCHA v2 React component that does not pollute the DOM", | ||
@@ -28,3 +28,3 @@ "main": "lib/index.esm.js", | ||
"dependencies": { | ||
"nanoid": "^1.2.6" | ||
"nanoid": "^2.0.0" | ||
}, | ||
@@ -31,0 +31,0 @@ "peerDependencies": { |
@@ -12,2 +12,3 @@ import { Component } from "react"; | ||
private scriptSrc; | ||
private testSiteKey; | ||
private observer; | ||
@@ -14,0 +15,0 @@ private hiddenDiv; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14462
153
1
+ Addednanoid@2.1.11(transitive)
- Removednanoid@1.3.4(transitive)
Updatednanoid@^2.0.0