@mercoa/react 0.0.43 → 0.0.44
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/ApprovalPolicy.d.ts +3 -1
- package/dist/components/EntityDetails.d.ts +15 -13
- package/dist/components/PayableDetails.d.ts +24 -3
- package/dist/index.es.js +12627 -12519
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +58 -58
- package/dist/index.umd.js.map +1 -1
- package/dist/mercoa.css +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,26 +1,28 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { Mercoa } from '@mercoa/javascript';
|
|
2
|
-
import { ReactElement } from 'react';
|
|
3
3
|
export declare function EntityDetails({ children }: {
|
|
4
4
|
children: Function;
|
|
5
5
|
}): any;
|
|
6
6
|
export declare function EntityStatus({ entity }: {
|
|
7
7
|
entity?: Mercoa.EntityResponse;
|
|
8
8
|
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export declare function EntityInboxEmail({ entity, layout }: {
|
|
9
|
+
export declare function EntityInboxEmail({ entity, layout, theme, }: {
|
|
10
10
|
entity?: Mercoa.EntityResponse;
|
|
11
11
|
layout?: 'left' | 'right';
|
|
12
|
+
theme?: 'light' | 'dark';
|
|
12
13
|
}): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export type EntityEmailLogsChildrenProps = {
|
|
15
|
+
dataLoaded: boolean;
|
|
16
|
+
emails: Mercoa.EmailLog[];
|
|
17
|
+
hasNext: boolean;
|
|
18
|
+
getNext: () => void;
|
|
19
|
+
hasPrevious: boolean;
|
|
20
|
+
getPrevious: () => void;
|
|
21
|
+
resultsPerPage: number;
|
|
22
|
+
setResultsPerPage: (value: number) => void;
|
|
23
|
+
};
|
|
13
24
|
export declare function EntityEmailLogs({ entity, onClick, children, }: {
|
|
14
25
|
entity?: Mercoa.EntityResponse;
|
|
15
26
|
onClick?: (invoiceId: string) => void;
|
|
16
|
-
children?: ({ dataLoaded, emails, hasNext, getNext, hasPrevious, getPrevious, resultsPerPage, setResultsPerPage, }:
|
|
17
|
-
|
|
18
|
-
emails: Mercoa.EmailLog[];
|
|
19
|
-
hasNext: boolean;
|
|
20
|
-
getNext: () => void;
|
|
21
|
-
hasPrevious: boolean;
|
|
22
|
-
getPrevious: () => void;
|
|
23
|
-
resultsPerPage: number;
|
|
24
|
-
setResultsPerPage: (value: number) => void;
|
|
25
|
-
}) => ReactElement | null;
|
|
26
|
-
}): import("react/jsx-runtime").JSX.Element | null;
|
|
27
|
+
children?: ({ dataLoaded, emails, hasNext, getNext, hasPrevious, getPrevious, resultsPerPage, setResultsPerPage, }: EntityEmailLogsChildrenProps) => JSX.Element;
|
|
28
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Mercoa } from '@mercoa/javascript';
|
|
3
3
|
import { FieldErrors, UseFormSetValue, UseFormWatch } from 'react-hook-form';
|
|
4
|
-
export declare function PayableDetails({ invoiceId, invoice, onRedirect, heightOffset, admin, documentPosition, children, invoicePreSubmit, }: {
|
|
4
|
+
export declare function PayableDetails({ invoiceId, invoice, onRedirect, heightOffset, admin, documentPosition, documentCustomization, children, invoicePreSubmit, }: {
|
|
5
5
|
invoiceId?: Mercoa.InvoiceId;
|
|
6
6
|
invoice?: Mercoa.InvoiceResponse;
|
|
7
7
|
onRedirect: (invoice: Mercoa.InvoiceResponse | undefined) => void;
|
|
8
8
|
heightOffset?: number;
|
|
9
9
|
admin?: boolean;
|
|
10
10
|
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
|
+
};
|
|
11
19
|
invoicePreSubmit?: (invoice: Mercoa.InvoiceCreationRequest) => Promise<Mercoa.InvoiceCreationRequest>;
|
|
12
20
|
children?: ({ invoice, refreshInvoice, ocrResponse, uploadedDocument, setUploadedDocument, height, setSelectedVendor, selectedVendor, getVendorPaymentLink, setValue, watch, }: PayableFormChildrenProps) => JSX.Element;
|
|
13
21
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -44,7 +52,7 @@ export declare function PayableFormHeader({ hideId }: {
|
|
|
44
52
|
hideId?: boolean;
|
|
45
53
|
}): import("react/jsx-runtime").JSX.Element;
|
|
46
54
|
export declare function PayableFormErrors(): import("react/jsx-runtime").JSX.Element | null;
|
|
47
|
-
export declare function PayableDocument({ onOCRComplete, onDocumentUpload, invoice, height, }: {
|
|
55
|
+
export declare function PayableDocument({ onOCRComplete, onDocumentUpload, invoice, height, downloadButton, viewEmailButton, theme, }: {
|
|
48
56
|
onOCRComplete?: (ocrResponse?: Mercoa.OcrResponse) => void;
|
|
49
57
|
onDocumentUpload?: ({ fileReaderObj, mimeType }: {
|
|
50
58
|
fileReaderObj: string;
|
|
@@ -52,8 +60,15 @@ export declare function PayableDocument({ onOCRComplete, onDocumentUpload, invoi
|
|
|
52
60
|
}) => void;
|
|
53
61
|
invoice?: Mercoa.InvoiceResponse;
|
|
54
62
|
height: number;
|
|
63
|
+
downloadButton?: ({ onClick }: {
|
|
64
|
+
onClick: () => void;
|
|
65
|
+
}) => JSX.Element;
|
|
66
|
+
viewEmailButton?: ({ onClick }: {
|
|
67
|
+
onClick: () => void;
|
|
68
|
+
}) => JSX.Element;
|
|
69
|
+
theme?: 'light' | 'dark';
|
|
55
70
|
}): import("react/jsx-runtime").JSX.Element;
|
|
56
|
-
export declare function PayableDocumentDisplay({ documents, invoice, height, showSourceEmail, }: {
|
|
71
|
+
export declare function PayableDocumentDisplay({ documents, invoice, height, showSourceEmail, downloadButton, viewEmailButton, }: {
|
|
57
72
|
documents?: Array<{
|
|
58
73
|
fileReaderObj: string;
|
|
59
74
|
mimeType: string;
|
|
@@ -61,6 +76,12 @@ export declare function PayableDocumentDisplay({ documents, invoice, height, sho
|
|
|
61
76
|
invoice?: Mercoa.InvoiceResponse;
|
|
62
77
|
height: number;
|
|
63
78
|
showSourceEmail?: boolean;
|
|
79
|
+
downloadButton?: ({ onClick }: {
|
|
80
|
+
onClick: () => void;
|
|
81
|
+
}) => JSX.Element;
|
|
82
|
+
viewEmailButton?: ({ onClick }: {
|
|
83
|
+
onClick: () => void;
|
|
84
|
+
}) => JSX.Element;
|
|
64
85
|
}): import("react/jsx-runtime").JSX.Element;
|
|
65
86
|
export declare function PayableActions({ approveButton, rejectButton, nonApproverButton, deleteButton, archiveButton, cancelButton, saveDraftButton, printCheckButton, createInvoiceButton, submitForApprovalButton, nextButton, markAsPaidButton, schedulePaymentButton, retryPaymentButton, admin, }: {
|
|
66
87
|
approveButton?: ({ onClick }: {
|