@bunnyapp/components 1.7.0-beta.35 → 1.7.0-beta.37

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
@@ -1283,7 +1283,7 @@ const DEFAULT_CONFIG = {
1283
1283
  };
1284
1284
 
1285
1285
  // This will be replaced at build time by rollup-plugin-replace
1286
- const PACKAGE_VERSION = '1.7.0-beta.34';
1286
+ const PACKAGE_VERSION = '1.7.0-beta.36';
1287
1287
  const createRequestHeaders = (token) => {
1288
1288
  const headers = createClientDevHeaders({ token });
1289
1289
  // Add the components version header
@@ -26412,8 +26412,6 @@ const BillingPeriodSelector = ({ availableBillingPeriods, onChangeBillingPeriod,
26412
26412
  return;
26413
26413
  onChangeProduct(products === null || products === void 0 ? void 0 : products.find(product => product.id === e.target.value));
26414
26414
  }, value: selectedProduct === null || selectedProduct === void 0 ? void 0 : selectedProduct.id, buttonStyle: "solid", children: jsxRuntime.jsx(antd.Space, { className: "bunny-gap-2", children: products === null || products === void 0 ? void 0 : products.map(product => (jsxRuntime.jsx(antd.Radio.Button, { value: product.id, children: product.name }, product.id))) }) }) })] })), jsxRuntime.jsx("div", { className: "bunny-flex bunny-flex-col bunny-w-full bunny-gap-2", children: jsxRuntime.jsx(StyledRadioGroup, { className: "bunny-w-full", "$isMobile": isMobile, children: jsxRuntime.jsx(antd.Radio.Group, { onChange: e => {
26415
- if (isInPreviewMode)
26416
- return;
26417
26415
  onChangeBillingPeriod(e.target.value);
26418
26416
  }, value: selectedBillingPeriod, size: "small", buttonStyle: "solid", children: availableBillingPeriods === null || availableBillingPeriods === void 0 ? void 0 : availableBillingPeriods.map((periodMonth, index) => {
26419
26417
  return (jsxRuntime.jsx(antd.Radio.Button, { value: periodMonthsConverter(periodMonth), children: periodMonthsConverter(periodMonth) }, index));
@@ -26513,7 +26511,7 @@ function doesPriceListHaveFlatFeeCharges(maskedPriceList) {
26513
26511
  function priceDescriptionString({ unitName, showPriceAsMonthly, periodMonths, priceListHasFlatFeeCharges, }) {
26514
26512
  const periodMonthsConverted = periodMonthsConverter(periodMonths);
26515
26513
  const periodLabel = periodMonthsConverted ? PERIOD_LABELS[periodMonthsConverted] : null;
26516
- return `Per ${unitName && !priceListHasFlatFeeCharges ? `${unitName.toLowerCase()} / ` : ''}${showPriceAsMonthly ? 'month' : periodLabel}`;
26514
+ return `Per ${unitName && !priceListHasFlatFeeCharges ? `${unitName} / ` : ''}${showPriceAsMonthly ? 'month' : periodLabel}`;
26517
26515
  }
26518
26516
 
26519
26517
  const { Text: Text$e } = antd.Typography;
@@ -26876,14 +26874,10 @@ const PriceListCardDesktop_PriceListFragment = t(`
26876
26874
  ]);
26877
26875
  const PriceListCardDesktop = ({ hideButton, description, disableSelectCurrentPlan, feature, isPriceListCurrentSubscription, isSelected, priceList: maskedPriceList, subscriptionPlan, trialRemainingDays, noBorder, onClickPriceListCard, }) => {
26878
26876
  var _a, _b, _c, _d;
26879
- // Context
26880
- const { isInPreviewMode } = useSubscriptionProps();
26881
26877
  // Read fragments
26882
26878
  const priceList = readFragment(PriceListCardDesktop_PriceListFragment, maskedPriceList);
26883
26879
  return (jsxRuntime.jsx(PlanPickerGridCell, { noBorder: noBorder, children: jsxRuntime.jsxs("div", { className: `bunny-flex bunny-flex-col bunny-items-start bunny-justify-between bunny-w-full bunny-rounded-md bunny-gap-4 bunny-pt-4 bunny-px-4 ${disableSelectCurrentPlan ? '' : 'cursor-pointer'} bunny-box-border`, onClick: () => {
26884
26880
  var _a, _b, _c;
26885
- if (isInPreviewMode)
26886
- return;
26887
26881
  if (!disableSelectCurrentPlan) {
26888
26882
  if (((_a = priceList.plan) === null || _a === void 0 ? void 0 : _a.pricingStyle) === t.scalar('PlanPricingStyles', 'CONTACT_US')) {
26889
26883
  window.open((_c = (_b = priceList.plan) === null || _b === void 0 ? void 0 : _b.contactUsUrl) !== null && _c !== void 0 ? _c : undefined, '_blank');
@@ -26925,12 +26919,9 @@ const PriceListCardMobile = ({ description, feature, isPriceListCurrentSubscript
26925
26919
  var _a, _b;
26926
26920
  // Context
26927
26921
  const { brandColor } = useBrand();
26928
- const { isInPreviewMode } = useSubscriptionProps();
26929
26922
  // Read fragments
26930
26923
  const priceList = readFragment(PriceListCardMobile_PriceListFragment, maskedPriceList);
26931
26924
  return (jsxRuntime.jsxs("div", { className: `bunny-relative bunny-flex bunny-flex-col bunny-border-2 bunny-border-solid bunny-rounded-lg bunny-p-4`, onClick: () => {
26932
- if (isInPreviewMode)
26933
- return;
26934
26925
  if (!disableOnClickPriceListCard)
26935
26926
  onClickPriceListCard === null || onClickPriceListCard === void 0 ? void 0 : onClickPriceListCard(priceList);
26936
26927
  }, style: {
@@ -27632,8 +27623,6 @@ function AddonPlanRow({ addonPriceList: maskedAddonPriceList, selectedPriceList,
27632
27623
  const switchDisabled = isInPreviewMode || isPurchased;
27633
27624
  const hasCustomPrice = ((_b = addonPriceList.plan) === null || _b === void 0 ? void 0 : _b.pricingDescription) != null;
27634
27625
  return (jsxRuntime.jsxs("div", { className: `bunny-flex bunny-flex-row bunny-gap-2 bunny-justify-between bunny-items-center bunny-p-4 bunny-rounded-md bunny-bg-white ${shadow ? `shadow-${shadow}` : ''} bunny-mb-2`, children: [jsxRuntime.jsxs("div", { className: "bunny-flex bunny-flex-row bunny-gap-2 bunny-items-center", children: [jsxRuntime.jsx("div", { className: `bunny-font-medium bunny-text-center bunny-text-orange-600`, children: (_c = addonPriceList.plan) === null || _c === void 0 ? void 0 : _c.name }), jsxRuntime.jsx(PriceListCardDescription, { description: (_e = (_d = addonPriceList.plan) === null || _d === void 0 ? void 0 : _d.description) !== null && _e !== void 0 ? _e : '' }), !hasCustomPrice && (jsxRuntime.jsx(PriceListCardPrice, { priceList: addonPriceList, className: "bunny-text-sm bunny-font-medium bunny-text-gray-900" })), jsxRuntime.jsx(PriceListCardPriceDescription, { feature: activeCharge === null || activeCharge === void 0 ? void 0 : activeCharge.feature, priceList: addonPriceList }), jsxRuntime.jsx(antd.Button, { type: "link", onClick: () => {
27635
- if (isInPreviewMode)
27636
- return;
27637
27626
  onClickSelect();
27638
27627
  }, children: jsxRuntime.jsx(icons.InfoCircleOutlined, {}) })] }), jsxRuntime.jsx(antd.Switch, { id: addonPlanSwitchTestId((_g = (_f = addonPriceList.plan) === null || _f === void 0 ? void 0 : _f.name) !== null && _g !== void 0 ? _g : ''), loading: isPending && !switchDisabled, checked: addedQuoteChange || isPurchased, onChange: (checked) => {
27639
27628
  if (checked) {
@@ -1,5 +1,5 @@
1
- import DeprecatedPriceList from '@/types/PriceList';
2
1
  import Feature from '@/types/Feature';
2
+ import DeprecatedPriceList from '@/types/PriceList';
3
3
  import Subscription from '@/types/Subscription';
4
4
  import { FragmentOf } from 'gql.tada';
5
5
  export declare const PriceListCardDesktop_PriceListFragment: import("gql.tada").TadaDocumentNode<{
@@ -1,7 +1,7 @@
1
- import { FragmentOf } from 'gql.tada';
2
1
  import Feature from '@/types/Feature';
3
- import Subscription from '@/types/Subscription';
4
2
  import PriceList from '@/types/PriceList';
3
+ import Subscription from '@/types/Subscription';
4
+ import { FragmentOf } from 'gql.tada';
5
5
  export declare const PriceListCardMobile_PriceListFragment: import("gql.tada").TadaDocumentNode<{
6
6
  plan: {
7
7
  name: string;
package/dist/esm/index.js CHANGED
@@ -1281,7 +1281,7 @@ const DEFAULT_CONFIG = {
1281
1281
  };
1282
1282
 
1283
1283
  // This will be replaced at build time by rollup-plugin-replace
1284
- const PACKAGE_VERSION = '1.7.0-beta.34';
1284
+ const PACKAGE_VERSION = '1.7.0-beta.36';
1285
1285
  const createRequestHeaders = (token) => {
1286
1286
  const headers = createClientDevHeaders({ token });
1287
1287
  // Add the components version header
@@ -26410,8 +26410,6 @@ const BillingPeriodSelector = ({ availableBillingPeriods, onChangeBillingPeriod,
26410
26410
  return;
26411
26411
  onChangeProduct(products === null || products === void 0 ? void 0 : products.find(product => product.id === e.target.value));
26412
26412
  }, value: selectedProduct === null || selectedProduct === void 0 ? void 0 : selectedProduct.id, buttonStyle: "solid", children: jsx(Space, { className: "bunny-gap-2", children: products === null || products === void 0 ? void 0 : products.map(product => (jsx(Radio.Button, { value: product.id, children: product.name }, product.id))) }) }) })] })), jsx("div", { className: "bunny-flex bunny-flex-col bunny-w-full bunny-gap-2", children: jsx(StyledRadioGroup, { className: "bunny-w-full", "$isMobile": isMobile, children: jsx(Radio.Group, { onChange: e => {
26413
- if (isInPreviewMode)
26414
- return;
26415
26413
  onChangeBillingPeriod(e.target.value);
26416
26414
  }, value: selectedBillingPeriod, size: "small", buttonStyle: "solid", children: availableBillingPeriods === null || availableBillingPeriods === void 0 ? void 0 : availableBillingPeriods.map((periodMonth, index) => {
26417
26415
  return (jsx(Radio.Button, { value: periodMonthsConverter(periodMonth), children: periodMonthsConverter(periodMonth) }, index));
@@ -26511,7 +26509,7 @@ function doesPriceListHaveFlatFeeCharges(maskedPriceList) {
26511
26509
  function priceDescriptionString({ unitName, showPriceAsMonthly, periodMonths, priceListHasFlatFeeCharges, }) {
26512
26510
  const periodMonthsConverted = periodMonthsConverter(periodMonths);
26513
26511
  const periodLabel = periodMonthsConverted ? PERIOD_LABELS[periodMonthsConverted] : null;
26514
- return `Per ${unitName && !priceListHasFlatFeeCharges ? `${unitName.toLowerCase()} / ` : ''}${showPriceAsMonthly ? 'month' : periodLabel}`;
26512
+ return `Per ${unitName && !priceListHasFlatFeeCharges ? `${unitName} / ` : ''}${showPriceAsMonthly ? 'month' : periodLabel}`;
26515
26513
  }
26516
26514
 
26517
26515
  const { Text: Text$e } = Typography;
@@ -26874,14 +26872,10 @@ const PriceListCardDesktop_PriceListFragment = t(`
26874
26872
  ]);
26875
26873
  const PriceListCardDesktop = ({ hideButton, description, disableSelectCurrentPlan, feature, isPriceListCurrentSubscription, isSelected, priceList: maskedPriceList, subscriptionPlan, trialRemainingDays, noBorder, onClickPriceListCard, }) => {
26876
26874
  var _a, _b, _c, _d;
26877
- // Context
26878
- const { isInPreviewMode } = useSubscriptionProps();
26879
26875
  // Read fragments
26880
26876
  const priceList = readFragment(PriceListCardDesktop_PriceListFragment, maskedPriceList);
26881
26877
  return (jsx(PlanPickerGridCell, { noBorder: noBorder, children: jsxs("div", { className: `bunny-flex bunny-flex-col bunny-items-start bunny-justify-between bunny-w-full bunny-rounded-md bunny-gap-4 bunny-pt-4 bunny-px-4 ${disableSelectCurrentPlan ? '' : 'cursor-pointer'} bunny-box-border`, onClick: () => {
26882
26878
  var _a, _b, _c;
26883
- if (isInPreviewMode)
26884
- return;
26885
26879
  if (!disableSelectCurrentPlan) {
26886
26880
  if (((_a = priceList.plan) === null || _a === void 0 ? void 0 : _a.pricingStyle) === t.scalar('PlanPricingStyles', 'CONTACT_US')) {
26887
26881
  window.open((_c = (_b = priceList.plan) === null || _b === void 0 ? void 0 : _b.contactUsUrl) !== null && _c !== void 0 ? _c : undefined, '_blank');
@@ -26923,12 +26917,9 @@ const PriceListCardMobile = ({ description, feature, isPriceListCurrentSubscript
26923
26917
  var _a, _b;
26924
26918
  // Context
26925
26919
  const { brandColor } = useBrand();
26926
- const { isInPreviewMode } = useSubscriptionProps();
26927
26920
  // Read fragments
26928
26921
  const priceList = readFragment(PriceListCardMobile_PriceListFragment, maskedPriceList);
26929
26922
  return (jsxs("div", { className: `bunny-relative bunny-flex bunny-flex-col bunny-border-2 bunny-border-solid bunny-rounded-lg bunny-p-4`, onClick: () => {
26930
- if (isInPreviewMode)
26931
- return;
26932
26923
  if (!disableOnClickPriceListCard)
26933
26924
  onClickPriceListCard === null || onClickPriceListCard === void 0 ? void 0 : onClickPriceListCard(priceList);
26934
26925
  }, style: {
@@ -27630,8 +27621,6 @@ function AddonPlanRow({ addonPriceList: maskedAddonPriceList, selectedPriceList,
27630
27621
  const switchDisabled = isInPreviewMode || isPurchased;
27631
27622
  const hasCustomPrice = ((_b = addonPriceList.plan) === null || _b === void 0 ? void 0 : _b.pricingDescription) != null;
27632
27623
  return (jsxs("div", { className: `bunny-flex bunny-flex-row bunny-gap-2 bunny-justify-between bunny-items-center bunny-p-4 bunny-rounded-md bunny-bg-white ${shadow ? `shadow-${shadow}` : ''} bunny-mb-2`, children: [jsxs("div", { className: "bunny-flex bunny-flex-row bunny-gap-2 bunny-items-center", children: [jsx("div", { className: `bunny-font-medium bunny-text-center bunny-text-orange-600`, children: (_c = addonPriceList.plan) === null || _c === void 0 ? void 0 : _c.name }), jsx(PriceListCardDescription, { description: (_e = (_d = addonPriceList.plan) === null || _d === void 0 ? void 0 : _d.description) !== null && _e !== void 0 ? _e : '' }), !hasCustomPrice && (jsx(PriceListCardPrice, { priceList: addonPriceList, className: "bunny-text-sm bunny-font-medium bunny-text-gray-900" })), jsx(PriceListCardPriceDescription, { feature: activeCharge === null || activeCharge === void 0 ? void 0 : activeCharge.feature, priceList: addonPriceList }), jsx(Button, { type: "link", onClick: () => {
27633
- if (isInPreviewMode)
27634
- return;
27635
27624
  onClickSelect();
27636
27625
  }, children: jsx(InfoCircleOutlined, {}) })] }), jsx(Switch, { id: addonPlanSwitchTestId((_g = (_f = addonPriceList.plan) === null || _f === void 0 ? void 0 : _f.name) !== null && _g !== void 0 ? _g : ''), loading: isPending && !switchDisabled, checked: addedQuoteChange || isPurchased, onChange: (checked) => {
27637
27626
  if (checked) {
@@ -1,5 +1,5 @@
1
- import DeprecatedPriceList from '@/types/PriceList';
2
1
  import Feature from '@/types/Feature';
2
+ import DeprecatedPriceList from '@/types/PriceList';
3
3
  import Subscription from '@/types/Subscription';
4
4
  import { FragmentOf } from 'gql.tada';
5
5
  export declare const PriceListCardDesktop_PriceListFragment: import("gql.tada").TadaDocumentNode<{
@@ -1,7 +1,7 @@
1
- import { FragmentOf } from 'gql.tada';
2
1
  import Feature from '@/types/Feature';
3
- import Subscription from '@/types/Subscription';
4
2
  import PriceList from '@/types/PriceList';
3
+ import Subscription from '@/types/Subscription';
4
+ import { FragmentOf } from 'gql.tada';
5
5
  export declare const PriceListCardMobile_PriceListFragment: import("gql.tada").TadaDocumentNode<{
6
6
  plan: {
7
7
  name: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bunnyapp/components",
3
- "version": "1.7.0-beta.35",
3
+ "version": "1.7.0-beta.37",
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",