@univerjssheets-hyper-linkindexclassesHyperlinkmodel

@univerjs/sheets-hyper-link v0.5.0-beta.1 • Docs


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

Properties

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

Methods

addHyperLink(
   unitId, 
   subUnitId, 
   link): boolean

Parameters

ParameterType
unitIdstring
subUnitIdstring
linkICellHyperLink

Returns

boolean

Defined in

sheets-hyper-link/src/models/hyper-link.model.ts:107


deleteUnit()

deleteUnit(unitId): void

Parameters

ParameterType
unitIdstring

Returns

void

Defined in

sheets-hyper-link/src/models/hyper-link.model.ts:261


dispose()

dispose(): void

Returns

void

Inherited from

Disposable.dispose

Defined in

core/src/shared/lifecycle.ts:106


disposeWithMe()

disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe

Defined in

core/src/shared/lifecycle.ts:96


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

Disposable.ensureNotDisposed

Defined in

core/src/shared/lifecycle.ts:100


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


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


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


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


getSubUnit()

getSubUnit(unitId, subUnitId): ICellHyperLink[]

Parameters

ParameterType
unitIdstring
subUnitIdstring

Returns

ICellHyperLink[]

Defined in

sheets-hyper-link/src/models/hyper-link.model.ts:232


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


removeHyperLink(
   unitId, 
   subUnitId, 
   id): boolean

Parameters

ParameterType
unitIdstring
subUnitIdstring
idstring

Returns

boolean

Defined in

sheets-hyper-link/src/models/hyper-link.model.ts:180


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


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