UNPKG

@finagraph/strongbox-finconnect-react

Version:

React components to integrate with Finagraph Strongbox

61 lines (60 loc) 2.29 kB
import * as React from 'react'; import { Theme } from '../../Models/Theme/Theme'; import { StrongboxConnectionRequest } from '../../Utils/ConnectStrongbox'; import { ConnectionRequestDescriptor } from '../../Models/Api/strongbox.models'; import { TextContent } from '../../Text/TextContent'; export declare enum LinkerModalErrorState { FailureFindingExistingConnection = "FailureFindingExistingConnection", FailureCreatingConnectionDescriptor = "FailureCreatingConnectionDescriptor" } export interface ISBLinkerModalProps { cxnRequest: StrongboxConnectionRequest; checkAuthorizationStatus?: boolean; onError?: (errorState: LinkerModalErrorState) => void; onPrerequisitesRequired?: (cxnRequest: StrongboxConnectionRequest) => void; onAuthAborted?: () => void; onCompleted?: (success: boolean) => void; onConnected?: (cxnRequest: StrongboxConnectionRequest, apiRequestParameters?: ConnectionRequestDescriptor) => void; onDisconnection?: (success: boolean) => void; className?: string; disabled?: boolean; icon?: string; label?: string; primary?: boolean; rootStyle?: React.CSSProperties; showProgress?: boolean; secondary?: boolean; style?: React.CSSProperties; textContent?: TextContent; language?: string; theme?: Theme; tooltip?: React.ReactNode; } type State = { connectionRequestInfo: ConnectionRequestDescriptor | undefined; cxnRequestWithId: StrongboxConnectionRequest; errorText: string | undefined; gettingConnectionDescriptor: boolean; connectingAccountingSystem: boolean; isDisconnecting: boolean; queryingConnect: boolean; textContent?: TextContent; }; export declare class LinkerModal extends React.PureComponent<ISBLinkerModalProps, State> { static defaultProps: any; constructor(props: ISBLinkerModalProps); private IsDisabledState; private _modal; componentDidMount(): void; render(): React.JSX.Element; OnClick: () => void; private GetConnection; private InitState; private OnImportError; private OnModalAborted; private onAccountingSystemConnected; private ExecuteConnect; private ExecuteDisconnect; private RenderModal; } export {};