@univerjs/sheets-hyper-link v0.4.2 • Docs
Class: HyperLinkModel
Extends
Constructors
new HyperLinkModel()
new HyperLinkModel(_univerInstanceService): HyperLinkModel
Parameters
Parameter | Type |
---|---|
_univerInstanceService | IUniverInstanceService |
Returns
Overrides
Defined in
sheets-hyper-link/src/models/hyper-link.model.ts:66 (opens in a new tab)
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_disposed | protected | boolean | false | Disposable ._disposed | core/src/shared/lifecycle.ts:93 (opens in a new tab) |
linkUpdate$ | public | Observable <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
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
link | ICellHyperLink |
Returns
boolean
Defined in
sheets-hyper-link/src/models/hyper-link.model.ts:107 (opens in a new tab)
deleteUnit()
deleteUnit(unitId): void
Parameters
Parameter | Type |
---|---|
unitId | string |
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
Defined in
core/src/shared/lifecycle.ts:106 (opens in a new tab)
disposeWithMe()
disposeWithMe(disposable): IDisposable
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
Defined in
core/src/shared/lifecycle.ts:96 (opens in a new tab)
ensureNotDisposed()
protected ensureNotDisposed(): void
Returns
void
Inherited from
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
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
id | string |
Returns
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
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
row | number |
column | number |
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
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
row | number |
column | number |
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
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
Returns
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
Parameter | Type |
---|---|
unitId | string |
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
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
id | string |
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
Parameter | Type | Default value |
---|---|---|
unitId | string | undefined |
subUnitId | string | undefined |
id | string | undefined |
payload | Partial <ICellLinkContent > | undefined |
silent | boolean | false |
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
Parameter | Type | Default value |
---|---|---|
unitId | string | undefined |
subUnitId | string | undefined |
id | string | undefined |
payload | object | undefined |
payload.column | number | undefined |
payload.row | number | undefined |
silent | boolean | false |
Returns
boolean
Defined in
sheets-hyper-link/src/models/hyper-link.model.ts:153 (opens in a new tab)