API Reference
@univerjs
@univerjs/core
classes
Jsonx

@univerjs/core v0.4.2Docs


Class: JSONX

Constructors

new JSONX()

new JSONX(): JSONX

Returns

JSONX

Properties

PropertyModifierTypeDefault valueDefined in
uristaticstring'https://github.com/dream-num/univer#json-x'submodules/univer/packages/core/src/docs/data-model/json-x/json-x.ts:45 (opens in a new tab)

Methods

editOp()

editOp(subOp, path): JSONOp

Parameters

ParameterType
subOpTextXAction[]
pathstring[]

Returns

JSONOp

Defined in

submodules/univer/packages/core/src/docs/data-model/json-x/json-x.ts:125 (opens in a new tab)


insertOp()

insertOp(path, value): JSONOp

Parameters

ParameterType
pathPath
valueany

Returns

JSONOp

Defined in

submodules/univer/packages/core/src/docs/data-model/json-x/json-x.ts:116 (opens in a new tab)


moveOp()

moveOp(from, to): JSONOp

Parameters

ParameterType
fromPath
toPath

Returns

JSONOp

Defined in

submodules/univer/packages/core/src/docs/data-model/json-x/json-x.ts:111 (opens in a new tab)


removeOp()

removeOp(path, value?): JSONOp

Parameters

ParameterType
pathPath
value?any

Returns

JSONOp

Defined in

submodules/univer/packages/core/src/docs/data-model/json-x/json-x.ts:107 (opens in a new tab)


replaceOp()

replaceOp(
   path, 
   oldVal, 
   newVal): JSONOp

Parameters

ParameterType
pathPath
oldValany
newValany

Returns

JSONOp

Defined in

submodules/univer/packages/core/src/docs/data-model/json-x/json-x.ts:121 (opens in a new tab)


apply()

static apply(doc, actions): 
  | undefined
  | null
  | string
  | number
  | boolean
  | Doc[]
| {}

Parameters

ParameterType
docIDocumentData
actionsJSONOp

Returns

| undefined | null | string | number | boolean | Doc[] | {}

Defined in

submodules/univer/packages/core/src/docs/data-model/json-x/json-x.ts:59 (opens in a new tab)


compose()

static compose(thisActions, otherActions): JSONOp

Parameters

ParameterType
thisActionsJSONOp
otherActionsJSONOp

Returns

JSONOp

Defined in

submodules/univer/packages/core/src/docs/data-model/json-x/json-x.ts:67 (opens in a new tab)


getInstance()

static getInstance(): JSONX

Returns

JSONX

Defined in

submodules/univer/packages/core/src/docs/data-model/json-x/json-x.ts:98 (opens in a new tab)


invertWithDoc()

static invertWithDoc(actions, doc): JSONOp

Parameters

ParameterType
actionsJSONOp
docIDocumentData

Returns

JSONOp

Defined in

submodules/univer/packages/core/src/docs/data-model/json-x/json-x.ts:84 (opens in a new tab)


isNoop()

static isNoop(actions): boolean

Parameters

ParameterType
actionsJSONOp

Returns

boolean

Defined in

submodules/univer/packages/core/src/docs/data-model/json-x/json-x.ts:92 (opens in a new tab)


registerSubtype()

static registerSubtype(subType): void

Parameters

ParameterType
subTypeISubType

Returns

void

Defined in

submodules/univer/packages/core/src/docs/data-model/json-x/json-x.ts:49 (opens in a new tab)


transform()

static transform(
   thisActions, 
   otherActions, 
   priority): undefined | null | JSONOpList

Parameters

ParameterType
thisActionsJSONOp
otherActionsJSONOp
priorityTPriority

Returns

undefined | null | JSONOpList

Defined in

submodules/univer/packages/core/src/docs/data-model/json-x/json-x.ts:71 (opens in a new tab)


transformPosition()

static transformPosition(
   thisActions, 
   index, 
   priority): number

Parameters

ParameterTypeDefault value
thisActionsJSONOpundefined
indexnumberundefined
priorityTPriority'right'

Returns

number

Defined in

submodules/univer/packages/core/src/docs/data-model/json-x/json-x.ts:76 (opens in a new tab)


Copyright © 2021-2024 DreamNum Co,Ltd. All Rights Reserved.