@univerjs/find-replace v0.5.0-beta.1 • Docs


Interface: IFindReplaceService

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

Properties

PropertyModifierTypeDescriptionDefined in
currentMatch$readonlyObservable<Nullable<IFindMatch<unknown>>>-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

Parameters

ParameterType
sensitiveboolean

Returns

void

Defined in

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


changeFindBy()

changeFindBy(findBy): void

Parameters

ParameterType
findByFindBy

Returns

void

Defined in

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


changeFindDirection()

changeFindDirection(direction): void

Parameters

ParameterType
directionFindDirection

Returns

void

Defined in

submodules/univer/packages/find-replace/src/services/find-replace.service.ts:150


changeFindScope()

changeFindScope(scope): void

Parameters

ParameterType
scopeFindScope

Returns

void

Defined in

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


changeFindString()

changeFindString(value): void

Parameters

ParameterType
valuestring

Returns

void

Defined in

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


changeInputtingFindString()

changeInputtingFindString(value): void

Parameters

ParameterType
valuestring

Returns

void

Defined in

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


changeMatchesTheWholeCell()

changeMatchesTheWholeCell(wholeCell): void

Parameters

ParameterType
wholeCellboolean

Returns

void

Defined in

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


changeReplaceString()

changeReplaceString(value): void

Parameters

ParameterType
valuestring

Returns

void

Defined in

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


find()

find(): void

Start searching with the current conditions.

Returns

void

Defined in

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


focusFindInput()

focusFindInput(): void

Returns

void

Defined in

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


getFindString()

getFindString(): string

Get find string from the internal state.

Returns

string

Defined in

submodules/univer/packages/find-replace/src/services/find-replace.service.ts:122


moveToNextMatch()

moveToNextMatch(): void

Returns

void

Defined in

submodules/univer/packages/find-replace/src/services/find-replace.service.ts:153


moveToPreviousMatch()

moveToPreviousMatch(): void

Returns

void

Defined in

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


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

submodules/univer/packages/find-replace/src/services/find-replace.service.ts:117


replace()

replace(): Promise<boolean>

Returns

Promise<boolean>

Defined in

submodules/univer/packages/find-replace/src/services/find-replace.service.ts:156


replaceAll()

replaceAll(): Promise<IReplaceAllResult>

Returns

Promise<IReplaceAllResult>

Defined in

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


revealReplace()

revealReplace(): void

Returns

void

Defined in

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


start()

start(revealReplace?): boolean

Start a find & replace session.

Parameters

ParameterType
revealReplace?boolean

Returns

boolean

execution result

Defined in

submodules/univer/packages/find-replace/src/services/find-replace.service.ts:129


terminate()

terminate(): void

Terminate a find session and clear all caches.

Returns

void

Defined in

submodules/univer/packages/find-replace/src/services/find-replace.service.ts:134