Socket
Socket
Sign inDemoInstall

@persona-js/verify

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@persona-js/verify - npm Package Compare versions

Comparing version 0.3.3 to 0.3.4

2

dist/cdn.js

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

!function(){"use strict";var n,e=function(){return(e=Object.assign||function(n){for(var e,o=1,t=arguments.length;o<t;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}).apply(this,arguments)},o=["allow-same-origin","allow-scripts","allow-forms","allow-popups","allow-modals","allow-top-navigation-by-user-activation"];!function(n){n.Start="start",n.Complete="complete",n.Fail="fail",n.Load="load",n.Exit="exit"}(n||(n={}));var t=function(t){var i={start:[],complete:[],fail:[],load:[],exit:[]},r=e({},t.prefill),a=e(e({},t),{prefill:null}),l=function(){return[Object.entries(a).filter((function(n){return null!==n[1]&&"host"!==n[0]})).reduce((function(n,e){var o=e[0],t=e[1];return n+"&"+o+"="+encodeURIComponent(t)}),"?client=something"),Object.entries(r).filter((function(n){return void 0!==n[1]})).map((function(n){var e=n[0],o=n[1];return"prefill["+(e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z])([A-Z])(?=[a-z])/g,"$1-$2").toLowerCase()+"]=")+encodeURIComponent(o)})).join("&")].join("&")},d={getHostedFlowUrl:function(){return"https://"+t.host+"/verify"+l()},on:function(n,e){return i[n].push(e),d},prefill:function(n){r=e(e({},r),n)},start:function(){var e=document.createElement("div");e.id="persona-js-embedded-flow";var r=document.createElement("style");r.innerText="\n @keyframes appear-backdrop {\n from {\n background-color: #00000000;\n }\n\n to {\n background-color: #000000AA;\n }\n }\n\n div#persona-js-embedded-flow {\n position: absolute;\n top: 0;\n bottom: 0;\n width: 100%;\n height: 100vh;\n background-color: #000000AA;\n overflow-y: scroll;\n\n animation-duration: .1s;\n animation-name: appear-backdrop;\n animation-timing-function: ease-out;\n }\n\n @keyframes appear-iframe {\n from {\n margin-top: 68px;\n }\n\n 90% {\n margin-top: 62px;\n }\n\n to {\n margin-top: 64px;\n }\n }\n\n div#persona-js-embedded-flow iframe {\n position: absolute;\n width: 100%;\n height: 100%;\n margin-right: auto;\n margin-left: auto;\n margin-bottom: 10%;\n left: 0;\n right: 0;\n border-radius: 4px;\n border: none;\n background: white;\n\n }\n\n @media only screen and (min-width: 600px) and (min-height: 600px) {\n div#persona-js-embedded-flow iframe {\n margin-top: 64px;\n max-width: 400px;\n max-height: 650px;\n box-shadow: 0 12px 40px 2px rbga(0, 0, 0, 0.4);\n\n animation-duration: .2s;\n animation-name: appear-iframe;\n animation-timing-function: ease-out;\n }\n }\n".replace(/^\s+/g,"").replace(/\n/g,""),e.appendChild(r);var a=document.createElement("iframe");a.allow="camera",a.src="https://"+t.host+"/widget"+l()+"&iframe-origin="+encodeURIComponent(window.location.origin),a.setAttribute("sandbox",o.join(" "));var d=function(o){var r=function(){window.removeEventListener("message",d),e.remove()};if(o.origin.includes("//"+t.host))switch(o.data.name){case"start":i[n.Start].forEach((function(n,e){try{n(o.data.metadata.inquiryId)}catch(n){console.error("[@persona-js/verify]","Failed to run 'start' event listener #"+e)}}));break;case"complete":i[n.Complete].forEach((function(n,e){try{n(o.data.metadata.inquiryId)}catch(n){console.error("[@persona-js/verify]","Failed to run 'complete' event listener #"+e)}})),r();break;case"fail":i[n.Fail].forEach((function(n,e){try{n(o.data.metadata.inquiryId)}catch(n){console.error("[@persona-js/verify]","Failed to run 'fail' event listener #"+e)}}));break;case"exit":i[n.Exit].forEach((function(n,e){var t;try{n(null!==(t=o.data.metadata.inquiryId)&&void 0!==t?t:null)}catch(n){console.error("[@persona-js/verify]","Failed to run 'exit' event listener #"+e)}})),r()}};window.addEventListener("message",d),document.body.appendChild(e),e.appendChild(a)}};return d},i=Object.freeze({__proto__:null,get EventType(){return n},newInquiry:function(n,e){var o,i,r,a,l,d;return t({"template-id":n,host:null!==(o=null==e?void 0:e.host)&&void 0!==o?o:"withpersona.com",language:null!==(i=null==e?void 0:e.language)&&void 0!==i?i:null,environment:null!==(r=null==e?void 0:e.environment)&&void 0!==r?r:"sandbox","reference-id":null!==(a=null==e?void 0:e.referenceId)&&void 0!==a?a:null,"account-id":null!==(l=null==e?void 0:e.accountId)&&void 0!==l?l:null,prefill:null!==(d=null==e?void 0:e.prefill)&&void 0!==d?d:null})},resumeInquiry:function(n,e){var o,i,r,a;return t({"inquiry-id":n,host:null!==(o=null==e?void 0:e.host)&&void 0!==o?o:"withpersona.com",language:null!==(i=null==e?void 0:e.language)&&void 0!==i?i:null,"session-token":null!==(r=null==e?void 0:e.sessionToken)&&void 0!==r?r:null,prefill:null!==(a=null==e?void 0:e.prefill)&&void 0!==a?a:null})}});window&&(window.Persona=i)}();
!function(){"use strict";var n,e=function(){return(e=Object.assign||function(n){for(var e,o=1,t=arguments.length;o<t;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}).apply(this,arguments)},o=["allow-same-origin","allow-scripts","allow-forms","allow-popups","allow-modals","allow-top-navigation-by-user-activation"];!function(n){n.Start="start",n.Complete="complete",n.Fail="fail",n.Load="load",n.Exit="exit"}(n||(n={}));var t=function(t){var i={start:[],complete:[],fail:[],load:[],exit:[]},r=e({},t.prefill),a=e(e({},t),{prefill:null}),l=function(){return[Object.entries(a).filter((function(n){return null!==n[1]&&"host"!==n[0]})).reduce((function(n,e){var o=e[0],t=e[1];return n+"&"+o+"="+encodeURIComponent(t)}),"?client=something"),Object.entries(r).filter((function(n){return void 0!==n[1]})).map((function(n){var e=n[0],o=n[1];return"prefill["+(e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z])([A-Z])(?=[a-z])/g,"$1-$2").toLowerCase()+"]=")+encodeURIComponent(o)})).join("&")].join("&")},d={getHostedFlowUrl:function(){return"https://"+t.host+"/verify"+l()},on:function(n,e){return i[n].push(e),d},prefill:function(n){r=e(e({},r),n)},start:function(){var e=document.createElement("div");e.id="persona-js-embedded-flow";var r=document.createElement("style");r.innerText="\n @keyframes appear-backdrop {\n from {\n background-color: #00000000;\n }\n\n to {\n background-color: #000000AA;\n }\n }\n\n div#persona-js-embedded-flow {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n width: 100%;\n height: 100vh;\n background-color: #000000AA;\n overflow-y: scroll;\n\n animation-duration: .1s;\n animation-name: appear-backdrop;\n animation-timing-function: ease-out;\n }\n\n @keyframes appear-iframe {\n from {\n margin-top: 68px;\n }\n\n 90% {\n margin-top: 62px;\n }\n\n to {\n margin-top: 64px;\n }\n }\n\n div#persona-js-embedded-flow iframe {\n position: absolute;\n width: 100%;\n height: 100%;\n margin-right: auto;\n margin-left: auto;\n margin-bottom: 10%;\n left: 0;\n right: 0;\n border-radius: 4px;\n border: none;\n background: white;\n\n }\n\n @media only screen and (min-width: 600px) and (min-height: 600px) {\n div#persona-js-embedded-flow iframe {\n margin-top: 64px;\n max-width: 400px;\n max-height: 650px;\n box-shadow: 0 12px 40px 2px rbga(0, 0, 0, 0.4);\n\n animation-duration: .2s;\n animation-name: appear-iframe;\n animation-timing-function: ease-out;\n }\n }\n".replace(/^\s+/g,"").replace(/\n/g,""),e.appendChild(r);var a=document.createElement("iframe");a.allow="camera",a.src="https://"+t.host+"/widget"+l()+"&iframe-origin="+encodeURIComponent(window.location.origin),a.setAttribute("sandbox",o.join(" "));var d=function(o){var r=function(){window.removeEventListener("message",d),e.remove()};if(o.origin.includes("//"+t.host))switch(o.data.name){case"start":i[n.Start].forEach((function(n,e){try{n(o.data.metadata.inquiryId)}catch(n){console.error("[@persona-js/verify]","Failed to run 'start' event listener #"+e)}}));break;case"complete":i[n.Complete].forEach((function(n,e){try{n(o.data.metadata.inquiryId)}catch(n){console.error("[@persona-js/verify]","Failed to run 'complete' event listener #"+e)}})),r();break;case"fail":i[n.Fail].forEach((function(n,e){try{n(o.data.metadata.inquiryId)}catch(n){console.error("[@persona-js/verify]","Failed to run 'fail' event listener #"+e)}}));break;case"exit":i[n.Exit].forEach((function(n,e){var t;try{n(null!==(t=o.data.metadata.inquiryId)&&void 0!==t?t:null)}catch(n){console.error("[@persona-js/verify]","Failed to run 'exit' event listener #"+e)}})),r()}};window.addEventListener("message",d),document.body.appendChild(e),e.appendChild(a)}};return d},i=Object.freeze({__proto__:null,get EventType(){return n},newInquiry:function(n,e){var o,i,r,a,l,d;return t({"template-id":n,host:null!==(o=null==e?void 0:e.host)&&void 0!==o?o:"withpersona.com",language:null!==(i=null==e?void 0:e.language)&&void 0!==i?i:null,environment:null!==(r=null==e?void 0:e.environment)&&void 0!==r?r:"sandbox","reference-id":null!==(a=null==e?void 0:e.referenceId)&&void 0!==a?a:null,"account-id":null!==(l=null==e?void 0:e.accountId)&&void 0!==l?l:null,prefill:null!==(d=null==e?void 0:e.prefill)&&void 0!==d?d:null})},resumeInquiry:function(n,e){var o,i,r,a;return t({"inquiry-id":n,host:null!==(o=null==e?void 0:e.host)&&void 0!==o?o:"withpersona.com",language:null!==(i=null==e?void 0:e.language)&&void 0!==i?i:null,"session-token":null!==(r=null==e?void 0:e.sessionToken)&&void 0!==r?r:null,prefill:null!==(a=null==e?void 0:e.prefill)&&void 0!==a?a:null})}});window&&(window.Persona=i)}();

@@ -39,3 +39,3 @@ 'use strict';

];
var BACKDROP_STYLE = "\n @keyframes appear-backdrop {\n from {\n background-color: #00000000;\n }\n\n to {\n background-color: #000000AA;\n }\n }\n\n div#persona-js-embedded-flow {\n position: absolute;\n top: 0;\n bottom: 0;\n width: 100%;\n height: 100vh;\n background-color: #000000AA;\n overflow-y: scroll;\n\n animation-duration: .1s;\n animation-name: appear-backdrop;\n animation-timing-function: ease-out;\n }\n\n @keyframes appear-iframe {\n from {\n margin-top: 68px;\n }\n\n 90% {\n margin-top: 62px;\n }\n\n to {\n margin-top: 64px;\n }\n }\n\n div#persona-js-embedded-flow iframe {\n position: absolute;\n width: 100%;\n height: 100%;\n margin-right: auto;\n margin-left: auto;\n margin-bottom: 10%;\n left: 0;\n right: 0;\n border-radius: 4px;\n border: none;\n background: white;\n\n }\n\n @media only screen and (min-width: 600px) and (min-height: 600px) {\n div#persona-js-embedded-flow iframe {\n margin-top: 64px;\n max-width: 400px;\n max-height: 650px;\n box-shadow: 0 12px 40px 2px rbga(0, 0, 0, 0.4);\n\n animation-duration: .2s;\n animation-name: appear-iframe;\n animation-timing-function: ease-out;\n }\n }\n";
var BACKDROP_STYLE = "\n @keyframes appear-backdrop {\n from {\n background-color: #00000000;\n }\n\n to {\n background-color: #000000AA;\n }\n }\n\n div#persona-js-embedded-flow {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n width: 100%;\n height: 100vh;\n background-color: #000000AA;\n overflow-y: scroll;\n\n animation-duration: .1s;\n animation-name: appear-backdrop;\n animation-timing-function: ease-out;\n }\n\n @keyframes appear-iframe {\n from {\n margin-top: 68px;\n }\n\n 90% {\n margin-top: 62px;\n }\n\n to {\n margin-top: 64px;\n }\n }\n\n div#persona-js-embedded-flow iframe {\n position: absolute;\n width: 100%;\n height: 100%;\n margin-right: auto;\n margin-left: auto;\n margin-bottom: 10%;\n left: 0;\n right: 0;\n border-radius: 4px;\n border: none;\n background: white;\n\n }\n\n @media only screen and (min-width: 600px) and (min-height: 600px) {\n div#persona-js-embedded-flow iframe {\n margin-top: 64px;\n max-width: 400px;\n max-height: 650px;\n box-shadow: 0 12px 40px 2px rbga(0, 0, 0, 0.4);\n\n animation-duration: .2s;\n animation-name: appear-iframe;\n animation-timing-function: ease-out;\n }\n }\n";
var camelToKebab = function (camel) {

@@ -42,0 +42,0 @@ return camel

{
"name": "@persona-js/verify",
"version": "0.3.3",
"version": "0.3.4",
"description": "An unofficial Persona client to verify customers",

@@ -17,3 +17,3 @@ "main": "./dist/index.js",

],
"gitHead": "924da69c81ab4879b9a02b0729c72c311efe84a6"
"gitHead": "e74515b2525d7fc0eaa400b802a2cd4d702bb3e3"
}

@@ -7,3 +7,3 @@ # @persona-js/verify

⚠️ This package is still in beta and missing many features of official module, so don't recommend using in production.
⚠️ This package is still in beta and missing some features of official module, so still not recommended using in production.

@@ -58,3 +58,7 @@ ## Install

- a11y
- ESM build
- Separate down the monolithic `index.ts`
- License
- For each module
- For cdn build
- Test

@@ -61,0 +65,0 @@ - Demo

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