@stigg/react-sdk 5.24.0 → 5.25.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.
@@ -7,6 +7,7 @@ export declare type UsageBasedChargeProps = {
7
7
  entitlement: Exclude<CustomerPortalEntitlement, 'feature'>;
8
8
  feature: FeatureFragment;
9
9
  amount: number;
10
+ blockSize?: number | null;
10
11
  currency: Currency;
11
12
  onBuyMore?: OnBuyMoreCallbackFn;
12
13
  onManageSubscription: OnManageClick;
@@ -14,4 +15,4 @@ export declare type UsageBasedChargeProps = {
14
15
  hasCustomSubscription: boolean;
15
16
  hideChargePrice?: boolean;
16
17
  };
17
- export declare function ChargeItem({ amount, currency, entitlement, feature, hideChargePrice, onBuyMore, onManageSubscription, canUpgradeSubscription, hasCustomSubscription, }: UsageBasedChargeProps): JSX.Element;
18
+ export declare function ChargeItem({ amount, currency, blockSize, entitlement, feature, hideChargePrice, onBuyMore, onManageSubscription, canUpgradeSubscription, hasCustomSubscription, }: UsageBasedChargeProps): JSX.Element;
@@ -3103,7 +3103,7 @@ var LoggerService = /*#__PURE__*/function () {
3103
3103
 
3104
3104
  var logger = /*#__PURE__*/new LoggerService();
3105
3105
 
3106
- var version = "5.24.0";
3106
+ var version = "5.25.0";
3107
3107
  var name = "@stigg/react-sdk";
3108
3108
 
3109
3109
  var StiggContext = /*#__PURE__*/React__default.createContext(null);
@@ -5877,6 +5877,7 @@ function ChargeItem(_ref) {
5877
5877
 
5878
5878
  var amount = _ref.amount,
5879
5879
  currency = _ref.currency,
5880
+ blockSize = _ref.blockSize,
5880
5881
  entitlement = _ref.entitlement,
5881
5882
  feature = _ref.feature,
5882
5883
  hideChargePrice = _ref.hideChargePrice,
@@ -5911,7 +5912,7 @@ function ChargeItem(_ref) {
5911
5912
  }, currencyPriceFormatter({
5912
5913
  amount: amount,
5913
5914
  currency: currency
5914
- }), " per ", feature.featureUnits)), React__default.createElement("div", {
5915
+ }), " per ", blockSize ? blockSize + " " : '', blockSize ? feature.featureUnitsPlural : feature.featureUnits)), React__default.createElement("div", {
5915
5916
  style: {
5916
5917
  display: 'flex',
5917
5918
  gap: 12
@@ -5964,6 +5965,7 @@ function ChargeList(_ref) {
5964
5965
  }, filteredSubscriptionPrices.map(function (_ref3) {
5965
5966
  var feature = _ref3.feature,
5966
5967
  price = _ref3.price,
5968
+ blockSize = _ref3.blockSize,
5967
5969
  billingModel = _ref3.billingModel;
5968
5970
 
5969
5971
  if (!feature || !price) {
@@ -5981,6 +5983,7 @@ function ChargeList(_ref) {
5981
5983
  entitlement: entitlement,
5982
5984
  feature: entitlement.feature,
5983
5985
  amount: price.amount,
5986
+ blockSize: blockSize,
5984
5987
  currency: price.currency,
5985
5988
  hideChargePrice: billingModel === Stigg.BillingModel.PerUnit,
5986
5989
  onBuyMore: onBuyMore,