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
Property | Modifier | Type | Description | Defined in |
---|---|---|---|---|
currentMatch$ | readonly | Observable <Nullable <IFindMatch >> | - | submodules/univer/packages/find-replace/src/services/find-replace.service.ts:102 |
focusSignal$ | readonly | Observable <void > | - | submodules/univer/packages/find-replace/src/services/find-replace.service.ts:106 |
replaceables$ | readonly | Observable <IReplaceableMatch []> | An observable value of all matches those could be replaced. | submodules/univer/packages/find-replace/src/services/find-replace.service.ts:104 |
replaceRevealed | readonly | boolean | - | submodules/univer/packages/find-replace/src/services/find-replace.service.ts:109 |
revealed | readonly | boolean | - | submodules/univer/packages/find-replace/src/services/find-replace.service.ts:108 |
state$ | readonly | Observable <IFindReplaceState > | - | submodules/univer/packages/find-replace/src/services/find-replace.service.ts:100 |
stateUpdates$ | readonly | Observable <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
Parameter | Type |
---|---|
sensitive | boolean |
Returns
void
changeFindBy()
changeFindBy(findBy): void
Defined in: submodules/univer/packages/find-replace/src/services/find-replace.service.ts:149
Parameters
Parameter | Type |
---|---|
findBy | FindBy |
Returns
void
changeFindDirection()
changeFindDirection(direction): void
Defined in: submodules/univer/packages/find-replace/src/services/find-replace.service.ts:148
Parameters
Parameter | Type |
---|---|
direction | FindDirection |
Returns
void
changeFindScope()
changeFindScope(scope): void
Defined in: submodules/univer/packages/find-replace/src/services/find-replace.service.ts:147
Parameters
Parameter | Type |
---|---|
scope | FindScope |
Returns
void
changeFindString()
changeFindString(value): void
Defined in: submodules/univer/packages/find-replace/src/services/find-replace.service.ts:142
Parameters
Parameter | Type |
---|---|
value | string |
Returns
void
changeInputtingFindString()
changeInputtingFindString(value): void
Defined in: submodules/univer/packages/find-replace/src/services/find-replace.service.ts:143
Parameters
Parameter | Type |
---|---|
value | string |
Returns
void
changeMatchesTheWholeCell()
changeMatchesTheWholeCell(wholeCell): void
Defined in: submodules/univer/packages/find-replace/src/services/find-replace.service.ts:146
Parameters
Parameter | Type |
---|---|
wholeCell | boolean |
Returns
void
changeReplaceString()
changeReplaceString(value): void
Defined in: submodules/univer/packages/find-replace/src/services/find-replace.service.ts:144
Parameters
Parameter | Type |
---|---|
value | string |
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
Parameter | Type | Description |
---|---|---|
provider | IFindReplaceProvider | the find replace provider |
Returns
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
Parameter | Type |
---|---|
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