@univerjssheets-hyper-linkindexclassesHyperlinkmodel

@univerjs/sheets-hyper-link v0.5.4


Class: HyperLinkModel

Defined in: sheets-hyper-link/src/models/hyper-link.model.ts:59

Extends

Constructors

new HyperLinkModel()

new HyperLinkModel(_univerInstanceService): HyperLinkModel

Defined in: sheets-hyper-link/src/models/hyper-link.model.ts:66

Parameters

ParameterType
_univerInstanceServiceIUniverInstanceService

Returns

HyperLinkModel

Overrides

Disposable.constructor

Properties

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

Methods

addHyperLink(
   unitId, 
   subUnitId, 
   link): boolean

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

Parameters

ParameterType
unitIdstring
subUnitIdstring
linkISheetHyperLink

Returns

boolean


deleteUnit()

deleteUnit(unitId): void

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

Parameters

ParameterType
unitIdstring

Returns

void


dispose()

dispose(): void

Defined in: core/src/shared/lifecycle.ts:109

Returns

void

Inherited from

Disposable.dispose


disposeWithMe()

disposeWithMe(disposable): IDisposable

Defined in: core/src/shared/lifecycle.ts:99

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe


ensureNotDisposed()

protected ensureNotDisposed(): void

Defined in: core/src/shared/lifecycle.ts:103

Returns

void

Inherited from

Disposable.ensureNotDisposed


getAll()

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

Defined in: sheets-hyper-link/src/models/hyper-link.model.ts:273

Returns

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


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

Defined in: sheets-hyper-link/src/models/hyper-link.model.ts:202

Parameters

ParameterType
unitIdstring
subUnitIdstring
idstring

Returns

Nullable<ISheetHyperLink>


getHyperLinkByLocation()

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

Defined in: sheets-hyper-link/src/models/hyper-link.model.ts:211

Parameters

ParameterType
unitIdstring
subUnitIdstring
rownumber
columnnumber

Returns

undefined | ISheetHyperLink


getHyperLinkByLocationSync()

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

Defined in: sheets-hyper-link/src/models/hyper-link.model.ts:216

Parameters

ParameterType
unitIdstring
subUnitIdstring
rownumber
columnnumber

Returns

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


getSubUnit()

getSubUnit(unitId, subUnitId): ISheetHyperLink[]

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

Parameters

ParameterType
unitIdstring
subUnitIdstring

Returns

ISheetHyperLink[]


getUnit()

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

Defined in: sheets-hyper-link/src/models/hyper-link.model.ts:245

Parameters

ParameterType
unitIdstring

Returns

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


removeHyperLink(
   unitId, 
   subUnitId, 
   id): boolean

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

Parameters

ParameterType
unitIdstring
subUnitIdstring
idstring

Returns

boolean


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

Defined in: sheets-hyper-link/src/models/hyper-link.model.ts:120

Parameters

ParameterTypeDefault value
unitIdstringundefined
subUnitIdstringundefined
idstringundefined
payloadPartial<ICellLinkContent>undefined
silentbooleanfalse

Returns

boolean


updateHyperLinkRef()

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

Defined in: sheets-hyper-link/src/models/hyper-link.model.ts:153

Parameters

ParameterTypeDefault value
unitIdstringundefined
subUnitIdstringundefined
idstringundefined
payload{ column: number; row: number; }undefined
payload.columnnumberundefined
payload.rownumberundefined
silentbooleanfalse

Returns

boolean