@paypal/checkout-components 5.0.407 → 5.0.408

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.407",
3
+ "version": "5.0.408",
4
4
  "description": "PayPal Checkout components, for integrating checkout products.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -589,9 +589,7 @@ export type ButtonProps = {|
589
589
  hashChangeHandler: (event: any) => void,
590
590
  listenForVisibilityChange: () => void,
591
591
  removeListenerForVisibilityChanges: () => void,
592
- // Not passed to child iframe
593
592
  visibilityChangeHandler: () => void,
594
-
595
593
  showPayPalAppSwitchOverlay: (args: ShowPayPalAppSwitchOverlay) => void,
596
594
  hidePayPalAppSwitchOverlay: (args: HidePayPalAppSwitchOverlay) => void,
597
595
 
@@ -107,8 +107,8 @@ import {
107
107
  getButtonSize,
108
108
  getButtonExperiments,
109
109
  getModal,
110
- sendPostRobotMessageToButtonIframe,
111
110
  isEagerOrderCreationEnabled,
111
+ sendPostRobotMessageToButtonIframe,
112
112
  } from "./util";
113
113
 
114
114
  export type ButtonsComponent = ZoidComponent<
@@ -458,6 +458,20 @@ export const getButtonsComponent: () => ButtonsComponent = memoize(() => {
458
458
  },
459
459
  },
460
460
 
461
+ onBfcacheRestore: {
462
+ type: "function",
463
+ sendToChild: false,
464
+ queryParam: false,
465
+ value:
466
+ () =>
467
+ ({ cachedDurationMs } = {}) => {
468
+ sendPostRobotMessageToButtonIframe({
469
+ eventName: "bfcache_restore",
470
+ payload: { cachedDurationMs },
471
+ });
472
+ },
473
+ },
474
+
461
475
  // allowBillingPayments prop is used by Honey Extension to render the one-click button
462
476
  // with payment methods & to use the payment methods instead of the Billing Agreement
463
477
  allowBillingPayments: {
@@ -410,6 +410,7 @@ 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,
413
414
  });
414
415
  }
415
416
  }