@paypal/checkout-components 5.0.194 → 5.0.198-alpha.0
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 +19 -0
- package/README.md +2 -2
- package/dist/button.js +1 -1
- package/package.json +2 -5
- package/src/lib/security.js +1 -1
- package/src/ui/buttons/props.js +2 -1
- package/src/zoid/buttons/component.jsx +7 -1
- package/src/zoid/buttons/prerender.jsx +3 -3
- package/src/zoid/card-fields/component.jsx +1 -1
- package/src/zoid/card-form/component.js +1 -1
- package/src/zoid/wallet/component.jsx +10 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paypal/checkout-components",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.198-alpha.0",
|
|
4
4
|
"description": "PayPal Checkout components, for integrating checkout products.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -14,9 +14,6 @@
|
|
|
14
14
|
"webpack-size": "babel-node $(npm bin)/webpack --progress --config webpack.config.size",
|
|
15
15
|
"build": "npm run test && npm run webpack",
|
|
16
16
|
"release": "./scripts/publish.sh",
|
|
17
|
-
"release:patch": "./scripts/publish.sh patch",
|
|
18
|
-
"release:minor": "./scripts/publish.sh minor",
|
|
19
|
-
"release:major": "./scripts/publish.sh major",
|
|
20
17
|
"preversion": "./scripts/preversion.sh",
|
|
21
18
|
"version": "./scripts/version.sh",
|
|
22
19
|
"postversion": "./scripts/postversion.sh",
|
|
@@ -80,13 +77,13 @@
|
|
|
80
77
|
"sync-browser-mocks": "^2.0.8"
|
|
81
78
|
},
|
|
82
79
|
"dependencies": {
|
|
80
|
+
"@krakenjs/cross-domain-utils": "^3.0.2",
|
|
83
81
|
"@paypal/common-components": "^1.0.16",
|
|
84
82
|
"@paypal/funding-components": "^1.0.17",
|
|
85
83
|
"@paypal/sdk-client": "^4.0.156",
|
|
86
84
|
"@paypal/sdk-constants": "^1.0.107",
|
|
87
85
|
"@paypal/sdk-logos": "^1.0.26",
|
|
88
86
|
"belter": "^1.0.2",
|
|
89
|
-
"cross-domain-utils": "^2.0.1",
|
|
90
87
|
"jsx-pragmatic": "^2",
|
|
91
88
|
"post-robot": "^10.0.0",
|
|
92
89
|
"zalgo-promise": "^1.0.10",
|
package/src/lib/security.js
CHANGED
package/src/ui/buttons/props.js
CHANGED
|
@@ -7,7 +7,7 @@ import { type OrderCreateRequest, type FundingEligibilityType,
|
|
|
7
7
|
type OrderGetResponse, type OrderCaptureResponse, type OrderAuthorizeResponse } from '@paypal/sdk-client/src';
|
|
8
8
|
import { FUNDING, PLATFORM, INTENT, COMMIT, VAULT,
|
|
9
9
|
ENV, COUNTRY, LANG, COUNTRY_LANGS, type LocaleType, CARD, COMPONENTS } from '@paypal/sdk-constants/src';
|
|
10
|
-
import { type CrossDomainWindowType } from 'cross-domain-utils/src';
|
|
10
|
+
import { type CrossDomainWindowType } from '@krakenjs/cross-domain-utils/src';
|
|
11
11
|
import { LOGO_COLOR } from '@paypal/sdk-logos/src';
|
|
12
12
|
import { SUPPORTED_FUNDING_SOURCES } from '@paypal/funding-components/src';
|
|
13
13
|
import type { ComponentFunctionType } from 'jsx-pragmatic/src';
|
|
@@ -298,6 +298,7 @@ export type ButtonProps = {|
|
|
|
298
298
|
onShippingChange : ?OnShippingChange,
|
|
299
299
|
clientAccessToken? : ?string,
|
|
300
300
|
nonce : string,
|
|
301
|
+
merchantRequestedPopupsDisabled : ?boolean,
|
|
301
302
|
userIDToken : ?string,
|
|
302
303
|
flow : $Values<typeof BUTTON_FLOW>,
|
|
303
304
|
experiment : Experiment,
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { getLogger, getLocale, getClientID, getEnv, getIntent, getCommit, getVault, getDisableFunding, getDisableCard,
|
|
6
6
|
getMerchantID, getPayPalDomainRegex, getCurrency, getSDKMeta, getCSPNonce, getBuyerCountry, getClientAccessToken, getPlatform,
|
|
7
7
|
getPartnerAttributionID, getCorrelationID, getEnableThreeDomainSecure, getDebug, getComponents, getStageHost, getAPIStageHost, getPayPalDomain,
|
|
8
|
-
getUserIDToken, getClientMetadataID, getAmount, getEnableFunding, getStorageID, getUserExperienceFlow } from '@paypal/sdk-client/src';
|
|
8
|
+
getUserIDToken, getClientMetadataID, getAmount, getEnableFunding, getStorageID, getUserExperienceFlow, getMerchantRequestedPopupsDisabled } from '@paypal/sdk-client/src';
|
|
9
9
|
import { rememberFunding, getRememberedFunding, getRefinedFundingEligibility } from '@paypal/funding-components/src';
|
|
10
10
|
import { ZalgoPromise } from 'zalgo-promise/src';
|
|
11
11
|
import { create, type ZoidComponent } from 'zoid/src';
|
|
@@ -294,6 +294,12 @@ export const getButtonsComponent : () => ButtonsComponent = memoize(() => {
|
|
|
294
294
|
value: getPartnerAttributionID
|
|
295
295
|
},
|
|
296
296
|
|
|
297
|
+
merchantRequestedPopupsDisabled: {
|
|
298
|
+
type: 'boolean',
|
|
299
|
+
required: false,
|
|
300
|
+
value: getMerchantRequestedPopupsDisabled
|
|
301
|
+
},
|
|
302
|
+
|
|
297
303
|
enableThreeDomainSecure: {
|
|
298
304
|
type: 'boolean',
|
|
299
305
|
value: getEnableThreeDomainSecure
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { node, dom, type ChildType } from 'jsx-pragmatic/src';
|
|
5
5
|
import { FUNDING, CARD, FPTI_KEY } from '@paypal/sdk-constants/src';
|
|
6
6
|
import { popup, supportsPopups, writeElementToWindow } from 'belter/src';
|
|
7
|
-
import { assertSameDomain, type CrossDomainWindowType } from 'cross-domain-utils/src';
|
|
7
|
+
import { assertSameDomain, type CrossDomainWindowType } from '@krakenjs/cross-domain-utils/src';
|
|
8
8
|
import { SpinnerPage } from '@paypal/common-components/src';
|
|
9
9
|
import { getLogger } from '@paypal/sdk-client/src';
|
|
10
10
|
import type { ZoidProps } from 'zoid/src';
|
|
@@ -41,9 +41,9 @@ export function PrerenderedButtons({ nonce, onRenderCheckout, props } : Prerende
|
|
|
41
41
|
[ FPTI_KEY.CHOSEN_FUNDING]: fundingSource
|
|
42
42
|
}).flush();
|
|
43
43
|
|
|
44
|
-
if (fundingSource === FUNDING.VENMO) {
|
|
44
|
+
if (fundingSource === FUNDING.VENMO || fundingSource === FUNDING.APPLEPAY) {
|
|
45
45
|
// wait for button to load
|
|
46
|
-
} else if (supportsPopups()) {
|
|
46
|
+
} else if (supportsPopups() && !props.merchantRequestedPopupsDisabled) {
|
|
47
47
|
// remember the popup window to prevent showing a new popup window on every click in the prerender state
|
|
48
48
|
if (!win || win.closed) {
|
|
49
49
|
win = assertSameDomain(popup('', {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { node, dom } from 'jsx-pragmatic/src';
|
|
6
6
|
import { ZalgoPromise } from 'zalgo-promise/src';
|
|
7
7
|
import { create, type ZoidComponent } from 'zoid/src';
|
|
8
|
-
import type { CrossDomainWindowType } from 'cross-domain-utils/src';
|
|
8
|
+
import type { CrossDomainWindowType } from '@krakenjs/cross-domain-utils/src';
|
|
9
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';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { LANG } from '@paypal/sdk-constants/src';
|
|
6
6
|
import { ZalgoPromise } from 'zalgo-promise/src';
|
|
7
7
|
import { create, type ZoidComponent } from 'zoid/src';
|
|
8
|
-
import type { CrossDomainWindowType } from 'cross-domain-utils/src';
|
|
8
|
+
import type { CrossDomainWindowType } from '@krakenjs/cross-domain-utils/src';
|
|
9
9
|
import { inlineMemoize } from 'belter/src';
|
|
10
10
|
import { getLocale, getEnv, getCommit, getSDKMeta, getDisableCard, getPayPalDomain } from '@paypal/sdk-client/src';
|
|
11
11
|
|
|
@@ -3,10 +3,12 @@
|
|
|
3
3
|
/* eslint max-lines: 0 */
|
|
4
4
|
|
|
5
5
|
import { node, dom } from 'jsx-pragmatic/src';
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
getLogger, getPayPalDomainRegex, getSDKMeta, getPayPalDomain, getClientID, getUserAccessToken,
|
|
7
8
|
getClientAccessToken, getUserIDToken, getLocale, getPartnerAttributionID, getCorrelationID, getSessionID,
|
|
8
9
|
getEnv, getStageHost, getAPIStageHost, getPlatform, getCurrency, getIntent, getBuyerCountry, getCommit, getVault,
|
|
9
|
-
getMerchantID, getCSPNonce, getDebug
|
|
10
|
+
getMerchantID, getCSPNonce, getDebug, getMerchantRequestedPopupsDisabled
|
|
11
|
+
} from '@paypal/sdk-client/src';
|
|
10
12
|
import { create, type ZoidComponent } from 'zoid/src';
|
|
11
13
|
import { inlineMemoize, memoize, uniqueID } from 'belter/src';
|
|
12
14
|
import { ZalgoPromise } from 'zalgo-promise/src';
|
|
@@ -132,6 +134,12 @@ export function getWalletComponent() : WalletComponent {
|
|
|
132
134
|
value: getPartnerAttributionID
|
|
133
135
|
},
|
|
134
136
|
|
|
137
|
+
merchantRequestedPopupsDisabled: {
|
|
138
|
+
type: 'boolean',
|
|
139
|
+
required: false,
|
|
140
|
+
value: getMerchantRequestedPopupsDisabled
|
|
141
|
+
},
|
|
142
|
+
|
|
135
143
|
correlationID: {
|
|
136
144
|
type: 'string',
|
|
137
145
|
required: false,
|