@paypal/checkout-components 5.0.424 → 5.0.425

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.424",
3
+ "version": "5.0.425",
4
4
  "description": "PayPal Checkout components, for integrating checkout products.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -107,9 +107,9 @@ import {
107
107
  getButtonSize,
108
108
  getButtonExperiments,
109
109
  getModal,
110
- sendPostRobotMessageToButtonIframe,
111
110
  isEagerOrderCreationEnabled,
112
111
  resolveMerchantDomain,
112
+ sendPostRobotMessageToButtonIframe,
113
113
  } from "./util";
114
114
 
115
115
  export type ButtonsComponent = ZoidComponent<
@@ -472,6 +472,20 @@ export const getButtonsComponent: () => ButtonsComponent = memoize(() => {
472
472
  },
473
473
  },
474
474
 
475
+ onBfcacheRestore: {
476
+ type: "function",
477
+ sendToChild: false,
478
+ queryParam: false,
479
+ value:
480
+ () =>
481
+ ({ cachedDurationMs } = {}) => {
482
+ sendPostRobotMessageToButtonIframe({
483
+ eventName: "bfcache_restore",
484
+ payload: { cachedDurationMs },
485
+ });
486
+ },
487
+ },
488
+
475
489
  // allowBillingPayments prop is used by Honey Extension to render the one-click button
476
490
  // with payment methods & to use the payment methods instead of the Billing Agreement
477
491
  allowBillingPayments: {
@@ -411,6 +411,7 @@ export const sendPostRobotMessageToButtonIframe = ({
411
411
  if (iframes[i].name.includes("zoid__paypal_buttons")) {
412
412
  postRobotSend(iframes[i].contentWindow, eventName, payload, {
413
413
  domain: getPayPalDomain(),
414
+ fireAndForget: true,
414
415
  });
415
416
  }
416
417
  }