@univerjscoreclassesDocumentdatamodel

@univerjs/core v0.5.0-beta.1 • Docs


Class: DocumentDataModel

Extends

  • DocumentDataModelSimple

Constructors

new DocumentDataModel()

new DocumentDataModel(snapshot): DocumentDataModel

Parameters

ParameterType
snapshotPartial<IDocumentData>

Returns

DocumentDataModel

Overrides

DocumentDataModelSimple.constructor

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:232

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseDocumentDataModelSimple._disposedpackages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:93
_name$readonlyBehaviorSubject<string>undefinedDocumentDataModelSimple._name$packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:55
footerModelMappublicMap<string, DocumentDataModel>undefined-packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:230
headerModelMappublicMap<string, DocumentDataModel>undefined-packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:228
name$publicObservable<string>undefinedDocumentDataModelSimple.name$packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:56
snapshotprotectedIDocumentDataundefinedDocumentDataModelSimple.snapshotpackages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:58
typepublicUNIVER_DOCUniverInstanceType.UNIVER_DOCDocumentDataModelSimple.typepackages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:49

Accessors

documentStyle

Get Signature

get documentStyle(): IDocumentStyle
Returns

IDocumentStyle

Inherited from

DocumentDataModelSimple.documentStyle

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:88


drawings

Get Signature

get drawings(): undefined | IDrawings
Returns

undefined | IDrawings

Inherited from

DocumentDataModelSimple.drawings

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:84


lists

Get Signature

get lists(): undefined | ILists
Returns

undefined | ILists

Inherited from

DocumentDataModelSimple.lists

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:92


zoomRatio

Get Signature

get zoomRatio(): number
Returns

number

Inherited from

DocumentDataModelSimple.zoomRatio

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:96

Methods

apply()

apply(actions): undefined | IDocumentData

Parameters

ParameterType
actionsJSONOp

Returns

undefined | IDocumentData

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:304


dispose()

dispose(): void

Returns

void

Overrides

DocumentDataModelSimple.dispose

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:243


disposeWithMe()

disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

DocumentDataModelSimple.disposeWithMe

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:96


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

DocumentDataModelSimple.ensureNotDisposed

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:100


getBody()

getBody(): undefined | IDocumentBody

Returns

undefined | IDocumentBody

Inherited from

DocumentDataModelSimple.getBody

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:105


getBulletPresetList()

getBulletPresetList(): Record<string, IListData>

Returns

Record<string, IListData>

Inherited from

DocumentDataModelSimple.getBulletPresetList

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:113


getCustomDecorations()

getCustomDecorations(): undefined | ICustomDecoration[]

Returns

undefined | ICustomDecoration[]

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:268


getCustomRanges()

getCustomRanges(): undefined | ICustomRange<Record<string, any>>[]

Returns

undefined | ICustomRange<Record<string, any>>[]

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:264


getDrawings()

getDrawings(): undefined | IDrawings

Returns

undefined | IDrawings

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:256


getDrawingsOrder()

getDrawingsOrder(): undefined | string[]

Returns

undefined | string[]

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:260


getRev()

getRev(): number

Get revision of the unit’s snapshot. Note that revision should start from 1.

Returns

number

Inherited from

DocumentDataModelSimple.getRev

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:67


getSelfOrHeaderFooterModel()

getSelfOrHeaderFooterModel(segmentId?): DocumentDataModel

Parameters

ParameterType
segmentId?string

Returns

DocumentDataModel

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:286


getSettings()

getSettings(): undefined | IDocumentSettings

Returns

undefined | IDocumentSettings

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:272


getSnapshot()

getSnapshot(): IDocumentData

Returns

IDocumentData

Inherited from

DocumentDataModelSimple.getSnapshot

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:109


getUnitId()

getUnitId(): string

Returns

string

Overrides

DocumentDataModelSimple.getUnitId

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:300


incrementRev()

incrementRev(): void

Increment the current revision.

Returns

void

Inherited from

DocumentDataModelSimple.incrementRev

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:71


reset()

reset(snapshot): void

Parameters

ParameterType
snapshotPartial<IDocumentData>

Returns

void

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:277


resetDrawing()

resetDrawing(drawings, drawingsOrder): void

Parameters

ParameterType
drawingsIDrawings
drawingsOrderstring[]

Returns

void

Inherited from

DocumentDataModelSimple.resetDrawing

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:100


setName()

setName(name): void

Parameters

ParameterType
namestring

Returns

void

Inherited from

DocumentDataModelSimple.setName

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:79


setRev()

setRev(rev): void

Set revision of the current snapshot.

Parameters

ParameterType
revnumber

Returns

void

Inherited from

DocumentDataModelSimple.setRev

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:75


setZoomRatio()

setZoomRatio(zoomRatio): void

Parameters

ParameterTypeDefault value
zoomRationumber1

Returns

void

Inherited from

DocumentDataModelSimple.setZoomRatio

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:214


sliceBody()

sliceBody(
   startOffset, 
   endOffset, 
type): Nullable<IDocumentBody>

Parameters

ParameterTypeDefault value
startOffsetnumberundefined
endOffsetnumberundefined
typeSliceBodyTypeSliceBodyType.copy

Returns

Nullable<IDocumentBody>

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:321


updateDocumentDataMargin()

updateDocumentDataMargin(data): void

Parameters

ParameterType
dataIPaddingData

Returns

void

Inherited from

DocumentDataModelSimple.updateDocumentDataMargin

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:151


updateDocumentDataPageSize()

updateDocumentDataPageSize(width?, height?): void

Parameters

ParameterType
width?number
height?number

Returns

void

Inherited from

DocumentDataModelSimple.updateDocumentDataPageSize

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:172


updateDocumentId()

updateDocumentId(unitId): void

Parameters

ParameterType
unitIdstring

Returns

void

Overrides

DocumentDataModelSimple.updateDocumentId

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:351


updateDocumentRenderConfig()

updateDocumentRenderConfig(config): void

Parameters

ParameterType
configIDocumentRenderConfig

Returns

void

Inherited from

DocumentDataModelSimple.updateDocumentRenderConfig

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:127


updateDocumentStyle()

updateDocumentStyle(config): void

Parameters

ParameterType
configIDocumentStyle

Returns

void

Inherited from

DocumentDataModelSimple.updateDocumentStyle

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:140


updateDrawing()

updateDrawing(id, config): void

Parameters

ParameterType
idstring
configIDrawingUpdateConfig

Returns

void

Inherited from

DocumentDataModelSimple.updateDrawing

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:196