UNPKG

@eva-ics/webengine-react

Version:

React components for EVA ICS HMI Web Engine

54 lines (53 loc) 1.61 kB
import { Eva, EvaError, SvcMessage } from "@eva-ics/webengine"; type FunctionLogout = () => void; export declare enum HMIAppStateKind { LoginSession = "login_session", LoginAuto = "login_auto", Login = "login", OtpSetup = "otp_setup", OtpAuth = "otp_auth", LoginForm = "login_form", Active = "active" } declare enum LoginFailedAction { Default = "default", Retry = "retry", Abort = "abort" } export interface HMIAppState { state: HMIAppStateKind; svc_msg?: SvcMessage; err?: EvaError; } interface LoginProps { label_login?: string; label_password?: string; label_enter?: string; label_cancel?: string; label_otp_setup?: string; label_otp_setup_scan?: string; label_otp_required?: string; label_otp_code?: string; label_otp_invalid?: string; label_remember?: string; label_logging_in?: string; otp_issuer_name?: string; otp_qr_size?: number; cache_login?: boolean; cache_auth?: boolean; register_globals?: boolean; form_header?: () => JSX.Element; form_footer?: () => JSX.Element; on_login_failed?: (err: EvaError) => LoginFailedAction | void; prelogin_hook?: () => Promise<unknown>; state_announce?: (app_state: HMIAppState) => void; } declare const HMIApp: ({ engine, Dashboard, login_props }: { engine?: Eva; Dashboard: ({ engine, logout }: { engine: Eva; logout: FunctionLogout; }) => JSX.Element; login_props?: LoginProps; }) => import("react/jsx-runtime").JSX.Element; export { HMIApp, FunctionLogout, LoginProps, LoginFailedAction };