@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/globals.js CHANGED
@@ -23,7 +23,6 @@ module.exports = {
23
23
  __URI__: {
24
24
  __CHECKOUT__: "/checkoutnow",
25
25
  __BUTTONS__: "/smart/buttons",
26
- __SAVED_PAYMENT_METHODS__: "/smart/saved-payment-methods",
27
26
  __PIXEL__: "/smart/pixel",
28
27
  __MENU__: "/smart/menu",
29
28
  __QRCODE__: "/smart/qrcode",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paypal/checkout-components",
3
- "version": "5.0.409-alpha-d2d875c.0",
3
+ "version": "5.0.409",
4
4
  "description": "PayPal Checkout components, for integrating checkout products.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -20,7 +20,6 @@ declare var __PAYPAL_CHECKOUT__: {|
20
20
  __WALLET__: string,
21
21
  __PAYMENT_FIELDS__: string,
22
22
  __MESSAGE_MODAL__: string,
23
- __SAVED_PAYMENT_METHODS__: string,
24
23
  |},
25
24
  |};
26
25
 
@@ -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: `${component}-first-render`,
65
+ phase: "buttons-first-render",
67
66
  });
68
67
  const renderEndTime = getStartTimeFromMark({
69
68
  buttonSessionID,
70
- phase: `${component}-first-render-end`,
69
+ phase: "buttons-first-render-end",
71
70
  });
72
71
  return {
73
72
  comp: {
@@ -513,12 +513,12 @@ export type ButtonExtensions = {|
513
513
  resume: () => void,
514
514
  |};
515
515
 
516
- export type ShowPayPalAppSwitchOverlay = {|
516
+ type ShowPayPalAppSwitchOverlay = {|
517
517
  focus: () => void,
518
518
  close: () => void,
519
519
  |};
520
520
 
521
- export type HidePayPalAppSwitchOverlay = {|
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: {
@@ -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
- }