@univerjs/find-replace v0.5.0-beta.1 • Docs
Interface: IFindReplaceService
This service works as a core of the find & replace feature.
Properties
Property | Modifier | Type | Description | Defined in |
---|---|---|---|---|
currentMatch$ | readonly | Observable <Nullable <IFindMatch <unknown >>> | - | 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
Parameters
Parameter | Type |
---|---|
sensitive | boolean |
Returns
void
Defined in
submodules/univer/packages/find-replace/src/services/find-replace.service.ts:147
changeFindBy()
changeFindBy(findBy): void
Parameters
Parameter | Type |
---|---|
findBy | FindBy |
Returns
void
Defined in
submodules/univer/packages/find-replace/src/services/find-replace.service.ts:151
changeFindDirection()
changeFindDirection(direction): void
Parameters
Parameter | Type |
---|---|
direction | FindDirection |
Returns
void
Defined in
submodules/univer/packages/find-replace/src/services/find-replace.service.ts:150
changeFindScope()
changeFindScope(scope): void
Parameters
Parameter | Type |
---|---|
scope | FindScope |
Returns
void
Defined in
submodules/univer/packages/find-replace/src/services/find-replace.service.ts:149
changeFindString()
changeFindString(value): void
Parameters
Parameter | Type |
---|---|
value | string |
Returns
void
Defined in
submodules/univer/packages/find-replace/src/services/find-replace.service.ts:144
changeInputtingFindString()
changeInputtingFindString(value): void
Parameters
Parameter | Type |
---|---|
value | string |
Returns
void
Defined in
submodules/univer/packages/find-replace/src/services/find-replace.service.ts:145
changeMatchesTheWholeCell()
changeMatchesTheWholeCell(wholeCell): void
Parameters
Parameter | Type |
---|---|
wholeCell | boolean |
Returns
void
Defined in
submodules/univer/packages/find-replace/src/services/find-replace.service.ts:148
changeReplaceString()
changeReplaceString(value): void
Parameters
Parameter | Type |
---|---|
value | string |
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
Parameter | Type | Description |
---|---|---|
provider | IFindReplaceProvider | the find replace provider |
Returns
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
Parameter | Type |
---|---|
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