react-recaptcha
Advanced tools
Comparing version 2.2.4 to 2.2.5
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.ReactRecaptcha=t(require("react")):e.ReactRecaptcha=t(e.React)}(this,function(e){return function(e){function t(a){if(r[a])return r[a].exports;var o=r[a]={exports:{},id:a,loaded:!1};return e[a].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function a(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var p=function(){function e(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,r,a){return r&&e(t.prototype,r),a&&e(t,a),t}}(),s=r(1),c=a(s),l={className:s.PropTypes.string,onloadCallbackName:s.PropTypes.string,elementID:s.PropTypes.string,onloadCallback:s.PropTypes.func,verifyCallback:s.PropTypes.func,expiredCallback:s.PropTypes.func,render:s.PropTypes.string,sitekey:s.PropTypes.string,theme:s.PropTypes.string,type:s.PropTypes.string,verifyCallbackName:s.PropTypes.string,expiredCallbackName:s.PropTypes.string,size:s.PropTypes.string,tabindex:s.PropTypes.string},d={elementID:"g-recaptcha",onloadCallback:void 0,onloadCallbackName:"onloadCallback",verifyCallback:void 0,verifyCallbackName:"verifyCallback",expiredCallback:void 0,expiredCallbackName:"expiredCallback",render:"onload",theme:"light",type:"image",size:"normal",tabindex:"0"},u=function(){return"undefined"!=typeof window&&"undefined"!=typeof window.grecaptcha},f=void 0,y=function(e){function t(e){o(this,t);var r=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r._renderGrecaptcha=r._renderGrecaptcha.bind(r),r.reset=r.reset.bind(r),r.state={ready:u()},r.state.ready||(f=setInterval(r._updateReadyState.bind(r),1e3)),r}return i(t,e),p(t,[{key:"componentDidMount",value:function(){this.state.ready&&this._renderGrecaptcha()}},{key:"componentDidUpdate",value:function(e,t){var r=this.props,a=r.render,o=r.onloadCallback;"explicit"===a&&o&&this.state.ready&&!t.ready&&this._renderGrecaptcha()}},{key:"reset",value:function(){this.state.ready&&grecaptcha.reset()}},{key:"_updateReadyState",value:function(){u()&&(this.setState({ready:!0}),clearInterval(f))}},{key:"_renderGrecaptcha",value:function(){grecaptcha.render(this.props.elementID,{sitekey:this.props.sitekey,callback:this.props.verifyCallback?this.props.verifyCallback:void 0,theme:this.props.theme,type:this.props.type,size:this.props.size,tabindex:this.props.tabindex,"expired-callback":this.props.expiredCallback?this.props.expiredCallback:void 0}),this.props.onloadCallback()}},{key:"render",value:function(){return"explicit"===this.props.render&&this.props.onloadCallback?c["default"].createElement("div",{id:this.props.elementID,"data-onloadcallbackname":this.props.onloadCallbackName,"data-verifycallbackname":this.props.verifyCallbackName}):c["default"].createElement("div",{className:"g-recaptcha","data-sitekey":this.props.sitekey,"data-theme":this.props.theme,"data-type":this.props.type,"data-size":this.props.size,"data-tabindex":this.props.tabindex})}}]),t}(s.Component);t["default"]=y,y.propTypes=l,y.defaultProps=d,e.exports=t["default"]},function(t,r){t.exports=e}])}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.ReactRecaptcha=t(require("react")):e.ReactRecaptcha=t(e.React)}(this,function(e){return function(e){function t(r){if(a[r])return a[r].exports;var n=a[r]={exports:{},id:r,loaded:!1};return e[r].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var a={};return t.m=e,t.c=a,t.p="",t(0)}([function(e,t,a){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var p=function(){function e(e,t){for(var a=0;a<t.length;a++){var r=t[a];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,a,r){return a&&e(t.prototype,a),r&&e(t,r),t}}(),s=a(1),l=r(s),c={className:s.PropTypes.string,onloadCallbackName:s.PropTypes.string,elementID:s.PropTypes.string,onloadCallback:s.PropTypes.func,verifyCallback:s.PropTypes.func,expiredCallback:s.PropTypes.func,render:s.PropTypes.string,sitekey:s.PropTypes.string,theme:s.PropTypes.string,type:s.PropTypes.string,verifyCallbackName:s.PropTypes.string,expiredCallbackName:s.PropTypes.string,size:s.PropTypes.string,tabindex:s.PropTypes.string},d={elementID:"g-recaptcha",onloadCallback:void 0,onloadCallbackName:"onloadCallback",verifyCallback:void 0,verifyCallbackName:"verifyCallback",expiredCallback:void 0,expiredCallbackName:"expiredCallback",render:"onload",theme:"light",type:"image",size:"normal",tabindex:"0"},u=function(){return"undefined"!=typeof window&&"undefined"!=typeof window.grecaptcha},f=void 0,y=function(e){function t(e){n(this,t);var a=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return a._renderGrecaptcha=a._renderGrecaptcha.bind(a),a.reset=a.reset.bind(a),a.state={ready:u()},a.state.ready||(f=setInterval(a._updateReadyState.bind(a),1e3)),a}return i(t,e),p(t,[{key:"componentDidMount",value:function(){this.state.ready&&this._renderGrecaptcha()}},{key:"componentDidUpdate",value:function(e,t){var a=this.props,r=a.render,n=a.onloadCallback;"explicit"===r&&n&&this.state.ready&&!t.ready&&this._renderGrecaptcha()}},{key:"componentWillUnmount",value:function(){clearInterval(f)}},{key:"reset",value:function(){this.state.ready&&grecaptcha.reset()}},{key:"_updateReadyState",value:function(){u()&&(this.setState({ready:!0}),clearInterval(f))}},{key:"_renderGrecaptcha",value:function(){grecaptcha.render(this.props.elementID,{sitekey:this.props.sitekey,callback:this.props.verifyCallback?this.props.verifyCallback:void 0,theme:this.props.theme,type:this.props.type,size:this.props.size,tabindex:this.props.tabindex,"expired-callback":this.props.expiredCallback?this.props.expiredCallback:void 0}),this.props.onloadCallback()}},{key:"render",value:function(){return"explicit"===this.props.render&&this.props.onloadCallback?l["default"].createElement("div",{id:this.props.elementID,"data-onloadcallbackname":this.props.onloadCallbackName,"data-verifycallbackname":this.props.verifyCallbackName}):l["default"].createElement("div",{className:"g-recaptcha","data-sitekey":this.props.sitekey,"data-theme":this.props.theme,"data-type":this.props.type,"data-size":this.props.size,"data-tabindex":this.props.tabindex})}}]),t}(s.Component);t["default"]=y,y.propTypes=c,y.defaultProps=d,e.exports=t["default"]},function(t,a){t.exports=e}])}); |
{ | ||
"name": "react-recaptcha", | ||
"version": "2.2.4", | ||
"version": "2.2.5", | ||
"description": "A react.js reCAPTCHA for Google", | ||
@@ -5,0 +5,0 @@ "main": "dist/react-recaptcha.js", |
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
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
19401