@paypal/checkout-components
Advanced tools
Comparing version 5.0.7 to 5.0.8
{ | ||
"name": "@paypal/checkout-components", | ||
"version": "5.0.7", | ||
"version": "5.0.8", | ||
"description": "PayPal Checkout components, for integrating checkout products.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -243,5 +243,2 @@ /* @flow */ | ||
return ZalgoPromise.try(() => { | ||
return ZalgoPromise.all((state.onCloseHandlers || []).map(handler => handler())); | ||
}).then(() => { | ||
if (!state.approved) { | ||
@@ -261,13 +258,2 @@ // $FlowFixMe | ||
addOnClose: { | ||
type: 'function', | ||
allowDelegate: true, | ||
value: ({ state }) => { | ||
return (handler) => { | ||
state.onCloseHandlers = state.onCloseHandlers || []; | ||
state.onCloseHandlers.push(handler); | ||
}; | ||
} | ||
}, | ||
onDisplay: { | ||
@@ -278,8 +264,5 @@ type: 'function', | ||
decorate: ({ value, state }) => { | ||
decorate: ({ value }) => { | ||
return once(function decorateOnDisplay() : ZalgoPromise<void> { | ||
return ZalgoPromise.try(() => { | ||
return ZalgoPromise.all((state.onDisplayHandlers || []).map(handler => handler())); | ||
}).then(() => { | ||
return value.apply(this, arguments); | ||
@@ -293,13 +276,2 @@ }); | ||
addOnDisplay: { | ||
type: 'function', | ||
allowDelegate: true, | ||
value: ({ state }) => { | ||
return (handler) => { | ||
state.onDisplayHandlers = state.onDisplayHandlers || []; | ||
state.onDisplayHandlers.push(handler); | ||
}; | ||
} | ||
}, | ||
test: { | ||
@@ -306,0 +278,0 @@ type: 'object', |
@@ -37,5 +37,3 @@ /* @flow */ | ||
|}, | ||
nonce? : string, | ||
addOnDisplay : (() => (void | ZalgoPromise<void>)) => void, | ||
addOnClose : (() => (void | ZalgoPromise<void>)) => void | ||
nonce? : string | ||
|}; |
@@ -5,3 +5,2 @@ /* @flow */ | ||
import { ZalgoPromise } from 'zalgo-promise/src'; | ||
import { isIos, animate, noop, destroyElement } from 'belter/src'; | ||
@@ -44,14 +43,6 @@ import { EVENT, type RenderOptionsType } from 'zoid/src'; | ||
const onDisplay = new ZalgoPromise(resolve => { | ||
event.on(EVENT.DISPLAY, resolve); | ||
}); | ||
const onClose = new ZalgoPromise(resolve => { | ||
event.on(EVENT.CLOSE, resolve); | ||
}); | ||
const setupAnimations = (name) => { | ||
return (el) => { | ||
onDisplay.then(() => animate(el, `show-${ name }`, noop)); | ||
onClose.then(() => animate(el, `hide-${ name }`, noop)); | ||
event.on(EVENT.DISPLAY, () => animate(el, `show-${ name }`, noop)); | ||
event.on(EVENT.CLOSE, () => animate(el, `hide-${ name }`, noop)); | ||
}; | ||
@@ -58,0 +49,0 @@ }; |
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
566153
3856