@univerjs/core v0.4.2 • 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' | 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
Parameter | Type |
---|---|
subOp | TextXAction [] |
path | string [] |
Returns
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
Parameter | Type |
---|---|
path | Path |
value | any |
Returns
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
Parameter | Type |
---|---|
from | Path |
to | Path |
Returns
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
Parameter | Type |
---|---|
path | Path |
value ? | any |
Returns
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
Parameter | Type |
---|---|
path | Path |
oldVal | any |
newVal | any |
Returns
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
Parameter | Type |
---|---|
doc | IDocumentData |
actions | JSONOp |
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
Parameter | Type |
---|---|
thisActions | JSONOp |
otherActions | JSONOp |
Returns
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
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
Parameter | Type |
---|---|
actions | JSONOp |
doc | IDocumentData |
Returns
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
Parameter | Type |
---|---|
actions | JSONOp |
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
Parameter | Type |
---|---|
subType | ISubType |
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
Parameter | Type |
---|---|
thisActions | JSONOp |
otherActions | JSONOp |
priority | TPriority |
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
Parameter | Type | Default value |
---|---|---|
thisActions | JSONOp | undefined |
index | number | undefined |
priority | TPriority | 'right' |
Returns
number
Defined in
submodules/univer/packages/core/src/docs/data-model/json-x/json-x.ts:76 (opens in a new tab)