New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@checkr/web-sdk

Package Overview
Dependencies
Maintainers
5
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.27 to 0.0.28

10

dist/web-sdk.es.js
/**
* Name: @checkr/web-sdk
* Version: 0.0.27
* Version: 0.0.28
*/

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

var modalStyles = ".checkr-dialog-container {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 100;\n display: flex;\n}\n\n.checkr-dialog-container[aria-hidden='true'] {\n display: none;\n}\n\n.checkr-dialog-overlay {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n background-color: rgba(43, 46, 56, 0.5);\n animation: checkr-fade-in 100ms both;\n}\n\n.checkr-dialog-content {\n position: relative;\n z-index: 100;\n padding: 2rem;\n margin: auto;\n background-color: rgb(255, 255, 255);\n border-radius: 0.1rem;\n animation: checkr-fade-in 100ms 200ms both, checkr-slide-up 400ms 200ms both;\n}\n\n@keyframes checkr-fade-in {\n from {\n opacity: 0;\n }\n}\n\n@keyframes checkr-slide-up {\n from {\n transform: translateY(10%);\n }\n}\n\n.checkr-dialog-close {\n position: absolute;\n top: 0.5em;\n right: 0.5em;\n width: 1.2em;\n height: 1.2em;\n padding: 0;\n font-size: 1.25em;\n font-weight: bold;\n text-align: center;\n cursor: pointer;\n background-color: transparent;\n border: 0;\n transition: 0.15s;\n}\n\n@media (max-width: 480px) {\n .checkr-dialog-content {\n width: 100%;\n }\n}\n";
const triggerModal = (onShow, params) => {
const triggerModal = (onShow, params, nonce) => {
const modalContainer = document.createElement("div");

@@ -194,2 +194,4 @@ modalContainer.id = "checkr-modal-container";

const styleElement = document.createElement("style");
if (nonce)
styleElement.setAttribute("nonce", nonce);
styleElement.innerHTML = `.checkr-dialog-content {width: ${params.width};}` + modalStyles;

@@ -301,3 +303,3 @@ document.getElementsByTagName("head")[0].appendChild(styleElement);

}
const version = "0.0.27";
const version = "0.0.28";
function withInternalProps(props) {

@@ -324,3 +326,3 @@ const internalProps = {

this.render(modalContentSelector);
}, params);
}, params, this.props.cspNonce);
}

@@ -327,0 +329,0 @@ static useReact(React, ReactDOM) {

8

dist/web-sdk.umd.js
/**
* Name: @checkr/web-sdk
* Version: 0.0.27
* Version: 0.0.28
*/
var P=Object.defineProperty;var E=Object.getOwnPropertySymbols;var H=Object.prototype.hasOwnProperty,M=Object.prototype.propertyIsEnumerable;var x=(s,o,a)=>o in s?P(s,o,{enumerable:!0,configurable:!0,writable:!0,value:a}):s[o]=a,m=(s,o)=>{for(var a in o||(o={}))H.call(o,a)&&x(s,a,o[a]);if(E)for(var a of E(o))M.call(o,a)&&x(s,a,o[a]);return s};(function(s,o){typeof exports=="object"&&typeof module!="undefined"?o(exports):typeof define=="function"&&define.amd?define(["exports"],o):(s=typeof globalThis!="undefined"?globalThis:s||self,o(s.Checkr={}))})(this,function(s){"use strict";var o=['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^="-"])'],a=9,$=27;function c(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()}c.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=u('[data-a11y-dialog-show="'+this._id+'"]'),this._openers.forEach(function(e){e.addEventListener("click",this._show)}.bind(this)),this._closers=u("[data-a11y-dialog-hide]",this.$el).concat(u('[data-a11y-dialog-hide="'+this._id+'"]')),this._closers.forEach(function(e){e.addEventListener("click",this._hide)}.bind(this)),this._fire("create"),this},c.prototype.show=function(e){return this.shown?this:(this._previouslyFocused=document.activeElement,this.$el.removeAttribute("aria-hidden"),this.shown=!0,g(this.$el),document.body.addEventListener("focus",this._maintainFocus,!0),document.addEventListener("keydown",this._bindKeypress),this._fire("show",e),this)},c.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},c.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},c.prototype.on=function(e,t){return typeof this._listeners[e]=="undefined"&&(this._listeners[e]=[]),this._listeners[e].push(t),this},c.prototype.off=function(e,t){var n=(this._listeners[e]||[]).indexOf(t);return n>-1&&this._listeners[e].splice(n,1),this},c.prototype._fire=function(e,t){var n=this._listeners[e]||[],i=new CustomEvent(e,{detail:t});this.$el.dispatchEvent(i),n.forEach(function(r){r(this.$el,t)}.bind(this))},c.prototype._bindKeypress=function(e){!this.$el.contains(document.activeElement)||(this.shown&&e.which===$&&this.$el.getAttribute("role")!=="alertdialog"&&(e.preventDefault(),this.hide(e)),this.shown&&e.which===a&&D(this.$el,e))},c.prototype._maintainFocus=function(e){this.shown&&!e.target.closest('[aria-modal="true"]')&&!e.target.closest("[data-a11y-dialog-ignore-focus-trap]")&&g(this.$el)};function S(e){return Array.prototype.slice.call(e)}function u(e,t){return S((t||document).querySelectorAll(e))}function g(e){var t=e.querySelector("[autofocus]")||e;t.focus()}function A(e){return u(o.join(","),e).filter(function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)})}function D(e,t){var n=A(e),i=n.indexOf(document.activeElement);t.shiftKey&&i===0?(n[n.length-1].focus(),t.preventDefault()):!t.shiftKey&&i===n.length-1&&(n[0].focus(),t.preventDefault())}function p(){u("[data-a11y-dialog]").forEach(function(e){new c(e)})}typeof document!="undefined"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",p):window.requestAnimationFrame?window.requestAnimationFrame(p):window.setTimeout(p,16));var T=`.checkr-dialog-container {
var P=Object.defineProperty;var E=Object.getOwnPropertySymbols;var H=Object.prototype.hasOwnProperty,M=Object.prototype.propertyIsEnumerable;var x=(r,s,d)=>s in r?P(r,s,{enumerable:!0,configurable:!0,writable:!0,value:d}):r[s]=d,m=(r,s)=>{for(var d in s||(s={}))H.call(s,d)&&x(r,d,s[d]);if(E)for(var d of E(s))M.call(s,d)&&x(r,d,s[d]);return r};(function(r,s){typeof exports=="object"&&typeof module!="undefined"?s(exports):typeof define=="function"&&define.amd?define(["exports"],s):(r=typeof globalThis!="undefined"?globalThis:r||self,s(r.Checkr={}))})(this,function(r){"use strict";var s=['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,$=27;function c(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()}c.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=u('[data-a11y-dialog-show="'+this._id+'"]'),this._openers.forEach(function(e){e.addEventListener("click",this._show)}.bind(this)),this._closers=u("[data-a11y-dialog-hide]",this.$el).concat(u('[data-a11y-dialog-hide="'+this._id+'"]')),this._closers.forEach(function(e){e.addEventListener("click",this._hide)}.bind(this)),this._fire("create"),this},c.prototype.show=function(e){return this.shown?this:(this._previouslyFocused=document.activeElement,this.$el.removeAttribute("aria-hidden"),this.shown=!0,g(this.$el),document.body.addEventListener("focus",this._maintainFocus,!0),document.addEventListener("keydown",this._bindKeypress),this._fire("show",e),this)},c.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},c.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},c.prototype.on=function(e,t){return typeof this._listeners[e]=="undefined"&&(this._listeners[e]=[]),this._listeners[e].push(t),this},c.prototype.off=function(e,t){var n=(this._listeners[e]||[]).indexOf(t);return n>-1&&this._listeners[e].splice(n,1),this},c.prototype._fire=function(e,t){var n=this._listeners[e]||[],i=new CustomEvent(e,{detail:t});this.$el.dispatchEvent(i),n.forEach(function(o){o(this.$el,t)}.bind(this))},c.prototype._bindKeypress=function(e){!this.$el.contains(document.activeElement)||(this.shown&&e.which===$&&this.$el.getAttribute("role")!=="alertdialog"&&(e.preventDefault(),this.hide(e)),this.shown&&e.which===d&&D(this.$el,e))},c.prototype._maintainFocus=function(e){this.shown&&!e.target.closest('[aria-modal="true"]')&&!e.target.closest("[data-a11y-dialog-ignore-focus-trap]")&&g(this.$el)};function S(e){return Array.prototype.slice.call(e)}function u(e,t){return S((t||document).querySelectorAll(e))}function g(e){var t=e.querySelector("[autofocus]")||e;t.focus()}function A(e){return u(s.join(","),e).filter(function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)})}function D(e,t){var n=A(e),i=n.indexOf(document.activeElement);t.shiftKey&&i===0?(n[n.length-1].focus(),t.preventDefault()):!t.shiftKey&&i===n.length-1&&(n[0].focus(),t.preventDefault())}function b(){u("[data-a11y-dialog]").forEach(function(e){new c(e)})}typeof document!="undefined"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",b):window.requestAnimationFrame?window.requestAnimationFrame(b):window.setTimeout(b,16));var T=`.checkr-dialog-container {
position: fixed;

@@ -72,3 +72,3 @@ top: 0;

}
`;const C=(e,t)=>{const n=document.createElement("div");n.id="checkr-modal-container",n.innerHTML=F,document.body.appendChild(n);const i=document.createElement("style");i.innerHTML=`.checkr-dialog-content {width: ${t.width};}`+T,document.getElementsByTagName("head")[0].appendChild(i);const r=document.querySelector("#checkr-dialog"),d=new c(r);d.on("hide",()=>{n.remove(),i.remove(),d.destroy()}),d.on("show",()=>{e(".checkr-dialog-content")}),d.show()},F=`
`;const C=(e,t,n)=>{const i=document.createElement("div");i.id="checkr-modal-container",i.innerHTML=F,document.body.appendChild(i);const o=document.createElement("style");n&&o.setAttribute("nonce",n),o.innerHTML=`.checkr-dialog-content {width: ${t.width};}`+T,document.getElementsByTagName("head")[0].appendChild(o);const h=document.querySelector("#checkr-dialog"),a=new c(h);a.on("hide",()=>{i.remove(),o.remove(),a.destroy()}),a.on("show",()=>{e(".checkr-dialog-content")}),a.show()},F=`
<div

@@ -92,2 +92,2 @@ class="checkr-dialog-container"

</div>
`;let L="https://web-sdk-services.checkr.com";function w(){const e=window.devWebSDKServicesURL?window.devWebSDKServicesURL:L,t=20,n=300,i=(r,d,h=0)=>{window.CheckrEmbedDefinitions&&r(),h>=t?d():setTimeout(()=>{i(r,d,h+1)},n)};return new Promise((r,d)=>{const h=document.head||document.body||document.documentElement,y=h.querySelector(`script[src*="${e}"]`),f=()=>{r(window.CheckrEmbedDefinitions)},b=()=>{d(new Error(`Failed to load script: ${e}`))};if(y){i(f,b);return}const l=document.createElement("script"),_=()=>{l.onerror=null,l.onload=null};l.onerror=()=>{_(),b()},l.onload=()=>{_(),f()},l.async=!0,l.src=`${e}/lib/checkr-embed-definitions.js`,h.appendChild(l)})}async function K(e,t=()=>({})){const i=await fetch(e,{method:"POST",headers:(()=>{const r={"Content-type":"application/json"},d=t();return m(m({},r),d)})()});if(!i.ok)throw new Error(JSON.stringify({status:i.status,message:await i.json()}));try{return(await i.json()).token}catch{return null}}const N="0.0.27";function v(e){const t={onSessionTokenNeed:()=>K(e.sessionTokenPath,e.sessionTokenRequestHeaders),webSdkVersion:N};return m(m({},e),t)}class k{constructor(t){this.props=v(t)}render(t){w().then(n=>{const i=Object.getPrototypeOf(this).constructor.embedName();n[i](this.props).render(t)})}modal(t={width:"600px"}){C(n=>{this.render(n)},t)}static useReact(t,n){return i=>{const r=this.embedName(),[d,h]=t.useState(null),y=v(i);if(t.useEffect(()=>{w().then(f=>{h(f)})},[]),d){const b=d[r].driver("react",{React:t,ReactDOM:n});return t.createElement(b,y,null)}else return t.createElement("div",null)}}}class j extends k{constructor(t={}){super(t)}static embedName(){return"NewInvitation"}}class O extends k{constructor(t={}){super(t)}static embedName(){return"ReportsOverview"}}var q={NewInvitation:j,ReportsOverview:O};s.Embeds=q,Object.defineProperty(s,"__esModule",{value:!0}),s[Symbol.toStringTag]="Module"});
`;let L="https://web-sdk-services.checkr.com";function w(){const e=window.devWebSDKServicesURL?window.devWebSDKServicesURL:L,t=20,n=300,i=(o,h,a=0)=>{window.CheckrEmbedDefinitions&&o(),a>=t?h():setTimeout(()=>{i(o,h,a+1)},n)};return new Promise((o,h)=>{const a=document.head||document.body||document.documentElement,y=a.querySelector(`script[src*="${e}"]`),f=()=>{o(window.CheckrEmbedDefinitions)},p=()=>{h(new Error(`Failed to load script: ${e}`))};if(y){i(f,p);return}const l=document.createElement("script"),_=()=>{l.onerror=null,l.onload=null};l.onerror=()=>{_(),p()},l.onload=()=>{_(),f()},l.async=!0,l.src=`${e}/lib/checkr-embed-definitions.js`,a.appendChild(l)})}async function K(e,t=()=>({})){const i=await fetch(e,{method:"POST",headers:(()=>{const o={"Content-type":"application/json"},h=t();return m(m({},o),h)})()});if(!i.ok)throw new Error(JSON.stringify({status:i.status,message:await i.json()}));try{return(await i.json()).token}catch{return null}}const N="0.0.28";function v(e){const t={onSessionTokenNeed:()=>K(e.sessionTokenPath,e.sessionTokenRequestHeaders),webSdkVersion:N};return m(m({},e),t)}class k{constructor(t){this.props=v(t)}render(t){w().then(n=>{const i=Object.getPrototypeOf(this).constructor.embedName();n[i](this.props).render(t)})}modal(t={width:"600px"}){C(n=>{this.render(n)},t,this.props.cspNonce)}static useReact(t,n){return i=>{const o=this.embedName(),[h,a]=t.useState(null),y=v(i);if(t.useEffect(()=>{w().then(f=>{a(f)})},[]),h){const p=h[o].driver("react",{React:t,ReactDOM:n});return t.createElement(p,y,null)}else return t.createElement("div",null)}}}class j extends k{constructor(t={}){super(t)}static embedName(){return"NewInvitation"}}class O extends k{constructor(t={}){super(t)}static embedName(){return"ReportsOverview"}}var q={NewInvitation:j,ReportsOverview:O};r.Embeds=q,Object.defineProperty(r,"__esModule",{value:!0}),r[Symbol.toStringTag]="Module"});
{
"name": "@checkr/web-sdk",
"version": "0.0.27",
"version": "0.0.28",
"files": [

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

Sorry, the diff of this file is not supported yet

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