Skip to main content

Class: Component<TConfiguration>

component.Component

Type parameters#

NameType
TConfigurationextends ComponentConfiguration

Hierarchy#

Implements#

Constructors#

constructor#

• new Component<TConfiguration>(name, container, navigator)

Type parameters#

NameType
TConfigurationextends ComponentConfiguration

Parameters#

NameType
namestring
containerContainer
navigatorNavigator

Overrides#

EventEmitter.constructor

Defined in#

component/Component.ts:44

Properties#

componentName#

â–ª Static componentName: ComponentName | FallbackComponentName

Defined in#

component/Component.ts:30

Accessors#

activated#

• get activated(): boolean

Get activated.

Returns#

boolean

Value indicating if the component is currently active.

Implementation of#

IComponent.activated

Defined in#

component/Component.ts:78


defaultConfiguration#

• get defaultConfiguration(): TConfiguration

Get default configuration.

Returns#

TConfiguration

Default configuration for component.

Implementation of#

IComponent.defaultConfiguration

Defined in#

component/Component.ts:92


name#

• get name(): string

Get name.

description The name of the component. Used when interacting with the component through the Viewer's API.

Returns#

string

Implementation of#

IComponent.name

Defined in#

component/Component.ts:107

Methods#

configure#

â–¸ configure(configuration): void

Configure the component.

Parameters#

NameTypeDescription
configurationTConfigurationComponent configuration.

Returns#

void

Implementation of#

IComponent.configure

Defined in#

component/Component.ts:131


fire#

â–¸ fire<T>(type, event): void

inheritdoc

Type parameters#

Name
T

Parameters#

NameType
typeComponentEventType
eventT

Returns#

void

Overrides#

EventEmitter.fire

Defined in#

component/Component.ts:149


off#

â–¸ off<T>(type, handler): void

Unsubscribe from an event by its name.

Type parameters#

Name
T

Parameters#

NameTypeDescription
typeComponentEventTypeThe name of the event to unsubscribe from.
handler(event: T) => voidThe handler to remove.

Returns#

void

Overrides#

EventEmitter.off

Defined in#

component/Component.ts:156


on#

â–¸ on<T>(type, handler): void

Subscribe to an event by its name.

Type parameters#

Name
T

Parameters#

NameTypeDescription
typeComponentEventTypeThe name of the event to subscribe to.
handler(event: T) => voidThe handler called when the event occurs.

Returns#

void

Overrides#

EventEmitter.on

Defined in#

component/Component.ts:163