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

@paypal/checkout-components

Package Overview
Dependencies
Maintainers
20
Versions
504
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.319-alpha-f7e0651.0 to 5.0.319

src/funding/venmo/config.test.js

2

package.json
{
"name": "@paypal/checkout-components",
"version": "5.0.319-alpha-f7e0651.0",
"version": "5.0.319",
"description": "PayPal Checkout components, for integrating checkout products.",

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

@@ -15,2 +15,3 @@ /* @flow */

ENV,
DISPLAY_ONLY_VALUES,
} from "@paypal/sdk-constants/src";

@@ -118,2 +119,3 @@ import { LOGO_COLOR } from "@paypal/sdk-logos/src";

wallet: ?Wallet,
displayOnly?: $ReadOnlyArray<$Values<typeof DISPLAY_ONLY_VALUES>>,
|}) => boolean,

@@ -120,0 +122,0 @@ Logo: (LogoOptions) => ChildType,

@@ -36,2 +36,3 @@ /* @flow */

onShippingOptionsChange: ?Function,
hasShippingCallback?: boolean,
wallet?: ?Wallet,

@@ -84,2 +85,3 @@ applePaySupport: boolean,

onShippingOptionsChange,
hasShippingCallback,
flow,

@@ -124,3 +126,3 @@ wallet,

fundingConfig.eligible &&
!fundingConfig.eligible({
!fundingConfig.eligible?.({
enableFunding,

@@ -132,5 +134,10 @@ components,

layout,
shippingChange:
onShippingChange || onShippingAddressChange || onShippingOptionsChange,
shippingChange: Boolean(
hasShippingCallback ||
onShippingChange ||
onShippingAddressChange ||
onShippingOptionsChange
),
wallet,
displayOnly,
})

@@ -200,2 +207,3 @@ ) {

onShippingOptionsChange,
hasShippingCallback,
flow,

@@ -219,2 +227,3 @@ wallet,

onShippingOptionsChange?: ?Function,
hasShippingCallback: boolean,
flow: $Values<typeof BUTTON_FLOW>,

@@ -243,2 +252,3 @@ wallet?: ?Wallet,

onShippingOptionsChange,
hasShippingCallback,
flow,

@@ -245,0 +255,0 @@ wallet,

@@ -9,3 +9,3 @@ /* @flow */

} from "@paypal/sdk-logos/src";
import { PLATFORM } from "@paypal/sdk-constants/src";
import { DISPLAY_ONLY_VALUES, PLATFORM } from "@paypal/sdk-constants/src";

@@ -23,3 +23,3 @@ import { BUTTON_COLOR, BUTTON_LAYOUT } from "../../constants";

eligible: ({ experiment, shippingChange }) => {
eligible: ({ experiment, shippingChange, displayOnly }) => {
if (experiment && experiment.enableVenmo === false) {

@@ -37,2 +37,9 @@ return false;

if (
shippingChange &&
displayOnly?.includes(DISPLAY_ONLY_VALUES.VAULTABLE)
) {
return false;
}
return true;

@@ -39,0 +46,0 @@ },

@@ -13,3 +13,7 @@ /* @flow */

} from "@krakenjs/belter/src";
import { PLATFORM, FUNDING } from "@paypal/sdk-constants/src";
import {
PLATFORM,
FUNDING,
DISPLAY_ONLY_VALUES,
} from "@paypal/sdk-constants/src";
import { getRememberedFunding } from "@paypal/funding-components/src";

@@ -49,2 +53,3 @@ import {

onShippingOptionsChange?: OnShippingOptionsChange,
displayOnly?: $ReadOnlyArray<$Values<typeof DISPLAY_ONLY_VALUES>>,
|};

@@ -60,2 +65,3 @@

onShippingOptionsChange,
displayOnly,
}: MarksProps = {}): MarksInstance {

@@ -76,2 +82,5 @@ const height = DEFAULT_HEIGHT;

const experiment = getVenmoExperiment();
const hasShippingCallback = Boolean(
onShippingChange || onShippingAddressChange || onShippingOptionsChange
);
const fundingSources = determineEligibleFunding({

@@ -87,5 +96,10 @@ fundingSource,

applePaySupport,
onShippingChange,
onShippingAddressChange,
onShippingOptionsChange,
hasShippingCallback,
supportsPopups,
supportedNativeBrowser,
experiment,
displayOnly,
});

@@ -114,2 +128,3 @@ const env = getEnv();

experiment,
displayOnly,
});

@@ -116,0 +131,0 @@ };

@@ -173,2 +173,3 @@ /* @flow */

onShippingOptionsChange,
hasShippingCallback,
personalization,

@@ -199,2 +200,5 @@ userIDToken,

onShippingChange,
onShippingAddressChange,
onShippingOptionsChange,
hasShippingCallback,
flow,

@@ -201,0 +205,0 @@ wallet,

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

onShippingOptionsChange: ?OnShippingOptionsChange,
hasShippingCallback: boolean,
personalization: ?Personalization,

@@ -525,2 +526,3 @@ clientAccessToken: ?string,

onShippingOptionsChange: ?OnShippingOptionsChange,
hasShippingCallback: boolean,
clientAccessToken?: ?string,

@@ -573,2 +575,3 @@ customerId?: ?string,

onShippingOptionsChange: ?Function,
hasShippingCallback?: boolean,
personalization?: Personalization,

@@ -831,2 +834,8 @@ clientAccessToken?: ?string,

const defaultHasShippingCallback = Boolean(
props.onShippingChange ||
props.onShippingAddressChange ||
props.onShippingOptionsChange
);
let {

@@ -850,2 +859,3 @@ clientID,

onShippingOptionsChange,
hasShippingCallback = defaultHasShippingCallback,
personalization,

@@ -914,2 +924,3 @@ clientAccessToken,

onShippingOptionsChange,
hasShippingCallback,
wallet,

@@ -953,2 +964,3 @@ flow,

onShippingOptionsChange,
hasShippingCallback,
personalization,

@@ -955,0 +967,0 @@ content,

@@ -205,2 +205,3 @@ /* @flow */

createVaultSetupToken,
displayOnly,
} = props;

@@ -248,2 +249,3 @@

experiment,
displayOnly,
})

@@ -533,2 +535,3 @@ ) {

createVaultSetupToken,
displayOnly,
} = props;

@@ -562,2 +565,3 @@

supportedNativeBrowser,
displayOnly,
})

@@ -758,7 +762,3 @@ ) {

const modalInstance = await getModal(
clientID,
merchantID,
buttonSessionID
);
const modalInstance = await getModal(clientID, merchantID);
return modalInstance?.show({

@@ -781,4 +781,4 @@ amount,

// lazy loads the modal, to be memoized and executed onMessageClick
const { buttonSessionID, clientID, merchantID } = props;
return getModal(clientID, merchantID, buttonSessionID);
const { clientID, merchantID } = props;
return getModal(clientID, merchantID);
};

@@ -844,2 +844,15 @@ },

hasShippingCallback: {
type: "boolean",
required: false,
queryParam: true,
value: ({ props }) => {
return Boolean(
props.onShippingChange ||
props.onShippingAddressChange ||
props.onShippingOptionsChange
);
},
},
pageType: {

@@ -846,0 +859,0 @@ type: "string",

@@ -17,2 +17,3 @@ /* @flow */

} from "@krakenjs/belter/src";
import { FUNDING } from "@paypal/sdk-constants/src";
import {

@@ -28,3 +29,2 @@ getEnableFunding,

} from "@paypal/sdk-client/src";
import { FUNDING, FPTI_KEY } from "@paypal/sdk-constants/src";
import { getRefinedFundingEligibility } from "@paypal/funding-components/src";

@@ -185,2 +185,3 @@

onShippingOptionsChange,
hasShippingCallback,
style = {},

@@ -196,2 +197,3 @@ enableFunding = getEnableFunding(),

createVaultSetupToken,
displayOnly,
} = props;

@@ -220,2 +222,3 @@

onShippingOptionsChange,
hasShippingCallback,
flow,

@@ -226,2 +229,3 @@ applePaySupport,

experiment,
displayOnly,
});

@@ -378,5 +382,4 @@ return renderedButtons;

clientID: string,
merchantID: $ReadOnlyArray<string> | void,
buttonSessionID: string
) => Object = memoize(async (clientID, merchantID, buttonSessionID) => {
merchantID: $ReadOnlyArray<string> | void
) => Object = memoize(async (clientID, merchantID) => {
try {

@@ -402,15 +405,2 @@ const namespace = getNamespace();

return window[namespace].MessagesModal({
buttonSessionId: buttonSessionID,
onApply: () =>
getLogger()
.info("button_message_modal_apply")
.track({
[FPTI_KEY.TRANSITION]: "button_message_modal_apply",
[FPTI_KEY.STATE]: "BUTTON_MESSAGE",
[FPTI_KEY.BUTTON_SESSION_UID]: buttonSessionID,
[FPTI_KEY.CONTEXT_ID]: buttonSessionID,
[FPTI_KEY.CONTEXT_TYPE]: "button_session_id",
[FPTI_KEY.EVENT_NAME]: "modal_apply",
})
.flush(),
account: `client-id:${clientID}`,

@@ -417,0 +407,0 @@ merchantId: merchantID?.join(",") || undefined,

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