@univerjs/find-replace v0.5.4


Class: FindReplaceModel

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

This class stores find replace results and provides methods to perform replace or something.

It only live through a find-replace session and would be disposed when the user close the find replace dialog (considered as session being terminated).

Extends

Constructors

new FindReplaceModel()

new FindReplaceModel(
   _state, 
   _providers, 
   _univerInstanceService): FindReplaceModel

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

Parameters

ParameterType
_stateFindReplaceState
_providersSet<IFindReplaceProvider>
_univerInstanceServiceIUniverInstanceService

Returns

FindReplaceModel

Overrides

Disposable.constructor

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseDisposable._disposedsubmodules/univer/packages/core/src/shared/lifecycle.ts:96
currentMatch$readonlyBehaviorSubject<Nullable<IFindMatch>>undefined-submodules/univer/packages/find-replace/src/services/find-replace.service.ts:197
replaceables$readonlyBehaviorSubject<IReplaceableMatch[]>undefined-submodules/univer/packages/find-replace/src/services/find-replace.service.ts:198

Accessors

searched

Get Signature

get searched(): boolean

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

Returns

boolean

Methods

dispose()

dispose(): void

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

Returns

void

Overrides

Disposable.dispose


disposeWithMe()

disposeWithMe(disposable): IDisposable

Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:99

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe


ensureNotDisposed()

protected ensureNotDisposed(): void

Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:103

Returns

void

Inherited from

Disposable.ensureNotDisposed


getCurrentMatch()

getCurrentMatch(): Nullable<IFindMatch>

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

Returns

Nullable<IFindMatch>


moveToNextMatch()

moveToNextMatch(): undefined | null | IFindMatch

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

Returns

undefined | null | IFindMatch


moveToPreviousMatch()

moveToPreviousMatch(): undefined | null | IFindMatch

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

Returns

undefined | null | IFindMatch


replace()

replace(): Promise<boolean>

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

Returns

Promise<boolean>


replaceAll()

replaceAll(): Promise<IReplaceAllResult>

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

Returns

Promise<IReplaceAllResult>


start()

start(): Promise<IFindComplete>

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

Returns

Promise<IFindComplete>