Skip to main content

Interface: ISearchService

services.ISearchService

Hierarchy

Table of contents

Properties

Methods

Properties

setReplaceValue

setReplaceValue: (value?: string) => void

Type declaration

▸ (value?): void

Set replace value for replace input

Parameters
NameType
value?string
Returns

void

Defined in

src/services/workbench/searchService.ts:20


setResult

setResult: (value?: ITreeNodeItemProps\<any>[]) => void

Type declaration

▸ (value?): void

Set result data for searching result

Parameters
NameType
value?ITreeNodeItemProps\<any>[]
Returns

void

Defined in

src/services/workbench/searchService.ts:24


setSearchValue

setSearchValue: (value?: string) => void

Type declaration

▸ (value?): void

Set search value for search input

Parameters
NameType
value?string
Returns

void

Defined in

src/services/workbench/searchService.ts:16


setValidateInfo

setValidateInfo: (info: undefined | string | { text: string ; type: "error" | "warning" | "info" }) => void

Type declaration

▸ (info): void

Set informations about validating,

Parameters
NameTypeDescription
infoundefined | string | { text: string ; type: "error" | "warning" | "info" }If provided a string, molecule will set it type as info
Returns

void

Defined in

src/services/workbench/searchService.ts:12


state

Protected Abstract state: ISearchProps

Inherited from

Component.state

Defined in

src/react/component.ts:44


toggleCaseSensitive

toggleCaseSensitive: () => void

Type declaration

▸ (): void

Toggle the rule for case senstitive when searching

Returns

void

Defined in

src/services/workbench/searchService.ts:32


toggleMode

toggleMode: (status: boolean) => void

Type declaration

▸ (status): void

Toggle search mode, true for replace mode

Parameters
NameType
statusboolean
Returns

void

Defined in

src/services/workbench/searchService.ts:28


togglePreserveCase

togglePreserveCase: () => void

Type declaration

▸ (): void

Toggle the rule for preserving case when replacing

Returns

void

Defined in

src/services/workbench/searchService.ts:44


toggleRegex

toggleRegex: () => void

Type declaration

▸ (): void

Toggle the rule for enabling regex when searching

Returns

void

Defined in

src/services/workbench/searchService.ts:40


toggleWholeWord

toggleWholeWord: () => void

Type declaration

▸ (): void

Toggle the rule for finding whole word when searching

Returns

void

Defined in

src/services/workbench/searchService.ts:36


updateStatus

updateStatus: (addonId: string, checked: boolean) => void

Type declaration

▸ (addonId, checked): void

Update the status of specific addon icon to checked

Parameters
NameType
addonIdstring
checkedboolean
Returns

void

Defined in

src/services/workbench/searchService.ts:48

Methods

onChange

onChange(callback): void

Listen to the event about the value of search input changed

Parameters

NameType
callback(value: string, replaceValue: string) => void

Returns

void

Defined in

src/services/workbench/searchService.ts:56


onReplaceAll

onReplaceAll(callback): void

Listen to the event about replace all text in result

Parameters

NameType
callback() => void

Returns

void

Defined in

src/services/workbench/searchService.ts:75


onResultClick

onResultClick(callback): void

Listen to the click event in result data

Parameters

NameType
callback(item: ITreeNodeItemProps\<any>, resultData: ITreeNodeItemProps\<any>[]) => void

Returns

void

Defined in

src/services/workbench/searchService.ts:79


onSearch

onSearch(callback): void

Listen to the event about going to search result via values or config changed

Parameters

NameType
callback(value: string, replaceValue: string, config: { isCaseSensitive: boolean ; isRegex: boolean ; isWholeWords: boolean ; preserveCase: boolean }) => void

Returns

void

Defined in

src/services/workbench/searchService.ts:60


reset

reset(): void

Reset the search input data

Returns

void

Defined in

src/services/workbench/searchService.ts:52


subscribe

subscribe(name, listener): void

Subscribe the service event

Parameters

NameTypeDescription
namestring | string[]Event name
listenerFunctionListener function

Returns

void

Inherited from

Component.subscribe

Defined in

src/common/event/eventBus.ts:11


unsubscribe

unsubscribe(name, listener?): void

Unsubscribe the specific event and the listener function

Parameters

NameTypeDescription
nameanyThe event name
listener?Functionoptional, it unsubscribes events via name if not pass the listener function

Returns

void

Inherited from

Component.unsubscribe

Defined in

src/common/event/eventBus.ts:39