@bunnyapp/components 1.6.0-beta.20 → 1.6.0-beta.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 +101 -77
- package/dist/cjs/types/src/components/PaymentForm/context/PaymentProvider.d.ts +3 -2
- package/dist/cjs/types/src/components/PaymentForm/hooks/useHandlePayment.d.ts +1 -0
- package/dist/cjs/types/src/components/PaymentForm/hooks/usePaymentButtonText.d.ts +1 -0
- package/dist/cjs/types/src/components/Quotes/Quotes.d.ts +3 -3
- package/dist/cjs/types/src/graphql/queries/getFormattedQuote.d.ts +139 -1
- package/dist/esm/index.js +103 -79
- package/dist/esm/types/src/components/PaymentForm/context/PaymentProvider.d.ts +3 -2
- package/dist/esm/types/src/components/PaymentForm/hooks/useHandlePayment.d.ts +1 -0
- package/dist/esm/types/src/components/PaymentForm/hooks/usePaymentButtonText.d.ts +1 -0
- package/dist/esm/types/src/components/Quotes/Quotes.d.ts +3 -3
- package/dist/esm/types/src/graphql/queries/getFormattedQuote.d.ts +139 -1
- package/dist/index.d.ts +3 -3
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FormattedInvoice, Invoice, Quote } from '@bunnyapp/common';
|
|
2
2
|
import { PaymentType } from '../types/PaymentType';
|
|
3
|
-
declare const
|
|
3
|
+
declare const useFormattedAmountDue: () => string | undefined;
|
|
4
4
|
declare const usePaymentType: () => PaymentType | undefined;
|
|
5
5
|
declare const useIsPaying: () => boolean | undefined;
|
|
6
6
|
declare const useHandlePaymentFormSubmit: () => (demoPayCardDetails?: {
|
|
@@ -9,8 +9,9 @@ declare const useHandlePaymentFormSubmit: () => (demoPayCardDetails?: {
|
|
|
9
9
|
cvc: string;
|
|
10
10
|
}) => Promise<void>;
|
|
11
11
|
declare const useIsSaving: () => boolean | undefined;
|
|
12
|
+
declare const useIsPaid: () => boolean | undefined;
|
|
12
13
|
declare const useAccountId: () => string | undefined;
|
|
13
|
-
export { useAccountId,
|
|
14
|
+
export { useAccountId, useFormattedAmountDue, useHandlePaymentFormSubmit, useIsPaying, useIsSaving, useIsPaid, usePaymentType, };
|
|
14
15
|
export declare function PaymentProvider({ children, accountId, quote, invoice, onPaymentSuccess, onPaymentHoldSuccess, paymentHoldOptions, onSavePaymentMethod, }: {
|
|
15
16
|
children: React.ReactNode;
|
|
16
17
|
accountId?: string;
|
|
@@ -18,6 +18,7 @@ declare const useHandlePayment: ({ quote, invoice, onPaymentSuccess, onPaymentHo
|
|
|
18
18
|
savePaymentMethod: boolean | undefined;
|
|
19
19
|
}, Error, void, unknown>;
|
|
20
20
|
isPaying: boolean;
|
|
21
|
+
isPaid: boolean;
|
|
21
22
|
paymentType: PaymentType;
|
|
22
23
|
formattedAmountDue: string | undefined;
|
|
23
24
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function usePaymentButtonText(): string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Transaction } from '@bunnyapp/common';
|
|
2
2
|
import { ShadowType } from '../../types/shadowType';
|
|
3
3
|
import { TransactionListColumnType } from '../Transactions/transactionsList/TransactionsListDesktop';
|
|
4
|
-
declare function Quotes({ className, columns, filter, filterQuotes, sort, noQuotesMessage, onQuoteClick,
|
|
5
|
-
/**
|
|
6
|
-
|
|
4
|
+
declare function Quotes({ className, columns, filter, filterQuotes, sort, noQuotesMessage, onQuoteClick, renderQuote, searchBarClassName, shadow, showSearchBar, showTitle, title, style, suppressQuoteDisplay, useModal, }: {
|
|
5
|
+
/** Render a custom quote component. Receives the quoteId as a parameter. */
|
|
6
|
+
renderQuote?: (quote: Transaction) => React.ReactNode;
|
|
7
7
|
/** Whether to show the search bar */
|
|
8
8
|
showSearchBar?: boolean;
|
|
9
9
|
/** Whether to show the title */
|
|
@@ -2,5 +2,143 @@ declare const getFormattedQuote: ({ token, apiHost, id, }: {
|
|
|
2
2
|
apiHost: string;
|
|
3
3
|
token?: string;
|
|
4
4
|
id?: string;
|
|
5
|
-
}) => Promise<
|
|
5
|
+
}) => Promise<{
|
|
6
|
+
quote: {
|
|
7
|
+
documentTemplateId: string | null;
|
|
8
|
+
documents: {
|
|
9
|
+
id: string;
|
|
10
|
+
filename: string;
|
|
11
|
+
size: string;
|
|
12
|
+
date: unknown;
|
|
13
|
+
url: string;
|
|
14
|
+
}[] | null;
|
|
15
|
+
firstInvoice: {
|
|
16
|
+
id: string | null;
|
|
17
|
+
state: "FAILED" | "DRAFT" | "NOT_DUE" | "DUE" | "UNPAID" | "PAID" | "VOIDED" | "READY" | "PREPARING" | "PROCESSING_PAYMENT" | "MERGED" | "QUEUED" | "CONSOLIDATED";
|
|
18
|
+
} | null;
|
|
19
|
+
payableId: string | null;
|
|
20
|
+
id: string | null;
|
|
21
|
+
payToAccept: boolean | null;
|
|
22
|
+
currentPaymentHold: {
|
|
23
|
+
createdAt: unknown;
|
|
24
|
+
expiresAt: unknown;
|
|
25
|
+
id: string | null;
|
|
26
|
+
updatedAt: unknown;
|
|
27
|
+
paymentMethod: {
|
|
28
|
+
accountId: string | null;
|
|
29
|
+
createdAt: unknown;
|
|
30
|
+
expirationDate: unknown;
|
|
31
|
+
failureCode: string | null;
|
|
32
|
+
id: string;
|
|
33
|
+
isDefault: boolean | null;
|
|
34
|
+
lastSuccess: unknown;
|
|
35
|
+
paymentType: "ach" | "card" | "other" | "wire" | null;
|
|
36
|
+
pluginId: string | null;
|
|
37
|
+
state: "UNKNOWN" | "SUCCESS" | "FAILED" | null;
|
|
38
|
+
updatedAt: unknown;
|
|
39
|
+
metadata: {
|
|
40
|
+
description: string | null;
|
|
41
|
+
expiration: unknown;
|
|
42
|
+
icon: string | null;
|
|
43
|
+
identifier: string | null;
|
|
44
|
+
issuer: string | null;
|
|
45
|
+
kind: string | null;
|
|
46
|
+
} | null;
|
|
47
|
+
} | null;
|
|
48
|
+
} | null;
|
|
49
|
+
};
|
|
50
|
+
payableId: string | null;
|
|
51
|
+
acceptedAt: unknown;
|
|
52
|
+
acceptedByName: string | null;
|
|
53
|
+
amount: number;
|
|
54
|
+
amountDue: number;
|
|
55
|
+
amountsByPeriod: {
|
|
56
|
+
id: string | null;
|
|
57
|
+
name: string | null;
|
|
58
|
+
amount: number | null;
|
|
59
|
+
}[];
|
|
60
|
+
billingCity: string | null;
|
|
61
|
+
billingCountry: string | null;
|
|
62
|
+
billingState: string | null;
|
|
63
|
+
billingStreet: string | null;
|
|
64
|
+
billingZip: string | null;
|
|
65
|
+
contactName: string | null;
|
|
66
|
+
currency: string | null;
|
|
67
|
+
customerBillingCity: string | null;
|
|
68
|
+
customerBillingCountry: string | null;
|
|
69
|
+
customerBillingState: string | null;
|
|
70
|
+
customerBillingStreet: string | null;
|
|
71
|
+
customerBillingZip: string | null;
|
|
72
|
+
customerName: string | null;
|
|
73
|
+
discount: number;
|
|
74
|
+
discountValue: number;
|
|
75
|
+
duration: string | null;
|
|
76
|
+
endDate: unknown;
|
|
77
|
+
expiresAt: unknown;
|
|
78
|
+
html: string | null;
|
|
79
|
+
formattedLines: {
|
|
80
|
+
amount: number;
|
|
81
|
+
amountsByPeriod: {
|
|
82
|
+
quantity: number | null;
|
|
83
|
+
id: string | null;
|
|
84
|
+
name: string | null;
|
|
85
|
+
startDate: unknown;
|
|
86
|
+
endDate: unknown;
|
|
87
|
+
amount: number | null;
|
|
88
|
+
amountsByTier: {
|
|
89
|
+
id: string | null;
|
|
90
|
+
tier: {
|
|
91
|
+
starts: number | null;
|
|
92
|
+
ends: number | null;
|
|
93
|
+
price: number | null;
|
|
94
|
+
} | null;
|
|
95
|
+
quantity: number | null;
|
|
96
|
+
amount: number | null;
|
|
97
|
+
}[] | null;
|
|
98
|
+
prorationRate: number | null;
|
|
99
|
+
}[];
|
|
100
|
+
billingPeriodEnd: string | null;
|
|
101
|
+
billingPeriodStart: string | null;
|
|
102
|
+
chargeType: string;
|
|
103
|
+
discount: number | null;
|
|
104
|
+
frequency: string;
|
|
105
|
+
isRamp: boolean;
|
|
106
|
+
periods: number;
|
|
107
|
+
planName: string;
|
|
108
|
+
position: number;
|
|
109
|
+
price: number | null;
|
|
110
|
+
priceDecimals: number | null;
|
|
111
|
+
priceListChargeId: string | null;
|
|
112
|
+
priceListChargeName: string | null;
|
|
113
|
+
priceListId: string;
|
|
114
|
+
priceListName: string | null;
|
|
115
|
+
priceTiers: {
|
|
116
|
+
price: number | null;
|
|
117
|
+
starts: number;
|
|
118
|
+
}[] | null;
|
|
119
|
+
pricingModel: string;
|
|
120
|
+
productName: string;
|
|
121
|
+
prorationRate: number | null;
|
|
122
|
+
quantity: number | null;
|
|
123
|
+
showProductNameOnLineItem: boolean;
|
|
124
|
+
taxCode: string | null;
|
|
125
|
+
trialEndDate: unknown;
|
|
126
|
+
trialStartDate: unknown;
|
|
127
|
+
unitOfMeasure: string;
|
|
128
|
+
vatCode: string | null;
|
|
129
|
+
}[];
|
|
130
|
+
netPaymentDays: number | null;
|
|
131
|
+
notes: string | null;
|
|
132
|
+
number: string | null;
|
|
133
|
+
poNumberRequired: boolean | null;
|
|
134
|
+
salesContactEmail: string | null;
|
|
135
|
+
sharedAt: unknown;
|
|
136
|
+
startDate: unknown;
|
|
137
|
+
state: "DRAFT" | "SHARED" | "VIEWED" | "ACCEPTED" | "IN_APPROVAL" | "APPROVED" | "REJECTED" | "UNDONE";
|
|
138
|
+
subtotal: number;
|
|
139
|
+
taxAmount: number;
|
|
140
|
+
taxNumberLabel: string | null;
|
|
141
|
+
taxNumberRequired: boolean | null;
|
|
142
|
+
vendorName: string | null;
|
|
143
|
+
}>;
|
|
6
144
|
export default getFormattedQuote;
|
package/dist/index.d.ts
CHANGED
|
@@ -41,9 +41,9 @@ declare function Quote({ id, invoiceQuoteViewComponent, onInvoiceDownloadError,
|
|
|
41
41
|
|
|
42
42
|
type TransactionListColumnType = 'date' | 'title' | 'state' | 'amount' | 'download' | 'accountName';
|
|
43
43
|
|
|
44
|
-
declare function Quotes({ className, columns, filter, filterQuotes, sort, noQuotesMessage, onQuoteClick,
|
|
45
|
-
/**
|
|
46
|
-
|
|
44
|
+
declare function Quotes({ className, columns, filter, filterQuotes, sort, noQuotesMessage, onQuoteClick, renderQuote, searchBarClassName, shadow, showSearchBar, showTitle, title, style, suppressQuoteDisplay, useModal, }: {
|
|
45
|
+
/** Render a custom quote component. Receives the quoteId as a parameter. */
|
|
46
|
+
renderQuote?: (quote: Transaction) => React.ReactNode;
|
|
47
47
|
/** Whether to show the search bar */
|
|
48
48
|
showSearchBar?: boolean;
|
|
49
49
|
/** Whether to show the title */
|
package/package.json
CHANGED