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

react-recaptcha-x

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-recaptcha-x - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

dist/reCaptchaV2/component/ReCaptchaV2.test.d.ts

35

CHANGELOG.md

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

## [1.0.4](https://github.com/antokara/react-recaptcha-x/compare/v1.0.3...v1.0.4) (2019-07-11)
### Bug Fixes
* **provider and components:** fix context prop type requirement ([34ed67c](https://github.com/antokara/react-recaptcha-x/commit/34ed67c))
* **recaptcha v2:** optional props ([5461afc](https://github.com/antokara/react-recaptcha-x/commit/5461afc))
* **recaptcha v2 interface props:** add html div props ([1e531f1](https://github.com/antokara/react-recaptcha-x/commit/1e531f1))
## [1.0.3](https://github.com/antokara/react-recaptcha-x/compare/v1.0.2...v1.0.3) (2019-07-05)

@@ -7,1 +16,27 @@

* **semantic release:** release notes ([66e441f](https://github.com/antokara/react-recaptcha-x/commit/66e441f))
## [1.0.2](https://github.com/antokara/react-recaptcha-x/compare/v1.0.1...v1.0.2) (2019-07-04)
### Bug Fixes
* **semantic release:** plugins order ([f047841](https://github.com/antokara/react-recaptcha-x/commit/f047841))
## [1.0.1](https://github.com/antokara/react-recaptcha-x/compare/v1.0.0...v1.0.1) (2019-07-04)
### Bug Fixes
* **package json:** enable npmPublish ([dbf77b5](https://github.com/antokara/react-recaptcha-x/commit/dbf77b5))
# [1.0.0](https://github.com/antokara/react-recaptcha-x/compare/1.0.0-beta.0...v1.0.0) (2019-07-04)
### Bug Fixes
* **examples:** titles ([a80b75a](https://github.com/antokara/react-recaptcha-x/commit/a80b75a))
# 1.0.0-beta.0 (2018-06-23)
* Initial Release

2

dist/index.js

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

module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=5)}([function(e,t){e.exports=require("react")},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";n.r(t);var r=n(0),o=r.createContext({siteKeyV2:"",siteKeyV3:"",loaded:!1});function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var n,r=0;r<t.length;r++)(n=t[r]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var f,p,s,y=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?u(e):t}(this,a(t).call(this,e))).state={loaded:!1},n.onLoadHandler=n.onLoadHandler.bind(u(n)),window.GoogleReCaptcha_onload=n.onLoadHandler,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(t,r["Component"]),function(e,t,n){t&&c(e.prototype,t),n&&c(e,n)}(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.siteKeyV3,n=void 0===t?"explicit":t,r=e.langCode,o=void 0===r?"":r,i=e.hideV3Badge;if("undefined"==typeof grecaptcha){var c=document.createElement("script");c.src="https://www.google.com/recaptcha/api.js?render=".concat(n,"&onload=GoogleReCaptcha_onload&hl=").concat(o),c.async=!0,c.defer=!0,document.body.appendChild(c)}if(void 0!==i&&i){var a=document.createElement("style");a.innerHTML=".grecaptcha-badge{display: none;}",document.body.appendChild(a)}}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.siteKeyV3,i=e.siteKeyV2,c=this.state.loaded;return r.createElement(o.Provider,{value:{siteKeyV2:i,siteKeyV3:n,loaded:c}},t)}},{key:"onLoadHandler",value:function(){delete window.GoogleReCaptcha_onload,this.setState({loaded:!0})}}]),t}();(p=f||(f={})).Normal="normal",p.Compact="compact",function(e){e.Light="light",e.Dark="dark"}(s||(s={}));var b=n(1),d=n(2);function h(e){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function v(e,t){for(var n,r=0;r<t.length;r++)(n=t[r]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}function m(e,t){return!t||"object"!==h(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function O(e,t){return(O=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function k(){return(k=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)}var C=function(e){return function(t){function n(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),m(this,g(n).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&O(e,t)}(n,r["Component"]),function(e,t,n){t&&v(e.prototype,t),n&&v(e,n)}(n,[{key:"render",value:function(){return r.createElement(o.Consumer,null,function(e,t){return function(n){return r.createElement(e,k({},t,{providerContext:n}))}}(e,this.props))}}]),n}()};n(3);function w(e){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function j(){return(j=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)}function _(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],0<=t.indexOf(n)||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(0<=t.indexOf(n))&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function x(e,t){for(var n,r=0;r<t.length;r++)(n=t[r]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function P(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var T=C(function(e){function t(e){var n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),!(n=function(e,t){return!t||"object"!==w(t)&&"function"!=typeof t?P(e):t}(this,S(t).call(this,e))).props.providerContext.siteKeyV2)throw new Error('The prop "siteKeyV2" must be set on the ReCaptchaProvider before using the ReCaptchaV2 component');return n.state={ref:r.createRef(),widgetId:void 0,token:void 0,expired:!1,error:!1},n.successCallback=n.successCallback.bind(P(n)),n.expiredCallback=n.expiredCallback.bind(P(n)),n.errorCallback=n.errorCallback.bind(P(n)),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&E(e,t)}(t,r["Component"]),function(e,t,n){t&&x(e.prototype,t),n&&x(e,n)}(t,[{key:"componentDidUpdate",value:function(e){var t=this.state.ref,n=this.props.providerContext,r=n.loaded,o=n.siteKeyV2,i=this.props,c=i.theme,a=i.size,u=i.tabindex;e.providerContext.loaded!==r&&r&&t.current&&o&&this.setState({expired:!1,error:!1,widgetId:grecaptcha.render(t.current,{sitekey:o,callback:this.successCallback,"expired-callback":this.expiredCallback,"error-callback":this.errorCallback,theme:c,size:a,tabindex:u})})}},{key:"render",value:function(){var e=this.state.ref,t=this.props,n=(t.theme,t.callback,t.size,t.tabindex,t.providerContext,_(t,["theme","callback","size","tabindex","providerContext"]));return r.createElement("div",j({ref:e},n))}},{key:"successCallback",value:function(e){var t=this.props.callback;this.setState({token:e,expired:!1,error:!1},function(){t(e)})}},{key:"expiredCallback",value:function(){var e=this.props.callback;this.setState({expired:!0},function(){e(!1)})}},{key:"errorCallback",value:function(){var e=this.props.callback;this.setState({error:!0},function(){e(new Error)})}}]),t}());n(4);function V(e){return(V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function R(e,t){for(var n,r=0;r<t.length;r++)(n=t[r]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}function K(e){return(K=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function L(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function M(e,t){return(M=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var z=C(function(e){function t(e){var n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),!(n=function(e,t){return!t||"object"!==V(t)&&"function"!=typeof t?L(e):t}(this,K(t).call(this,e))).props.providerContext.siteKeyV3)throw new Error('The prop "siteKeyV3" must be set on the ReCaptchaProvider before using the ReCaptchaV3 component');return n.state={token:void 0,retrieving:!1},n.getToken=n.getToken.bind(L(n)),n.getToken(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&M(e,t)}(t,r["Component"]),function(e,t,n){t&&R(e.prototype,t),n&&R(e,n)}(t,[{key:"componentDidUpdate",value:function(e){var t=this.props.providerContext.loaded;e.providerContext.loaded!==t&&t&&this.getToken()}},{key:"render",value:function(){return!1}},{key:"getToken",value:function(){var e=this,t=this.props.providerContext,n=t.loaded,r=t.siteKeyV3,o=this.state.retrieving,i=this.props,c=i.action,a=i.callback;n&&!o&&r&&this.setState({token:void 0,retrieving:!0},function(){a(),grecaptcha.execute(r,{action:c}).then(function(t){e.setState({token:t,retrieving:!1},function(){a(t)})})})}}]),t}());n.d(t,"EReCaptchaV2Theme",function(){return s}),n.d(t,"EReCaptchaV2Size",function(){return f}),n.d(t,"ReCaptchaProvider",function(){return y}),n.d(t,"ReCaptchaV2",function(){return T}),n.d(t,"ReCaptchaV3",function(){return z}),n.d(t,"TReCaptchaV2Callback",function(){return b.TCallback}),n.d(t,"TReCaptchaV3Callback",function(){return d.TCallback})}]);
module.exports=function(e){var t={};function r(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=5)}([function(e,t){e.exports=require("react")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(0).createContext({siteKeyV2:"",siteKeyV3:"",loaded:!1});t.Context=o},function(e,t,r){"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.Normal="normal",e.Compact="compact"}(o||(o={})),t.ESize=o},function(e,t,r){"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.Light="light",e.Dark="dark"}(o||(o={})),t.ETheme=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(0),n=r(1);t.withContext=e=>(class extends o.Component{render(){return o.createElement(n.Context.Consumer,null,((e,t)=>r=>o.createElement(e,Object.assign({},t,{providerContext:r})))(e,this.props))}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(6);t.ReCaptchaProvider=o.ReCaptchaProvider;const n=r(2);t.EReCaptchaV2Size=n.ESize;const i=r(3);t.EReCaptchaV2Theme=i.ETheme;const s=r(7);t.ReCaptchaV2=s.ReCaptchaV2;const a=r(9);t.ReCaptchaV3=a.ReCaptchaV3},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(0),n=r(1);t.ReCaptchaProvider=class extends o.Component{constructor(e){super(e),this.state={loaded:!1},this.onLoadHandler=this.onLoadHandler.bind(this),window.GoogleReCaptcha_onload=this.onLoadHandler}componentDidMount(){const{siteKeyV3:e="explicit",langCode:t="",hideV3Badge:r=!1}=this.props;if("undefined"==typeof grecaptcha){const r=document.createElement("script");r.src=`https://www.google.com/recaptcha/api.js?render=${e}&onload=GoogleReCaptcha_onload&hl=${t}`,r.async=!0,r.defer=!0,document.body.appendChild(r)}if(r){const e=document.createElement("style");e.innerHTML=".grecaptcha-badge{display: none;}",document.body.appendChild(e)}}render(){const{children:e,siteKeyV3:t,siteKeyV2:r}=this.props,{loaded:i}=this.state,s={siteKeyV2:r,siteKeyV3:t,loaded:i};return o.createElement(n.Context.Provider,{value:s},e)}onLoadHandler(){delete window.GoogleReCaptcha_onload,this.setState({loaded:!0})}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(4),n=r(8),i=o.withContext(n.ReCaptchaV2);t.ReCaptchaV2=i},function(e,t,r){"use strict";var o=this&&this.__rest||function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]])}return r};Object.defineProperty(t,"__esModule",{value:!0});const n=r(0),i=r(2),s=r(3);class a extends n.Component{constructor(e){super(e);const{siteKeyV2:t}=this.props.providerContext;if(!t)throw new Error('The prop "siteKeyV2" must be set on the ReCaptchaProvider before using the ReCaptchaV2 component');this.state={ref:n.createRef(),widgetId:void 0,token:void 0,expired:!1,error:!1},this.successCallback=this.successCallback.bind(this),this.expiredCallback=this.expiredCallback.bind(this),this.errorCallback=this.errorCallback.bind(this)}componentDidUpdate(e){const{ref:t}=this.state,{loaded:r,siteKeyV2:o}=this.props.providerContext,{theme:n,size:i,tabindex:s}=this.props;e.providerContext.loaded!==r&&r&&t.current&&o&&this.setState({expired:!1,error:!1,widgetId:grecaptcha.render(t.current,{sitekey:o,callback:this.successCallback,"expired-callback":this.expiredCallback,"error-callback":this.errorCallback,theme:n,size:i,tabindex:s})})}render(){const{ref:e}=this.state,t=this.props,{theme:r,callback:i,size:s,tabindex:a,providerContext:c}=t,d=o(t,["theme","callback","size","tabindex","providerContext"]);return n.createElement("div",Object.assign({ref:e},d))}successCallback(e){const{callback:t}=this.props;this.setState({token:e,expired:!1,error:!1},()=>{t(e)})}expiredCallback(){const{callback:e}=this.props;this.setState({expired:!0},()=>{e(!1)})}errorCallback(){const{callback:e}=this.props;this.setState({error:!0},()=>{e(new Error)})}}a.defaultProps={theme:s.ETheme.Light,size:i.ESize.Normal,tabindex:0},t.ReCaptchaV2=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(4),n=r(10),i=o.withContext(n.ReCaptchaV3);t.ReCaptchaV3=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(0);t.ReCaptchaV3=class extends o.Component{constructor(e){super(e);const{siteKeyV3:t}=this.props.providerContext;if(!t)throw new Error('The prop "siteKeyV3" must be set on the ReCaptchaProvider before using the ReCaptchaV3 component');this.state={token:void 0,retrieving:!1},this.getToken=this.getToken.bind(this),this.getToken()}componentDidUpdate(e){const{loaded:t}=this.props.providerContext;e.providerContext.loaded!==t&&t&&this.getToken()}render(){return!1}getToken(){const{loaded:e,siteKeyV3:t}=this.props.providerContext,{retrieving:r}=this.state,{action:o,callback:n}=this.props;e&&!r&&t&&this.setState({token:void 0,retrieving:!0},()=>{n(),grecaptcha.execute(t,{action:o}).then(e=>{this.setState({token:e,retrieving:!1},()=>{n(e)})})})}}}]);
import * as React from 'react';
import { IConsumer } from './IConsumer';
declare type TWithContext = <T extends IConsumer>(Component: React.ComponentType<T>) => React.ComponentType<T>;
declare type TWithContext = <T extends object>(Component: React.ComponentType<T>) => React.ComponentType<T>;
declare const withContext: TWithContext;
export { withContext };

@@ -1,10 +0,11 @@

import { IConsumer } from 'src/provider/IConsumer';
/// <reference types="react" />
import { ESize } from './ESize';
import { ETheme } from './ETheme';
import { TCallback } from './TCallback';
export interface IProps extends IConsumer {
interface IProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
callback: TCallback;
theme: ETheme;
size: ESize;
tabindex: number;
theme?: ETheme;
size?: ESize;
tabindex?: number;
}
export { IProps };
import * as React from 'react';
import { IConsumer } from 'src/provider/IConsumer';
import { IProps } from './IProps';
import { IState } from './IState';
declare class ReCaptchaV2 extends React.Component<IProps, IState> {
constructor(props: IProps);
componentDidUpdate(prevProps: IProps): void;
declare class ReCaptchaV2 extends React.Component<IProps & IConsumer, IState> {
static defaultProps: Pick<IProps, 'theme' | 'size' | 'tabindex'>;
constructor(props: IProps & IConsumer);
componentDidUpdate(prevProps: IProps & IConsumer): void;
render(): JSX.Element;

@@ -8,0 +10,0 @@ private successCallback;

@@ -1,6 +0,5 @@

import { IConsumer } from 'src/provider/IConsumer';
import { TCallback } from './TCallback';
export interface IProps extends IConsumer {
export interface IProps {
action: string;
callback: TCallback;
}
import * as React from 'react';
import { IConsumer } from 'src/provider/IConsumer';
import { IProps } from './IProps';
import { IState } from './IState';
declare class ReCaptchaV3 extends React.Component<IProps, IState> {
constructor(props: IProps);
componentDidUpdate(prevProps: IProps): void;
declare class ReCaptchaV3 extends React.Component<IProps & IConsumer, IState> {
constructor(props: IProps & IConsumer);
componentDidUpdate(prevProps: IProps & IConsumer): void;
render(): false;

@@ -8,0 +9,0 @@ private getToken;

{
"name": "react-recaptcha-x",
"version": "1.0.3",
"version": "1.0.4",
"description": "a React component for Google's reCAPTCHA v3 and v2 (checkbox) component",
"main": "./dist/index.js",
"scripts": {
"test": "TZ=UTC jest",
"test:cov": "TZ=UTC jest --coverage",
"prettier": "npx prettier --check 'src/**/*.ts?(x)'",
"lint": "tslint 'src/**/*.ts?(x)' -c tslint.json -e 'src/provider/grecaptcha.d.ts'",
"lint": "tslint 'src/**/*.ts?(x)' -c tslint.json",
"build": "npm run build:clean && npm run build:types && npm run build:js",

@@ -13,3 +15,4 @@ "build:clean": "rm dist/* -rf",

"build:js": "webpack --config ./webpack.config.js --env.NODE_ENV=production --env.production --progress",
"cl": "commitlint --from=HEAD~1"
"cl": "commitlint --from=HEAD~1",
"ts:validate": "tsc --outDir /tmp"
},

@@ -42,9 +45,2 @@ "keywords": [

"devDependencies": {
"@babel/cli": "^7.4.4",
"@babel/core": "^7.4.5",
"@babel/plugin-proposal-object-rest-spread": "^7.4.4",
"@babel/plugin-transform-react-jsx": "^7.3.0",
"@babel/preset-env": "^7.4.5",
"@babel/preset-react": "^7.0.0",
"@babel/preset-typescript": "^7.3.3",
"@commitlint/cli": "^8.0.0",

@@ -56,7 +52,12 @@ "@commitlint/config-conventional": "^8.0.0",

"@semantic-release/npm": "^5.1.13",
"babel-loader": "^8.0.6",
"babel-preset-minify": "^0.5.0",
"@testing-library/dom": "^5.5.0",
"@types/jest": "^24.0.15",
"@types/react-test-renderer": "^16.8.2",
"jest": "^24.8.0",
"prettier": "^1.18.2",
"react-dom": "^16.8.6",
"react-test-renderer": "^16.8.6",
"semantic-release": "^15.13.18",
"ts-jest": "^24.0.2",
"ts-loader": "^6.0.4",
"tslint": "^5.18.0",

@@ -71,27 +72,5 @@ "tslint-consistent-codestyle": "^1.15.1",

"dependencies": {
"@types/react": "^16.8.22",
"@types/react": "^16.8.23",
"react": "^16.8.6"
},
"babel": {
"presets": [
[
"@babel/preset-env",
{
"targets": {
"browsers": [
"> 5%",
"last 2 versions"
]
}
}
],
"@babel/preset-react",
"@babel/preset-typescript",
"minify"
],
"plugins": [
"@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-transform-react-jsx"
]
},
"prettier": {

@@ -98,0 +77,0 @@ "singleQuote": true

@@ -5,6 +5,16 @@ # react-recaptcha-x

[![FOSSA Status][licenses]][licenses-url]
[![npm][npm]][npm-url]
[![Last Release][last-release]][last-release-url]
[![Last Commit][last-commit]][last-commit-url]
[![Dependencies][deps]][deps-url]
[![Build Status][build-status]][build-status-url]
[![FOSSA Status][licenses]][licenses-url]
[![npm Downloads][npm-downloads]][npm-downloads-url]
[![GitHub Issues][github-issues]][github-issues-url]
[![Top Language][top-language]][top-language-url]
[![License][license]][license-url]
![Types][types]
- Small and Performant, only 10.8KB

@@ -229,2 +239,4 @@ - Available for both **Javascript** and **Typescript** projects

[npm]: https://img.shields.io/npm/v/react-recaptcha-x.svg
[npm-url]: https://www.npmjs.com/package/react-recaptcha-x
[deps]: https://david-dm.org/antokara/react-recaptcha-x.svg

@@ -236,1 +248,14 @@ [deps-url]: https://david-dm.org/antokara/react-recaptcha-x

[build-status-url]: https://travis-ci.org/antokara/react-recaptcha-x
[license]: https://img.shields.io/npm/l/react-recaptcha-x.svg
[license-url]: https://github.com/antokara/react-recaptcha-x/blob/master/LICENSE
[top-language]: https://img.shields.io/github/languages/top/antokara/react-recaptcha-x.svg
[top-language-url]: https://github.com/antokara/react-recaptcha-x/search?l=typescript
[github-issues]: https://img.shields.io/github/issues/antokara/react-recaptcha-x.svg
[github-issues-url]: https://github.com/antokara/react-recaptcha-x/issues
[npm-downloads]: https://img.shields.io/npm/dm/react-recaptcha-x.svg
[npm-downloads-url]: https://www.npmjs.com/package/react-recaptcha-x
[types]: https://img.shields.io/npm/types/react-recaptcha-x.svg
[last-commit]: https://img.shields.io/github/last-commit/antokara/react-recaptcha-x.svg
[last-commit-url]: https://github.com/antokara/react-recaptcha-x/graphs/commit-activity
[last-release]: https://img.shields.io/github/release-date/antokara/react-recaptcha-x.svg
[last-release-url]: https://github.com/antokara/react-recaptcha-x/releases
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