react-plaid-link
Advanced tools
Comparing version 3.2.0 to 3.2.1
# Changelog | ||
## 3.2.1 | ||
- (Internal) Fix invalid registry URLs in `yarn.lock` | ||
## 3.2.0 | ||
@@ -4,0 +8,0 @@ |
@@ -52,3 +52,3 @@ /// <reference types="react" /> | ||
type PlaidLinkOnSuccess = (public_token: string, metadata: PlaidLinkOnSuccessMetadata) => void; | ||
type PlaidLinkOnExit = (error: null | PlaidLinkError, metadata: PlaidLinkOnExitMetadata) => void; // The following event names are stable and will not be deprecated or changed | ||
type PlaidLinkOnExit = (error: null | PlaidLinkError, metadata: PlaidLinkOnExitMetadata) => void; | ||
// The following event names are stable and will not be deprecated or changed | ||
@@ -82,6 +82,3 @@ declare enum PlaidLinkStableEvent { | ||
onEvent?: PlaidLinkOnEvent; | ||
} /** | ||
* @deprecated Public key integrations are deprecated and should not be used. | ||
* https://plaid.com/docs/link/link-token-migration-guide/ | ||
*/ | ||
} | ||
/** | ||
@@ -132,4 +129,3 @@ * @deprecated Public key integrations are deprecated and should not be used. | ||
receivedRedirectUri?: string; | ||
}; // Either the publicKey or the token field must be configured. The publicKey | ||
// is deprecated so prefer to initialize Link with a Link Token instead. | ||
}; | ||
// Either the publicKey or the token field must be configured. The publicKey | ||
@@ -136,0 +132,0 @@ // is deprecated so prefer to initialize Link with a Link Token instead. |
@@ -52,3 +52,3 @@ /// <reference types="react" /> | ||
type PlaidLinkOnSuccess = (public_token: string, metadata: PlaidLinkOnSuccessMetadata) => void; | ||
type PlaidLinkOnExit = (error: null | PlaidLinkError, metadata: PlaidLinkOnExitMetadata) => void; // The following event names are stable and will not be deprecated or changed | ||
type PlaidLinkOnExit = (error: null | PlaidLinkError, metadata: PlaidLinkOnExitMetadata) => void; | ||
// The following event names are stable and will not be deprecated or changed | ||
@@ -82,6 +82,3 @@ declare enum PlaidLinkStableEvent { | ||
onEvent?: PlaidLinkOnEvent; | ||
} /** | ||
* @deprecated Public key integrations are deprecated and should not be used. | ||
* https://plaid.com/docs/link/link-token-migration-guide/ | ||
*/ | ||
} | ||
/** | ||
@@ -132,4 +129,3 @@ * @deprecated Public key integrations are deprecated and should not be used. | ||
receivedRedirectUri?: string; | ||
}; // Either the publicKey or the token field must be configured. The publicKey | ||
// is deprecated so prefer to initialize Link with a Link Token instead. | ||
}; | ||
// Either the publicKey or the token field must be configured. The publicKey | ||
@@ -136,0 +132,0 @@ // is deprecated so prefer to initialize Link with a Link Token instead. |
@@ -101,3 +101,3 @@ import react, { useState, useEffect } from 'react'; | ||
function _iterableToArrayLimit(arr, i) { | ||
var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); | ||
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; | ||
@@ -104,0 +104,0 @@ if (_i == null) return; |
@@ -108,3 +108,3 @@ 'use strict'; | ||
function _iterableToArrayLimit(arr, i) { | ||
var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); | ||
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; | ||
@@ -111,0 +111,0 @@ if (_i == null) return; |
@@ -52,3 +52,3 @@ /// <reference types="react" /> | ||
type PlaidLinkOnSuccess = (public_token: string, metadata: PlaidLinkOnSuccessMetadata) => void; | ||
type PlaidLinkOnExit = (error: null | PlaidLinkError, metadata: PlaidLinkOnExitMetadata) => void; // The following event names are stable and will not be deprecated or changed | ||
type PlaidLinkOnExit = (error: null | PlaidLinkError, metadata: PlaidLinkOnExitMetadata) => void; | ||
// The following event names are stable and will not be deprecated or changed | ||
@@ -82,6 +82,3 @@ declare enum PlaidLinkStableEvent { | ||
onEvent?: PlaidLinkOnEvent; | ||
} /** | ||
* @deprecated Public key integrations are deprecated and should not be used. | ||
* https://plaid.com/docs/link/link-token-migration-guide/ | ||
*/ | ||
} | ||
/** | ||
@@ -132,4 +129,3 @@ * @deprecated Public key integrations are deprecated and should not be used. | ||
receivedRedirectUri?: string; | ||
}; // Either the publicKey or the token field must be configured. The publicKey | ||
// is deprecated so prefer to initialize Link with a Link Token instead. | ||
}; | ||
// Either the publicKey or the token field must be configured. The publicKey | ||
@@ -136,0 +132,0 @@ // is deprecated so prefer to initialize Link with a Link Token instead. |
@@ -107,3 +107,3 @@ (function (global, factory) { | ||
function _iterableToArrayLimit(arr, i) { | ||
var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); | ||
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; | ||
@@ -110,0 +110,0 @@ if (_i == null) return; |
@@ -52,3 +52,3 @@ /// <reference types="react" /> | ||
type PlaidLinkOnSuccess = (public_token: string, metadata: PlaidLinkOnSuccessMetadata) => void; | ||
type PlaidLinkOnExit = (error: null | PlaidLinkError, metadata: PlaidLinkOnExitMetadata) => void; // The following event names are stable and will not be deprecated or changed | ||
type PlaidLinkOnExit = (error: null | PlaidLinkError, metadata: PlaidLinkOnExitMetadata) => void; | ||
// The following event names are stable and will not be deprecated or changed | ||
@@ -82,6 +82,3 @@ declare enum PlaidLinkStableEvent { | ||
onEvent?: PlaidLinkOnEvent; | ||
} /** | ||
* @deprecated Public key integrations are deprecated and should not be used. | ||
* https://plaid.com/docs/link/link-token-migration-guide/ | ||
*/ | ||
} | ||
/** | ||
@@ -132,4 +129,3 @@ * @deprecated Public key integrations are deprecated and should not be used. | ||
receivedRedirectUri?: string; | ||
}; // Either the publicKey or the token field must be configured. The publicKey | ||
// is deprecated so prefer to initialize Link with a Link Token instead. | ||
}; | ||
// Either the publicKey or the token field must be configured. The publicKey | ||
@@ -136,0 +132,0 @@ // is deprecated so prefer to initialize Link with a Link Token instead. |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t((e=e||self).PlaidLink={},e.React)}(this,(function(e,t){"use strict";var n="default"in t?t.default:t;function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(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],t.indexOf(n)>=0||(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],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],l=!0,a=!1;try{for(n=n.call(e);!(l=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){a=!0,o=e}finally{try{l||null==n.return||n.return()}finally{if(a)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function f(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function d(e,t){return e(t={exports:{}},t.exports),t.exports}var s=d((function(e,t){var r=c&&c.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.src,i=e.checkForExisting,l=void 0!==i&&i,a=r(e,["src","checkForExisting"]),u=n.useState(Boolean(t)),c=u[0],f=u[1],d=n.useState(null),s=d[0],p=d[1];return n.useEffect((function(){if(o&&t){if(l)if(document.querySelectorAll('script[src="'+t+'"]').length>0)return void f(!1);var e=document.createElement("script");e.setAttribute("src",t),Object.keys(a).forEach((function(t){void 0===e[t]?e.setAttribute(t,a[t]):e[t]=a[t]}));var n=function(){f(!1)},r=function(e){p(e)};return e.addEventListener("load",n),e.addEventListener("error",r),document.body.appendChild(e),function(){e.removeEventListener("load",n),e.removeEventListener("error",r)}}}),[t]),[c,s]};var o="undefined"!=typeof window&&void 0!==window.document}));f(s);var p,y=f(d((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s.default}})}))),b=function(e){var t={plaid:null,open:!1,onExitCallback:null};if("undefined"==typeof window||!window.Plaid)throw new Error("Plaid not loaded");var n,r,l,a,u=(n=e,r="publicKey",l="key",a={},delete Object.assign(a,n,i({},l,n[r]))[r],a);t.plaid=window.Plaid.create(o(o({},u),{},{onExit:function(e,n){t.open=!1,u.onExit&&u.onExit(e,n),t.onExitCallback&&t.onExitCallback()}}));return{open:function(){t.plaid&&(t.open=!0,t.onExitCallback=null,t.plaid.open())},exit:function(e,n){t.open&&t.plaid?(t.onExitCallback=n,t.plaid.exit(e),e&&e.force&&(t.open=!1)):n&&n()},destroy:function(){t.plaid&&(t.plaid.destroy(),t.plaid=null)}}},O=function(){},v=function(e){var n=a(y({src:"https://cdn.plaid.com/link/v2/stable/link-initialize.js",checkForExisting:!0}),2),r=n[0],i=n[1],l=a(t.useState(null),2),u=l[0],c=l[1],f=a(t.useState(!1),2),d=f[0],s=f[1],p=(e.product||[]).slice().sort().join(",");return t.useEffect((function(){if(!r){if(!i&&window.Plaid){null!=u&&u.exit({force:!0},(function(){return u.destroy()}));var t=b(o(o({},e),{},{onLoad:function(){s(!0),e.onLoad&&e.onLoad()}}));return c(t),function(){return t.exit({force:!0},(function(){return t.destroy()}))}}console.error("Error loading Plaid",i)}}),[r,i,e.token,p]),{error:i,ready:null!=u&&(!r||d),exit:u?u.exit:O,open:u?u.open:O}},E=["children","style","className"],m=function(e){var t=e.children,r=e.style,i=e.className,a=l(e,E),u=v(o({},a)),c=u.error,f=u.open;return n.createElement("button",{disabled:Boolean(c),type:"button",className:i,style:o({padding:"6px 4px",outline:"none",background:"#FFFFFF",border:"2px solid #F1F1F1",borderRadius:"4px"},r),onClick:function(){return f()}},t)};m.displayName="PlaidLink",(p=e.PlaidLinkStableEvent||(e.PlaidLinkStableEvent={})).OPEN="OPEN",p.EXIT="EXIT",p.HANDOFF="HANDOFF",p.SELECT_INSTITUTION="SELECT_INSTITUTION",p.ERROR="ERROR",e.PlaidLink=m,e.usePlaidLink=v,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t((e=e||self).PlaidLink={},e.React)}(this,(function(e,t){"use strict";var n="default"in t?t.default:t;function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(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],t.indexOf(n)>=0||(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],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],l=!0,a=!1;try{for(n=n.call(e);!(l=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){a=!0,o=e}finally{try{l||null==n.return||n.return()}finally{if(a)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function f(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function d(e,t){return e(t={exports:{}},t.exports),t.exports}var s=d((function(e,t){var r=c&&c.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.src,i=e.checkForExisting,l=void 0!==i&&i,a=r(e,["src","checkForExisting"]),u=n.useState(Boolean(t)),c=u[0],f=u[1],d=n.useState(null),s=d[0],p=d[1];return n.useEffect((function(){if(o&&t){if(l)if(document.querySelectorAll('script[src="'+t+'"]').length>0)return void f(!1);var e=document.createElement("script");e.setAttribute("src",t),Object.keys(a).forEach((function(t){void 0===e[t]?e.setAttribute(t,a[t]):e[t]=a[t]}));var n=function(){f(!1)},r=function(e){p(e)};return e.addEventListener("load",n),e.addEventListener("error",r),document.body.appendChild(e),function(){e.removeEventListener("load",n),e.removeEventListener("error",r)}}}),[t]),[c,s]};var o="undefined"!=typeof window&&void 0!==window.document}));f(s);var p,y=f(d((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s.default}})}))),b=function(e){var t={plaid:null,open:!1,onExitCallback:null};if("undefined"==typeof window||!window.Plaid)throw new Error("Plaid not loaded");var n,r,l,a,u=(n=e,r="publicKey",l="key",a={},delete Object.assign(a,n,i({},l,n[r]))[r],a);t.plaid=window.Plaid.create(o(o({},u),{},{onExit:function(e,n){t.open=!1,u.onExit&&u.onExit(e,n),t.onExitCallback&&t.onExitCallback()}}));return{open:function(){t.plaid&&(t.open=!0,t.onExitCallback=null,t.plaid.open())},exit:function(e,n){t.open&&t.plaid?(t.onExitCallback=n,t.plaid.exit(e),e&&e.force&&(t.open=!1)):n&&n()},destroy:function(){t.plaid&&(t.plaid.destroy(),t.plaid=null)}}},O=function(){},v=function(e){var n=a(y({src:"https://cdn.plaid.com/link/v2/stable/link-initialize.js",checkForExisting:!0}),2),r=n[0],i=n[1],l=a(t.useState(null),2),u=l[0],c=l[1],f=a(t.useState(!1),2),d=f[0],s=f[1],p=(e.product||[]).slice().sort().join(",");return t.useEffect((function(){if(!r){if(!i&&window.Plaid){null!=u&&u.exit({force:!0},(function(){return u.destroy()}));var t=b(o(o({},e),{},{onLoad:function(){s(!0),e.onLoad&&e.onLoad()}}));return c(t),function(){return t.exit({force:!0},(function(){return t.destroy()}))}}console.error("Error loading Plaid",i)}}),[r,i,e.token,p]),{error:i,ready:null!=u&&(!r||d),exit:u?u.exit:O,open:u?u.open:O}},E=["children","style","className"],m=function(e){var t=e.children,r=e.style,i=e.className,a=l(e,E),u=v(o({},a)),c=u.error,f=u.open;return n.createElement("button",{disabled:Boolean(c),type:"button",className:i,style:o({padding:"6px 4px",outline:"none",background:"#FFFFFF",border:"2px solid #F1F1F1",borderRadius:"4px"},r),onClick:function(){return f()}},t)};m.displayName="PlaidLink",(p=e.PlaidLinkStableEvent||(e.PlaidLinkStableEvent={})).OPEN="OPEN",p.EXIT="EXIT",p.HANDOFF="HANDOFF",p.SELECT_INSTITUTION="SELECT_INSTITUTION",p.ERROR="ERROR",e.PlaidLink=m,e.usePlaidLink=v,Object.defineProperty(e,"__esModule",{value:!0})})); |
{ | ||
"name": "react-plaid-link", | ||
"version": "3.2.0", | ||
"version": "3.2.1", | ||
"description": "A React component for Plaid Link", | ||
@@ -56,5 +56,5 @@ "registry": "https://registry.npmjs.org", | ||
"@babel/core": "^7.14.3", | ||
"@babel/plugin-proposal-class-properties": "^7.13.0", | ||
"@babel/preset-env": "^7.14.2", | ||
"@babel/preset-react": "^7.13.13", | ||
"@babel/plugin-proposal-class-properties": "^7.14.3", | ||
"@babel/preset-env": "^7.14.3", | ||
"@babel/preset-react": "^7.14.3", | ||
"@storybook/addon-actions": "^5.3.17", | ||
@@ -61,0 +61,0 @@ "@storybook/addon-console": "^1.2.1", |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
93348
2094