@paypal/checkout-components
Advanced tools
Comparing version 5.0.35 to 5.0.36
{ | ||
"name": "@paypal/checkout-components", | ||
"version": "5.0.35", | ||
"version": "5.0.36", | ||
"description": "PayPal Checkout components, for integrating checkout products.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -19,2 +19,7 @@ /* @flow */ | ||
const SELECTOR = { | ||
IMG: 'img', | ||
OPTIONAL: '[optional]' | ||
}; | ||
function getElements(selector, parent) : $ReadOnlyArray<HTMLElement> { | ||
@@ -96,2 +101,6 @@ parent = parent || document; | ||
if (!el.offsetWidth || !el.offsetHeight) { | ||
return false; | ||
} | ||
if (el.offsetWidth < el.scrollWidth || el.offsetHeight < el.scrollHeight) { | ||
@@ -129,4 +138,4 @@ return true; | ||
const allImages = getElements('img'); | ||
const optionals = getElements('[optional]'); | ||
const allImages = getElements(SELECTOR.IMG); | ||
const optionals = getElements(SELECTOR.OPTIONAL); | ||
const optionalParents = unique(optionals.map(optional => optional.parentElement).filter(Boolean)); | ||
@@ -137,3 +146,3 @@ | ||
const parentChildren = Array.prototype.slice.call(optionalParent.children); | ||
const optionalChildren = getElements('[optional]', optionalParent); | ||
const optionalChildren = getElements(SELECTOR.OPTIONAL, optionalParent); | ||
@@ -140,0 +149,0 @@ parentChildren.forEach(el => showElement(el)); |
@@ -25,3 +25,3 @@ /* @flow */ | ||
Label: BancontactLogo | ||
Label: ({ logoColor, optional }) => BancontactLogo({ logoColor, optional }) | ||
} | ||
@@ -28,0 +28,0 @@ } |
@@ -99,3 +99,3 @@ /* @flow */ | ||
Label: ({ fundingEligibility, locale, nonce, onClick }) => { | ||
Label: ({ fundingEligibility, locale, onClick }) => { | ||
let maxCards = 4; | ||
@@ -136,7 +136,3 @@ | ||
> | ||
<Label | ||
locale={ locale } | ||
nonce={ nonce } | ||
onClick={ onClick } | ||
/> | ||
<Label /> | ||
</div> | ||
@@ -143,0 +139,0 @@ ); |
@@ -60,3 +60,2 @@ /* @flow */ | ||
logoColor : $Values<typeof LOGO_COLOR>, | ||
nonce : string, | ||
multiple : boolean, | ||
@@ -75,3 +74,2 @@ period? : number, | ||
locale : LocaleType, | ||
nonce : string, | ||
multiple : boolean | ||
@@ -88,7 +86,3 @@ |}) => ChildType, | ||
export type CardConfig = {| | ||
Label : ({| | ||
locale : LocaleType, | ||
nonce : string, | ||
onClick : (event : Event, ...args : $ReadOnlyArray<mixed>) => void | ||
|}) => ChildType | ||
Label : () => ChildType | ||
|}; | ||
@@ -95,0 +89,0 @@ |
@@ -25,3 +25,3 @@ /* @flow */ | ||
Label: EpsLogo | ||
Label: ({ logoColor, optional }) => EpsLogo({ logoColor, optional }) | ||
} | ||
@@ -28,0 +28,0 @@ } |
@@ -25,3 +25,3 @@ /* @flow */ | ||
Label: GiropayLogo | ||
Label: ({ logoColor, optional }) => GiropayLogo({ logoColor, optional }) | ||
} | ||
@@ -28,0 +28,0 @@ } |
@@ -25,3 +25,3 @@ /* @flow */ | ||
Label: IdealLogo | ||
Label: ({ logoColor, optional }) => IdealLogo({ logoColor, optional }) | ||
} | ||
@@ -28,0 +28,0 @@ } |
@@ -25,3 +25,3 @@ /* @flow */ | ||
Label: MybankLogo | ||
Label: ({ logoColor, optional }) => MybankLogo({ logoColor, optional }) | ||
} | ||
@@ -28,0 +28,0 @@ } |
@@ -25,3 +25,3 @@ /* @flow */ | ||
Label: P24Logo | ||
Label: ({ logoColor, optional }) => P24Logo({ logoColor, optional }) | ||
} | ||
@@ -28,0 +28,0 @@ } |
@@ -23,3 +23,3 @@ /* @flow */ | ||
Label: SepaLogo | ||
Label: ({ logoColor, optional }) => SepaLogo({ logoColor, optional }) | ||
} | ||
@@ -26,0 +26,0 @@ } |
@@ -25,3 +25,3 @@ /* @flow */ | ||
Label: SofortLogo | ||
Label: ({ logoColor, optional }) => SofortLogo({ logoColor, optional }) | ||
} | ||
@@ -28,0 +28,0 @@ } |
@@ -31,3 +31,3 @@ /* @flow */ | ||
Label: VenmoLogo, | ||
Label: ({ logoColor, optional }) => VenmoLogo({ logoColor, optional }), | ||
@@ -34,0 +34,0 @@ colors: [ |
@@ -25,3 +25,3 @@ /* @flow */ | ||
Label: WechatpayLogo | ||
Label: ({ logoColor, optional }) => WechatpayLogo({ logoColor, optional }) | ||
} | ||
@@ -28,0 +28,0 @@ } |
@@ -25,3 +25,3 @@ /* @flow */ | ||
Label: ZimplerLogo | ||
Label: ({ logoColor, optional }) => ZimplerLogo({ logoColor, optional }) | ||
} | ||
@@ -28,0 +28,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
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
605628
4367