@paypal/checkout-components 5.0.201-alpha.1 → 5.0.203
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/__sdk__.js +1 -1
- package/dist/button.js +1 -1
- package/globals.js +2 -2
- package/package.json +16 -12
- package/src/constants/class.js +1 -0
- package/src/funding/applepay/template.jsx +1 -1
- package/src/funding/card/config.jsx +1 -1
- package/src/funding/common.jsx +1 -1
- package/src/funding/config.js +3 -3
- package/src/funding/content.jsx +1 -1
- package/src/funding/credit/config.jsx +1 -1
- package/src/funding/ideal/config.jsx +1 -1
- package/src/funding/{multiblanco → multibanco}/config.jsx +3 -3
- package/src/funding/{multiblanco → multibanco}/index.js +0 -0
- package/src/funding/paylater/config.jsx +1 -1
- package/src/funding/paypal/template.jsx +1 -1
- package/src/funding/venmo/template.jsx +1 -1
- package/src/interface/button.js +1 -1
- package/src/lib/security.js +2 -2
- package/src/lib/session.js +1 -1
- package/src/marks/component.jsx +3 -3
- package/src/marks/template.jsx +2 -2
- package/src/ui/buttons/button.jsx +2 -2
- package/src/ui/buttons/buttonDesigns/control.jsx +1 -1
- package/src/ui/buttons/buttonDesigns/divideLogoAnimation.jsx +8 -6
- package/src/ui/buttons/buttonDesigns/index.js +1 -1
- package/src/ui/buttons/buttonDesigns/inlineLogoTextDesign.jsx +1 -1
- package/src/ui/buttons/buttonDesigns/script.jsx +1 -1
- package/src/ui/buttons/buttonDesigns/types.js +1 -1
- package/src/ui/buttons/buttons.jsx +2 -2
- package/src/ui/buttons/content.jsx +1 -1
- package/src/ui/buttons/menu-button/menu-button.jsx +1 -1
- package/src/ui/buttons/poweredBy.jsx +1 -1
- package/src/ui/buttons/props.js +13 -9
- package/src/ui/buttons/script.jsx +1 -1
- package/src/ui/buttons/spinner.jsx +1 -1
- package/src/ui/buttons/style.jsx +1 -1
- package/src/ui/buttons/styles/responsive.js +1 -1
- package/src/ui/buttons/tagline.jsx +1 -1
- package/src/ui/chevron.jsx +1 -1
- package/src/ui/loading.jsx +1 -1
- package/src/ui/text/text.jsx +1 -1
- package/src/ui/tracking.jsx +1 -1
- package/src/zoid/buttons/component.jsx +10 -4
- package/src/zoid/buttons/container.jsx +3 -3
- package/src/zoid/buttons/prerender.jsx +4 -4
- package/src/zoid/buttons/util.js +1 -1
- package/src/zoid/card-fields/component.jsx +5 -5
- package/src/zoid/card-fields/prerender.jsx +1 -1
- package/src/zoid/card-form/component.js +4 -4
- package/src/zoid/checkout/component.jsx +13 -5
- package/src/zoid/checkout/hacks.js +1 -1
- package/src/zoid/checkout/props.js +3 -2
- package/src/zoid/installments/component.jsx +3 -3
- package/src/zoid/menu/component.jsx +2 -2
- package/src/zoid/modal/component.jsx +3 -3
- package/src/zoid/payment-fields/component.jsx +3 -3
- package/src/zoid/payment-fields/container.jsx +3 -3
- package/src/zoid/payment-fields/prerender.jsx +1 -1
- package/src/zoid/qr-code/component.jsx +2 -2
- package/src/zoid/qr-code/container.jsx +3 -3
- package/src/zoid/qr-code/prerender.jsx +2 -2
- package/src/zoid/wallet/component.jsx +4 -4
- package/src/zoid/wallet/container.jsx +3 -3
- package/src/zoid/wallet/prerender.jsx +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/* @flow */
|
|
2
2
|
/** @jsx node */
|
|
3
3
|
|
|
4
|
-
import { node, dom, type ChildType } from '
|
|
4
|
+
import { node, dom, type ChildType } from 'jsx-pragmatic/src';
|
|
5
5
|
import { FUNDING, CARD, FPTI_KEY } from '@paypal/sdk-constants/src';
|
|
6
|
-
import { popup, supportsPopups, writeElementToWindow } from '
|
|
7
|
-
import { assertSameDomain, type CrossDomainWindowType } from '
|
|
6
|
+
import { popup, supportsPopups, writeElementToWindow } from 'belter/src';
|
|
7
|
+
import { assertSameDomain, type CrossDomainWindowType } from 'cross-domain-utils/src';
|
|
8
8
|
import { SpinnerPage } from '@paypal/common-components/src';
|
|
9
9
|
import { getLogger } from '@paypal/sdk-client/src';
|
|
10
|
-
import type { ZoidProps } from '
|
|
10
|
+
import type { ZoidProps } from 'zoid/src';
|
|
11
11
|
|
|
12
12
|
import { DEFAULT_POPUP_SIZE } from '../checkout';
|
|
13
13
|
import { Buttons } from '../../ui';
|
package/src/zoid/buttons/util.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* @flow */
|
|
2
|
-
import { supportsPopups as userAgentSupportsPopups, isAndroid, isChrome, isIos, isSafari, isSFVC, type Experiment, isDevice, isTablet, getElement, isLocalStorageEnabled } from '
|
|
2
|
+
import { supportsPopups as userAgentSupportsPopups, isAndroid, isChrome, isIos, isSafari, isSFVC, type Experiment, isDevice, isTablet, getElement, isLocalStorageEnabled } from 'belter/src';
|
|
3
3
|
import { ENV, FUNDING } from '@paypal/sdk-constants/src';
|
|
4
4
|
import { getEnableFunding, getDisableFunding, createExperiment, getFundingEligibility, getPlatform, getComponents, getEnv } from '@paypal/sdk-client/src';
|
|
5
5
|
import { getRefinedFundingEligibility } from '@paypal/funding-components/src';
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
/** @jsx node */
|
|
3
3
|
/* eslint max-lines: 0 */
|
|
4
4
|
|
|
5
|
-
import { node, dom } from '
|
|
6
|
-
import { ZalgoPromise } from '
|
|
7
|
-
import { create, type ZoidComponent } from '
|
|
8
|
-
import type { CrossDomainWindowType } from '
|
|
9
|
-
import { memoize, uniqueID } from '
|
|
5
|
+
import { node, dom } from 'jsx-pragmatic/src';
|
|
6
|
+
import { ZalgoPromise } from 'zalgo-promise/src';
|
|
7
|
+
import { create, type ZoidComponent } from 'zoid/src';
|
|
8
|
+
import type { CrossDomainWindowType } from 'cross-domain-utils/src';
|
|
9
|
+
import { memoize, uniqueID } from 'belter/src';
|
|
10
10
|
import { getLocale, getEnv, getSDKMeta, getDisableCard, getPayPalDomain, getClientID, getDebug, getCurrency, getIntent,
|
|
11
11
|
getCommit, getVault } from '@paypal/sdk-client/src';
|
|
12
12
|
import { getRefinedFundingEligibility } from '@paypal/funding-components/src';
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
/* eslint max-lines: 0 */
|
|
4
4
|
|
|
5
5
|
import { LANG } from '@paypal/sdk-constants/src';
|
|
6
|
-
import { ZalgoPromise } from '
|
|
7
|
-
import { create, type ZoidComponent } from '
|
|
8
|
-
import type { CrossDomainWindowType } from '
|
|
9
|
-
import { inlineMemoize } from '
|
|
6
|
+
import { ZalgoPromise } from 'zalgo-promise/src';
|
|
7
|
+
import { create, type ZoidComponent } from 'zoid/src';
|
|
8
|
+
import type { CrossDomainWindowType } from 'cross-domain-utils/src';
|
|
9
|
+
import { inlineMemoize } from 'belter/src';
|
|
10
10
|
import { getLocale, getEnv, getCommit, getSDKMeta, getDisableCard, getPayPalDomain } from '@paypal/sdk-client/src';
|
|
11
11
|
|
|
12
12
|
import { getSessionID } from '../../lib';
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
/** @jsx node */
|
|
3
3
|
/* eslint max-lines: 0 */
|
|
4
4
|
|
|
5
|
-
import { node, dom } from '
|
|
5
|
+
import { node, dom } from 'jsx-pragmatic/src';
|
|
6
6
|
import {
|
|
7
7
|
getPayPalDomainRegex, getLogger, getLocale,
|
|
8
8
|
getEnv, getClientID, getCommit, getSDKMeta, getCSPNonce, getBuyerCountry, getVersion, getPayPalDomain, getClientMetadataID
|
|
9
9
|
} from '@paypal/sdk-client/src';
|
|
10
|
-
import { ZalgoPromise } from '
|
|
11
|
-
import { create, CONTEXT, type ZoidComponent, EVENT } from '
|
|
12
|
-
import { isDevice, memoize, noop, supportsPopups, inlineMemoize } from '
|
|
10
|
+
import { ZalgoPromise } from 'zalgo-promise/src';
|
|
11
|
+
import { create, CONTEXT, type ZoidComponent, EVENT } from 'zoid/src';
|
|
12
|
+
import { isDevice, memoize, noop, supportsPopups, inlineMemoize } from 'belter/src';
|
|
13
13
|
import { FUNDING } from '@paypal/sdk-constants/src';
|
|
14
14
|
import { SpinnerPage, Overlay } from '@paypal/common-components/src';
|
|
15
15
|
|
|
@@ -50,7 +50,7 @@ export function getCheckoutComponent() : CheckoutComponent {
|
|
|
50
50
|
},
|
|
51
51
|
|
|
52
52
|
containerTemplate: ({ context, close, focus, doc, event, frame, prerenderFrame, props }) => {
|
|
53
|
-
const { nonce, locale: { lang } } = props;
|
|
53
|
+
const { nonce, locale: { lang }, inline } = props;
|
|
54
54
|
const content = containerContent[lang];
|
|
55
55
|
return (
|
|
56
56
|
<Overlay
|
|
@@ -62,6 +62,7 @@ export function getCheckoutComponent() : CheckoutComponent {
|
|
|
62
62
|
prerenderFrame={ prerenderFrame }
|
|
63
63
|
content={ content }
|
|
64
64
|
nonce={ nonce }
|
|
65
|
+
fullScreen={ inline === true }
|
|
65
66
|
/>
|
|
66
67
|
).render(dom({ doc }));
|
|
67
68
|
},
|
|
@@ -229,6 +230,13 @@ export function getCheckoutComponent() : CheckoutComponent {
|
|
|
229
230
|
test: {
|
|
230
231
|
type: 'object',
|
|
231
232
|
default: () => (window.__test__ || { action: 'checkout' })
|
|
233
|
+
},
|
|
234
|
+
|
|
235
|
+
inline: {
|
|
236
|
+
type: 'boolean',
|
|
237
|
+
required: false,
|
|
238
|
+
queryParam: true,
|
|
239
|
+
allowDelegate: true
|
|
232
240
|
}
|
|
233
241
|
},
|
|
234
242
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* @flow */
|
|
2
2
|
|
|
3
|
-
import type { ZalgoPromise } from '
|
|
3
|
+
import type { ZalgoPromise } from 'zalgo-promise/src';
|
|
4
4
|
import { FUNDING, ENV, type LocaleType } from '@paypal/sdk-constants/src';
|
|
5
5
|
|
|
6
6
|
export type OnApproveData = {|
|
|
@@ -38,5 +38,6 @@ export type CheckoutPropsType = {|
|
|
|
38
38
|
nonce : string,
|
|
39
39
|
csp : {|
|
|
40
40
|
nonce : string
|
|
41
|
-
|}
|
|
41
|
+
|},
|
|
42
|
+
inline : boolean
|
|
42
43
|
|};
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
/** @jsx node */
|
|
3
3
|
/* eslint max-lines: 0 */
|
|
4
4
|
|
|
5
|
-
import { node, dom } from '
|
|
5
|
+
import { node, dom } from 'jsx-pragmatic/src';
|
|
6
6
|
import { getLogger, getPayPalDomainRegex, getSDKMeta, getPayPalDomain, getLocale, getCSPNonce } from '@paypal/sdk-client/src';
|
|
7
|
-
import { create, type ZoidComponent } from '
|
|
8
|
-
import { inlineMemoize } from '
|
|
7
|
+
import { create, type ZoidComponent } from 'zoid/src';
|
|
8
|
+
import { inlineMemoize } from 'belter/src';
|
|
9
9
|
import { Overlay, SpinnerPage } from '@paypal/common-components/src';
|
|
10
10
|
|
|
11
11
|
import { type InstallmentsProps } from './props';
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
/* eslint max-lines: 0 */
|
|
4
4
|
|
|
5
5
|
import { getLogger, getPayPalDomainRegex, getSDKMeta, getPayPalDomain } from '@paypal/sdk-client/src';
|
|
6
|
-
import { create, type ZoidComponent } from '
|
|
7
|
-
import { inlineMemoize } from '
|
|
6
|
+
import { create, type ZoidComponent } from 'zoid/src';
|
|
7
|
+
import { inlineMemoize } from 'belter/src';
|
|
8
8
|
|
|
9
9
|
import { type MenuProps } from './props';
|
|
10
10
|
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
/* eslint max-lines: 0 */
|
|
4
4
|
|
|
5
5
|
import { getLogger, getPayPalDomainRegex, getSDKMeta, getPayPalDomain } from '@paypal/sdk-client/src';
|
|
6
|
-
import { create, EVENT, type ZoidComponent } from '
|
|
7
|
-
import { inlineMemoize, destroyElement, toCSS } from '
|
|
8
|
-
import { node, dom } from '
|
|
6
|
+
import { create, EVENT, type ZoidComponent } from 'zoid/src';
|
|
7
|
+
import { inlineMemoize, destroyElement, toCSS } from 'belter/src';
|
|
8
|
+
import { node, dom } from 'jsx-pragmatic/src';
|
|
9
9
|
|
|
10
10
|
import { type ModalProps } from './props';
|
|
11
11
|
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
/** @jsx node */
|
|
3
3
|
/* eslint max-lines: 0 */
|
|
4
4
|
|
|
5
|
-
import { node, dom } from '
|
|
5
|
+
import { node, dom } from 'jsx-pragmatic/src';
|
|
6
6
|
import { getLogger, getPayPalDomainRegex, getSDKMeta, getPayPalDomain, getClientID,
|
|
7
7
|
getCorrelationID, getSessionID, getEnv, getBuyerCountry, getLocale, getPartnerAttributionID } from '@paypal/sdk-client/src';
|
|
8
|
-
import { create, type ZoidComponent } from '
|
|
9
|
-
import { inlineMemoize, uniqueID } from '
|
|
8
|
+
import { create, type ZoidComponent } from 'zoid/src';
|
|
9
|
+
import { inlineMemoize, uniqueID } from 'belter/src';
|
|
10
10
|
|
|
11
11
|
import { storageState, sessionState } from '../../lib';
|
|
12
12
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/* @flow */
|
|
2
2
|
/** @jsx node */
|
|
3
3
|
|
|
4
|
-
import { destroyElement, toCSS, type EventEmitterType } from '
|
|
5
|
-
import { node, type ChildType } from '
|
|
6
|
-
import { EVENT } from '
|
|
4
|
+
import { destroyElement, toCSS, type EventEmitterType } from 'belter/src';
|
|
5
|
+
import { node, type ChildType } from 'jsx-pragmatic/src';
|
|
6
|
+
import { EVENT } from 'zoid/src';
|
|
7
7
|
|
|
8
8
|
const CLASS = {
|
|
9
9
|
VISIBLE: 'visible',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* @flow */
|
|
2
2
|
/** @jsx node */
|
|
3
3
|
|
|
4
|
-
import { inlineMemoize, uniqueID } from '
|
|
5
|
-
import { create, type ZoidComponent } from '
|
|
4
|
+
import { inlineMemoize, uniqueID } from 'belter/src';
|
|
5
|
+
import { create, type ZoidComponent } from 'zoid/src';
|
|
6
6
|
import { getLogger, getPayPalDomainRegex, getPayPalDomain, getCSPNonce, getSDKMeta, getDebug, getEnv, getSessionID, getLocale, getClientID, getCorrelationID, getBuyerCountry } from '@paypal/sdk-client/src';
|
|
7
7
|
|
|
8
8
|
import { containerTemplate } from './container';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/* @flow */
|
|
2
2
|
/** @jsx node */
|
|
3
3
|
|
|
4
|
-
import { destroyElement, type EventEmitterType } from '
|
|
5
|
-
import { EVENT, type RenderOptionsType } from '
|
|
6
|
-
import { node, dom, type ChildType } from '
|
|
4
|
+
import { destroyElement, type EventEmitterType } from 'belter/src';
|
|
5
|
+
import { EVENT, type RenderOptionsType } from 'zoid/src';
|
|
6
|
+
import { node, dom, type ChildType } from 'jsx-pragmatic/src';
|
|
7
7
|
|
|
8
8
|
import { type QRCodeProps } from './types';
|
|
9
9
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* @flow */
|
|
2
2
|
/** @jsx node */
|
|
3
3
|
|
|
4
|
-
import { type RenderOptionsType } from '
|
|
5
|
-
import { node, dom } from '
|
|
4
|
+
import { type RenderOptionsType } from 'zoid/src';
|
|
5
|
+
import { node, dom } from 'jsx-pragmatic/src';
|
|
6
6
|
import { SpinnerPage } from '@paypal/common-components/src';
|
|
7
7
|
|
|
8
8
|
import { type QRCodeProps } from './types';
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
/** @jsx node */
|
|
3
3
|
/* eslint max-lines: 0 */
|
|
4
4
|
|
|
5
|
-
import { node, dom } from '
|
|
5
|
+
import { node, dom } from 'jsx-pragmatic/src';
|
|
6
6
|
import {
|
|
7
7
|
getLogger, getPayPalDomainRegex, getSDKMeta, getPayPalDomain, getClientID, getUserAccessToken,
|
|
8
8
|
getClientAccessToken, getUserIDToken, getLocale, getPartnerAttributionID, getCorrelationID, getSessionID,
|
|
9
9
|
getEnv, getStageHost, getAPIStageHost, getPlatform, getCurrency, getIntent, getBuyerCountry, getCommit, getVault,
|
|
10
10
|
getMerchantID, getCSPNonce, getDebug, getMerchantRequestedPopupsDisabled
|
|
11
11
|
} from '@paypal/sdk-client/src';
|
|
12
|
-
import { create, type ZoidComponent } from '
|
|
13
|
-
import { inlineMemoize, memoize, uniqueID } from '
|
|
14
|
-
import { ZalgoPromise } from '
|
|
12
|
+
import { create, type ZoidComponent } from 'zoid/src';
|
|
13
|
+
import { inlineMemoize, memoize, uniqueID } from 'belter/src';
|
|
14
|
+
import { ZalgoPromise } from 'zalgo-promise/src';
|
|
15
15
|
import { FUNDING } from '@paypal/sdk-constants/src';
|
|
16
16
|
import { getRefinedFundingEligibility, rememberFunding } from '@paypal/funding-components/src';
|
|
17
17
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/* @flow */
|
|
2
2
|
/** @jsx node */
|
|
3
3
|
|
|
4
|
-
import { destroyElement, toCSS, type EventEmitterType } from '
|
|
5
|
-
import { node, type ChildType } from '
|
|
6
|
-
import { EVENT } from '
|
|
4
|
+
import { destroyElement, toCSS, type EventEmitterType } from 'belter/src';
|
|
5
|
+
import { node, type ChildType } from 'jsx-pragmatic/src';
|
|
6
|
+
import { EVENT } from 'zoid/src';
|
|
7
7
|
|
|
8
8
|
const CLASS = {
|
|
9
9
|
VISIBLE: 'visible',
|