@stigg/react-sdk 4.8.0 → 4.9.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.
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { BillingPeriod, Customer, Subscription } from '@stigg/js-client-sdk';
3
- import { OnPlanSelectedCallbackFn, PaywallPlan } from './types';
3
+ import { ShouldHidePlanFn, OnPlanSelectedCallbackFn, PaywallPlan } from './types';
4
4
  import { PaywallLocalization } from './paywallTextOverrides';
5
5
  declare type PaywallProps = {
6
6
  plans: PaywallPlan[];
@@ -14,6 +14,7 @@ declare type PaywallProps = {
14
14
  onPlanSelected: OnPlanSelectedCallbackFn;
15
15
  paywallLocale: PaywallLocalization;
16
16
  locale: string;
17
+ shouldHidePlan?: ShouldHidePlanFn;
17
18
  };
18
- export declare const Paywall: ({ plans, customer, currentSubscription, highlightedPlanId, selectedBillingPeriod, onBillingPeriodChanged, availableBillingPeriods, isCustomerOnTrial, onPlanSelected, paywallLocale, locale, }: PaywallProps) => JSX.Element;
19
+ export declare const Paywall: ({ plans, customer, currentSubscription, highlightedPlanId, selectedBillingPeriod, onBillingPeriodChanged, availableBillingPeriods, isCustomerOnTrial, onPlanSelected, paywallLocale, locale, shouldHidePlan, }: PaywallProps) => JSX.Element;
19
20
  export {};
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { BillingPeriod } from '@stigg/js-client-sdk';
3
- import { OnPlanSelectedCallbackFn } from './types';
3
+ import { ShouldHidePlanFn, OnPlanSelectedCallbackFn } from './types';
4
4
  import { PaywallLocalization } from './paywallTextOverrides';
5
5
  import { DeepPartial } from '../../types';
6
6
  export declare type PaywallContainerProps = {
@@ -13,5 +13,6 @@ export declare type PaywallContainerProps = {
13
13
  onBillingPeriodChange?: (billingPeriod: BillingPeriod) => void;
14
14
  textOverrides?: DeepPartial<PaywallLocalization>;
15
15
  billingCountryCode?: string;
16
+ shouldHidePlan?: ShouldHidePlanFn;
16
17
  };
17
- export declare const PaywallContainer: ({ productId, resourceId, highlightedPlanId, showOnlyEligiblePlans, textOverrides, onPlanSelected, preferredBillingPeriod, onBillingPeriodChange, billingCountryCode, }: PaywallContainerProps) => JSX.Element;
18
+ export declare const PaywallContainer: ({ productId, resourceId, highlightedPlanId, showOnlyEligiblePlans, textOverrides, onPlanSelected, preferredBillingPeriod, onBillingPeriodChange, billingCountryCode, shouldHidePlan, }: PaywallContainerProps) => JSX.Element;
@@ -41,3 +41,6 @@ export declare type OnPlanSelectedCallbackFn = ({ plan, customer, subscription,
41
41
  selectedBillingPeriod: BillingPeriod;
42
42
  billableFeatures?: BillableFeature[];
43
43
  }) => void | Promise<void>;
44
+ export declare type ShouldHidePlanFn = ({ plan }: {
45
+ plan: PaywallPlan;
46
+ }) => boolean | Promise<boolean>;
@@ -1,3 +1,3 @@
1
1
  import { BillingPeriod } from '@stigg/js-client-sdk';
2
- import { PaywallPlan } from '../types';
3
- export declare function getPlansToDisplay(plans: PaywallPlan[], selectedBillingPeriod: BillingPeriod): PaywallPlan[];
2
+ import { ShouldHidePlanFn, PaywallPlan } from '../types';
3
+ export declare function getPlansToDisplay(plans: PaywallPlan[], selectedBillingPeriod: BillingPeriod, shouldHidePlan?: ShouldHidePlanFn): PaywallPlan[];