Socket
Socket
Sign inDemoInstall

@paypal/common-components

Package Overview
Dependencies
19
Maintainers
18
Versions
53
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.9 to 1.0.10

7

CHANGELOG.md

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

## <small>1.0.10 (2020-05-19)</small>
* adding MERCADOPAGO funding sources for APM (#2) ([a4f31af](http://github.paypal.com/paypal/paypal-checkout/commit/a4f31af)), closes [#2](http://github.paypal.com/paypal/paypal-checkout/issues/2)
* Use common funding eligibility ([9cf8a67](http://github.paypal.com/paypal/paypal-checkout/commit/9cf8a67))
## <small>1.0.9 (2020-04-22)</small>

@@ -2,0 +9,0 @@

9

dist/ui.js

@@ -155,5 +155,8 @@ module.exports = function(modules) {

var child = children[_i6];
if (child) if ("string" == typeof child) result.push(new node_TextNode(child)); else if (Array.isArray(child)) for (var _i8 = 0, _normalizeChildren2 = normalizeChildren(child); _i8 < _normalizeChildren2.length; _i8++) result.push(_normalizeChildren2[_i8]); else {
if (!child || "element" !== child.type && "text" !== child.type && "component" !== child.type) throw new TypeError("Unrecognized node type: " + typeof child);
result.push(child);
if (child) if ("string" == typeof child || "number" == typeof child) result.push(new node_TextNode("" + child)); else {
if ("boolean" == typeof child) continue;
if (Array.isArray(child)) for (var _i8 = 0, _normalizeChildren2 = normalizeChildren(child); _i8 < _normalizeChildren2.length; _i8++) result.push(_normalizeChildren2[_i8]); else {
if (!child || "element" !== child.type && "text" !== child.type && "component" !== child.type) throw new TypeError("Unrecognized node type: " + typeof child);
result.push(child);
}
}

@@ -160,0 +163,0 @@ }

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

module.exports=function(n){var e={};function t(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return n[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=n,t.c=e,t.d=function(n,e,r){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:r})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var o in n)t.d(r,o,function(e){return n[e]}.bind(null,o));return r},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return{}.hasOwnProperty.call(n,e)},t.p="",t(t.s=0)}([function(n,e,t){"use strict";function r(n,e){for(var t=[],r=0;r<n.length;r++){var o=n[r].render(e);if(o)if(Array.isArray(o))for(var i=0;i<o.length;i++){var a=o[i];a&&t.push(a)}else t.push(o)}return t}t.r(e),t.d(e,"SpinnerPage",(function(){return u}));var o=function(){function n(n,e,t){this.type="element",this.name=void 0,this.props=void 0,this.children=void 0,this.onRender=void 0,this.name=n,this.props=e,this.children=t;var r=e.onRender;"function"==typeof r&&(this.onRender=r,delete e.onRender)}var e=n.prototype;return e.render=function(n){var e=n(this);return this.onRender&&this.onRender(e),e},e.renderChildren=function(n){return r(this.children,n)},n}(),i=function(){function n(n){this.type="fragment",this.children=void 0,this.children=n}return n.prototype.render=function(n){return r(this.children,n)},n}(),a=function(){function n(n){this.type="text",this.text=void 0,this.text=n}return n.prototype.render=function(n){return n(this)},n}(),p=function(){function n(n,e,t){this.type="component",this.component=void 0,this.props=void 0,this.children=void 0,this.component=n,this.props=e,this.children=t}var e=n.prototype;return e.renderComponent=function(n){var e=function(n){var e=l(Array.isArray(n)?n:[n]);return 1===e.length?e[0]:e.length>1?new i(e):void 0}(this.component(this.props,this.children));if(e)return e.render(n)},e.render=function(n){return n(this)},e.renderChildren=function(n){return r(this.children,n)},n}();function l(n){for(var e=[],t=0;t<n.length;t++){var r=n[t];if(r)if("string"==typeof r)e.push(new a(r));else if(Array.isArray(r))for(var o=0,i=l(r);o<i.length;o++)e.push(i[o]);else{if(!r||"element"!==r.type&&"text"!==r.type&&"component"!==r.type)throw new TypeError("Unrecognized node type: "+typeof r);e.push(r)}}return e}var d,c=function(n,e){for(var t=arguments.length,r=new Array(t>2?t-2:0),i=2;i<t;i++)r[i-2]=arguments[i];if(e=e||{},r=l(r),"string"==typeof n)return new o(n,e,r);if("function"==typeof n)return new p(n,e,r);throw new TypeError("Expected jsx element to be a string or a function")},s=((d={}).iframe=function(n,e){var t=e.children[0];if(1!==e.children.length||!t||"element"!==t.type||"html"!==t.name)throw new Error("Expected only single html element node as child of iframe element");n.addEventListener("load",(function(){var e=n.contentWindow;if(!e)throw new Error("Expected frame to have contentWindow");for(var r=e.document,o=r.documentElement;o.children&&o.children.length;)o.removeChild(o.children[0]);for(var i=t.render(function(n){void 0===n&&(n={});var e=n.doc,t=void 0===e?document:e;return function n(e){if("component"===e.type)return e.renderComponent(n);if("text"===e.type)return function(n,e){return n.createTextNode(e.text)}(t,e);if("element"===e.type){var r=function(n,e){return e.props.el?e.props.el:n.createElement(e.name)}(t,e);return function(n,e){for(var t=e.props,r=0,o=Object.keys(t);r<o.length;r++){var i=o[r],a=t[i];null!=a&&"el"!==i&&"innerHTML"!==i&&(i.match(/^on[A-Z][a-z]/)&&"function"==typeof a?n.addEventListener(i.slice(2).toLowerCase(),a):"string"==typeof a||"number"==typeof a?n.setAttribute(i,a.toString()):"boolean"==typeof a&&!0===a&&n.setAttribute(i,""))}"iframe"!==n.tagName.toLowerCase()||t.id||n.setAttribute("id","jsx-iframe-"+"xxxxxxxxxx".replace(/./g,(function(){return"0123456789abcdef".charAt(Math.floor(Math.random()*"0123456789abcdef".length))})))}(r,e),function(n,e,t,r){if(e.props.hasOwnProperty("innerHTML")){if(e.children.length)throw new Error("Expected no children to be passed when innerHTML prop is set");var o=e.props.innerHTML;if("string"!=typeof o)throw new TypeError("innerHTML prop must be string");"script"===e.name?n.text=o:(n.innerHTML=o,function(n,e){void 0===e&&(e=window.document);for(var t=0,r=n.querySelectorAll("script");t<r.length;t++){var o=r[t],i=o.parentNode;if(i){var a=e.createElement("script");a.text=o.textContent,i.replaceChild(a,o)}}}(n,t))}else(s[e.name]||s.default)(n,e,r)}(r,e,t,n),r}throw new TypeError("Unhandleable node")}}({doc:r}));i.children.length;)o.appendChild(i.children[0])}))},d.script=function(n,e){var t=e.children[0];if(1!==e.children.length||!t||"text"!==t.type)throw new Error("Expected only single text node as child of script element");n.text=t.text},d.default=function(n,e,t){for(var r=0,o=e.renderChildren(t);r<o.length;r++)n.appendChild(o[r])},d);function u(n,e){var t=n.nonce;return c("html",null,c("head",null,c("title",null,"PayPal"),c("meta",{name:"viewport",content:"width=device-width, initial-scale=1"})),c("body",null,c("div",{class:"preloader spinner"},c("style",{nonce:t,innerHTML:"\n\n body {\n width: 100%;\n height: 100%;\n overflow: hidden;\n position: fixed;\n top: 0;\n left: 0;\n margin: 0;\n }\n\n .spinner {\n height: 100%;\n width: 100%;\n position: absolute;\n z-index: 10\n }\n\n .spinner .spinWrap {\n width: 200px;\n height: 100px;\n position: absolute;\n top: 50%;\n left: 50%;\n margin-left: -100px;\n margin-top: -50px\n }\n\n .spinner .loader,\n .spinner .spinnerImage {\n height: 100px;\n width: 100px;\n position: absolute;\n top: 0;\n left: 50%;\n opacity: 1;\n filter: alpha(opacity=100)\n }\n\n .spinner .spinnerImage {\n margin: 28px 0 0 -25px;\n background: url(https://www.paypalobjects.com/images/checkout/hermes/icon_ot_spin_lock_skinny.png) no-repeat\n }\n\n .spinner .loader {\n margin: 0 0 0 -55px;\n background-color: transparent;\n animation: rotation .7s infinite linear;\n border-left: 5px solid #cbcbca;\n border-right: 5px solid #cbcbca;\n border-bottom: 5px solid #cbcbca;\n border-top: 5px solid #2380be;\n border-radius: 100%\n }\n\n @keyframes rotation {\n from {\n transform: rotate(0deg)\n }\n to {\n transform: rotate(359deg)\n }\n }\n"}),c("div",{class:"spinWrap"},c("p",{class:"spinnerImage"}),c("p",{class:"loader"}))),e))}}]);
module.exports=function(n){var e={};function t(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return n[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=n,t.c=e,t.d=function(n,e,r){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:r})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var o in n)t.d(r,o,function(e){return n[e]}.bind(null,o));return r},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return{}.hasOwnProperty.call(n,e)},t.p="",t(t.s=0)}([function(n,e,t){"use strict";function r(n,e){for(var t=[],r=0;r<n.length;r++){var o=n[r].render(e);if(o)if(Array.isArray(o))for(var i=0;i<o.length;i++){var a=o[i];a&&t.push(a)}else t.push(o)}return t}t.r(e),t.d(e,"SpinnerPage",(function(){return u}));var o=function(){function n(n,e,t){this.type="element",this.name=void 0,this.props=void 0,this.children=void 0,this.onRender=void 0,this.name=n,this.props=e,this.children=t;var r=e.onRender;"function"==typeof r&&(this.onRender=r,delete e.onRender)}var e=n.prototype;return e.render=function(n){var e=n(this);return this.onRender&&this.onRender(e),e},e.renderChildren=function(n){return r(this.children,n)},n}(),i=function(){function n(n){this.type="fragment",this.children=void 0,this.children=n}return n.prototype.render=function(n){return r(this.children,n)},n}(),a=function(){function n(n){this.type="text",this.text=void 0,this.text=n}return n.prototype.render=function(n){return n(this)},n}(),p=function(){function n(n,e,t){this.type="component",this.component=void 0,this.props=void 0,this.children=void 0,this.component=n,this.props=e,this.children=t}var e=n.prototype;return e.renderComponent=function(n){var e=function(n){var e=l(Array.isArray(n)?n:[n]);return 1===e.length?e[0]:e.length>1?new i(e):void 0}(this.component(this.props,this.children));if(e)return e.render(n)},e.render=function(n){return n(this)},e.renderChildren=function(n){return r(this.children,n)},n}();function l(n){for(var e=[],t=0;t<n.length;t++){var r=n[t];if(r)if("string"==typeof r||"number"==typeof r)e.push(new a(""+r));else{if("boolean"==typeof r)continue;if(Array.isArray(r))for(var o=0,i=l(r);o<i.length;o++)e.push(i[o]);else{if(!r||"element"!==r.type&&"text"!==r.type&&"component"!==r.type)throw new TypeError("Unrecognized node type: "+typeof r);e.push(r)}}}return e}var d,c=function(n,e){for(var t=arguments.length,r=new Array(t>2?t-2:0),i=2;i<t;i++)r[i-2]=arguments[i];if(e=e||{},r=l(r),"string"==typeof n)return new o(n,e,r);if("function"==typeof n)return new p(n,e,r);throw new TypeError("Expected jsx element to be a string or a function")},s=((d={}).iframe=function(n,e){var t=e.children[0];if(1!==e.children.length||!t||"element"!==t.type||"html"!==t.name)throw new Error("Expected only single html element node as child of iframe element");n.addEventListener("load",(function(){var e=n.contentWindow;if(!e)throw new Error("Expected frame to have contentWindow");for(var r=e.document,o=r.documentElement;o.children&&o.children.length;)o.removeChild(o.children[0]);for(var i=t.render(function(n){void 0===n&&(n={});var e=n.doc,t=void 0===e?document:e;return function n(e){if("component"===e.type)return e.renderComponent(n);if("text"===e.type)return function(n,e){return n.createTextNode(e.text)}(t,e);if("element"===e.type){var r=function(n,e){return e.props.el?e.props.el:n.createElement(e.name)}(t,e);return function(n,e){for(var t=e.props,r=0,o=Object.keys(t);r<o.length;r++){var i=o[r],a=t[i];null!=a&&"el"!==i&&"innerHTML"!==i&&(i.match(/^on[A-Z][a-z]/)&&"function"==typeof a?n.addEventListener(i.slice(2).toLowerCase(),a):"string"==typeof a||"number"==typeof a?n.setAttribute(i,a.toString()):"boolean"==typeof a&&!0===a&&n.setAttribute(i,""))}"iframe"!==n.tagName.toLowerCase()||t.id||n.setAttribute("id","jsx-iframe-"+"xxxxxxxxxx".replace(/./g,(function(){return"0123456789abcdef".charAt(Math.floor(Math.random()*"0123456789abcdef".length))})))}(r,e),function(n,e,t,r){if(e.props.hasOwnProperty("innerHTML")){if(e.children.length)throw new Error("Expected no children to be passed when innerHTML prop is set");var o=e.props.innerHTML;if("string"!=typeof o)throw new TypeError("innerHTML prop must be string");"script"===e.name?n.text=o:(n.innerHTML=o,function(n,e){void 0===e&&(e=window.document);for(var t=0,r=n.querySelectorAll("script");t<r.length;t++){var o=r[t],i=o.parentNode;if(i){var a=e.createElement("script");a.text=o.textContent,i.replaceChild(a,o)}}}(n,t))}else(s[e.name]||s.default)(n,e,r)}(r,e,t,n),r}throw new TypeError("Unhandleable node")}}({doc:r}));i.children.length;)o.appendChild(i.children[0])}))},d.script=function(n,e){var t=e.children[0];if(1!==e.children.length||!t||"text"!==t.type)throw new Error("Expected only single text node as child of script element");n.text=t.text},d.default=function(n,e,t){for(var r=0,o=e.renderChildren(t);r<o.length;r++)n.appendChild(o[r])},d);function u(n,e){var t=n.nonce;return c("html",null,c("head",null,c("title",null,"PayPal"),c("meta",{name:"viewport",content:"width=device-width, initial-scale=1"})),c("body",null,c("div",{class:"preloader spinner"},c("style",{nonce:t,innerHTML:"\n\n body {\n width: 100%;\n height: 100%;\n overflow: hidden;\n position: fixed;\n top: 0;\n left: 0;\n margin: 0;\n }\n\n .spinner {\n height: 100%;\n width: 100%;\n position: absolute;\n z-index: 10\n }\n\n .spinner .spinWrap {\n width: 200px;\n height: 100px;\n position: absolute;\n top: 50%;\n left: 50%;\n margin-left: -100px;\n margin-top: -50px\n }\n\n .spinner .loader,\n .spinner .spinnerImage {\n height: 100px;\n width: 100px;\n position: absolute;\n top: 0;\n left: 50%;\n opacity: 1;\n filter: alpha(opacity=100)\n }\n\n .spinner .spinnerImage {\n margin: 28px 0 0 -25px;\n background: url(https://www.paypalobjects.com/images/checkout/hermes/icon_ot_spin_lock_skinny.png) no-repeat\n }\n\n .spinner .loader {\n margin: 0 0 0 -55px;\n background-color: transparent;\n animation: rotation .7s infinite linear;\n border-left: 5px solid #cbcbca;\n border-right: 5px solid #cbcbca;\n border-bottom: 5px solid #cbcbca;\n border-top: 5px solid #2380be;\n border-radius: 100%\n }\n\n @keyframes rotation {\n from {\n transform: rotate(0deg)\n }\n to {\n transform: rotate(359deg)\n }\n }\n"}),c("div",{class:"spinWrap"},c("p",{class:"spinnerImage"}),c("p",{class:"loader"}))),e))}}]);
{
"name": "@paypal/common-components",
"version": "1.0.9",
"version": "1.0.10",
"description": "PayPal common components, for integrating checkout products.",

@@ -5,0 +5,0 @@ "main": "dist/ui.js",

/* @flow */
/* eslint import/unambiguous: 0 */
import type { FundingEligibilityType } from '@paypal/sdk-client/src';
import { FUNDING } from '@paypal/sdk-constants/src';
import type { FundingEligibilityType } from './types';
declare var __PAYPAL_CHECKOUT__ : {|

@@ -9,0 +8,0 @@ __REMEMBERED_FUNDING__ : Array<$Values<typeof FUNDING>> // eslint-disable-line flowtype/no-mutable-array

/* @flow */
import type { FundingEligibilityType } from '@paypal/sdk-client/src';
import { FUNDING } from '@paypal/sdk-constants/src';
import type { FundingEligibilityType } from './types';
export function getFundingEligibility() : FundingEligibilityType {

@@ -8,0 +7,0 @@ return __paypal_checkout__.serverConfig.fundingEligibility;

@@ -9,140 +9,1 @@ /* @flow */

|};
export type FundingEligibilityType = {|
bancontact : {|
eligible : boolean,
branded : boolean
|},
card : {|
eligible : boolean,
branded : boolean,
vendors : {|
visa : {|
eligible : boolean,
vaultedInstruments ? : $ReadOnlyArray<{|
id : string,
label : {|
description : string
|}
|}>
|},
mastercard : {|
eligible : boolean,
vaultedInstruments ? : $ReadOnlyArray<{|
id : string,
label : {|
description : string
|}
|}>
|},
amex : {|
eligible : boolean,
vaultedInstruments ? : $ReadOnlyArray<{|
id : string,
label : {|
description : string
|}
|}>
|},
discover : {|
eligible : boolean,
vaultedInstruments ? : $ReadOnlyArray<{|
id : string,
label : {|
description : string
|}
|}>
|},
hiper : {|
eligible : boolean,
vaultedInstruments ? : $ReadOnlyArray<{|
id : string,
label : {|
description : string
|}
|}>
|},
elo : {|
eligible : boolean,
vaultedInstruments ? : $ReadOnlyArray<{|
id : string,
label : {|
description : string
|}
|}>
|},
jcb : {|
eligible : boolean,
vaultedInstruments ? : $ReadOnlyArray<{|
id : string,
label : {|
description : string
|}
|}>
|},
cup : {|
eligible : boolean,
vaultedInstruments ? : $ReadOnlyArray<{|
id : string,
label : {|
description : string
|}
|}>
|}
|}
|},
credit : {|
eligible : boolean,
branded : boolean
|},
sepa : {|
eligible : boolean,
branded : boolean
|},
eps : {|
eligible : boolean,
branded : boolean
|},
giropay : {|
eligible : boolean,
branded : boolean
|},
ideal : {|
eligible : boolean,
branded : boolean
|},
mybank : {|
eligible : boolean,
branded : boolean
|},
p24 : {|
eligible : boolean,
branded : boolean
|},
paypal : {|
eligible : boolean,
branded : boolean,
vaultedInstruments? : $ReadOnlyArray<{|
id : string,
label : {|
description : string
|}
|}>
|},
sofort : {|
eligible : boolean,
branded : boolean
|},
venmo : {|
eligible : boolean,
branded : boolean
|},
wechatpay : {|
eligible : boolean,
branded : boolean
|},
zimpler : {|
eligible : boolean,
branded : boolean
|}
|};
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc