@bunnyapp/components 1.0.20 → 1.0.22
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 +14 -6
- package/dist/cjs/src/components/Card.d.ts +1 -0
- package/dist/cjs/src/components/Quote/Quote.stories.d.ts +16 -15
- package/dist/cjs/src/hooks/quotes/useSendAcceptQuote.d.ts +1 -0
- package/dist/esm/index.js +15 -7
- package/dist/esm/src/components/Card.d.ts +1 -0
- package/dist/esm/src/components/Quote/Quote.stories.d.ts +16 -15
- package/dist/esm/src/hooks/quotes/useSendAcceptQuote.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cjs/src/components/PageHeaderWithActions.d.ts +0 -7
- package/dist/cjs/src/components/Subscriptions/subscriptionsList/ChangeQuantitiesButton.d.ts +0 -5
- package/dist/cjs/src/components/Subscriptions/subscriptionsList/HideExpiredToggle.d.ts +0 -7
- package/dist/cjs/src/components/Subscriptions/subscriptionsList/SubscriptionsNavigation.d.ts +0 -8
- package/dist/cjs/src/graphql/queries/getQuote.d.ts +0 -7
- package/dist/esm/src/components/PageHeaderWithActions.d.ts +0 -7
- package/dist/esm/src/components/Subscriptions/subscriptionsList/ChangeQuantitiesButton.d.ts +0 -5
- package/dist/esm/src/components/Subscriptions/subscriptionsList/HideExpiredToggle.d.ts +0 -7
- package/dist/esm/src/components/Subscriptions/subscriptionsList/SubscriptionsNavigation.d.ts +0 -8
- package/dist/esm/src/graphql/queries/getQuote.d.ts +0 -7
package/dist/cjs/index.js
CHANGED
|
@@ -4214,7 +4214,7 @@ function Signup(_a) {
|
|
|
4214
4214
|
: "w-1/2 items-center justify-center my-12") }, { children: jsxRuntime.jsx("div", __assign({ className: "".concat(isMobile ? "w-full" : "w-1/2") }, { children: jsxRuntime.jsx(PaymentForms, { entityId: entityId, quote: quote, handlePaymentSuccess: handlePaymentSuccess, handlePaymentFail: handlePaymentFail, handleSubmit: handleSubmit, proceedingToPayment: proceedingToPayment, accountId: accountId, overrideToken: portalSessionToken, customCheckoutFunction: accountSignupFunction }) })) }))] }))) })));
|
|
4215
4215
|
}
|
|
4216
4216
|
|
|
4217
|
-
var SUBSCRIPTIONS_QUERY = "\nquery subscriptions {\n subscriptions {\n nodes {\n cancellationDate\n currencyId\n endDate\n evergreen\n id\n period\n plan { id name selfServiceBuy selfServiceCancel selfServiceRenew }\n priceList { id periodMonths }\n product { id name showProductNameOnLineItem }\n startDate\n state\n trialEndDate\n trialPeriod\n trialStartDate\n charges {\n priceListCharge {\n priceListChargeTiers {\n price\n starts\n }\n }\n amount\n billingPeriod\n chargeType\n discount\n discountedPrice\n endDate\n expired\n feature { name }\n id\n isRamp\n kind\n name\n periodPrice\n price\n priceDecimals\n priceListChargeId\n priceTiers { starts price }\n pricingModel\n quantity\n selfServiceQuantity\n startDate\n trial\n }\n }\n }\n }";
|
|
4217
|
+
var SUBSCRIPTIONS_QUERY = "\nquery subscriptions {\n subscriptions {\n nodes {\n cancellationDate\n currencyId\n endDate\n evergreen\n id\n period\n plan { id name selfServiceBuy selfServiceCancel selfServiceRenew }\n priceList { id periodMonths }\n product { id name showProductNameOnLineItem }\n startDate\n state\n trialEndDate\n trialPeriod\n trialStartDate\n charges {\n priceListCharge {\n priceListChargeTiers {\n price\n starts\n }\n }\n amount\n billingPeriod\n chargeType\n discount\n discountedPrice\n endDate\n expired\n feature { name }\n id\n isAmendment\n isRamp\n kind\n name\n periodPrice\n price\n priceDecimals\n priceListChargeId\n priceTiers { starts price }\n pricingModel\n quantity\n selfServiceQuantity\n startDate\n trial\n }\n }\n }\n }";
|
|
4218
4218
|
var getSubscriptions = function (_a) {
|
|
4219
4219
|
var apiHost = _a.apiHost, entityId = _a.entityId, isInPreviewMode = _a.isInPreviewMode, token = _a.token;
|
|
4220
4220
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -4240,7 +4240,8 @@ var getSubscriptions = function (_a) {
|
|
|
4240
4240
|
var useSubscriptions = function (_a) {
|
|
4241
4241
|
var data = _a.data;
|
|
4242
4242
|
return React.useMemo(function () {
|
|
4243
|
-
var
|
|
4243
|
+
var clonedData = lodash.cloneDeep(data);
|
|
4244
|
+
var combinedSubscriptions = clonedData === null || clonedData === void 0 ? void 0 : clonedData.map(function (subscription) {
|
|
4244
4245
|
var _a;
|
|
4245
4246
|
var orderedSubscriptionCharges = subscription.charges.sort(function (a, b) {
|
|
4246
4247
|
if (a.priceListChargeId !== b.priceListChargeId) {
|
|
@@ -4662,6 +4663,7 @@ var SubscriptionCardDesktop = function (_a) {
|
|
|
4662
4663
|
})] }))] })));
|
|
4663
4664
|
};
|
|
4664
4665
|
var SubscriptionCardDesktopRow = function (_a) {
|
|
4666
|
+
var _b, _c;
|
|
4665
4667
|
var charge = _a.charge, chargeIndex = _a.chargeIndex, subscription = _a.subscription;
|
|
4666
4668
|
// Context
|
|
4667
4669
|
var apiHost = React.useContext(BunnyContext).apiHost;
|
|
@@ -4695,9 +4697,13 @@ var SubscriptionCardDesktopRow = function (_a) {
|
|
|
4695
4697
|
var isDiscount = charge.kind === common.SubscriptionChargeKind.DISCOUNT;
|
|
4696
4698
|
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)
|
|
4697
4699
|
? charge.name
|
|
4698
|
-
: "" }) })) }))), jsxRuntime.jsx(SubscriptionsListCell, __assign({ gridColumn: 2 }, { children: jsxRuntime.jsx("div", { children: chargePeriod }) })), jsxRuntime.jsx(SubscriptionsListCell, __assign({ right: true }, { children: charge.
|
|
4699
|
-
?
|
|
4700
|
-
: charge.
|
|
4700
|
+
: "" }) })) }))), jsxRuntime.jsx(SubscriptionsListCell, __assign({ gridColumn: 2 }, { children: jsxRuntime.jsx("div", { children: chargePeriod }) })), jsxRuntime.jsx(SubscriptionsListCell, __assign({ right: true }, { children: charge.kind === common.SubscriptionChargeKind.DISCOUNT
|
|
4701
|
+
? ""
|
|
4702
|
+
: charge.chargeType === common.ChargeType.USAGE
|
|
4703
|
+
? data && jsxRuntime.jsx(FeatureUsageGraph, { charge: charge, featureUsage: data })
|
|
4704
|
+
: charge.isAmendment
|
|
4705
|
+
? "+".concat((_b = charge.quantity) === null || _b === void 0 ? void 0 : _b.toLocaleString())
|
|
4706
|
+
: (_c = charge.quantity) === null || _c === void 0 ? void 0 : _c.toLocaleString() })), jsxRuntime.jsx(SubscriptionsListCell, __assign({ right: true }, { children: jsxRuntime.jsx(SubscriptionChargeUnitPrice, { charge: charge, subscription: subscription }) })), jsxRuntime.jsx(SubscriptionsListCell, __assign({ right: true }, { children: jsxRuntime.jsx(SubscriptionChargeTotal, { charge: charge, subscription: subscription }) }))] })));
|
|
4701
4707
|
};
|
|
4702
4708
|
|
|
4703
4709
|
var Text = antd.Typography.Text;
|
|
@@ -4746,7 +4752,9 @@ var SubscriptionCard = function (_a) {
|
|
|
4746
4752
|
return null;
|
|
4747
4753
|
var isRamp = charge.isRamp;
|
|
4748
4754
|
var chargePeriod = "".concat(common.formatDate(charge.startDate), " - ").concat(common.formatDate(charge.endDate));
|
|
4749
|
-
return (jsxRuntime.jsxs("div", __assign({ className: "contents" }, { children: [((isRamp && chargeIndex === 0) || !isRamp) && (jsxRuntime.jsxs(SubscriptionCardCellMobile, __assign({ className: CHARGE_COLUMNS[0].className, style: { gridColumn: isRamp ? "1/-1" : "1" } }, { children: [jsxRuntime.jsx("span", { children: charge.name }), !isRamp ? " - ".concat(chargePeriod) : ""] }))), isRamp && (jsxRuntime.jsx(SubscriptionCardCellMobile, __assign({ className: CHARGE_COLUMNS[0].className }, { children: "- ".concat(chargePeriod) }))), jsxRuntime.jsx(SubscriptionCardCellMobile, __assign({ className: CHARGE_COLUMNS[1].className }, { children: charge.
|
|
4755
|
+
return (jsxRuntime.jsxs("div", __assign({ className: "contents" }, { children: [((isRamp && chargeIndex === 0) || !isRamp) && (jsxRuntime.jsxs(SubscriptionCardCellMobile, __assign({ className: CHARGE_COLUMNS[0].className, style: { gridColumn: isRamp ? "1/-1" : "1" } }, { children: [jsxRuntime.jsx("span", { children: charge.name }), !isRamp ? " - ".concat(chargePeriod) : ""] }))), isRamp && (jsxRuntime.jsx(SubscriptionCardCellMobile, __assign({ className: CHARGE_COLUMNS[0].className }, { children: "- ".concat(chargePeriod) }))), jsxRuntime.jsx(SubscriptionCardCellMobile, __assign({ className: CHARGE_COLUMNS[1].className }, { children: charge.kind === common.SubscriptionChargeKind.DISCOUNT
|
|
4756
|
+
? ""
|
|
4757
|
+
: charge.quantity })), jsxRuntime.jsx(SubscriptionCardCellMobile, __assign({ className: CHARGE_COLUMNS[2].className }, { children: jsxRuntime.jsx(SubscriptionChargeUnitPrice, { charge: charge, subscription: subscription }) })), jsxRuntime.jsx(SubscriptionCardCellMobile, __assign({ className: CHARGE_COLUMNS[3].className }, { children: jsxRuntime.jsx(SubscriptionChargeTotal, { charge: charge, subscription: subscription }) }))] }), chargeIndex));
|
|
4750
4758
|
})] }))] })) }));
|
|
4751
4759
|
};
|
|
4752
4760
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
3
|
import Quote from "./Quote";
|
|
3
4
|
declare const meta: Meta<typeof Quote>;
|
|
@@ -15,16 +16,16 @@ export declare const Default: import("@storybook/csf").StoryAnnotations<import("
|
|
|
15
16
|
className?: string | undefined;
|
|
16
17
|
hideDownloadButton?: boolean | undefined;
|
|
17
18
|
}, {
|
|
19
|
+
entityId?: string | undefined;
|
|
18
20
|
className?: string | undefined;
|
|
19
21
|
id?: string | undefined;
|
|
20
|
-
entityId?: string | undefined;
|
|
21
22
|
shadow?: import("../../types/shadowType").ShadowType | undefined;
|
|
22
|
-
onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
|
|
23
23
|
backButtonName?: string | undefined;
|
|
24
24
|
onBackButtonClick?: (() => void) | undefined;
|
|
25
|
+
hideDownloadButton?: boolean | undefined;
|
|
26
|
+
onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
|
|
25
27
|
invoiceQuoteViewComponent?: import("react").ReactNode;
|
|
26
28
|
onInvoiceDownloadError?: (() => void) | undefined;
|
|
27
|
-
hideDownloadButton?: boolean | undefined;
|
|
28
29
|
}>;
|
|
29
30
|
export declare const NoShadow: import("@storybook/csf").StoryAnnotations<import("@storybook/react/dist/types-a5624094").R, {
|
|
30
31
|
id?: string | undefined;
|
|
@@ -38,16 +39,16 @@ export declare const NoShadow: import("@storybook/csf").StoryAnnotations<import(
|
|
|
38
39
|
className?: string | undefined;
|
|
39
40
|
hideDownloadButton?: boolean | undefined;
|
|
40
41
|
}, {
|
|
42
|
+
entityId?: string | undefined;
|
|
41
43
|
className?: string | undefined;
|
|
42
44
|
id?: string | undefined;
|
|
43
|
-
entityId?: string | undefined;
|
|
44
45
|
shadow?: import("../../types/shadowType").ShadowType | undefined;
|
|
45
|
-
onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
|
|
46
46
|
backButtonName?: string | undefined;
|
|
47
47
|
onBackButtonClick?: (() => void) | undefined;
|
|
48
|
+
hideDownloadButton?: boolean | undefined;
|
|
49
|
+
onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
|
|
48
50
|
invoiceQuoteViewComponent?: import("react").ReactNode;
|
|
49
51
|
onInvoiceDownloadError?: (() => void) | undefined;
|
|
50
|
-
hideDownloadButton?: boolean | undefined;
|
|
51
52
|
}>;
|
|
52
53
|
export declare const Mobile: import("@storybook/csf").StoryAnnotations<import("@storybook/react/dist/types-a5624094").R, {
|
|
53
54
|
id?: string | undefined;
|
|
@@ -61,16 +62,16 @@ export declare const Mobile: import("@storybook/csf").StoryAnnotations<import("@
|
|
|
61
62
|
className?: string | undefined;
|
|
62
63
|
hideDownloadButton?: boolean | undefined;
|
|
63
64
|
}, {
|
|
65
|
+
entityId?: string | undefined;
|
|
64
66
|
className?: string | undefined;
|
|
65
67
|
id?: string | undefined;
|
|
66
|
-
entityId?: string | undefined;
|
|
67
68
|
shadow?: import("../../types/shadowType").ShadowType | undefined;
|
|
68
|
-
onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
|
|
69
69
|
backButtonName?: string | undefined;
|
|
70
70
|
onBackButtonClick?: (() => void) | undefined;
|
|
71
|
+
hideDownloadButton?: boolean | undefined;
|
|
72
|
+
onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
|
|
71
73
|
invoiceQuoteViewComponent?: import("react").ReactNode;
|
|
72
74
|
onInvoiceDownloadError?: (() => void) | undefined;
|
|
73
|
-
hideDownloadButton?: boolean | undefined;
|
|
74
75
|
}>;
|
|
75
76
|
export declare const CustomClassName: import("@storybook/csf").StoryAnnotations<import("@storybook/react/dist/types-a5624094").R, {
|
|
76
77
|
id?: string | undefined;
|
|
@@ -84,16 +85,16 @@ export declare const CustomClassName: import("@storybook/csf").StoryAnnotations<
|
|
|
84
85
|
className?: string | undefined;
|
|
85
86
|
hideDownloadButton?: boolean | undefined;
|
|
86
87
|
}, {
|
|
88
|
+
entityId?: string | undefined;
|
|
87
89
|
className?: string | undefined;
|
|
88
90
|
id?: string | undefined;
|
|
89
|
-
entityId?: string | undefined;
|
|
90
91
|
shadow?: import("../../types/shadowType").ShadowType | undefined;
|
|
91
|
-
onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
|
|
92
92
|
backButtonName?: string | undefined;
|
|
93
93
|
onBackButtonClick?: (() => void) | undefined;
|
|
94
|
+
hideDownloadButton?: boolean | undefined;
|
|
95
|
+
onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
|
|
94
96
|
invoiceQuoteViewComponent?: import("react").ReactNode;
|
|
95
97
|
onInvoiceDownloadError?: (() => void) | undefined;
|
|
96
|
-
hideDownloadButton?: boolean | undefined;
|
|
97
98
|
}>;
|
|
98
99
|
export declare const HideDownloadButton: Story;
|
|
99
100
|
export declare const AcceptedQuote: Story;
|
|
@@ -110,14 +111,14 @@ export declare const DarkMode: import("@storybook/csf").StoryAnnotations<import(
|
|
|
110
111
|
className?: string | undefined;
|
|
111
112
|
hideDownloadButton?: boolean | undefined;
|
|
112
113
|
}, {
|
|
114
|
+
entityId?: string | undefined;
|
|
113
115
|
className?: string | undefined;
|
|
114
116
|
id?: string | undefined;
|
|
115
|
-
entityId?: string | undefined;
|
|
116
117
|
shadow?: import("../../types/shadowType").ShadowType | undefined;
|
|
117
|
-
onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
|
|
118
118
|
backButtonName?: string | undefined;
|
|
119
119
|
onBackButtonClick?: (() => void) | undefined;
|
|
120
|
+
hideDownloadButton?: boolean | undefined;
|
|
121
|
+
onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
|
|
120
122
|
invoiceQuoteViewComponent?: import("react").ReactNode;
|
|
121
123
|
onInvoiceDownloadError?: (() => void) | undefined;
|
|
122
|
-
hideDownloadButton?: boolean | undefined;
|
|
123
124
|
}>;
|
package/dist/esm/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import request, { GraphQLClient } from 'graphql-request';
|
|
|
12
12
|
import { HelmetProvider, Helmet } from 'react-helmet-async';
|
|
13
13
|
import { useElements, useStripe, PaymentElement, Elements } from '@stripe/react-stripe-js';
|
|
14
14
|
import { loadStripe } from '@stripe/stripe-js/pure';
|
|
15
|
-
import { capitalize, startCase, omit } from 'lodash';
|
|
15
|
+
import { capitalize, startCase, cloneDeep, omit } from 'lodash';
|
|
16
16
|
import { BarChart, ResponsiveContainer, XAxis, Tooltip, Bar, Rectangle } from 'recharts';
|
|
17
17
|
|
|
18
18
|
function styleInject(css, ref) {
|
|
@@ -4185,7 +4185,7 @@ function Signup(_a) {
|
|
|
4185
4185
|
: "w-1/2 items-center justify-center my-12") }, { children: jsx("div", __assign({ className: "".concat(isMobile ? "w-full" : "w-1/2") }, { children: jsx(PaymentForms, { entityId: entityId, quote: quote, handlePaymentSuccess: handlePaymentSuccess, handlePaymentFail: handlePaymentFail, handleSubmit: handleSubmit, proceedingToPayment: proceedingToPayment, accountId: accountId, overrideToken: portalSessionToken, customCheckoutFunction: accountSignupFunction }) })) }))] }))) })));
|
|
4186
4186
|
}
|
|
4187
4187
|
|
|
4188
|
-
var SUBSCRIPTIONS_QUERY = "\nquery subscriptions {\n subscriptions {\n nodes {\n cancellationDate\n currencyId\n endDate\n evergreen\n id\n period\n plan { id name selfServiceBuy selfServiceCancel selfServiceRenew }\n priceList { id periodMonths }\n product { id name showProductNameOnLineItem }\n startDate\n state\n trialEndDate\n trialPeriod\n trialStartDate\n charges {\n priceListCharge {\n priceListChargeTiers {\n price\n starts\n }\n }\n amount\n billingPeriod\n chargeType\n discount\n discountedPrice\n endDate\n expired\n feature { name }\n id\n isRamp\n kind\n name\n periodPrice\n price\n priceDecimals\n priceListChargeId\n priceTiers { starts price }\n pricingModel\n quantity\n selfServiceQuantity\n startDate\n trial\n }\n }\n }\n }";
|
|
4188
|
+
var SUBSCRIPTIONS_QUERY = "\nquery subscriptions {\n subscriptions {\n nodes {\n cancellationDate\n currencyId\n endDate\n evergreen\n id\n period\n plan { id name selfServiceBuy selfServiceCancel selfServiceRenew }\n priceList { id periodMonths }\n product { id name showProductNameOnLineItem }\n startDate\n state\n trialEndDate\n trialPeriod\n trialStartDate\n charges {\n priceListCharge {\n priceListChargeTiers {\n price\n starts\n }\n }\n amount\n billingPeriod\n chargeType\n discount\n discountedPrice\n endDate\n expired\n feature { name }\n id\n isAmendment\n isRamp\n kind\n name\n periodPrice\n price\n priceDecimals\n priceListChargeId\n priceTiers { starts price }\n pricingModel\n quantity\n selfServiceQuantity\n startDate\n trial\n }\n }\n }\n }";
|
|
4189
4189
|
var getSubscriptions = function (_a) {
|
|
4190
4190
|
var apiHost = _a.apiHost, entityId = _a.entityId, isInPreviewMode = _a.isInPreviewMode, token = _a.token;
|
|
4191
4191
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -4211,7 +4211,8 @@ var getSubscriptions = function (_a) {
|
|
|
4211
4211
|
var useSubscriptions = function (_a) {
|
|
4212
4212
|
var data = _a.data;
|
|
4213
4213
|
return useMemo(function () {
|
|
4214
|
-
var
|
|
4214
|
+
var clonedData = cloneDeep(data);
|
|
4215
|
+
var combinedSubscriptions = clonedData === null || clonedData === void 0 ? void 0 : clonedData.map(function (subscription) {
|
|
4215
4216
|
var _a;
|
|
4216
4217
|
var orderedSubscriptionCharges = subscription.charges.sort(function (a, b) {
|
|
4217
4218
|
if (a.priceListChargeId !== b.priceListChargeId) {
|
|
@@ -4633,6 +4634,7 @@ var SubscriptionCardDesktop = function (_a) {
|
|
|
4633
4634
|
})] }))] })));
|
|
4634
4635
|
};
|
|
4635
4636
|
var SubscriptionCardDesktopRow = function (_a) {
|
|
4637
|
+
var _b, _c;
|
|
4636
4638
|
var charge = _a.charge, chargeIndex = _a.chargeIndex, subscription = _a.subscription;
|
|
4637
4639
|
// Context
|
|
4638
4640
|
var apiHost = useContext(BunnyContext).apiHost;
|
|
@@ -4666,9 +4668,13 @@ var SubscriptionCardDesktopRow = function (_a) {
|
|
|
4666
4668
|
var isDiscount = charge.kind === SubscriptionChargeKind.DISCOUNT;
|
|
4667
4669
|
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)
|
|
4668
4670
|
? charge.name
|
|
4669
|
-
: "" }) })) }))), jsx(SubscriptionsListCell, __assign({ gridColumn: 2 }, { children: jsx("div", { children: chargePeriod }) })), jsx(SubscriptionsListCell, __assign({ right: true }, { children: charge.
|
|
4670
|
-
?
|
|
4671
|
-
: charge.
|
|
4671
|
+
: "" }) })) }))), jsx(SubscriptionsListCell, __assign({ gridColumn: 2 }, { children: jsx("div", { children: chargePeriod }) })), jsx(SubscriptionsListCell, __assign({ right: true }, { children: charge.kind === SubscriptionChargeKind.DISCOUNT
|
|
4672
|
+
? ""
|
|
4673
|
+
: charge.chargeType === ChargeType.USAGE
|
|
4674
|
+
? data && jsx(FeatureUsageGraph, { charge: charge, featureUsage: data })
|
|
4675
|
+
: charge.isAmendment
|
|
4676
|
+
? "+".concat((_b = charge.quantity) === null || _b === void 0 ? void 0 : _b.toLocaleString())
|
|
4677
|
+
: (_c = charge.quantity) === null || _c === void 0 ? void 0 : _c.toLocaleString() })), jsx(SubscriptionsListCell, __assign({ right: true }, { children: jsx(SubscriptionChargeUnitPrice, { charge: charge, subscription: subscription }) })), jsx(SubscriptionsListCell, __assign({ right: true }, { children: jsx(SubscriptionChargeTotal, { charge: charge, subscription: subscription }) }))] })));
|
|
4672
4678
|
};
|
|
4673
4679
|
|
|
4674
4680
|
var Text = Typography.Text;
|
|
@@ -4717,7 +4723,9 @@ var SubscriptionCard = function (_a) {
|
|
|
4717
4723
|
return null;
|
|
4718
4724
|
var isRamp = charge.isRamp;
|
|
4719
4725
|
var chargePeriod = "".concat(formatDate(charge.startDate), " - ").concat(formatDate(charge.endDate));
|
|
4720
|
-
return (jsxs("div", __assign({ className: "contents" }, { children: [((isRamp && chargeIndex === 0) || !isRamp) && (jsxs(SubscriptionCardCellMobile, __assign({ className: CHARGE_COLUMNS[0].className, style: { gridColumn: isRamp ? "1/-1" : "1" } }, { children: [jsx("span", { children: charge.name }), !isRamp ? " - ".concat(chargePeriod) : ""] }))), isRamp && (jsx(SubscriptionCardCellMobile, __assign({ className: CHARGE_COLUMNS[0].className }, { children: "- ".concat(chargePeriod) }))), jsx(SubscriptionCardCellMobile, __assign({ className: CHARGE_COLUMNS[1].className }, { children: charge.
|
|
4726
|
+
return (jsxs("div", __assign({ className: "contents" }, { children: [((isRamp && chargeIndex === 0) || !isRamp) && (jsxs(SubscriptionCardCellMobile, __assign({ className: CHARGE_COLUMNS[0].className, style: { gridColumn: isRamp ? "1/-1" : "1" } }, { children: [jsx("span", { children: charge.name }), !isRamp ? " - ".concat(chargePeriod) : ""] }))), isRamp && (jsx(SubscriptionCardCellMobile, __assign({ className: CHARGE_COLUMNS[0].className }, { children: "- ".concat(chargePeriod) }))), jsx(SubscriptionCardCellMobile, __assign({ className: CHARGE_COLUMNS[1].className }, { children: charge.kind === SubscriptionChargeKind.DISCOUNT
|
|
4727
|
+
? ""
|
|
4728
|
+
: charge.quantity })), jsx(SubscriptionCardCellMobile, __assign({ className: CHARGE_COLUMNS[2].className }, { children: jsx(SubscriptionChargeUnitPrice, { charge: charge, subscription: subscription }) })), jsx(SubscriptionCardCellMobile, __assign({ className: CHARGE_COLUMNS[3].className }, { children: jsx(SubscriptionChargeTotal, { charge: charge, subscription: subscription }) }))] }), chargeIndex));
|
|
4721
4729
|
})] }))] })) }));
|
|
4722
4730
|
};
|
|
4723
4731
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
3
|
import Quote from "./Quote";
|
|
3
4
|
declare const meta: Meta<typeof Quote>;
|
|
@@ -15,16 +16,16 @@ export declare const Default: import("@storybook/csf").StoryAnnotations<import("
|
|
|
15
16
|
className?: string | undefined;
|
|
16
17
|
hideDownloadButton?: boolean | undefined;
|
|
17
18
|
}, {
|
|
19
|
+
entityId?: string | undefined;
|
|
18
20
|
className?: string | undefined;
|
|
19
21
|
id?: string | undefined;
|
|
20
|
-
entityId?: string | undefined;
|
|
21
22
|
shadow?: import("../../types/shadowType").ShadowType | undefined;
|
|
22
|
-
onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
|
|
23
23
|
backButtonName?: string | undefined;
|
|
24
24
|
onBackButtonClick?: (() => void) | undefined;
|
|
25
|
+
hideDownloadButton?: boolean | undefined;
|
|
26
|
+
onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
|
|
25
27
|
invoiceQuoteViewComponent?: import("react").ReactNode;
|
|
26
28
|
onInvoiceDownloadError?: (() => void) | undefined;
|
|
27
|
-
hideDownloadButton?: boolean | undefined;
|
|
28
29
|
}>;
|
|
29
30
|
export declare const NoShadow: import("@storybook/csf").StoryAnnotations<import("@storybook/react/dist/types-a5624094").R, {
|
|
30
31
|
id?: string | undefined;
|
|
@@ -38,16 +39,16 @@ export declare const NoShadow: import("@storybook/csf").StoryAnnotations<import(
|
|
|
38
39
|
className?: string | undefined;
|
|
39
40
|
hideDownloadButton?: boolean | undefined;
|
|
40
41
|
}, {
|
|
42
|
+
entityId?: string | undefined;
|
|
41
43
|
className?: string | undefined;
|
|
42
44
|
id?: string | undefined;
|
|
43
|
-
entityId?: string | undefined;
|
|
44
45
|
shadow?: import("../../types/shadowType").ShadowType | undefined;
|
|
45
|
-
onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
|
|
46
46
|
backButtonName?: string | undefined;
|
|
47
47
|
onBackButtonClick?: (() => void) | undefined;
|
|
48
|
+
hideDownloadButton?: boolean | undefined;
|
|
49
|
+
onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
|
|
48
50
|
invoiceQuoteViewComponent?: import("react").ReactNode;
|
|
49
51
|
onInvoiceDownloadError?: (() => void) | undefined;
|
|
50
|
-
hideDownloadButton?: boolean | undefined;
|
|
51
52
|
}>;
|
|
52
53
|
export declare const Mobile: import("@storybook/csf").StoryAnnotations<import("@storybook/react/dist/types-a5624094").R, {
|
|
53
54
|
id?: string | undefined;
|
|
@@ -61,16 +62,16 @@ export declare const Mobile: import("@storybook/csf").StoryAnnotations<import("@
|
|
|
61
62
|
className?: string | undefined;
|
|
62
63
|
hideDownloadButton?: boolean | undefined;
|
|
63
64
|
}, {
|
|
65
|
+
entityId?: string | undefined;
|
|
64
66
|
className?: string | undefined;
|
|
65
67
|
id?: string | undefined;
|
|
66
|
-
entityId?: string | undefined;
|
|
67
68
|
shadow?: import("../../types/shadowType").ShadowType | undefined;
|
|
68
|
-
onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
|
|
69
69
|
backButtonName?: string | undefined;
|
|
70
70
|
onBackButtonClick?: (() => void) | undefined;
|
|
71
|
+
hideDownloadButton?: boolean | undefined;
|
|
72
|
+
onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
|
|
71
73
|
invoiceQuoteViewComponent?: import("react").ReactNode;
|
|
72
74
|
onInvoiceDownloadError?: (() => void) | undefined;
|
|
73
|
-
hideDownloadButton?: boolean | undefined;
|
|
74
75
|
}>;
|
|
75
76
|
export declare const CustomClassName: import("@storybook/csf").StoryAnnotations<import("@storybook/react/dist/types-a5624094").R, {
|
|
76
77
|
id?: string | undefined;
|
|
@@ -84,16 +85,16 @@ export declare const CustomClassName: import("@storybook/csf").StoryAnnotations<
|
|
|
84
85
|
className?: string | undefined;
|
|
85
86
|
hideDownloadButton?: boolean | undefined;
|
|
86
87
|
}, {
|
|
88
|
+
entityId?: string | undefined;
|
|
87
89
|
className?: string | undefined;
|
|
88
90
|
id?: string | undefined;
|
|
89
|
-
entityId?: string | undefined;
|
|
90
91
|
shadow?: import("../../types/shadowType").ShadowType | undefined;
|
|
91
|
-
onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
|
|
92
92
|
backButtonName?: string | undefined;
|
|
93
93
|
onBackButtonClick?: (() => void) | undefined;
|
|
94
|
+
hideDownloadButton?: boolean | undefined;
|
|
95
|
+
onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
|
|
94
96
|
invoiceQuoteViewComponent?: import("react").ReactNode;
|
|
95
97
|
onInvoiceDownloadError?: (() => void) | undefined;
|
|
96
|
-
hideDownloadButton?: boolean | undefined;
|
|
97
98
|
}>;
|
|
98
99
|
export declare const HideDownloadButton: Story;
|
|
99
100
|
export declare const AcceptedQuote: Story;
|
|
@@ -110,14 +111,14 @@ export declare const DarkMode: import("@storybook/csf").StoryAnnotations<import(
|
|
|
110
111
|
className?: string | undefined;
|
|
111
112
|
hideDownloadButton?: boolean | undefined;
|
|
112
113
|
}, {
|
|
114
|
+
entityId?: string | undefined;
|
|
113
115
|
className?: string | undefined;
|
|
114
116
|
id?: string | undefined;
|
|
115
|
-
entityId?: string | undefined;
|
|
116
117
|
shadow?: import("../../types/shadowType").ShadowType | undefined;
|
|
117
|
-
onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
|
|
118
118
|
backButtonName?: string | undefined;
|
|
119
119
|
onBackButtonClick?: (() => void) | undefined;
|
|
120
|
+
hideDownloadButton?: boolean | undefined;
|
|
121
|
+
onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
|
|
120
122
|
invoiceQuoteViewComponent?: import("react").ReactNode;
|
|
121
123
|
onInvoiceDownloadError?: (() => void) | undefined;
|
|
122
|
-
hideDownloadButton?: boolean | undefined;
|
|
123
124
|
}>;
|
package/package.json
CHANGED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
2
|
-
declare const PageHeaderWithActions: ({ children, title, className, }: {
|
|
3
|
-
children?: ReactNode | ReactNode[];
|
|
4
|
-
title?: string | ReactNode;
|
|
5
|
-
className?: string | undefined;
|
|
6
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export default PageHeaderWithActions;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
declare const ChangeQuantitiesButton: ({ canShowChangeQuantitiesButton, setQuantityDrawerOpen, }: {
|
|
2
|
-
canShowChangeQuantitiesButton: boolean;
|
|
3
|
-
setQuantityDrawerOpen: (value: boolean) => void;
|
|
4
|
-
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
5
|
-
export default ChangeQuantitiesButton;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Subscription } from "@bunnyapp/common";
|
|
2
|
-
declare const HideExpiredToggle: ({ hideExpired, setHideExpired, subscriptions, }: {
|
|
3
|
-
hideExpired: boolean;
|
|
4
|
-
setHideExpired: (value: boolean) => void;
|
|
5
|
-
subscriptions?: Subscription[] | undefined;
|
|
6
|
-
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
-
export default HideExpiredToggle;
|
package/dist/cjs/src/components/Subscriptions/subscriptionsList/SubscriptionsNavigation.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Subscription } from "@bunnyapp/common";
|
|
2
|
-
declare const SubscriptionsNavigation: ({ hideExpired, setHideExpired, setQuantityDrawerOpen, subscriptions, }: {
|
|
3
|
-
hideExpired: boolean;
|
|
4
|
-
setHideExpired: (value: boolean) => void;
|
|
5
|
-
setQuantityDrawerOpen: (value: boolean) => void;
|
|
6
|
-
subscriptions: Subscription[];
|
|
7
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export default SubscriptionsNavigation;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
2
|
-
declare const PageHeaderWithActions: ({ children, title, className, }: {
|
|
3
|
-
children?: ReactNode | ReactNode[];
|
|
4
|
-
title?: string | ReactNode;
|
|
5
|
-
className?: string | undefined;
|
|
6
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export default PageHeaderWithActions;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
declare const ChangeQuantitiesButton: ({ canShowChangeQuantitiesButton, setQuantityDrawerOpen, }: {
|
|
2
|
-
canShowChangeQuantitiesButton: boolean;
|
|
3
|
-
setQuantityDrawerOpen: (value: boolean) => void;
|
|
4
|
-
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
5
|
-
export default ChangeQuantitiesButton;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Subscription } from "@bunnyapp/common";
|
|
2
|
-
declare const HideExpiredToggle: ({ hideExpired, setHideExpired, subscriptions, }: {
|
|
3
|
-
hideExpired: boolean;
|
|
4
|
-
setHideExpired: (value: boolean) => void;
|
|
5
|
-
subscriptions?: Subscription[] | undefined;
|
|
6
|
-
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
-
export default HideExpiredToggle;
|
package/dist/esm/src/components/Subscriptions/subscriptionsList/SubscriptionsNavigation.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Subscription } from "@bunnyapp/common";
|
|
2
|
-
declare const SubscriptionsNavigation: ({ hideExpired, setHideExpired, setQuantityDrawerOpen, subscriptions, }: {
|
|
3
|
-
hideExpired: boolean;
|
|
4
|
-
setHideExpired: (value: boolean) => void;
|
|
5
|
-
setQuantityDrawerOpen: (value: boolean) => void;
|
|
6
|
-
subscriptions: Subscription[];
|
|
7
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export default SubscriptionsNavigation;
|