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

react-plaid-link

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-plaid-link - npm Package Compare versions

Comparing version 1.0.3 to 1.1.0

4

dist/react-plaid-link.js

@@ -393,5 +393,5 @@ (function webpackUniversalModuleDefinition(root, factory) {

key: 'handleOnClick',
value: function handleOnClick() {
value: function handleOnClick(event) {
if (this.props.onClick != null) {
this.props.onClick();
this.props.onClick(event);
}

@@ -398,0 +398,0 @@ var institution = this.props.institution || null;

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

!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.ReactPlaidLink=t(require("react")):e.ReactPlaidLink=t(e.React)}("undefined"!=typeof self?self:this,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s=6)}([function(t,n){t.exports=e},function(e,t,n){var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,o=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r};e.exports=n(8)(o,!0)},function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t,n){"use strict";function r(e,t,n,r,i,a,u,s){if(o(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,a,u,s],f=0;c=new Error(t.replace(/%s/g,function(){return l[f++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}var o=function(e){};o=function(e){if(void 0===e)throw new Error("invariant requires an error message argument")},e.exports=r},function(e,t,n){"use strict";var r=n(2),o=r,i=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=0,i="Warning: "+e.replace(/%s/g,function(){return n[o++]});"undefined"!=typeof console&&console.error(i);try{throw new Error(i)}catch(e){}};o=function(e,t){if(void 0===t)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(0!==t.indexOf("Failed Composite propType: ")&&!e){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];i.apply(void 0,[t].concat(r))}},e.exports=o},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";function r(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 i(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 a(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 u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(0),c=r(s),l=n(7),f=r(l),p=n(1),d=r(p),y=function(e){function t(e){o(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={disabledButton:!0,linkLoaded:!1,initializeURL:"https://cdn.plaid.com/link/v2/stable/link-initialize.js"},n.onScriptError=n.onScriptError.bind(n),n.onScriptLoaded=n.onScriptLoaded.bind(n),n.handleLinkOnLoad=n.handleLinkOnLoad.bind(n),n.handleOnClick=n.handleOnClick.bind(n),n}return a(t,e),u(t,[{key:"onScriptError",value:function(){console.error("There was an issue loading the link-initialize.js script")}},{key:"onScriptLoaded",value:function(){window.linkHandler=window.Plaid.create({apiVersion:this.props.apiVersion,clientName:this.props.clientName,env:this.props.env,key:this.props.publicKey,onExit:this.props.onExit,onLoad:this.handleLinkOnLoad,onEvent:this.props.onEvent,onSuccess:this.props.onSuccess,product:this.props.product,selectAccount:this.props.selectAccount,token:this.props.token,webhook:this.props.webhook}),this.setState({disabledButton:!1})}},{key:"handleLinkOnLoad",value:function(){null!=this.props.onLoad&&this.props.onLoad(),this.setState({linkLoaded:!0})}},{key:"handleOnClick",value:function(){null!=this.props.onClick&&this.props.onClick();var e=this.props.institution||null;window.linkHandler&&window.linkHandler.open(e)}},{key:"exit",value:function(e){window.linkHandler&&window.linkHandler.exit(e)}},{key:"render",value:function(){return c.default.createElement("div",null,c.default.createElement("button",{onClick:this.handleOnClick,disabled:this.state.disabledButton,style:this.props.style,className:this.props.className},this.props.children),c.default.createElement(f.default,{url:this.state.initializeURL,onError:this.onScriptError,onLoad:this.onScriptLoaded}))}}]),t}(s.Component);y.defaultProps={apiVersion:"v2",env:"sandbox",institution:null,selectAccount:!1,token:null,style:{padding:"6px 4px",outline:"none",background:"#FFFFFF",border:"2px solid #F1F1F1",borderRadius:"4px"}},y.propTypes={apiVersion:d.default.string,clientName:d.default.string.isRequired,env:d.default.oneOf(["tartan","sandbox","development","production"]).isRequired,institution:d.default.string,publicKey:d.default.string.isRequired,product:d.default.arrayOf(d.default.oneOf(["connect","info","auth","identity","income","transactions","assets"])).isRequired,token:d.default.string,selectAccount:d.default.bool,webhook:d.default.string,onSuccess:d.default.func.isRequired,onExit:d.default.func,onLoad:d.default.func,onEvent:d.default.func,style:d.default.object,className:d.default.string},t.default=y},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 a(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 u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(0),c=function(e){return e&&e.__esModule?e:{default:e}}(s),l=n(1),f=function(e){function t(e){o(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.scriptLoaderId="id"+n.constructor.idCount++,n}return a(t,e),u(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.onError,n=e.onLoad,o=e.url;return this.constructor.loadedScripts[o]?void n():this.constructor.erroredScripts[o]?void t():this.constructor.scriptObservers[o]?void(this.constructor.scriptObservers[o][this.scriptLoaderId]=this.props):(this.constructor.scriptObservers[o]=r({},this.scriptLoaderId,this.props),void this.createScript())}},{key:"componentWillUnmount",value:function(){var e=this.props.url,t=this.constructor.scriptObservers[e];t&&delete t[this.scriptLoaderId]}},{key:"createScript",value:function(){var e=this,t=this.props,n=t.onCreate,r=t.url,o=t.attributes,i=document.createElement("script");n(),o&&Object.keys(o).forEach(function(e){return i.setAttribute(e,o[e])}),i.src=r,i.hasAttribute("async")||(i.async=1);var a=function(t){var n=e.constructor.scriptObservers[r];Object.keys(n).forEach(function(o){t(n[o])&&delete e.constructor.scriptObservers[r][e.scriptLoaderId]})};i.onload=function(){e.constructor.loadedScripts[r]=!0,a(function(e){return e.onLoad(),!0})},i.onerror=function(){e.constructor.erroredScripts[r]=!0,a(function(e){return e.onError(),!0})},document.body.appendChild(i)}},{key:"render",value:function(){return null}}]),t}(c.default.Component);f.propTypes={attributes:l.PropTypes.object,onCreate:l.PropTypes.func,onError:l.PropTypes.func.isRequired,onLoad:l.PropTypes.func.isRequired,url:l.PropTypes.string.isRequired},f.defaultProps={attributes:{},onCreate:function(){},onError:function(){},onLoad:function(){}},f.scriptObservers={},f.loadedScripts={},f.erroredScripts={},f.idCount=0,t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(2),o=n(3),i=n(4),a=n(9),u=n(5),s=n(10);e.exports=function(e,t){function n(e){var t=e&&(S&&e[S]||e[P]);if("function"==typeof t)return t}function c(e,t){return e===t?0!==e||1/e==1/t:e!==e&&t!==t}function l(e){this.message=e,this.stack=""}function f(e){function n(n,s,c,f,p,d,y){if(f=f||R,d=d||c,y!==u)if(t)o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");else if("undefined"!=typeof console){var h=f+":"+c;!r[h]&&a<3&&(i(!1,"You are manually calling a React.PropTypes validation function for the `%s` prop on `%s`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.",d,f),r[h]=!0,a++)}return null==s[c]?n?new l(null===s[c]?"The "+p+" `"+d+"` is marked as required in `"+f+"`, but its value is `null`.":"The "+p+" `"+d+"` is marked as required in `"+f+"`, but its value is `undefined`."):null:e(s,c,f,p,d)}var r={},a=0,s=n.bind(null,!1);return s.isRequired=n.bind(null,!0),s}function p(e){function t(t,n,r,o,i,a){var u=t[n];if(k(u)!==e)return new l("Invalid "+o+" `"+i+"` of type `"+j(u)+"` supplied to `"+r+"`, expected `"+e+"`.");return null}return f(t)}function d(e){function t(t,n,r,o,i){if("function"!=typeof e)return new l("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var a=t[n];if(!Array.isArray(a)){return new l("Invalid "+o+" `"+i+"` of type `"+k(a)+"` supplied to `"+r+"`, expected an array.")}for(var s=0;s<a.length;s++){var c=e(a,s,r,o,i+"["+s+"]",u);if(c instanceof Error)return c}return null}return f(t)}function y(e){function t(t,n,r,o,i){if(!(t[n]instanceof e)){var a=e.name||R;return new l("Invalid "+o+" `"+i+"` of type `"+E(t[n])+"` supplied to `"+r+"`, expected instance of `"+a+"`.")}return null}return f(t)}function h(e){function t(t,n,r,o,i){for(var a=t[n],u=0;u<e.length;u++)if(c(a,e[u]))return null;return new l("Invalid "+o+" `"+i+"` of value `"+a+"` supplied to `"+r+"`, expected one of "+JSON.stringify(e)+".")}return Array.isArray(e)?f(t):(i(!1,"Invalid argument supplied to oneOf, expected an instance of array."),r.thatReturnsNull)}function b(e){function t(t,n,r,o,i){if("function"!=typeof e)return new l("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var a=t[n],s=k(a);if("object"!==s)return new l("Invalid "+o+" `"+i+"` of type `"+s+"` supplied to `"+r+"`, expected an object.");for(var c in a)if(a.hasOwnProperty(c)){var f=e(a,c,r,o,i+"."+c,u);if(f instanceof Error)return f}return null}return f(t)}function v(e){function t(t,n,r,o,i){for(var a=0;a<e.length;a++){if(null==(0,e[a])(t,n,r,o,i,u))return null}return new l("Invalid "+o+" `"+i+"` supplied to `"+r+"`.")}if(!Array.isArray(e))return i(!1,"Invalid argument supplied to oneOfType, expected an instance of array."),r.thatReturnsNull;for(var n=0;n<e.length;n++){var o=e[n];if("function"!=typeof o)return i(!1,"Invalid argument supplied to oneOfType. Expected an array of check functions, but received %s at index %s.",x(o),n),r.thatReturnsNull}return f(t)}function m(e){function t(t,n,r,o,i){var a=t[n],s=k(a);if("object"!==s)return new l("Invalid "+o+" `"+i+"` of type `"+s+"` supplied to `"+r+"`, expected `object`.");for(var c in e){var f=e[c];if(f){var p=f(a,c,r,o,i+"."+c,u);if(p)return p}}return null}return f(t)}function g(e){function t(t,n,r,o,i){var s=t[n],c=k(s);if("object"!==c)return new l("Invalid "+o+" `"+i+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");var f=a({},t[n],e);for(var p in f){var d=e[p];if(!d)return new l("Invalid "+o+" `"+i+"` key `"+p+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(t[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var y=d(s,p,r,o,i+"."+p,u);if(y)return y}return null}return f(t)}function O(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(O);if(null===t||e(t))return!0;var r=n(t);if(!r)return!1;var o,i=r.call(t);if(r!==t.entries){for(;!(o=i.next()).done;)if(!O(o.value))return!1}else for(;!(o=i.next()).done;){var a=o.value;if(a&&!O(a[1]))return!1}return!0;default:return!1}}function w(e,t){return"symbol"===e||("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}function k(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":w(t,e)?"symbol":t}function j(e){if(void 0===e||null===e)return""+e;var t=k(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function x(e){var t=j(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}function E(e){return e.constructor&&e.constructor.name?e.constructor.name:R}var S="function"==typeof Symbol&&Symbol.iterator,P="@@iterator",R="<<anonymous>>",T={array:p("array"),bool:p("boolean"),func:p("function"),number:p("number"),object:p("object"),string:p("string"),symbol:p("symbol"),any:function(){return f(r.thatReturnsNull)}(),arrayOf:d,element:function(){function t(t,n,r,o,i){var a=t[n];if(!e(a)){return new l("Invalid "+o+" `"+i+"` of type `"+k(a)+"` supplied to `"+r+"`, expected a single ReactElement.")}return null}return f(t)}(),instanceOf:y,node:function(){function e(e,t,n,r,o){return O(e[t])?null:new l("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")}return f(e)}(),objectOf:b,oneOf:h,oneOfType:v,shape:m,exact:g};return l.prototype=Error.prototype,T.checkPropTypes=s,T.PropTypes=T,T}},function(e,t,n){"use strict";function r(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(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.ReactPlaidLink=t(require("react")):e.ReactPlaidLink=t(e.React)}("undefined"!=typeof self?self:this,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s=6)}([function(t,n){t.exports=e},function(e,t,n){var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,o=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r};e.exports=n(8)(o,!0)},function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t,n){"use strict";function r(e,t,n,r,i,a,u,s){if(o(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,a,u,s],f=0;c=new Error(t.replace(/%s/g,function(){return l[f++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}var o=function(e){};o=function(e){if(void 0===e)throw new Error("invariant requires an error message argument")},e.exports=r},function(e,t,n){"use strict";var r=n(2),o=r,i=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=0,i="Warning: "+e.replace(/%s/g,function(){return n[o++]});"undefined"!=typeof console&&console.error(i);try{throw new Error(i)}catch(e){}};o=function(e,t){if(void 0===t)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(0!==t.indexOf("Failed Composite propType: ")&&!e){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];i.apply(void 0,[t].concat(r))}},e.exports=o},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";function r(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 i(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 a(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 u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(0),c=r(s),l=n(7),f=r(l),p=n(1),d=r(p),y=function(e){function t(e){o(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={disabledButton:!0,linkLoaded:!1,initializeURL:"https://cdn.plaid.com/link/v2/stable/link-initialize.js"},n.onScriptError=n.onScriptError.bind(n),n.onScriptLoaded=n.onScriptLoaded.bind(n),n.handleLinkOnLoad=n.handleLinkOnLoad.bind(n),n.handleOnClick=n.handleOnClick.bind(n),n}return a(t,e),u(t,[{key:"onScriptError",value:function(){console.error("There was an issue loading the link-initialize.js script")}},{key:"onScriptLoaded",value:function(){window.linkHandler=window.Plaid.create({apiVersion:this.props.apiVersion,clientName:this.props.clientName,env:this.props.env,key:this.props.publicKey,onExit:this.props.onExit,onLoad:this.handleLinkOnLoad,onEvent:this.props.onEvent,onSuccess:this.props.onSuccess,product:this.props.product,selectAccount:this.props.selectAccount,token:this.props.token,webhook:this.props.webhook}),this.setState({disabledButton:!1})}},{key:"handleLinkOnLoad",value:function(){null!=this.props.onLoad&&this.props.onLoad(),this.setState({linkLoaded:!0})}},{key:"handleOnClick",value:function(e){null!=this.props.onClick&&this.props.onClick(e);var t=this.props.institution||null;window.linkHandler&&window.linkHandler.open(t)}},{key:"exit",value:function(e){window.linkHandler&&window.linkHandler.exit(e)}},{key:"render",value:function(){return c.default.createElement("div",null,c.default.createElement("button",{onClick:this.handleOnClick,disabled:this.state.disabledButton,style:this.props.style,className:this.props.className},this.props.children),c.default.createElement(f.default,{url:this.state.initializeURL,onError:this.onScriptError,onLoad:this.onScriptLoaded}))}}]),t}(s.Component);y.defaultProps={apiVersion:"v2",env:"sandbox",institution:null,selectAccount:!1,token:null,style:{padding:"6px 4px",outline:"none",background:"#FFFFFF",border:"2px solid #F1F1F1",borderRadius:"4px"}},y.propTypes={apiVersion:d.default.string,clientName:d.default.string.isRequired,env:d.default.oneOf(["tartan","sandbox","development","production"]).isRequired,institution:d.default.string,publicKey:d.default.string.isRequired,product:d.default.arrayOf(d.default.oneOf(["connect","info","auth","identity","income","transactions","assets"])).isRequired,token:d.default.string,selectAccount:d.default.bool,webhook:d.default.string,onSuccess:d.default.func.isRequired,onExit:d.default.func,onLoad:d.default.func,onEvent:d.default.func,style:d.default.object,className:d.default.string},t.default=y},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 a(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 u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(0),c=function(e){return e&&e.__esModule?e:{default:e}}(s),l=n(1),f=function(e){function t(e){o(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.scriptLoaderId="id"+n.constructor.idCount++,n}return a(t,e),u(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.onError,n=e.onLoad,o=e.url;return this.constructor.loadedScripts[o]?void n():this.constructor.erroredScripts[o]?void t():this.constructor.scriptObservers[o]?void(this.constructor.scriptObservers[o][this.scriptLoaderId]=this.props):(this.constructor.scriptObservers[o]=r({},this.scriptLoaderId,this.props),void this.createScript())}},{key:"componentWillUnmount",value:function(){var e=this.props.url,t=this.constructor.scriptObservers[e];t&&delete t[this.scriptLoaderId]}},{key:"createScript",value:function(){var e=this,t=this.props,n=t.onCreate,r=t.url,o=t.attributes,i=document.createElement("script");n(),o&&Object.keys(o).forEach(function(e){return i.setAttribute(e,o[e])}),i.src=r,i.hasAttribute("async")||(i.async=1);var a=function(t){var n=e.constructor.scriptObservers[r];Object.keys(n).forEach(function(o){t(n[o])&&delete e.constructor.scriptObservers[r][e.scriptLoaderId]})};i.onload=function(){e.constructor.loadedScripts[r]=!0,a(function(e){return e.onLoad(),!0})},i.onerror=function(){e.constructor.erroredScripts[r]=!0,a(function(e){return e.onError(),!0})},document.body.appendChild(i)}},{key:"render",value:function(){return null}}]),t}(c.default.Component);f.propTypes={attributes:l.PropTypes.object,onCreate:l.PropTypes.func,onError:l.PropTypes.func.isRequired,onLoad:l.PropTypes.func.isRequired,url:l.PropTypes.string.isRequired},f.defaultProps={attributes:{},onCreate:function(){},onError:function(){},onLoad:function(){}},f.scriptObservers={},f.loadedScripts={},f.erroredScripts={},f.idCount=0,t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(2),o=n(3),i=n(4),a=n(9),u=n(5),s=n(10);e.exports=function(e,t){function n(e){var t=e&&(S&&e[S]||e[P]);if("function"==typeof t)return t}function c(e,t){return e===t?0!==e||1/e==1/t:e!==e&&t!==t}function l(e){this.message=e,this.stack=""}function f(e){function n(n,s,c,f,p,d,y){if(f=f||R,d=d||c,y!==u)if(t)o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");else if("undefined"!=typeof console){var h=f+":"+c;!r[h]&&a<3&&(i(!1,"You are manually calling a React.PropTypes validation function for the `%s` prop on `%s`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.",d,f),r[h]=!0,a++)}return null==s[c]?n?new l(null===s[c]?"The "+p+" `"+d+"` is marked as required in `"+f+"`, but its value is `null`.":"The "+p+" `"+d+"` is marked as required in `"+f+"`, but its value is `undefined`."):null:e(s,c,f,p,d)}var r={},a=0,s=n.bind(null,!1);return s.isRequired=n.bind(null,!0),s}function p(e){function t(t,n,r,o,i,a){var u=t[n];if(k(u)!==e)return new l("Invalid "+o+" `"+i+"` of type `"+j(u)+"` supplied to `"+r+"`, expected `"+e+"`.");return null}return f(t)}function d(e){function t(t,n,r,o,i){if("function"!=typeof e)return new l("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var a=t[n];if(!Array.isArray(a)){return new l("Invalid "+o+" `"+i+"` of type `"+k(a)+"` supplied to `"+r+"`, expected an array.")}for(var s=0;s<a.length;s++){var c=e(a,s,r,o,i+"["+s+"]",u);if(c instanceof Error)return c}return null}return f(t)}function y(e){function t(t,n,r,o,i){if(!(t[n]instanceof e)){var a=e.name||R;return new l("Invalid "+o+" `"+i+"` of type `"+E(t[n])+"` supplied to `"+r+"`, expected instance of `"+a+"`.")}return null}return f(t)}function h(e){function t(t,n,r,o,i){for(var a=t[n],u=0;u<e.length;u++)if(c(a,e[u]))return null;return new l("Invalid "+o+" `"+i+"` of value `"+a+"` supplied to `"+r+"`, expected one of "+JSON.stringify(e)+".")}return Array.isArray(e)?f(t):(i(!1,"Invalid argument supplied to oneOf, expected an instance of array."),r.thatReturnsNull)}function b(e){function t(t,n,r,o,i){if("function"!=typeof e)return new l("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var a=t[n],s=k(a);if("object"!==s)return new l("Invalid "+o+" `"+i+"` of type `"+s+"` supplied to `"+r+"`, expected an object.");for(var c in a)if(a.hasOwnProperty(c)){var f=e(a,c,r,o,i+"."+c,u);if(f instanceof Error)return f}return null}return f(t)}function v(e){function t(t,n,r,o,i){for(var a=0;a<e.length;a++){if(null==(0,e[a])(t,n,r,o,i,u))return null}return new l("Invalid "+o+" `"+i+"` supplied to `"+r+"`.")}if(!Array.isArray(e))return i(!1,"Invalid argument supplied to oneOfType, expected an instance of array."),r.thatReturnsNull;for(var n=0;n<e.length;n++){var o=e[n];if("function"!=typeof o)return i(!1,"Invalid argument supplied to oneOfType. Expected an array of check functions, but received %s at index %s.",x(o),n),r.thatReturnsNull}return f(t)}function m(e){function t(t,n,r,o,i){var a=t[n],s=k(a);if("object"!==s)return new l("Invalid "+o+" `"+i+"` of type `"+s+"` supplied to `"+r+"`, expected `object`.");for(var c in e){var f=e[c];if(f){var p=f(a,c,r,o,i+"."+c,u);if(p)return p}}return null}return f(t)}function g(e){function t(t,n,r,o,i){var s=t[n],c=k(s);if("object"!==c)return new l("Invalid "+o+" `"+i+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");var f=a({},t[n],e);for(var p in f){var d=e[p];if(!d)return new l("Invalid "+o+" `"+i+"` key `"+p+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(t[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var y=d(s,p,r,o,i+"."+p,u);if(y)return y}return null}return f(t)}function O(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(O);if(null===t||e(t))return!0;var r=n(t);if(!r)return!1;var o,i=r.call(t);if(r!==t.entries){for(;!(o=i.next()).done;)if(!O(o.value))return!1}else for(;!(o=i.next()).done;){var a=o.value;if(a&&!O(a[1]))return!1}return!0;default:return!1}}function w(e,t){return"symbol"===e||("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}function k(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":w(t,e)?"symbol":t}function j(e){if(void 0===e||null===e)return""+e;var t=k(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function x(e){var t=j(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}function E(e){return e.constructor&&e.constructor.name?e.constructor.name:R}var S="function"==typeof Symbol&&Symbol.iterator,P="@@iterator",R="<<anonymous>>",T={array:p("array"),bool:p("boolean"),func:p("function"),number:p("number"),object:p("object"),string:p("string"),symbol:p("symbol"),any:function(){return f(r.thatReturnsNull)}(),arrayOf:d,element:function(){function t(t,n,r,o,i){var a=t[n];if(!e(a)){return new l("Invalid "+o+" `"+i+"` of type `"+k(a)+"` supplied to `"+r+"`, expected a single ReactElement.")}return null}return f(t)}(),instanceOf:y,node:function(){function e(e,t,n,r,o){return O(e[t])?null:new l("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")}return f(e)}(),objectOf:b,oneOf:h,oneOfType:v,shape:m,exact:g};return l.prototype=Error.prototype,T.checkPropTypes=s,T.PropTypes=T,T}},function(e,t,n){"use strict";function r(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}/*
object-assign

@@ -3,0 +3,0 @@ (c) Sindre Sorhus

@@ -85,5 +85,5 @@ 'use strict';

key: 'handleOnClick',
value: function handleOnClick() {
value: function handleOnClick(event) {
if (this.props.onClick != null) {
this.props.onClick();
this.props.onClick(event);
}

@@ -90,0 +90,0 @@ var institution = this.props.institution || null;

{
"name": "react-plaid-link",
"version": "1.0.3",
"version": "1.1.0",
"description": "A React component for Plaid Link",

@@ -5,0 +5,0 @@ "files": [

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

# react-plaid-link
# react-plaid-link [![npm version](https://badge.fury.io/js/react-plaid-link.svg)](http://badge.fury.io/js/react-plaid-link)
A simple [React](https://facebook.github.io/react/) component for easy
integration with the [Plaid Link drop-in module](https://plaid.com/docs/link/)
integration with the [Plaid Link drop-in module](https://blog.plaid.com/plaid-link/)

@@ -45,3 +45,3 @@

Please refer to the [official Plaid Link docs](https://plaid.com/docs/link/) for
Please refer to the [official Plaid Link docs](https://plaid.com/docs/#creating-items-with-plaid-link) for
a more holistic understanding of the various Link options.

@@ -48,0 +48,0 @@

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