@docsvision/webclient
Version:
Type definitions for DocsVision WebClient scripts and extensions.
31 lines (30 loc) • 1.52 kB
TypeScript
import { GenModels } from '@docsvision/webclient/Generated/DocsVision.WebClient.Models';
import { Store, Event } from 'effector';
export interface ISearchInfo {
searchText: string;
searchContext: GenModels.SearchContextOption;
}
/** Интерфейс сервиса {@link $WebFrameSearchPanel}. */
export interface IWebFrameSearchPanel {
readonly $searchText: Store<string>;
readonly $availableContexts: Store<GenModels.SearchContextOption[]>;
readonly $searchContext: Store<GenModels.SearchContextOption>;
readonly $expanded: Store<boolean>;
readonly $visible: Store<boolean>;
readonly $searchResultsText: Store<string>;
readonly searchRequested: Event<ISearchInfo>;
setSearchText(text: string): void;
setSearchContext(context: GenModels.SearchContextOption): void;
setExpanded(expanded: boolean): void;
requestSearch(info?: ISearchInfo): void;
setAvailableContexts(contexts: GenModels.SearchContextOption[]): void;
enableContext(context: GenModels.SearchContextOption): void;
disableContext(context: GenModels.SearchContextOption): void;
setVisible(visible: boolean): void;
setSearchResultsText(text: string): void;
}
/** Предоставляет доступ к контролу WebFrameSearchPanel корневой разметки. */
export declare type $WebFrameSearchPanel = {
webFrameSearchPanel: IWebFrameSearchPanel;
};
export declare const $WebFrameSearchPanel: string | ((model?: $WebFrameSearchPanel) => IWebFrameSearchPanel);