@stigg/react-sdk 4.4.0-beta.4 → 4.4.0-beta.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.
- package/dist/components/checkout/components/Button.d.ts +0 -1
- package/dist/components/checkout/components/ChangePlanButton.d.ts +8 -0
- package/dist/components/checkout/components/DowngradeToFreeContainer.d.ts +6 -2
- package/dist/components/checkout/hooks/usePreviewSubscription.d.ts +3 -0
- package/dist/components/checkout/progressBar/CheckoutProgressBar.style.d.ts +2 -2
- package/dist/components/checkout/steps/plan/BillingPeriodPicker.style.d.ts +1 -0
- package/dist/components/checkout/steps/plan/CheckoutChargeList.d.ts +2 -1
- package/dist/components/customerPortal/subscriptionOverview/subscriptionView/SubscriptionView.style.d.ts +1 -1
- package/dist/react-sdk.cjs.development.js +295 -142
- package/dist/react-sdk.cjs.development.js.map +1 -1
- package/dist/react-sdk.cjs.production.min.js +1 -1
- package/dist/react-sdk.cjs.production.min.js.map +1 -1
- package/dist/react-sdk.esm.js +308 -146
- package/dist/react-sdk.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/checkout/CheckoutContainer.style.ts +1 -0
- package/src/components/checkout/CheckoutContainer.tsx +2 -0
- package/src/components/checkout/components/Button.tsx +3 -14
- package/src/components/checkout/components/ChangePlanButton.tsx +32 -0
- package/src/components/checkout/components/DowngradeToFreeContainer.tsx +27 -7
- package/src/components/checkout/components/Skeletons.style.ts +4 -1
- package/src/components/checkout/hooks/usePreviewSubscription.ts +9 -1
- package/src/components/checkout/planHeader/PlanHeader.style.tsx +1 -1
- package/src/components/checkout/planHeader/PlanHeader.tsx +7 -15
- package/src/components/checkout/progressBar/CheckoutProgressBar.style.ts +3 -1
- package/src/components/checkout/progressBar/CheckoutProgressBar.tsx +5 -2
- package/src/components/checkout/promotionCode/AddPromotionCode.tsx +6 -7
- package/src/components/checkout/steps/addons/CheckoutAddonsStep.tsx +47 -8
- package/src/components/checkout/steps/plan/BillingPeriodPicker.style.tsx +26 -6
- package/src/components/checkout/steps/plan/BillingPeriodPicker.tsx +28 -7
- package/src/components/checkout/steps/plan/CheckoutChargeList.tsx +16 -16
- package/src/components/checkout/summary/CheckoutSummary.tsx +7 -7
- package/src/components/checkout/summary/components/CheckoutCaptions.tsx +2 -2
- package/src/components/checkout/textOverrides.ts +1 -1
|
@@ -58,11 +58,11 @@ const ScheduledUpdatesCaption = ({
|
|
|
58
58
|
};
|
|
59
59
|
|
|
60
60
|
const ChargeDueTodayCaption = ({ subscriptionPreview, plan, isFetchingSubscriptionPreview }: CheckoutCaptionProps) => {
|
|
61
|
-
if (!subscriptionPreview?.total) {
|
|
61
|
+
if (!subscriptionPreview?.total || subscriptionPreview.total.amount <= 0) {
|
|
62
62
|
return null;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
const total = currencyPriceFormatter(subscriptionPreview
|
|
65
|
+
const total = currencyPriceFormatter(subscriptionPreview.total);
|
|
66
66
|
const usedCredits = !!subscriptionPreview.credits?.used;
|
|
67
67
|
|
|
68
68
|
return (
|
|
@@ -56,7 +56,7 @@ export function getResolvedCheckoutLocalize(
|
|
|
56
56
|
},
|
|
57
57
|
appliedCreditsTitle: 'Applied credits',
|
|
58
58
|
taxTitle: ({ taxDetails }) => `Tax (${taxDetails?.percentage}%)`,
|
|
59
|
-
downgradeToFreeAlertText: () => `We’re sorry to see you
|
|
59
|
+
downgradeToFreeAlertText: () => `We’re sorry to see you cancel your paid subscription 😭`,
|
|
60
60
|
};
|
|
61
61
|
|
|
62
62
|
return merge(checkoutDefaultLocalization, localizeOverride);
|