@univerjs/find-replace v0.5.4


Interface: IFindReplaceService

Defined in: submodules/univer/packages/find-replace/src/services/find-replace.service.ts:98

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

Properties

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

Methods

changeCaseSensitive()

changeCaseSensitive(sensitive): void

Defined in: submodules/univer/packages/find-replace/src/services/find-replace.service.ts:145

Parameters

ParameterType
sensitiveboolean

Returns

void


changeFindBy()

changeFindBy(findBy): void

Defined in: submodules/univer/packages/find-replace/src/services/find-replace.service.ts:149

Parameters

ParameterType
findByFindBy

Returns

void


changeFindDirection()

changeFindDirection(direction): void

Defined in: submodules/univer/packages/find-replace/src/services/find-replace.service.ts:148

Parameters

ParameterType
directionFindDirection

Returns

void


changeFindScope()

changeFindScope(scope): void

Defined in: submodules/univer/packages/find-replace/src/services/find-replace.service.ts:147

Parameters

ParameterType
scopeFindScope

Returns

void


changeFindString()

changeFindString(value): void

Defined in: submodules/univer/packages/find-replace/src/services/find-replace.service.ts:142

Parameters

ParameterType
valuestring

Returns

void


changeInputtingFindString()

changeInputtingFindString(value): void

Defined in: submodules/univer/packages/find-replace/src/services/find-replace.service.ts:143

Parameters

ParameterType
valuestring

Returns

void


changeMatchesTheWholeCell()

changeMatchesTheWholeCell(wholeCell): void

Defined in: submodules/univer/packages/find-replace/src/services/find-replace.service.ts:146

Parameters

ParameterType
wholeCellboolean

Returns

void


changeReplaceString()

changeReplaceString(value): void

Defined in: submodules/univer/packages/find-replace/src/services/find-replace.service.ts:144

Parameters

ParameterType
valuestring

Returns

void


find()

find(): void

Defined in: submodules/univer/packages/find-replace/src/services/find-replace.service.ts:137

Start searching with the current conditions.

Returns

void


focusFindInput()

focusFindInput(): void

Defined in: submodules/univer/packages/find-replace/src/services/find-replace.service.ts:139

Returns

void


getFindString()

getFindString(): string

Defined in: submodules/univer/packages/find-replace/src/services/find-replace.service.ts:121

Get find string from the internal state.

Returns

string


getProviders()

getProviders(): Set<IFindReplaceProvider>

Defined in: submodules/univer/packages/find-replace/src/services/find-replace.service.ts:157

Returns

Set<IFindReplaceProvider>


moveToNextMatch()

moveToNextMatch(): void

Defined in: submodules/univer/packages/find-replace/src/services/find-replace.service.ts:151

Returns

void


moveToPreviousMatch()

moveToPreviousMatch(): void

Defined in: submodules/univer/packages/find-replace/src/services/find-replace.service.ts:152

Returns

void


registerFindReplaceProvider()

registerFindReplaceProvider(provider): IDisposable

Defined in: submodules/univer/packages/find-replace/src/services/find-replace.service.ts:116

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


replace()

replace(): Promise<boolean>

Defined in: submodules/univer/packages/find-replace/src/services/find-replace.service.ts:154

Returns

Promise<boolean>


replaceAll()

replaceAll(): Promise<IReplaceAllResult>

Defined in: submodules/univer/packages/find-replace/src/services/find-replace.service.ts:155

Returns

Promise<IReplaceAllResult>


revealReplace()

revealReplace(): void

Defined in: submodules/univer/packages/find-replace/src/services/find-replace.service.ts:141

Returns

void


start()

start(revealReplace?): boolean

Defined in: submodules/univer/packages/find-replace/src/services/find-replace.service.ts:127

Start a find & replace session.

Parameters

ParameterType
revealReplace?boolean

Returns

boolean

execution result


terminate()

terminate(): void

Defined in: submodules/univer/packages/find-replace/src/services/find-replace.service.ts:132

Terminate a find session and clear all caches.

Returns

void