mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
Vendored
+3
-1
@@ -1,5 +1,7 @@
|
||||
// Type definitions for Backbone 0.9
|
||||
// https://github.com/borisyankov/DefinitelyTyped
|
||||
// Project: http://backbonejs.org/
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
|
||||
declare module Backbone {
|
||||
|
||||
|
||||
Vendored
+175
-84
@@ -26,9 +26,7 @@ interface Widget {
|
||||
|
||||
// Accordion //////////////////////////////////////////////////
|
||||
|
||||
interface Accordion extends Widget {
|
||||
|
||||
// Options
|
||||
interface AccordionOptions {
|
||||
active?: any; // bool or number
|
||||
animate?: any; // bool, number, string or object
|
||||
collapsible?: bool;
|
||||
@@ -37,9 +35,11 @@ interface Accordion extends Widget {
|
||||
header?: any; // TODO: Selector
|
||||
heightStyle?: string;
|
||||
icons?: any;
|
||||
}
|
||||
|
||||
interface Accordion extends Widget {
|
||||
// Methods
|
||||
|
||||
|
||||
// Events
|
||||
activate(event: Event, ui): void;
|
||||
beforeActivate(event: Event, ui): void;
|
||||
@@ -49,9 +49,7 @@ interface Accordion extends Widget {
|
||||
|
||||
// Autocomplete //////////////////////////////////////////////////
|
||||
|
||||
interface Autocomplete extends Widget {
|
||||
|
||||
// Options
|
||||
interface AutocompleteOptions {
|
||||
appendTo?: any; //Selector;
|
||||
autoFocus?: bool;
|
||||
delay?: number;
|
||||
@@ -59,9 +57,12 @@ interface Autocomplete extends Widget {
|
||||
minLength?: number;
|
||||
position?: any; // TODO: JqueryPosition
|
||||
source?: any; // [], string or ()
|
||||
}
|
||||
|
||||
interface Autocomplete extends Widget {
|
||||
|
||||
// Methods
|
||||
close();
|
||||
close();
|
||||
search(value?: string);
|
||||
|
||||
// Events
|
||||
@@ -78,13 +79,14 @@ interface Autocomplete extends Widget {
|
||||
|
||||
// Button //////////////////////////////////////////////////
|
||||
|
||||
interface Button extends Widget {
|
||||
|
||||
// Options
|
||||
interface ButtonOptions {
|
||||
disabled?: bool;
|
||||
icons?: any;
|
||||
label?: string;
|
||||
text?: bool;
|
||||
}
|
||||
|
||||
interface Button extends Widget {
|
||||
|
||||
// Methods
|
||||
refresh();
|
||||
@@ -96,9 +98,7 @@ interface Button extends Widget {
|
||||
|
||||
// Datepicker //////////////////////////////////////////////////
|
||||
|
||||
interface Datepicker extends Widget {
|
||||
|
||||
// Options
|
||||
interface DatepickerOptions {
|
||||
altFieldType?: any; // Selecotr, jQuery or Element
|
||||
altFormat?: string;
|
||||
appendText?: string;
|
||||
@@ -149,10 +149,13 @@ interface Datepicker extends Widget {
|
||||
weekHeader?: string;
|
||||
yearRange?: string;
|
||||
yearSuffix?: string;
|
||||
}
|
||||
|
||||
interface Datepicker extends Widget {
|
||||
|
||||
// Methods
|
||||
destroy();
|
||||
dialog(date: any, onSelect?: () => void, settings?: any, pos?: any);
|
||||
dialog(date: any, onSelect?: () => void , settings?: any, pos?: any);
|
||||
getDate(): Date;
|
||||
hide(): void;
|
||||
isDisabled(): bool;
|
||||
@@ -166,9 +169,7 @@ interface Datepicker extends Widget {
|
||||
|
||||
// Dialog //////////////////////////////////////////////////
|
||||
|
||||
interface Dialog extends Widget {
|
||||
|
||||
// Options
|
||||
interface DialogOptions {
|
||||
autoOpen?: bool;
|
||||
buttons?: any; // object or []
|
||||
closeOnEscape?: bool;
|
||||
@@ -189,6 +190,9 @@ interface Dialog extends Widget {
|
||||
title?: string;
|
||||
width?: number;
|
||||
zIndex?: number;
|
||||
}
|
||||
|
||||
interface Dialog extends Widget {
|
||||
|
||||
// Methods
|
||||
close(): void;
|
||||
@@ -231,9 +235,7 @@ interface DraggableEvent {
|
||||
(event: Event, ui: DraggableEventUIParam): void;
|
||||
}
|
||||
|
||||
interface Draggable {
|
||||
|
||||
// Options
|
||||
interface DraggableOptions {
|
||||
disabled?: bool;
|
||||
addClasses?: bool;
|
||||
appendTo?: any;
|
||||
@@ -262,6 +264,9 @@ interface Draggable {
|
||||
snapTolerance?: number;
|
||||
stack?: string;
|
||||
zIndex?: number;
|
||||
}
|
||||
|
||||
interface Draggable extends Widget {
|
||||
|
||||
// Events
|
||||
create?: DraggableEvent;
|
||||
@@ -284,9 +289,7 @@ interface DroppableEvent {
|
||||
(event: Event, ui: DroppableEventUIParam): void;
|
||||
}
|
||||
|
||||
interface Droppable {
|
||||
|
||||
// Options
|
||||
interface DroppableOptions {
|
||||
disabled?: bool;
|
||||
accept?: any;
|
||||
activeClass?: string;
|
||||
@@ -294,6 +297,9 @@ interface Droppable {
|
||||
hoverClass?: string;
|
||||
scope?: string;
|
||||
tolerance?: string;
|
||||
}
|
||||
|
||||
interface Droppable extends Widget {
|
||||
|
||||
// Events
|
||||
create?: DroppableEvent;
|
||||
@@ -330,14 +336,15 @@ interface JQueryDatePicker {
|
||||
|
||||
// Menu //////////////////////////////////////////////////
|
||||
|
||||
interface Menu extends Widget {
|
||||
|
||||
// Options
|
||||
interface MenuOptions {
|
||||
disabled?: bool;
|
||||
icons?: any;
|
||||
menus?: string;
|
||||
position?: any; // TODO
|
||||
role?: string;
|
||||
}
|
||||
|
||||
interface Menu extends Widget {
|
||||
|
||||
// Methods
|
||||
blur(event?: Event): void;
|
||||
@@ -357,22 +364,23 @@ interface Menu extends Widget {
|
||||
blur(event: Event, ui): void;
|
||||
create(event: Event, ui): void;
|
||||
focus(event: Event, ui): void;
|
||||
select(event: Event, ui): void;
|
||||
select(event: Event, ui): void;
|
||||
}
|
||||
|
||||
|
||||
// Progressbar //////////////////////////////////////////////////
|
||||
|
||||
interface Progressbar extends Widget {
|
||||
|
||||
// Options
|
||||
interface ProgressbarOptions {
|
||||
disabled?: bool;
|
||||
//value?: number;
|
||||
}
|
||||
|
||||
interface Progressbar extends Widget {
|
||||
|
||||
// Methods
|
||||
destroy();
|
||||
disable();
|
||||
enable();
|
||||
enable();
|
||||
option(optionName: string): any;
|
||||
option(): any;
|
||||
option(optionName: string, value: any): void;
|
||||
@@ -390,9 +398,7 @@ interface Progressbar extends Widget {
|
||||
|
||||
// Resizable //////////////////////////////////////////////////
|
||||
|
||||
interface Resizable extends Widget {
|
||||
|
||||
// Options
|
||||
interface ResizableOptions {
|
||||
alsoResize?: any; // Selector, JQuery or Element
|
||||
animate?: bool;
|
||||
animateDuration?: any; // number or string
|
||||
@@ -412,9 +418,12 @@ interface Resizable extends Widget {
|
||||
maxWidth?: number;
|
||||
minHeight?: number;
|
||||
minWidth?: number;
|
||||
}
|
||||
|
||||
interface Resizable extends Widget {
|
||||
|
||||
// Methods
|
||||
|
||||
|
||||
// Events
|
||||
resize(event: Event, ui): void;
|
||||
start(event: Event, ui): void;
|
||||
@@ -424,9 +433,7 @@ interface Resizable extends Widget {
|
||||
|
||||
// Resizable //////////////////////////////////////////////////
|
||||
|
||||
interface Selectable extends Widget {
|
||||
|
||||
// Options
|
||||
interface SelectableOptions {
|
||||
autoRefresh?: bool;
|
||||
cancel?: any; // TODO Selector
|
||||
delay?: number;
|
||||
@@ -434,9 +441,12 @@ interface Selectable extends Widget {
|
||||
distance?: number;
|
||||
filter?: any; // TODO Selector
|
||||
tolerance?: string;
|
||||
}
|
||||
|
||||
interface Selectable extends Widget {
|
||||
|
||||
// Methods
|
||||
|
||||
|
||||
// Events
|
||||
selected(event: Event, ui): void;
|
||||
selecting(event: Event, ui): void;
|
||||
@@ -448,11 +458,9 @@ interface Selectable extends Widget {
|
||||
|
||||
// Slider //////////////////////////////////////////////////
|
||||
|
||||
interface Slider extends Widget {
|
||||
|
||||
// Options
|
||||
interface SliderOptions {
|
||||
animate?: any; // bool, string or number
|
||||
disabled?: bool;
|
||||
disabled?: bool;
|
||||
max?: number;
|
||||
min?: number;
|
||||
orientation?: string;
|
||||
@@ -460,6 +468,9 @@ interface Slider extends Widget {
|
||||
step?: number;
|
||||
// value?: number;
|
||||
// values?: number[];
|
||||
}
|
||||
|
||||
interface Slider extends Widget {
|
||||
|
||||
// Methods
|
||||
value(): number;
|
||||
@@ -471,8 +482,8 @@ interface Slider extends Widget {
|
||||
|
||||
// Events
|
||||
change(event: Event, ui): void;
|
||||
create(event: Event, ui): void;
|
||||
slide(event: Event, ui): void;
|
||||
create(event: Event, ui): void;
|
||||
slide(event: Event, ui): void;
|
||||
start(event: Event, ui): void;
|
||||
stop(event: Event, ui): void;
|
||||
}
|
||||
@@ -480,9 +491,7 @@ interface Slider extends Widget {
|
||||
|
||||
// Sortable //////////////////////////////////////////////////
|
||||
|
||||
interface Sortable extends Widget {
|
||||
|
||||
// Options
|
||||
interface SortableOptions {
|
||||
appendTo?: any; // jQuery, Element, Selector or string
|
||||
axis?: string;
|
||||
// cancel?: any; // TODO Selector
|
||||
@@ -507,6 +516,9 @@ interface Sortable extends Widget {
|
||||
scrollSpeed?: number;
|
||||
tolerance?: string;
|
||||
zIndex?: number;
|
||||
}
|
||||
|
||||
interface Sortable extends Widget {
|
||||
|
||||
// Methods
|
||||
cancel(): void;
|
||||
@@ -530,12 +542,9 @@ interface Sortable extends Widget {
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Spinner //////////////////////////////////////////////////
|
||||
|
||||
interface Spinner extends Widget {
|
||||
|
||||
// Options
|
||||
interface SpinnerOptions {
|
||||
culture?: string;
|
||||
disabled?: bool;
|
||||
icons?: any;
|
||||
@@ -545,6 +554,9 @@ interface Spinner extends Widget {
|
||||
numberFormat?: string;
|
||||
page?: number;
|
||||
step?: any; // number or string
|
||||
}
|
||||
|
||||
interface Spinner extends Widget {
|
||||
|
||||
// Methods
|
||||
pageDown(pages?: number): void;
|
||||
@@ -563,9 +575,7 @@ interface Spinner extends Widget {
|
||||
|
||||
// Tabs //////////////////////////////////////////////////
|
||||
|
||||
interface Tabs extends Widget {
|
||||
|
||||
// Options
|
||||
interface TabsOptions {
|
||||
active?: any; // bool or number
|
||||
collapsible?: bool;
|
||||
disabled?: any; // bool or []
|
||||
@@ -573,6 +583,9 @@ interface Tabs extends Widget {
|
||||
heightStyle?: string;
|
||||
hide?: any; // bool, number, string or object
|
||||
show?: any; // bool, number, string or object
|
||||
}
|
||||
|
||||
interface Tabs extends Widget {
|
||||
|
||||
// Methods
|
||||
disable(index: any): void;
|
||||
@@ -589,9 +602,7 @@ interface Tabs extends Widget {
|
||||
|
||||
// Tooltip //////////////////////////////////////////////////
|
||||
|
||||
interface Tooltip extends Widget {
|
||||
|
||||
// Options
|
||||
interface TooltipOptions {
|
||||
content?: any; // () or string
|
||||
disabled?: bool;
|
||||
hide?: any; // bool, number, string or object
|
||||
@@ -600,6 +611,9 @@ interface Tooltip extends Widget {
|
||||
show?: any; // bool, number, string or object
|
||||
tooltipClass?: string;
|
||||
track?: bool;
|
||||
}
|
||||
|
||||
interface Tooltip extends Widget {
|
||||
|
||||
// Methods
|
||||
close(event?: Event): void;
|
||||
@@ -615,49 +629,126 @@ interface Tooltip extends Widget {
|
||||
|
||||
interface JQuery {
|
||||
|
||||
accordion(options?: Accordion): void;
|
||||
accordion(): JQuery;
|
||||
accordion(methodName: string): JQuery;
|
||||
accordion(options: DialogOptions): JQuery;
|
||||
accordion(optionLiteral: string, options: DialogOptions): JQuery;
|
||||
accordion(optionLiteral: string, optionName: string, optionValue: any): JQuery;
|
||||
accordion(optionLiteral: string, optionName: string): JQuery;
|
||||
|
||||
autocomplete(options?: Autocomplete): void;
|
||||
autocomplete(): JQuery;
|
||||
autocomplete(methodName: string): JQuery;
|
||||
autocomplete(options: AutocompleteOptions): JQuery;
|
||||
autocomplete(optionLiteral: string, options: AutocompleteOptions): JQuery;
|
||||
autocomplete(optionLiteral: string, optionName: string, optionValue: any): JQuery;
|
||||
autocomplete(optionLiteral: string, optionName: string): JQuery;
|
||||
|
||||
button(options?: Button): void;
|
||||
buttonset(options?: Button): void;
|
||||
button(): JQuery;
|
||||
button(methodName: string): JQuery;
|
||||
button(options: ButtonOptions): JQuery;
|
||||
button(optionLiteral: string, options: ButtonOptions): JQuery;
|
||||
button(optionLiteral: string, optionName: string, optionValue: any): JQuery;
|
||||
button(optionLiteral: string, optionName: string): JQuery;
|
||||
|
||||
datepicker(options?: Datepicker): void;
|
||||
buttonset(): JQuery;
|
||||
buttonset(methodName: string): JQuery;
|
||||
buttonset(options: ButtonOptions): JQuery;
|
||||
buttonset(optionLiteral: string, options: ButtonOptions): JQuery;
|
||||
buttonset(optionLiteral: string, optionName: string, optionValue: any): JQuery;
|
||||
buttonset(optionLiteral: string, optionName: string): JQuery;
|
||||
|
||||
dialog(options?: Dialog): void;
|
||||
dialog(optionLiteral: string): void;
|
||||
datepicker(): JQuery;
|
||||
datepicker(methodName: string): JQuery;
|
||||
datepicker(options: DatepickerOptions): JQuery;
|
||||
datepicker(optionLiteral: string, options: DatepickerOptions): JQuery;
|
||||
datepicker(optionLiteral: string, optionName: string, optionValue: any): JQuery;
|
||||
datepicker(optionLiteral: string, optionName: string): JQuery;
|
||||
|
||||
draggable(options?: Draggable): JQuery;
|
||||
draggable(optionLiteral: string, options: Draggable): JQuery;
|
||||
dialog(): JQuery;
|
||||
dialog(methodName: string): JQuery;
|
||||
dialog(options: DialogOptions): JQuery;
|
||||
dialog(optionLiteral: string, options: DialogOptions): JQuery;
|
||||
dialog(optionLiteral: string, optionName: string, optionValue: any): JQuery;
|
||||
dialog(optionLiteral: string, optionName: string): JQuery;
|
||||
|
||||
draggable(): JQuery;
|
||||
draggable(methodName: string): JQuery;
|
||||
draggable(options: DraggableOptions): JQuery;
|
||||
draggable(optionLiteral: string, options: DraggableOptions): JQuery;
|
||||
draggable(optionLiteral: string, optionName: string, optionValue: any): JQuery;
|
||||
draggable(optionLiteral: string, optionName: string): any;
|
||||
// draggable(methodName: string): any;
|
||||
draggable(optionLiteral: string, optionName: string): JQuery;
|
||||
|
||||
droppable(options: Droppable): JQuery;
|
||||
droppable(optionLiteral: string, options: Draggable): JQuery;
|
||||
droppable(): JQuery;
|
||||
droppable(methodName: string): JQuery;
|
||||
droppable(options: DroppableOptions): JQuery;
|
||||
droppable(optionLiteral: string, options: DraggableOptions): JQuery;
|
||||
droppable(optionLiteral: string, optionName: string, optionValue: any): JQuery;
|
||||
droppable(optionLiteral: string, optionName: string): any;
|
||||
droppable(methodName: string): any;
|
||||
droppable(optionLiteral: string, optionName: string): JQuery;
|
||||
|
||||
menu(options?: Menu): void;
|
||||
menu(): JQuery;
|
||||
menu(methodName: string): JQuery;
|
||||
menu(options: MenuOptions): JQuery;
|
||||
menu(optionLiteral: string, options: MenuOptions): JQuery;
|
||||
menu(optionLiteral: string, optionName: string, optionValue: any): JQuery;
|
||||
menu(optionLiteral: string, optionName: string): JQuery;
|
||||
|
||||
progressbar(options?: Progressbar): void;
|
||||
progressbar(): JQuery;
|
||||
progressbar(methodName: string): JQuery;
|
||||
progressbar(options: Progressbar): JQuery;
|
||||
progressbar(optionLiteral: string, options: Progressbar): JQuery;
|
||||
progressbar(optionLiteral: string, optionName: string, optionValue: any): JQuery;
|
||||
progressbar(optionLiteral: string, optionName: string): JQuery;
|
||||
|
||||
resizable(options?: Resizable): void;
|
||||
resizable(): JQuery;
|
||||
resizable(methodName: string): JQuery;
|
||||
resizable(options: ResizableOptions): JQuery;
|
||||
resizable(optionLiteral: string, options: ResizableOptions): JQuery;
|
||||
resizable(optionLiteral: string, optionName: string, optionValue: any): JQuery;
|
||||
resizable(optionLiteral: string, optionName: string): JQuery;
|
||||
|
||||
selectable(options?: Selectable): void;
|
||||
selectable(): JQuery;
|
||||
selectable(methodName: string): JQuery;
|
||||
selectable(options: SelectableOptions): JQuery;
|
||||
selectable(optionLiteral: string, options: SelectableOptions): JQuery;
|
||||
selectable(optionLiteral: string, optionName: string, optionValue: any): JQuery;
|
||||
selectable(optionLiteral: string, optionName: string): JQuery;
|
||||
|
||||
slider(options?: Slider): void;
|
||||
slider(): JQuery;
|
||||
slider(methodName: string): JQuery;
|
||||
slider(options: SliderOptions): JQuery;
|
||||
slider(optionLiteral: string, options: SliderOptions): JQuery;
|
||||
slider(optionLiteral: string, optionName: string, optionValue: any): JQuery;
|
||||
slider(optionLiteral: string, optionName: string): JQuery;
|
||||
|
||||
sortable(options?: Sortable): void;
|
||||
sortable(): JQuery;
|
||||
sortable(methodName: string): JQuery;
|
||||
sortable(options: SortableOptions): JQuery;
|
||||
sortable(optionLiteral: string, options: SortableOptions): JQuery;
|
||||
sortable(optionLiteral: string, optionName: string, optionValue: any): JQuery;
|
||||
sortable(optionLiteral: string, optionName: string): JQuery;
|
||||
|
||||
spinner(options?: Spinner): void;
|
||||
spinner(): JQuery;
|
||||
spinner(methodName: string): JQuery;
|
||||
spinner(options: SpinnerOptions): JQuery;
|
||||
spinner(optionLiteral: string, options: SpinnerOptions): JQuery;
|
||||
spinner(optionLiteral: string, optionName: string, optionValue: any): JQuery;
|
||||
spinner(optionLiteral: string, optionName: string): JQuery;
|
||||
|
||||
tabs(options?: Tabs): void;
|
||||
tabs(): JQuery;
|
||||
tabs(methodName: string): JQuery;
|
||||
tabs(options: TabsOptions): JQuery;
|
||||
tabs(optionLiteral: string, options: TabsOptions): JQuery;
|
||||
tabs(optionLiteral: string, optionName: string, optionValue: any): JQuery;
|
||||
tabs(optionLiteral: string, optionName: string): JQuery;
|
||||
|
||||
tooltip(options?: Tooltip): void;
|
||||
tooltip(): JQuery;
|
||||
tooltip(methodName: string): JQuery;
|
||||
tooltip(options: TooltipOptions): JQuery;
|
||||
tooltip(optionLiteral: string, options: TooltipOptions): JQuery;
|
||||
tooltip(optionLiteral: string, optionName: string, optionValue: any): JQuery;
|
||||
tooltip(optionLiteral: string, optionName: string): JQuery;
|
||||
}
|
||||
|
||||
interface JQueryStatic {
|
||||
datepicker: JQueryDatePicker;
|
||||
}
|
||||
}
|
||||
Vendored
+41
-11
@@ -41,18 +41,42 @@ interface KnockoutObservableArray extends KnockoutObservableArrayFunctions {
|
||||
(value: any[]): KnockoutObservableArray;
|
||||
}
|
||||
|
||||
interface KnockoutObservable {
|
||||
interface KnockoutObservableBase {
|
||||
|
||||
fn;
|
||||
|
||||
(): any;
|
||||
(value): void;
|
||||
|
||||
extend(source);
|
||||
subscribe(func: Function): KnockoutSubscription;
|
||||
}
|
||||
|
||||
interface KnockoutComputed extends KnockoutObservable {
|
||||
interface KnockoutObservableAny extends KnockoutObservableBase {
|
||||
|
||||
(): any;
|
||||
(value): void;
|
||||
}
|
||||
|
||||
interface KnockoutObservableString extends KnockoutObservableBase {
|
||||
(): string;
|
||||
(value: string): void;
|
||||
}
|
||||
|
||||
|
||||
interface KnockoutObservableNumber extends KnockoutObservableBase {
|
||||
(): number;
|
||||
(value: number): void;
|
||||
}
|
||||
|
||||
interface KnockoutObservableBool extends KnockoutObservableBase {
|
||||
(): bool;
|
||||
(value: bool): void;
|
||||
}
|
||||
|
||||
interface KnockoutObservableDate extends KnockoutObservableBase {
|
||||
(): Date;
|
||||
(value: Date): void;
|
||||
}
|
||||
|
||||
interface KnockoutComputed extends KnockoutObservableBase {
|
||||
(): KnockoutComputed;
|
||||
(func: Function, context?: any): KnockoutComputed;
|
||||
(def: KnockoutComputedDefine): KnockoutComputed;
|
||||
@@ -80,11 +104,11 @@ interface KnockoutBindingContext {
|
||||
interface KnockoutBindingHandler {
|
||||
// TODO: Work out how to define bindingHandlers when not using all the args
|
||||
// adding element?: any, etc doesnt work...
|
||||
//init(element: any, valueAccessor: any, allBindingsAccessor: any, viewModel: any, bindingContext: KnockoutBindingContext) : void;
|
||||
//update(element: any, valueAccessor: any, allBindingsAccessor: any, viewModel: any, bindingContext: KnockoutBindingContext) : void;
|
||||
init: any;
|
||||
update: any;
|
||||
options: any;
|
||||
init(element: any, valueAccessor: () => any, allBindingsAccessor: () => any, viewModel: any, bindingContext: KnockoutBindingContext): void;
|
||||
update(element: any, valueAccessor: () => any, allBindingsAccessor: () => any, viewModel: any, bindingContext: KnockoutBindingContext): void;
|
||||
//init: any;
|
||||
//update: any;
|
||||
options?: any;
|
||||
}
|
||||
|
||||
interface KnockoutBindingHandlers {
|
||||
@@ -172,7 +196,13 @@ interface KnockoutStatic {
|
||||
|
||||
applyBindings(viewModel: any, rootNode?: any): void;
|
||||
applyBindingsToDescendants(viewModel: any, rootNode: any): void;
|
||||
observable(intial? ): KnockoutObservable;
|
||||
|
||||
observable(value: string): KnockoutObservableString;
|
||||
observable(value: Date): KnockoutObservableDate;
|
||||
observable(value: number): KnockoutObservableNumber;
|
||||
observable(value: bool): KnockoutObservableBool;
|
||||
observable(value?: any): KnockoutObservableAny;
|
||||
|
||||
contextFor(node: any): any;
|
||||
isSubscribable(instance: any): bool;
|
||||
subscribable(): void;
|
||||
|
||||
Vendored
+681
@@ -0,0 +1,681 @@
|
||||
/**
|
||||
* TeeChart(tm) for TypeScript
|
||||
*
|
||||
* v1.3 October 2012
|
||||
* Copyright(c) 2012 by Steema Software SL. All Rights Reserved.
|
||||
* http://www.steema.com
|
||||
*
|
||||
* Licensed with commercial and non-commercial attributes,
|
||||
* specifically: http://www.steema.com/licensing/html5
|
||||
*
|
||||
* TypeScript is a Microsoft product: www.typescriptlang.org
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:david@steema.com">Steema Software</a>
|
||||
* @version 1.3
|
||||
*/
|
||||
|
||||
|
||||
/// <reference path="lib.d.ts" />
|
||||
|
||||
module Tee {
|
||||
|
||||
interface IPoint {
|
||||
x: number;
|
||||
y: number;
|
||||
}
|
||||
|
||||
interface IRectangle {
|
||||
x: number;
|
||||
y: number;
|
||||
width: number;
|
||||
height: number;
|
||||
|
||||
contains(point: IPoint): bool;
|
||||
}
|
||||
|
||||
interface ITool {
|
||||
active: bool;
|
||||
chart: IChart;
|
||||
|
||||
mousedown(event): bool;
|
||||
mousemove(event): bool;
|
||||
clicked(p:IPoint): bool;
|
||||
draw(): void;
|
||||
}
|
||||
|
||||
interface IGradient {
|
||||
chart: IChart;
|
||||
visible: bool;
|
||||
|
||||
colors: string[];
|
||||
direction: string;
|
||||
stops: number[];
|
||||
offset: IPoint;
|
||||
}
|
||||
|
||||
interface IShadow {
|
||||
chart: IChart;
|
||||
visible: bool;
|
||||
blur:number;
|
||||
color: string;
|
||||
width:number;
|
||||
height:number;
|
||||
}
|
||||
|
||||
interface IStroke {
|
||||
chart: IChart;
|
||||
fill: string;
|
||||
size: number;
|
||||
join: string;
|
||||
cap: string;
|
||||
dash: number[];
|
||||
gradient: IGradient;
|
||||
}
|
||||
|
||||
interface IFont {
|
||||
chart: IChart;
|
||||
style: string;
|
||||
gradient: IGradient;
|
||||
fill: string;
|
||||
stroke: IStroke;
|
||||
shadow: IShadow;
|
||||
textAlign: string;
|
||||
baseLine: string;
|
||||
|
||||
getSize():number;
|
||||
setSize(size:number):void;
|
||||
}
|
||||
|
||||
interface IImage {
|
||||
url: string;
|
||||
chart: IChart;
|
||||
visible: bool;
|
||||
}
|
||||
|
||||
interface IFormat {
|
||||
font: IFont;
|
||||
gradient: IGradient;
|
||||
shadow: IShadow;
|
||||
stroke: IStroke;
|
||||
round: IPoint;
|
||||
transparency: number;
|
||||
image: IImage;
|
||||
fill: string;
|
||||
|
||||
textHeight(text:string): number;
|
||||
textWidth(text:string): number;
|
||||
drawText(bounds:IRectangle, text:string);
|
||||
rectangle(x:number, y:number, width:number, height:number);
|
||||
poligon(points:IPoint[]);
|
||||
ellipse(x:number, y:number, width:number, height:number);
|
||||
}
|
||||
|
||||
interface IMargins {
|
||||
left: number;
|
||||
top: number;
|
||||
right: number;
|
||||
bottom: number;
|
||||
}
|
||||
|
||||
interface IAnnotation extends ITool {
|
||||
position: IPoint;
|
||||
margins: IMargins;
|
||||
items: IAnnotation[];
|
||||
bounds: IRectangle;
|
||||
visible: bool;
|
||||
transparent: bool;
|
||||
text: string;
|
||||
format: IFormat;
|
||||
|
||||
add(text: string): IAnnotation;
|
||||
resize(): void;
|
||||
clicked(point: IPoint): bool;
|
||||
draw(): void;
|
||||
}
|
||||
|
||||
interface IPanel {
|
||||
format: IFormat;
|
||||
transparent: bool;
|
||||
margins: IMargins;
|
||||
}
|
||||
|
||||
interface ITitle extends IAnnotation {
|
||||
expand: bool;
|
||||
padding: number;
|
||||
transparent: bool;
|
||||
}
|
||||
|
||||
interface IPalette {
|
||||
colors: string[];
|
||||
|
||||
get(index: number): string;
|
||||
}
|
||||
|
||||
interface IArrow extends IFormat {
|
||||
length: number;
|
||||
underline: bool;
|
||||
}
|
||||
|
||||
interface IMarks extends IAnnotation {
|
||||
arrow: IArrow;
|
||||
series: ISeries;
|
||||
|
||||
style: string;
|
||||
|
||||
drawEvery: number;
|
||||
visible: bool;
|
||||
}
|
||||
|
||||
interface ISeriesData {
|
||||
values: number[];
|
||||
labels: string[];
|
||||
source: any;
|
||||
}
|
||||
|
||||
interface ICursor {
|
||||
cursor: string;
|
||||
}
|
||||
|
||||
interface ISeries {
|
||||
data: ISeriesData;
|
||||
marks: IMarks;
|
||||
|
||||
yMandatory: bool;
|
||||
horizAxis: string;
|
||||
vertAxis: string;
|
||||
|
||||
format: IFormat;
|
||||
hover: IFormat;
|
||||
|
||||
visible: bool;
|
||||
|
||||
cursor: ICursor;
|
||||
over: number;
|
||||
|
||||
palette: IPalette;
|
||||
colorEach: string;
|
||||
|
||||
useAxes: bool;
|
||||
decimals: number;
|
||||
|
||||
title: string;
|
||||
|
||||
//refresh(failure: function): void;
|
||||
|
||||
toPercent(index: number): string;
|
||||
markText(index: number): string;
|
||||
|
||||
valueText(index: number): string;
|
||||
|
||||
associatedToAxis(axis: IAxis): bool;
|
||||
|
||||
bounds(rectangle: IRectangle): void;
|
||||
|
||||
calc(index: number, position: IPoint): void;
|
||||
|
||||
clicked(position: IPoint): number;
|
||||
|
||||
minXValue(): number;
|
||||
maxXValue(): number;
|
||||
|
||||
minYValue(): number;
|
||||
maxYValue(): number;
|
||||
|
||||
count(): number;
|
||||
|
||||
addRandom(count: number, range?: number, x?: bool): ISeries;
|
||||
|
||||
|
||||
}
|
||||
|
||||
interface IAxisLabels {
|
||||
chart: IChart;
|
||||
format: IFormat;
|
||||
decimals: number;
|
||||
padding: number;
|
||||
separation: number; // %
|
||||
visible: bool;
|
||||
rotation: number;
|
||||
alternate: bool;
|
||||
maxWidth: number;
|
||||
|
||||
labelStyle: string;
|
||||
dateFormat: string;
|
||||
|
||||
getLabel(value: number): string;
|
||||
width(value: number): number;
|
||||
|
||||
}
|
||||
|
||||
interface IGrid {
|
||||
chart: IChart;
|
||||
format: IFormat;
|
||||
visible: bool;
|
||||
lineDash: bool;
|
||||
}
|
||||
|
||||
interface ITicks {
|
||||
chart: IChart;
|
||||
stroke: IStroke;
|
||||
visible: bool;
|
||||
length: number;
|
||||
}
|
||||
|
||||
interface IMinorTicks extends ITicks {
|
||||
count: number;
|
||||
}
|
||||
|
||||
interface IAxisTitle extends IAnnotation {
|
||||
padding: number;
|
||||
transparent: bool;
|
||||
}
|
||||
|
||||
interface IAxis {
|
||||
chart: IChart;
|
||||
visible: bool;
|
||||
inverted: bool;
|
||||
|
||||
horizontal: bool; // readonly
|
||||
otherSize: bool; // readonly
|
||||
bounds: IRectangle; // readonly?
|
||||
|
||||
position: number;
|
||||
format: IFormat;
|
||||
custom: bool; // readonly
|
||||
|
||||
grid: IGrid;
|
||||
labels: IAxisLabels;
|
||||
ticks: ITicks;
|
||||
minorTicks: IMinorTicks;
|
||||
innerTicks: ITicks;
|
||||
|
||||
title: IAxisTitle;
|
||||
|
||||
automatic: bool;
|
||||
minimum: number;
|
||||
maximum: number;
|
||||
increment: number;
|
||||
log: bool;
|
||||
|
||||
startPos: number;
|
||||
endPos: number;
|
||||
|
||||
start: number; // %
|
||||
end: number; // %
|
||||
|
||||
axisSize: number;
|
||||
|
||||
scale: number;
|
||||
increm: number;
|
||||
|
||||
calc(value: number): number;
|
||||
fromPos(position: number): number;
|
||||
fromSize(size: number): number;
|
||||
|
||||
hasAnySeries(): bool;
|
||||
scroll(delta: number): void;
|
||||
setMinMax(minimum: number, maximum: number): void;
|
||||
}
|
||||
|
||||
interface IAxes {
|
||||
chart: IChart;
|
||||
visible: bool;
|
||||
|
||||
left: IAxis;
|
||||
top: IAxis;
|
||||
right: IAxis;
|
||||
bottom: IAxis;
|
||||
|
||||
items: IAxis[];
|
||||
|
||||
add(horizontal: bool, otherSide: bool): IAxis;
|
||||
//each(f: function): void;
|
||||
}
|
||||
|
||||
interface ISymbol {
|
||||
chart: IChart;
|
||||
format: IFormat;
|
||||
width: number;
|
||||
height: number;
|
||||
padding: number;
|
||||
visible: bool;
|
||||
}
|
||||
|
||||
interface ILegend {
|
||||
chart: IChart;
|
||||
|
||||
transparent: bool;
|
||||
|
||||
format: IFormat;
|
||||
title: IAnnotation;
|
||||
|
||||
bounds: IRectangle;
|
||||
position: string;
|
||||
visible: bool;
|
||||
inverted: bool;
|
||||
padding: number;
|
||||
align: number;
|
||||
|
||||
fontColor: bool;
|
||||
|
||||
dividing: IStroke;
|
||||
over: number;
|
||||
symbol: ISymbol;
|
||||
|
||||
itemHeight: number;
|
||||
innerOff: number;
|
||||
|
||||
legendStyle: string;
|
||||
textStyle: string;
|
||||
|
||||
availRows(): number;
|
||||
itemsCount(): number;
|
||||
totalWidth(): number;
|
||||
showValues(): bool;
|
||||
itemText(series: ISeries, index: number): string;
|
||||
isVertical(): bool;
|
||||
}
|
||||
|
||||
interface IScroll {
|
||||
chart: IChart;
|
||||
active: bool;
|
||||
enabled: bool;
|
||||
direction: string;
|
||||
mouseButton: number;
|
||||
|
||||
position: IPoint;
|
||||
}
|
||||
|
||||
interface ISeriesList {
|
||||
chart: IChart;
|
||||
items: ISeries[];
|
||||
|
||||
anyUsesAxes(): bool;
|
||||
clicked(position: IPoint): bool;
|
||||
//each(f: function): void;
|
||||
firstVisible(): ISeries;
|
||||
|
||||
}
|
||||
|
||||
interface ITools {
|
||||
chart: IChart;
|
||||
items: ITool[];
|
||||
|
||||
add(tool: ITool): ITool;
|
||||
}
|
||||
|
||||
interface IWall {
|
||||
format: IFormat;
|
||||
visible: bool;
|
||||
bounds: IRectangle;
|
||||
}
|
||||
|
||||
interface IWalls {
|
||||
visible: bool;
|
||||
left: IWall;
|
||||
right: IWall;
|
||||
bottom: IWall;
|
||||
back: IWall;
|
||||
}
|
||||
|
||||
interface IZoom {
|
||||
chart: IChart;
|
||||
active: bool;
|
||||
direction: string;
|
||||
enabled: bool;
|
||||
mouseButton: number;
|
||||
format: IFormat;
|
||||
|
||||
reset(): void;
|
||||
}
|
||||
|
||||
interface IChart {
|
||||
addSeries(series:ISeries): ISeries;
|
||||
draw(context?:CanvasRenderingContext2D);
|
||||
}
|
||||
|
||||
// SERIES
|
||||
|
||||
interface ICustomBar extends ISeries {
|
||||
sideMargins: number;
|
||||
useOrigin: bool;
|
||||
origin: number;
|
||||
|
||||
offset: number;
|
||||
barSize: number;
|
||||
barStyle: string;
|
||||
|
||||
stacked: string;
|
||||
}
|
||||
|
||||
interface ISeriesPointer {
|
||||
chart: IChart;
|
||||
format: IFormat;
|
||||
visible: bool;
|
||||
colorEach: bool;
|
||||
style: string;
|
||||
width: number;
|
||||
height: number;
|
||||
}
|
||||
|
||||
interface ICustomSeries extends ISeries {
|
||||
pointer: ISeriesPointer;
|
||||
|
||||
stacked: string;
|
||||
stairs: bool;
|
||||
}
|
||||
|
||||
interface ILine extends ICustomSeries {
|
||||
smooth: number;
|
||||
}
|
||||
|
||||
interface ISmoothLine extends ILine {
|
||||
smooth: number;
|
||||
}
|
||||
|
||||
interface IArea extends ISeries {
|
||||
useOrigin: bool;
|
||||
origin: number;
|
||||
}
|
||||
|
||||
interface IPie extends ISeries {
|
||||
donut: number;
|
||||
rotation: number;
|
||||
sort: string;
|
||||
orderAscending: bool;
|
||||
explode: number[];
|
||||
concentric: bool;
|
||||
|
||||
calcPos(angle: number, position: IPoint): void;
|
||||
}
|
||||
|
||||
interface IBubbleData extends ISeriesData {
|
||||
radius: number[];
|
||||
}
|
||||
|
||||
interface IBubble extends ICustomSeries {
|
||||
data: IBubbleData;
|
||||
}
|
||||
|
||||
interface IGanttData extends ISeriesData {
|
||||
start: number[];
|
||||
x: number[];
|
||||
end: number[];
|
||||
}
|
||||
|
||||
interface IGantt extends ISeries {
|
||||
data: IGanttData;
|
||||
dateFormat: string;
|
||||
colorEach: string;
|
||||
height: number;
|
||||
margin: IPoint;
|
||||
|
||||
add(index: number, label: string, start: number, end: number): void;
|
||||
bounds(index: number, rectangle: IRectangle): void;
|
||||
}
|
||||
|
||||
interface ICandleData extends ISeriesData {
|
||||
open: number[];
|
||||
close: number[];
|
||||
high: number[];
|
||||
low: number[];
|
||||
}
|
||||
|
||||
interface ICandle extends ICustomSeries {
|
||||
data: ICandleData;
|
||||
higher: IFormat;
|
||||
lower: IFormat;
|
||||
style: string;
|
||||
}
|
||||
|
||||
// TOOLS
|
||||
|
||||
interface IDragTool extends ITool {
|
||||
series: ISeries;
|
||||
}
|
||||
|
||||
interface ICursorTool extends ITool {
|
||||
direction: string;
|
||||
size: IPoint;
|
||||
|
||||
followMouse: bool;
|
||||
dragging: number;
|
||||
|
||||
format: IFormat;
|
||||
|
||||
horizAxis: IAxis;
|
||||
vertAxis: IAxis;
|
||||
|
||||
render: string;
|
||||
|
||||
over(point: IPoint): bool;
|
||||
setRender(render: string): void;
|
||||
}
|
||||
|
||||
interface IToolTip extends IAnnotation {
|
||||
animated: number;
|
||||
autoHide: bool;
|
||||
autoRedraw: bool;
|
||||
currentSeries: ISeries;
|
||||
currentIndex: number;
|
||||
delay: number;
|
||||
|
||||
hide(): void;
|
||||
refresh(series: ISeries, index: number): void;
|
||||
}
|
||||
|
||||
declare class Point implements IPoint {
|
||||
public x:number;
|
||||
public y:number;
|
||||
}
|
||||
|
||||
declare class Chart implements IChart {
|
||||
//public aspect: IAspect;
|
||||
|
||||
public axes: IAxes;
|
||||
public footer: ITitle;
|
||||
public legend: ILegend;
|
||||
public panel: IPanel;
|
||||
public scroll: IScroll;
|
||||
public series: ISeriesList;
|
||||
public title: ITitle;
|
||||
public tools: ITools;
|
||||
public walls: IWalls;
|
||||
public zoom: IZoom;
|
||||
|
||||
public bounds: IRectangle;
|
||||
public canvas: HTMLCanvasElement;
|
||||
public chartRect: IRectangle;
|
||||
public palette: IPalette;
|
||||
|
||||
constructor(canvas: string);
|
||||
addSeries(series: ISeries): ISeries;
|
||||
getSeries(index: number): ISeries;
|
||||
removeSeries(series:ISeries): void;
|
||||
|
||||
draw(context?:CanvasRenderingContext2D);
|
||||
toImage(image: HTMLImageElement, format:string, quality:number): void;
|
||||
}
|
||||
|
||||
// SERIES
|
||||
|
||||
declare var Line: {
|
||||
prototype: ILine;
|
||||
new(values?:number[]): ILine;
|
||||
}
|
||||
|
||||
declare var PointXY: {
|
||||
prototype: ICustomSeries;
|
||||
new(values?:number[]): ICustomSeries;
|
||||
}
|
||||
|
||||
declare var Area: {
|
||||
prototype: IArea;
|
||||
new(values?:number[]): IArea;
|
||||
}
|
||||
|
||||
declare var HorizArea: {
|
||||
prototype: IArea;
|
||||
new(values?:number[]): IArea;
|
||||
}
|
||||
|
||||
declare var Bar: {
|
||||
prototype: ICustomBar;
|
||||
new(values?:number[]): ICustomBar;
|
||||
}
|
||||
|
||||
declare var HorizBar: {
|
||||
prototype: ICustomBar;
|
||||
new(values?:number[]): ICustomBar;
|
||||
}
|
||||
|
||||
declare var Pie: {
|
||||
prototype: IPie;
|
||||
new(values?:number[]): IPie;
|
||||
}
|
||||
|
||||
declare var Donut: {
|
||||
prototype: IPie;
|
||||
new(values?:number[]): IPie;
|
||||
}
|
||||
|
||||
declare var Bubble: {
|
||||
prototype: IBubble;
|
||||
new(values?:number[]): IBubble;
|
||||
}
|
||||
|
||||
declare var Gantt: {
|
||||
prototype: IGantt;
|
||||
new(values?:number[]): IGantt;
|
||||
}
|
||||
|
||||
declare var Volume: {
|
||||
prototype: ICustomBar;
|
||||
new(values?:number[]): ICustomBar;
|
||||
}
|
||||
|
||||
declare var Candle: {
|
||||
prototype: ICandle;
|
||||
new(values?:number[]): ICandle;
|
||||
}
|
||||
|
||||
// TOOLS
|
||||
|
||||
declare var CursorTool: {
|
||||
prototype: ICursorTool;
|
||||
new(chart?: Chart): ICursorTool;
|
||||
}
|
||||
|
||||
declare var DragTool: {
|
||||
prototype: IDragTool;
|
||||
new(chart?: Chart): IDragTool;
|
||||
}
|
||||
|
||||
declare var ToolTip: {
|
||||
prototype: IToolTip;
|
||||
new(chart?: Chart): IToolTip;
|
||||
}
|
||||
}
|
||||
@@ -38,6 +38,7 @@ Complete
|
||||
* [Raphael](http://raphaeljs.com/) (by [CheCoxshall](https://github.com/CheCoxshall))
|
||||
* [Sammy.js](http://sammyjs.org/)
|
||||
* [Spin](http://fgnass.github.com/spin.js/)
|
||||
* [Teechart](http://www.steema.com) (by [Steema])(http://www.steema.com)
|
||||
* [Underscore.js](http://underscorejs.org/)
|
||||
|
||||
Next
|
||||
|
||||
+607
-594
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user