Class: HostSDK
Defined in: host/hostSDK.ts:49
The Host SDK is designed for integration within the host application that serves as the container for Myop components.
It provides essential functionalities and APIs for registering, managing, and communicating with Myop components.
This SDK enables seamless embedding of independently developed components into the host application, ensuring smooth interoperability and consistent user experience across various Myop component implementations.
Constructors
new HostSDK()
new HostSDK():
HostSDK
Returns
Properties
components
components:
IMyopComponent
[] =[]
Defined in: host/hostSDK.ts:53
components2init
components2init:
IMyopComponent
[] =[]
Defined in: host/hostSDK.ts:52
componentsLoaders
componentsLoaders:
IMyopLoader
[] =[]
Defined in: host/hostSDK.ts:54
initiated
initiated:
boolean
=false
Defined in: host/hostSDK.ts:56
type2InstanceCount
type2InstanceCount:
Record
<string
,number
> ={}
Defined in: host/hostSDK.ts:60
version
version:
any
Defined in: host/hostSDK.ts:58
Methods
assignId()
assignId(
componentDefinition
):string
Defined in: host/hostSDK.ts:61
Parameters
componentDefinition
Returns
string
init()
init(
customComponentLoaderCreators
?):void
Defined in: host/hostSDK.ts:190
Parameters
customComponentLoaderCreators?
componentLoaderCreator
[]
Returns
void
inspect()
inspect():
void
Defined in: host/hostSDK.ts:73
Returns
void
loadComponent()
loadComponent<
T
>(componentConfig
,container
?,options
?):Promise
<T
>
Defined in: host/hostSDK.ts:307
Type Parameters
• T extends IMyopComponent
= IMyopComponent
Parameters
componentConfig
container?
Ref
| HTMLElement
options?
Returns
Promise
<T
>
navigate()
navigate<
T
>(component
,newComponentConfig
,options
?):Promise
<T
>
Defined in: host/hostSDK.ts:430
Type Parameters
• T extends IMyopComponent
= IMyopComponent
Parameters
component
newComponentConfig
options?
Returns
Promise
<T
>
send()
send(
message
):void
Defined in: host/hostSDK.ts:182
Parameters
message
Returns
void
Instance()
static
Instance():HostSDK
Defined in: host/hostSDK.ts:50