@mercoa/react 0.0.40 → 0.0.41
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/Mercoa.d.ts +0 -1
- package/dist/components/PayableDetails.d.ts +58 -8
- package/dist/components/generics.d.ts +0 -2
- package/dist/index.es.js +17217 -16674
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +54 -51
- 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
|
@@ -8,7 +8,6 @@ export interface MercoaContext {
|
|
|
8
8
|
entity: Mercoa.EntityResponse | undefined;
|
|
9
9
|
user: Mercoa.EntityUserResponse | undefined;
|
|
10
10
|
users: Mercoa.EntityUserResponse[];
|
|
11
|
-
metadata: Mercoa.EntityMetadataResponse[];
|
|
12
11
|
customPaymentMethodSchemas: Mercoa.CustomPaymentMethodSchemaResponse[];
|
|
13
12
|
selectedInvoice: Mercoa.InvoiceResponse | undefined;
|
|
14
13
|
setSelectedInvoice: Function;
|
|
@@ -8,7 +8,7 @@ export declare function PayableDetails({ invoiceId, invoice, onRedirect, heightO
|
|
|
8
8
|
admin?: boolean;
|
|
9
9
|
documentPosition?: 'right' | 'left' | 'none';
|
|
10
10
|
invoicePreSubmit?: (invoice: Mercoa.InvoiceCreationRequest) => Promise<Mercoa.InvoiceCreationRequest>;
|
|
11
|
-
children?: ({ invoice, refreshInvoice, ocrResponse, uploadedDocument, setUploadedDocument, height, }: PayableFormChildrenProps) => JSX.Element;
|
|
11
|
+
children?: ({ invoice, refreshInvoice, ocrResponse, uploadedDocument, setUploadedDocument, height, setSelectedVendor, selectedVendor, getVendorPaymentLink, setValue, watch, }: PayableFormChildrenProps) => JSX.Element;
|
|
12
12
|
}): import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
export type PayableFormChildrenProps = {
|
|
14
14
|
invoice?: Mercoa.InvoiceResponse;
|
|
@@ -19,6 +19,12 @@ export type PayableFormChildrenProps = {
|
|
|
19
19
|
height: number;
|
|
20
20
|
setSelectedVendor: (e?: Mercoa.CounterpartyResponse) => void;
|
|
21
21
|
selectedVendor?: Mercoa.CounterpartyResponse;
|
|
22
|
+
getVendorPaymentLink: () => Promise<string | undefined>;
|
|
23
|
+
setValue: (name: any, value: any, options?: {
|
|
24
|
+
shouldValidate?: boolean;
|
|
25
|
+
shouldDirty?: boolean;
|
|
26
|
+
}) => void;
|
|
27
|
+
watch: (name: string, defaultValue?: any) => any;
|
|
22
28
|
};
|
|
23
29
|
export declare function PayableForm({ invoice, ocrResponse, uploadedDocument, setUploadedDocument, onRedirect, refreshInvoice, height, admin, invoicePreSubmit, children, }: {
|
|
24
30
|
invoice?: Mercoa.InvoiceResponse;
|
|
@@ -30,7 +36,7 @@ export declare function PayableForm({ invoice, ocrResponse, uploadedDocument, se
|
|
|
30
36
|
height: number;
|
|
31
37
|
admin?: boolean;
|
|
32
38
|
invoicePreSubmit?: (invoice: Mercoa.InvoiceCreationRequest) => Promise<Mercoa.InvoiceCreationRequest>;
|
|
33
|
-
children?: ({ invoice, refreshInvoice, ocrResponse, uploadedDocument, setUploadedDocument, height, setSelectedVendor, selectedVendor, }: PayableFormChildrenProps) => JSX.Element;
|
|
39
|
+
children?: ({ invoice, refreshInvoice, ocrResponse, uploadedDocument, setUploadedDocument, height, setSelectedVendor, selectedVendor, getVendorPaymentLink, setValue, watch, }: PayableFormChildrenProps) => JSX.Element;
|
|
34
40
|
}): import("react/jsx-runtime").JSX.Element;
|
|
35
41
|
export declare function PayableFormHeader({ hideId }: {
|
|
36
42
|
hideId?: boolean;
|
|
@@ -54,17 +60,59 @@ export declare function PayableDocumentDisplay({ documents, invoice, height, sho
|
|
|
54
60
|
height: number;
|
|
55
61
|
showSourceEmail?: boolean;
|
|
56
62
|
}): import("react/jsx-runtime").JSX.Element;
|
|
57
|
-
export declare function PayableActions({ admin }: {
|
|
63
|
+
export declare function PayableActions({ approveButton, rejectButton, nonApproverButton, deleteButton, archiveButton, cancelButton, saveDraftButton, printCheckButton, createInvoiceButton, submitForApprovalButton, nextButton, markAsPaidButton, schedulePaymentButton, retryPaymentButton, admin, }: {
|
|
64
|
+
approveButton?: ({ onClick }: {
|
|
65
|
+
onClick: () => void;
|
|
66
|
+
}) => JSX.Element;
|
|
67
|
+
rejectButton?: ({ onClick }: {
|
|
68
|
+
onClick: () => void;
|
|
69
|
+
}) => JSX.Element;
|
|
70
|
+
nonApproverButton?: ({ onClick }: {
|
|
71
|
+
onClick: () => void;
|
|
72
|
+
}) => JSX.Element;
|
|
73
|
+
deleteButton?: ({ onClick }: {
|
|
74
|
+
onClick: () => void;
|
|
75
|
+
}) => JSX.Element;
|
|
76
|
+
archiveButton?: ({ onClick }: {
|
|
77
|
+
onClick: () => void;
|
|
78
|
+
}) => JSX.Element;
|
|
79
|
+
cancelButton?: ({ onClick }: {
|
|
80
|
+
onClick: () => void;
|
|
81
|
+
}) => JSX.Element;
|
|
82
|
+
saveDraftButton?: ({ onClick }: {
|
|
83
|
+
onClick: () => void;
|
|
84
|
+
}) => JSX.Element;
|
|
85
|
+
printCheckButton?: ({ onClick }: {
|
|
86
|
+
onClick: () => void;
|
|
87
|
+
}) => JSX.Element;
|
|
88
|
+
createInvoiceButton?: ({ onClick }: {
|
|
89
|
+
onClick: () => void;
|
|
90
|
+
}) => JSX.Element;
|
|
91
|
+
submitForApprovalButton?: ({ onClick, approversAssigned, }: {
|
|
92
|
+
onClick: () => void;
|
|
93
|
+
approversAssigned: boolean;
|
|
94
|
+
}) => JSX.Element;
|
|
95
|
+
nextButton?: ({ onClick }: {
|
|
96
|
+
onClick: () => void;
|
|
97
|
+
}) => JSX.Element;
|
|
98
|
+
markAsPaidButton?: ({ onClick }: {
|
|
99
|
+
onClick: () => void;
|
|
100
|
+
}) => JSX.Element;
|
|
101
|
+
schedulePaymentButton?: ({ onClick }: {
|
|
102
|
+
onClick: () => void;
|
|
103
|
+
}) => JSX.Element;
|
|
104
|
+
retryPaymentButton?: ({ onClick }: {
|
|
105
|
+
onClick: () => void;
|
|
106
|
+
}) => JSX.Element;
|
|
58
107
|
admin?: boolean;
|
|
59
108
|
}): import("react/jsx-runtime").JSX.Element;
|
|
60
109
|
export declare function PayableOverview({ readOnly }: {
|
|
61
110
|
readOnly?: boolean;
|
|
62
111
|
}): import("react/jsx-runtime").JSX.Element;
|
|
63
|
-
export declare function SelectPaymentMethod({ isSource, isDestination, disableCreation,
|
|
112
|
+
export declare function SelectPaymentMethod({ isSource, isDestination, disableCreation, readOnly, }: {
|
|
64
113
|
isSource?: boolean;
|
|
65
114
|
isDestination?: boolean;
|
|
66
115
|
disableCreation?: boolean;
|
|
67
|
-
currentPaymentMethodId?: string;
|
|
68
116
|
readOnly?: boolean;
|
|
69
117
|
}): import("react/jsx-runtime").JSX.Element;
|
|
70
118
|
export declare function PayablePaymentSource({ readOnly }: {
|
|
@@ -104,14 +152,16 @@ export declare function propagateApprovalPolicy({ userId, policyId, approvalPoli
|
|
|
104
152
|
export declare function PayableMetadata({ skipValidation, readOnly }: {
|
|
105
153
|
skipValidation?: boolean;
|
|
106
154
|
readOnly?: boolean;
|
|
107
|
-
}): import("react/jsx-runtime").JSX.Element
|
|
108
|
-
export declare function MetadataSelection({ schema, value, setValue, skipValidation, readOnly, }: {
|
|
155
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
156
|
+
export declare function MetadataSelection({ schema, value, setValue, skipValidation, readOnly, lineItem, hideLabel, }: {
|
|
109
157
|
schema: Mercoa.MetadataSchema;
|
|
110
158
|
value?: string;
|
|
111
159
|
setValue: (e: string) => void;
|
|
112
160
|
skipValidation?: boolean;
|
|
113
161
|
readOnly?: boolean;
|
|
114
|
-
|
|
162
|
+
lineItem?: boolean;
|
|
163
|
+
hideLabel?: boolean;
|
|
164
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
115
165
|
export declare function PayableLineItems({ readOnly }: {
|
|
116
166
|
readOnly?: boolean;
|
|
117
167
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -160,8 +160,6 @@ export declare function CountPill({ count, selected }: {
|
|
|
160
160
|
selected: boolean;
|
|
161
161
|
}): import("react/jsx-runtime").JSX.Element;
|
|
162
162
|
export declare function getAllUsers(client: MercoaClient, entityId: string): Promise<Mercoa.EntityUserResponse[]>;
|
|
163
|
-
export declare function getEntityMetadata(client: MercoaClient, entityId: string): Promise<Mercoa.EntityMetadataResponse[]>;
|
|
164
|
-
export declare function getPaymentMethodSchemas(client: MercoaClient): Promise<Mercoa.CustomPaymentMethodSchemaResponse[]>;
|
|
165
163
|
export declare function NoSession({ componentName }: {
|
|
166
164
|
componentName: string;
|
|
167
165
|
}): import("react/jsx-runtime").JSX.Element;
|