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

@checkr/web-sdk

Package Overview
Dependencies
Maintainers
8
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@checkr/web-sdk - npm Package Compare versions

Comparing version 0.0.18 to 0.0.19

3

dist/web-sdk.es.js

@@ -304,2 +304,3 @@ var __defProp = Object.defineProperty;

const [embedDefinitions, setEmbedDefinitions] = React.useState(null);
const embedProps = propsWithInternalProps(props);
React.useEffect(() => {

@@ -313,3 +314,3 @@ loadEmbedDefinitions().then((embedDefinitions2) => {

const Component = embedDefinition.driver("react", { React, ReactDOM });
return React.createElement(Component, null, propsWithInternalProps(props));
return React.createElement(Component, embedProps, null);
} else {

@@ -316,0 +317,0 @@ return React.createElement("div", null);

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

var O=Object.defineProperty,P=Object.defineProperties;var N=Object.getOwnPropertyDescriptors;var k=Object.getOwnPropertySymbols;var B=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable;var E=(o,i,d)=>i in o?O(o,i,{enumerable:!0,configurable:!0,writable:!0,value:d}):o[i]=d,x=(o,i)=>{for(var d in i||(i={}))B.call(i,d)&&E(o,d,i[d]);if(k)for(var d of k(i))I.call(i,d)&&E(o,d,i[d]);return o},$=(o,i)=>P(o,N(i));(function(o,i){typeof exports=="object"&&typeof module!="undefined"?i(exports):typeof define=="function"&&define.amd?define(["exports"],i):(o=typeof globalThis!="undefined"?globalThis:o||self,i(o.Checkr={}))})(this,function(o){"use strict";var i=['a[href]:not([tabindex^="-"])','area[href]:not([tabindex^="-"])','input:not([type="hidden"]):not([type="radio"]):not([disabled]):not([tabindex^="-"])','input[type="radio"]:not([disabled]):not([tabindex^="-"])','select:not([disabled]):not([tabindex^="-"])','textarea:not([disabled]):not([tabindex^="-"])','button:not([disabled]):not([tabindex^="-"])','iframe:not([tabindex^="-"])','audio[controls]:not([tabindex^="-"])','video[controls]:not([tabindex^="-"])','[contenteditable]:not([tabindex^="-"])','[tabindex]:not([tabindex^="-"])'],d=9,A=27;function a(e){this._show=this.show.bind(this),this._hide=this.hide.bind(this),this._maintainFocus=this._maintainFocus.bind(this),this._bindKeypress=this._bindKeypress.bind(this),this.$el=e,this.shown=!1,this._id=this.$el.getAttribute("data-a11y-dialog")||this.$el.id,this._previouslyFocused=null,this._listeners={},this.create()}a.prototype.create=function(){return this.$el.setAttribute("aria-hidden",!0),this.$el.setAttribute("aria-modal",!0),this.$el.setAttribute("tabindex",-1),this.$el.hasAttribute("role")||this.$el.setAttribute("role","dialog"),this._openers=l('[data-a11y-dialog-show="'+this._id+'"]'),this._openers.forEach(function(e){e.addEventListener("click",this._show)}.bind(this)),this._closers=l("[data-a11y-dialog-hide]",this.$el).concat(l('[data-a11y-dialog-hide="'+this._id+'"]')),this._closers.forEach(function(e){e.addEventListener("click",this._hide)}.bind(this)),this._fire("create"),this},a.prototype.show=function(e){return this.shown?this:(this._previouslyFocused=document.activeElement,this.$el.removeAttribute("aria-hidden"),this.shown=!0,y(this.$el),document.body.addEventListener("focus",this._maintainFocus,!0),document.addEventListener("keydown",this._bindKeypress),this._fire("show",e),this)},a.prototype.hide=function(e){return this.shown?(this.shown=!1,this.$el.setAttribute("aria-hidden","true"),this._previouslyFocused&&this._previouslyFocused.focus&&this._previouslyFocused.focus(),document.body.removeEventListener("focus",this._maintainFocus,!0),document.removeEventListener("keydown",this._bindKeypress),this._fire("hide",e),this):this},a.prototype.destroy=function(){return this.hide(),this._openers.forEach(function(e){e.removeEventListener("click",this._show)}.bind(this)),this._closers.forEach(function(e){e.removeEventListener("click",this._hide)}.bind(this)),this._fire("destroy"),this._listeners={},this},a.prototype.on=function(e,t){return typeof this._listeners[e]=="undefined"&&(this._listeners[e]=[]),this._listeners[e].push(t),this},a.prototype.off=function(e,t){var n=(this._listeners[e]||[]).indexOf(t);return n>-1&&this._listeners[e].splice(n,1),this},a.prototype._fire=function(e,t){var n=this._listeners[e]||[],s=new CustomEvent(e,{detail:t});this.$el.dispatchEvent(s),n.forEach(function(c){c(this.$el,t)}.bind(this))},a.prototype._bindKeypress=function(e){!this.$el.contains(document.activeElement)||(this.shown&&e.which===A&&this.$el.getAttribute("role")!=="alertdialog"&&(e.preventDefault(),this.hide(e)),this.shown&&e.which===d&&F(this.$el,e))},a.prototype._maintainFocus=function(e){this.shown&&!e.target.closest('[aria-modal="true"]')&&!e.target.closest("[data-a11y-dialog-ignore-focus-trap]")&&y(this.$el)};function T(e){return Array.prototype.slice.call(e)}function l(e,t){return T((t||document).querySelectorAll(e))}function y(e){var t=e.querySelector("[autofocus]")||e;t.focus()}function C(e){return l(i.join(","),e).filter(function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)})}function F(e,t){var n=C(e),s=n.indexOf(document.activeElement);t.shiftKey&&s===0?(n[n.length-1].focus(),t.preventDefault()):!t.shiftKey&&s===n.length-1&&(n[0].focus(),t.preventDefault())}function m(){l("[data-a11y-dialog]").forEach(function(e){new a(e)})}typeof document!="undefined"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",m):window.requestAnimationFrame?window.requestAnimationFrame(m):window.setTimeout(m,16));var D=`.checkr-dialog-container {
var M=Object.defineProperty,O=Object.defineProperties;var N=Object.getOwnPropertyDescriptors;var k=Object.getOwnPropertySymbols;var B=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable;var E=(o,i,d)=>i in o?M(o,i,{enumerable:!0,configurable:!0,writable:!0,value:d}):o[i]=d,x=(o,i)=>{for(var d in i||(i={}))B.call(i,d)&&E(o,d,i[d]);if(k)for(var d of k(i))I.call(i,d)&&E(o,d,i[d]);return o},$=(o,i)=>O(o,N(i));(function(o,i){typeof exports=="object"&&typeof module!="undefined"?i(exports):typeof define=="function"&&define.amd?define(["exports"],i):(o=typeof globalThis!="undefined"?globalThis:o||self,i(o.Checkr={}))})(this,function(o){"use strict";var i=['a[href]:not([tabindex^="-"])','area[href]:not([tabindex^="-"])','input:not([type="hidden"]):not([type="radio"]):not([disabled]):not([tabindex^="-"])','input[type="radio"]:not([disabled]):not([tabindex^="-"])','select:not([disabled]):not([tabindex^="-"])','textarea:not([disabled]):not([tabindex^="-"])','button:not([disabled]):not([tabindex^="-"])','iframe:not([tabindex^="-"])','audio[controls]:not([tabindex^="-"])','video[controls]:not([tabindex^="-"])','[contenteditable]:not([tabindex^="-"])','[tabindex]:not([tabindex^="-"])'],d=9,A=27;function a(e){this._show=this.show.bind(this),this._hide=this.hide.bind(this),this._maintainFocus=this._maintainFocus.bind(this),this._bindKeypress=this._bindKeypress.bind(this),this.$el=e,this.shown=!1,this._id=this.$el.getAttribute("data-a11y-dialog")||this.$el.id,this._previouslyFocused=null,this._listeners={},this.create()}a.prototype.create=function(){return this.$el.setAttribute("aria-hidden",!0),this.$el.setAttribute("aria-modal",!0),this.$el.setAttribute("tabindex",-1),this.$el.hasAttribute("role")||this.$el.setAttribute("role","dialog"),this._openers=l('[data-a11y-dialog-show="'+this._id+'"]'),this._openers.forEach(function(e){e.addEventListener("click",this._show)}.bind(this)),this._closers=l("[data-a11y-dialog-hide]",this.$el).concat(l('[data-a11y-dialog-hide="'+this._id+'"]')),this._closers.forEach(function(e){e.addEventListener("click",this._hide)}.bind(this)),this._fire("create"),this},a.prototype.show=function(e){return this.shown?this:(this._previouslyFocused=document.activeElement,this.$el.removeAttribute("aria-hidden"),this.shown=!0,y(this.$el),document.body.addEventListener("focus",this._maintainFocus,!0),document.addEventListener("keydown",this._bindKeypress),this._fire("show",e),this)},a.prototype.hide=function(e){return this.shown?(this.shown=!1,this.$el.setAttribute("aria-hidden","true"),this._previouslyFocused&&this._previouslyFocused.focus&&this._previouslyFocused.focus(),document.body.removeEventListener("focus",this._maintainFocus,!0),document.removeEventListener("keydown",this._bindKeypress),this._fire("hide",e),this):this},a.prototype.destroy=function(){return this.hide(),this._openers.forEach(function(e){e.removeEventListener("click",this._show)}.bind(this)),this._closers.forEach(function(e){e.removeEventListener("click",this._hide)}.bind(this)),this._fire("destroy"),this._listeners={},this},a.prototype.on=function(e,t){return typeof this._listeners[e]=="undefined"&&(this._listeners[e]=[]),this._listeners[e].push(t),this},a.prototype.off=function(e,t){var n=(this._listeners[e]||[]).indexOf(t);return n>-1&&this._listeners[e].splice(n,1),this},a.prototype._fire=function(e,t){var n=this._listeners[e]||[],s=new CustomEvent(e,{detail:t});this.$el.dispatchEvent(s),n.forEach(function(c){c(this.$el,t)}.bind(this))},a.prototype._bindKeypress=function(e){!this.$el.contains(document.activeElement)||(this.shown&&e.which===A&&this.$el.getAttribute("role")!=="alertdialog"&&(e.preventDefault(),this.hide(e)),this.shown&&e.which===d&&F(this.$el,e))},a.prototype._maintainFocus=function(e){this.shown&&!e.target.closest('[aria-modal="true"]')&&!e.target.closest("[data-a11y-dialog-ignore-focus-trap]")&&y(this.$el)};function T(e){return Array.prototype.slice.call(e)}function l(e,t){return T((t||document).querySelectorAll(e))}function y(e){var t=e.querySelector("[autofocus]")||e;t.focus()}function C(e){return l(i.join(","),e).filter(function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)})}function F(e,t){var n=C(e),s=n.indexOf(document.activeElement);t.shiftKey&&s===0?(n[n.length-1].focus(),t.preventDefault()):!t.shiftKey&&s===n.length-1&&(n[0].focus(),t.preventDefault())}function m(){l("[data-a11y-dialog]").forEach(function(e){new a(e)})}typeof document!="undefined"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",m):window.requestAnimationFrame?window.requestAnimationFrame(m):window.setTimeout(m,16));var D=`.checkr-dialog-container {
position: fixed;

@@ -86,2 +86,2 @@ top: 0;

</div>
`;async function K(e){const t=await fetch(e,{method:"POST"});try{return(await t.json()).token}catch{return null}}const p="https://web-sdk-services.checkr.com";function g(){const n=(s,c,r=0)=>{window.CheckrEmbedDefinitions&&s(),r>=20?c():setTimeout(()=>{n(s,c,r+1)},300)};return new Promise((s,c)=>{const r=document.head||document.body||document.documentElement,b=r.querySelector(`script[src*="${p}"]`),u=()=>{s(window.CheckrEmbedDefinitions)},f=()=>{c(new Error(`Failed to load script: ${p}`))};if(b){n(u,f);return}const h=document.createElement("script"),_=()=>{h.onerror=null,h.onload=null};h.onerror=()=>{_(),f()},h.onload=()=>{_(),u()},h.async=!0,h.src=`${p}/lib/checkr-embed-definitions.js`,r.appendChild(h)})}function w(e){const t=()=>K(e.sessionTokenPath);return $(x({},e),{onSessionTokenNeed:t})}class v{constructor(t){this.props=w(t)}render(t){g().then(n=>{const s=this.constructor.name;n[s](this.props).render(t)})}modal(t={width:"600px"}){S(n=>{this.render(n)},t)}static useReact(t,n){return s=>{const c=this.name,[r,b]=t.useState(null);if(t.useEffect(()=>{g().then(u=>{b(u)})},[]),r){const f=r[c].driver("react",{React:t,ReactDOM:n});return t.createElement(f,null,w(s))}else return t.createElement("div",null)}}}class j extends v{constructor(t={}){super(t)}}class q extends v{constructor(t={}){super(t)}}var M={NewInvitation:j,ReportsOverview:q};o.Embeds=M,Object.defineProperty(o,"__esModule",{value:!0}),o[Symbol.toStringTag]="Module"});
`;async function K(e){const t=await fetch(e,{method:"POST"});try{return(await t.json()).token}catch{return null}}const p="https://web-sdk-services.checkr.com";function g(){const n=(s,c,r=0)=>{window.CheckrEmbedDefinitions&&s(),r>=20?c():setTimeout(()=>{n(s,c,r+1)},300)};return new Promise((s,c)=>{const r=document.head||document.body||document.documentElement,b=r.querySelector(`script[src*="${p}"]`),f=()=>{s(window.CheckrEmbedDefinitions)},u=()=>{c(new Error(`Failed to load script: ${p}`))};if(b){n(f,u);return}const h=document.createElement("script"),_=()=>{h.onerror=null,h.onload=null};h.onerror=()=>{_(),u()},h.onload=()=>{_(),f()},h.async=!0,h.src=`${p}/lib/checkr-embed-definitions.js`,r.appendChild(h)})}function w(e){const t=()=>K(e.sessionTokenPath);return $(x({},e),{onSessionTokenNeed:t})}class v{constructor(t){this.props=w(t)}render(t){g().then(n=>{const s=this.constructor.name;n[s](this.props).render(t)})}modal(t={width:"600px"}){S(n=>{this.render(n)},t)}static useReact(t,n){return s=>{const c=this.name,[r,b]=t.useState(null),f=w(s);if(t.useEffect(()=>{g().then(u=>{b(u)})},[]),r){const h=r[c].driver("react",{React:t,ReactDOM:n});return t.createElement(h,f,null)}else return t.createElement("div",null)}}}class j extends v{constructor(t={}){super(t)}}class P extends v{constructor(t={}){super(t)}}var q={NewInvitation:j,ReportsOverview:P};o.Embeds=q,Object.defineProperty(o,"__esModule",{value:!0}),o[Symbol.toStringTag]="Module"});
{
"name": "@checkr/web-sdk",
"version": "0.0.18",
"version": "0.0.19",
"files": [

@@ -5,0 +5,0 @@ "dist"

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