import { TreeViewsExt, TreeViewItem, TreeViewItemReference, ThemeIcon } from '../../../common/plugin-api-rpc'; import { Command } from '../../../common/plugin-api-rpc-model'; import { TreeNode, NodeProps, SelectableTreeNode, ExpandableTreeNode, CompositeTreeNode, TreeImpl, TreeModelImpl, TreeViewWelcomeWidget, HoverService, ApplicationShell, KeybindingRegistry } from '@theia/core/lib/browser'; import { MenuPath, MenuModelRegistry, CommandMenu } from '@theia/core/lib/common/menu'; import * as React from '@theia/core/shared/react'; import { PluginSharedStyle } from '../plugin-shared-style'; import { Widget } from '@theia/core/lib/browser/widgets/widget'; import { Emitter, Event } from '@theia/core/lib/common/event'; import { MessageService } from '@theia/core/lib/common/message-service'; import { View } from '../../../common/plugin-protocol'; import { ContextKeyService } from '@theia/core/lib/browser/context-key-service'; import { MarkdownString } from '@theia/core/lib/common/markdown-rendering'; import { AccessibilityInformation } from '@theia/plugin'; import { ColorRegistry } from '@theia/core/lib/browser/color-registry'; import { DecoratedTreeNode } from '@theia/core/lib/browser/tree/tree-decorator'; import { WidgetDecoration } from '@theia/core/lib/browser/widget-decoration'; import { CancellationToken, Mutable } from '@theia/core/lib/common'; import { DnDFileContentStore } from './dnd-file-content-store'; export declare const TREE_NODE_HYPERLINK = "theia-TreeNodeHyperlink"; export declare const VIEW_ITEM_CONTEXT_MENU: MenuPath; export declare const VIEW_ITEM_INLINE_MENU: MenuPath; export interface SelectionEventHandler { readonly node: SelectableTreeNode; readonly contextSelection: boolean; } export interface TreeViewNode extends SelectableTreeNode, DecoratedTreeNode { contextValue?: string; command?: Command; resourceUri?: string; themeIcon?: ThemeIcon; tooltip?: string | MarkdownString; description?: string | boolean | any; accessibilityInformation?: AccessibilityInformation; } export declare namespace TreeViewNode { function is(arg: TreeNode | undefined): arg is TreeViewNode; } export declare class ResolvableTreeViewNode implements TreeViewNode { contextValue?: string; command?: Command; resourceUri?: string; themeIcon?: ThemeIcon; tooltip?: string | MarkdownString; description?: string | boolean | any; accessibilityInformation?: AccessibilityInformation; selected: boolean; focus?: boolean; id: string; name?: string; icon?: string; visible?: boolean; parent: Readonly; previousSibling?: TreeNode; nextSibling?: TreeNode; busy?: number; decorationData: WidgetDecoration.Data; resolve: ((token: CancellationToken) => Promise); private _resolved; private resolving; constructor(treeViewNode: Partial, resolve: (token: CancellationToken) => Promise); reset(): void; get resolved(): boolean; } export declare class ResolvableCompositeTreeViewNode extends ResolvableTreeViewNode implements CompositeTreeViewNode { expanded: boolean; children: readonly TreeNode[]; constructor(treeViewNode: Pick & Partial, resolve: (token: CancellationToken) => Promise); } export interface CompositeTreeViewNode extends TreeViewNode, ExpandableTreeNode, CompositeTreeNode { description?: string | boolean | any; } export declare namespace CompositeTreeViewNode { function is(arg: TreeNode | undefined): arg is CompositeTreeViewNode; } export declare class TreeViewWidgetOptions { id: string; manageCheckboxStateManually: boolean | undefined; showCollapseAll: boolean | undefined; multiSelect: boolean | undefined; dragMimeTypes: string[] | undefined; dropMimeTypes: string[] | undefined; } export declare class PluginTree extends TreeImpl { protected readonly sharedStyle: PluginSharedStyle; protected readonly options: TreeViewWidgetOptions; protected readonly notification: MessageService; protected readonly onDidChangeWelcomeStateEmitter: Emitter; readonly onDidChangeWelcomeState: Event; private _proxy; private _viewInfo; private _isEmpty; private _hasTreeItemResolve; set proxy(proxy: TreeViewsExt | undefined); get proxy(): TreeViewsExt | undefined; get hasTreeItemResolve(): Promise; set viewInfo(viewInfo: View); get isEmpty(): boolean; protected resolveChildren(parent: CompositeTreeNode): Promise; protected fetchChildren(proxy: TreeViewsExt, parent: CompositeTreeNode): Promise; protected createTreeNode(item: TreeViewItem, parent: CompositeTreeNode): TreeNode; markAsChecked(node: Mutable, checked: boolean): void; /** Creates a resolvable tree node. If a node already exists, reset it because the underlying TreeViewItem might have been disposed in the backend. */ protected createResolvableTreeNode(item: TreeViewItem, parent: CompositeTreeNode): TreeNode; protected createTreeNodeUpdate(item: TreeViewItem): Partial; protected toDecorationData(item: TreeViewItem): WidgetDecoration.Data; protected toIconClass(item: TreeViewItem): string | undefined; } export declare class PluginTreeModel extends TreeModelImpl { protected readonly tree: PluginTree; set proxy(proxy: TreeViewsExt | undefined); get proxy(): TreeViewsExt | undefined; get hasTreeItemResolve(): Promise; set viewInfo(viewInfo: View); get isTreeEmpty(): boolean; get onDidChangeWelcomeState(): Event; doOpenNode(node: TreeNode): void; } export declare class TreeViewWidget extends TreeViewWelcomeWidget { refresh(items?: string[]): Promise; protected _contextSelection: boolean; protected readonly applicationShell: ApplicationShell; protected readonly menus: MenuModelRegistry; protected readonly keybindings: KeybindingRegistry; protected readonly contextKeys: ContextKeyService; readonly options: TreeViewWidgetOptions; readonly model: PluginTreeModel; protected readonly contextKeyService: ContextKeyService; protected readonly hoverService: HoverService; protected readonly colorRegistry: ColorRegistry; protected readonly dndFileContentStore: DnDFileContentStore; protected treeDragType: string; protected readonly expansionTimeouts: Map; protected init(): void; get showCollapseAll(): boolean; protected renderIcon(node: TreeNode, props: NodeProps): React.ReactNode; protected renderCaption(node: TreeViewNode, props: NodeProps): React.ReactNode; protected createNodeAttributes(node: TreeViewNode, props: NodeProps): React.Attributes & React.HTMLAttributes; handleDragLeave(node: TreeViewNode, event: React.DragEvent): void; handleDragEnter(node: TreeViewNode, event: React.DragEvent): void; protected createContainerAttributes(): React.HTMLAttributes; protected handleDragStartEvent(node: TreeViewNode, event: React.DragEvent): void; handleDragEnd(node: TreeViewNode, event: React.DragEvent): void; handleDragOver(event: React.DragEvent): void; protected handleDropEvent(node: TreeViewNode | undefined, event: React.DragEvent): void; protected renderTailDecorations(treeViewNode: TreeViewNode, props: NodeProps): React.ReactNode; toTreeViewItemReference(treeNode: TreeNode): TreeViewItemReference; protected resolveKeybindingForCommand(command: string | undefined): string; protected renderInlineCommand(actionMenuNode: CommandMenu, index: number, tabbable: boolean, args: any[]): React.ReactNode; protected toContextMenuArgs(target: SelectableTreeNode): [TreeViewItemReference, TreeViewItemReference[]] | [TreeViewItemReference]; setFlag(flag: Widget.Flag): void; clearFlag(flag: Widget.Flag): void; handleEnter(event: KeyboardEvent): void; protected tapNode(node?: TreeNode): void; protected tryExecuteCommand(node?: TreeNode): Promise; protected tryExecuteCommandMap(commandMap: Map): void; protected findCommands(node?: TreeNode): Promise>; private _message; get message(): string | undefined; set message(message: string | undefined); protected render(): React.ReactNode; protected renderSearchInfo(): React.ReactNode; shouldShowWelcomeView(): boolean; protected handleContextMenuEvent(node: TreeNode | undefined, event: React.MouseEvent): void; } //# sourceMappingURL=tree-view-widget.d.ts.map