Class: ThebeCell
thebe-core / Exports / ThebeCell
#Hierarchy
↳
ThebeCell
#Implements
#Table of contents
#Constructors
#Properties
#Accessors
#Methods
- attachSession
- attachToDOM
- clear
- clearOnError
- detachSession
- execute
- render
- setAsBusy
- setAsIdle
- setOutputText
- fromICodeCell
#Constructors
#constructor
• new ThebeCell(id
, notebookId
, source
, config
, metadata?
, rendermime?
)
#Parameters
Name | Type |
---|---|
id | string |
notebookId | string |
source | string |
config | Config |
metadata | JsonObject |
rendermime? | IRenderMimeRegistry |
#Overrides
PassiveCellRenderer.constructor
#Defined in
#Properties
#area
• Protected
area: OutputArea
#Inherited from
#Defined in
packages/core/src/passive.ts:13
#busy
• Protected
busy: boolean
#Defined in
#events
• Protected
events: EventEmitter
#Defined in
#id
• Readonly
id: string
#Implementation of
#Inherited from
#Defined in
packages/core/src/passive.ts:10
#metadata
• metadata: JsonObject
#Implementation of
#Defined in
#model
• Protected
model: OutputAreaModel
#Inherited from
#Defined in
packages/core/src/passive.ts:12
#notebookId
• Readonly
notebookId: string
#Implementation of
#Defined in
#rendermime
• Readonly
rendermime: IRenderMimeRegistry
#Implementation of
#Inherited from
PassiveCellRenderer.rendermime
#Defined in
packages/core/src/passive.ts:11
#session
• Optional
session: ThebeSession
#Implementation of
#Defined in
#source
• source: string
#Implementation of
#Defined in
#Accessors
#isAttached
• get
isAttached(): boolean
#Returns
boolean
#Implementation of
#Defined in
#isAttachedToDOM
• get
isAttachedToDOM(): boolean
#Returns
boolean
#Implementation of
#Inherited from
PassiveCellRenderer.isAttachedToDOM
#Defined in
packages/core/src/passive.ts:32
#isBusy
• get
isBusy(): boolean
#Returns
boolean
#Implementation of
#Defined in
#outputs
• get
outputs(): IOutput
[]
Serialize the model state to JSON
#Returns
IOutput
[]
#Implementation of
#Inherited from
PassiveCellRenderer.outputs
#Defined in
packages/core/src/passive.ts:28
#tags
• get
tags(): string
[]
#Returns
string
[]
#Implementation of
#Defined in
#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
Name | Type |
---|---|
session | ThebeSession |
#Returns
void
#Implementation of
#Defined in
#attachToDOM
▸ attachToDOM(el?
): void
#Parameters
Name | Type |
---|---|
el? | HTMLElement |
#Returns
void
#Implementation of
#Inherited from
PassiveCellRenderer.attachToDOM
#Defined in
packages/core/src/passive.ts:36
#clear
▸ clear(): void
Clears the output area model
#Returns
void
#Implementation of
#Inherited from
#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
Name | Type |
---|---|
error? | any |
#Returns
void
#Implementation of
#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
#Defined in
#execute
▸ execute(source?
): Promise
<null
| IThebeCellExecuteReturn
>
TODO
- pass execute_count or timestamp or something back to redux on success/failure?
#Parameters
Name | Type |
---|---|
source? | string |
#Returns
Promise
<null
| IThebeCellExecuteReturn
>
#Implementation of
#Defined in
#render
▸ render(outputs
): void
Render output data directly from json
#Parameters
Name | Type | Description |
---|---|---|
outputs | IOutput [] | serialised jupyter outputs |
#Returns
void
#Implementation of
#Inherited from
#Defined in
packages/core/src/passive.ts:110
#setAsBusy
▸ setAsBusy(): void
#Returns
void
#Implementation of
#Defined in
#setAsIdle
▸ setAsIdle(): void
#Returns
void
#Implementation of
#Defined in
#setOutputText
▸ setOutputText(text
): void
#Parameters
Name | Type |
---|---|
text | string |
#Returns
void
#Implementation of
#Inherited from
PassiveCellRenderer.setOutputText
#Defined in
packages/core/src/passive.ts:68
#fromICodeCell
▸ Static
fromICodeCell(icc
, notebookId
, config
, rendermime?
): ThebeCell
#Parameters
Name | Type |
---|---|
icc | ICodeCell |
notebookId | string |
config | Config |
rendermime? | IRenderMimeRegistry |