@paypal/checkout-components 5.0.229 → 5.0.230
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
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## <small>5.0.230 (2022-07-06)</small>
|
|
2
|
+
|
|
3
|
+
* chore: update minimum height for single name field (#1962) ([92d81aa](https://github.com/paypal/paypal-checkout-components/commit/92d81aa)), closes [#1962](https://github.com/paypal/paypal-checkout-components/issues/1962)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
1
7
|
## <small>5.0.229 (2022-06-23)</small>
|
|
2
8
|
|
|
3
9
|
* chore: remove Inline XO experiment (#1956) ([edc220d](https://github.com/paypal/paypal-checkout-components/commit/edc220d)), closes [#1956](https://github.com/paypal/paypal-checkout-components/issues/1956)
|
package/package.json
CHANGED
|
@@ -29,8 +29,8 @@ import { type InlineXOEligibilityType } from '../../types';
|
|
|
29
29
|
import { containerTemplate } from './container';
|
|
30
30
|
import { PrerenderedButtons } from './prerender';
|
|
31
31
|
import { applePaySession, determineFlow, isSupportedNativeBrowser, createVenmoExperiment,
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
getRenderedButtons, getButtonSize, getButtonExperiments, isInlineXOEligible } from './util';
|
|
33
|
+
|
|
34
34
|
|
|
35
35
|
export type ButtonsComponent = ZoidComponent<ButtonProps>;
|
|
36
36
|
|
|
@@ -53,7 +53,7 @@ export const getButtonsComponent : () => ButtonsComponent = memoize(() => {
|
|
|
53
53
|
|
|
54
54
|
prerenderTemplate: ({ state, props, doc, event }) => {
|
|
55
55
|
const { buttonSessionID } = props;
|
|
56
|
-
|
|
56
|
+
|
|
57
57
|
if (!isLocalStorageEnabled()) {
|
|
58
58
|
getLogger().info('localstorage_inaccessible_possible_private_browsing').track({
|
|
59
59
|
[ FPTI_KEY.BUTTON_SESSION_UID ]: buttonSessionID,
|
|
@@ -114,7 +114,7 @@ export const getButtonsComponent : () => ButtonsComponent = memoize(() => {
|
|
|
114
114
|
fundingEligibility = getRefinedFundingEligibility(),
|
|
115
115
|
supportsPopups = userAgentSupportsPopups(),
|
|
116
116
|
supportedNativeBrowser = isSupportedNativeBrowser(),
|
|
117
|
-
experiment = getButtonExperiments(
|
|
117
|
+
experiment = getButtonExperiments(),
|
|
118
118
|
createBillingAgreement, createSubscription
|
|
119
119
|
} = props;
|
|
120
120
|
|
|
@@ -319,23 +319,12 @@ export const getButtonsComponent : () => ButtonsComponent = memoize(() => {
|
|
|
319
319
|
logLatencyInstrumentationPhase({ buttonSessionID: props.buttonSessionID, phase: 'buttons-first-render' });
|
|
320
320
|
|
|
321
321
|
return (...args) => {
|
|
322
|
-
const { fundingSource } = props;
|
|
323
322
|
const venmoExperiment = createVenmoExperiment();
|
|
324
323
|
|
|
325
324
|
if (venmoExperiment) {
|
|
326
325
|
venmoExperiment.logStart({ [ FPTI_KEY.BUTTON_SESSION_UID ]: props.buttonSessionID });
|
|
327
326
|
}
|
|
328
327
|
|
|
329
|
-
const enableNoPaylaterExperiment = createNoPaylaterExperiment(fundingSource);
|
|
330
|
-
|
|
331
|
-
if (enableNoPaylaterExperiment) {
|
|
332
|
-
enableNoPaylaterExperiment.logStart({
|
|
333
|
-
[ FPTI_KEY.BUTTON_SESSION_UID ]: props.buttonSessionID,
|
|
334
|
-
[ FPTI_KEY.CONTEXT_ID ]: props.buttonSessionID,
|
|
335
|
-
[ FPTI_KEY.CONTEXT_TYPE ]: 'button_session_id'
|
|
336
|
-
});
|
|
337
|
-
}
|
|
338
|
-
|
|
339
328
|
return value(...args);
|
|
340
329
|
};
|
|
341
330
|
}
|
|
@@ -466,9 +455,8 @@ export const getButtonsComponent : () => ButtonsComponent = memoize(() => {
|
|
|
466
455
|
experiment: {
|
|
467
456
|
type: 'object',
|
|
468
457
|
queryParam: true,
|
|
469
|
-
value: (
|
|
470
|
-
const
|
|
471
|
-
const experiments = getButtonExperiments(fundingSource);
|
|
458
|
+
value: () => {
|
|
459
|
+
const experiments = getButtonExperiments();
|
|
472
460
|
return experiments;
|
|
473
461
|
}
|
|
474
462
|
},
|
|
@@ -714,7 +702,7 @@ export const getButtonsComponent : () => ButtonsComponent = memoize(() => {
|
|
|
714
702
|
locale,
|
|
715
703
|
vault
|
|
716
704
|
} });
|
|
717
|
-
|
|
705
|
+
|
|
718
706
|
const logger = getLogger();
|
|
719
707
|
|
|
720
708
|
logger
|
package/src/zoid/buttons/util.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* @flow */
|
|
2
2
|
import { supportsPopups as userAgentSupportsPopups, isAndroid, isChrome, isIos, isIOS14, isSafari, isSFVC, type Experiment, isDevice, isTablet, getElement, isLocalStorageEnabled, isStandAlone, once } from '@krakenjs/belter/src';
|
|
3
3
|
import { COUNTRY, CURRENCY, ENV, FUNDING, type LocaleType } from '@paypal/sdk-constants/src';
|
|
4
|
-
import { getEnableFunding,
|
|
4
|
+
import { getEnableFunding, getLogger, createExperiment, getFundingEligibility, getPlatform, getComponents, getEnv, type FundingEligibilityType } from '@paypal/sdk-client/src';
|
|
5
5
|
import { getRefinedFundingEligibility } from '@paypal/funding-components/src';
|
|
6
6
|
|
|
7
7
|
import type { Experiment as EligibilityExperiment } from '../../types';
|
|
@@ -126,39 +126,6 @@ export function getVenmoExperiment() : EligibilityExperiment {
|
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
export function createNoPaylaterExperiment(fundingSource : ?$Values<typeof FUNDING>) : Experiment | void {
|
|
130
|
-
const disableFunding = getDisableFunding();
|
|
131
|
-
const isDisableFundingPaylater = disableFunding && disableFunding.indexOf(FUNDING.PAYLATER) !== -1;
|
|
132
|
-
const enableFunding = getEnableFunding();
|
|
133
|
-
const isEnableFundingPaylater = enableFunding && enableFunding.indexOf(FUNDING.PAYLATER) !== -1;
|
|
134
|
-
|
|
135
|
-
const { paylater } = getFundingEligibility();
|
|
136
|
-
const isEligibleForPaylater = paylater?.eligible;
|
|
137
|
-
const isExperimentable = paylater?.products?.paylater?.variant === 'experimentable' || paylater?.products?.payIn4?.variant === 'experimentable';
|
|
138
|
-
// No experiment because ineligible, already forced on or off
|
|
139
|
-
if (!isEligibleForPaylater
|
|
140
|
-
|| !isExperimentable
|
|
141
|
-
|| isDisableFundingPaylater
|
|
142
|
-
|| isEnableFundingPaylater
|
|
143
|
-
|| fundingSource
|
|
144
|
-
) {
|
|
145
|
-
return;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
return createExperiment('disable_paylater', 0);
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
export function getNoPaylaterExperiment(fundingSource : ?$Values<typeof FUNDING>) : EligibilityExperiment {
|
|
152
|
-
const experiment = createNoPaylaterExperiment(fundingSource);
|
|
153
|
-
|
|
154
|
-
const disableFunding = getDisableFunding();
|
|
155
|
-
const isDisableFundingPaylater = disableFunding && disableFunding.indexOf(FUNDING.PAYLATER) !== -1;
|
|
156
|
-
const isExperimentEnabled = experiment && experiment.isEnabled();
|
|
157
|
-
return {
|
|
158
|
-
disablePaylater: Boolean((isExperimentEnabled || isDisableFundingPaylater))
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
|
|
162
129
|
export function getVenmoAppLabelExperiment() : EligibilityExperiment {
|
|
163
130
|
const isEnvForTest = getEnv() === ENV.LOCAL || getEnv() === ENV.TEST || getEnv() === ENV.STAGE;
|
|
164
131
|
|
|
@@ -259,10 +226,9 @@ export function applePaySession() : ?ApplePaySessionConfigRequest {
|
|
|
259
226
|
}
|
|
260
227
|
}
|
|
261
228
|
|
|
262
|
-
export function getButtonExperiments (
|
|
229
|
+
export function getButtonExperiments () : EligibilityExperiment {
|
|
263
230
|
return {
|
|
264
231
|
...getVenmoExperiment(),
|
|
265
|
-
...getNoPaylaterExperiment(fundingSource),
|
|
266
232
|
...getVenmoAppLabelExperiment()
|
|
267
233
|
};
|
|
268
234
|
}
|
|
@@ -67,20 +67,20 @@ export function PaymentFieldsContainer({ uid, frame, prerenderFrame, event, nonc
|
|
|
67
67
|
min-width: 250px;
|
|
68
68
|
max-width: 100%;
|
|
69
69
|
font-size: 0;
|
|
70
|
-
height:
|
|
71
|
-
min-height:
|
|
70
|
+
height: 91px;
|
|
71
|
+
min-height: 91px;
|
|
72
72
|
transition: all 0.5s ease-in-out;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
@media only screen and (min-width: 0px) {
|
|
76
76
|
#${ uid } {
|
|
77
|
-
min-height:
|
|
77
|
+
min-height: 91px;
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
@media only screen and (min-width: 600px) {
|
|
82
82
|
#${ uid } {
|
|
83
|
-
min-height:
|
|
83
|
+
min-height: 91px;
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
|