@univerjs/core v0.5.0-beta.1 • Docs
Class: DocumentDataModel
Extends
DocumentDataModelSimple
Constructors
new DocumentDataModel()
new DocumentDataModel(snapshot): DocumentDataModel
Parameters
Parameter | Type |
---|---|
snapshot | Partial <IDocumentData > |
Returns
Overrides
DocumentDataModelSimple.constructor
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:232
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_disposed | protected | boolean | false | DocumentDataModelSimple._disposed | packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:93 |
_name$ | readonly | BehaviorSubject <string > | undefined | DocumentDataModelSimple._name$ | packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:55 |
footerModelMap | public | Map <string , DocumentDataModel > | undefined | - | packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:230 |
headerModelMap | public | Map <string , DocumentDataModel > | undefined | - | packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:228 |
name$ | public | Observable <string > | undefined | DocumentDataModelSimple.name$ | packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:56 |
snapshot | protected | IDocumentData | undefined | DocumentDataModelSimple.snapshot | packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:58 |
type | public | UNIVER_DOC | UniverInstanceType.UNIVER_DOC | DocumentDataModelSimple.type | packages/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
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
Parameter | Type |
---|---|
actions | JSONOp |
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
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
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
Parameter | Type |
---|---|
segmentId ? | string |
Returns
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
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
Parameter | Type |
---|---|
snapshot | Partial <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
Parameter | Type |
---|---|
drawings | IDrawings |
drawingsOrder | string [] |
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
Parameter | Type |
---|---|
name | string |
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
Parameter | Type |
---|---|
rev | number |
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
Parameter | Type | Default value |
---|---|---|
zoomRatio | number | 1 |
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
Parameter | Type | Default value |
---|---|---|
startOffset | number | undefined |
endOffset | number | undefined |
type | SliceBodyType | SliceBodyType.copy |
Returns
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
Parameter | Type |
---|---|
data | IPaddingData |
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
Parameter | Type |
---|---|
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
Parameter | Type |
---|---|
unitId | string |
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
Parameter | Type |
---|---|
config | IDocumentRenderConfig |
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
Parameter | Type |
---|---|
config | IDocumentStyle |
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
Parameter | Type |
---|---|
id | string |
config | IDrawingUpdateConfig |
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