@bunnyapp/components 1.6.0-beta.3 → 1.6.0-beta.5

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
@@ -52,7 +52,7 @@ var css_248z = ":root {\n --row-background: #ffffff;\n --row-background-altern
52
52
  styleInject(css_248z);
53
53
 
54
54
  // This will be replaced at build time by rollup-plugin-replace
55
- const PACKAGE_VERSION = '1.6.0-beta.2';
55
+ const PACKAGE_VERSION = '1.6.0-beta.4';
56
56
  const createRequestHeaders = (token) => {
57
57
  const headers = createClientDevHeaders({ token });
58
58
  // Add the components version header
@@ -22068,10 +22068,8 @@ const QUANTITY_CHANGE_HEADER_TITLE = 'Update quantities';
22068
22068
  const QUANTITY_CHANGE_HEADER_DESCRIPTION = 'Adjust quantities below. The change will take effect immediately after checkout has been completed.';
22069
22069
  const QuantityDrawerDesktop_SubscriptionFragment = t(`
22070
22070
  fragment QuantityDrawerDesktop_SubscriptionFragment on Subscription {
22071
- state
22072
22071
  currentCharges {
22073
22072
  chargeType
22074
- trial
22075
22073
  ...QuantityChangeGridRow_SubscriptionChargeFragment
22076
22074
  }
22077
22075
  ...QuantityChangeGridRow_SubscriptionFragment
@@ -22116,11 +22114,8 @@ const QuantityChangeDrawerDesktop = ({ editingQuote, editingQuoteData, onClose,
22116
22114
  }, children: [jsxRuntime.jsx(QuantityChangeGridTitle, { children: " " }), jsxRuntime.jsx(QuantityChangeGridTitle, { right: true, children: "CURRENT QUANTITY" }), jsxRuntime.jsx(QuantityChangeGridTitle, { right: true, children: "NEW QUANTITY" }), jsxRuntime.jsx(antd.Divider, { className: "bunny-col-span-full", style: { marginBottom: '8px', marginTop: '20px' } }), subscriptions.map((maskedSubscription, index) => {
22117
22115
  var _a;
22118
22116
  const subscription = readFragment(QuantityDrawerDesktop_SubscriptionFragment, maskedSubscription);
22119
- const isTrial = (subscription === null || subscription === void 0 ? void 0 : subscription.state) === 'TRIAL';
22120
22117
  return (jsxRuntime.jsx("div", { className: "bunny-contents", children: (_a = subscription === null || subscription === void 0 ? void 0 : subscription.currentCharges) === null || _a === void 0 ? void 0 : _a.map((charge, chargeIndex) => {
22121
- if ((isTrial && !charge.trial) ||
22122
- (!isTrial && charge.trial) ||
22123
- charge.chargeType === 'USAGE')
22118
+ if (charge.chargeType === 'USAGE')
22124
22119
  return null;
22125
22120
  return (jsxRuntime.jsx(QuantityChangeGridRow, { chargeIndex: chargeIndex, editingQuote: editingQuote, setEditingQuoteData: setEditingQuoteData, subscription: subscription, subscriptionCharge: charge, subscriptionIndex: index, setUpdatingChargeQuantityId: setUpdatingChargeQuantityId, updatingChargeQuantityId: updatingChargeQuantityId, setErrorUpdatingQuantity: setErrorUpdatingQuantity }, chargeIndex));
22126
22121
  }) }, index));
@@ -22483,6 +22478,7 @@ const QuantityDrawerContainer = ({ subscriptions, quantityDrawerOpen, setQuantit
22483
22478
  const handleDrawerClose = () => {
22484
22479
  if (updatingChargeQuantityId) {
22485
22480
  setUpdatingChargeQuantityId(undefined);
22481
+ setEditingQuoteData(undefined);
22486
22482
  }
22487
22483
  setQuantityDrawerOpen(false);
22488
22484
  };
@@ -2,10 +2,8 @@ import { Quote } from '@bunnyapp/common';
2
2
  import { FragmentOf } from 'gql.tada';
3
3
  import { EditingQuoteDataType } from '../../SubscriptionsListContainer';
4
4
  export declare const QuantityDrawerDesktop_SubscriptionFragment: import("gql.tada").TadaDocumentNode<{
5
- state: "ACTIVE" | "TRIAL" | "CANCELED" | "EXPIRED" | "TRIAL_EXPIRED" | "PENDING";
6
5
  currentCharges: {
7
6
  chargeType: "ONE_TIME" | "RECURRING" | "USAGE" | null;
8
- trial: boolean;
9
7
  [$tada.fragmentRefs]: {
10
8
  QuantityChangeGridRow_SubscriptionChargeFragment: "SubscriptionCharge";
11
9
  };
package/dist/esm/index.js CHANGED
@@ -50,7 +50,7 @@ var css_248z = ":root {\n --row-background: #ffffff;\n --row-background-altern
50
50
  styleInject(css_248z);
51
51
 
52
52
  // This will be replaced at build time by rollup-plugin-replace
53
- const PACKAGE_VERSION = '1.6.0-beta.2';
53
+ const PACKAGE_VERSION = '1.6.0-beta.4';
54
54
  const createRequestHeaders = (token) => {
55
55
  const headers = createClientDevHeaders({ token });
56
56
  // Add the components version header
@@ -22066,10 +22066,8 @@ const QUANTITY_CHANGE_HEADER_TITLE = 'Update quantities';
22066
22066
  const QUANTITY_CHANGE_HEADER_DESCRIPTION = 'Adjust quantities below. The change will take effect immediately after checkout has been completed.';
22067
22067
  const QuantityDrawerDesktop_SubscriptionFragment = t(`
22068
22068
  fragment QuantityDrawerDesktop_SubscriptionFragment on Subscription {
22069
- state
22070
22069
  currentCharges {
22071
22070
  chargeType
22072
- trial
22073
22071
  ...QuantityChangeGridRow_SubscriptionChargeFragment
22074
22072
  }
22075
22073
  ...QuantityChangeGridRow_SubscriptionFragment
@@ -22114,11 +22112,8 @@ const QuantityChangeDrawerDesktop = ({ editingQuote, editingQuoteData, onClose,
22114
22112
  }, children: [jsx(QuantityChangeGridTitle, { children: " " }), jsx(QuantityChangeGridTitle, { right: true, children: "CURRENT QUANTITY" }), jsx(QuantityChangeGridTitle, { right: true, children: "NEW QUANTITY" }), jsx(Divider, { className: "bunny-col-span-full", style: { marginBottom: '8px', marginTop: '20px' } }), subscriptions.map((maskedSubscription, index) => {
22115
22113
  var _a;
22116
22114
  const subscription = readFragment(QuantityDrawerDesktop_SubscriptionFragment, maskedSubscription);
22117
- const isTrial = (subscription === null || subscription === void 0 ? void 0 : subscription.state) === 'TRIAL';
22118
22115
  return (jsx("div", { className: "bunny-contents", children: (_a = subscription === null || subscription === void 0 ? void 0 : subscription.currentCharges) === null || _a === void 0 ? void 0 : _a.map((charge, chargeIndex) => {
22119
- if ((isTrial && !charge.trial) ||
22120
- (!isTrial && charge.trial) ||
22121
- charge.chargeType === 'USAGE')
22116
+ if (charge.chargeType === 'USAGE')
22122
22117
  return null;
22123
22118
  return (jsx(QuantityChangeGridRow, { chargeIndex: chargeIndex, editingQuote: editingQuote, setEditingQuoteData: setEditingQuoteData, subscription: subscription, subscriptionCharge: charge, subscriptionIndex: index, setUpdatingChargeQuantityId: setUpdatingChargeQuantityId, updatingChargeQuantityId: updatingChargeQuantityId, setErrorUpdatingQuantity: setErrorUpdatingQuantity }, chargeIndex));
22124
22119
  }) }, index));
@@ -22481,6 +22476,7 @@ const QuantityDrawerContainer = ({ subscriptions, quantityDrawerOpen, setQuantit
22481
22476
  const handleDrawerClose = () => {
22482
22477
  if (updatingChargeQuantityId) {
22483
22478
  setUpdatingChargeQuantityId(undefined);
22479
+ setEditingQuoteData(undefined);
22484
22480
  }
22485
22481
  setQuantityDrawerOpen(false);
22486
22482
  };
@@ -2,10 +2,8 @@ import { Quote } from '@bunnyapp/common';
2
2
  import { FragmentOf } from 'gql.tada';
3
3
  import { EditingQuoteDataType } from '../../SubscriptionsListContainer';
4
4
  export declare const QuantityDrawerDesktop_SubscriptionFragment: import("gql.tada").TadaDocumentNode<{
5
- state: "ACTIVE" | "TRIAL" | "CANCELED" | "EXPIRED" | "TRIAL_EXPIRED" | "PENDING";
6
5
  currentCharges: {
7
6
  chargeType: "ONE_TIME" | "RECURRING" | "USAGE" | null;
8
- trial: boolean;
9
7
  [$tada.fragmentRefs]: {
10
8
  QuantityChangeGridRow_SubscriptionChargeFragment: "SubscriptionCharge";
11
9
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bunnyapp/components",
3
- "version": "1.6.0-beta.3",
3
+ "version": "1.6.0-beta.5",
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",