Skip to main content

Interface: IMyopComponent<P, R>

Defined in: myop-sdk/dist/module/host/components/IMyopComponent.d.ts:44

Type Parameters

P = any

R = any

Properties

componentDefinition

componentDefinition: IComponentDefinitionConfig

Defined in: myop-sdk/dist/module/host/components/IMyopComponent.d.ts:49


container

container: HTMLElement

Defined in: myop-sdk/dist/module/host/components/IMyopComponent.d.ts:50


dispose()

dispose: () => void

Defined in: myop-sdk/dist/module/host/components/IMyopComponent.d.ts:57

Returns

void


element?

optional element: HTMLElement

Defined in: myop-sdk/dist/module/host/components/IMyopComponent.d.ts:51


id

id: string

Defined in: myop-sdk/dist/module/host/components/IMyopComponent.d.ts:45


initiated()

initiated: () => Promise<any>

Defined in: myop-sdk/dist/module/host/components/IMyopComponent.d.ts:56

Returns

Promise<any>


isInitiated

isInitiated: boolean

Defined in: myop-sdk/dist/module/host/components/IMyopComponent.d.ts:46


markedForDisposed

markedForDisposed: boolean

Defined in: myop-sdk/dist/module/host/components/IMyopComponent.d.ts:47


observeAutoSize()?

optional observeAutoSize: (options?) => CleanupHandler

Defined in: myop-sdk/dist/module/host/components/IMyopComponent.d.ts:67

Observes the iframe content size and automatically syncs it to the iframe element. Only available for iframe-based components. Uses direct contentDocument access.

Parameters

options?

AutoSizeOptions

Configuration options including size change callback and min/max constraints

Returns

CleanupHandler

Cleanup function to stop observing


onMessageReceived()

onMessageReceived: (msg) => boolean

Defined in: myop-sdk/dist/module/host/components/IMyopComponent.d.ts:55

Parameters

msg

BaseMyopMessage

Returns

boolean


parent?

optional parent: IMyopComponent

Defined in: myop-sdk/dist/module/host/components/IMyopComponent.d.ts:81


props

props: P

Defined in: myop-sdk/dist/module/host/components/IMyopComponent.d.ts:82


refs

refs: R

Defined in: myop-sdk/dist/module/host/components/IMyopComponent.d.ts:83


send()

send: (msg) => CleanupHandler

Defined in: myop-sdk/dist/module/host/components/IMyopComponent.d.ts:52

Parameters

msg

BaseMyopMessage

Returns

CleanupHandler


setInitiated()

setInitiated: () => void

Defined in: myop-sdk/dist/module/host/components/IMyopComponent.d.ts:48

Returns

void


sizeMeta?

optional sizeMeta: null | { height: string | number; maxHeight: number; maxWidth: number; minHeight: number; minWidth: number; width: string | number; }

Defined in: myop-sdk/dist/module/host/components/IMyopComponent.d.ts:73

Parsed myop:size meta tag from the component HTML. Set by HTMLComponentLoader before iframe creation. Used by the React host to determine sizing mode (fill vs content).

Methods

bind()

Call Signature

bind(messageType, handler): void

Defined in: myop-sdk/dist/module/host/components/IMyopComponent.d.ts:53

Parameters
messageType

MyopMessageKey

handler

() => boolean

Returns

void

Call Signature

bind<T>(messageType, handler): void

Defined in: myop-sdk/dist/module/host/components/IMyopComponent.d.ts:54

Type Parameters

T extends BaseMyopMessage

Parameters
messageType

MyopMessageKey

handler

(message) => boolean

Returns

void


hide()

hide(): void

Defined in: myop-sdk/dist/module/host/components/IMyopComponent.d.ts:58

Returns

void


inspect()

inspect(): void

Defined in: myop-sdk/dist/module/host/components/IMyopComponent.d.ts:60

Returns

void


show()

show(): void

Defined in: myop-sdk/dist/module/host/components/IMyopComponent.d.ts:59

Returns

void