@bunnyapp/components 1.8.0-beta.27 → 1.8.0-beta.28

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/cjs/index.js CHANGED
@@ -1299,7 +1299,7 @@ const DEFAULT_CONFIG = {
1299
1299
  };
1300
1300
 
1301
1301
  // This will be replaced at build time by rollup-plugin-replace
1302
- const PACKAGE_VERSION = '1.8.0-beta.26';
1302
+ const PACKAGE_VERSION = '1.8.0-beta.27';
1303
1303
  const createRequestHeaders = (token) => {
1304
1304
  const headers = createClientDevHeaders({ token });
1305
1305
  // Add the components version header
@@ -26762,14 +26762,14 @@ const priceListHasPriceTiers = (maskedPriceList) => {
26762
26762
  };
26763
26763
 
26764
26764
  const priceListChargePriceDescription_PriceListChargeFragment = t(`
26765
- fragment priceListChargePriceDescription_PriceListChargeFragment on PriceListCharge {
26766
- showPriceAsMonthly
26767
- billingPeriod
26768
- feature {
26769
- unitName
26770
- }
26765
+ fragment priceListChargePriceDescription_PriceListChargeFragment on PriceListCharge {
26766
+ showPriceAsMonthly
26767
+ billingPeriod
26768
+ feature {
26769
+ unitName
26771
26770
  }
26772
- `);
26771
+ }
26772
+ `);
26773
26773
  function priceListChargePriceDescription(maskedPriceListCharge) {
26774
26774
  var _a;
26775
26775
  // Read fragments
@@ -26777,6 +26777,8 @@ function priceListChargePriceDescription(maskedPriceListCharge) {
26777
26777
  const billingPeriod = priceListCharge.billingPeriod;
26778
26778
  const periodLabel = billingPeriod ? PERIOD_LABELS[billingPeriod] : null;
26779
26779
  const unitName = (_a = priceListCharge.feature) === null || _a === void 0 ? void 0 : _a.unitName;
26780
+ if (billingPeriod === 'ONCE')
26781
+ return 'One-time';
26780
26782
  return `Per ${unitName ? `${unitName} / ` : ''}${priceListCharge.showPriceAsMonthly ? 'month' : periodLabel}`;
26781
26783
  }
26782
26784
 
@@ -26827,6 +26829,8 @@ function priceDescriptionString(maskedPriceList) {
26827
26829
  const periodMonthsConverted = periodMonthsConverter(priceList.periodMonths);
26828
26830
  const periodLabel = periodMonthsConverted ? PERIOD_LABELS[periodMonthsConverted] : null;
26829
26831
  const unitName = getPriceListUnitName(priceList);
26832
+ if (priceList.periodMonths === 0)
26833
+ return 'One-time';
26830
26834
  return `Per ${unitName ? `${unitName} / ` : ''}${priceList.showPriceAsMonthly ? 'month' : periodLabel}`;
26831
26835
  }
26832
26836
 
package/dist/esm/index.js CHANGED
@@ -1297,7 +1297,7 @@ const DEFAULT_CONFIG = {
1297
1297
  };
1298
1298
 
1299
1299
  // This will be replaced at build time by rollup-plugin-replace
1300
- const PACKAGE_VERSION = '1.8.0-beta.26';
1300
+ const PACKAGE_VERSION = '1.8.0-beta.27';
1301
1301
  const createRequestHeaders = (token) => {
1302
1302
  const headers = createClientDevHeaders({ token });
1303
1303
  // Add the components version header
@@ -26760,14 +26760,14 @@ const priceListHasPriceTiers = (maskedPriceList) => {
26760
26760
  };
26761
26761
 
26762
26762
  const priceListChargePriceDescription_PriceListChargeFragment = t(`
26763
- fragment priceListChargePriceDescription_PriceListChargeFragment on PriceListCharge {
26764
- showPriceAsMonthly
26765
- billingPeriod
26766
- feature {
26767
- unitName
26768
- }
26763
+ fragment priceListChargePriceDescription_PriceListChargeFragment on PriceListCharge {
26764
+ showPriceAsMonthly
26765
+ billingPeriod
26766
+ feature {
26767
+ unitName
26769
26768
  }
26770
- `);
26769
+ }
26770
+ `);
26771
26771
  function priceListChargePriceDescription(maskedPriceListCharge) {
26772
26772
  var _a;
26773
26773
  // Read fragments
@@ -26775,6 +26775,8 @@ function priceListChargePriceDescription(maskedPriceListCharge) {
26775
26775
  const billingPeriod = priceListCharge.billingPeriod;
26776
26776
  const periodLabel = billingPeriod ? PERIOD_LABELS[billingPeriod] : null;
26777
26777
  const unitName = (_a = priceListCharge.feature) === null || _a === void 0 ? void 0 : _a.unitName;
26778
+ if (billingPeriod === 'ONCE')
26779
+ return 'One-time';
26778
26780
  return `Per ${unitName ? `${unitName} / ` : ''}${priceListCharge.showPriceAsMonthly ? 'month' : periodLabel}`;
26779
26781
  }
26780
26782
 
@@ -26825,6 +26827,8 @@ function priceDescriptionString(maskedPriceList) {
26825
26827
  const periodMonthsConverted = periodMonthsConverter(priceList.periodMonths);
26826
26828
  const periodLabel = periodMonthsConverted ? PERIOD_LABELS[periodMonthsConverted] : null;
26827
26829
  const unitName = getPriceListUnitName(priceList);
26830
+ if (priceList.periodMonths === 0)
26831
+ return 'One-time';
26828
26832
  return `Per ${unitName ? `${unitName} / ` : ''}${priceList.showPriceAsMonthly ? 'month' : periodLabel}`;
26829
26833
  }
26830
26834
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bunnyapp/components",
3
- "version": "1.8.0-beta.27",
3
+ "version": "1.8.0-beta.28",
4
4
  "description": "Components from the Bunny portal to embed Bunny UI functionality into your application.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",