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:39
Properties
currentId?
private
optional
currentId:string
Source
packages/blocks/src/database-block/view-source.ts:33
model
private
model:DatabaseBlockModel
Source
packages/blocks/src/database-block/view-source.ts:39
updateSlot
updateSlot:
Slot
<object
>
Type declaration
viewId?
optional
viewId:string
Implementation of
ViewSource.updateSlot
Source
packages/blocks/src/database-block/view-source.ts:35
viewMap
private
viewMap:Map
<string
,SingleViewSource
<BasicViewDataType
<"table"
,DataType
> |BasicViewDataType
<"kanban"
,DataType
>>>
Source
packages/blocks/src/database-block/view-source.ts:31
Accessors
allViewMeta
get
allViewMeta():ViewMeta
[]
Returns
ViewMeta
[]
Source
packages/blocks/src/database-block/view-source.ts:27
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:19
currentViewId
get
currentViewId():string
Returns
string
Source
packages/blocks/src/database-block/view-source.ts:11
readonly
get
readonly():boolean
Returns
boolean
Source
packages/blocks/src/database-block/view-source.ts:23
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:15
Methods
checkViewDataUpdate()
checkViewDataUpdate():
void
Returns
void
Implementation of
ViewSource.checkViewDataUpdate
Source
packages/blocks/src/database-block/view-source.ts:41
duplicate()
duplicate(
id
):void
Parameters
• id: string
Returns
void
Implementation of
ViewSource.duplicate
Source
packages/blocks/src/database-block/view-source.ts:122
getViewMeta()
getViewMeta(
type
):ViewMeta
Parameters
• type: string
Returns
ViewMeta
Implementation of
ViewSource.getViewMeta
Source
packages/blocks/src/database-block/view-source.ts:131
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:127
selectView()
selectView(
id
):void
Parameters
• id: string
Returns
void
Implementation of
ViewSource.selectView
Source
packages/blocks/src/database-block/view-source.ts:47
viewAdd()
viewAdd(
viewType
):string
Parameters
• viewType: keyof DataViewDataTypeMap
Returns
string
Implementation of
ViewSource.viewAdd
Source
packages/blocks/src/database-block/view-source.ts:52
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:62