@funnelsgrove/payments 0.1.5 → 0.1.6

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.
@@ -12,14 +12,16 @@ export function WalletSubscriptionCheckoutSlot({ amountCents, availabilityPaymen
12
12
  const walletAvailable = walletAvailability.intentKey === session.intentKey
13
13
  ? walletAvailability.available
14
14
  : null;
15
- const shouldRenderPlaceholder = !suspended && expressCheckoutAllowed && walletAvailable === null;
16
15
  const shouldRenderExpressCheckout = !suspended &&
17
16
  expressCheckoutAllowed &&
18
17
  walletAvailable !== false &&
19
18
  Boolean(session.activeClientSecret) &&
20
19
  Boolean(session.stripePromise);
21
- const placeholderBehindExpressCheckout = shouldRenderPlaceholder && shouldRenderExpressCheckout;
22
- const placeholderIsPreparing = shouldRenderPlaceholder && !shouldRenderExpressCheckout;
20
+ const shouldRenderPlaceholder = !shouldRenderExpressCheckout &&
21
+ !suspended &&
22
+ expressCheckoutAllowed &&
23
+ walletAvailable === null;
24
+ const placeholderIsPreparing = shouldRenderPlaceholder;
23
25
  const markWalletUnavailable = useCallback((intentKey) => {
24
26
  setWalletAvailability({
25
27
  available: false,
@@ -86,12 +88,7 @@ export function WalletSubscriptionCheckoutSlot({ amountCents, availabilityPaymen
86
88
  .filter(Boolean)
87
89
  .join(' '), "aria-busy": placeholderIsPreparing || undefined, children: [shouldRenderExpressCheckout &&
88
90
  session.activeClientSecret &&
89
- session.stripePromise ? (_jsx(StripeExpressCheckoutElement, { amountCents: amountCents, availabilityPaymentMethods: [availabilityPaymentMethod], beforeConfirm: beforeConfirm, className: className, clientSecret: session.activeClientSecret, customerEmail: customerEmail, customerName: customerName, onAvailabilityChange: handleAvailabilityChange, onError: handleError, onSuccess: onSuccess, options: options, returnUrl: returnUrl, stripePromise: session.stripePromise, summaryLabel: summaryLabel })) : null, shouldRenderPlaceholder ? (_jsx("div", { className: [
90
- 'wallet-subscription-checkout-slot__placeholder',
91
- placeholderBehindExpressCheckout ? 'is-behind-express-checkout' : '',
92
- ]
93
- .filter(Boolean)
94
- .join(' '), children: renderPlaceholder({
91
+ session.stripePromise ? (_jsx(StripeExpressCheckoutElement, { amountCents: amountCents, availabilityPaymentMethods: [availabilityPaymentMethod], beforeConfirm: beforeConfirm, className: className, clientSecret: session.activeClientSecret, customerEmail: customerEmail, customerName: customerName, onAvailabilityChange: handleAvailabilityChange, onError: handleError, onSuccess: onSuccess, options: options, returnUrl: returnUrl, stripePromise: session.stripePromise, summaryLabel: summaryLabel })) : null, shouldRenderPlaceholder ? (_jsx("div", { className: 'wallet-subscription-checkout-slot__placeholder', children: renderPlaceholder({
95
92
  className,
96
93
  disabled: slotDisabled,
97
94
  label: placeholderLabel,
@@ -115,8 +112,4 @@ const walletSubscriptionCheckoutSlotStyles = `
115
112
  inset: 0;
116
113
  z-index: 1;
117
114
  }
118
-
119
- .wallet-subscription-checkout-slot__placeholder.is-behind-express-checkout {
120
- pointer-events: none;
121
- }
122
115
  `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funnelsgrove/payments",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "main": "./dist/index.js",