Here you can find the various parts of the EFB API.

Classes

Enumerations

Interfaces

Type Aliases

ViewType

Ƭ ViewType: "page" | "popup"

UiView type. Can be set to page or popup


PublicUiViewEntry

Ƭ PublicUiViewEntry<Ref>: Pick(opens in a new tab)<UiViewEntry<Ref>, "key" | "ref">

Publicly consumable ViewEntry interface to disallow the visibility to be mutated from outside of AppViewService

Type parameters
NameType
RefUiViewRef

Nullable

Ƭ Nullable<T>: null | T

Nullable Generic

Type parameters
Name
T

RequiredProps

Ƭ RequiredProps<T, K>: T & Required(opens in a new tab)<Pick(opens in a new tab)<T, K>>

Mark properties as required

Type parameters
NameType
TT
Kextends keyof T = keyof T

Valuable

Ƭ Valuable<T>: T extends unknown ? T | () => T : T

Mark as Valuable a type (ie: you can have elements that are string or a function returning a string)

Type parameters
Name
T

Variables

Efb

Const Efb: Container = Container.instance

EFB Instance

Functions

where

where<T>(value): (input: T, currentVal?: boolean) => boolean

Generates a function which maps an input to a boolean where input is strictly equal to value.

Type parameters
Name
T
Parameters
NameTypeDescription
valueTValue you want to compare your input with

Returns

fn

A function which maps an input to a boolean where input is strictly equal to value.

▸ (input, currentVal?): boolean

Parameters
NameType
inputT
currentVal?boolean

Returns

boolean


toString

toString<T>(): (input: T, currentVal?: string) => string

Generates a function which maps an input number to its string value.

Type parameters
NameType
Textends number

Returns

fn

A function which maps an input number to its string value.

▸ (input, currentVal?): string

Parameters
NameType
inputT
currentVal?string

Returns

string


isFunction

isFunction<T>(fn): fn is Function

Check if argument fn is a function.

Type parameters
NameTypeDescription
TunknownExpected type of fn.
Parameters
NameType
fnunknown

Returns

fn is Function


value

value<T>(arg): T

Get value by calling the arg if it is a function or by returning the arg.

Type parameters
Name
T
Parameters
NameType
argValuable<T>

Returns

T


offsetMousePosition

offsetMousePosition(e, vec, element?): void

Sets the mouse position offsets recursively until reaching the element.

Parameters
NameTypeDefault valueDescription
eMouseEvent(opens in a new tab)undefinedThe mouse event to process.
vecFloat64Array(opens in a new tab)undefinedThe vector to assign to.
elementnull | HTMLElement(opens in a new tab)nullThe element to reach.

Returns

void


elementOffset

elementOffset(from, limit?): Float64Array(opens in a new tab)

Get offsets recursively until reaching the limit element or the top element.

Parameters
NameTypeDefault valueDescription
fromHTMLElement(opens in a new tab)undefinedThe element from starting.
limitNullable<HTMLElement(opens in a new tab)>nullThe element to stop.

Returns

Float64Array(opens in a new tab)

Coordinates from top-left offset.