Skip to main content

Interface: IMyopComponent<P, R>

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

Type Parameters​

• P = any

• R = any

Properties​

componentDefinition​

componentDefinition: IComponentDefinitionConfig

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


container​

container: HTMLElement

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


dispose()​

dispose: () => void

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

Returns​

void


element?​

optional element: HTMLElement

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


id​

id: string

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


initiated()​

initiated: () => Promise<any>

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

Returns​

Promise<any>


isInitiated​

isInitiated: boolean

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


markedForDisposed​

markedForDisposed: boolean

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


observeAutoSize()?​

optional observeAutoSize: (options?) => CleanupHandler

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

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/myop-sdk/dist/module/host/components/IMyopComponent.d.ts:57

Parameters​

msg​

BaseMyopMessage

Returns​

boolean


parent?​

optional parent: IMyopComponent

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


props​

props: P

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


refs​

refs: R

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


send()​

send: (msg) => CleanupHandler

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

Parameters​

msg​

BaseMyopMessage

Returns​

CleanupHandler


setInitiated()​

setInitiated: () => void

Defined in: myop/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/myop-sdk/dist/module/host/components/IMyopComponent.d.ts:75

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).


uiTags​

readonly uiTags: string[]

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

Runtime tags: only tags named ui:... (e.g. ui:beta). [] when there are none.

Methods​

bind()​

Call Signature​

bind(messageType, handler): void

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

Parameters​
messageType​

MyopMessageKey

handler​

() => boolean

Returns​

void

Call Signature​

bind<T>(messageType, handler): void

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

Type Parameters​

• T extends BaseMyopMessage

Parameters​
messageType​

MyopMessageKey

handler​

(message) => boolean

Returns​

void


hide()​

hide(): void

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

Returns​

void


inspect()​

inspect(): void

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

Returns​

void


show()​

show(): void

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

Returns​

void