@univerjscoreclassesJsonx

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


Class: JSONX

Constructors

new JSONX()

new JSONX(): JSONX

Returns

JSONX

Properties

PropertyModifierTypeDefault valueDefined in
uristaticstring'https://github.com/dream-num/univer#json-x'packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/json-x/json-x.ts:45

Methods

editOp()

editOp(subOp, path): JSONOp

Parameters

ParameterType
subOpTextXAction[]
pathstring[]

Returns

JSONOp

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/json-x/json-x.ts:125


insertOp()

insertOp(path, value): JSONOp

Parameters

ParameterType
pathPath
valueany

Returns

JSONOp

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/json-x/json-x.ts:116


moveOp()

moveOp(from, to): JSONOp

Parameters

ParameterType
fromPath
toPath

Returns

JSONOp

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/json-x/json-x.ts:111


removeOp()

removeOp(path, value?): JSONOp

Parameters

ParameterType
pathPath
value?any

Returns

JSONOp

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/json-x/json-x.ts:107


replaceOp()

replaceOp(
   path, 
   oldVal, 
   newVal): JSONOp

Parameters

ParameterType
pathPath
oldValany
newValany

Returns

JSONOp

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/json-x/json-x.ts:121


apply()

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

Parameters

ParameterType
docIDocumentData
actionsJSONOp

Returns

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

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/json-x/json-x.ts:59


compose()

static compose(thisActions, otherActions): JSONOp

Parameters

ParameterType
thisActionsJSONOp
otherActionsJSONOp

Returns

JSONOp

Defined in

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


getInstance()

static getInstance(): JSONX

Returns

JSONX

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/json-x/json-x.ts:98


invertWithDoc()

static invertWithDoc(actions, doc): JSONOp

Parameters

ParameterType
actionsJSONOp
docIDocumentData

Returns

JSONOp

Defined in

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


isNoop()

static isNoop(actions): boolean

Parameters

ParameterType
actionsJSONOp

Returns

boolean

Defined in

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


registerSubtype()

static registerSubtype(subType): void

Parameters

ParameterType
subTypeISubType

Returns

void

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/json-x/json-x.ts:49


transform()

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

Parameters

ParameterType
thisActionsJSONOp
otherActionsJSONOp
priorityTPriority

Returns

undefined | null | JSONOpList

Defined in

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


transformPosition()

static transformPosition(
   thisActions, 
   index, 
   priority): number

Parameters

ParameterTypeDefault value
thisActionsJSONOpundefined
indexnumberundefined
priorityTPriority'right'

Returns

number

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/json-x/json-x.ts:76