@paypal/checkout-components 5.0.214 → 5.0.217
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paypal/checkout-components",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.217",
|
|
4
4
|
"description": "PayPal Checkout components, for integrating checkout products.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"engines": {
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"license": "Apache-2.0",
|
|
63
63
|
"readmeFilename": "README.md",
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@krakenjs/grumbler-scripts": "^
|
|
65
|
+
"@krakenjs/grumbler-scripts": "^7.0.0",
|
|
66
66
|
"@krakenjs/sync-browser-mocks": "^3.0.0",
|
|
67
67
|
"babel-core": "^7.0.0-bridge.0",
|
|
68
68
|
"bundlemon": "^1.1.0",
|
|
@@ -127,10 +127,10 @@ export function getCardConfig() : FundingSourceConfig {
|
|
|
127
127
|
checkout: 'Checkout'
|
|
128
128
|
};
|
|
129
129
|
|
|
130
|
-
let label =
|
|
130
|
+
let label = validLabels.checkout;
|
|
131
131
|
|
|
132
132
|
if (custom.label && typeof custom.label === 'string' && validLabels[custom.label.toLowerCase()]) {
|
|
133
|
-
label = validLabels[custom.label];
|
|
133
|
+
label = validLabels[custom.label.toLowerCase()];
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
return (
|
|
@@ -204,7 +204,7 @@ export function Buttons(props : ButtonsProps) : ElementNode {
|
|
|
204
204
|
}
|
|
205
205
|
|
|
206
206
|
{
|
|
207
|
-
(layout === BUTTON_LAYOUT.VERTICAL && fundingSources.indexOf(FUNDING.CARD) !== -1)
|
|
207
|
+
(layout === BUTTON_LAYOUT.VERTICAL && fundingSources.indexOf(FUNDING.CARD) !== -1 && !inlineExperience)
|
|
208
208
|
? <PoweredByPayPal
|
|
209
209
|
locale={ locale }
|
|
210
210
|
nonce={ nonce }
|
|
@@ -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, getMerchantRequestedPopupsDisabled } from '@paypal/sdk-client/src';
|
|
8
|
+
getUserIDToken, getClientMetadataID, getAmount, getEnableFunding, getStorageID, getUserExperienceFlow, getMerchantRequestedPopupsDisabled, getVersion } from '@paypal/sdk-client/src';
|
|
9
9
|
import { rememberFunding, getRememberedFunding, getRefinedFundingEligibility } from '@paypal/funding-components/src';
|
|
10
10
|
import { ZalgoPromise } from '@krakenjs/zalgo-promise/src';
|
|
11
11
|
import { create, type ZoidComponent } from '@krakenjs/zoid/src';
|
|
@@ -118,6 +118,17 @@ export const getButtonsComponent : () => ButtonsComponent = memoize(() => {
|
|
|
118
118
|
},
|
|
119
119
|
|
|
120
120
|
props: {
|
|
121
|
+
/**
|
|
122
|
+
* Version of the SDK used in first render.
|
|
123
|
+
* This is passed to the `/smart/buttons` endpoint in order for the second render
|
|
124
|
+
* to be aware of what sdk version to load during SSR of the buttons
|
|
125
|
+
*/
|
|
126
|
+
sdkVersion: {
|
|
127
|
+
type: 'string',
|
|
128
|
+
queryParam: true,
|
|
129
|
+
sendToChild: false,
|
|
130
|
+
value: getVersion
|
|
131
|
+
},
|
|
121
132
|
fundingSource: {
|
|
122
133
|
type: 'string',
|
|
123
134
|
queryParam: true,
|
|
@@ -10,6 +10,7 @@ import { getLogger } from '@paypal/sdk-client/src';
|
|
|
10
10
|
import type { ZoidProps } from '@krakenjs/zoid/src';
|
|
11
11
|
|
|
12
12
|
import { DEFAULT_POPUP_SIZE } from '../checkout';
|
|
13
|
+
import { EXPERIENCE } from '../../constants';
|
|
13
14
|
import { Buttons } from '../../ui';
|
|
14
15
|
import { type ButtonProps } from '../../ui/buttons/props';
|
|
15
16
|
|
|
@@ -41,7 +42,7 @@ export function PrerenderedButtons({ nonce, onRenderCheckout, props } : Prerende
|
|
|
41
42
|
[ FPTI_KEY.CHOSEN_FUNDING]: fundingSource
|
|
42
43
|
}).flush();
|
|
43
44
|
|
|
44
|
-
if (fundingSource === FUNDING.VENMO || fundingSource === FUNDING.APPLEPAY) {
|
|
45
|
+
if (fundingSource === FUNDING.VENMO || fundingSource === FUNDING.APPLEPAY || (fundingSource === FUNDING.CARD && props.experience === EXPERIENCE.INLINE)) {
|
|
45
46
|
// wait for button to load
|
|
46
47
|
} else if (supportsPopups() && !props.merchantRequestedPopupsDisabled) {
|
|
47
48
|
// remember the popup window to prevent showing a new popup window on every click in the prerender state
|