Class: AbstractFmcPage<P>
Base abstract class for FMC pages
Type parameters
Name | Type |
---|---|
P | extends object | null = any |
Constructors
constructor
• new AbstractFmcPage<P
>(bus
, screen
, props
): AbstractFmcPage
<P
>
Ctor
Type parameters
Name | Type |
---|---|
P | extends null | object = any |
Parameters
Name | Type | Description |
---|---|---|
bus | EventBus | the event bus |
screen | FmcScreen <any , any > | the FMC screen instance |
props | P | the initial props for this page |
Returns
Defined in
src/sdk/fmc/AbstractFmcPage.ts:79
Properties
bus
• Readonly
bus: EventBus
the event bus
Defined in
src/sdk/fmc/AbstractFmcPage.ts:79
clockConsumer
• Protected
clockConsumer: Consumer
<number
>
Defined in
src/sdk/fmc/AbstractFmcPage.ts:70
isInitialized
• isInitialized: boolean
= false
Defined in
src/sdk/fmc/AbstractFmcPage.ts:98
memorizedComponents
• Readonly
memorizedComponents: [null
| FmcComponent
<FmcComponentOptions
>, null
| FmcComponent
<FmcComponentOptions
>, null
| FmcComponent
<FmcComponentOptions
>][] = []
Defined in
src/sdk/fmc/AbstractFmcPage.ts:45
params
• Readonly
params: Map
<any
, any
>
Defined in
src/sdk/fmc/AbstractFmcPage.ts:51
screen
• Readonly
screen: FmcScreen
<any
, any
>
the FMC screen instance
Defined in
src/sdk/fmc/AbstractFmcPage.ts:79
lifecyclePolicy
▪ Static
lifecyclePolicy: FmcPageLifecyclePolicy
= FmcPageLifecyclePolicy.Singleton
Configures the FmcPageLifecyclePolicy for this page
Defined in
src/sdk/fmc/AbstractFmcPage.ts:37
Accessors
props
• get
props(): P
Obtains the current value of the page's props
Returns
P
the props value
Throws
if the props have not yet been initialised
Defined in
src/sdk/fmc/AbstractFmcPage.ts:62
Methods
acceptPageExtension
▸ acceptPageExtension(extension
): void
Accepts a page extension
Parameters
Name | Type | Description |
---|---|---|
extension | FmcPageExtension <AbstractFmcPage <P >> | the page extension |
Returns
void
Defined in
src/sdk/fmc/AbstractFmcPage.ts:316
addBinding
▸ addBinding(binding
): void
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
Name | Type | Description |
---|---|---|
binding | Subscription | ConsumerSubject <any > | a subscription |
Returns
void
Defined in
src/sdk/fmc/AbstractFmcPage.ts:361
clockHandler
▸ clockHandler(d
): void
Handles when update/refresh of the FMCPage based on clock input
Parameters
Name | Type | Description |
---|---|---|
d | number | is the Clock Value from the Event Bus |
Returns
void
Defined in
src/sdk/fmc/AbstractFmcPage.ts:90
destroy
▸ destroy(): void
Destroys the page and calls appropriate event handlers
Returns
void
Defined in
src/sdk/fmc/AbstractFmcPage.ts:194
handleLineSelectKey
▸ handleLineSelectKey(event
): Promise
<string
| boolean
>
Handles a line select key received by the FMC, before passing it on to components
Parameters
Name | Type | Description |
---|---|---|
event | LineSelectKeyEvent | the LSK event |
Returns
Promise
<string
| boolean
>
a Promise that resolves to a boolean or string
Defined in
src/sdk/fmc/AbstractFmcPage.ts:372
handleScrolling
▸ handleScrolling(event
): Promise
<string
| boolean
>
Handles a scrolling event received by the FMC, before passing it on to components
Parameters
Name | Type | Description |
---|---|---|
event | "pageLeft" | "pageRight" | "pageUp" | "pageDown" | the scrolling event |
Returns
Promise
<string
| boolean
>
a Promise that resolves to a boolean or string
Defined in
src/sdk/fmc/AbstractFmcPage.ts:412
init
▸ init(): void
Initializes the page.
Use this for setting up subscriptions and such.
Returns
void
Defined in
src/sdk/fmc/AbstractFmcPage.ts:105
initialRender
▸ initialRender(): void
Initial render function
Returns
void
Throws
If a PositionedFmcColumn
attempts to return an FmcRenderTemplate
from its render function (only string
s are allowed).
Defined in
src/sdk/fmc/AbstractFmcPage.ts:231
invalidate
▸ invalidate(): void
Invalidates the render and sets the component into the dirty state
Returns
void
Defined in
src/sdk/fmc/AbstractFmcPage.ts:223
onDestroy
▸ onDestroy(): void
Destroy lifecycle hook
Returns
void
Defined in
src/sdk/fmc/AbstractFmcPage.ts:216
onHandleScrolling
▸ onHandleScrolling(event
): Promise
<string
| boolean
>
Handles a scrolling event received by the FMC, before passing it on to components
Parameters
Name | Type | Description |
---|---|---|
event | "pageLeft" | "pageRight" | "pageUp" | "pageDown" | the scrolling event |
Returns
Promise
<string
| boolean
>
a Promise that resolves to a boolean or string
Defined in
src/sdk/fmc/AbstractFmcPage.ts:431
onHandleSelectKey
▸ onHandleSelectKey(event
): Promise
<string
| boolean
>
Handles a line select key received by the FMC, before passing it on to components
Parameters
Name | Type | Description |
---|---|---|
event | LineSelectKeyEvent | the LSK event |
Returns
Promise
<string
| boolean
>
a Promise that resolves to a boolean or string
Defined in
src/sdk/fmc/AbstractFmcPage.ts:401
onInit
▸ onInit(): void
Init lifecycle hook
Returns
void
Defined in
src/sdk/fmc/AbstractFmcPage.ts:118
onPageButtonPressed
▸ onPageButtonPressed(): void
Is called when the page button for the current page is pressed while already on that page.
Returns
void
Defined in
src/sdk/fmc/AbstractFmcPage.ts:187
onPause
▸ onPause(): void
Pause lifecycle hook
Returns
void
Defined in
src/sdk/fmc/AbstractFmcPage.ts:147
onResume
▸ onResume(): void
Resume lifecycle hook
Returns
void
Defined in
src/sdk/fmc/AbstractFmcPage.ts:182
pause
▸ pause(): void
Pauses the page and calls appropriate event handlers
Returns
void
Defined in
src/sdk/fmc/AbstractFmcPage.ts:125
render
▸ render(): FmcRenderTemplate
[]
Returns
Defined in
src/sdk/fmc/AbstractFmcPage.ts:350
resume
▸ resume(props?
): void
Resumes the page and calls appropriate event handlers
Parameters
Name | Type | Description |
---|---|---|
props? | P | the props to pass in to the page, if applicable |
Returns
void
Defined in
src/sdk/fmc/AbstractFmcPage.ts:156
isPositionedFmcColumn
▸ isPositionedFmcColumn(column
): column is PositionedFmcColumn
Tests whether an FmcRenderTemplateColumn
is a PositionedFmcColumn
.
Parameters
Name | Type | Description |
---|---|---|
column | FmcRenderTemplateColumn | The FmcRenderTemplateColumn to test. |
Returns
column is PositionedFmcColumn
Whether the column is a PositionedFmcColumn
.
Defined in
src/sdk/fmc/AbstractFmcPage.ts:325
isRenderedPositionedFmcColumn
▸ isRenderedPositionedFmcColumn(column
): column is RenderedPositionedFmcColumn
Tests whether the input is a RenderedPositionedFmcColumn
.
Parameters
Name | Type | Description |
---|---|---|
column | any | The input to test. |
Returns
column is RenderedPositionedFmcColumn
Whether the column is a RenderedPositionedFmcColumn
.
Defined in
src/sdk/fmc/AbstractFmcPage.ts:346