@paypal/checkout-components 5.0.409-alpha-d2d875c.0 → 5.0.409
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/__sdk__.js +0 -6
- package/dist/button.js +1 -1
- package/dist/test/button.js +1 -1
- package/globals.js +0 -1
- package/package.json +1 -1
- package/src/declarations.js +0 -1
- package/src/lib/perceived-latency-instrumentation.js +3 -4
- package/src/ui/buttons/props.js +4 -2
- package/src/zoid/buttons/component.jsx +2 -19
- package/src/zoid/buttons/util.js +0 -1
- package/src/interface/saved-payment-methods.js +0 -15
- package/src/zoid/saved-payment-methods/component.jsx +0 -806
- package/src/zoid/saved-payment-methods/container.jsx +0 -125
- package/src/zoid/saved-payment-methods/index.js +0 -4
- package/src/zoid/saved-payment-methods/prerender.jsx +0 -134
- package/src/zoid/saved-payment-methods/props.js +0 -116
- package/src/zoid/saved-payment-methods/util.js +0 -125
- package/src/zoid/saved-payment-methods/util.test.js +0 -117
package/globals.js
CHANGED
package/package.json
CHANGED
package/src/declarations.js
CHANGED
|
@@ -57,17 +57,16 @@ export const logLatencyInstrumentationPhase = ({
|
|
|
57
57
|
};
|
|
58
58
|
|
|
59
59
|
export const prepareInstrumentationPayload = (
|
|
60
|
-
buttonSessionID: string
|
|
61
|
-
component: "buttons" | "saved-payment-methods"
|
|
60
|
+
buttonSessionID: string
|
|
62
61
|
): InstrumentationPayload => {
|
|
63
62
|
const timeOrigin = getNavigationTimeOrigin();
|
|
64
63
|
const renderStartTime = getStartTimeFromMark({
|
|
65
64
|
buttonSessionID,
|
|
66
|
-
phase:
|
|
65
|
+
phase: "buttons-first-render",
|
|
67
66
|
});
|
|
68
67
|
const renderEndTime = getStartTimeFromMark({
|
|
69
68
|
buttonSessionID,
|
|
70
|
-
phase:
|
|
69
|
+
phase: "buttons-first-render-end",
|
|
71
70
|
});
|
|
72
71
|
return {
|
|
73
72
|
comp: {
|
package/src/ui/buttons/props.js
CHANGED
|
@@ -513,12 +513,12 @@ export type ButtonExtensions = {|
|
|
|
513
513
|
resume: () => void,
|
|
514
514
|
|};
|
|
515
515
|
|
|
516
|
-
|
|
516
|
+
type ShowPayPalAppSwitchOverlay = {|
|
|
517
517
|
focus: () => void,
|
|
518
518
|
close: () => void,
|
|
519
519
|
|};
|
|
520
520
|
|
|
521
|
-
|
|
521
|
+
type HidePayPalAppSwitchOverlay = {|
|
|
522
522
|
close: () => void,
|
|
523
523
|
|};
|
|
524
524
|
|
|
@@ -589,7 +589,9 @@ export type ButtonProps = {|
|
|
|
589
589
|
hashChangeHandler: (event: any) => void,
|
|
590
590
|
listenForVisibilityChange: () => void,
|
|
591
591
|
removeListenerForVisibilityChanges: () => void,
|
|
592
|
+
// Not passed to child iframe
|
|
592
593
|
visibilityChangeHandler: () => void,
|
|
594
|
+
|
|
593
595
|
showPayPalAppSwitchOverlay: (args: ShowPayPalAppSwitchOverlay) => void,
|
|
594
596
|
hidePayPalAppSwitchOverlay: (args: HidePayPalAppSwitchOverlay) => void,
|
|
595
597
|
|
|
@@ -107,8 +107,8 @@ import {
|
|
|
107
107
|
getButtonSize,
|
|
108
108
|
getButtonExperiments,
|
|
109
109
|
getModal,
|
|
110
|
-
isEagerOrderCreationEnabled,
|
|
111
110
|
sendPostRobotMessageToButtonIframe,
|
|
111
|
+
isEagerOrderCreationEnabled,
|
|
112
112
|
} from "./util";
|
|
113
113
|
|
|
114
114
|
export type ButtonsComponent = ZoidComponent<
|
|
@@ -190,10 +190,7 @@ export const getButtonsComponent: () => ButtonsComponent = memoize(() => {
|
|
|
190
190
|
phase: "buttons-first-render-end",
|
|
191
191
|
});
|
|
192
192
|
try {
|
|
193
|
-
const cplPhases = prepareInstrumentationPayload(
|
|
194
|
-
buttonSessionID,
|
|
195
|
-
"buttons"
|
|
196
|
-
);
|
|
193
|
+
const cplPhases = prepareInstrumentationPayload(buttonSessionID);
|
|
197
194
|
const cplLatencyMetrics = {
|
|
198
195
|
[FPTI_KEY.STATE]: "CPL_LATENCY_METRICS",
|
|
199
196
|
[FPTI_KEY.TRANSITION]: "process_client_metrics",
|
|
@@ -461,20 +458,6 @@ export const getButtonsComponent: () => ButtonsComponent = memoize(() => {
|
|
|
461
458
|
},
|
|
462
459
|
},
|
|
463
460
|
|
|
464
|
-
onBfcacheRestore: {
|
|
465
|
-
type: "function",
|
|
466
|
-
sendToChild: false,
|
|
467
|
-
queryParam: false,
|
|
468
|
-
value:
|
|
469
|
-
() =>
|
|
470
|
-
({ cachedDurationMs } = {}) => {
|
|
471
|
-
sendPostRobotMessageToButtonIframe({
|
|
472
|
-
eventName: "bfcache_restore",
|
|
473
|
-
payload: { cachedDurationMs },
|
|
474
|
-
});
|
|
475
|
-
},
|
|
476
|
-
},
|
|
477
|
-
|
|
478
461
|
// allowBillingPayments prop is used by Honey Extension to render the one-click button
|
|
479
462
|
// with payment methods & to use the payment methods instead of the Billing Agreement
|
|
480
463
|
allowBillingPayments: {
|
package/src/zoid/buttons/util.js
CHANGED
|
@@ -410,7 +410,6 @@ export const sendPostRobotMessageToButtonIframe = ({
|
|
|
410
410
|
if (iframes[i].name.includes("zoid__paypal_buttons")) {
|
|
411
411
|
postRobotSend(iframes[i].contentWindow, eventName, payload, {
|
|
412
412
|
domain: getPayPalDomain(),
|
|
413
|
-
fireAndForget: true,
|
|
414
413
|
});
|
|
415
414
|
}
|
|
416
415
|
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/* @flow */
|
|
2
|
-
|
|
3
|
-
import type { LazyExport } from "../types";
|
|
4
|
-
import {
|
|
5
|
-
getSavedPaymentMethodsComponent,
|
|
6
|
-
type SavedPaymentMethodsComponent,
|
|
7
|
-
} from "../zoid/saved-payment-methods";
|
|
8
|
-
|
|
9
|
-
export const SavedPaymentMethods: LazyExport<SavedPaymentMethodsComponent> = {
|
|
10
|
-
__get__: () => getSavedPaymentMethodsComponent(),
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export function setup() {
|
|
14
|
-
getSavedPaymentMethodsComponent();
|
|
15
|
-
}
|