@mercoa/react 0.0.43-rc1 → 0.0.43
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/InvoicePreview.d.ts +16 -0
- package/dist/components/PayableDetails.d.ts +5 -4
- package/dist/components/ReceivableDetails.d.ts +60 -2
- package/dist/components/ReceivablePayments.d.ts +15 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/index.es.js +25707 -24603
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +65 -67
- package/dist/index.umd.js.map +1 -1
- package/dist/lib/scheduling.d.ts +1 -0
- package/dist/mercoa.css +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Mercoa } from '@mercoa/javascript';
|
|
2
|
+
export type PreviewType = 'pdf' | 'email' | 'paymentPage';
|
|
3
|
+
export default function InvoicePreview({ selectedPayer }: {
|
|
4
|
+
selectedPayer?: Mercoa.CounterpartyResponse;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare function InvoicePreviewPdf({ invoice, logo }: {
|
|
7
|
+
invoice: Mercoa.InvoiceResponse;
|
|
8
|
+
logo: string;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function InvoicePreviewEmail({ invoice }: {
|
|
11
|
+
invoice: Mercoa.InvoiceResponse;
|
|
12
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function InvoicePreviewPaymentPage({ invoice, logo }: {
|
|
14
|
+
invoice: Mercoa.InvoiceResponse;
|
|
15
|
+
logo: string;
|
|
16
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -111,10 +111,11 @@ export declare function PayableActions({ approveButton, rejectButton, nonApprove
|
|
|
111
111
|
export declare function PayableOverview({ readOnly }: {
|
|
112
112
|
readOnly?: boolean;
|
|
113
113
|
}): import("react/jsx-runtime").JSX.Element;
|
|
114
|
-
export declare function SelectPaymentMethod({ isSource, isDestination, disableCreation, readOnly, }: {
|
|
114
|
+
export declare function SelectPaymentMethod({ isSource, isDestination, disableCreation, disablePaymentTimingDisplay, readOnly, }: {
|
|
115
115
|
isSource?: boolean;
|
|
116
116
|
isDestination?: boolean;
|
|
117
117
|
disableCreation?: boolean;
|
|
118
|
+
disablePaymentTimingDisplay?: boolean;
|
|
118
119
|
readOnly?: boolean;
|
|
119
120
|
}): import("react/jsx-runtime").JSX.Element;
|
|
120
121
|
export declare function PayablePaymentSource({ readOnly }: {
|
|
@@ -123,6 +124,7 @@ export declare function PayablePaymentSource({ readOnly }: {
|
|
|
123
124
|
export declare function PayablePaymentDestination({ readOnly }: {
|
|
124
125
|
readOnly?: boolean;
|
|
125
126
|
}): import("react/jsx-runtime").JSX.Element;
|
|
127
|
+
export declare function PaymentDestinationProcessingTime(): import("react/jsx-runtime").JSX.Element | null;
|
|
126
128
|
export declare function PayableApprovers({ readOnly }: {
|
|
127
129
|
readOnly?: boolean;
|
|
128
130
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -155,10 +157,9 @@ export declare function PayableMetadata({ skipValidation, readOnly }: {
|
|
|
155
157
|
skipValidation?: boolean;
|
|
156
158
|
readOnly?: boolean;
|
|
157
159
|
}): import("react/jsx-runtime").JSX.Element;
|
|
158
|
-
export declare function MetadataSelection({ schema,
|
|
160
|
+
export declare function MetadataSelection({ schema, field, skipValidation, readOnly, lineItem, hideLabel, }: {
|
|
159
161
|
schema: Mercoa.MetadataSchema;
|
|
160
|
-
|
|
161
|
-
setValue: (e: string) => void;
|
|
162
|
+
field: string;
|
|
162
163
|
skipValidation?: boolean;
|
|
163
164
|
readOnly?: boolean;
|
|
164
165
|
lineItem?: boolean;
|
|
@@ -1,8 +1,66 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { Mercoa } from '@mercoa/javascript';
|
|
2
|
-
|
|
3
|
+
import { FieldErrors, UseFormSetValue, UseFormWatch } from 'react-hook-form';
|
|
4
|
+
export type ReceivableFormValues = {
|
|
5
|
+
id?: string;
|
|
6
|
+
status?: Mercoa.InvoiceStatus;
|
|
7
|
+
invoiceNumber?: string;
|
|
8
|
+
amount?: number;
|
|
9
|
+
currency?: Mercoa.CurrencyCode;
|
|
10
|
+
payerId?: string;
|
|
11
|
+
payerName?: string;
|
|
12
|
+
invoiceDate?: Date;
|
|
13
|
+
dueDate?: Date;
|
|
14
|
+
deductionDate?: Date;
|
|
15
|
+
lineItems?: Mercoa.InvoiceLineItemResponse[];
|
|
16
|
+
paymentDestinationId?: string;
|
|
17
|
+
paymentDestinationType?: string;
|
|
18
|
+
paymentDestinationOptions?: Mercoa.PaymentDestinationOptions;
|
|
19
|
+
paymentSourceId?: string;
|
|
20
|
+
paymentSourceType?: string;
|
|
21
|
+
paymentSourceCheckEnabled?: boolean;
|
|
22
|
+
description?: string;
|
|
23
|
+
saveAsDraft?: boolean;
|
|
24
|
+
hasDocuments?: boolean;
|
|
25
|
+
saveAsStatus?: string;
|
|
26
|
+
saveAsAdmin?: boolean;
|
|
27
|
+
metadata?: Record<string, any>;
|
|
28
|
+
commentText?: string;
|
|
29
|
+
comments?: Array<any>;
|
|
30
|
+
creatorUser?: any;
|
|
31
|
+
};
|
|
32
|
+
export declare function ReceivableDetails({ invoiceId, invoice, onRedirect, admin, documentPosition, children, }: {
|
|
3
33
|
invoiceId?: Mercoa.InvoiceId;
|
|
4
34
|
invoice?: Mercoa.InvoiceResponse;
|
|
5
35
|
onRedirect: (invoice: Mercoa.InvoiceResponse | undefined) => void;
|
|
6
36
|
admin?: boolean;
|
|
7
|
-
|
|
37
|
+
documentPosition?: 'right' | 'left' | 'none';
|
|
38
|
+
children?: ({ invoice, refreshInvoice, setSelectedPayer, selectedPayer, setValue, watch, }: ReceivableFormChildrenProps) => JSX.Element;
|
|
39
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
export type ReceivableFormChildrenProps = {
|
|
41
|
+
invoice?: Mercoa.InvoiceResponse;
|
|
42
|
+
refreshInvoice?: (invoiceId: Mercoa.InvoiceId) => void;
|
|
43
|
+
setSelectedPayer: (e?: Mercoa.CounterpartyResponse) => void;
|
|
44
|
+
selectedPayer?: Mercoa.CounterpartyResponse;
|
|
45
|
+
setValue: (name: UseFormSetValue<Mercoa.InvoiceCreationRequest>, value: any, options?: {
|
|
46
|
+
shouldValidate?: boolean;
|
|
47
|
+
shouldDirty?: boolean;
|
|
48
|
+
}) => void;
|
|
49
|
+
watch: (name: UseFormWatch<Mercoa.InvoiceCreationRequest>) => any;
|
|
50
|
+
errors: FieldErrors<Mercoa.InvoiceCreationRequest>;
|
|
51
|
+
};
|
|
52
|
+
export declare function ReceivableForm({ invoice, onRedirect, refreshInvoice, admin, supportedCurrencies, setSupportedCurrencies, setDestinationPaymentMethods, setSourcePaymentMethods, setPaymentMethodSchemas, selectedPayer, setSelectedPayer, children, }: {
|
|
53
|
+
invoice?: Mercoa.InvoiceResponse;
|
|
54
|
+
onRedirect: (invoice: Mercoa.InvoiceResponse | undefined) => void;
|
|
55
|
+
refreshInvoice: (invoice: Mercoa.InvoiceId) => void;
|
|
56
|
+
admin?: boolean;
|
|
57
|
+
supportedCurrencies: Mercoa.CurrencyCode[];
|
|
58
|
+
setSupportedCurrencies: (currencies: Mercoa.CurrencyCode[]) => void;
|
|
59
|
+
setDestinationPaymentMethods: (paymentMethods: Mercoa.PaymentMethodResponse.BankAccount[]) => void;
|
|
60
|
+
setSourcePaymentMethods: (paymentMethods: Mercoa.PaymentMethodResponse[]) => void;
|
|
61
|
+
setPaymentMethodSchemas: (paymentMethodSchemas: Mercoa.CustomPaymentMethodSchemaResponse[]) => void;
|
|
62
|
+
invoicePreSubmit?: (invoice: Mercoa.InvoiceCreationRequest) => Promise<Mercoa.InvoiceCreationRequest>;
|
|
63
|
+
selectedPayer: Mercoa.CounterpartyResponse | undefined;
|
|
64
|
+
setSelectedPayer: (payer: Mercoa.CounterpartyResponse | undefined) => void;
|
|
65
|
+
children?: ({ invoice, refreshInvoice, setSelectedPayer, selectedPayer, setValue, watch, }: ReceivableFormChildrenProps) => JSX.Element;
|
|
8
66
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Mercoa } from '@mercoa/javascript';
|
|
2
|
+
export declare function ReceivablePaymentPortal({ logo, complete, invoice, supportEmail, totalDisplay, selectedPaymentType, updateInvoice, setSelectedPaymentType, }: {
|
|
3
|
+
logo: string;
|
|
4
|
+
complete?: boolean;
|
|
5
|
+
invoice: Mercoa.InvoiceResponse;
|
|
6
|
+
supportEmail?: string;
|
|
7
|
+
totalDisplay: string;
|
|
8
|
+
selectedPaymentType: Mercoa.PaymentMethodType | string;
|
|
9
|
+
updateInvoice: (invoice: Mercoa.PaymentMethodResponse) => void;
|
|
10
|
+
setSelectedPaymentType: (paymentMethodType: Mercoa.PaymentMethodType | string) => void;
|
|
11
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function ReceivablePaymentPdf({ invoice, logo }: {
|
|
13
|
+
invoice?: Mercoa.InvoiceResponse;
|
|
14
|
+
logo: string;
|
|
15
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -17,6 +17,7 @@ export * from './PayableDetails';
|
|
|
17
17
|
export * from './Payables';
|
|
18
18
|
export * from './PaymentMethods';
|
|
19
19
|
export * from './ReceivableDetails';
|
|
20
|
+
export * from './ReceivablePayments';
|
|
20
21
|
export * from './Receivables';
|
|
21
22
|
export * from './generics';
|
|
22
23
|
export type onCloseFunction = (value: boolean) => void;
|