@univerjs/find-replace v0.4.2 • Docs
Class: abstract
FindModel
Extends
Constructors
new FindModel()
new FindModel(): FindModel
Returns
Inherited from
Properties
Property | Modifier | Type | Default value | Description | Inherited from | Defined in |
---|---|---|---|---|---|---|
_disposed | protected | boolean | false | - | Disposable ._disposed | packages/core/src/shared/lifecycle.ts:93 (opens in a new tab) |
activelyChangingMatch$ | abstract | Observable <IFindMatch <unknown >> | undefined | - | - | packages/find-replace/src/services/find-replace.service.ts:69 (opens in a new tab) |
matchesUpdate$ | abstract | Observable <IFindMatch <unknown >[]> | undefined | Find model should emit new matches from this observable if they changed no matter due to incremental or document's content changes. | - | packages/find-replace/src/services/find-replace.service.ts:68 (opens in a new tab) |
unitId | abstract | string | undefined | - | - | packages/find-replace/src/services/find-replace.service.ts:62 (opens in a new tab) |
Methods
dispose()
dispose(): void
Returns
void
Inherited from
Defined in
packages/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
packages/core/src/shared/lifecycle.ts:96 (opens in a new tab)
ensureNotDisposed()
protected ensureNotDisposed(): void
Returns
void
Inherited from
Defined in
packages/core/src/shared/lifecycle.ts:100 (opens in a new tab)
getMatches()
abstract getMatches(): IFindMatch<unknown>[]
Returns
IFindMatch
<unknown
>[]
Defined in
packages/find-replace/src/services/find-replace.service.ts:71 (opens in a new tab)
moveToNextMatch()
abstract moveToNextMatch(params?): null | IFindMatch<unknown>
Parameters
Parameter | Type |
---|---|
params ? | IFindMoveParams |
Returns
null
| IFindMatch
<unknown
>
Defined in
packages/find-replace/src/services/find-replace.service.ts:73 (opens in a new tab)
moveToPreviousMatch()
abstract moveToPreviousMatch(params?): null | IFindMatch<unknown>
Parameters
Parameter | Type |
---|---|
params ? | IFindMoveParams |
Returns
null
| IFindMatch
<unknown
>
Defined in
packages/find-replace/src/services/find-replace.service.ts:74 (opens in a new tab)
replace()
abstract replace(replaceString): Promise<boolean>
Replace the currently focused matching if there is one.
Parameters
Parameter | Type |
---|---|
replaceString | string |
Returns
Promise
<boolean
>
Defined in
packages/find-replace/src/services/find-replace.service.ts:77 (opens in a new tab)
replaceAll()
abstract replaceAll(replaceString): Promise<IReplaceAllResult>
Replace all matches. This method would return how many
Parameters
Parameter | Type |
---|---|
replaceString | string |
Returns
Promise
<IReplaceAllResult
>
Defined in
packages/find-replace/src/services/find-replace.service.ts:82 (opens in a new tab)