@mercoa/react 0.0.47 → 0.0.48-rc2
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/EntityOnboarding.d.ts +1 -1
- package/dist/components/PayableDetails.d.ts +50 -16
- package/dist/index.es.js +20152 -18372
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +57 -57
- package/dist/index.umd.js.map +1 -1
- package/dist/mercoa.css +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
|
@@ -217,7 +217,7 @@ export declare function AcceptToSButton({ className, buttonText, title, onClose,
|
|
|
217
217
|
}): import("react/jsx-runtime").JSX.Element;
|
|
218
218
|
export declare function AcceptTosForm({ entity, onComplete, }: {
|
|
219
219
|
entity: Mercoa.EntityResponse;
|
|
220
|
-
onComplete
|
|
220
|
+
onComplete: () => Promise<void>;
|
|
221
221
|
}): import("react/jsx-runtime").JSX.Element;
|
|
222
222
|
export declare function EntityOnboardingForm({ entity, type, onOnboardingSubmit, onCancel, admin, }: {
|
|
223
223
|
entity: Mercoa.EntityResponse;
|
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Mercoa } from '@mercoa/javascript';
|
|
3
3
|
import { FieldErrors, UseFormSetValue, UseFormWatch } from 'react-hook-form';
|
|
4
|
-
export
|
|
4
|
+
export type PayableDetailsChildrenProps = {
|
|
5
|
+
invoice?: Mercoa.InvoiceResponse;
|
|
6
|
+
ocrResponse?: Mercoa.OcrResponse;
|
|
7
|
+
uploadedDocument?: string;
|
|
8
|
+
onRedirect: (invoice: Mercoa.InvoiceResponse | undefined) => void;
|
|
9
|
+
setUploadedDocument: (e?: string) => void;
|
|
10
|
+
height: number;
|
|
11
|
+
refreshInvoice: (invoiceId: Mercoa.InvoiceId) => void;
|
|
12
|
+
invoicePreSubmit?: (invoice: Mercoa.InvoiceCreationRequest) => Promise<Mercoa.InvoiceCreationRequest>;
|
|
13
|
+
onOcrComplete: (ocrResponse?: Mercoa.OcrResponse) => void;
|
|
14
|
+
};
|
|
15
|
+
export declare function PayableDetails({ invoiceId, invoice, onRedirect, heightOffset, admin, documentPosition, invoicePreSubmit, children, }: {
|
|
5
16
|
invoiceId?: Mercoa.InvoiceId;
|
|
6
17
|
invoice?: Mercoa.InvoiceResponse;
|
|
7
18
|
onRedirect: (invoice: Mercoa.InvoiceResponse | undefined) => void;
|
|
8
19
|
heightOffset?: number;
|
|
9
20
|
admin?: boolean;
|
|
10
21
|
documentPosition?: 'right' | 'left' | 'none';
|
|
11
|
-
documentCustomization?: {
|
|
12
|
-
downloadButton?: ({ onClick }: {
|
|
13
|
-
onClick: () => void;
|
|
14
|
-
}) => JSX.Element;
|
|
15
|
-
viewEmailButton?: ({ onClick }: {
|
|
16
|
-
onClick: () => void;
|
|
17
|
-
}) => JSX.Element;
|
|
18
|
-
};
|
|
19
22
|
invoicePreSubmit?: (invoice: Mercoa.InvoiceCreationRequest) => Promise<Mercoa.InvoiceCreationRequest>;
|
|
20
|
-
children?: (
|
|
23
|
+
children?: (props: PayableDetailsChildrenProps) => JSX.Element[];
|
|
21
24
|
}): import("react/jsx-runtime").JSX.Element;
|
|
22
25
|
export type PayableFormChildrenProps = {
|
|
23
26
|
invoice?: Mercoa.InvoiceResponse;
|
|
@@ -47,15 +50,33 @@ export declare function PayableForm({ invoice, ocrResponse, uploadedDocument, se
|
|
|
47
50
|
height: number;
|
|
48
51
|
admin?: boolean;
|
|
49
52
|
invoicePreSubmit?: (invoice: Mercoa.InvoiceCreationRequest) => Promise<Mercoa.InvoiceCreationRequest>;
|
|
50
|
-
children?: (
|
|
53
|
+
children?: (props: PayableFormChildrenProps) => JSX.Element;
|
|
51
54
|
}): import("react/jsx-runtime").JSX.Element;
|
|
52
55
|
export declare function PayableFormHeader({ hideId }: {
|
|
53
56
|
hideId?: boolean;
|
|
54
57
|
}): import("react/jsx-runtime").JSX.Element;
|
|
55
58
|
export declare function PayableFormErrors(): import("react/jsx-runtime").JSX.Element | null;
|
|
56
|
-
export
|
|
57
|
-
|
|
58
|
-
|
|
59
|
+
export type PayableDocumentChildrenProps = {
|
|
60
|
+
documents?: Array<{
|
|
61
|
+
fileReaderObj: string;
|
|
62
|
+
mimeType: string;
|
|
63
|
+
}>;
|
|
64
|
+
sourceEmails?: Mercoa.EmailLog[];
|
|
65
|
+
ocrProcessing: boolean;
|
|
66
|
+
invoice?: Mercoa.InvoiceResponse;
|
|
67
|
+
height: number;
|
|
68
|
+
downloadButton?: ({ onClick }: {
|
|
69
|
+
onClick: () => void;
|
|
70
|
+
}) => JSX.Element;
|
|
71
|
+
viewEmailButton?: ({ onClick }: {
|
|
72
|
+
onClick: () => void;
|
|
73
|
+
}) => JSX.Element;
|
|
74
|
+
theme?: 'light' | 'dark';
|
|
75
|
+
onFileUpload: (fileReaderObj: string, mimeType: string) => void;
|
|
76
|
+
};
|
|
77
|
+
export declare function PayableDocument({ onOcrComplete, onDocumentUpload, invoice, height, downloadButton, viewEmailButton, theme, children, }: {
|
|
78
|
+
onOcrComplete?: (ocrResponse?: Mercoa.OcrResponse) => void;
|
|
79
|
+
onDocumentUpload?: (document: {
|
|
59
80
|
fileReaderObj: string;
|
|
60
81
|
mimeType: string;
|
|
61
82
|
}) => void;
|
|
@@ -68,8 +89,13 @@ export declare function PayableDocument({ onOCRComplete, onDocumentUpload, invoi
|
|
|
68
89
|
onClick: () => void;
|
|
69
90
|
}) => JSX.Element;
|
|
70
91
|
theme?: 'light' | 'dark';
|
|
92
|
+
children?: (props: PayableDocumentChildrenProps) => JSX.Element;
|
|
93
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
94
|
+
export declare function DocumentUploadBox({ onFileUpload, theme, }: {
|
|
95
|
+
onFileUpload: (fileReaderObj: string, mimeType: string) => void;
|
|
96
|
+
theme?: 'light' | 'dark';
|
|
71
97
|
}): import("react/jsx-runtime").JSX.Element;
|
|
72
|
-
export declare function PayableDocumentDisplay({ documents, invoice, height, showSourceEmail, downloadButton, viewEmailButton, }: {
|
|
98
|
+
export declare function PayableDocumentDisplay({ documents, invoice, height, showSourceEmail, sourceEmails, downloadButton, viewEmailButton, }: {
|
|
73
99
|
documents?: Array<{
|
|
74
100
|
fileReaderObj: string;
|
|
75
101
|
mimeType: string;
|
|
@@ -77,6 +103,7 @@ export declare function PayableDocumentDisplay({ documents, invoice, height, sho
|
|
|
77
103
|
invoice?: Mercoa.InvoiceResponse;
|
|
78
104
|
height: number;
|
|
79
105
|
showSourceEmail?: boolean;
|
|
106
|
+
sourceEmails?: Mercoa.EmailLog[];
|
|
80
107
|
downloadButton?: ({ onClick }: {
|
|
81
108
|
onClick: () => void;
|
|
82
109
|
}) => JSX.Element;
|
|
@@ -84,7 +111,10 @@ export declare function PayableDocumentDisplay({ documents, invoice, height, sho
|
|
|
84
111
|
onClick: () => void;
|
|
85
112
|
}) => JSX.Element;
|
|
86
113
|
}): import("react/jsx-runtime").JSX.Element;
|
|
87
|
-
export declare function
|
|
114
|
+
export declare function OcrProgressBar({ ocrProcessing }: {
|
|
115
|
+
ocrProcessing: boolean;
|
|
116
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
117
|
+
export declare function PayableActions({ approveButton, rejectButton, nonApproverButton, deleteButton, archiveButton, cancelButton, saveDraftButton, printCheckButton, createInvoiceButton, submitForApprovalButton, nextButton, markAsPaidButton, schedulePaymentButton, retryPaymentButton, admin, children, }: {
|
|
88
118
|
approveButton?: ({ onClick }: {
|
|
89
119
|
onClick: () => void;
|
|
90
120
|
}) => JSX.Element;
|
|
@@ -129,6 +159,10 @@ export declare function PayableActions({ approveButton, rejectButton, nonApprove
|
|
|
129
159
|
onClick: () => void;
|
|
130
160
|
}) => JSX.Element;
|
|
131
161
|
admin?: boolean;
|
|
162
|
+
children?: ({ isSaving, buttons }: {
|
|
163
|
+
isSaving: boolean;
|
|
164
|
+
buttons: JSX.Element[];
|
|
165
|
+
}) => JSX.Element;
|
|
132
166
|
}): import("react/jsx-runtime").JSX.Element;
|
|
133
167
|
export type PayableOverviewChildrenProps = {
|
|
134
168
|
readOnly?: boolean;
|