Skip to main content

Abstract Class: AbstractFmcPage<P>

Defined in: src/sdk/fmc/AbstractFmcPage.ts:36

Base abstract class for FMC pages

Extended by

Type Parameters

Type ParameterDefault type
P extends object | nullany

Constructors

Constructor

protected new AbstractFmcPage<P>(bus, screen, props): AbstractFmcPage<P>

Defined in: src/sdk/fmc/AbstractFmcPage.ts:99

Ctor

Parameters

ParameterTypeDescription
busEventBusthe event bus
screenFmcScreen<any, any>the FMC screen instance
propsPthe initial props for this page

Returns

AbstractFmcPage<P>

Properties

bus

readonly bus: EventBus

Defined in: src/sdk/fmc/AbstractFmcPage.ts:99

the event bus


clockConsumer

protected clockConsumer: Consumer<number>

Defined in: src/sdk/fmc/AbstractFmcPage.ts:88


defaultLifecycle

readonly defaultLifecycle: ReadonlyLifecycle

Defined in: src/sdk/fmc/AbstractFmcPage.ts:59

The default lifecycle for this page


isInitialized

isInitialized: boolean = false

Defined in: src/sdk/fmc/AbstractFmcPage.ts:120


memorizedComponents

readonly memorizedComponents: [FmcComponent<FmcComponentOptions> | null, FmcComponent<FmcComponentOptions> | null, FmcComponent<FmcComponentOptions> | null][] = []

Defined in: src/sdk/fmc/AbstractFmcPage.ts:48


params

readonly params: Map<any, any>

Defined in: src/sdk/fmc/AbstractFmcPage.ts:69


screen

readonly screen: FmcScreen<any, any>

Defined in: src/sdk/fmc/AbstractFmcPage.ts:99

the FMC screen instance


lifecyclePolicy

static lifecyclePolicy: FmcPageLifecyclePolicy = FmcPageLifecyclePolicy.Singleton

Defined in: src/sdk/fmc/AbstractFmcPage.ts:40

Configures the FmcPageLifecyclePolicy for this page

Accessors

props

Get Signature

get props(): P

Defined in: src/sdk/fmc/AbstractFmcPage.ts:80

Obtains the current value of the page's props

Throws

if the props have not yet been initialised

Returns

P

the props value

Methods

acceptPageExtension()

acceptPageExtension(extension): void

Defined in: src/sdk/fmc/AbstractFmcPage.ts:344

Accepts a page extension

Parameters

ParameterTypeDescription
extensionFmcPageExtension<AbstractFmcPage<P>>the page extension

Returns

void


addBinding()

addBinding(binding): void

Defined in: src/sdk/fmc/AbstractFmcPage.ts:391

Registers a subscription or a ConsumerSubject on the page. This enables the page to manage the lifecycle of all subscriptions that are used within it, for example by pausing them whenever the page is out of view, or destroying them when the page is destroyed.

Parameters

ParameterTypeDescription
bindingSubscription | ConsumerSubject<any>a subscription

Returns

void

Deprecated

use the lifecycle API with defaultLifecycle instead


clockHandler()

protected clockHandler(d): void

Defined in: src/sdk/fmc/AbstractFmcPage.ts:112

Handles when update/refresh of the FMCPage based on clock input

Parameters

ParameterTypeDescription
dnumberis the Clock Value from the Event Bus

Returns

void


createDefaultLifecycle()

protected createDefaultLifecycle(): Lifecycle

Defined in: src/sdk/fmc/AbstractFmcPage.ts:65

Creates the page's default lifecycle.

Returns

Lifecycle

A lifecycle to use as the default.


destroy()

destroy(): void

Defined in: src/sdk/fmc/AbstractFmcPage.ts:218

Destroys the page and calls appropriate event handlers

Returns

void


handleLineSelectKey()

handleLineSelectKey(event): Promise<string | boolean>

Defined in: src/sdk/fmc/AbstractFmcPage.ts:402

Handles a line select key received by the FMC, before passing it on to components

Parameters

ParameterTypeDescription
eventLineSelectKeyEventthe LSK event

Returns

Promise<string | boolean>

a Promise that resolves to a boolean or string


handleScrolling()

handleScrolling(event): Promise<string | boolean>

Defined in: src/sdk/fmc/AbstractFmcPage.ts:442

Handles a scrolling event received by the FMC, before passing it on to components

Parameters

ParameterTypeDescription
event"pageLeft" | "pageRight" | "pageUp" | "pageDown"the scrolling event

Returns

Promise<string | boolean>

a Promise that resolves to a boolean or string


init()

init(): void

Defined in: src/sdk/fmc/AbstractFmcPage.ts:127

Initializes the page.

Use this for setting up subscriptions and such.

Returns

void


initialRender()

initialRender(): void

Defined in: src/sdk/fmc/AbstractFmcPage.ts:256

Initial render function

Returns

void

Throws

If a PositionedFmcColumn attempts to return an FmcRenderTemplate from its render function (only strings are allowed).


invalidate()

invalidate(): void

Defined in: src/sdk/fmc/AbstractFmcPage.ts:248

Invalidates the render and sets the component into the dirty state

Returns

void


onDestroy()

protected onDestroy(): void

Defined in: src/sdk/fmc/AbstractFmcPage.ts:241

Destroy lifecycle hook

Returns

void


onHandleScrolling()

protected onHandleScrolling(event): Promise<string | boolean>

Defined in: src/sdk/fmc/AbstractFmcPage.ts:461

Handles a scrolling event received by the FMC, before passing it on to components

Parameters

ParameterTypeDescription
event"pageLeft" | "pageRight" | "pageUp" | "pageDown"the scrolling event

Returns

Promise<string | boolean>

a Promise that resolves to a boolean or string


onHandleSelectKey()

protected onHandleSelectKey(event): Promise<string | boolean>

Defined in: src/sdk/fmc/AbstractFmcPage.ts:431

Handles a line select key received by the FMC, before passing it on to components

Parameters

ParameterTypeDescription
eventLineSelectKeyEventthe LSK event

Returns

Promise<string | boolean>

a Promise that resolves to a boolean or string


onInit()

protected onInit(): void

Defined in: src/sdk/fmc/AbstractFmcPage.ts:140

Init lifecycle hook

Returns

void


onPageButtonPressed()

onPageButtonPressed(): void

Defined in: src/sdk/fmc/AbstractFmcPage.ts:211

Is called when the page button for the current page is pressed while already on that page.

Returns

void


onPause()

protected onPause(): void

Defined in: src/sdk/fmc/AbstractFmcPage.ts:170

Pause lifecycle hook

Returns

void


onResume()

protected onResume(): void

Defined in: src/sdk/fmc/AbstractFmcPage.ts:206

Resume lifecycle hook

Returns

void


pause()

pause(): void

Defined in: src/sdk/fmc/AbstractFmcPage.ts:147

Pauses the page and calls appropriate event handlers

Returns

void


render()

abstract render(): FmcRenderTemplate[]

Defined in: src/sdk/fmc/AbstractFmcPage.ts:378

Returns

FmcRenderTemplate[]


resume()

resume(props?): void

Defined in: src/sdk/fmc/AbstractFmcPage.ts:179

Resumes the page and calls appropriate event handlers

Parameters

ParameterTypeDescription
props?Pthe props to pass in to the page, if applicable

Returns

void


isPositionedFmcColumn()

static isPositionedFmcColumn(column): column is PositionedFmcColumn

Defined in: src/sdk/fmc/AbstractFmcPage.ts:353

Tests whether an FmcRenderTemplateColumn is a PositionedFmcColumn.

Parameters

ParameterTypeDescription
columnFmcRenderTemplateColumnThe FmcRenderTemplateColumn to test.

Returns

column is PositionedFmcColumn

Whether the column is a PositionedFmcColumn.


isRenderedPositionedFmcColumn()

static isRenderedPositionedFmcColumn(column): column is RenderedPositionedFmcColumn

Defined in: src/sdk/fmc/AbstractFmcPage.ts:374

Tests whether the input is a RenderedPositionedFmcColumn.

Parameters

ParameterTypeDescription
columnanyThe input to test.

Returns

column is RenderedPositionedFmcColumn

Whether the column is a RenderedPositionedFmcColumn.