BlockSuite API Documentation / @blocksuite/blocks / DatabaseBlockViewSource
Class: DatabaseBlockViewSource
Implements
ViewSource
Constructors
new DatabaseBlockViewSource()
new DatabaseBlockViewSource(
model):DatabaseBlockViewSource
Parameters
• model: DatabaseBlockModel
Returns
Source
packages/blocks/src/database-block/view-source.ts:11
Properties
currentId?
privateoptionalcurrentId:string
Source
packages/blocks/src/database-block/view-source.ts:18
model
privatemodel: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
privateviewMap:Map<string,SingleViewSource<BasicViewDataType<"table",DataType> |BasicViewDataType<"kanban",DataType>>>
Source
packages/blocks/src/database-block/view-source.ts:17
Accessors
allViewMeta
getallViewMeta():ViewMeta[]
Returns
ViewMeta[]
Source
packages/blocks/src/database-block/view-source.ts:111
currentView
getcurrentView():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
getcurrentViewId():string
Returns
string
Source
packages/blocks/src/database-block/view-source.ts:13
readonly
getreadonly():boolean
Returns
boolean
Source
packages/blocks/src/database-block/view-source.ts:35
views
getviews():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