Socket
Socket
Sign inDemoInstall

@pactsafe/pactsafe-react-sdk

Package Overview
Dependencies
303
Maintainers
8
Versions
28
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.1 to 2.0.2

2

package.json
{
"name": "@pactsafe/pactsafe-react-sdk",
"version": "2.0.1",
"version": "2.0.2",
"description": "PactSafe React SDK - React SDK for easy Clickwrap/Browsewrap implementation leveraging PactSafe's JavaScript API",

@@ -5,0 +5,0 @@ "author": "PactSafe",

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

# PactSafe React SDK v2
# PactSafe React SDK

@@ -357,3 +357,3 @@ [![npm package][npm-badge]][npm]

[npm-badge]: https://img.shields.io/npm/v/npm-package.png?style=flat-square
[npm-badge]: https://img.shields.io/npm/v/@pactsafe/pactsafe-react-sdk.svg
[npm]: https://www.npmjs.com/package/@pactsafe/pactsafe-react-sdk

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

/*! @pactsafe/pactsafe-react-sdk v2.0.1 - https://github.com/PactSafe/pactsafe-react-sdk */
/*! @pactsafe/pactsafe-react-sdk v2.0.2 - https://github.com/PactSafe/pactsafe-react-sdk */
(function webpackUniversalModuleDefinition(root, factory) {

@@ -3,0 +3,0 @@ if(typeof exports === 'object' && typeof module === 'object')

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

/*! @pactsafe/pactsafe-react-sdk v2.0.1 - https://github.com/PactSafe/pactsafe-react-sdk */
/*! @pactsafe/pactsafe-react-sdk v2.0.2 - https://github.com/PactSafe/pactsafe-react-sdk */
!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.PSReactSDK=t(require("react")):e.PSReactSDK=t(e.React)}(window,function(e){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}([function(t,r){t.exports=e},function(e,t){e.exports={injectSnippet:function(e,t){!function(e,t,r,n,o,i,a,p,c,s,u){e.PactSafeObject=i,e[i]=e[i]||function(){(e[i].q=e[i].q||[]).push(arguments)},e[i].on=function(){(e[i].e=e[i].e||[]).push(arguments)},e[i].once=function(){(e[i].eo=e[i].eo||[]).push(arguments)},e[i].off=function(){(e[i].o=e[i].o||[]).push(arguments)},e[i].t=1*new Date,e[i].l=0,c=t.createElement(r),s=t.getElementsByTagName(r)[0],c.async=1,c.src=n,c.onload=c.onreadystatechange=function(){e[i].l=1},c.onerror=c.onabort=function(){e[i].l=0},s?s.parentNode.insertBefore(c,s):document.body.appendChild(c),setTimeout(function(){e[i].l||e[i].loaded||(e[i].error=1,(c=t.createElement(r)).async=1,c.src=o,c.onload=c.onreadystatechange=function(){e[i].l=1},c.onerror=c.onabort=function(){e[i].l=0},s.parentNode.insertBefore(c,s),(u=function(r,n){try{(n=t.createElement("img")).src="https://d3r8bdci515tjv.cloudfront.net/error.gif?t="+e[i].t+"&u="+encodeURIComponent(r),t.getElementsByTagName("body")[0].appendChild(n)}catch(e){}})(n),setTimeout(function(){e[i].l||e[i].loaded||(e[i].error=1,p&&p.call(this),u(o))},4e3))},4e3)}(window,document,"script",e,t,"_ps",0,function(){console.log("Unable to load the PactSafe PS.JS Library.")})},isSnippetLoaded:function(e){var t=document.getElementsByTagName("script");if(window._ps&&window._ps.loaded&&317===window._ps.realThang)return!0;for(var r=0;r<t.length;r+=1)if(-1!==t[r].src.indexOf(e))return!0;return!1}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e,t,r){return function(e,t){if("function"!=typeof e)throw new TypeError("The typeValidator argument must be a function with the signature function(props, propName, componentName).");if(t&&"string"!=typeof t)throw new TypeError("The error message is optional, but must be a string if provided.")}(e,r),function(n,o,i){for(var a=arguments.length,p=Array(3<a?a-3:0),c=3;c<a;c++)p[c-3]=arguments[c];return function(e,t,r,n){return"boolean"==typeof e?e:"function"==typeof e?e(t,r,n):!(1!=!!e||!e)}(t,n,o,i)?function(e,t){return Object.hasOwnProperty.call(e,t)}(n,o)?e.apply(void 0,[n,o,i].concat(p)):function(e,t,r,n){return n?new Error(n):new Error("Required "+e[t]+" `"+t+"` was not specified in `"+r+"`.")}(n,o,i,r):e.apply(void 0,[n,o,i].concat(p))}}},function(e,t,r){var n=r(5),o=r(6);e.exports=function(e,t,r){var i=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||n)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var p=0;p<16;++p)t[i+p]=a[p];return t||o(a)}},function(e,t,r){e.exports=r(7)},function(e,t){var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(r){var n=new Uint8Array(16);e.exports=function(){return r(n),n}}else{var o=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},function(e,t){for(var r=[],n=0;n<256;++n)r[n]=(n+256).toString(16).substr(1);e.exports=function(e,t){var n=t||0,o=r;return[o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]]].join("")}},function(e,t,r){"use strict";r.r(t);var n=r(0),o=r.n(n),i=(r(2),r(3)),a=r.n(i),p=r(1),c=r.n(p),s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};var u=function(e){function t(r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(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}(this,e.call(this,r));n.createClickWrap=n.createClickWrap.bind(n),n.state={clickwrapGroupKey:null,dynamicGroup:!1},n.propsEventMap={onAll:"all",onSent:"sent",onRetrieved:"retrieved",onSet:"set",onSetSignerId:"set:signer_id",onValid:"valid",onInvalid:"invalid",onRendered:"rendered",onDisplayed:"displayed",onScrolledContract:"scrolled:contract",onScrolled:"scrolled",onError:"error"};var o=n.props,i=o.psScriptUrl,a=o.backupScriptURL,p=o.accessId,s=o.testMode,u=o.disableSending,l=o.dynamic,f=o.signerId,d=o.debug;return c.a.isSnippetLoaded(i,a)||c.a.injectSnippet(i,a),_ps("create",p,{test_mode:s,disable_sending:u,dynamic:l,signer_id:f}),d&&(_ps.debug=!0),n}return function(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)}(t,e),t.prototype.componentDidMount=function(){this.createClickWrap()},t.prototype.componentDidUpdate=function(e){var t=this.props,r=t.clickWrapStyle,n=t.renderData,o=t.filter,i=t.groupKey,a=this.state,p=a.clickwrapGroupKey,c=a.dynamicGroup;r===e.clickWrapStyle||c||(_ps.getByKey(p).site.set("style",r),_ps.getByKey(p).retrieveHTML()),n!==e.renderData&&_ps(p+":retrieveHTML",n),r!==e.clickWrapStyle&&c&&this.createClickWrap(),o!==e.filter&&c&&this.createClickWrap(),i===e.groupKey||c||(this.createClickWrap(),_ps.getByKey(p).retrieveHTML())},t.prototype.componentWillUnmount=function(){var e=this.props.groupKey;_ps&&_ps.getByKey(e)&&_ps.getByKey(e).rendered&&(_ps.getByKey(e).rendered=!1),this.unregisterEventListeners()},t.prototype.registerEventListener=function(e,t){var r=this,n=function(){for(var n=arguments.length,o=Array(n),i=0;i<n;i++)o[i]=arguments[i];var a,p=!1;(o.forEach(function(e){e.get&&e.get("key")&&e.get("key")===t?p=!0:"[object Site]"===e.toString()&&(p=!0)}),p)&&(a=r.props)[e].apply(a,o)},o=a()();return n.toString=function(){return o},_ps.on(this.propsEventMap[e],n),n.toString()},t.prototype.registerEventListeners=function(e){var t=this,r={};Object.keys(this.propsEventMap).forEach(function(n){t.props[n]&&(r[t.propsEventMap[n]]=t.registerEventListener(n,e))}),this.setState({eventListeners:r})},t.prototype.unregisterEventListeners=function(){var e=this;Object.keys(this.state.eventListeners).forEach(function(t){var r=e.state.eventListeners[t],n=function(){return r};n.toString=function(){return r},_ps.off(t,n)})},t.prototype.createClickWrap=function(){var e=this,t=this.props,r=t.filter,n=t.containerId,o=t.signerIdSelector,i=t.clickWrapStyle,a=t.displayAll,p=t.renderData,c=t.displayImmediately,u=t.forceScroll,l=t.groupKey,f={filter:r,container_selector:n,confirmation_email:t.confirmationEmail,signer_id_selector:o,style:i,display_all:a,render_data:p,auto_run:c,force_scroll:u};l&&this.setState({clickwrapGroupKey:l,dynamicGroup:!1});var d=!l,y=function(t,r){if(r){var n=l||r.get("key"),o={clickwrapGroupKey:n};d&&(o.dynamicGroup=!0),e.setState(o),d||r.render(),e.registerEventListeners(n)}};l?_ps("load",l,s({},f,{event_callback:y})):_ps("load",s({},f,{event_callback:y}))},t.prototype.render=function(){var e=this.props.containerId;return o.a.createElement("div",{id:e})},t}(o.a.Component);u.FILTER_OR_GROUPKEY_REQUIRED_ERROR_MESSAGE="PSClickWrap Error: You must provide either a groupKey or filter prop in order to use the PactSafe ClickWrap component!",u.MUST_PROVIDE_RENDER_DATA_ERROR_MESSAGE="PSClickWrap Error: You must provide a renderData prop when passing down the dynamic prop",u.MUST_PROVIDE_SIGNER_ID_OR_SIGNER_ID_SELECTOR="PSClickWrap Error: You must provide either a signer ID or a signer ID selector",u.defaultProps={psScriptUrl:"//vault.pactsafe.io/ps.min.js",backupScriptURL:"//d3l1mqnl5xpsuc.cloudfront.net/ps.min.js",containerId:"ps-clickwrap",displayImmediately:!0,disableSending:!1,displayAll:!0,dynamic:!1,testMode:!1};var l=u;var f=function(e){function t(r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(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}(this,e.call(this,r)),o=n.props,i=o.psScriptUrl,a=o.groupKey,p=o.accessId;return c.a.isSnippetLoaded(i)||c.a.injectSnippet(i),n.targetSelector="psbw-"+a,_ps("create",p),n}return function(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)}(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=e.groupKey,r=e.position,n=e.badgeText,o=e.alwaysVisible,i=e.openLegalCenter;_ps("load",t,{target_selector:this.targetSelector,position:r,badge_text:n,always_visible:o,open_legal_center:i})},t.prototype.componentWillUnmount=function(){var e=this.props.groupKey;_ps.getByKey(e).rendered=!1},t.prototype.isSnippetLoaded=function(){for(var e=this.props.psScriptUrl,t=document.getElementsByTagName("script"),r=0;r<t.length;r+=1)if(-1!==t[r].src.indexOf(e))return!0;return!1},t.prototype.render=function(){var e=this.props,t=e.link,r=e.linkText;return o.a.createElement("a",{href:t,id:this.targetSelector},r)},t}(o.a.Component);f.MUST_PROVIDE_LINK_IF_OPEN_LEGAL_CENTER_FALSE="PSBrowseWrap Error: You must provide a link prop if openLegalCenter is passed false",f.defaultProps={psScriptUrl:"//vault.pactsafe.io/ps.min.js",position:"auto",link:"#",openLegalCenter:!0};var d=f;r.d(t,"PSClickWrap",function(){return l}),r.d(t,"PSBrowseWrap",function(){return d})}]).default});
//# sourceMappingURL=pactsafe-react-sdk.min.js.map
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc