@stigg/react-sdk 7.7.0 → 7.7.1-beta.0
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/index.d.ts +935 -2
- package/dist/react-sdk.cjs.js +716 -3504
- package/dist/react-sdk.esm.js +10959 -76807
- package/package.json +2 -13
- package/src/components/checkout/configurations/textOverrides.ts +1 -1
- package/src/components/checkout/steps/payment/stripe/useSubmit.ts +1 -1
- package/src/components/checkout/steps/payment/zuora/useZuoraIntegration.ts +2 -1
- package/src/components/checkout/steps/payment/zuora/useZuoraSubmit.ts +1 -1
- package/src/components/checkout/summary/CheckoutSummary.tsx +2 -2
- package/src/components/checkout/types.ts +6 -6
- package/src/components/credits/grants/utils.ts +1 -1
- package/dist/react-sdk.cjs.js.map +0 -1
- package/dist/react-sdk.esm.js.map +0 -1
- package/dist/react-sdk.umd.js +0 -6234
- package/dist/react-sdk.umd.js.map +0 -1
- package/dist/src/assets/lottie/checkout-success.json.d.ts +0 -3
- package/dist/src/components/StiggProvider.d.ts +0 -36
- package/dist/src/components/checkout/Checkout.d.ts +0 -5
- package/dist/src/components/checkout/CheckoutContainer.d.ts +0 -14
- package/dist/src/components/checkout/CheckoutContainer.style.d.ts +0 -15
- package/dist/src/components/checkout/CheckoutProvider.d.ts +0 -43
- package/dist/src/components/checkout/components/Button.d.ts +0 -6
- package/dist/src/components/checkout/components/ChangePlanButton.d.ts +0 -7
- package/dist/src/components/checkout/components/ContentLoadingSkeleton.d.ts +0 -2
- package/dist/src/components/checkout/components/DowngradeToFreeContainer.d.ts +0 -21
- package/dist/src/components/checkout/components/InputField.d.ts +0 -6
- package/dist/src/components/checkout/components/Skeletons.style.d.ts +0 -27
- package/dist/src/components/checkout/components/StyledArrow.d.ts +0 -4
- package/dist/src/components/checkout/components/index.d.ts +0 -3
- package/dist/src/components/checkout/configurations/steps.d.ts +0 -1
- package/dist/src/components/checkout/configurations/textOverrides.d.ts +0 -82
- package/dist/src/components/checkout/configurations/theme.d.ts +0 -14
- package/dist/src/components/checkout/configurations/typography.d.ts +0 -7
- package/dist/src/components/checkout/formatting.d.ts +0 -2
- package/dist/src/components/checkout/hooks/index.d.ts +0 -8
- package/dist/src/components/checkout/hooks/useAddonsStepModel.d.ts +0 -20
- package/dist/src/components/checkout/hooks/useCheckoutModel.d.ts +0 -14
- package/dist/src/components/checkout/hooks/useCouponModel.d.ts +0 -7
- package/dist/src/components/checkout/hooks/useLoadCheckout.d.ts +0 -14
- package/dist/src/components/checkout/hooks/usePaymentStepModel.d.ts +0 -22
- package/dist/src/components/checkout/hooks/usePlanStepModel.d.ts +0 -23
- package/dist/src/components/checkout/hooks/usePreviewSubscription.d.ts +0 -25
- package/dist/src/components/checkout/hooks/useProgressBarModel.d.ts +0 -35
- package/dist/src/components/checkout/hooks/useSubscriptionModel.d.ts +0 -6
- package/dist/src/components/checkout/hooks/useSubscriptionState.d.ts +0 -2
- package/dist/src/components/checkout/index.d.ts +0 -8
- package/dist/src/components/checkout/planHeader/PlanHeader.d.ts +0 -6
- package/dist/src/components/checkout/planHeader/index.d.ts +0 -1
- package/dist/src/components/checkout/progressBar/CheckoutProgressBar.d.ts +0 -1
- package/dist/src/components/checkout/progressBar/CheckoutProgressBar.style.d.ts +0 -17
- package/dist/src/components/checkout/promotionCode/AddPromotionCode.d.ts +0 -2
- package/dist/src/components/checkout/promotionCode/AddPromotionCodeButton.d.ts +0 -7
- package/dist/src/components/checkout/promotionCode/AppliedPromotionCode.d.ts +0 -10
- package/dist/src/components/checkout/promotionCode/PromotionCodeSection.d.ts +0 -8
- package/dist/src/components/checkout/promotionCode/index.d.ts +0 -1
- package/dist/src/components/checkout/steps/addons/CheckoutAddonsStep.d.ts +0 -4
- package/dist/src/components/checkout/steps/addons/CheckoutAddonsStep.style.d.ts +0 -18
- package/dist/src/components/checkout/steps/addons/addon.utils.d.ts +0 -15
- package/dist/src/components/checkout/steps/addons/components/AddonInputContainer.d.ts +0 -15
- package/dist/src/components/checkout/steps/addons/components/AddonTextContainer.d.ts +0 -9
- package/dist/src/components/checkout/steps/addons/index.d.ts +0 -1
- package/dist/src/components/checkout/steps/payment/PaymentMethods.d.ts +0 -19
- package/dist/src/components/checkout/steps/payment/PaymentMethods.style.d.ts +0 -27
- package/dist/src/components/checkout/steps/payment/PaymentStep.d.ts +0 -2
- package/dist/src/components/checkout/steps/payment/index.d.ts +0 -1
- package/dist/src/components/checkout/steps/payment/stripe/StripePaymentForm.d.ts +0 -2
- package/dist/src/components/checkout/steps/payment/stripe/index.d.ts +0 -3
- package/dist/src/components/checkout/steps/payment/stripe/stripe.utils.d.ts +0 -33
- package/dist/src/components/checkout/steps/payment/stripe/useStripeIntegration.d.ts +0 -5
- package/dist/src/components/checkout/steps/payment/stripe/useSubmit.d.ts +0 -15
- package/dist/src/components/checkout/steps/payment/zuora/ZuoraPaymentForm.d.ts +0 -2
- package/dist/src/components/checkout/steps/payment/zuora/index.d.ts +0 -4
- package/dist/src/components/checkout/steps/payment/zuora/useZuoraIntegration.d.ts +0 -5
- package/dist/src/components/checkout/steps/payment/zuora/useZuoraSubmit.d.ts +0 -11
- package/dist/src/components/checkout/steps/payment/zuora/zuora.utils.d.ts +0 -34
- package/dist/src/components/checkout/steps/plan/BillingPeriodPicker.d.ts +0 -8
- package/dist/src/components/checkout/steps/plan/BillingPeriodPicker.style.d.ts +0 -28
- package/dist/src/components/checkout/steps/plan/CheckoutChargeList.d.ts +0 -22
- package/dist/src/components/checkout/steps/plan/CheckoutPlanStep.d.ts +0 -2
- package/dist/src/components/checkout/steps/plan/CheckoutPlanStep.style.d.ts +0 -6
- package/dist/src/components/checkout/steps/plan/index.d.ts +0 -1
- package/dist/src/components/checkout/summary/CheckoutSuccess.d.ts +0 -5
- package/dist/src/components/checkout/summary/CheckoutSummary.d.ts +0 -15
- package/dist/src/components/checkout/summary/CheckoutSummarySkeleton.d.ts +0 -3
- package/dist/src/components/checkout/summary/components/CheckoutCaptions.d.ts +0 -11
- package/dist/src/components/checkout/summary/components/GraduatedPriceBreakdown.d.ts +0 -6
- package/dist/src/components/checkout/summary/components/LineItems.d.ts +0 -37
- package/dist/src/components/checkout/summary/components/WithSkeleton.d.ts +0 -6
- package/dist/src/components/checkout/summary/components/getPriceBreakdownString.d.ts +0 -15
- package/dist/src/components/checkout/summary/index.d.ts +0 -2
- package/dist/src/components/checkout/types.d.ts +0 -86
- package/dist/src/components/common/CollapsableSectionIcon.d.ts +0 -6
- package/dist/src/components/common/Icon.d.ts +0 -14
- package/dist/src/components/common/InformationTooltip.d.ts +0 -11
- package/dist/src/components/common/LongText.d.ts +0 -17
- package/dist/src/components/common/PoweredByStigg.d.ts +0 -12
- package/dist/src/components/common/ProgressBar.d.ts +0 -6
- package/dist/src/components/common/StatusChip.d.ts +0 -16
- package/dist/src/components/common/TiersSelectContainer.d.ts +0 -12
- package/dist/src/components/common/Typography.d.ts +0 -15
- package/dist/src/components/common/VolumeBulkSelect.d.ts +0 -5
- package/dist/src/components/common/VolumePerUnitInput.d.ts +0 -5
- package/dist/src/components/common/chart/chartjs.helpers.d.ts +0 -2
- package/dist/src/components/common/chart/chartjs.plugins.d.ts +0 -1
- package/dist/src/components/common/chart/chartjs.theme.d.ts +0 -23
- package/dist/src/components/common/chart/chartjs.tooltip.plugin.d.ts +0 -38
- package/dist/src/components/common/customIcons.d.ts +0 -24
- package/dist/src/components/common/iconColor.d.ts +0 -4
- package/dist/src/components/common/mapExternalTheme.d.ts +0 -7
- package/dist/src/components/common/mediaQuery.d.ts +0 -12
- package/dist/src/components/common/table/DataRows.d.ts +0 -9
- package/dist/src/components/common/table/EmptyState.d.ts +0 -7
- package/dist/src/components/common/table/ErrorState.d.ts +0 -7
- package/dist/src/components/common/table/GenericTable.d.ts +0 -25
- package/dist/src/components/common/table/LoadingRows.d.ts +0 -8
- package/dist/src/components/common/table/index.d.ts +0 -6
- package/dist/src/components/common/table/types.d.ts +0 -27
- package/dist/src/components/credits/balance/CreditBalance.d.ts +0 -11
- package/dist/src/components/credits/balance/CreditBalanceValue.d.ts +0 -7
- package/dist/src/components/credits/creditUsageChart/CreditUsage.chartjs.d.ts +0 -12
- package/dist/src/components/credits/creditUsageChart/CreditUsageChart.d.ts +0 -8
- package/dist/src/components/credits/creditUsageChart/CreditUsageChartEmptyState.d.ts +0 -2
- package/dist/src/components/credits/creditUsageChart/CreditUsageChartErrorState.d.ts +0 -2
- package/dist/src/components/credits/creditUsageChart/CreditUsageChartHeader.d.ts +0 -12
- package/dist/src/components/credits/creditUsageChart/CreditUsageChartTooltip.d.ts +0 -19
- package/dist/src/components/credits/creditUsageChart/CreditUsageLegend.d.ts +0 -6
- package/dist/src/components/credits/creditUsageChart/types.d.ts +0 -4
- package/dist/src/components/credits/grants/CreditGrants.d.ts +0 -6
- package/dist/src/components/credits/grants/CreditGrantsTable.d.ts +0 -10
- package/dist/src/components/credits/grants/types.d.ts +0 -21
- package/dist/src/components/credits/grants/utils.d.ts +0 -5
- package/dist/src/components/credits/hooks/useCreditBalance.d.ts +0 -32
- package/dist/src/components/credits/hooks/useCreditGrants.d.ts +0 -6
- package/dist/src/components/credits/hooks/useCreditUsage.d.ts +0 -13
- package/dist/src/components/credits/index.d.ts +0 -12
- package/dist/src/components/credits/localization.d.ts +0 -22
- package/dist/src/components/credits/utilization/CreditUtilization.d.ts +0 -12
- package/dist/src/components/credits/utilization/CreditUtilizationValue.d.ts +0 -9
- package/dist/src/components/credits/utils/creditBalanceUtils.d.ts +0 -11
- package/dist/src/components/credits/utils/creditGrantUtils.d.ts +0 -3
- package/dist/src/components/customerPortal/CustomerPortal.d.ts +0 -20
- package/dist/src/components/customerPortal/CustomerPortal.style.d.ts +0 -9
- package/dist/src/components/customerPortal/CustomerPortalContainer.d.ts +0 -6
- package/dist/src/components/customerPortal/CustomerPortalContext.d.ts +0 -16
- package/dist/src/components/customerPortal/CustomerPortalHeader.d.ts +0 -4
- package/dist/src/components/customerPortal/CustomerPortalProvider.d.ts +0 -11
- package/dist/src/components/customerPortal/billing/InformationGrid.d.ts +0 -16
- package/dist/src/components/customerPortal/billing/InvoicesSection.d.ts +0 -2
- package/dist/src/components/customerPortal/billing/PaymentDetailsSection.d.ts +0 -3
- package/dist/src/components/customerPortal/common/ExternalLinkButton.d.ts +0 -7
- package/dist/src/components/customerPortal/common/SectionContainer.d.ts +0 -8
- package/dist/src/components/customerPortal/common/SectionHeader.d.ts +0 -7
- package/dist/src/components/customerPortal/common/SectionTitle.d.ts +0 -7
- package/dist/src/components/customerPortal/common/SkeletonButton.d.ts +0 -2
- package/dist/src/components/customerPortal/common/StyledButton.d.ts +0 -6
- package/dist/src/components/customerPortal/customerPortalTextOverrides.d.ts +0 -17
- package/dist/src/components/customerPortal/customerPortalTheme.d.ts +0 -14
- package/dist/src/components/customerPortal/hooks/useCustomerPortal.d.ts +0 -11
- package/dist/src/components/customerPortal/index.d.ts +0 -16
- package/dist/src/components/customerPortal/paywall/CustomerPortalPaywall.d.ts +0 -10
- package/dist/src/components/customerPortal/paywall/CustomerPortalPaywall.style.d.ts +0 -13
- package/dist/src/components/customerPortal/subscriptionOverview/ContactCustomerSupport.d.ts +0 -8
- package/dist/src/components/customerPortal/subscriptionOverview/SubscriptionOverviewLoader.d.ts +0 -2
- package/dist/src/components/customerPortal/subscriptionOverview/SubscriptionsOverview.d.ts +0 -13
- package/dist/src/components/customerPortal/subscriptionOverview/SubscriptionsOverviewHeader.d.ts +0 -9
- package/dist/src/components/customerPortal/subscriptionOverview/charges/ChargeItem.d.ts +0 -17
- package/dist/src/components/customerPortal/subscriptionOverview/charges/ChargeList.d.ts +0 -12
- package/dist/src/components/customerPortal/subscriptionOverview/subscriptionScheduledUpdates/SubscriptionScheduledUpdateRow.d.ts +0 -8
- package/dist/src/components/customerPortal/subscriptionOverview/subscriptionScheduledUpdates/SubscriptionScheduledUpdatesAlert.d.ts +0 -9
- package/dist/src/components/customerPortal/subscriptionOverview/subscriptionView/SubscriptionView.d.ts +0 -11
- package/dist/src/components/customerPortal/subscriptionOverview/subscriptionView/SubscriptionView.style.d.ts +0 -5
- package/dist/src/components/customerPortal/subscriptionOverview/subscriptionView/TrialPanel.d.ts +0 -7
- package/dist/src/components/customerPortal/subscriptionOverview/tabs/AddonsList.d.ts +0 -2
- package/dist/src/components/customerPortal/subscriptionOverview/tabs/Promotions.d.ts +0 -2
- package/dist/src/components/customerPortal/subscriptionOverview/tabs/SubscriptionTabs.d.ts +0 -11
- package/dist/src/components/customerPortal/subscriptionOverview/tabs/SubscriptionTabs.style.d.ts +0 -24
- package/dist/src/components/customerPortal/subscriptionOverview/types/customerPortal.types.d.ts +0 -3
- package/dist/src/components/customerPortal/subscriptionOverview/upcomingBilling/NextEstimatedBill.d.ts +0 -8
- package/dist/src/components/customerPortal/subscriptionOverview/upcomingBilling/NoUpcomingBilling.d.ts +0 -6
- package/dist/src/components/customerPortal/subscriptionOverview/upcomingBilling/UpcomingBilling.d.ts +0 -10
- package/dist/src/components/customerPortal/types.d.ts +0 -13
- package/dist/src/components/customerPortal/usage/CustomerUsageData.d.ts +0 -8
- package/dist/src/components/customerPortal/usage/CustomerUsageData.style.d.ts +0 -6
- package/dist/src/components/customerPortal/usage/featureUsage/EntitlementCTAButton.d.ts +0 -14
- package/dist/src/components/customerPortal/usage/featureUsage/FeatureUsage.d.ts +0 -13
- package/dist/src/components/customerPortal/usage/featureUsage/FeatureUsage.helper.d.ts +0 -5
- package/dist/src/components/customerPortal/usage/featureUsage/FeatureUsage.style.d.ts +0 -8
- package/dist/src/components/customerPortal/usage/featureUsage/FeatureUsageProgressBar.d.ts +0 -15
- package/dist/src/components/guards/BooleanEntitlementGuard.d.ts +0 -7
- package/dist/src/components/guards/EnumEntitlementGuard.d.ts +0 -7
- package/dist/src/components/guards/MeteredEntitlementGuard.d.ts +0 -7
- package/dist/src/components/guards/NumericEntitlementGuard.d.ts +0 -7
- package/dist/src/components/hooks/index.d.ts +0 -1
- package/dist/src/components/hooks/useChargeSort.d.ts +0 -3
- package/dist/src/components/hooks/useIsScreenWiderThan.d.ts +0 -2
- package/dist/src/components/hooks/useWaitForCheckoutCompleted.d.ts +0 -14
- package/dist/src/components/paywall/BillingPeriodPicker.d.ts +0 -7
- package/dist/src/components/paywall/EntitlementRow.d.ts +0 -20
- package/dist/src/components/paywall/Paywall.d.ts +0 -23
- package/dist/src/components/paywall/PaywallContainer.d.ts +0 -20
- package/dist/src/components/paywall/PaywallLoader.d.ts +0 -2
- package/dist/src/components/paywall/PlanCompatibleAddons.d.ts +0 -13
- package/dist/src/components/paywall/PlanEntitlements.d.ts +0 -8
- package/dist/src/components/paywall/PlanOffering.d.ts +0 -27
- package/dist/src/components/paywall/PlanOfferingButton.d.ts +0 -18
- package/dist/src/components/paywall/PlanPrice.d.ts +0 -17
- package/dist/src/components/paywall/hooks/useLoadPaywallData.d.ts +0 -12
- package/dist/src/components/paywall/index.d.ts +0 -5
- package/dist/src/components/paywall/paywallTextOverrides.d.ts +0 -81
- package/dist/src/components/paywall/types.d.ts +0 -58
- package/dist/src/components/paywall/utils/calculateTrialDaysLeft.d.ts +0 -1
- package/dist/src/components/paywall/utils/calculateUnitQuantityText.d.ts +0 -1
- package/dist/src/components/paywall/utils/computeDefaultBillingPeriod.d.ts +0 -5
- package/dist/src/components/paywall/utils/getPlansToDisplay.d.ts +0 -3
- package/dist/src/components/paywall/utils/hasPricePoints.d.ts +0 -4
- package/dist/src/components/paywall/utils/mapPaywallData.d.ts +0 -14
- package/dist/src/components/utils/calculateDiscountRate.d.ts +0 -3
- package/dist/src/components/utils/currencyUtils.d.ts +0 -9
- package/dist/src/components/utils/dateUtils.d.ts +0 -10
- package/dist/src/components/utils/fixtures/price.fixtures.d.ts +0 -7
- package/dist/src/components/utils/formatNumber.d.ts +0 -1
- package/dist/src/components/utils/getFeatureName.d.ts +0 -3
- package/dist/src/components/utils/getPaidPriceText.d.ts +0 -14
- package/dist/src/components/utils/getPlanPrice.d.ts +0 -9
- package/dist/src/components/utils/getSubscriptionScheduleUpdateTexts.d.ts +0 -22
- package/dist/src/components/utils/numberUtils.d.ts +0 -4
- package/dist/src/components/utils/onWheelBlur.d.ts +0 -2
- package/dist/src/components/utils/planPrices.d.ts +0 -4
- package/dist/src/components/utils/priceTierUtils.d.ts +0 -34
- package/dist/src/components/utils/priceUtils.d.ts +0 -2
- package/dist/src/hooks/index.d.ts +0 -8
- package/dist/src/hooks/useActiveSubscriptions.d.ts +0 -6
- package/dist/src/hooks/useBooleanEntitlement.d.ts +0 -5
- package/dist/src/hooks/useCustomerPortal.d.ts +0 -6
- package/dist/src/hooks/useEnumEntitlement.d.ts +0 -6
- package/dist/src/hooks/useFetch.d.ts +0 -8
- package/dist/src/hooks/useMeteredEntitlement.d.ts +0 -6
- package/dist/src/hooks/useNumericEntitlement.d.ts +0 -6
- package/dist/src/hooks/usePaywall.d.ts +0 -6
- package/dist/src/hooks/useStiggContext.d.ts +0 -7
- package/dist/src/index.d.ts +0 -26
- package/dist/src/services/logger.d.ts +0 -12
- package/dist/src/stories/CustomTheme.d.ts +0 -2
- package/dist/src/stories/baseArgs.d.ts +0 -11
- package/dist/src/stories/mocks/checkout/consts.d.ts +0 -11
- package/dist/src/stories/mocks/checkout/mockCheckoutPreview.d.ts +0 -2
- package/dist/src/stories/mocks/checkout/mockCheckoutState.d.ts +0 -2
- package/dist/src/theme/Fonts.d.ts +0 -3
- package/dist/src/theme/Theme.d.ts +0 -10
- package/dist/src/theme/getResolvedTheme.d.ts +0 -4
- package/dist/src/theme/types.d.ts +0 -83
- package/dist/src/types.d.ts +0 -16
- package/dist/src/utils/styledUtils.d.ts +0 -2
- package/dist/stripe.esm-BkoVJ3BR.js +0 -67
- package/dist/stripe.esm-BkoVJ3BR.js.map +0 -1
- package/dist/stripe.esm-XRG9pJRV.cjs +0 -2
- package/dist/stripe.esm-XRG9pJRV.cjs.map +0 -1
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { BillingPeriod, Price, PriceTierFragment, Subscription } from '@stigg/js-client-sdk';
|
|
2
|
-
import { PaywallPlan } from '../paywall';
|
|
3
|
-
import { CurrentSubscriptionOverride, SelectDefaultTierIndexFn } from '../paywall/types';
|
|
4
|
-
export declare function getPriceFeatureUnit(price: Price): string;
|
|
5
|
-
export declare function getTierByQuantity(tiers: PriceTierFragment[], quantity: number): PriceTierFragment;
|
|
6
|
-
export declare function calculateTierPriceGraduated(tiers: PriceTierFragment[], unitQuantity: number, selectedBillingPeriod?: BillingPeriod, shouldShowMonthlyPriceAmount?: boolean): {
|
|
7
|
-
total: number;
|
|
8
|
-
breakdown: Array<{
|
|
9
|
-
unitQuantity: number;
|
|
10
|
-
amount: number;
|
|
11
|
-
}>;
|
|
12
|
-
};
|
|
13
|
-
export declare function calculateTierPrice(price: Pick<Price, 'tiers' | 'tiersMode'>, unitQuantity: number, selectedBillingPeriod?: BillingPeriod, shouldShowMonthlyPriceAmount?: boolean): number;
|
|
14
|
-
export declare function hasTierWithUnitPrice(tiers: PriceTierFragment[] | null | undefined): boolean | undefined;
|
|
15
|
-
export declare function isBulkTiers(tiers: PriceTierFragment[] | null | undefined): boolean | undefined;
|
|
16
|
-
export declare function isQuantityInFirstTier(tiers: PriceTierFragment[] | null | undefined, quantity: number): boolean | 0 | null | undefined;
|
|
17
|
-
export declare function getTiersPerUnitQuantities({ plan, billingPeriod, currentSubscription, currentSubscriptionOverride, selectDefaultTierIndex, }: {
|
|
18
|
-
plan: PaywallPlan;
|
|
19
|
-
billingPeriod: BillingPeriod;
|
|
20
|
-
currentSubscription: Subscription | null;
|
|
21
|
-
currentSubscriptionOverride?: CurrentSubscriptionOverride | null;
|
|
22
|
-
selectDefaultTierIndex?: SelectDefaultTierIndexFn;
|
|
23
|
-
}): Record<string, number>;
|
|
24
|
-
export declare enum PriceTierComparison {
|
|
25
|
-
Lower = -1,
|
|
26
|
-
Equal = 0,
|
|
27
|
-
Higher = 1
|
|
28
|
-
}
|
|
29
|
-
export declare function compareSelectedTierToCurrentTier({ perUnitQuantityByFeature, plan, currentSubscription, currentSubscriptionOverride, }: {
|
|
30
|
-
perUnitQuantityByFeature: Record<string, number>;
|
|
31
|
-
plan: PaywallPlan;
|
|
32
|
-
currentSubscription: Subscription | null;
|
|
33
|
-
currentSubscriptionOverride?: CurrentSubscriptionOverride | null;
|
|
34
|
-
}): PriceTierComparison;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export { useBooleanEntitlement } from './useBooleanEntitlement';
|
|
2
|
-
export { useNumericEntitlement } from './useNumericEntitlement';
|
|
3
|
-
export { useMeteredEntitlement } from './useMeteredEntitlement';
|
|
4
|
-
export { useEnumEntitlement } from './useEnumEntitlement';
|
|
5
|
-
export { useActiveSubscriptions } from './useActiveSubscriptions';
|
|
6
|
-
export { usePaywall } from './usePaywall';
|
|
7
|
-
export { useCustomerPortal } from './useCustomerPortal';
|
|
8
|
-
export { useStiggContext } from './useStiggContext';
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { GetActiveSubscriptions } from '@stigg/js-client-sdk';
|
|
2
|
-
export declare function useActiveSubscriptions(params?: GetActiveSubscriptions): {
|
|
3
|
-
activeSubscriptions: import('@stigg/js-client-sdk').Subscription[] | null;
|
|
4
|
-
isLoading: boolean;
|
|
5
|
-
error: Error | null;
|
|
6
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { BooleanEntitlement, GetBooleanEntitlement } from '@stigg/js-client-sdk';
|
|
2
|
-
export type TypedGetBooleanEntitlement<T> = Omit<GetBooleanEntitlement, 'featureId'> & {
|
|
3
|
-
featureId: T;
|
|
4
|
-
};
|
|
5
|
-
export declare function useBooleanEntitlement<T extends string>(params: TypedGetBooleanEntitlement<T>): BooleanEntitlement;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { GetEnumEntitlement, EnumEntitlement } from '@stigg/js-client-sdk';
|
|
2
|
-
type TypedGetEnumEntitlement<T> = Omit<GetEnumEntitlement, 'featureId'> & {
|
|
3
|
-
featureId: T;
|
|
4
|
-
};
|
|
5
|
-
export declare function useEnumEntitlement<T extends string>(params: TypedGetEnumEntitlement<T>): EnumEntitlement;
|
|
6
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { GetMeteredEntitlement, MeteredEntitlement } from '@stigg/js-client-sdk';
|
|
2
|
-
type TypedGetMeteredEntitlement<T> = Omit<GetMeteredEntitlement, 'featureId'> & {
|
|
3
|
-
featureId: T;
|
|
4
|
-
};
|
|
5
|
-
export declare function useMeteredEntitlement<T extends string>(params: TypedGetMeteredEntitlement<T>): MeteredEntitlement;
|
|
6
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { NumericEntitlement, GetNumericEntitlement } from '@stigg/js-client-sdk';
|
|
2
|
-
type TypedGetNumericEntitlement<T> = Omit<GetNumericEntitlement, 'featureId'> & {
|
|
3
|
-
featureId: T;
|
|
4
|
-
};
|
|
5
|
-
export declare function useNumericEntitlement<T extends string>(params: TypedGetNumericEntitlement<T>): NumericEntitlement;
|
|
6
|
-
export {};
|
package/dist/src/index.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export * from '@stigg/js-client-sdk';
|
|
2
|
-
export { Paywall } from './components/paywall';
|
|
3
|
-
export { SubscribeIntentionType } from './components/paywall';
|
|
4
|
-
export type { PaywallProps, OnPlanSelectedCallbackFn, CurrentSubscriptionOverride, CurrentSubscriptionOverrideFn, PaywallPlan, PaywallLocalization, PlanPriceText, CurrentPlanParams, PaywallData, SelectDefaultTierIndexFn, ShouldHidePlanFn, } from './components/paywall';
|
|
5
|
-
export { CustomerPortalProvider, CustomerPortal, AddonsList, PaymentDetailsSection, InvoicesSection, CustomerUsageData, SubscriptionsOverview, Promotions, } from './components/customerPortal';
|
|
6
|
-
export type { CustomerPortalProps, CustomerPortalSection, CustomerUsageDataProps, SubscriptionsOverviewProps, CustomerPortalIntentionType, OnBuyMoreCallbackFn, OnManageSubscriptionFn, CustomerPortalLocalization, CustomerPortalTheme, } from './components/customerPortal';
|
|
7
|
-
export { StiggProvider, StiggContext } from './components/StiggProvider';
|
|
8
|
-
export type { StiggProviderProps, StiggContextValue } from './components/StiggProvider';
|
|
9
|
-
export { Checkout } from './components/checkout';
|
|
10
|
-
export type { CheckoutProps, CheckoutProviderProps, CheckoutContainerProps, CheckoutLocalization, CheckoutResult, OnCheckoutCompletedParams, OnCheckoutParams, CheckoutTheme, CheckoutMockProps, MockCheckoutPreviewCallback, MockCheckoutStateCallback, BillingInformation, CheckoutStepKey, TaxDetailsInput, OnBeforeStepChangeCallback, OnBillableFeatureChangeCallback, OnAddonChangeCallback, CheckoutState, } from './components/checkout';
|
|
11
|
-
export { useWaitForCheckoutCompleted, ProvisionStatus } from './components/hooks';
|
|
12
|
-
export { useBooleanEntitlement, useMeteredEntitlement, useEnumEntitlement, useNumericEntitlement, useActiveSubscriptions, useCustomerPortal, useStiggContext, usePaywall, } from './hooks';
|
|
13
|
-
export type { HorizontalAlignment, TextAlignment, FontVariant, StiggTheme } from './theme/types';
|
|
14
|
-
export type { CustomizedTheme as Theme } from './theme/Theme';
|
|
15
|
-
export { BooleanEntitlementGuard } from './components/guards/BooleanEntitlementGuard';
|
|
16
|
-
export { NumericEntitlementGuard } from './components/guards/NumericEntitlementGuard';
|
|
17
|
-
export { MeteredEntitlementGuard } from './components/guards/MeteredEntitlementGuard';
|
|
18
|
-
export { EnumEntitlementGuard } from './components/guards/EnumEntitlementGuard';
|
|
19
|
-
export type { CreditBalanceProps, CreditUtilizationProps, CreditUtilizationLocalization, CreditGrantsProps, GetCreditGrantsParams, CreditGrantsLocalization, GetCreditBalanceParams, } from './components/credits';
|
|
20
|
-
export { CreditBalance, useCreditBalance, CreditUtilization, CreditGrants, useCreditGrants, CreditUsageChart, useCreditUsage, } from './components/credits';
|
|
21
|
-
export type { HeadCell, GenericTableProps, TableAlignment, PixelWidth } from './components/common/table';
|
|
22
|
-
export { GenericTable, ErrorState, EmptyState } from './components/common/table';
|
|
23
|
-
export { formatDateTime, formatDateOnly } from './components/utils/dateUtils';
|
|
24
|
-
export type { StatusChipVariant, StatusChipColors } from './theme/types';
|
|
25
|
-
export { StatusChip } from './components/common/StatusChip';
|
|
26
|
-
export { mapCreditGrantStatusToVariant } from './components/credits/grants/utils';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export interface Logger {
|
|
2
|
-
log: (message: string, object?: Record<string, string>) => void;
|
|
3
|
-
debug: (message: string, object?: Record<string, string>) => void;
|
|
4
|
-
error: (message: string, error?: Error, ...params: Record<string, string>[]) => void;
|
|
5
|
-
}
|
|
6
|
-
export declare class LoggerService implements Logger {
|
|
7
|
-
error(message: string, error?: Error, ...params: Record<string, string>[]): void;
|
|
8
|
-
log(message: string, object?: Record<string, string>): void;
|
|
9
|
-
debug(message: string, object?: Record<string, string>): void;
|
|
10
|
-
}
|
|
11
|
-
declare const _default: LoggerService;
|
|
12
|
-
export default _default;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare const BASE_FEE_MONTHLY = 200;
|
|
2
|
-
export declare const BASE_FEE_YEARLY: number;
|
|
3
|
-
export declare const TIERS: number[];
|
|
4
|
-
export declare const TIERS_PRICE_MONTHLY: number[];
|
|
5
|
-
export declare const TIERS_PRICE_YEARLY: number[];
|
|
6
|
-
export declare const PER_UNIT_PRICE_MONTHLY = 12;
|
|
7
|
-
export declare const PER_UNIT_PRICE_YEARLY: number;
|
|
8
|
-
export declare const ADDON_PRICE_MONTHLY = 50;
|
|
9
|
-
export declare const ADDON_PRICE_YEARLY: number;
|
|
10
|
-
export declare const STRIPE_MOCK_ACCOUNT_ID = "acct_1NnHoQG6EyqgvTaj";
|
|
11
|
-
export declare const STRIPE_MOCK_ACCOUNT_PK = "pk_test_51NnHoQG6EyqgvTajznajopWC01AozNtq7zgySeQ1qx4PH9TAXvMj0TnbZvYT3yOt46jbQAcCDs1EU2QKcfG8eEoO00tlW0Jp3r";
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { default as React, PropsWithChildren } from 'react';
|
|
2
|
-
import { DeepPartial } from '../types';
|
|
3
|
-
import { StiggTheme } from './types';
|
|
4
|
-
export type CustomizedTheme = DeepPartial<StiggTheme>;
|
|
5
|
-
type SdkThemeProviderProps = {
|
|
6
|
-
componentTheme?: CustomizedTheme;
|
|
7
|
-
};
|
|
8
|
-
export declare function useStiggTheme(remoteThemeOverride?: CustomizedTheme): StiggTheme;
|
|
9
|
-
export declare const SdkThemeProvider: React.FC<PropsWithChildren<SdkThemeProviderProps>>;
|
|
10
|
-
export {};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { HorizontalAlignment, StiggTheme } from './types';
|
|
2
|
-
import { CustomizedTheme } from './Theme';
|
|
3
|
-
export declare const flexLayoutMapper: (horizontalAlignment: HorizontalAlignment) => string;
|
|
4
|
-
export declare const getResolvedTheme: (customizedTheme?: CustomizedTheme) => StiggTheme;
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
export type HorizontalAlignment = 'left' | 'center' | 'right';
|
|
2
|
-
export type TextAlignment = 'left' | 'center' | 'right';
|
|
3
|
-
export type FontVariant = {
|
|
4
|
-
fontSize: string;
|
|
5
|
-
fontWeight: 'bold' | 'normal';
|
|
6
|
-
semanticElement: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'div';
|
|
7
|
-
};
|
|
8
|
-
export type StatusChipVariant = 'success' | 'warning' | 'error' | 'info' | 'neutral';
|
|
9
|
-
export type StatusChipColors = {
|
|
10
|
-
background: string;
|
|
11
|
-
text: string;
|
|
12
|
-
border: string;
|
|
13
|
-
};
|
|
14
|
-
export type StiggTheme = {
|
|
15
|
-
palette: {
|
|
16
|
-
primary: string;
|
|
17
|
-
primaryDark: string;
|
|
18
|
-
primaryLight: string;
|
|
19
|
-
backgroundPaper: string;
|
|
20
|
-
backgroundHighlight: string;
|
|
21
|
-
backgroundSection: string;
|
|
22
|
-
backgroundButton: string;
|
|
23
|
-
outlinedBorder: string;
|
|
24
|
-
outlinedRestingBorder: string;
|
|
25
|
-
outlinedHoverBackground: string;
|
|
26
|
-
switchBorder: string;
|
|
27
|
-
switchFill: string;
|
|
28
|
-
switchHandle: string;
|
|
29
|
-
warning: string;
|
|
30
|
-
error: string;
|
|
31
|
-
errorDark: string;
|
|
32
|
-
white: string;
|
|
33
|
-
success: string;
|
|
34
|
-
successDark: string;
|
|
35
|
-
text: {
|
|
36
|
-
primary: string;
|
|
37
|
-
secondary: string;
|
|
38
|
-
tertiary: string;
|
|
39
|
-
disabled: string;
|
|
40
|
-
};
|
|
41
|
-
statusChips: {
|
|
42
|
-
success: StatusChipColors;
|
|
43
|
-
warning: StatusChipColors;
|
|
44
|
-
error: StatusChipColors;
|
|
45
|
-
info: StatusChipColors;
|
|
46
|
-
neutral: StatusChipColors;
|
|
47
|
-
};
|
|
48
|
-
progress: {
|
|
49
|
-
background: string;
|
|
50
|
-
low: string;
|
|
51
|
-
medium: string;
|
|
52
|
-
high: string;
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
layout: {
|
|
56
|
-
planMinWidth: string;
|
|
57
|
-
planMaxWidth: string;
|
|
58
|
-
planMargin: string;
|
|
59
|
-
planPadding: string;
|
|
60
|
-
ctaAlignment: HorizontalAlignment;
|
|
61
|
-
headerAlignment: HorizontalAlignment;
|
|
62
|
-
descriptionAlignment: TextAlignment;
|
|
63
|
-
descriptionMinHeight: string;
|
|
64
|
-
switchBottomSpacing: string;
|
|
65
|
-
};
|
|
66
|
-
shadows: {
|
|
67
|
-
light: string;
|
|
68
|
-
popover: string;
|
|
69
|
-
};
|
|
70
|
-
border: {
|
|
71
|
-
radius: string;
|
|
72
|
-
};
|
|
73
|
-
typography: {
|
|
74
|
-
fontFamily: string;
|
|
75
|
-
fontFamilyUrl?: string;
|
|
76
|
-
h1: FontVariant;
|
|
77
|
-
h2: FontVariant;
|
|
78
|
-
h3: FontVariant;
|
|
79
|
-
body: FontVariant;
|
|
80
|
-
caption: FontVariant;
|
|
81
|
-
};
|
|
82
|
-
customCss?: string;
|
|
83
|
-
};
|
package/dist/src/types.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { BillingPeriod } from '@stigg/js-client-sdk';
|
|
2
|
-
export type DeepPartial<T> = T extends object ? {
|
|
3
|
-
[P in keyof T]?: DeepPartial<T[P]>;
|
|
4
|
-
} : T;
|
|
5
|
-
export type DowngradeChangeVariables = {
|
|
6
|
-
addonRefIds?: string;
|
|
7
|
-
billingPeriod?: BillingPeriod;
|
|
8
|
-
downgradePlanRefId: string;
|
|
9
|
-
};
|
|
10
|
-
export type BillingPeriodChangeVariables = {
|
|
11
|
-
billingPeriod?: BillingPeriod;
|
|
12
|
-
};
|
|
13
|
-
export type UnitAmountChangeVariables = {
|
|
14
|
-
newUnitAmount?: number;
|
|
15
|
-
featureId: string;
|
|
16
|
-
};
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
var u = "https://js.stripe.com/v3", s = /^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/;
|
|
2
|
-
var l = function() {
|
|
3
|
-
for (var e = document.querySelectorAll('script[src^="'.concat(u, '"]')), t = 0; t < e.length; t++) {
|
|
4
|
-
var r = e[t];
|
|
5
|
-
if (s.test(r.src))
|
|
6
|
-
return r;
|
|
7
|
-
}
|
|
8
|
-
return null;
|
|
9
|
-
}, p = function(e) {
|
|
10
|
-
var t = "", r = document.createElement("script");
|
|
11
|
-
r.src = "".concat(u).concat(t);
|
|
12
|
-
var n = document.head || document.body;
|
|
13
|
-
if (!n)
|
|
14
|
-
throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");
|
|
15
|
-
return n.appendChild(r), r;
|
|
16
|
-
}, f = function(e, t) {
|
|
17
|
-
!e || !e._registerWrapper || e._registerWrapper({
|
|
18
|
-
name: "stripe-js",
|
|
19
|
-
version: "1.54.1",
|
|
20
|
-
startTime: t
|
|
21
|
-
});
|
|
22
|
-
}, a = null, v = function(e) {
|
|
23
|
-
return a !== null || (a = new Promise(function(t, r) {
|
|
24
|
-
if (typeof window > "u" || typeof document > "u") {
|
|
25
|
-
t(null);
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
if (window.Stripe) {
|
|
29
|
-
t(window.Stripe);
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
try {
|
|
33
|
-
var n = l();
|
|
34
|
-
n && e || n || (n = p(e)), n.addEventListener("load", function() {
|
|
35
|
-
window.Stripe ? t(window.Stripe) : r(new Error("Stripe.js not available"));
|
|
36
|
-
}), n.addEventListener("error", function() {
|
|
37
|
-
r(new Error("Failed to load Stripe.js"));
|
|
38
|
-
});
|
|
39
|
-
} catch (o) {
|
|
40
|
-
r(o);
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
})), a;
|
|
44
|
-
}, S = function(e, t, r) {
|
|
45
|
-
if (e === null)
|
|
46
|
-
return null;
|
|
47
|
-
var n = e.apply(void 0, t);
|
|
48
|
-
return f(n, r), n;
|
|
49
|
-
}, c = Promise.resolve().then(function() {
|
|
50
|
-
return v(null);
|
|
51
|
-
}), d = !1;
|
|
52
|
-
c.catch(function(i) {
|
|
53
|
-
d || console.warn(i);
|
|
54
|
-
});
|
|
55
|
-
var m = function() {
|
|
56
|
-
for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
|
|
57
|
-
t[r] = arguments[r];
|
|
58
|
-
d = !0;
|
|
59
|
-
var n = Date.now();
|
|
60
|
-
return c.then(function(o) {
|
|
61
|
-
return S(o, t, n);
|
|
62
|
-
});
|
|
63
|
-
};
|
|
64
|
-
export {
|
|
65
|
-
m as loadStripe
|
|
66
|
-
};
|
|
67
|
-
//# sourceMappingURL=stripe.esm-BkoVJ3BR.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stripe.esm-BkoVJ3BR.js","sources":["../node_modules/@stripe/stripe-js/dist/stripe.esm.js"],"sourcesContent":["var V3_URL = 'https://js.stripe.com/v3';\nvar V3_URL_REGEX = /^https:\\/\\/js\\.stripe\\.com\\/v3\\/?(\\?.*)?$/;\nvar EXISTING_SCRIPT_MESSAGE = 'loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used';\nvar findScript = function findScript() {\n var scripts = document.querySelectorAll(\"script[src^=\\\"\".concat(V3_URL, \"\\\"]\"));\n\n for (var i = 0; i < scripts.length; i++) {\n var script = scripts[i];\n\n if (!V3_URL_REGEX.test(script.src)) {\n continue;\n }\n\n return script;\n }\n\n return null;\n};\n\nvar injectScript = function injectScript(params) {\n var queryString = params && !params.advancedFraudSignals ? '?advancedFraudSignals=false' : '';\n var script = document.createElement('script');\n script.src = \"\".concat(V3_URL).concat(queryString);\n var headOrBody = document.head || document.body;\n\n if (!headOrBody) {\n throw new Error('Expected document.body not to be null. Stripe.js requires a <body> element.');\n }\n\n headOrBody.appendChild(script);\n return script;\n};\n\nvar registerWrapper = function registerWrapper(stripe, startTime) {\n if (!stripe || !stripe._registerWrapper) {\n return;\n }\n\n stripe._registerWrapper({\n name: 'stripe-js',\n version: \"1.54.1\",\n startTime: startTime\n });\n};\n\nvar stripePromise = null;\nvar loadScript = function loadScript(params) {\n // Ensure that we only attempt to load Stripe.js at most once\n if (stripePromise !== null) {\n return stripePromise;\n }\n\n stripePromise = new Promise(function (resolve, reject) {\n if (typeof window === 'undefined' || typeof document === 'undefined') {\n // Resolve to null when imported server side. This makes the module\n // safe to import in an isomorphic code base.\n resolve(null);\n return;\n }\n\n if (window.Stripe && params) {\n console.warn(EXISTING_SCRIPT_MESSAGE);\n }\n\n if (window.Stripe) {\n resolve(window.Stripe);\n return;\n }\n\n try {\n var script = findScript();\n\n if (script && params) {\n console.warn(EXISTING_SCRIPT_MESSAGE);\n } else if (!script) {\n script = injectScript(params);\n }\n\n script.addEventListener('load', function () {\n if (window.Stripe) {\n resolve(window.Stripe);\n } else {\n reject(new Error('Stripe.js not available'));\n }\n });\n script.addEventListener('error', function () {\n reject(new Error('Failed to load Stripe.js'));\n });\n } catch (error) {\n reject(error);\n return;\n }\n });\n return stripePromise;\n};\nvar initStripe = function initStripe(maybeStripe, args, startTime) {\n if (maybeStripe === null) {\n return null;\n }\n\n var stripe = maybeStripe.apply(undefined, args);\n registerWrapper(stripe, startTime);\n return stripe;\n}; // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n// own script injection.\n\nvar stripePromise$1 = Promise.resolve().then(function () {\n return loadScript(null);\n});\nvar loadCalled = false;\nstripePromise$1[\"catch\"](function (err) {\n if (!loadCalled) {\n console.warn(err);\n }\n});\nvar loadStripe = function loadStripe() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n loadCalled = true;\n var startTime = Date.now();\n return stripePromise$1.then(function (maybeStripe) {\n return initStripe(maybeStripe, args, startTime);\n });\n};\n\nexport { loadStripe };\n"],"names":["V3_URL","V3_URL_REGEX","findScript","scripts","i","script","injectScript","params","queryString","headOrBody","registerWrapper","stripe","startTime","stripePromise","loadScript","resolve","reject","error","initStripe","maybeStripe","args","stripePromise$1","loadCalled","err","loadStripe","_len","_key"],"mappings":"AAAA,IAAIA,IAAS,4BACTC,IAAe;AAEnB,IAAIC,IAAa,WAAsB;AAGrC,WAFIC,IAAU,SAAS,iBAAiB,gBAAiB,OAAOH,GAAQ,IAAK,CAAC,GAErEI,IAAI,GAAGA,IAAID,EAAQ,QAAQC,KAAK;AACvC,QAAIC,IAASF,EAAQC,CAAC;AAEtB,QAAKH,EAAa,KAAKI,EAAO,GAAG;AAIjC,aAAOA;AAAA,EACT;AAEA,SAAO;AACT,GAEIC,IAAe,SAAsBC,GAAQ;AAC/C,MAAIC,IAAuF,IACvFH,IAAS,SAAS,cAAc,QAAQ;AAC5C,EAAAA,EAAO,MAAM,GAAG,OAAOL,CAAM,EAAE,OAAOQ,CAAW;AACjD,MAAIC,IAAa,SAAS,QAAQ,SAAS;AAE3C,MAAI,CAACA;AACH,UAAM,IAAI,MAAM,6EAA6E;AAG/F,SAAAA,EAAW,YAAYJ,CAAM,GACtBA;AACT,GAEIK,IAAkB,SAAyBC,GAAQC,GAAW;AAChE,EAAI,CAACD,KAAU,CAACA,EAAO,oBAIvBA,EAAO,iBAAiB;AAAA,IACtB,MAAM;AAAA,IACN,SAAS;AAAA,IACT,WAAWC;AAAA,EACf,CAAG;AACH,GAEIC,IAAgB,MAChBC,IAAa,SAAoBP,GAAQ;AAE3C,SAAIM,MAAkB,SAItBA,IAAgB,IAAI,QAAQ,SAAUE,GAASC,GAAQ;AACrD,QAAI,OAAO,SAAW,OAAe,OAAO,WAAa,KAAa;AAGpE,MAAAD,EAAQ,IAAI;AACZ;AAAA,IACF;AAMA,QAAI,OAAO,QAAQ;AACjB,MAAAA,EAAQ,OAAO,MAAM;AACrB;AAAA,IACF;AAEA,QAAI;AACF,UAAIV,IAASH,EAAU;AAEvB,MAAIG,KAAUE,KAEFF,MACVA,IAASC,EAAaC,CAAM,IAG9BF,EAAO,iBAAiB,QAAQ,WAAY;AAC1C,QAAI,OAAO,SACTU,EAAQ,OAAO,MAAM,IAErBC,EAAO,IAAI,MAAM,yBAAyB,CAAC;AAAA,MAE/C,CAAC,GACDX,EAAO,iBAAiB,SAAS,WAAY;AAC3C,QAAAW,EAAO,IAAI,MAAM,0BAA0B,CAAC;AAAA,MAC9C,CAAC;AAAA,IACH,SAASC,GAAO;AACd,MAAAD,EAAOC,CAAK;AACZ;AAAA,IACF;AAAA,EACF,CAAC,IACMJ;AACT,GACIK,IAAa,SAAoBC,GAAaC,GAAMR,GAAW;AACjE,MAAIO,MAAgB;AAClB,WAAO;AAGT,MAAIR,IAASQ,EAAY,MAAM,QAAWC,CAAI;AAC9C,SAAAV,EAAgBC,GAAQC,CAAS,GAC1BD;AACT,GAIIU,IAAkB,QAAQ,QAAO,EAAG,KAAK,WAAY;AACvD,SAAOP,EAAW,IAAI;AACxB,CAAC,GACGQ,IAAa;AACjBD,EAAgB,MAAS,SAAUE,GAAK;AACtC,EAAKD,KACH,QAAQ,KAAKC,CAAG;AAEpB,CAAC;AACE,IAACC,IAAa,WAAsB;AACrC,WAASC,IAAO,UAAU,QAAQL,IAAO,IAAI,MAAMK,CAAI,GAAGC,IAAO,GAAGA,IAAOD,GAAMC;AAC/E,IAAAN,EAAKM,CAAI,IAAI,UAAUA,CAAI;AAG7B,EAAAJ,IAAa;AACb,MAAIV,IAAY,KAAK,IAAG;AACxB,SAAOS,EAAgB,KAAK,SAAUF,GAAa;AACjD,WAAOD,EAAWC,GAAaC,GAAMR,CAAS;AAAA,EAChD,CAAC;AACH;","x_google_ignoreList":[0]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var u="https://js.stripe.com/v3",l=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/;var s=function(){for(var e=document.querySelectorAll('script[src^="'.concat(u,'"]')),t=0;t<e.length;t++){var r=e[t];if(l.test(r.src))return r}return null},p=function(e){var t="",r=document.createElement("script");r.src="".concat(u).concat(t);var n=document.head||document.body;if(!n)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return n.appendChild(r),r},f=function(e,t){!e||!e._registerWrapper||e._registerWrapper({name:"stripe-js",version:"1.54.1",startTime:t})},a=null,v=function(e){return a!==null||(a=new Promise(function(t,r){if(typeof window>"u"||typeof document>"u"){t(null);return}if(window.Stripe){t(window.Stripe);return}try{var n=s();n&&e||n||(n=p(e)),n.addEventListener("load",function(){window.Stripe?t(window.Stripe):r(new Error("Stripe.js not available"))}),n.addEventListener("error",function(){r(new Error("Failed to load Stripe.js"))})}catch(o){r(o);return}})),a},S=function(e,t,r){if(e===null)return null;var n=e.apply(void 0,t);return f(n,r),n},d=Promise.resolve().then(function(){return v(null)}),c=!1;d.catch(function(i){c||console.warn(i)});var m=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];c=!0;var n=Date.now();return d.then(function(o){return S(o,t,n)})};exports.loadStripe=m;
|
|
2
|
-
//# sourceMappingURL=stripe.esm-XRG9pJRV.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stripe.esm-XRG9pJRV.cjs","sources":["../node_modules/@stripe/stripe-js/dist/stripe.esm.js"],"sourcesContent":["var V3_URL = 'https://js.stripe.com/v3';\nvar V3_URL_REGEX = /^https:\\/\\/js\\.stripe\\.com\\/v3\\/?(\\?.*)?$/;\nvar EXISTING_SCRIPT_MESSAGE = 'loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used';\nvar findScript = function findScript() {\n var scripts = document.querySelectorAll(\"script[src^=\\\"\".concat(V3_URL, \"\\\"]\"));\n\n for (var i = 0; i < scripts.length; i++) {\n var script = scripts[i];\n\n if (!V3_URL_REGEX.test(script.src)) {\n continue;\n }\n\n return script;\n }\n\n return null;\n};\n\nvar injectScript = function injectScript(params) {\n var queryString = params && !params.advancedFraudSignals ? '?advancedFraudSignals=false' : '';\n var script = document.createElement('script');\n script.src = \"\".concat(V3_URL).concat(queryString);\n var headOrBody = document.head || document.body;\n\n if (!headOrBody) {\n throw new Error('Expected document.body not to be null. Stripe.js requires a <body> element.');\n }\n\n headOrBody.appendChild(script);\n return script;\n};\n\nvar registerWrapper = function registerWrapper(stripe, startTime) {\n if (!stripe || !stripe._registerWrapper) {\n return;\n }\n\n stripe._registerWrapper({\n name: 'stripe-js',\n version: \"1.54.1\",\n startTime: startTime\n });\n};\n\nvar stripePromise = null;\nvar loadScript = function loadScript(params) {\n // Ensure that we only attempt to load Stripe.js at most once\n if (stripePromise !== null) {\n return stripePromise;\n }\n\n stripePromise = new Promise(function (resolve, reject) {\n if (typeof window === 'undefined' || typeof document === 'undefined') {\n // Resolve to null when imported server side. This makes the module\n // safe to import in an isomorphic code base.\n resolve(null);\n return;\n }\n\n if (window.Stripe && params) {\n console.warn(EXISTING_SCRIPT_MESSAGE);\n }\n\n if (window.Stripe) {\n resolve(window.Stripe);\n return;\n }\n\n try {\n var script = findScript();\n\n if (script && params) {\n console.warn(EXISTING_SCRIPT_MESSAGE);\n } else if (!script) {\n script = injectScript(params);\n }\n\n script.addEventListener('load', function () {\n if (window.Stripe) {\n resolve(window.Stripe);\n } else {\n reject(new Error('Stripe.js not available'));\n }\n });\n script.addEventListener('error', function () {\n reject(new Error('Failed to load Stripe.js'));\n });\n } catch (error) {\n reject(error);\n return;\n }\n });\n return stripePromise;\n};\nvar initStripe = function initStripe(maybeStripe, args, startTime) {\n if (maybeStripe === null) {\n return null;\n }\n\n var stripe = maybeStripe.apply(undefined, args);\n registerWrapper(stripe, startTime);\n return stripe;\n}; // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n// own script injection.\n\nvar stripePromise$1 = Promise.resolve().then(function () {\n return loadScript(null);\n});\nvar loadCalled = false;\nstripePromise$1[\"catch\"](function (err) {\n if (!loadCalled) {\n console.warn(err);\n }\n});\nvar loadStripe = function loadStripe() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n loadCalled = true;\n var startTime = Date.now();\n return stripePromise$1.then(function (maybeStripe) {\n return initStripe(maybeStripe, args, startTime);\n });\n};\n\nexport { loadStripe };\n"],"names":["V3_URL","V3_URL_REGEX","findScript","scripts","i","script","injectScript","params","queryString","headOrBody","registerWrapper","stripe","startTime","stripePromise","loadScript","resolve","reject","error","initStripe","maybeStripe","args","stripePromise$1","loadCalled","err","loadStripe","_len","_key"],"mappings":"gFAAA,IAAIA,EAAS,2BACTC,EAAe,4CAEnB,IAAIC,EAAa,UAAsB,CAGrC,QAFIC,EAAU,SAAS,iBAAiB,gBAAiB,OAAOH,EAAQ,IAAK,CAAC,EAErEI,EAAI,EAAGA,EAAID,EAAQ,OAAQC,IAAK,CACvC,IAAIC,EAASF,EAAQC,CAAC,EAEtB,GAAKH,EAAa,KAAKI,EAAO,GAAG,EAIjC,OAAOA,CACT,CAEA,OAAO,IACT,EAEIC,EAAe,SAAsBC,EAAQ,CAC/C,IAAIC,EAAuF,GACvFH,EAAS,SAAS,cAAc,QAAQ,EAC5CA,EAAO,IAAM,GAAG,OAAOL,CAAM,EAAE,OAAOQ,CAAW,EACjD,IAAIC,EAAa,SAAS,MAAQ,SAAS,KAE3C,GAAI,CAACA,EACH,MAAM,IAAI,MAAM,6EAA6E,EAG/F,OAAAA,EAAW,YAAYJ,CAAM,EACtBA,CACT,EAEIK,EAAkB,SAAyBC,EAAQC,EAAW,CAC5D,CAACD,GAAU,CAACA,EAAO,kBAIvBA,EAAO,iBAAiB,CACtB,KAAM,YACN,QAAS,SACT,UAAWC,CACf,CAAG,CACH,EAEIC,EAAgB,KAChBC,EAAa,SAAoBP,EAAQ,CAE3C,OAAIM,IAAkB,OAItBA,EAAgB,IAAI,QAAQ,SAAUE,EAASC,EAAQ,CACrD,GAAI,OAAO,OAAW,KAAe,OAAO,SAAa,IAAa,CAGpED,EAAQ,IAAI,EACZ,MACF,CAMA,GAAI,OAAO,OAAQ,CACjBA,EAAQ,OAAO,MAAM,EACrB,MACF,CAEA,GAAI,CACF,IAAIV,EAASH,EAAU,EAEnBG,GAAUE,GAEFF,IACVA,EAASC,EAAaC,CAAM,GAG9BF,EAAO,iBAAiB,OAAQ,UAAY,CACtC,OAAO,OACTU,EAAQ,OAAO,MAAM,EAErBC,EAAO,IAAI,MAAM,yBAAyB,CAAC,CAE/C,CAAC,EACDX,EAAO,iBAAiB,QAAS,UAAY,CAC3CW,EAAO,IAAI,MAAM,0BAA0B,CAAC,CAC9C,CAAC,CACH,OAASC,EAAO,CACdD,EAAOC,CAAK,EACZ,MACF,CACF,CAAC,GACMJ,CACT,EACIK,EAAa,SAAoBC,EAAaC,EAAMR,EAAW,CACjE,GAAIO,IAAgB,KAClB,OAAO,KAGT,IAAIR,EAASQ,EAAY,MAAM,OAAWC,CAAI,EAC9C,OAAAV,EAAgBC,EAAQC,CAAS,EAC1BD,CACT,EAIIU,EAAkB,QAAQ,QAAO,EAAG,KAAK,UAAY,CACvD,OAAOP,EAAW,IAAI,CACxB,CAAC,EACGQ,EAAa,GACjBD,EAAgB,MAAS,SAAUE,EAAK,CACjCD,GACH,QAAQ,KAAKC,CAAG,CAEpB,CAAC,EACE,IAACC,EAAa,UAAsB,CACrC,QAASC,EAAO,UAAU,OAAQL,EAAO,IAAI,MAAMK,CAAI,EAAGC,EAAO,EAAGA,EAAOD,EAAMC,IAC/EN,EAAKM,CAAI,EAAI,UAAUA,CAAI,EAG7BJ,EAAa,GACb,IAAIV,EAAY,KAAK,IAAG,EACxB,OAAOS,EAAgB,KAAK,SAAUF,EAAa,CACjD,OAAOD,EAAWC,EAAaC,EAAMR,CAAS,CAChD,CAAC,CACH","x_google_ignoreList":[0]}
|