UNPKG

@finos/legend-application-studio

Version:
77 lines 3.63 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 GeneratorFn, ActionState } from '@finos/legend-shared'; import { type Showcase, type ShowcaseMetadata, type ShowcaseTextSearchMatch } from '@finos/legend-server-showcase'; import type { LegendStudioApplicationStore } from './LegendStudioBaseStore.js'; import { ApplicationExtensionState, type GenericLegendApplicationStore } from '@finos/legend-application'; import type { TreeData, TreeNodeData } from '@finos/legend-art'; export declare enum SHOWCASE_MANAGER_VIEW { EXPLORER = "EXPLORER", SEARCH = "SEARCH" } export declare enum SHOWCASE_MANAGER_SEARCH_CATEGORY { SHOWCASE = "SHOWCASE", CODE = "CODE" } export declare class ShowcasesExplorerTreeNodeData implements TreeNodeData { isOpen?: boolean | undefined; id: string; label: string; parentId?: string | undefined; childrenIds: string[]; metadata?: ShowcaseMetadata | undefined; constructor(id: string, label: string, parentId: string | undefined, metadata?: ShowcaseMetadata | undefined); } export type ShowcaseTextSearchMatchResult = { match: ShowcaseTextSearchMatch; showcase: ShowcaseMetadata; }; export declare class ShowcaseManagerState extends ApplicationExtensionState { private static readonly IDENTIFIER; readonly applicationStore: LegendStudioApplicationStore; readonly initState: ActionState; readonly fetchShowcaseState: ActionState; readonly textSearchState: ActionState; private readonly showcaseServerClient?; allShowcases: ShowcaseMetadata[] | undefined; currentShowcase?: Showcase | undefined; showcaseLineToScroll?: number | undefined; currentView: SHOWCASE_MANAGER_VIEW; explorerTreeData?: TreeData<ShowcasesExplorerTreeNodeData> | undefined; searchText: string; showcaseSearchResults?: ShowcaseMetadata[] | undefined; textSearchResults?: ShowcaseTextSearchMatchResult[] | undefined; currentSearchCaterogy: SHOWCASE_MANAGER_SEARCH_CATEGORY; constructor(applicationStore: LegendStudioApplicationStore); get INTERNAL__identifierKey(): string; get nonDevShowcases(): ShowcaseMetadata[]; static retrieveNullableState(applicationStore: GenericLegendApplicationStore): ShowcaseManagerState | undefined; static retrieveState(applicationStore: GenericLegendApplicationStore): ShowcaseManagerState; get isEnabled(): boolean; private get client(); setCurrentView(val: SHOWCASE_MANAGER_VIEW): void; openShowcase(metadata: ShowcaseMetadata, showcaseLineToScroll?: number | undefined): GeneratorFn<void>; logOpenManager(): void; closeShowcase(): void; setExplorerTreeData(val: TreeData<ShowcasesExplorerTreeNodeData>): void; setSearchText(val: string): void; resetSearch(): void; setCurrentSearchCategory(val: SHOWCASE_MANAGER_SEARCH_CATEGORY): void; initialize(): GeneratorFn<void>; search(): GeneratorFn<void>; } export declare const openShowcaseManager: (applicationStore: LegendStudioApplicationStore) => void; //# sourceMappingURL=ShowcaseManagerState.d.ts.map