API Reference
@univerjs
@univerjs/sheets-hyper-link
classes
Hyperlinkmodel

@univerjs/sheets-hyper-link v0.4.2Docs


Class: HyperLinkModel

Extends

Constructors

new HyperLinkModel()

new HyperLinkModel(_univerInstanceService): HyperLinkModel

Parameters

ParameterType
_univerInstanceServiceIUniverInstanceService

Returns

HyperLinkModel

Overrides

Disposable.constructor

Defined in

sheets-hyper-link/src/models/hyper-link.model.ts:66 (opens in a new tab)

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseDisposable._disposedcore/src/shared/lifecycle.ts:93 (opens in a new tab)
linkUpdate$publicObservable<LinkUpdate>undefined-sheets-hyper-link/src/models/hyper-link.model.ts:61 (opens in a new tab)

Methods

addHyperLink()

addHyperLink(
   unitId, 
   subUnitId, 
   link): boolean

Parameters

ParameterType
unitIdstring
subUnitIdstring
linkICellHyperLink

Returns

boolean

Defined in

sheets-hyper-link/src/models/hyper-link.model.ts:107 (opens in a new tab)


deleteUnit()

deleteUnit(unitId): void

Parameters

ParameterType
unitIdstring

Returns

void

Defined in

sheets-hyper-link/src/models/hyper-link.model.ts:261 (opens in a new tab)


dispose()

dispose(): void

Returns

void

Inherited from

Disposable.dispose

Defined in

core/src/shared/lifecycle.ts:106 (opens in a new tab)


disposeWithMe()

disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe

Defined in

core/src/shared/lifecycle.ts:96 (opens in a new tab)


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

Disposable.ensureNotDisposed

Defined in

core/src/shared/lifecycle.ts:100 (opens in a new tab)


getAll()

getAll(): {
  links: ICellHyperLink[];
  subUnitId: string;
  unitId: string;
 }[][]

Returns

{ links: ICellHyperLink[]; subUnitId: string; unitId: string; }[][]

Defined in

sheets-hyper-link/src/models/hyper-link.model.ts:273 (opens in a new tab)


getHyperLink()

getHyperLink(
   unitId, 
   subUnitId, 
id): Nullable<ICellHyperLink>

Parameters

ParameterType
unitIdstring
subUnitIdstring
idstring

Returns

Nullable<ICellHyperLink>

Defined in

sheets-hyper-link/src/models/hyper-link.model.ts:202 (opens in a new tab)


getHyperLinkByLocation()

getHyperLinkByLocation(
   unitId, 
   subUnitId, 
   row, 
   column): undefined | ICellHyperLink

Parameters

ParameterType
unitIdstring
subUnitIdstring
rownumber
columnnumber

Returns

undefined | ICellHyperLink

Defined in

sheets-hyper-link/src/models/hyper-link.model.ts:211 (opens in a new tab)


getHyperLinkByLocationSync()

getHyperLinkByLocationSync(
   unitId, 
   subUnitId, 
   row, 
   column): undefined | {
  column: number;
  display: cellValueStr;
  id: string;
  payload: string;
  row: number;
}

Parameters

ParameterType
unitIdstring
subUnitIdstring
rownumber
columnnumber

Returns

undefined | { column: number; display: cellValueStr; id: string; payload: string; row: number; }

Defined in

sheets-hyper-link/src/models/hyper-link.model.ts:216 (opens in a new tab)


getSubUnit()

getSubUnit(unitId, subUnitId): ICellHyperLink[]

Parameters

ParameterType
unitIdstring
subUnitIdstring

Returns

ICellHyperLink[]

Defined in

sheets-hyper-link/src/models/hyper-link.model.ts:232 (opens in a new tab)


getUnit()

getUnit(unitId): {
  links: ICellHyperLink[];
  subUnitId: string;
  unitId: string;
 }[]

Parameters

ParameterType
unitIdstring

Returns

{ links: ICellHyperLink[]; subUnitId: string; unitId: string; }[]

Defined in

sheets-hyper-link/src/models/hyper-link.model.ts:245 (opens in a new tab)


removeHyperLink()

removeHyperLink(
   unitId, 
   subUnitId, 
   id): boolean

Parameters

ParameterType
unitIdstring
subUnitIdstring
idstring

Returns

boolean

Defined in

sheets-hyper-link/src/models/hyper-link.model.ts:180 (opens in a new tab)


updateHyperLink()

updateHyperLink(
   unitId, 
   subUnitId, 
   id, 
   payload, 
   silent): boolean

Parameters

ParameterTypeDefault value
unitIdstringundefined
subUnitIdstringundefined
idstringundefined
payloadPartial<ICellLinkContent>undefined
silentbooleanfalse

Returns

boolean

Defined in

sheets-hyper-link/src/models/hyper-link.model.ts:120 (opens in a new tab)


updateHyperLinkRef()

updateHyperLinkRef(
   unitId, 
   subUnitId, 
   id, 
   payload, 
   silent): boolean

Parameters

ParameterTypeDefault value
unitIdstringundefined
subUnitIdstringundefined
idstringundefined
payloadobjectundefined
payload.columnnumberundefined
payload.rownumberundefined
silentbooleanfalse

Returns

boolean

Defined in

sheets-hyper-link/src/models/hyper-link.model.ts:153 (opens in a new tab)


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