@paypal/checkout-components 5.0.259 → 5.0.261

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.259",
3
+ "version": "5.0.261",
4
4
  "description": "PayPal Checkout components, for integrating checkout products.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -232,7 +232,9 @@ export function Button({
232
232
 
233
233
  if (
234
234
  WalletLabel &&
235
- (!showPayLabel || flow === BUTTON_FLOW.PURCHASE) &&
235
+ (!showPayLabel ||
236
+ flow === BUTTON_FLOW.PURCHASE ||
237
+ flow === BUTTON_FLOW.VAULT_WITHOUT_PURCHASE) &&
236
238
  (instrument ||
237
239
  (__WEB__ &&
238
240
  userIDToken &&
@@ -80,6 +80,7 @@ type CardFieldsProps = {|
80
80
  {| returnUrl?: string, vaultSetupToken?: string |},
81
81
  {| redirect: (?CrossDomainWindowType, ?string) => ZalgoPromise<void> |}
82
82
  ) => ?ZalgoPromise<void>,
83
+ onError?: () => ZalgoPromise<Object> | Object,
83
84
  onComplete: (
84
85
  {| returnUrl: string |},
85
86
  {| redirect: (?CrossDomainWindowType, ?string) => ZalgoPromise<void> |}
@@ -247,6 +248,12 @@ export const getCardFieldsComponent: () => CardFieldsComponent = memoize(
247
248
  value: ({ props }) => props.parent.props.onApprove,
248
249
  },
249
250
 
251
+ onError: {
252
+ type: "function",
253
+ required: false,
254
+ value: ({ props }) => props.parent.props.onError,
255
+ },
256
+
250
257
  onComplete: {
251
258
  type: "function",
252
259
  required: false,
@@ -530,6 +537,11 @@ export const getCardFieldsComponent: () => CardFieldsComponent = memoize(
530
537
  required: false,
531
538
  },
532
539
 
540
+ onError: {
541
+ type: "function",
542
+ required: false,
543
+ },
544
+
533
545
  onComplete: {
534
546
  type: "function",
535
547
  required: false,