@paypal/checkout-components
Advanced tools
Comparing version 5.0.46 to 5.0.47
{ | ||
"name": "@paypal/checkout-components", | ||
"version": "5.0.46", | ||
"version": "5.0.47", | ||
"description": "PayPal Checkout components, for integrating checkout products.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -10,3 +10,2 @@ /* @flow */ | ||
import { type ButtonStyle, type Personalization } from '../props'; | ||
import { LoadingDots } from '../../ui'; | ||
@@ -30,10 +29,2 @@ export function TagLine({ fundingSource, style, locale, multiple, nonce, personalization } : | ||
if (__WEB__) { | ||
return ( | ||
<div class={ CLASS.TAGLINE }> | ||
<LoadingDots /> | ||
</div> | ||
); | ||
} | ||
return ( | ||
@@ -40,0 +31,0 @@ <div class={ CLASS.TAGLINE }> |
@@ -6,3 +6,3 @@ /* @flow */ | ||
import { PLATFORM, type LocaleType, COUNTRY, CARD, COMPONENTS } from '@paypal/sdk-constants/src'; | ||
import { node, Fragment, type ChildType } from 'jsx-pragmatic/src'; | ||
import { type ChildType } from 'jsx-pragmatic/src'; | ||
import { LOGO_COLOR } from '@paypal/sdk-logos/src'; | ||
@@ -12,5 +12,3 @@ | ||
import type { FundingEligibilityType } from '../types'; | ||
import { LoadingDots, Text } from '../ui'; | ||
import { componentContent } from './content'; | ||
@@ -112,44 +110,5 @@ export type CardConfig = {| | ||
Label: ({ logo, label, locale: { lang }, period, layout, multiple, clientAccessToken }) => { | ||
if (__WEB__) { | ||
if (!label && !clientAccessToken) { | ||
return logo; | ||
} | ||
if (layout === BUTTON_LAYOUT.HORIZONTAL && multiple) { | ||
return logo; | ||
} | ||
return ( | ||
<Fragment> | ||
{ logo } | ||
<Text> <LoadingDots /></Text> | ||
</Fragment> | ||
); | ||
} | ||
if (!label || label === BUTTON_LABEL.PAYPAL) { | ||
return logo; | ||
} | ||
const { Checkout, Pay, BuyNow, Installment } = componentContent[lang]; | ||
if (label === BUTTON_LABEL.CHECKOUT) { | ||
return <Checkout logo={ logo } />; | ||
} | ||
if (label === BUTTON_LABEL.PAY) { | ||
return <Pay logo={ logo } />; | ||
} | ||
if (label === BUTTON_LABEL.BUYNOW) { | ||
return <BuyNow logo={ logo } />; | ||
} | ||
if (label === BUTTON_LABEL.INSTALLMENT && Installment) { | ||
return <Installment logo={ logo } period={ period } />; | ||
} | ||
throw new Error(`Label ${ label } not supported`); | ||
Label: ({ logo }) => { | ||
return logo; | ||
} | ||
}; |
@@ -11,3 +11,3 @@ /* @flow */ | ||
import { componentContent } from '../content'; | ||
import { Text, Space } from '../../ui'; | ||
import { Text, Space, LoadingDots } from '../../ui'; | ||
@@ -50,2 +50,6 @@ const PPPayPalLogo = ({ logoColor }) => <Fragment><PPLogo logoColor={ logoColor } /><Space /><PayPalLogo logoColor={ logoColor } /></Fragment>; | ||
Tag: ({ multiple, locale: { lang } } : { locale : LocaleType, multiple : boolean }) => { | ||
if (__WEB__) { | ||
return <LoadingDots />; | ||
} | ||
const { DualTag, SaferTag } = componentContent[lang]; | ||
@@ -64,4 +68,43 @@ | ||
); | ||
}, | ||
Label: ({ logo, label, locale: { lang }, period, layout, multiple, clientAccessToken }) => { | ||
if (layout === BUTTON_LAYOUT.HORIZONTAL && multiple) { | ||
return logo; | ||
} | ||
if (__WEB__) { | ||
if (label || clientAccessToken) { | ||
return ( | ||
<Fragment> | ||
{logo} | ||
<Text> <LoadingDots /></Text> | ||
</Fragment> | ||
); | ||
} | ||
return logo; | ||
} | ||
const { Checkout, Pay, BuyNow, Installment } = componentContent[lang]; | ||
if (label === BUTTON_LABEL.CHECKOUT) { | ||
return <Checkout logo={ logo } />; | ||
} | ||
if (label === BUTTON_LABEL.PAY) { | ||
return <Pay logo={ logo } />; | ||
} | ||
if (label === BUTTON_LABEL.BUYNOW) { | ||
return <BuyNow logo={ logo } />; | ||
} | ||
if (label === BUTTON_LABEL.INSTALLMENT && Installment) { | ||
return <Installment logo={ logo } period={ period } />; | ||
} | ||
return logo; | ||
} | ||
}; | ||
} |
@@ -150,3 +150,11 @@ /* @flow */ | ||
branded : boolean | ||
}, | ||
payu? : { | ||
eligible : boolean, | ||
branded : boolean | ||
}, | ||
verkkopankki? : { | ||
eligible : boolean, | ||
branded : boolean | ||
} | ||
|}; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 2 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
625299
109
3834
3