@bunnyapp/components 1.0.45 → 1.0.46

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
@@ -21852,10 +21852,11 @@ var SubscriptionCardDesktopRow = function (_a) {
21852
21852
  }).data;
21853
21853
  var isRampFirstRow = isRamp && chargeIndex === 0;
21854
21854
  var isTrial = charge.trial;
21855
+ var isDiscount = charge.kind === common.SubscriptionChargeKind.DISCOUNT;
21855
21856
  var dontShowChargeName = (prevCharge === null || prevCharge === void 0 ? void 0 : prevCharge.priceListChargeId) === charge.priceListChargeId &&
21857
+ !isDiscount &&
21856
21858
  (!isTrial || prevCharge.trial) &&
21857
21859
  (isTrial || !prevCharge.trial);
21858
- var isDiscount = charge.kind === common.SubscriptionChargeKind.DISCOUNT;
21859
21860
  return (jsxRuntime.jsxs("div", __assign({ className: "contents" }, { children: [(isRampFirstRow || !isRamp) && (jsxRuntime.jsx(SubscriptionsListCell, __assign({ gridColumn: isRamp ? "1/-1" : "1" }, { children: jsxRuntime.jsx("div", __assign({ className: "flex items-center gap-2 ".concat(isDiscount ? "pl-4" : "") }, { children: jsxRuntime.jsx("div", { children: isRampFirstRow || (!isRamp && !dontShowChargeName) ? charge.name : "" }) })) }))), jsxRuntime.jsx(SubscriptionsListCell, __assign({ gridColumn: 2 }, { children: jsxRuntime.jsx("div", { children: chargePeriod }) })), jsxRuntime.jsx(SubscriptionsListCell, __assign({ right: true }, { children: charge.kind === common.SubscriptionChargeKind.DISCOUNT
21860
21861
  ? ""
21861
21862
  : charge.chargeType === common.ChargeType.USAGE
@@ -22482,7 +22483,10 @@ function BillingDetailsSection(_a) {
22482
22483
  onSuccess: function () {
22483
22484
  showSuccessNotification("Your account details have been saved");
22484
22485
  queryClient.invalidateQueries({
22485
- queryKey: common.QueryKeyFactory.default.taxationRequiredAccountFieldsKey({ entityId: entityId, token: token }),
22486
+ queryKey: common.QueryKeyFactory.default.taxationRequiredAccountFieldsKey({
22487
+ entityId: entityId,
22488
+ token: token,
22489
+ }),
22486
22490
  });
22487
22491
  },
22488
22492
  }), updateBillingDetails = _e.mutate, isUpdatingBillingDetails = _e.isPending;
@@ -22563,7 +22567,9 @@ function BillingDetailsSection(_a) {
22563
22567
  });
22564
22568
  }); };
22565
22569
  var filteredCountryList = react.useMemo(function () {
22566
- return countryListFilter ? common.Lists.COUNTRY_LIST.filter(countryListFilter) : common.Lists.COUNTRY_LIST;
22570
+ return countryListFilter
22571
+ ? common.Lists.COUNTRY_LIST.filter(countryListFilter)
22572
+ : common.Lists.COUNTRY_LIST;
22567
22573
  }, [countryListFilter]);
22568
22574
  return (jsxRuntime.jsxs("div", __assign({ className: "".concat(isMobile || hidePaymentMethodForm ? "w-full" : "w-1/2", " px-4") }, { children: [jsxRuntime.jsx(antd.Skeleton, __assign({ loading: isLoadingBillingDetails }, { children: jsxRuntime.jsxs(antd.Form, __assign({ className: "flex flex-col gap-2", form: form, layout: "vertical", disabled: isUpdatingBillingDetails, autoComplete: "off" }, { children: [jsxRuntime.jsx(antd.Form.Item, __assign({ label: "Account name", name: "name", rules: [{ required: true, message: "Account name is required" }] }, { children: jsxRuntime.jsx(antd.Input, {}) })), jsxRuntime.jsx(antd.Form.Item, __assign({ label: "Street address", name: "billingStreet", rules: [{ required: true, message: "Street address is required" }] }, { children: jsxRuntime.jsx(antd.Input, {}) })), jsxRuntime.jsxs("div", __assign({ className: "flex gap-4" }, { children: [jsxRuntime.jsx(antd.Form.Item, __assign({ label: "City", name: "billingCity", rules: [{ required: true, message: "City is required" }], className: "flex-1" }, { children: jsxRuntime.jsx(antd.Input, {}) })), jsxRuntime.jsx(antd.Form.Item, __assign({ label: "Zipcode", name: "billingZip", rules: [{ required: true, message: "Zipcode is required" }], className: "flex-1" }, { children: jsxRuntime.jsx(antd.Input, {}) }))] })), jsxRuntime.jsxs("div", __assign({ className: "flex ".concat(isMobile ? "flex-col pb-2" : "flex-row", " gap-4") }, { children: [jsxRuntime.jsx(antd.Form.Item, __assign({ label: "State", name: "billingState", className: "flex-1", rules: [
22569
22575
  {
@@ -22571,8 +22577,12 @@ function BillingDetailsSection(_a) {
22571
22577
  },
22572
22578
  ] }, { children: jsxRuntime.jsx(antd.Input, {}) })), jsxRuntime.jsx(antd.Form.Item, __assign({ label: "Country", name: "billingCountry", className: "flex-1", rules: [{ required: true, message: "Country is required" }] }, { children: jsxRuntime.jsx(antd.Select, { options: filteredCountryList, placeholder: "Select a country", showSearch: true, filterOption: function (input, option) {
22573
22579
  var _a, _b;
22574
- return ((_a = option === null || option === void 0 ? void 0 : option.label) !== null && _a !== void 0 ? _a : "").toLowerCase().includes(input.toLowerCase()) ||
22575
- ((_b = option === null || option === void 0 ? void 0 : option.value) !== null && _b !== void 0 ? _b : "").toLowerCase().includes(input.toLowerCase());
22580
+ return ((_a = option === null || option === void 0 ? void 0 : option.label) !== null && _a !== void 0 ? _a : "")
22581
+ .toLowerCase()
22582
+ .includes(input.toLowerCase()) ||
22583
+ ((_b = option === null || option === void 0 ? void 0 : option.value) !== null && _b !== void 0 ? _b : "")
22584
+ .toLowerCase()
22585
+ .includes(input.toLowerCase());
22576
22586
  } }) }))] })), jsxRuntime.jsx(antd.Form.Item, __assign({ label: "Email", name: "billingContactEmail", rules: [
22577
22587
  {
22578
22588
  required: true,
package/dist/esm/index.js CHANGED
@@ -21823,10 +21823,11 @@ var SubscriptionCardDesktopRow = function (_a) {
21823
21823
  }).data;
21824
21824
  var isRampFirstRow = isRamp && chargeIndex === 0;
21825
21825
  var isTrial = charge.trial;
21826
+ var isDiscount = charge.kind === SubscriptionChargeKind.DISCOUNT;
21826
21827
  var dontShowChargeName = (prevCharge === null || prevCharge === void 0 ? void 0 : prevCharge.priceListChargeId) === charge.priceListChargeId &&
21828
+ !isDiscount &&
21827
21829
  (!isTrial || prevCharge.trial) &&
21828
21830
  (isTrial || !prevCharge.trial);
21829
- var isDiscount = charge.kind === SubscriptionChargeKind.DISCOUNT;
21830
21831
  return (jsxs("div", __assign({ className: "contents" }, { children: [(isRampFirstRow || !isRamp) && (jsx(SubscriptionsListCell, __assign({ gridColumn: isRamp ? "1/-1" : "1" }, { children: jsx("div", __assign({ className: "flex items-center gap-2 ".concat(isDiscount ? "pl-4" : "") }, { children: jsx("div", { children: isRampFirstRow || (!isRamp && !dontShowChargeName) ? charge.name : "" }) })) }))), jsx(SubscriptionsListCell, __assign({ gridColumn: 2 }, { children: jsx("div", { children: chargePeriod }) })), jsx(SubscriptionsListCell, __assign({ right: true }, { children: charge.kind === SubscriptionChargeKind.DISCOUNT
21831
21832
  ? ""
21832
21833
  : charge.chargeType === ChargeType.USAGE
@@ -22453,7 +22454,10 @@ function BillingDetailsSection(_a) {
22453
22454
  onSuccess: function () {
22454
22455
  showSuccessNotification("Your account details have been saved");
22455
22456
  queryClient.invalidateQueries({
22456
- queryKey: QueryKeyFactory.default.taxationRequiredAccountFieldsKey({ entityId: entityId, token: token }),
22457
+ queryKey: QueryKeyFactory.default.taxationRequiredAccountFieldsKey({
22458
+ entityId: entityId,
22459
+ token: token,
22460
+ }),
22457
22461
  });
22458
22462
  },
22459
22463
  }), updateBillingDetails = _e.mutate, isUpdatingBillingDetails = _e.isPending;
@@ -22534,7 +22538,9 @@ function BillingDetailsSection(_a) {
22534
22538
  });
22535
22539
  }); };
22536
22540
  var filteredCountryList = useMemo(function () {
22537
- return countryListFilter ? Lists.COUNTRY_LIST.filter(countryListFilter) : Lists.COUNTRY_LIST;
22541
+ return countryListFilter
22542
+ ? Lists.COUNTRY_LIST.filter(countryListFilter)
22543
+ : Lists.COUNTRY_LIST;
22538
22544
  }, [countryListFilter]);
22539
22545
  return (jsxs("div", __assign({ className: "".concat(isMobile || hidePaymentMethodForm ? "w-full" : "w-1/2", " px-4") }, { children: [jsx(Skeleton, __assign({ loading: isLoadingBillingDetails }, { children: jsxs(Form, __assign({ className: "flex flex-col gap-2", form: form, layout: "vertical", disabled: isUpdatingBillingDetails, autoComplete: "off" }, { children: [jsx(Form.Item, __assign({ label: "Account name", name: "name", rules: [{ required: true, message: "Account name is required" }] }, { children: jsx(Input, {}) })), jsx(Form.Item, __assign({ label: "Street address", name: "billingStreet", rules: [{ required: true, message: "Street address is required" }] }, { children: jsx(Input, {}) })), jsxs("div", __assign({ className: "flex gap-4" }, { children: [jsx(Form.Item, __assign({ label: "City", name: "billingCity", rules: [{ required: true, message: "City is required" }], className: "flex-1" }, { children: jsx(Input, {}) })), jsx(Form.Item, __assign({ label: "Zipcode", name: "billingZip", rules: [{ required: true, message: "Zipcode is required" }], className: "flex-1" }, { children: jsx(Input, {}) }))] })), jsxs("div", __assign({ className: "flex ".concat(isMobile ? "flex-col pb-2" : "flex-row", " gap-4") }, { children: [jsx(Form.Item, __assign({ label: "State", name: "billingState", className: "flex-1", rules: [
22540
22546
  {
@@ -22542,8 +22548,12 @@ function BillingDetailsSection(_a) {
22542
22548
  },
22543
22549
  ] }, { children: jsx(Input, {}) })), jsx(Form.Item, __assign({ label: "Country", name: "billingCountry", className: "flex-1", rules: [{ required: true, message: "Country is required" }] }, { children: jsx(Select, { options: filteredCountryList, placeholder: "Select a country", showSearch: true, filterOption: function (input, option) {
22544
22550
  var _a, _b;
22545
- return ((_a = option === null || option === void 0 ? void 0 : option.label) !== null && _a !== void 0 ? _a : "").toLowerCase().includes(input.toLowerCase()) ||
22546
- ((_b = option === null || option === void 0 ? void 0 : option.value) !== null && _b !== void 0 ? _b : "").toLowerCase().includes(input.toLowerCase());
22551
+ return ((_a = option === null || option === void 0 ? void 0 : option.label) !== null && _a !== void 0 ? _a : "")
22552
+ .toLowerCase()
22553
+ .includes(input.toLowerCase()) ||
22554
+ ((_b = option === null || option === void 0 ? void 0 : option.value) !== null && _b !== void 0 ? _b : "")
22555
+ .toLowerCase()
22556
+ .includes(input.toLowerCase());
22547
22557
  } }) }))] })), jsx(Form.Item, __assign({ label: "Email", name: "billingContactEmail", rules: [
22548
22558
  {
22549
22559
  required: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bunnyapp/components",
3
- "version": "1.0.45",
3
+ "version": "1.0.46",
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",