Options
All
  • Public
  • Public/Protected
  • All
Menu

@finapi/web-form - v2.48.0

Index

Type aliases

Environment

Environment: PublicEnvironment | "staging" | "releaseStaging"

All environments

LayoutConfig

LayoutConfig: "xs" | "sm" | "md" | "lg" | { lg: number; md: number; sm: number; xl: number; xs: number }

Responsive Layout Configuration.

OnFailError

OnFailError: { code?: string; message?: string; type: "BACKEND_ERROR" } | { code: "ALREADY_OPENED" | "UNEXPECTED" | "INVALID_URL" | "UNDEFINED_TOKEN"; message: string; type: "FRONTEND_ERROR" }

Error details forwarded to the WebFormHandlers.onFail callback when the Web Form dispatches its fail event.

  • BACKEND_ERROR — the error originates from a failing finAPI API call.
  • FRONTEND_ERROR — a client-side error condition detected by the Web Form.

PublicEnvironment

PublicEnvironment: "sandbox" | "live"

Publicly accessible environments.

WebFormLanguage

WebFormLanguage: "cs" | "de" | "en" | "es" | "fr" | "it" | "nl" | "pl" | "ro" | "sk" | "tr"

Functions

load

  • Injects Web Component into the target HTMLElement. When this function is called for the first time, it will also create a new script tag that will fetch the Web Component source js file. Before the new Web Component, any previous instance will be first automatically unloaded.

    Parameters

    • target: HTMLElement

      a target element into which the Web Form will be appended as a child

    • properties: WebFormProps

      Web Form properties

    • Optional handlers: WebFormHandlers

      Web Form event handlers

    • Optional ownerDocument: Document

      a document into which body a script tag that loads Web Component source is injected. If undefined, the globally-scoped document is selected.

    Returns WebFormElement

    the created Web Form element, which can be used to update web component attributes after initial load

unload

  • unload(ownerDocument?: Document): void
  • Removes Web Component from the document. The script loading web form source JS files is removed as well.

    Parameters

    • Optional ownerDocument: Document

      a document in which the web component was injected

    Returns void

Generated using TypeDoc