mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-27 23:30:30 -04:00
Merge VS Code 1.31.1 (#4283)
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as WinJS from 'vs/base/common/winjs.base';
|
||||
import * as Touch from 'vs/base/browser/touch';
|
||||
import * as Mouse from 'vs/base/browser/mouseEvent';
|
||||
import * as Keyboard from 'vs/base/browser/keyboardEvent';
|
||||
@@ -13,6 +12,7 @@ import { Event } from 'vs/base/common/event';
|
||||
import { IAction, IActionItem } from 'vs/base/common/actions';
|
||||
import { Color } from 'vs/base/common/color';
|
||||
import { IItemCollapseEvent, IItemExpandEvent } from 'vs/base/parts/tree/browser/treeModel';
|
||||
import { IDragAndDropData } from 'vs/base/browser/dnd';
|
||||
|
||||
export interface ITree {
|
||||
|
||||
@@ -50,7 +50,7 @@ export interface ITree {
|
||||
/**
|
||||
* Sets the input of the tree.
|
||||
*/
|
||||
setInput(element: any): WinJS.Promise;
|
||||
setInput(element: any): Promise<any>;
|
||||
|
||||
/**
|
||||
* Returns the tree's input.
|
||||
@@ -76,47 +76,42 @@ export interface ITree {
|
||||
* Refreshes an element.
|
||||
* Provide no arguments and it will refresh the input element.
|
||||
*/
|
||||
refresh(element?: any, recursive?: boolean): WinJS.Promise;
|
||||
|
||||
/**
|
||||
* Updates an element's width.
|
||||
*/
|
||||
updateWidth(element: any): void;
|
||||
refresh(element?: any, recursive?: boolean): Promise<any>;
|
||||
|
||||
/**
|
||||
* Expands an element.
|
||||
* The returned promise returns a boolean for whether the element was expanded or not.
|
||||
*/
|
||||
expand(element: any): WinJS.Promise;
|
||||
expand(element: any): Promise<any>;
|
||||
|
||||
/**
|
||||
* Expands several elements.
|
||||
* The returned promise returns a boolean array for whether the elements were expanded or not.
|
||||
*/
|
||||
expandAll(elements?: any[]): WinJS.Promise;
|
||||
expandAll(elements?: any[]): Promise<any>;
|
||||
|
||||
/**
|
||||
* Collapses an element.
|
||||
* The returned promise returns a boolean for whether the element was collapsed or not.
|
||||
*/
|
||||
collapse(element: any, recursive?: boolean): WinJS.Promise;
|
||||
collapse(element: any, recursive?: boolean): Promise<any>;
|
||||
|
||||
/**
|
||||
* Collapses several elements.
|
||||
* Provide no arguments and it will recursively collapse all elements in the tree
|
||||
* The returned promise returns a boolean for whether the elements were collapsed or not.
|
||||
*/
|
||||
collapseAll(elements?: any[], recursive?: boolean): WinJS.Promise;
|
||||
collapseAll(elements?: any[], recursive?: boolean): Promise<any>;
|
||||
|
||||
/**
|
||||
* Toggles an element's expansion state.
|
||||
*/
|
||||
toggleExpansion(element: any, recursive?: boolean): WinJS.Promise;
|
||||
toggleExpansion(element: any, recursive?: boolean): Promise<any>;
|
||||
|
||||
/**
|
||||
* Toggles several element's expansion state.
|
||||
*/
|
||||
toggleExpansionAll(elements: any[]): WinJS.Promise;
|
||||
toggleExpansionAll(elements: any[]): Promise<any>;
|
||||
|
||||
/**
|
||||
* Returns whether an element is expanded or not.
|
||||
@@ -132,7 +127,7 @@ export interface ITree {
|
||||
* Reveals an element in the tree. The relativeTop is a value between 0 and 1. The closer to 0 the more the
|
||||
* element will scroll up to the top.
|
||||
*/
|
||||
reveal(element: any, relativeTop?: number): WinJS.Promise;
|
||||
reveal(element: any, relativeTop?: number): Promise<any>;
|
||||
|
||||
/**
|
||||
* Returns the relative top position of any given element, if visible.
|
||||
@@ -378,12 +373,12 @@ export interface IDataSource {
|
||||
/**
|
||||
* Returns the element's children as an array in a promise.
|
||||
*/
|
||||
getChildren(tree: ITree, element: any): WinJS.Promise;
|
||||
getChildren(tree: ITree, element: any): Promise<any>;
|
||||
|
||||
/**
|
||||
* Returns the element's parent in a promise.
|
||||
*/
|
||||
getParent(tree: ITree, element: any): WinJS.Promise;
|
||||
getParent(tree: ITree, element: any): Promise<any>;
|
||||
|
||||
/**
|
||||
* Returns whether an element should be expanded when first added to the tree.
|
||||
@@ -443,7 +438,7 @@ export interface IAccessibilityProvider {
|
||||
*
|
||||
* See also: https://www.w3.org/TR/wai-aria/states_and_properties#aria-label
|
||||
*/
|
||||
getAriaLabel(tree: ITree, element: any): string;
|
||||
getAriaLabel(tree: ITree, element: any): string | null;
|
||||
|
||||
/**
|
||||
* Given an element in the tree return its aria-posinset. Should be between 1 and aria-setsize
|
||||
@@ -594,18 +589,13 @@ export const DRAG_OVER_ACCEPT_BUBBLE_DOWN = (autoExpand = false) => ({ accept: t
|
||||
export const DRAG_OVER_ACCEPT_BUBBLE_UP_COPY: IDragOverReaction = { accept: true, bubble: DragOverBubble.BUBBLE_UP, effect: DragOverEffect.COPY };
|
||||
export const DRAG_OVER_ACCEPT_BUBBLE_DOWN_COPY = (autoExpand = false) => ({ accept: true, bubble: DragOverBubble.BUBBLE_DOWN, effect: DragOverEffect.COPY, autoExpand });
|
||||
|
||||
export interface IDragAndDropData {
|
||||
update(event: Mouse.DragMouseEvent): void;
|
||||
getData(): any;
|
||||
}
|
||||
|
||||
export interface IDragAndDrop {
|
||||
|
||||
/**
|
||||
* Returns a uri if the given element should be allowed to drag.
|
||||
* Returns null, otherwise.
|
||||
*/
|
||||
getDragURI(tree: ITree, element: any): string;
|
||||
getDragURI(tree: ITree, element: any): string | null;
|
||||
|
||||
/**
|
||||
* Returns a label to display when dragging the element.
|
||||
@@ -621,7 +611,7 @@ export interface IDragAndDrop {
|
||||
* Returns a DragOverReaction indicating whether sources can be
|
||||
* dropped into target or some parent of the target.
|
||||
*/
|
||||
onDragOver(tree: ITree, data: IDragAndDropData, targetElement: any, originalEvent: Mouse.DragMouseEvent): IDragOverReaction;
|
||||
onDragOver(tree: ITree, data: IDragAndDropData, targetElement: any, originalEvent: Mouse.DragMouseEvent): IDragOverReaction | null;
|
||||
|
||||
/**
|
||||
* Handles the action of dropping sources into target.
|
||||
@@ -754,5 +744,5 @@ export interface IActionProvider {
|
||||
/**
|
||||
* Returns an action item to render an action.
|
||||
*/
|
||||
getActionItem(tree: ITree, element: any, action: IAction): IActionItem;
|
||||
getActionItem(tree: ITree, element: any, action: IAction): IActionItem | null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user