UNPKG

@finos/legend-application

Version:
89 lines 3.72 kB
/** * Copyright (c) 2020-present, Goldman Sachs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import type { GenericLegendApplicationStore } from './ApplicationStore.js'; import { type MarkdownText, ActionState, FuzzySearchAdvancedConfigState, type DocumentationEntry } from '@finos/legend-shared'; export declare enum VIRTUAL_ASSISTANT_TAB { SEARCH = "SEARCH", CONTEXTUAL_SUPPORT = "CONTEXTUAL_SUPPORT" } export declare const DOCUMENTATION_SEARCH_RESULTS_LIMIT = 100; export declare class VirtualAssistantDocumentationEntry { uuid: string; documentationKey: string; title: string; content?: string | MarkdownText | undefined; url?: string | undefined; isOpen: boolean; constructor(docEntry: DocumentationEntry); setIsOpen(val: boolean): void; } export declare class VirtualAssistantContextualDocumentationEntry { uuid: string; context: string; title?: string | undefined; content?: string | MarkdownText | undefined; url?: string | undefined; related: VirtualAssistantDocumentationEntry[]; constructor(context: string, docEntry: DocumentationEntry, related: VirtualAssistantDocumentationEntry[]); } /** * NOTE: since we're displaying the documentation entry in virtual assistant * we want only user-friendly docs, we will discard anything that doesn't * come with a title, or does not have any content/url */ export declare const isValidVirtualAssistantDocumentationEntry: (entry: DocumentationEntry) => boolean; /** * Check if the documentation entry should be displayed in virtual assistant, * i.e. it has some text content, rather just a link */ export declare const shouldDisplayVirtualAssistantDocumentationEntry: (entry: DocumentationEntry) => boolean; export declare class AssistantService { readonly applicationStore: GenericLegendApplicationStore; /** * This key is used to allow programmatic re-rendering of the assistant panel */ panelRenderingKey: string; isDisabled: boolean; isHidden: boolean; isOpen: boolean; isPanelMaximized: boolean; selectedTab: string; currentDocumentationEntry: VirtualAssistantDocumentationEntry | undefined; private readonly searchEngine; searchConfigurationState: FuzzySearchAdvancedConfigState; readonly searchState: ActionState; searchText: string; searchResults: VirtualAssistantDocumentationEntry[]; showSearchConfigurationMenu: boolean; isOverSearchLimit: boolean; constructor(applicationStore: GenericLegendApplicationStore); get currentContextualDocumentationEntry(): VirtualAssistantContextualDocumentationEntry | undefined; openDocumentationEntry(key: string): void; openDocumentationEntryLink(key: string): void; setIsDisabled(val: boolean): void; setIsHidden(val: boolean): void; setIsPanelMaximized(val: boolean): void; hideAssistant(): void; toggleAssistant(): void; setIsOpen(val: boolean): void; setSelectedTab(val: string): void; refreshPanelRendering(): void; setSearchText(val: string): void; resetSearch(): void; search(): void; setShowSearchConfigurationMenu(val: boolean): void; } //# sourceMappingURL=AssistantService.d.ts.map