Abstract Class: AbstractFmcPage<P>
Defined in: src/sdk/fmc/AbstractFmcPage.ts:36
Base abstract class for FMC pages
Extended by
Type Parameters
| Type Parameter | Default type |
|---|---|
P extends object | null | any |
Constructors
Constructor
protectednew AbstractFmcPage<P>(bus,screen,props):AbstractFmcPage<P>
Defined in: src/sdk/fmc/AbstractFmcPage.ts:99
Ctor
Parameters
| Parameter | Type | Description |
|---|---|---|
bus | EventBus | the event bus |
screen | FmcScreen<any, any> | the FMC screen instance |
props | P | the initial props for this page |
Returns
AbstractFmcPage<P>
Properties
bus
readonlybus:EventBus
Defined in: src/sdk/fmc/AbstractFmcPage.ts:99
the event bus
clockConsumer
protectedclockConsumer:Consumer<number>
Defined in: src/sdk/fmc/AbstractFmcPage.ts:88
defaultLifecycle
readonlydefaultLifecycle: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
readonlymemorizedComponents: [FmcComponent<FmcComponentOptions> |null,FmcComponent<FmcComponentOptions> |null,FmcComponent<FmcComponentOptions> |null][] =[]
Defined in: src/sdk/fmc/AbstractFmcPage.ts:48
params
readonlyparams:Map<any,any>
Defined in: src/sdk/fmc/AbstractFmcPage.ts:69
screen
readonlyscreen:FmcScreen<any,any>
Defined in: src/sdk/fmc/AbstractFmcPage.ts:99
the FMC screen instance
lifecyclePolicy
staticlifecyclePolicy: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
| Parameter | Type | Description |
|---|---|---|
extension | FmcPageExtension<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
| Parameter | Type | Description |
|---|---|---|
binding | Subscription | ConsumerSubject<any> | a subscription |
Returns
void
Deprecated
use the lifecycle API with defaultLifecycle instead
clockHandler()
protectedclockHandler(d):void
Defined in: src/sdk/fmc/AbstractFmcPage.ts:112
Handles when update/refresh of the FMCPage based on clock input
Parameters
| Parameter | Type | Description |
|---|---|---|
d | number | is the Clock Value from the Event Bus |
Returns
void
createDefaultLifecycle()
protectedcreateDefaultLifecycle():Lifecycle
Defined in: src/sdk/fmc/AbstractFmcPage.ts:65
Creates the page's default lifecycle.
Returns
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
| Parameter | Type | Description |
|---|---|---|
event | LineSelectKeyEvent | the 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
| Parameter | Type | Description |
|---|---|---|
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()
protectedonDestroy():void
Defined in: src/sdk/fmc/AbstractFmcPage.ts:241
Destroy lifecycle hook
Returns
void
onHandleScrolling()
protectedonHandleScrolling(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
| Parameter | Type | Description |
|---|---|---|
event | "pageLeft" | "pageRight" | "pageUp" | "pageDown" | the scrolling event |
Returns
Promise<string | boolean>
a Promise that resolves to a boolean or string
onHandleSelectKey()
protectedonHandleSelectKey(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
| Parameter | Type | Description |
|---|---|---|
event | LineSelectKeyEvent | the LSK event |
Returns
Promise<string | boolean>
a Promise that resolves to a boolean or string
onInit()
protectedonInit():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()
protectedonPause():void
Defined in: src/sdk/fmc/AbstractFmcPage.ts:170
Pause lifecycle hook
Returns
void
onResume()
protectedonResume():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()
abstractrender():FmcRenderTemplate[]
Defined in: src/sdk/fmc/AbstractFmcPage.ts:378
Returns
resume()
resume(
props?):void
Defined in: src/sdk/fmc/AbstractFmcPage.ts:179
Resumes the page and calls appropriate event handlers
Parameters
| Parameter | Type | Description |
|---|---|---|
props? | P | the props to pass in to the page, if applicable |
Returns
void
isPositionedFmcColumn()
staticisPositionedFmcColumn(column):column is PositionedFmcColumn
Defined in: src/sdk/fmc/AbstractFmcPage.ts:353
Tests whether an FmcRenderTemplateColumn is a PositionedFmcColumn.
Parameters
| Parameter | Type | Description |
|---|---|---|
column | FmcRenderTemplateColumn | The FmcRenderTemplateColumn to test. |
Returns
column is PositionedFmcColumn
Whether the column is a PositionedFmcColumn.
isRenderedPositionedFmcColumn()
staticisRenderedPositionedFmcColumn(column):column is RenderedPositionedFmcColumn
Defined in: src/sdk/fmc/AbstractFmcPage.ts:374
Tests whether the input is a RenderedPositionedFmcColumn.
Parameters
| Parameter | Type | Description |
|---|---|---|
column | any | The input to test. |
Returns
column is RenderedPositionedFmcColumn
Whether the column is a RenderedPositionedFmcColumn.