API Reference
@univerjs
@univerjs/core
classes
Jsonx

@univerjs/core v0.1.17Docs


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): JSONOp

Parameters

ParameterType
subOpTextXAction[]

Returns

JSONOp

Defined in

submodules/univer/packages/core/src/docs/data-model/json-x/json-x.ts:116 (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:107 (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:102 (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:98 (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:112 (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:58 (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:66 (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:89 (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:75 (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:83 (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): void

Parameters

ParameterType
_thisActionsJSONOp
_otherActionsJSONOp
_priorityTPriority

Returns

void

Defined in

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


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