# Class RightPanelWidget

This widget manages rendering panels in the right-hand pane.

#### Hierarchy (View Summary)

- NoteContextAwareWidget
  - RightPanelWidget

- Defined in src/public/app/widgets/right_panel_widget.ts:20

##### Index

### Constructors

constructor

### Properties

_noteId
_position
$body
$widget
attrs
children
componentId
initialized
noteContext?
parent?

### Accessors

help
hoistedNoteId
note
noteId
notePath
ntxId
position
sanitizedClassName
widgetButtons
widgetTitle

### Methods

activeContextChanged
activeContextChangedEvent
callMethod
canBeShown
child
class
cleanup
collapsible
contentSized
css
cssBlock
doRender
doRenderBody
filling
frocaReloadedEvent
getClosestNtxId
getPosition
handleEvent
handleEventInChildren
id
isActiveNoteContext
isEnabled
isHiddenExt
isHiddenInt
isNote
isNoteContext
isVisible
logRenderingError
noteSwitched
noteSwitchedAndActivatedEvent
noteSwitchedEvent
noteTypeMimeChangedEvent
optChild
optCss
refresh
refreshWithNote
remove
render
setNoteContextEvent
setParent
toggleExt
toggleInt
triggerCommand
triggerEvent

## Constructors

### constructor

- new RightPanelWidget(): RightPanelWidget

  #### Returns RightPanelWidget

  Overrides NoteContextAwareWidget.constructor

  - Defined in src/public/app/widgets/right_panel_widget.ts:39

## Properties

### _noteId

_noteId: string

Inherited from NoteContextAwareWidget._noteId

- Defined in src/public/app/widgets/basic_widget.ts:11

### _position

_position: number

Inherited from NoteContextAwareWidget._position

- Defined in src/public/app/components/component.ts:21

### $body

$body: JQuery<HTMLElement>

- Defined in src/public/app/widgets/right_panel_widget.ts:22

### $widget

$widget: JQuery<HTMLElement>

Inherited from NoteContextAwareWidget.$widget

- Defined in src/public/app/components/component.ts:16

### `Protected` attrs

attrs: Record <string, string>

Inherited from NoteContextAwareWidget.attrs

- Defined in src/public/app/widgets/basic_widget.ts:7

### children

children: default []

Inherited from NoteContextAwareWidget.children

- Defined in src/public/app/components/component.ts:18

### componentId

componentId: string

Inherited from NoteContextAwareWidget.componentId

- Defined in src/public/app/components/component.ts:17

### initialized

initialized: null | Promise<void>

Inherited from NoteContextAwareWidget.initialized

- Defined in src/public/app/components/component.ts:19

### `Optional` noteContext

noteContext?: NoteContext

Inherited from NoteContextAwareWidget.noteContext

- Defined in src/public/app/widgets/note_context_aware_widget.ts:10

### `Optional` parent

parent?: TypedComponent <any>

Inherited from NoteContextAwareWidget.parent

- Defined in src/public/app/components/component.ts:20

## Accessors

### help

- get help(): {}

  #### Returns {}

  - Defined in src/public/app/widgets/right_panel_widget.ts:35

### hoistedNoteId

- get hoistedNoteId(): undefined | string

  #### Returns undefined | string

  Inherited from NoteContextAwareWidget.hoistedNoteId

  - Defined in src/public/app/widgets/note_context_aware_widget.ts:40

### note

- get note(): undefined | null | FNote

  #### Returns undefined | null | FNote

  Inherited from NoteContextAwareWidget.note

  - Defined in src/public/app/widgets/note_context_aware_widget.ts:28

### noteId

- get noteId(): undefined | string

  #### Returns undefined | string

  Inherited from NoteContextAwareWidget.noteId

  - Defined in src/public/app/widgets/note_context_aware_widget.ts:32

### notePath

- get notePath(): undefined | null | string

  #### Returns undefined | null | string

  Inherited from NoteContextAwareWidget.notePath

  - Defined in src/public/app/widgets/note_context_aware_widget.ts:36

### ntxId

- get ntxId(): undefined | null | string

  #### Returns undefined | null | string

  Inherited from NoteContextAwareWidget.ntxId

  - Defined in src/public/app/widgets/note_context_aware_widget.ts:44

### position

- get position(): number

  #### Returns number

  Inherited from NoteContextAwareWidget.position

  - Defined in src/public/app/components/component.ts:34
- set position(newPosition: number): void

  #### Parameters

  - newPosition: number

  #### Returns void

  Inherited from NoteContextAwareWidget.position

  - Defined in src/public/app/components/component.ts:38

### sanitizedClassName

- get sanitizedClassName(): string

  #### Returns string

  Inherited from NoteContextAwareWidget.sanitizedClassName

  - Defined in src/public/app/components/component.ts:29

### widgetButtons

- get widgetButtons(): default <any>[]

  #### Returns default <any>[]

  - Defined in src/public/app/widgets/right_panel_widget.ts:31

### widgetTitle

- get widgetTitle(): string

  Title to show in the panel.

  #### Returns string

  - Defined in src/public/app/widgets/right_panel_widget.ts:27

## Methods

### activeContextChanged

- activeContextChanged(): Promise<void>

  #### Returns Promise<void>

  Inherited from NoteContextAwareWidget.activeContextChanged

  - Defined in src/public/app/widgets/note_context_aware_widget.ts:101

### activeContextChangedEvent

- activeContextChangedEvent(
  __namedParameters: { noteContext: NoteContext },
  ): Promise<void>

  #### Parameters

  - __namedParameters: { noteContext: NoteContext }

  #### Returns Promise<void>

  Inherited from NoteContextAwareWidget.activeContextChangedEvent

  - Defined in src/public/app/widgets/note_context_aware_widget.ts:95

### callMethod

- callMethod(
  fun: (arg: unknown) => Promise<unknown>,
  data: unknown,
  ): undefined | Promise<unknown>

  #### Parameters

  - fun: (arg: unknown) => Promise<unknown>
  - data: unknown

  #### Returns undefined | Promise<unknown>

  Inherited from NoteContextAwareWidget.callMethod

  - Defined in src/public/app/components/component.ts:105

### canBeShown

- canBeShown(): boolean

  #### Returns boolean

  Inherited from NoteContextAwareWidget.canBeShown

  - Defined in src/public/app/widgets/basic_widget.ts:226

### child

- child(...components: default []): RightPanelWidget

  #### Parameters

  - ...components: default []

  #### Returns RightPanelWidget

  Inherited from NoteContextAwareWidget.child

  - Defined in src/public/app/widgets/basic_widget.ts:25

### class

- class(className: string): RightPanelWidget

  #### Parameters

  - className: string

  #### Returns RightPanelWidget

  Inherited from NoteContextAwareWidget.class

  - Defined in src/public/app/widgets/basic_widget.ts:64

### cleanup

- cleanup(): void

  #### Returns void

  Inherited from NoteContextAwareWidget.cleanup

  - Defined in src/public/app/widgets/basic_widget.ts:252

### collapsible

- collapsible(): RightPanelWidget

  #### Returns RightPanelWidget

  Inherited from NoteContextAwareWidget.collapsible

  - Defined in src/public/app/widgets/basic_widget.ts:103

### contentSized

- contentSized(): RightPanelWidget

  #### Returns RightPanelWidget

  Inherited from NoteContextAwareWidget.contentSized

  - Defined in src/public/app/widgets/basic_widget.ts:97

### css

- css(name: string, value: string): RightPanelWidget

  Sets the CSS attribute of the given name to the given value.

  #### Parameters

  - name: string

    the name of the CSS attribute to set (e.g. `padding-left`).

  - value: string

    the value of the CSS attribute to set (e.g. `12px`).

  #### Returns RightPanelWidget

  self for chaining.

  Inherited from NoteContextAwareWidget.css

  - Defined in src/public/app/widgets/basic_widget.ts:76

### cssBlock

- cssBlock(block: string): RightPanelWidget

  Accepts a string of CSS to add with the widget.

  #### Parameters

  - block: string

  #### Returns RightPanelWidget

  for chaining

  Inherited from NoteContextAwareWidget.cssBlock

  - Defined in src/public/app/widgets/basic_widget.ts:118

### doRender

- doRender(): void

  Do not override this method unless you know what you're doing. Do not override this method unless you know what you're doing.

  #### Returns void

  Overrides NoteContextAwareWidget.doRender

  - Defined in src/public/app/widgets/right_panel_widget.ts:49

### doRenderBody

- doRenderBody(): Promise<void>

  Method used for rendering the body of the widget (via existing this.$body)

  Your class should override this method.

  #### Returns Promise<void>

  if widget needs async operation to initialize, it can return a Promise

  - Defined in src/public/app/widgets/right_panel_widget.ts:80

### filling

- filling(): RightPanelWidget

  #### Returns RightPanelWidget

  Inherited from NoteContextAwareWidget.filling

  - Defined in src/public/app/widgets/basic_widget.ts:109

### frocaReloadedEvent

- frocaReloadedEvent(): Promise<void>

  #### Returns Promise<void>

  Inherited from NoteContextAwareWidget.frocaReloadedEvent

  - Defined in src/public/app/widgets/note_context_aware_widget.ts:126

### getClosestNtxId

- getClosestNtxId(): undefined | null | string

  #### Returns undefined | null | string

  Inherited from NoteContextAwareWidget.getClosestNtxId

  - Defined in src/public/app/widgets/basic_widget.ts:244

### getPosition

- getPosition(): number

  #### Returns number

  Inherited from NoteContextAwareWidget.getPosition

  - Defined in src/public/app/widgets/basic_widget.ts:234

### handleEvent

- handleEvent< T extends EventNames >(
  name: T ,
  data: EventData < T >,
  ): undefined | null | Promise<unknown>

  #### Type Parameters

  - T extends EventNames

  #### Parameters

  - name: T
  - data: EventData < T >

  #### Returns undefined | null | Promise<unknown>

  Inherited from NoteContextAwareWidget.handleEvent

  - Defined in src/public/app/components/component.ts:57

### handleEventInChildren

- handleEventInChildren< T extends EventNames >(
  name: T ,
  data: EventData < T >,
  ): null | Promise<unknown>

  #### Type Parameters

  - T extends EventNames

  #### Parameters

  - name: T
  - data: EventData < T >

  #### Returns null | Promise<unknown>

  Inherited from NoteContextAwareWidget.handleEventInChildren

  - Defined in src/public/app/components/component.ts:76

### id

- id(id: string): RightPanelWidget

  #### Parameters

  - id: string

  #### Returns RightPanelWidget

  Inherited from NoteContextAwareWidget.id

  - Defined in src/public/app/widgets/basic_widget.ts:59

### isActiveNoteContext

- isActiveNoteContext(): boolean

  #### Returns boolean

  Inherited from NoteContextAwareWidget.isActiveNoteContext

  - Defined in src/public/app/widgets/note_context_aware_widget.ts:20

### isEnabled

- isEnabled(): undefined | null | boolean

  Indicates if the widget is enabled. Widgets are enabled by default. Generally setting this to `false` will cause the widget not to be displayed, however it will still be available on the DOM but hidden.

  If the widget is not enabled, it will not receive `refreshWithNote` updates.

  #### Returns undefined | null | boolean

  true when an active note exists

  Inherited from NoteContextAwareWidget.isEnabled

  - Defined in src/public/app/widgets/note_context_aware_widget.ts:56

### isHiddenExt

- isHiddenExt(): boolean

  #### Returns boolean

  Inherited from NoteContextAwareWidget.isHiddenExt

  - Defined in src/public/app/widgets/basic_widget.ts:222

### isHiddenInt

- isHiddenInt(): boolean

  #### Returns boolean

  Inherited from NoteContextAwareWidget.isHiddenInt

  - Defined in src/public/app/widgets/basic_widget.ts:213

### isNote

- isNote(noteId: string): boolean

  #### Parameters

  - noteId: string

  #### Returns boolean

  Inherited from NoteContextAwareWidget.isNote

  - Defined in src/public/app/widgets/note_context_aware_widget.ts:24

### isNoteContext

- isNoteContext(
  ntxId: undefined | null | string | string[],
  ): undefined | null | boolean | ""

  #### Parameters

  - ntxId: undefined | null | string | string[]

  #### Returns undefined | null | boolean | ""

  Inherited from NoteContextAwareWidget.isNoteContext

  - Defined in src/public/app/widgets/note_context_aware_widget.ts:12

### isVisible

- isVisible(): boolean

  #### Returns boolean

  Inherited from NoteContextAwareWidget.isVisible

  - Defined in src/public/app/widgets/basic_widget.ts:230

### logRenderingError

- logRenderingError(e: Error): void

  #### Parameters

  - e: Error

  #### Returns void

  Inherited from NoteContextAwareWidget.logRenderingError

  - Defined in src/public/app/widgets/basic_widget.ts:163

### noteSwitched

- noteSwitched(): Promise<void>

  #### Returns Promise<void>

  Inherited from NoteContextAwareWidget.noteSwitched

  - Defined in src/public/app/widgets/note_context_aware_widget.ts:91

### noteSwitchedAndActivatedEvent

- noteSwitchedAndActivatedEvent(
  __namedParameters: NoteSwitchedContext ,
  ): Promise<void>

  #### Parameters

  - __namedParameters: NoteSwitchedContext

  #### Returns Promise<void>

  Inherited from NoteContextAwareWidget.noteSwitchedAndActivatedEvent

  - Defined in src/public/app/widgets/note_context_aware_widget.ts:106

### noteSwitchedEvent

- noteSwitchedEvent(__namedParameters: NoteSwitchedContext ): Promise<void>

  #### Parameters

  - __namedParameters: NoteSwitchedContext

  #### Returns Promise<void>

  Inherited from NoteContextAwareWidget.noteSwitchedEvent

  - Defined in src/public/app/widgets/note_context_aware_widget.ts:84

### noteTypeMimeChangedEvent

- noteTypeMimeChangedEvent(__namedParameters: { noteId: string }): Promise<void>

  #### Parameters

  - __namedParameters: { noteId: string }

  #### Returns Promise<void>

  Inherited from NoteContextAwareWidget.noteTypeMimeChangedEvent

  - Defined in src/public/app/widgets/note_context_aware_widget.ts:120

### optChild

- optChild(condition: boolean, ...components: default []): RightPanelWidget

  Conditionally adds the given components as children to this component.

  #### Parameters

  - condition: boolean

    whether to add the components.

  - ...components: default []

    the components to be added as children to this component provided the condition is truthy.

  #### Returns RightPanelWidget

  self for chaining.

  Inherited from NoteContextAwareWidget.optChild

  - Defined in src/public/app/widgets/basic_widget.ts:51

### optCss

- optCss(condition: boolean, name: string, value: string): RightPanelWidget

  Sets the CSS attribute of the given name to the given value, but only if the condition provided is truthy.

  #### Parameters

  - condition: boolean

    `true` in order to apply the CSS, `false` to ignore it.

  - name: string

    the name of the CSS attribute to set (e.g. `padding-left`).

  - value: string

    the value of the CSS attribute to set (e.g. `12px`).

  #### Returns RightPanelWidget

  self for chaining.

  Inherited from NoteContextAwareWidget.optCss

  - Defined in src/public/app/widgets/basic_widget.ts:89

### refresh

- refresh(): Promise<void>

  #### Returns Promise<void>

  Inherited from NoteContextAwareWidget.refresh

  - Defined in src/public/app/widgets/note_context_aware_widget.ts:60

### refreshWithNote

- refreshWithNote(note: undefined | null | FNote ): Promise<void>

  Override this method to be able to refresh your widget with each note.

  #### Parameters

  - note: undefined | null | FNote

  #### Returns Promise<void>

  Inherited from NoteContextAwareWidget.refreshWithNote

  - Defined in src/public/app/widgets/note_context_aware_widget.ts:82

### remove

- remove(): void

  #### Returns void

  Inherited from NoteContextAwareWidget.remove

  - Defined in src/public/app/widgets/basic_widget.ts:238

### render

- render(): JQuery<HTMLElement>

  #### Returns JQuery<HTMLElement>

  Inherited from NoteContextAwareWidget.render

  - Defined in src/public/app/widgets/basic_widget.ts:123

### setNoteContextEvent

- setNoteContextEvent(__namedParameters: { noteContext: NoteContext }): void

  #### Parameters

  - __namedParameters: { noteContext: NoteContext }

  #### Returns void

  Inherited from NoteContextAwareWidget.setNoteContextEvent

  - Defined in src/public/app/widgets/note_context_aware_widget.ts:115

### setParent

- setParent(parent: TypedComponent <any>): RightPanelWidget

  #### Parameters

  - parent: TypedComponent <any>

  #### Returns RightPanelWidget

  Inherited from NoteContextAwareWidget.setParent

  - Defined in src/public/app/components/component.ts:42

### toggleExt

- toggleExt(show: undefined | null | boolean | ""): void

  #### Parameters

  - show: undefined | null | boolean | ""

  #### Returns void

  Inherited from NoteContextAwareWidget.toggleExt

  - Defined in src/public/app/widgets/basic_widget.ts:217

### toggleInt

- toggleInt(show: undefined | null | boolean): void

  #### Parameters

  - show: undefined | null | boolean

  #### Returns void

  Inherited from NoteContextAwareWidget.toggleInt

  - Defined in src/public/app/widgets/basic_widget.ts:208

### triggerCommand

- triggerCommand< K extends keyof CommandMappings >(
  name: K ,
  data?: CommandMappings [ K ],
  ): undefined | null | Promise<unknown>

  #### Type Parameters

  - K extends keyof CommandMappings

  #### Parameters

  - name: K
  - `Optional` data: CommandMappings [ K ]

  #### Returns undefined | null | Promise<unknown>

  Inherited from NoteContextAwareWidget.triggerCommand

  - Defined in src/public/app/components/component.ts:91

### triggerEvent

- triggerEvent< T extends EventNames >(
  name: T ,
  data: EventData < T >,
  ): undefined | null | Promise<unknown>

  #### Type Parameters

  - T extends EventNames

  #### Parameters

  - name: T
  - data: EventData < T >

  #### Returns undefined | null | Promise<unknown>

  Inherited from NoteContextAwareWidget.triggerEvent

  - Defined in src/public/app/components/component.ts:72