thebe-core

Class: ThebeCell

thebe-core / Exports / ThebeCell

#Hierarchy

#Implements

#Table of contents

#Constructors

#Properties

#Accessors

#Methods

#Constructors

#constructor

new ThebeCell(id, notebookId, source, config, metadata?, rendermime?)

#Parameters

NameType
idstring
notebookIdstring
sourcestring
configConfig
metadataJsonObject
rendermime?IRenderMimeRegistry

#Overrides

PassiveCellRenderer.constructor

#Defined in

packages/core/src/cell.ts:20

#Properties

#area

Protected area: OutputArea

#Inherited from

PassiveCellRenderer.area

#Defined in

packages/core/src/passive.ts:13


#busy

Protected busy: boolean

#Defined in

packages/core/src/cell.ts:17


#events

Protected events: EventEmitter

#Defined in

packages/core/src/cell.ts:18


#id

Readonly id: string

#Implementation of

IThebeCell.id

#Inherited from

PassiveCellRenderer.id

#Defined in

packages/core/src/passive.ts:10


#metadata

metadata: JsonObject

#Implementation of

IThebeCell.metadata

#Defined in

packages/core/src/cell.ts:14


#model

Protected model: OutputAreaModel

#Inherited from

PassiveCellRenderer.model

#Defined in

packages/core/src/passive.ts:12


#notebookId

Readonly notebookId: string

#Implementation of

IThebeCell.notebookId

#Defined in

packages/core/src/cell.ts:16


#rendermime

Readonly rendermime: IRenderMimeRegistry

#Implementation of

IThebeCell.rendermime

#Inherited from

PassiveCellRenderer.rendermime

#Defined in

packages/core/src/passive.ts:11


#session

Optional session: ThebeSession

#Implementation of

IThebeCell.session

#Defined in

packages/core/src/cell.ts:15


#source

source: string

#Implementation of

IThebeCell.source

#Defined in

packages/core/src/cell.ts:13

#Accessors

#isAttached

get isAttached(): boolean

#Returns

boolean

#Implementation of

IThebeCell.isAttached

#Defined in

packages/core/src/cell.ts:59


#isAttachedToDOM

get isAttachedToDOM(): boolean

#Returns

boolean

#Implementation of

IThebeCell.isAttachedToDOM

#Inherited from

PassiveCellRenderer.isAttachedToDOM

#Defined in

packages/core/src/passive.ts:32


#isBusy

get isBusy(): boolean

#Returns

boolean

#Implementation of

IThebeCell.isBusy

#Defined in

packages/core/src/cell.ts:55


#outputs

get outputs(): IOutput[]

Serialize the model state to JSON

#Returns

IOutput[]

#Implementation of

IThebeCell.outputs

#Inherited from

PassiveCellRenderer.outputs

#Defined in

packages/core/src/passive.ts:28


#tags

get tags(): string[]

#Returns

string[]

#Implementation of

IThebeCell.tags

#Defined in

packages/core/src/cell.ts:63

#Methods

#attachSession

attachSession(session): void

Attaches to the session and adds the widgets factory to the rendermine registry call this version if using ThebeCell in isolation, otherwise call ThebeNotebook::attachSession

#Parameters

NameType
sessionThebeSession

#Returns

void

#Implementation of

IThebeCell.attachSession

#Defined in

packages/core/src/cell.ts:73


#attachToDOM

attachToDOM(el?): void

#Parameters

NameType
el?HTMLElement

#Returns

void

#Implementation of

IThebeCell.attachToDOM

#Inherited from

PassiveCellRenderer.attachToDOM

#Defined in

packages/core/src/passive.ts:36


#clear

clear(): void

Clears the output area model

#Returns

void

#Implementation of

IThebeCell.clear

#Inherited from

PassiveCellRenderer.clear

#Defined in

packages/core/src/passive.ts:83


#clearOnError

clearOnError(error?): void

Will trigger the output to render an error with text taken from the optional argument

#Parameters

NameType
error?any

#Returns

void

#Implementation of

IThebeCell.clearOnError

#Inherited from

PassiveCellRenderer.clearOnError

#Defined in

packages/core/src/passive.ts:94


#detachSession

detachSession(): void

Detaches from the session and removes the widgets factory from the rendermine registry call this version if using ThebeCell in isolation, otherwise call ThebeNotebook::detachSession

#Returns

void

#Implementation of

IThebeCell.detachSession

#Defined in

packages/core/src/cell.ts:87


#execute

execute(source?): Promise<null | IThebeCellExecuteReturn>

TODO

  • pass execute_count or timestamp or something back to redux on success/failure?

#Parameters

NameType
source?string

#Returns

Promise<null | IThebeCellExecuteReturn>

#Implementation of

IThebeCell.execute

#Defined in

packages/core/src/cell.ts:121


#render

render(outputs): void

Render output data directly from json

#Parameters

NameTypeDescription
outputsIOutput[]serialised jupyter outputs

#Returns

void

#Implementation of

IThebeCell.render

#Inherited from

PassiveCellRenderer.render

#Defined in

packages/core/src/passive.ts:110


#setAsBusy

setAsBusy(): void

#Returns

void

#Implementation of

IThebeCell.setAsBusy

#Defined in

packages/core/src/cell.ts:96


#setAsIdle

setAsIdle(): void

#Returns

void

#Implementation of

IThebeCell.setAsIdle

#Defined in

packages/core/src/cell.ts:105


#setOutputText

setOutputText(text): void

#Parameters

NameType
textstring

#Returns

void

#Implementation of

IThebeCell.setOutputText

#Inherited from

PassiveCellRenderer.setOutputText

#Defined in

packages/core/src/passive.ts:68


#fromICodeCell

Static fromICodeCell(icc, notebookId, config, rendermime?): ThebeCell

#Parameters

NameType
iccICodeCell
notebookIdstring
configConfig
rendermime?IRenderMimeRegistry

#Returns

ThebeCell

#Defined in

packages/core/src/cell.ts:36