@mercoa/react 0.0.34 → 0.0.35
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/components/CustomPaymentMethod.d.ts +2 -1
- package/dist/components/Mercoa.d.ts +1 -1
- package/dist/components/{InvoiceDetails.d.ts → PayableDetails.d.ts} +16 -2
- package/dist/components/{Inbox.d.ts → Payables.d.ts} +8 -4
- package/dist/components/ReceivableDetails.d.ts +8 -0
- package/dist/components/Receivables.d.ts +3 -1
- package/dist/components/generics.d.ts +4 -3
- package/dist/components/index.d.ts +3 -2
- package/dist/index.es.js +38649 -37627
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +88 -79
- package/dist/index.umd.js.map +1 -1
- package/dist/mercoa.css +1 -1
- package/dist/style.css +1 -1
- package/package.json +15 -16
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Mercoa } from '@mercoa/javascript';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
+
import { UseFormRegister } from 'react-hook-form';
|
|
3
4
|
export declare function CustomPaymentMethod({ children, onSelect, showEdit, schema, }: {
|
|
4
5
|
children?: Function;
|
|
5
6
|
onSelect?: Function;
|
|
@@ -23,7 +24,7 @@ export declare function AddCustomPaymentMethod({ onSubmit, title, actions, formO
|
|
|
23
24
|
schema: Mercoa.CustomPaymentMethodSchemaResponse;
|
|
24
25
|
}): import("react/jsx-runtime").JSX.Element;
|
|
25
26
|
export declare function AddCustomPaymentMethodForm({ register, control, schema, }: {
|
|
26
|
-
register:
|
|
27
|
+
register: UseFormRegister<any>;
|
|
27
28
|
control: any;
|
|
28
29
|
schema: Mercoa.CustomPaymentMethodSchemaResponse;
|
|
29
30
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Mercoa, MercoaClient } from '@mercoa/javascript';
|
|
2
2
|
import { Moov } from '@moovio/moov-js';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
|
-
import { TokenOptions } from '
|
|
4
|
+
import { TokenOptions } from './index';
|
|
5
5
|
export interface MercoaContext {
|
|
6
6
|
token?: string;
|
|
7
7
|
entityId?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Mercoa } from '@mercoa/javascript';
|
|
2
|
-
export declare function
|
|
2
|
+
export declare function PayableDetails({ invoiceId, invoice, onRedirect, heightOffset, admin, layout, }: {
|
|
3
3
|
invoiceId?: Mercoa.InvoiceId;
|
|
4
4
|
invoice?: Mercoa.InvoiceResponse;
|
|
5
5
|
onRedirect: (invoice: Mercoa.InvoiceResponse | undefined) => void;
|
|
@@ -16,7 +16,7 @@ export declare function InvoiceDocuments({ documents, invoice, height, showSourc
|
|
|
16
16
|
height: number;
|
|
17
17
|
showSourceEmail?: boolean;
|
|
18
18
|
}): import("react/jsx-runtime").JSX.Element;
|
|
19
|
-
export declare function
|
|
19
|
+
export declare function EditPayableForm({ invoice, ocrResponse, uploadedImage, setUploadedImage, onRedirect, refreshInvoice, height, admin, }: {
|
|
20
20
|
invoice?: Mercoa.InvoiceResponse;
|
|
21
21
|
ocrResponse?: Mercoa.OcrResponse;
|
|
22
22
|
uploadedImage?: string;
|
|
@@ -26,6 +26,20 @@ export declare function EditInvoiceForm({ invoice, ocrResponse, uploadedImage, s
|
|
|
26
26
|
height: number;
|
|
27
27
|
admin?: boolean;
|
|
28
28
|
}): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export declare function SelectPaymentSource({ paymentMethods, paymentMethodSchemas, watch, setValue, isSource, isDestination, vendorId, payerId, currentPaymentMethodId, refreshVendorPaymentMethods, refreshPayerPaymentMethods, clearErrors, }: {
|
|
30
|
+
paymentMethods: Array<Mercoa.PaymentMethodResponse>;
|
|
31
|
+
paymentMethodSchemas: Array<Mercoa.CustomPaymentMethodSchemaResponse>;
|
|
32
|
+
watch: Function;
|
|
33
|
+
setValue: Function;
|
|
34
|
+
isSource?: boolean;
|
|
35
|
+
isDestination?: boolean;
|
|
36
|
+
vendorId?: string;
|
|
37
|
+
payerId?: string;
|
|
38
|
+
currentPaymentMethodId?: string;
|
|
39
|
+
refreshVendorPaymentMethods: Function;
|
|
40
|
+
refreshPayerPaymentMethods: Function;
|
|
41
|
+
clearErrors: Function;
|
|
42
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
29
43
|
export declare function MetadataSelection({ schema, value, entityMetadata, setValue, hasDocument, hasNoLineItems, paymentDestination, paymentSource, lineItem, skipValidation, }: {
|
|
30
44
|
schema: Mercoa.MetadataSchema;
|
|
31
45
|
value?: string;
|
|
@@ -6,7 +6,7 @@ export type InvoiceTableColumn = {
|
|
|
6
6
|
orderBy?: Mercoa.InvoiceOrderByField;
|
|
7
7
|
format?: (value: string | number | Date, invoice: Mercoa.InvoiceResponse) => string | ReactElement | null;
|
|
8
8
|
};
|
|
9
|
-
export declare function
|
|
9
|
+
export declare function PayablesTable({ statuses, search, metadata, startDate, endDate, onSelectInvoice, columns, children, }: {
|
|
10
10
|
statuses: Mercoa.InvoiceStatus[];
|
|
11
11
|
search?: string;
|
|
12
12
|
metadata?: Mercoa.InvoiceMetadataFilter[];
|
|
@@ -31,21 +31,25 @@ export declare function InvoiceTable({ statuses, search, metadata, startDate, en
|
|
|
31
31
|
export declare function InvoiceStatusPill({ invoice }: {
|
|
32
32
|
invoice: Mercoa.InvoiceResponse;
|
|
33
33
|
}): import("react/jsx-runtime").JSX.Element;
|
|
34
|
-
export declare function InvoiceMetrics({ statuses, search, returnByDate, children, }: {
|
|
34
|
+
export declare function InvoiceMetrics({ statuses, search, returnByDate, excludePayables, excludeReceivables, children, }: {
|
|
35
35
|
statuses: Mercoa.InvoiceStatus[];
|
|
36
36
|
search?: string;
|
|
37
37
|
returnByDate?: Mercoa.InvoiceMetricsPerDateGroupBy;
|
|
38
|
+
excludePayables?: boolean;
|
|
39
|
+
excludeReceivables?: boolean;
|
|
38
40
|
children?: ({ metrics, }: {
|
|
39
41
|
metrics?: {
|
|
40
42
|
[key in Mercoa.InvoiceStatus]: Mercoa.InvoiceMetricsResponse;
|
|
41
43
|
};
|
|
42
44
|
}) => JSX.Element;
|
|
43
45
|
}): import("react/jsx-runtime").JSX.Element;
|
|
44
|
-
export declare function StatusTabs({ statuses, selectedStatus, search, onStatusChange, }: {
|
|
46
|
+
export declare function StatusTabs({ statuses, selectedStatus, search, onStatusChange, excludePayables, excludeReceivables, }: {
|
|
45
47
|
statuses?: Array<Mercoa.InvoiceStatus>;
|
|
46
48
|
selectedStatus?: Mercoa.InvoiceStatus;
|
|
47
49
|
search?: string;
|
|
48
50
|
onStatusChange?: (status: Mercoa.InvoiceStatus[]) => any;
|
|
51
|
+
excludePayables?: boolean;
|
|
52
|
+
excludeReceivables?: boolean;
|
|
49
53
|
}): import("react/jsx-runtime").JSX.Element;
|
|
50
54
|
export declare function StatusDropdown({ availableStatuses, currentStatuses, onStatusChange, placeholder, label, className, multiple, }: {
|
|
51
55
|
availableStatuses?: Array<Mercoa.InvoiceStatus>;
|
|
@@ -56,7 +60,7 @@ export declare function StatusDropdown({ availableStatuses, currentStatuses, onS
|
|
|
56
60
|
className?: string;
|
|
57
61
|
multiple?: boolean;
|
|
58
62
|
}): import("react/jsx-runtime").JSX.Element;
|
|
59
|
-
export declare function
|
|
63
|
+
export declare function Payables({ statuses, onSelectInvoice, statusSelectionStyle, }: {
|
|
60
64
|
statuses?: Array<Mercoa.InvoiceStatus>;
|
|
61
65
|
onSelectInvoice?: (invoice: Mercoa.InvoiceResponse) => any;
|
|
62
66
|
statusSelectionStyle?: 'tabs' | 'dropdown';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Mercoa } from '@mercoa/javascript';
|
|
2
|
+
export declare function ReceivableDetails({ invoiceId, invoice, onRedirect, admin, layout, }: {
|
|
3
|
+
invoiceId?: Mercoa.InvoiceId;
|
|
4
|
+
invoice?: Mercoa.InvoiceResponse;
|
|
5
|
+
onRedirect: (invoice: Mercoa.InvoiceResponse | undefined) => void;
|
|
6
|
+
admin?: boolean;
|
|
7
|
+
layout?: 'right' | 'left';
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { Mercoa } from '@mercoa/javascript';
|
|
2
|
-
export declare function Receivables({ onSelectInvoice }: {
|
|
2
|
+
export declare function Receivables({ statuses, onSelectInvoice, statusSelectionStyle, }: {
|
|
3
|
+
statuses?: Array<Mercoa.InvoiceStatus>;
|
|
3
4
|
onSelectInvoice?: (invoice: Mercoa.InvoiceResponse) => any;
|
|
5
|
+
statusSelectionStyle?: 'tabs' | 'dropdown';
|
|
4
6
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Mercoa } from '@mercoa/javascript';
|
|
2
2
|
import { ChangeEvent, FocusEvent, HTMLAttributes, ReactNode, Ref } from 'react';
|
|
3
3
|
import { Control, FieldErrors, UseFormRegister } from 'react-hook-form';
|
|
4
|
-
import { TokenOptions } from '
|
|
4
|
+
import { TokenOptions } from './index';
|
|
5
5
|
export interface MercoaButtonProps extends HTMLAttributes<HTMLButtonElement> {
|
|
6
6
|
isEmphasized: boolean;
|
|
7
7
|
tooltip?: string;
|
|
@@ -122,8 +122,8 @@ export declare function MercoaInputLabel({ label, name }: {
|
|
|
122
122
|
label: string;
|
|
123
123
|
name?: string;
|
|
124
124
|
}): import("react/jsx-runtime").JSX.Element;
|
|
125
|
-
export declare function MercoaInput({ type, label, onChange, onBlur, required, readOnly, ref, register, control, disabled, placeholder, optional, name, className, leadingIcon, trailingIcon, errors, dateOptions, min, max, step, noBorder, }: {
|
|
126
|
-
type?: 'text' | 'password' | 'email' | 'number' | 'date';
|
|
125
|
+
export declare function MercoaInput({ type, label, onChange, onBlur, required, readOnly, ref, register, control, disabled, placeholder, optional, name, className, leadingIcon, trailingIcon, errors, dateOptions, min, max, step, noBorder, inputMask, }: {
|
|
126
|
+
type?: 'text' | 'password' | 'email' | 'number' | 'date' | 'currency';
|
|
127
127
|
label?: string;
|
|
128
128
|
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
129
129
|
onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
|
|
@@ -149,6 +149,7 @@ export declare function MercoaInput({ type, label, onChange, onBlur, required, r
|
|
|
149
149
|
max?: string | number;
|
|
150
150
|
step?: number;
|
|
151
151
|
noBorder?: boolean;
|
|
152
|
+
inputMask?: string;
|
|
152
153
|
}): import("react/jsx-runtime").JSX.Element;
|
|
153
154
|
export declare function CountPill({ count, selected }: {
|
|
154
155
|
count: number;
|
|
@@ -10,11 +10,12 @@ export * from './EntityDetails';
|
|
|
10
10
|
export * from './EntityOnboarding';
|
|
11
11
|
export * from './EntityPortal';
|
|
12
12
|
export * from './EntityUser';
|
|
13
|
-
export * from './Inbox';
|
|
14
13
|
export * from './InvoiceComments';
|
|
15
|
-
export * from './InvoiceDetails';
|
|
16
14
|
export * from './Mercoa';
|
|
15
|
+
export * from './PayableDetails';
|
|
16
|
+
export * from './Payables';
|
|
17
17
|
export * from './PaymentMethods';
|
|
18
|
+
export * from './ReceivableDetails';
|
|
18
19
|
export * from './Receivables';
|
|
19
20
|
export * from './generics';
|
|
20
21
|
export type onCloseFunction = (value: boolean) => void;
|