@univerjs/engine-render v0.5.4


Class: DocumentViewModel

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/view-model/document-view-model.ts:177

Implements

Constructors

new DocumentViewModel()

new DocumentViewModel(_documentDataModel): DocumentViewModel

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/view-model/document-view-model.ts:207

Parameters

ParameterType
_documentDataModelDocumentDataModel

Returns

DocumentViewModel

Properties

PropertyModifierTypeDefined in
editAreaChange$readonlyObservable<Nullable<DocumentEditArea>>packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/view-model/document-view-model.ts:199
segmentViewModels$readonlyObservable<DocumentViewModel[]>packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/view-model/document-view-model.ts:205

Methods

dispose()

dispose(): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/view-model/document-view-model.ts:229

Returns

void

Implementation of

IDisposable.dispose


findTableNodeById()

findTableNodeById(id): undefined | DataStreamTreeNode

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/view-model/document-view-model.ts:343

Parameters

ParameterType
idstring

Returns

undefined | DataStreamTreeNode


getBody()

getBody(): undefined | IDocumentBody

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/view-model/document-view-model.ts:264

Returns

undefined | IDocumentBody


getChildren()

getChildren(): DataStreamTreeNode[]

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/view-model/document-view-model.ts:260

Returns

DataStreamTreeNode[]


getCustomBlock()

getCustomBlock(index): undefined | ICustomBlock

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/view-model/document-view-model.ts:322

Parameters

ParameterType
indexnumber

Returns

undefined | ICustomBlock


getCustomBlockWithoutSetCurrentIndex()

getCustomBlockWithoutSetCurrentIndex(index): undefined | ICustomBlock

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/view-model/document-view-model.ts:326

Parameters

ParameterType
indexnumber

Returns

undefined | ICustomBlock


getCustomDecoration()

getCustomDecoration(index): Nullable<ICustomDecorationForInterceptor>

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/view-model/document-view-model.ts:383

Parameters

ParameterType
indexnumber

Returns

Nullable<ICustomDecorationForInterceptor>


getCustomDecorationRaw()

getCustomDecorationRaw(index): 
  | undefined
  | ICustomDecoration

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/view-model/document-view-model.ts:369

Parameters

ParameterType
indexnumber

Returns

| undefined | ICustomDecoration


getCustomRange()

getCustomRange(index): Nullable<ICustomRangeForInterceptor>

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/view-model/document-view-model.ts:361

Parameters

ParameterType
indexnumber

Returns

Nullable<ICustomRangeForInterceptor>


getCustomRangeRaw()

getCustomRangeRaw(index): undefined | ICustomRange

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/view-model/document-view-model.ts:347

Parameters

ParameterType
indexnumber

Returns

undefined | ICustomRange


getDataModel()

getDataModel(): DocumentDataModel

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/view-model/document-view-model.ts:272

Returns

DocumentDataModel


getEditArea()

getEditArea(): DocumentEditArea

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/view-model/document-view-model.ts:249

Returns

DocumentEditArea


getHeaderFooterTreeMap()

getHeaderFooterTreeMap(): {
  footerTreeMap: Map<string, DocumentViewModel>;
  headerTreeMap: Map<string, DocumentViewModel>;
}

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/view-model/document-view-model.ts:242

Returns

{
  footerTreeMap: Map<string, DocumentViewModel>;
  headerTreeMap: Map<string, DocumentViewModel>;
}
NameTypeDefined in
footerTreeMapMap<string, DocumentViewModel>packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/view-model/document-view-model.ts:245
headerTreeMapMap<string, DocumentViewModel>packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/view-model/document-view-model.ts:244

getParagraph()

getParagraph(index): undefined | IParagraph

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/view-model/document-view-model.ts:311

Parameters

ParameterType
indexnumber

Returns

undefined | IParagraph


getSectionBreak()

getSectionBreak(index): undefined | ISectionBreak

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/view-model/document-view-model.ts:307

Parameters

ParameterType
indexnumber

Returns

undefined | ISectionBreak


getSelfOrHeaderFooterViewModel()

getSelfOrHeaderFooterViewModel(segmentId?): DocumentViewModel

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/view-model/document-view-model.ts:276

Parameters

ParameterType
segmentId?string

Returns

DocumentViewModel


getSnapshot()

getSnapshot(): IDocumentData

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/view-model/document-view-model.ts:268

Returns

IDocumentData


getTableByStartIndex()

getTableByStartIndex(index): undefined | ITableCoupleCache

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/view-model/document-view-model.ts:339

Parameters

ParameterType
indexnumber

Returns

undefined | ITableCoupleCache


getTextRun()

getTextRun(index): Nullable<ITextRun>

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/view-model/document-view-model.ts:315

Parameters

ParameterType
indexnumber

Returns

Nullable<ITextRun>


registerCustomRangeInterceptor()

registerCustomRangeInterceptor(interceptor): IDisposable

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/view-model/document-view-model.ts:223

Parameters

ParameterType
interceptorICustomRangeInterceptor

Returns

IDisposable


reset()

reset(documentDataModel): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/view-model/document-view-model.ts:292

Parameters

ParameterType
documentDataModelDocumentDataModel

Returns

void


setEditArea()

setEditArea(editArea): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/view-model/document-view-model.ts:253

Parameters

ParameterType
editAreaDocumentEditArea

Returns

void