@bunnyapp/components 1.0.76-beta.6 → 1.0.76-beta.7

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
@@ -154,7 +154,7 @@ var BrandContext = react.createContext({
154
154
  });
155
155
 
156
156
  // This will be replaced at build time by rollup-plugin-replace
157
- var PACKAGE_VERSION = '1.0.76-beta.6';
157
+ var PACKAGE_VERSION = '1.0.76-beta.7';
158
158
  var createRequestHeaders = function (token) {
159
159
  var headers = common.createClientDevHeaders(token);
160
160
  // Add the components version header
@@ -23057,17 +23057,17 @@ var QuantityInput = function (_a) {
23057
23057
  var createCharge = reactQuery.useMutation({
23058
23058
  mutationFn: quoteChargeCreate,
23059
23059
  onSuccess: function (response) {
23060
- var _a, _b, _c, _d, _e, _f, _g, _h;
23060
+ var _a, _b, _c, _d;
23061
23061
  if (!(editingQuote === null || editingQuote === void 0 ? void 0 : editingQuote.id)) {
23062
23062
  var isTrial = ((_b = (_a = editedSubscription === null || editedSubscription === void 0 ? void 0 : editedSubscription.subscription) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.toUpperCase()) === common.SubscriptionState.TRIAL;
23063
23063
  setEditingQuoteData({
23064
- id: (_e = (_d = (_c = response.quoteChargeCreate) === null || _c === void 0 ? void 0 : _c.quoteCharge) === null || _d === void 0 ? void 0 : _d.quoteChange) === null || _e === void 0 ? void 0 : _e.quoteId,
23064
+ id: (_c = response.quoteChange) === null || _c === void 0 ? void 0 : _c.quoteId,
23065
23065
  isTrial: isTrial,
23066
23066
  });
23067
23067
  }
23068
23068
  queryClient.invalidateQueries({
23069
23069
  queryKey: common.QueryKeyFactory.default.createObjectKey({
23070
- id: (_h = (_g = (_f = response.quoteChargeCreate) === null || _f === void 0 ? void 0 : _f.quoteCharge) === null || _g === void 0 ? void 0 : _g.quoteChange) === null || _h === void 0 ? void 0 : _h.quoteId,
23070
+ id: (_d = response.quoteChange) === null || _d === void 0 ? void 0 : _d.quoteId,
23071
23071
  objectName: 'editingQuote',
23072
23072
  token: token,
23073
23073
  }),
@@ -23232,12 +23232,12 @@ var QuoteChangeSummarySection = function (_a) {
23232
23232
  mutationFn: function (quoteId) { return checkout({ quoteId: quoteId, token: token, apiHost: apiHost }); },
23233
23233
  onSuccess: function () {
23234
23234
  setEditingQuoteData(undefined);
23235
- showSuccessNotification("Subscription updated successfully");
23235
+ showSuccessNotification('Subscription updated successfully');
23236
23236
  },
23237
23237
  });
23238
- return (jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-items-end" }, { children: [editingQuote && (jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-mb-8" }, { children: [jsxRuntime.jsx("div", __assign({ className: "bunny-text-slate-500 bunny-text-right bunny-text-xs bunny-mb-2" }, { children: "TOTAL" })), jsxRuntime.jsx("div", __assign({ className: "bunny-text-right ".concat(isMobile ? "bunny-text-2xl" : "bunny-text-xl") }, { children: common.formatCurrency(getQuoteAmountDue(editingQuote), (editingQuote === null || editingQuote === void 0 ? void 0 : editingQuote.currencyId) || "") }))] }))), jsxRuntime.jsx("div", __assign({ className: "bunny-flex bunny-items-center bunny-justify-end ".concat(isMobile ? "bunny-w-full" : "") }, { children: jsxRuntime.jsx(antd.Button, __assign({ className: "bunny-w-full", onClick: (editingQuoteData === null || editingQuoteData === void 0 ? void 0 : editingQuoteData.isTrial)
23238
+ return (jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-items-end" }, { children: [editingQuote && (jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-mb-8" }, { children: [jsxRuntime.jsx("div", __assign({ className: "bunny-text-slate-500 bunny-text-right bunny-text-xs bunny-mb-2" }, { children: "TOTAL" })), jsxRuntime.jsx("div", __assign({ className: "bunny-text-right ".concat(isMobile ? 'bunny-text-2xl' : 'bunny-text-xl') }, { children: common.formatCurrency(getQuoteAmountDue(editingQuote), (editingQuote === null || editingQuote === void 0 ? void 0 : editingQuote.currencyId) || '') }))] }))), jsxRuntime.jsx("div", __assign({ className: "bunny-flex bunny-items-center bunny-justify-end ".concat(isMobile ? 'bunny-w-full' : '') }, { children: jsxRuntime.jsx(antd.Button, __assign({ className: "bunny-w-full", onClick: (editingQuoteData === null || editingQuoteData === void 0 ? void 0 : editingQuoteData.isTrial)
23239
23239
  ? function () { return trialUpgradeMutation.mutate(editingQuoteData.id); }
23240
- : openCheckout, disabled: !editingQuoteData, size: isMobile ? "large" : "middle", type: "primary" }, { children: (editingQuoteData === null || editingQuoteData === void 0 ? void 0 : editingQuoteData.isTrial) ? "Activate Trial" : "Proceed to checkout" })) }))] })));
23240
+ : openCheckout, disabled: !editingQuoteData || !editingQuote, size: isMobile ? 'large' : 'middle', type: "primary" }, { children: (editingQuoteData === null || editingQuoteData === void 0 ? void 0 : editingQuoteData.isTrial) ? 'Activate Trial' : 'Proceed to checkout' })) }))] })));
23241
23241
  };
23242
23242
 
23243
23243
  var QUANTITY_CHANGE_HEADER_TITLE = 'Update unit quantity';
@@ -1,5 +1,5 @@
1
- import { Quote } from "@bunnyapp/common";
2
- import { EditingQuoteDataType } from "../SubscriptionsListContainer";
1
+ import { Quote } from '@bunnyapp/common';
2
+ import { EditingQuoteDataType } from '../SubscriptionsListContainer';
3
3
  declare const QuoteChangeSummarySection: ({ editingQuote, editingQuoteData, openCheckout, setEditingQuoteData, }: {
4
4
  editingQuote?: Quote | undefined;
5
5
  editingQuoteData?: EditingQuoteDataType | undefined;
package/dist/esm/index.js CHANGED
@@ -143,7 +143,7 @@ var BrandContext = createContext({
143
143
  });
144
144
 
145
145
  // This will be replaced at build time by rollup-plugin-replace
146
- var PACKAGE_VERSION = '1.0.76-beta.6';
146
+ var PACKAGE_VERSION = '1.0.76-beta.7';
147
147
  var createRequestHeaders = function (token) {
148
148
  var headers = createClientDevHeaders(token);
149
149
  // Add the components version header
@@ -23046,17 +23046,17 @@ var QuantityInput = function (_a) {
23046
23046
  var createCharge = useMutation({
23047
23047
  mutationFn: quoteChargeCreate,
23048
23048
  onSuccess: function (response) {
23049
- var _a, _b, _c, _d, _e, _f, _g, _h;
23049
+ var _a, _b, _c, _d;
23050
23050
  if (!(editingQuote === null || editingQuote === void 0 ? void 0 : editingQuote.id)) {
23051
23051
  var isTrial = ((_b = (_a = editedSubscription === null || editedSubscription === void 0 ? void 0 : editedSubscription.subscription) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.toUpperCase()) === SubscriptionState$2.TRIAL;
23052
23052
  setEditingQuoteData({
23053
- id: (_e = (_d = (_c = response.quoteChargeCreate) === null || _c === void 0 ? void 0 : _c.quoteCharge) === null || _d === void 0 ? void 0 : _d.quoteChange) === null || _e === void 0 ? void 0 : _e.quoteId,
23053
+ id: (_c = response.quoteChange) === null || _c === void 0 ? void 0 : _c.quoteId,
23054
23054
  isTrial: isTrial,
23055
23055
  });
23056
23056
  }
23057
23057
  queryClient.invalidateQueries({
23058
23058
  queryKey: QueryKeyFactory.default.createObjectKey({
23059
- id: (_h = (_g = (_f = response.quoteChargeCreate) === null || _f === void 0 ? void 0 : _f.quoteCharge) === null || _g === void 0 ? void 0 : _g.quoteChange) === null || _h === void 0 ? void 0 : _h.quoteId,
23059
+ id: (_d = response.quoteChange) === null || _d === void 0 ? void 0 : _d.quoteId,
23060
23060
  objectName: 'editingQuote',
23061
23061
  token: token,
23062
23062
  }),
@@ -23221,12 +23221,12 @@ var QuoteChangeSummarySection = function (_a) {
23221
23221
  mutationFn: function (quoteId) { return checkout({ quoteId: quoteId, token: token, apiHost: apiHost }); },
23222
23222
  onSuccess: function () {
23223
23223
  setEditingQuoteData(undefined);
23224
- showSuccessNotification("Subscription updated successfully");
23224
+ showSuccessNotification('Subscription updated successfully');
23225
23225
  },
23226
23226
  });
23227
- return (jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-items-end" }, { children: [editingQuote && (jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-mb-8" }, { children: [jsx("div", __assign({ className: "bunny-text-slate-500 bunny-text-right bunny-text-xs bunny-mb-2" }, { children: "TOTAL" })), jsx("div", __assign({ className: "bunny-text-right ".concat(isMobile ? "bunny-text-2xl" : "bunny-text-xl") }, { children: formatCurrency(getQuoteAmountDue(editingQuote), (editingQuote === null || editingQuote === void 0 ? void 0 : editingQuote.currencyId) || "") }))] }))), jsx("div", __assign({ className: "bunny-flex bunny-items-center bunny-justify-end ".concat(isMobile ? "bunny-w-full" : "") }, { children: jsx(Button, __assign({ className: "bunny-w-full", onClick: (editingQuoteData === null || editingQuoteData === void 0 ? void 0 : editingQuoteData.isTrial)
23227
+ return (jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-items-end" }, { children: [editingQuote && (jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-mb-8" }, { children: [jsx("div", __assign({ className: "bunny-text-slate-500 bunny-text-right bunny-text-xs bunny-mb-2" }, { children: "TOTAL" })), jsx("div", __assign({ className: "bunny-text-right ".concat(isMobile ? 'bunny-text-2xl' : 'bunny-text-xl') }, { children: formatCurrency(getQuoteAmountDue(editingQuote), (editingQuote === null || editingQuote === void 0 ? void 0 : editingQuote.currencyId) || '') }))] }))), jsx("div", __assign({ className: "bunny-flex bunny-items-center bunny-justify-end ".concat(isMobile ? 'bunny-w-full' : '') }, { children: jsx(Button, __assign({ className: "bunny-w-full", onClick: (editingQuoteData === null || editingQuoteData === void 0 ? void 0 : editingQuoteData.isTrial)
23228
23228
  ? function () { return trialUpgradeMutation.mutate(editingQuoteData.id); }
23229
- : openCheckout, disabled: !editingQuoteData, size: isMobile ? "large" : "middle", type: "primary" }, { children: (editingQuoteData === null || editingQuoteData === void 0 ? void 0 : editingQuoteData.isTrial) ? "Activate Trial" : "Proceed to checkout" })) }))] })));
23229
+ : openCheckout, disabled: !editingQuoteData || !editingQuote, size: isMobile ? 'large' : 'middle', type: "primary" }, { children: (editingQuoteData === null || editingQuoteData === void 0 ? void 0 : editingQuoteData.isTrial) ? 'Activate Trial' : 'Proceed to checkout' })) }))] })));
23230
23230
  };
23231
23231
 
23232
23232
  var QUANTITY_CHANGE_HEADER_TITLE = 'Update unit quantity';
@@ -1,5 +1,5 @@
1
- import { Quote } from "@bunnyapp/common";
2
- import { EditingQuoteDataType } from "../SubscriptionsListContainer";
1
+ import { Quote } from '@bunnyapp/common';
2
+ import { EditingQuoteDataType } from '../SubscriptionsListContainer';
3
3
  declare const QuoteChangeSummarySection: ({ editingQuote, editingQuoteData, openCheckout, setEditingQuoteData, }: {
4
4
  editingQuote?: Quote | undefined;
5
5
  editingQuoteData?: EditingQuoteDataType | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bunnyapp/components",
3
- "version": "1.0.76-beta.6",
3
+ "version": "1.0.76-beta.7",
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",
@@ -64,7 +64,7 @@
64
64
  },
65
65
  "peerDependencies": {
66
66
  "@ant-design/icons": "^5.6.1",
67
- "@bunnyapp/common": "^1.0.66-beta.16",
67
+ "@bunnyapp/common": "^1.0.66-beta.17",
68
68
  "@fortawesome/fontawesome-svg-core": "^6.7.2",
69
69
  "@fortawesome/free-brands-svg-icons": "^6.7.2",
70
70
  "@fortawesome/free-regular-svg-icons": "^6.7.2",