@mercoa/react 0.0.1

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.
@@ -0,0 +1,34 @@
1
+ import { Mercoa, MercoaClient } from '@mercoa/javascript';
2
+ import { Moov } from '@moovio/moov-js';
3
+ import { ReactNode } from 'react';
4
+ import { TokenOptions } from '.';
5
+ export interface MercoaContext {
6
+ token?: string;
7
+ entityId?: string;
8
+ entity: Mercoa.EntityResponse | undefined;
9
+ user: Mercoa.EntityUserResponse | undefined;
10
+ users: Mercoa.EntityUserResponse[];
11
+ selectedInvoice: Mercoa.InvoiceResponse | undefined;
12
+ setSelectedInvoice: Function;
13
+ client: MercoaClient | undefined;
14
+ refresh: Function;
15
+ refreshId: number;
16
+ organization: Mercoa.OrganizationResponse | undefined;
17
+ moov: Moov | undefined;
18
+ moovToken: string | undefined;
19
+ moovAccountId: string | undefined;
20
+ iframeOptions: TokenOptions | undefined;
21
+ setIframeOptions: Function;
22
+ getNewToken: Function;
23
+ googleMapsApiKey?: string;
24
+ }
25
+ export declare function MercoaSession({ children, entityId, entityUserId, token, endpoint, isAdmin, googleMapsApiKey, }: {
26
+ children?: ReactNode;
27
+ entityId?: Mercoa.EntityId;
28
+ entityUserId?: Mercoa.EntityUserId;
29
+ token: string;
30
+ endpoint?: string;
31
+ isAdmin?: boolean;
32
+ googleMapsApiKey?: string;
33
+ }): import("react/jsx-runtime").JSX.Element;
34
+ export declare const useMercoaSession: () => MercoaContext;
@@ -0,0 +1,4 @@
1
+ import { Mercoa } from '@mercoa/javascript';
2
+ export declare function Receivables({ onSelectInvoice }: {
3
+ onSelectInvoice?: (invoice: Mercoa.InvoiceResponse) => any;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,74 @@
1
+ import { Mercoa } from '@mercoa/javascript';
2
+ import { HTMLAttributes, ReactNode } from 'react';
3
+ import { TokenOptions } from '.';
4
+ export interface MercoaButtonProps extends HTMLAttributes<HTMLButtonElement> {
5
+ isEmphasized: boolean;
6
+ tooltip?: string;
7
+ className?: string;
8
+ color?: 'red' | 'green' | 'blue' | 'indigo' | 'yellow';
9
+ size?: 'sm' | 'md' | 'lg';
10
+ children: ReactNode;
11
+ [x: string]: any;
12
+ }
13
+ export declare function MercoaButton({ children, tooltip, isEmphasized, className, color, icon, size, ...props }: MercoaButtonProps): import("react/jsx-runtime").JSX.Element;
14
+ export declare function TableOrderHeader({ orderDirection, isSelected, setOrder, title, }: {
15
+ orderDirection: Mercoa.OrderDirection;
16
+ isSelected: boolean;
17
+ title: string;
18
+ setOrder: (orderDirection: Mercoa.OrderDirection) => void;
19
+ }): import("react/jsx-runtime").JSX.Element;
20
+ export declare function Tooltip({ children, title, offset, }: {
21
+ children: React.ReactNode;
22
+ title: React.ReactNode;
23
+ offset?: number;
24
+ }): import("react/jsx-runtime").JSX.Element;
25
+ export declare function Skeleton({ rows, height }: {
26
+ rows?: number;
27
+ height?: number;
28
+ }): import("react/jsx-runtime").JSX.Element;
29
+ export declare function DefaultPaymentMethodIndicator({ paymentMethod, }: {
30
+ paymentMethod: {
31
+ id: string;
32
+ isDefaultSource: boolean;
33
+ };
34
+ }): import("react/jsx-runtime").JSX.Element;
35
+ export declare function Switch({ register, name, label, disabled, }: {
36
+ register: Function;
37
+ name: string;
38
+ label: ReactNode;
39
+ disabled?: boolean;
40
+ }): import("react/jsx-runtime").JSX.Element;
41
+ export declare function DebouncedSearch({ onSettle, placeholder }: {
42
+ onSettle: (...args: any) => any;
43
+ placeholder: string;
44
+ }): import("react/jsx-runtime").JSX.Element;
45
+ export declare function StatCard({ title, value, icon, size, }: {
46
+ title: string;
47
+ value: string | number | ReactNode;
48
+ icon?: ReactNode;
49
+ size?: 'sm' | 'md';
50
+ }): import("react/jsx-runtime").JSX.Element;
51
+ export declare function MercoaCombobox({ onChange, options, value, label, disabledText, displayIndex, secondaryDisplayIndex, multiple, className, labelClassName, inputClassName, }: {
52
+ onChange: (val: any) => any;
53
+ options: {
54
+ value: any;
55
+ disabled: boolean;
56
+ }[];
57
+ value: any;
58
+ label?: string;
59
+ displayIndex?: string;
60
+ secondaryDisplayIndex?: string | string[];
61
+ disabledText?: string;
62
+ multiple?: boolean;
63
+ className?: string;
64
+ labelClassName?: string;
65
+ inputClassName?: string;
66
+ }): import("react/jsx-runtime").JSX.Element;
67
+ export declare function TokenVerification({ token, children, }: {
68
+ token?: string;
69
+ children: (value: TokenOptions) => React.ReactNode;
70
+ }): import("react/jsx-runtime").JSX.Element;
71
+ export declare function LoadingSpinner({ absolute }: {
72
+ absolute?: boolean;
73
+ }): import("react/jsx-runtime").JSX.Element;
74
+ export declare function LoadingSpinnerIcon(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,22 @@
1
+ import { Mercoa } from '@mercoa/javascript';
2
+ export * from './BankAccounts';
3
+ export * from './Checks';
4
+ export * from './CustomPaymentMethod';
5
+ export * from './EntityDetails';
6
+ export * from './EntityOnboarding';
7
+ export * from './EntityPortal';
8
+ export * from './EntityUser';
9
+ export * from './Inbox';
10
+ export * from './Mercoa';
11
+ export * from './Receivables';
12
+ export * from './generics';
13
+ export type onCloseFunction = (value: boolean) => void;
14
+ export interface TokenOptions {
15
+ organizationId: string;
16
+ entityId?: string;
17
+ userId?: string;
18
+ entityForeignId?: string;
19
+ invoiceId?: string;
20
+ counterpartyId?: string;
21
+ options: Mercoa.TokenGenerationOptions;
22
+ }
@@ -0,0 +1 @@
1
+ export * from './components/index';