@bunnyapp/components 1.8.0-beta.44 → 1.8.0-beta.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 +41 -41
- package/dist/cjs/types/src/components/index.d.ts +3 -2
- package/dist/cjs/types/src/components/tables/InfiniteTable/InfiniteResourceTable.d.ts +41 -0
- package/dist/cjs/types/src/components/tables/InfiniteTable/InfiniteTable.d.ts +29 -0
- package/dist/cjs/types/src/components/tables/InfiniteTable/InfiniteTableFooter.d.ts +9 -0
- package/dist/cjs/types/src/components/tables/InfiniteTable/InfiniteTableGridCell.d.ts +2 -0
- package/dist/cjs/types/src/components/tables/InfiniteTable/InfiniteTableHeader.d.ts +5 -0
- package/dist/cjs/types/src/components/tables/InfiniteTable/hooks/useAutoRowsPerPage.d.ts +11 -0
- package/dist/cjs/types/src/components/tables/InfiniteTable/hooks/useContainerWidth.d.ts +1 -0
- package/dist/cjs/types/src/components/tables/InfiniteTable/index.d.ts +4 -0
- package/dist/cjs/types/src/components/tables/InfiniteTable/types.d.ts +54 -0
- package/dist/cjs/types/src/components/tables/Invoices/Invoices.d.ts +25 -0
- package/dist/cjs/types/src/components/tables/Invoices/index.d.ts +1 -0
- package/dist/cjs/types/src/components/tables/Invoices/invoicesList/InvoiceMobileRow.d.ts +10 -0
- package/dist/cjs/types/src/components/tables/Invoices/invoicesList/getInvoiceColumns.d.ts +22 -0
- package/dist/cjs/types/src/components/tables/Quotes/Quotes.d.ts +20 -0
- package/dist/cjs/types/src/components/tables/Quotes/quotesList/QuoteMobileRow.d.ts +9 -0
- package/dist/cjs/types/src/components/tables/Quotes/quotesList/getQuoteColumns.d.ts +22 -0
- package/dist/cjs/types/src/components/tables/Transactions/Transactions.d.ts +26 -0
- package/dist/cjs/types/src/components/{Transactions → tables/Transactions}/Transactions.stories.d.ts +0 -3
- package/dist/cjs/types/src/components/tables/Transactions/transactionsList/TransactionDetail.d.ts +7 -0
- package/dist/cjs/types/src/components/tables/Transactions/transactionsList/TransactionMobileRow.d.ts +11 -0
- package/dist/cjs/types/src/components/tables/Transactions/transactionsList/getTransactionColumns.d.ts +16 -0
- package/dist/cjs/types/src/components/{Transactions → tables/Transactions}/transactionsList/utils.d.ts +1 -1
- package/dist/cjs/types/src/components/tables/Transactions/types.d.ts +1 -0
- package/dist/cjs/types/src/graphql/queries/getInvoices.d.ts +11 -0
- package/dist/cjs/types/src/graphql/queries/getQuotes.d.ts +8 -3
- package/dist/cjs/types/src/graphql/queries/getTransactions.d.ts +9 -1
- package/dist/cjs/types/src/graphql/queries/paginatedQuery.d.ts +22 -0
- package/dist/cjs/types/src/utils/QueryKeyFactory.d.ts +14 -2
- package/dist/esm/index.js +41 -41
- package/dist/esm/types/src/components/index.d.ts +3 -2
- package/dist/esm/types/src/components/tables/InfiniteTable/InfiniteResourceTable.d.ts +41 -0
- package/dist/esm/types/src/components/tables/InfiniteTable/InfiniteTable.d.ts +29 -0
- package/dist/esm/types/src/components/tables/InfiniteTable/InfiniteTableFooter.d.ts +9 -0
- package/dist/esm/types/src/components/tables/InfiniteTable/InfiniteTableGridCell.d.ts +2 -0
- package/dist/esm/types/src/components/tables/InfiniteTable/InfiniteTableHeader.d.ts +5 -0
- package/dist/esm/types/src/components/tables/InfiniteTable/hooks/useAutoRowsPerPage.d.ts +11 -0
- package/dist/esm/types/src/components/tables/InfiniteTable/hooks/useContainerWidth.d.ts +1 -0
- package/dist/esm/types/src/components/tables/InfiniteTable/index.d.ts +4 -0
- package/dist/esm/types/src/components/tables/InfiniteTable/types.d.ts +54 -0
- package/dist/esm/types/src/components/tables/Invoices/Invoices.d.ts +25 -0
- package/dist/esm/types/src/components/tables/Invoices/index.d.ts +1 -0
- package/dist/esm/types/src/components/tables/Invoices/invoicesList/InvoiceMobileRow.d.ts +10 -0
- package/dist/esm/types/src/components/tables/Invoices/invoicesList/getInvoiceColumns.d.ts +22 -0
- package/dist/esm/types/src/components/tables/Quotes/Quotes.d.ts +20 -0
- package/dist/esm/types/src/components/tables/Quotes/quotesList/QuoteMobileRow.d.ts +9 -0
- package/dist/esm/types/src/components/tables/Quotes/quotesList/getQuoteColumns.d.ts +22 -0
- package/dist/esm/types/src/components/tables/Transactions/Transactions.d.ts +26 -0
- package/dist/esm/types/src/components/{Transactions → tables/Transactions}/Transactions.stories.d.ts +0 -3
- package/dist/esm/types/src/components/tables/Transactions/transactionsList/TransactionDetail.d.ts +7 -0
- package/dist/esm/types/src/components/tables/Transactions/transactionsList/TransactionMobileRow.d.ts +11 -0
- package/dist/esm/types/src/components/tables/Transactions/transactionsList/getTransactionColumns.d.ts +16 -0
- package/dist/esm/types/src/components/{Transactions → tables/Transactions}/transactionsList/utils.d.ts +1 -1
- package/dist/esm/types/src/components/tables/Transactions/types.d.ts +1 -0
- package/dist/esm/types/src/graphql/queries/getInvoices.d.ts +11 -0
- package/dist/esm/types/src/graphql/queries/getQuotes.d.ts +8 -3
- package/dist/esm/types/src/graphql/queries/getTransactions.d.ts +9 -1
- package/dist/esm/types/src/graphql/queries/paginatedQuery.d.ts +22 -0
- package/dist/esm/types/src/utils/QueryKeyFactory.d.ts +14 -2
- package/dist/index.d.ts +92 -72
- package/package.json +1 -1
- package/dist/cjs/types/src/components/Quotes/Quotes.d.ts +0 -38
- package/dist/cjs/types/src/components/Transactions/Transactions.d.ts +0 -56
- package/dist/cjs/types/src/components/Transactions/transactionsList/TransactionGridCell.d.ts +0 -2
- package/dist/cjs/types/src/components/Transactions/transactionsList/TransactionsEmptyState.d.ts +0 -2
- package/dist/cjs/types/src/components/Transactions/transactionsList/TransactionsListDesktop.d.ts +0 -7
- package/dist/cjs/types/src/components/Transactions/transactionsList/TransactionsListMobile.d.ts +0 -6
- package/dist/cjs/types/src/contexts/TransactionsListContext.d.ts +0 -30
- package/dist/esm/types/src/components/Quotes/Quotes.d.ts +0 -38
- package/dist/esm/types/src/components/Transactions/Transactions.d.ts +0 -56
- package/dist/esm/types/src/components/Transactions/transactionsList/TransactionGridCell.d.ts +0 -2
- package/dist/esm/types/src/components/Transactions/transactionsList/TransactionsEmptyState.d.ts +0 -2
- package/dist/esm/types/src/components/Transactions/transactionsList/TransactionsListDesktop.d.ts +0 -7
- package/dist/esm/types/src/components/Transactions/transactionsList/TransactionsListMobile.d.ts +0 -6
- package/dist/esm/types/src/contexts/TransactionsListContext.d.ts +0 -30
- /package/dist/cjs/types/src/components/{Quotes → tables/Quotes}/Quotes.stories.d.ts +0 -0
- /package/dist/cjs/types/src/components/{Quotes → tables/Quotes}/index.d.ts +0 -0
- /package/dist/cjs/types/src/components/{Transactions → tables/Transactions}/index.d.ts +0 -0
- /package/dist/cjs/types/src/components/{Transactions → tables/Transactions}/transactionsList/TransactionDate.d.ts +0 -0
- /package/dist/cjs/types/src/components/{Transactions → tables/Transactions}/transactionsList/TransactionDownload.d.ts +0 -0
- /package/dist/cjs/types/src/components/{Transactions → tables/Transactions}/transactionsList/TransactionTitle.d.ts +0 -0
- /package/dist/esm/types/src/components/{Quotes → tables/Quotes}/Quotes.stories.d.ts +0 -0
- /package/dist/esm/types/src/components/{Quotes → tables/Quotes}/index.d.ts +0 -0
- /package/dist/esm/types/src/components/{Transactions → tables/Transactions}/index.d.ts +0 -0
- /package/dist/esm/types/src/components/{Transactions → tables/Transactions}/transactionsList/TransactionDate.d.ts +0 -0
- /package/dist/esm/types/src/components/{Transactions → tables/Transactions}/transactionsList/TransactionDownload.d.ts +0 -0
- /package/dist/esm/types/src/components/{Transactions → tables/Transactions}/transactionsList/TransactionTitle.d.ts +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import react__default, { ReactNode, ComponentProps } from 'react';
|
|
3
|
+
import Invoice$1 from '@/types/Invoice';
|
|
3
4
|
import * as gql_tada from 'gql.tada';
|
|
4
5
|
import { ResultOf, FragmentOf } from 'gql.tada';
|
|
5
6
|
import FormattedInvoice from '@/types/FormattedInvoice';
|
|
6
|
-
import {
|
|
7
|
+
import { Quote as Quote$1 } from '@/types/Quote';
|
|
7
8
|
import { QueryClient } from '@tanstack/react-query';
|
|
8
9
|
import { ThemeConfig } from 'antd';
|
|
10
|
+
import { Transaction } from '@/types/Transaction';
|
|
9
11
|
|
|
10
12
|
type ShadowType = "shadow-none" | "shadow-sm" | "shadow-md" | "shadow-lg" | "shadow-xl";
|
|
11
13
|
|
|
@@ -38,6 +40,64 @@ declare global {
|
|
|
38
40
|
}
|
|
39
41
|
}
|
|
40
42
|
|
|
43
|
+
/** Shared display options for the resource table wrappers (Invoices, Quotes, Transactions, ...). */
|
|
44
|
+
type TableDisplayOptions<ColumnKey extends string> = {
|
|
45
|
+
/** Whether to show the search bar */
|
|
46
|
+
showSearchBar?: boolean;
|
|
47
|
+
/** Whether to show the title */
|
|
48
|
+
showTitle?: boolean;
|
|
49
|
+
/** The title to display above the list */
|
|
50
|
+
title?: string;
|
|
51
|
+
/** The columns to display */
|
|
52
|
+
columns?: ColumnKey[];
|
|
53
|
+
/** A custom class name to apply to the component */
|
|
54
|
+
className?: string;
|
|
55
|
+
/** A custom style to apply to the component */
|
|
56
|
+
style?: React.CSSProperties;
|
|
57
|
+
/** Card shadow class */
|
|
58
|
+
shadow?: ShadowType;
|
|
59
|
+
/** Whether to open the row detail in a modal instead of a drawer */
|
|
60
|
+
useModal?: boolean;
|
|
61
|
+
/** A custom class name to apply to the search bar */
|
|
62
|
+
searchBarClassName?: string;
|
|
63
|
+
/** Message to display when the list is empty */
|
|
64
|
+
emptyMessage?: string;
|
|
65
|
+
};
|
|
66
|
+
/** Shared behavior options for the resource table wrappers. */
|
|
67
|
+
type TableBehaviorOptions = {
|
|
68
|
+
/** Whether to suppress the row detail drawer/modal on row click */
|
|
69
|
+
suppressDetail?: boolean;
|
|
70
|
+
/** Force a specific number of rows per page. When omitted the table
|
|
71
|
+
* auto-sizes based on the available viewport height. Must be between
|
|
72
|
+
* 1 and 100 (the API's per-request cap). */
|
|
73
|
+
rowsPerPage?: number;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
type InvoiceColumnKey = 'date' | 'title' | 'state' | 'amount' | 'download' | 'accountName';
|
|
77
|
+
type InvoiceDateType = 'createdAt' | 'issuedAt' | 'dueAt';
|
|
78
|
+
|
|
79
|
+
type InvoicesDisplayOptions = TableDisplayOptions<InvoiceColumnKey>;
|
|
80
|
+
type InvoicesBehaviorOptions = TableBehaviorOptions & {
|
|
81
|
+
/** The type of date to display for invoices. */
|
|
82
|
+
invoiceDateType?: InvoiceDateType;
|
|
83
|
+
/** Whether to hide the payment form on invoices */
|
|
84
|
+
hidePaymentForm?: boolean;
|
|
85
|
+
};
|
|
86
|
+
declare function Invoices({ invoiceComponent, onInvoiceClick, filter, sort, displayOptions, behaviorOptions, }: {
|
|
87
|
+
/** A custom component to render instead of the default invoice component */
|
|
88
|
+
invoiceComponent?: react__default.ReactNode;
|
|
89
|
+
/** A function to call when an invoice is clicked */
|
|
90
|
+
onInvoiceClick?: (invoice: Invoice$1) => void;
|
|
91
|
+
/** Filter expression applied server-side, e.g. `"invoice.amount is 100"`.
|
|
92
|
+
* Docs: https://docs.bunny.com/developer/getting-started/using-filters-in-queries
|
|
93
|
+
*/
|
|
94
|
+
filter?: string;
|
|
95
|
+
/** Sort clause applied server-side, e.g. `"createdAt DESC"` or `"amount ASC"`. */
|
|
96
|
+
sort?: string;
|
|
97
|
+
displayOptions?: InvoicesDisplayOptions;
|
|
98
|
+
behaviorOptions?: InvoicesBehaviorOptions;
|
|
99
|
+
}): react__default.JSX.Element;
|
|
100
|
+
|
|
41
101
|
declare const OnQuoteLoadedFragment: gql_tada.TadaDocumentNode<{
|
|
42
102
|
vendorName: string | null;
|
|
43
103
|
quote: {
|
|
@@ -56,41 +116,23 @@ type QuoteProps = InvoiceQuoteContextProps & {
|
|
|
56
116
|
};
|
|
57
117
|
declare function Quote({ id, invoiceQuoteViewComponent, onInvoiceDownloadError, onPaymentSuccess, shadow, className, hideDownloadButton, onQuoteLoaded, onQuoteAccepted, onQuoteUnavailableError, suppressQuoteUnavailableErrorNotification, }: QuoteProps): react.JSX.Element;
|
|
58
118
|
|
|
59
|
-
type
|
|
119
|
+
type QuoteColumnKey = 'date' | 'title' | 'state' | 'amount' | 'download' | 'accountName';
|
|
60
120
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
|
|
66
|
-
/** Whether to show the title */
|
|
67
|
-
showTitle?: boolean;
|
|
68
|
-
/** The title to display in the quotes list */
|
|
69
|
-
title?: string;
|
|
70
|
-
/** The columns to display in the quotes list */
|
|
71
|
-
columns?: TransactionListColumnType[];
|
|
72
|
-
/** A custom class name to apply to the component */
|
|
73
|
-
className?: string;
|
|
74
|
-
/** Whether to use a modal for the invoice drawer */
|
|
75
|
-
useModal?: boolean;
|
|
76
|
-
/** Whether to show a shadow around the transactions list */
|
|
77
|
-
shadow?: ShadowType;
|
|
78
|
-
/** A custom class name to apply to the search bar */
|
|
79
|
-
searchBarClassName?: string;
|
|
121
|
+
type QuotesDisplayOptions = TableDisplayOptions<QuoteColumnKey>;
|
|
122
|
+
type QuotesBehaviorOptions = TableBehaviorOptions;
|
|
123
|
+
declare function Quotes({ renderQuote, onQuoteClick, filter, sort, displayOptions, behaviorOptions, }: {
|
|
124
|
+
/** Render a custom quote component. Receives the quote as a parameter. */
|
|
125
|
+
renderQuote?: (quote: Quote$1) => React.ReactNode;
|
|
80
126
|
/** A function to call when a quote is clicked */
|
|
81
|
-
onQuoteClick?: (quote:
|
|
82
|
-
/**
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
style?: React.CSSProperties;
|
|
86
|
-
/** A filter to apply to the quotes. Docs on filter: https://docs.bunny.com/developer/getting-started/using-filters-in-queries */
|
|
127
|
+
onQuoteClick?: (quote: Quote$1) => void;
|
|
128
|
+
/** Filter expression applied server-side, e.g. `"quote.amount is 100"`.
|
|
129
|
+
* Docs: https://docs.bunny.com/developer/getting-started/using-filters-in-queries
|
|
130
|
+
*/
|
|
87
131
|
filter?: string;
|
|
88
|
-
/**
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
/** Message to display when there are no quotes */
|
|
93
|
-
noQuotesMessage?: string;
|
|
132
|
+
/** Sort clause applied server-side, e.g. `"createdAt DESC"` or `"amount ASC"`. */
|
|
133
|
+
sort?: string;
|
|
134
|
+
displayOptions?: QuotesDisplayOptions;
|
|
135
|
+
behaviorOptions?: QuotesBehaviorOptions;
|
|
94
136
|
}): react.JSX.Element;
|
|
95
137
|
|
|
96
138
|
type Props = {
|
|
@@ -270,50 +312,28 @@ declare function BunnyProvider({ children, darkMode, queryClient, apiHost, token
|
|
|
270
312
|
|
|
271
313
|
type TransactionDateType = 'createdAt' | 'issuedAt' | 'dueAt';
|
|
272
314
|
|
|
273
|
-
|
|
315
|
+
type TransactionListColumnType = 'date' | 'title' | 'state' | 'amount' | 'download' | 'accountName';
|
|
316
|
+
|
|
317
|
+
type TransactionsDisplayOptions = TableDisplayOptions<TransactionListColumnType>;
|
|
318
|
+
type TransactionsBehaviorOptions = TableBehaviorOptions & {
|
|
319
|
+
/** The type of date to display for transactions if applicable. Payments will always only show createdAt date. */
|
|
320
|
+
transactionDateType?: TransactionDateType;
|
|
321
|
+
/** Whether to hide the payment form on invoices */
|
|
322
|
+
hidePaymentForm?: boolean;
|
|
323
|
+
};
|
|
324
|
+
declare function Transactions({ transactionComponent, onTransactionClick, filter, sort, displayOptions, behaviorOptions, }: {
|
|
274
325
|
/** A custom component to render instead of the default invoice component */
|
|
275
326
|
transactionComponent?: react__default.ReactNode;
|
|
276
|
-
/** Whether to show the search bar */
|
|
277
|
-
showSearchBar?: boolean;
|
|
278
|
-
/** Whether to show the title */
|
|
279
|
-
showTitle?: boolean;
|
|
280
|
-
/** The title to display in the transactions list */
|
|
281
|
-
title?: string;
|
|
282
|
-
/** The columns to display in the transactions list */
|
|
283
|
-
columns?: TransactionListColumnType[];
|
|
284
|
-
/** A custom class name to apply to the component */
|
|
285
|
-
className?: string;
|
|
286
|
-
/** Whether to use a modal for the invoice drawer */
|
|
287
|
-
useModal?: boolean;
|
|
288
|
-
/** Whether to show a shadow around the transactions list */
|
|
289
|
-
shadow?: ShadowType;
|
|
290
|
-
/** A custom class name to apply to the search bar */
|
|
291
|
-
searchBarClassName?: string;
|
|
292
327
|
/** A function to call when a transaction is clicked */
|
|
293
328
|
onTransactionClick?: (transaction: Transaction) => void;
|
|
294
|
-
/**
|
|
295
|
-
|
|
296
|
-
/** The kinds of transactions to show */
|
|
297
|
-
kindsToShow?: TransactionKind[];
|
|
298
|
-
/** A custom style to apply to the component */
|
|
299
|
-
style?: react__default.CSSProperties;
|
|
300
|
-
/** A filter to apply to the transactions. Docs on filter: https://docs.bunny.com/developer/getting-started/using-filters-in-queries
|
|
301
|
-
* Filtering is applied on the api side, potentially speeding up the transactions query
|
|
329
|
+
/** Filter expression applied server-side, e.g. `"transaction.amount is 100"`.
|
|
330
|
+
* Docs: https://docs.bunny.com/developer/getting-started/using-filters-in-queries
|
|
302
331
|
*/
|
|
303
332
|
filter?: string;
|
|
304
|
-
/**
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
* This is useful to have more control over the filtering logic.
|
|
309
|
-
*/
|
|
310
|
-
filterTransactions?: (transaction: Transaction) => boolean;
|
|
311
|
-
/** A function to sort the transactions. Runs on the client side. */
|
|
312
|
-
sortTransactions?: (transactionA: Transaction, transactionB: Transaction) => number;
|
|
313
|
-
/** The type of date to display for transactions if applicable. Payments will always only show createdAt date. */
|
|
314
|
-
transactionDateType?: TransactionDateType;
|
|
315
|
-
/** Whether to hide the payment form on invoices */
|
|
316
|
-
hidePaymentForm?: boolean;
|
|
333
|
+
/** Sort clause applied server-side, e.g. `"createdAt DESC"` or `"amount ASC"`. */
|
|
334
|
+
sort?: string;
|
|
335
|
+
displayOptions?: TransactionsDisplayOptions;
|
|
336
|
+
behaviorOptions?: TransactionsBehaviorOptions;
|
|
317
337
|
}): react__default.JSX.Element;
|
|
318
338
|
|
|
319
339
|
declare const SubscriptionsWrapper: ({ handlePortalErrors, companyName, isInPreviewMode, productId, className, styles: userStyles, noSubscriptionsComponent, showInactiveSubscriptions, showInactiveSubscriptionsToggle, onPaymentMethodSaved, onPaymentMethodRemoved, onSubscriptionUpgradeClick, }: {
|
|
@@ -397,4 +417,4 @@ declare function MiniCreditCard({ className, buttons, hideDropdownMenu, hideDefa
|
|
|
397
417
|
id?: string;
|
|
398
418
|
}): react.JSX.Element;
|
|
399
419
|
|
|
400
|
-
export { BillingDetails, BunnyProvider, Footer, Invoice, MiniCreditCard, PaymentForm, Quote, Quotes, Signup, SubscriptionsWrapper as Subscriptions, Transactions, UpgradeWrapper as Upgrade };
|
|
420
|
+
export { BillingDetails, BunnyProvider, Footer, Invoice, Invoices, MiniCreditCard, PaymentForm, Quote, Quotes, Signup, SubscriptionsWrapper as Subscriptions, Transactions, UpgradeWrapper as Upgrade };
|
package/package.json
CHANGED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { Transaction } from '@/types/Transaction';
|
|
2
|
-
import { ShadowType } from '../../types/shadowType';
|
|
3
|
-
import { TransactionListColumnType } from '../Transactions/transactionsList/TransactionsListDesktop';
|
|
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
|
-
/** Whether to show the search bar */
|
|
8
|
-
showSearchBar?: boolean;
|
|
9
|
-
/** Whether to show the title */
|
|
10
|
-
showTitle?: boolean;
|
|
11
|
-
/** The title to display in the quotes list */
|
|
12
|
-
title?: string;
|
|
13
|
-
/** The columns to display in the quotes list */
|
|
14
|
-
columns?: TransactionListColumnType[];
|
|
15
|
-
/** A custom class name to apply to the component */
|
|
16
|
-
className?: string;
|
|
17
|
-
/** Whether to use a modal for the invoice drawer */
|
|
18
|
-
useModal?: boolean;
|
|
19
|
-
/** Whether to show a shadow around the transactions list */
|
|
20
|
-
shadow?: ShadowType;
|
|
21
|
-
/** A custom class name to apply to the search bar */
|
|
22
|
-
searchBarClassName?: string;
|
|
23
|
-
/** A function to call when a quote is clicked */
|
|
24
|
-
onQuoteClick?: (quote: Transaction) => void;
|
|
25
|
-
/** Whether to hide the display showing the quote */
|
|
26
|
-
suppressQuoteDisplay?: boolean;
|
|
27
|
-
/** A custom style to apply to the component */
|
|
28
|
-
style?: React.CSSProperties;
|
|
29
|
-
/** A filter to apply to the quotes. Docs on filter: https://docs.bunny.com/developer/getting-started/using-filters-in-queries */
|
|
30
|
-
filter?: string;
|
|
31
|
-
/** A function to filter the quotes. Runs on the client side. */
|
|
32
|
-
filterQuotes?: (quote: Transaction) => boolean;
|
|
33
|
-
/** A function to sort the quotes. Runs on the client side. */
|
|
34
|
-
sort?: (a: Transaction, b: Transaction) => number;
|
|
35
|
-
/** Message to display when there are no quotes */
|
|
36
|
-
noQuotesMessage?: string;
|
|
37
|
-
}): import("react").JSX.Element;
|
|
38
|
-
export default Quotes;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Transaction } from '@/types/Transaction';
|
|
3
|
-
import { TransactionKind } from '@/types/Transaction';
|
|
4
|
-
import { TransactionDateType } from '../../contexts/TransactionsListContext';
|
|
5
|
-
import { ShadowType } from '../../types/shadowType';
|
|
6
|
-
import { TransactionListColumnType } from './transactionsList/TransactionsListDesktop';
|
|
7
|
-
export default function Transactions({ transactionComponent, showSearchBar, showTitle, title, columns, className, shadow, searchBarClassName, useModal, onTransactionClick, suppressTransactionDisplay, kindsToShow, style, filter, noTransactionsMessage, filterTransactions, sortTransactions, transactionDateType, hidePaymentForm, }: {
|
|
8
|
-
/** A custom component to render instead of the default invoice component */
|
|
9
|
-
transactionComponent?: React.ReactNode;
|
|
10
|
-
/** Whether to show the search bar */
|
|
11
|
-
showSearchBar?: boolean;
|
|
12
|
-
/** Whether to show the title */
|
|
13
|
-
showTitle?: boolean;
|
|
14
|
-
/** The title to display in the transactions list */
|
|
15
|
-
title?: string;
|
|
16
|
-
/** The columns to display in the transactions list */
|
|
17
|
-
columns?: TransactionListColumnType[];
|
|
18
|
-
/** A custom class name to apply to the component */
|
|
19
|
-
className?: string;
|
|
20
|
-
/** Whether to use a modal for the invoice drawer */
|
|
21
|
-
useModal?: boolean;
|
|
22
|
-
/** Whether to show a shadow around the transactions list */
|
|
23
|
-
shadow?: ShadowType;
|
|
24
|
-
/** A custom class name to apply to the search bar */
|
|
25
|
-
searchBarClassName?: string;
|
|
26
|
-
/** A function to call when a transaction is clicked */
|
|
27
|
-
onTransactionClick?: (transaction: Transaction) => void;
|
|
28
|
-
/** Whether to hide the display showing the transaction */
|
|
29
|
-
suppressTransactionDisplay?: boolean;
|
|
30
|
-
/** The kinds of transactions to show */
|
|
31
|
-
kindsToShow?: TransactionKind[];
|
|
32
|
-
/** A custom style to apply to the component */
|
|
33
|
-
style?: React.CSSProperties;
|
|
34
|
-
/** A filter to apply to the transactions. Docs on filter: https://docs.bunny.com/developer/getting-started/using-filters-in-queries
|
|
35
|
-
* Filtering is applied on the api side, potentially speeding up the transactions query
|
|
36
|
-
*/
|
|
37
|
-
filter?: string;
|
|
38
|
-
/** Message to display when there are no transactions */
|
|
39
|
-
noTransactionsMessage?: string;
|
|
40
|
-
/** A function to filter the transactions
|
|
41
|
-
* Filtering is applied on the client side.
|
|
42
|
-
* This is useful to have more control over the filtering logic.
|
|
43
|
-
*/
|
|
44
|
-
filterTransactions?: (transaction: Transaction) => boolean;
|
|
45
|
-
/** A function to sort the transactions. Runs on the client side. */
|
|
46
|
-
sortTransactions?: (transactionA: Transaction, transactionB: Transaction) => number;
|
|
47
|
-
/** The type of date to display for transactions if applicable. Payments will always only show createdAt date. */
|
|
48
|
-
transactionDateType?: TransactionDateType;
|
|
49
|
-
/** Whether to hide the payment form on invoices */
|
|
50
|
-
hidePaymentForm?: boolean;
|
|
51
|
-
}): React.JSX.Element;
|
|
52
|
-
export declare function TransactionsDisplay({ transactions, onSearchValueChanged, search, }: {
|
|
53
|
-
transactions: Transaction[] | undefined;
|
|
54
|
-
onSearchValueChanged: (value: string) => void;
|
|
55
|
-
search: string;
|
|
56
|
-
}): React.JSX.Element;
|
package/dist/cjs/types/src/components/Transactions/transactionsList/TransactionsListDesktop.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Transaction } from '@/types/Transaction';
|
|
2
|
-
export type TransactionListColumnType = 'date' | 'title' | 'state' | 'amount' | 'download' | 'accountName';
|
|
3
|
-
declare const TransactionsListDesktop: ({ transactions, onTransactionClick, }: {
|
|
4
|
-
transactions: Transaction[] | undefined;
|
|
5
|
-
onTransactionClick?: (transaction: Transaction) => void;
|
|
6
|
-
}) => import("react").JSX.Element;
|
|
7
|
-
export default TransactionsListDesktop;
|
package/dist/cjs/types/src/components/Transactions/transactionsList/TransactionsListMobile.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Transaction } from '@/types/Transaction';
|
|
2
|
-
declare const TransactionsListMobile: ({ transactions, onTransactionClick, }: {
|
|
3
|
-
transactions: Transaction[] | undefined;
|
|
4
|
-
onTransactionClick: (transaction: Transaction) => void;
|
|
5
|
-
}) => import("react").JSX.Element;
|
|
6
|
-
export default TransactionsListMobile;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Transaction } from '@/types/Transaction';
|
|
2
|
-
import { TransactionKind } from '@/types/Transaction';
|
|
3
|
-
import { ShadowType } from '../types/shadowType';
|
|
4
|
-
import { TransactionListColumnType } from '../components/Transactions/transactionsList/TransactionsListDesktop';
|
|
5
|
-
export type TransactionsContextValues = {
|
|
6
|
-
showSearchBar?: boolean;
|
|
7
|
-
showTitle?: boolean;
|
|
8
|
-
title?: string;
|
|
9
|
-
transactionComponent?: React.ReactNode;
|
|
10
|
-
transactionStateRenderer?: (state: string) => React.ReactNode;
|
|
11
|
-
columns: TransactionListColumnType[];
|
|
12
|
-
className?: string;
|
|
13
|
-
shadow?: ShadowType;
|
|
14
|
-
searchBarClassName?: string;
|
|
15
|
-
useModal?: boolean;
|
|
16
|
-
onTransactionClick?: (transaction: Transaction) => void;
|
|
17
|
-
onTransactionDisplayClose?: (transaction: Transaction | null) => void;
|
|
18
|
-
suppressTransactionDisplay?: boolean;
|
|
19
|
-
kindsToShow?: TransactionKind[];
|
|
20
|
-
style?: React.CSSProperties;
|
|
21
|
-
filter?: string;
|
|
22
|
-
noTransactionsMessage?: string;
|
|
23
|
-
downloadTransactionLink?: (id: string) => string;
|
|
24
|
-
filterTransactions?: (transaction: Transaction) => boolean;
|
|
25
|
-
sortTransactions?: (transactionA: Transaction, transactionB: Transaction) => number;
|
|
26
|
-
transactionDateType: TransactionDateType;
|
|
27
|
-
hidePaymentForm?: boolean;
|
|
28
|
-
};
|
|
29
|
-
export type TransactionDateType = 'createdAt' | 'issuedAt' | 'dueAt';
|
|
30
|
-
export declare const TransactionsListContext: import("react").Context<TransactionsContextValues>;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { Transaction } from '@/types/Transaction';
|
|
2
|
-
import { ShadowType } from '../../types/shadowType';
|
|
3
|
-
import { TransactionListColumnType } from '../Transactions/transactionsList/TransactionsListDesktop';
|
|
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
|
-
/** Whether to show the search bar */
|
|
8
|
-
showSearchBar?: boolean;
|
|
9
|
-
/** Whether to show the title */
|
|
10
|
-
showTitle?: boolean;
|
|
11
|
-
/** The title to display in the quotes list */
|
|
12
|
-
title?: string;
|
|
13
|
-
/** The columns to display in the quotes list */
|
|
14
|
-
columns?: TransactionListColumnType[];
|
|
15
|
-
/** A custom class name to apply to the component */
|
|
16
|
-
className?: string;
|
|
17
|
-
/** Whether to use a modal for the invoice drawer */
|
|
18
|
-
useModal?: boolean;
|
|
19
|
-
/** Whether to show a shadow around the transactions list */
|
|
20
|
-
shadow?: ShadowType;
|
|
21
|
-
/** A custom class name to apply to the search bar */
|
|
22
|
-
searchBarClassName?: string;
|
|
23
|
-
/** A function to call when a quote is clicked */
|
|
24
|
-
onQuoteClick?: (quote: Transaction) => void;
|
|
25
|
-
/** Whether to hide the display showing the quote */
|
|
26
|
-
suppressQuoteDisplay?: boolean;
|
|
27
|
-
/** A custom style to apply to the component */
|
|
28
|
-
style?: React.CSSProperties;
|
|
29
|
-
/** A filter to apply to the quotes. Docs on filter: https://docs.bunny.com/developer/getting-started/using-filters-in-queries */
|
|
30
|
-
filter?: string;
|
|
31
|
-
/** A function to filter the quotes. Runs on the client side. */
|
|
32
|
-
filterQuotes?: (quote: Transaction) => boolean;
|
|
33
|
-
/** A function to sort the quotes. Runs on the client side. */
|
|
34
|
-
sort?: (a: Transaction, b: Transaction) => number;
|
|
35
|
-
/** Message to display when there are no quotes */
|
|
36
|
-
noQuotesMessage?: string;
|
|
37
|
-
}): import("react").JSX.Element;
|
|
38
|
-
export default Quotes;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Transaction } from '@/types/Transaction';
|
|
3
|
-
import { TransactionKind } from '@/types/Transaction';
|
|
4
|
-
import { TransactionDateType } from '../../contexts/TransactionsListContext';
|
|
5
|
-
import { ShadowType } from '../../types/shadowType';
|
|
6
|
-
import { TransactionListColumnType } from './transactionsList/TransactionsListDesktop';
|
|
7
|
-
export default function Transactions({ transactionComponent, showSearchBar, showTitle, title, columns, className, shadow, searchBarClassName, useModal, onTransactionClick, suppressTransactionDisplay, kindsToShow, style, filter, noTransactionsMessage, filterTransactions, sortTransactions, transactionDateType, hidePaymentForm, }: {
|
|
8
|
-
/** A custom component to render instead of the default invoice component */
|
|
9
|
-
transactionComponent?: React.ReactNode;
|
|
10
|
-
/** Whether to show the search bar */
|
|
11
|
-
showSearchBar?: boolean;
|
|
12
|
-
/** Whether to show the title */
|
|
13
|
-
showTitle?: boolean;
|
|
14
|
-
/** The title to display in the transactions list */
|
|
15
|
-
title?: string;
|
|
16
|
-
/** The columns to display in the transactions list */
|
|
17
|
-
columns?: TransactionListColumnType[];
|
|
18
|
-
/** A custom class name to apply to the component */
|
|
19
|
-
className?: string;
|
|
20
|
-
/** Whether to use a modal for the invoice drawer */
|
|
21
|
-
useModal?: boolean;
|
|
22
|
-
/** Whether to show a shadow around the transactions list */
|
|
23
|
-
shadow?: ShadowType;
|
|
24
|
-
/** A custom class name to apply to the search bar */
|
|
25
|
-
searchBarClassName?: string;
|
|
26
|
-
/** A function to call when a transaction is clicked */
|
|
27
|
-
onTransactionClick?: (transaction: Transaction) => void;
|
|
28
|
-
/** Whether to hide the display showing the transaction */
|
|
29
|
-
suppressTransactionDisplay?: boolean;
|
|
30
|
-
/** The kinds of transactions to show */
|
|
31
|
-
kindsToShow?: TransactionKind[];
|
|
32
|
-
/** A custom style to apply to the component */
|
|
33
|
-
style?: React.CSSProperties;
|
|
34
|
-
/** A filter to apply to the transactions. Docs on filter: https://docs.bunny.com/developer/getting-started/using-filters-in-queries
|
|
35
|
-
* Filtering is applied on the api side, potentially speeding up the transactions query
|
|
36
|
-
*/
|
|
37
|
-
filter?: string;
|
|
38
|
-
/** Message to display when there are no transactions */
|
|
39
|
-
noTransactionsMessage?: string;
|
|
40
|
-
/** A function to filter the transactions
|
|
41
|
-
* Filtering is applied on the client side.
|
|
42
|
-
* This is useful to have more control over the filtering logic.
|
|
43
|
-
*/
|
|
44
|
-
filterTransactions?: (transaction: Transaction) => boolean;
|
|
45
|
-
/** A function to sort the transactions. Runs on the client side. */
|
|
46
|
-
sortTransactions?: (transactionA: Transaction, transactionB: Transaction) => number;
|
|
47
|
-
/** The type of date to display for transactions if applicable. Payments will always only show createdAt date. */
|
|
48
|
-
transactionDateType?: TransactionDateType;
|
|
49
|
-
/** Whether to hide the payment form on invoices */
|
|
50
|
-
hidePaymentForm?: boolean;
|
|
51
|
-
}): React.JSX.Element;
|
|
52
|
-
export declare function TransactionsDisplay({ transactions, onSearchValueChanged, search, }: {
|
|
53
|
-
transactions: Transaction[] | undefined;
|
|
54
|
-
onSearchValueChanged: (value: string) => void;
|
|
55
|
-
search: string;
|
|
56
|
-
}): React.JSX.Element;
|
package/dist/esm/types/src/components/Transactions/transactionsList/TransactionsListDesktop.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Transaction } from '@/types/Transaction';
|
|
2
|
-
export type TransactionListColumnType = 'date' | 'title' | 'state' | 'amount' | 'download' | 'accountName';
|
|
3
|
-
declare const TransactionsListDesktop: ({ transactions, onTransactionClick, }: {
|
|
4
|
-
transactions: Transaction[] | undefined;
|
|
5
|
-
onTransactionClick?: (transaction: Transaction) => void;
|
|
6
|
-
}) => import("react").JSX.Element;
|
|
7
|
-
export default TransactionsListDesktop;
|
package/dist/esm/types/src/components/Transactions/transactionsList/TransactionsListMobile.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Transaction } from '@/types/Transaction';
|
|
2
|
-
declare const TransactionsListMobile: ({ transactions, onTransactionClick, }: {
|
|
3
|
-
transactions: Transaction[] | undefined;
|
|
4
|
-
onTransactionClick: (transaction: Transaction) => void;
|
|
5
|
-
}) => import("react").JSX.Element;
|
|
6
|
-
export default TransactionsListMobile;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Transaction } from '@/types/Transaction';
|
|
2
|
-
import { TransactionKind } from '@/types/Transaction';
|
|
3
|
-
import { ShadowType } from '../types/shadowType';
|
|
4
|
-
import { TransactionListColumnType } from '../components/Transactions/transactionsList/TransactionsListDesktop';
|
|
5
|
-
export type TransactionsContextValues = {
|
|
6
|
-
showSearchBar?: boolean;
|
|
7
|
-
showTitle?: boolean;
|
|
8
|
-
title?: string;
|
|
9
|
-
transactionComponent?: React.ReactNode;
|
|
10
|
-
transactionStateRenderer?: (state: string) => React.ReactNode;
|
|
11
|
-
columns: TransactionListColumnType[];
|
|
12
|
-
className?: string;
|
|
13
|
-
shadow?: ShadowType;
|
|
14
|
-
searchBarClassName?: string;
|
|
15
|
-
useModal?: boolean;
|
|
16
|
-
onTransactionClick?: (transaction: Transaction) => void;
|
|
17
|
-
onTransactionDisplayClose?: (transaction: Transaction | null) => void;
|
|
18
|
-
suppressTransactionDisplay?: boolean;
|
|
19
|
-
kindsToShow?: TransactionKind[];
|
|
20
|
-
style?: React.CSSProperties;
|
|
21
|
-
filter?: string;
|
|
22
|
-
noTransactionsMessage?: string;
|
|
23
|
-
downloadTransactionLink?: (id: string) => string;
|
|
24
|
-
filterTransactions?: (transaction: Transaction) => boolean;
|
|
25
|
-
sortTransactions?: (transactionA: Transaction, transactionB: Transaction) => number;
|
|
26
|
-
transactionDateType: TransactionDateType;
|
|
27
|
-
hidePaymentForm?: boolean;
|
|
28
|
-
};
|
|
29
|
-
export type TransactionDateType = 'createdAt' | 'issuedAt' | 'dueAt';
|
|
30
|
-
export declare const TransactionsListContext: import("react").Context<TransactionsContextValues>;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|