UNPKG

1.92 kBTypeScriptView Raw
1import React = require('react');
2import { CommandRegistry } from '../../common';
3import { ContextKeyService } from '../context-key-service';
4import { TreeModel } from './tree-model';
5import { TreeWidget } from './tree-widget';
6import { WindowService } from '../window/window-service';
7interface ViewWelcome {
8 readonly view: string;
9 readonly content: string;
10 readonly when?: string;
11 readonly order: number;
12}
13interface IItem {
14 readonly welcomeInfo: ViewWelcome;
15 visible: boolean;
16}
17interface ILink {
18 readonly label: string;
19 readonly href: string;
20 readonly title?: string;
21}
22declare type LinkedTextItem = string | ILink;
23export declare class TreeViewWelcomeWidget extends TreeWidget {
24 protected readonly commands: CommandRegistry;
25 protected readonly contextService: ContextKeyService;
26 protected readonly windowService: WindowService;
27 protected viewWelcomeNodes: React.ReactNode[];
28 protected defaultItem: IItem | undefined;
29 protected items: IItem[];
30 get visibleItems(): ViewWelcome[];
31 protected renderTree(model: TreeModel): React.ReactNode;
32 protected shouldShowWelcomeView(): boolean;
33 protected renderViewWelcome(): React.ReactNode;
34 handleViewWelcomeContentChange(viewWelcomes: ViewWelcome[]): void;
35 handleWelcomeContextChange(): void;
36 protected updateViewWelcomeNodes(): void;
37 protected renderButtonNode(node: ILink, lineKey: string): React.ReactNode;
38 protected renderTextNode(node: string, textKey: string): React.ReactNode;
39 protected renderCommandLinkNode(node: ILink, linkKey: string): React.ReactNode;
40 protected getLinkClassName(href: string): string;
41 protected isEnabledClick(href: string): boolean;
42 protected openLinkOrCommand: (event: React.MouseEvent, href: string) => void;
43 protected parseLinkedText(text: string): LinkedTextItem[];
44}
45export {};
46//# sourceMappingURL=tree-view-welcome-widget.d.ts.map
\No newline at end of file