@univerjs/core v0.5.0-beta.1 • Docs
Class: JSONX
Constructors
new JSONX()
new JSONX(): JSONX
Returns
Properties
Property | Modifier | Type | Default value | Defined in |
---|---|---|---|---|
uri | static | string | '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
Parameter | Type |
---|---|
subOp | TextXAction [] |
path | string [] |
Returns
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
Parameter | Type |
---|---|
path | Path |
value | any |
Returns
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
Parameter | Type |
---|---|
from | Path |
to | Path |
Returns
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
Parameter | Type |
---|---|
path | Path |
value ? | any |
Returns
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
Parameter | Type |
---|---|
path | Path |
oldVal | any |
newVal | any |
Returns
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
Parameter | Type |
---|---|
doc | IDocumentData |
actions | JSONOp |
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
Parameter | Type |
---|---|
thisActions | JSONOp |
otherActions | JSONOp |
Returns
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
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
Parameter | Type |
---|---|
actions | JSONOp |
doc | IDocumentData |
Returns
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
Parameter | Type |
---|---|
actions | JSONOp |
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
Parameter | Type |
---|---|
subType | ISubType |
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
Parameter | Type |
---|---|
thisActions | JSONOp |
otherActions | JSONOp |
priority | TPriority |
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
Parameter | Type | Default value |
---|---|---|
thisActions | JSONOp | undefined |
index | number | undefined |
priority | TPriority | 'right' |
Returns
number
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/json-x/json-x.ts:76