@stigg/react-sdk 4.3.0-beta.1 → 4.3.1
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/README.md +1 -1
- package/dist/components/common/Icon.d.ts +2 -3
- package/dist/components/common/PoweredByStigg.d.ts +1 -1
- package/dist/components/common/customIcons.d.ts +5 -17
- package/dist/components/common/mapExternalTheme.d.ts +1 -2
- package/dist/components/customerPortal/subscriptionOverview/tabs/SubscriptionTabs.d.ts +1 -1
- package/dist/components/{common/TiersSelectContainer.d.ts → paywall/TiersLayout.d.ts} +3 -2
- package/dist/components/paywall/paywallTextOverrides.d.ts +4 -0
- package/dist/components/{utils/priceTierUtils.d.ts → paywall/planPriceTier.d.ts} +1 -3
- package/dist/components/utils/calculateDiscountRate.d.ts +0 -1
- package/dist/components/utils/currencyUtils.d.ts +1 -1
- package/dist/components/utils/getPaidPriceText.d.ts +3 -1
- package/dist/index.d.ts +0 -1
- package/dist/react-sdk.cjs.development.js +217 -3483
- 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 +223 -3623
- package/dist/react-sdk.esm.js.map +1 -1
- package/dist/stories/CustomerPortal.stories.d.ts +1 -1
- package/dist/theme/getResolvedTheme.d.ts +0 -1
- package/dist/theme/types.d.ts +0 -1
- package/package.json +22 -11
- package/src/components/StiggProvider.tsx +2 -0
- package/src/components/common/Icon.tsx +22 -17
- package/src/components/common/PoweredByStigg.tsx +1 -1
- package/src/components/common/Typography.tsx +1 -11
- package/src/components/common/customIcons.ts +28 -17
- package/src/components/common/mapExternalTheme.ts +8 -24
- package/src/components/customerPortal/subscriptionOverview/tabs/SubscriptionTabs.tsx +12 -6
- package/src/components/paywall/Paywall.tsx +1 -1
- package/src/components/paywall/PlanOffering.tsx +1 -1
- package/src/components/paywall/PlanOfferingButton.tsx +1 -1
- package/src/components/paywall/PlanPrice.tsx +13 -5
- package/src/components/{common/TiersSelectContainer.tsx → paywall/TiersLayout.tsx} +7 -8
- package/src/components/paywall/paywallTextOverrides.ts +3 -0
- package/src/components/{utils/priceTierUtils.ts → paywall/planPriceTier.ts} +3 -25
- package/src/components/paywall/utils/calculateUnitQuantityText.ts +4 -9
- package/src/components/utils/calculateDiscountRate.ts +1 -1
- package/src/components/utils/currencyUtils.ts +1 -1
- package/src/components/utils/getPaidPriceText.ts +10 -4
- package/src/components/utils/getPlanPrice.ts +1 -1
- package/src/index.ts +0 -1
- package/src/stories/CustomerPortal.stories.tsx +12 -12
- package/src/stories/Paywall.stories.tsx +4 -6
- package/src/stories/baseArgs.ts +1 -1
- package/src/theme/Fonts.tsx +1 -1
- package/src/theme/Theme.tsx +7 -9
- package/src/theme/getResolvedTheme.ts +0 -1
- package/src/theme/types.ts +0 -1
- package/dist/components/checkout/Checkout.d.ts +0 -5
- package/dist/components/checkout/CheckoutContainer.d.ts +0 -22
- package/dist/components/checkout/CheckoutContainer.style.d.ts +0 -26
- package/dist/components/checkout/CheckoutProvider.d.ts +0 -35
- package/dist/components/checkout/CheckoutSummary.d.ts +0 -9
- package/dist/components/checkout/components/Button.d.ts +0 -6
- package/dist/components/checkout/components/InputField.d.ts +0 -8
- package/dist/components/checkout/components/index.d.ts +0 -2
- package/dist/components/checkout/formatting.d.ts +0 -2
- package/dist/components/checkout/hooks/index.d.ts +0 -8
- package/dist/components/checkout/hooks/useAddonsStepModel.d.ts +0 -21
- package/dist/components/checkout/hooks/useCheckoutModel.d.ts +0 -9
- package/dist/components/checkout/hooks/useCouponModel.d.ts +0 -7
- package/dist/components/checkout/hooks/useLoadCheckout.d.ts +0 -11
- package/dist/components/checkout/hooks/usePaymentStepModel.d.ts +0 -16
- package/dist/components/checkout/hooks/usePlanStepModel.d.ts +0 -23
- package/dist/components/checkout/hooks/usePreviewSubscription.d.ts +0 -13
- package/dist/components/checkout/hooks/useProgressBarModel.d.ts +0 -26
- package/dist/components/checkout/hooks/useSubscriptionModel.d.ts +0 -5
- package/dist/components/checkout/hooks/useSubscriptionState.d.ts +0 -2
- package/dist/components/checkout/index.d.ts +0 -3
- package/dist/components/checkout/planHeader/PlanHeader.d.ts +0 -7
- package/dist/components/checkout/planHeader/PlanHeader.style.d.ts +0 -25
- package/dist/components/checkout/planHeader/index.d.ts +0 -1
- package/dist/components/checkout/progressBar/CheckoutProgressBar.d.ts +0 -2
- package/dist/components/checkout/progressBar/CheckoutProgressBar.style.d.ts +0 -45
- package/dist/components/checkout/promotionCode/AddPromotionCode.d.ts +0 -5
- package/dist/components/checkout/promotionCode/AddPromotionCodeButton.d.ts +0 -7
- package/dist/components/checkout/promotionCode/AppliedPromotionCode.d.ts +0 -6
- package/dist/components/checkout/promotionCode/PromotionCodeSection.d.ts +0 -5
- package/dist/components/checkout/promotionCode/index.d.ts +0 -1
- package/dist/components/checkout/steps/addons/CheckoutAddonsStep.d.ts +0 -2
- package/dist/components/checkout/steps/addons/CheckoutAddonsStep.style.d.ts +0 -93
- package/dist/components/checkout/steps/addons/addon.utils.d.ts +0 -15
- package/dist/components/checkout/steps/addons/index.d.ts +0 -1
- package/dist/components/checkout/steps/payment/PaymentMethods.d.ts +0 -19
- package/dist/components/checkout/steps/payment/PaymentMethods.style.d.ts +0 -113
- package/dist/components/checkout/steps/payment/PaymentStep.d.ts +0 -2
- package/dist/components/checkout/steps/payment/index.d.ts +0 -1
- package/dist/components/checkout/steps/payment/stripe/StripePaymentForm.d.ts +0 -2
- package/dist/components/checkout/steps/payment/stripe/index.d.ts +0 -3
- package/dist/components/checkout/steps/payment/stripe/stripe.utils.d.ts +0 -33
- package/dist/components/checkout/steps/payment/stripe/useStripeIntegration.d.ts +0 -5
- package/dist/components/checkout/steps/payment/stripe/useSubmit.d.ts +0 -10
- package/dist/components/checkout/steps/plan/BillingPeriodPicker.d.ts +0 -9
- package/dist/components/checkout/steps/plan/BillingPeriodPicker.style.d.ts +0 -52
- package/dist/components/checkout/steps/plan/CheckoutChargeList.d.ts +0 -16
- package/dist/components/checkout/steps/plan/CheckoutPlanStep.d.ts +0 -4
- package/dist/components/checkout/steps/plan/CheckoutPlanStep.style.d.ts +0 -12
- package/dist/components/checkout/steps/plan/index.d.ts +0 -1
- package/dist/components/checkout/steps/surprise/SurpriseStep.d.ts +0 -2
- package/dist/components/checkout/textOverrides.d.ts +0 -28
- package/dist/components/checkout/theme.d.ts +0 -12
- package/dist/components/hooks/useChargeSort.d.ts +0 -3
- package/dist/components/utils/priceUtils.d.ts +0 -2
- package/dist/stories/Checkout.stories.d.ts +0 -3
- package/src/assets/arrow-forward.svg +0 -3
- package/src/assets/arrow-right.svg +0 -6
- package/src/assets/close.svg +0 -3
- package/src/assets/nyancat.svg +0 -634
- package/src/assets/outlined-checked-circle.svg +0 -6
- package/src/assets/outlined-circle.svg +0 -3
- package/src/assets/payment-method.svg +0 -11
- package/src/assets/plus-icon.svg +0 -6
- package/src/assets/trash.svg +0 -8
- package/src/components/checkout/Checkout.tsx +0 -30
- package/src/components/checkout/CheckoutContainer.style.ts +0 -34
- package/src/components/checkout/CheckoutContainer.tsx +0 -88
- package/src/components/checkout/CheckoutProvider.tsx +0 -140
- package/src/components/checkout/CheckoutSummary.tsx +0 -361
- package/src/components/checkout/components/Button.tsx +0 -30
- package/src/components/checkout/components/InputField.tsx +0 -22
- package/src/components/checkout/components/index.ts +0 -2
- package/src/components/checkout/formatting.ts +0 -12
- package/src/components/checkout/hooks/index.ts +0 -8
- package/src/components/checkout/hooks/useAddonsStepModel.ts +0 -96
- package/src/components/checkout/hooks/useCheckoutModel.ts +0 -31
- package/src/components/checkout/hooks/useCouponModel.ts +0 -28
- package/src/components/checkout/hooks/useLoadCheckout.ts +0 -40
- package/src/components/checkout/hooks/usePaymentStepModel.ts +0 -49
- package/src/components/checkout/hooks/usePlanStepModel.ts +0 -170
- package/src/components/checkout/hooks/usePreviewSubscription.ts +0 -82
- package/src/components/checkout/hooks/useProgressBarModel.ts +0 -89
- package/src/components/checkout/hooks/useSubscriptionModel.ts +0 -16
- package/src/components/checkout/hooks/useSubscriptionState.ts +0 -26
- package/src/components/checkout/index.ts +0 -3
- package/src/components/checkout/planHeader/PlanHeader.style.tsx +0 -23
- package/src/components/checkout/planHeader/PlanHeader.tsx +0 -61
- package/src/components/checkout/planHeader/index.ts +0 -1
- package/src/components/checkout/progressBar/CheckoutProgressBar.style.ts +0 -29
- package/src/components/checkout/progressBar/CheckoutProgressBar.tsx +0 -48
- package/src/components/checkout/promotionCode/AddPromotionCode.tsx +0 -85
- package/src/components/checkout/promotionCode/AddPromotionCodeButton.tsx +0 -39
- package/src/components/checkout/promotionCode/AppliedPromotionCode.tsx +0 -37
- package/src/components/checkout/promotionCode/PromotionCodeSection.tsx +0 -27
- package/src/components/checkout/promotionCode/index.ts +0 -1
- package/src/components/checkout/steps/addons/CheckoutAddonsStep.style.tsx +0 -24
- package/src/components/checkout/steps/addons/CheckoutAddonsStep.tsx +0 -125
- package/src/components/checkout/steps/addons/addon.utils.ts +0 -68
- package/src/components/checkout/steps/addons/index.ts +0 -1
- package/src/components/checkout/steps/payment/PaymentMethods.style.ts +0 -26
- package/src/components/checkout/steps/payment/PaymentMethods.tsx +0 -83
- package/src/components/checkout/steps/payment/PaymentStep.tsx +0 -41
- package/src/components/checkout/steps/payment/index.ts +0 -1
- package/src/components/checkout/steps/payment/stripe/StripePaymentForm.tsx +0 -43
- package/src/components/checkout/steps/payment/stripe/index.ts +0 -3
- package/src/components/checkout/steps/payment/stripe/stripe.utils.ts +0 -109
- package/src/components/checkout/steps/payment/stripe/useStripeIntegration.ts +0 -27
- package/src/components/checkout/steps/payment/stripe/useSubmit.ts +0 -100
- package/src/components/checkout/steps/plan/BillingPeriodPicker.style.tsx +0 -46
- package/src/components/checkout/steps/plan/BillingPeriodPicker.tsx +0 -63
- package/src/components/checkout/steps/plan/CheckoutChargeList.tsx +0 -138
- package/src/components/checkout/steps/plan/CheckoutPlanStep.style.tsx +0 -6
- package/src/components/checkout/steps/plan/CheckoutPlanStep.tsx +0 -22
- package/src/components/checkout/steps/plan/index.ts +0 -1
- package/src/components/checkout/steps/surprise/SurpriseStep.tsx +0 -27
- package/src/components/checkout/textOverrides.ts +0 -58
- package/src/components/checkout/theme.ts +0 -43
- package/src/components/hooks/useChargeSort.ts +0 -17
- package/src/components/utils/priceUtils.ts +0 -10
- package/src/stories/Checkout.stories.tsx +0 -62
|
@@ -7,7 +7,8 @@ import {
|
|
|
7
7
|
} from '@stigg/js-client-sdk';
|
|
8
8
|
import { currencyPriceFormatter } from './currencyUtils';
|
|
9
9
|
import { PlanPriceText } from './getPlanPrice';
|
|
10
|
-
import { calculateTierPrice
|
|
10
|
+
import { calculateTierPrice } from '../paywall/planPriceTier';
|
|
11
|
+
import { PaywallLocalization } from '../paywall';
|
|
11
12
|
|
|
12
13
|
type GetPaidPriceTextParams = {
|
|
13
14
|
planPrices: Price[];
|
|
@@ -16,6 +17,7 @@ type GetPaidPriceTextParams = {
|
|
|
16
17
|
locale: string;
|
|
17
18
|
shouldShowMonthlyPriceAmount: boolean;
|
|
18
19
|
selectedTierByFeature: Record<string, PriceTierFragment>;
|
|
20
|
+
paywallLocale: PaywallLocalization;
|
|
19
21
|
};
|
|
20
22
|
|
|
21
23
|
export function getPaidPriceText({
|
|
@@ -25,6 +27,7 @@ export function getPaidPriceText({
|
|
|
25
27
|
locale,
|
|
26
28
|
shouldShowMonthlyPriceAmount,
|
|
27
29
|
selectedTierByFeature,
|
|
30
|
+
paywallLocale,
|
|
28
31
|
}: GetPaidPriceTextParams): PlanPriceText {
|
|
29
32
|
const { amount, currency } = paywallCalculatedPrice || planPrices[0];
|
|
30
33
|
const priceAmount = amount || 0;
|
|
@@ -35,7 +38,10 @@ export function getPaidPriceText({
|
|
|
35
38
|
|
|
36
39
|
let tiers;
|
|
37
40
|
let tierUnits;
|
|
38
|
-
|
|
41
|
+
const pricePeriod = paywallLocale.price.pricePeriod(
|
|
42
|
+
shouldShowMonthlyPriceAmount ? BillingPeriod.Monthly : BillingPeriod.Annually,
|
|
43
|
+
);
|
|
44
|
+
let unit = pricePeriod;
|
|
39
45
|
|
|
40
46
|
for (const price of planPrices) {
|
|
41
47
|
if (price.isTieredPrice) {
|
|
@@ -44,7 +50,7 @@ export function getPaidPriceText({
|
|
|
44
50
|
currentTier = selectedTierByFeature[price.feature!.featureId] || currentTier;
|
|
45
51
|
|
|
46
52
|
tiers = price.tiers;
|
|
47
|
-
tierUnits =
|
|
53
|
+
tierUnits = price.feature!.unitsPlural || '';
|
|
48
54
|
}
|
|
49
55
|
|
|
50
56
|
priceNumber += calculateTierPrice(price, currentTier, selectedBillingPeriod, shouldShowMonthlyPriceAmount);
|
|
@@ -56,7 +62,7 @@ export function getPaidPriceText({
|
|
|
56
62
|
const featureUnit = price.feature?.units || '';
|
|
57
63
|
|
|
58
64
|
if (price.pricingModel === BillingModel.PerUnit && !price.isTieredPrice) {
|
|
59
|
-
unit = shouldShowMonthlyPriceAmount ? `per ${featureUnit}
|
|
65
|
+
unit = shouldShowMonthlyPriceAmount ? `per ${featureUnit} ${pricePeriod}` : `per ${featureUnit} ${pricePeriod}`;
|
|
60
66
|
} else if (price.pricingModel === BillingModel.UsageBased) {
|
|
61
67
|
unit = `per ${featureUnit}`;
|
|
62
68
|
}
|
|
@@ -50,7 +50,7 @@ export function getPlanPrice(
|
|
|
50
50
|
|
|
51
51
|
return paywallLocale.price.paid
|
|
52
52
|
? paywallLocale.price.paid({ ...paidParams, plan })
|
|
53
|
-
: getPaidPriceText({ ...paidParams, locale, shouldShowMonthlyPriceAmount });
|
|
53
|
+
: getPaidPriceText({ ...paidParams, locale, shouldShowMonthlyPriceAmount, paywallLocale });
|
|
54
54
|
}
|
|
55
55
|
default:
|
|
56
56
|
return {
|
package/src/index.ts
CHANGED
|
@@ -29,7 +29,6 @@ export {
|
|
|
29
29
|
StiggContextValue,
|
|
30
30
|
StiggContext,
|
|
31
31
|
} from './components/StiggProvider';
|
|
32
|
-
export { Checkout, CheckoutProps, CheckoutTheme } from './components/checkout';
|
|
33
32
|
export { useWaitForCheckoutCompleted, ProvisionStatus } from './components/hooks';
|
|
34
33
|
export { HorizontalAlignment, TextAlignment } from './theme/types';
|
|
35
34
|
export { CustomizedTheme as Theme } from './theme/Theme';
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
Promotions,
|
|
12
12
|
StiggProvider,
|
|
13
13
|
SubscriptionsOverview,
|
|
14
|
-
} from '
|
|
14
|
+
} from '..';
|
|
15
15
|
import { CustomizedTheme } from '../theme/Theme';
|
|
16
16
|
import { Typography } from '../components/common/Typography';
|
|
17
17
|
import { defaultArgsWithCustomer } from './baseArgs';
|
|
@@ -33,13 +33,12 @@ export default {
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
baseUri={args.baseUri}
|
|
36
|
-
enableEdge={args.disableEdge}
|
|
37
|
-
>
|
|
36
|
+
enableEdge={args.disableEdge}>
|
|
38
37
|
<Story />
|
|
39
38
|
</StiggProvider>
|
|
40
39
|
),
|
|
41
40
|
],
|
|
42
|
-
} as ComponentMeta<typeof
|
|
41
|
+
} as ComponentMeta<typeof Paywall>;
|
|
43
42
|
|
|
44
43
|
const Wrapper = styled.div`
|
|
45
44
|
width: 1000px;
|
|
@@ -57,7 +56,8 @@ const ModularWrapper = styled.div`
|
|
|
57
56
|
}
|
|
58
57
|
`;
|
|
59
58
|
|
|
60
|
-
const Template: ComponentStory<any> = args => {
|
|
59
|
+
const Template: ComponentStory<any> = (args) => {
|
|
60
|
+
const { customerPortalTheme, productId } = args;
|
|
61
61
|
return (
|
|
62
62
|
<Wrapper>
|
|
63
63
|
<CustomerPortal
|
|
@@ -66,20 +66,20 @@ const Template: ComponentStory<any> = args => {
|
|
|
66
66
|
onManageSubscription={undefined}
|
|
67
67
|
paywallComponent={
|
|
68
68
|
<Paywall
|
|
69
|
-
productId={
|
|
69
|
+
productId={productId}
|
|
70
70
|
onPlanSelected={(...args) => {
|
|
71
71
|
console.log('onPlanSelected', args);
|
|
72
72
|
}}
|
|
73
73
|
highlightedPlanId="plan-revvenu-unity"
|
|
74
74
|
/>
|
|
75
75
|
}
|
|
76
|
-
theme={
|
|
76
|
+
theme={customerPortalTheme}
|
|
77
77
|
/>
|
|
78
78
|
</Wrapper>
|
|
79
79
|
);
|
|
80
80
|
};
|
|
81
81
|
|
|
82
|
-
const SubscriptionOverviewTemplate: ComponentStory<any> = args => {
|
|
82
|
+
const SubscriptionOverviewTemplate: ComponentStory<any> = (args) => {
|
|
83
83
|
return (
|
|
84
84
|
<CustomerPortalProvider>
|
|
85
85
|
<Wrapper>
|
|
@@ -94,7 +94,7 @@ const SubscriptionOverviewTemplate: ComponentStory<any> = args => {
|
|
|
94
94
|
);
|
|
95
95
|
};
|
|
96
96
|
|
|
97
|
-
const ModularCustomerPortalTemplate: ComponentStory<any> = args => {
|
|
97
|
+
const ModularCustomerPortalTemplate: ComponentStory<any> = (args) => {
|
|
98
98
|
return (
|
|
99
99
|
<CustomerPortalProvider>
|
|
100
100
|
<ModularWrapper>
|
|
@@ -130,7 +130,7 @@ const ModularCustomerPortalTemplate: ComponentStory<any> = args => {
|
|
|
130
130
|
);
|
|
131
131
|
};
|
|
132
132
|
|
|
133
|
-
const BillingInformationTemplate: ComponentStory<any> = args => {
|
|
133
|
+
const BillingInformationTemplate: ComponentStory<any> = (args) => {
|
|
134
134
|
return (
|
|
135
135
|
<CustomerPortalProvider>
|
|
136
136
|
<Wrapper>
|
|
@@ -140,7 +140,7 @@ const BillingInformationTemplate: ComponentStory<any> = args => {
|
|
|
140
140
|
);
|
|
141
141
|
};
|
|
142
142
|
|
|
143
|
-
const CustomerUsageDataTemplate: ComponentStory<any> = args => {
|
|
143
|
+
const CustomerUsageDataTemplate: ComponentStory<any> = (args) => {
|
|
144
144
|
return (
|
|
145
145
|
<CustomerPortalProvider>
|
|
146
146
|
<Wrapper>
|
|
@@ -150,7 +150,7 @@ const CustomerUsageDataTemplate: ComponentStory<any> = args => {
|
|
|
150
150
|
);
|
|
151
151
|
};
|
|
152
152
|
|
|
153
|
-
const SubscriptionAddonsTemplate: ComponentStory<any> = args => {
|
|
153
|
+
const SubscriptionAddonsTemplate: ComponentStory<any> = (args) => {
|
|
154
154
|
return (
|
|
155
155
|
<CustomerPortalProvider>
|
|
156
156
|
<Wrapper>
|
|
@@ -2,8 +2,7 @@ import { action } from '@storybook/addon-actions';
|
|
|
2
2
|
import { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
3
3
|
import styled from '@emotion/styled/macro';
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { Paywall } from '../components/paywall';
|
|
6
|
-
import { PaywallPlan } from '../components/paywall';
|
|
5
|
+
import { Paywall, PaywallPlan } from '../components/paywall';
|
|
7
6
|
import { StiggProvider } from '../components/StiggProvider';
|
|
8
7
|
import { CustomizedTheme } from '../theme/Theme';
|
|
9
8
|
import { defaultArgs, defaultArgsWithCustomer } from './baseArgs';
|
|
@@ -22,8 +21,7 @@ export default {
|
|
|
22
21
|
theme={args.theme}
|
|
23
22
|
locale={args.locale}
|
|
24
23
|
baseUri={args.baseUri}
|
|
25
|
-
enableEdge={!args.disableEdge}
|
|
26
|
-
>
|
|
24
|
+
enableEdge={!args.disableEdge}>
|
|
27
25
|
<Story />
|
|
28
26
|
</StiggProvider>
|
|
29
27
|
</Wrapper>
|
|
@@ -31,7 +29,7 @@ export default {
|
|
|
31
29
|
],
|
|
32
30
|
} as ComponentMeta<typeof Paywall>;
|
|
33
31
|
|
|
34
|
-
const Template: ComponentStory<any> = args => (
|
|
32
|
+
const Template: ComponentStory<any> = (args) => (
|
|
35
33
|
<Paywall
|
|
36
34
|
highlightedPlanId={args.highlightedPlanId}
|
|
37
35
|
onPlanSelected={args.onPlanSelected ? args.onPlanSelected : action('onPlanSelected')}
|
|
@@ -112,7 +110,7 @@ CustomerAsyncCTA.args = {
|
|
|
112
110
|
highlightedPlanId: 'plan-revvenu-essentials',
|
|
113
111
|
showOnlyEligiblePlans: true,
|
|
114
112
|
onPlanSelected: async () => {
|
|
115
|
-
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
113
|
+
await new Promise((resolve) => setTimeout(resolve, 1000));
|
|
116
114
|
},
|
|
117
115
|
};
|
|
118
116
|
|
package/src/stories/baseArgs.ts
CHANGED
package/src/theme/Fonts.tsx
CHANGED
package/src/theme/Theme.tsx
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
import { merge } from 'lodash';
|
|
2
1
|
import React, { PropsWithChildren } from 'react';
|
|
3
|
-
import { ThemeProvider as StyledThemeProvider } from 'styled-components';
|
|
4
2
|
import { TypographyProps } from 'styled-typography';
|
|
5
|
-
|
|
6
3
|
import { css, ThemeProvider } from '@emotion/react';
|
|
7
4
|
import styled from '@emotion/styled/macro';
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
import {
|
|
11
|
-
import { DeepPartial } from '../types';
|
|
5
|
+
import { ThemeProvider as MuiThemeProvider, createTheme } from '@mui/material/styles';
|
|
6
|
+
import { ThemeProvider as StyledThemeProvider } from 'styled-components';
|
|
7
|
+
import { merge } from 'lodash';
|
|
12
8
|
import { Fonts } from './Fonts';
|
|
13
|
-
import {
|
|
9
|
+
import { DeepPartial } from '../types';
|
|
14
10
|
import { StiggTheme } from './types';
|
|
11
|
+
import { useStiggContext } from '../components/StiggProvider';
|
|
12
|
+
import { getResolvedTheme } from './getResolvedTheme';
|
|
15
13
|
|
|
16
14
|
export type CustomizedTheme = DeepPartial<StiggTheme>;
|
|
17
15
|
|
|
@@ -49,7 +47,7 @@ function createTypographyTheme(theme: StiggTheme): Partial<TypographyProps> {
|
|
|
49
47
|
return {
|
|
50
48
|
// Hack to fix theming issues
|
|
51
49
|
// @ts-ignore
|
|
52
|
-
pxToRem: size => `${(size / htmlFontSize) * coef}rem`,
|
|
50
|
+
pxToRem: (size) => `${(size / htmlFontSize) * coef}rem`,
|
|
53
51
|
bodyFontFamily: typography.fontFamily,
|
|
54
52
|
headingFontFamily: typography.fontFamily,
|
|
55
53
|
fontSizes: [
|
|
@@ -18,7 +18,6 @@ export const getResolvedTheme = (customizedTheme?: CustomizedTheme): StiggTheme
|
|
|
18
18
|
const baseTheme: StiggTheme = {
|
|
19
19
|
palette: {
|
|
20
20
|
primary: primaryColor.hex(),
|
|
21
|
-
primaryDark: primaryColor.darken(0.3).hex(),
|
|
22
21
|
backgroundPaper: '#FFFFFF',
|
|
23
22
|
backgroundHighlight: '#F5F6F9',
|
|
24
23
|
backgroundSection: primaryColor.alpha(0.1).toString(),
|
package/src/theme/types.ts
CHANGED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { CheckoutProviderProps } from './CheckoutProvider';
|
|
3
|
-
import { CheckoutContainerProps } from './CheckoutContainer';
|
|
4
|
-
export declare type CheckoutProps = CheckoutProviderProps & CheckoutContainerProps;
|
|
5
|
-
export declare const Checkout: ({ textOverrides, theme, resourceId, planId, preferredBillingPeriod, billingCountryCode, billableFeatures, ...containerProps }: CheckoutProps) => JSX.Element;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ApplySubscription, CheckoutStatePlan } from '@stigg/js-client-sdk';
|
|
3
|
-
export declare type CheckoutResult = {
|
|
4
|
-
success: boolean;
|
|
5
|
-
errorMessage?: string;
|
|
6
|
-
};
|
|
7
|
-
export declare type OnCheckoutParams = {
|
|
8
|
-
checkoutParams: ApplySubscription;
|
|
9
|
-
checkoutAction: () => Promise<CheckoutResult>;
|
|
10
|
-
};
|
|
11
|
-
export declare type OnCheckoutCompletedParams = {
|
|
12
|
-
success: boolean;
|
|
13
|
-
error?: string;
|
|
14
|
-
};
|
|
15
|
-
export declare type CheckoutContainerProps = {
|
|
16
|
-
onCheckout?: (params: OnCheckoutParams) => Promise<CheckoutResult>;
|
|
17
|
-
onCheckoutCompleted: (params: OnCheckoutCompletedParams) => Promise<void>;
|
|
18
|
-
onChangePlan?: (params: {
|
|
19
|
-
currentPlan: CheckoutStatePlan | undefined;
|
|
20
|
-
}) => void;
|
|
21
|
-
};
|
|
22
|
-
export declare function CheckoutContainer({ onCheckout, onCheckoutCompleted, onChangePlan }: CheckoutContainerProps): JSX.Element;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
/// <reference types="@emotion/styled/macro" />
|
|
3
|
-
export declare const CheckoutLayout: import("@emotion/styled/macro").StyledComponent<{
|
|
4
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
5
|
-
as?: "symbol" | "object" | "a" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "big" | "blockquote" | "body" | "br" | "button" | "canvas" | "caption" | "cite" | "code" | "col" | "colgroup" | "data" | "datalist" | "dd" | "del" | "details" | "dfn" | "dialog" | "div" | "dl" | "dt" | "em" | "embed" | "fieldset" | "figcaption" | "figure" | "footer" | "form" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "head" | "header" | "hgroup" | "hr" | "html" | "i" | "iframe" | "img" | "input" | "ins" | "kbd" | "keygen" | "label" | "legend" | "li" | "link" | "main" | "map" | "mark" | "menu" | "menuitem" | "meta" | "meter" | "nav" | "noindex" | "noscript" | "ol" | "optgroup" | "option" | "output" | "p" | "param" | "picture" | "pre" | "progress" | "q" | "rp" | "rt" | "ruby" | "s" | "samp" | "slot" | "script" | "section" | "select" | "small" | "source" | "span" | "strong" | "style" | "sub" | "summary" | "sup" | "table" | "template" | "tbody" | "td" | "textarea" | "tfoot" | "th" | "thead" | "time" | "title" | "tr" | "track" | "u" | "ul" | "var" | "video" | "wbr" | "webview" | "svg" | "animate" | "animateMotion" | "animateTransform" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "stop" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | import("react").ComponentClass<any, any> | import("react").FunctionComponent<any> | undefined;
|
|
6
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
7
|
-
export declare const CheckoutContent: import("@emotion/styled/macro").StyledComponent<import("@mui/system").SystemProps<import("@mui/material").Theme> & {
|
|
8
|
-
children?: import("react").ReactNode;
|
|
9
|
-
component?: "symbol" | "object" | "a" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "big" | "blockquote" | "body" | "br" | "button" | "canvas" | "caption" | "cite" | "code" | "col" | "colgroup" | "data" | "datalist" | "dd" | "del" | "details" | "dfn" | "dialog" | "div" | "dl" | "dt" | "em" | "embed" | "fieldset" | "figcaption" | "figure" | "footer" | "form" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "head" | "header" | "hgroup" | "hr" | "html" | "i" | "iframe" | "img" | "input" | "ins" | "kbd" | "keygen" | "label" | "legend" | "li" | "link" | "main" | "map" | "mark" | "menu" | "menuitem" | "meta" | "meter" | "nav" | "noindex" | "noscript" | "ol" | "optgroup" | "option" | "output" | "p" | "param" | "picture" | "pre" | "progress" | "q" | "rp" | "rt" | "ruby" | "s" | "samp" | "slot" | "script" | "section" | "select" | "small" | "source" | "span" | "strong" | "style" | "sub" | "summary" | "sup" | "table" | "template" | "tbody" | "td" | "textarea" | "tfoot" | "th" | "thead" | "time" | "title" | "tr" | "track" | "u" | "ul" | "var" | "video" | "wbr" | "webview" | "svg" | "animate" | "animateMotion" | "animateTransform" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "stop" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | import("react").ComponentClass<any, any> | import("react").FunctionComponent<any> | undefined;
|
|
10
|
-
ref?: ((instance: unknown) => void) | import("react").RefObject<unknown> | null | undefined;
|
|
11
|
-
sx?: import("@mui/system").SystemCssProperties<import("@mui/material").Theme> | import("@mui/system").CSSPseudoSelectorProps<import("@mui/material").Theme> | import("@mui/system").CSSSelectorObjectOrCssVariables<import("@mui/material").Theme> | ((theme: import("@mui/material").Theme) => import("@mui/system").SystemStyleObject<import("@mui/material").Theme>) | readonly (boolean | import("@mui/system").SystemCssProperties<import("@mui/material").Theme> | import("@mui/system").CSSPseudoSelectorProps<import("@mui/material").Theme> | import("@mui/system").CSSSelectorObjectOrCssVariables<import("@mui/material").Theme> | ((theme: import("@mui/material").Theme) => import("@mui/system").SystemStyleObject<import("@mui/material").Theme>) | null)[] | null | undefined;
|
|
12
|
-
} & import("@mui/material/OverridableComponent").CommonProps & Pick<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "slot" | "style" | "title" | "color" | "translate" | "className" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & {
|
|
13
|
-
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
14
|
-
}, "slot" | "title" | "translate" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & {
|
|
15
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
16
|
-
}, {}, {}>;
|
|
17
|
-
export declare const CheckoutPanel: import("@emotion/styled/macro").StyledComponent<import("@mui/system").SystemProps<import("@mui/material").Theme> & {
|
|
18
|
-
children?: import("react").ReactNode;
|
|
19
|
-
component?: "symbol" | "object" | "a" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "big" | "blockquote" | "body" | "br" | "button" | "canvas" | "caption" | "cite" | "code" | "col" | "colgroup" | "data" | "datalist" | "dd" | "del" | "details" | "dfn" | "dialog" | "div" | "dl" | "dt" | "em" | "embed" | "fieldset" | "figcaption" | "figure" | "footer" | "form" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "head" | "header" | "hgroup" | "hr" | "html" | "i" | "iframe" | "img" | "input" | "ins" | "kbd" | "keygen" | "label" | "legend" | "li" | "link" | "main" | "map" | "mark" | "menu" | "menuitem" | "meta" | "meter" | "nav" | "noindex" | "noscript" | "ol" | "optgroup" | "option" | "output" | "p" | "param" | "picture" | "pre" | "progress" | "q" | "rp" | "rt" | "ruby" | "s" | "samp" | "slot" | "script" | "section" | "select" | "small" | "source" | "span" | "strong" | "style" | "sub" | "summary" | "sup" | "table" | "template" | "tbody" | "td" | "textarea" | "tfoot" | "th" | "thead" | "time" | "title" | "tr" | "track" | "u" | "ul" | "var" | "video" | "wbr" | "webview" | "svg" | "animate" | "animateMotion" | "animateTransform" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "stop" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | import("react").ComponentClass<any, any> | import("react").FunctionComponent<any> | undefined;
|
|
20
|
-
ref?: ((instance: unknown) => void) | import("react").RefObject<unknown> | null | undefined;
|
|
21
|
-
sx?: import("@mui/system").SystemCssProperties<import("@mui/material").Theme> | import("@mui/system").CSSPseudoSelectorProps<import("@mui/material").Theme> | import("@mui/system").CSSSelectorObjectOrCssVariables<import("@mui/material").Theme> | ((theme: import("@mui/material").Theme) => import("@mui/system").SystemStyleObject<import("@mui/material").Theme>) | readonly (boolean | import("@mui/system").SystemCssProperties<import("@mui/material").Theme> | import("@mui/system").CSSPseudoSelectorProps<import("@mui/material").Theme> | import("@mui/system").CSSSelectorObjectOrCssVariables<import("@mui/material").Theme> | ((theme: import("@mui/material").Theme) => import("@mui/system").SystemStyleObject<import("@mui/material").Theme>) | null)[] | null | undefined;
|
|
22
|
-
} & import("@mui/material/OverridableComponent").CommonProps & Pick<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "slot" | "style" | "title" | "color" | "translate" | "className" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & {
|
|
23
|
-
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
24
|
-
}, "slot" | "title" | "translate" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & {
|
|
25
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
26
|
-
}, {}, {}>;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BillableFeature, BillingPeriod, GetCheckoutStateResults } from '@stigg/js-client-sdk';
|
|
3
|
-
import { DeepPartial } from '../../types';
|
|
4
|
-
import { AddonsStepState, PaymentStepState, PlanStepState, ProgressBarState, WidgetState } from './hooks';
|
|
5
|
-
import { CheckoutLocalization } from './textOverrides';
|
|
6
|
-
import { CheckoutTheme } from './theme';
|
|
7
|
-
import { StiggTheme } from '../../theme/types';
|
|
8
|
-
export interface CheckoutContextState {
|
|
9
|
-
checkout?: GetCheckoutStateResults | null;
|
|
10
|
-
checkoutLocalization: CheckoutLocalization;
|
|
11
|
-
stiggTheme: StiggTheme;
|
|
12
|
-
theme: CheckoutTheme;
|
|
13
|
-
isLoading: boolean;
|
|
14
|
-
resourceId?: string;
|
|
15
|
-
promotionCode?: string;
|
|
16
|
-
progressBar: ProgressBarState;
|
|
17
|
-
planStep: PlanStepState;
|
|
18
|
-
addonsStep: AddonsStepState;
|
|
19
|
-
paymentStep: PaymentStepState;
|
|
20
|
-
widgetState: WidgetState;
|
|
21
|
-
}
|
|
22
|
-
export declare const CheckoutContext: React.Context<[CheckoutContextState, (updater: (state: CheckoutContextState) => void) => void] | null>;
|
|
23
|
-
export declare const useCheckoutContext: () => [CheckoutContextState, (updater: (state: CheckoutContextState) => void) => void];
|
|
24
|
-
export declare type CheckoutProviderProps = {
|
|
25
|
-
textOverrides?: DeepPartial<CheckoutLocalization>;
|
|
26
|
-
theme?: DeepPartial<CheckoutTheme>;
|
|
27
|
-
resourceId?: string;
|
|
28
|
-
planId: string;
|
|
29
|
-
preferredBillingPeriod?: BillingPeriod;
|
|
30
|
-
billingCountryCode?: string;
|
|
31
|
-
billableFeatures?: BillableFeature[];
|
|
32
|
-
};
|
|
33
|
-
export declare function CheckoutProvider({ children, textOverrides, theme, resourceId, planId, preferredBillingPeriod, billingCountryCode, billableFeatures, }: {
|
|
34
|
-
children: React.ReactNode;
|
|
35
|
-
} & CheckoutProviderProps): JSX.Element;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { Price } from '@stigg/js-client-sdk';
|
|
3
|
-
import { CheckoutContainerProps } from './CheckoutContainer';
|
|
4
|
-
export declare const getPriceString: ({ amountPerMonth, price, quantity, }: {
|
|
5
|
-
amountPerMonth: number;
|
|
6
|
-
price: Price;
|
|
7
|
-
quantity: number;
|
|
8
|
-
}) => string;
|
|
9
|
-
export declare const CheckoutSummary: ({ onCheckout, onCheckoutCompleted }: CheckoutContainerProps) => JSX.Element;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { OutlinedInputProps } from '@mui/material';
|
|
2
|
-
export declare const InputField: import("@emotion/styled").StyledComponent<(import("@mui/material").StandardTextFieldProps & {
|
|
3
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
-
} & OutlinedInputProps) | (import("@mui/material").FilledTextFieldProps & {
|
|
5
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
6
|
-
} & OutlinedInputProps) | (import("@mui/material").OutlinedTextFieldProps & {
|
|
7
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
8
|
-
} & OutlinedInputProps), {}, {}>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export * from './useAddonsStepModel';
|
|
2
|
-
export * from './useCheckoutModel';
|
|
3
|
-
export * from './useLoadCheckout';
|
|
4
|
-
export * from './usePlanStepModel';
|
|
5
|
-
export * from './useProgressBarModel';
|
|
6
|
-
export * from './useSubscriptionModel';
|
|
7
|
-
export * from './usePreviewSubscription';
|
|
8
|
-
export * from './usePaymentStepModel';
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Addon, BillingPeriod, Plan, Subscription, SubscriptionAddon } from '@stigg/js-client-sdk';
|
|
2
|
-
export declare type AddonsStepState = {
|
|
3
|
-
addons: SubscriptionAddon[];
|
|
4
|
-
initialAddons?: SubscriptionAddon[];
|
|
5
|
-
availableAddons?: Addon[];
|
|
6
|
-
};
|
|
7
|
-
declare type getAddonsStepInitialStateProps = {
|
|
8
|
-
plan?: Plan;
|
|
9
|
-
billingPeriod: BillingPeriod;
|
|
10
|
-
activeSubscription?: Subscription | null;
|
|
11
|
-
billingCountryCode?: string;
|
|
12
|
-
};
|
|
13
|
-
export declare function getAddonsStepInitialState({ activeSubscription, plan, billingPeriod, billingCountryCode, }: getAddonsStepInitialStateProps): AddonsStepState;
|
|
14
|
-
export declare function useAddonsStepModel(): {
|
|
15
|
-
setAddon: (addon: Addon, quantity: number) => void;
|
|
16
|
-
removeAddon: (addonId: string) => void;
|
|
17
|
-
addons: SubscriptionAddon[];
|
|
18
|
-
initialAddons?: SubscriptionAddon[] | undefined;
|
|
19
|
-
availableAddons?: Addon[] | undefined;
|
|
20
|
-
};
|
|
21
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare type WidgetState = {
|
|
2
|
-
isLoading?: boolean;
|
|
3
|
-
};
|
|
4
|
-
export declare function useCheckoutModel(): {
|
|
5
|
-
checkoutState: import("@stigg/js-client-sdk").GetCheckoutStateResults | null | undefined;
|
|
6
|
-
widgetState: WidgetState;
|
|
7
|
-
checkoutLocalization: import("..").CheckoutLocalization;
|
|
8
|
-
setWidgetLoading: (isLoading: boolean) => void;
|
|
9
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { GetCheckoutStateResults } from '@stigg/js-client-sdk';
|
|
2
|
-
declare type useLoadCheckoutProps = {
|
|
3
|
-
planId: string;
|
|
4
|
-
resourceId?: string;
|
|
5
|
-
billingCountryCode?: string;
|
|
6
|
-
};
|
|
7
|
-
export declare function useLoadCheckout({ planId, resourceId, billingCountryCode }: useLoadCheckoutProps): {
|
|
8
|
-
checkout: GetCheckoutStateResults | null | undefined;
|
|
9
|
-
isLoading: boolean;
|
|
10
|
-
};
|
|
11
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Customer } from '@stigg/js-client-sdk';
|
|
2
|
-
export declare type PaymentStepState = {
|
|
3
|
-
useNewPaymentMethod: boolean;
|
|
4
|
-
errorMessage?: string;
|
|
5
|
-
};
|
|
6
|
-
declare type getPaymentStepInitialStateProps = {
|
|
7
|
-
customer?: Customer;
|
|
8
|
-
};
|
|
9
|
-
export declare function getPaymentStepInitialState({ customer }: getPaymentStepInitialStateProps): PaymentStepState;
|
|
10
|
-
export declare function usePaymentStepModel(): {
|
|
11
|
-
setUseNewPaymentMethod: (useNewPaymentMethod: boolean) => void;
|
|
12
|
-
setErrorMessage: (errorMessage?: string | undefined) => void;
|
|
13
|
-
useNewPaymentMethod: boolean;
|
|
14
|
-
errorMessage?: string | undefined;
|
|
15
|
-
};
|
|
16
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { BillableFeatureInput, BillingPeriod } from '@stigg/api-client-js/src/generated/sdk';
|
|
2
|
-
import { BillableFeature, Plan, Subscription } from '@stigg/js-client-sdk';
|
|
3
|
-
export declare type PlanStepState = {
|
|
4
|
-
billingPeriod: BillingPeriod;
|
|
5
|
-
billableFeatures: BillableFeatureInput[];
|
|
6
|
-
billingCountryCode?: string;
|
|
7
|
-
};
|
|
8
|
-
declare type getPlanStepInitialStateProps = {
|
|
9
|
-
preferredBillingPeriod?: BillingPeriod;
|
|
10
|
-
plan?: Plan;
|
|
11
|
-
activeSubscription?: Subscription | null;
|
|
12
|
-
billingCountryCode?: string;
|
|
13
|
-
preconfiguredBillableFeatures: BillableFeature[];
|
|
14
|
-
};
|
|
15
|
-
export declare function getPlanStepInitialState({ preferredBillingPeriod, plan, activeSubscription, billingCountryCode, preconfiguredBillableFeatures, }: getPlanStepInitialStateProps): PlanStepState;
|
|
16
|
-
export declare function usePlanStepModel(): {
|
|
17
|
-
setBillingPeriod: (billingPeriod: BillingPeriod) => void;
|
|
18
|
-
setBillableFeature: (featureId: string, quantity: number) => void;
|
|
19
|
-
billingPeriod: BillingPeriod;
|
|
20
|
-
billableFeatures: BillableFeatureInput[];
|
|
21
|
-
billingCountryCode?: string | undefined;
|
|
22
|
-
};
|
|
23
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { SubscriptionPreview } from '@stigg/js-client-sdk';
|
|
2
|
-
export declare const usePreviewSubscriptionAction: () => {
|
|
3
|
-
previewSubscriptionAction: ({ promotionCode }?: {
|
|
4
|
-
promotionCode?: string | null | undefined;
|
|
5
|
-
}) => Promise<{
|
|
6
|
-
subscriptionPreview: SubscriptionPreview | null;
|
|
7
|
-
errorMessage: string | null;
|
|
8
|
-
}>;
|
|
9
|
-
};
|
|
10
|
-
export declare const usePreviewSubscription: () => {
|
|
11
|
-
subscriptionPreview: SubscriptionPreview | null;
|
|
12
|
-
isFetchingSubscriptionPreview: boolean;
|
|
13
|
-
};
|