@mercoa/react 0.0.34 → 0.0.36

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.
@@ -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: Function;
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 InvoiceDetails({ invoiceId, invoice, onRedirect, heightOffset, admin, layout, }: {
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 EditInvoiceForm({ invoice, ocrResponse, uploadedImage, setUploadedImage, onRedirect, refreshInvoice, height, admin, }: {
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 InvoiceTable({ statuses, search, metadata, startDate, endDate, onSelectInvoice, columns, children, }: {
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 InvoiceInbox({ statuses, onSelectInvoice, statusSelectionStyle, }: {
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;
@@ -73,7 +73,7 @@ export declare function StatCard({ title, value, icon, size, }: {
73
73
  icon?: ReactNode;
74
74
  size?: 'sm' | 'md';
75
75
  }): import("react/jsx-runtime").JSX.Element;
76
- export declare function MercoaCombobox({ onChange, options, value, label, placeholder, disabledText, displayIndex, secondaryDisplayIndex, className, labelClassName, inputClassName: suppliedInputClassName, multiple, freeText, displaySelectedAs, }: {
76
+ export declare function MercoaCombobox({ onChange, options, value, label, placeholder, disabledText, displayIndex, secondaryDisplayIndex, className, labelClassName, inputClassName: suppliedInputClassName, multiple, freeText, displaySelectedAs, readOnly, }: {
77
77
  onChange: (val: any) => any;
78
78
  options: {
79
79
  value: any;
@@ -92,6 +92,7 @@ export declare function MercoaCombobox({ onChange, options, value, label, placeh
92
92
  multiple?: boolean;
93
93
  freeText?: boolean;
94
94
  displaySelectedAs?: 'input' | 'pill';
95
+ readOnly?: boolean;
95
96
  }): import("react/jsx-runtime").JSX.Element;
96
97
  export declare function TokenVerification({ token, children, }: {
97
98
  token?: string;
@@ -122,8 +123,8 @@ export declare function MercoaInputLabel({ label, name }: {
122
123
  label: string;
123
124
  name?: string;
124
125
  }): 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';
126
+ 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, }: {
127
+ type?: 'text' | 'password' | 'email' | 'number' | 'date' | 'currency';
127
128
  label?: string;
128
129
  onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
129
130
  onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
@@ -149,6 +150,7 @@ export declare function MercoaInput({ type, label, onChange, onBlur, required, r
149
150
  max?: string | number;
150
151
  step?: number;
151
152
  noBorder?: boolean;
153
+ inputMask?: string;
152
154
  }): import("react/jsx-runtime").JSX.Element;
153
155
  export declare function CountPill({ count, selected }: {
154
156
  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;