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

@paypal/checkout-components

Package Overview
Dependencies
Maintainers
0
Versions
502
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@paypal/checkout-components - npm Package Compare versions

Comparing version 5.0.331 to 5.0.332-alpha-0373ea8.0

2

package.json
{
"name": "@paypal/checkout-components",
"version": "5.0.331",
"version": "5.0.332-alpha-0373ea8.0",
"description": "PayPal Checkout components, for integrating checkout products.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -443,3 +443,3 @@ /* eslint-disable eslint-comments/disable-enable-pair */

export type ButtonMessageInputs = {|
amount?: number | void,
amount?: number | string | void,
offer?: $ReadOnlyArray<$Values<typeof MESSAGE_OFFER>> | void,

@@ -785,3 +785,2 @@ color?: $Values<typeof MESSAGE_COLOR> | void,

const {
amount,
color = MESSAGE_COLOR.BLACK,

@@ -792,4 +791,9 @@ position,

let offer = message.offer;
let amount = message.amount;
if (typeof amount !== "undefined") {
if (typeof amount !== "number") {
if (typeof amount === "string") {
amount = Number(amount);
}
if (typeof amount !== "number" || isNaN(amount)) {
throw new TypeError(

@@ -796,0 +800,0 @@ `Expected message.amount to be a number, got: ${amount}`

@@ -55,2 +55,5 @@ /* @flow */

|},
styleOptions?: {|
disablePrerender?: boolean,
|},
env?: string,

@@ -134,5 +137,9 @@ locale?: string,

const height = props.style?.height ?? props.style?.input?.height ?? null;
return (<CardPrerender nonce={props.nonce} height={height} />).render(
dom({ doc })
);
return (
<CardPrerender
nonce={props.nonce}
height={height}
isDisabled={Boolean(props.styleOptions?.disablePrerender)}
/>
).render(dom({ doc }));
};

@@ -301,2 +308,15 @@

styleOptions: {
type: "object",
required: false,
queryParam: true,
value: ({ props }) => {
return {
...props.parent.props.styleOptions,
// $FlowFixMe
...props.styleOptions,
};
},
},
onChange: {

@@ -303,0 +323,0 @@ type: "function",

/* @flow */
/** @jsx node */
import { node, type ChildType } from "@krakenjs/jsx-pragmatic/src";
import { node, type NullableChildType } from "@krakenjs/jsx-pragmatic/src";

@@ -9,2 +9,3 @@ type PrerenderedCardProps = {|

height: ?number,
isDisabled: ?boolean,
|};

@@ -17,3 +18,7 @@

height,
}: PrerenderedCardProps): ChildType {
isDisabled,
}: PrerenderedCardProps): NullableChildType {
if (isDisabled) {
return null;
}
return (

@@ -20,0 +25,0 @@ <html>

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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