@bunnyapp/components 1.0.24 → 1.0.26
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
|
@@ -2092,7 +2092,7 @@ function usePay(_a) {
|
|
|
2092
2092
|
return { pay: pay };
|
|
2093
2093
|
}
|
|
2094
2094
|
|
|
2095
|
-
var
|
|
2095
|
+
var handleAllErrorFormats = common.useAllErrorFormats();
|
|
2096
2096
|
var ActualCheckoutFooter = function (_a) {
|
|
2097
2097
|
var quote = _a.quote, invoice = _a.invoice, onPaymentSuccess = _a.onPaymentSuccess, noPadding = _a.noPadding, plugin = _a.plugin;
|
|
2098
2098
|
var isMobile = common.useIsMobile();
|
|
@@ -2105,7 +2105,7 @@ var ActualCheckoutFooter = function (_a) {
|
|
|
2105
2105
|
onPaymentSuccess: onPaymentSuccess,
|
|
2106
2106
|
onPaymentError: function (error) {
|
|
2107
2107
|
setIsPaying(false);
|
|
2108
|
-
|
|
2108
|
+
handleAllErrorFormats(error);
|
|
2109
2109
|
},
|
|
2110
2110
|
quote: quote,
|
|
2111
2111
|
invoice: invoice,
|
|
@@ -2116,7 +2116,7 @@ var ActualCheckoutFooter = function (_a) {
|
|
|
2116
2116
|
onPaymentSuccess: onPaymentSuccess,
|
|
2117
2117
|
onPaymentError: function (error) {
|
|
2118
2118
|
setIsPaying(false);
|
|
2119
|
-
|
|
2119
|
+
handleAllErrorFormats(error);
|
|
2120
2120
|
},
|
|
2121
2121
|
quote: quote,
|
|
2122
2122
|
invoice: invoice,
|
|
@@ -4808,7 +4808,7 @@ var Subscriptions = function (_a) {
|
|
|
4808
4808
|
var _d = reactQuery.useQuery({
|
|
4809
4809
|
queryKey: common.QueryKeyFactory.default.createTableKey("subscriptions"),
|
|
4810
4810
|
queryFn: function () { return getSubscriptions({ entityId: entityId, token: token, apiHost: apiHost }); },
|
|
4811
|
-
enabled:
|
|
4811
|
+
enabled: Boolean(entityId),
|
|
4812
4812
|
}), rawSubscriptions = _d.data, subscriptionsAreLoading = _d.isLoading;
|
|
4813
4813
|
var _e = reactQuery.useQuery({
|
|
4814
4814
|
queryKey: common.QueryKeyFactory.default.planChangeOptionsKey(),
|
|
@@ -4,7 +4,7 @@ import Quote from "./Quote";
|
|
|
4
4
|
declare const meta: Meta<typeof Quote>;
|
|
5
5
|
export default meta;
|
|
6
6
|
type Story = StoryObj<typeof meta>;
|
|
7
|
-
export declare const Default: import("@storybook/csf").StoryAnnotations<import("@storybook/react/dist/types-a5624094").R, {
|
|
7
|
+
export declare const Default: import("@storybook/core/csf").StoryAnnotations<import("@storybook/react/dist/types-a5624094").R, {
|
|
8
8
|
id?: string | undefined;
|
|
9
9
|
invoiceQuoteViewComponent?: import("react").ReactNode;
|
|
10
10
|
backButtonName?: string | undefined;
|
|
@@ -31,7 +31,7 @@ export declare const Default: import("@storybook/csf").StoryAnnotations<import("
|
|
|
31
31
|
onInvoiceLoaded?: ((formattedInvoice: import("@bunnyapp/common").FormattedInvoice) => void) | undefined;
|
|
32
32
|
onQuoteLoaded?: ((formattedQuote: import("@bunnyapp/common").FormattedQuote) => void) | undefined;
|
|
33
33
|
}>;
|
|
34
|
-
export declare const NoShadow: import("@storybook/csf").StoryAnnotations<import("@storybook/react/dist/types-a5624094").R, {
|
|
34
|
+
export declare const NoShadow: import("@storybook/core/csf").StoryAnnotations<import("@storybook/react/dist/types-a5624094").R, {
|
|
35
35
|
id?: string | undefined;
|
|
36
36
|
invoiceQuoteViewComponent?: import("react").ReactNode;
|
|
37
37
|
backButtonName?: string | undefined;
|
|
@@ -58,7 +58,7 @@ export declare const NoShadow: import("@storybook/csf").StoryAnnotations<import(
|
|
|
58
58
|
onInvoiceLoaded?: ((formattedInvoice: import("@bunnyapp/common").FormattedInvoice) => void) | undefined;
|
|
59
59
|
onQuoteLoaded?: ((formattedQuote: import("@bunnyapp/common").FormattedQuote) => void) | undefined;
|
|
60
60
|
}>;
|
|
61
|
-
export declare const Mobile: import("@storybook/csf").StoryAnnotations<import("@storybook/react/dist/types-a5624094").R, {
|
|
61
|
+
export declare const Mobile: import("@storybook/core/csf").StoryAnnotations<import("@storybook/react/dist/types-a5624094").R, {
|
|
62
62
|
id?: string | undefined;
|
|
63
63
|
invoiceQuoteViewComponent?: import("react").ReactNode;
|
|
64
64
|
backButtonName?: string | undefined;
|
|
@@ -85,7 +85,7 @@ export declare const Mobile: import("@storybook/csf").StoryAnnotations<import("@
|
|
|
85
85
|
onInvoiceLoaded?: ((formattedInvoice: import("@bunnyapp/common").FormattedInvoice) => void) | undefined;
|
|
86
86
|
onQuoteLoaded?: ((formattedQuote: import("@bunnyapp/common").FormattedQuote) => void) | undefined;
|
|
87
87
|
}>;
|
|
88
|
-
export declare const CustomClassName: import("@storybook/csf").StoryAnnotations<import("@storybook/react/dist/types-a5624094").R, {
|
|
88
|
+
export declare const CustomClassName: import("@storybook/core/csf").StoryAnnotations<import("@storybook/react/dist/types-a5624094").R, {
|
|
89
89
|
id?: string | undefined;
|
|
90
90
|
invoiceQuoteViewComponent?: import("react").ReactNode;
|
|
91
91
|
backButtonName?: string | undefined;
|
|
@@ -115,7 +115,7 @@ export declare const CustomClassName: import("@storybook/csf").StoryAnnotations<
|
|
|
115
115
|
export declare const HideDownloadButton: Story;
|
|
116
116
|
export declare const AcceptedQuote: Story;
|
|
117
117
|
export declare const AcceptedQuoteDarkMode: Story;
|
|
118
|
-
export declare const DarkMode: import("@storybook/csf").StoryAnnotations<import("@storybook/react/dist/types-a5624094").R, {
|
|
118
|
+
export declare const DarkMode: import("@storybook/core/csf").StoryAnnotations<import("@storybook/react/dist/types-a5624094").R, {
|
|
119
119
|
id?: string | undefined;
|
|
120
120
|
invoiceQuoteViewComponent?: import("react").ReactNode;
|
|
121
121
|
backButtonName?: string | undefined;
|
package/dist/esm/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import React__default, { createContext, useContext, useEffect, useState, useMemo
|
|
|
4
4
|
import { Markup } from 'interweave';
|
|
5
5
|
import { ConfigProvider, Button, Typography, Tag, Divider, Popconfirm, Input, Checkbox, Collapse, Modal, Form, Drawer, Card as Card$1, Select, Image, Dropdown, Skeleton } from 'antd';
|
|
6
6
|
import styled from 'styled-components';
|
|
7
|
-
import { DEFAULT_ACCENT_COLOR, DEFAULT_BRAND_COLOR, DEFAULT_SECONDARY_COLOR, DEFAULT_TOP_NAV_IMAGE_URL, gqlRequest as gqlRequest$1, QueryKeyFactory, useIsMobile, isColorTooDark, MARK_PRO, INPUT_BORDER_COLOR, SLATE_50, SLATE_400, SLATE_200, getPlugins, DEFAULT_CONFIG,
|
|
7
|
+
import { DEFAULT_ACCENT_COLOR, DEFAULT_BRAND_COLOR, DEFAULT_SECONDARY_COLOR, DEFAULT_TOP_NAV_IMAGE_URL, gqlRequest as gqlRequest$1, QueryKeyFactory, useIsMobile, isColorTooDark, MARK_PRO, INPUT_BORDER_COLOR, SLATE_50, SLATE_400, SLATE_200, getPlugins, DEFAULT_CONFIG, useAllErrorFormats, formatCurrency, invokePlugin, GRAY_500, GRAY_200, useErrorNotification, useSuccessNotification, getFormattedInvoice, PAYABLE_INVOICE_STATES, BreakpointNumbers, useGraphQLmutation, formatDate, FrontendTransaction, SLATE_600, WHITE, TransactionKind, Lists, getAccount, SubscriptionChargeKind, SubscriptionState as SubscriptionState$2, MODAL_MAX_HEIGHT, SLATE_500, StringUtils, DataInterval, TAG_COLORS, PricingModel, ChargeType } from '@bunnyapp/common';
|
|
8
8
|
import { QueryClient, QueryClientProvider, useQuery, useQueryClient, keepPreviousData, useMutation } from '@tanstack/react-query';
|
|
9
9
|
import theme from 'antd/lib/theme';
|
|
10
10
|
import { RecoilRoot } from 'recoil';
|
|
@@ -2063,7 +2063,7 @@ function usePay(_a) {
|
|
|
2063
2063
|
return { pay: pay };
|
|
2064
2064
|
}
|
|
2065
2065
|
|
|
2066
|
-
var
|
|
2066
|
+
var handleAllErrorFormats = useAllErrorFormats();
|
|
2067
2067
|
var ActualCheckoutFooter = function (_a) {
|
|
2068
2068
|
var quote = _a.quote, invoice = _a.invoice, onPaymentSuccess = _a.onPaymentSuccess, noPadding = _a.noPadding, plugin = _a.plugin;
|
|
2069
2069
|
var isMobile = useIsMobile();
|
|
@@ -2076,7 +2076,7 @@ var ActualCheckoutFooter = function (_a) {
|
|
|
2076
2076
|
onPaymentSuccess: onPaymentSuccess,
|
|
2077
2077
|
onPaymentError: function (error) {
|
|
2078
2078
|
setIsPaying(false);
|
|
2079
|
-
|
|
2079
|
+
handleAllErrorFormats(error);
|
|
2080
2080
|
},
|
|
2081
2081
|
quote: quote,
|
|
2082
2082
|
invoice: invoice,
|
|
@@ -2087,7 +2087,7 @@ var ActualCheckoutFooter = function (_a) {
|
|
|
2087
2087
|
onPaymentSuccess: onPaymentSuccess,
|
|
2088
2088
|
onPaymentError: function (error) {
|
|
2089
2089
|
setIsPaying(false);
|
|
2090
|
-
|
|
2090
|
+
handleAllErrorFormats(error);
|
|
2091
2091
|
},
|
|
2092
2092
|
quote: quote,
|
|
2093
2093
|
invoice: invoice,
|
|
@@ -4779,7 +4779,7 @@ var Subscriptions = function (_a) {
|
|
|
4779
4779
|
var _d = useQuery({
|
|
4780
4780
|
queryKey: QueryKeyFactory.default.createTableKey("subscriptions"),
|
|
4781
4781
|
queryFn: function () { return getSubscriptions({ entityId: entityId, token: token, apiHost: apiHost }); },
|
|
4782
|
-
enabled:
|
|
4782
|
+
enabled: Boolean(entityId),
|
|
4783
4783
|
}), rawSubscriptions = _d.data, subscriptionsAreLoading = _d.isLoading;
|
|
4784
4784
|
var _e = useQuery({
|
|
4785
4785
|
queryKey: QueryKeyFactory.default.planChangeOptionsKey(),
|
|
@@ -4,7 +4,7 @@ import Quote from "./Quote";
|
|
|
4
4
|
declare const meta: Meta<typeof Quote>;
|
|
5
5
|
export default meta;
|
|
6
6
|
type Story = StoryObj<typeof meta>;
|
|
7
|
-
export declare const Default: import("@storybook/csf").StoryAnnotations<import("@storybook/react/dist/types-a5624094").R, {
|
|
7
|
+
export declare const Default: import("@storybook/core/csf").StoryAnnotations<import("@storybook/react/dist/types-a5624094").R, {
|
|
8
8
|
id?: string | undefined;
|
|
9
9
|
invoiceQuoteViewComponent?: import("react").ReactNode;
|
|
10
10
|
backButtonName?: string | undefined;
|
|
@@ -31,7 +31,7 @@ export declare const Default: import("@storybook/csf").StoryAnnotations<import("
|
|
|
31
31
|
onInvoiceLoaded?: ((formattedInvoice: import("@bunnyapp/common").FormattedInvoice) => void) | undefined;
|
|
32
32
|
onQuoteLoaded?: ((formattedQuote: import("@bunnyapp/common").FormattedQuote) => void) | undefined;
|
|
33
33
|
}>;
|
|
34
|
-
export declare const NoShadow: import("@storybook/csf").StoryAnnotations<import("@storybook/react/dist/types-a5624094").R, {
|
|
34
|
+
export declare const NoShadow: import("@storybook/core/csf").StoryAnnotations<import("@storybook/react/dist/types-a5624094").R, {
|
|
35
35
|
id?: string | undefined;
|
|
36
36
|
invoiceQuoteViewComponent?: import("react").ReactNode;
|
|
37
37
|
backButtonName?: string | undefined;
|
|
@@ -58,7 +58,7 @@ export declare const NoShadow: import("@storybook/csf").StoryAnnotations<import(
|
|
|
58
58
|
onInvoiceLoaded?: ((formattedInvoice: import("@bunnyapp/common").FormattedInvoice) => void) | undefined;
|
|
59
59
|
onQuoteLoaded?: ((formattedQuote: import("@bunnyapp/common").FormattedQuote) => void) | undefined;
|
|
60
60
|
}>;
|
|
61
|
-
export declare const Mobile: import("@storybook/csf").StoryAnnotations<import("@storybook/react/dist/types-a5624094").R, {
|
|
61
|
+
export declare const Mobile: import("@storybook/core/csf").StoryAnnotations<import("@storybook/react/dist/types-a5624094").R, {
|
|
62
62
|
id?: string | undefined;
|
|
63
63
|
invoiceQuoteViewComponent?: import("react").ReactNode;
|
|
64
64
|
backButtonName?: string | undefined;
|
|
@@ -85,7 +85,7 @@ export declare const Mobile: import("@storybook/csf").StoryAnnotations<import("@
|
|
|
85
85
|
onInvoiceLoaded?: ((formattedInvoice: import("@bunnyapp/common").FormattedInvoice) => void) | undefined;
|
|
86
86
|
onQuoteLoaded?: ((formattedQuote: import("@bunnyapp/common").FormattedQuote) => void) | undefined;
|
|
87
87
|
}>;
|
|
88
|
-
export declare const CustomClassName: import("@storybook/csf").StoryAnnotations<import("@storybook/react/dist/types-a5624094").R, {
|
|
88
|
+
export declare const CustomClassName: import("@storybook/core/csf").StoryAnnotations<import("@storybook/react/dist/types-a5624094").R, {
|
|
89
89
|
id?: string | undefined;
|
|
90
90
|
invoiceQuoteViewComponent?: import("react").ReactNode;
|
|
91
91
|
backButtonName?: string | undefined;
|
|
@@ -115,7 +115,7 @@ export declare const CustomClassName: import("@storybook/csf").StoryAnnotations<
|
|
|
115
115
|
export declare const HideDownloadButton: Story;
|
|
116
116
|
export declare const AcceptedQuote: Story;
|
|
117
117
|
export declare const AcceptedQuoteDarkMode: Story;
|
|
118
|
-
export declare const DarkMode: import("@storybook/csf").StoryAnnotations<import("@storybook/react/dist/types-a5624094").R, {
|
|
118
|
+
export declare const DarkMode: import("@storybook/core/csf").StoryAnnotations<import("@storybook/react/dist/types-a5624094").R, {
|
|
119
119
|
id?: string | undefined;
|
|
120
120
|
invoiceQuoteViewComponent?: import("react").ReactNode;
|
|
121
121
|
backButtonName?: string | undefined;
|
package/package.json
CHANGED