Skip to content

BlockSuite API Documentation / @blocksuite/blocks / DatabaseBlockViewSource

Class: DatabaseBlockViewSource

Implements

  • ViewSource

Constructors

new DatabaseBlockViewSource()

new DatabaseBlockViewSource(model): DatabaseBlockViewSource

Parameters

model: DatabaseBlockModel

Returns

DatabaseBlockViewSource

Source

packages/blocks/src/database-block/view-source.ts:11

Properties

currentId?

private optional currentId: string

Source

packages/blocks/src/database-block/view-source.ts:18


model

private model: DatabaseBlockModel

Source

packages/blocks/src/database-block/view-source.ts:11


updateSlot

updateSlot: Slot<void>

Implementation of

ViewSource.updateSlot

Source

packages/blocks/src/database-block/view-source.ts:25


viewMap

private viewMap: Map<string, SingleViewSource<BasicViewDataType<"table", DataType> | BasicViewDataType<"kanban", DataType>>>

Source

packages/blocks/src/database-block/view-source.ts:17

Accessors

allViewMeta

get allViewMeta(): ViewMeta[]

Returns

ViewMeta[]

Source

packages/blocks/src/database-block/view-source.ts:111


currentView

get currentView(): SingleViewSource<BasicViewDataType<"table", DataType> | BasicViewDataType<"kanban", DataType>>

Returns

SingleViewSource<BasicViewDataType<"table", DataType> | BasicViewDataType<"kanban", DataType>>

Source

packages/blocks/src/database-block/view-source.ts:31


currentViewId

get currentViewId(): string

Returns

string

Source

packages/blocks/src/database-block/view-source.ts:13


readonly

get readonly(): boolean

Returns

boolean

Source

packages/blocks/src/database-block/view-source.ts:35


views

get views(): SingleViewSource<BasicViewDataType<"table", DataType> | BasicViewDataType<"kanban", DataType>>[]

Returns

SingleViewSource<BasicViewDataType<"table", DataType> | BasicViewDataType<"kanban", DataType>>[]

Source

packages/blocks/src/database-block/view-source.ts:27

Methods

duplicate()

duplicate(id): void

Parameters

id: string

Returns

void

Implementation of

ViewSource.duplicate

Source

packages/blocks/src/database-block/view-source.ts:102


getViewMeta()

getViewMeta(type): ViewMeta

Parameters

type: string

Returns

ViewMeta

Implementation of

ViewSource.getViewMeta

Source

packages/blocks/src/database-block/view-source.ts:115


moveTo()

moveTo(id, position): void

Parameters

id: string

position: InsertToPosition

Returns

void

Implementation of

ViewSource.moveTo

Source

packages/blocks/src/database-block/view-source.ts:107


selectView()

selectView(id): void

Parameters

id: string

Returns

void

Implementation of

ViewSource.selectView

Source

packages/blocks/src/database-block/view-source.ts:20


viewAdd()

viewAdd(viewType): string

Parameters

viewType: keyof DataViewDataTypeMap

Returns

string

Implementation of

ViewSource.viewAdd

Source

packages/blocks/src/database-block/view-source.ts:39


viewGet()

viewGet(id): SingleViewSource<BasicViewDataType<"table", DataType> | BasicViewDataType<"kanban", DataType>>

Parameters

id: string

Returns

SingleViewSource<BasicViewDataType<"table", DataType> | BasicViewDataType<"kanban", DataType>>

Implementation of

ViewSource.viewGet

Source

packages/blocks/src/database-block/view-source.ts:49