API Reference
@univerjs
@univerjs/find-replace
interfaces
Ifindreplaceservice

@univerjs/find-replace v0.4.2Docs


Interface: IFindReplaceService

This service works as a core of the find & replace feature.

Properties

PropertyModifierTypeDescriptionDefined in
currentMatch$readonlyObservable<Nullable<IFindMatch<unknown>>>-packages/find-replace/src/services/find-replace.service.ts:102 (opens in a new tab)
focusSignal$readonlyObservable<void>-packages/find-replace/src/services/find-replace.service.ts:106 (opens in a new tab)
replaceRevealedreadonlyboolean-packages/find-replace/src/services/find-replace.service.ts:109 (opens in a new tab)
replaceables$readonlyObservable<IReplaceableMatch[]>An observable value of all matches those could be replaced.packages/find-replace/src/services/find-replace.service.ts:104 (opens in a new tab)
revealedreadonlyboolean-packages/find-replace/src/services/find-replace.service.ts:108 (opens in a new tab)
state$readonlyObservable<IFindReplaceState>-packages/find-replace/src/services/find-replace.service.ts:100 (opens in a new tab)
stateUpdates$readonlyObservable<Partial<IFindReplaceState>>-packages/find-replace/src/services/find-replace.service.ts:99 (opens in a new tab)

Methods

changeCaseSensitive()

changeCaseSensitive(sensitive): void

Parameters

ParameterType
sensitiveboolean

Returns

void

Defined in

packages/find-replace/src/services/find-replace.service.ts:147 (opens in a new tab)


changeFindBy()

changeFindBy(findBy): void

Parameters

ParameterType
findByFindBy

Returns

void

Defined in

packages/find-replace/src/services/find-replace.service.ts:151 (opens in a new tab)


changeFindDirection()

changeFindDirection(direction): void

Parameters

ParameterType
directionFindDirection

Returns

void

Defined in

packages/find-replace/src/services/find-replace.service.ts:150 (opens in a new tab)


changeFindScope()

changeFindScope(scope): void

Parameters

ParameterType
scopeFindScope

Returns

void

Defined in

packages/find-replace/src/services/find-replace.service.ts:149 (opens in a new tab)


changeFindString()

changeFindString(value): void

Parameters

ParameterType
valuestring

Returns

void

Defined in

packages/find-replace/src/services/find-replace.service.ts:144 (opens in a new tab)


changeInputtingFindString()

changeInputtingFindString(value): void

Parameters

ParameterType
valuestring

Returns

void

Defined in

packages/find-replace/src/services/find-replace.service.ts:145 (opens in a new tab)


changeMatchesTheWholeCell()

changeMatchesTheWholeCell(wholeCell): void

Parameters

ParameterType
wholeCellboolean

Returns

void

Defined in

packages/find-replace/src/services/find-replace.service.ts:148 (opens in a new tab)


changeReplaceString()

changeReplaceString(value): void

Parameters

ParameterType
valuestring

Returns

void

Defined in

packages/find-replace/src/services/find-replace.service.ts:146 (opens in a new tab)


find()

find(): void

Start searching with the current conditions.

Returns

void

Defined in

packages/find-replace/src/services/find-replace.service.ts:139 (opens in a new tab)


focusFindInput()

focusFindInput(): void

Returns

void

Defined in

packages/find-replace/src/services/find-replace.service.ts:141 (opens in a new tab)


getFindString()

getFindString(): string

Get find string from the internal state.

Returns

string

Defined in

packages/find-replace/src/services/find-replace.service.ts:122 (opens in a new tab)


moveToNextMatch()

moveToNextMatch(): void

Returns

void

Defined in

packages/find-replace/src/services/find-replace.service.ts:153 (opens in a new tab)


moveToPreviousMatch()

moveToPreviousMatch(): void

Returns

void

Defined in

packages/find-replace/src/services/find-replace.service.ts:154 (opens in a new tab)


registerFindReplaceProvider()

registerFindReplaceProvider(provider): IDisposable

Register a find replace provider to the service. The provider is the actual bearer to perform the find in different kinds of documents or different environments.

Parameters

ParameterTypeDescription
providerIFindReplaceProviderthe find replace provider

Returns

IDisposable

Defined in

packages/find-replace/src/services/find-replace.service.ts:117 (opens in a new tab)


replace()

replace(): Promise<boolean>

Returns

Promise<boolean>

Defined in

packages/find-replace/src/services/find-replace.service.ts:156 (opens in a new tab)


replaceAll()

replaceAll(): Promise<IReplaceAllResult>

Returns

Promise<IReplaceAllResult>

Defined in

packages/find-replace/src/services/find-replace.service.ts:157 (opens in a new tab)


revealReplace()

revealReplace(): void

Returns

void

Defined in

packages/find-replace/src/services/find-replace.service.ts:143 (opens in a new tab)


start()

start(revealReplace?): boolean

Start a find & replace session.

Parameters

ParameterType
revealReplace?boolean

Returns

boolean

execution result

Defined in

packages/find-replace/src/services/find-replace.service.ts:129 (opens in a new tab)


terminate()

terminate(): void

Terminate a find session and clear all caches.

Returns

void

Defined in

packages/find-replace/src/services/find-replace.service.ts:134 (opens in a new tab)


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