From 34cf33dfb4e42f4f5bb564afec15aa747aa2a6cb Mon Sep 17 00:00:00 2001 From: timramone Date: Sat, 26 Sep 2015 15:05:52 +0300 Subject: [PATCH 01/65] Make 'partial' generic --- underscore/underscore-tests.ts | 6 +- underscore/underscore.d.ts | 2302 +++++++++++++++++++++++++++++++- 2 files changed, 2294 insertions(+), 14 deletions(-) diff --git a/underscore/underscore-tests.ts b/underscore/underscore-tests.ts index 13410c23b8..c0817be705 100644 --- a/underscore/underscore-tests.ts +++ b/underscore/underscore-tests.ts @@ -169,6 +169,10 @@ var exclaim = function (statement) { return statement + "!"; }; var welcome = _.compose(exclaim, greet); welcome('moe'); +var partialApplicationTestFunction = (a: string, b: number, c: boolean, d: string, e: number, f: string) => { } +var partialApplicationResult = _.partial(partialApplicationTestFunction, "", 1); +var parametersCanBeStubbed = _.partial(partialApplicationResult, _, _, _, ""); + /////////////////////////////////////////////////////////////////////////////////////// _.keys({ one: 1, two: 2, three: 3 }); @@ -336,7 +340,7 @@ function chain_tests() { .flatten() .find(num => num % 2 == 0) .value(); - + var firstVal: number = _.chain([1, 2, 3]) .first() .value(); diff --git a/underscore/underscore.d.ts b/underscore/underscore.d.ts index 7dea66a84a..feca43620c 100644 --- a/underscore/underscore.d.ts +++ b/underscore/underscore.d.ts @@ -655,7 +655,7 @@ interface UnderscoreStatic { size(list: _.Collection): number; /** - * Split array into two arrays: + * Split array into two arrays: * one whose elements all satisfy predicate and one whose elements all do not satisfy predicate. * @param array Array to split in two. * @param iterator Filter iterator function for each element in `array`. @@ -1003,15 +1003,2291 @@ interface UnderscoreStatic { /** * Partially apply a function by filling in any number of its arguments, without changing its dynamic this value. - * A close cousin of bind. You may pass _ in your list of arguments to specify an argument that should not be - * pre-filled, but left open to supply at call-time. + * A close cousin of bind. You may pass _ in your list of arguments to specify an argument that should not be + * pre-filled, but left open to supply at call-time. * @param fn Function to partially fill in arguments. * @param arguments The partial arguments. * @return `fn` with partially filled in arguments. **/ - partial( - fn: Function, - ...arguments: any[]): Function; + + partial( + fn: { (p1: T1):T2 }, + p1: T1 + ): { (): T2 }; + + partial( + fn: { (p1: T1, p2: T2):T3 }, + p1: T1 + ): { (p2: T2): T3 }; + + partial( + fn: { (p1: T1, p2: T2):T3 }, + p1: T1, + p2: T2 + ): { (): T3 }; + + partial( + fn: { (p1: T1, p2: T2):T3 }, + stub1: UnderscoreStatic, + p2: T2 + ): { (p1: T1): T3 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3):T4 }, + p1: T1 + ): { (p2: T2, p3: T3): T4 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3):T4 }, + p1: T1, + p2: T2 + ): { (p3: T3): T4 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3):T4 }, + stub1: UnderscoreStatic, + p2: T2 + ): { (p1: T1, p3: T3): T4 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3):T4 }, + p1: T1, + p2: T2, + p3: T3 + ): { (): T4 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3):T4 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3 + ): { (p1: T1): T4 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3):T4 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3 + ): { (p2: T2): T4 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3):T4 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3 + ): { (p1: T1, p2: T2): T4 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 }, + p1: T1 + ): { (p2: T2, p3: T3, p4: T4): T5 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 }, + p1: T1, + p2: T2 + ): { (p3: T3, p4: T4): T5 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 }, + stub1: UnderscoreStatic, + p2: T2 + ): { (p1: T1, p3: T3, p4: T4): T5 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 }, + p1: T1, + p2: T2, + p3: T3 + ): { (p4: T4): T5 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3 + ): { (p1: T1, p4: T4): T5 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3 + ): { (p2: T2, p4: T4): T5 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3 + ): { (p1: T1, p2: T2, p4: T4): T5 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 }, + p1: T1, + p2: T2, + p3: T3, + p4: T4 + ): { (): T5 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + p4: T4 + ): { (p1: T1): T5 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + p4: T4 + ): { (p2: T2): T5 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + p4: T4 + ): { (p1: T1, p2: T2): T5 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + p4: T4 + ): { (p3: T3): T5 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + p4: T4 + ): { (p1: T1, p3: T3): T5 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4 + ): { (p2: T2, p3: T3): T5 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4 + ): { (p1: T1, p2: T2, p3: T3): T5 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, + p1: T1 + ): { (p2: T2, p3: T3, p4: T4, p5: T5): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, + p1: T1, + p2: T2 + ): { (p3: T3, p4: T4, p5: T5): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, + stub1: UnderscoreStatic, + p2: T2 + ): { (p1: T1, p3: T3, p4: T4, p5: T5): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, + p1: T1, + p2: T2, + p3: T3 + ): { (p4: T4, p5: T5): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3 + ): { (p1: T1, p4: T4, p5: T5): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3 + ): { (p2: T2, p4: T4, p5: T5): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3 + ): { (p1: T1, p2: T2, p4: T4, p5: T5): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, + p1: T1, + p2: T2, + p3: T3, + p4: T4 + ): { (p5: T5): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + p4: T4 + ): { (p1: T1, p5: T5): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + p4: T4 + ): { (p2: T2, p5: T5): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + p4: T4 + ): { (p1: T1, p2: T2, p5: T5): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + p4: T4 + ): { (p3: T3, p5: T5): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + p4: T4 + ): { (p1: T1, p3: T3, p5: T5): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4 + ): { (p2: T2, p3: T3, p5: T5): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4 + ): { (p1: T1, p2: T2, p3: T3, p5: T5): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, + p1: T1, + p2: T2, + p3: T3, + p4: T4, + p5: T5 + ): { (): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + p4: T4, + p5: T5 + ): { (p1: T1): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + p4: T4, + p5: T5 + ): { (p2: T2): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + p4: T4, + p5: T5 + ): { (p1: T1, p2: T2): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + p4: T4, + p5: T5 + ): { (p3: T3): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + p4: T4, + p5: T5 + ): { (p1: T1, p3: T3): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4, + p5: T5 + ): { (p2: T2, p3: T3): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4, + p5: T5 + ): { (p1: T1, p2: T2, p3: T3): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, + p1: T1, + p2: T2, + p3: T3, + stub4: UnderscoreStatic, + p5: T5 + ): { (p4: T4): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + stub4: UnderscoreStatic, + p5: T5 + ): { (p1: T1, p4: T4): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + stub4: UnderscoreStatic, + p5: T5 + ): { (p2: T2, p4: T4): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + stub4: UnderscoreStatic, + p5: T5 + ): { (p1: T1, p2: T2, p4: T4): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5 + ): { (p3: T3, p4: T4): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5 + ): { (p1: T1, p3: T3, p4: T4): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5 + ): { (p2: T2, p3: T3, p4: T4): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5 + ): { (p1: T1, p2: T2, p3: T3, p4: T4): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + p1: T1 + ): { (p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + p1: T1, + p2: T2 + ): { (p3: T3, p4: T4, p5: T5, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + stub1: UnderscoreStatic, + p2: T2 + ): { (p1: T1, p3: T3, p4: T4, p5: T5, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + p1: T1, + p2: T2, + p3: T3 + ): { (p4: T4, p5: T5, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3 + ): { (p1: T1, p4: T4, p5: T5, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3 + ): { (p2: T2, p4: T4, p5: T5, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3 + ): { (p1: T1, p2: T2, p4: T4, p5: T5, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + p1: T1, + p2: T2, + p3: T3, + p4: T4 + ): { (p5: T5, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + p4: T4 + ): { (p1: T1, p5: T5, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + p4: T4 + ): { (p2: T2, p5: T5, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + p4: T4 + ): { (p1: T1, p2: T2, p5: T5, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + p4: T4 + ): { (p3: T3, p5: T5, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + p4: T4 + ): { (p1: T1, p3: T3, p5: T5, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4 + ): { (p2: T2, p3: T3, p5: T5, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4 + ): { (p1: T1, p2: T2, p3: T3, p5: T5, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + p1: T1, + p2: T2, + p3: T3, + p4: T4, + p5: T5 + ): { (p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + p4: T4, + p5: T5 + ): { (p1: T1, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + p4: T4, + p5: T5 + ): { (p2: T2, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + p4: T4, + p5: T5 + ): { (p1: T1, p2: T2, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + p4: T4, + p5: T5 + ): { (p3: T3, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + p4: T4, + p5: T5 + ): { (p1: T1, p3: T3, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4, + p5: T5 + ): { (p2: T2, p3: T3, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4, + p5: T5 + ): { (p1: T1, p2: T2, p3: T3, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + p1: T1, + p2: T2, + p3: T3, + stub4: UnderscoreStatic, + p5: T5 + ): { (p4: T4, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + stub4: UnderscoreStatic, + p5: T5 + ): { (p1: T1, p4: T4, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + stub4: UnderscoreStatic, + p5: T5 + ): { (p2: T2, p4: T4, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + stub4: UnderscoreStatic, + p5: T5 + ): { (p1: T1, p2: T2, p4: T4, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5 + ): { (p3: T3, p4: T4, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5 + ): { (p1: T1, p3: T3, p4: T4, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5 + ): { (p2: T2, p3: T3, p4: T4, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5 + ): { (p1: T1, p2: T2, p3: T3, p4: T4, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + p1: T1, + p2: T2, + p3: T3, + p4: T4, + p5: T5, + p6: T6 + ): { (): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + p4: T4, + p5: T5, + p6: T6 + ): { (p1: T1): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + p4: T4, + p5: T5, + p6: T6 + ): { (p2: T2): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + p4: T4, + p5: T5, + p6: T6 + ): { (p1: T1, p2: T2): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + p4: T4, + p5: T5, + p6: T6 + ): { (p3: T3): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + p4: T4, + p5: T5, + p6: T6 + ): { (p1: T1, p3: T3): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4, + p5: T5, + p6: T6 + ): { (p2: T2, p3: T3): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4, + p5: T5, + p6: T6 + ): { (p1: T1, p2: T2, p3: T3): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + p1: T1, + p2: T2, + p3: T3, + stub4: UnderscoreStatic, + p5: T5, + p6: T6 + ): { (p4: T4): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + stub4: UnderscoreStatic, + p5: T5, + p6: T6 + ): { (p1: T1, p4: T4): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + stub4: UnderscoreStatic, + p5: T5, + p6: T6 + ): { (p2: T2, p4: T4): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + stub4: UnderscoreStatic, + p5: T5, + p6: T6 + ): { (p1: T1, p2: T2, p4: T4): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5, + p6: T6 + ): { (p3: T3, p4: T4): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5, + p6: T6 + ): { (p1: T1, p3: T3, p4: T4): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5, + p6: T6 + ): { (p2: T2, p3: T3, p4: T4): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5, + p6: T6 + ): { (p1: T1, p2: T2, p3: T3, p4: T4): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + p1: T1, + p2: T2, + p3: T3, + p4: T4, + stub5: UnderscoreStatic, + p6: T6 + ): { (p5: T5): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + p4: T4, + stub5: UnderscoreStatic, + p6: T6 + ): { (p1: T1, p5: T5): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + p4: T4, + stub5: UnderscoreStatic, + p6: T6 + ): { (p2: T2, p5: T5): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + p4: T4, + stub5: UnderscoreStatic, + p6: T6 + ): { (p1: T1, p2: T2, p5: T5): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + p4: T4, + stub5: UnderscoreStatic, + p6: T6 + ): { (p3: T3, p5: T5): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + p4: T4, + stub5: UnderscoreStatic, + p6: T6 + ): { (p1: T1, p3: T3, p5: T5): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4, + stub5: UnderscoreStatic, + p6: T6 + ): { (p2: T2, p3: T3, p5: T5): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4, + stub5: UnderscoreStatic, + p6: T6 + ): { (p1: T1, p2: T2, p3: T3, p5: T5): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + p1: T1, + p2: T2, + p3: T3, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6 + ): { (p4: T4, p5: T5): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6 + ): { (p1: T1, p4: T4, p5: T5): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6 + ): { (p2: T2, p4: T4, p5: T5): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6 + ): { (p1: T1, p2: T2, p4: T4, p5: T5): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6 + ): { (p3: T3, p4: T4, p5: T5): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6 + ): { (p1: T1, p3: T3, p4: T4, p5: T5): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6 + ): { (p2: T2, p3: T3, p4: T4, p5: T5): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6 + ): { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1 + ): { (p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + p2: T2 + ): { (p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + p2: T2 + ): { (p1: T1, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + p2: T2, + p3: T3 + ): { (p4: T4, p5: T5, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3 + ): { (p1: T1, p4: T4, p5: T5, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3 + ): { (p2: T2, p4: T4, p5: T5, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3 + ): { (p1: T1, p2: T2, p4: T4, p5: T5, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + p2: T2, + p3: T3, + p4: T4 + ): { (p5: T5, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + p4: T4 + ): { (p1: T1, p5: T5, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + p4: T4 + ): { (p2: T2, p5: T5, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + p4: T4 + ): { (p1: T1, p2: T2, p5: T5, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + p4: T4 + ): { (p3: T3, p5: T5, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + p4: T4 + ): { (p1: T1, p3: T3, p5: T5, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4 + ): { (p2: T2, p3: T3, p5: T5, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4 + ): { (p1: T1, p2: T2, p3: T3, p5: T5, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + p2: T2, + p3: T3, + p4: T4, + p5: T5 + ): { (p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + p4: T4, + p5: T5 + ): { (p1: T1, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + p4: T4, + p5: T5 + ): { (p2: T2, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + p4: T4, + p5: T5 + ): { (p1: T1, p2: T2, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + p4: T4, + p5: T5 + ): { (p3: T3, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + p4: T4, + p5: T5 + ): { (p1: T1, p3: T3, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4, + p5: T5 + ): { (p2: T2, p3: T3, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4, + p5: T5 + ): { (p1: T1, p2: T2, p3: T3, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + p2: T2, + p3: T3, + stub4: UnderscoreStatic, + p5: T5 + ): { (p4: T4, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + stub4: UnderscoreStatic, + p5: T5 + ): { (p1: T1, p4: T4, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + stub4: UnderscoreStatic, + p5: T5 + ): { (p2: T2, p4: T4, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + stub4: UnderscoreStatic, + p5: T5 + ): { (p1: T1, p2: T2, p4: T4, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5 + ): { (p3: T3, p4: T4, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5 + ): { (p1: T1, p3: T3, p4: T4, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5 + ): { (p2: T2, p3: T3, p4: T4, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5 + ): { (p1: T1, p2: T2, p3: T3, p4: T4, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + p2: T2, + p3: T3, + p4: T4, + p5: T5, + p6: T6 + ): { (p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + p4: T4, + p5: T5, + p6: T6 + ): { (p1: T1, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + p4: T4, + p5: T5, + p6: T6 + ): { (p2: T2, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + p4: T4, + p5: T5, + p6: T6 + ): { (p1: T1, p2: T2, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + p4: T4, + p5: T5, + p6: T6 + ): { (p3: T3, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + p4: T4, + p5: T5, + p6: T6 + ): { (p1: T1, p3: T3, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4, + p5: T5, + p6: T6 + ): { (p2: T2, p3: T3, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4, + p5: T5, + p6: T6 + ): { (p1: T1, p2: T2, p3: T3, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + p2: T2, + p3: T3, + stub4: UnderscoreStatic, + p5: T5, + p6: T6 + ): { (p4: T4, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + stub4: UnderscoreStatic, + p5: T5, + p6: T6 + ): { (p1: T1, p4: T4, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + stub4: UnderscoreStatic, + p5: T5, + p6: T6 + ): { (p2: T2, p4: T4, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + stub4: UnderscoreStatic, + p5: T5, + p6: T6 + ): { (p1: T1, p2: T2, p4: T4, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5, + p6: T6 + ): { (p3: T3, p4: T4, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5, + p6: T6 + ): { (p1: T1, p3: T3, p4: T4, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5, + p6: T6 + ): { (p2: T2, p3: T3, p4: T4, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5, + p6: T6 + ): { (p1: T1, p2: T2, p3: T3, p4: T4, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + p2: T2, + p3: T3, + p4: T4, + stub5: UnderscoreStatic, + p6: T6 + ): { (p5: T5, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + p4: T4, + stub5: UnderscoreStatic, + p6: T6 + ): { (p1: T1, p5: T5, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + p4: T4, + stub5: UnderscoreStatic, + p6: T6 + ): { (p2: T2, p5: T5, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + p4: T4, + stub5: UnderscoreStatic, + p6: T6 + ): { (p1: T1, p2: T2, p5: T5, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + p4: T4, + stub5: UnderscoreStatic, + p6: T6 + ): { (p3: T3, p5: T5, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + p4: T4, + stub5: UnderscoreStatic, + p6: T6 + ): { (p1: T1, p3: T3, p5: T5, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4, + stub5: UnderscoreStatic, + p6: T6 + ): { (p2: T2, p3: T3, p5: T5, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4, + stub5: UnderscoreStatic, + p6: T6 + ): { (p1: T1, p2: T2, p3: T3, p5: T5, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + p2: T2, + p3: T3, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6 + ): { (p4: T4, p5: T5, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6 + ): { (p1: T1, p4: T4, p5: T5, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6 + ): { (p2: T2, p4: T4, p5: T5, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6 + ): { (p1: T1, p2: T2, p4: T4, p5: T5, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6 + ): { (p3: T3, p4: T4, p5: T5, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6 + ): { (p1: T1, p3: T3, p4: T4, p5: T5, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6 + ): { (p2: T2, p3: T3, p4: T4, p5: T5, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6 + ): { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + p2: T2, + p3: T3, + p4: T4, + p5: T5, + p6: T6, + p7: T7 + ): { (): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + p4: T4, + p5: T5, + p6: T6, + p7: T7 + ): { (p1: T1): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + p4: T4, + p5: T5, + p6: T6, + p7: T7 + ): { (p2: T2): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + p4: T4, + p5: T5, + p6: T6, + p7: T7 + ): { (p1: T1, p2: T2): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + p4: T4, + p5: T5, + p6: T6, + p7: T7 + ): { (p3: T3): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + p4: T4, + p5: T5, + p6: T6, + p7: T7 + ): { (p1: T1, p3: T3): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4, + p5: T5, + p6: T6, + p7: T7 + ): { (p2: T2, p3: T3): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4, + p5: T5, + p6: T6, + p7: T7 + ): { (p1: T1, p2: T2, p3: T3): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + p2: T2, + p3: T3, + stub4: UnderscoreStatic, + p5: T5, + p6: T6, + p7: T7 + ): { (p4: T4): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + stub4: UnderscoreStatic, + p5: T5, + p6: T6, + p7: T7 + ): { (p1: T1, p4: T4): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + stub4: UnderscoreStatic, + p5: T5, + p6: T6, + p7: T7 + ): { (p2: T2, p4: T4): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + stub4: UnderscoreStatic, + p5: T5, + p6: T6, + p7: T7 + ): { (p1: T1, p2: T2, p4: T4): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5, + p6: T6, + p7: T7 + ): { (p3: T3, p4: T4): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5, + p6: T6, + p7: T7 + ): { (p1: T1, p3: T3, p4: T4): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5, + p6: T6, + p7: T7 + ): { (p2: T2, p3: T3, p4: T4): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5, + p6: T6, + p7: T7 + ): { (p1: T1, p2: T2, p3: T3, p4: T4): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + p2: T2, + p3: T3, + p4: T4, + stub5: UnderscoreStatic, + p6: T6, + p7: T7 + ): { (p5: T5): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + p4: T4, + stub5: UnderscoreStatic, + p6: T6, + p7: T7 + ): { (p1: T1, p5: T5): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + p4: T4, + stub5: UnderscoreStatic, + p6: T6, + p7: T7 + ): { (p2: T2, p5: T5): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + p4: T4, + stub5: UnderscoreStatic, + p6: T6, + p7: T7 + ): { (p1: T1, p2: T2, p5: T5): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + p4: T4, + stub5: UnderscoreStatic, + p6: T6, + p7: T7 + ): { (p3: T3, p5: T5): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + p4: T4, + stub5: UnderscoreStatic, + p6: T6, + p7: T7 + ): { (p1: T1, p3: T3, p5: T5): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4, + stub5: UnderscoreStatic, + p6: T6, + p7: T7 + ): { (p2: T2, p3: T3, p5: T5): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4, + stub5: UnderscoreStatic, + p6: T6, + p7: T7 + ): { (p1: T1, p2: T2, p3: T3, p5: T5): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + p2: T2, + p3: T3, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6, + p7: T7 + ): { (p4: T4, p5: T5): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6, + p7: T7 + ): { (p1: T1, p4: T4, p5: T5): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6, + p7: T7 + ): { (p2: T2, p4: T4, p5: T5): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6, + p7: T7 + ): { (p1: T1, p2: T2, p4: T4, p5: T5): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6, + p7: T7 + ): { (p3: T3, p4: T4, p5: T5): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6, + p7: T7 + ): { (p1: T1, p3: T3, p4: T4, p5: T5): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6, + p7: T7 + ): { (p2: T2, p3: T3, p4: T4, p5: T5): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6, + p7: T7 + ): { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + p2: T2, + p3: T3, + p4: T4, + p5: T5, + stub6: UnderscoreStatic, + p7: T7 + ): { (p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + p4: T4, + p5: T5, + stub6: UnderscoreStatic, + p7: T7 + ): { (p1: T1, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + p4: T4, + p5: T5, + stub6: UnderscoreStatic, + p7: T7 + ): { (p2: T2, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + p4: T4, + p5: T5, + stub6: UnderscoreStatic, + p7: T7 + ): { (p1: T1, p2: T2, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + p4: T4, + p5: T5, + stub6: UnderscoreStatic, + p7: T7 + ): { (p3: T3, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + p4: T4, + p5: T5, + stub6: UnderscoreStatic, + p7: T7 + ): { (p1: T1, p3: T3, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4, + p5: T5, + stub6: UnderscoreStatic, + p7: T7 + ): { (p2: T2, p3: T3, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4, + p5: T5, + stub6: UnderscoreStatic, + p7: T7 + ): { (p1: T1, p2: T2, p3: T3, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + p2: T2, + p3: T3, + stub4: UnderscoreStatic, + p5: T5, + stub6: UnderscoreStatic, + p7: T7 + ): { (p4: T4, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + stub4: UnderscoreStatic, + p5: T5, + stub6: UnderscoreStatic, + p7: T7 + ): { (p1: T1, p4: T4, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + stub4: UnderscoreStatic, + p5: T5, + stub6: UnderscoreStatic, + p7: T7 + ): { (p2: T2, p4: T4, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + stub4: UnderscoreStatic, + p5: T5, + stub6: UnderscoreStatic, + p7: T7 + ): { (p1: T1, p2: T2, p4: T4, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5, + stub6: UnderscoreStatic, + p7: T7 + ): { (p3: T3, p4: T4, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5, + stub6: UnderscoreStatic, + p7: T7 + ): { (p1: T1, p3: T3, p4: T4, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5, + stub6: UnderscoreStatic, + p7: T7 + ): { (p2: T2, p3: T3, p4: T4, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5, + stub6: UnderscoreStatic, + p7: T7 + ): { (p1: T1, p2: T2, p3: T3, p4: T4, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + p2: T2, + p3: T3, + p4: T4, + stub5: UnderscoreStatic, + stub6: UnderscoreStatic, + p7: T7 + ): { (p5: T5, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + p4: T4, + stub5: UnderscoreStatic, + stub6: UnderscoreStatic, + p7: T7 + ): { (p1: T1, p5: T5, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + p4: T4, + stub5: UnderscoreStatic, + stub6: UnderscoreStatic, + p7: T7 + ): { (p2: T2, p5: T5, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + p4: T4, + stub5: UnderscoreStatic, + stub6: UnderscoreStatic, + p7: T7 + ): { (p1: T1, p2: T2, p5: T5, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + p4: T4, + stub5: UnderscoreStatic, + stub6: UnderscoreStatic, + p7: T7 + ): { (p3: T3, p5: T5, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + p4: T4, + stub5: UnderscoreStatic, + stub6: UnderscoreStatic, + p7: T7 + ): { (p1: T1, p3: T3, p5: T5, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4, + stub5: UnderscoreStatic, + stub6: UnderscoreStatic, + p7: T7 + ): { (p2: T2, p3: T3, p5: T5, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4, + stub5: UnderscoreStatic, + stub6: UnderscoreStatic, + p7: T7 + ): { (p1: T1, p2: T2, p3: T3, p5: T5, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + p2: T2, + p3: T3, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + stub6: UnderscoreStatic, + p7: T7 + ): { (p4: T4, p5: T5, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + stub6: UnderscoreStatic, + p7: T7 + ): { (p1: T1, p4: T4, p5: T5, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + stub6: UnderscoreStatic, + p7: T7 + ): { (p2: T2, p4: T4, p5: T5, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + stub6: UnderscoreStatic, + p7: T7 + ): { (p1: T1, p2: T2, p4: T4, p5: T5, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + stub6: UnderscoreStatic, + p7: T7 + ): { (p3: T3, p4: T4, p5: T5, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + stub6: UnderscoreStatic, + p7: T7 + ): { (p1: T1, p3: T3, p4: T4, p5: T5, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + stub6: UnderscoreStatic, + p7: T7 + ): { (p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + stub6: UnderscoreStatic, + p7: T7 + ): { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T8 }; /** * Memoizes a given function by caching the computed result. Useful for speeding up slow-running computations. @@ -1170,7 +3446,7 @@ interface UnderscoreStatic { * @return List of all the values on `object`. **/ values(object: any): any[]; - + /** * Like map, but for objects. Transform the value of each property in turn. * @param object The object to transform @@ -1179,7 +3455,7 @@ interface UnderscoreStatic { * @return a new _.Dictionary of property values */ mapObject(object: _.Dictionary, iteratee: (val: T, key: string, object: _.Dictionary) => U, context?: any): _.Dictionary; - + /** * Like map, but for objects. Transform the value of each property in turn. * @param object The object to transform @@ -1187,7 +3463,7 @@ interface UnderscoreStatic { * @param context The optional context (value of `this`) to bind to */ mapObject(object: any, iteratee: (val: any, key: string, object: any) => T, context?: any): _.Dictionary; - + /** * Like map, but for objects. Retrieves a property from each entry in the object, as if by _.property * @param object The object to transform @@ -1242,7 +3518,7 @@ interface UnderscoreStatic { extendOwn( destination: any, ...source: any[]): any; - + /** * Like extend, but only copies own properties over to the destination object. (alias: extendOwn) */ @@ -1487,7 +3763,7 @@ interface UnderscoreStatic { constant(value: T): () => T; /** - * Returns undefined irrespective of the arguments passed to it. Useful as the default + * Returns undefined irrespective of the arguments passed to it. Useful as the default * for optional callback arguments. * Note there is no way to indicate a 'undefined' return, so it is currently typed as void. * @return undefined @@ -1590,7 +3866,7 @@ interface UnderscoreStatic { * @return Returns the compiled Underscore HTML template. **/ template(templateString: string, settings?: _.TemplateSettings): (...data: any[]) => string; - + /** * By default, Underscore uses ERB-style template delimiters, change the * following template settings to use alternative delimiters. @@ -3305,7 +5581,7 @@ interface _Chain { /************* * * Array proxy * ************** */ - + /** * Returns a new array comprised of the array on which it is called * joined with the array(s) and/or value(s) provided as arguments. From d71d71fee8d13d71eea3d6b44afbd36abcc38210 Mon Sep 17 00:00:00 2001 From: Jason Killian Date: Fri, 4 Dec 2015 11:23:26 -0500 Subject: [PATCH 02/65] Update react-day-picker typings for version 1.2.0 --- react-day-picker/react-day-picker-tests.tsx | 14 ++++++++++ react-day-picker/react-day-picker.d.ts | 30 ++++++++++++++------- 2 files changed, 35 insertions(+), 9 deletions(-) diff --git a/react-day-picker/react-day-picker-tests.tsx b/react-day-picker/react-day-picker-tests.tsx index 984834dfd6..3afdf07343 100644 --- a/react-day-picker/react-day-picker-tests.tsx +++ b/react-day-picker/react-day-picker-tests.tsx @@ -20,3 +20,17 @@ function MyComponent() { } DayPicker2.DateUtils.clone(new Date()); DayPicker2.DateUtils.isDayInRange(new Date(), { from: new Date() }); + +// test interface for captionElement prop +interface MyCaptionProps extends ReactDayPicker.CaptionElementProps { } +class Caption extends React.Component { + render() { + const { date, locale, localeUtils, onClick } = this.props; + return ( +
+ { localeUtils.formatMonthTitle(date, locale) } +
+ ); + } +} +}/> diff --git a/react-day-picker/react-day-picker.d.ts b/react-day-picker/react-day-picker.d.ts index 94214ec455..921add78c9 100644 --- a/react-day-picker/react-day-picker.d.ts +++ b/react-day-picker/react-day-picker.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-day-picker v1.1.4 +// Type definitions for react-day-picker v1.2.0 // Project: https://github.com/gpbl/react-day-picker // Definitions by: Giampaolo Bellavite , Jason Killian // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -13,18 +13,28 @@ declare module "react-day-picker" { declare var DayPicker: typeof ReactDayPicker.DayPicker; declare namespace ReactDayPicker { + import React = __React; + interface LocaleUtils { formatMonthTitle: (month: Date, locale: string) => string; formatWeekdayShort: (weekday: number, locale: string) => string; formatWeekdayLong: (weekday: number, locale: string) => string; getFirstDayOfWeek: (locale: string) => number; + getMonths: (locale: string) => string[]; } interface Modifiers { [name: string]: (date: Date) => boolean; } - interface Props extends __React.Props{ + interface CaptionElementProps extends React.Props { + date?: Date; + localeUtils?: LocaleUtils; + locale?: string; + onClick?: React.MouseEventHandler; + } + + interface Props extends React.Props{ modifiers?: Modifiers; initialMonth?: Date; numberOfMonths?: number; @@ -35,18 +45,19 @@ declare namespace ReactDayPicker { toMonth?: Date; localeUtils?: LocaleUtils; locale?: string; - onDayClick?: (e: __React.SyntheticEvent, day: Date, modifiers: string[]) => any; - onDayTouchTap?: (e: __React.SyntheticEvent, day: Date, modifiers: string[]) => any; - onDayMouseEnter?: (e: __React.SyntheticEvent, day: Date, modifiers: string[]) => any; - onDayMouseLeave?: (e: __React.SyntheticEvent, day: Date, modifiers: string[]) => any; + captionElement?: React.ReactElement; + onDayClick?: (e: React.SyntheticEvent, day: Date, modifiers: string[]) => any; + onDayTouchTap?: (e: React.SyntheticEvent, day: Date, modifiers: string[]) => any; + onDayMouseEnter?: (e: React.SyntheticEvent, day: Date, modifiers: string[]) => any; + onDayMouseLeave?: (e: React.SyntheticEvent, day: Date, modifiers: string[]) => any; onMonthChange?: (month: Date) => any; - onCaptionClick?: (e: __React.SyntheticEvent, month: Date) => any; + onCaptionClick?: (e: React.SyntheticEvent, month: Date) => any; className?: string; - style?: __React.CSSProperties; + style?: React.CSSProperties; tabIndex?: number; } - class DayPicker extends __React.Component { + class DayPicker extends React.Component { showMonth(month: Date): void; showPreviousMonth(): void; showNextMonth(): void; @@ -55,6 +66,7 @@ declare namespace ReactDayPicker { namespace DayPicker { var LocaleUtils: LocaleUtils; namespace DateUtils { + function addMonths(d: Date, n: number): Date; function clone(d: Date): Date; function isSameDay(d1?: Date, d2?: Date): boolean; function isPastDay(d: Date): boolean; From d76bfa33948303098043b755be388a880bdef6b0 Mon Sep 17 00:00:00 2001 From: Vincent Siao Date: Wed, 9 Dec 2015 11:54:15 -0800 Subject: [PATCH 03/65] [React] Add SFC displayName and fix onlyChild type - `StatelessComponent` is missing an optional `displayName` property - `ReactChildren.only` always returns a `ReactElement` - add tests for the above and `ReactTestUtils.renderIntoDocument` --- react/react-tests.ts | 11 ++++++++--- react/react.d.ts | 3 ++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/react/react-tests.ts b/react/react-tests.ts index 53861d35cb..13e2ab12f0 100644 --- a/react/react-tests.ts +++ b/react/react-tests.ts @@ -146,9 +146,10 @@ var StatelessComponent = (props: SCProps) => { return React.DOM.div(null, props.foo); }; -// Must explicitly type-annotate to add defaultProps/contextTypes +// Must explicitly type-annotate to add displayName/defaultProps/contextTypes var StatelessComponent2: React.StatelessComponent = (props: SCProps) => React.DOM.div(null, props.foo); +StatelessComponent2.displayName = "StatelessComponent2"; StatelessComponent2.defaultProps = { foo: 42 }; @@ -405,7 +406,8 @@ var mappedChildrenArray: number[] = React.Children.map(children, (child) => { return 42; }); React.Children.forEach(children, (child) => {}); var nChildren: number = React.Children.count(children); -var onlyChild = React.Children.only([null, [[["Hallo"], true]], false]); +var onlyChild: React.ReactElement = React.Children.only(React.DOM.div()); // ok +onlyChild = React.Children.only([null, [[["Hallo"], true]], false]); // error var childrenToArray: React.ReactChild[] = React.Children.toArray(children); // @@ -521,7 +523,10 @@ React.createClass({ // // TestUtils addon // -------------------------------------------------------------------------- -var node: Element; + +var inst: ModernComponent = TestUtils.renderIntoDocument(element); +var node: Element = TestUtils.renderIntoDocument(React.DOM.div()); + TestUtils.Simulate.click(node); TestUtils.Simulate.change(node); TestUtils.Simulate.keyDown(node, { key: "Enter" }); diff --git a/react/react.d.ts b/react/react.d.ts index fb04cf0f53..c322d9a540 100644 --- a/react/react.d.ts +++ b/react/react.d.ts @@ -148,6 +148,7 @@ declare namespace __React { propTypes?: ValidationMap

; contextTypes?: ValidationMap; defaultProps?: P; + displayName?: string; } interface ComponentClass

{ @@ -2070,7 +2071,7 @@ declare namespace __React { map(children: ReactNode, fn: (child: ReactChild, index: number) => T): T[]; forEach(children: ReactNode, fn: (child: ReactChild, index: number) => any): void; count(children: ReactNode): number; - only(children: ReactNode): ReactChild; + only(children: ReactNode): ReactElement; toArray(children: ReactNode): ReactChild[]; } From 8b6adacbc13889d3bde7e9af49750cf28ea54a0d Mon Sep 17 00:00:00 2001 From: CaselIT Date: Mon, 25 Jan 2016 19:10:08 +0100 Subject: [PATCH 04/65] Added jsend type definitions Added typing for the jsend library https://github.com/Prestaul/jsend --- jsend/jsend-test.ts | 10 ++++++++++ jsend/jsend.d.ts | 46 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 jsend/jsend-test.ts create mode 100644 jsend/jsend.d.ts diff --git a/jsend/jsend-test.ts b/jsend/jsend-test.ts new file mode 100644 index 0000000000..72598c904b --- /dev/null +++ b/jsend/jsend-test.ts @@ -0,0 +1,10 @@ +/// + +import jsend = require('jsend'); + +var valid: boolean = jsend.isValid({ status: 'success' }); + +var success = jsend.success('data'); +var error = jsend.error('some error'); +error = jsend.error({ message: 'nessage', code: 123 }); + diff --git a/jsend/jsend.d.ts b/jsend/jsend.d.ts new file mode 100644 index 0000000000..4c87aad340 --- /dev/null +++ b/jsend/jsend.d.ts @@ -0,0 +1,46 @@ +// Type definitions for jsend 1.0.2 +// Project: https://github.com/Prestaul/jsend +// Definitions by: Federico Caselli +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module Express { + export interface Response { + jsend: jsend.jsendExpress; + } +} + +declare module jsend { + interface JSendObject { + status: string; + code?: number; + data?: any; + message?: string; + } + + interface jsendCore { + success(data: Object): JSendObject; + fail(data: Object): JSendObject; + error(message: string | { message: string, code?: number, data?: Object }): JSendObject; + } + + interface jsendExpress extends jsendCore { + (err: string | Object, json?: Object): void + } + + interface jsend extends jsendCore { + isValid(json: Object): boolean; + forward(json: Object, done: (err: any, data: any) => any):void; + fromArguments(err: string | Object, json?: Object): JSendObject; + middleware(req: any, res: any, next: Function): any; + } + + interface jsendExport extends jsend { + (config?: { strict: boolean }, host?: Object): jsend + } + var jsend: jsendExport; +} + +declare module "jsend" { + export = jsend.jsend; +} + From 24ac47eacce9fc1c1204638e4ef56e01e3cba9a3 Mon Sep 17 00:00:00 2001 From: tkqubo Date: Tue, 26 Jan 2016 20:41:14 +0900 Subject: [PATCH 05/65] mock-fs 3.6.0 --- mock-fs/mock-fs-tests.ts | 7 +++++++ mock-fs/mock-fs.d.ts | 12 +++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/mock-fs/mock-fs-tests.ts b/mock-fs/mock-fs-tests.ts index d4c5eae4f7..ef628ce588 100644 --- a/mock-fs/mock-fs-tests.ts +++ b/mock-fs/mock-fs-tests.ts @@ -77,3 +77,10 @@ var mockedFS = mock.fs({ if (mockedFS.readFileSync('/file', { encoding: 'utf8' }) === 'blah') { console.log('woo'); } + +mock({ + 'path/to/file.txt': 'file content here' +}, { + createTmp: true, + createCwd: false +}); diff --git a/mock-fs/mock-fs.d.ts b/mock-fs/mock-fs.d.ts index 539e74e869..fb37173b2c 100644 --- a/mock-fs/mock-fs.d.ts +++ b/mock-fs/mock-fs.d.ts @@ -1,4 +1,4 @@ -// Type definitions for mock-fs 2.5.0 +// Type definitions for mock-fs 3.6.0 // Project: https://github.com/tschaub/mock-fs // Definitions by: Wim Looman // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -8,7 +8,7 @@ declare module "mock-fs" { import fs = require("fs"); - function mock(config?: mock.Config): void; + function mock(config?: mock.Config, options?: mock.Options): void; module mock { function file(config: FileConfig): File; @@ -17,12 +17,17 @@ declare module "mock-fs" { function restore(): void; - function fs(config?: Config): typeof fs; + function fs(config?: Config, options?: Options): typeof fs; interface Config { [path: string]: string | Buffer | File | Directory | Symlink | Config; } + interface Options { + createCwd?: boolean; + createTmp?: boolean; + } + interface CommonConfig { mode?: number; uid?: number; @@ -30,6 +35,7 @@ declare module "mock-fs" { atime?: Date; ctime?: Date; mtime?: Date; + birthtime?: Date; } interface FileConfig extends CommonConfig { From 10f93d2933de8de74a0521807aa91162588c84c5 Mon Sep 17 00:00:00 2001 From: Igor Kriklivetc Date: Tue, 26 Jan 2016 14:48:53 +0300 Subject: [PATCH 06/65] Update to 15.2.4 --- devextreme/devextreme-15.2.3.d.ts | 7315 +++++++++++++++++++++++++++++ devextreme/devextreme.d.ts | 70 +- 2 files changed, 7355 insertions(+), 30 deletions(-) create mode 100644 devextreme/devextreme-15.2.3.d.ts diff --git a/devextreme/devextreme-15.2.3.d.ts b/devextreme/devextreme-15.2.3.d.ts new file mode 100644 index 0000000000..706b4bded7 --- /dev/null +++ b/devextreme/devextreme-15.2.3.d.ts @@ -0,0 +1,7315 @@ +// Type definitions for DevExtreme 15.2.3 +// Project: http://js.devexpress.com/ +// Definitions by: DevExpress Inc. +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module DevExpress { + /** A mixin that provides a capability to fire and subscribe to events. */ + export interface EventsMixin { + /** Subscribes to a specified event. */ + on(eventName: string, eventHandler: Function): T; + /** Subscribes to the specified events. */ + on(events: { [eventName: string]: Function; }): T; + /** Detaches all event handlers from the specified event. */ + off(eventName: string): Object; + /** Detaches a particular event handler from the specified event. */ + off(eventName: string, eventHandler: Function): T; + } + /** An object that serves as a namespace for the methods required to perform validation. */ + export module validationEngine { + export interface IValidator { + validate(): ValidatorValidationResult; + reset(): void; + } + export interface ValidatorValidationResult { + isValid: boolean; + name?: string; + value: any; + brokenRule: any; + validationRules: any[]; + } + export interface ValidationGroupValidationResult { + isValid: boolean; + brokenRules: any[]; + validators: IValidator[]; + } + export interface GroupConfig extends EventsMixin { + group: any; + validators: IValidator[]; + validate(): ValidationGroupValidationResult; + reset(): void; + } + /** Provides access to the object that represents the specified validation group. */ + export function getGroupConfig(group: any): GroupConfig + /** Provides access to the object that represents the default validation group. */ + export function getGroupConfig(): GroupConfig + /** Validates rules of the validators that belong to the specified validation group. */ + export function validateGroup(group: any): ValidationGroupValidationResult; + /** Validates rules of the validators that belong to the default validation group. */ + export function validateGroup(): ValidationGroupValidationResult; + /** Resets the values and validation result of the editors that belong to the specified validation group. */ + export function resetGroup(group: any): void; + /** Resets the values and validation result of the editors that belong to the default validation group. */ + export function resetGroup(): void; + /** Validates the rules that are defined within the dxValidator objects that are registered for the specified ViewModel. */ + export function validateModel(model: Object): ValidationGroupValidationResult; + /** Registers all the dxValidator objects by which the fields of the specified ViewModel are extended. */ + export function registerModelForValidation(model: Object) : void; + } + export var hardwareBackButton: JQueryCallback; + /** Processes the hardware back button click. */ + export function processHardwareBackButton(): void; + /** Hides the last displayed overlay widget. */ + export function hideTopOverlay(): boolean; + /** Specifies whether or not the entire application/site supports right-to-left representation. */ + export var rtlEnabled: boolean; + /** Registers a new component in the DevExpress.ui namespace as a jQuery plugin, Angular directive and Knockout binding. */ + export function registerComponent(name: string, componentClass: Object): void; + /** Registers a new component in the specified namespace as a jQuery plugin, Angular directive and Knockout binding. */ + export function registerComponent(name: string, namespace: Object, componentClass: Object): void; + export function requestAnimationFrame(callback: Function): number; + export function cancelAnimationFrame(requestID: number): void; + /** Custom Knockout binding that links an HTML element with a specific action. */ + export class Action { } + /** Used to get URLs that vary in a locally running application and the application running on production. */ + export class EndpointSelector { + constructor(options: { + [key: string]: { + local?: string; + production?: string; + } + }); + /** Returns a local or a productional URL depending on how the application is currently running. */ + urlFor(key: string): string; + } + /** An object that serves as a namespace for the methods that are used to animate UI elements. */ + export module fx { + /** Defines animation options. */ + export interface AnimationOptions { + /** A function called after animation is completed. */ + complete?: (element: JQuery, config: AnimationOptions) => void; + /** A number specifying wait time before animation execution. */ + delay?: number; + /** A number specifying the time period to wait before the animation of the next stagger item starts. */ + staggerDelay?: number; + /** A number specifying the time in milliseconds spent on animation. */ + duration?: number; + /** A string specifying the type of an easing function used for animation. */ + easing?: string; + /** Specifies the initial animation state. */ + from?: any; + /** A function called before animation is started. */ + start?: (element: JQuery, config: AnimationOptions) => void; + /** Specifies a final animation state. */ + to?: any; + /** A string value specifying the animation type. */ + type?: string; + /** Specifies the animation direction for the "slideIn" and "slideOut" animation types. */ + direction?: string; + } + /** Animates the specified element. */ + export function animate(element: HTMLElement, config: AnimationOptions): Object; + /** Returns a value indicating whether the specified element is being animated. */ + export function isAnimating(element: HTMLElement): boolean; + /** Stops the animation. */ + export function stop(element: HTMLElement, jumpToEnd: boolean): void; + } + /** The manager that performs several specified animations at a time. */ + export class TransitionExecutor { + /** Deletes all the animations registered in the Transition Executor by using the enter(elements, animation) and leave(elements, animation) methods. */ + reset(): void; + /** Registers a set of elements that should be animated as "entering" using the specified animation configuration. */ + enter(elements: JQuery, animation: any): void; + /** Registers a set of elements that should be animated as "leaving" using the specified animation configuration. */ + leave(elements: JQuery, animation: any): void; + /** Starts all the animations registered using the enter(elements, animation) and leave(elements, animation) methods beforehand. */ + start(config: Object): JQueryPromise; + /** Stops all started animations. */ + stop(): void; + } + export class AnimationPresetCollection { + /** Resets all the changes made in the animation repository. */ + resetToDefaults(): void; + /** Deletes the specified animation or clears all the animation repository, if an animation name is not passed. */ + clear(name: string): void; + /** Adds the specified animation preset to the animation repository by the specified name. */ + registerPreset(name: string, config: any): void; + /** Applies the changes made in the animation repository. */ + applyChanges(): void; + /** Returns the configuration of the animation found in the animation repository by the specified name for the current device. */ + getPreset(name: string): void; + /** Registers predefined animations in the animation repository. */ + registerDefaultPresets(): void; + } + /** A repository of animations. */ + export var animationPresets: AnimationPresetCollection; + /** The device object defines the device on which the application is running. */ + export interface Device { + /** Indicates whether or not the device platform is Android. */ + android?: boolean; + /** Specifies the type of the device on which the application is running. */ + deviceType?: string; + /** Indicates whether or not the device platform is generic, which means that the application will look and behave according to a generic "light" or "dark" theme. */ + generic?: boolean; + /** Indicates whether or not the device platform is iOS. */ + ios?: boolean; + /** Indicates whether or not the device type is 'phone'. */ + phone?: boolean; + /** Specifies the platform of the device on which the application is running. */ + platform?: string; + /** Indicates whether or not the device type is 'tablet'. */ + tablet?: boolean; + /** Specifies an array with the major and minor versions of the device platform. */ + version?: Array; + /** Indicates whether or not the device platform is Windows. */ + win?: boolean; + /** Specifies a performance grade of the current device. */ + grade?: string; + } + export class Devices implements EventsMixin { + constructor(options: { window: Window }); + /** Overrides actual device information to force the application to operate as if it was running on the specified device. */ + current(deviceName: any): void; + /** Returns information about the current device. */ + current(): Device; + orientationChanged: JQueryCallback; + /** Returns the current device orientation. */ + orientation(): string; + /** Returns real information about the current device regardless of the value passed to the devices.current(deviceName) method. */ + real(): Device; + on(eventName: "orientationChanged", eventHandler: (e: { orientation: string }) => void): Devices; + on(eventName: string, eventHandler: Function): Devices; + on(events: { [eventName: string]: Function; }): Devices; + off(eventName: "orientationChanged"): Devices; + off(eventName: string): Devices; + off(eventName: "orientationChanged", eventHandler: (e: { orientation: string }) => void): Devices; + off(eventName: string, eventHandler: Function): Devices; + } + /** An object that serves as a namespace for the methods and events specifying information on the current device. */ + export var devices: Devices; + /** The position object specifies the widget positioning options. */ + export interface PositionOptions { + /** The target element position that the widget is positioned against. */ + at?: string; + /** The element within which the widget is positioned. */ + boundary?: Element; + /** A string value holding horizontal and vertical offset from the window's boundaries. */ + boundaryOffset?: string; + /** Specifies how to move the widget if it overflows the screen. */ + collision?: any; + /** The position of the widget to align against the target element. */ + my?: string; + /** The target element that the widget is positioned against. */ + of?: HTMLElement; + /** A string value holding horizontal and vertical offset in pixels, separated by a space (e.g., "5 -10"). */ + offset?: string; + } + export interface ComponentOptions { + /** A handler for the initialized event. */ + onInitialized?: Function; + /** A handler for the optionChanged event. */ + onOptionChanged?: Function; + /** A handler for the disposing event. */ + onDisposing?: Function; + } + /** A base class for all components and widgets. */ + export class Component { + constructor(options?: ComponentOptions) + /** Prevents the component from refreshing until the endUpdate method is called. */ + beginUpdate(): void; + /** Enables the component to refresh after the beginUpdate method call. */ + endUpdate(): void; + /** Returns an instance of this component class. */ + instance(): Component; + /** Returns the configuration options of this component. */ + option(): { + [optionKey: string]: any; + }; + /** Sets one or more options of this component. */ + option(options: { + [optionKey: string]: any; + }): void; + /** Gets the value of the specified configuration option of this component. */ + option(optionName: string): any; + /** Sets a value to the specified configuration option of this component. */ + option(optionName: string, optionValue: any): void; + } + export interface DOMComponentOptions extends ComponentOptions { + /** Specifies whether or not the current component supports a right-to-left representation. */ + rtlEnabled?: boolean; + /** Specifies the height of the widget. */ + height?: any; + /** Specifies the width of the widget. */ + width?: any; + } + /** A base class for all components. */ + export class DOMComponent extends Component { + constructor(element: JQuery, options?: DOMComponentOptions); + constructor(element: HTMLElement, options?: DOMComponentOptions); + /** Returns the root HTML element of the widget. */ + element(): JQuery; + /** Specifies the device-dependent default configuration options for this component. */ + static defaultOptions(rule: { + device?: any; + options?: any; + }): void; + } + export module data { + export interface ODataError extends Error { + httpStatus?: number; + errorDetails?: any; + } + export interface StoreOptions { + /** A handler for the modified event. */ + onModified?: () => void; + /** A handler for the modifying event. */ + onModifying?: () => void; + /** A handler for the removed event. */ + onRemoved?: (key: any) => void; + /** A handler for the removing event. */ + onRemoving?: (key: any) => void; + /** A handler for the updated event. */ + onUpdated?: (key: any, values: Object) => void; + /** A handler for the updating event. */ + onUpdating?: (key: any, values: Object) => void; + /** A handler for the loaded event. */ + onLoaded?: (result: Array) => void; + /** A handler for the loading event. */ + onLoading?: (loadOptions: LoadOptions) => void; + /** A handler for the inserted event. */ + onInserted?: (values: Object, key: any) => void; + /** A handler for the inserting event. */ + onInserting?: (values: Object) => void; + /** Specifies the function called when the Store causes an error. */ + errorHandler?: (e: Error) => void; + /** Specifies the key properties within the data associated with the Store. */ + key?: any; + } + export interface LoadOptions { + filter?: Object; + sort?: Object; + select?: Object; + expand?: Object; + group?: Object; + skip?: number; + take?: number; + userData?: Object; + requireTotalCount?: boolean; + } + /** The base class for all Stores. */ + export class Store implements EventsMixin { + constructor(options?: StoreOptions); + /** Returns the data item specified by the key. */ + byKey(key: any): JQueryPromise; + /** Adds an item to the data associated with this Store. */ + insert(values: Object): JQueryPromise; + /** Returns the key expression specified via the key configuration option. */ + key(): any; + /** Returns the key of the Store item that matches the specified object. */ + keyOf(obj: Object): any; + /** Starts loading data. */ + load(obj?: LoadOptions): JQueryPromise; + /** Removes the data item specified by the key. */ + remove(key: any): JQueryPromise; + /** Obtains the total count of items that will be returned by the load() function. */ + totalCount(options?: { + filter?: Object; + group?: Object; + }): JQueryPromise; + /** Updates the data item specified by the key. */ + update(key: any, values: Object): JQueryPromise; + on(eventName: "removing", eventHandler: (key: any) => void): Store; + on(eventName: "removed", eventHandler: (key: any) => void): Store; + on(eventName: "updating", eventHandler: (key: any, values: Object) => void): Store; + on(eventName: "updated", eventHandler: (key: any, values: Object) => void): Store; + on(eventName: "inserting", eventHandler: (values: Object) => void): Store; + on(eventName: "inserted", eventHandler: (values: Object, key: any) => void): Store; + on(eventName: "modifying", eventHandler: () => void): Store; + on(eventName: "modified", eventHandler: () => void): Store; + on(eventName: "loading", eventHandler: (loadOptions: LoadOptions) => void): Store; + on(eventName: "loaded", eventHandler: (result: Array) => void): Store; + on(eventName: string, eventHandler: Function): Store; + on(events: { [eventName: string]: Function; }): Store; + off(eventName: "removing"): Store; + off(eventName: "removed"): Store; + off(eventName: "updating"): Store; + off(eventName: "updated"): Store; + off(eventName: "inserting"): Store; + off(eventName: "inserted"): Store; + off(eventName: "modifying"): Store; + off(eventName: "modified"): Store; + off(eventName: "loading"): Store; + off(eventName: "loaded"): Store; + off(eventName: string): Store; + off(eventName: "removing", eventHandler: (key: any) => void): Store; + off(eventName: "removed", eventHandler: (key: any) => void): Store; + off(eventName: "updating", eventHandler: (key: any, values: Object) => void): Store; + off(eventName: "updated", eventHandler: (key: any, values: Object) => void): Store; + off(eventName: "inserting", eventHandler: (values: Object) => void): Store; + off(eventName: "inserted", eventHandler: (values: Object, key: any) => void): Store; + off(eventName: "modifying", eventHandler: () => void): Store; + off(eventName: "modified", eventHandler: () => void): Store; + off(eventName: "loading", eventHandler: (loadOptions: LoadOptions) => void): Store; + off(eventName: "loaded", eventHandler: (result: Array) => void): Store; + off(eventName: string, eventHandler: Function): Store; + } + export interface ArrayStoreOptions extends StoreOptions { + /** Specifies the array associated with this Store. */ + data?: Array; + } + /** A Store accessing an in-memory array. */ + export class ArrayStore extends Store { + constructor(options?: ArrayStoreOptions); + /** Clears all data associated with the current ArrayStore. */ + clear(): void; + /** Creates the Query object for the underlying array. */ + createQuery(): Query; + } + interface Promise { + then(doneFn?: Function, failFn?: Function, progressFn?: Function): Promise; + } + export interface CustomStoreOptions extends StoreOptions { + /** The user implementation of the byKey(key, extraOptions) method. */ + byKey?: (key: any) => Promise; + /** The user implementation of the insert(values) method. */ + insert?: (values: Object) => Promise; + /** The user implementation of the load(options) method. */ + load?: (options?: LoadOptions) => Promise; + /** The user implementation of the remove(key) method. */ + remove?: (key: any) => Promise; + /** The user implementation of the totalCount(options) method. */ + totalCount?: (options?: { + filter?: Object; + group?: Object; + }) => Promise; + /** The user implementation of the update(key, values) method. */ + update?: (key: any, values: Object) => Promise; + } + /** A Store object that enables you to implement your own data access logic. */ + export class CustomStore extends Store { + constructor(options: CustomStoreOptions); + } + export interface DataSourceOptions { + /** Specifies data filtering conditions. */ + filter?: Object; + /** Specifies data grouping conditions. */ + group?: Object; + /** The item mapping function. */ + map?: (record: any) => any; + /** Specifies the maximum number of items the page can contain. */ + pageSize?: number; + /** Specifies whether a DataSource loads data by pages, or all items at once. */ + paginate?: boolean; + /** The data post processing function. */ + postProcess?: (data: any[]) => any[]; + /** Specifies a value by which the required items are searched. */ + searchExpr?: Object; + /** Specifies the comparison operation used to search for the required items. */ + searchOperation?: string; + /** Specifies the value to which the search expression is compared. */ + searchValue?: Object; + /** Specifies the initial select option value. */ + select?: Object; + /** An array of the strings that represent the names of the navigation properties to be loaded simultaneously with the OData store's entity. */ + expand?: Object; + /** Specifies whether or not the DataSource instance requests the total count of items available in the storage. */ + requireTotalCount?: boolean; + /** Specifies the initial sort option value. */ + sort?: Object; + /** Specifies the underlying Store instance used to access data. */ + store?: any; + /** A handler for the changed event. */ + onChanged?: () => void; + /** A handler for the loadingChanged event. */ + onLoadingChanged?: (isLoading: boolean) => void; + /** A handler for the loadError event. */ + onLoadError?: (e?: Error) => void; + } + /** An object that provides access to a data web service or local data storage for collection container widgets. */ + export class DataSource implements EventsMixin { + constructor(options?: DataSourceOptions); + /** Disposes all resources associated with this DataSource. */ + dispose(): void; + /** Returns the current filter option value. */ + filter(): Object; + /** Sets the filter option value. */ + filter(filterExpr: Object): void; + /** Returns the current group option value. */ + group(): Object; + /** Sets the group option value. */ + group(groupExpr: Object): void; + /** Indicates whether or not the current page contains fewer items than the number of items specified by the pageSize configuration option. */ + isLastPage(): boolean; + /** Indicates whether or not at least one load() method execution has successfully finished. */ + isLoaded(): boolean; + /** Indicates whether or not the DataSource is currently being loaded. */ + isLoading(): boolean; + /** Returns the array of items currently operated by the DataSource. */ + items(): Array; + /** Returns the key expression. */ + key(): any; + /** Starts loading data. */ + load(): JQueryPromise>; + /** Returns an object that would be passed to the load() method of the underlying Store according to the current data shaping option values of the current DataSource instance. */ + loadOptions(): Object; + /** Returns the current pageSize option value. */ + pageSize(): number; + /** Sets the pageSize option value. */ + pageSize(value: number): void; + /** Specifies the index of the currently loaded page. */ + pageIndex(): number; + /** Specifies the index of the page to be loaded during the next load() method execution. */ + pageIndex(newIndex: number): void; + /** Returns the current paginate option value. */ + paginate(): boolean; + /** Sets the paginate option value. */ + paginate(value: boolean): void; + /** Returns the searchExpr option value. */ + searchExpr(): Object; + /** Sets the searchExpr option value. */ + searchExpr(expr: Object): void; + /** Returns the currently specified search operation. */ + searchOperation(): string; + /** Sets the current search operation. */ + searchOperation(op: string): void; + /** Returns the searchValue option value. */ + searchValue(): Object; + /** Sets the searchValue option value. */ + searchValue(value: Object): void; + /** Returns the current select option value. */ + select(): Object; + /** Sets the select option value. */ + select(expr: Object): void; + /** Returns the current requireTotalCount option value. */ + requireTotalCount(): boolean; + /** Sets the requireTotalCount option value. */ + requireTotalCount(value: boolean): void; + /** Returns the current sort option value. */ + sort(): Object; + /** Sets the sort option value. */ + sort(sortExpr: Object): void; + /** Returns the underlying Store instance. */ + store(): Store; + /** Returns the number of data items available in an underlying Store after the last load() operation without paging. */ + totalCount(): number; + on(eventName: "loadingChanged", eventHandler: (isLoading: boolean) => void): DataSource; + on(eventName: "loadError", eventHandler: (e?: Error) => void): DataSource; + on(eventName: "changed", eventHandler: () => void): DataSource; + on(eventName: string, eventHandler: Function): DataSource; + on(events: { [eventName: string]: Function; }): DataSource; + off(eventName: "loadingChanged"): DataSource; + off(eventName: "loadError"): DataSource; + off(eventName: "changed"): DataSource; + off(eventName: string): DataSource; + off(eventName: "loadingChanged", eventHandler: (isLoading: boolean) => void): DataSource; + off(eventName: "loadError", eventHandler: (e?: Error) => void): DataSource; + off(eventName: "changed", eventHandler: () => void): DataSource; + off(eventName: string, eventHandler: Function): DataSource; + } + /** An object used to work with primitive data types not supported by JavaScript when accessing an OData web service. */ + export class EdmLiteral { + /** Creates an EdmLiteral instance and assigns the specified value to it. */ + constructor(value: string); + /** Returns a string representation of the value associated with this EdmLiteral object. */ + valueOf(): string; + } + /** An object used to generate and hold the GUID. */ + export class Guid { + /** Creates a new Guid instance that holds the specified GUID. */ + constructor(value: string); + /** Creates a new Guid instance holding the generated GUID. */ + constructor(); + /** Returns a string representation of the Guid instance. */ + toString(): string; + /** Returns a string representation of the Guid instance. */ + valueOf(): string; + } + export interface LocalStoreOptions extends ArrayStoreOptions { + /** Specifies the time (in miliseconds) after the change operation, before the data is flushed. */ + flushInterval?: number; + /** Specifies whether the data is flushed immediatelly after each change operation, or after the delay specified via the flushInterval option. */ + immediate?: boolean; + /** The unique identifier used to distinguish the data within the HTML5 Web Storage. */ + name?: string; + } + /** A Store providing access to the HTML5 Web Storage. */ + export class LocalStore extends ArrayStore { + constructor(options?: LocalStoreOptions); + /** Removes all data associated with this Store. */ + clear(): void; + } + export interface ODataContextOptions extends ODataStoreOptions { + /** Specifies the list of entities to be accessed via the ODataContext. */ + entities?: Object; + /** Specifies the function called if the ODataContext causes an error. */ + errorHandler?: (e: Error) => void; + } + /** Provides access to the entire OData service. */ + export class ODataContext { + constructor(options?: ODataContextOptions); + /** Initiates the specified WebGet service operation that returns a value. For the information on service operations, refer to the OData documentation. */ + get(operationName: string, params: Object): JQueryPromise; + /** Initiates the specified WebGet service operation that returns nothing. For the information on service operations, refer to the OData documentation. */ + invoke(operationName: string, params: Object, httpMethod: Object): JQueryPromise; + /** Return a special proxy object to describe the entity link. */ + objectLink(entityAlias: string, key: any): Object; + } + export interface ODataStoreOptions extends StoreOptions { + /** A function used to customize a web request before it is sent. */ + beforeSend?: (request: { + url: string; + async: boolean; + method: string; + timeout: number; + params: Object; + payload: Object; + headers: Object; + }) => void; + /** Specifies whether the ODataStore uses the JSONP approach to access non-CORS-compatible remote services. */ + jsonp?: boolean; + /** Specifies the type of the ODataStore key property. The following key types are supported out of the box: String, Int32, Int64, and Guid. */ + keyType?: any; + /** Specifies whether or not dates found in the response are deserialized. */ + deserializeDates?: boolean; + /** Specifies the URL of the data service being accessed via the current ODataContext. */ + url?: string; + /** Specifies the version of the OData protocol used to interact with the data service. */ + version?: number; + /** Specifies the value of the withCredentials field of the underlying jqXHR object. */ + withCredentials?: boolean; + } + /** A Store providing access to a separate OData web service entity. */ + export class ODataStore extends Store { + constructor(options?: ODataStoreOptions); + /** Creates the Query object for the OData endpoint. */ + createQuery(loadOptions: Object): Object; + /** Returns the data item specified by the key. */ + byKey(key: any, extraOptions?: { expand?: Object }): JQueryPromise; + } + /** An universal chainable data query interface object. */ + export interface Query { + /** Calculates a custom summary for the items in the current Query. */ + aggregate(step: (accumulator: any, value: any) => any): JQueryPromise; + /** Calculates a custom summary for the items in the current Query. */ + aggregate(seed: any, step: (accumulator: any, value: any) => any, finalize: (result: any) => any): JQueryPromise; + /** Calculates the average item value for the current Query. */ + avg(getter: Object): JQueryPromise; + /** Finds the item with the maximum getter value. */ + max(getter: Object): JQueryPromise; + /** Finds the item with the maximum value in the Query. */ + max(): JQueryPromise; + /** Finds the item with the minimum value in the Query. */ + min(): JQueryPromise; + /** Finds the item with the minimum getter value. */ + min(getter: Object): JQueryPromise; + /** Calculates the average item value for the current Query, if each Query item has a numeric type. */ + avg(): JQueryPromise; + /** Returns the total count of items in the current Query. */ + count(): JQueryPromise; + /** Executes the Query. */ + enumerate(): JQueryPromise; + /** Filters the current Query data. */ + filter(criteria: Array): Query; + /** Groups the current Query data. */ + groupBy(getter: Object): Query; + /** Applies the specified transformation to each item. */ + select(getter: Object): Query; + /** Limits the data item count. */ + slice(skip: number, take?: number): Query; + /** Sorts current Query data. */ + sortBy(getter: Object, desc: boolean): Query; + /** Sorts current Query data. */ + sortBy(getter: Object): Query; + /** Calculates the sum of item getter values in the current Query. */ + sum(getter: Object): JQueryPromise; + /** Calculates the sum of item values in the current Query. */ + sum(): JQueryPromise; + /** Adds one more sorting condition to the current Query. */ + thenBy(getter: Object): Query; + /** Adds one more sorting condition to the current Query. */ + thenBy(getter: Object, desc: boolean): Query; + /** Returns the array of current Query items. */ + toArray(): Array; + } + /** The global data layer error handler. */ + export var errorHandler: (e: Error) => void; + /** Encodes the specified string or array of bytes to base64 encoding. */ + export function base64_encode(input: any): string; + /** Creates a Query instance. */ + export function query(array: Array): Query; + /** Creates a Query instance for accessing the remote service specified by a URL. */ + export function query(url: string, queryOptions: Object): Query; + /** This section describes the utility objects provided by the DevExtreme data layer. */ + export var utils: { + /** Compiles a getter function from the getter expression. */ + compileGetter(expr: any): Function; + /** Compiles a setter function from the setter expression. */ + compileSetter(expr: any): Function; + odata: { + /** Holds key value converters for OData. */ + keyConverters: { + String(value: any): string; + Int32(value: any): number; + Int64(value: any): EdmLiteral; + Guid(value: any): Guid; + Boolean(value: any): boolean; + Single(value: any): EdmLiteral; + Decimal(value: any): EdmLiteral; + }; + } + } + } + /** An object that serves as a namespace for DevExtreme UI widgets as well as for methods implementing UI logic in DevExtreme sites/applications. */ + export module ui { + export interface WidgetOptions extends DOMComponentOptions { + /** A Boolean value specifying whether or not the widget changes its state when interacting with a user. */ + activeStateEnabled?: boolean; + /** A Boolean value specifying whether or not the widget can respond to user interaction. */ + disabled?: boolean; + /** A Boolean value specifying whether or not the widget changes its state when being hovered by an end user. */ + hoverStateEnabled?: boolean; + /** Specifies whether or not the widget can be focused. */ + focusStateEnabled?: boolean; + /** Specifies a shortcut key that sets focus on the widget element. */ + accessKey?: string; + /** A Boolean value specifying whether or not the widget is visible. */ + visible?: boolean; + /** Specifies the widget tab index. */ + tabIndex?: number; + /** Specifies the text of the hint displayed for the widget. */ + hint?: string; + } + /** The base class for widgets. */ + export class Widget extends DOMComponent { + constructor(options?: WidgetOptions); + /** Redraws the widget. */ + repaint(): void; + /** Sets focus on the widget. */ + focus(): void; + /** Registers a handler when a specified key is pressed. */ + registerKeyHandler(key: string, handler: Function): void; + } + export interface CollectionWidgetOptions extends WidgetOptions { + /** A data source used to fetch data to be displayed by the widget. */ + dataSource?: any; + /** The time period in milliseconds before the onItemHold event is raised. */ + itemHoldTimeout?: number; + /** An array of items displayed by the widget. */ + items?: Array; + /** The template to be used for rendering items. */ + itemTemplate?: any; + loopItemFocus?: boolean; + /** The text or HTML markup displayed by the widget if the item collection is empty. */ + noDataText?: string; + onContentReady?: any; + /** A handler for the itemClick event. */ + onItemClick?: any; + /** A handler for the itemContextMenu event. */ + onItemContextMenu?: Function; + /** A handler for the itemHold event. */ + onItemHold?: Function; + /** A handler for the itemRendered event. */ + onItemRendered?: Function; + /** A handler for the selectionChanged event. */ + onSelectionChanged?: Function; + /** The index of the currently selected widget item. */ + selectedIndex?: number; + /** The selected item object. */ + selectedItem?: Object; + /** An array of currently selected item objects. */ + selectedItems?: Array; + /** A handler for the itemDeleting event. */ + onItemDeleting?: Function; + /** A handler for the itemDeleted event. */ + onItemDeleted?: Function; + /** A handler for the itemReordered event. */ + onItemReordered?: Function; + } + /** The base class for widgets containing an item collection. */ + export class CollectionWidget extends Widget { + constructor(element: JQuery, options?: CollectionWidgetOptions); + constructor(element: HTMLElement, options?: CollectionWidgetOptions); + selectItem(itemElement: any): void; + unselectItem(itemElement: any): void; + deleteItem(itemElement: any): JQueryPromise; + isItemSelected(itemElement: any): boolean; + reorderItem(itemElement: any, toItemElement: any): JQueryPromise; + } + export interface DataExpressionMixinOptions { + /** A data source used to fetch data to be displayed by the widget. */ + dataSource?: any; + /** Specifies the name of the data source item field whose value is displayed by the widget. */ + displayExpr?: any; + /** Specifies the name of a data source item field whose value is held in the value configuration option. */ + valueExpr?: any; + /** An array of items displayed by the widget. */ + items?: Array; + /** The template to be used for rendering items. */ + itemTemplate?: any; + /** The currently selected value in the widget. */ + value?: Object; + } + export interface EditorOptions extends WidgetOptions { + /** The currently specified value. */ + value?: Object; + /** A handler for the valueChanged event. */ + onValueChanged?: Function; + /** A Boolean value specifying whether or not the widget is read-only. */ + readOnly?: boolean; + /** Holds the object that defines the error that occurred during validation. */ + validationError?: Object; + /** Specifies whether the editor's value is valid. */ + isValid?: boolean; + /** Specifies how the message about the validation rules that are not satisfied by this editor's value is displayed. */ + validationMessageMode?: string; + } + /** A base class for editors. */ + export class Editor extends Widget { + /** Resets the editor's value to undefined. */ + reset(): void; + } + /** An object that serves as a namespace for methods displaying a message in an application/site. */ + export var dialog: { + /** Creates an alert dialog message containing a single "OK" button. */ + alert(message: string, title: string): JQueryPromise; + /** Creates a confirm dialog that contains "Yes" and "No" buttons. */ + confirm(message: string, title: string): JQueryPromise; + /** Creates a custom dialog using the options specified by the passed configuration object. */ + custom(options: { title?: string; message?: string; buttons?: Array; }): { + show(): JQueryPromise; + hide(): void; + hide(value: any): void; + }; + }; + /** Creates a toast message. */ + export function notify(message: any, type: string, displayTime: number): void; + /** Creates a toast message. */ + export function notify(options: Object): void; + /** An object that serves as a namespace for the methods that work with DevExtreme CSS Themes. */ + export var themes: { + /** Returns the name of the currently applied theme. */ + current(): string; + /** Changes the current theme to the specified one. */ + current(themeName: string): void; + }; + /** Sets a specified template engine. */ + export function setTemplateEngine(name: string): void; + /** Sets a custom template engine defined via custom compile and render functions. */ + export function setTemplateEngine(options: Object): void; + } + /** An object that serves as a namespace for utility methods that can be helpful when working with the DevExtreme framework and UI widgets. */ + export var utils: { + /** Sets parameters for the viewport meta tag. */ + initMobileViewport(options: { allowZoom?: boolean; allowPan?: boolean; allowSelection?: boolean }): void; + /** Requests that the browser call a specified function to update animation before the next repaint. */ + requestAnimationFrame(callback: Function): number; + /** Cancels an animation frame request scheduled with the requestAnimationFrame method. */ + cancelAnimationFrame(requestID: number): void; + }; + /** An object that serves as a namespace for DevExtreme Data Visualization Widgets. */ + export module viz { + /** Applies a theme for the entire page with several DevExtreme visualization widgets. */ + export function currentTheme(theme: string): void; + /** Applies a new theme (with the color scheme defined separately) for the entire page with several DevExtreme visualization widgets. */ + export function currentTheme(platform: string, colorScheme: string): void; + /** Registers a new theme based on the existing one. */ + export function registerTheme(customTheme: Object, baseTheme: string): void; + /** Applies a predefined or registered custom palette to all visualization widgets at once. */ + export function currentPalette(paletteName: string): void; + /** Obtains the color sets of a predefined or registered palette. */ + export function getPalette(paletteName: string): Object; + /** Registers a new palette. */ + export function registerPalette(paletteName: string, palette: Object): void; + } +} +declare module DevExpress.ui { + export interface dxValidatorOptions extends DOMComponentOptions { + /** An array of validation rules to be checked for the editor with which the dxValidator object is associated. */ + validationRules?: Array; + /** Specifies the editor name to be used in the validation default messages. */ + name?: string; + /** An object that specifies what and when to validate and how to apply the validation result. */ + adapter?: Object; + /** Specifies the validation group the editor will be related to. */ + validationGroup?: string; + /** A handler for the validated event. */ + onValidated?: (params: validationEngine.ValidatorValidationResult) => void; + } + /** A widget that is used to validate the associated DevExtreme editors against the defined validation rules. */ + export class dxValidator extends DOMComponent implements validationEngine.IValidator { + constructor(element: JQuery, options?: dxValidatorOptions); + constructor(element: Element, options?: dxValidatorOptions); + /** Validates the value of the editor that is controlled by the current dxValidator object against the list of the specified validation rules. */ + validate(): validationEngine.ValidatorValidationResult; + /** Resets the value and validation result of the editor associated with the current dxValidator object. */ + reset(): void; + } + /** The widget that is used in the Knockout and Angular approaches to combine the editors to be validated. */ + export class dxValidationGroup extends DOMComponent { + constructor(element: JQuery); + constructor(element: Element); + /** Validates rules of the validators that belong to the current validation group. */ + validate(): validationEngine.ValidationGroupValidationResult; + /** Resets the value and validation result of the editors that are included to the current validation group. */ + reset(): void; + } + export interface dxValidationSummaryOptions extends CollectionWidgetOptions { + /** Specifies the validation group for which summary should be generated. */ + validationGroup?: string; + } + /** A widget for displaying the result of checking validation rules for editors. */ + export class dxValidationSummary extends CollectionWidget { + constructor(element: JQuery, options?: dxValidationSummaryOptions); + constructor(element: Element, options?: dxValidationSummaryOptions); + } + export interface dxResizableOptions extends DOMComponentOptions { + /** Specifies which borders of the widget element are used as a handle. */ + handles?: string; + /** Specifies the lower width boundary for resizing. */ + minWidth?: number; + /** Specifies the upper width boundary for resizing. */ + maxWidth?: number; + /** Specifies the lower height boundary for resizing. */ + minHeight?: number; + /** Specifies the upper height boundary for resizing. */ + maxHeight?: number; + /** A handler for the resizeStart event. */ + onResizeStart?: Function; + /** A handler for the resize event. */ + onResize?: Function; + /** A handler for the resizeEnd event. */ + onResizeEnd?: Function; + } + /** A widget that displays required content in a resizable element. */ + export class dxResizable extends DOMComponent { + constructor(element: JQuery, options?: dxResizableOptions); + constructor(element: Element, options?: dxResizableOptions); + } + export interface dxTooltipOptions extends dxPopoverOptions { + } + /** A tooltip widget. */ + export class dxTooltip extends dxPopover { + constructor(element: JQuery, options?: dxTooltipOptions); + constructor(element: Element, options?: dxTooltipOptions); + } + export interface dxDropDownListOptions extends dxDropDownEditorOptions, DataExpressionMixinOptions { + /** Returns the value currently displayed by the widget. */ + displayValue?: string; + /** The minimum number of characters that must be entered into the text box to begin a search. */ + minSearchLength?: number; + /** Specifies whether or not the widget displays unfiltered values until a user types a number of characters exceeding the minSearchLength option value. */ + showDataBeforeSearch?: boolean; + /** Specifies the name of a data source item field or an expression whose value is compared to the search criterion. */ + searchExpr?: Object; + /** Specifies the binary operation used to filter data. */ + searchMode?: string; + /** Specifies the time delay, in milliseconds, after the last character has been typed in, before a search is executed. */ + searchTimeout?: number; + /** A handler for the valueChanged event. */ + onValueChanged?: Function; + /** Specifies DOM event names that update a widget's value. */ + valueChangeEvent?: string; + /** Specifies whether or not the widget supports searching. */ + searchEnabled?: boolean; + /** + * Specifies whether or not the widget displays items by pages. + * @deprecated dataSource.paginate.md + */ + pagingEnabled?: boolean; + /** The text or HTML markup displayed by the widget if the item collection is empty. */ + noDataText?: string; + /** A handler for the selectionChanged event. */ + onSelectionChanged?: Function; + /** A handler for the itemClick event. */ + onItemClick?: Function; + onContentReady?: Function; + } + /** A base class for drop-down list widgets. */ + export class dxDropDownList extends dxDropDownEditor { + constructor(element: JQuery, options?: dxDropDownListOptions); + constructor(element: Element, options?: dxDropDownListOptions); + } + export interface dxToolbarOptions extends CollectionWidgetOptions { + /** The template used to render menu items. */ + menuItemTemplate?: any; + /** Informs the widget about its location in a view HTML markup. */ + renderAs?: string; + } + /** A toolbar widget. */ + export class dxToolbar extends CollectionWidget { + constructor(element: JQuery, options?: dxToolbarOptions); + constructor(element: Element, options?: dxToolbarOptions); + } + export interface dxToastOptions extends dxOverlayOptions { + animation?: fx.AnimationOptions; + /** The time span in milliseconds during which the dxToast widget is visible. */ + displayTime?: number; + height?: any; + /** The dxToast message text. */ + message?: string; + position?: PositionOptions; + shading?: boolean; + /** Specifies the dxToast widget type. */ + type?: string; + width?: any; + closeOnBackButton?: boolean; + /** A Boolean value specifying whether or not the toast is closed if a user swipes it out of the screen boundaries. */ + closeOnSwipe?: boolean; + /** A Boolean value specifying whether or not the toast is closed if a user clicks it. */ + closeOnClick?: boolean; + } + /** The toast message widget. */ + export class dxToast extends dxOverlay { + constructor(element: JQuery, options?: dxToastOptions); + constructor(element: Element, options?: dxToastOptions); + } + export interface dxTextEditorOptions extends EditorOptions { + /** A handler for the change event. */ + onChange?: Function; + /** A handler for the copy event. */ + onCopy?: Function; + /** A handler for the cut event. */ + onCut?: Function; + /** A handler for the enterKey event. */ + onEnterKey?: Function; + /** A handler for the focusIn event. */ + onFocusIn?: Function; + /** A handler for the focusOut event. */ + onFocusOut?: Function; + /** A handler for the input event. */ + onInput?: Function; + /** A handler for the keyDown event. */ + onKeyDown?: Function; + /** A handler for the keyPress event. */ + onKeyPress?: Function; + /** A handler for the keyUp event. */ + onKeyUp?: Function; + /** A handler for the paste event. */ + onPaste?: Function; + /** The text displayed by the widget when the widget value is empty. */ + placeholder?: string; + /** Specifies whether to display the Clear button in the widget. */ + showClearButton?: boolean; + /** Specifies the current value displayed by the widget. */ + value?: any; + /** Specifies DOM event names that update a widget's value. */ + valueChangeEvent?: string; + /** Specifies whether or not the widget checks the inner text for spelling mistakes. */ + spellcheck?: boolean; + /** Specifies HTML attributes applied to the inner input element of the widget. */ + attr?: Object; + /** The read-only option that holds the text displayed by the widget input element. */ + text?: string; + focusStateEnabled?: boolean; + hoverStateEnabled?: boolean; + /** The editor mask that specifies the format of the entered string. */ + mask?: string; + /** Specifies a mask placeholder character. */ + maskChar?: string; + /** Specifies custom mask rules. */ + maskRules?: Object; + /** A message displayed when the entered text does not match the specified pattern. */ + maskInvalidMessage?: string; + /** Specifies whether the value option holds only characters entered by a user or prompt characters as well. */ + useMaskedValue?: boolean; + } + /** A base class for text editing widgets. */ + export class dxTextEditor extends Editor { + constructor(element: JQuery, options?: dxTextEditorOptions); + constructor(element: Element, options?: dxTextEditorOptions); + /** Removes focus from the input element. */ + blur(): void; + /** Sets focus to the input element representing the widget. */ + focus(): void; + } + export interface dxTextBoxOptions extends dxTextEditorOptions { + /** Specifies the maximum number of characters you can enter into the textbox. */ + maxLength?: any; + /** The "mode" attribute value of the actual HTML input element representing the text box. */ + mode?: string; + } + /** A single-line text box widget. */ + export class dxTextBox extends dxTextEditor { + constructor(element: JQuery, options?: dxTextBoxOptions); + constructor(element: Element, options?: dxTextBoxOptions); + } + export interface dxTextAreaOptions extends dxTextBoxOptions { + /** Specifies whether or not the widget checks the inner text for spelling mistakes. */ + spellcheck?: boolean; + } + /** A widget used to display and edit multi-line text. */ + export class dxTextArea extends dxTextBox { + constructor(element: JQuery, options?: dxTextAreaOptions); + constructor(element: Element, options?: dxTextAreaOptions); + } + export interface dxTabsOptions extends CollectionWidgetOptions { + /** Specifies whether the widget enables an end-user to select only a single item or multiple items. */ + selectionMode?: string; + /** Specifies whether or not an end-user can scroll tabs by swiping. */ + scrollByContent?: boolean; + /** Specifies whether or not an end-user can scroll tabs. */ + scrollingEnabled?: boolean; + /** A Boolean value that specifies the availability of navigation buttons. */ + showNavButtons?: boolean; + } + /** A tab strip used to switch between pages. */ + export class dxTabs extends CollectionWidget { + constructor(element: JQuery, options?: dxTabsOptions); + constructor(element: Element, options?: dxTabsOptions); + } + export interface dxTabPanelOptions extends dxMultiViewOptions { + /** A handler for the titleClick event. */ + onTitleClick?: any; + /** A handler for the titleHold event. */ + onTitleHold?: Function; + /** A handler for the titleRendered event. */ + onTitleRendered?: Function; + /** The template to be used for rendering an item title. */ + itemTitleTemplate?: any; + /** A Boolean value specifying if the list is scrolled by content. */ + scrollByContent?: boolean; + /** A Boolean value specifying whether to enable or disable scrolling. */ + scrollingEnabled?: boolean; + /** A Boolean value that specifies the availability of navigation buttons. */ + showNavButtons?: boolean; + } + /** A widget used to display a view and to switch between several views by clicking the appropriate tabs. */ + export class dxTabPanel extends dxMultiView { + constructor(element: JQuery, options?: dxTabPanelOptions); + constructor(element: Element, options?: dxTabPanelOptions); + } + export interface dxSelectBoxOptions extends dxDropDownListOptions { + /** Specifies DOM event names that update a widget's value. */ + valueChangeEvent?: string; + /** The template to be used for rendering the widget text field. */ + fieldTemplate?: any; + /** The text that is provided as a hint in the select box editor. */ + placeholder?: string; + /** Specifies whether or not the widget allows an end-user to enter a custom value. */ + fieldEditEnabled?: boolean; + } + /** A widget that allows you to select an item in a dropdown list. */ + export class dxSelectBox extends dxDropDownList { + constructor(element: JQuery, options?: dxSelectBoxOptions); + constructor(element: Element, options?: dxSelectBoxOptions); + } + export interface dxTagBoxOptions extends dxSelectBoxOptions { + /** Holds the list of selected values. */ + values?: Array; + /** A read-only option that holds the last selected value. */ + value?: Object; + } + /** A widget that allows you to select multiple items from a dropdown list. */ + export class dxTagBox extends dxSelectBox { + constructor(element: JQuery, options?: dxTagBoxOptions); + constructor(element: Element, options?: dxTagBoxOptions); + } + export interface dxScrollViewOptions extends dxScrollableOptions { + /** A handler for the pullDown event. */ + onPullDown?: Function; + /** Specifies the text shown in the pullDown panel when pulling the content down lowers the refresh threshold. */ + pulledDownText?: string; + /** Specifies the text shown in the pullDown panel while pulling the content down to the refresh threshold. */ + pullingDownText?: string; + /** A handler for the reachBottom event. */ + onReachBottom?: Function; + /** Specifies the text shown in the pullDown panel displayed when content is scrolled to the bottom. */ + reachBottomText?: string; + /** Specifies the text shown in the pullDown panel displayed when the content is being refreshed. */ + refreshingText?: string; + /** Returns a value indicating if the scrollView content is larger then the widget container. */ + isFull(): boolean; + /** Locks the widget until the release(preventScrollBottom) method is called and executes the function passed to the onPullDown option and the handler assigned to the pullDown event. */ + refresh(): void; + /** Notifies the scroll view that data loading is finished. */ + release(preventScrollBottom: boolean): JQueryPromise; + /** Toggles the loading state of the widget. */ + toggleLoading(showOrHide: boolean): void; + } + /** A widget used to display scrollable content. */ + export class dxScrollView extends dxScrollable { + constructor(element: JQuery, options?: dxScrollViewOptions); + constructor(element: Element, options?: dxScrollViewOptions); + } + export interface dxScrollableLocation { + top?: number; + left?: number; + } + export interface dxScrollableOptions extends DOMComponentOptions { + /** A string value specifying the available scrolling directions. */ + direction?: string; + /** A Boolean value specifying whether or not the widget can respond to user interaction. */ + disabled?: boolean; + /** A handler for the scroll event. */ + onScroll?: Function; + /** Specifies when the widget shows the scrollbar. */ + showScrollbar?: string; + /** A handler for the update event. */ + onUpdated?: Function; + /** Indicates whether to use native or simulated scrolling. */ + useNative?: boolean; + /** A Boolean value specifying whether to enable or disable the bounce-back effect. */ + bounceEnabled?: boolean; + /** A Boolean value specifying whether or not an end-user can scroll the widget content swiping it up or down. */ + scrollByContent?: boolean; + /** A Boolean value specifying whether or not an end-user can scroll the widget content using the scrollbar. */ + scrollByThumb?: boolean; + } + /** A widget used to display scrollable content. */ + export class dxScrollable extends DOMComponent { + constructor(element: JQuery, options?: dxScrollableOptions); + constructor(element: Element, options?: dxScrollableOptions); + /** Returns the height of the scrollable widget in pixels. */ + clientHeight(): number; + /** Returns the width of the scrollable widget in pixels. */ + clientWidth(): number; + /** Returns an HTML element of the widget. */ + content(): JQuery; + /** Scrolls the widget content by the specified number of pixels. */ + scrollBy(distance: number): void; + /** Scrolls widget content by the specified number of pixels in horizontal and vertical directions. */ + scrollBy(distanceObject: dxScrollableLocation): void; + /** Returns the height of the scrollable content in pixels. */ + scrollHeight(): number; + /** Returns the current scroll position against the leftmost position. */ + scrollLeft(): number; + /** Returns how far the scrollable content is scrolled from the top and from the left. */ + scrollOffset(): dxScrollableLocation; + /** Scrolls widget content to the specified position. */ + scrollTo(targetLocation: number): void; + /** Scrolls widget content to a specified position. */ + scrollTo(targetLocation: dxScrollableLocation): void; + /** Scrolls widget content to the specified element. */ + scrollToElement(element: Element): void; + /** Returns the current scroll position against the topmost position. */ + scrollTop(): number; + /** Returns the width of the scrollable content in pixels. */ + scrollWidth(): number; + /** Updates the dimensions of the scrollable contents. */ + update(): void; + } + export interface dxRadioGroupOptions extends CollectionWidgetOptions, DataExpressionMixinOptions { + activeStateEnabled?: boolean; + /** Specifies the radio group layout. */ + layout?: string; + } + /** A widget that enables a user to select one item within a list of items represented by radio buttons. */ + export class dxRadioGroup extends CollectionWidget { + constructor(element: JQuery, options?: dxRadioGroupOptions); + constructor(element: Element, options?: dxRadioGroupOptions); + } + export interface dxPopupOptions extends dxOverlayOptions { + animation?: fx.AnimationOptions; + /** Specifies whether or not to allow a user to drag the popup window. */ + dragEnabled?: boolean; + /** A Boolean value specifying whether or not to display the widget in full-screen mode. */ + fullScreen?: boolean; + position?: PositionOptions; + /** A Boolean value specifying whether or not to display the title in the popup window. */ + showTitle?: boolean; + /** The title in the overlay window. */ + title?: string; + /** A template to be used for rendering the widget title. */ + titleTemplate?: any; + width?: any; + /** Specifies items displayed on the top or bottom toolbar of the popup window. */ + buttons?: Array; + /** Specifies whether or not the widget displays the Close button. */ + showCloseButton?: boolean; + /** A handler for the titleRendered event. */ + onTitleRendered?: Function; + } + /** A widget that displays required content in a popup window. */ + export class dxPopup extends dxOverlay { + constructor(element: JQuery, options?: dxPopupOptions); + constructor(element: Element, options?: dxPopupOptions); + } + export interface dxPopoverOptions extends dxPopupOptions { + /** An object defining animation options of the widget. */ + animation?: fx.AnimationOptions; + /** Specifies the height of the widget. */ + height?: any; + /** An object defining widget positioning options. */ + position?: PositionOptions; + shading?: boolean; + /** A Boolean value specifying whether or not to display the title in the overlay window. */ + showTitle?: boolean; + /** The target element associated with a popover. */ + target?: any; + /** Specifies the width of the widget. */ + width?: any; + } + /** A widget that displays the required content in a popup window. */ + export class dxPopover extends dxPopup { + constructor(element: JQuery, options?: dxPopoverOptions); + constructor(element: Element, options?: dxPopoverOptions); + /** Displays the widget for the specified target element. */ + show(target?: any): JQueryPromise; + } + export interface dxOverlayOptions extends WidgetOptions { + /** An object that defines the animation options of the widget. */ + animation?: fx.AnimationOptions; + /** A Boolean value specifying whether or not the widget is closed if a user presses the Back hardware button. */ + closeOnBackButton?: boolean; + /** A Boolean value specifying whether or not the widget is closed if a user clicks outside of the overlapping window. */ + closeOnOutsideClick?: any; + /** A template to be used for rendering widget content. */ + contentTemplate?: any; + /** Specifies whether widget content is rendered when the widget is shown or when rendering the widget. */ + deferRendering?: boolean; + /** Specifies whether or not an end-user can drag the widget. */ + dragEnabled?: boolean; + /** Specifies whether or not an end user can resize the widget. */ + resizeEnabled?: boolean; + /** The height of the widget in pixels. */ + height?: any; + /** Specifies the maximum height the widget can reach while resizing. */ + maxHeight?: any; + /** Specifies the maximum width the widget can reach while resizing. */ + maxWidth?: any; + /** Specifies the minimum height the widget can reach while resizing. */ + minHeight?: any; + /** Specifies the minimum width the widget can reach while resizing. */ + minWidth?: any; + /** A handler for the hidden event. */ + onHidden?: Function; + /** A handler for the resizeStart event. */ + onResizeStart?: Function; + /** A handler for the resize event. */ + onResize?: Function; + /** A handler for the resizeEnd event. */ + onResizeEnd?: Function; + /** A handler for the hiding event. */ + onHiding?: Function; + /** An object defining widget positioning options. */ + position?: PositionOptions; + /** A Boolean value specifying whether or not the main screen is inactive while the widget is active. */ + shading?: boolean; + /** Specifies the shading color. */ + shadingColor?: string; + /** A handler for the showing event. */ + onShowing?: Function; + /** A handler for the shown event. */ + onShown?: Function; + /** A Boolean value specifying whether or not the widget is visible. */ + visible?: boolean; + /** The widget width in pixels. */ + width?: any; + } + /** A widget displaying the required content in an overlay window. */ + export class dxOverlay extends Widget { + constructor(element: JQuery, options?: dxOverlayOptions); + constructor(element: Element, options?: dxOverlayOptions); + /** An HTML element of the widget. */ + content(): JQuery; + /** Hides the widget. */ + hide(): JQueryPromise; + /** Recalculates the overlay's size and position. */ + repaint(): void; + /** Shows the widget. */ + show(): JQueryPromise; + /** Toggles the visibility of the widget. */ + toggle(showing: boolean): JQueryPromise; + /** A static method that specifies the base z-index for all overlay widgets. */ + static baseZIndex(zIndex: number): void; + } + export interface dxNumberBoxOptions extends dxTextEditorOptions { + /** The maximum value accepted by the number box. */ + max?: number; + /** The minimum value accepted by the number box. */ + min?: number; + /** Specifies whether or not to show spin buttons. */ + showSpinButtons?: boolean; + useTouchSpinButtons?: boolean; + /** Specifies by which value the widget value changes when a spin button is clicked. */ + step?: number; + /** The current number box value. */ + value?: number; + } + /** A textbox widget that enables a user to enter numeric values. */ + export class dxNumberBox extends dxTextEditor { + constructor(element: JQuery, options?: dxNumberBoxOptions); + constructor(element: Element, options?: dxNumberBoxOptions); + } + export interface dxNavBarOptions extends dxTabsOptions { + scrollingEnabled?: boolean; + } + /** A widget that contains items used to navigate through application views. */ + export class dxNavBar extends dxTabs { + constructor(element: JQuery, options?: dxNavBarOptions); + constructor(element: Element, options?: dxNavBarOptions); + } + export interface dxMultiViewOptions extends CollectionWidgetOptions { + /** Specifies whether or not to animate the displayed item change. */ + animationEnabled?: boolean; + /** A Boolean value specifying whether or not to scroll back to the first item after the last item is swiped. */ + loop?: boolean; + /** The index of the currently displayed item. */ + selectedIndex?: number; + /** A Boolean value specifying whether or not to allow users to change the selected index by swiping. */ + swipeEnabled?: boolean; + /** Specifies whether widget content is rendered when the widget is shown or when rendering the widget. */ + deferRendering?: boolean; + } + /** A widget used to display a view and to switch between several views. */ + export class dxMultiView extends CollectionWidget { + constructor(element: JQuery, options?: dxMultiViewOptions); + constructor(element: Element, options?: dxMultiViewOptions); + } + export interface dxMapOptions extends WidgetOptions { + /** Specifies whether or not the widget automatically adjusts center and zoom option values when adding a new marker or route. */ + autoAdjust?: boolean; + center?: { + /** The latitude location displayed in the center of the widget. */ + lat?: number; + /** The longitude location displayed in the center of the widget. */ + lng?: number; + }; + /** A handler for the click event. */ + onClick?: any; + /** Specifies whether or not map widget controls are available. */ + controls?: boolean; + /** Specifies the height of the widget. */ + height?: any; + /** A key used to authenticate the application within the required map provider. */ + key?: { + /** A key used to authenticate the application within the "Bing" map provider. */ + bing?: string; + /** A key used to authenticate the application within the "Google" map provider. */ + google?: string; + /** A key used to authenticate the application within the "Google Static" map provider. */ + googleStatic?: string; + } + /** A handler for the markerAdded event. */ + onMarkerAdded?: Function; + /** A URL pointing to the custom icon to be used for map markers. */ + markerIconSrc?: string; + /** A handler for the markerRemoved event. */ + onMarkerRemoved?: Function; + /** An array of markers displayed on a map. */ + markers?: Array; + /** The name of the current map data provider. */ + provider?: string; + /** A handler for the ready event. */ + onReady?: Function; + /** A handler for the routeAdded event. */ + onRouteAdded?: Function; + /** A handler for the routeRemoved event. */ + onRouteRemoved?: Function; + /** An array of routes shown on the map. */ + routes?: Array; + /** The type of a map to display. */ + type?: string; + /** Specifies the width of the widget. */ + width?: any; + /** The zoom level of the map. */ + zoom?: number; + } + /** An interactive map widget. */ + export class dxMap extends Widget { + constructor(element: JQuery, options?: dxMapOptions); + constructor(element: Element, options?: dxMapOptions); + /** Adds a marker to the map. */ + addMarker(markerOptions: Object): JQueryPromise; + /** Adds a route to the map. */ + addRoute(routeOptions: Object): JQueryPromise; + /** Removes a marker from the map. */ + removeMarker(marker: Object): JQueryPromise; + /** Removes a route from the map. */ + removeRoute(route: any): JQueryPromise; + } + export interface dxLookupOptions extends dxDropDownListOptions { + /** An object defining widget animation options. */ + animation?: fx.AnimationOptions; + /** The text displayed on the Cancel button. */ + cancelButtonText?: string; + /** The text displayed on the Clear button. */ + clearButtonText?: string; + /** Specifies whether or not the widget cleans the search box when the popup window is displayed. */ + cleanSearchOnOpening?: boolean; + /** A Boolean value specifying whether or not the widget is closed if a user clicks outside of the overlaying window. */ + closeOnOutsideClick?: any; + /** The text displayed on the Apply button. */ + applyButtonText?: string; + /** A Boolean value specifying whether or not to display the lookup in full-screen mode. */ + fullScreen?: boolean; + focusStateEnabled?: boolean; + /** A Boolean value specifying whether or not to group widget items. */ + grouped?: boolean; + /** The name of the template used to display a group header. */ + groupTemplate?: any; + /** The text displayed on the button used to load the next page from the data source. */ + nextButtonText?: string; + /** A handler for the pageLoading event. */ + onPageLoading?: Function; + /** Specifies whether the next page is loaded when a user scrolls the widget to the bottom or when the "next" button is clicked. */ + pageLoadMode?: string; + /** Specifies the text shown in the pullDown panel, which is displayed when the widget is scrolled to the bottom. */ + pageLoadingText?: string; + /** The text displayed by the widget when nothing is selected. */ + placeholder?: string; + /** The height of the widget popup element. */ + popupHeight?: any; + /** The width of the widget popup element. */ + popupWidth?: any; + /** An object defining widget positioning options. */ + position?: PositionOptions; + /** Specifies the text displayed in the pullDown panel when the widget is pulled below the refresh threshold. */ + pulledDownText?: string; + /** Specifies the text shown in the pullDown panel while the list is being pulled down to the refresh threshold. */ + pullingDownText?: string; + /** A handler for the pullRefresh event. */ + onPullRefresh?: Function; + /** A Boolean value specifying whether or not the widget supports the "pull down to refresh" gesture. */ + pullRefreshEnabled?: boolean; + /** Specifies the text displayed in the pullDown panel while the widget is being refreshed. */ + refreshingText?: string; + /** A handler for the scroll event. */ + onScroll?: Function; + /** A Boolean value specifying whether or not the search bar is visible. */ + searchEnabled?: boolean; + /** The text that is provided as a hint in the lookup's search bar. */ + searchPlaceholder?: string; + /** A Boolean value specifying whether or not the main screen is inactive while the lookup is active. */ + shading?: boolean; + /** Specifies whether to display the Cancel button in the lookup window. */ + showCancelButton?: boolean; + /** + * A Boolean value specifying whether the widget loads the next page automatically when you reach the bottom of the list or when a button is clicked. + * @deprecated pageLoadMode.md + */ + showNextButton?: boolean; + /** The title of the lookup window. */ + title?: string; + /** A template to be used for rendering the widget title. */ + titleTemplate?: any; + /** Specifies whether or not the widget uses native scrolling. */ + useNativeScrolling?: boolean; + /** Specifies whether or not to show lookup contents in a dxPopover widget. */ + usePopover?: boolean; + /** A handler for the valueChanged event. */ + onValueChanged?: Function; + /** A handler for the titleRendered event. */ + onTitleRendered?: Function; + /** A Boolean value specifying whether or not to display the title in the popup window. */ + showPopupTitle?: boolean; + } + /** A widget that allows a user to select predefined values from a lookup window. */ + export class dxLookup extends dxDropDownList { + constructor(element: JQuery, options?: dxLookupOptions); + constructor(element: Element, options?: dxLookupOptions); + /** This section lists the data source fields that are used in a default template for lookup drop-down items. */ + } + export interface dxLoadPanelOptions extends dxOverlayOptions { + /** An object defining the animation options of the widget. */ + animation?: fx.AnimationOptions; + /** The delay in milliseconds after which the load panel is displayed. */ + delay?: number; + /** The height of the widget. */ + height?: number; + /** A URL pointing to an image to be used as a load indicator. */ + indicatorSrc?: string; + /** The text displayed in the load panel. */ + message?: string; + /** A Boolean value specifying whether or not to show a load indicator. */ + showIndicator?: boolean; + /** A Boolean value specifying whether or not to show the pane behind the load indicator. */ + showPane?: boolean; + /** The width of the widget. */ + width?: number; + } + /** A widget used to indicate whether or not an element is loading. */ + export class dxLoadPanel extends dxOverlay { + constructor(element: JQuery, options?: dxLoadPanelOptions); + constructor(element: Element, options?: dxLoadPanelOptions); + } + export interface dxLoadIndicatorOptions extends WidgetOptions { + /** Specifies the path to an image used as the indicator. */ + indicatorSrc?: string; + } + /** The widget used to indicate the loading process. */ + export class dxLoadIndicator extends Widget { + constructor(element: JQuery, options?: dxLoadIndicatorOptions); + constructor(element: Element, options?: dxLoadIndicatorOptions); + } + export interface dxListOptions extends CollectionWidgetOptions { + /** A Boolean value specifying whether or not to display a grouped list. */ + grouped?: boolean; + /** The template to be used for rendering item groups. */ + groupTemplate?: any; + onItemDeleting?: Function; + /** A handler for the itemDeleted event. */ + onItemDeleted?: Function; + /** A handler for the groupRendered event. */ + onGroupRendered?: Function; + /** A handler for the itemReordered event. */ + onItemReordered?: Function; + /** A handler for the itemClick event. */ + onItemClick?: any; + /** A handler for the itemSwipe event. */ + onItemSwipe?: Function; + /** The text displayed on the button used to load the next page from the data source. */ + nextButtonText?: string; + /** A handler for the pageLoading event. */ + onPageLoading?: Function; + /** Specifies the text shown in the pullDown panel, which is displayed when the list is scrolled to the bottom. */ + pageLoadingText?: string; + /** Specifies the text displayed in the pullDown panel when the list is pulled below the refresh threshold. */ + pulledDownText?: string; + /** Specifies the text shown in the pullDown panel while the list is being pulled down to the refresh threshold. */ + pullingDownText?: string; + /** A handler for the pullRefresh event. */ + onPullRefresh?: Function; + /** A Boolean value specifying whether or not the widget supports the "pull down to refresh" gesture. */ + pullRefreshEnabled?: boolean; + /** Specifies the text displayed in the pullDown panel while the list is being refreshed. */ + refreshingText?: string; + /** A handler for the scroll event. */ + onScroll?: Function; + /** A Boolean value specifying whether to enable or disable list scrolling. */ + scrollingEnabled?: boolean; + /** Specifies when the widget shows the scrollbar. */ + showScrollbar?: string; + /** Specifies whether or not the widget uses native scrolling. */ + useNativeScrolling?: boolean; + /** A Boolean value specifying whether to enable or disable the bounce-back effect. */ + bounceEnabled?: boolean; + /** A Boolean value specifying if the list is scrolled by content. */ + scrollByContent?: boolean; + /** A Boolean value specifying if the list is scrolled using the scrollbar. */ + scrollByThumb?: boolean; + onItemContextMenu?: Function; + onItemHold?: Function; + /** Specifies whether or not an end-user can collapse groups. */ + collapsibleGroups?: boolean; + /** Specifies whether the next page is loaded when a user scrolls the widget to the bottom or when the "next" button is clicked. */ + pageLoadMode?: string; + /** Specifies whether or not to display controls used to select list items. */ + showSelectionControls?: boolean; + /** Specifies item selection mode. */ + selectionMode?: string; + selectAllText?: string; + onSelectAllChanged?: Function; + /** Specifies the array of items for a context menu called for a list item. */ + menuItems?: Array; + /** Specifies whether an item context menu is shown when a user holds or swipes an item. */ + menuMode?: string; + /** Specifies whether or not an end user can delete list items. */ + allowItemDeleting?: boolean; + /** Specifies the way a user can delete items from the list. */ + itemDeleteMode?: string; + /** Specifies whether or not an end user can reorder list items. */ + allowItemReordering?: boolean; + /** Specifies whether or not to show the loading panel when the DataSource bound to the widget is loading data. */ + indicateLoading?: boolean; + activeStateEnabled?: boolean; + } + /** A list widget. */ + export class dxList extends CollectionWidget { + constructor(element: JQuery, options?: dxListOptions); + constructor(element: Element, options?: dxListOptions); + /** Returns the height of the widget in pixels. */ + clientHeight(): number; + /** Removes the specified item from the list. */ + deleteItem(itemIndex: any): JQueryPromise; + /** Removes the specified item from the list. */ + deleteItem(itemElement: Element): JQueryPromise; + /** Returns a Boolean value that indicates whether or not the specified item is selected. */ + isItemSelected(itemIndex: any): boolean; + /** Returns a Boolean value that indicates whether or not the specified item is selected. */ + isItemSelected(itemElement: Element): boolean; + /** Reloads list data. */ + reload(): void; + /** Moves the specified item to the specified position in the list. */ + reorderItem(itemElement: Element, toItemElement: Element): JQueryPromise; + /** Moves the specified item to the specified position in the list. */ + reorderItem(itemIndex: any, toItemIndex: any): JQueryPromise; + /** Scrolls the list content by the specified number of pixels. */ + scrollBy(distance: number): void; + /** Returns the height of the list content in pixels. */ + scrollHeight(): number; + /** Scrolls list content to the specified position. */ + scrollTo(location: number): void; + /** Scrolls the list to the specified item. */ + scrollToItem(itemElement: Element): void; + /** Scrolls the list to the specified item. */ + scrollToItem(itemIndex: any): void; + /** Returns how far the list content is scrolled from the top. */ + scrollTop(): number; + /** Selects the specified item from the list. */ + selectItem(itemElement: Element): void; + /** Selects the specified item from the list. */ + selectItem(itemIndex: any): void; + /** Deselects the specified item from the list. */ + unselectItem(itemElement: Element): void; + /** Unselects the specified item from the list. */ + unselectItem(itemIndex: any): void; + /** Updates the widget scrollbar according to widget content size. */ + updateDimensions(): JQueryPromise; + /** Expands the specified group. */ + expandGroup(groupIndex: number): JQueryPromise; + /** Collapses the specified group. */ + collapseGroup(groupIndex: number): JQueryPromise; + } + export interface dxGalleryOptions extends CollectionWidgetOptions { + /** The time, in milliseconds, spent on slide animation. */ + animationDuration?: number; + /** Specifies whether or not to animate the displayed item change. */ + animationEnabled?: boolean; + /** A Boolean value specifying whether or not to allow users to switch between items by clicking an indicator. */ + indicatorEnabled?: boolean; + /** A Boolean value specifying whether or not to scroll back to the first item after the last item is swiped. */ + loop?: boolean; + /** The index of the currently active gallery item. */ + selectedIndex?: number; + /** A Boolean value specifying whether or not to display an indicator that points to the selected gallery item. */ + showIndicator?: boolean; + /** A Boolean value that specifies the availability of the "Forward" and "Back" navigation buttons. */ + showNavButtons?: boolean; + /** The time interval in milliseconds, after which the gallery switches to the next item. */ + slideshowDelay?: number; + /** A Boolean value specifying whether or not to allow users to switch between items by swiping. */ + swipeEnabled?: boolean; + /** Specifies whether or not to display parts of previous and next images along the sides of the current image. */ + wrapAround?: boolean; + /** Specifies if the widget stretches images to fit the total gallery width. */ + stretchImages?: boolean; + /** Specifies the width of an area used to display a single image. */ + initialItemWidth?: number; + } + /** An image gallery widget. */ + export class dxGallery extends CollectionWidget { + constructor(element: JQuery, options?: dxGalleryOptions); + constructor(element: Element, options?: dxGalleryOptions); + /** Shows the specified gallery item. */ + goToItem(itemIndex: number, animation: boolean): JQueryPromise; + /** Shows the next gallery item. */ + nextItem(animation: boolean): JQueryPromise; + /** Shows the previous gallery item. */ + prevItem(animation: boolean): JQueryPromise; + } + export interface dxDropDownEditorOptions extends dxTextBoxOptions { + /** Specifies the current value displayed by the widget. */ + value?: Object; + /** A handler for the closed event. */ + onClosed?: Function; + /** A handler for the opened event. */ + onOpened?: Function; + /** Specifies whether or not the drop-down editor is displayed. */ + opened?: boolean; + /** Specifies whether or not the widget allows an end-user to enter a custom value. */ + fieldEditEnabled?: boolean; + /** Specifies the way an end-user applies the selected value. */ + applyValueMode?: string; + /** Specifies whether widget content is rendered when the widget is shown or when rendering the widget. */ + deferRendering?: boolean; + activeStateEnabled?: boolean; + } + /** A drop-down editor widget. */ + export class dxDropDownEditor extends dxTextBox { + constructor(element: JQuery, options?: dxDropDownEditorOptions); + constructor(element: Element, options?: dxDropDownEditorOptions); + /** Closes the drop-down editor. */ + close(): void; + /** Opens the drop-down editor. */ + open(): void; + /** Resets the widget's value to null. */ + reset(): void; + /** Returns an <input> element of the widget. */ + field(): JQuery; + /** Returns an HTML element of the popup window content. */ + content(): JQuery; + } + export interface dxDateBoxOptions extends dxTextEditorOptions { + /** A format used to display date/time information. */ + format?: string; + /** A Globalize format string specifying the date display format. */ + formatString?: string; + /** The last date that can be selected within the widget. */ + max?: any; + /** The minimum date that can be selected within the widget. */ + min?: any; + /** The text displayed by the widget when the widget value is not yet specified. This text is also used as a title of the date picker. */ + placeholder?: string; + /** + * Specifies whether or not a user can pick out a date using the drop-down calendar. + * @deprecated Use 'pickerType' option instead. + */ + useCalendar?: boolean; + /** An object or a value, specifying the date and time currently selected using the date box. */ + value?: any; + /** + * Specifies whether or not the widget uses the native HTML input element. + * @deprecated Use 'pickerType' option instead. + */ + useNative?: boolean; + /** Specifies the interval between neighboring values in the popup list in minutes. */ + interval?: number; + /** Specifies the maximum zoom level of a calendar, which is used to pick the date. */ + maxZoomLevel?: string; + /** Specifies the minimal zoom level of a calendar, which is used to pick the date. */ + minZoomLevel?: string; + /** Specifies the type of date/time picker. */ + pickerType?: string; + /** Specifies the message displayed if the typed value is not a valid date or time. */ + invalidDateMessage?: string; + /** Specifies the message displayed if the specified date is later than the max value or earlier than the min value. */ + dateOutOfRangeMessage?: string; + } + /** A date box widget. */ + export class dxDateBox extends dxDropDownEditor { + constructor(element: JQuery, options?: dxDateBoxOptions); + constructor(element: Element, options?: dxDateBoxOptions); + } + export interface dxCheckBoxOptions extends EditorOptions { + activeStateEnabled?: boolean; + /** Specifies the widget state. */ + value?: boolean; + /** Specifies the text displayed by the check box. */ + text?: string; + } + /** A check box widget. */ + export class dxCheckBox extends Editor { + constructor(element: JQuery, options?: dxCheckBoxOptions); + constructor(element: Element, options?: dxCheckBoxOptions); + } + export interface dxCalendarOptions extends EditorOptions { + activeStateEnabled?: boolean; + /** Specifies a date displayed on the current calendar page. */ + currentDate?: Date; + /** Specifies the first day of a week. */ + firstDayOfWeek?: number; + /** The latest date the widget allows to select. */ + max?: Date; + /** The earliest date the widget allows to select. */ + min?: Date; + /** Specifies whether or not the widget displays a button that selects the current date. */ + showTodayButton?: boolean; + /** Specifies the current calendar zoom level. */ + zoomLevel?: string; + /** Specifies the maximum zoom level of the calendar. */ + maxZoomLevel?: string; + /** Specifies the minimum zoom level of the calendar. */ + minZoomLevel?: string; + /** The template to be used for rendering calendar cells. */ + cellTemplate?: any; + } + /** A calendar widget. */ + export class dxCalendar extends Editor { + constructor(element: JQuery, options?: dxCalendarOptions); + constructor(element: Element, options?: dxCalendarOptions); + } + export interface dxButtonOptions extends WidgetOptions { + /** A Boolean value specifying whether or not the widget changes its state when interacting with a user. */ + activeStateEnabled?: boolean; + /** A handler for the click event. */ + onClick?: any; + /** Specifies the icon to be displayed on the button. */ + icon?: string; + iconSrc?: string; + /** A template to be used for rendering the dxButton widget. */ + template?: any; + /** The text displayed on the button. */ + text?: string; + /** Specifies the button type. */ + type?: string; + /** Specifies the name of the validation group to be accessed in the click event handler. */ + validationGroup?: string; + } + /** A button widget. */ + export class dxButton extends Widget { + constructor(element: JQuery, options?: dxButtonOptions); + constructor(element: Element, options?: dxButtonOptions); + } + export interface dxBoxOptions extends CollectionWidget { + /** Specifies how widget items are aligned along the main direction. */ + align?: string; + /** Specifies the direction of item positioning in the widget. */ + direction?: string; + /** Specifies how widget items are aligned cross-wise. */ + crossAlign?: string; + } + /** A container widget used to arrange inner elements. */ + export class dxBox extends CollectionWidget { + constructor(element: JQuery, options?: dxBoxOptions); + constructor(element: Element, options?: dxBoxOptions); + } + export interface dxResponsiveBoxOptions extends CollectionWidgetOptions { + /** Specifies the collection of rows for the grid used to position layout elements. */ + rows?: Array; + /** Specifies the collection of columns for the grid used to position layout elements. */ + cols?: Array; + /** Specifies the function returning the screen factor depending on the screen width. */ + screenByWidth?: (width: number) => string; + /** Specifies the screen factor with which all elements are located in a single column. */ + singleColumnScreen?: string; + } + /** A widget used to build an adaptive markup that is dependent on screen resolution. */ + export class dxResponsiveBox extends CollectionWidget { + constructor(element: JQuery, options?: dxBoxOptions); + constructor(element: Element, options?: dxBoxOptions); + } + export interface dxAutocompleteOptions extends dxDropDownListOptions { + /** Specifies the current value displayed by the widget. */ + value?: string; + /** The minimum number of characters that must be entered into the text box to begin a search. */ + minSearchLength?: number; + /** Specifies the maximum count of items displayed by the widget. */ + maxItemCount?: number; + /** Gets the currently selected item. */ + selectedItem?: Object; + } + /** A textbox widget that supports autocompletion. */ + export class dxAutocomplete extends dxDropDownList { + constructor(element: JQuery, options?: dxAutocompleteOptions); + constructor(element: Element, options?: dxAutocompleteOptions); + /** Opens the drop-down editor. */ + open(): void; + /** Closes the drop-down editor. */ + close(): void; + } + export interface dxAccordionOptions extends CollectionWidgetOptions { + /** A number specifying the time in milliseconds spent on the animation of the expanding or collapsing of a panel. */ + animationDuration?: number; + /** Specifies the height of the widget. */ + height?: any; + /** Specifies whether all items can be collapsed or whether at least one item must always be expanded. */ + collapsible?: boolean; + /** Specifies whether the widget can expand several items or only a single item at once. */ + multiple?: boolean; + /** The template to be used for rendering dxAccordion items. */ + itemTemplate?: any; + /** A handler for the itemTitleClick event. */ + onItemTitleClick?: any; + /** A handler for the itemTitleHold event. */ + onItemTitleHold?: Function; + /** The template to be used for rendering an item title. */ + itemTitleTemplate?: any; + /** The index number of the currently selected item. */ + selectedIndex?: number; + /** Specifies whether widget content is rendered when the widget is shown or when rendering the widget. */ + deferRendering?: boolean; + } + /** A widget that displays data source items on collapsible panels. */ + export class dxAccordion extends CollectionWidget { + constructor(element: JQuery, options?: dxAccordionOptions); + constructor(element: Element, options?: dxAccordionOptions); + /** Collapses the specified item. */ + collapseItem(index: number): JQueryPromise; + /** Expands the specified item. */ + expandItem(index: number): JQueryPromise; + /** Updates the dimensions of the widget contents. */ + updateDimensions(): JQueryPromise; + } + export interface dxFileUploaderOptions extends EditorOptions { + /** A read-only option that holds a File instance representing the selected file. */ + value?: File; + /** Holds the File instances representing files selected in the widget. */ + values?: Array; + buttonText?: string; + /** The text displayed on the button that opens the file browser. */ + selectButtonText?: string; + /** The text displayed on the button that starts uploading. */ + uploadButtonText?: string; + /** Specifies the text displayed on the area to which an end-user can drop a file. */ + labelText?: string; + /** Specifies the value passed to the name attribute of the underlying input element. */ + name?: string; + /** Specifies whether the widget enables an end-user to select a single file or multiple files. */ + multiple?: boolean; + /** Specifies a file type or several types accepted by the widget. */ + accept?: string; + /** Specifies a target Url for the upload request. */ + uploadUrl?: string; + /** Specifies if an end user can remove a file from the selection and interrupt uploading. */ + allowCanceling?: boolean; + /** Specifies whether or not the widget displays the list of selected files. */ + showFileList?: boolean; + /** Gets the current progress in percentages. */ + progress?: number; + /** The message displayed by the widget when it is ready to upload the specified files. */ + readyToUploadMessage?: string; + /** The message displayed by the widget when uploading is finished. */ + uploadedMessage?: string; + /** The message displayed by the widget on uploading failure. */ + uploadFailedMessage?: string; + /** Specifies how the widget uploads files. */ + uploadMode?: string; + /** A handler for the uploaded event. */ + onUploaded?: Function; + /** A handler for the uploaded event. */ + onProgress?: Function; + /** A handler for the uploadError event. */ + onUploadError?: Function; + /** A handler for the valueChanged event. */ + onValueChanged?: Function; + } + /** A widget used to select and upload a file or multiple files. */ + export class dxFileUploader extends Editor { + constructor(element: JQuery, options?: dxFileUploaderOptions); + constructor(element: Element, options?: dxFileUploaderOptions); + } + export interface dxTrackBarOptions extends EditorOptions { + /** The minimum value the widget can accept. */ + min?: number; + /** The maximum value the widget can accept. */ + max?: number; + /** The current widget value. */ + value?: number; + } + /** A base class for track bar widgets. */ + export class dxTrackBar extends Editor { + constructor(element: JQuery, options?: dxTrackBarOptions); + constructor(element: Element, options?: dxTrackBarOptions); + } + export interface dxProgressBarOptions extends dxTrackBarOptions { + /** Specifies a format for the progress status. */ + statusFormat?: any; + /** Specifies whether or not the widget displays a progress status. */ + showStatus?: boolean; + /** A handler for the complete event. */ + onComplete?: Function; + } + /** A widget used to indicate progress. */ + export class dxProgressBar extends dxTrackBar { + constructor(element: JQuery, options?: dxProgressBarOptions); + constructor(element: Element, options?: dxProgressBarOptions); + } + export interface dxSliderOptions extends dxTrackBarOptions { + activeStateEnabled?: boolean; + /** The slider step size. */ + step?: number; + /** The current slider value. */ + value?: number; + /** Specifies whether or not to highlight a range selected within the widget. */ + showRange?: boolean; + /** Specifies the size of a step by which a slider handle is moved when a user uses the Page up or Page down keyboard shortcuts. */ + keyStep?: number; + /** Specifies options for the slider tooltip. */ + tooltip?: { + /** Specifies whether or not the tooltip is enabled. */ + enabled?: boolean; + /** Specifies format for the tooltip. */ + format?: any; + /** Specifies whether the tooltip is located over or under the slider. */ + position?: string; + /** Specifies whether the widget always shows a tooltip or only when a pointer is over the slider. */ + showMode?: string; + }; + /** Specifies options for labels displayed at the min and max values. */ + label?: { + /** Specifies whether or not slider labels are visible. */ + visible?: boolean; + /** Specifies whether labels are located over or under the scale. */ + position?: string; + /** Specifies a format for labels. */ + format?: any; + }; + } + /** A widget that allows a user to select a numeric value within a given range. */ + export class dxSlider extends dxTrackBar { + constructor(element: JQuery, options?: dxSliderOptions); + constructor(element: Element, options?: dxSliderOptions); + } + export interface dxRangeSliderOptions extends dxSliderOptions { + /** The left edge of the interval currently selected using the range slider. */ + start?: number; + /** The right edge of the interval currently selected using the range slider. */ + end?: number; + } + /** A widget that enables a user to select a range of numeric values. */ + export class dxRangeSlider extends dxSlider { + constructor(element: JQuery, options?: dxRangeSliderOptions); + constructor(element: Element, options?: dxRangeSliderOptions); + } + export interface dxFormItemLabel { + /** Specifies the label text. */ + text?: string; + /** Specifies whether or not the label is visible. */ + visible?: boolean; + /** Specifies whether or not a colon is displayed at the end of the current label. */ + showColon?: boolean; + /** Specifies the location of a label against the editor. */ + location?: string; + /** Specifies the label horizontal alignment. */ + alignment?: string; + } + export interface dxFormItem { + /** Specifies the type of the current item. */ + itemType?: string; + /** Specifies whether or not the current form item is visible. */ + visible?: boolean; + /** Specifies the sequence number of the item in a form, group or tab. */ + visibleIndex?: number; + /** Specifies a CSS class to be applied to the form item. */ + cssClass?: string; + /** Specifies the number of columns spanned by the item. */ + colSpan?: number; + } + export interface dxFormSimpleItem extends dxFormItem { + /** Specifies the path to the formData object field bound to the current form item. */ + dataField?: string; + /** Specifies the form item name. */ + name?: string; + /** Specifie which editor widget is used to display and edit the form item value. */ + editorType?: string; + /** Specifies configuration options for the editor widget of the current form item. */ + editorOptions?: Object; + /** A template to be used for rendering the form item. */ + template?: any; + /** Specifies the help text displayed for the current form item. */ + helpText?: string; + /** Specifies whether the current form item is required. */ + isRequired?: boolean; + /** Specifies options for the form item label. */ + label?: dxFormItemLabel; + /** An array of validation rules to be checked for the form item editor. */ + validationRules?: Array; + } + export interface dxFormGroupItem extends dxFormItem { + /** Specifies the group caption. */ + caption?: string; + /** A template to be used for rendering the group item. */ + template?: any; + /** The count of columns in the group layout. */ + colCount?: number; + /** Specifies whether or not all group item labels are aligned. */ + alignItemLabels?: boolean; + /** Holds an array of form items displayed within the group. */ + items?: Array; + } + export interface dxFormTab { + /** Specifies the tab title. */ + title?: string; + /** The count of columns in the tab layout. */ + colCount?: number; + /** Specifies whether or not labels of items displayed within the current tab are aligned. */ + alignItemLabels?: boolean; + /** Holds an array of form items displayed within the tab. */ + items?: Array; + } + export interface dxFormTabbedItem extends dxFormItem { + /** Holds a configuration object for the dxTabPanel widget used to display the current form item. */ + tabPanelOptions?: Object; + /** An array of tab configuration objects. */ + tabs?: Array; + } + export interface dxFormOptions extends WidgetOptions { + /** An object providing data for the form. */ + formData?: Object; + /** The count of columns in the form layout. */ + colCount?: any; + /** Specifies the location of a label against the editor. */ + labelLocation?: string; + /** Specifies whether or not all editors on the form are read-only. */ + readOnly?: boolean; + /** A handler for the fieldDataChanged event. */ + onFieldDataChanged?: (e: Object) => void; + /** A handler for the editorEnterKey event. */ + onEditorEnterKey?: (e: Object) => void; + /** Specifies a function that customizes a form item after it has been created. */ + customizeItem?: Function; + /** The minimum column width used for calculating column count in the form layout. */ + minColWidth?: number; + /** Specifies whether or not all root item labels are aligned. */ + alignItemLabels?: boolean; + /** Specifies whether or not item labels in all groups are aligned. */ + alignItemLabelsInAllGroups?: boolean; + /** Specifies whether or not a colon is displayed at the end of form labels. */ + showColonAfterLabel?: boolean; + /** Specifies whether or not the required mark is displayed for optional fields. */ + showRequiredMark?: boolean; + /** Specifies whether or not the optional mark is displayed for optional fields. */ + showOptionalMark?: boolean; + /** The text displayed for required fields. */ + requiredMark?: string; + /** The text displayed for optional fields. */ + optionalMark?: string; + /** Specifies whether or not the total validation summary is displayed on the form. */ + showValidationSummary?: boolean; + /** Holds an array of form items. */ + items?: Array; + /** A Boolean value specifying whether to enable or disable form scrolling. */ + scrollingEnabled?: boolean; + } + /** A form widget used to display and edit values of object fields. */ + export class dxForm extends Widget { + constructor(element: JQuery, options?: dxFormOptions); + constructor(element: Element, options?: dxFormOptions); + /** Updates the specified field of the formData object and the corresponding editor on the form. */ + updateData(dataField: string, value: any): void; + /** Updates the specified fields of the formData object and the corresponding editors on the form. */ + updateData(data: Object): void; + /** Updates the value of a form item option. */ + itemOption(field: string, option: string, value: any): void; + /** Updates the values of form item options. */ + itemOption(field: string, options: Object): void; + /** Returns an editor instance associated with the specified formData field. */ + getEditor(field: string): Object; + /** Updates the dimensions of the widget contents. */ + updateDimensions(): JQueryPromise; + /** Validates the values of all editors on the form against the list of the validation rules specified for each form item. */ + validate(): Object; + } +} +interface JQuery { + dxProgressBar(): JQuery; + dxProgressBar(options: "instance"): DevExpress.ui.dxProgressBar; + dxProgressBar(options: string): any; + dxProgressBar(options: string, ...params: any[]): any; + dxProgressBar(options: DevExpress.ui.dxProgressBarOptions): JQuery; + dxSlider(): JQuery; + dxSlider(options: "instance"): DevExpress.ui.dxSlider; + dxSlider(options: string): any; + dxSlider(options: string, ...params: any[]): any; + dxSlider(options: DevExpress.ui.dxSliderOptions): JQuery; + dxRangeSlider(): JQuery; + dxRangeSlider(options: "instance"): DevExpress.ui.dxRangeSlider; + dxRangeSlider(options: string): any; + dxRangeSlider(options: string, ...params: any[]): any; + dxRangeSlider(options: DevExpress.ui.dxRangeSliderOptions): JQuery; + dxFileUploader(): JQuery; + dxFileUploader(options: "instance"): DevExpress.ui.dxFileUploader; + dxFileUploader(options: string): any; + dxFileUploader(options: string, ...params: any[]): any; + dxFileUploader(options: DevExpress.ui.dxFileUploaderOptions): JQuery; + dxValidator(): JQuery; + dxValidator(options: "instance"): DevExpress.ui.dxValidator; + dxValidator(options: string): any; + dxValidator(options: string, ...params: any[]): any; + dxValidator(options: DevExpress.ui.dxValidatorOptions): JQuery; + dxValidationGroup(): JQuery; + dxValidationGroup(options: "instance"): DevExpress.ui.dxValidationGroup; + dxValidationGroup(options: string): any; + dxValidationGroup(options: string, ...params: any[]): any; + dxValidationSummary(): JQuery; + dxValidationSummary(options: "instance"): DevExpress.ui.dxValidationSummary; + dxValidationSummary(options: string): any; + dxValidationSummary(options: string, ...params: any[]): any; + dxValidationSummary(options: DevExpress.ui.dxValidationSummaryOptions): JQuery; + dxTooltip(): JQuery; + dxTooltip(options: "instance"): DevExpress.ui.dxTooltip; + dxTooltip(options: string): any; + dxTooltip(options: string, ...params: any[]): any; + dxTooltip(options: DevExpress.ui.dxTooltipOptions): JQuery; + dxResizable(): JQuery; + dxResizable(options: "instance"): DevExpress.ui.dxResizable; + dxResizable(options: string): any; + dxResizable(options: string, ...params: any[]): any; + dxResizable(options: DevExpress.ui.dxResizableOptions): JQuery; + dxDropDownList(): JQuery; + dxDropDownList(options: "instance"): DevExpress.ui.dxDropDownList; + dxDropDownList(options: string): any; + dxDropDownList(options: string, ...params: any[]): any; + dxDropDownList(options: DevExpress.ui.dxDropDownListOptions): JQuery; + dxToolbar(): JQuery; + dxToolbar(options: "instance"): DevExpress.ui.dxToolbar; + dxToolbar(options: string): any; + dxToolbar(options: string, ...params: any[]): any; + dxToolbar(options: DevExpress.ui.dxToolbarOptions): JQuery; + dxToast(): JQuery; + dxToast(options: "instance"): DevExpress.ui.dxToast; + dxToast(options: string): any; + dxToast(options: string, ...params: any[]): any; + dxToast(options: DevExpress.ui.dxToastOptions): JQuery; + dxTextEditor(): JQuery; + dxTextEditor(options: "instance"): DevExpress.ui.dxTextEditor; + dxTextEditor(options: string): any; + dxTextEditor(options: string, ...params: any[]): any; + dxTextEditor(options: DevExpress.ui.dxTextEditorOptions): JQuery; + dxTextBox(): JQuery; + dxTextBox(options: "instance"): DevExpress.ui.dxTextBox; + dxTextBox(options: string): any; + dxTextBox(options: string, ...params: any[]): any; + dxTextBox(options: DevExpress.ui.dxTextBoxOptions): JQuery; + dxTextArea(): JQuery; + dxTextArea(options: "instance"): DevExpress.ui.dxTextArea; + dxTextArea(options: string): any; + dxTextArea(options: string, ...params: any[]): any; + dxTextArea(options: DevExpress.ui.dxTextAreaOptions): JQuery; + dxTabs(): JQuery; + dxTabs(options: "instance"): DevExpress.ui.dxTabs; + dxTabs(options: string): any; + dxTabs(options: string, ...params: any[]): any; + dxTabs(options: DevExpress.ui.dxTabsOptions): JQuery; + dxTabPanel(): JQuery; + dxTabPanel(options: "instance"): DevExpress.ui.dxTabPanel; + dxTabPanel(options: string): any; + dxTabPanel(options: string, ...params: any[]): any; + dxTabPanel(options: DevExpress.ui.dxTabPanelOptions): JQuery; + dxSelectBox(): JQuery; + dxSelectBox(options: "instance"): DevExpress.ui.dxSelectBox; + dxSelectBox(options: string): any; + dxSelectBox(options: string, ...params: any[]): any; + dxSelectBox(options: DevExpress.ui.dxSelectBoxOptions): JQuery; + dxTagBox(): JQuery; + dxTagBox(options: "instance"): DevExpress.ui.dxTagBox; + dxTagBox(options: string): any; + dxTagBox(options: string, ...params: any[]): any; + dxTagBox(options: DevExpress.ui.dxTagBoxOptions): JQuery; + dxScrollView(): JQuery; + dxScrollView(options: "instance"): DevExpress.ui.dxScrollView; + dxScrollView(options: string): any; + dxScrollView(options: string, ...params: any[]): any; + dxScrollView(options: DevExpress.ui.dxScrollViewOptions): JQuery; + dxScrollable(): JQuery; + dxScrollable(options: "instance"): DevExpress.ui.dxScrollable; + dxScrollable(options: string): any; + dxScrollable(options: string, ...params: any[]): any; + dxScrollable(options: DevExpress.ui.dxScrollableOptions): JQuery; + dxRadioGroup(): JQuery; + dxRadioGroup(options: "instance"): DevExpress.ui.dxRadioGroup; + dxRadioGroup(options: string): any; + dxRadioGroup(options: string, ...params: any[]): any; + dxRadioGroup(options: DevExpress.ui.dxRadioGroupOptions): JQuery; + dxPopup(): JQuery; + dxPopup(options: "instance"): DevExpress.ui.dxPopup; + dxPopup(options: string): any; + dxPopup(options: string, ...params: any[]): any; + dxPopup(options: DevExpress.ui.dxPopupOptions): JQuery; + dxPopover(): JQuery; + dxPopover(options: "instance"): DevExpress.ui.dxPopover; + dxPopover(options: string): any; + dxPopover(options: string, ...params: any[]): any; + dxPopover(options: DevExpress.ui.dxPopoverOptions): JQuery; + dxOverlay(): JQuery; + dxOverlay(options: "instance"): DevExpress.ui.dxOverlay; + dxOverlay(options: string): any; + dxOverlay(options: string, ...params: any[]): any; + dxOverlay(options: DevExpress.ui.dxOverlayOptions): JQuery; + dxNumberBox(): JQuery; + dxNumberBox(options: "instance"): DevExpress.ui.dxNumberBox; + dxNumberBox(options: string): any; + dxNumberBox(options: string, ...params: any[]): any; + dxNumberBox(options: DevExpress.ui.dxNumberBoxOptions): JQuery; + dxNavBar(): JQuery; + dxNavBar(options: "instance"): DevExpress.ui.dxNavBar; + dxNavBar(options: string): any; + dxNavBar(options: string, ...params: any[]): any; + dxNavBar(options: DevExpress.ui.dxNavBarOptions): JQuery; + dxMultiView(): JQuery; + dxMultiView(options: "instance"): DevExpress.ui.dxMultiView; + dxMultiView(options: string): any; + dxMultiView(options: string, ...params: any[]): any; + dxMultiView(options: DevExpress.ui.dxMultiViewOptions): JQuery; + dxMap(): JQuery; + dxMap(options: "instance"): DevExpress.ui.dxMap; + dxMap(options: string): any; + dxMap(options: string, ...params: any[]): any; + dxMap(options: DevExpress.ui.dxMapOptions): JQuery; + dxLookup(): JQuery; + dxLookup(options: "instance"): DevExpress.ui.dxLookup; + dxLookup(options: string): any; + dxLookup(options: string, ...params: any[]): any; + dxLookup(options: DevExpress.ui.dxLookupOptions): JQuery; + dxLoadPanel(): JQuery; + dxLoadPanel(options: "instance"): DevExpress.ui.dxLoadPanel; + dxLoadPanel(options: string): any; + dxLoadPanel(options: string, ...params: any[]): any; + dxLoadPanel(options: DevExpress.ui.dxLoadPanelOptions): JQuery; + dxLoadIndicator(): JQuery; + dxLoadIndicator(options: "instance"): DevExpress.ui.dxLoadIndicator; + dxLoadIndicator(options: string): any; + dxLoadIndicator(options: string, ...params: any[]): any; + dxLoadIndicator(options: DevExpress.ui.dxLoadIndicatorOptions): JQuery; + dxList(): JQuery; + dxList(options: "instance"): DevExpress.ui.dxList; + dxList(options: string): any; + dxList(options: string, ...params: any[]): any; + dxList(options: DevExpress.ui.dxListOptions): JQuery; + dxGallery(): JQuery; + dxGallery(options: "instance"): DevExpress.ui.dxGallery; + dxGallery(options: string): any; + dxGallery(options: string, ...params: any[]): any; + dxGallery(options: DevExpress.ui.dxGalleryOptions): JQuery; + dxDropDownEditor(): JQuery; + dxDropDownEditor(options: "instance"): DevExpress.ui.dxDropDownEditor; + dxDropDownEditor(options: string): any; + dxDropDownEditor(options: string, ...params: any[]): any; + dxDropDownEditor(options: DevExpress.ui.dxDropDownEditorOptions): JQuery; + dxDateBox(): JQuery; + dxDateBox(options: "instance"): DevExpress.ui.dxDateBox; + dxDateBox(options: string): any; + dxDateBox(options: string, ...params: any[]): any; + dxDateBox(options: DevExpress.ui.dxDateBoxOptions): JQuery; + dxCheckBox(): JQuery; + dxCheckBox(options: "instance"): DevExpress.ui.dxCheckBox; + dxCheckBox(options: string): any; + dxCheckBox(options: string, ...params: any[]): any; + dxCheckBox(options: DevExpress.ui.dxCheckBoxOptions): JQuery; + dxBox(): JQuery; + dxBox(options: "instance"): DevExpress.ui.dxBox; + dxBox(options: string): any; + dxBox(options: string, ...params: any[]): any; + dxBox(options: DevExpress.ui.dxBoxOptions): JQuery; + dxButton(): JQuery; + dxButton(options: "instance"): DevExpress.ui.dxButton; + dxButton(options: string): any; + dxButton(options: string, ...params: any[]): any; + dxButton(options: DevExpress.ui.dxButtonOptions): JQuery; + dxCalendar(): JQuery; + dxCalendar(options: "instance"): DevExpress.ui.dxCalendar; + dxCalendar(options: string): any; + dxCalendar(options: string, ...params: any[]): any; + dxCalendar(options: DevExpress.ui.dxCalendarOptions): JQuery; + dxAccordion(): JQuery; + dxAccordion(options: "instance"): DevExpress.ui.dxAccordion; + dxAccordion(options: string): any; + dxAccordion(options: string, ...params: any[]): any; + dxAccordion(options: DevExpress.ui.dxAccordionOptions): JQuery; + dxResponsiveBox(): JQuery; + dxResponsiveBox(options: "instance"): DevExpress.ui.dxResponsiveBox; + dxResponsiveBox(options: string): any; + dxResponsiveBox(options: string, ...params: any[]): any; + dxResponsiveBox(options: DevExpress.ui.dxResponsiveBoxOptions): JQuery; + dxAutocomplete(): JQuery; + dxAutocomplete(options: "instance"): DevExpress.ui.dxAutocomplete; + dxAutocomplete(options: string): any; + dxAutocomplete(options: string, ...params: any[]): any; + dxAutocomplete(options: DevExpress.ui.dxAutocompleteOptions): JQuery; + dxForm(): JQuery; + dxForm(options: "instance"): DevExpress.ui.dxForm; + dxForm(options: string): any; + dxForm(options: string, ...params: any[]): any; + dxForm(options: DevExpress.ui.dxForm): JQuery; +} + +declare module DevExpress.ui { + export interface dxTileViewOptions extends CollectionWidgetOptions { + /** A Boolean value specifying whether or not the widget changes its state when interacting with a user. */ + activeStateEnabled?: boolean; + /** Specifies the height of the base tile view item. */ + baseItemHeight?: number; + /** Specifies the width of the base tile view item. */ + baseItemWidth?: number; + /** Specifies whether tiles are placed horizontally or vertically. */ + direction?: string; + /** Specifies the height of the widget. */ + height?: any; + /** Specifies the distance in pixels between adjacent tiles. */ + itemMargin?: number; + /** A Boolean value specifying whether or not to display a scrollbar. */ + showScrollbar?: boolean; + } + /** A widget displaying several blocks of data as tiles. */ + export class dxTileView extends CollectionWidget { + constructor(element: JQuery, options?: dxTileViewOptions); + constructor(element: Element, options?: dxTileViewOptions); + /** Returns the current scroll position of the widget content. */ + scrollPosition(): number; + } + export interface dxSwitchOptions extends EditorOptions { + activeStateEnabled?: boolean; + /** Text displayed when the widget is in a disabled state. */ + offText?: string; + /** Text displayed when the widget is in an enabled state. */ + onText?: string; + /** A Boolean value specifying whether the current switch state is "On" or "Off". */ + value?: boolean; + } + /** A switch widget. */ + export class dxSwitch extends Editor { + constructor(element: JQuery, options?: dxSwitchOptions); + constructor(element: Element, options?: dxSwitchOptions); + } + export interface dxSlideOutViewOptions extends WidgetOptions { + /** Specifies the current menu position. */ + menuPosition?: string; + /** Specifies whether or not the menu panel is visible. */ + menuVisible?: boolean; + /** Specifies whether or not the menu is shown when a user swipes the widget content. */ + swipeEnabled?: boolean; + /** A template to be used for rendering menu panel content. */ + menuTemplate?: any; + /** A template to be used for rendering widget content. */ + contentTemplate?: any; + } + /** The widget that allows you to slide-out the current view to reveal a custom menu. */ + export class dxSlideOutView extends Widget { + constructor(element: JQuery, options?: dxSlideOutViewOptions); + constructor(element: Element, options?: dxSlideOutViewOptions); + /** Returns an HTML element of the widget menu block. */ + menuContent(): JQuery; + /** Returns an HTML element of the widget content block. */ + content(): JQuery; + /** Displays the widget's menu block. */ + showMenu(): JQueryPromise; + /** Hides the widget's menu block. */ + hideMenu(): JQueryPromise; + /** Toggles the visibility of the widget's menu block. */ + toggleMenuVisibility(): JQueryPromise; + } + export interface dxSlideOutOptions extends CollectionWidgetOptions { + /** A Boolean value specifying whether or not the widget changes its state when interacting with a user. */ + activeStateEnabled?: boolean; + /** A Boolean value specifying whether or not to display a grouped menu. */ + menuGrouped?: boolean; + /** Specifies the current menu position. */ + menuPosition?: string; + /** The name of the template used to display a group header. */ + menuGroupTemplate?: any; + /** The template used to render menu items. */ + menuItemTemplate?: any; + /** A handler for the menuGroupRendered event. */ + onMenuGroupRendered?: Function; + /** A handler for the menuItemRendered event. */ + onMenuItemRendered?: Function; + /** Specifies whether or not the slide-out menu is displayed. */ + menuVisible?: boolean; + /** Indicates whether the menu can be shown/hidden by swiping the widget's main panel. */ + swipeEnabled?: boolean; + /** A template to be used for rendering widget content. */ + contentTemplate?: any; + } + /** The widget that allows you to slide-out the current view to reveal an item list. */ + export class dxSlideOut extends CollectionWidget { + constructor(element: JQuery, options?: dxSlideOutOptions); + constructor(element: Element, options?: dxSlideOutOptions); + /** Hides the widget's slide-out menu. */ + hideMenu(): JQueryPromise; + /** Displays the widget's slide-out menu. */ + showMenu(): JQueryPromise; + /** Toggles the visibility of the widget's slide-out menu. */ + toggleMenuVisibility(showing: boolean): JQueryPromise; + } + export interface dxPivotOptions extends CollectionWidgetOptions { + /** The index of the currently active pivot item. */ + selectedIndex?: number; + /** A Boolean value specifying whether or not to allow users to switch between items by swiping. */ + swipeEnabled?: boolean; + /** A template to be used for rendering widget content. */ + contentTemplate?: any; + /** The template to be used for rendering an item title. */ + itemTitleTemplate?: any; + } + /** A widget that is similar to a traditional tab control, but optimized for the phone with simplified end-user interaction. */ + export class dxPivot extends CollectionWidget { + constructor(element: JQuery, options?: dxPivotOptions); + constructor(element: Element, options?: dxPivotOptions); + } + export interface dxPanoramaOptions extends CollectionWidgetOptions { + /** An object exposing options for setting a background image for the panorama. */ + backgroundImage?: { + /** Specifies the height of the panorama's background image. */ + height?: number; + /** Specifies the URL of the image that is used as the panorama's background image. */ + url?: string; + /** Specifies the width of the panorama's background image. */ + width?: number; + }; + /** The index of the currently active panorama item. */ + selectedIndex?: number; + /** Specifies the widget content title. */ + title?: string; + } + /** A widget displaying the required content in a long horizontal canvas that extends beyond the frames of the screen. */ + export class dxPanorama extends CollectionWidget { + constructor(element: JQuery, options?: dxDropDownEditorOptions); + constructor(element: Element, options?: dxDropDownEditorOptions); + } + export interface dxDropDownMenuOptions extends WidgetOptions { + /** A handler for the buttonClick event. */ + onButtonClick?: any; + /** The name of the icon to be displayed by the DropDownMenu button. */ + buttonIcon?: string; + /** The text displayed in the DropDownMenu button. */ + buttonText?: string; + buttonIconSrc?: string; + /** A data source used to fetch data to be displayed by the widget. */ + dataSource?: any; + /** A handler for the itemClick event. */ + onItemClick?: any; + /** An array of items displayed by the widget. */ + items?: Array; + /** The template to be used for rendering items. */ + itemTemplate?: any; + /** Specifies whether or not to show the drop down menu within a dxPopover widget. */ + usePopover?: boolean; + /** The width of the menu popup in pixels. */ + popupWidth?: any; + /** The height of the menu popup in pixels. */ + popupHeight?: any; + /** Specifies whether or not the drop-down menu is displayed. */ + opened?: boolean; + hoverStateEnabled?: boolean; + } + /** A drop-down menu widget. */ + export class dxDropDownMenu extends Widget { + constructor(element: JQuery, options?: dxDropDownEditorOptions); + constructor(element: Element, options?: dxDropDownEditorOptions); + /** This section lists the data source fields that are used in a default template for drop-down menu items. */ + /** Opens the drop-down menu. */ + open(): void; + /** Closes the drop-down menu. */ + close(): void; + } + export interface dxActionSheetOptions extends CollectionWidgetOptions { + /** A handler for the cancelClick event. */ + onCancelClick?: any; + /** The text displayed in the button that closes the action sheet. */ + cancelText?: string; + /** Specifies whether or not to display the Cancel button in action sheet. */ + showCancelButton?: boolean; + /** A Boolean value specifying whether or not the title of the action sheet is visible. */ + showTitle?: boolean; + /** Specifies the element the action sheet popover points at. */ + target?: any; + /** The title of the action sheet. */ + title?: string; + /** Specifies whether or not to show the action sheet within a dxPopover widget. */ + usePopover?: boolean; + /** A Boolean value specifying whether or not the dxActionSheet widget is visible. */ + visible?: boolean; + } + /** A widget consisting of a set of choices related to a certain task. */ + export class dxActionSheet extends CollectionWidget { + constructor(element: JQuery, options?: dxActionSheetOptions); + constructor(element: Element, options?: dxActionSheetOptions); + /** Hides the widget. */ + hide(): JQueryPromise; + /** Shows the widget. */ + show(): JQueryPromise; + /** Shows or hides the widget depending on the Boolean value passed as the parameter. */ + toggle(showing: boolean): JQueryPromise; + } +} +interface JQuery { + dxTileView(): JQuery; + dxTileView(options: "instance"): DevExpress.ui.dxTileView; + dxTileView(options: string): any; + dxTileView(options: string, ...params: any[]): any; + dxTileView(options: DevExpress.ui.dxTileViewOptions): JQuery; + dxSwitch(): JQuery; + dxSwitch(options: "instance"): DevExpress.ui.dxSwitch; + dxSwitch(options: string): any; + dxSwitch(options: string, ...params: any[]): any; + dxSwitch(options: DevExpress.ui.dxSwitchOptions): JQuery; + dxSlideOut(): JQuery; + dxSlideOut(options: "instance"): DevExpress.ui.dxSlideOut; + dxSlideOut(options: string): any; + dxSlideOut(options: string, ...params: any[]): any; + dxSlideOut(options: DevExpress.ui.dxSlideOutOptions): JQuery; + dxPivot(): JQuery; + dxPivot(options: "instance"): DevExpress.ui.dxPivot; + dxPivot(options: string): any; + dxPivot(options: string, ...params: any[]): any; + dxPivot(options: DevExpress.ui.dxPivotOptions): JQuery; + dxPanorama(): JQuery; + dxPanorama(options: "instance"): DevExpress.ui.dxPanorama; + dxPanorama(options: string): any; + dxPanorama(options: string, ...params: any[]): any; + dxPanorama(options: DevExpress.ui.dxPanoramaOptions): JQuery; + dxActionSheet(): JQuery; + dxActionSheet(options: "instance"): DevExpress.ui.dxActionSheet; + dxActionSheet(options: string): any; + dxActionSheet(options: string, ...params: any[]): any; + dxActionSheet(options: DevExpress.ui.dxActionSheetOptions): JQuery; + dxDropDownMenu(): JQuery; + dxDropDownMenu(options: "instance"): DevExpress.ui.dxDropDownMenu; + dxDropDownMenu(options: string): any; + dxDropDownMenu(options: string, ...params: any[]): any; + dxDropDownMenu(options: DevExpress.ui.dxDropDownMenuOptions): JQuery; +} +declare module DevExpress.data { + export interface XmlaStoreOptions { + /** The HTTP address to an XMLA OLAP server. */ + url?: string; + /** The name of the database associated with the Store. */ + catalog?: string; + /** The cube name. */ + cube?: string; + beforeSend?: (request: Object) => void; + } + /** A Store that provides access to an OLAP cube using the XMLA standard. */ + export class XmlaStore { + constructor(options: XmlaStoreOptions); + } + export interface PivotGridField { + index?: number; + /** A boolean value specifying whether or not the field is visible in the pivot grid and the Field Chooser. */ + visible?: boolean; + /** Name of the data source field containing data for the pivot grid field. */ + dataField?: string; + /** A caption that will be displayed in the pivot grid's field chooser to identify the field. */ + caption?: string; + /** Specifies a type of field values. */ + dataType?: string; + /** Specifies how the values of the current field are combined into groups. Cannot be used for the XmlaStore store type. */ + groupInterval?: any; + /** Specifies how to aggregate field data. Cannot be used for the XmlaStore store type. */ + summaryType?: string; + /** Allows you to use a custom aggregate function to calculate the summary values. Cannot be used for the XmlaStore store type. */ + calculateCustomSummary?: (options: { + summaryProcess?: string; + value?: any; + totalValue?: any; + }) => void; + /** Specifies the function that determines how to split data from the data source into ranges for header items. Cannot be used for the XmlaStore store type. */ + selector?: (data: Object) => any; + /** Type of the area where the field is located. */ + area?: string; + /** Index among the other fields displayed within the same area. */ + areaIndex?: number; + /** The name of the folder in which the field is located. */ + displayFolder?: string; + /** The name of the group to which the field belongs. */ + groupName?: string; + /** The index of the field within a group. */ + groupIndex?: number; + /** Specifies the initial sort order of field values. */ + sortOrder?: string; + /** Specifies how field data should be sorted. Can be used for the XmlaStore store type only. */ + sortBy?: string; + /** Specifies the data field against which the header items of this field should be sorted. */ + sortBySummaryField?: string; + /** The array of field names that specify a path to column/row whose summary field is used for sorting of this field's header items. */ + sortBySummaryPath?: Array; + /** The filter values for the current field. */ + filterValues?: Array; + /** The filter type for the current field. */ + filterType?: string; + /** Indicates whether all header items of the field's header level are expanded. */ + expanded?: boolean; + /** Specifies whether the field should be treated as a Data Field. */ + isMeasure?: boolean; + /** Specifies a display format for field values. */ + format?: string; + /** Specifies a callback function that returns the text to be displayed in the cells of a field. */ + customizeText?: (cellInfo: { value: any; valueText: string }) => string; + /** Specifies a precision for formatted field values. */ + precision?: number; + /** Specifies how to sort the header items. */ + sortingMethod?: (a: Object, b: Object) => number; + /** Allows an end-user to change sorting options. */ + allowSorting?: boolean; + /** Allows an end-user to sort columns by summary values. */ + allowSortingBySummary?: boolean; + /** Allows an end-user to change filtering options. */ + allowFiltering?: boolean; + /** Allows an end-user to expand/collapse all header items within a header level. */ + allowExpandAll?: boolean; + /** Specifies the absolute width of the field in the pivot grid. */ + width?: number; + /** Specifies the summary post-processing algorithm. */ + summaryDisplayMode?: string; + /** Specifies whether to summarize each next summary value with the previous one by rows or columns. */ + runningTotal?: string; + /** Specifies whether to allow the predefined summary post-processing functions ('absoluteVariation' and 'percentVariation') and runningTotal to take values of different groups into account. */ + allowCrossGroupCalculation?: boolean; + /** Specifies a callback function that allows you to modify summary values after they are calculated. */ + calculateSummaryValue?: (e: Object) => number; + /** Specifies whether or not to display Total values for the field. */ + showTotals?: boolean; + /** Specifies whether or not to display Grand Total values for the field. */ + showGrandTotals?: boolean; + } + export class SummaryCell { + /** Gets the parent cell in a specified direction. */ + parent(direction: string): SummaryCell; + /** Gets all children cells in a specified direction. */ + children(direction: string): Array; + /** Gets a partial Grand Total cell of a row or column. */ + grandTotal(direction: string): SummaryCell; + /** Gets the Grand Total of the entire pivot grid. */ + grandTotal(): SummaryCell; + /** Gets the cell next to the current one in a specified direction. */ + next(direction: string): SummaryCell; + /** Gets the cell next to current in a specified direction. */ + next(direction: string, allowCrossGroup: boolean): SummaryCell; + /** Gets the cell prior to the current one in a specified direction. */ + prev(direction: string): SummaryCell; + /** Gets the cell previous to current in a specified direction. */ + prev(direction: string, allowCrossGroup: boolean): SummaryCell; + /** Gets the child cell in a specified direction. */ + child(direction: string, fieldValue: any): SummaryCell; + /** Gets the cell located by the path of the source cell with one field value changed. */ + slice(field: PivotGridField, value: any): SummaryCell; + /** Gets the header cell of a row or column field to which the current cell belongs. */ + field(area: string): PivotGridField; + /** Gets the value of the current cell. */ + value(): any; + /** Gets the value of the current cell. */ + value(isCalculatedValue: boolean): any; + /** Gets the value of any field linked with the current cell. */ + value(field: PivotGridField): any; + /** Gets the value of any field linked with the current cell. */ + value(field: PivotGridField, isCalculatedValue: boolean): any; + } + export interface PivotGridDataSourceOptions { + /** Specifies the underlying Store instance used to access data. */ + store?: any; + /** Indicates whether or not the automatic field generation from data in the Store is enabled. */ + retrieveFields?: boolean; + /** Specifies data filtering conditions. Cannot be used for the XmlaStore store type. */ + filter?: Object; + /** An array of pivot grid fields. */ + fields?: Array; + /** A handler for the changed event. */ + onChanged?: () => void; + /** A handler for the loadingChanged event. */ + onLoadingChanged?: (isLoading: boolean) => void; + /** A handler for the loadError event. */ + onLoadError?: (e?: Object) => void; + /** A handler for the fieldsPrepared event. */ + onFieldsPrepared?: (e?: Array) => void; + } + /** An object that provides access to data for the dxPivotGrid widget. */ + export class PivotGridDataSource implements EventsMixin { + constructor(options?: PivotGridDataSource); + /** Starts reloading data from any store and updating the data source. */ + reload(): JQueryPromise; + /** Starts updating the data source. Reloads data from the XMLA store only. */ + load(): JQueryPromise; + /** Indicates whether or not the PivotGridDataSource is currently being loaded. */ + isLoading(): boolean; + /** Gets data displayed in a PivotGrid. */ + getData(): Object; + /** Gets all fields within a specified area. */ + getAreaFields(area: string, collectGroups: boolean): Array; + /** Gets all fields from the data source. */ + fields(): Array; + /** Sets the fields option. */ + fields(fields: Array): void; + /** Gets current options of a specified field. */ + field(id: any): PivotGridField; + /** Sets one or more options of a specified field. */ + field(id: any, field: PivotGridField): void; + /** Collapses a specified header item. */ + collapseHeaderItem(area: string, path: Array): void; + /** Expands a specified header item. */ + expandHeaderItem(area: string, path: Array): void; + /** Expands all header items of a field. */ + expandAll(id: any): void; + /** Collapses all header items of a field. */ + collapseAll(id: any): void; + /** Disposes of all resources associated with this PivotGridDataSource. */ + dispose(): void; + /** Gets the current filter expression. Cannot be used for the XmlaStore store type. */ + filter(): Object; + /** Applies a new filter expression. Cannot be used for the XmlaStore store type. */ + filter(filterExpr: Object): void; + /** Provides access to a list of records (facts) that were used to calculate a specific summary. */ + createDrillDownDataSource(options: { + columnPath?: Array; + rowPath?: Array; + dataIndex?: number; + maxRowCount?: number; + customColumns?: Array; + }): DevExpress.data.DataSource; + /** Gets the current PivotGridDataSource state (fields configuration, sorting, filters, expanded headers, etc.) */ + state(): Object; + /** Sets the PivotGridDataSource state. */ + state(state: Object): void; + on(eventName: string, eventHandler: Function): PivotGridDataSource; + on(events: { [eventName: string]: Function; }): PivotGridDataSource; + off(eventName: string): PivotGridDataSource; + off(eventName: string, eventHandler: Function): PivotGridDataSource; + } +} +declare module DevExpress.ui { + export interface dxSchedulerOptions extends WidgetOptions { + /** Specifies a date displayed on the current scheduler view by default. */ + currentDate?: Date; + /** The earliest date the widget allows you to select. */ + min?: Date; + /** The latest date the widget allows you to select. */ + max?: Date; + /** Specifies the view used in the scheduler by default. */ + currentView?: string; + /** A data source used to fetch data to be displayed by the widget. */ + dataSource?: any; + /** Specifies the first day of a week. */ + firstDayOfWeek?: number; + /** The template to be used for rendering appointments. */ + appointmentTemplate?: any; + /** The template to be used for rendering an appointment tooltip. */ + appointmentTooltipTemplate?: any; + /** Lists the views to be available within the scheduler's View Selector. */ + views?: Array; + /** Specifies the resource kinds by which the scheduler's appointments are grouped in a timetable. */ + groups?: Array; + /** Specifies a start hour in the scheduler view's time interval. */ + startDayHour?: number; + /** Specifies an end hour in the scheduler view's time interval. */ + endDayHour?: number; + /** Specifies whether or not the "All-day" panel is visible. */ + showAllDayPanel?: boolean; + /** Specifies cell duration in minutes. */ + cellDuration?: number; + /** Specifies the edit mode for recurrent appointments. */ + recurrenceEditMode?: string; + /** Specifies which editing operations an end-user can perform on appointments. */ + editing?: { + /** Specifies whether or not an end-user can add appointments. */ + allowAdding?: boolean; + /** Specifies whether or not an end-user can change appointment options. */ + allowUpdating?: boolean; + /** Specifies whether or not an end-user can delete appointments. */ + allowDeleting?: boolean; + /** Specifies whether or not an end-user can change an appointment duration. */ + allowResizing?: boolean; + /** Specifies whether or not an end-user can drag appointments. */ + allowDragging?: boolean; + } + /** Specifies an array of resources available in the scheduler. */ + resources?: Array<{ + /** Indicates whether or not several resources of this kind can be assigned to an appointment. */ + allowMultiple?: boolean; + /** + * Indicates whether or not resources of this kind have priority in the color identification of the appointments that have resources of different kinds assigned. + * @deprecated Use the 'useColorAsDefault' property instead + */ + mainColor?: boolean; + /** Indicates whether or not resources of this kind have priority in the color identification of the appointments that have resources of different kinds assigned. */ + useColorAsDefault?: boolean; + /** A data source used to fetch resources to be available in the scheduler. */ + dataSource?: any; + /** Specifies the resource object field whose value is displayed by the Resource editor in the Appointment popup window. */ + displayExpr?: any; + /** Specifies the resource object field that is used as a value of the Resource editor in the Appointment popup window. */ + valueExpr?: any; + /** The name of the appointment object field that specifies a resource of this kind. */ + field?: string; + /** Specifies the label of the Appointment popup window field that allows end users to assign a resource of this kind. */ + label?: string; + }>; + /** A handler for the AppointmentAdding event. */ + onAppointmentAdding?: Function; + /** A handler for the appointmentAdded event. */ + onAppointmentAdded?: Function; + /** A handler for the AppointmentUpdating event. */ + onAppointmentUpdating?: Function; + /** A handler for the appointmentUpdated event. */ + onAppointmentUpdated?: Function; + /** A handler for the AppointmentDeleting event. */ + onAppointmentDeleting?: Function; + /** A handler for the appointmentDeleted event. */ + onAppointmentDeleted?: Function; + /** A handler for the appointmentRendered event. */ + onAppointmentRendered?: Function; + /** A handler for the appointmentClick event. */ + onAppointmentClick?: any; + /** A handler for the appointmentDblClick event. */ + onAppointmentDblClick?: any; + /** A handler for the cellClick event. */ + onCellClick?: any; + /** A handler for the appointmentFormCreated event. */ + onAppointmentFormCreated?: Function; + /** Specifies whether or not an end-user can scroll the view horizontally. */ + horizontalScrollingEnabled?: boolean; + /** Specifies whether a user can switch views using tabs or a drop-down menu. */ + useDropDownViewSwitcher?: boolean; + } + /** A widget that displays scheduled data using different views and provides the capability to load, add and edit appointments. */ + export class dxScheduler extends Widget { + constructor(element: JQuery, options?: dxSchedulerOptions); + constructor(element: Element, options?: dxSchedulerOptions); + /** Add the appointment defined by the object passed as a parameter to the data associated with the widget. */ + addAppointment(appointment: Object): void; + /** Updates the appointment specified by the first method parameter by the appointment object specified by the second method parameter in the the data associated with the widget. */ + updateAppointment(target: Object, appointment: Object): void; + /** Deletes the appointment defined by the parameter from the the data associated with the widget. */ + deleteAppointment(appointment: Object): void; + /** Scrolls the scheduler work space to the specified time. */ + scrollToTime(hours: number, minutes: number): void; + /** Displays the Appointment Details popup. */ + showAppointmentPopup(appointmentData: Object, createNewAppointment?: boolean): void; + } + export interface dxColorBoxOptions extends dxDropDownEditorOptions { + /** Specifies the text displayed on the button that applies changes and closes the drop-down editor. */ + applyButtonText?: string; + applyValueMode?: string; + /** Specifies the text displayed on the button that cancels changes and closes the drop-down editor. */ + cancelButtonText?: string; + /** Specifies whether or not the widget value includes the alpha channel component. */ + editAlphaChannel?: boolean; + /** Specifies the size of a step by which a handle is moved using a keyboard shortcut. */ + keyStep?: number; + } + /** A widget used to specify a color value. */ + export class dxColorBox extends dxDropDownEditor { + constructor(element: JQuery, options?: dxColorBoxOptions); + constructor(element: Element, options?: dxColorBoxOptions); + } + export interface HierarchicalCollectionWidgetOptions extends CollectionWidgetOptions { + /** Specifies the name of the data source item field whose value is displayed by the widget. */ + displayExpr?: any; + /** Specifies the name of the data source item field used as a key. */ + keyExpr?: any; + /** Specifies the name of the data source item field whose value defines whether or not the corresponding widget items is selected. */ + selectedExpr?: any; + /** Specifies the name of the data source item field that contains an array of nested items. */ + itemsExpr?: any; + /** Specifies the name of the data source item field whose value defines whether or not the corresponding widget item is disabled. */ + disabledExpr?: any; + /** Specifies the name of the data source item field that holds the key of the parent item. */ + parentIdExpr?: any; + /** Specifies the name of the data source item field whose value defines whether or not the corresponding widget items is expanded. */ + expandedExpr?: any; + hoverStateEnabled?: boolean; + focusStateEnabled?: boolean; + } + export class HierarchicalCollectionWidget extends CollectionWidget { + } + export interface dxTreeViewOptions extends HierarchicalCollectionWidgetOptions { + /** Specifies whether or not to animate item collapsing and expanding. */ + animationEnabled?: boolean; + /** Specifies whether a nested or plain array is used as a data source. */ + dataStructure?: string; + /** Specifies whether or not a user can expand all tree view items by the "*" hot key. */ + expandAllEnabled?: boolean; + /** Specifies whether or not a check box is displayed at each tree view item. */ + showCheckBoxes?: boolean; + /** Specifies the current check boxes display mode. */ + showCheckBoxesMode?: string; + /** Specifies whether or not to select nodes recursively. */ + selectNodesRecursive?: boolean; + /** Specifies whether or not all parent nodes of an initially expanded node are displayed expanded. */ + expandNodesRecursive?: boolean; + /** Specifies whether the "Select All" check box is displayed over the tree view. */ + selectAllEnabled?: boolean; + /** Specifies the text displayed at the "Select All" check box. */ + selectAllText?: string; + /** Specifies the name of the data source item field whose value defines whether or not the corresponding node includes child nodes. */ + hasItemsExpr?: any; + /** Specifies if the virtual mode is enabled. */ + virtualModeEnabled?: boolean; + /** Specifies the parent ID value of the root item. */ + rootValue?: any; + /** Specifies the current value used to filter tree view items. */ + searchValue?: string; + /** A string value specifying available scrolling directions. */ + scrollDirection?: string; + /** A handler for the itemSelected event. */ + onItemSelected?: Function; + /** A handler for the itemExpanded event. */ + onItemExpanded?: Function; + /** A handler for the itemCollapsed event. */ + onItemCollapsed?: Function; + onItemClick?: Function; + onItemContextMenu?: Function; + onItemRendered?: Function; + onItemHold?: Function; + } + /** A widget displaying specified data items as a tree. */ + export class dxTreeView extends HierarchicalCollectionWidget { + constructor(element: JQuery, options?: dxTreeViewOptions); + constructor(element: Element, options?: dxTreeViewOptions); + /** Updates the tree view scrollbars according to the current size of the widget content. */ + updateDimensions(): JQueryPromise; + /** Selects the specified item. */ + selectItem(itemElement: any): void; + /** Unselects the specified item. */ + unselectItem(itemElement: any): void; + /** Expands the specified item. */ + expandItem(itemElement: any): void; + /** Collapses the specified item. */ + collapseItem(itemElement: any): void; + /** Returns all nodes of the tree view. */ + getNodes(): Array; + /** Selects all widget items. */ + selectAll(): void; + /** Unselects all widget items. */ + unselectAll(): void; + } + export interface dxMenuBaseOptions extends HierarchicalCollectionWidgetOptions { + /** An object that defines the animation options of the widget. */ + animation?: fx.AnimationOptions; + /** A Boolean value specifying whether or not the widget changes its state when interacting with a user. */ + activeStateEnabled?: boolean; + /** Specifies the name of the CSS class associated with the menu. */ + cssClass?: string; + /** Holds an array of menu items. */ + items?: Array; + /** Specifies whether or not an item becomes selected if an end-user clicks it. */ + selectionByClick?: boolean; + /** Specifies the selection mode supported by the menu. */ + selectionMode?: string; + /** Specifies options of submenu showing and hiding. */ + showSubmenuMode?: { + /** Specifies the mode name. */ + name?: string; + /** Specifies the delay of submenu show and hiding. */ + delay?: { + /** The time span after which the submenu is shown. */ + show?: number; + /** The time span after which the submenu is hidden. */ + hide?: number; + }; + }; + } + export class dxMenuBase extends HierarchicalCollectionWidget { + constructor(element: JQuery, options?: dxMenuBaseOptions); + constructor(element: Element, options?: dxMenuBaseOptions); + /** Selects the specified item. */ + selectItem(itemElement: any): void; + /** Unselects the specified item. */ + unselectItem(itemElement: any): void; + } + export interface dxMenuOptions extends dxMenuBaseOptions { + /** Specifies whether or not the submenu is hidden when the mouse pointer leaves it. */ + hideSubmenuOnMouseLeave?: boolean; + /** Specifies whether the menu has horizontal or vertical orientation. */ + orientation?: string; + /** Specifies options for showing and hiding the first level submenu. */ + showFirstSubmenuMode?: { + /** Specifies the mode name. */ + name?: string; + /** Specifies the delay of submenu showing and hiding. */ + delay?: { + /** The time span after which the submenu is shown. */ + show?: number; + /** The time span after which the submenu is hidden. */ + hide?: number; + }; + }; + /** Specifies the direction at which the submenus are displayed. */ + submenuDirection?: string; + /** A handler for the submenuHidden event. */ + onSubmenuHidden?: Function; + /** A handler for the submenuHiding event. */ + onSubmenuHiding?: Function; + /** A handler for the submenuShowing event. */ + onSubmenuShowing?: Function; + /** A handler for the submenuShown event. */ + onSubmenuShown?: Function; + } + /** A menu widget. */ + export class dxMenu extends dxMenuBase { + constructor(element: JQuery, options?: dxMenuOptions); + constructor(element: Element, options?: dxMenuOptions); + } + export interface dxContextMenuOptions extends dxMenuBaseOptions { + /** Holds an object that specifies options of alternative menu invocation. */ + alternativeInvocationMode?: { + /** Specifies whether or not the standard context menu invocation (on a right mouse click or on a long tap) is disabled. */ + enabled?: Boolean; + /** Specifies the element used to invoke the context menu. */ + invokingElement?: any; + }; + /** A handler for the hidden event. */ + onHidden?: Function; + /** A handler for the hiding event. */ + onHiding?: Function; + /** A handler for the positioning event. */ + onPositioning?: Function; + /** A handler for the showing event. */ + onShowing?: Function; + /** A handler for the shown event. */ + onShown?: Function; + /** An object defining widget positioning options. */ + position?: PositionOptions; + /** Specifies the direction at which submenus are displayed. */ + submenuDirection?: string; + /** The target element associated with a popover. */ + target?: any; + /** A Boolean value specifying whether or not the widget is visible. */ + visible?: boolean; + } + /** A context menu widget. */ + export class dxContextMenu extends dxMenuBase { + constructor(element: JQuery, options?: dxContextMenuOptions); + constructor(element: Element, options?: dxContextMenuOptions); + /** Toggles the visibility of the widget. */ + toggle(showing: boolean): JQueryPromise; + /** Shows the widget. */ + show(): JQueryPromise; + /** Hides the widget. */ + hide(): JQueryPromise; + } + export interface dxRemoteOperations { + /** Specifies whether or not filtering must be performed on the server side. */ + filtering?: boolean; + /** Specifies whether or not paging must be performed on the server side. */ + paging?: boolean; + /** Specifies whether or not sorting must be performed on the server side. */ + sorting?: boolean; + /** Specifies whether or not grouping must be performed on the server side. */ + grouping?: boolean; + /** Specifies whether or not summaries calculation must be performed on the server side. */ + summary?: boolean; + } + export interface dxDataGridColumn { + /** Specifies the content alignment within column cells. */ + alignment?: string; + /** Specifies whether the values in a column can be edited at runtime. Setting this option makes sense only when editing is enabled for a grid. */ + allowEditing?: boolean; + /** Specifies whether or not a column can be used for filtering grid records. Setting this option makes sense only when the filter row and column header filtering are visible. */ + allowFiltering?: boolean; + /** Specifies whether or not to allow filtering by this column using its header. */ + allowHeaderFiltering?: boolean; + /** Specifies whether or not the column can be anchored to a grid edge by end users. Setting this option makes sense only when the columnFixing | enabled option is set to true. */ + allowFixing?: boolean; + /** Specifies if a column can be used for searching grid records. Setting this option makes sense only when the search panel is visible. */ + allowSearch?: boolean; + /** Specifies whether a column can be used for grouping grid records at runtime. Setting this option makes sense only when the group panel is visible. */ + allowGrouping?: boolean; + /** Specifies whether or not a column can be hidden by a user. Setting this option makes sense only when the column chooser is visible. */ + allowHiding?: boolean; + /** Specifies whether or not a particular column can be used in column reordering. Setting this option makes sense only when the allowColumnReordering option is set to true. */ + allowReordering?: boolean; + /** Specifies whether or not a particular column can be resized by a user. Setting this option makes sense only when the allowColumnResizing option is true. */ + allowResizing?: boolean; + /** Specifies whether grid records can be sorted by a specific column at runtime. Setting this option makes sense only when the sorting mode differs from none. */ + allowSorting?: boolean; + /** Specifies whether groups appear expanded or not when records are grouped by a specific column. Setting this option makes sense only when grouping is allowed for this column. */ + autoExpandGroup?: boolean; + /** Specifies a callback function that returns a value to be displayed in a column cell. */ + calculateCellValue?: (rowData: Object) => string; + /** Specifies a callback function to be invoked after the cell value is edited by an end-user and before the new value is saved to the data source. */ + setCellValue?: (rowData: Object, value: any) => void; + /** Specifies a callback function that defines filters for customary calculated grid cells. */ + calculateFilterExpression?: (filterValue: any, selectedFilterOperation: string, target: string) => Array; + /** Specifies a caption for a column. */ + caption?: string; + /** Specifies a custom template for grid column cells. */ + cellTemplate?: any; + /** Specifies a CSS class to be applied to a column. */ + cssClass?: string; + /** Specifies how to get a value to be displayed in a cell when it is not in an editing state. */ + calculateDisplayValue?: any; + /** Specifies a field name or a function that returns a field name or a value to be used for grouping column cells. */ + calculateGroupValue?: any; + /** Specifies a field name or a function that returns a field name or a value to be used for sorting column cells. */ + calculateSortValue?: any; + /** Specifies a callback function that returns the text to be displayed in the cells of a column. */ + customizeText?: (cellInfo: { value: any; valueText: string }) => string; + /** Specifies the field of a data source that provides data for a column. */ + dataField?: string; + /** Specifies the required type of column values. */ + dataType?: string; + /** Specifies a custom template for the cell of a grid column when it is in an editing state. */ + editCellTemplate?: any; + /** Specifies configuration options for the editor widget of the current column. */ + editorOptions?: Object; + /** Specifies whether HTML tags are displayed as plain text or applied to the values of the column. */ + encodeHtml?: boolean; + /** In a boolean column, replaces all false items with a specified text. */ + falseText?: string; + /** Specifies the set of available filter operations. */ + filterOperations?: Array; + /** Specifies a filter value for a column. */ + filterValue?: any; + /** Specifies initial filter values for the column's header filter. */ + filterValues?: Array; + /** Specifies whether to include or exclude the records with the values selected in the column's header filter. */ + filterType?: string; + /** Indicates whether the column takes part in horizontal grid scrolling or is anchored to a grid edge. */ + fixed?: boolean; + /** Specifies the grid edge to which the column is anchored. */ + fixedPosition?: string; + /** Specifies a format for the values displayed in a column. */ + format?: string; + /** Specifies a custom template for the group cell of a grid column. */ + groupCellTemplate?: any; + /** Specifies the index of a column when grid records are grouped by the values of this column. */ + groupIndex?: number; + /** Specifies a custom template for the header of a grid column. */ + headerCellTemplate?: any; + /** Specifies options of a lookup column. */ + lookup?: { + /** Specifies whether or not a user can nullify values of a lookup column. */ + allowClearing?: boolean; + /** Specifies the data source providing data for a lookup column. */ + dataSource?: any; + /** Specifies the expression defining the data source field whose values must be displayed. */ + displayExpr?: any; + /** Specifies the expression defining the data source field whose values must be replaced. */ + valueExpr?: string; + }; + /** Specifies column-level options for filtering using a column header filter. */ + headerFilter?: { + /** Specifies the data source to be used for header filter. */ + dataSource?: any; + /** Specifies how header filter values should be combined into groups. */ + groupInterval?: any; + }; + /** Specifies a precision for formatted values displayed in a column. */ + precision?: number; + /** Specifies a filter operation applied to a column. */ + selectedFilterOperation?: string; + /** Specifies whether or not the column displays its values by using editors. */ + showEditorAlways?: boolean; + /** Specifies whether or not to display the column when grid records are grouped by it. */ + showWhenGrouped?: boolean; + /** Specifies the index of a column when grid records are sorted by the values of this column. */ + sortIndex?: number; + /** Specifies the initial sort order of column values. */ + sortOrder?: string; + /** In a boolean column, replaces all true items with a specified text. */ + trueText?: string; + /** Specifies whether a column is visible or not. */ + visible?: boolean; + /** Specifies the sequence number of the column in the grid. */ + visibleIndex?: number; + /** Specifies a column width in pixels or percentages. */ + width?: any; + /** Specifies an array of validation rules to be checked when updating column cell values. */ + validationRules?: Array; + /** Specifies whether or not to display the header of a hidden column in the column chooser. */ + showInColumnChooser?: boolean; + /** Specifies the identifier of the column. */ + name?: string; + /** The form item configuration object. Used only when the editing mode is "form". */ + formItem?: DevExpress.ui.dxFormItem; + } + export interface dxDataGridOptions extends WidgetOptions { + /** Specifies whether the outer borders of the grid are visible or not. */ + showBorders?: boolean; + /** Indicates whether to show the error row for the grid. */ + errorRowEnabled?: boolean; + /** A handler for the rowValidating event. */ + onRowValidating?: (e: Object) => void; + /** A handler for the contextMenuPreparing event. */ + onContextMenuPreparing?: (e: Object) => void; + /** A handler for the initNewRow event. */ + onInitNewRow?: (e: { data: Object }) => void; + /** A handler for the rowInserted event. */ + onRowInserted?: (e: { data: Object; key: any }) => void; + /** A handler for the rowInserting event. */ + onRowInserting?: (e: { data: Object; cancel: any }) => void; + /** A handler for the rowRemoved event. */ + onRowRemoved?: (e: { data: Object; key: any }) => void; + /** A handler for the rowRemoving event. */ + onRowRemoving?: (e: { data: Object; key: any; cancel: any }) => void; + /** A handler for the rowUpdated event. */ + onRowUpdated?: (e: { data: Object; key: any }) => void; + /** A handler for the rowUpdating event. */ + onRowUpdating?: (e: { oldData: Object; newData: Object; key: any; cancel: any }) => void; + /** Enables a hint that appears when a user hovers the mouse pointer over a cell with truncated content. */ + cellHintEnabled?: boolean; + /** Specifies whether or not grid columns can be reordered by a user. */ + allowColumnReordering?: boolean; + /** Specifies whether or not grid columns can be resized by a user. */ + allowColumnResizing?: boolean; + /** A handler for the cellClick event. */ + onCellClick?: any; + /** A handler for the cellHoverChanged event. */ + onCellHoverChanged?: (e: Object) => void; + /** A handler for the cellPrepared event. */ + onCellPrepared?: (e: Object) => void; + /** Specifies whether or not the width of grid columns depends on column content. */ + columnAutoWidth?: boolean; + /** Specifies the options of a column chooser. */ + columnChooser?: { + /** Specifies text displayed by the column chooser panel when it does not contain any columns. */ + emptyPanelText?: string; + /** Specifies whether a user can invoke the column chooser or not. */ + enabled?: boolean; + /** Specifies the height of the column chooser panel. */ + height?: number; + /** Specifies text displayed in the title of the column chooser panel. */ + title?: string; + /** Specifies the width of the column chooser panel. */ + width?: number; + }; + /** Specifies options for column fixing. */ + columnFixing?: { + /** Indicates if column fixing is enabled. */ + enabled?: boolean; + /** Contains options that specify texts for column-fixing related commands in the column header's context menu. */ + texts?: { + /** Specifies text for a context menu item that fixes the column for which the context menu is invoked. */ + fix?: string; + /** Specifies text for a context menu item that unfixes the column for which the context menu is invoked. */ + unfix?: string; + /** Specifies text for a context menu subitem that fixes a column, for which the context menu is invoked, to the left grid edge. */ + leftPosition?: string; + /** Specifies text for a context menu subitem that fixes a column, for which the context menu is invoked, to the right grid edge. */ + rightPosition?: string; + }; + }; + /** Specifies options for filtering using a column header filter. */ + headerFilter?: { + /** Indicates whether or not the column header filter button is visible. */ + visible?: boolean; + /** Specifies the height of the dropdown menu invoked when using a column header filter. */ + height?: number; + /** Specifies the width of the dropdown menu invoked when using a column header filter. */ + width?: number; + /** Contains options that specify texts for the dropdown menu invoked when you use a column header filter. */ + texts?: { + /** Specifies text for the item specifying an empty value in the column header filter's dropdown menu. */ + emptyValue?: string; + /** Specifies text for a button that closes the column header filter's dropdown menu and applies specified filtering. */ + ok?: string; + /** Specifies text for a button that closes the column header filter's dropdown menu without applying performed selection. */ + cancel?: string; + } + }; + /** An array of grid columns. */ + columns?: Array; + onContentReady?: Function; + /** Specifies a function that customizes grid columns after they are created. */ + customizeColumns?: (columns: Array) => void; + /** Specifies a data source for the grid. */ + dataSource?: any; + /** Specifies whether or not to enable data caching. */ + cacheEnabled?: boolean; + /** A handler for the editingStart event. */ + onEditingStart?: (e: { + data: Object; + key: any; + cancel: boolean; + column: dxDataGridColumn + }) => void; + /** A handler for the editorPrepared event. */ + onEditorPrepared?: (e: Object) => void; + /** A handler for the editorPreparing event. */ + onEditorPreparing?: (e: Object) => void; + /** Contains options that specify how grid content can be changed. */ + editing?: { + editMode?: string; + editEnabled?: boolean; + insertEnabled?: boolean; + removeEnabled?: boolean; + /** Specifies how grid values can be edited manually. */ + mode?: string; + /** Specifies whether or not grid records can be edited at runtime. */ + allowUpdating?: boolean; + /** Specifies whether or not new grid records can be added at runtime. */ + allowAdding?: boolean; + /** Specifies whether or not grid records can be deleted at runtime. */ + allowDeleting?: boolean; + /** The form configuration object. Used only when the editing mode is "form". */ + form?: DevExpress.ui.dxFormOptions; + /** Contains options that specify texts for editing-related grid controls. */ + texts?: { + /** Specifies text for a hint that appears when a user hovers the mouse pointer over the "Save" button. Setting this option makes sense only when the editMode option is set to batch. */ + saveAllChanges?: string; + /** Specifies text for a cancel button displayed when a row is in the editing state. Setting this option makes sense only when the allowUpdating option is set to true. */ + cancelRowChanges?: string; + /** Specifies text for a hint that appears when a user hovers the mouse pointer over the "Revert" button. Setting this option makes sense only when the editMode option is set to batch. */ + cancelAllChanges?: string; + /** Specifies a message to be displayed by a confirmation window. Setting this option makes sense only when the edit mode is "row". */ + confirmDeleteMessage?: string; + /** Specifies text to be displayed in the title of a confirmation window. Setting this option makes sense only when the edit mode is "row". */ + confirmDeleteTitle?: string; + /** Specifies text for a hint that appears when a user hovers the mouse pointer over the "Cancel changes" button. Setting this option makes sense only when the editMode option is set to cell and the validation capabilities are enabled. */ + validationCancelChanges?: string; + /** Specifies text for a button that deletes a row from a grid. Setting this option makes sense only when the allowDeleting option is set to true. */ + deleteRow?: string; + /** Specifies text for a hint that appears when a user hovers the mouse pointer over the "Add" button. Setting this option makes sense only when the allowAdding option is true. */ + addRow?: string; + /** Specifies text for a button that turns a row into the editing state. Setting this option makes sense only when the allowUpdating option is set to true. */ + editRow?: string; + /** Specifies text for a save button displayed when a row is in the editing state. Setting this option makes sense only when the allowUpdating option is set to true. */ + saveRowChanges?: string; + /** Specifies text for a button that recovers a deleted row. Setting this option makes sense only if the grid uses the batch edit mode and the allowDeleting option is set to true. */ + undeleteRow?: string; + }; + }; + /** Specifies filter row options. */ + filterRow?: { + /** Specifies when to apply a filter. */ + applyFilter?: string; + /** Specifies text for the hint that pops up when a user hovers the mouse pointer over the "Apply Filter" button. */ + applyFilterText?: string; + /** Specifies descriptions for filter operations. */ + operationDescriptions?: { + "=": string; + "<>": string; + "<": string; + "<=": string; + ">": string; + ">=": string; + "startswith": string; + "contains": string; + "notcontains": string; + "endswith": string; + }; + /** Specifies text for the reset operation in a filter list. */ + resetOperationText?: string; + /** Specifies text for the operation of clearing the applied filter when a select box is used. */ + showAllText?: string; + /** Specifies text for the range start in the 'between' filter type. */ + betweenStartText?: string; + /** Specifies text for the range end in the 'between' filter type. */ + betweenEndText?: string; + /** Specifies whether or not an icon that allows the user to choose a filter operation is visible. */ + showOperationChooser?: boolean; + /** Specifies whether the filter row is visible or not. */ + visible?: boolean; + }; + /** Specifies the behavior of grouped grid records. */ + grouping?: { + /** Specifies whether the user can collapse grouped records in a grid or not. */ + allowCollapsing?: boolean; + /** Specifies whether groups appear expanded or not. */ + autoExpandAll?: boolean; + /** Specifies the message displayed in a group row when the corresponding group is continued from the previous page. */ + groupContinuedMessage?: string; + /** Specifies the message displayed in a group row when the corresponding group continues on the next page. */ + groupContinuesMessage?: string; + }; + /** Specifies options that configure the group panel. */ + groupPanel?: { + /** Specifies whether columns can be dragged onto or from the group panel. */ + allowColumnDragging?: boolean; + /** Specifies text displayed by the group panel when it does not contain any columns. */ + emptyPanelText?: string; + /** Specifies whether the group panel is visible or not. */ + visible?: boolean; + }; + /** Specifies options configuring the load panel. */ + loadPanel?: { + /** Specifies whether to show the load panel or not. */ + enabled?: boolean; + /** Specifies the height of the load panel in pixels. */ + height?: number; + /** Specifies a URL pointing to an image to be used as a loading indicator. */ + indicatorSrc?: string; + /** Specifies whether or not a loading indicator must be displayed on the load panel. */ + showIndicator?: boolean; + /** Specifies whether or not the pane of the load panel must be displayed. */ + showPane?: boolean; + /** Specifies text displayed by the load panel. */ + text?: string; + /** Specifies the width of the load panel in pixels. */ + width?: number; + }; + /** Specifies text displayed when a grid does not contain any records. */ + noDataText?: string; + /** Specifies the options of a grid pager. */ + pager?: { + /** Specifies the page sizes that can be selected at runtime. */ + allowedPageSizes?: any; + /** Specifies whether to show the page size selector or not. */ + showPageSizeSelector?: boolean; + /** Specifies whether to show the pager or not. */ + visible?: any; + /** Specifies the text accompanying the page navigator. */ + infoText?: string; + /** Specifies whether or not to display the text accompanying the page navigator. This text is specified by the infoText option. */ + showInfo?: boolean; + /** Specifies whether or not to display buttons that switch the grid to the previous or next page. */ + showNavigationButtons?: boolean; + }; + /** Specifies paging options. */ + paging?: { + /** Specifies whether dxDataGrid loads data page by page or all at once. */ + enabled?: boolean; + /** Specifies the grid page that should be displayed by default. */ + pageIndex?: number; + /** Specifies the size of grid pages. */ + pageSize?: number; + }; + /** Specifies whether or not grid rows must be shaded in a different way. */ + rowAlternationEnabled?: boolean; + /** A handler for the rowClick event. */ + onRowClick?: any; + /** A handler for the rowPrepared event. */ + onRowPrepared?: (e: Object) => void; + /** Specifies a custom template for grid rows. */ + rowTemplate?: any; + /** A configuration object specifying scrolling options. */ + scrolling?: { + /** Specifies the scrolling mode. */ + mode?: string; + /** Specifies whether or not a grid must preload pages adjacent to the current page when using virtual scrolling. */ + preloadEnabled?: boolean; + /** Specifies whether or not the widget uses native scrolling. */ + useNative?: any; + /** Specifies the scrollbar display policy. */ + showScrollbar?: string; + /** Specifies whether or not the scrolling by content is enabled. */ + scrollByContent?: boolean; + /** Specifies whether or not the scrollbar thumb scrolling enabled. */ + scrollByThumb?: boolean; + }; + /** Specifies options of the search panel. */ + searchPanel?: { + /** Specifies whether or not search strings in the located grid records should be highlighted. */ + highlightSearchText?: boolean; + /** Specifies text displayed by the search panel when no search string was typed. */ + placeholder?: string; + /** Specifies whether the search panel is visible or not. */ + visible?: boolean; + /** Specifies the width of the search panel in pixels. */ + width?: number; + /** Sets a search string for the search panel. */ + text?: string; + }; + /** Specifies the operations that must be performed on the server side. */ + remoteOperations?: any; + /** Allows you to sort groups according to the values of group summary items. */ + sortByGroupSummaryInfo?: Array<{ + /** Specifies the group summary item whose values must be used to sort groups. */ + summaryItem?: string; + /** Specifies the identifier of the column that must be used in grouping so that sorting by group summary item values be applied. */ + groupColumn?: string; + /** Specifies the sort order of group summary item values. */ + sortOrder?: string; + }>; + /** Allows you to build a master-detail interface in the grid. */ + masterDetail?: { + /** Enables an end-user to expand/collapse detail sections. */ + enabled?: boolean; + /** Specifies whether detail sections appear expanded or collapsed. */ + autoExpandAll?: boolean; + /** Specifies the template for detail sections. */ + template?: any; + }; + /** Specifies options for exporting grid data. */ + export?: { + /** Indicates if the export feature is enabled in the grid. */ + enabled?: boolean; + /** Specifies a default name for the file to which grid data is exported. */ + fileName?: string; + /** Specifies whether to enable Excel filtering for the exported data in the resulting XLSX file. */ + excelFilterEnabled?: boolean; + /** Specifies whether to enable word wrapping for the exported data in the resulting XLSX file. */ + excelWrapTextEnabled?: boolean; + /** Specifies the URL of the server-side proxy that streams the resulting file to the end user to enable export in IE8, IE9 and Safari browsers. */ + proxyUrl?: string; + /** Indicates whether to allow end users to export not only the data displayed in the grid, but the selected rows only. */ + allowExportSelectedData?: boolean; + /** Contains options that specify texts for the export-related commands and hints. */ + texts?: { + /** Specifies text for the Export button when this button invokes a dropdown menu so you can choose the required export format. */ + exportTo?: string; + /** Specifies text for the Export button when this button exports to the XSLX format. */ + exportToExcel?: string; + /** Specifies text for the item in the Export dropdown menu that exports grid data to Excel. */ + excelFormat?: string; + /** Specifies text for the option in the Export dropdown menu that allows you to choose whether to export all the grid data or the selected rows only. */ + selectedRows?: string; + } + }; + /** Specifies the keys of the records that must appear selected initially. */ + selectedRowKeys?: Array; + /** Specifies options of runtime selection. */ + selection?: { + /** Specifies the checkbox row display policy in the multiple mode. */ + showCheckBoxesMode?: string; + /** Specifies whether the user can select all grid records at once. */ + allowSelectAll?: boolean; + /** Specifies the selection mode. */ + mode?: string; + }; + /** A handler for the dataErrorOccured event. */ + onDataErrorOccurred?: (e: { error: Error }) => void; + /** A handler for the selectionChanged event. */ + onSelectionChanged?: (e: { + currentSelectedRowKeys: Array; + currentDeselectedRowKeys: Array; + selectedRowKeys: Array; + selectedRowsData: Array; + }) => void; + /** A handler for the exporting event. */ + onExporting?: (e: { + fileName: string; + format: string; + cancel: boolean; + }) => void; + /** A handler for the exported event. */ + onExported?: (e: Object) => void; + /** A handler for the keyDown event. */ + onKeyDown?: (e: Object) => void; + /** A handler for the rowExpanding event. */ + onRowExpanding?: (e: Object) => void; + /** A handler for the rowExpanded event. */ + onRowExpanded?: (e: Object) => void; + /** A handler for the rowCollapsing event. */ + onRowCollapsing?: (e: Object) => void; + /** A handler for the rowCollapsed event. */ + onRowCollapsed?: (e: Object) => void; + /** Specifies whether column headers are visible or not. */ + showColumnHeaders?: boolean; + /** Specifies whether or not vertical lines separating one grid column from another are visible. */ + showColumnLines?: boolean; + /** Specifies whether or not horizontal lines separating one grid row from another are visible. */ + showRowLines?: boolean; + /** Specifies options of runtime sorting. */ + sorting?: { + /** Specifies text for the context menu item that sets an ascending sort order in a column. */ + ascendingText?: string; + /** Specifies text for the context menu item that resets sorting settings for a column. */ + clearText?: string; + /** Specifies text for the context menu item that sets a descending sort order in a column. */ + descendingText?: string; + /** Specifies the runtime sorting mode. */ + mode?: string; + }; + /** Specifies options of state storing. */ + stateStoring?: { + /** Specifies a callback function that performs specific actions on state loading. */ + customLoad?: () => JQueryPromise; + /** Specifies a callback function that performs specific actions on state saving. */ + customSave?: (state: Object) => void; + /** Specifies whether or not a grid saves its state. */ + enabled?: boolean; + /** Specifies the delay between the last change of a grid state and the operation of saving this state in milliseconds. */ + savingTimeout?: number; + /** Specifies a unique key to be used for storing the grid state. */ + storageKey?: string; + /** Specifies the type of storage to be used for state storing. */ + type?: string; + }; + /** Specifies the options of the grid summary. */ + summary?: { + /** Contains options that specify text patterns for summary items. */ + texts?: { + /** Specifies a pattern for the 'sum' summary items when they are displayed in the parent column. */ + sum?: string; + /** Specifies a pattern for the 'sum' summary items displayed in a group row or in any other column rather than the parent one. */ + sumOtherColumn?: string; + /** Specifies a pattern for the 'min' summary items when they are displayed in the parent column. */ + min?: string; + /** Specifies a pattern for the 'min' summary items displayed in a group row or in any other column rather than the parent one. */ + minOtherColumn?: string; + /** Specifies a pattern for the 'max' summary items when they are displayed in the parent column. */ + max?: string; + /** Specifies a pattern for the 'max' summary items displayed in a group row or in any other column rather than the parent one. */ + maxOtherColumn?: string; + /** Specifies a pattern for the 'avg' summary items when they are displayed in the parent column. */ + avg?: string; + /** Specifies a pattern for the 'avg' summary items displayed in a group row or in any other column rather than the parent one. */ + avgOtherColumn?: string; + /** Specifies a pattern for the 'count' summary items. */ + count?: string; + }; + /** Specifies items of the group summary. */ + groupItems?: Array<{ + /** Specifies the identifier of a summary item. */ + name?: string; + /** Specifies the column that provides data for a group summary item. */ + column?: string; + /** Customizes the text to be displayed in the summary item. */ + customizeText?: (itemInfo: { + value: any; + valueText: string; + }) => string; + /** Specifies a pattern for the summary item text. */ + displayFormat?: string; + /** Specifies a precision for the summary item value of a numeric format. */ + precision?: number; + /** Specifies whether or not a summary item must be displayed in the group footer. */ + showInGroupFooter?: boolean; + /** Indicates whether to display group summary items in parentheses after the group row header or to align them by the corresponding columns within the group row. */ + alignByColumn?: boolean; + /** Specifies the column that must hold the summary item when this item is displayed in the group footer or aligned by a column in the group row. */ + showInColumn?: string; + /** Specifies how to aggregate data for a summary item. */ + summaryType?: string; + /** Specifies a format for the summary item value. */ + valueFormat?: string; + }>; + /** Specifies items of the total summary. */ + totalItems?: Array<{ + /** Specifies the identifier of a summary item. */ + name?: string; + /** Specifies the alignment of a summary item. */ + alignment?: string; + /** Specifies the column that provides data for a summary item. */ + column?: string; + /** Specifies a CSS class to be applied to a summary item. */ + cssClass?: string; + /** Customizes the text to be displayed in the summary item. */ + customizeText?: (itemInfo: { + value: any; + valueText: string; + }) => string; + /** Specifies a pattern for the summary item text. */ + displayFormat?: string; + /** Specifies a precision for the summary item value of a numeric format. */ + precision?: number; + /** Specifies the column that must hold the summary item. */ + showInColumn?: string; + /** Specifies how to aggregate data for a summary item. */ + summaryType?: string; + /** Specifies a format for the summary item value. */ + valueFormat?: string; + }>; + /** Allows you to use a custom aggregate function to calculate the value of a summary item. */ + calculateCustomSummary?: (options: { + component: dxDataGrid; + name?: string; + value: any; + totalValue: any; + summaryProcess: string + }) => void; + }; + /** Specifies whether text that does not fit into a column should be wrapped. */ + wordWrapEnabled?: boolean; + } + /** A data grid widget. */ + export class dxDataGrid extends Widget { + constructor(element: JQuery, options?: dxDataGridOptions); + constructor(element: Element, options?: dxDataGridOptions); + /** Ungroups grid records. */ + clearGrouping(): void; + /** Clears sorting settings of all grid columns at once. */ + clearSorting(): void; + /** Allows you to obtain a cell by its row index and the data field of its column. */ + getCellElement(rowIndex: number, dataField: string): any; + /** Allows you to obtain a cell by its row index and the visible index of its column. */ + getCellElement(rowIndex: number, visibleColumnIndex: number): any; + /** Returns the current state of the grid. */ + state(): Object; + /** Sets the grid state. */ + state(state: Object): void; + /** Allows you to obtain the row index by a data key. */ + getRowIndexByKey(key: any): number; + /** Allows you to obtain the data key by a row index. */ + getKeyByRowIndex(rowIndex: number): any; + /** Adds a new column to a grid. */ + addColumn(columnOptions: dxDataGridColumn): void; + /** Removes the column from the grid. */ + deleteColumn(id: any): void; + /** Displays the load panel. */ + beginCustomLoading(messageText: string): void; + /** Discards changes made in a grid. */ + cancelEditData(): void; + /** Checks whether or not the grid contains unsaved changes. */ + hasEditData(): boolean; + /** Clears all the filters of a specific type applied to grid records. */ + clearFilter(): void; + /** Deselects all grid records. */ + clearSelection(): void; + /** Draws the cell being edited from the editing state. Use this method when the edit mode is batch. */ + closeEditCell(): void; + /** Collapses groups or master rows in a grid. */ + collapseAll(groupIndex?: number): void; + /** Returns the number of data columns in a grid. */ + columnCount(): number; + /** Returns the value of a specific column option. */ + columnOption(id: any, optionName: string): any; + /** Sets an option of a specific column. */ + columnOption(id: any, optionName: string, optionValue: any): void; + /** Returns the options of a column by an identifier. */ + columnOption(id: any): Object; + /** Sets several options of a column at once. */ + columnOption(id: any, options: Object): void; + /** Sets a specific cell into the editing state. */ + editCell(rowIndex: number, visibleColumnIndex: number): void; + /** Sets a specific cell into the editing state. */ + editCell(rowIndex: number, dataField: string): void; + /** Sets a specific row into the editing state. */ + editRow(rowIndex: number): void; + /** Gets the cell value. */ + cellValue(rowIndex: number, dataField: string): any; + /** Gets the cell value. */ + cellValue(rowIndex: number, visibleColumnIndex: number): any; + /** Sets the cell value. */ + cellValue(rowIndex: number, dataField: string, value: any): void; + /** Sets the cell value. */ + cellValue(rowIndex: number, visibleColumnIndex: number, value: any): void; + /** Hides the load panel. */ + endCustomLoading(): void; + /** Expands groups or master rows in a grid. */ + expandAll(groupIndex: number): void; + /** Allows you to find out whether a specific group or master row is expanded or collapsed. */ + isRowExpanded(key: any): boolean; + /** Allows you to expand a specific group or master row by its key. */ + expandRow(key: any): void; + /** Allows you to collapse a specific group or master row by its key. */ + collapseRow(key: any): void; + /** Applies a filter to the grid's data source. */ + filter(filterExpr?: any): void; + /** Returns a filter expression applied to the grid's data source using the filter(filterExpr) method. */ + filter(): any; + /** Returns a filter expression applied to the grid using all possible scenarious. */ + getCombinedFilter(): any; + /** Gets the keys of currently selected grid records. */ + getSelectedRowKeys(): Array; + /** Gets the data objects of currently selected grid records. */ + getSelectedRowsData(): Array; + /** Hides the column chooser panel. */ + hideColumnChooser(): void; + /** Adds a new data row to a grid. */ + addRow(): void; + /** + * Adds a new data row to a grid. + * @deprecated Use the addRow() method instead. + */ + insertRow(): void; + /** Returns the key corresponding to the passed data object. */ + keyOf(obj: Object): any; + /** Switches a grid to a specified page. */ + pageIndex(newIndex: number): void; + /** Gets the index of the current page. */ + pageIndex(): number; + /** Sets the page size. */ + pageSize(value: number): void; + /** Gets the current page size. */ + pageSize(): number; + /** Refreshes grid data. */ + refresh(): void; + /** Removes a specific row from a grid. */ + deleteRow(rowIndex: number): void; + /** + * Removes a specific row from a grid. + * @deprecated Use the deleteRow() method instead. + */ + removeRow(rowIndex: number): void; + /** Saves changes made in a grid. */ + saveEditData(): void; + /** Searches grid records by a search string. */ + searchByText(text: string): void; + /** Selects all grid records. */ + selectAll(): void; + /** Deselects the rows that are currently selected within the applied filter. */ + deselectAll(): void; + /** Selects specific grid records. */ + selectRows(keys: Array, preserve: boolean): void; + /** Deselects specific grid records. */ + deselectRows(keys: Array): void; + /** Selects grid rows by indexes. */ + selectRowsByIndexes(indexes: Array): void; + /** Allows you to find out whether a row is selected or not. */ + isRowSelected(key: any): boolean; + /** Invokes the column chooser panel. */ + showColumnChooser(): void; + startSelectionWithCheckboxes(): boolean; + /** Returns the number of records currently held by a grid. */ + totalCount(): number; + /** Recovers a row deleted in the batch edit mode. */ + undeleteRow(rowIndex: number): void; + /** Allows you to obtain a data object by its key. */ + byKey(key: any): JQueryPromise; + /** Gets the value of a total summary item. */ + getTotalSummaryValue(summaryItemName: string): any; + /** Exports grid data to Excel. */ + exportToExcel(selectionOnly: boolean): void; + /** Updates the grid to the size of its content. */ + updateDimensions(): void; + /** Focuses the specified cell element in the grid. */ + focus(element?: JQuery): void; + } + export interface dxPivotGridOptions extends WidgetOptions { + onContentReady?: Function; + /** Specifies a data source for the pivot grid. */ + dataSource?: any; + useNativeScrolling?: any; + /** A configuration object specifying scrolling options. */ + scrolling?: { + /** Specifies the scrolling mode. */ + mode?: string; + /** Specifies whether or not the widget uses native scrolling. */ + useNative?: any; + }; + /** Allows an end-user to change sorting options. */ + allowSorting?: boolean; + /** Allows an end-user to sort columns by summary values. */ + allowSortingBySummary?: boolean; + /** Allows an end-user to change filtering options. */ + allowFiltering?: boolean; + /** Allows an end-user to expand/collapse all header items within a header level. */ + allowExpandAll?: boolean; + /** Specifies whether to display the Total rows. */ + showRowTotals?: boolean; + /** Specifies whether to display the Grand Total row. */ + showRowGrandTotals?: boolean; + /** Specifies whether to display the Total columns. */ + showColumnTotals?: boolean; + /** Specifies whether to display the Grand Total column. */ + showColumnGrandTotals?: boolean; + /** Specifies whether or not to hide rows and columns with no data. */ + hideEmptySummaryCells?: boolean; + /** Specifies where to show the total rows or columns. */ + showTotalsPrior?: string; + /** Specifies whether the outer borders of the grid are visible or not. */ + showBorders?: boolean; + /** The Field Chooser configuration options. */ + fieldChooser?: { + /** Enables or disables the field chooser. */ + enabled?: boolean; + /** Specifies the field chooser layout. */ + layout?: number; + /** Specifies the text to display as a title of the field chooser popup window. */ + title?: string; + /** Specifies the field chooser width. */ + width?: number; + /** Specifies the field chooser height. */ + height?: number; + /** Strings that can be changed or localized in the pivot grid's integrated Field Chooser. */ + texts?: { + /** The string to display instead of Row Fields. */ + rowFields?: string; + /** The string to display instead of Column Fields. */ + columnFields?: string; + /** The string to display instead of Data Fields. */ + dataFields?: string; + /** The string to display instead of Filter Fields. */ + filterFields?: string; + /** The string to display instead of All Fields. */ + allFields?: string; + }; + } + /** Strings that can be changed or localized in the dxPivotGrid widget. */ + texts?: { + /** The string to display as a header of the Grand Total row and column. */ + grandTotal?: string; + /** The string to display as a header of the Total row and column. */ + total?: string; + /** Specifies the text displayed when a pivot grid does not contain any fields. */ + noData?: string; + /** The string to display as a Show Field Chooser context menu item. */ + showFieldChooser?: string; + /** The string to display as an Expand All context menu item. */ + expandAll?: string; + /** The string to display as a Collapse All context menu item. */ + collapseAll?: string; + /** The string to display as a Sort Column by Summary Value context menu item. */ + sortColumnBySummary?: string; + /** The string to display as a Sort Row by Summary Value context menu item. */ + sortRowBySummary?: string; + /** The string to display as a Remove All Sorting context menu item. */ + removeAllSorting?: string; + /** The string to display as an Export to Excel file context menu item. */ + exportToExcel?: string; + }; + /** The Load panel configuration options. */ + loadPanel?: { + /** Enables or disables the load panel. */ + enabled?: boolean; + /** Specifies the height of the load panel. */ + height?: number; + /** Specifies the URL pointing to an image that will be used as a load indicator. */ + indicatorSrc?: string; + /** Specifies whether or not to show a load indicator. */ + showIndicator?: boolean; + /** Specifies whether or not to show load panel background. */ + showPane?: boolean; + /** Specifies the text to display inside a load panel. */ + text?: string; + /** Specifies the width of the load panel. */ + width?: number; + }; + /** A handler for the cellClick event. */ + onCellClick?: (e: any) => void; + /** A handler for the cellPrepared event. */ + onCellPrepared?: (e: any) => void; + /** A handler for the contextMenuPreparing event. */ + onContextMenuPreparing?: (e: Object) => void; + /** Specifies options for exporting pivot grid data. */ + export?: { + /** Indicates whether the export feature is enabled for the pivot grid. */ + enabled?: boolean; + /** Specifies a default name for the file to which grid data is exported. */ + fileName?: string; + /** Specifies the URL of the server-side proxy that streams the resulting file to the end user to enable export in IE8, IE9 and Safari browsers. */ + proxyUrl?: string; + }; + /** A handler for the exporting event. */ + onExporting?: (e: { + fileName: string; + format: string; + cancel: boolean; + }) => void; + /** A handler for the exported event. */ + onExported?: (e: Object) => void; + /** A configuration object specifying options related to state storing. */ + stateStoring?: { + /** Specifies a callback function that performs specific actions on state loading. */ + customLoad?: () => JQueryPromise; + /** Specifies a callback function that performs specific actions on state saving. */ + customSave?: (gridState: Object) => void; + /** Specifies whether or not a grid saves its state. */ + enabled?: boolean; + /** Specifies the delay between the last change of a grid state and the operation of saving this state in milliseconds. */ + savingTimeout?: number; + /** Specifies a unique key to be used for storing the grid state. */ + storageKey?: string; + /** Specifies the type of storage to be used for state storing. */ + type?: string; + }; + } + /** A data summarization widget for multi-dimensional data analysis and data mining. */ + export class dxPivotGrid extends Widget { + constructor(element: JQuery, options?: dxPivotGridOptions); + constructor(element: Element, options?: dxPivotGridOptions); + /** Gets the PivotGridDataSource instance. */ + getDataSource(): DevExpress.data.PivotGridDataSource; + /** Gets the dxPopup instance of the field chooser window. */ + getFieldChooserPopup(): DevExpress.ui.dxPopup; + /** Updates the widget to the size of its content. */ + updateDimensions(): void; + /** Exports pivot grid data to the Excel file. */ + exportToExcel(): void; + } + export interface dxPivotGridFieldChooserOptions extends WidgetOptions { + /** Specifies the height of the widget. */ + height?: any; + /** Specifies the field chooser layout. */ + layout?: number; + /** The data source of a dxPivotGrid widget. */ + dataSource?: DevExpress.data.PivotGridDataSource; + onContentReady?: Function; + /** Strings that can be changed or localized in the dxPivotGridFieldChooser widget. */ + texts?: { + /** The string to display instead of Row Fields. */ + rowFields?: string; + /** The string to display instead of Column Fields. */ + columnFields?: string; + /** The string to display instead of Data Fields. */ + dataFields?: string; + /** The string to display instead of Filter Fields. */ + filterFields?: string; + /** The string to display instead of All Fields. */ + allFields?: string; + }; + } + /** A complementary widget for dxPivotGrid that allows you to manage data displayed in the dxPivotGrid. */ + export class dxPivotGridFieldChooser extends Widget { + constructor(element: JQuery, options?: dxPivotGridFieldChooserOptions); + constructor(element: Element, options?: dxPivotGridFieldChooserOptions); + /** Updates the widget to the size of its content. */ + updateDimensions(): void; + } +} +interface JQuery { + dxTreeView(): JQuery; + dxTreeView(options: "instance"): DevExpress.ui.dxTreeView; + dxTreeView(options: string): any; + dxTreeView(options: string, ...params: any[]): any; + dxTreeView(options: DevExpress.ui.dxTreeViewOptions): JQuery; + dxMenuBase(): JQuery; + dxMenuBase(options: "instance"): DevExpress.ui.dxMenuBase; + dxMenuBase(options: string): any; + dxMenuBase(options: string, ...params: any[]): any; + dxMenuBase(options: DevExpress.ui.dxMenuBaseOptions): JQuery; + dxMenu(): JQuery; + dxMenu(options: "instance"): DevExpress.ui.dxMenu; + dxMenu(options: string): any; + dxMenu(options: string, ...params: any[]): any; + dxMenu(options: DevExpress.ui.dxMenuOptions): JQuery; + dxContextMenu(): JQuery; + dxContextMenu(options: "instance"): DevExpress.ui.dxContextMenu; + dxContextMenu(options: string): any; + dxContextMenu(options: string, ...params: any[]): any; + dxContextMenu(options: DevExpress.ui.dxContextMenuOptions): JQuery; + dxColorBox(): JQuery; + dxColorBox(options: "instance"): DevExpress.ui.dxColorBox; + dxColorBox(options: string): any; + dxColorBox(options: string, ...params: any[]): any; + dxColorBox(options: DevExpress.ui.dxColorBoxOptions): JQuery; + dxDataGrid(): JQuery; + dxDataGrid(options: "instance"): DevExpress.ui.dxDataGrid; + dxDataGrid(options: string): any; + dxDataGrid(options: string, ...params: any[]): any; + dxDataGrid(options: DevExpress.ui.dxDataGridOptions): JQuery; + dxPivotGrid(): JQuery; + dxPivotGrid(options: "instance"): DevExpress.ui.dxPivotGrid; + dxPivotGrid(options: string): any; + dxPivotGrid(options: string, ...params: any[]): any; + dxPivotGrid(options: DevExpress.ui.dxPivotGridOptions): JQuery; + dxPivotGridFieldChooser(): JQuery; + dxPivotGridFieldChooser(options: "instance"): DevExpress.ui.dxPivotGridFieldChooser; + dxPivotGridFieldChooser(options: string): any; + dxPivotGridFieldChooser(options: string, ...params: any[]): any; + dxPivotGridFieldChooser(options: DevExpress.ui.dxPivotGridFieldChooserOptions): JQuery; + dxScheduler(): JQuery; + dxScheduler(options: "instance"): DevExpress.ui.dxScheduler; + dxScheduler(options: string): any; + dxScheduler(options: string, ...params: any[]): any; + dxScheduler(options: DevExpress.ui.dxSchedulerOptions): JQuery; +} +declare module DevExpress.framework { + /** An object used to store information on the views displayed in an application. */ + export class ViewCache { + viewRemoved: JQueryCallback; + /** Removes all the viewInfo objects from the cache. */ + clear(): void; + /** Obtains a viewInfo object from the cache by the specified key. */ + getView(key: string): Object; + /** Checks whether or not a viewInfo object is contained in the view cache under the specified key. */ + hasView(key: string): boolean; + /** Removes a viewInfo object from the cache by the specified key. */ + removeView(key: string): Object; + /** Adds the specified viewInfo object to the cache under the specified key. */ + setView(key: string, viewInfo: Object): void; + } + export interface dxCommandOptions extends DOMComponentOptions { + /** Specifies an action performed when the execute() method of the command is called. */ + onExecute?: any; + /** Indicates whether or not the widget that displays this command is disabled. */ + disabled?: boolean; + /** Specifies whether the current command is rendered when a view is being rendered or after a view is shown. */ + renderStage?: string; + /** Specifies the name of the icon shown inside the widget associated with this command. */ + icon?: string; + iconSrc?: string; + /** The identifier of the command. */ + id?: string; + /** Specifies the title of the widget associated with this command. */ + title?: string; + /** Specifies the type of the button, if the command is rendered as a dxButton widget. */ + type?: string; + /** A Boolean value specifying whether or not the widget associated with this command is visible. */ + visible?: boolean; + } + /** A markup component used to define markup options for a command. */ + export class dxCommand extends DOMComponent { + constructor(element: JQuery, options: dxCommandOptions); + constructor(options: dxCommandOptions); + /** Executes the action associated with this command. */ + execute(): void; + } + /** An object responsible for routing. */ + export class Router { + /** Adds a routing rule to the list of registered rules. */ + register(pattern: string, defaults?: Object, constraints?: Object): void; + /** Decodes the specified URI to an object using the registered routing rules. */ + parse(uri: string): Object; + /** Formats an object to a URI. */ + format(obj: Object): string; + } + export interface StateManagerOptions { + /** A storage to which the state manager saves the application state. */ + storage?: Object; + } + /** An object used to store the current application state. */ + export class StateManager { + constructor(options?: StateManagerOptions); + /** Adds an object that implements an interface of a state source to the state manager's collection of state sources. */ + addStateSource(stateSource: Object): void; + /** Removes a specified state source from the state manager's collection of state sources. */ + removeStateSource(stateSource: Object): void; + /** Saves the current application state. */ + saveState(): void; + /** Restores the application state that has been saved by the saveState() method to the state storage. */ + restoreState(): void; + /** Removes the application state that has been saved by the saveState() method to the state storage. */ + clearState(): void; + } + export module html { + export var layoutSets: Array; + export var animationSets: { [animationSetName: string]: AnimationSet }; + export interface AnimationSet { + [animationName: string]: any + } + export interface HtmlApplicationOptions { + /** Specifies where the commands that are defined in the application's views must be displayed. */ + commandMapping?: Object; + /** Specifies whether or not view caching is disabled. */ + disableViewCache?: boolean; + /** An array of layout controllers that should be used to show application views in the current navigation context. */ + layoutSet?: any; + /** Specifies the animation presets that are used to animate different UI elements in the current application. */ + animationSet?: AnimationSet; + /** Specifies whether the current application must behave as a mobile or web application. */ + mode?: string; + /** Specifies the object that represents a root namespace of the application. */ + namespace?: Object; + /** Specifies application behavior when the user navigates to a root view. */ + navigateToRootViewMode?: string; + /** An array of dxCommand configuration objects used to define commands available from the application's global navigation. */ + navigation?: Array; + /** A state manager to be used in the application. */ + stateManager?: StateManager; + /** Specifies the storage to be used by the application's state manager to store the application state. */ + stateStorage?: Object; + /** Indicates whether on not to use the title of the previously displayed view as text on the Back button. */ + useViewTitleAsBackText?: boolean; + /** A custom view cache to be used in the application. */ + viewCache?: Object; + /** Specifies a limit for the views that can be cached. */ + viewCacheSize?: number; + /** Specifies the current version of application templates. */ + templatesVersion?: string; + /** Specifies options for the viewport meta tag of a mobile browser. */ + viewPort?: JQuery; + /** A custom router to be used in the application. */ + router?: Router; + } + /** An object used to manage views, as well as control the application life cycle. */ + export class HtmlApplication implements EventsMixin { + constructor(options: HtmlApplicationOptions); + afterViewSetup: JQueryCallback; + beforeViewSetup: JQueryCallback; + initialized: JQueryCallback; + navigating: JQueryCallback; + navigatingBack: JQueryCallback; + resolveLayoutController: JQueryCallback; + resolveViewCacheKey: JQueryCallback; + viewDisposed: JQueryCallback; + viewDisposing: JQueryCallback; + viewHidden: JQueryCallback; + viewRendered: JQueryCallback; + viewShowing: JQueryCallback; + viewShown: JQueryCallback; + /** Provides access to the ViewCache object. */ + viewCache: ViewCache; + /** An array of dxCommand components that are created based on the application's navigation option value. */ + navigation: Array; + /** Provides access to the StateManager object. */ + stateManager: StateManager; + /** Provides access to the Router object. */ + router: Router; + /** Navigates to the URI preceding the current one in the navigation history. */ + back(): void; + /** Returns a Boolean value indicating whether or not backwards navigation is currently possible. */ + canBack(): boolean; + /** Calls the clearState() method of the application's StateManager object. */ + clearState(): void; + /** Creates global navigation commands. */ + createNavigation(navigationConfig: Array): void; + /** Returns an HTML template of the specified view. */ + getViewTemplate(viewName: string): JQuery; + /** Returns a configuration object used to create a dxView component for a specified view. */ + getViewTemplateInfo(viewName: string): Object; + /** Adds a specified HTML template to a collection of view or layout templates. */ + loadTemplates(source: any): JQueryPromise; + /** Navigates to the specified URI. */ + navigate(uri?: any, options?: Object): void; + /** Renders navigation commands to the navigation command containers that are located in the layouts used in the application. */ + renderNavigation(): void; + /** Calls the restoreState() method of the application's StateManager object. */ + restoreState(): void; + /** Calls the saveState method of the application's StateManager object. */ + saveState(): void; + /** Provides access to the object that defines the current context to be considered when choosing an appropriate template for a view. */ + templateContext(): Object; + on(eventName: "initialized", eventHandler: () => void): HtmlApplication; + on(eventName: "afterViewSetup", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + on(eventName: "beforeViewSetup", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + on(eventName: "navigating", eventHandler: (e: { + currentUri: string; + uri: string; + cancel: boolean; + options: { + root: boolean; + target: string; + direction: string; + rootInDetailPane: boolean; + modal: boolean; + }; + }) => void): HtmlApplication; + on(eventName: "navigatingBack", eventHandler: (e: { + cancel: boolean; + isHardwareButton: boolean; + }) => void): HtmlApplication; + on(eventName: "resolveLayoutController", eventHandler: (e: { + viewInfo: Object; + layoutController: Object; + availableLayoutControllers: Array; + }) => void): HtmlApplication; + on(eventName: "resolveViewCacheKey", eventHandler: (e: { + key: string; + navigationItem: Object; + routeData: Object; + }) => void): HtmlApplication; + on(eventName: "viewDisposed", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + on(eventName: "viewDisposing", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + on(eventName: "viewHidden", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + on(eventName: "viewRendered", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + on(eventName: "viewShowing", eventHandler: (e: { + viewInfo: Object; + direction: string; + }) => void): HtmlApplication; + on(eventName: "viewShown", eventHandler: (e: { + viewInfo: Object; + direction: string; + }) => void): HtmlApplication; + on(eventName: string, eventHandler: Function): HtmlApplication; + on(events: { [eventName: string]: Function; }): HtmlApplication; + off(eventName: "initialized"): HtmlApplication; + off(eventName: "afterViewSetup"): HtmlApplication; + off(eventName: "beforeViewSetup"): HtmlApplication; + off(eventName: "navigating"): HtmlApplication; + off(eventName: "navigatingBack"): HtmlApplication; + off(eventName: "resolveLayoutController"): HtmlApplication; + off(eventName: "resolveViewCacheKey"): HtmlApplication; + off(eventName: "viewDisposed"): HtmlApplication; + off(eventName: "viewDisposing"): HtmlApplication; + off(eventName: "viewHidden"): HtmlApplication; + off(eventName: "viewRendered"): HtmlApplication; + off(eventName: "viewShowing"): HtmlApplication; + off(eventName: "viewShown"): HtmlApplication; + off(eventName: string): HtmlApplication; + off(eventName: "initialized", eventHandler: () => void): HtmlApplication; + off(eventName: "afterViewSetup", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + off(eventName: "beforeViewSetup", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + off(eventName: "navigating", eventHandler: (e: { + currentUri: string; + uri: string; + cancel: boolean; + options: { + root: boolean; + target: string; + direction: string; + rootInDetailPane: boolean; + modal: boolean; + }; + }) => void): HtmlApplication; + off(eventName: "navigatingBack", eventHandler: (e: { + cancel: boolean; + isHardwareButton: boolean; + }) => void): HtmlApplication; + off(eventName: "resolveLayoutController", eventHandler: (e: { + viewInfo: Object; + layoutController: Object; + availableLayoutControllers: Array; + }) => void): HtmlApplication; + off(eventName: "resolveViewCacheKey", eventHandler: (e: { + key: string; + navigationItem: Object; + routeData: Object; + }) => void): HtmlApplication; + off(eventName: "viewDisposed", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + off(eventName: "viewDisposing", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + off(eventName: "viewHidden", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + off(eventName: "viewRendered", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + off(eventName: "viewShowing", eventHandler: (e: { + viewInfo: Object; + direction: string; + }) => void): HtmlApplication; + off(eventName: "viewShown", eventHandler: (e: { + viewInfo: Object; + direction: string; + }) => void): HtmlApplication; + off(eventName: string, eventHandler: Function): HtmlApplication; + } + } +} +declare module DevExpress.viz.core { + /** + * Applies a theme for the entire page with several DevExtreme visualization widgets. + * @deprecated Use the DevExpress.viz.currentTheme(theme) method instead. + */ + export function currentTheme(theme: string): void; + /** + * Applies a new theme (with the color scheme defined separately) for the entire page with several DevExtreme visualization widgets. + * @deprecated Use the DevExpress.viz.currentTheme(platform, colorScheme) method instead. + */ + export function currentTheme(platform: string, colorScheme: string): void; + /** + * Registers a new theme based on the existing one. + * @deprecated Use the DevExpress.viz.registerTheme(customTheme, baseTheme) method instead. + */ + export function registerTheme(customTheme: Object, baseTheme: string): void; + /** + * Applies a predefined or registered custom palette to all visualization widgets at once. + * @deprecated Use the DevExpress.viz.currentPalette(paletteName) method instead. + */ + export function currentPalette(paletteName: string): void; + /** + * Obtains the color sets of a predefined or registered palette. + * @deprecated Use the DevExpress.viz.getPalette(paletteName) method instead. + */ + export function getPalette(paletteName: string): Object; + /** + * Registers a new palette. + * @deprecated Use the DevExpress.viz.registerPalette(paletteName, palette) method instead. + */ + export function registerPalette(paletteName: string, palette: Object): void; + export interface Border { + /** Sets a border color for a selected series. */ + color?: string; + /** Sets border visibility for a selected series. */ + visible?: boolean; + /** Sets a border width for a selected series. */ + width?: number; + } + export interface DashedBorder extends Border { + /** Specifies a dash style for the border of a selected series point. */ + dashStyle?: string; + } + export interface DashedBorderWithOpacity extends DashedBorder { + /** Specifies the opacity of the tooltip's border. */ + opacity?: number; + } + export interface Font { + /** Specifies the font color for a strip label. */ + color?: string; + /** Specifies the font family for a strip label. */ + family?: string; + /** Specifies the font opacity for a strip label. */ + opacity?: number; + /** Specifies the font size for a strip label. */ + size?: any; + /** Specifies the font weight for the text displayed in strips. */ + weight?: number; + } + export interface Hatching { + direction?: string; + /** Specifies the opacity of hatching lines. */ + opacity?: number; + /** Specifies the distance between hatching lines in pixels. */ + step?: number; + /** Specifies the width of hatching lines in pixels. */ + width?: number; + } + export interface Margins { + /** Specifies the distance in pixels between the bottom side of the title and the surrounding widget elements. */ + bottom?: number; + /** Specifies the distance in pixels between the left side of the title and the surrounding widget elements. */ + left?: number; + /** Specifies the distance between the right side of the title and surrounding widget elements in pixels. */ + right?: number; + /** Specifies the distance between the top side of the title and surrounding widget elements in pixels. */ + top?: number; + } + export interface Size { + /** Specifies the width of the widget. */ + width?: number; + /** Specifies the height of the widget. */ + height?: number; + } + export interface Title { + /** Specifies font options for the title. */ + font?: viz.core.Font; + /** Specifies the widget title's horizontal position. */ + horizontalAlignment?: string; + /** Specifies the widget title's position in the vertical direction. */ + verticalAlignment?: string; + /** Specifies the distance between the title and surrounding widget elements in pixels. */ + margin?: viz.core.Margins; + /** Specifies the height of the space reserved for the title. */ + placeholderSize?: number; + /** Specifies text for the title. */ + text?: string; + /** Specifies a subtitle for the widget. */ + subtitle?: { + /** Specifies font options for the subtitle. */ + font?: viz.core.Font; + /** Specifies text for the subtitle. */ + text?: string; + } + } + export interface Tooltip { + /** Specifies the length of the tooltip's arrow in pixels. */ + arrowLength?: number; + /** Specifies the appearance of the tooltip's border. */ + border?: viz.core.DashedBorderWithOpacity; + /** Specifies a color for the tooltip. */ + color?: string; + /** Specifies the z-index for tooltips. */ + zIndex?: number; + /** Specifies the container to draw tooltips inside of it. */ + container?: any; + /** Specifies text and appearance of a set of tooltips. */ + customizeTooltip?: (arg: Object) => { color?: string; text?: string }; + /** Specifies whether or not the tooltip is enabled. */ + enabled?: boolean; + /** Specifies font options for the text displayed by the tooltip. */ + font?: Font; + /** Specifies a format for the text displayed by the tooltip. */ + format?: string; + /** Specifies the opacity of a tooltip. */ + opacity?: number; + /** Specifies a distance from the tooltip's left/right boundaries to the inner text in pixels. */ + paddingLeftRight?: number; + /** Specifies a distance from the tooltip's top/bottom boundaries to the inner text in pixels. */ + paddingTopBottom?: number; + /** Specifies a precision for formatted values displayed by the tooltip. */ + precision?: number; + /** Specifies options of the tooltip's shadow. */ + shadow?: { + /** Specifies the blur distance of the tooltip's shadow. */ + blur?: number; + /** Specifies the color of the tooltip's shadow. */ + color?: string; + /** Specifies the horizontal offset of the tooltip's shadow relative to the tooltip in pixels. */ + offsetX?: number; + /** Specifies the vertical offset of the tooltip's shadow relative to the tooltip in pixels. */ + offsetY?: number; + /** Specifies the opacity of the tooltip's shadow. */ + opacity?: number; + }; + } + export interface Animation { + /** Determines how long animation runs. */ + duration?: number; + /** Specifies the animation easing mode. */ + easing?: string; + /** Indicates whether or not animation is enabled. */ + enabled?: boolean; + } + export interface LoadingIndicator { + /** Specifies a color for the loading indicator background. */ + backgroundColor?: string; + /** Specifies font options for the loading indicator text. */ + font?: viz.core.Font; + /** Specifies whether to show the loading indicator or not. */ + show?: boolean; + /** Specifies a text to be displayed by the loading indicator. */ + text?: string; + } + export interface LegendBorder extends viz.core.DashedBorderWithOpacity { + /** Specifies a radius for the corners of the legend border. */ + cornerRadius?: number; + } + export interface BaseLegend { + /** Specifies the color of the legend's background. */ + backgroundColor?: string; + /** Specifies legend border settings. */ + border?: viz.core.LegendBorder; + /** Specifies how many columns must be taken to arrange legend items. */ + columnCount?: number; + /** Specifies the spacing between a pair of neighboring legend columns in pixels. */ + columnItemSpacing?: number; + /** Specifies font options for legend items. */ + font?: viz.core.Font; + /** Specifies the legend's position on the map. */ + horizontalAlignment?: string; + /** Specifies the alignment of legend items. */ + itemsAlignment?: string; + /** Specifies the position of text relative to the item marker. */ + itemTextPosition?: string; + /** Specifies the distance between the legend and the container borders in pixels. */ + margin?: viz.core.Margins; + /** Specifies the size of item markers in the legend in pixels. */ + markerSize?: number; + /** Specifies whether to arrange legend items horizontally or vertically. */ + orientation?: string; + /** Specifies the spacing between the legend left/right border and legend items in pixels. */ + paddingLeftRight?: number; + /** Specifies the spacing between the legend top/bottom border and legend items in pixels. */ + paddingTopBottom?: number; + /** Specifies how many rows must be taken to arrange legend items. */ + rowCount?: number; + /** Specifies the spacing between a pair of neighboring legend rows in pixels. */ + rowItemSpacing?: number; + /** Specifies the legend's position on the map. */ + verticalAlignment?: string; + /** Specifies whether or not the legend is visible on the map. */ + visible?: boolean; + } + export interface BaseWidgetOptions { + /** A handler for the drawn event. */ + onDrawn?: (e: { + component: BaseWidget; + element: Element; + }) => void; + /** A handler for the incidentOccurred event. */ + onIncidentOccurred?: ( + component: BaseWidget, + element: Element, + target: { + id: string; + type: string; + args: any; + text: string; + widget: string; + version: string; + } + ) => void; + /** Notifies a widget that it is embedded into an HTML page that uses a path modifier. */ + pathModified?: boolean; + /** Specifies whether or not the widget supports right-to-left representation. */ + rtlEnabled?: boolean; + /** Sets the name of the theme to be used in the widget. */ + theme?: string; + } + /** This section describes options and methods that are common to all widgets. */ + export class BaseWidget extends DOMComponent { + /** Returns the widget's SVG markup. */ + svg(): string; + } +} +declare module DevExpress.viz.charts { + /** This section describes the fields and methods that can be used in code to manipulate the Series object. */ + export interface BaseSeries { + /** Provides information about the state of the series object. */ + fullState: number; + /** Returns the type of the series. */ + type: string; + /** Unselects all the selected points of the series. The points are displayed in an initial style. */ + clearSelection(): void; + /** Gets the color of a particular series. */ + getColor(): string; + /** Gets points from the series point collection based on the specified argument. */ + getPointsByArg(pointArg: any): Array; + /** Gets a point from the series point collection based on the specified point position. */ + getPointByPos(positionIndex: number): Object; + /** Selects the series. The series is displayed in a 'selected' style until another series is selected or the current series is deselected programmatically. */ + select(): void; + /** Selects the specified point. The point is displayed in a 'selected' style. */ + selectPoint(point: BasePoint): void; + /** Deselects the specified point. The point is displayed in an initial style. */ + deselectPoint(point: BasePoint): void; + /** Returns an array of all points in the series. */ + getAllPoints(): Array; + /** Returns visible series points. */ + getVisiblePoints(): Array; + /** Returns the name of the series. */ + name: string; + /** Returns the tag of the series. */ + tag: string; + /** Hides a series. */ + hide(): void; + /** Provides information about the hover state of a series. */ + isHovered(): boolean; + /** Provides information about the selection state of a series. */ + isSelected(): boolean; + /** Provides information about the visibility state of a series. */ + isVisible(): boolean; + /** Makes a particular series visible. */ + show(): void; + } + /** This section describes the methods that can be used in code to manipulate the Point object. */ + export interface BasePoint { + /** Provides information about the state of the point object. */ + fullState: number; + /** Returns the point's argument value that was set in the data source. */ + originalArgument: any; + /** Returns the point's value that was set in the data source. */ + originalValue: any; + /** Returns the tag of the point. */ + tag: string; + /** Deselects the point. */ + clearSelection(): void; + /** Gets the color of a particular point. */ + getColor(): string; + /** Hides the tooltip of the point. */ + hideTooltip(): void; + /** Provides information about the hover state of a point. */ + isHovered(): boolean; + /** Provides information about the selection state of a point. */ + isSelected(): boolean; + /** Selects the point. The point is displayed in a 'selected' style until another point is selected or the current point is deselected programmatically. */ + select(): void; + /** Shows the tooltip of the point. */ + showTooltip(): void; + /** Allows you to obtain the label of a series point. */ + getLabel(): any; + /** Returns the series object to which the point belongs. */ + series: BaseSeries; + } + /** This section describes the fields and methods that can be used in code to manipulate the Series object. */ + export interface ChartSeries extends BaseSeries { + /** Returns the name of the series pane. */ + pane: string; + /** Returns the name of the value axis of the series. */ + axis: string; + selectPoint(point: ChartPoint): void; + deselectPoint(point: ChartPoint): void; + getAllPoints(): Array; + getVisiblePoints(): Array; + } + /** This section describes the methods that can be used in code to manipulate the Point object. */ + export interface ChartPoint extends BasePoint { + /** Contains the close value of the point. This field is useful for points belonging to a series of the candle stick or stock type only. */ + originalCloseValue: any; + /** Contains the high value of the point. This field is useful for points belonging to a series of the candle stick or stock type only. */ + originalHighValue: any; + /** Contains the low value of the point. This field is useful for points belonging to a series of the candle stick or stock type only. */ + originalLowValue: any; + /** Contains the first value of the point. This field is useful for points belonging to a series of the range area or range bar type only. */ + originalMinValue: any; + /** Contains the open value of the point. This field is useful for points belonging to a series of the candle stick or stock type only. */ + originalOpenValue: any; + /** Contains the size of the bubble as it was set in the data source. This field is useful for points belonging to a series of the bubble type only. */ + size: any; + /** Gets the parameters of the point's minimum bounding rectangle (MBR). */ + getBoundingRect(): { x: number; y: number; width: number; height: number; }; + series: ChartSeries; + } + /** This section describes the methods that can be used in code to manipulate the Label object. */ + export interface Label { + /** Gets the parameters of the label's minimum bounding rectangle (MBR). */ + getBoundingRect(): { x: number; y: number; width: number; height: number; }; + /** Hides the point label. */ + hide(): void; + /** Shows the point label. */ + show(): void; + } + export interface PieSeries extends BaseSeries { + selectPoint(point: PiePoint): void; + deselectPoint(point: PiePoint): void; + getAllPoints(): Array; + getVisiblePoints(): Array; + } + /** This section describes the methods that can be used in code to manipulate the Point object. */ + export interface PiePoint extends BasePoint { + /** Gets the percentage value of the specific point. */ + percent: any; + /** Provides information about the visibility state of a point. */ + isVisible(): boolean; + /** Makes a specific point visible. */ + show(): void; + /** Hides a specific point. */ + hide(): void; + series: PieSeries; + } + /** This section describes the fields and methods that can be used in code to manipulate the Series object. */ + export interface PolarSeries extends BaseSeries { + /** Returns the name of the value axis of the series. */ + axis: string; + selectPoint(point: PolarPoint): void; + deselectPoint(point: PolarPoint): void; + getAllPoints(): Array; + getVisiblePoints(): Array; + } + /** This section describes the methods that can be used in code to manipulate the Point object. */ + export interface PolarPoint extends BasePoint { + series: PolarSeries; + } + export interface Strip { + /** Specifies a color for a strip. */ + color?: string; + /** An object that defines the label configuration options of a strip. */ + label?: { + /** Specifies the text displayed in a strip. */ + text?: string; + }; + /** Specifies a start value for a strip. */ + startValue?: any; + /** Specifies an end value for a strip. */ + endValue?: any; + } + export interface BaseSeriesConfigLabel { + /** Specifies a format for arguments displayed by point labels. */ + argumentFormat?: string; + /** Specifies a precision for formatted point arguments displayed in point labels. */ + argumentPrecision?: number; + /** Specifies a background color for point labels. */ + backgroundColor?: string; + /** Specifies border options for point labels. */ + border?: viz.core.DashedBorder; + /** Specifies connector options for series point labels. */ + connector?: { + /** Specifies the color of label connectors. */ + color?: string; + /** Indicates whether or not label connectors are visible. */ + visible?: boolean; + /** Specifies the width of label connectors. */ + width?: number; + }; + /** Specifies a callback function that returns the text to be displayed by point labels. */ + customizeText?: (pointInfo: Object) => string; + /** Specifies font options for the text displayed in point labels. */ + font?: viz.core.Font; + /** Specifies a format for the text displayed by point labels. */ + format?: string; + position?: string; + /** Specifies a precision for formatted point values displayed in point labels. */ + precision?: number; + /** Specifies the angle used to rotate point labels from their initial position. */ + rotationAngle?: number; + /** Specifies the visibility of point labels. */ + visible?: boolean; + } + export interface SeriesConfigLabel extends BaseSeriesConfigLabel { + /** Specifies whether or not to show a label when the point has a zero value. */ + showForZeroValues?: boolean; + } + export interface ChartSeriesConfigLabel extends SeriesConfigLabel { + /** Specifies how to align point labels relative to the corresponding data points that they represent. */ + alignment?: string; + /** Specifies how to shift point labels horizontally from their initial positions. */ + horizontalOffset?: number; + /** Specifies how to shift point labels vertically from their initial positions. */ + verticalOffset?: number; + /** Specifies a precision for the percentage values displayed in the labels of a full-stacked-like series. */ + percentPrecision?: number; + } + export interface BaseCommonSeriesConfig { + /** Specifies the data source field that provides arguments for series points. */ + argumentField?: string; + axis?: string; + /** An object defining the label configuration options for a series in the dxChart widget. */ + label?: ChartSeriesConfigLabel; + /** Specifies border options for point labels. */ + border?: viz.core.DashedBorder; + /** Specifies a series color. */ + color?: string; + /** Specifies the dash style of the series' line. */ + dashStyle?: string; + hoverMode?: string; + hoverStyle?: { + /** An object defining the border options for a hovered series. */ + border?: viz.core.DashedBorder; + /**

Sets a color for a series when it is hovered over.

*/ + color?: string; + /** Specifies the dash style for the line in a hovered series. */ + dashStyle?: string; + hatching?: viz.core.Hatching; + /** Specifies the width of a line in a hovered series. */ + width?: number; + }; + /** Specifies whether a chart ignores null data points or not. */ + ignoreEmptyPoints?: boolean; + /** Specifies how many points are acceptable to be in a series to display all labels for these points. Otherwise, the labels will not be displayed. */ + maxLabelCount?: number; + /** Specifies the minimal length of a displayed bar in pixels. */ + minBarSize?: number; + /** Specifies opacity for a series. */ + opacity?: number; + /** Specifies the series elements to highlight when the series is selected. */ + selectionMode?: string; + selectionStyle?: { + /** An object defining the border options for a selected series. */ + border?: viz.core.DashedBorder; + /** Sets a color for a series when it is selected. */ + color?: string; + /** Specifies the dash style for the line in a selected series. */ + dashStyle?: string; + hatching?: viz.core.Hatching; + /** Specifies the width of a line in a selected series. */ + width?: number; + }; + /** Specifies whether or not to show the series in the chart's legend. */ + showInLegend?: boolean; + /** Specifies the name of the stack where the values of the _stackedBar_ series must be located. */ + stack?: string; + /** Specifies the name of the data source field that provides data about a point. */ + tagField?: string; + /** Specifies the data source field that provides values for series points. */ + valueField?: string; + /** Specifies the visibility of a series. */ + visible?: boolean; + /** Specifies a line width. */ + width?: number; + /** Configures error bars. */ + valueErrorBar?: { + /** Specifies whether error bars must be displayed in full or partially. */ + displayMode?: string; + /** Specifies the data field that provides data for low error values. */ + lowValueField?: string; + /** Specifies the data field that provides data for high error values. */ + highValueField?: string; + /** Specifies how error bar values must be calculated. */ + type?: string; + /** Specifies the value to be used for generating error bars. */ + value?: number; + /** Specifies the color of error bars. */ + color?: string; + /** Specifies the opacity of error bars. */ + opacity?: number; + /** Specifies the length of the lines that indicate the error bar edges. */ + edgeLength?: number; + /** Specifies the width of the error bar line. */ + lineWidth?: number; + }; + } + export interface CommonPointOptions { + /** Specifies border options for points in the line and area series. */ + border?: viz.core.Border; + /** Specifies the points color. */ + color?: string; + /** Specifies what series points to highlight when a point is hovered over. */ + hoverMode?: string; + /** An object defining configuration options for a hovered point. */ + hoverStyle?: { + /** An object defining the border options for a hovered point. */ + border?: viz.core.Border; + /** Sets a color for a point when it is hovered over. */ + color?: string; + /** Specifies the diameter of a hovered point in the series that represents data points as symbols (not as bars for instance). */ + size?: number; + }; + /** Specifies what series points to highlight when a point is selected. */ + selectionMode?: string; + /** An object defining configuration options for a selected point. */ + selectionStyle?: { + /** An object defining the border options for a selected point. */ + border?: viz.core.Border; + /**

Sets a color for a point when it is selected.

*/ + color?: string; + /** Specifies the diameter of a selected point in the series that represents data points as symbols (not as bars for instance). */ + size?: number; + }; + /** Specifies the point diameter in pixels for those series that represent data points as symbols (not as bars for instance). */ + size?: number; + /** Specifies a symbol for presenting points of the line and area series. */ + symbol?: string; + visible?: boolean; + } + export interface ChartCommonPointOptions extends CommonPointOptions { + /** An object specifying the parameters of an image that is used as a point marker. */ + image?: { + /** Specifies the height of an image that is used as a point marker. */ + height?: any; + /** Specifies a URL leading to the image to be used as a point marker. */ + url?: any; + /** Specifies the width of an image that is used as a point marker. */ + width?: any; + }; + } + export interface PolarCommonPointOptions extends CommonPointOptions { + /** An object specifying the parameters of an image that is used as a point marker. */ + image?: { + /** Specifies the height of an image that is used as a point marker. */ + height?: number; + /** Specifies a URL leading to the image to be used as a point marker. */ + url?: string; + /** Specifies the width of an image that is used as a point marker. */ + width?: number; + }; + } + /** An object that defines configuration options for chart series. */ + export interface CommonSeriesConfig extends BaseCommonSeriesConfig { + /** Specifies the data source field that provides a 'close' value for a _candleStick_ or _stock_ series. */ + closeValueField?: string; + /** Specifies a radius for bar corners. */ + cornerRadius?: number; + /** Specifies the data source field that provides a 'high' value for a _candleStick_ or _stock_ series. */ + highValueField?: string; + /** Specifies the color for the body (rectangle) of a _candleStick_ series. */ + innerColor?: string; + /** Specifies the data source field that provides a 'low' value for a _candleStick_ or _stock_ series. */ + lowValueField?: string; + /** Specifies the data source field that provides an 'open' value for a _candleStick_ or _stock_ series. */ + openValueField?: string; + /** Specifies the pane that will be used to display a series. */ + pane?: string; + /** An object defining configuration options for points in line-, scatter- and area-like series. */ + point?: ChartCommonPointOptions; + /** Specifies the data source field that provides values for one end of a range series. To set the data source field for the other end of the range series, use the rangeValue2Field property. */ + rangeValue1Field?: string; + /** Specifies the data source field that provides values for the second end of a range series. To set the data source field for the other end of the range series, use the rangeValue1Field property. */ + rangeValue2Field?: string; + /** Specifies reduction options for the stock or candleStick series. */ + reduction?: { + /** Specifies a color for the points whose reduction level price is lower in comparison to the value in the previous point. */ + color?: string; + /** Specifies for which price level (open, high, low or close) to enable reduction options in the series. */ + level?: string; + }; + /** Specifies the data source field that defines the size of bubbles. */ + sizeField?: string; + } + export interface CommonSeriesSettings extends CommonSeriesConfig { + /**

An object that specifies configuration options for all series of the area type in the chart.

*/ + area?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _bar_ type in the chart. */ + bar?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the bubble type in the chart. */ + bubble?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _candleStick_ type in the chart. */ + candlestick?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _fullStackedArea_ type in the chart. */ + fullstackedarea?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the Full-Stacked Spline Area type in the chart. */ + fullstackedsplinearea?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _fullStackedBar_ type in the chart. */ + fullstackedbar?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _fullStackedLine_ type in the chart. */ + fullstackedline?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the Full-Stacked Spline type in the chart. */ + fullstackedspline?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _line_ type in the chart. */ + line?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _rangeArea_ type in the chart. */ + rangearea?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _rangeBar_ type in the chart. */ + rangebar?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _scatter_ type in the chart. */ + scatter?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _spline_ type in the chart. */ + spline?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _splineArea_ type in the chart. */ + splinearea?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _stackedArea_ type in the chart. */ + stackedarea?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the Stacked Spline Area type in the chart. */ + stackedsplinearea?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _stackedBar_ type in the chart. */ + stackedbar?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _stackedLine_ type in the chart. */ + stackedline?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the Stacked Spline type in the chart. */ + stackedspline?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _stepArea_ type in the chart. */ + steparea?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _stepLine_ type in the chart. */ + stepline?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _stock_ type in the chart. */ + stock?: CommonSeriesConfig; + /** Sets a series type. */ + type?: string; + } + export interface SeriesConfig extends CommonSeriesConfig { + /** Specifies the name that identifies the series. */ + name?: string; + /** Specifies data about a series. */ + tag?: any; + /** Sets the series type. */ + type?: string; + } + /** An object that defines configuration options for polar chart series. */ + export interface CommonPolarSeriesConfig extends BaseCommonSeriesConfig { + /** Specifies whether or not to close the chart by joining the end point with the first point. */ + closed?: boolean; + label?: SeriesConfigLabel; + point?: PolarCommonPointOptions; + } + export interface CommonPolarSeriesSettings extends CommonPolarSeriesConfig { + /** An object that specifies configuration options for all series of the area type in the chart. */ + area?: CommonPolarSeriesConfig; + /** An object that specifies configuration options for all series of the _bar_ type in the chart. */ + bar?: CommonPolarSeriesConfig; + /** An object that specifies configuration options for all series of the _line_ type in the chart. */ + line?: CommonPolarSeriesConfig; + /** An object that specifies configuration options for all series of the _scatter_ type in the chart. */ + scatter?: CommonPolarSeriesConfig; + /** An object that specifies configuration options for all series of the _stackedBar_ type in the chart. */ + stackedbar?: CommonPolarSeriesConfig; + /** Sets a series type. */ + type?: string; + } + export interface PolarSeriesConfig extends CommonPolarSeriesConfig { + /** Specifies the name that identifies the series. */ + name?: string; + /** Specifies data about a series. */ + tag?: any; + /** Sets the series type. */ + type?: string; + } + export interface PieSeriesConfigLabel extends BaseSeriesConfigLabel { + /** Specifies how to shift labels from their initial position in a radial direction in pixels. */ + radialOffset?: number; + /** Specifies a precision for the percentage values displayed in labels. */ + percentPrecision?: number; + } + /** An object that defines configuration options for chart series. */ + export interface CommonPieSeriesConfig { + /** Specifies the data source field that provides arguments for series points. */ + argumentField?: string; + /** Specifies the required type for series arguments. */ + argumentType?: string; + /** An object defining the series border configuration options. */ + border?: viz.core.DashedBorder; + /** Specifies a series color. */ + color?: string; + /** Specifies the chart elements to highlight when a series is hovered over. */ + hoverMode?: string; + /** An object defining configuration options for a hovered series. */ + hoverStyle?: { + /** An object defining the border options for a hovered series. */ + border?: viz.core.DashedBorder; + /** Sets a color for the series when it is hovered over. */ + color?: string; + /** Specifies the hatching options to be applied when a point is hovered over. */ + hatching?: viz.core.Hatching; + }; + /** + * Specifies the fraction of the inner radius relative to the total radius in the series of the 'doughnut' type. + * @deprecated use the 'innerRadius' option instead + */ + innerRadius?: number; + /** An object defining the label configuration options. */ + label?: PieSeriesConfigLabel; + /** Specifies how many points are acceptable to be in a series to display all labels for these points. Otherwise, the labels will not be displayed. */ + maxLabelCount?: number; + /** Specifies a minimal size of a displayed pie segment. */ + minSegmentSize?: number; + /** + * Specifies the direction in which the dxPieChart series points are located. + * @deprecated use the 'segmentsDirection' option instead + */ + segmentsDirection?: string; + /**

Specifies the chart elements to highlight when the series is selected.

*/ + selectionMode?: string; + /** An object defining configuration options for the series when it is selected. */ + selectionStyle?: { + /** An object defining the border options for a selected series. */ + border?: viz.core.DashedBorder; + /** Sets a color for a series when it is selected. */ + color?: string; + /** Specifies the hatching options to be applied when a point is selected. */ + hatching?: viz.core.Hatching; + }; + /** Specifies chart segment grouping options. */ + smallValuesGrouping?: { + /** Specifies the name of the grouped chart segment. This name represents the segment in the chart legend. */ + groupName?: string; + /** Specifies the segment grouping mode. */ + mode?: string; + /** Specifies a threshold for segment values. */ + threshold?: number; + /** Specifies how many segments must not be grouped. */ + topCount?: number; + }; + /** + * Specifies a start angle for a pie chart in arc degrees. + * @deprecated use the 'startAngle' option instead + */ + startAngle?: number; + /**

Specifies the name of the data source field that provides data about a point.

*/ + tagField?: string; + /** Specifies the data source field that provides values for series points. */ + valueField?: string; + } + export interface CommonPieSeriesSettings extends CommonPieSeriesConfig { + /** + * Sets a series type for all series. + * @deprecated use the 'type' option instead + */ + type?: string; + } + export interface PieSeriesConfig extends CommonPieSeriesConfig { + /** + * Sets the series type. + * @deprecated use the 'type' option instead + */ + type?: string; + /** Specifies the name that identifies the series. */ + name?: string; + /** Specifies data about a series. */ + tag?: any; + } + export interface SeriesTemplate { + /** Specifies a callback function that returns a series object with individual series settings. */ + customizeSeries?: (seriesName: string) => SeriesConfig; + /** Specifies a data source field that represents the series name. */ + nameField?: string; + } + export interface PolarSeriesTemplate { + /** Specifies a callback function that returns a series object with individual series settings. */ + customizeSeries?: (seriesName: string) => PolarSeriesConfig; + /** Specifies a data source field that represents the series name. */ + nameField?: string; + } + export interface ChartCommonConstantLineLabel { + /** Specifies font options for a constant line label. */ + font?: viz.core.Font; + /** Specifies the position of the constant line label relative to the chart plot. */ + position?: string; + /** Indicates whether or not to display labels for the axis constant lines. */ + visible?: boolean; + } + export interface PolarCommonConstantLineLabel { + /** Indicates whether or not to display labels for the axis constant lines. */ + visible?: boolean; + /** Specifies font options for a constant line label. */ + font?: viz.core.Font; + } + export interface ConstantLineStyle { + /** Specifies a color for a constant line. */ + color?: string; + /** Specifies a dash style for a constant line. */ + dashStyle?: string; + /** Specifies a constant line width in pixels. */ + width?: number; + } + export interface ChartCommonConstantLineStyle extends ConstantLineStyle { + /** An object defining constant line label options. */ + label?: ChartCommonConstantLineLabel; + /** Specifies the space between the constant line label and the left/right side of the constant line. */ + paddingLeftRight?: number; + /** Specifies the space between the constant line label and the top/bottom side of the constant line. */ + paddingTopBottom?: number; + } + export interface PolarCommonConstantLineStyle extends ConstantLineStyle { + /** An object defining constant line label options. */ + label?: PolarCommonConstantLineLabel; + } + export interface CommonAxisLabel { + /** Specifies font options for axis labels. */ + font?: viz.core.Font; + /** Specifies the spacing between an axis and its labels in pixels. */ + indentFromAxis?: number; + /** Indicates whether or not axis labels are visible. */ + visible?: boolean; + } + export interface ChartCommonAxisLabel extends CommonAxisLabel { + /** Specifies the label's position relative to the tick (grid line). */ + alignment?: string; + /** Specifies the overlap resolving algorithm to be applied to axis labels. */ + overlappingBehavior?: { + /** Specifies how to arrange axis labels. */ + mode?: string; + /** Specifies the angle used to rotate axis labels. */ + rotationAngle?: number; + /** Specifies the spacing that must be set between staggered rows when the 'stagger' algorithm is applied. */ + staggeringSpacing?: number; + }; + } + export interface PolarCommonAxisLabel extends CommonAxisLabel { + /** Specifies the overlap resolving algorithm to be applied to axis labels. */ + overlappingBehavior?: string; + } + export interface CommonAxisTitle { + /** Specifies font options for an axis title. */ + font?: viz.core.Font; + /** Specifies a margin for an axis title in pixels. */ + margin?: number; + } + export interface BaseCommonAxisSettings { + /** Specifies the color of the line that represents an axis. */ + color?: string; + /** Specifies whether ticks/grid lines of a discrete axis are located between labels or cross the labels. */ + discreteAxisDivisionMode?: string; + /** An object defining the configuration options for the grid lines of an axis in the dxPolarChart widget. */ + grid?: { + /** Specifies a color for grid lines. */ + color?: string; + /** Specifies an opacity for grid lines. */ + opacity?: number; + /** Indicates whether or not the grid lines of an axis are visible. */ + visible?: boolean; + /** Specifies the width of grid lines. */ + width?: number; + }; + /** Specifies the options of the minor grid. */ + minorGrid?: { + /** Specifies a color for the lines of the minor grid. */ + color?: string; + /** Specifies an opacity for the lines of the minor grid. */ + opacity?: number; + /** Indicates whether the minor grid is visible or not. */ + visible?: boolean; + /** Specifies a width for the lines of the minor grid. */ + width?: number; + }; + /** Indicates whether or not an axis is inverted. */ + inverted?: boolean; + /** Specifies the opacity of the line that represents an axis. */ + opacity?: number; + /** Indicates whether or not to set ticks/grid lines of a continuous axis of the 'date-time' type at the beginning of each date-time interval. */ + setTicksAtUnitBeginning?: boolean; + /** An object defining the configuration options for axis ticks. */ + tick?: { + /** Specifies ticks color. */ + color?: string; + /** Specifies tick opacity. */ + opacity?: number; + /** Indicates whether or not ticks are visible on an axis. */ + visible?: boolean; + /** Specifies tick width. */ + width?: number; + /** Specifies tick length. */ + length?: number; + }; + /** Specifies the options of the minor ticks. */ + minorTick?: { + /** Specifies a color for the minor ticks. */ + color?: string; + /** Specifies an opacity for the minor ticks. */ + opacity?: number; + /** Indicates whether or not the minor ticks are displayed on an axis. */ + visible?: boolean; + /** Specifies minor tick width. */ + width?: number; + /** Specifies minor tick length. */ + length?: number; + }; + /** Indicates whether or not the line that represents an axis in a chart is visible. */ + visible?: boolean; + /** Specifies the width of the line that represents an axis in the chart. */ + width?: number; + } + export interface ChartCommonAxisSettings extends BaseCommonAxisSettings { + /** Specifies the appearance of all the widget's constant lines. */ + constantLineStyle?: ChartCommonConstantLineStyle; + /** An object defining the label configuration options that are common for all axes in the dxChart widget. */ + label?: ChartCommonAxisLabel; + /** Specifies a coefficient that determines the spacing between the maximum series point and the axis. */ + maxValueMargin?: number; + /** Specifies a coefficient that determines the spacing between the minimum series point and the axis. */ + minValueMargin?: number; + /** Specifies, in pixels, the space reserved for an axis. */ + placeholderSize?: number; + /** An object defining configuration options for strip style. */ + stripStyle?: { + /** An object defining the configuration options for a strip label style. */ + label?: { + /** Specifies font options for a strip label. */ + font?: viz.core.Font; + /** Specifies the label's position on a strip. */ + horizontalAlignment?: string; + /** Specifies a label's position on a strip. */ + verticalAlignment?: string; + }; + /** Specifies the spacing, in pixels, between the left/right strip border and the strip label. */ + paddingLeftRight?: number; + /** Specifies the spacing, in pixels, between the top/bottom strip borders and the strip label. */ + paddingTopBottom?: number; + }; + /** An object defining the title configuration options that are common for all axes in the dxChart widget. */ + title?: CommonAxisTitle; + /** Indicates whether or not to display series with indents from axis boundaries. */ + valueMarginsEnabled?: boolean; + } + export interface PolarCommonAxisSettings extends BaseCommonAxisSettings { + /** Specifies the appearance of all the widget's constant lines. */ + constantLineStyle?: PolarCommonConstantLineStyle; + /** An object defining the label configuration options that are common for all axes in the dxPolarChart widget. */ + label?: PolarCommonAxisLabel; + /** An object defining configuration options for strip style. */ + stripStyle?: { + /** An object defining the configuration options for a strip label style. */ + label?: { + /** Specifies font options for a strip label. */ + font?: viz.core.Font; + }; + }; + } + export interface ChartConstantLineLabel extends ChartCommonConstantLineLabel { + /** Specifies the horizontal alignment of a constant line label. */ + horizontalAlignment?: string; + /** Specifies the vertical alignment of a constant line label. */ + verticalAlignment?: string; + /** Specifies the text to be displayed in a constant line label. */ + text?: string; + } + export interface PolarConstantLineLabel extends PolarCommonConstantLineLabel { + /** Specifies the text to be displayed in a constant line label. */ + text?: string; + } + export interface AxisLabel { + /** Specifies the text for a hint that appears when a user hovers the mouse pointer over a label on the value axis. */ + customizeHint?: (argument: { value: any; valueText: string }) => string; + /** Specifies a callback function that returns the text to be displayed in value axis labels. */ + customizeText?: (argument: { value: any; valueText: string }) => string; + /** Specifies a format for the text displayed by axis labels. */ + format?: string; + /** Specifies a precision for the formatted value displayed in the axis labels. */ + precision?: number; + } + export interface ChartAxisLabel extends ChartCommonAxisLabel, AxisLabel { } + export interface PolarAxisLabel extends PolarCommonAxisLabel, AxisLabel { } + export interface AxisTitle extends CommonAxisTitle { + /** Specifies the text for the value axis title. */ + text?: string; + } + export interface ChartConstantLineStyle extends ChartCommonConstantLineStyle { + /** An object defining constant line label options. */ + label?: ChartConstantLineLabel; + } + export interface ChartConstantLine extends ChartConstantLineStyle { + /** An object defining constant line label options. */ + label?: ChartConstantLineLabel; + /** Specifies a value to be displayed by a constant line. */ + value?: any; + } + export interface PolarConstantLine extends PolarCommonConstantLineStyle { + /** An object defining constant line label options. */ + label?: PolarConstantLineLabel; + /** Specifies a value to be displayed by a constant line. */ + value?: any; + } + export interface Axis { + /** Specifies a coefficient for dividing the value axis. */ + axisDivisionFactor?: number; + /** Specifies the order in which discrete values are arranged on the value axis. */ + categories?: Array; + /** Specifies the value to be raised to a power when generating ticks for a logarithmic axis. */ + logarithmBase?: number; + /** Specifies an interval between axis ticks/grid lines. */ + tickInterval?: any; + /** Specifies the interval between minor ticks. */ + minorTickInterval?: any; + /** Specifies the number of minor ticks between two neighboring major ticks. */ + minorTickCount?: number; + /** Specifies the required type of the value axis. */ + type?: string; + /** Specifies the pane on which the current value axis will be displayed. */ + pane?: string; + /** Specifies options for value axis strips. */ + strips?: Array; + } + export interface ChartAxis extends ChartCommonAxisSettings, Axis { + /** Defines an array of the value axis constant lines. */ + constantLines?: Array; + /** Specifies the appearance options for the constant lines of the value axis. */ + constantLineStyle?: ChartCommonConstantLineStyle; + /** Specifies options for value axis labels. */ + label?: ChartAxisLabel; + /** Specifies the maximum value on the value axis. */ + max?: any; + /** Specifies the minimum value on the value axis. */ + min?: any; + /** Specifies the position of the value axis on a chart. */ + position?: string; + /** Specifies the title for a value axis. */ + title?: AxisTitle; + } + export interface PolarAxis extends PolarCommonAxisSettings, Axis { + /** Defines an array of the value axis constant lines. */ + constantLines?: Array; + /** Specifies options for value axis labels. */ + label?: PolarAxisLabel; + } + export interface ArgumentAxis { + /** Specifies the desired type of axis values. */ + argumentType?: string; + /** Specifies the elements that will be highlighted when the argument axis is hovered over. */ + hoverMode?: string; + } + export interface ChartArgumentAxis extends ChartAxis, ArgumentAxis { } + export interface PolarArgumentAxis extends PolarAxis, ArgumentAxis { + /** Specifies a start angle for the argument axis in degrees. */ + startAngle?: number; + /** Specifies whether or not to display the first point at the angle specified by the startAngle option. */ + firstPointOnStartAngle?: boolean; + /** Specifies the period of the argument values in the data source. */ + period?: number; + } + export interface ValueAxis { + /** Specifies the name of the value axis. */ + name?: string; + /** Specifies whether or not to indicate a zero value on the value axis. */ + showZero?: boolean; + /** Specifies the desired type of axis values. */ + valueType?: string; + } + export interface ChartValueAxis extends ChartAxis, ValueAxis { + /** Specifies the spacing, in pixels, between multiple value axes in a chart. */ + multipleAxesSpacing?: number; + /** Specifies the value by which the chart's value axes are synchronized. */ + synchronizedValue?: number; + } + export interface PolarValueAxis extends PolarAxis, ValueAxis { + /** Indicates whether to display series with indents from axis boundaries. */ + valueMarginsEnabled?: boolean; + /** Specifies a coefficient that determines the spacing between the maximum series point and the axis. */ + maxValueMargin?: number; + /** Specifies a coefficient that determines the spacing between the minimum series point and the axis. */ + minValueMargin?: number; + tick?: { + visible?: boolean; + } + } + export interface CommonPane { + /** Specifies a background color in a pane. */ + backgroundColor?: string; + /** Specifies the border options of a chart's pane. */ + border?: PaneBorder; + } + export interface Pane extends CommonPane { + /** Specifies the name of a pane. */ + name?: string; + } + export interface PaneBorder extends viz.core.DashedBorderWithOpacity { + /** Specifies the bottom border's visibility state in a pane. */ + bottom?: boolean; + /** Specifies the left border's visibility state in a pane. */ + left?: boolean; + /** Specifies the right border's visibility state in a pane. */ + right?: boolean; + /** Specifies the top border's visibility state in a pane. */ + top?: boolean; + } + export interface ChartAnimation extends viz.core.Animation { + /** Specifies the maximum series point count in the chart that the animation supports. */ + maxPointCountSupported?: number; + } + export interface BaseChartTooltip extends viz.core.Tooltip { + /** Specifies a format for arguments of the chart's series points. */ + argumentFormat?: string; + /** Specifies a precision for formatted arguments displayed in tooltips. */ + argumentPrecision?: number; + /** Specifies a precision for a percent value displayed in tooltips for stacked series and dxPieChart series. */ + percentPrecision?: number; + } + export interface BaseChartOptions extends viz.core.BaseWidgetOptions { + /** Specifies adaptive layout options. */ + adaptiveLayout?: { + /** Specifies the width of the widget that is small enough for the layout to begin adapting. */ + width?: number; + /** Specifies the height of the widget that is small enough for the layout to begin adapting. */ + height?: number; + /** Specifies whether or not point labels can be hidden when the layout is adapting. */ + keepLabels?: boolean; + }; + /** Specifies animation options. */ + animation?: ChartAnimation; + /** Specifies a callback function that returns an object with options for a specific point label. */ + customizeLabel?: (labelInfo: Object) => Object; + /** Specifies a callback function that returns an object with options for a specific point. */ + customizePoint?: (pointInfo: Object) => Object; + /** Specifies a data source for the chart. */ + dataSource?: any; + /** Specifies the appearance of the loading indicator. */ + loadingIndicator?: viz.core.LoadingIndicator; + /** Specifies options of a dxChart's (dxPieChart's) legend. */ + legend?: core.BaseLegend; + /** Specifies the blank space between the chart's extreme elements and the boundaries of the area provided for the widget (see size) in pixels. */ + margin?: viz.core.Margins; + /** Sets the name of the palette to be used in the chart. Alternatively, an array of colors can be set as a custom palette to be used within this chart. */ + palette?: any; + /** A handler for the done event. */ + onDone?: (e: { + component: BaseChart; + element: Element; + }) => void; + /** A handler for the pointClick event. */ + onPointClick?: any; + /** A handler for the pointHoverChanged event. */ + onPointHoverChanged?: (e: { + component: BaseChart; + element: Element; + target: TPoint; + }) => void; + /** A handler for the pointSelectionChanged event. */ + onPointSelectionChanged?: (e: { + component: BaseChart; + element: Element; + target: TPoint; + }) => void; + /** Specifies whether a single point or multiple points can be selected in the chart. */ + pointSelectionMode?: string; + /** Specifies whether to redraw the widget when the size of the parent browser window changes or a mobile device rotates. */ + redrawOnResize?: boolean; + /** Specifies options for the dxChart and dxPieChart widget series. */ + series?: any; + /** Specifies the size of the widget in pixels. */ + size?: viz.core.Size; + /** Specifies a title for the chart. */ + title?: viz.core.Title; + /** Specifies tooltip options. */ + tooltip?: BaseChartTooltip; + /** A handler for the tooltipShown event. */ + onTooltipShown?: (e: { + component: BaseChart; + element: Element; + target: BasePoint; + }) => void; + /** A handler for the tooltipHidden event. */ + onTooltipHidden?: (e: { + component: BaseChart; + element: Element; + target: BasePoint; + }) => void; + } + /** A base class for all chart widgets included in the ChartJS library. */ + export class BaseChart extends viz.core.BaseWidget { + /** Deselects the chart's selected series. The series is displayed in an initial style. */ + clearSelection(): void; + /** Gets the current size of the widget. */ + getSize(): { width: number; height: number }; + /** Returns an array of all series in the chart. */ + getAllSeries(): Array; + /** Gets a series within the chart's series collection by the specified name (see the name option). */ + getSeriesByName(seriesName: string): BaseSeries; + /** Gets a series within the chart's series collection by its position number. */ + getSeriesByPos(seriesIndex: number): BaseSeries; + /** Displays the loading indicator. */ + showLoadingIndicator(): void; + /** Conceals the loading indicator. */ + hideLoadingIndicator(): void; + /** Hides all widget tooltips. */ + hideTooltip(): void; + /** Redraws a widget. */ + render(renderOptions?: { + force?: boolean; + animate?: boolean; + asyncSeriesRendering?: boolean; + }): void; + } + export interface AdvancedLegend extends core.BaseLegend { + /** Specifies the text for a hint that appears when a user hovers the mouse pointer over a legend item. */ + customizeHint?: (seriesInfo: { seriesName: string; seriesIndex: number; seriesColor: string; }) => string; + /**

Specifies a callback function that returns the text to be displayed by legend items.

*/ + customizeText?: (seriesInfo: { seriesName: string; seriesIndex: number; seriesColor: string; }) => string; + /** Specifies what series elements to highlight when a corresponding item in the legend is hovered over. */ + hoverMode?: string; + } + export interface AdvancedOptions extends BaseChartOptions { + /** A handler for the argumentAxisClick event. */ + onArgumentAxisClick?: any; + /** Specifies the color of the parent page element. */ + containerBackgroundColor?: string; + /** An object providing options for managing data from a data source. */ + dataPrepareSettings?: { + /** Specifies whether or not to validate the values from a data source. */ + checkTypeForAllData?: boolean; + /** Specifies whether or not to convert the values from a data source into the data type of an axis. */ + convertToAxisDataType?: boolean; + /** Specifies how to sort the series points. */ + sortingMethod?: any; + }; + /** A handler for the legendClick event. */ + onLegendClick?: any; + /** A handler for the seriesClick event. */ + onSeriesClick?: any; + /** A handler for the seriesHoverChanged event. */ + onSeriesHoverChanged?: (e: { + component: BaseChart; + element: Element; + target: TSeries; + }) => void; + /** A handler for the seriesSelectionChanged event. */ + onSeriesSelectionChanged?: (e: { + component: BaseChart; + element: Element; + target: TSeries; + }) => void; + /** Specifies whether a single series or multiple series can be selected in the chart. */ + seriesSelectionMode?: string; + /** Specifies how the chart must behave when series point labels overlap. */ + resolveLabelOverlapping?: string; + /** Specifies whether or not all bars in a series must have the same angle, or may have different angles if any points in other series are missing. */ + equalBarWidth?: boolean; + /** Specifies a common bar width as a percentage from 0 to 1. */ + barWidth?: number; + } + export interface Legend extends AdvancedLegend { + /** Specifies whether the legend is located outside or inside the chart's plot. */ + position?: string; + } + export interface ChartTooltip extends BaseChartTooltip { + /** Specifies whether the tooltip must be located in the center of a bar or on its edge. Applies to the Bar and Bubble series. */ + location?: string; + /** Specifies the kind of information to display in a tooltip. */ + shared?: boolean; + } + export interface dxChartOptions extends AdvancedOptions { + adaptiveLayout?: { + keepLabels?: boolean; + }; + /** Indicates whether or not to synchronize value axes when they are displayed on a single pane. */ + synchronizeMultiAxes?: boolean; + /** Specifies whether or not to filter the series points depending on their quantity. */ + useAggregation?: boolean; + /** Indicates whether or not to adjust a value axis to the current minimum and maximum values of a zoomed chart. */ + adjustOnZoom?: boolean; + /** Specifies argument axis options for the dxChart widget. */ + argumentAxis?: ChartArgumentAxis; + /** An object defining the configuration options that are common for all axes of the dxChart widget. */ + commonAxisSettings?: ChartCommonAxisSettings; + /** An object defining the configuration options that are common for all panes in the dxChart widget. */ + commonPaneSettings?: CommonPane; + /** An object defining the configuration options that are common for all series of the dxChart widget. */ + commonSeriesSettings?: CommonSeriesSettings; + /** An object that specifies the appearance options of the chart crosshair. */ + crosshair?: { + /** Specifies a color for the crosshair lines. */ + color?: string; + /** Specifies a dash style for the crosshair lines. */ + dashStyle?: string; + /** Specifies whether to enable the crosshair or not. */ + enabled?: boolean; + /** Specifies the opacity of the crosshair lines. */ + opacity?: number; + /** Specifies the width of the crosshair lines. */ + width?: number; + /** Specifies the appearance of the horizontal crosshair line. */ + horizontalLine?: CrosshaierWithLabel; + /** Specifies the appearance of the vertical crosshair line. */ + verticalLine?: CrosshaierWithLabel; + /** Specifies the options of the crosshair labels. */ + label?: { + /** Specifies a color for the background of the crosshair labels. */ + backgroundColor?: string; + /** Specifies whether the crosshair labels are visible or not. */ + visible?: boolean; + /** Specifies font options for the text of the crosshair labels. */ + font?: viz.core.Font; + } + }; + /** Specifies a default pane for the chart's series. */ + defaultPane?: string; + /** Specifies a coefficient determining the diameter of the largest bubble. */ + maxBubbleSize?: number; + /** Specifies the diameter of the smallest bubble measured in pixels. */ + minBubbleSize?: number; + /** Defines the dxChart widget's pane(s). */ + panes?: Array; + /** Swaps the axes round so that the value axis becomes horizontal and the argument axes becomes vertical. */ + rotated?: boolean; + /** Specifies the options of a chart's legend. */ + legend?: Legend; + /** Specifies options for dxChart widget series. */ + series?: Array; + /** Defines options for the series template. */ + seriesTemplate?: SeriesTemplate; + /** Specifies tooltip options. */ + tooltip?: ChartTooltip; + /** Specifies value axis options for the dxChart widget. */ + valueAxis?: Array; + /** Enables scrolling in your chart. */ + scrollingMode?: string; + /** Enables zooming in your chart. */ + zoomingMode?: string; + /** Specifies the settings of the scroll bar. */ + scrollBar?: { + /** Specifies whether the scroll bar is visible or not. */ + visible?: boolean; + /** Specifies the spacing between the scroll bar and the chart's plot in pixels. */ + offset?: number; + /** Specifies the color of the scroll bar. */ + color?: string; + /** Specifies the width of the scroll bar in pixels. */ + width?: number; + /** Specifies the opacity of the scroll bar. */ + opacity?: number; + /** Specifies the position of the scroll bar in the chart. */ + position?: string; + }; + } + /** A widget used to embed charts into HTML JS applications. */ + export class dxChart extends BaseChart { + constructor(element: JQuery, options?: dxChartOptions); + constructor(element: Element, options?: dxChartOptions); + /** Sets the specified start and end values for the chart's argument axis. */ + zoomArgument(startValue: any, endValue: any): void; + } + interface CrosshaierWithLabel extends viz.core.DashedBorderWithOpacity { + /** Configures the label that belongs to the horizontal crosshair line. */ + label?: { + /** Specifies a color for the background of the label that belongs to the horizontal crosshair line. */ + backgroundColor?: string; + /** Specifies whether the label of the horizontal crosshair line is visible or not. */ + visible?: boolean; + /** Specifies font options for the text of the label that belongs to the horizontal crosshair line. */ + font?: viz.core.Font; + } + } + export interface PolarChartTooltip extends BaseChartTooltip { + /** Specifies the kind of information to display in a tooltip. */ + shared?: boolean; + } + export interface dxPolarChartOptions extends AdvancedOptions { + /** Specifies adaptive layout options. */ + adaptiveLayout?: { + width?: number; + height?: number; + /** Specifies whether or not point labels can be hidden when the layout is adapting. */ + keepLabels?: boolean; + }; + /** Indicates whether or not to display a "spider web". */ + useSpiderWeb?: boolean; + /** Specifies argument axis options for the dxPolarChart widget. */ + argumentAxis?: PolarArgumentAxis; + /** An object defining the configuration options that are common for all axes of the dxPolarChart widget. */ + commonAxisSettings?: PolarCommonAxisSettings; + /** An object defining the configuration options that are common for all series of the dxPolarChart widget. */ + commonSeriesSettings?: CommonPolarSeriesSettings; + /** Specifies the options of a chart's legend. */ + legend?: AdvancedLegend; + /** Specifies options for dxPolarChart widget series. */ + series?: Array; + /** Defines options for the series template. */ + seriesTemplate?: PolarSeriesTemplate; + /** Specifies tooltip options. */ + tooltip?: PolarChartTooltip; + /** Specifies value axis options for the dxPolarChart widget. */ + valueAxis?: PolarValueAxis; + } + /** A chart widget displaying data in a polar coordinate system. */ + export class dxPolarChart extends BaseChart { + constructor(element: JQuery, options?: dxPolarChartOptions); + constructor(element: Element, options?: dxPolarChartOptions); + } + export interface PieLegend extends core.BaseLegend { + /** Specifies what chart elements to highlight when a corresponding item in the legend is hovered over. */ + hoverMode?: string; + /** Specifies the text for a hint that appears when a user hovers the mouse pointer over a legend item. */ + customizeHint?: (pointInfo: { pointName: string; pointIndex: number; pointColor: string; }) => string; + /** Specifies a callback function that returns the text to be displayed by a legend item. */ + customizeText?: (pointInfo: { pointName: string; pointIndex: number; pointColor: string; }) => string; + } + export interface dxPieChartOptions extends BaseChartOptions { + /** Specifies adaptive layout options. */ + adaptiveLayout?: { + /** Specifies whether or not point labels can be hidden when the layout is adapting. */ + keepLabels?: boolean; + }; + /** Specifies dxPieChart legend options. */ + legend?: PieLegend; + /** Specifies options for the series of the dxPieChart widget. */ + series?: Array; + /** Specifies the diameter of the pie. */ + diameter?: number; + /** Specifies the direction that the pie chart segments will occupy. */ + segmentsDirection?: string; + /** Specifies the starting angle in arc degrees for the first segment in a pie chart. */ + startAngle?: number; + /** Specifies the fraction of the inner radius relative to the total radius in the series of the 'doughnut' type. The value should be between 0 and 1. */ + innerRadius?: number; + /** A handler for the legendClick event. */ + onLegendClick?: any; + /** Specifies how a chart must behave when series point labels overlap. */ + resolveLabelOverlapping?: string; + /** An object defining the configuration options that are common for all series of the dxPieChart widget. */ + commonSeriesSettings?: CommonPieSeriesSettings; + /** Specifies the type of the pie chart series. */ + type?: string; + } + /** A circular chart widget for HTML JS applications. */ + export class dxPieChart extends BaseChart { + constructor(element: JQuery, options?: dxPieChartOptions); + constructor(element: Element, options?: dxPieChartOptions); + /** + * Provides access to the dxPieChart series. + * @deprecated ..\..\BaseChart\3 Methods\getAllSeries().md + */ + getSeries(): PieSeries; + } +} +interface JQuery { + dxChart(options?: DevExpress.viz.charts.dxChartOptions): JQuery; + dxChart(methodName: string, ...params: any[]): any; + dxChart(methodName: "instance"): DevExpress.viz.charts.dxChart; + dxPieChart(options?: DevExpress.viz.charts.dxPieChartOptions): JQuery; + dxPieChart(methodName: string, ...params: any[]): any; + dxPieChart(methodName: "instance"): DevExpress.viz.charts.dxPieChart; + dxPolarChart(options?: DevExpress.viz.charts.dxPolarChartOptions): JQuery; + dxPolarChart(methodName: string, ...params: any[]): any; + dxPolarChart(methodName: "instance"): DevExpress.viz.charts.dxPolarChart; +} +declare module DevExpress.viz.gauges { + export interface BaseRangeContainer { + /** Specifies a range container's background color. */ + backgroundColor?: string; + /** Specifies the offset of the range container from an invisible scale line in pixels. */ + offset?: number; + /** Sets the name of the palette or an array of colors to be used for coloring the gauge range container. */ + palette?: any; + /** An array of objects representing ranges contained in the range container. */ + ranges?: Array<{ startValue: number; endValue: number; color: string }>; + /** Specifies a color of a range. */ + color?: string; + /** Specifies an end value of a range. */ + endValue?: number; + /** Specifies a start value of a range. */ + startValue?: number; + } + export interface ScaleTick { + /** Specifies the color of the scale's minor ticks. */ + color?: string; + /** + * Specifies an array of custom minor ticks. + * @deprecated ..\customMinorTicks.md + */ + customTickValues?: Array; + /** Specifies the length of the scale's minor ticks. */ + length?: number; + /** + * Indicates whether automatically calculated minor ticks are visible or not. + * @deprecated This functionality in not more available + */ + showCalculatedTicks?: boolean; + /** + * Specifies an interval between minor ticks. + * @deprecated ..\minorTickInterval.md + */ + tickInterval?: number; + /** Indicates whether scale minor ticks are visible or not. */ + visible?: boolean; + /** Specifies the width of the scale's minor ticks. */ + width?: number; + } + export interface ScaleMajorTick extends ScaleTick { + /** + * Specifies whether or not to expand the current major tick interval if labels overlap each other. + * @deprecated ..\label\overlappingBehavior\useAutoArrangement.md + */ + useTicksAutoArrangement?: boolean; + } + export interface ScaleMinorTick extends ScaleTick { + /** Specifies the opacity of the scale's minor ticks. */ + opacity?: number; + } + export interface BaseScaleLabel { + /** Specifies whether or not scale labels should be colored similarly to their corresponding ranges in the range container. */ + useRangeColors?: boolean; + /** Specifies a callback function that returns the text to be displayed in scale labels. */ + customizeText?: (scaleValue: { value: number; valueText: string }) => string; + /** Specifies the overlap resolving options to be applied to scale labels. */ + overlappingBehavior?: { + /** Specifies whether or not to expand the current major tick interval if labels overlap each other. */ + useAutoArrangement?: boolean; + /** Specifies what label to hide in case of overlapping. */ + hideFirstOrLast?: string; + }; + /** Specifies font options for the text displayed in the scale labels of the gauge. */ + font?: viz.core.Font; + /** Specifies a format for the text displayed in scale labels. */ + format?: string; + /** Specifies a precision for the formatted value displayed in the scale labels. */ + precision?: number; + /** Specifies whether or not scale labels are visible on the gauge. */ + visible?: boolean; + } + export interface BaseScale { + /** Specifies the end value for the scale of the gauge. */ + endValue?: number; + /** + * Specifies whether or not to hide the first scale label. + * @deprecated This functionality in not more available + */ + hideFirstLabel?: boolean; + /** + * Specifies whether or not to hide the first major tick on the scale. + * @deprecated This functionality in not more available + */ + hideFirstTick?: boolean; + /** + * Specifies whether or not to hide the last scale label. + * @deprecated This functionality in not more available + */ + hideLastLabel?: boolean; + /** + * Specifies whether or not to hide the last major tick on the scale. + * @deprecated This functionality in not more available + */ + hideLastTick?: boolean; + /** Specifies an interval between major ticks. */ + tickInterval?: number; + /** Specifies an interval between minor ticks. */ + minorTickInterval?: number; + /** Specifies an array of custom major ticks. */ + customTicks?: Array; + /** Specifies an array of custom minor ticks. */ + customMinorTicks?: Array; + /** Specifies common options for scale labels. */ + label?: BaseScaleLabel; + /** + * Specifies options of the gauge's major ticks. + * @deprecated ..\tick\tick.md + */ + majorTick?: ScaleMajorTick; + /** Specifies options of the gauge's major ticks. */ + tick?: { + /** Specifies the color of the scale's major ticks. */ + color?: string; + /** Specifies the length of the scale's major ticks. */ + length?: number; + /** Indicates whether scale major ticks are visible or not. */ + visible?: boolean; + /** Specifies the width of the scale's major ticks. */ + width?: number; + /** Specifies the opacity of the scale's major ticks. */ + opacity?: number; + }; + /** Specifies options of the gauge's minor ticks. */ + minorTick?: ScaleMinorTick; + /** Specifies the start value for the scale of the gauge. */ + startValue?: number; + } + export interface BaseValueIndicator { + /** Specifies the type of subvalue indicators. */ + type?: string; + /** Specifies the background color for the indicator of the rangeBar type. */ + backgroundColor?: string; + /** Specifies the base value for the indicator of the rangeBar type. */ + baseValue?: number; + /** Specifies a color of the indicator. */ + color?: string; + /** Specifies the range bar size for an indicator of the rangeBar type. */ + size?: number; + text?: { + /** Specifies a callback function that returns the text to be displayed in an indicator. */ + customizeText?: (indicatedValue: { value: number; valueText: string }) => string; + font?: viz.core.Font; + /** Specifies a format for the text displayed in an indicator. */ + format?: string; + /** Specifies the range bar's label indent in pixels. */ + indent?: number; + /** Specifies a precision for the formatted value displayed by an indicator. */ + precision?: number; + }; + offset?: number; + length?: number; + width?: number; + /** Specifies the length of an arrow for the indicator of the textCloud type in pixels. */ + arrowLength?: number; + /** Sets the array of colors to be used for coloring subvalue indicators. */ + palette?: Array; + /** Specifies the distance between the needle and the center of a gauge for the indicator of a needle-like type. */ + indentFromCenter?: number; + /** Specifies the second color for the indicator of the twoColorNeedle type. */ + secondColor?: string; + /** Specifies the length of a twoNeedleColor type indicator tip as a percentage. */ + secondFraction?: number; + /** Specifies the spindle's diameter in pixels for the indicator of a needle-like type. */ + spindleSize?: number; + /** Specifies the inner diameter in pixels, so that the spindle has the shape of a ring. */ + spindleGapSize?: number; + /** Specifies the orientation of the rangeBar indicator on a vertically oriented dxLinearGauge widget. */ + horizontalOrientation?: string; + /** Specifies the orientation of the rangeBar indicator on a horizontally oriented dxLinearGauge widget. */ + verticalOrientation?: string; + } + export interface SharedGaugeOptions { + /** Specifies animation options. */ + animation?: viz.core.Animation; + /** Specifies the appearance of the loading indicator. */ + loadingIndicator?: viz.core.LoadingIndicator; + /** Specifies whether to redraw the widget when the size of the parent browser window changes or a mobile device rotates. */ + redrawOnResize?: boolean; + /** Specifies the size of the widget in pixels. */ + size?: viz.core.Size; + /** + * Specifies a subtitle for the widget. + * @deprecated ..\..\..\BaseGauge\1 Configuration\title\subtitle\subtitle.md + */ + subtitle?: { + /** + * Specifies font options for the subtitle. + * @deprecated ..\..\title\subtitle\font\font.md + */ + font?: viz.core.Font; + /** + * Specifies a text for the subtitle. + * @deprecated ..\title\subtitle\text.md + */ + text?: string; + }; + /** Specifies a title for a gauge. */ + title?: { + /** Specifies font options for the title. */ + font?: viz.core.Font; + /** + * Specifies a title's position on the gauge. + * @deprecated basegaugeoptions_title_verticalAlignment and basegaugeoptions_title_horizontalAlignment + */ + position?: string; + /** Specifies the distance between the title and surrounding gauge elements in pixels. */ + margin?: viz.core.Margins; + /** Specifies the height of the space reserved for the title. */ + placeholderSize?: number; + /** Specifies the gauge title's position in the vertical direction. */ + verticalAlignment?: string; + /** Specifies the gauge title's horizontal position. */ + horizontalAlignment?: string; + /** Specifies text for the title. */ + text?: string; + /** Specifies a subtitle for the widget. */ + subtitle?: { + /** Specifies font options for the subtitle. */ + font?: viz.core.Font; + /** Specifies text for the subtitle. */ + text?: string; + } + }; + /** Specifies options for gauge tooltips. */ + tooltip?: viz.core.Tooltip; + /** A handler for the tooltipShown event. */ + onTooltipShown?: (e: { + component: dxBaseGauge; + element: Element; + target: {}; + }) => void; + /** A handler for the tooltipHidden event. */ + onTooltipHidden?: (e: { + component: dxBaseGauge; + element: Element; + target: {}; + }) => void; + } + export interface BaseGaugeOptions extends viz.core.BaseWidgetOptions, SharedGaugeOptions { + /** Specifies the color of the parent page element. */ + containerBackgroundColor?: string; + /** Specifies the blank space in pixels between the widget's extreme elements and the boundaries of the area provided for the widget (see the size option). */ + margin?: viz.core.Margins; + /** Specifies options of the gauge's range container. */ + rangeContainer?: BaseRangeContainer; + /** Specifies a gauge's scale options. */ + scale?: BaseScale; + /** Specifies the appearance options of subvalue indicators. */ + subvalueIndicator?: BaseValueIndicator; + /** Specifies a set of subvalues to be designated by the subvalue indicators. */ + subvalues?: Array; + /** Specifies the main value on a gauge. */ + value?: number; + /** Specifies the appearance options of the value indicator. */ + valueIndicator?: BaseValueIndicator; + } + /** A gauge widget. */ + export class dxBaseGauge extends viz.core.BaseWidget { + /** Displays the loading indicator. */ + showLoadingIndicator(): void; + /** Conceals the loading indicator. */ + hideLoadingIndicator(): void; + /** Redraws a widget. */ + render(): void; + /** Returns the main gauge value. */ + value(): number; + /** Updates a gauge value. */ + value(value: number): void; + /** Returns an array of gauge subvalues. */ + subvalues(): Array; + /** Updates gauge subvalues. */ + subvalues(subvalues: Array): void; + } + export interface LinearRangeContainer extends BaseRangeContainer { + /** Specifies the orientation of the range container on a vertically oriented dxLinearGauge widget. */ + horizontalOrientation?: string; + /** Specifies the orientation of a range container on a horizontally oriented dxLinearGauge widget. */ + verticalOrientation?: string; + /** Specifies the width of the range container's start and end boundaries in the dxLinearGauge widget. */ + width?: any; + /** Specifies an end width of a range container. */ + end?: number; + /** Specifies a start width of a range container. */ + start?: number; + } + export interface LinearScaleLabel extends BaseScaleLabel { + /** Specifies the spacing between scale labels and ticks. */ + indentFromTick?: number; + } + export interface LinearScale extends BaseScale { + /** Specifies the orientation of scale ticks on a vertically oriented dxLinearGauge widget. */ + horizontalOrientation?: string; + label?: LinearScaleLabel; + /** Specifies the orientation of scale ticks on a horizontally oriented dxLinearGauge widget. */ + verticalOrientation?: string; + } + export interface dxLinearGaugeOptions extends BaseGaugeOptions { + /** Specifies the options required to set the geometry of the dxLinearGauge widget. */ + geometry?: { + /** Indicates whether to display the dxLinearGauge widget vertically or horizontally. */ + orientation?: string; + }; + /** Specifies gauge range container options. */ + rangeContainer?: LinearRangeContainer; + scale?: LinearScale; + } + /** A widget that represents a gauge with a linear scale. */ + export class dxLinearGauge extends dxBaseGauge { + constructor(element: JQuery, options?: dxLinearGaugeOptions); + constructor(element: Element, options?: dxLinearGaugeOptions); + } + export interface CircularRangeContainer extends BaseRangeContainer { + /** Specifies the orientation of the range container in the dxCircularGauge widget. */ + orientation?: string; + /** Specifies the range container's width in pixels. */ + width?: number; + } + export interface CircularScaleLabel extends BaseScaleLabel { + /** Specifies the spacing between scale labels and ticks. */ + indentFromTick?: number; + } + export interface CircularScale extends BaseScale { + label?: CircularScaleLabel; + /** Specifies the orientation of scale ticks. */ + orientation?: string; + } + export interface dxCircularGaugeOptions extends BaseGaugeOptions { + /** Specifies the options required to set the geometry of the dxCircularGauge widget. */ + geometry?: { + /** Specifies the end angle of the circular gauge's arc. */ + endAngle?: number; + /** Specifies the start angle of the circular gauge's arc. */ + startAngle?: number; + }; + /** Specifies gauge range container options. */ + rangeContainer?: CircularRangeContainer; + scale?: CircularScale; + } + /** A widget that represents a gauge with a circular scale. */ + export class dxCircularGauge extends dxBaseGauge { + constructor(element: JQuery, options?: dxCircularGaugeOptions); + constructor(element: Element, options?: dxCircularGaugeOptions); + } + export interface dxBarGaugeOptions extends viz.core.BaseWidgetOptions, SharedGaugeOptions { + /** Specifies a color for the remaining segment of the bar's track. */ + backgroundColor?: string; + /** Specifies a distance between bars in pixels. */ + barSpacing?: number; + /** Specifies a base value for bars. */ + baseValue?: number; + /** Specifies an end value for the gauge's invisible scale. */ + endValue?: number; + /** Defines the shape of the gauge's arc. */ + geometry?: { + /** Specifies the end angle of the bar gauge's arc. */ + endAngle?: number; + /** Specifies the start angle of the bar gauge's arc. */ + startAngle?: number; + }; + /** Specifies the options of the labels that accompany gauge bars. */ + label?: { + /** Specifies a color for the label connector text. */ + connectorColor?: string; + /** Specifies the width of the label connector in pixels. */ + connectorWidth?: number; + /** Specifies a callback function that returns a text for labels. */ + customizeText?: (barValue: { value: number; valueText: string }) => string; + /** Specifies font options for bar labels. */ + font?: viz.core.Font; + /** Specifies a format for bar labels. */ + format?: string; + /** Specifies the distance between the upper bar and bar labels in pixels. */ + indent?: number; + /** Specifies a precision for the formatted value displayed by labels. */ + precision?: number; + /** Specifies whether bar labels appear on a gauge or not. */ + visible?: boolean; + }; + /** Sets the name of the palette or an array of colors to be used for coloring the gauge range container. */ + palette?: string; + /** Defines the radius of the bar that is closest to the center relatively to the radius of the topmost bar. */ + relativeInnerRadius?: number; + /** Specifies a start value for the gauge's invisible scale. */ + startValue?: number; + /** Specifies the array of values to be indicated on a bar gauge. */ + values?: Array; + } + /** A circular bar widget. */ + export class dxBarGauge extends viz.core.BaseWidget { + constructor(element: JQuery, options?: dxBarGaugeOptions); + constructor(element: Element, options?: dxBarGaugeOptions); + /** Displays the loading indicator. */ + showLoadingIndicator(): void; + /** Conceals the loading indicator. */ + hideLoadingIndicator(): void; + /** Redraws the widget. */ + render(): void; + /** Returns an array of gauge values. */ + values(): Array; + /** Updates the values displayed by a gauge. */ + values(values: Array): void; + } +} +interface JQuery { + dxLinearGauge(options?: DevExpress.viz.gauges.dxLinearGaugeOptions): JQuery; + dxLinearGauge(methodName: string, ...params: any[]): any; + dxLinearGauge(methodName: "instance"): DevExpress.viz.gauges.dxLinearGauge; + dxCircularGauge(options?: DevExpress.viz.gauges.dxCircularGaugeOptions): JQuery; + dxCircularGauge(methodName: string, ...params: any[]): any; + dxCircularGauge(methodName: "instance"): DevExpress.viz.gauges.dxCircularGauge; + dxBarGauge(options?: DevExpress.viz.gauges.dxBarGaugeOptions): JQuery; + dxBarGauge(methodName: string, ...params: any[]): any; + dxBarGauge(methodName: "instance"): DevExpress.viz.gauges.dxBarGauge; +} +declare module DevExpress.viz.rangeSelector { + export interface dxRangeSelectorOptions extends viz.core.BaseWidgetOptions { + /** Specifies the options for the range selector's background. */ + background?: { + /** Specifies the background color for the dxRangeSelector. */ + color?: string; + /** Specifies image options. */ + image?: { + /** Specifies a location for the image in the background of a range selector. */ + location?: string; + /** Specifies the image's URL. */ + url?: string; + }; + /** Indicates whether or not the background (background color and/or image) is visible. */ + visible?: boolean; + }; + /** Specifies a title for the range selector. */ + title?: viz.core.Title; + /** Specifies the dxRangeSelector's behavior options. */ + behavior?: { + /** Indicates whether or not you can swap sliders. */ + allowSlidersSwap?: boolean; + /** Indicates whether or not animation is enabled. */ + animationEnabled?: boolean; + /** Specifies when to call the onSelectedRangeChanged function. */ + callSelectedRangeChanged?: string; + /** Indicates whether or not an end user can specify the range using a mouse, without the use of sliders. */ + manualRangeSelectionEnabled?: boolean; + /** Indicates whether or not an end user can shift the selected range to the required location on a scale by clicking. */ + moveSelectedRangeByClick?: boolean; + /** Indicates whether to snap a slider to ticks. */ + snapToTicks?: boolean; + }; + /** Specifies the options required to display a chart as the range selector's background. */ + chart?: { + /** Specifies a coefficient for determining an indent from the bottom background boundary to the lowest chart point. */ + bottomIndent?: number; + /** An object defining the common configuration options for the chart’s series. */ + commonSeriesSettings?: viz.charts.CommonSeriesSettings; + /** An object providing options for managing data from a data source. */ + dataPrepareSettings?: { + /** Specifies whether or not to validate values from a data source. */ + checkTypeForAllData?: boolean; + /** Specifies whether or not to convert the values from a data source into the data type of an axis. */ + convertToAxisDataType?: boolean; + /** Specifies how to sort series points. */ + sortingMethod?: any; + }; + /** Specifies whether all bars in a series must have the same width, or may have different widths if any points in other series are missing. */ + equalBarWidth?: boolean; + /** Specifies a common bar width as a percentage from 0 to 1. */ + barWidth?: number; + /** Sets the name of the palette to be used in the range selector's chart. Alternatively, an array of colors can be set as a custom palette to be used within this chart. */ + palette?: any; + /** An object defining the chart’s series. */ + series?: Array; + /** Defines options for the series template. */ + seriesTemplate?: viz.charts.SeriesTemplate; + /** Specifies a coefficient for determining an indent from the background's top boundary to the topmost chart point. */ + topIndent?: number; + /** Specifies whether or not to filter the series points depending on their quantity. */ + useAggregation?: boolean; + /** Specifies options for the chart's value axis. */ + valueAxis?: { + /** Indicates whether or not the chart's value axis must be inverted. */ + inverted?: boolean; + /** Specifies the value to be raised to a power when generating ticks for a logarithmic value axis. */ + logarithmBase?: number; + /** Specifies the maximum value of the chart's value axis. */ + max?: number; + /** Specifies the minimum value of the chart's value axis. */ + min?: number; + /** Specifies the type of the value axis. */ + type?: string; + /** Specifies the desired type of axis values. */ + valueType?: string; + }; + }; + /** Specifies the color of the parent page element. */ + containerBackgroundColor?: string; + /** Specifies a data source for the scale values and for the chart at the background. */ + dataSource?: any; + /** Specifies the data source field that provides data for the scale. */ + dataSourceField?: string; + /** Specifies the appearance of the loading indicator. */ + loadingIndicator?: viz.core.LoadingIndicator; + /** Specifies the blank space in pixels between the dxRangeSelector widget's extreme elements and the boundaries of the area provided for the widget (see size). */ + margin?: viz.core.Margins; + /** Specifies whether to redraw the widget when the size of the parent browser window changes or a mobile device rotates. */ + redrawOnResize?: boolean; + /** Specifies options of the range selector's scale. */ + scale?: { + /** Specifies the scale's end value. */ + endValue?: any; + /** Specifies common options for scale labels. */ + label?: { + /** Specifies a callback function that returns the text to be displayed in scale labels. */ + customizeText?: (scaleValue: { value: any; valueText: string; }) => string; + /** Specifies font options for the text displayed in the range selector's scale labels. */ + font?: viz.core.Font; + /** Specifies a format for the text displayed in scale labels. */ + format?: string; + /** Specifies a precision for the formatted value displayed in the scale labels. */ + precision?: number; + /** Specifies a spacing between scale labels and the background bottom edge. */ + topIndent?: number; + /** Specifies whether or not the scale's labels are visible. */ + visible?: boolean; + }; + /** Specifies the value to be raised to a power when generating ticks for a logarithmic scale. */ + logarithmBase?: number; + /** Specifies an interval between major ticks. */ + majorTickInterval?: any; + /** Specifies options for the date-time scale's markers. */ + marker?: { + /** Defines the options that can be set for the text that is displayed by the scale markers. */ + label?: { + /** Specifies a callback function that returns the text to be displayed in scale markers. */ + customizeText?: (markerValue: { value: any; valueText: string }) => string; + /** Specifies a format for the text displayed in scale markers. */ + format?: string; + }; + /** Specifies the height of the marker's separator. */ + separatorHeight?: number; + /** Specifies the space between the marker label and the marker separator. */ + textLeftIndent?: number; + /** Specifies the space between the marker's label and the top edge of the marker's separator. */ + textTopIndent?: number; + /** Specified the indent between the marker and the scale lables. */ + topIndent?: number; + /** Indicates whether scale markers are visible. */ + visible?: boolean; + }; + /** Specifies the maximum range that can be selected. */ + maxRange?: any; + /** Specifies the number of minor ticks between neighboring major ticks. */ + minorTickCount?: number; + /** Specifies an interval between minor ticks. */ + minorTickInterval?: any; + /** Specifies the minimum range that can be selected. */ + minRange?: any; + /** Specifies the height of the space reserved for the scale in pixels. */ + placeholderHeight?: number; + /** Indicates whether or not to set ticks of a date-time scale at the beginning of each date-time interval. */ + setTicksAtUnitBeginning?: boolean; + /** Specifies whether or not to show ticks for the boundary scale values, when neither major ticks nor minor ticks are created for these values. */ + showCustomBoundaryTicks?: boolean; + /** Indicates whether or not to show minor ticks on the scale. */ + showMinorTicks?: boolean; + /** Specifies the scale's start value. */ + startValue?: any; + /** Specifies options defining the appearance of scale ticks. */ + tick?: { + /** Specifies the color of scale ticks (both major and minor ticks). */ + color?: string; + /** Specifies the opacity of scale ticks (both major and minor ticks). */ + opacity?: number; + /** Specifies the width of the scale's ticks (both major and minor ticks). */ + width?: number; + }; + /** Specifies the type of the scale. */ + type?: string; + /** Specifies whether or not to expand the current tick interval if labels overlap each other. */ + useTicksAutoArrangement?: boolean; + /** Specifies the type of values on the scale. */ + valueType?: string; + /** Specifies the order of arguments on a discrete scale. */ + categories?: Array; + }; + /** Specifies the range to be selected when displaying the dxRangeSelector. */ + selectedRange?: { + /** Specifies the start value of the range to be selected when displaying the dxRangeSelector widget on a page. */ + startValue?: any; + /** Specifies the end value of the range to be selected when displaying the dxRangeSelector widget on a page. */ + endValue?: any; + }; + /** Specifies the color of the selected range. */ + selectedRangeColor?: string; + /** Range selector's indent options. */ + indent?: { + /** Specifies range selector's left indent. */ + left?: number; + /** Specifies range selector's right indent. */ + right?: number; + }; + /** A handler for the selectedRangeChanged event. */ + onSelectedRangeChanged?: (e: { + startValue: any; + endValue: any; + component: dxRangeSelector; + element: Element; + }) => void; + /** Specifies range selector shutter options. */ + shutter?: { + /** Specifies shutter color. */ + color?: string; + /** Specifies the opacity of the color of shutters. */ + opacity?: number; + }; + /** Specifies in pixels the size of the dxRangeSelector widget. */ + size?: viz.core.Size; + /** Specifies the appearance of the range selector's slider handles. */ + sliderHandle?: { + /** Specifies the color of the slider handles. */ + color?: string; + /** Specifies the opacity of the slider handles. */ + opacity?: number; + /** Specifies the width of the slider handles. */ + width?: number; + }; + /** Defines the options of the range selector slider markers. */ + sliderMarker?: { + /** Specifies the color of the slider markers. */ + color?: string; + /** Specifies a callback function that returns the text to be displayed by slider markers. */ + customizeText?: (scaleValue: { value: any; valueText: any; }) => string; + /** Specifies font options for the text displayed by the range selector slider markers. */ + font?: viz.core.Font; + /** Specifies a format for the text displayed in slider markers. */ + format?: string; + /** Specifies the color used for the slider marker text when the currently selected range does not match the minRange and maxRange values. */ + invalidRangeColor?: string; + /** + * Specifies the empty space between the marker's border and the marker’s text. + * @deprecated Use the 'paddingTopBottom' and 'paddingLeftRight' options instead + */ + padding?: number; + /** Specifies the empty space between the marker's top and bottom borders and the marker's text. */ + paddingTopBottom?: number; + /** Specifies the empty space between the marker's left and right borders and the marker's text. */ + paddingLeftRight?: number; + /** Specifies the placeholder height of the slider marker. */ + placeholderHeight?: number; + /** + * Specifies in pixels the height and width of the space reserved for the range selector slider markers. + * @deprecated Use the 'placeholderHeight' and 'indent' options instead + */ + placeholderSize?: { + /** Specifies the height of the placeholder for the left and right slider markers. */ + height?: number; + /** Specifies the width of the placeholder for the left and right slider markers. */ + width?: { + /** Specifies the width of the left slider marker's placeholder. */ + left?: number; + /** Specifies the width of the right slider marker's placeholder. */ + right?: number; + }; + }; + /** Specifies a precision for the formatted value displayed in slider markers. */ + precision?: number; + /** Indicates whether or not the slider markers are visible. */ + visible?: boolean; + }; + } + /** A widget that allows end users to select a range of values on a scale. */ + export class dxRangeSelector extends viz.core.BaseWidget { + constructor(element: JQuery, options?: dxRangeSelectorOptions); + constructor(element: Element, options?: dxRangeSelectorOptions); + /** Displays the loading indicator. */ + showLoadingIndicator(): void; + /** Conceals the loading indicator. */ + hideLoadingIndicator(): void; + /** Redraws a widget. */ + render(skipChartAnimation?: boolean): void; + /** Returns the currently selected range. */ + getSelectedRange(): { startValue: any; endValue: any; }; + /** Sets a specified range. */ + setSelectedRange(selectedRange: { startValue: any; endValue: any; }): void; + } +} +interface JQuery { + dxRangeSelector(options?: DevExpress.viz.rangeSelector.dxRangeSelectorOptions): JQuery; + dxRangeSelector(methodName: string, ...params: any[]): any; + dxRangeSelector(methodName: "instance"): DevExpress.viz.rangeSelector.dxRangeSelector; +} +declare module DevExpress.viz.map { + /** This section describes the fields and methods that can be used in code to manipulate the Layer object. */ + export interface MapLayer { + /** The name of the layer. */ + name: string; + /** The layer index in the layers array. */ + index: number; + /** The layer type. Can be "area", "line" or "marker". */ + type: string; + /** The type of the layer elements. */ + elementType: string; + /** Gets all layer elements. */ + getElements(): Array; + /** Deselects all layer elements. */ + clearSelection(): void; + } + /** This section describes the fields and methods that can be used in code to manipulate the Layer Element object. */ + export interface MapLayerElement { + /** The parent layer of the layer element. */ + layer: MapLayer; + /** Gets the layer element coordinates. */ + coordinates(): Object; + /** Sets the value of an attribute. */ + attribute(name: string, value: any): void; + /** Gets the value of an attribute. */ + attribute(name: string): any; + /** Gets the selection state of the layer element. */ + selected(): boolean; + /** Sets the selection state of the layer element. */ + selected(state: boolean): void; + /** Applies the layer element settings and updates the element appearance. */ + applySettings(settings: any): void; + } + /** + * This section describes the fields and methods that can be used in code to manipulate the Area object. + * @deprecated Use the "Layer Element" instead + */ + export interface Area { + /** + * Contains the element type. + * @deprecated ..\..\Layer\2 Fields\type.md + */ + type: string; + /** + * Return the value of an attribute. + * @deprecated ..\..\Layer Element\3 Methods\attribute(name_value).md + */ + attribute(name: string): any; + /** + * Provides information about the selection state of an area. + * @deprecated Use the "selected()" method of the Layer Element + */ + selected(): boolean; + /** + * Sets a new selection state for an area. + * @deprecated Use the "selected(state)" method of the Layer Element + */ + selected(state: boolean): void; + /** + * Applies the area settings specified as a parameter and updates the area appearance. + * @deprecated ..\..\Layer Element\3 Methods\applySettings(settings).md + */ + applySettings(settings: any): void; + } + /** + * This section describes the fields and methods that can be used in code to manipulate the Markers object. + * @deprecated Use the "Layer Element" instead + */ + export interface Marker { + /** + * Contains the descriptive text accompanying the map marker. + * @deprecated Get the text with the "attribute" method (using the "layers.label.dataField" value) + */ + text: string; + /** + * Contains the type of the element. + * @deprecated ..\..\Layer\2 Fields\type.md + */ + type: string; + /** + * Contains the URL of an image map marker. + * @deprecated Get the url with the "attribute" method (using the "layers.dataField" value) + */ + url: string; + /** + * Contains the value of a bubble map marker. + * @deprecated Get the value with the "attribute" method (using the "layers.dataField" value) + */ + value: number; + /** + * Contains the values of a pie map marker. + * @deprecated Get the values with the "attribute" method (using the "layers.dataField" value) + */ + values: Array; + /** + * Returns the value of an attribute. + * @deprecated ..\..\Layer Element\3 Methods\attribute(name_value).md + */ + attribute(name: string): any; + /** + * Returns the coordinates of a specific marker. + * @deprecated ..\..\Layer Element\3 Methods\coordinates().md + */ + coordinates(): Array; + /** + * Provides information about the selection state of a marker. + * @deprecated Use the "selected()" method of the Layer Element + */ + selected(): boolean; + /** + * Sets a new selection state for a marker. + * @deprecated Use the "selected(state)" method of the Layer Element + */ + selected(state: boolean): void; + /** + * Applies the marker settings specified as a parameter and updates marker appearance. + * @deprecated ..\..\Layer Element\3 Methods\applySettings(settings).md + */ + applySettings(settings: any): void; + } + export interface MapLayerSettings { + /** Specifies the layer name. */ + name?: string; + /** Specifies layer type. */ + type?: string; + /** Specifies the type of a marker element. Setting this option makes sense only if the layer type is "marker". */ + elementType?: string; + /** Specifies a data source for the layer element. */ + data?: any; + /** Specifies the width of the layer elements border in pixels. */ + borderWidth?: number; + /** Specifies a color for the border of the layer elements. */ + borderColor?: string; + /** Specifies a color for layer elements. */ + color?: string; + /** Specifies a color for the border of the layer element when it is hovered over. */ + hoveredBorderColor?: string; + /** Specifies the pixel-measured width for the border of the layer element when it is hovered over. */ + hoveredBorderWidth?: number; + /** Specifies a color for a layer element when it is hovered over. */ + hoveredColor?: string; + /** Specifies a pixel-measured width for the border of the layer element when it is selected. */ + selectedBorderWidth?: number; + /** Specifies a color for the border of the layer element when it is selected. */ + selectedBorderColor?: string; + /** Specifies a color for the layer element when it is selected. */ + selectedColor?: string; + /** Specifies the layer opacity (from 0 to 1). */ + opacity?: number; + /** Specifies the size of markers. Setting this option makes sense only if the layer type is "marker" and the elementType is "dot", "pie" or "image". */ + size?: number; + /** Specifies the pixel-measured diameter of the marker that represents the smallest value. Setting this option makes sense only if the layer type is "marker". */ + minSize?: number; + /** Specifies the pixel-measured diameter of the marker that represents the biggest value. Setting this option makes sense only if the layer type is "marker". */ + maxSize?: number; + /** Specifies whether or not to change the appearance of a layer element when it is hovered over. */ + hoverEnabled?: boolean; + /** Specifies whether single or multiple map elements can be selected on a vector map. */ + selectionMode?: string; + /** Specifies the name of the palette or a custom range of colors to be used for coloring a layer. */ + palette?: any; + /** Specifies the number of colors in a palette. */ + paletteSize?: number; + /** Allows you to paint layer elements with similar attributes in the same color. */ + colorGroups?: Array; + /** Specifies the field that provides data to be used for coloring of layer elements. */ + colorGroupingField?: string; + /** Allows you to display bubbles with similar attributes in the same size. Setting this option makes sense only if the layer type is "marker" and the elementType is "bubble". */ + sizeGroups?: Array; + /** Specifies the field that provides data to be used for sizing bubble markers. Setting this option makes sense only if the layer type is "marker" and the elementType is "bubble". */ + sizeGroupingField?: string; + /** Specifies the name of the attribute containing marker data. Setting this option makes sense only if the layer type is "marker" and the elementType is "bubble", "pie" or "image". */ + dataField?: string; + /** Specifies the function that customizes each layer element individually. */ + customize?: (eleemnts: Array) => void; + /** Specifies marker label options. */ + label?: { + /** The name of the data attribute containing marker texts. */ + dataField?: string; + /** Enables marker labels. */ + enabled?: boolean; + /** Specifies font options for marker labels. */ + font?: viz.core.Font; + }; + } + export interface AreaSettings { + /** + * Specifies the width of the area border in pixels. + * @deprecated ..\layers\borderWidth.md + */ + borderWidth?: number; + /** + * Specifies a color for the area border. + * @deprecated ..\layers\borderColor.md + */ + borderColor?: string; + /** + * Specifies a color for an area. + * @deprecated ..\layers\color.md + */ + color?: string; + /** + * Specifies the function that customizes each area individually. + * @deprecated ..\layers\customize.md + */ + customize?: (areaInfo: Area) => AreaSettings; + /** + * Specifies a color for the area border when the area is hovered over. + * @deprecated ..\layers\hoveredBorderColor.md + */ + hoveredBorderColor?: string; + /** + * Specifies the pixel-measured width of the area border when the area is hovered over. + * @deprecated ..\layers\hoveredBorderWidth.md + */ + hoveredBorderWidth?: number; + /** + * Specifies a color for an area when this area is hovered over. + * @deprecated ..\layers\hoveredColor.md + */ + hoveredColor?: string; + /** + * Specifies whether or not to change the appearance of an area when it is hovered over. + * @deprecated ..\layers\hoverEnabled.md + */ + hoverEnabled?: boolean; + /** + * Configures area labels. + * @deprecated ..\..\layers\label\label.md + */ + label?: { + /** + * Specifies the data field that provides data for area labels. + * @deprecated ..\..\layers\label\dataField.md + */ + dataField?: string; + /** + * Enables area labels. + * @deprecated ..\..\layers\label\enabled.md + */ + enabled?: boolean; + /** + * Specifies font options for area labels. + * @deprecated ..\..\..\layers\label\font\font.md + */ + font?: viz.core.Font; + }; + /** + * Specifies the name of the palette or a custom range of colors to be used for coloring a map. + * @deprecated ..\layers\palette.md + */ + palette?: any; + /** + * Specifies the number of colors in a palette. + * @deprecated ..\layers\paletteSize.md + */ + paletteSize?: number; + /** + * Allows you to paint areas with similar attributes in the same color. + * @deprecated ..\layers\colorGroups.md + */ + colorGroups?: Array; + /** + * Specifies the field that provides data to be used for coloring areas. + * @deprecated ..\layers\colorGroupingField.md + */ + colorGroupingField?: string; + /** + * Specifies a color for the area border when the area is selected. + * @deprecated ..\layers\selectedBorderColor.md + */ + selectedBorderColor?: string; + /** + * Specifies a color for an area when this area is selected. + * @deprecated ..\layers\selectedColor.md + */ + selectedColor?: string; + /** + * Specifies the pixel-measured width of the area border when the area is selected. + * @deprecated ..\layers\selectedBorderWidth.md + */ + selectedBorderWidth?: number; + /** + * Specifies whether single or multiple areas can be selected on a vector map. + * @deprecated ..\layers\selectionMode.md + */ + selectionMode?: string; + } + export interface MarkerSettings { + /** + * Specifies a color for the marker border. + * @deprecated ..\layers\borderColor.md + */ + borderColor?: string; + /** + * Specifies the width of the marker border in pixels. + * @deprecated ..\layers\borderWidth.md + */ + borderWidth?: number; + /** + * Specifies a color for a marker of the dot or bubble type. + * @deprecated ..\layers\color.md + */ + color?: string; + /** + * Specifies the function that customizes each marker individually. + * @deprecated ..\layers\customize.md + */ + customize?: (markerInfo: Marker) => MarkerSettings; + /** + * Specifies the pixel-measured width of the marker border when the marker is hovered over. + * @deprecated ..\layers\hoveredBorderWidth.md + */ + hoveredBorderWidth?: number; + /** + * Specifies a color for the marker border when the marker is hovered over. + * @deprecated ..\layers\hoveredBorderColor.md + */ + hoveredBorderColor?: string; + /** + * Specifies a color for a marker of the dot or bubble type when this marker is hovered over. + * @deprecated ..\layers\hoveredColor.md + */ + hoveredColor?: string; + /** + * Specifies whether or not to change the appearance of a marker when it is hovered over. + * @deprecated ..\layers\hoverEnabled.md + */ + hoverEnabled?: boolean; + /** + * Specifies marker label options. + * @deprecated ..\..\layers\label\label.md + */ + label?: { + /** + * Enables marker labels. + * @deprecated ..\..\layers\label\enabled.md + */ + enabled?: boolean; + /** + * Specifies font options for marker labels. + * @deprecated ..\..\..\layers\label\font\font.md + */ + font?: viz.core.Font; + }; + /** + * Specifies the pixel-measured diameter of the marker that represents the biggest value. Setting this option makes sense only if you use markers of the bubble type. + * @deprecated ..\layers\maxSize.md + */ + maxSize?: number; + /** + * Specifies the pixel-measured diameter of the marker that represents the smallest value. Setting this option makes sense only if you use markers of the bubble type. + * @deprecated ..\layers\minSize.md + */ + minSize?: number; + /** + * Specifies the opacity of markers. Setting this option makes sense only if you use markers of the bubble type. + * @deprecated ..\layers\opacity.md + */ + opacity?: number; + /** + * Specifies the pixel-measured width of the marker border when the marker is selected. + * @deprecated ..\layers\selectedBorderWidth.md + */ + selectedBorderWidth?: number; + /** + * Specifies a color for the marker border when the marker is selected. + * @deprecated ..\layers\selectedBorderColor.md + */ + selectedBorderColor?: string; + /** + * Specifies a color for a marker of the dot or bubble type when this marker is selected. + * @deprecated ..\layers\selectedColor.md + */ + selectedColor?: string; + /** + * Specifies whether a single or multiple markers can be selected on a vector map. + * @deprecated ..\layers\selectionMode.md + */ + selectionMode?: string; + /** + * Specifies the size of markers. Setting this option makes sense for any type of marker except bubble. + * @deprecated ..\layers\size.md + */ + size?: number; + /** + * Specifies the type of markers to be used on the map. + * @deprecated ..\layers\elementType.md + */ + type?: string; + /** + * Specifies the name of a palette or a custom set of colors to be used for coloring markers of the pie type. + * @deprecated ..\layers\palette.md + */ + palette?: any; + /** + * Allows you to paint markers with similar attributes in the same color. + * @deprecated ..\layers\colorGroups.md + */ + colorGroups?: Array; + /** + * Specifies the field that provides data to be used for coloring markers. + * @deprecated ..\layers\colorGroupingField.md + */ + colorGroupingField?: string; + /** + * Allows you to display bubbles with similar attributes in the same size. + * @deprecated ..\layers\sizeGroups.md + */ + sizeGroups?: Array; + /** + * Specifies the field that provides data to be used for sizing bubble markers. + * @deprecated ..\layers\sizeGroupingField.md + */ + sizeGroupingField?: string; + } + export interface dxVectorMapOptions extends viz.core.BaseWidgetOptions { + /** + * An object specifying options for the map areas. + * @deprecated Use the 'layers' option instead + */ + areaSettings?: AreaSettings; + /** Specifies the options for the map background. */ + background?: { + /** Specifies a color for the background border. */ + borderColor?: string; + /** Specifies a color for the background. */ + color?: string; + }; + /** Specifies options for dxVectorMap widget layers. */ + layers?: Array; + /** Specifies the map projection. */ + projection?: Object; + /** Specifies the positioning of a map in geographical coordinates. */ + bounds?: Array; + /** Specifies the options of the control bar. */ + controlBar?: { + /** Specifies a color for the outline of the control bar elements. */ + borderColor?: string; + /** Specifies a color for the inner area of the control bar elements. */ + color?: string; + /** Specifies whether or not to display the control bar. */ + enabled?: boolean; + /** Specifies the margin of the control bar in pixels. */ + margin?: number; + /** Specifies the position of the control bar. */ + horizontalAlignment?: string; + /** Specifies the position of the control bar. */ + verticalAlignment?: string; + /** Specifies the opacity of the Control_Bar. */ + opacity?: number; + }; + /** Specifies the appearance of the loading indicator. */ + loadingIndicator?: viz.core.LoadingIndicator; + /** + * Specifies a data source for the map area. + * @deprecated Use the 'layers.data' option instead + */ + mapData?: any; + /** + * Specifies a data source for the map markers. + * @deprecated Use the 'layers.data' option instead + */ + markers?: any; + /** + * An object specifying options for the map markers. + * @deprecated Use the 'layers' option instead + */ + markerSettings?: MarkerSettings; + /** Specifies the size of the dxVectorMap widget. */ + size?: viz.core.Size; + /** Specifies a title for the vector map. */ + title?: viz.core.Title; + /** Specifies tooltip options. */ + tooltip?: viz.core.Tooltip; + /** Configures map legends. */ + legends?: Array; + /** Specifies whether or not the map should respond when a user rolls the mouse wheel. */ + wheelEnabled?: boolean; + /** Specifies whether the map should respond to touch gestures. */ + touchEnabled?: boolean; + /** Disables the zooming capability. */ + zoomingEnabled?: boolean; + /** Specifies the geographical coordinates of the center for a map. */ + center?: Array; + /** A handler for the centerChanged event. */ + onCenterChanged?: (e: { + center: Array; + component: dxVectorMap; + element: Element; + }) => void; + /** A handler for the tooltipShown event. */ + onTooltipShown?: (e: { + component: dxVectorMap; + element: Element; + target: {}; + }) => void; + /** A handler for the tooltipHidden event. */ + onTooltipHidden?: (e: { + component: dxVectorMap; + element: Element; + target: {}; + }) => void; + /** Specifies a number that is used to zoom a map initially. */ + zoomFactor?: number; + /** Specifies a map's maximum zoom factor. */ + maxZoomFactor?: number; + /** A handler for the zoomFactorChanged event. */ + onZoomFactorChanged?: (e: { + component: dxVectorMap; + element: Element; + zoomFactor: number; + }) => void; + /** A handler for the click event. */ + onClick?: any; + /** A handler for the selectionChanged event. */ + onSelectionChanged?: (e: { + component: dxVectorMap; + element: Element; + target: MapLayerElement; + }) => void; + /** + * A handler for the areaClick event. + * @deprecated Use the 'onClick' option instead + */ + onAreaClick?: any; + /** + * A handler for the areaSelectionChanged event. + * @deprecated Use the 'onSelectionChanged' option instead + */ + onAreaSelectionChanged?: (e: { + target: Area; + component: dxVectorMap; + element: Element; + }) => void; + /** + * A handler for the markerClick event. + * @deprecated Use the 'onClick' option instead + */ + onMarkerClick?: any; + /** + * A handler for the markerSelectionChanged event. + * @deprecated Use the 'onSelecitonChanged' option instead + */ + onMarkerSelectionChanged?: (e: { + target: Marker; + component: dxVectorMap; + element: Element; + }) => void; + /** Disables the panning capability. */ + panningEnabled?: boolean; + } + export interface Legend extends viz.core.BaseLegend { + /** Specifies the color of item markers in the legend. The specified color applied only when the legend uses 'size' source. */ + markerColor?: string; + /** Specifies text for legend items. */ + customizeText?: (itemInfo: { start: number; end: number; index: number; color: string; size: number; }) => string; + /** Specifies text for a hint that appears when a user hovers the mouse pointer over the text of a legend item. */ + customizeHint?: (itemInfo: { start: number; end: number; index: number; color: string; size: number }) => string; + /** Specifies the source of data for the legend. */ + source?: { + /** Specifies a layer to which the legend belongs. */ + layer?: string; + /** Specifies the type of the legend grouping. */ + grouping?: string; + } + } + /** A vector map widget. */ + export class dxVectorMap extends viz.core.BaseWidget { + constructor(element: JQuery, options?: dxVectorMapOptions); + constructor(element: Element, options?: dxVectorMapOptions); + /** Displays the loading indicator. */ + showLoadingIndicator(): void; + /** Conceals the loading indicator. */ + hideLoadingIndicator(): void; + /** Redraws a widget. */ + render(): void; + /** Gets the current coordinates of the map center. */ + center(): Array; + /** Sets the coordinates of the map center. */ + center(centerCoordinates: Array): void; + /** + * Deselects all the selected areas on a map. The areas are displayed in their initial style after. + * @deprecated Use the 'clearSelection' method on a layer instead + */ + clearAreaSelection(): void; + /** + * Deselects all the selected markers on a map. The markers are displayed in their initial style after. + * @deprecated Use the 'clearSelection' method on a layer instead + */ + clearMarkerSelection(): void; + /** Deselects all the selected area and markers on a map at once. The areas and markers are displayed in their initial style after. */ + clearSelection(): void; + /** Converts client area coordinates into map coordinates. */ + convertCoordinates(x: number, y: number): Array; + /** Gets all map layers. */ + getLayers(): Array; + /** Gets the layer by its index. */ + getLayerByIndex(index: number): MapLayer; + /** Gets the layer by its name. */ + getLayerByName(name: string): MapLayer; + /** + * Returns an array with all the map areas. + * @deprecated Use the 'getElements' method on a layer instead + */ + getAreas(): Array; + /** + * Returns an array with all the map markers. + * @deprecated Use the 'getElements' method on a layer instead + */ + getMarkers(): Array; + /** Gets the current coordinates of the map viewport. */ + viewport(): Array; + /** Sets the coordinates of the map viewport. */ + viewport(viewportCoordinates: Array): void; + /** Gets the current value of the map zoom factor. */ + zoomFactor(): number; + /** Sets the value of the map zoom factor. */ + zoomFactor(zoomFactor: number): void; + } + export var projection: ProjectionCreator; + export interface ProjectionCreator { + /** Creates a new projection. */ + (data: { + to?: (coordinates: Array) => Array; + from?: (coordinates: Array) => Array; + aspectRatio?: number; + }): Object; + /** Gets the default or custom projection from the projection storage. */ + get(name: string): Object; + /** Adds a new projection to the internal projections storage. */ + add(name: string, projection: Object): void; + } +} +interface JQuery { + dxVectorMap(options?: DevExpress.viz.map.dxVectorMapOptions): JQuery; + dxVectorMap(methodName: string, ...params: any[]): any; + dxVectorMap(methodName: "instance"): DevExpress.viz.map.dxVectorMap; +} +declare module DevExpress.viz.sparklines { + export interface SparklineTooltip extends viz.core.Tooltip { + /** + * Specifies how a tooltip is horizontally aligned relative to the graph. + * @deprecated Tooltip alignment is no more available. + */ + horizontalAlignment?: string; + /** + * Specifies how a tooltip is vertically aligned relative to the graph. + * @deprecated Tooltip alignment is no more available. + */ + verticalAlignment?: string; + } + export interface BaseSparklineOptions extends viz.core.BaseWidgetOptions { + /** Specifies the blank space between the widget's extreme elements and the boundaries of the area provided for the widget in pixels. */ + margin?: viz.core.Margins; + /** Specifies the size of the widget. */ + size?: viz.core.Size; + /** Specifies tooltip options. */ + tooltip?: SparklineTooltip; + /** A handler for the tooltipShown event. */ + onTooltipShown?: (e: { + component: BaseSparkline; + element: Element; + }) => void; + /** A handler for the tooltipHidden event. */ + onTooltipHidden?: (e: { + component: BaseSparkline; + element: Element; + }) => void; + } + /** Overridden by descriptions for particular widgets. */ + export class BaseSparkline extends viz.core.BaseWidget { + /** Redraws a widget. */ + render(): void; + } + export interface dxBulletOptions extends BaseSparkline { + /** Specifies a color for the bullet bar. */ + color?: string; + /** Specifies an end value for the invisible scale. */ + endScaleValue?: number; + /** Specifies whether or not to show the target line. */ + showTarget?: boolean; + /** Specifies whether or not to show the line indicating zero on the invisible scale. */ + showZeroLevel?: boolean; + /** Specifies a start value for the invisible scale. */ + startScaleValue?: number; + /** Specifies the value indicated by the target line. */ + target?: number; + /** Specifies a color for both the target and zero level lines. */ + targetColor?: string; + /** Specifies the width of the target line. */ + targetWidth?: number; + /** Specifies the primary value indicated by the bullet bar. */ + value?: number; + } + /** A bullet graph widget. */ + export class dxBullet extends BaseSparkline { + constructor(element: JQuery, options?: dxBulletOptions); + constructor(element: Element, options?: dxBulletOptions); + } + export interface dxSparklineOptions extends BaseSparklineOptions { + /** Specifies the data source field that provides arguments for a sparkline. */ + argumentField?: string; + /** Sets a color for the bars indicating negative values. Available for a sparkline of the bar type only. */ + barNegativeColor?: string; + /** Sets a color for the bars indicating positive values. Available for a sparkline of the bar type only. */ + barPositiveColor?: string; + /** Specifies a data source for the sparkline. */ + dataSource?: Array; + /** Sets a color for the boundary of both the first and last points on a sparkline. */ + firstLastColor?: string; + /** Specifies whether a sparkline ignores null data points or not. */ + ignoreEmptyPoints?: boolean; + /** Sets a color for a line on a sparkline. Available for the sparklines of the line- and area-like types. */ + lineColor?: string; + /** Specifies a width for a line on a sparkline. Available for the sparklines of the line- and area-like types. */ + lineWidth?: number; + /** Sets a color for the bars indicating the values that are less than the winloss threshold. Available for a sparkline of the winloss type only. */ + lossColor?: string; + /** Sets a color for the boundary of the maximum point on a sparkline. */ + maxColor?: string; + /** Sets a color for the boundary of the minimum point on a sparkline. */ + minColor?: string; + /** Sets a color for points on a sparkline. Available for the sparklines of the line- and area-like types. */ + pointColor?: string; + /** Specifies the diameter of sparkline points in pixels. Available for the sparklines of line- and area-like types. */ + pointSize?: number; + /** Specifies a symbol to use as a point marker on a sparkline. Available for the sparklines of the line- and area-like types. */ + pointSymbol?: string; + /** Specifies whether or not to indicate both the first and last values on a sparkline. */ + showFirstLast?: boolean; + /** Specifies whether or not to indicate both the minimum and maximum values on a sparkline. */ + showMinMax?: boolean; + /** Determines the type of a sparkline. */ + type?: string; + /** Specifies the data source field that provides values for a sparkline. */ + valueField?: string; + /** Sets a color for the bars indicating the values greater than a winloss threshold. Available for a sparkline of the winloss type only. */ + winColor?: string; + /** Specifies a value that serves as a threshold for the sparkline of the winloss type. */ + winlossThreshold?: number; + /** Specifies the minimum value of the sparkline value axis. */ + minValue?: number; + /** Specifies the maximum value of the sparkline's value axis. */ + maxValue?: number; + } + /** A sparkline widget. */ + export class dxSparkline extends BaseSparkline { + constructor(element: JQuery, options?: dxSparklineOptions); + constructor(element: Element, options?: dxSparklineOptions); + } +} +interface JQuery { + dxBullet(options?: DevExpress.viz.sparklines.dxBulletOptions): JQuery; + dxBullet(methodName: string, ...params: any[]): any; + dxBullet(methodName: "instance"): DevExpress.viz.sparklines.dxBullet; + dxSparkline(options?: DevExpress.viz.sparklines.dxSparklineOptions): JQuery; + dxSparkline(methodName: string, ...params: any[]): any; + dxSparkline(methodName: "instance"): DevExpress.viz.sparklines.dxSparkline; +} \ No newline at end of file diff --git a/devextreme/devextreme.d.ts b/devextreme/devextreme.d.ts index 706b4bded7..e0777077c8 100644 --- a/devextreme/devextreme.d.ts +++ b/devextreme/devextreme.d.ts @@ -1,4 +1,4 @@ -// Type definitions for DevExtreme 15.2.3 +// Type definitions for DevExtreme 15.2.4 // Project: http://js.devexpress.com/ // Definitions by: DevExpress Inc. // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -35,7 +35,7 @@ declare module DevExpress { brokenRules: any[]; validators: IValidator[]; } - export interface GroupConfig extends EventsMixin { + export interface GroupConfig extends EventsMixin { group: any; validators: IValidator[]; validate(): ValidationGroupValidationResult; @@ -56,7 +56,7 @@ declare module DevExpress { /** Validates the rules that are defined within the dxValidator objects that are registered for the specified ViewModel. */ export function validateModel(model: Object): ValidationGroupValidationResult; /** Registers all the dxValidator objects by which the fields of the specified ViewModel are extended. */ - export function registerModelForValidation(model: Object) : void; + export function registerModelForValidation(model: Object): void; } export var hardwareBackButton: JQueryCallback; /** Processes the hardware back button click. */ @@ -2401,7 +2401,7 @@ declare module DevExpress.ui { scrollPosition(): number; } export interface dxSwitchOptions extends EditorOptions { - activeStateEnabled?: boolean; + activeStateEnabled?: boolean; /** Text displayed when the widget is in a disabled state. */ offText?: string; /** Text displayed when the widget is in an enabled state. */ @@ -2534,6 +2534,7 @@ declare module DevExpress.ui { /** Specifies whether or not the drop-down menu is displayed. */ opened?: boolean; hoverStateEnabled?: boolean; + activeStateEnabled?: boolean; } /** A drop-down menu widget. */ export class dxDropDownMenu extends Widget { @@ -4479,11 +4480,11 @@ declare module DevExpress.viz.core { font?: viz.core.Font; /** Specifies the widget title's horizontal position. */ horizontalAlignment?: string; - /** Specifies the widget title's position in the vertical direction. */ + /** Specifies the widget title's position in the vertical direction. */ verticalAlignment?: string; /** Specifies the distance between the title and surrounding widget elements in pixels. */ margin?: viz.core.Margins; - /** Specifies the height of the space reserved for the title. */ + /** Specifies the height of the space reserved for the title. */ placeholderSize?: number; /** Specifies text for the title. */ text?: string; @@ -4491,7 +4492,7 @@ declare module DevExpress.viz.core { subtitle?: { /** Specifies font options for the subtitle. */ font?: viz.core.Font; - /** Specifies text for the subtitle. */ + /** Specifies text for the subtitle. */ text?: string; } } @@ -4602,16 +4603,16 @@ declare module DevExpress.viz.core { }) => void; /** A handler for the incidentOccurred event. */ onIncidentOccurred?: ( - component: BaseWidget, - element: Element, - target: { - id: string; - type: string; - args: any; - text: string; - widget: string; - version: string; - } + component: BaseWidget, + element: Element, + target: { + id: string; + type: string; + args: any; + text: string; + widget: string; + version: string; + } ) => void; /** Notifies a widget that it is embedded into an HTML page that uses a path modifier. */ pathModified?: boolean; @@ -5152,10 +5153,6 @@ declare module DevExpress.viz.charts { valueField?: string; } export interface CommonPieSeriesSettings extends CommonPieSeriesConfig { - /** - * Sets a series type for all series. - * @deprecated use the 'type' option instead - */ type?: string; } export interface PieSeriesConfig extends CommonPieSeriesConfig { @@ -6389,8 +6386,12 @@ declare module DevExpress.viz.rangeSelector { }; /** Specifies the value to be raised to a power when generating ticks for a logarithmic scale. */ logarithmBase?: number; - /** Specifies an interval between major ticks. */ + /** + * Specifies an interval between major ticks. + * @deprecated ..\tickInterval\tickInterval.md + */ majorTickInterval?: any; + tickInterval?: any; /** Specifies options for the date-time scale's markers. */ marker?: { /** Defines the options that can be set for the text that is displayed by the scale markers. */ @@ -6425,7 +6426,10 @@ declare module DevExpress.viz.rangeSelector { setTicksAtUnitBeginning?: boolean; /** Specifies whether or not to show ticks for the boundary scale values, when neither major ticks nor minor ticks are created for these values. */ showCustomBoundaryTicks?: boolean; - /** Indicates whether or not to show minor ticks on the scale. */ + /** + * Indicates whether or not to show minor ticks on the scale. + * @deprecated minorTick\visible.md + */ showMinorTicks?: boolean; /** Specifies the scale's start value. */ startValue?: any; @@ -6438,14 +6442,20 @@ declare module DevExpress.viz.rangeSelector { /** Specifies the width of the scale's ticks (both major and minor ticks). */ width?: number; }; + minorTick?: { + color?: string; + opacity?: number; + width?: number; + visible?: boolean; + }; /** Specifies the type of the scale. */ type?: string; /** Specifies whether or not to expand the current tick interval if labels overlap each other. */ useTicksAutoArrangement?: boolean; /** Specifies the type of values on the scale. */ valueType?: string; - /** Specifies the order of arguments on a discrete scale. */ - categories?: Array; + /** Specifies the order of arguments on a discrete scale. */ + categories?: Array; }; /** Specifies the range to be selected when displaying the dxRangeSelector. */ selectedRange?: { @@ -6583,7 +6593,7 @@ declare module DevExpress.viz.map { selected(): boolean; /** Sets the selection state of the layer element. */ selected(state: boolean): void; - /** Applies the layer element settings and updates the element appearance. */ + /** Applies the layer element settings and updates element appearance. */ applySettings(settings: any): void; } /** @@ -6680,7 +6690,7 @@ declare module DevExpress.viz.map { type?: string; /** Specifies the type of a marker element. Setting this option makes sense only if the layer type is "marker". */ elementType?: string; - /** Specifies a data source for the layer element. */ + /** Specifies a data source for the layer. */ data?: any; /** Specifies the width of the layer elements border in pixels. */ borderWidth?: number; @@ -7040,9 +7050,9 @@ declare module DevExpress.viz.map { center?: Array; /** A handler for the centerChanged event. */ onCenterChanged?: (e: { - center: Array; - component: dxVectorMap; - element: Element; + center: Array; + component: dxVectorMap; + element: Element; }) => void; /** A handler for the tooltipShown event. */ onTooltipShown?: (e: { From 23975e5b778b581c47847fcf8eb9be894b8b86ec Mon Sep 17 00:00:00 2001 From: Xavier Stouder Date: Tue, 26 Jan 2016 13:10:36 +0100 Subject: [PATCH 07/65] Create Gandi definitions --- gandi/gandi-tests.ts | 8 ++++++++ gandi/gandi.d.ts | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 gandi/gandi-tests.ts create mode 100644 gandi/gandi.d.ts diff --git a/gandi/gandi-tests.ts b/gandi/gandi-tests.ts new file mode 100644 index 0000000000..cc4448e33c --- /dev/null +++ b/gandi/gandi-tests.ts @@ -0,0 +1,8 @@ +/// + +let zone: ZoneRecord = { + rrset_name: "MyZone", + rrset_type: "AAAA", + rrset_ttl: 10800, + rrset_values: [] +} diff --git a/gandi/gandi.d.ts b/gandi/gandi.d.ts new file mode 100644 index 0000000000..eedbd5927f --- /dev/null +++ b/gandi/gandi.d.ts @@ -0,0 +1,42 @@ +// Type definitions for Gandi LiveDNS +// Project: http://doc.livedns.gandi.net/ +// Definitions by: Xavier Stouder +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +interface Zone { + uuid: string; + name: string; + primary_ns: string; + apex_alias: string; + email: string; + serial: number; + refresh: number; + retry: number; + expire: number; + minimum: number; +} + +interface ZoneRecord { + rrset_name: string; + /** + * One of A, AAA, CNAME, MX, NS, TXT, WKS, SRV, LOC, SPF, SSHFP, DNAME + */ + rrset_type: string; + rrset_ttl: number; + rrset_values: string[]; +} + +interface Domain { + fqdn: string; + zone_uuid: string; +} + +interface Snapshot { + serial: number; + zone_uuid: string; + /** + * Can be used as a date with "new Date(change_time);" + */ + change_time: string; + zone_data: ZoneRecord[]; +} \ No newline at end of file From 1ff071439a9deb010e392d108ffebba24c6a5df4 Mon Sep 17 00:00:00 2001 From: Xavier Stouder Date: Tue, 26 Jan 2016 13:14:49 +0100 Subject: [PATCH 08/65] Correct API name --- gandi/gandi-tests.ts => gandi-livedns/gandi-livedns-tests.ts | 2 +- gandi/gandi.d.ts => gandi-livedns/gandi-livedns.d.ts | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename gandi/gandi-tests.ts => gandi-livedns/gandi-livedns-tests.ts (73%) rename gandi/gandi.d.ts => gandi-livedns/gandi-livedns.d.ts (100%) diff --git a/gandi/gandi-tests.ts b/gandi-livedns/gandi-livedns-tests.ts similarity index 73% rename from gandi/gandi-tests.ts rename to gandi-livedns/gandi-livedns-tests.ts index cc4448e33c..36ff0f14d7 100644 --- a/gandi/gandi-tests.ts +++ b/gandi-livedns/gandi-livedns-tests.ts @@ -1,4 +1,4 @@ -/// +/// let zone: ZoneRecord = { rrset_name: "MyZone", diff --git a/gandi/gandi.d.ts b/gandi-livedns/gandi-livedns.d.ts similarity index 100% rename from gandi/gandi.d.ts rename to gandi-livedns/gandi-livedns.d.ts From bf3b1a96c326c02d6cb448fff7e47d33fc53d857 Mon Sep 17 00:00:00 2001 From: Dan Lewi Harkestad Date: Tue, 26 Jan 2016 16:09:34 +0100 Subject: [PATCH 09/65] Highcharts: Updated definitions to highcharts 4.2.0 --- highcharts/highcharts-tests.ts | 54 ++++++++++++++++++++++++++++++++-- highcharts/highcharts.d.ts | 52 +++++++++++++++++++++++++++----- 2 files changed, 96 insertions(+), 10 deletions(-) diff --git a/highcharts/highcharts-tests.ts b/highcharts/highcharts-tests.ts index 33c3c9e751..ad57f8bc4c 100644 --- a/highcharts/highcharts-tests.ts +++ b/highcharts/highcharts-tests.ts @@ -135,6 +135,51 @@ function originalTests() { var multipleYAxisOptions: HighchartsOptions = { yAxis: [{}, {}] }; + + var renderToIdChart = new Highcharts.Chart("container", { + xAxis: {}, + series: [{ + data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4], + type: "line", + allowPointSelect: true + }] + }); + + var renderToElementChart = new Highcharts.Chart(div, { + xAxis: {}, + series: [{ + data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4], + type: "line", + allowPointSelect: true + }] + }); + + var createWithFunction = Highcharts.chart({ + xAxis: {}, + series: [{ + data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4], + type: "line", + allowPointSelect: true + }] + }); + + var createWithFunctionRenderToId = Highcharts.chart("container", { + xAxis: {}, + series: [{ + data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4], + type: "line", + allowPointSelect: true + }] + }); + + var createWithFunctionRenderToElement = Highcharts.chart(div, { + xAxis: {}, + series: [{ + data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4], + type: "line", + allowPointSelect: true + }] + }); } function test_alldefaults() { @@ -1554,15 +1599,18 @@ function test_Line() { series: [{ data: [1, 2, 3, 4, null, 6, 7, null, 9], step: 'right', - name: 'Right' + name: 'Right', + linecap: 'round' }, { data: [5, 6, 7, 8, null, 10, 11, null, 13], step: 'center', - name: 'Center' + name: 'Center', + linecap: 'round' }, { data: [9, 10, 11, 12, null, 14, 15, null, 17], step: 'left', - name: 'Left' + name: 'Left', + linecap: 'round' }] }); } diff --git a/highcharts/highcharts.d.ts b/highcharts/highcharts.d.ts index b5ed1d6628..4405f2407c 100644 --- a/highcharts/highcharts.d.ts +++ b/highcharts/highcharts.d.ts @@ -117,6 +117,13 @@ interface HighchartsAxisLabels { * @default 5 */ padding?: number; + /** + * Whether to reserve space for the labels. This can be turned off when for example the labels are rendered inside + * the plot area instead of outside. + * @default true + * @since 4.1.10 + */ + reserveSpace?: boolean; /** * Rotation of the labels in degrees. * @default 0 @@ -3666,6 +3673,11 @@ interface HighchartsSeriesChart { * @default 2 */ lineWidth?: number; + /** + * The line cap used for line ends and line joins on the graph. + * @default 'round' + */ + linecap?: string; /** * The id of another series to link to. Additionally, the value can be ':previous' to link to the previous series. * When two series are linked, only the first one appears in the legend. Toggling the visibility of this also @@ -4432,12 +4444,6 @@ interface HighchartsLineChart extends HighchartsSeriesChart { * @since 1.2.5 */ step?: boolean|string; - - /** - * The line cap used for line ends and line joins on the graph. - * @default 'round' - */ - linecap?: string; } /** @@ -4445,7 +4451,9 @@ interface HighchartsLineChart extends HighchartsSeriesChart { */ interface HighchartsPieChart extends HighchartsSeriesChart { /** - * The color of the border surrounding each column or bar. + * The color of the border surrounding each slice. When null, the border takes the same color as the slice fill. + * This can be used together with a borderWidth to fill drawing gaps created by antialiazing artefacts in + * borderless pies. * @default '#FFFFFF' */ borderColor?: string; @@ -4724,6 +4732,11 @@ interface HighchartsTreeMapChart extends HighchartsSeriesChart { * @since 4.1.8 */ maxPointWidth?: number; + /** + * The sort index of the point inside the treemap level. + * @since 4.1.10 + */ + sortIndex?: number; /** * A wrapper object for all the series options in specific states. */ @@ -5789,6 +5802,21 @@ interface HighchartsChart { * @return {HighchartsChartObject} */ new (options: HighchartsOptions, callback: (chart: HighchartsChartObject) => void): HighchartsChartObject; + /** + * This is the constructor for creating a new chart object. + * @param {string|HTMLElement} renderTo The id or a reference to a DOM element where the chart should be rendered (since v4.2.0). + * @param {HighchartsOptions} options The chart options + * @return {HighchartsChartObject} + */ + new (renderTo: string | HTMLElement, options: HighchartsOptions): HighchartsChartObject; + /** + * This is the constructor for creating a new chart object. + * @param {string|HTMLElement} renderTo The id or a reference to a DOM element where the chart should be rendered (since v4.2.0). + * @param {HighchartsOptions} options The chart options + * @param callback A function to execute when the chart object is finished loading and rendering. In most cases the chart is built in one thread, but in Internet Explorer version 8 or less the chart is sometimes initiated before the document is ready, and in these cases the chart object will not be finished directly after callingnew Highcharts.Chart(). As a consequence, code that relies on the newly built Chart object should always run in the callback. Defining a chart.event.load handler is equivalent. + * @return {HighchartsChartObject} + */ + new (renderTo: string | HTMLElement, options: HighchartsOptions, callback: (chart: HighchartsChartObject) => void): HighchartsChartObject; } /** @@ -5970,6 +5998,16 @@ interface HighchartsStatic { Renderer: HighchartsRenderer; Color(color: string | HighchartsGradient): string | HighchartsGradient; + /** + * As Highcharts.Chart, but without need for the new keyword. + * @since 4.2.0 + */ + chart(options: HighchartsOptions, callback?: (chart: HighchartsChartObject) => void): HighchartsChartObject; + /** + * As Highcharts.Chart, but without need for the new keyword. + * @since 4.2.0 + */ + chart(renderTo: string | HTMLElement, options: HighchartsOptions, callback?: (chart: HighchartsChartObject) => void): HighchartsChartObject; /** * An array containing the current chart objects in the page. A chart's position in the array is preserved * throughout the page's lifetime. When a chart is destroyed, the array item becomes undefined. From c103042251c47e3f8c71f975af9c28d185fe15b1 Mon Sep 17 00:00:00 2001 From: Glenn Dierckx Date: Tue, 26 Jan 2016 20:39:08 +0100 Subject: [PATCH 10/65] Added definitions for fromjs --- fromjs/fromjs-tests.ts | 5 +++++ fromjs/fromjs.d.ts | 46 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 fromjs/fromjs-tests.ts create mode 100644 fromjs/fromjs.d.ts diff --git a/fromjs/fromjs-tests.ts b/fromjs/fromjs-tests.ts new file mode 100644 index 0000000000..dcc3dd6b99 --- /dev/null +++ b/fromjs/fromjs-tests.ts @@ -0,0 +1,5 @@ +/// +var array = [1, 2, 3, 4]; +from(array).each(function (value, key) { + console.log('Value ' + value + ' at index ' + key); +}); \ No newline at end of file diff --git a/fromjs/fromjs.d.ts b/fromjs/fromjs.d.ts new file mode 100644 index 0000000000..ec96a98b74 --- /dev/null +++ b/fromjs/fromjs.d.ts @@ -0,0 +1,46 @@ +// Type definitions for fromjs v2.1.6.1 +// Project: https://github.com/suckgamony/fromjs +// Definitions by: Glenn Dierckx +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function from(results: Array): FromJS.IQueryable; +declare function from(results: any): FromJS.IQueryable; + +declare module FromJS { + export interface IOrderedQueryable extends IQueryable { + thenBy(item: (item: T) => TResult): IOrderedQueryable; + thenByDesc(item: (item: T) => TResult): IOrderedQueryable; + } + + export interface IQueryable { + where(predicate: (item: T) => boolean): IQueryable; + select(item: (item: T) => TResult): IQueryable; + orderByDesc(item: (item: T) => TResult): IOrderedQueryable; + orderBy(item: (item: T) => TResult): IOrderedQueryable; + selectMany(item: (item: T) => Array): IQueryable; + skip(count: Number): IQueryable; + take(count: Number): IQueryable; + single(): T; + single(predicate: (item: T) => boolean): T; + singleOrDefault(): T; + singleOrDefault(predicate: (item: T) => boolean): T; + first(): T; + last(): T; + max(): T; + distinct(): IQueryable; + count(): number; + contains(item: T): boolean; + first(predicate: (item: T) => boolean): T; + firstOrDefault(): T; + each(action: (item: T) => void): void; + each(action: (value: T, key: TKey) => void): void; + each(action: (item: T) => void, a: boolean): void; + toArray(): Array; + concat(second: Array): IQueryable; + sum(): T; + distinct(): IQueryable; + any(): boolean; + any(predicate: (item: T) => boolean): boolean; + all(predicate: (item: T) => boolean): boolean; + } +} \ No newline at end of file From 7ee8c031f981bfb4fd1dd511d3edf598ab96e5bb Mon Sep 17 00:00:00 2001 From: Frank Wallis Date: Tue, 26 Jan 2016 21:32:32 +0000 Subject: [PATCH 11/65] add type definitions for reselect --- reselect/reselect-tests.ts | 42 ++++++++++++++++++++++++++++++++++++++ reselect/reselect.d.ts | 36 ++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 reselect/reselect-tests.ts create mode 100644 reselect/reselect.d.ts diff --git a/reselect/reselect-tests.ts b/reselect/reselect-tests.ts new file mode 100644 index 0000000000..dd8031bc25 --- /dev/null +++ b/reselect/reselect-tests.ts @@ -0,0 +1,42 @@ +/// +import {createSelector, defaultMemoize} from "reselect"; + +type Item1 = { + prop1: number; +} + +type Item2 = { + prop2: number; +} + +type State = { + item1: Item1, + item2: Item2 +} + +function getItem1(state: State, props: any): Item1 { + return state.item1; +} + +function getItem2(state: State, props: any): Item2 { + return state.item2; +} + +const selector = createSelector( + getItem1, + getItem2, + (item1: Item1, item2: Item2) => { + return item1.prop1 + item2.prop2; + } +); + +const state = { + item1: { prop1: 10 }, + item2: { prop2: 20 } +} + +const props = { multiplier: 10 }; +const total: number = selector(state, props); + +const getItem2Memoized = defaultMemoize(getItem2); +const memItem: Item2 = getItem2Memoized(state, {}); \ No newline at end of file diff --git a/reselect/reselect.d.ts b/reselect/reselect.d.ts new file mode 100644 index 0000000000..72d03a83a9 --- /dev/null +++ b/reselect/reselect.d.ts @@ -0,0 +1,36 @@ +// Type definitions for reselect v2.0.2 +// Project: https://github.com/rackt/reselect +// Definitions by: Frank Wallis +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module Reselect { + + type Selector = (state: TInput, props?: any) => TOutput; + + function createSelector(selector1: Selector, combiner: (arg1: T1) => TOutput): Selector; + function createSelector(selector1: Selector, selector2: Selector, combiner: (arg1: T1, arg2: T2) => TOutput): Selector; + function createSelector(selector1: Selector, selector2: Selector, selector3: Selector, combiner: (arg1: T1, arg2: T2, arg3: T3) => TOutput): Selector; + function createSelector(selector1: Selector, selector2: Selector, selector3: Selector, selector4: Selector, combiner: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => TOutput): Selector; + function createSelector(selector1: Selector, selector2: Selector, selector3: Selector, selector4: Selector, selector5: Selector, combiner: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => TOutput): Selector; + function createSelector(selector1: Selector, selector2: Selector, selector3: Selector, selector4: Selector, selector5: Selector, selector6: Selector, combiner: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => TOutput): Selector; + function createSelector(selector1: Selector, selector2: Selector, selector3: Selector, selector4: Selector, selector5: Selector, selector6: Selector, selector7: Selector, combiner: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, arg7: T7) => TOutput): Selector; + function createSelector(selector1: Selector, selector2: Selector, selector3: Selector, selector4: Selector, selector5: Selector, selector6: Selector, selector7: Selector, selector8: Selector, combiner: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, arg7: T7, arg8: T8) => TOutput): Selector; + function createSelector(selector1: Selector, selector2: Selector, selector3: Selector, selector4: Selector, selector5: Selector, selector6: Selector, selector7: Selector, selector8: Selector, selector9: Selector, combiner: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, arg7: T7, arg8: T8, arg9: T9) => TOutput): Selector; + function createSelector(selector1: Selector, selector2: Selector, selector3: Selector, selector4: Selector, selector5: Selector, selector6: Selector, selector7: Selector, selector8: Selector, selector9: Selector, selector10: Selector, combiner: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, arg7: T7, arg8: T8, arg9: T9, arg10: T10) => TOutput): Selector; + function createSelector(selector1: Selector, selector2: Selector, selector3: Selector, selector4: Selector, selector5: Selector, selector6: Selector, selector7: Selector, selector8: Selector, selector9: Selector, selector10: Selector, selector11: Selector, combiner: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, arg7: T7, arg8: T8, arg9: T9, arg10: T10, arg11: T11) => TOutput): Selector; + function createSelector(selector1: Selector, selector2: Selector, selector3: Selector, selector4: Selector, selector5: Selector, selector6: Selector, selector7: Selector, selector8: Selector, selector9: Selector, selector10: Selector, selector11: Selector, selector12: Selector, combiner: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, arg7: T7, arg8: T8, arg9: T9, arg10: T10, arg11: T11, arg12: T12) => TOutput): Selector; + function createSelector(selector1: Selector, selector2: Selector, selector3: Selector, selector4: Selector, selector5: Selector, selector6: Selector, selector7: Selector, selector8: Selector, selector9: Selector, selector10: Selector, selector11: Selector, selector12: Selector, selector13: Selector, combiner: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, arg7: T7, arg8: T8, arg9: T9, arg10: T10, arg11: T11, arg12: T12, arg13: T13) => TOutput): Selector; + function createSelector(selector1: Selector, selector2: Selector, selector3: Selector, selector4: Selector, selector5: Selector, selector6: Selector, selector7: Selector, selector8: Selector, selector9: Selector, selector10: Selector, selector11: Selector, selector12: Selector, selector13: Selector, selector14: Selector, combiner: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, arg7: T7, arg8: T8, arg9: T9, arg10: T10, arg11: T11, arg12: T12, arg13: T13, arg14: T14) => TOutput): Selector; + + function createStructuredSelector(inputSelectors: any, selectorCreator?: any): any; + + type EqualityChecker = (arg1: T, arg2: T) => boolean; + type Memoizer = (func: TFunc, equalityCheck?: EqualityChecker) => TFunc; + + const defaultMemoize: Memoizer; + function createSelectorCreator(memoize: Memoizer, ...memoizeOptions: any[]): any; +} + +declare module "reselect" { + export = Reselect +} \ No newline at end of file From f7109b9d0d956f0864cf019fe99952b886539ca8 Mon Sep 17 00:00:00 2001 From: Raphael ATALLAH Date: Tue, 26 Jan 2016 16:14:42 -0800 Subject: [PATCH 12/65] Updated typescript definitions for angular-odata-resources --- angular-odata-resources/angular-odata-resources-tests.ts | 1 + angular-odata-resources/angular-odata-resources.d.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/angular-odata-resources/angular-odata-resources-tests.ts b/angular-odata-resources/angular-odata-resources-tests.ts index 23286adc03..a9194b0067 100644 --- a/angular-odata-resources/angular-odata-resources-tests.ts +++ b/angular-odata-resources/angular-odata-resources-tests.ts @@ -174,6 +174,7 @@ var user = odataResourceClass.odata() .skip(10) .take(20) .orderBy("Name", "desc") + .transformUrl((s)=>s) .single(); user.$save(); diff --git a/angular-odata-resources/angular-odata-resources.d.ts b/angular-odata-resources/angular-odata-resources.d.ts index 65e7d26e25..d9c59ddf3b 100644 --- a/angular-odata-resources/angular-odata-resources.d.ts +++ b/angular-odata-resources/angular-odata-resources.d.ts @@ -281,6 +281,7 @@ declare module OData { constructor(callback: ProviderCallback); filter(operand1: any, operand2?: any, operand3?: any): Provider; orderBy(arg1: string, arg2?: string): Provider; + transformUrl(transformMethod : (url:string)=>string): Provider; take(amount: number): Provider; skip(amount: number): Provider; private execute(); From 17fa1e5f269189f7f8e0f53f8c443e6c2eac562c Mon Sep 17 00:00:00 2001 From: Timothy Schubert Date: Wed, 27 Jan 2016 13:25:04 +1100 Subject: [PATCH 13/65] angular-protractor: Additional signature for protractor.ElementArrayFinder.map --- angular-protractor/angular-protractor-tests.ts | 12 +++++++++++- angular-protractor/angular-protractor.d.ts | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/angular-protractor/angular-protractor-tests.ts b/angular-protractor/angular-protractor-tests.ts index 0f98aead12..64bf8d6d6b 100644 --- a/angular-protractor/angular-protractor-tests.ts +++ b/angular-protractor/angular-protractor-tests.ts @@ -406,9 +406,19 @@ function TestElementArrayFinder() { elementArrayFinder.each(function(element: protractor.ElementFinder){ // nothing }); + stringPromise = elementArrayFinder.map(function(element: protractor.ElementFinder, index: number){ return 'abc'; - }) + }); + + stringPromise = elementArrayFinder.map(function(element: protractor.ElementFinder, index: number): string { + return 'abc'; + }); + + stringPromise = elementArrayFinder.map>(function(element: protractor.ElementFinder, index: number): webdriver.promise.Promise { + return element.getText(); + }); + elementArrayFinder = elementArrayFinder.filter(function(element: protractor.ElementFinder, index: number){ return element.getText().then((text: string) => { return text === "foo"; diff --git a/angular-protractor/angular-protractor.d.ts b/angular-protractor/angular-protractor.d.ts index 08f83e27d4..78158df9c0 100644 --- a/angular-protractor/angular-protractor.d.ts +++ b/angular-protractor/angular-protractor.d.ts @@ -992,6 +992,7 @@ declare module protractor { * of values returned by the map function. */ map(mapFn: (element: ElementFinder, index: number) => T): webdriver.promise.Promise; + map(mapFn: (element: ElementFinder, index: number) => T2): webdriver.promise.Promise; /** * Apply a filter function to each element within the ElementArrayFinder. Returns From 5713fd77ebb3a57a93b3bfd265bba55778c6371a Mon Sep 17 00:00:00 2001 From: tkqubo Date: Wed, 27 Jan 2016 13:19:08 +0900 Subject: [PATCH 14/65] chore: add my name on definition --- mock-fs/mock-fs.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mock-fs/mock-fs.d.ts b/mock-fs/mock-fs.d.ts index fb37173b2c..6178d762d8 100644 --- a/mock-fs/mock-fs.d.ts +++ b/mock-fs/mock-fs.d.ts @@ -1,6 +1,6 @@ // Type definitions for mock-fs 3.6.0 // Project: https://github.com/tschaub/mock-fs -// Definitions by: Wim Looman +// Definitions by: Wim Looman , Qubo // Definitions: https://github.com/borisyankov/DefinitelyTyped /// From 251aea132302e2f71ee2df6defaf772066bf3edf Mon Sep 17 00:00:00 2001 From: Ilya Mochalov Date: Wed, 27 Jan 2016 10:54:56 +0500 Subject: [PATCH 15/65] lodash: _.nthArg added --- lodash/lodash-tests.ts | 23 +++++++++++++++++++++++ lodash/lodash.d.ts | 25 +++++++++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index a7d3a72b88..784d417173 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -9881,6 +9881,29 @@ module TestNoop { } } +namespace TestNthArg { + type SampleFunc = (...args: any[]) => any; + + { + let result: SampleFunc; + + result = _.nthArg(); + result = _.nthArg(1); + } + + { + let result: _.LoDashImplicitObjectWrapper; + + result = _(1).nthArg(); + } + + { + let result: _.LoDashExplicitObjectWrapper; + + result = _(1).chain().nthArg(); + } +} + // _.over namespace TestOver { { diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index e5f938b546..f8afeac112 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -16195,6 +16195,31 @@ declare module _ { noop(...args: any[]): _.LoDashExplicitWrapper; } + //_.nthArg + interface LoDashStatic { + /** + * Creates a function that returns its nth argument. + * + * @param n The index of the argument to return. + * @return Returns the new function. + */ + nthArg(n?: number): TResult; + } + + interface LoDashImplicitWrapper { + /** + * @see _.nthArg + */ + nthArg(): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.nthArg + */ + nthArg(): LoDashExplicitObjectWrapper; + } + //_.over interface LoDashStatic { /** From 3b0dcba4d946149d94383ce6a0ee0a60d6f82090 Mon Sep 17 00:00:00 2001 From: Federico Caselli Date: Wed, 27 Jan 2016 11:04:27 +0100 Subject: [PATCH 16/65] Rename jsend-test.ts to jsend-tests.ts --- jsend/{jsend-test.ts => jsend-tests.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename jsend/{jsend-test.ts => jsend-tests.ts} (100%) diff --git a/jsend/jsend-test.ts b/jsend/jsend-tests.ts similarity index 100% rename from jsend/jsend-test.ts rename to jsend/jsend-tests.ts From 3d8317396de142b4abd7aeb14a51f6af2297636b Mon Sep 17 00:00:00 2001 From: Igor Kriklivetc Date: Wed, 27 Jan 2016 13:06:34 +0300 Subject: [PATCH 17/65] Version 15.2.3 removed --- devextreme/devextreme-15.2.3.d.ts | 7315 ----------------------------- 1 file changed, 7315 deletions(-) delete mode 100644 devextreme/devextreme-15.2.3.d.ts diff --git a/devextreme/devextreme-15.2.3.d.ts b/devextreme/devextreme-15.2.3.d.ts deleted file mode 100644 index 706b4bded7..0000000000 --- a/devextreme/devextreme-15.2.3.d.ts +++ /dev/null @@ -1,7315 +0,0 @@ -// Type definitions for DevExtreme 15.2.3 -// Project: http://js.devexpress.com/ -// Definitions by: DevExpress Inc. -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/// - -declare module DevExpress { - /** A mixin that provides a capability to fire and subscribe to events. */ - export interface EventsMixin { - /** Subscribes to a specified event. */ - on(eventName: string, eventHandler: Function): T; - /** Subscribes to the specified events. */ - on(events: { [eventName: string]: Function; }): T; - /** Detaches all event handlers from the specified event. */ - off(eventName: string): Object; - /** Detaches a particular event handler from the specified event. */ - off(eventName: string, eventHandler: Function): T; - } - /** An object that serves as a namespace for the methods required to perform validation. */ - export module validationEngine { - export interface IValidator { - validate(): ValidatorValidationResult; - reset(): void; - } - export interface ValidatorValidationResult { - isValid: boolean; - name?: string; - value: any; - brokenRule: any; - validationRules: any[]; - } - export interface ValidationGroupValidationResult { - isValid: boolean; - brokenRules: any[]; - validators: IValidator[]; - } - export interface GroupConfig extends EventsMixin { - group: any; - validators: IValidator[]; - validate(): ValidationGroupValidationResult; - reset(): void; - } - /** Provides access to the object that represents the specified validation group. */ - export function getGroupConfig(group: any): GroupConfig - /** Provides access to the object that represents the default validation group. */ - export function getGroupConfig(): GroupConfig - /** Validates rules of the validators that belong to the specified validation group. */ - export function validateGroup(group: any): ValidationGroupValidationResult; - /** Validates rules of the validators that belong to the default validation group. */ - export function validateGroup(): ValidationGroupValidationResult; - /** Resets the values and validation result of the editors that belong to the specified validation group. */ - export function resetGroup(group: any): void; - /** Resets the values and validation result of the editors that belong to the default validation group. */ - export function resetGroup(): void; - /** Validates the rules that are defined within the dxValidator objects that are registered for the specified ViewModel. */ - export function validateModel(model: Object): ValidationGroupValidationResult; - /** Registers all the dxValidator objects by which the fields of the specified ViewModel are extended. */ - export function registerModelForValidation(model: Object) : void; - } - export var hardwareBackButton: JQueryCallback; - /** Processes the hardware back button click. */ - export function processHardwareBackButton(): void; - /** Hides the last displayed overlay widget. */ - export function hideTopOverlay(): boolean; - /** Specifies whether or not the entire application/site supports right-to-left representation. */ - export var rtlEnabled: boolean; - /** Registers a new component in the DevExpress.ui namespace as a jQuery plugin, Angular directive and Knockout binding. */ - export function registerComponent(name: string, componentClass: Object): void; - /** Registers a new component in the specified namespace as a jQuery plugin, Angular directive and Knockout binding. */ - export function registerComponent(name: string, namespace: Object, componentClass: Object): void; - export function requestAnimationFrame(callback: Function): number; - export function cancelAnimationFrame(requestID: number): void; - /** Custom Knockout binding that links an HTML element with a specific action. */ - export class Action { } - /** Used to get URLs that vary in a locally running application and the application running on production. */ - export class EndpointSelector { - constructor(options: { - [key: string]: { - local?: string; - production?: string; - } - }); - /** Returns a local or a productional URL depending on how the application is currently running. */ - urlFor(key: string): string; - } - /** An object that serves as a namespace for the methods that are used to animate UI elements. */ - export module fx { - /** Defines animation options. */ - export interface AnimationOptions { - /** A function called after animation is completed. */ - complete?: (element: JQuery, config: AnimationOptions) => void; - /** A number specifying wait time before animation execution. */ - delay?: number; - /** A number specifying the time period to wait before the animation of the next stagger item starts. */ - staggerDelay?: number; - /** A number specifying the time in milliseconds spent on animation. */ - duration?: number; - /** A string specifying the type of an easing function used for animation. */ - easing?: string; - /** Specifies the initial animation state. */ - from?: any; - /** A function called before animation is started. */ - start?: (element: JQuery, config: AnimationOptions) => void; - /** Specifies a final animation state. */ - to?: any; - /** A string value specifying the animation type. */ - type?: string; - /** Specifies the animation direction for the "slideIn" and "slideOut" animation types. */ - direction?: string; - } - /** Animates the specified element. */ - export function animate(element: HTMLElement, config: AnimationOptions): Object; - /** Returns a value indicating whether the specified element is being animated. */ - export function isAnimating(element: HTMLElement): boolean; - /** Stops the animation. */ - export function stop(element: HTMLElement, jumpToEnd: boolean): void; - } - /** The manager that performs several specified animations at a time. */ - export class TransitionExecutor { - /** Deletes all the animations registered in the Transition Executor by using the enter(elements, animation) and leave(elements, animation) methods. */ - reset(): void; - /** Registers a set of elements that should be animated as "entering" using the specified animation configuration. */ - enter(elements: JQuery, animation: any): void; - /** Registers a set of elements that should be animated as "leaving" using the specified animation configuration. */ - leave(elements: JQuery, animation: any): void; - /** Starts all the animations registered using the enter(elements, animation) and leave(elements, animation) methods beforehand. */ - start(config: Object): JQueryPromise; - /** Stops all started animations. */ - stop(): void; - } - export class AnimationPresetCollection { - /** Resets all the changes made in the animation repository. */ - resetToDefaults(): void; - /** Deletes the specified animation or clears all the animation repository, if an animation name is not passed. */ - clear(name: string): void; - /** Adds the specified animation preset to the animation repository by the specified name. */ - registerPreset(name: string, config: any): void; - /** Applies the changes made in the animation repository. */ - applyChanges(): void; - /** Returns the configuration of the animation found in the animation repository by the specified name for the current device. */ - getPreset(name: string): void; - /** Registers predefined animations in the animation repository. */ - registerDefaultPresets(): void; - } - /** A repository of animations. */ - export var animationPresets: AnimationPresetCollection; - /** The device object defines the device on which the application is running. */ - export interface Device { - /** Indicates whether or not the device platform is Android. */ - android?: boolean; - /** Specifies the type of the device on which the application is running. */ - deviceType?: string; - /** Indicates whether or not the device platform is generic, which means that the application will look and behave according to a generic "light" or "dark" theme. */ - generic?: boolean; - /** Indicates whether or not the device platform is iOS. */ - ios?: boolean; - /** Indicates whether or not the device type is 'phone'. */ - phone?: boolean; - /** Specifies the platform of the device on which the application is running. */ - platform?: string; - /** Indicates whether or not the device type is 'tablet'. */ - tablet?: boolean; - /** Specifies an array with the major and minor versions of the device platform. */ - version?: Array; - /** Indicates whether or not the device platform is Windows. */ - win?: boolean; - /** Specifies a performance grade of the current device. */ - grade?: string; - } - export class Devices implements EventsMixin { - constructor(options: { window: Window }); - /** Overrides actual device information to force the application to operate as if it was running on the specified device. */ - current(deviceName: any): void; - /** Returns information about the current device. */ - current(): Device; - orientationChanged: JQueryCallback; - /** Returns the current device orientation. */ - orientation(): string; - /** Returns real information about the current device regardless of the value passed to the devices.current(deviceName) method. */ - real(): Device; - on(eventName: "orientationChanged", eventHandler: (e: { orientation: string }) => void): Devices; - on(eventName: string, eventHandler: Function): Devices; - on(events: { [eventName: string]: Function; }): Devices; - off(eventName: "orientationChanged"): Devices; - off(eventName: string): Devices; - off(eventName: "orientationChanged", eventHandler: (e: { orientation: string }) => void): Devices; - off(eventName: string, eventHandler: Function): Devices; - } - /** An object that serves as a namespace for the methods and events specifying information on the current device. */ - export var devices: Devices; - /** The position object specifies the widget positioning options. */ - export interface PositionOptions { - /** The target element position that the widget is positioned against. */ - at?: string; - /** The element within which the widget is positioned. */ - boundary?: Element; - /** A string value holding horizontal and vertical offset from the window's boundaries. */ - boundaryOffset?: string; - /** Specifies how to move the widget if it overflows the screen. */ - collision?: any; - /** The position of the widget to align against the target element. */ - my?: string; - /** The target element that the widget is positioned against. */ - of?: HTMLElement; - /** A string value holding horizontal and vertical offset in pixels, separated by a space (e.g., "5 -10"). */ - offset?: string; - } - export interface ComponentOptions { - /** A handler for the initialized event. */ - onInitialized?: Function; - /** A handler for the optionChanged event. */ - onOptionChanged?: Function; - /** A handler for the disposing event. */ - onDisposing?: Function; - } - /** A base class for all components and widgets. */ - export class Component { - constructor(options?: ComponentOptions) - /** Prevents the component from refreshing until the endUpdate method is called. */ - beginUpdate(): void; - /** Enables the component to refresh after the beginUpdate method call. */ - endUpdate(): void; - /** Returns an instance of this component class. */ - instance(): Component; - /** Returns the configuration options of this component. */ - option(): { - [optionKey: string]: any; - }; - /** Sets one or more options of this component. */ - option(options: { - [optionKey: string]: any; - }): void; - /** Gets the value of the specified configuration option of this component. */ - option(optionName: string): any; - /** Sets a value to the specified configuration option of this component. */ - option(optionName: string, optionValue: any): void; - } - export interface DOMComponentOptions extends ComponentOptions { - /** Specifies whether or not the current component supports a right-to-left representation. */ - rtlEnabled?: boolean; - /** Specifies the height of the widget. */ - height?: any; - /** Specifies the width of the widget. */ - width?: any; - } - /** A base class for all components. */ - export class DOMComponent extends Component { - constructor(element: JQuery, options?: DOMComponentOptions); - constructor(element: HTMLElement, options?: DOMComponentOptions); - /** Returns the root HTML element of the widget. */ - element(): JQuery; - /** Specifies the device-dependent default configuration options for this component. */ - static defaultOptions(rule: { - device?: any; - options?: any; - }): void; - } - export module data { - export interface ODataError extends Error { - httpStatus?: number; - errorDetails?: any; - } - export interface StoreOptions { - /** A handler for the modified event. */ - onModified?: () => void; - /** A handler for the modifying event. */ - onModifying?: () => void; - /** A handler for the removed event. */ - onRemoved?: (key: any) => void; - /** A handler for the removing event. */ - onRemoving?: (key: any) => void; - /** A handler for the updated event. */ - onUpdated?: (key: any, values: Object) => void; - /** A handler for the updating event. */ - onUpdating?: (key: any, values: Object) => void; - /** A handler for the loaded event. */ - onLoaded?: (result: Array) => void; - /** A handler for the loading event. */ - onLoading?: (loadOptions: LoadOptions) => void; - /** A handler for the inserted event. */ - onInserted?: (values: Object, key: any) => void; - /** A handler for the inserting event. */ - onInserting?: (values: Object) => void; - /** Specifies the function called when the Store causes an error. */ - errorHandler?: (e: Error) => void; - /** Specifies the key properties within the data associated with the Store. */ - key?: any; - } - export interface LoadOptions { - filter?: Object; - sort?: Object; - select?: Object; - expand?: Object; - group?: Object; - skip?: number; - take?: number; - userData?: Object; - requireTotalCount?: boolean; - } - /** The base class for all Stores. */ - export class Store implements EventsMixin { - constructor(options?: StoreOptions); - /** Returns the data item specified by the key. */ - byKey(key: any): JQueryPromise; - /** Adds an item to the data associated with this Store. */ - insert(values: Object): JQueryPromise; - /** Returns the key expression specified via the key configuration option. */ - key(): any; - /** Returns the key of the Store item that matches the specified object. */ - keyOf(obj: Object): any; - /** Starts loading data. */ - load(obj?: LoadOptions): JQueryPromise; - /** Removes the data item specified by the key. */ - remove(key: any): JQueryPromise; - /** Obtains the total count of items that will be returned by the load() function. */ - totalCount(options?: { - filter?: Object; - group?: Object; - }): JQueryPromise; - /** Updates the data item specified by the key. */ - update(key: any, values: Object): JQueryPromise; - on(eventName: "removing", eventHandler: (key: any) => void): Store; - on(eventName: "removed", eventHandler: (key: any) => void): Store; - on(eventName: "updating", eventHandler: (key: any, values: Object) => void): Store; - on(eventName: "updated", eventHandler: (key: any, values: Object) => void): Store; - on(eventName: "inserting", eventHandler: (values: Object) => void): Store; - on(eventName: "inserted", eventHandler: (values: Object, key: any) => void): Store; - on(eventName: "modifying", eventHandler: () => void): Store; - on(eventName: "modified", eventHandler: () => void): Store; - on(eventName: "loading", eventHandler: (loadOptions: LoadOptions) => void): Store; - on(eventName: "loaded", eventHandler: (result: Array) => void): Store; - on(eventName: string, eventHandler: Function): Store; - on(events: { [eventName: string]: Function; }): Store; - off(eventName: "removing"): Store; - off(eventName: "removed"): Store; - off(eventName: "updating"): Store; - off(eventName: "updated"): Store; - off(eventName: "inserting"): Store; - off(eventName: "inserted"): Store; - off(eventName: "modifying"): Store; - off(eventName: "modified"): Store; - off(eventName: "loading"): Store; - off(eventName: "loaded"): Store; - off(eventName: string): Store; - off(eventName: "removing", eventHandler: (key: any) => void): Store; - off(eventName: "removed", eventHandler: (key: any) => void): Store; - off(eventName: "updating", eventHandler: (key: any, values: Object) => void): Store; - off(eventName: "updated", eventHandler: (key: any, values: Object) => void): Store; - off(eventName: "inserting", eventHandler: (values: Object) => void): Store; - off(eventName: "inserted", eventHandler: (values: Object, key: any) => void): Store; - off(eventName: "modifying", eventHandler: () => void): Store; - off(eventName: "modified", eventHandler: () => void): Store; - off(eventName: "loading", eventHandler: (loadOptions: LoadOptions) => void): Store; - off(eventName: "loaded", eventHandler: (result: Array) => void): Store; - off(eventName: string, eventHandler: Function): Store; - } - export interface ArrayStoreOptions extends StoreOptions { - /** Specifies the array associated with this Store. */ - data?: Array; - } - /** A Store accessing an in-memory array. */ - export class ArrayStore extends Store { - constructor(options?: ArrayStoreOptions); - /** Clears all data associated with the current ArrayStore. */ - clear(): void; - /** Creates the Query object for the underlying array. */ - createQuery(): Query; - } - interface Promise { - then(doneFn?: Function, failFn?: Function, progressFn?: Function): Promise; - } - export interface CustomStoreOptions extends StoreOptions { - /** The user implementation of the byKey(key, extraOptions) method. */ - byKey?: (key: any) => Promise; - /** The user implementation of the insert(values) method. */ - insert?: (values: Object) => Promise; - /** The user implementation of the load(options) method. */ - load?: (options?: LoadOptions) => Promise; - /** The user implementation of the remove(key) method. */ - remove?: (key: any) => Promise; - /** The user implementation of the totalCount(options) method. */ - totalCount?: (options?: { - filter?: Object; - group?: Object; - }) => Promise; - /** The user implementation of the update(key, values) method. */ - update?: (key: any, values: Object) => Promise; - } - /** A Store object that enables you to implement your own data access logic. */ - export class CustomStore extends Store { - constructor(options: CustomStoreOptions); - } - export interface DataSourceOptions { - /** Specifies data filtering conditions. */ - filter?: Object; - /** Specifies data grouping conditions. */ - group?: Object; - /** The item mapping function. */ - map?: (record: any) => any; - /** Specifies the maximum number of items the page can contain. */ - pageSize?: number; - /** Specifies whether a DataSource loads data by pages, or all items at once. */ - paginate?: boolean; - /** The data post processing function. */ - postProcess?: (data: any[]) => any[]; - /** Specifies a value by which the required items are searched. */ - searchExpr?: Object; - /** Specifies the comparison operation used to search for the required items. */ - searchOperation?: string; - /** Specifies the value to which the search expression is compared. */ - searchValue?: Object; - /** Specifies the initial select option value. */ - select?: Object; - /** An array of the strings that represent the names of the navigation properties to be loaded simultaneously with the OData store's entity. */ - expand?: Object; - /** Specifies whether or not the DataSource instance requests the total count of items available in the storage. */ - requireTotalCount?: boolean; - /** Specifies the initial sort option value. */ - sort?: Object; - /** Specifies the underlying Store instance used to access data. */ - store?: any; - /** A handler for the changed event. */ - onChanged?: () => void; - /** A handler for the loadingChanged event. */ - onLoadingChanged?: (isLoading: boolean) => void; - /** A handler for the loadError event. */ - onLoadError?: (e?: Error) => void; - } - /** An object that provides access to a data web service or local data storage for collection container widgets. */ - export class DataSource implements EventsMixin { - constructor(options?: DataSourceOptions); - /** Disposes all resources associated with this DataSource. */ - dispose(): void; - /** Returns the current filter option value. */ - filter(): Object; - /** Sets the filter option value. */ - filter(filterExpr: Object): void; - /** Returns the current group option value. */ - group(): Object; - /** Sets the group option value. */ - group(groupExpr: Object): void; - /** Indicates whether or not the current page contains fewer items than the number of items specified by the pageSize configuration option. */ - isLastPage(): boolean; - /** Indicates whether or not at least one load() method execution has successfully finished. */ - isLoaded(): boolean; - /** Indicates whether or not the DataSource is currently being loaded. */ - isLoading(): boolean; - /** Returns the array of items currently operated by the DataSource. */ - items(): Array; - /** Returns the key expression. */ - key(): any; - /** Starts loading data. */ - load(): JQueryPromise>; - /** Returns an object that would be passed to the load() method of the underlying Store according to the current data shaping option values of the current DataSource instance. */ - loadOptions(): Object; - /** Returns the current pageSize option value. */ - pageSize(): number; - /** Sets the pageSize option value. */ - pageSize(value: number): void; - /** Specifies the index of the currently loaded page. */ - pageIndex(): number; - /** Specifies the index of the page to be loaded during the next load() method execution. */ - pageIndex(newIndex: number): void; - /** Returns the current paginate option value. */ - paginate(): boolean; - /** Sets the paginate option value. */ - paginate(value: boolean): void; - /** Returns the searchExpr option value. */ - searchExpr(): Object; - /** Sets the searchExpr option value. */ - searchExpr(expr: Object): void; - /** Returns the currently specified search operation. */ - searchOperation(): string; - /** Sets the current search operation. */ - searchOperation(op: string): void; - /** Returns the searchValue option value. */ - searchValue(): Object; - /** Sets the searchValue option value. */ - searchValue(value: Object): void; - /** Returns the current select option value. */ - select(): Object; - /** Sets the select option value. */ - select(expr: Object): void; - /** Returns the current requireTotalCount option value. */ - requireTotalCount(): boolean; - /** Sets the requireTotalCount option value. */ - requireTotalCount(value: boolean): void; - /** Returns the current sort option value. */ - sort(): Object; - /** Sets the sort option value. */ - sort(sortExpr: Object): void; - /** Returns the underlying Store instance. */ - store(): Store; - /** Returns the number of data items available in an underlying Store after the last load() operation without paging. */ - totalCount(): number; - on(eventName: "loadingChanged", eventHandler: (isLoading: boolean) => void): DataSource; - on(eventName: "loadError", eventHandler: (e?: Error) => void): DataSource; - on(eventName: "changed", eventHandler: () => void): DataSource; - on(eventName: string, eventHandler: Function): DataSource; - on(events: { [eventName: string]: Function; }): DataSource; - off(eventName: "loadingChanged"): DataSource; - off(eventName: "loadError"): DataSource; - off(eventName: "changed"): DataSource; - off(eventName: string): DataSource; - off(eventName: "loadingChanged", eventHandler: (isLoading: boolean) => void): DataSource; - off(eventName: "loadError", eventHandler: (e?: Error) => void): DataSource; - off(eventName: "changed", eventHandler: () => void): DataSource; - off(eventName: string, eventHandler: Function): DataSource; - } - /** An object used to work with primitive data types not supported by JavaScript when accessing an OData web service. */ - export class EdmLiteral { - /** Creates an EdmLiteral instance and assigns the specified value to it. */ - constructor(value: string); - /** Returns a string representation of the value associated with this EdmLiteral object. */ - valueOf(): string; - } - /** An object used to generate and hold the GUID. */ - export class Guid { - /** Creates a new Guid instance that holds the specified GUID. */ - constructor(value: string); - /** Creates a new Guid instance holding the generated GUID. */ - constructor(); - /** Returns a string representation of the Guid instance. */ - toString(): string; - /** Returns a string representation of the Guid instance. */ - valueOf(): string; - } - export interface LocalStoreOptions extends ArrayStoreOptions { - /** Specifies the time (in miliseconds) after the change operation, before the data is flushed. */ - flushInterval?: number; - /** Specifies whether the data is flushed immediatelly after each change operation, or after the delay specified via the flushInterval option. */ - immediate?: boolean; - /** The unique identifier used to distinguish the data within the HTML5 Web Storage. */ - name?: string; - } - /** A Store providing access to the HTML5 Web Storage. */ - export class LocalStore extends ArrayStore { - constructor(options?: LocalStoreOptions); - /** Removes all data associated with this Store. */ - clear(): void; - } - export interface ODataContextOptions extends ODataStoreOptions { - /** Specifies the list of entities to be accessed via the ODataContext. */ - entities?: Object; - /** Specifies the function called if the ODataContext causes an error. */ - errorHandler?: (e: Error) => void; - } - /** Provides access to the entire OData service. */ - export class ODataContext { - constructor(options?: ODataContextOptions); - /** Initiates the specified WebGet service operation that returns a value. For the information on service operations, refer to the OData documentation. */ - get(operationName: string, params: Object): JQueryPromise; - /** Initiates the specified WebGet service operation that returns nothing. For the information on service operations, refer to the OData documentation. */ - invoke(operationName: string, params: Object, httpMethod: Object): JQueryPromise; - /** Return a special proxy object to describe the entity link. */ - objectLink(entityAlias: string, key: any): Object; - } - export interface ODataStoreOptions extends StoreOptions { - /** A function used to customize a web request before it is sent. */ - beforeSend?: (request: { - url: string; - async: boolean; - method: string; - timeout: number; - params: Object; - payload: Object; - headers: Object; - }) => void; - /** Specifies whether the ODataStore uses the JSONP approach to access non-CORS-compatible remote services. */ - jsonp?: boolean; - /** Specifies the type of the ODataStore key property. The following key types are supported out of the box: String, Int32, Int64, and Guid. */ - keyType?: any; - /** Specifies whether or not dates found in the response are deserialized. */ - deserializeDates?: boolean; - /** Specifies the URL of the data service being accessed via the current ODataContext. */ - url?: string; - /** Specifies the version of the OData protocol used to interact with the data service. */ - version?: number; - /** Specifies the value of the withCredentials field of the underlying jqXHR object. */ - withCredentials?: boolean; - } - /** A Store providing access to a separate OData web service entity. */ - export class ODataStore extends Store { - constructor(options?: ODataStoreOptions); - /** Creates the Query object for the OData endpoint. */ - createQuery(loadOptions: Object): Object; - /** Returns the data item specified by the key. */ - byKey(key: any, extraOptions?: { expand?: Object }): JQueryPromise; - } - /** An universal chainable data query interface object. */ - export interface Query { - /** Calculates a custom summary for the items in the current Query. */ - aggregate(step: (accumulator: any, value: any) => any): JQueryPromise; - /** Calculates a custom summary for the items in the current Query. */ - aggregate(seed: any, step: (accumulator: any, value: any) => any, finalize: (result: any) => any): JQueryPromise; - /** Calculates the average item value for the current Query. */ - avg(getter: Object): JQueryPromise; - /** Finds the item with the maximum getter value. */ - max(getter: Object): JQueryPromise; - /** Finds the item with the maximum value in the Query. */ - max(): JQueryPromise; - /** Finds the item with the minimum value in the Query. */ - min(): JQueryPromise; - /** Finds the item with the minimum getter value. */ - min(getter: Object): JQueryPromise; - /** Calculates the average item value for the current Query, if each Query item has a numeric type. */ - avg(): JQueryPromise; - /** Returns the total count of items in the current Query. */ - count(): JQueryPromise; - /** Executes the Query. */ - enumerate(): JQueryPromise; - /** Filters the current Query data. */ - filter(criteria: Array): Query; - /** Groups the current Query data. */ - groupBy(getter: Object): Query; - /** Applies the specified transformation to each item. */ - select(getter: Object): Query; - /** Limits the data item count. */ - slice(skip: number, take?: number): Query; - /** Sorts current Query data. */ - sortBy(getter: Object, desc: boolean): Query; - /** Sorts current Query data. */ - sortBy(getter: Object): Query; - /** Calculates the sum of item getter values in the current Query. */ - sum(getter: Object): JQueryPromise; - /** Calculates the sum of item values in the current Query. */ - sum(): JQueryPromise; - /** Adds one more sorting condition to the current Query. */ - thenBy(getter: Object): Query; - /** Adds one more sorting condition to the current Query. */ - thenBy(getter: Object, desc: boolean): Query; - /** Returns the array of current Query items. */ - toArray(): Array; - } - /** The global data layer error handler. */ - export var errorHandler: (e: Error) => void; - /** Encodes the specified string or array of bytes to base64 encoding. */ - export function base64_encode(input: any): string; - /** Creates a Query instance. */ - export function query(array: Array): Query; - /** Creates a Query instance for accessing the remote service specified by a URL. */ - export function query(url: string, queryOptions: Object): Query; - /** This section describes the utility objects provided by the DevExtreme data layer. */ - export var utils: { - /** Compiles a getter function from the getter expression. */ - compileGetter(expr: any): Function; - /** Compiles a setter function from the setter expression. */ - compileSetter(expr: any): Function; - odata: { - /** Holds key value converters for OData. */ - keyConverters: { - String(value: any): string; - Int32(value: any): number; - Int64(value: any): EdmLiteral; - Guid(value: any): Guid; - Boolean(value: any): boolean; - Single(value: any): EdmLiteral; - Decimal(value: any): EdmLiteral; - }; - } - } - } - /** An object that serves as a namespace for DevExtreme UI widgets as well as for methods implementing UI logic in DevExtreme sites/applications. */ - export module ui { - export interface WidgetOptions extends DOMComponentOptions { - /** A Boolean value specifying whether or not the widget changes its state when interacting with a user. */ - activeStateEnabled?: boolean; - /** A Boolean value specifying whether or not the widget can respond to user interaction. */ - disabled?: boolean; - /** A Boolean value specifying whether or not the widget changes its state when being hovered by an end user. */ - hoverStateEnabled?: boolean; - /** Specifies whether or not the widget can be focused. */ - focusStateEnabled?: boolean; - /** Specifies a shortcut key that sets focus on the widget element. */ - accessKey?: string; - /** A Boolean value specifying whether or not the widget is visible. */ - visible?: boolean; - /** Specifies the widget tab index. */ - tabIndex?: number; - /** Specifies the text of the hint displayed for the widget. */ - hint?: string; - } - /** The base class for widgets. */ - export class Widget extends DOMComponent { - constructor(options?: WidgetOptions); - /** Redraws the widget. */ - repaint(): void; - /** Sets focus on the widget. */ - focus(): void; - /** Registers a handler when a specified key is pressed. */ - registerKeyHandler(key: string, handler: Function): void; - } - export interface CollectionWidgetOptions extends WidgetOptions { - /** A data source used to fetch data to be displayed by the widget. */ - dataSource?: any; - /** The time period in milliseconds before the onItemHold event is raised. */ - itemHoldTimeout?: number; - /** An array of items displayed by the widget. */ - items?: Array; - /** The template to be used for rendering items. */ - itemTemplate?: any; - loopItemFocus?: boolean; - /** The text or HTML markup displayed by the widget if the item collection is empty. */ - noDataText?: string; - onContentReady?: any; - /** A handler for the itemClick event. */ - onItemClick?: any; - /** A handler for the itemContextMenu event. */ - onItemContextMenu?: Function; - /** A handler for the itemHold event. */ - onItemHold?: Function; - /** A handler for the itemRendered event. */ - onItemRendered?: Function; - /** A handler for the selectionChanged event. */ - onSelectionChanged?: Function; - /** The index of the currently selected widget item. */ - selectedIndex?: number; - /** The selected item object. */ - selectedItem?: Object; - /** An array of currently selected item objects. */ - selectedItems?: Array; - /** A handler for the itemDeleting event. */ - onItemDeleting?: Function; - /** A handler for the itemDeleted event. */ - onItemDeleted?: Function; - /** A handler for the itemReordered event. */ - onItemReordered?: Function; - } - /** The base class for widgets containing an item collection. */ - export class CollectionWidget extends Widget { - constructor(element: JQuery, options?: CollectionWidgetOptions); - constructor(element: HTMLElement, options?: CollectionWidgetOptions); - selectItem(itemElement: any): void; - unselectItem(itemElement: any): void; - deleteItem(itemElement: any): JQueryPromise; - isItemSelected(itemElement: any): boolean; - reorderItem(itemElement: any, toItemElement: any): JQueryPromise; - } - export interface DataExpressionMixinOptions { - /** A data source used to fetch data to be displayed by the widget. */ - dataSource?: any; - /** Specifies the name of the data source item field whose value is displayed by the widget. */ - displayExpr?: any; - /** Specifies the name of a data source item field whose value is held in the value configuration option. */ - valueExpr?: any; - /** An array of items displayed by the widget. */ - items?: Array; - /** The template to be used for rendering items. */ - itemTemplate?: any; - /** The currently selected value in the widget. */ - value?: Object; - } - export interface EditorOptions extends WidgetOptions { - /** The currently specified value. */ - value?: Object; - /** A handler for the valueChanged event. */ - onValueChanged?: Function; - /** A Boolean value specifying whether or not the widget is read-only. */ - readOnly?: boolean; - /** Holds the object that defines the error that occurred during validation. */ - validationError?: Object; - /** Specifies whether the editor's value is valid. */ - isValid?: boolean; - /** Specifies how the message about the validation rules that are not satisfied by this editor's value is displayed. */ - validationMessageMode?: string; - } - /** A base class for editors. */ - export class Editor extends Widget { - /** Resets the editor's value to undefined. */ - reset(): void; - } - /** An object that serves as a namespace for methods displaying a message in an application/site. */ - export var dialog: { - /** Creates an alert dialog message containing a single "OK" button. */ - alert(message: string, title: string): JQueryPromise; - /** Creates a confirm dialog that contains "Yes" and "No" buttons. */ - confirm(message: string, title: string): JQueryPromise; - /** Creates a custom dialog using the options specified by the passed configuration object. */ - custom(options: { title?: string; message?: string; buttons?: Array; }): { - show(): JQueryPromise; - hide(): void; - hide(value: any): void; - }; - }; - /** Creates a toast message. */ - export function notify(message: any, type: string, displayTime: number): void; - /** Creates a toast message. */ - export function notify(options: Object): void; - /** An object that serves as a namespace for the methods that work with DevExtreme CSS Themes. */ - export var themes: { - /** Returns the name of the currently applied theme. */ - current(): string; - /** Changes the current theme to the specified one. */ - current(themeName: string): void; - }; - /** Sets a specified template engine. */ - export function setTemplateEngine(name: string): void; - /** Sets a custom template engine defined via custom compile and render functions. */ - export function setTemplateEngine(options: Object): void; - } - /** An object that serves as a namespace for utility methods that can be helpful when working with the DevExtreme framework and UI widgets. */ - export var utils: { - /** Sets parameters for the viewport meta tag. */ - initMobileViewport(options: { allowZoom?: boolean; allowPan?: boolean; allowSelection?: boolean }): void; - /** Requests that the browser call a specified function to update animation before the next repaint. */ - requestAnimationFrame(callback: Function): number; - /** Cancels an animation frame request scheduled with the requestAnimationFrame method. */ - cancelAnimationFrame(requestID: number): void; - }; - /** An object that serves as a namespace for DevExtreme Data Visualization Widgets. */ - export module viz { - /** Applies a theme for the entire page with several DevExtreme visualization widgets. */ - export function currentTheme(theme: string): void; - /** Applies a new theme (with the color scheme defined separately) for the entire page with several DevExtreme visualization widgets. */ - export function currentTheme(platform: string, colorScheme: string): void; - /** Registers a new theme based on the existing one. */ - export function registerTheme(customTheme: Object, baseTheme: string): void; - /** Applies a predefined or registered custom palette to all visualization widgets at once. */ - export function currentPalette(paletteName: string): void; - /** Obtains the color sets of a predefined or registered palette. */ - export function getPalette(paletteName: string): Object; - /** Registers a new palette. */ - export function registerPalette(paletteName: string, palette: Object): void; - } -} -declare module DevExpress.ui { - export interface dxValidatorOptions extends DOMComponentOptions { - /** An array of validation rules to be checked for the editor with which the dxValidator object is associated. */ - validationRules?: Array; - /** Specifies the editor name to be used in the validation default messages. */ - name?: string; - /** An object that specifies what and when to validate and how to apply the validation result. */ - adapter?: Object; - /** Specifies the validation group the editor will be related to. */ - validationGroup?: string; - /** A handler for the validated event. */ - onValidated?: (params: validationEngine.ValidatorValidationResult) => void; - } - /** A widget that is used to validate the associated DevExtreme editors against the defined validation rules. */ - export class dxValidator extends DOMComponent implements validationEngine.IValidator { - constructor(element: JQuery, options?: dxValidatorOptions); - constructor(element: Element, options?: dxValidatorOptions); - /** Validates the value of the editor that is controlled by the current dxValidator object against the list of the specified validation rules. */ - validate(): validationEngine.ValidatorValidationResult; - /** Resets the value and validation result of the editor associated with the current dxValidator object. */ - reset(): void; - } - /** The widget that is used in the Knockout and Angular approaches to combine the editors to be validated. */ - export class dxValidationGroup extends DOMComponent { - constructor(element: JQuery); - constructor(element: Element); - /** Validates rules of the validators that belong to the current validation group. */ - validate(): validationEngine.ValidationGroupValidationResult; - /** Resets the value and validation result of the editors that are included to the current validation group. */ - reset(): void; - } - export interface dxValidationSummaryOptions extends CollectionWidgetOptions { - /** Specifies the validation group for which summary should be generated. */ - validationGroup?: string; - } - /** A widget for displaying the result of checking validation rules for editors. */ - export class dxValidationSummary extends CollectionWidget { - constructor(element: JQuery, options?: dxValidationSummaryOptions); - constructor(element: Element, options?: dxValidationSummaryOptions); - } - export interface dxResizableOptions extends DOMComponentOptions { - /** Specifies which borders of the widget element are used as a handle. */ - handles?: string; - /** Specifies the lower width boundary for resizing. */ - minWidth?: number; - /** Specifies the upper width boundary for resizing. */ - maxWidth?: number; - /** Specifies the lower height boundary for resizing. */ - minHeight?: number; - /** Specifies the upper height boundary for resizing. */ - maxHeight?: number; - /** A handler for the resizeStart event. */ - onResizeStart?: Function; - /** A handler for the resize event. */ - onResize?: Function; - /** A handler for the resizeEnd event. */ - onResizeEnd?: Function; - } - /** A widget that displays required content in a resizable element. */ - export class dxResizable extends DOMComponent { - constructor(element: JQuery, options?: dxResizableOptions); - constructor(element: Element, options?: dxResizableOptions); - } - export interface dxTooltipOptions extends dxPopoverOptions { - } - /** A tooltip widget. */ - export class dxTooltip extends dxPopover { - constructor(element: JQuery, options?: dxTooltipOptions); - constructor(element: Element, options?: dxTooltipOptions); - } - export interface dxDropDownListOptions extends dxDropDownEditorOptions, DataExpressionMixinOptions { - /** Returns the value currently displayed by the widget. */ - displayValue?: string; - /** The minimum number of characters that must be entered into the text box to begin a search. */ - minSearchLength?: number; - /** Specifies whether or not the widget displays unfiltered values until a user types a number of characters exceeding the minSearchLength option value. */ - showDataBeforeSearch?: boolean; - /** Specifies the name of a data source item field or an expression whose value is compared to the search criterion. */ - searchExpr?: Object; - /** Specifies the binary operation used to filter data. */ - searchMode?: string; - /** Specifies the time delay, in milliseconds, after the last character has been typed in, before a search is executed. */ - searchTimeout?: number; - /** A handler for the valueChanged event. */ - onValueChanged?: Function; - /** Specifies DOM event names that update a widget's value. */ - valueChangeEvent?: string; - /** Specifies whether or not the widget supports searching. */ - searchEnabled?: boolean; - /** - * Specifies whether or not the widget displays items by pages. - * @deprecated dataSource.paginate.md - */ - pagingEnabled?: boolean; - /** The text or HTML markup displayed by the widget if the item collection is empty. */ - noDataText?: string; - /** A handler for the selectionChanged event. */ - onSelectionChanged?: Function; - /** A handler for the itemClick event. */ - onItemClick?: Function; - onContentReady?: Function; - } - /** A base class for drop-down list widgets. */ - export class dxDropDownList extends dxDropDownEditor { - constructor(element: JQuery, options?: dxDropDownListOptions); - constructor(element: Element, options?: dxDropDownListOptions); - } - export interface dxToolbarOptions extends CollectionWidgetOptions { - /** The template used to render menu items. */ - menuItemTemplate?: any; - /** Informs the widget about its location in a view HTML markup. */ - renderAs?: string; - } - /** A toolbar widget. */ - export class dxToolbar extends CollectionWidget { - constructor(element: JQuery, options?: dxToolbarOptions); - constructor(element: Element, options?: dxToolbarOptions); - } - export interface dxToastOptions extends dxOverlayOptions { - animation?: fx.AnimationOptions; - /** The time span in milliseconds during which the dxToast widget is visible. */ - displayTime?: number; - height?: any; - /** The dxToast message text. */ - message?: string; - position?: PositionOptions; - shading?: boolean; - /** Specifies the dxToast widget type. */ - type?: string; - width?: any; - closeOnBackButton?: boolean; - /** A Boolean value specifying whether or not the toast is closed if a user swipes it out of the screen boundaries. */ - closeOnSwipe?: boolean; - /** A Boolean value specifying whether or not the toast is closed if a user clicks it. */ - closeOnClick?: boolean; - } - /** The toast message widget. */ - export class dxToast extends dxOverlay { - constructor(element: JQuery, options?: dxToastOptions); - constructor(element: Element, options?: dxToastOptions); - } - export interface dxTextEditorOptions extends EditorOptions { - /** A handler for the change event. */ - onChange?: Function; - /** A handler for the copy event. */ - onCopy?: Function; - /** A handler for the cut event. */ - onCut?: Function; - /** A handler for the enterKey event. */ - onEnterKey?: Function; - /** A handler for the focusIn event. */ - onFocusIn?: Function; - /** A handler for the focusOut event. */ - onFocusOut?: Function; - /** A handler for the input event. */ - onInput?: Function; - /** A handler for the keyDown event. */ - onKeyDown?: Function; - /** A handler for the keyPress event. */ - onKeyPress?: Function; - /** A handler for the keyUp event. */ - onKeyUp?: Function; - /** A handler for the paste event. */ - onPaste?: Function; - /** The text displayed by the widget when the widget value is empty. */ - placeholder?: string; - /** Specifies whether to display the Clear button in the widget. */ - showClearButton?: boolean; - /** Specifies the current value displayed by the widget. */ - value?: any; - /** Specifies DOM event names that update a widget's value. */ - valueChangeEvent?: string; - /** Specifies whether or not the widget checks the inner text for spelling mistakes. */ - spellcheck?: boolean; - /** Specifies HTML attributes applied to the inner input element of the widget. */ - attr?: Object; - /** The read-only option that holds the text displayed by the widget input element. */ - text?: string; - focusStateEnabled?: boolean; - hoverStateEnabled?: boolean; - /** The editor mask that specifies the format of the entered string. */ - mask?: string; - /** Specifies a mask placeholder character. */ - maskChar?: string; - /** Specifies custom mask rules. */ - maskRules?: Object; - /** A message displayed when the entered text does not match the specified pattern. */ - maskInvalidMessage?: string; - /** Specifies whether the value option holds only characters entered by a user or prompt characters as well. */ - useMaskedValue?: boolean; - } - /** A base class for text editing widgets. */ - export class dxTextEditor extends Editor { - constructor(element: JQuery, options?: dxTextEditorOptions); - constructor(element: Element, options?: dxTextEditorOptions); - /** Removes focus from the input element. */ - blur(): void; - /** Sets focus to the input element representing the widget. */ - focus(): void; - } - export interface dxTextBoxOptions extends dxTextEditorOptions { - /** Specifies the maximum number of characters you can enter into the textbox. */ - maxLength?: any; - /** The "mode" attribute value of the actual HTML input element representing the text box. */ - mode?: string; - } - /** A single-line text box widget. */ - export class dxTextBox extends dxTextEditor { - constructor(element: JQuery, options?: dxTextBoxOptions); - constructor(element: Element, options?: dxTextBoxOptions); - } - export interface dxTextAreaOptions extends dxTextBoxOptions { - /** Specifies whether or not the widget checks the inner text for spelling mistakes. */ - spellcheck?: boolean; - } - /** A widget used to display and edit multi-line text. */ - export class dxTextArea extends dxTextBox { - constructor(element: JQuery, options?: dxTextAreaOptions); - constructor(element: Element, options?: dxTextAreaOptions); - } - export interface dxTabsOptions extends CollectionWidgetOptions { - /** Specifies whether the widget enables an end-user to select only a single item or multiple items. */ - selectionMode?: string; - /** Specifies whether or not an end-user can scroll tabs by swiping. */ - scrollByContent?: boolean; - /** Specifies whether or not an end-user can scroll tabs. */ - scrollingEnabled?: boolean; - /** A Boolean value that specifies the availability of navigation buttons. */ - showNavButtons?: boolean; - } - /** A tab strip used to switch between pages. */ - export class dxTabs extends CollectionWidget { - constructor(element: JQuery, options?: dxTabsOptions); - constructor(element: Element, options?: dxTabsOptions); - } - export interface dxTabPanelOptions extends dxMultiViewOptions { - /** A handler for the titleClick event. */ - onTitleClick?: any; - /** A handler for the titleHold event. */ - onTitleHold?: Function; - /** A handler for the titleRendered event. */ - onTitleRendered?: Function; - /** The template to be used for rendering an item title. */ - itemTitleTemplate?: any; - /** A Boolean value specifying if the list is scrolled by content. */ - scrollByContent?: boolean; - /** A Boolean value specifying whether to enable or disable scrolling. */ - scrollingEnabled?: boolean; - /** A Boolean value that specifies the availability of navigation buttons. */ - showNavButtons?: boolean; - } - /** A widget used to display a view and to switch between several views by clicking the appropriate tabs. */ - export class dxTabPanel extends dxMultiView { - constructor(element: JQuery, options?: dxTabPanelOptions); - constructor(element: Element, options?: dxTabPanelOptions); - } - export interface dxSelectBoxOptions extends dxDropDownListOptions { - /** Specifies DOM event names that update a widget's value. */ - valueChangeEvent?: string; - /** The template to be used for rendering the widget text field. */ - fieldTemplate?: any; - /** The text that is provided as a hint in the select box editor. */ - placeholder?: string; - /** Specifies whether or not the widget allows an end-user to enter a custom value. */ - fieldEditEnabled?: boolean; - } - /** A widget that allows you to select an item in a dropdown list. */ - export class dxSelectBox extends dxDropDownList { - constructor(element: JQuery, options?: dxSelectBoxOptions); - constructor(element: Element, options?: dxSelectBoxOptions); - } - export interface dxTagBoxOptions extends dxSelectBoxOptions { - /** Holds the list of selected values. */ - values?: Array; - /** A read-only option that holds the last selected value. */ - value?: Object; - } - /** A widget that allows you to select multiple items from a dropdown list. */ - export class dxTagBox extends dxSelectBox { - constructor(element: JQuery, options?: dxTagBoxOptions); - constructor(element: Element, options?: dxTagBoxOptions); - } - export interface dxScrollViewOptions extends dxScrollableOptions { - /** A handler for the pullDown event. */ - onPullDown?: Function; - /** Specifies the text shown in the pullDown panel when pulling the content down lowers the refresh threshold. */ - pulledDownText?: string; - /** Specifies the text shown in the pullDown panel while pulling the content down to the refresh threshold. */ - pullingDownText?: string; - /** A handler for the reachBottom event. */ - onReachBottom?: Function; - /** Specifies the text shown in the pullDown panel displayed when content is scrolled to the bottom. */ - reachBottomText?: string; - /** Specifies the text shown in the pullDown panel displayed when the content is being refreshed. */ - refreshingText?: string; - /** Returns a value indicating if the scrollView content is larger then the widget container. */ - isFull(): boolean; - /** Locks the widget until the release(preventScrollBottom) method is called and executes the function passed to the onPullDown option and the handler assigned to the pullDown event. */ - refresh(): void; - /** Notifies the scroll view that data loading is finished. */ - release(preventScrollBottom: boolean): JQueryPromise; - /** Toggles the loading state of the widget. */ - toggleLoading(showOrHide: boolean): void; - } - /** A widget used to display scrollable content. */ - export class dxScrollView extends dxScrollable { - constructor(element: JQuery, options?: dxScrollViewOptions); - constructor(element: Element, options?: dxScrollViewOptions); - } - export interface dxScrollableLocation { - top?: number; - left?: number; - } - export interface dxScrollableOptions extends DOMComponentOptions { - /** A string value specifying the available scrolling directions. */ - direction?: string; - /** A Boolean value specifying whether or not the widget can respond to user interaction. */ - disabled?: boolean; - /** A handler for the scroll event. */ - onScroll?: Function; - /** Specifies when the widget shows the scrollbar. */ - showScrollbar?: string; - /** A handler for the update event. */ - onUpdated?: Function; - /** Indicates whether to use native or simulated scrolling. */ - useNative?: boolean; - /** A Boolean value specifying whether to enable or disable the bounce-back effect. */ - bounceEnabled?: boolean; - /** A Boolean value specifying whether or not an end-user can scroll the widget content swiping it up or down. */ - scrollByContent?: boolean; - /** A Boolean value specifying whether or not an end-user can scroll the widget content using the scrollbar. */ - scrollByThumb?: boolean; - } - /** A widget used to display scrollable content. */ - export class dxScrollable extends DOMComponent { - constructor(element: JQuery, options?: dxScrollableOptions); - constructor(element: Element, options?: dxScrollableOptions); - /** Returns the height of the scrollable widget in pixels. */ - clientHeight(): number; - /** Returns the width of the scrollable widget in pixels. */ - clientWidth(): number; - /** Returns an HTML element of the widget. */ - content(): JQuery; - /** Scrolls the widget content by the specified number of pixels. */ - scrollBy(distance: number): void; - /** Scrolls widget content by the specified number of pixels in horizontal and vertical directions. */ - scrollBy(distanceObject: dxScrollableLocation): void; - /** Returns the height of the scrollable content in pixels. */ - scrollHeight(): number; - /** Returns the current scroll position against the leftmost position. */ - scrollLeft(): number; - /** Returns how far the scrollable content is scrolled from the top and from the left. */ - scrollOffset(): dxScrollableLocation; - /** Scrolls widget content to the specified position. */ - scrollTo(targetLocation: number): void; - /** Scrolls widget content to a specified position. */ - scrollTo(targetLocation: dxScrollableLocation): void; - /** Scrolls widget content to the specified element. */ - scrollToElement(element: Element): void; - /** Returns the current scroll position against the topmost position. */ - scrollTop(): number; - /** Returns the width of the scrollable content in pixels. */ - scrollWidth(): number; - /** Updates the dimensions of the scrollable contents. */ - update(): void; - } - export interface dxRadioGroupOptions extends CollectionWidgetOptions, DataExpressionMixinOptions { - activeStateEnabled?: boolean; - /** Specifies the radio group layout. */ - layout?: string; - } - /** A widget that enables a user to select one item within a list of items represented by radio buttons. */ - export class dxRadioGroup extends CollectionWidget { - constructor(element: JQuery, options?: dxRadioGroupOptions); - constructor(element: Element, options?: dxRadioGroupOptions); - } - export interface dxPopupOptions extends dxOverlayOptions { - animation?: fx.AnimationOptions; - /** Specifies whether or not to allow a user to drag the popup window. */ - dragEnabled?: boolean; - /** A Boolean value specifying whether or not to display the widget in full-screen mode. */ - fullScreen?: boolean; - position?: PositionOptions; - /** A Boolean value specifying whether or not to display the title in the popup window. */ - showTitle?: boolean; - /** The title in the overlay window. */ - title?: string; - /** A template to be used for rendering the widget title. */ - titleTemplate?: any; - width?: any; - /** Specifies items displayed on the top or bottom toolbar of the popup window. */ - buttons?: Array; - /** Specifies whether or not the widget displays the Close button. */ - showCloseButton?: boolean; - /** A handler for the titleRendered event. */ - onTitleRendered?: Function; - } - /** A widget that displays required content in a popup window. */ - export class dxPopup extends dxOverlay { - constructor(element: JQuery, options?: dxPopupOptions); - constructor(element: Element, options?: dxPopupOptions); - } - export interface dxPopoverOptions extends dxPopupOptions { - /** An object defining animation options of the widget. */ - animation?: fx.AnimationOptions; - /** Specifies the height of the widget. */ - height?: any; - /** An object defining widget positioning options. */ - position?: PositionOptions; - shading?: boolean; - /** A Boolean value specifying whether or not to display the title in the overlay window. */ - showTitle?: boolean; - /** The target element associated with a popover. */ - target?: any; - /** Specifies the width of the widget. */ - width?: any; - } - /** A widget that displays the required content in a popup window. */ - export class dxPopover extends dxPopup { - constructor(element: JQuery, options?: dxPopoverOptions); - constructor(element: Element, options?: dxPopoverOptions); - /** Displays the widget for the specified target element. */ - show(target?: any): JQueryPromise; - } - export interface dxOverlayOptions extends WidgetOptions { - /** An object that defines the animation options of the widget. */ - animation?: fx.AnimationOptions; - /** A Boolean value specifying whether or not the widget is closed if a user presses the Back hardware button. */ - closeOnBackButton?: boolean; - /** A Boolean value specifying whether or not the widget is closed if a user clicks outside of the overlapping window. */ - closeOnOutsideClick?: any; - /** A template to be used for rendering widget content. */ - contentTemplate?: any; - /** Specifies whether widget content is rendered when the widget is shown or when rendering the widget. */ - deferRendering?: boolean; - /** Specifies whether or not an end-user can drag the widget. */ - dragEnabled?: boolean; - /** Specifies whether or not an end user can resize the widget. */ - resizeEnabled?: boolean; - /** The height of the widget in pixels. */ - height?: any; - /** Specifies the maximum height the widget can reach while resizing. */ - maxHeight?: any; - /** Specifies the maximum width the widget can reach while resizing. */ - maxWidth?: any; - /** Specifies the minimum height the widget can reach while resizing. */ - minHeight?: any; - /** Specifies the minimum width the widget can reach while resizing. */ - minWidth?: any; - /** A handler for the hidden event. */ - onHidden?: Function; - /** A handler for the resizeStart event. */ - onResizeStart?: Function; - /** A handler for the resize event. */ - onResize?: Function; - /** A handler for the resizeEnd event. */ - onResizeEnd?: Function; - /** A handler for the hiding event. */ - onHiding?: Function; - /** An object defining widget positioning options. */ - position?: PositionOptions; - /** A Boolean value specifying whether or not the main screen is inactive while the widget is active. */ - shading?: boolean; - /** Specifies the shading color. */ - shadingColor?: string; - /** A handler for the showing event. */ - onShowing?: Function; - /** A handler for the shown event. */ - onShown?: Function; - /** A Boolean value specifying whether or not the widget is visible. */ - visible?: boolean; - /** The widget width in pixels. */ - width?: any; - } - /** A widget displaying the required content in an overlay window. */ - export class dxOverlay extends Widget { - constructor(element: JQuery, options?: dxOverlayOptions); - constructor(element: Element, options?: dxOverlayOptions); - /** An HTML element of the widget. */ - content(): JQuery; - /** Hides the widget. */ - hide(): JQueryPromise; - /** Recalculates the overlay's size and position. */ - repaint(): void; - /** Shows the widget. */ - show(): JQueryPromise; - /** Toggles the visibility of the widget. */ - toggle(showing: boolean): JQueryPromise; - /** A static method that specifies the base z-index for all overlay widgets. */ - static baseZIndex(zIndex: number): void; - } - export interface dxNumberBoxOptions extends dxTextEditorOptions { - /** The maximum value accepted by the number box. */ - max?: number; - /** The minimum value accepted by the number box. */ - min?: number; - /** Specifies whether or not to show spin buttons. */ - showSpinButtons?: boolean; - useTouchSpinButtons?: boolean; - /** Specifies by which value the widget value changes when a spin button is clicked. */ - step?: number; - /** The current number box value. */ - value?: number; - } - /** A textbox widget that enables a user to enter numeric values. */ - export class dxNumberBox extends dxTextEditor { - constructor(element: JQuery, options?: dxNumberBoxOptions); - constructor(element: Element, options?: dxNumberBoxOptions); - } - export interface dxNavBarOptions extends dxTabsOptions { - scrollingEnabled?: boolean; - } - /** A widget that contains items used to navigate through application views. */ - export class dxNavBar extends dxTabs { - constructor(element: JQuery, options?: dxNavBarOptions); - constructor(element: Element, options?: dxNavBarOptions); - } - export interface dxMultiViewOptions extends CollectionWidgetOptions { - /** Specifies whether or not to animate the displayed item change. */ - animationEnabled?: boolean; - /** A Boolean value specifying whether or not to scroll back to the first item after the last item is swiped. */ - loop?: boolean; - /** The index of the currently displayed item. */ - selectedIndex?: number; - /** A Boolean value specifying whether or not to allow users to change the selected index by swiping. */ - swipeEnabled?: boolean; - /** Specifies whether widget content is rendered when the widget is shown or when rendering the widget. */ - deferRendering?: boolean; - } - /** A widget used to display a view and to switch between several views. */ - export class dxMultiView extends CollectionWidget { - constructor(element: JQuery, options?: dxMultiViewOptions); - constructor(element: Element, options?: dxMultiViewOptions); - } - export interface dxMapOptions extends WidgetOptions { - /** Specifies whether or not the widget automatically adjusts center and zoom option values when adding a new marker or route. */ - autoAdjust?: boolean; - center?: { - /** The latitude location displayed in the center of the widget. */ - lat?: number; - /** The longitude location displayed in the center of the widget. */ - lng?: number; - }; - /** A handler for the click event. */ - onClick?: any; - /** Specifies whether or not map widget controls are available. */ - controls?: boolean; - /** Specifies the height of the widget. */ - height?: any; - /** A key used to authenticate the application within the required map provider. */ - key?: { - /** A key used to authenticate the application within the "Bing" map provider. */ - bing?: string; - /** A key used to authenticate the application within the "Google" map provider. */ - google?: string; - /** A key used to authenticate the application within the "Google Static" map provider. */ - googleStatic?: string; - } - /** A handler for the markerAdded event. */ - onMarkerAdded?: Function; - /** A URL pointing to the custom icon to be used for map markers. */ - markerIconSrc?: string; - /** A handler for the markerRemoved event. */ - onMarkerRemoved?: Function; - /** An array of markers displayed on a map. */ - markers?: Array; - /** The name of the current map data provider. */ - provider?: string; - /** A handler for the ready event. */ - onReady?: Function; - /** A handler for the routeAdded event. */ - onRouteAdded?: Function; - /** A handler for the routeRemoved event. */ - onRouteRemoved?: Function; - /** An array of routes shown on the map. */ - routes?: Array; - /** The type of a map to display. */ - type?: string; - /** Specifies the width of the widget. */ - width?: any; - /** The zoom level of the map. */ - zoom?: number; - } - /** An interactive map widget. */ - export class dxMap extends Widget { - constructor(element: JQuery, options?: dxMapOptions); - constructor(element: Element, options?: dxMapOptions); - /** Adds a marker to the map. */ - addMarker(markerOptions: Object): JQueryPromise; - /** Adds a route to the map. */ - addRoute(routeOptions: Object): JQueryPromise; - /** Removes a marker from the map. */ - removeMarker(marker: Object): JQueryPromise; - /** Removes a route from the map. */ - removeRoute(route: any): JQueryPromise; - } - export interface dxLookupOptions extends dxDropDownListOptions { - /** An object defining widget animation options. */ - animation?: fx.AnimationOptions; - /** The text displayed on the Cancel button. */ - cancelButtonText?: string; - /** The text displayed on the Clear button. */ - clearButtonText?: string; - /** Specifies whether or not the widget cleans the search box when the popup window is displayed. */ - cleanSearchOnOpening?: boolean; - /** A Boolean value specifying whether or not the widget is closed if a user clicks outside of the overlaying window. */ - closeOnOutsideClick?: any; - /** The text displayed on the Apply button. */ - applyButtonText?: string; - /** A Boolean value specifying whether or not to display the lookup in full-screen mode. */ - fullScreen?: boolean; - focusStateEnabled?: boolean; - /** A Boolean value specifying whether or not to group widget items. */ - grouped?: boolean; - /** The name of the template used to display a group header. */ - groupTemplate?: any; - /** The text displayed on the button used to load the next page from the data source. */ - nextButtonText?: string; - /** A handler for the pageLoading event. */ - onPageLoading?: Function; - /** Specifies whether the next page is loaded when a user scrolls the widget to the bottom or when the "next" button is clicked. */ - pageLoadMode?: string; - /** Specifies the text shown in the pullDown panel, which is displayed when the widget is scrolled to the bottom. */ - pageLoadingText?: string; - /** The text displayed by the widget when nothing is selected. */ - placeholder?: string; - /** The height of the widget popup element. */ - popupHeight?: any; - /** The width of the widget popup element. */ - popupWidth?: any; - /** An object defining widget positioning options. */ - position?: PositionOptions; - /** Specifies the text displayed in the pullDown panel when the widget is pulled below the refresh threshold. */ - pulledDownText?: string; - /** Specifies the text shown in the pullDown panel while the list is being pulled down to the refresh threshold. */ - pullingDownText?: string; - /** A handler for the pullRefresh event. */ - onPullRefresh?: Function; - /** A Boolean value specifying whether or not the widget supports the "pull down to refresh" gesture. */ - pullRefreshEnabled?: boolean; - /** Specifies the text displayed in the pullDown panel while the widget is being refreshed. */ - refreshingText?: string; - /** A handler for the scroll event. */ - onScroll?: Function; - /** A Boolean value specifying whether or not the search bar is visible. */ - searchEnabled?: boolean; - /** The text that is provided as a hint in the lookup's search bar. */ - searchPlaceholder?: string; - /** A Boolean value specifying whether or not the main screen is inactive while the lookup is active. */ - shading?: boolean; - /** Specifies whether to display the Cancel button in the lookup window. */ - showCancelButton?: boolean; - /** - * A Boolean value specifying whether the widget loads the next page automatically when you reach the bottom of the list or when a button is clicked. - * @deprecated pageLoadMode.md - */ - showNextButton?: boolean; - /** The title of the lookup window. */ - title?: string; - /** A template to be used for rendering the widget title. */ - titleTemplate?: any; - /** Specifies whether or not the widget uses native scrolling. */ - useNativeScrolling?: boolean; - /** Specifies whether or not to show lookup contents in a dxPopover widget. */ - usePopover?: boolean; - /** A handler for the valueChanged event. */ - onValueChanged?: Function; - /** A handler for the titleRendered event. */ - onTitleRendered?: Function; - /** A Boolean value specifying whether or not to display the title in the popup window. */ - showPopupTitle?: boolean; - } - /** A widget that allows a user to select predefined values from a lookup window. */ - export class dxLookup extends dxDropDownList { - constructor(element: JQuery, options?: dxLookupOptions); - constructor(element: Element, options?: dxLookupOptions); - /** This section lists the data source fields that are used in a default template for lookup drop-down items. */ - } - export interface dxLoadPanelOptions extends dxOverlayOptions { - /** An object defining the animation options of the widget. */ - animation?: fx.AnimationOptions; - /** The delay in milliseconds after which the load panel is displayed. */ - delay?: number; - /** The height of the widget. */ - height?: number; - /** A URL pointing to an image to be used as a load indicator. */ - indicatorSrc?: string; - /** The text displayed in the load panel. */ - message?: string; - /** A Boolean value specifying whether or not to show a load indicator. */ - showIndicator?: boolean; - /** A Boolean value specifying whether or not to show the pane behind the load indicator. */ - showPane?: boolean; - /** The width of the widget. */ - width?: number; - } - /** A widget used to indicate whether or not an element is loading. */ - export class dxLoadPanel extends dxOverlay { - constructor(element: JQuery, options?: dxLoadPanelOptions); - constructor(element: Element, options?: dxLoadPanelOptions); - } - export interface dxLoadIndicatorOptions extends WidgetOptions { - /** Specifies the path to an image used as the indicator. */ - indicatorSrc?: string; - } - /** The widget used to indicate the loading process. */ - export class dxLoadIndicator extends Widget { - constructor(element: JQuery, options?: dxLoadIndicatorOptions); - constructor(element: Element, options?: dxLoadIndicatorOptions); - } - export interface dxListOptions extends CollectionWidgetOptions { - /** A Boolean value specifying whether or not to display a grouped list. */ - grouped?: boolean; - /** The template to be used for rendering item groups. */ - groupTemplate?: any; - onItemDeleting?: Function; - /** A handler for the itemDeleted event. */ - onItemDeleted?: Function; - /** A handler for the groupRendered event. */ - onGroupRendered?: Function; - /** A handler for the itemReordered event. */ - onItemReordered?: Function; - /** A handler for the itemClick event. */ - onItemClick?: any; - /** A handler for the itemSwipe event. */ - onItemSwipe?: Function; - /** The text displayed on the button used to load the next page from the data source. */ - nextButtonText?: string; - /** A handler for the pageLoading event. */ - onPageLoading?: Function; - /** Specifies the text shown in the pullDown panel, which is displayed when the list is scrolled to the bottom. */ - pageLoadingText?: string; - /** Specifies the text displayed in the pullDown panel when the list is pulled below the refresh threshold. */ - pulledDownText?: string; - /** Specifies the text shown in the pullDown panel while the list is being pulled down to the refresh threshold. */ - pullingDownText?: string; - /** A handler for the pullRefresh event. */ - onPullRefresh?: Function; - /** A Boolean value specifying whether or not the widget supports the "pull down to refresh" gesture. */ - pullRefreshEnabled?: boolean; - /** Specifies the text displayed in the pullDown panel while the list is being refreshed. */ - refreshingText?: string; - /** A handler for the scroll event. */ - onScroll?: Function; - /** A Boolean value specifying whether to enable or disable list scrolling. */ - scrollingEnabled?: boolean; - /** Specifies when the widget shows the scrollbar. */ - showScrollbar?: string; - /** Specifies whether or not the widget uses native scrolling. */ - useNativeScrolling?: boolean; - /** A Boolean value specifying whether to enable or disable the bounce-back effect. */ - bounceEnabled?: boolean; - /** A Boolean value specifying if the list is scrolled by content. */ - scrollByContent?: boolean; - /** A Boolean value specifying if the list is scrolled using the scrollbar. */ - scrollByThumb?: boolean; - onItemContextMenu?: Function; - onItemHold?: Function; - /** Specifies whether or not an end-user can collapse groups. */ - collapsibleGroups?: boolean; - /** Specifies whether the next page is loaded when a user scrolls the widget to the bottom or when the "next" button is clicked. */ - pageLoadMode?: string; - /** Specifies whether or not to display controls used to select list items. */ - showSelectionControls?: boolean; - /** Specifies item selection mode. */ - selectionMode?: string; - selectAllText?: string; - onSelectAllChanged?: Function; - /** Specifies the array of items for a context menu called for a list item. */ - menuItems?: Array; - /** Specifies whether an item context menu is shown when a user holds or swipes an item. */ - menuMode?: string; - /** Specifies whether or not an end user can delete list items. */ - allowItemDeleting?: boolean; - /** Specifies the way a user can delete items from the list. */ - itemDeleteMode?: string; - /** Specifies whether or not an end user can reorder list items. */ - allowItemReordering?: boolean; - /** Specifies whether or not to show the loading panel when the DataSource bound to the widget is loading data. */ - indicateLoading?: boolean; - activeStateEnabled?: boolean; - } - /** A list widget. */ - export class dxList extends CollectionWidget { - constructor(element: JQuery, options?: dxListOptions); - constructor(element: Element, options?: dxListOptions); - /** Returns the height of the widget in pixels. */ - clientHeight(): number; - /** Removes the specified item from the list. */ - deleteItem(itemIndex: any): JQueryPromise; - /** Removes the specified item from the list. */ - deleteItem(itemElement: Element): JQueryPromise; - /** Returns a Boolean value that indicates whether or not the specified item is selected. */ - isItemSelected(itemIndex: any): boolean; - /** Returns a Boolean value that indicates whether or not the specified item is selected. */ - isItemSelected(itemElement: Element): boolean; - /** Reloads list data. */ - reload(): void; - /** Moves the specified item to the specified position in the list. */ - reorderItem(itemElement: Element, toItemElement: Element): JQueryPromise; - /** Moves the specified item to the specified position in the list. */ - reorderItem(itemIndex: any, toItemIndex: any): JQueryPromise; - /** Scrolls the list content by the specified number of pixels. */ - scrollBy(distance: number): void; - /** Returns the height of the list content in pixels. */ - scrollHeight(): number; - /** Scrolls list content to the specified position. */ - scrollTo(location: number): void; - /** Scrolls the list to the specified item. */ - scrollToItem(itemElement: Element): void; - /** Scrolls the list to the specified item. */ - scrollToItem(itemIndex: any): void; - /** Returns how far the list content is scrolled from the top. */ - scrollTop(): number; - /** Selects the specified item from the list. */ - selectItem(itemElement: Element): void; - /** Selects the specified item from the list. */ - selectItem(itemIndex: any): void; - /** Deselects the specified item from the list. */ - unselectItem(itemElement: Element): void; - /** Unselects the specified item from the list. */ - unselectItem(itemIndex: any): void; - /** Updates the widget scrollbar according to widget content size. */ - updateDimensions(): JQueryPromise; - /** Expands the specified group. */ - expandGroup(groupIndex: number): JQueryPromise; - /** Collapses the specified group. */ - collapseGroup(groupIndex: number): JQueryPromise; - } - export interface dxGalleryOptions extends CollectionWidgetOptions { - /** The time, in milliseconds, spent on slide animation. */ - animationDuration?: number; - /** Specifies whether or not to animate the displayed item change. */ - animationEnabled?: boolean; - /** A Boolean value specifying whether or not to allow users to switch between items by clicking an indicator. */ - indicatorEnabled?: boolean; - /** A Boolean value specifying whether or not to scroll back to the first item after the last item is swiped. */ - loop?: boolean; - /** The index of the currently active gallery item. */ - selectedIndex?: number; - /** A Boolean value specifying whether or not to display an indicator that points to the selected gallery item. */ - showIndicator?: boolean; - /** A Boolean value that specifies the availability of the "Forward" and "Back" navigation buttons. */ - showNavButtons?: boolean; - /** The time interval in milliseconds, after which the gallery switches to the next item. */ - slideshowDelay?: number; - /** A Boolean value specifying whether or not to allow users to switch between items by swiping. */ - swipeEnabled?: boolean; - /** Specifies whether or not to display parts of previous and next images along the sides of the current image. */ - wrapAround?: boolean; - /** Specifies if the widget stretches images to fit the total gallery width. */ - stretchImages?: boolean; - /** Specifies the width of an area used to display a single image. */ - initialItemWidth?: number; - } - /** An image gallery widget. */ - export class dxGallery extends CollectionWidget { - constructor(element: JQuery, options?: dxGalleryOptions); - constructor(element: Element, options?: dxGalleryOptions); - /** Shows the specified gallery item. */ - goToItem(itemIndex: number, animation: boolean): JQueryPromise; - /** Shows the next gallery item. */ - nextItem(animation: boolean): JQueryPromise; - /** Shows the previous gallery item. */ - prevItem(animation: boolean): JQueryPromise; - } - export interface dxDropDownEditorOptions extends dxTextBoxOptions { - /** Specifies the current value displayed by the widget. */ - value?: Object; - /** A handler for the closed event. */ - onClosed?: Function; - /** A handler for the opened event. */ - onOpened?: Function; - /** Specifies whether or not the drop-down editor is displayed. */ - opened?: boolean; - /** Specifies whether or not the widget allows an end-user to enter a custom value. */ - fieldEditEnabled?: boolean; - /** Specifies the way an end-user applies the selected value. */ - applyValueMode?: string; - /** Specifies whether widget content is rendered when the widget is shown or when rendering the widget. */ - deferRendering?: boolean; - activeStateEnabled?: boolean; - } - /** A drop-down editor widget. */ - export class dxDropDownEditor extends dxTextBox { - constructor(element: JQuery, options?: dxDropDownEditorOptions); - constructor(element: Element, options?: dxDropDownEditorOptions); - /** Closes the drop-down editor. */ - close(): void; - /** Opens the drop-down editor. */ - open(): void; - /** Resets the widget's value to null. */ - reset(): void; - /** Returns an <input> element of the widget. */ - field(): JQuery; - /** Returns an HTML element of the popup window content. */ - content(): JQuery; - } - export interface dxDateBoxOptions extends dxTextEditorOptions { - /** A format used to display date/time information. */ - format?: string; - /** A Globalize format string specifying the date display format. */ - formatString?: string; - /** The last date that can be selected within the widget. */ - max?: any; - /** The minimum date that can be selected within the widget. */ - min?: any; - /** The text displayed by the widget when the widget value is not yet specified. This text is also used as a title of the date picker. */ - placeholder?: string; - /** - * Specifies whether or not a user can pick out a date using the drop-down calendar. - * @deprecated Use 'pickerType' option instead. - */ - useCalendar?: boolean; - /** An object or a value, specifying the date and time currently selected using the date box. */ - value?: any; - /** - * Specifies whether or not the widget uses the native HTML input element. - * @deprecated Use 'pickerType' option instead. - */ - useNative?: boolean; - /** Specifies the interval between neighboring values in the popup list in minutes. */ - interval?: number; - /** Specifies the maximum zoom level of a calendar, which is used to pick the date. */ - maxZoomLevel?: string; - /** Specifies the minimal zoom level of a calendar, which is used to pick the date. */ - minZoomLevel?: string; - /** Specifies the type of date/time picker. */ - pickerType?: string; - /** Specifies the message displayed if the typed value is not a valid date or time. */ - invalidDateMessage?: string; - /** Specifies the message displayed if the specified date is later than the max value or earlier than the min value. */ - dateOutOfRangeMessage?: string; - } - /** A date box widget. */ - export class dxDateBox extends dxDropDownEditor { - constructor(element: JQuery, options?: dxDateBoxOptions); - constructor(element: Element, options?: dxDateBoxOptions); - } - export interface dxCheckBoxOptions extends EditorOptions { - activeStateEnabled?: boolean; - /** Specifies the widget state. */ - value?: boolean; - /** Specifies the text displayed by the check box. */ - text?: string; - } - /** A check box widget. */ - export class dxCheckBox extends Editor { - constructor(element: JQuery, options?: dxCheckBoxOptions); - constructor(element: Element, options?: dxCheckBoxOptions); - } - export interface dxCalendarOptions extends EditorOptions { - activeStateEnabled?: boolean; - /** Specifies a date displayed on the current calendar page. */ - currentDate?: Date; - /** Specifies the first day of a week. */ - firstDayOfWeek?: number; - /** The latest date the widget allows to select. */ - max?: Date; - /** The earliest date the widget allows to select. */ - min?: Date; - /** Specifies whether or not the widget displays a button that selects the current date. */ - showTodayButton?: boolean; - /** Specifies the current calendar zoom level. */ - zoomLevel?: string; - /** Specifies the maximum zoom level of the calendar. */ - maxZoomLevel?: string; - /** Specifies the minimum zoom level of the calendar. */ - minZoomLevel?: string; - /** The template to be used for rendering calendar cells. */ - cellTemplate?: any; - } - /** A calendar widget. */ - export class dxCalendar extends Editor { - constructor(element: JQuery, options?: dxCalendarOptions); - constructor(element: Element, options?: dxCalendarOptions); - } - export interface dxButtonOptions extends WidgetOptions { - /** A Boolean value specifying whether or not the widget changes its state when interacting with a user. */ - activeStateEnabled?: boolean; - /** A handler for the click event. */ - onClick?: any; - /** Specifies the icon to be displayed on the button. */ - icon?: string; - iconSrc?: string; - /** A template to be used for rendering the dxButton widget. */ - template?: any; - /** The text displayed on the button. */ - text?: string; - /** Specifies the button type. */ - type?: string; - /** Specifies the name of the validation group to be accessed in the click event handler. */ - validationGroup?: string; - } - /** A button widget. */ - export class dxButton extends Widget { - constructor(element: JQuery, options?: dxButtonOptions); - constructor(element: Element, options?: dxButtonOptions); - } - export interface dxBoxOptions extends CollectionWidget { - /** Specifies how widget items are aligned along the main direction. */ - align?: string; - /** Specifies the direction of item positioning in the widget. */ - direction?: string; - /** Specifies how widget items are aligned cross-wise. */ - crossAlign?: string; - } - /** A container widget used to arrange inner elements. */ - export class dxBox extends CollectionWidget { - constructor(element: JQuery, options?: dxBoxOptions); - constructor(element: Element, options?: dxBoxOptions); - } - export interface dxResponsiveBoxOptions extends CollectionWidgetOptions { - /** Specifies the collection of rows for the grid used to position layout elements. */ - rows?: Array; - /** Specifies the collection of columns for the grid used to position layout elements. */ - cols?: Array; - /** Specifies the function returning the screen factor depending on the screen width. */ - screenByWidth?: (width: number) => string; - /** Specifies the screen factor with which all elements are located in a single column. */ - singleColumnScreen?: string; - } - /** A widget used to build an adaptive markup that is dependent on screen resolution. */ - export class dxResponsiveBox extends CollectionWidget { - constructor(element: JQuery, options?: dxBoxOptions); - constructor(element: Element, options?: dxBoxOptions); - } - export interface dxAutocompleteOptions extends dxDropDownListOptions { - /** Specifies the current value displayed by the widget. */ - value?: string; - /** The minimum number of characters that must be entered into the text box to begin a search. */ - minSearchLength?: number; - /** Specifies the maximum count of items displayed by the widget. */ - maxItemCount?: number; - /** Gets the currently selected item. */ - selectedItem?: Object; - } - /** A textbox widget that supports autocompletion. */ - export class dxAutocomplete extends dxDropDownList { - constructor(element: JQuery, options?: dxAutocompleteOptions); - constructor(element: Element, options?: dxAutocompleteOptions); - /** Opens the drop-down editor. */ - open(): void; - /** Closes the drop-down editor. */ - close(): void; - } - export interface dxAccordionOptions extends CollectionWidgetOptions { - /** A number specifying the time in milliseconds spent on the animation of the expanding or collapsing of a panel. */ - animationDuration?: number; - /** Specifies the height of the widget. */ - height?: any; - /** Specifies whether all items can be collapsed or whether at least one item must always be expanded. */ - collapsible?: boolean; - /** Specifies whether the widget can expand several items or only a single item at once. */ - multiple?: boolean; - /** The template to be used for rendering dxAccordion items. */ - itemTemplate?: any; - /** A handler for the itemTitleClick event. */ - onItemTitleClick?: any; - /** A handler for the itemTitleHold event. */ - onItemTitleHold?: Function; - /** The template to be used for rendering an item title. */ - itemTitleTemplate?: any; - /** The index number of the currently selected item. */ - selectedIndex?: number; - /** Specifies whether widget content is rendered when the widget is shown or when rendering the widget. */ - deferRendering?: boolean; - } - /** A widget that displays data source items on collapsible panels. */ - export class dxAccordion extends CollectionWidget { - constructor(element: JQuery, options?: dxAccordionOptions); - constructor(element: Element, options?: dxAccordionOptions); - /** Collapses the specified item. */ - collapseItem(index: number): JQueryPromise; - /** Expands the specified item. */ - expandItem(index: number): JQueryPromise; - /** Updates the dimensions of the widget contents. */ - updateDimensions(): JQueryPromise; - } - export interface dxFileUploaderOptions extends EditorOptions { - /** A read-only option that holds a File instance representing the selected file. */ - value?: File; - /** Holds the File instances representing files selected in the widget. */ - values?: Array; - buttonText?: string; - /** The text displayed on the button that opens the file browser. */ - selectButtonText?: string; - /** The text displayed on the button that starts uploading. */ - uploadButtonText?: string; - /** Specifies the text displayed on the area to which an end-user can drop a file. */ - labelText?: string; - /** Specifies the value passed to the name attribute of the underlying input element. */ - name?: string; - /** Specifies whether the widget enables an end-user to select a single file or multiple files. */ - multiple?: boolean; - /** Specifies a file type or several types accepted by the widget. */ - accept?: string; - /** Specifies a target Url for the upload request. */ - uploadUrl?: string; - /** Specifies if an end user can remove a file from the selection and interrupt uploading. */ - allowCanceling?: boolean; - /** Specifies whether or not the widget displays the list of selected files. */ - showFileList?: boolean; - /** Gets the current progress in percentages. */ - progress?: number; - /** The message displayed by the widget when it is ready to upload the specified files. */ - readyToUploadMessage?: string; - /** The message displayed by the widget when uploading is finished. */ - uploadedMessage?: string; - /** The message displayed by the widget on uploading failure. */ - uploadFailedMessage?: string; - /** Specifies how the widget uploads files. */ - uploadMode?: string; - /** A handler for the uploaded event. */ - onUploaded?: Function; - /** A handler for the uploaded event. */ - onProgress?: Function; - /** A handler for the uploadError event. */ - onUploadError?: Function; - /** A handler for the valueChanged event. */ - onValueChanged?: Function; - } - /** A widget used to select and upload a file or multiple files. */ - export class dxFileUploader extends Editor { - constructor(element: JQuery, options?: dxFileUploaderOptions); - constructor(element: Element, options?: dxFileUploaderOptions); - } - export interface dxTrackBarOptions extends EditorOptions { - /** The minimum value the widget can accept. */ - min?: number; - /** The maximum value the widget can accept. */ - max?: number; - /** The current widget value. */ - value?: number; - } - /** A base class for track bar widgets. */ - export class dxTrackBar extends Editor { - constructor(element: JQuery, options?: dxTrackBarOptions); - constructor(element: Element, options?: dxTrackBarOptions); - } - export interface dxProgressBarOptions extends dxTrackBarOptions { - /** Specifies a format for the progress status. */ - statusFormat?: any; - /** Specifies whether or not the widget displays a progress status. */ - showStatus?: boolean; - /** A handler for the complete event. */ - onComplete?: Function; - } - /** A widget used to indicate progress. */ - export class dxProgressBar extends dxTrackBar { - constructor(element: JQuery, options?: dxProgressBarOptions); - constructor(element: Element, options?: dxProgressBarOptions); - } - export interface dxSliderOptions extends dxTrackBarOptions { - activeStateEnabled?: boolean; - /** The slider step size. */ - step?: number; - /** The current slider value. */ - value?: number; - /** Specifies whether or not to highlight a range selected within the widget. */ - showRange?: boolean; - /** Specifies the size of a step by which a slider handle is moved when a user uses the Page up or Page down keyboard shortcuts. */ - keyStep?: number; - /** Specifies options for the slider tooltip. */ - tooltip?: { - /** Specifies whether or not the tooltip is enabled. */ - enabled?: boolean; - /** Specifies format for the tooltip. */ - format?: any; - /** Specifies whether the tooltip is located over or under the slider. */ - position?: string; - /** Specifies whether the widget always shows a tooltip or only when a pointer is over the slider. */ - showMode?: string; - }; - /** Specifies options for labels displayed at the min and max values. */ - label?: { - /** Specifies whether or not slider labels are visible. */ - visible?: boolean; - /** Specifies whether labels are located over or under the scale. */ - position?: string; - /** Specifies a format for labels. */ - format?: any; - }; - } - /** A widget that allows a user to select a numeric value within a given range. */ - export class dxSlider extends dxTrackBar { - constructor(element: JQuery, options?: dxSliderOptions); - constructor(element: Element, options?: dxSliderOptions); - } - export interface dxRangeSliderOptions extends dxSliderOptions { - /** The left edge of the interval currently selected using the range slider. */ - start?: number; - /** The right edge of the interval currently selected using the range slider. */ - end?: number; - } - /** A widget that enables a user to select a range of numeric values. */ - export class dxRangeSlider extends dxSlider { - constructor(element: JQuery, options?: dxRangeSliderOptions); - constructor(element: Element, options?: dxRangeSliderOptions); - } - export interface dxFormItemLabel { - /** Specifies the label text. */ - text?: string; - /** Specifies whether or not the label is visible. */ - visible?: boolean; - /** Specifies whether or not a colon is displayed at the end of the current label. */ - showColon?: boolean; - /** Specifies the location of a label against the editor. */ - location?: string; - /** Specifies the label horizontal alignment. */ - alignment?: string; - } - export interface dxFormItem { - /** Specifies the type of the current item. */ - itemType?: string; - /** Specifies whether or not the current form item is visible. */ - visible?: boolean; - /** Specifies the sequence number of the item in a form, group or tab. */ - visibleIndex?: number; - /** Specifies a CSS class to be applied to the form item. */ - cssClass?: string; - /** Specifies the number of columns spanned by the item. */ - colSpan?: number; - } - export interface dxFormSimpleItem extends dxFormItem { - /** Specifies the path to the formData object field bound to the current form item. */ - dataField?: string; - /** Specifies the form item name. */ - name?: string; - /** Specifie which editor widget is used to display and edit the form item value. */ - editorType?: string; - /** Specifies configuration options for the editor widget of the current form item. */ - editorOptions?: Object; - /** A template to be used for rendering the form item. */ - template?: any; - /** Specifies the help text displayed for the current form item. */ - helpText?: string; - /** Specifies whether the current form item is required. */ - isRequired?: boolean; - /** Specifies options for the form item label. */ - label?: dxFormItemLabel; - /** An array of validation rules to be checked for the form item editor. */ - validationRules?: Array; - } - export interface dxFormGroupItem extends dxFormItem { - /** Specifies the group caption. */ - caption?: string; - /** A template to be used for rendering the group item. */ - template?: any; - /** The count of columns in the group layout. */ - colCount?: number; - /** Specifies whether or not all group item labels are aligned. */ - alignItemLabels?: boolean; - /** Holds an array of form items displayed within the group. */ - items?: Array; - } - export interface dxFormTab { - /** Specifies the tab title. */ - title?: string; - /** The count of columns in the tab layout. */ - colCount?: number; - /** Specifies whether or not labels of items displayed within the current tab are aligned. */ - alignItemLabels?: boolean; - /** Holds an array of form items displayed within the tab. */ - items?: Array; - } - export interface dxFormTabbedItem extends dxFormItem { - /** Holds a configuration object for the dxTabPanel widget used to display the current form item. */ - tabPanelOptions?: Object; - /** An array of tab configuration objects. */ - tabs?: Array; - } - export interface dxFormOptions extends WidgetOptions { - /** An object providing data for the form. */ - formData?: Object; - /** The count of columns in the form layout. */ - colCount?: any; - /** Specifies the location of a label against the editor. */ - labelLocation?: string; - /** Specifies whether or not all editors on the form are read-only. */ - readOnly?: boolean; - /** A handler for the fieldDataChanged event. */ - onFieldDataChanged?: (e: Object) => void; - /** A handler for the editorEnterKey event. */ - onEditorEnterKey?: (e: Object) => void; - /** Specifies a function that customizes a form item after it has been created. */ - customizeItem?: Function; - /** The minimum column width used for calculating column count in the form layout. */ - minColWidth?: number; - /** Specifies whether or not all root item labels are aligned. */ - alignItemLabels?: boolean; - /** Specifies whether or not item labels in all groups are aligned. */ - alignItemLabelsInAllGroups?: boolean; - /** Specifies whether or not a colon is displayed at the end of form labels. */ - showColonAfterLabel?: boolean; - /** Specifies whether or not the required mark is displayed for optional fields. */ - showRequiredMark?: boolean; - /** Specifies whether or not the optional mark is displayed for optional fields. */ - showOptionalMark?: boolean; - /** The text displayed for required fields. */ - requiredMark?: string; - /** The text displayed for optional fields. */ - optionalMark?: string; - /** Specifies whether or not the total validation summary is displayed on the form. */ - showValidationSummary?: boolean; - /** Holds an array of form items. */ - items?: Array; - /** A Boolean value specifying whether to enable or disable form scrolling. */ - scrollingEnabled?: boolean; - } - /** A form widget used to display and edit values of object fields. */ - export class dxForm extends Widget { - constructor(element: JQuery, options?: dxFormOptions); - constructor(element: Element, options?: dxFormOptions); - /** Updates the specified field of the formData object and the corresponding editor on the form. */ - updateData(dataField: string, value: any): void; - /** Updates the specified fields of the formData object and the corresponding editors on the form. */ - updateData(data: Object): void; - /** Updates the value of a form item option. */ - itemOption(field: string, option: string, value: any): void; - /** Updates the values of form item options. */ - itemOption(field: string, options: Object): void; - /** Returns an editor instance associated with the specified formData field. */ - getEditor(field: string): Object; - /** Updates the dimensions of the widget contents. */ - updateDimensions(): JQueryPromise; - /** Validates the values of all editors on the form against the list of the validation rules specified for each form item. */ - validate(): Object; - } -} -interface JQuery { - dxProgressBar(): JQuery; - dxProgressBar(options: "instance"): DevExpress.ui.dxProgressBar; - dxProgressBar(options: string): any; - dxProgressBar(options: string, ...params: any[]): any; - dxProgressBar(options: DevExpress.ui.dxProgressBarOptions): JQuery; - dxSlider(): JQuery; - dxSlider(options: "instance"): DevExpress.ui.dxSlider; - dxSlider(options: string): any; - dxSlider(options: string, ...params: any[]): any; - dxSlider(options: DevExpress.ui.dxSliderOptions): JQuery; - dxRangeSlider(): JQuery; - dxRangeSlider(options: "instance"): DevExpress.ui.dxRangeSlider; - dxRangeSlider(options: string): any; - dxRangeSlider(options: string, ...params: any[]): any; - dxRangeSlider(options: DevExpress.ui.dxRangeSliderOptions): JQuery; - dxFileUploader(): JQuery; - dxFileUploader(options: "instance"): DevExpress.ui.dxFileUploader; - dxFileUploader(options: string): any; - dxFileUploader(options: string, ...params: any[]): any; - dxFileUploader(options: DevExpress.ui.dxFileUploaderOptions): JQuery; - dxValidator(): JQuery; - dxValidator(options: "instance"): DevExpress.ui.dxValidator; - dxValidator(options: string): any; - dxValidator(options: string, ...params: any[]): any; - dxValidator(options: DevExpress.ui.dxValidatorOptions): JQuery; - dxValidationGroup(): JQuery; - dxValidationGroup(options: "instance"): DevExpress.ui.dxValidationGroup; - dxValidationGroup(options: string): any; - dxValidationGroup(options: string, ...params: any[]): any; - dxValidationSummary(): JQuery; - dxValidationSummary(options: "instance"): DevExpress.ui.dxValidationSummary; - dxValidationSummary(options: string): any; - dxValidationSummary(options: string, ...params: any[]): any; - dxValidationSummary(options: DevExpress.ui.dxValidationSummaryOptions): JQuery; - dxTooltip(): JQuery; - dxTooltip(options: "instance"): DevExpress.ui.dxTooltip; - dxTooltip(options: string): any; - dxTooltip(options: string, ...params: any[]): any; - dxTooltip(options: DevExpress.ui.dxTooltipOptions): JQuery; - dxResizable(): JQuery; - dxResizable(options: "instance"): DevExpress.ui.dxResizable; - dxResizable(options: string): any; - dxResizable(options: string, ...params: any[]): any; - dxResizable(options: DevExpress.ui.dxResizableOptions): JQuery; - dxDropDownList(): JQuery; - dxDropDownList(options: "instance"): DevExpress.ui.dxDropDownList; - dxDropDownList(options: string): any; - dxDropDownList(options: string, ...params: any[]): any; - dxDropDownList(options: DevExpress.ui.dxDropDownListOptions): JQuery; - dxToolbar(): JQuery; - dxToolbar(options: "instance"): DevExpress.ui.dxToolbar; - dxToolbar(options: string): any; - dxToolbar(options: string, ...params: any[]): any; - dxToolbar(options: DevExpress.ui.dxToolbarOptions): JQuery; - dxToast(): JQuery; - dxToast(options: "instance"): DevExpress.ui.dxToast; - dxToast(options: string): any; - dxToast(options: string, ...params: any[]): any; - dxToast(options: DevExpress.ui.dxToastOptions): JQuery; - dxTextEditor(): JQuery; - dxTextEditor(options: "instance"): DevExpress.ui.dxTextEditor; - dxTextEditor(options: string): any; - dxTextEditor(options: string, ...params: any[]): any; - dxTextEditor(options: DevExpress.ui.dxTextEditorOptions): JQuery; - dxTextBox(): JQuery; - dxTextBox(options: "instance"): DevExpress.ui.dxTextBox; - dxTextBox(options: string): any; - dxTextBox(options: string, ...params: any[]): any; - dxTextBox(options: DevExpress.ui.dxTextBoxOptions): JQuery; - dxTextArea(): JQuery; - dxTextArea(options: "instance"): DevExpress.ui.dxTextArea; - dxTextArea(options: string): any; - dxTextArea(options: string, ...params: any[]): any; - dxTextArea(options: DevExpress.ui.dxTextAreaOptions): JQuery; - dxTabs(): JQuery; - dxTabs(options: "instance"): DevExpress.ui.dxTabs; - dxTabs(options: string): any; - dxTabs(options: string, ...params: any[]): any; - dxTabs(options: DevExpress.ui.dxTabsOptions): JQuery; - dxTabPanel(): JQuery; - dxTabPanel(options: "instance"): DevExpress.ui.dxTabPanel; - dxTabPanel(options: string): any; - dxTabPanel(options: string, ...params: any[]): any; - dxTabPanel(options: DevExpress.ui.dxTabPanelOptions): JQuery; - dxSelectBox(): JQuery; - dxSelectBox(options: "instance"): DevExpress.ui.dxSelectBox; - dxSelectBox(options: string): any; - dxSelectBox(options: string, ...params: any[]): any; - dxSelectBox(options: DevExpress.ui.dxSelectBoxOptions): JQuery; - dxTagBox(): JQuery; - dxTagBox(options: "instance"): DevExpress.ui.dxTagBox; - dxTagBox(options: string): any; - dxTagBox(options: string, ...params: any[]): any; - dxTagBox(options: DevExpress.ui.dxTagBoxOptions): JQuery; - dxScrollView(): JQuery; - dxScrollView(options: "instance"): DevExpress.ui.dxScrollView; - dxScrollView(options: string): any; - dxScrollView(options: string, ...params: any[]): any; - dxScrollView(options: DevExpress.ui.dxScrollViewOptions): JQuery; - dxScrollable(): JQuery; - dxScrollable(options: "instance"): DevExpress.ui.dxScrollable; - dxScrollable(options: string): any; - dxScrollable(options: string, ...params: any[]): any; - dxScrollable(options: DevExpress.ui.dxScrollableOptions): JQuery; - dxRadioGroup(): JQuery; - dxRadioGroup(options: "instance"): DevExpress.ui.dxRadioGroup; - dxRadioGroup(options: string): any; - dxRadioGroup(options: string, ...params: any[]): any; - dxRadioGroup(options: DevExpress.ui.dxRadioGroupOptions): JQuery; - dxPopup(): JQuery; - dxPopup(options: "instance"): DevExpress.ui.dxPopup; - dxPopup(options: string): any; - dxPopup(options: string, ...params: any[]): any; - dxPopup(options: DevExpress.ui.dxPopupOptions): JQuery; - dxPopover(): JQuery; - dxPopover(options: "instance"): DevExpress.ui.dxPopover; - dxPopover(options: string): any; - dxPopover(options: string, ...params: any[]): any; - dxPopover(options: DevExpress.ui.dxPopoverOptions): JQuery; - dxOverlay(): JQuery; - dxOverlay(options: "instance"): DevExpress.ui.dxOverlay; - dxOverlay(options: string): any; - dxOverlay(options: string, ...params: any[]): any; - dxOverlay(options: DevExpress.ui.dxOverlayOptions): JQuery; - dxNumberBox(): JQuery; - dxNumberBox(options: "instance"): DevExpress.ui.dxNumberBox; - dxNumberBox(options: string): any; - dxNumberBox(options: string, ...params: any[]): any; - dxNumberBox(options: DevExpress.ui.dxNumberBoxOptions): JQuery; - dxNavBar(): JQuery; - dxNavBar(options: "instance"): DevExpress.ui.dxNavBar; - dxNavBar(options: string): any; - dxNavBar(options: string, ...params: any[]): any; - dxNavBar(options: DevExpress.ui.dxNavBarOptions): JQuery; - dxMultiView(): JQuery; - dxMultiView(options: "instance"): DevExpress.ui.dxMultiView; - dxMultiView(options: string): any; - dxMultiView(options: string, ...params: any[]): any; - dxMultiView(options: DevExpress.ui.dxMultiViewOptions): JQuery; - dxMap(): JQuery; - dxMap(options: "instance"): DevExpress.ui.dxMap; - dxMap(options: string): any; - dxMap(options: string, ...params: any[]): any; - dxMap(options: DevExpress.ui.dxMapOptions): JQuery; - dxLookup(): JQuery; - dxLookup(options: "instance"): DevExpress.ui.dxLookup; - dxLookup(options: string): any; - dxLookup(options: string, ...params: any[]): any; - dxLookup(options: DevExpress.ui.dxLookupOptions): JQuery; - dxLoadPanel(): JQuery; - dxLoadPanel(options: "instance"): DevExpress.ui.dxLoadPanel; - dxLoadPanel(options: string): any; - dxLoadPanel(options: string, ...params: any[]): any; - dxLoadPanel(options: DevExpress.ui.dxLoadPanelOptions): JQuery; - dxLoadIndicator(): JQuery; - dxLoadIndicator(options: "instance"): DevExpress.ui.dxLoadIndicator; - dxLoadIndicator(options: string): any; - dxLoadIndicator(options: string, ...params: any[]): any; - dxLoadIndicator(options: DevExpress.ui.dxLoadIndicatorOptions): JQuery; - dxList(): JQuery; - dxList(options: "instance"): DevExpress.ui.dxList; - dxList(options: string): any; - dxList(options: string, ...params: any[]): any; - dxList(options: DevExpress.ui.dxListOptions): JQuery; - dxGallery(): JQuery; - dxGallery(options: "instance"): DevExpress.ui.dxGallery; - dxGallery(options: string): any; - dxGallery(options: string, ...params: any[]): any; - dxGallery(options: DevExpress.ui.dxGalleryOptions): JQuery; - dxDropDownEditor(): JQuery; - dxDropDownEditor(options: "instance"): DevExpress.ui.dxDropDownEditor; - dxDropDownEditor(options: string): any; - dxDropDownEditor(options: string, ...params: any[]): any; - dxDropDownEditor(options: DevExpress.ui.dxDropDownEditorOptions): JQuery; - dxDateBox(): JQuery; - dxDateBox(options: "instance"): DevExpress.ui.dxDateBox; - dxDateBox(options: string): any; - dxDateBox(options: string, ...params: any[]): any; - dxDateBox(options: DevExpress.ui.dxDateBoxOptions): JQuery; - dxCheckBox(): JQuery; - dxCheckBox(options: "instance"): DevExpress.ui.dxCheckBox; - dxCheckBox(options: string): any; - dxCheckBox(options: string, ...params: any[]): any; - dxCheckBox(options: DevExpress.ui.dxCheckBoxOptions): JQuery; - dxBox(): JQuery; - dxBox(options: "instance"): DevExpress.ui.dxBox; - dxBox(options: string): any; - dxBox(options: string, ...params: any[]): any; - dxBox(options: DevExpress.ui.dxBoxOptions): JQuery; - dxButton(): JQuery; - dxButton(options: "instance"): DevExpress.ui.dxButton; - dxButton(options: string): any; - dxButton(options: string, ...params: any[]): any; - dxButton(options: DevExpress.ui.dxButtonOptions): JQuery; - dxCalendar(): JQuery; - dxCalendar(options: "instance"): DevExpress.ui.dxCalendar; - dxCalendar(options: string): any; - dxCalendar(options: string, ...params: any[]): any; - dxCalendar(options: DevExpress.ui.dxCalendarOptions): JQuery; - dxAccordion(): JQuery; - dxAccordion(options: "instance"): DevExpress.ui.dxAccordion; - dxAccordion(options: string): any; - dxAccordion(options: string, ...params: any[]): any; - dxAccordion(options: DevExpress.ui.dxAccordionOptions): JQuery; - dxResponsiveBox(): JQuery; - dxResponsiveBox(options: "instance"): DevExpress.ui.dxResponsiveBox; - dxResponsiveBox(options: string): any; - dxResponsiveBox(options: string, ...params: any[]): any; - dxResponsiveBox(options: DevExpress.ui.dxResponsiveBoxOptions): JQuery; - dxAutocomplete(): JQuery; - dxAutocomplete(options: "instance"): DevExpress.ui.dxAutocomplete; - dxAutocomplete(options: string): any; - dxAutocomplete(options: string, ...params: any[]): any; - dxAutocomplete(options: DevExpress.ui.dxAutocompleteOptions): JQuery; - dxForm(): JQuery; - dxForm(options: "instance"): DevExpress.ui.dxForm; - dxForm(options: string): any; - dxForm(options: string, ...params: any[]): any; - dxForm(options: DevExpress.ui.dxForm): JQuery; -} - -declare module DevExpress.ui { - export interface dxTileViewOptions extends CollectionWidgetOptions { - /** A Boolean value specifying whether or not the widget changes its state when interacting with a user. */ - activeStateEnabled?: boolean; - /** Specifies the height of the base tile view item. */ - baseItemHeight?: number; - /** Specifies the width of the base tile view item. */ - baseItemWidth?: number; - /** Specifies whether tiles are placed horizontally or vertically. */ - direction?: string; - /** Specifies the height of the widget. */ - height?: any; - /** Specifies the distance in pixels between adjacent tiles. */ - itemMargin?: number; - /** A Boolean value specifying whether or not to display a scrollbar. */ - showScrollbar?: boolean; - } - /** A widget displaying several blocks of data as tiles. */ - export class dxTileView extends CollectionWidget { - constructor(element: JQuery, options?: dxTileViewOptions); - constructor(element: Element, options?: dxTileViewOptions); - /** Returns the current scroll position of the widget content. */ - scrollPosition(): number; - } - export interface dxSwitchOptions extends EditorOptions { - activeStateEnabled?: boolean; - /** Text displayed when the widget is in a disabled state. */ - offText?: string; - /** Text displayed when the widget is in an enabled state. */ - onText?: string; - /** A Boolean value specifying whether the current switch state is "On" or "Off". */ - value?: boolean; - } - /** A switch widget. */ - export class dxSwitch extends Editor { - constructor(element: JQuery, options?: dxSwitchOptions); - constructor(element: Element, options?: dxSwitchOptions); - } - export interface dxSlideOutViewOptions extends WidgetOptions { - /** Specifies the current menu position. */ - menuPosition?: string; - /** Specifies whether or not the menu panel is visible. */ - menuVisible?: boolean; - /** Specifies whether or not the menu is shown when a user swipes the widget content. */ - swipeEnabled?: boolean; - /** A template to be used for rendering menu panel content. */ - menuTemplate?: any; - /** A template to be used for rendering widget content. */ - contentTemplate?: any; - } - /** The widget that allows you to slide-out the current view to reveal a custom menu. */ - export class dxSlideOutView extends Widget { - constructor(element: JQuery, options?: dxSlideOutViewOptions); - constructor(element: Element, options?: dxSlideOutViewOptions); - /** Returns an HTML element of the widget menu block. */ - menuContent(): JQuery; - /** Returns an HTML element of the widget content block. */ - content(): JQuery; - /** Displays the widget's menu block. */ - showMenu(): JQueryPromise; - /** Hides the widget's menu block. */ - hideMenu(): JQueryPromise; - /** Toggles the visibility of the widget's menu block. */ - toggleMenuVisibility(): JQueryPromise; - } - export interface dxSlideOutOptions extends CollectionWidgetOptions { - /** A Boolean value specifying whether or not the widget changes its state when interacting with a user. */ - activeStateEnabled?: boolean; - /** A Boolean value specifying whether or not to display a grouped menu. */ - menuGrouped?: boolean; - /** Specifies the current menu position. */ - menuPosition?: string; - /** The name of the template used to display a group header. */ - menuGroupTemplate?: any; - /** The template used to render menu items. */ - menuItemTemplate?: any; - /** A handler for the menuGroupRendered event. */ - onMenuGroupRendered?: Function; - /** A handler for the menuItemRendered event. */ - onMenuItemRendered?: Function; - /** Specifies whether or not the slide-out menu is displayed. */ - menuVisible?: boolean; - /** Indicates whether the menu can be shown/hidden by swiping the widget's main panel. */ - swipeEnabled?: boolean; - /** A template to be used for rendering widget content. */ - contentTemplate?: any; - } - /** The widget that allows you to slide-out the current view to reveal an item list. */ - export class dxSlideOut extends CollectionWidget { - constructor(element: JQuery, options?: dxSlideOutOptions); - constructor(element: Element, options?: dxSlideOutOptions); - /** Hides the widget's slide-out menu. */ - hideMenu(): JQueryPromise; - /** Displays the widget's slide-out menu. */ - showMenu(): JQueryPromise; - /** Toggles the visibility of the widget's slide-out menu. */ - toggleMenuVisibility(showing: boolean): JQueryPromise; - } - export interface dxPivotOptions extends CollectionWidgetOptions { - /** The index of the currently active pivot item. */ - selectedIndex?: number; - /** A Boolean value specifying whether or not to allow users to switch between items by swiping. */ - swipeEnabled?: boolean; - /** A template to be used for rendering widget content. */ - contentTemplate?: any; - /** The template to be used for rendering an item title. */ - itemTitleTemplate?: any; - } - /** A widget that is similar to a traditional tab control, but optimized for the phone with simplified end-user interaction. */ - export class dxPivot extends CollectionWidget { - constructor(element: JQuery, options?: dxPivotOptions); - constructor(element: Element, options?: dxPivotOptions); - } - export interface dxPanoramaOptions extends CollectionWidgetOptions { - /** An object exposing options for setting a background image for the panorama. */ - backgroundImage?: { - /** Specifies the height of the panorama's background image. */ - height?: number; - /** Specifies the URL of the image that is used as the panorama's background image. */ - url?: string; - /** Specifies the width of the panorama's background image. */ - width?: number; - }; - /** The index of the currently active panorama item. */ - selectedIndex?: number; - /** Specifies the widget content title. */ - title?: string; - } - /** A widget displaying the required content in a long horizontal canvas that extends beyond the frames of the screen. */ - export class dxPanorama extends CollectionWidget { - constructor(element: JQuery, options?: dxDropDownEditorOptions); - constructor(element: Element, options?: dxDropDownEditorOptions); - } - export interface dxDropDownMenuOptions extends WidgetOptions { - /** A handler for the buttonClick event. */ - onButtonClick?: any; - /** The name of the icon to be displayed by the DropDownMenu button. */ - buttonIcon?: string; - /** The text displayed in the DropDownMenu button. */ - buttonText?: string; - buttonIconSrc?: string; - /** A data source used to fetch data to be displayed by the widget. */ - dataSource?: any; - /** A handler for the itemClick event. */ - onItemClick?: any; - /** An array of items displayed by the widget. */ - items?: Array; - /** The template to be used for rendering items. */ - itemTemplate?: any; - /** Specifies whether or not to show the drop down menu within a dxPopover widget. */ - usePopover?: boolean; - /** The width of the menu popup in pixels. */ - popupWidth?: any; - /** The height of the menu popup in pixels. */ - popupHeight?: any; - /** Specifies whether or not the drop-down menu is displayed. */ - opened?: boolean; - hoverStateEnabled?: boolean; - } - /** A drop-down menu widget. */ - export class dxDropDownMenu extends Widget { - constructor(element: JQuery, options?: dxDropDownEditorOptions); - constructor(element: Element, options?: dxDropDownEditorOptions); - /** This section lists the data source fields that are used in a default template for drop-down menu items. */ - /** Opens the drop-down menu. */ - open(): void; - /** Closes the drop-down menu. */ - close(): void; - } - export interface dxActionSheetOptions extends CollectionWidgetOptions { - /** A handler for the cancelClick event. */ - onCancelClick?: any; - /** The text displayed in the button that closes the action sheet. */ - cancelText?: string; - /** Specifies whether or not to display the Cancel button in action sheet. */ - showCancelButton?: boolean; - /** A Boolean value specifying whether or not the title of the action sheet is visible. */ - showTitle?: boolean; - /** Specifies the element the action sheet popover points at. */ - target?: any; - /** The title of the action sheet. */ - title?: string; - /** Specifies whether or not to show the action sheet within a dxPopover widget. */ - usePopover?: boolean; - /** A Boolean value specifying whether or not the dxActionSheet widget is visible. */ - visible?: boolean; - } - /** A widget consisting of a set of choices related to a certain task. */ - export class dxActionSheet extends CollectionWidget { - constructor(element: JQuery, options?: dxActionSheetOptions); - constructor(element: Element, options?: dxActionSheetOptions); - /** Hides the widget. */ - hide(): JQueryPromise; - /** Shows the widget. */ - show(): JQueryPromise; - /** Shows or hides the widget depending on the Boolean value passed as the parameter. */ - toggle(showing: boolean): JQueryPromise; - } -} -interface JQuery { - dxTileView(): JQuery; - dxTileView(options: "instance"): DevExpress.ui.dxTileView; - dxTileView(options: string): any; - dxTileView(options: string, ...params: any[]): any; - dxTileView(options: DevExpress.ui.dxTileViewOptions): JQuery; - dxSwitch(): JQuery; - dxSwitch(options: "instance"): DevExpress.ui.dxSwitch; - dxSwitch(options: string): any; - dxSwitch(options: string, ...params: any[]): any; - dxSwitch(options: DevExpress.ui.dxSwitchOptions): JQuery; - dxSlideOut(): JQuery; - dxSlideOut(options: "instance"): DevExpress.ui.dxSlideOut; - dxSlideOut(options: string): any; - dxSlideOut(options: string, ...params: any[]): any; - dxSlideOut(options: DevExpress.ui.dxSlideOutOptions): JQuery; - dxPivot(): JQuery; - dxPivot(options: "instance"): DevExpress.ui.dxPivot; - dxPivot(options: string): any; - dxPivot(options: string, ...params: any[]): any; - dxPivot(options: DevExpress.ui.dxPivotOptions): JQuery; - dxPanorama(): JQuery; - dxPanorama(options: "instance"): DevExpress.ui.dxPanorama; - dxPanorama(options: string): any; - dxPanorama(options: string, ...params: any[]): any; - dxPanorama(options: DevExpress.ui.dxPanoramaOptions): JQuery; - dxActionSheet(): JQuery; - dxActionSheet(options: "instance"): DevExpress.ui.dxActionSheet; - dxActionSheet(options: string): any; - dxActionSheet(options: string, ...params: any[]): any; - dxActionSheet(options: DevExpress.ui.dxActionSheetOptions): JQuery; - dxDropDownMenu(): JQuery; - dxDropDownMenu(options: "instance"): DevExpress.ui.dxDropDownMenu; - dxDropDownMenu(options: string): any; - dxDropDownMenu(options: string, ...params: any[]): any; - dxDropDownMenu(options: DevExpress.ui.dxDropDownMenuOptions): JQuery; -} -declare module DevExpress.data { - export interface XmlaStoreOptions { - /** The HTTP address to an XMLA OLAP server. */ - url?: string; - /** The name of the database associated with the Store. */ - catalog?: string; - /** The cube name. */ - cube?: string; - beforeSend?: (request: Object) => void; - } - /** A Store that provides access to an OLAP cube using the XMLA standard. */ - export class XmlaStore { - constructor(options: XmlaStoreOptions); - } - export interface PivotGridField { - index?: number; - /** A boolean value specifying whether or not the field is visible in the pivot grid and the Field Chooser. */ - visible?: boolean; - /** Name of the data source field containing data for the pivot grid field. */ - dataField?: string; - /** A caption that will be displayed in the pivot grid's field chooser to identify the field. */ - caption?: string; - /** Specifies a type of field values. */ - dataType?: string; - /** Specifies how the values of the current field are combined into groups. Cannot be used for the XmlaStore store type. */ - groupInterval?: any; - /** Specifies how to aggregate field data. Cannot be used for the XmlaStore store type. */ - summaryType?: string; - /** Allows you to use a custom aggregate function to calculate the summary values. Cannot be used for the XmlaStore store type. */ - calculateCustomSummary?: (options: { - summaryProcess?: string; - value?: any; - totalValue?: any; - }) => void; - /** Specifies the function that determines how to split data from the data source into ranges for header items. Cannot be used for the XmlaStore store type. */ - selector?: (data: Object) => any; - /** Type of the area where the field is located. */ - area?: string; - /** Index among the other fields displayed within the same area. */ - areaIndex?: number; - /** The name of the folder in which the field is located. */ - displayFolder?: string; - /** The name of the group to which the field belongs. */ - groupName?: string; - /** The index of the field within a group. */ - groupIndex?: number; - /** Specifies the initial sort order of field values. */ - sortOrder?: string; - /** Specifies how field data should be sorted. Can be used for the XmlaStore store type only. */ - sortBy?: string; - /** Specifies the data field against which the header items of this field should be sorted. */ - sortBySummaryField?: string; - /** The array of field names that specify a path to column/row whose summary field is used for sorting of this field's header items. */ - sortBySummaryPath?: Array; - /** The filter values for the current field. */ - filterValues?: Array; - /** The filter type for the current field. */ - filterType?: string; - /** Indicates whether all header items of the field's header level are expanded. */ - expanded?: boolean; - /** Specifies whether the field should be treated as a Data Field. */ - isMeasure?: boolean; - /** Specifies a display format for field values. */ - format?: string; - /** Specifies a callback function that returns the text to be displayed in the cells of a field. */ - customizeText?: (cellInfo: { value: any; valueText: string }) => string; - /** Specifies a precision for formatted field values. */ - precision?: number; - /** Specifies how to sort the header items. */ - sortingMethod?: (a: Object, b: Object) => number; - /** Allows an end-user to change sorting options. */ - allowSorting?: boolean; - /** Allows an end-user to sort columns by summary values. */ - allowSortingBySummary?: boolean; - /** Allows an end-user to change filtering options. */ - allowFiltering?: boolean; - /** Allows an end-user to expand/collapse all header items within a header level. */ - allowExpandAll?: boolean; - /** Specifies the absolute width of the field in the pivot grid. */ - width?: number; - /** Specifies the summary post-processing algorithm. */ - summaryDisplayMode?: string; - /** Specifies whether to summarize each next summary value with the previous one by rows or columns. */ - runningTotal?: string; - /** Specifies whether to allow the predefined summary post-processing functions ('absoluteVariation' and 'percentVariation') and runningTotal to take values of different groups into account. */ - allowCrossGroupCalculation?: boolean; - /** Specifies a callback function that allows you to modify summary values after they are calculated. */ - calculateSummaryValue?: (e: Object) => number; - /** Specifies whether or not to display Total values for the field. */ - showTotals?: boolean; - /** Specifies whether or not to display Grand Total values for the field. */ - showGrandTotals?: boolean; - } - export class SummaryCell { - /** Gets the parent cell in a specified direction. */ - parent(direction: string): SummaryCell; - /** Gets all children cells in a specified direction. */ - children(direction: string): Array; - /** Gets a partial Grand Total cell of a row or column. */ - grandTotal(direction: string): SummaryCell; - /** Gets the Grand Total of the entire pivot grid. */ - grandTotal(): SummaryCell; - /** Gets the cell next to the current one in a specified direction. */ - next(direction: string): SummaryCell; - /** Gets the cell next to current in a specified direction. */ - next(direction: string, allowCrossGroup: boolean): SummaryCell; - /** Gets the cell prior to the current one in a specified direction. */ - prev(direction: string): SummaryCell; - /** Gets the cell previous to current in a specified direction. */ - prev(direction: string, allowCrossGroup: boolean): SummaryCell; - /** Gets the child cell in a specified direction. */ - child(direction: string, fieldValue: any): SummaryCell; - /** Gets the cell located by the path of the source cell with one field value changed. */ - slice(field: PivotGridField, value: any): SummaryCell; - /** Gets the header cell of a row or column field to which the current cell belongs. */ - field(area: string): PivotGridField; - /** Gets the value of the current cell. */ - value(): any; - /** Gets the value of the current cell. */ - value(isCalculatedValue: boolean): any; - /** Gets the value of any field linked with the current cell. */ - value(field: PivotGridField): any; - /** Gets the value of any field linked with the current cell. */ - value(field: PivotGridField, isCalculatedValue: boolean): any; - } - export interface PivotGridDataSourceOptions { - /** Specifies the underlying Store instance used to access data. */ - store?: any; - /** Indicates whether or not the automatic field generation from data in the Store is enabled. */ - retrieveFields?: boolean; - /** Specifies data filtering conditions. Cannot be used for the XmlaStore store type. */ - filter?: Object; - /** An array of pivot grid fields. */ - fields?: Array; - /** A handler for the changed event. */ - onChanged?: () => void; - /** A handler for the loadingChanged event. */ - onLoadingChanged?: (isLoading: boolean) => void; - /** A handler for the loadError event. */ - onLoadError?: (e?: Object) => void; - /** A handler for the fieldsPrepared event. */ - onFieldsPrepared?: (e?: Array) => void; - } - /** An object that provides access to data for the dxPivotGrid widget. */ - export class PivotGridDataSource implements EventsMixin { - constructor(options?: PivotGridDataSource); - /** Starts reloading data from any store and updating the data source. */ - reload(): JQueryPromise; - /** Starts updating the data source. Reloads data from the XMLA store only. */ - load(): JQueryPromise; - /** Indicates whether or not the PivotGridDataSource is currently being loaded. */ - isLoading(): boolean; - /** Gets data displayed in a PivotGrid. */ - getData(): Object; - /** Gets all fields within a specified area. */ - getAreaFields(area: string, collectGroups: boolean): Array; - /** Gets all fields from the data source. */ - fields(): Array; - /** Sets the fields option. */ - fields(fields: Array): void; - /** Gets current options of a specified field. */ - field(id: any): PivotGridField; - /** Sets one or more options of a specified field. */ - field(id: any, field: PivotGridField): void; - /** Collapses a specified header item. */ - collapseHeaderItem(area: string, path: Array): void; - /** Expands a specified header item. */ - expandHeaderItem(area: string, path: Array): void; - /** Expands all header items of a field. */ - expandAll(id: any): void; - /** Collapses all header items of a field. */ - collapseAll(id: any): void; - /** Disposes of all resources associated with this PivotGridDataSource. */ - dispose(): void; - /** Gets the current filter expression. Cannot be used for the XmlaStore store type. */ - filter(): Object; - /** Applies a new filter expression. Cannot be used for the XmlaStore store type. */ - filter(filterExpr: Object): void; - /** Provides access to a list of records (facts) that were used to calculate a specific summary. */ - createDrillDownDataSource(options: { - columnPath?: Array; - rowPath?: Array; - dataIndex?: number; - maxRowCount?: number; - customColumns?: Array; - }): DevExpress.data.DataSource; - /** Gets the current PivotGridDataSource state (fields configuration, sorting, filters, expanded headers, etc.) */ - state(): Object; - /** Sets the PivotGridDataSource state. */ - state(state: Object): void; - on(eventName: string, eventHandler: Function): PivotGridDataSource; - on(events: { [eventName: string]: Function; }): PivotGridDataSource; - off(eventName: string): PivotGridDataSource; - off(eventName: string, eventHandler: Function): PivotGridDataSource; - } -} -declare module DevExpress.ui { - export interface dxSchedulerOptions extends WidgetOptions { - /** Specifies a date displayed on the current scheduler view by default. */ - currentDate?: Date; - /** The earliest date the widget allows you to select. */ - min?: Date; - /** The latest date the widget allows you to select. */ - max?: Date; - /** Specifies the view used in the scheduler by default. */ - currentView?: string; - /** A data source used to fetch data to be displayed by the widget. */ - dataSource?: any; - /** Specifies the first day of a week. */ - firstDayOfWeek?: number; - /** The template to be used for rendering appointments. */ - appointmentTemplate?: any; - /** The template to be used for rendering an appointment tooltip. */ - appointmentTooltipTemplate?: any; - /** Lists the views to be available within the scheduler's View Selector. */ - views?: Array; - /** Specifies the resource kinds by which the scheduler's appointments are grouped in a timetable. */ - groups?: Array; - /** Specifies a start hour in the scheduler view's time interval. */ - startDayHour?: number; - /** Specifies an end hour in the scheduler view's time interval. */ - endDayHour?: number; - /** Specifies whether or not the "All-day" panel is visible. */ - showAllDayPanel?: boolean; - /** Specifies cell duration in minutes. */ - cellDuration?: number; - /** Specifies the edit mode for recurrent appointments. */ - recurrenceEditMode?: string; - /** Specifies which editing operations an end-user can perform on appointments. */ - editing?: { - /** Specifies whether or not an end-user can add appointments. */ - allowAdding?: boolean; - /** Specifies whether or not an end-user can change appointment options. */ - allowUpdating?: boolean; - /** Specifies whether or not an end-user can delete appointments. */ - allowDeleting?: boolean; - /** Specifies whether or not an end-user can change an appointment duration. */ - allowResizing?: boolean; - /** Specifies whether or not an end-user can drag appointments. */ - allowDragging?: boolean; - } - /** Specifies an array of resources available in the scheduler. */ - resources?: Array<{ - /** Indicates whether or not several resources of this kind can be assigned to an appointment. */ - allowMultiple?: boolean; - /** - * Indicates whether or not resources of this kind have priority in the color identification of the appointments that have resources of different kinds assigned. - * @deprecated Use the 'useColorAsDefault' property instead - */ - mainColor?: boolean; - /** Indicates whether or not resources of this kind have priority in the color identification of the appointments that have resources of different kinds assigned. */ - useColorAsDefault?: boolean; - /** A data source used to fetch resources to be available in the scheduler. */ - dataSource?: any; - /** Specifies the resource object field whose value is displayed by the Resource editor in the Appointment popup window. */ - displayExpr?: any; - /** Specifies the resource object field that is used as a value of the Resource editor in the Appointment popup window. */ - valueExpr?: any; - /** The name of the appointment object field that specifies a resource of this kind. */ - field?: string; - /** Specifies the label of the Appointment popup window field that allows end users to assign a resource of this kind. */ - label?: string; - }>; - /** A handler for the AppointmentAdding event. */ - onAppointmentAdding?: Function; - /** A handler for the appointmentAdded event. */ - onAppointmentAdded?: Function; - /** A handler for the AppointmentUpdating event. */ - onAppointmentUpdating?: Function; - /** A handler for the appointmentUpdated event. */ - onAppointmentUpdated?: Function; - /** A handler for the AppointmentDeleting event. */ - onAppointmentDeleting?: Function; - /** A handler for the appointmentDeleted event. */ - onAppointmentDeleted?: Function; - /** A handler for the appointmentRendered event. */ - onAppointmentRendered?: Function; - /** A handler for the appointmentClick event. */ - onAppointmentClick?: any; - /** A handler for the appointmentDblClick event. */ - onAppointmentDblClick?: any; - /** A handler for the cellClick event. */ - onCellClick?: any; - /** A handler for the appointmentFormCreated event. */ - onAppointmentFormCreated?: Function; - /** Specifies whether or not an end-user can scroll the view horizontally. */ - horizontalScrollingEnabled?: boolean; - /** Specifies whether a user can switch views using tabs or a drop-down menu. */ - useDropDownViewSwitcher?: boolean; - } - /** A widget that displays scheduled data using different views and provides the capability to load, add and edit appointments. */ - export class dxScheduler extends Widget { - constructor(element: JQuery, options?: dxSchedulerOptions); - constructor(element: Element, options?: dxSchedulerOptions); - /** Add the appointment defined by the object passed as a parameter to the data associated with the widget. */ - addAppointment(appointment: Object): void; - /** Updates the appointment specified by the first method parameter by the appointment object specified by the second method parameter in the the data associated with the widget. */ - updateAppointment(target: Object, appointment: Object): void; - /** Deletes the appointment defined by the parameter from the the data associated with the widget. */ - deleteAppointment(appointment: Object): void; - /** Scrolls the scheduler work space to the specified time. */ - scrollToTime(hours: number, minutes: number): void; - /** Displays the Appointment Details popup. */ - showAppointmentPopup(appointmentData: Object, createNewAppointment?: boolean): void; - } - export interface dxColorBoxOptions extends dxDropDownEditorOptions { - /** Specifies the text displayed on the button that applies changes and closes the drop-down editor. */ - applyButtonText?: string; - applyValueMode?: string; - /** Specifies the text displayed on the button that cancels changes and closes the drop-down editor. */ - cancelButtonText?: string; - /** Specifies whether or not the widget value includes the alpha channel component. */ - editAlphaChannel?: boolean; - /** Specifies the size of a step by which a handle is moved using a keyboard shortcut. */ - keyStep?: number; - } - /** A widget used to specify a color value. */ - export class dxColorBox extends dxDropDownEditor { - constructor(element: JQuery, options?: dxColorBoxOptions); - constructor(element: Element, options?: dxColorBoxOptions); - } - export interface HierarchicalCollectionWidgetOptions extends CollectionWidgetOptions { - /** Specifies the name of the data source item field whose value is displayed by the widget. */ - displayExpr?: any; - /** Specifies the name of the data source item field used as a key. */ - keyExpr?: any; - /** Specifies the name of the data source item field whose value defines whether or not the corresponding widget items is selected. */ - selectedExpr?: any; - /** Specifies the name of the data source item field that contains an array of nested items. */ - itemsExpr?: any; - /** Specifies the name of the data source item field whose value defines whether or not the corresponding widget item is disabled. */ - disabledExpr?: any; - /** Specifies the name of the data source item field that holds the key of the parent item. */ - parentIdExpr?: any; - /** Specifies the name of the data source item field whose value defines whether or not the corresponding widget items is expanded. */ - expandedExpr?: any; - hoverStateEnabled?: boolean; - focusStateEnabled?: boolean; - } - export class HierarchicalCollectionWidget extends CollectionWidget { - } - export interface dxTreeViewOptions extends HierarchicalCollectionWidgetOptions { - /** Specifies whether or not to animate item collapsing and expanding. */ - animationEnabled?: boolean; - /** Specifies whether a nested or plain array is used as a data source. */ - dataStructure?: string; - /** Specifies whether or not a user can expand all tree view items by the "*" hot key. */ - expandAllEnabled?: boolean; - /** Specifies whether or not a check box is displayed at each tree view item. */ - showCheckBoxes?: boolean; - /** Specifies the current check boxes display mode. */ - showCheckBoxesMode?: string; - /** Specifies whether or not to select nodes recursively. */ - selectNodesRecursive?: boolean; - /** Specifies whether or not all parent nodes of an initially expanded node are displayed expanded. */ - expandNodesRecursive?: boolean; - /** Specifies whether the "Select All" check box is displayed over the tree view. */ - selectAllEnabled?: boolean; - /** Specifies the text displayed at the "Select All" check box. */ - selectAllText?: string; - /** Specifies the name of the data source item field whose value defines whether or not the corresponding node includes child nodes. */ - hasItemsExpr?: any; - /** Specifies if the virtual mode is enabled. */ - virtualModeEnabled?: boolean; - /** Specifies the parent ID value of the root item. */ - rootValue?: any; - /** Specifies the current value used to filter tree view items. */ - searchValue?: string; - /** A string value specifying available scrolling directions. */ - scrollDirection?: string; - /** A handler for the itemSelected event. */ - onItemSelected?: Function; - /** A handler for the itemExpanded event. */ - onItemExpanded?: Function; - /** A handler for the itemCollapsed event. */ - onItemCollapsed?: Function; - onItemClick?: Function; - onItemContextMenu?: Function; - onItemRendered?: Function; - onItemHold?: Function; - } - /** A widget displaying specified data items as a tree. */ - export class dxTreeView extends HierarchicalCollectionWidget { - constructor(element: JQuery, options?: dxTreeViewOptions); - constructor(element: Element, options?: dxTreeViewOptions); - /** Updates the tree view scrollbars according to the current size of the widget content. */ - updateDimensions(): JQueryPromise; - /** Selects the specified item. */ - selectItem(itemElement: any): void; - /** Unselects the specified item. */ - unselectItem(itemElement: any): void; - /** Expands the specified item. */ - expandItem(itemElement: any): void; - /** Collapses the specified item. */ - collapseItem(itemElement: any): void; - /** Returns all nodes of the tree view. */ - getNodes(): Array; - /** Selects all widget items. */ - selectAll(): void; - /** Unselects all widget items. */ - unselectAll(): void; - } - export interface dxMenuBaseOptions extends HierarchicalCollectionWidgetOptions { - /** An object that defines the animation options of the widget. */ - animation?: fx.AnimationOptions; - /** A Boolean value specifying whether or not the widget changes its state when interacting with a user. */ - activeStateEnabled?: boolean; - /** Specifies the name of the CSS class associated with the menu. */ - cssClass?: string; - /** Holds an array of menu items. */ - items?: Array; - /** Specifies whether or not an item becomes selected if an end-user clicks it. */ - selectionByClick?: boolean; - /** Specifies the selection mode supported by the menu. */ - selectionMode?: string; - /** Specifies options of submenu showing and hiding. */ - showSubmenuMode?: { - /** Specifies the mode name. */ - name?: string; - /** Specifies the delay of submenu show and hiding. */ - delay?: { - /** The time span after which the submenu is shown. */ - show?: number; - /** The time span after which the submenu is hidden. */ - hide?: number; - }; - }; - } - export class dxMenuBase extends HierarchicalCollectionWidget { - constructor(element: JQuery, options?: dxMenuBaseOptions); - constructor(element: Element, options?: dxMenuBaseOptions); - /** Selects the specified item. */ - selectItem(itemElement: any): void; - /** Unselects the specified item. */ - unselectItem(itemElement: any): void; - } - export interface dxMenuOptions extends dxMenuBaseOptions { - /** Specifies whether or not the submenu is hidden when the mouse pointer leaves it. */ - hideSubmenuOnMouseLeave?: boolean; - /** Specifies whether the menu has horizontal or vertical orientation. */ - orientation?: string; - /** Specifies options for showing and hiding the first level submenu. */ - showFirstSubmenuMode?: { - /** Specifies the mode name. */ - name?: string; - /** Specifies the delay of submenu showing and hiding. */ - delay?: { - /** The time span after which the submenu is shown. */ - show?: number; - /** The time span after which the submenu is hidden. */ - hide?: number; - }; - }; - /** Specifies the direction at which the submenus are displayed. */ - submenuDirection?: string; - /** A handler for the submenuHidden event. */ - onSubmenuHidden?: Function; - /** A handler for the submenuHiding event. */ - onSubmenuHiding?: Function; - /** A handler for the submenuShowing event. */ - onSubmenuShowing?: Function; - /** A handler for the submenuShown event. */ - onSubmenuShown?: Function; - } - /** A menu widget. */ - export class dxMenu extends dxMenuBase { - constructor(element: JQuery, options?: dxMenuOptions); - constructor(element: Element, options?: dxMenuOptions); - } - export interface dxContextMenuOptions extends dxMenuBaseOptions { - /** Holds an object that specifies options of alternative menu invocation. */ - alternativeInvocationMode?: { - /** Specifies whether or not the standard context menu invocation (on a right mouse click or on a long tap) is disabled. */ - enabled?: Boolean; - /** Specifies the element used to invoke the context menu. */ - invokingElement?: any; - }; - /** A handler for the hidden event. */ - onHidden?: Function; - /** A handler for the hiding event. */ - onHiding?: Function; - /** A handler for the positioning event. */ - onPositioning?: Function; - /** A handler for the showing event. */ - onShowing?: Function; - /** A handler for the shown event. */ - onShown?: Function; - /** An object defining widget positioning options. */ - position?: PositionOptions; - /** Specifies the direction at which submenus are displayed. */ - submenuDirection?: string; - /** The target element associated with a popover. */ - target?: any; - /** A Boolean value specifying whether or not the widget is visible. */ - visible?: boolean; - } - /** A context menu widget. */ - export class dxContextMenu extends dxMenuBase { - constructor(element: JQuery, options?: dxContextMenuOptions); - constructor(element: Element, options?: dxContextMenuOptions); - /** Toggles the visibility of the widget. */ - toggle(showing: boolean): JQueryPromise; - /** Shows the widget. */ - show(): JQueryPromise; - /** Hides the widget. */ - hide(): JQueryPromise; - } - export interface dxRemoteOperations { - /** Specifies whether or not filtering must be performed on the server side. */ - filtering?: boolean; - /** Specifies whether or not paging must be performed on the server side. */ - paging?: boolean; - /** Specifies whether or not sorting must be performed on the server side. */ - sorting?: boolean; - /** Specifies whether or not grouping must be performed on the server side. */ - grouping?: boolean; - /** Specifies whether or not summaries calculation must be performed on the server side. */ - summary?: boolean; - } - export interface dxDataGridColumn { - /** Specifies the content alignment within column cells. */ - alignment?: string; - /** Specifies whether the values in a column can be edited at runtime. Setting this option makes sense only when editing is enabled for a grid. */ - allowEditing?: boolean; - /** Specifies whether or not a column can be used for filtering grid records. Setting this option makes sense only when the filter row and column header filtering are visible. */ - allowFiltering?: boolean; - /** Specifies whether or not to allow filtering by this column using its header. */ - allowHeaderFiltering?: boolean; - /** Specifies whether or not the column can be anchored to a grid edge by end users. Setting this option makes sense only when the columnFixing | enabled option is set to true. */ - allowFixing?: boolean; - /** Specifies if a column can be used for searching grid records. Setting this option makes sense only when the search panel is visible. */ - allowSearch?: boolean; - /** Specifies whether a column can be used for grouping grid records at runtime. Setting this option makes sense only when the group panel is visible. */ - allowGrouping?: boolean; - /** Specifies whether or not a column can be hidden by a user. Setting this option makes sense only when the column chooser is visible. */ - allowHiding?: boolean; - /** Specifies whether or not a particular column can be used in column reordering. Setting this option makes sense only when the allowColumnReordering option is set to true. */ - allowReordering?: boolean; - /** Specifies whether or not a particular column can be resized by a user. Setting this option makes sense only when the allowColumnResizing option is true. */ - allowResizing?: boolean; - /** Specifies whether grid records can be sorted by a specific column at runtime. Setting this option makes sense only when the sorting mode differs from none. */ - allowSorting?: boolean; - /** Specifies whether groups appear expanded or not when records are grouped by a specific column. Setting this option makes sense only when grouping is allowed for this column. */ - autoExpandGroup?: boolean; - /** Specifies a callback function that returns a value to be displayed in a column cell. */ - calculateCellValue?: (rowData: Object) => string; - /** Specifies a callback function to be invoked after the cell value is edited by an end-user and before the new value is saved to the data source. */ - setCellValue?: (rowData: Object, value: any) => void; - /** Specifies a callback function that defines filters for customary calculated grid cells. */ - calculateFilterExpression?: (filterValue: any, selectedFilterOperation: string, target: string) => Array; - /** Specifies a caption for a column. */ - caption?: string; - /** Specifies a custom template for grid column cells. */ - cellTemplate?: any; - /** Specifies a CSS class to be applied to a column. */ - cssClass?: string; - /** Specifies how to get a value to be displayed in a cell when it is not in an editing state. */ - calculateDisplayValue?: any; - /** Specifies a field name or a function that returns a field name or a value to be used for grouping column cells. */ - calculateGroupValue?: any; - /** Specifies a field name or a function that returns a field name or a value to be used for sorting column cells. */ - calculateSortValue?: any; - /** Specifies a callback function that returns the text to be displayed in the cells of a column. */ - customizeText?: (cellInfo: { value: any; valueText: string }) => string; - /** Specifies the field of a data source that provides data for a column. */ - dataField?: string; - /** Specifies the required type of column values. */ - dataType?: string; - /** Specifies a custom template for the cell of a grid column when it is in an editing state. */ - editCellTemplate?: any; - /** Specifies configuration options for the editor widget of the current column. */ - editorOptions?: Object; - /** Specifies whether HTML tags are displayed as plain text or applied to the values of the column. */ - encodeHtml?: boolean; - /** In a boolean column, replaces all false items with a specified text. */ - falseText?: string; - /** Specifies the set of available filter operations. */ - filterOperations?: Array; - /** Specifies a filter value for a column. */ - filterValue?: any; - /** Specifies initial filter values for the column's header filter. */ - filterValues?: Array; - /** Specifies whether to include or exclude the records with the values selected in the column's header filter. */ - filterType?: string; - /** Indicates whether the column takes part in horizontal grid scrolling or is anchored to a grid edge. */ - fixed?: boolean; - /** Specifies the grid edge to which the column is anchored. */ - fixedPosition?: string; - /** Specifies a format for the values displayed in a column. */ - format?: string; - /** Specifies a custom template for the group cell of a grid column. */ - groupCellTemplate?: any; - /** Specifies the index of a column when grid records are grouped by the values of this column. */ - groupIndex?: number; - /** Specifies a custom template for the header of a grid column. */ - headerCellTemplate?: any; - /** Specifies options of a lookup column. */ - lookup?: { - /** Specifies whether or not a user can nullify values of a lookup column. */ - allowClearing?: boolean; - /** Specifies the data source providing data for a lookup column. */ - dataSource?: any; - /** Specifies the expression defining the data source field whose values must be displayed. */ - displayExpr?: any; - /** Specifies the expression defining the data source field whose values must be replaced. */ - valueExpr?: string; - }; - /** Specifies column-level options for filtering using a column header filter. */ - headerFilter?: { - /** Specifies the data source to be used for header filter. */ - dataSource?: any; - /** Specifies how header filter values should be combined into groups. */ - groupInterval?: any; - }; - /** Specifies a precision for formatted values displayed in a column. */ - precision?: number; - /** Specifies a filter operation applied to a column. */ - selectedFilterOperation?: string; - /** Specifies whether or not the column displays its values by using editors. */ - showEditorAlways?: boolean; - /** Specifies whether or not to display the column when grid records are grouped by it. */ - showWhenGrouped?: boolean; - /** Specifies the index of a column when grid records are sorted by the values of this column. */ - sortIndex?: number; - /** Specifies the initial sort order of column values. */ - sortOrder?: string; - /** In a boolean column, replaces all true items with a specified text. */ - trueText?: string; - /** Specifies whether a column is visible or not. */ - visible?: boolean; - /** Specifies the sequence number of the column in the grid. */ - visibleIndex?: number; - /** Specifies a column width in pixels or percentages. */ - width?: any; - /** Specifies an array of validation rules to be checked when updating column cell values. */ - validationRules?: Array; - /** Specifies whether or not to display the header of a hidden column in the column chooser. */ - showInColumnChooser?: boolean; - /** Specifies the identifier of the column. */ - name?: string; - /** The form item configuration object. Used only when the editing mode is "form". */ - formItem?: DevExpress.ui.dxFormItem; - } - export interface dxDataGridOptions extends WidgetOptions { - /** Specifies whether the outer borders of the grid are visible or not. */ - showBorders?: boolean; - /** Indicates whether to show the error row for the grid. */ - errorRowEnabled?: boolean; - /** A handler for the rowValidating event. */ - onRowValidating?: (e: Object) => void; - /** A handler for the contextMenuPreparing event. */ - onContextMenuPreparing?: (e: Object) => void; - /** A handler for the initNewRow event. */ - onInitNewRow?: (e: { data: Object }) => void; - /** A handler for the rowInserted event. */ - onRowInserted?: (e: { data: Object; key: any }) => void; - /** A handler for the rowInserting event. */ - onRowInserting?: (e: { data: Object; cancel: any }) => void; - /** A handler for the rowRemoved event. */ - onRowRemoved?: (e: { data: Object; key: any }) => void; - /** A handler for the rowRemoving event. */ - onRowRemoving?: (e: { data: Object; key: any; cancel: any }) => void; - /** A handler for the rowUpdated event. */ - onRowUpdated?: (e: { data: Object; key: any }) => void; - /** A handler for the rowUpdating event. */ - onRowUpdating?: (e: { oldData: Object; newData: Object; key: any; cancel: any }) => void; - /** Enables a hint that appears when a user hovers the mouse pointer over a cell with truncated content. */ - cellHintEnabled?: boolean; - /** Specifies whether or not grid columns can be reordered by a user. */ - allowColumnReordering?: boolean; - /** Specifies whether or not grid columns can be resized by a user. */ - allowColumnResizing?: boolean; - /** A handler for the cellClick event. */ - onCellClick?: any; - /** A handler for the cellHoverChanged event. */ - onCellHoverChanged?: (e: Object) => void; - /** A handler for the cellPrepared event. */ - onCellPrepared?: (e: Object) => void; - /** Specifies whether or not the width of grid columns depends on column content. */ - columnAutoWidth?: boolean; - /** Specifies the options of a column chooser. */ - columnChooser?: { - /** Specifies text displayed by the column chooser panel when it does not contain any columns. */ - emptyPanelText?: string; - /** Specifies whether a user can invoke the column chooser or not. */ - enabled?: boolean; - /** Specifies the height of the column chooser panel. */ - height?: number; - /** Specifies text displayed in the title of the column chooser panel. */ - title?: string; - /** Specifies the width of the column chooser panel. */ - width?: number; - }; - /** Specifies options for column fixing. */ - columnFixing?: { - /** Indicates if column fixing is enabled. */ - enabled?: boolean; - /** Contains options that specify texts for column-fixing related commands in the column header's context menu. */ - texts?: { - /** Specifies text for a context menu item that fixes the column for which the context menu is invoked. */ - fix?: string; - /** Specifies text for a context menu item that unfixes the column for which the context menu is invoked. */ - unfix?: string; - /** Specifies text for a context menu subitem that fixes a column, for which the context menu is invoked, to the left grid edge. */ - leftPosition?: string; - /** Specifies text for a context menu subitem that fixes a column, for which the context menu is invoked, to the right grid edge. */ - rightPosition?: string; - }; - }; - /** Specifies options for filtering using a column header filter. */ - headerFilter?: { - /** Indicates whether or not the column header filter button is visible. */ - visible?: boolean; - /** Specifies the height of the dropdown menu invoked when using a column header filter. */ - height?: number; - /** Specifies the width of the dropdown menu invoked when using a column header filter. */ - width?: number; - /** Contains options that specify texts for the dropdown menu invoked when you use a column header filter. */ - texts?: { - /** Specifies text for the item specifying an empty value in the column header filter's dropdown menu. */ - emptyValue?: string; - /** Specifies text for a button that closes the column header filter's dropdown menu and applies specified filtering. */ - ok?: string; - /** Specifies text for a button that closes the column header filter's dropdown menu without applying performed selection. */ - cancel?: string; - } - }; - /** An array of grid columns. */ - columns?: Array; - onContentReady?: Function; - /** Specifies a function that customizes grid columns after they are created. */ - customizeColumns?: (columns: Array) => void; - /** Specifies a data source for the grid. */ - dataSource?: any; - /** Specifies whether or not to enable data caching. */ - cacheEnabled?: boolean; - /** A handler for the editingStart event. */ - onEditingStart?: (e: { - data: Object; - key: any; - cancel: boolean; - column: dxDataGridColumn - }) => void; - /** A handler for the editorPrepared event. */ - onEditorPrepared?: (e: Object) => void; - /** A handler for the editorPreparing event. */ - onEditorPreparing?: (e: Object) => void; - /** Contains options that specify how grid content can be changed. */ - editing?: { - editMode?: string; - editEnabled?: boolean; - insertEnabled?: boolean; - removeEnabled?: boolean; - /** Specifies how grid values can be edited manually. */ - mode?: string; - /** Specifies whether or not grid records can be edited at runtime. */ - allowUpdating?: boolean; - /** Specifies whether or not new grid records can be added at runtime. */ - allowAdding?: boolean; - /** Specifies whether or not grid records can be deleted at runtime. */ - allowDeleting?: boolean; - /** The form configuration object. Used only when the editing mode is "form". */ - form?: DevExpress.ui.dxFormOptions; - /** Contains options that specify texts for editing-related grid controls. */ - texts?: { - /** Specifies text for a hint that appears when a user hovers the mouse pointer over the "Save" button. Setting this option makes sense only when the editMode option is set to batch. */ - saveAllChanges?: string; - /** Specifies text for a cancel button displayed when a row is in the editing state. Setting this option makes sense only when the allowUpdating option is set to true. */ - cancelRowChanges?: string; - /** Specifies text for a hint that appears when a user hovers the mouse pointer over the "Revert" button. Setting this option makes sense only when the editMode option is set to batch. */ - cancelAllChanges?: string; - /** Specifies a message to be displayed by a confirmation window. Setting this option makes sense only when the edit mode is "row". */ - confirmDeleteMessage?: string; - /** Specifies text to be displayed in the title of a confirmation window. Setting this option makes sense only when the edit mode is "row". */ - confirmDeleteTitle?: string; - /** Specifies text for a hint that appears when a user hovers the mouse pointer over the "Cancel changes" button. Setting this option makes sense only when the editMode option is set to cell and the validation capabilities are enabled. */ - validationCancelChanges?: string; - /** Specifies text for a button that deletes a row from a grid. Setting this option makes sense only when the allowDeleting option is set to true. */ - deleteRow?: string; - /** Specifies text for a hint that appears when a user hovers the mouse pointer over the "Add" button. Setting this option makes sense only when the allowAdding option is true. */ - addRow?: string; - /** Specifies text for a button that turns a row into the editing state. Setting this option makes sense only when the allowUpdating option is set to true. */ - editRow?: string; - /** Specifies text for a save button displayed when a row is in the editing state. Setting this option makes sense only when the allowUpdating option is set to true. */ - saveRowChanges?: string; - /** Specifies text for a button that recovers a deleted row. Setting this option makes sense only if the grid uses the batch edit mode and the allowDeleting option is set to true. */ - undeleteRow?: string; - }; - }; - /** Specifies filter row options. */ - filterRow?: { - /** Specifies when to apply a filter. */ - applyFilter?: string; - /** Specifies text for the hint that pops up when a user hovers the mouse pointer over the "Apply Filter" button. */ - applyFilterText?: string; - /** Specifies descriptions for filter operations. */ - operationDescriptions?: { - "=": string; - "<>": string; - "<": string; - "<=": string; - ">": string; - ">=": string; - "startswith": string; - "contains": string; - "notcontains": string; - "endswith": string; - }; - /** Specifies text for the reset operation in a filter list. */ - resetOperationText?: string; - /** Specifies text for the operation of clearing the applied filter when a select box is used. */ - showAllText?: string; - /** Specifies text for the range start in the 'between' filter type. */ - betweenStartText?: string; - /** Specifies text for the range end in the 'between' filter type. */ - betweenEndText?: string; - /** Specifies whether or not an icon that allows the user to choose a filter operation is visible. */ - showOperationChooser?: boolean; - /** Specifies whether the filter row is visible or not. */ - visible?: boolean; - }; - /** Specifies the behavior of grouped grid records. */ - grouping?: { - /** Specifies whether the user can collapse grouped records in a grid or not. */ - allowCollapsing?: boolean; - /** Specifies whether groups appear expanded or not. */ - autoExpandAll?: boolean; - /** Specifies the message displayed in a group row when the corresponding group is continued from the previous page. */ - groupContinuedMessage?: string; - /** Specifies the message displayed in a group row when the corresponding group continues on the next page. */ - groupContinuesMessage?: string; - }; - /** Specifies options that configure the group panel. */ - groupPanel?: { - /** Specifies whether columns can be dragged onto or from the group panel. */ - allowColumnDragging?: boolean; - /** Specifies text displayed by the group panel when it does not contain any columns. */ - emptyPanelText?: string; - /** Specifies whether the group panel is visible or not. */ - visible?: boolean; - }; - /** Specifies options configuring the load panel. */ - loadPanel?: { - /** Specifies whether to show the load panel or not. */ - enabled?: boolean; - /** Specifies the height of the load panel in pixels. */ - height?: number; - /** Specifies a URL pointing to an image to be used as a loading indicator. */ - indicatorSrc?: string; - /** Specifies whether or not a loading indicator must be displayed on the load panel. */ - showIndicator?: boolean; - /** Specifies whether or not the pane of the load panel must be displayed. */ - showPane?: boolean; - /** Specifies text displayed by the load panel. */ - text?: string; - /** Specifies the width of the load panel in pixels. */ - width?: number; - }; - /** Specifies text displayed when a grid does not contain any records. */ - noDataText?: string; - /** Specifies the options of a grid pager. */ - pager?: { - /** Specifies the page sizes that can be selected at runtime. */ - allowedPageSizes?: any; - /** Specifies whether to show the page size selector or not. */ - showPageSizeSelector?: boolean; - /** Specifies whether to show the pager or not. */ - visible?: any; - /** Specifies the text accompanying the page navigator. */ - infoText?: string; - /** Specifies whether or not to display the text accompanying the page navigator. This text is specified by the infoText option. */ - showInfo?: boolean; - /** Specifies whether or not to display buttons that switch the grid to the previous or next page. */ - showNavigationButtons?: boolean; - }; - /** Specifies paging options. */ - paging?: { - /** Specifies whether dxDataGrid loads data page by page or all at once. */ - enabled?: boolean; - /** Specifies the grid page that should be displayed by default. */ - pageIndex?: number; - /** Specifies the size of grid pages. */ - pageSize?: number; - }; - /** Specifies whether or not grid rows must be shaded in a different way. */ - rowAlternationEnabled?: boolean; - /** A handler for the rowClick event. */ - onRowClick?: any; - /** A handler for the rowPrepared event. */ - onRowPrepared?: (e: Object) => void; - /** Specifies a custom template for grid rows. */ - rowTemplate?: any; - /** A configuration object specifying scrolling options. */ - scrolling?: { - /** Specifies the scrolling mode. */ - mode?: string; - /** Specifies whether or not a grid must preload pages adjacent to the current page when using virtual scrolling. */ - preloadEnabled?: boolean; - /** Specifies whether or not the widget uses native scrolling. */ - useNative?: any; - /** Specifies the scrollbar display policy. */ - showScrollbar?: string; - /** Specifies whether or not the scrolling by content is enabled. */ - scrollByContent?: boolean; - /** Specifies whether or not the scrollbar thumb scrolling enabled. */ - scrollByThumb?: boolean; - }; - /** Specifies options of the search panel. */ - searchPanel?: { - /** Specifies whether or not search strings in the located grid records should be highlighted. */ - highlightSearchText?: boolean; - /** Specifies text displayed by the search panel when no search string was typed. */ - placeholder?: string; - /** Specifies whether the search panel is visible or not. */ - visible?: boolean; - /** Specifies the width of the search panel in pixels. */ - width?: number; - /** Sets a search string for the search panel. */ - text?: string; - }; - /** Specifies the operations that must be performed on the server side. */ - remoteOperations?: any; - /** Allows you to sort groups according to the values of group summary items. */ - sortByGroupSummaryInfo?: Array<{ - /** Specifies the group summary item whose values must be used to sort groups. */ - summaryItem?: string; - /** Specifies the identifier of the column that must be used in grouping so that sorting by group summary item values be applied. */ - groupColumn?: string; - /** Specifies the sort order of group summary item values. */ - sortOrder?: string; - }>; - /** Allows you to build a master-detail interface in the grid. */ - masterDetail?: { - /** Enables an end-user to expand/collapse detail sections. */ - enabled?: boolean; - /** Specifies whether detail sections appear expanded or collapsed. */ - autoExpandAll?: boolean; - /** Specifies the template for detail sections. */ - template?: any; - }; - /** Specifies options for exporting grid data. */ - export?: { - /** Indicates if the export feature is enabled in the grid. */ - enabled?: boolean; - /** Specifies a default name for the file to which grid data is exported. */ - fileName?: string; - /** Specifies whether to enable Excel filtering for the exported data in the resulting XLSX file. */ - excelFilterEnabled?: boolean; - /** Specifies whether to enable word wrapping for the exported data in the resulting XLSX file. */ - excelWrapTextEnabled?: boolean; - /** Specifies the URL of the server-side proxy that streams the resulting file to the end user to enable export in IE8, IE9 and Safari browsers. */ - proxyUrl?: string; - /** Indicates whether to allow end users to export not only the data displayed in the grid, but the selected rows only. */ - allowExportSelectedData?: boolean; - /** Contains options that specify texts for the export-related commands and hints. */ - texts?: { - /** Specifies text for the Export button when this button invokes a dropdown menu so you can choose the required export format. */ - exportTo?: string; - /** Specifies text for the Export button when this button exports to the XSLX format. */ - exportToExcel?: string; - /** Specifies text for the item in the Export dropdown menu that exports grid data to Excel. */ - excelFormat?: string; - /** Specifies text for the option in the Export dropdown menu that allows you to choose whether to export all the grid data or the selected rows only. */ - selectedRows?: string; - } - }; - /** Specifies the keys of the records that must appear selected initially. */ - selectedRowKeys?: Array; - /** Specifies options of runtime selection. */ - selection?: { - /** Specifies the checkbox row display policy in the multiple mode. */ - showCheckBoxesMode?: string; - /** Specifies whether the user can select all grid records at once. */ - allowSelectAll?: boolean; - /** Specifies the selection mode. */ - mode?: string; - }; - /** A handler for the dataErrorOccured event. */ - onDataErrorOccurred?: (e: { error: Error }) => void; - /** A handler for the selectionChanged event. */ - onSelectionChanged?: (e: { - currentSelectedRowKeys: Array; - currentDeselectedRowKeys: Array; - selectedRowKeys: Array; - selectedRowsData: Array; - }) => void; - /** A handler for the exporting event. */ - onExporting?: (e: { - fileName: string; - format: string; - cancel: boolean; - }) => void; - /** A handler for the exported event. */ - onExported?: (e: Object) => void; - /** A handler for the keyDown event. */ - onKeyDown?: (e: Object) => void; - /** A handler for the rowExpanding event. */ - onRowExpanding?: (e: Object) => void; - /** A handler for the rowExpanded event. */ - onRowExpanded?: (e: Object) => void; - /** A handler for the rowCollapsing event. */ - onRowCollapsing?: (e: Object) => void; - /** A handler for the rowCollapsed event. */ - onRowCollapsed?: (e: Object) => void; - /** Specifies whether column headers are visible or not. */ - showColumnHeaders?: boolean; - /** Specifies whether or not vertical lines separating one grid column from another are visible. */ - showColumnLines?: boolean; - /** Specifies whether or not horizontal lines separating one grid row from another are visible. */ - showRowLines?: boolean; - /** Specifies options of runtime sorting. */ - sorting?: { - /** Specifies text for the context menu item that sets an ascending sort order in a column. */ - ascendingText?: string; - /** Specifies text for the context menu item that resets sorting settings for a column. */ - clearText?: string; - /** Specifies text for the context menu item that sets a descending sort order in a column. */ - descendingText?: string; - /** Specifies the runtime sorting mode. */ - mode?: string; - }; - /** Specifies options of state storing. */ - stateStoring?: { - /** Specifies a callback function that performs specific actions on state loading. */ - customLoad?: () => JQueryPromise; - /** Specifies a callback function that performs specific actions on state saving. */ - customSave?: (state: Object) => void; - /** Specifies whether or not a grid saves its state. */ - enabled?: boolean; - /** Specifies the delay between the last change of a grid state and the operation of saving this state in milliseconds. */ - savingTimeout?: number; - /** Specifies a unique key to be used for storing the grid state. */ - storageKey?: string; - /** Specifies the type of storage to be used for state storing. */ - type?: string; - }; - /** Specifies the options of the grid summary. */ - summary?: { - /** Contains options that specify text patterns for summary items. */ - texts?: { - /** Specifies a pattern for the 'sum' summary items when they are displayed in the parent column. */ - sum?: string; - /** Specifies a pattern for the 'sum' summary items displayed in a group row or in any other column rather than the parent one. */ - sumOtherColumn?: string; - /** Specifies a pattern for the 'min' summary items when they are displayed in the parent column. */ - min?: string; - /** Specifies a pattern for the 'min' summary items displayed in a group row or in any other column rather than the parent one. */ - minOtherColumn?: string; - /** Specifies a pattern for the 'max' summary items when they are displayed in the parent column. */ - max?: string; - /** Specifies a pattern for the 'max' summary items displayed in a group row or in any other column rather than the parent one. */ - maxOtherColumn?: string; - /** Specifies a pattern for the 'avg' summary items when they are displayed in the parent column. */ - avg?: string; - /** Specifies a pattern for the 'avg' summary items displayed in a group row or in any other column rather than the parent one. */ - avgOtherColumn?: string; - /** Specifies a pattern for the 'count' summary items. */ - count?: string; - }; - /** Specifies items of the group summary. */ - groupItems?: Array<{ - /** Specifies the identifier of a summary item. */ - name?: string; - /** Specifies the column that provides data for a group summary item. */ - column?: string; - /** Customizes the text to be displayed in the summary item. */ - customizeText?: (itemInfo: { - value: any; - valueText: string; - }) => string; - /** Specifies a pattern for the summary item text. */ - displayFormat?: string; - /** Specifies a precision for the summary item value of a numeric format. */ - precision?: number; - /** Specifies whether or not a summary item must be displayed in the group footer. */ - showInGroupFooter?: boolean; - /** Indicates whether to display group summary items in parentheses after the group row header or to align them by the corresponding columns within the group row. */ - alignByColumn?: boolean; - /** Specifies the column that must hold the summary item when this item is displayed in the group footer or aligned by a column in the group row. */ - showInColumn?: string; - /** Specifies how to aggregate data for a summary item. */ - summaryType?: string; - /** Specifies a format for the summary item value. */ - valueFormat?: string; - }>; - /** Specifies items of the total summary. */ - totalItems?: Array<{ - /** Specifies the identifier of a summary item. */ - name?: string; - /** Specifies the alignment of a summary item. */ - alignment?: string; - /** Specifies the column that provides data for a summary item. */ - column?: string; - /** Specifies a CSS class to be applied to a summary item. */ - cssClass?: string; - /** Customizes the text to be displayed in the summary item. */ - customizeText?: (itemInfo: { - value: any; - valueText: string; - }) => string; - /** Specifies a pattern for the summary item text. */ - displayFormat?: string; - /** Specifies a precision for the summary item value of a numeric format. */ - precision?: number; - /** Specifies the column that must hold the summary item. */ - showInColumn?: string; - /** Specifies how to aggregate data for a summary item. */ - summaryType?: string; - /** Specifies a format for the summary item value. */ - valueFormat?: string; - }>; - /** Allows you to use a custom aggregate function to calculate the value of a summary item. */ - calculateCustomSummary?: (options: { - component: dxDataGrid; - name?: string; - value: any; - totalValue: any; - summaryProcess: string - }) => void; - }; - /** Specifies whether text that does not fit into a column should be wrapped. */ - wordWrapEnabled?: boolean; - } - /** A data grid widget. */ - export class dxDataGrid extends Widget { - constructor(element: JQuery, options?: dxDataGridOptions); - constructor(element: Element, options?: dxDataGridOptions); - /** Ungroups grid records. */ - clearGrouping(): void; - /** Clears sorting settings of all grid columns at once. */ - clearSorting(): void; - /** Allows you to obtain a cell by its row index and the data field of its column. */ - getCellElement(rowIndex: number, dataField: string): any; - /** Allows you to obtain a cell by its row index and the visible index of its column. */ - getCellElement(rowIndex: number, visibleColumnIndex: number): any; - /** Returns the current state of the grid. */ - state(): Object; - /** Sets the grid state. */ - state(state: Object): void; - /** Allows you to obtain the row index by a data key. */ - getRowIndexByKey(key: any): number; - /** Allows you to obtain the data key by a row index. */ - getKeyByRowIndex(rowIndex: number): any; - /** Adds a new column to a grid. */ - addColumn(columnOptions: dxDataGridColumn): void; - /** Removes the column from the grid. */ - deleteColumn(id: any): void; - /** Displays the load panel. */ - beginCustomLoading(messageText: string): void; - /** Discards changes made in a grid. */ - cancelEditData(): void; - /** Checks whether or not the grid contains unsaved changes. */ - hasEditData(): boolean; - /** Clears all the filters of a specific type applied to grid records. */ - clearFilter(): void; - /** Deselects all grid records. */ - clearSelection(): void; - /** Draws the cell being edited from the editing state. Use this method when the edit mode is batch. */ - closeEditCell(): void; - /** Collapses groups or master rows in a grid. */ - collapseAll(groupIndex?: number): void; - /** Returns the number of data columns in a grid. */ - columnCount(): number; - /** Returns the value of a specific column option. */ - columnOption(id: any, optionName: string): any; - /** Sets an option of a specific column. */ - columnOption(id: any, optionName: string, optionValue: any): void; - /** Returns the options of a column by an identifier. */ - columnOption(id: any): Object; - /** Sets several options of a column at once. */ - columnOption(id: any, options: Object): void; - /** Sets a specific cell into the editing state. */ - editCell(rowIndex: number, visibleColumnIndex: number): void; - /** Sets a specific cell into the editing state. */ - editCell(rowIndex: number, dataField: string): void; - /** Sets a specific row into the editing state. */ - editRow(rowIndex: number): void; - /** Gets the cell value. */ - cellValue(rowIndex: number, dataField: string): any; - /** Gets the cell value. */ - cellValue(rowIndex: number, visibleColumnIndex: number): any; - /** Sets the cell value. */ - cellValue(rowIndex: number, dataField: string, value: any): void; - /** Sets the cell value. */ - cellValue(rowIndex: number, visibleColumnIndex: number, value: any): void; - /** Hides the load panel. */ - endCustomLoading(): void; - /** Expands groups or master rows in a grid. */ - expandAll(groupIndex: number): void; - /** Allows you to find out whether a specific group or master row is expanded or collapsed. */ - isRowExpanded(key: any): boolean; - /** Allows you to expand a specific group or master row by its key. */ - expandRow(key: any): void; - /** Allows you to collapse a specific group or master row by its key. */ - collapseRow(key: any): void; - /** Applies a filter to the grid's data source. */ - filter(filterExpr?: any): void; - /** Returns a filter expression applied to the grid's data source using the filter(filterExpr) method. */ - filter(): any; - /** Returns a filter expression applied to the grid using all possible scenarious. */ - getCombinedFilter(): any; - /** Gets the keys of currently selected grid records. */ - getSelectedRowKeys(): Array; - /** Gets the data objects of currently selected grid records. */ - getSelectedRowsData(): Array; - /** Hides the column chooser panel. */ - hideColumnChooser(): void; - /** Adds a new data row to a grid. */ - addRow(): void; - /** - * Adds a new data row to a grid. - * @deprecated Use the addRow() method instead. - */ - insertRow(): void; - /** Returns the key corresponding to the passed data object. */ - keyOf(obj: Object): any; - /** Switches a grid to a specified page. */ - pageIndex(newIndex: number): void; - /** Gets the index of the current page. */ - pageIndex(): number; - /** Sets the page size. */ - pageSize(value: number): void; - /** Gets the current page size. */ - pageSize(): number; - /** Refreshes grid data. */ - refresh(): void; - /** Removes a specific row from a grid. */ - deleteRow(rowIndex: number): void; - /** - * Removes a specific row from a grid. - * @deprecated Use the deleteRow() method instead. - */ - removeRow(rowIndex: number): void; - /** Saves changes made in a grid. */ - saveEditData(): void; - /** Searches grid records by a search string. */ - searchByText(text: string): void; - /** Selects all grid records. */ - selectAll(): void; - /** Deselects the rows that are currently selected within the applied filter. */ - deselectAll(): void; - /** Selects specific grid records. */ - selectRows(keys: Array, preserve: boolean): void; - /** Deselects specific grid records. */ - deselectRows(keys: Array): void; - /** Selects grid rows by indexes. */ - selectRowsByIndexes(indexes: Array): void; - /** Allows you to find out whether a row is selected or not. */ - isRowSelected(key: any): boolean; - /** Invokes the column chooser panel. */ - showColumnChooser(): void; - startSelectionWithCheckboxes(): boolean; - /** Returns the number of records currently held by a grid. */ - totalCount(): number; - /** Recovers a row deleted in the batch edit mode. */ - undeleteRow(rowIndex: number): void; - /** Allows you to obtain a data object by its key. */ - byKey(key: any): JQueryPromise; - /** Gets the value of a total summary item. */ - getTotalSummaryValue(summaryItemName: string): any; - /** Exports grid data to Excel. */ - exportToExcel(selectionOnly: boolean): void; - /** Updates the grid to the size of its content. */ - updateDimensions(): void; - /** Focuses the specified cell element in the grid. */ - focus(element?: JQuery): void; - } - export interface dxPivotGridOptions extends WidgetOptions { - onContentReady?: Function; - /** Specifies a data source for the pivot grid. */ - dataSource?: any; - useNativeScrolling?: any; - /** A configuration object specifying scrolling options. */ - scrolling?: { - /** Specifies the scrolling mode. */ - mode?: string; - /** Specifies whether or not the widget uses native scrolling. */ - useNative?: any; - }; - /** Allows an end-user to change sorting options. */ - allowSorting?: boolean; - /** Allows an end-user to sort columns by summary values. */ - allowSortingBySummary?: boolean; - /** Allows an end-user to change filtering options. */ - allowFiltering?: boolean; - /** Allows an end-user to expand/collapse all header items within a header level. */ - allowExpandAll?: boolean; - /** Specifies whether to display the Total rows. */ - showRowTotals?: boolean; - /** Specifies whether to display the Grand Total row. */ - showRowGrandTotals?: boolean; - /** Specifies whether to display the Total columns. */ - showColumnTotals?: boolean; - /** Specifies whether to display the Grand Total column. */ - showColumnGrandTotals?: boolean; - /** Specifies whether or not to hide rows and columns with no data. */ - hideEmptySummaryCells?: boolean; - /** Specifies where to show the total rows or columns. */ - showTotalsPrior?: string; - /** Specifies whether the outer borders of the grid are visible or not. */ - showBorders?: boolean; - /** The Field Chooser configuration options. */ - fieldChooser?: { - /** Enables or disables the field chooser. */ - enabled?: boolean; - /** Specifies the field chooser layout. */ - layout?: number; - /** Specifies the text to display as a title of the field chooser popup window. */ - title?: string; - /** Specifies the field chooser width. */ - width?: number; - /** Specifies the field chooser height. */ - height?: number; - /** Strings that can be changed or localized in the pivot grid's integrated Field Chooser. */ - texts?: { - /** The string to display instead of Row Fields. */ - rowFields?: string; - /** The string to display instead of Column Fields. */ - columnFields?: string; - /** The string to display instead of Data Fields. */ - dataFields?: string; - /** The string to display instead of Filter Fields. */ - filterFields?: string; - /** The string to display instead of All Fields. */ - allFields?: string; - }; - } - /** Strings that can be changed or localized in the dxPivotGrid widget. */ - texts?: { - /** The string to display as a header of the Grand Total row and column. */ - grandTotal?: string; - /** The string to display as a header of the Total row and column. */ - total?: string; - /** Specifies the text displayed when a pivot grid does not contain any fields. */ - noData?: string; - /** The string to display as a Show Field Chooser context menu item. */ - showFieldChooser?: string; - /** The string to display as an Expand All context menu item. */ - expandAll?: string; - /** The string to display as a Collapse All context menu item. */ - collapseAll?: string; - /** The string to display as a Sort Column by Summary Value context menu item. */ - sortColumnBySummary?: string; - /** The string to display as a Sort Row by Summary Value context menu item. */ - sortRowBySummary?: string; - /** The string to display as a Remove All Sorting context menu item. */ - removeAllSorting?: string; - /** The string to display as an Export to Excel file context menu item. */ - exportToExcel?: string; - }; - /** The Load panel configuration options. */ - loadPanel?: { - /** Enables or disables the load panel. */ - enabled?: boolean; - /** Specifies the height of the load panel. */ - height?: number; - /** Specifies the URL pointing to an image that will be used as a load indicator. */ - indicatorSrc?: string; - /** Specifies whether or not to show a load indicator. */ - showIndicator?: boolean; - /** Specifies whether or not to show load panel background. */ - showPane?: boolean; - /** Specifies the text to display inside a load panel. */ - text?: string; - /** Specifies the width of the load panel. */ - width?: number; - }; - /** A handler for the cellClick event. */ - onCellClick?: (e: any) => void; - /** A handler for the cellPrepared event. */ - onCellPrepared?: (e: any) => void; - /** A handler for the contextMenuPreparing event. */ - onContextMenuPreparing?: (e: Object) => void; - /** Specifies options for exporting pivot grid data. */ - export?: { - /** Indicates whether the export feature is enabled for the pivot grid. */ - enabled?: boolean; - /** Specifies a default name for the file to which grid data is exported. */ - fileName?: string; - /** Specifies the URL of the server-side proxy that streams the resulting file to the end user to enable export in IE8, IE9 and Safari browsers. */ - proxyUrl?: string; - }; - /** A handler for the exporting event. */ - onExporting?: (e: { - fileName: string; - format: string; - cancel: boolean; - }) => void; - /** A handler for the exported event. */ - onExported?: (e: Object) => void; - /** A configuration object specifying options related to state storing. */ - stateStoring?: { - /** Specifies a callback function that performs specific actions on state loading. */ - customLoad?: () => JQueryPromise; - /** Specifies a callback function that performs specific actions on state saving. */ - customSave?: (gridState: Object) => void; - /** Specifies whether or not a grid saves its state. */ - enabled?: boolean; - /** Specifies the delay between the last change of a grid state and the operation of saving this state in milliseconds. */ - savingTimeout?: number; - /** Specifies a unique key to be used for storing the grid state. */ - storageKey?: string; - /** Specifies the type of storage to be used for state storing. */ - type?: string; - }; - } - /** A data summarization widget for multi-dimensional data analysis and data mining. */ - export class dxPivotGrid extends Widget { - constructor(element: JQuery, options?: dxPivotGridOptions); - constructor(element: Element, options?: dxPivotGridOptions); - /** Gets the PivotGridDataSource instance. */ - getDataSource(): DevExpress.data.PivotGridDataSource; - /** Gets the dxPopup instance of the field chooser window. */ - getFieldChooserPopup(): DevExpress.ui.dxPopup; - /** Updates the widget to the size of its content. */ - updateDimensions(): void; - /** Exports pivot grid data to the Excel file. */ - exportToExcel(): void; - } - export interface dxPivotGridFieldChooserOptions extends WidgetOptions { - /** Specifies the height of the widget. */ - height?: any; - /** Specifies the field chooser layout. */ - layout?: number; - /** The data source of a dxPivotGrid widget. */ - dataSource?: DevExpress.data.PivotGridDataSource; - onContentReady?: Function; - /** Strings that can be changed or localized in the dxPivotGridFieldChooser widget. */ - texts?: { - /** The string to display instead of Row Fields. */ - rowFields?: string; - /** The string to display instead of Column Fields. */ - columnFields?: string; - /** The string to display instead of Data Fields. */ - dataFields?: string; - /** The string to display instead of Filter Fields. */ - filterFields?: string; - /** The string to display instead of All Fields. */ - allFields?: string; - }; - } - /** A complementary widget for dxPivotGrid that allows you to manage data displayed in the dxPivotGrid. */ - export class dxPivotGridFieldChooser extends Widget { - constructor(element: JQuery, options?: dxPivotGridFieldChooserOptions); - constructor(element: Element, options?: dxPivotGridFieldChooserOptions); - /** Updates the widget to the size of its content. */ - updateDimensions(): void; - } -} -interface JQuery { - dxTreeView(): JQuery; - dxTreeView(options: "instance"): DevExpress.ui.dxTreeView; - dxTreeView(options: string): any; - dxTreeView(options: string, ...params: any[]): any; - dxTreeView(options: DevExpress.ui.dxTreeViewOptions): JQuery; - dxMenuBase(): JQuery; - dxMenuBase(options: "instance"): DevExpress.ui.dxMenuBase; - dxMenuBase(options: string): any; - dxMenuBase(options: string, ...params: any[]): any; - dxMenuBase(options: DevExpress.ui.dxMenuBaseOptions): JQuery; - dxMenu(): JQuery; - dxMenu(options: "instance"): DevExpress.ui.dxMenu; - dxMenu(options: string): any; - dxMenu(options: string, ...params: any[]): any; - dxMenu(options: DevExpress.ui.dxMenuOptions): JQuery; - dxContextMenu(): JQuery; - dxContextMenu(options: "instance"): DevExpress.ui.dxContextMenu; - dxContextMenu(options: string): any; - dxContextMenu(options: string, ...params: any[]): any; - dxContextMenu(options: DevExpress.ui.dxContextMenuOptions): JQuery; - dxColorBox(): JQuery; - dxColorBox(options: "instance"): DevExpress.ui.dxColorBox; - dxColorBox(options: string): any; - dxColorBox(options: string, ...params: any[]): any; - dxColorBox(options: DevExpress.ui.dxColorBoxOptions): JQuery; - dxDataGrid(): JQuery; - dxDataGrid(options: "instance"): DevExpress.ui.dxDataGrid; - dxDataGrid(options: string): any; - dxDataGrid(options: string, ...params: any[]): any; - dxDataGrid(options: DevExpress.ui.dxDataGridOptions): JQuery; - dxPivotGrid(): JQuery; - dxPivotGrid(options: "instance"): DevExpress.ui.dxPivotGrid; - dxPivotGrid(options: string): any; - dxPivotGrid(options: string, ...params: any[]): any; - dxPivotGrid(options: DevExpress.ui.dxPivotGridOptions): JQuery; - dxPivotGridFieldChooser(): JQuery; - dxPivotGridFieldChooser(options: "instance"): DevExpress.ui.dxPivotGridFieldChooser; - dxPivotGridFieldChooser(options: string): any; - dxPivotGridFieldChooser(options: string, ...params: any[]): any; - dxPivotGridFieldChooser(options: DevExpress.ui.dxPivotGridFieldChooserOptions): JQuery; - dxScheduler(): JQuery; - dxScheduler(options: "instance"): DevExpress.ui.dxScheduler; - dxScheduler(options: string): any; - dxScheduler(options: string, ...params: any[]): any; - dxScheduler(options: DevExpress.ui.dxSchedulerOptions): JQuery; -} -declare module DevExpress.framework { - /** An object used to store information on the views displayed in an application. */ - export class ViewCache { - viewRemoved: JQueryCallback; - /** Removes all the viewInfo objects from the cache. */ - clear(): void; - /** Obtains a viewInfo object from the cache by the specified key. */ - getView(key: string): Object; - /** Checks whether or not a viewInfo object is contained in the view cache under the specified key. */ - hasView(key: string): boolean; - /** Removes a viewInfo object from the cache by the specified key. */ - removeView(key: string): Object; - /** Adds the specified viewInfo object to the cache under the specified key. */ - setView(key: string, viewInfo: Object): void; - } - export interface dxCommandOptions extends DOMComponentOptions { - /** Specifies an action performed when the execute() method of the command is called. */ - onExecute?: any; - /** Indicates whether or not the widget that displays this command is disabled. */ - disabled?: boolean; - /** Specifies whether the current command is rendered when a view is being rendered or after a view is shown. */ - renderStage?: string; - /** Specifies the name of the icon shown inside the widget associated with this command. */ - icon?: string; - iconSrc?: string; - /** The identifier of the command. */ - id?: string; - /** Specifies the title of the widget associated with this command. */ - title?: string; - /** Specifies the type of the button, if the command is rendered as a dxButton widget. */ - type?: string; - /** A Boolean value specifying whether or not the widget associated with this command is visible. */ - visible?: boolean; - } - /** A markup component used to define markup options for a command. */ - export class dxCommand extends DOMComponent { - constructor(element: JQuery, options: dxCommandOptions); - constructor(options: dxCommandOptions); - /** Executes the action associated with this command. */ - execute(): void; - } - /** An object responsible for routing. */ - export class Router { - /** Adds a routing rule to the list of registered rules. */ - register(pattern: string, defaults?: Object, constraints?: Object): void; - /** Decodes the specified URI to an object using the registered routing rules. */ - parse(uri: string): Object; - /** Formats an object to a URI. */ - format(obj: Object): string; - } - export interface StateManagerOptions { - /** A storage to which the state manager saves the application state. */ - storage?: Object; - } - /** An object used to store the current application state. */ - export class StateManager { - constructor(options?: StateManagerOptions); - /** Adds an object that implements an interface of a state source to the state manager's collection of state sources. */ - addStateSource(stateSource: Object): void; - /** Removes a specified state source from the state manager's collection of state sources. */ - removeStateSource(stateSource: Object): void; - /** Saves the current application state. */ - saveState(): void; - /** Restores the application state that has been saved by the saveState() method to the state storage. */ - restoreState(): void; - /** Removes the application state that has been saved by the saveState() method to the state storage. */ - clearState(): void; - } - export module html { - export var layoutSets: Array; - export var animationSets: { [animationSetName: string]: AnimationSet }; - export interface AnimationSet { - [animationName: string]: any - } - export interface HtmlApplicationOptions { - /** Specifies where the commands that are defined in the application's views must be displayed. */ - commandMapping?: Object; - /** Specifies whether or not view caching is disabled. */ - disableViewCache?: boolean; - /** An array of layout controllers that should be used to show application views in the current navigation context. */ - layoutSet?: any; - /** Specifies the animation presets that are used to animate different UI elements in the current application. */ - animationSet?: AnimationSet; - /** Specifies whether the current application must behave as a mobile or web application. */ - mode?: string; - /** Specifies the object that represents a root namespace of the application. */ - namespace?: Object; - /** Specifies application behavior when the user navigates to a root view. */ - navigateToRootViewMode?: string; - /** An array of dxCommand configuration objects used to define commands available from the application's global navigation. */ - navigation?: Array; - /** A state manager to be used in the application. */ - stateManager?: StateManager; - /** Specifies the storage to be used by the application's state manager to store the application state. */ - stateStorage?: Object; - /** Indicates whether on not to use the title of the previously displayed view as text on the Back button. */ - useViewTitleAsBackText?: boolean; - /** A custom view cache to be used in the application. */ - viewCache?: Object; - /** Specifies a limit for the views that can be cached. */ - viewCacheSize?: number; - /** Specifies the current version of application templates. */ - templatesVersion?: string; - /** Specifies options for the viewport meta tag of a mobile browser. */ - viewPort?: JQuery; - /** A custom router to be used in the application. */ - router?: Router; - } - /** An object used to manage views, as well as control the application life cycle. */ - export class HtmlApplication implements EventsMixin { - constructor(options: HtmlApplicationOptions); - afterViewSetup: JQueryCallback; - beforeViewSetup: JQueryCallback; - initialized: JQueryCallback; - navigating: JQueryCallback; - navigatingBack: JQueryCallback; - resolveLayoutController: JQueryCallback; - resolveViewCacheKey: JQueryCallback; - viewDisposed: JQueryCallback; - viewDisposing: JQueryCallback; - viewHidden: JQueryCallback; - viewRendered: JQueryCallback; - viewShowing: JQueryCallback; - viewShown: JQueryCallback; - /** Provides access to the ViewCache object. */ - viewCache: ViewCache; - /** An array of dxCommand components that are created based on the application's navigation option value. */ - navigation: Array; - /** Provides access to the StateManager object. */ - stateManager: StateManager; - /** Provides access to the Router object. */ - router: Router; - /** Navigates to the URI preceding the current one in the navigation history. */ - back(): void; - /** Returns a Boolean value indicating whether or not backwards navigation is currently possible. */ - canBack(): boolean; - /** Calls the clearState() method of the application's StateManager object. */ - clearState(): void; - /** Creates global navigation commands. */ - createNavigation(navigationConfig: Array): void; - /** Returns an HTML template of the specified view. */ - getViewTemplate(viewName: string): JQuery; - /** Returns a configuration object used to create a dxView component for a specified view. */ - getViewTemplateInfo(viewName: string): Object; - /** Adds a specified HTML template to a collection of view or layout templates. */ - loadTemplates(source: any): JQueryPromise; - /** Navigates to the specified URI. */ - navigate(uri?: any, options?: Object): void; - /** Renders navigation commands to the navigation command containers that are located in the layouts used in the application. */ - renderNavigation(): void; - /** Calls the restoreState() method of the application's StateManager object. */ - restoreState(): void; - /** Calls the saveState method of the application's StateManager object. */ - saveState(): void; - /** Provides access to the object that defines the current context to be considered when choosing an appropriate template for a view. */ - templateContext(): Object; - on(eventName: "initialized", eventHandler: () => void): HtmlApplication; - on(eventName: "afterViewSetup", eventHandler: (e: { - viewInfo: Object; - }) => void): HtmlApplication; - on(eventName: "beforeViewSetup", eventHandler: (e: { - viewInfo: Object; - }) => void): HtmlApplication; - on(eventName: "navigating", eventHandler: (e: { - currentUri: string; - uri: string; - cancel: boolean; - options: { - root: boolean; - target: string; - direction: string; - rootInDetailPane: boolean; - modal: boolean; - }; - }) => void): HtmlApplication; - on(eventName: "navigatingBack", eventHandler: (e: { - cancel: boolean; - isHardwareButton: boolean; - }) => void): HtmlApplication; - on(eventName: "resolveLayoutController", eventHandler: (e: { - viewInfo: Object; - layoutController: Object; - availableLayoutControllers: Array; - }) => void): HtmlApplication; - on(eventName: "resolveViewCacheKey", eventHandler: (e: { - key: string; - navigationItem: Object; - routeData: Object; - }) => void): HtmlApplication; - on(eventName: "viewDisposed", eventHandler: (e: { - viewInfo: Object; - }) => void): HtmlApplication; - on(eventName: "viewDisposing", eventHandler: (e: { - viewInfo: Object; - }) => void): HtmlApplication; - on(eventName: "viewHidden", eventHandler: (e: { - viewInfo: Object; - }) => void): HtmlApplication; - on(eventName: "viewRendered", eventHandler: (e: { - viewInfo: Object; - }) => void): HtmlApplication; - on(eventName: "viewShowing", eventHandler: (e: { - viewInfo: Object; - direction: string; - }) => void): HtmlApplication; - on(eventName: "viewShown", eventHandler: (e: { - viewInfo: Object; - direction: string; - }) => void): HtmlApplication; - on(eventName: string, eventHandler: Function): HtmlApplication; - on(events: { [eventName: string]: Function; }): HtmlApplication; - off(eventName: "initialized"): HtmlApplication; - off(eventName: "afterViewSetup"): HtmlApplication; - off(eventName: "beforeViewSetup"): HtmlApplication; - off(eventName: "navigating"): HtmlApplication; - off(eventName: "navigatingBack"): HtmlApplication; - off(eventName: "resolveLayoutController"): HtmlApplication; - off(eventName: "resolveViewCacheKey"): HtmlApplication; - off(eventName: "viewDisposed"): HtmlApplication; - off(eventName: "viewDisposing"): HtmlApplication; - off(eventName: "viewHidden"): HtmlApplication; - off(eventName: "viewRendered"): HtmlApplication; - off(eventName: "viewShowing"): HtmlApplication; - off(eventName: "viewShown"): HtmlApplication; - off(eventName: string): HtmlApplication; - off(eventName: "initialized", eventHandler: () => void): HtmlApplication; - off(eventName: "afterViewSetup", eventHandler: (e: { - viewInfo: Object; - }) => void): HtmlApplication; - off(eventName: "beforeViewSetup", eventHandler: (e: { - viewInfo: Object; - }) => void): HtmlApplication; - off(eventName: "navigating", eventHandler: (e: { - currentUri: string; - uri: string; - cancel: boolean; - options: { - root: boolean; - target: string; - direction: string; - rootInDetailPane: boolean; - modal: boolean; - }; - }) => void): HtmlApplication; - off(eventName: "navigatingBack", eventHandler: (e: { - cancel: boolean; - isHardwareButton: boolean; - }) => void): HtmlApplication; - off(eventName: "resolveLayoutController", eventHandler: (e: { - viewInfo: Object; - layoutController: Object; - availableLayoutControllers: Array; - }) => void): HtmlApplication; - off(eventName: "resolveViewCacheKey", eventHandler: (e: { - key: string; - navigationItem: Object; - routeData: Object; - }) => void): HtmlApplication; - off(eventName: "viewDisposed", eventHandler: (e: { - viewInfo: Object; - }) => void): HtmlApplication; - off(eventName: "viewDisposing", eventHandler: (e: { - viewInfo: Object; - }) => void): HtmlApplication; - off(eventName: "viewHidden", eventHandler: (e: { - viewInfo: Object; - }) => void): HtmlApplication; - off(eventName: "viewRendered", eventHandler: (e: { - viewInfo: Object; - }) => void): HtmlApplication; - off(eventName: "viewShowing", eventHandler: (e: { - viewInfo: Object; - direction: string; - }) => void): HtmlApplication; - off(eventName: "viewShown", eventHandler: (e: { - viewInfo: Object; - direction: string; - }) => void): HtmlApplication; - off(eventName: string, eventHandler: Function): HtmlApplication; - } - } -} -declare module DevExpress.viz.core { - /** - * Applies a theme for the entire page with several DevExtreme visualization widgets. - * @deprecated Use the DevExpress.viz.currentTheme(theme) method instead. - */ - export function currentTheme(theme: string): void; - /** - * Applies a new theme (with the color scheme defined separately) for the entire page with several DevExtreme visualization widgets. - * @deprecated Use the DevExpress.viz.currentTheme(platform, colorScheme) method instead. - */ - export function currentTheme(platform: string, colorScheme: string): void; - /** - * Registers a new theme based on the existing one. - * @deprecated Use the DevExpress.viz.registerTheme(customTheme, baseTheme) method instead. - */ - export function registerTheme(customTheme: Object, baseTheme: string): void; - /** - * Applies a predefined or registered custom palette to all visualization widgets at once. - * @deprecated Use the DevExpress.viz.currentPalette(paletteName) method instead. - */ - export function currentPalette(paletteName: string): void; - /** - * Obtains the color sets of a predefined or registered palette. - * @deprecated Use the DevExpress.viz.getPalette(paletteName) method instead. - */ - export function getPalette(paletteName: string): Object; - /** - * Registers a new palette. - * @deprecated Use the DevExpress.viz.registerPalette(paletteName, palette) method instead. - */ - export function registerPalette(paletteName: string, palette: Object): void; - export interface Border { - /** Sets a border color for a selected series. */ - color?: string; - /** Sets border visibility for a selected series. */ - visible?: boolean; - /** Sets a border width for a selected series. */ - width?: number; - } - export interface DashedBorder extends Border { - /** Specifies a dash style for the border of a selected series point. */ - dashStyle?: string; - } - export interface DashedBorderWithOpacity extends DashedBorder { - /** Specifies the opacity of the tooltip's border. */ - opacity?: number; - } - export interface Font { - /** Specifies the font color for a strip label. */ - color?: string; - /** Specifies the font family for a strip label. */ - family?: string; - /** Specifies the font opacity for a strip label. */ - opacity?: number; - /** Specifies the font size for a strip label. */ - size?: any; - /** Specifies the font weight for the text displayed in strips. */ - weight?: number; - } - export interface Hatching { - direction?: string; - /** Specifies the opacity of hatching lines. */ - opacity?: number; - /** Specifies the distance between hatching lines in pixels. */ - step?: number; - /** Specifies the width of hatching lines in pixels. */ - width?: number; - } - export interface Margins { - /** Specifies the distance in pixels between the bottom side of the title and the surrounding widget elements. */ - bottom?: number; - /** Specifies the distance in pixels between the left side of the title and the surrounding widget elements. */ - left?: number; - /** Specifies the distance between the right side of the title and surrounding widget elements in pixels. */ - right?: number; - /** Specifies the distance between the top side of the title and surrounding widget elements in pixels. */ - top?: number; - } - export interface Size { - /** Specifies the width of the widget. */ - width?: number; - /** Specifies the height of the widget. */ - height?: number; - } - export interface Title { - /** Specifies font options for the title. */ - font?: viz.core.Font; - /** Specifies the widget title's horizontal position. */ - horizontalAlignment?: string; - /** Specifies the widget title's position in the vertical direction. */ - verticalAlignment?: string; - /** Specifies the distance between the title and surrounding widget elements in pixels. */ - margin?: viz.core.Margins; - /** Specifies the height of the space reserved for the title. */ - placeholderSize?: number; - /** Specifies text for the title. */ - text?: string; - /** Specifies a subtitle for the widget. */ - subtitle?: { - /** Specifies font options for the subtitle. */ - font?: viz.core.Font; - /** Specifies text for the subtitle. */ - text?: string; - } - } - export interface Tooltip { - /** Specifies the length of the tooltip's arrow in pixels. */ - arrowLength?: number; - /** Specifies the appearance of the tooltip's border. */ - border?: viz.core.DashedBorderWithOpacity; - /** Specifies a color for the tooltip. */ - color?: string; - /** Specifies the z-index for tooltips. */ - zIndex?: number; - /** Specifies the container to draw tooltips inside of it. */ - container?: any; - /** Specifies text and appearance of a set of tooltips. */ - customizeTooltip?: (arg: Object) => { color?: string; text?: string }; - /** Specifies whether or not the tooltip is enabled. */ - enabled?: boolean; - /** Specifies font options for the text displayed by the tooltip. */ - font?: Font; - /** Specifies a format for the text displayed by the tooltip. */ - format?: string; - /** Specifies the opacity of a tooltip. */ - opacity?: number; - /** Specifies a distance from the tooltip's left/right boundaries to the inner text in pixels. */ - paddingLeftRight?: number; - /** Specifies a distance from the tooltip's top/bottom boundaries to the inner text in pixels. */ - paddingTopBottom?: number; - /** Specifies a precision for formatted values displayed by the tooltip. */ - precision?: number; - /** Specifies options of the tooltip's shadow. */ - shadow?: { - /** Specifies the blur distance of the tooltip's shadow. */ - blur?: number; - /** Specifies the color of the tooltip's shadow. */ - color?: string; - /** Specifies the horizontal offset of the tooltip's shadow relative to the tooltip in pixels. */ - offsetX?: number; - /** Specifies the vertical offset of the tooltip's shadow relative to the tooltip in pixels. */ - offsetY?: number; - /** Specifies the opacity of the tooltip's shadow. */ - opacity?: number; - }; - } - export interface Animation { - /** Determines how long animation runs. */ - duration?: number; - /** Specifies the animation easing mode. */ - easing?: string; - /** Indicates whether or not animation is enabled. */ - enabled?: boolean; - } - export interface LoadingIndicator { - /** Specifies a color for the loading indicator background. */ - backgroundColor?: string; - /** Specifies font options for the loading indicator text. */ - font?: viz.core.Font; - /** Specifies whether to show the loading indicator or not. */ - show?: boolean; - /** Specifies a text to be displayed by the loading indicator. */ - text?: string; - } - export interface LegendBorder extends viz.core.DashedBorderWithOpacity { - /** Specifies a radius for the corners of the legend border. */ - cornerRadius?: number; - } - export interface BaseLegend { - /** Specifies the color of the legend's background. */ - backgroundColor?: string; - /** Specifies legend border settings. */ - border?: viz.core.LegendBorder; - /** Specifies how many columns must be taken to arrange legend items. */ - columnCount?: number; - /** Specifies the spacing between a pair of neighboring legend columns in pixels. */ - columnItemSpacing?: number; - /** Specifies font options for legend items. */ - font?: viz.core.Font; - /** Specifies the legend's position on the map. */ - horizontalAlignment?: string; - /** Specifies the alignment of legend items. */ - itemsAlignment?: string; - /** Specifies the position of text relative to the item marker. */ - itemTextPosition?: string; - /** Specifies the distance between the legend and the container borders in pixels. */ - margin?: viz.core.Margins; - /** Specifies the size of item markers in the legend in pixels. */ - markerSize?: number; - /** Specifies whether to arrange legend items horizontally or vertically. */ - orientation?: string; - /** Specifies the spacing between the legend left/right border and legend items in pixels. */ - paddingLeftRight?: number; - /** Specifies the spacing between the legend top/bottom border and legend items in pixels. */ - paddingTopBottom?: number; - /** Specifies how many rows must be taken to arrange legend items. */ - rowCount?: number; - /** Specifies the spacing between a pair of neighboring legend rows in pixels. */ - rowItemSpacing?: number; - /** Specifies the legend's position on the map. */ - verticalAlignment?: string; - /** Specifies whether or not the legend is visible on the map. */ - visible?: boolean; - } - export interface BaseWidgetOptions { - /** A handler for the drawn event. */ - onDrawn?: (e: { - component: BaseWidget; - element: Element; - }) => void; - /** A handler for the incidentOccurred event. */ - onIncidentOccurred?: ( - component: BaseWidget, - element: Element, - target: { - id: string; - type: string; - args: any; - text: string; - widget: string; - version: string; - } - ) => void; - /** Notifies a widget that it is embedded into an HTML page that uses a path modifier. */ - pathModified?: boolean; - /** Specifies whether or not the widget supports right-to-left representation. */ - rtlEnabled?: boolean; - /** Sets the name of the theme to be used in the widget. */ - theme?: string; - } - /** This section describes options and methods that are common to all widgets. */ - export class BaseWidget extends DOMComponent { - /** Returns the widget's SVG markup. */ - svg(): string; - } -} -declare module DevExpress.viz.charts { - /** This section describes the fields and methods that can be used in code to manipulate the Series object. */ - export interface BaseSeries { - /** Provides information about the state of the series object. */ - fullState: number; - /** Returns the type of the series. */ - type: string; - /** Unselects all the selected points of the series. The points are displayed in an initial style. */ - clearSelection(): void; - /** Gets the color of a particular series. */ - getColor(): string; - /** Gets points from the series point collection based on the specified argument. */ - getPointsByArg(pointArg: any): Array; - /** Gets a point from the series point collection based on the specified point position. */ - getPointByPos(positionIndex: number): Object; - /** Selects the series. The series is displayed in a 'selected' style until another series is selected or the current series is deselected programmatically. */ - select(): void; - /** Selects the specified point. The point is displayed in a 'selected' style. */ - selectPoint(point: BasePoint): void; - /** Deselects the specified point. The point is displayed in an initial style. */ - deselectPoint(point: BasePoint): void; - /** Returns an array of all points in the series. */ - getAllPoints(): Array; - /** Returns visible series points. */ - getVisiblePoints(): Array; - /** Returns the name of the series. */ - name: string; - /** Returns the tag of the series. */ - tag: string; - /** Hides a series. */ - hide(): void; - /** Provides information about the hover state of a series. */ - isHovered(): boolean; - /** Provides information about the selection state of a series. */ - isSelected(): boolean; - /** Provides information about the visibility state of a series. */ - isVisible(): boolean; - /** Makes a particular series visible. */ - show(): void; - } - /** This section describes the methods that can be used in code to manipulate the Point object. */ - export interface BasePoint { - /** Provides information about the state of the point object. */ - fullState: number; - /** Returns the point's argument value that was set in the data source. */ - originalArgument: any; - /** Returns the point's value that was set in the data source. */ - originalValue: any; - /** Returns the tag of the point. */ - tag: string; - /** Deselects the point. */ - clearSelection(): void; - /** Gets the color of a particular point. */ - getColor(): string; - /** Hides the tooltip of the point. */ - hideTooltip(): void; - /** Provides information about the hover state of a point. */ - isHovered(): boolean; - /** Provides information about the selection state of a point. */ - isSelected(): boolean; - /** Selects the point. The point is displayed in a 'selected' style until another point is selected or the current point is deselected programmatically. */ - select(): void; - /** Shows the tooltip of the point. */ - showTooltip(): void; - /** Allows you to obtain the label of a series point. */ - getLabel(): any; - /** Returns the series object to which the point belongs. */ - series: BaseSeries; - } - /** This section describes the fields and methods that can be used in code to manipulate the Series object. */ - export interface ChartSeries extends BaseSeries { - /** Returns the name of the series pane. */ - pane: string; - /** Returns the name of the value axis of the series. */ - axis: string; - selectPoint(point: ChartPoint): void; - deselectPoint(point: ChartPoint): void; - getAllPoints(): Array; - getVisiblePoints(): Array; - } - /** This section describes the methods that can be used in code to manipulate the Point object. */ - export interface ChartPoint extends BasePoint { - /** Contains the close value of the point. This field is useful for points belonging to a series of the candle stick or stock type only. */ - originalCloseValue: any; - /** Contains the high value of the point. This field is useful for points belonging to a series of the candle stick or stock type only. */ - originalHighValue: any; - /** Contains the low value of the point. This field is useful for points belonging to a series of the candle stick or stock type only. */ - originalLowValue: any; - /** Contains the first value of the point. This field is useful for points belonging to a series of the range area or range bar type only. */ - originalMinValue: any; - /** Contains the open value of the point. This field is useful for points belonging to a series of the candle stick or stock type only. */ - originalOpenValue: any; - /** Contains the size of the bubble as it was set in the data source. This field is useful for points belonging to a series of the bubble type only. */ - size: any; - /** Gets the parameters of the point's minimum bounding rectangle (MBR). */ - getBoundingRect(): { x: number; y: number; width: number; height: number; }; - series: ChartSeries; - } - /** This section describes the methods that can be used in code to manipulate the Label object. */ - export interface Label { - /** Gets the parameters of the label's minimum bounding rectangle (MBR). */ - getBoundingRect(): { x: number; y: number; width: number; height: number; }; - /** Hides the point label. */ - hide(): void; - /** Shows the point label. */ - show(): void; - } - export interface PieSeries extends BaseSeries { - selectPoint(point: PiePoint): void; - deselectPoint(point: PiePoint): void; - getAllPoints(): Array; - getVisiblePoints(): Array; - } - /** This section describes the methods that can be used in code to manipulate the Point object. */ - export interface PiePoint extends BasePoint { - /** Gets the percentage value of the specific point. */ - percent: any; - /** Provides information about the visibility state of a point. */ - isVisible(): boolean; - /** Makes a specific point visible. */ - show(): void; - /** Hides a specific point. */ - hide(): void; - series: PieSeries; - } - /** This section describes the fields and methods that can be used in code to manipulate the Series object. */ - export interface PolarSeries extends BaseSeries { - /** Returns the name of the value axis of the series. */ - axis: string; - selectPoint(point: PolarPoint): void; - deselectPoint(point: PolarPoint): void; - getAllPoints(): Array; - getVisiblePoints(): Array; - } - /** This section describes the methods that can be used in code to manipulate the Point object. */ - export interface PolarPoint extends BasePoint { - series: PolarSeries; - } - export interface Strip { - /** Specifies a color for a strip. */ - color?: string; - /** An object that defines the label configuration options of a strip. */ - label?: { - /** Specifies the text displayed in a strip. */ - text?: string; - }; - /** Specifies a start value for a strip. */ - startValue?: any; - /** Specifies an end value for a strip. */ - endValue?: any; - } - export interface BaseSeriesConfigLabel { - /** Specifies a format for arguments displayed by point labels. */ - argumentFormat?: string; - /** Specifies a precision for formatted point arguments displayed in point labels. */ - argumentPrecision?: number; - /** Specifies a background color for point labels. */ - backgroundColor?: string; - /** Specifies border options for point labels. */ - border?: viz.core.DashedBorder; - /** Specifies connector options for series point labels. */ - connector?: { - /** Specifies the color of label connectors. */ - color?: string; - /** Indicates whether or not label connectors are visible. */ - visible?: boolean; - /** Specifies the width of label connectors. */ - width?: number; - }; - /** Specifies a callback function that returns the text to be displayed by point labels. */ - customizeText?: (pointInfo: Object) => string; - /** Specifies font options for the text displayed in point labels. */ - font?: viz.core.Font; - /** Specifies a format for the text displayed by point labels. */ - format?: string; - position?: string; - /** Specifies a precision for formatted point values displayed in point labels. */ - precision?: number; - /** Specifies the angle used to rotate point labels from their initial position. */ - rotationAngle?: number; - /** Specifies the visibility of point labels. */ - visible?: boolean; - } - export interface SeriesConfigLabel extends BaseSeriesConfigLabel { - /** Specifies whether or not to show a label when the point has a zero value. */ - showForZeroValues?: boolean; - } - export interface ChartSeriesConfigLabel extends SeriesConfigLabel { - /** Specifies how to align point labels relative to the corresponding data points that they represent. */ - alignment?: string; - /** Specifies how to shift point labels horizontally from their initial positions. */ - horizontalOffset?: number; - /** Specifies how to shift point labels vertically from their initial positions. */ - verticalOffset?: number; - /** Specifies a precision for the percentage values displayed in the labels of a full-stacked-like series. */ - percentPrecision?: number; - } - export interface BaseCommonSeriesConfig { - /** Specifies the data source field that provides arguments for series points. */ - argumentField?: string; - axis?: string; - /** An object defining the label configuration options for a series in the dxChart widget. */ - label?: ChartSeriesConfigLabel; - /** Specifies border options for point labels. */ - border?: viz.core.DashedBorder; - /** Specifies a series color. */ - color?: string; - /** Specifies the dash style of the series' line. */ - dashStyle?: string; - hoverMode?: string; - hoverStyle?: { - /** An object defining the border options for a hovered series. */ - border?: viz.core.DashedBorder; - /**

Sets a color for a series when it is hovered over.

*/ - color?: string; - /** Specifies the dash style for the line in a hovered series. */ - dashStyle?: string; - hatching?: viz.core.Hatching; - /** Specifies the width of a line in a hovered series. */ - width?: number; - }; - /** Specifies whether a chart ignores null data points or not. */ - ignoreEmptyPoints?: boolean; - /** Specifies how many points are acceptable to be in a series to display all labels for these points. Otherwise, the labels will not be displayed. */ - maxLabelCount?: number; - /** Specifies the minimal length of a displayed bar in pixels. */ - minBarSize?: number; - /** Specifies opacity for a series. */ - opacity?: number; - /** Specifies the series elements to highlight when the series is selected. */ - selectionMode?: string; - selectionStyle?: { - /** An object defining the border options for a selected series. */ - border?: viz.core.DashedBorder; - /** Sets a color for a series when it is selected. */ - color?: string; - /** Specifies the dash style for the line in a selected series. */ - dashStyle?: string; - hatching?: viz.core.Hatching; - /** Specifies the width of a line in a selected series. */ - width?: number; - }; - /** Specifies whether or not to show the series in the chart's legend. */ - showInLegend?: boolean; - /** Specifies the name of the stack where the values of the _stackedBar_ series must be located. */ - stack?: string; - /** Specifies the name of the data source field that provides data about a point. */ - tagField?: string; - /** Specifies the data source field that provides values for series points. */ - valueField?: string; - /** Specifies the visibility of a series. */ - visible?: boolean; - /** Specifies a line width. */ - width?: number; - /** Configures error bars. */ - valueErrorBar?: { - /** Specifies whether error bars must be displayed in full or partially. */ - displayMode?: string; - /** Specifies the data field that provides data for low error values. */ - lowValueField?: string; - /** Specifies the data field that provides data for high error values. */ - highValueField?: string; - /** Specifies how error bar values must be calculated. */ - type?: string; - /** Specifies the value to be used for generating error bars. */ - value?: number; - /** Specifies the color of error bars. */ - color?: string; - /** Specifies the opacity of error bars. */ - opacity?: number; - /** Specifies the length of the lines that indicate the error bar edges. */ - edgeLength?: number; - /** Specifies the width of the error bar line. */ - lineWidth?: number; - }; - } - export interface CommonPointOptions { - /** Specifies border options for points in the line and area series. */ - border?: viz.core.Border; - /** Specifies the points color. */ - color?: string; - /** Specifies what series points to highlight when a point is hovered over. */ - hoverMode?: string; - /** An object defining configuration options for a hovered point. */ - hoverStyle?: { - /** An object defining the border options for a hovered point. */ - border?: viz.core.Border; - /** Sets a color for a point when it is hovered over. */ - color?: string; - /** Specifies the diameter of a hovered point in the series that represents data points as symbols (not as bars for instance). */ - size?: number; - }; - /** Specifies what series points to highlight when a point is selected. */ - selectionMode?: string; - /** An object defining configuration options for a selected point. */ - selectionStyle?: { - /** An object defining the border options for a selected point. */ - border?: viz.core.Border; - /**

Sets a color for a point when it is selected.

*/ - color?: string; - /** Specifies the diameter of a selected point in the series that represents data points as symbols (not as bars for instance). */ - size?: number; - }; - /** Specifies the point diameter in pixels for those series that represent data points as symbols (not as bars for instance). */ - size?: number; - /** Specifies a symbol for presenting points of the line and area series. */ - symbol?: string; - visible?: boolean; - } - export interface ChartCommonPointOptions extends CommonPointOptions { - /** An object specifying the parameters of an image that is used as a point marker. */ - image?: { - /** Specifies the height of an image that is used as a point marker. */ - height?: any; - /** Specifies a URL leading to the image to be used as a point marker. */ - url?: any; - /** Specifies the width of an image that is used as a point marker. */ - width?: any; - }; - } - export interface PolarCommonPointOptions extends CommonPointOptions { - /** An object specifying the parameters of an image that is used as a point marker. */ - image?: { - /** Specifies the height of an image that is used as a point marker. */ - height?: number; - /** Specifies a URL leading to the image to be used as a point marker. */ - url?: string; - /** Specifies the width of an image that is used as a point marker. */ - width?: number; - }; - } - /** An object that defines configuration options for chart series. */ - export interface CommonSeriesConfig extends BaseCommonSeriesConfig { - /** Specifies the data source field that provides a 'close' value for a _candleStick_ or _stock_ series. */ - closeValueField?: string; - /** Specifies a radius for bar corners. */ - cornerRadius?: number; - /** Specifies the data source field that provides a 'high' value for a _candleStick_ or _stock_ series. */ - highValueField?: string; - /** Specifies the color for the body (rectangle) of a _candleStick_ series. */ - innerColor?: string; - /** Specifies the data source field that provides a 'low' value for a _candleStick_ or _stock_ series. */ - lowValueField?: string; - /** Specifies the data source field that provides an 'open' value for a _candleStick_ or _stock_ series. */ - openValueField?: string; - /** Specifies the pane that will be used to display a series. */ - pane?: string; - /** An object defining configuration options for points in line-, scatter- and area-like series. */ - point?: ChartCommonPointOptions; - /** Specifies the data source field that provides values for one end of a range series. To set the data source field for the other end of the range series, use the rangeValue2Field property. */ - rangeValue1Field?: string; - /** Specifies the data source field that provides values for the second end of a range series. To set the data source field for the other end of the range series, use the rangeValue1Field property. */ - rangeValue2Field?: string; - /** Specifies reduction options for the stock or candleStick series. */ - reduction?: { - /** Specifies a color for the points whose reduction level price is lower in comparison to the value in the previous point. */ - color?: string; - /** Specifies for which price level (open, high, low or close) to enable reduction options in the series. */ - level?: string; - }; - /** Specifies the data source field that defines the size of bubbles. */ - sizeField?: string; - } - export interface CommonSeriesSettings extends CommonSeriesConfig { - /**

An object that specifies configuration options for all series of the area type in the chart.

*/ - area?: CommonSeriesConfig; - /** An object that specifies configuration options for all series of the _bar_ type in the chart. */ - bar?: CommonSeriesConfig; - /** An object that specifies configuration options for all series of the bubble type in the chart. */ - bubble?: CommonSeriesConfig; - /** An object that specifies configuration options for all series of the _candleStick_ type in the chart. */ - candlestick?: CommonSeriesConfig; - /** An object that specifies configuration options for all series of the _fullStackedArea_ type in the chart. */ - fullstackedarea?: CommonSeriesConfig; - /** An object that specifies configuration options for all series of the Full-Stacked Spline Area type in the chart. */ - fullstackedsplinearea?: CommonSeriesConfig; - /** An object that specifies configuration options for all series of the _fullStackedBar_ type in the chart. */ - fullstackedbar?: CommonSeriesConfig; - /** An object that specifies configuration options for all series of the _fullStackedLine_ type in the chart. */ - fullstackedline?: CommonSeriesConfig; - /** An object that specifies configuration options for all series of the Full-Stacked Spline type in the chart. */ - fullstackedspline?: CommonSeriesConfig; - /** An object that specifies configuration options for all series of the _line_ type in the chart. */ - line?: CommonSeriesConfig; - /** An object that specifies configuration options for all series of the _rangeArea_ type in the chart. */ - rangearea?: CommonSeriesConfig; - /** An object that specifies configuration options for all series of the _rangeBar_ type in the chart. */ - rangebar?: CommonSeriesConfig; - /** An object that specifies configuration options for all series of the _scatter_ type in the chart. */ - scatter?: CommonSeriesConfig; - /** An object that specifies configuration options for all series of the _spline_ type in the chart. */ - spline?: CommonSeriesConfig; - /** An object that specifies configuration options for all series of the _splineArea_ type in the chart. */ - splinearea?: CommonSeriesConfig; - /** An object that specifies configuration options for all series of the _stackedArea_ type in the chart. */ - stackedarea?: CommonSeriesConfig; - /** An object that specifies configuration options for all series of the Stacked Spline Area type in the chart. */ - stackedsplinearea?: CommonSeriesConfig; - /** An object that specifies configuration options for all series of the _stackedBar_ type in the chart. */ - stackedbar?: CommonSeriesConfig; - /** An object that specifies configuration options for all series of the _stackedLine_ type in the chart. */ - stackedline?: CommonSeriesConfig; - /** An object that specifies configuration options for all series of the Stacked Spline type in the chart. */ - stackedspline?: CommonSeriesConfig; - /** An object that specifies configuration options for all series of the _stepArea_ type in the chart. */ - steparea?: CommonSeriesConfig; - /** An object that specifies configuration options for all series of the _stepLine_ type in the chart. */ - stepline?: CommonSeriesConfig; - /** An object that specifies configuration options for all series of the _stock_ type in the chart. */ - stock?: CommonSeriesConfig; - /** Sets a series type. */ - type?: string; - } - export interface SeriesConfig extends CommonSeriesConfig { - /** Specifies the name that identifies the series. */ - name?: string; - /** Specifies data about a series. */ - tag?: any; - /** Sets the series type. */ - type?: string; - } - /** An object that defines configuration options for polar chart series. */ - export interface CommonPolarSeriesConfig extends BaseCommonSeriesConfig { - /** Specifies whether or not to close the chart by joining the end point with the first point. */ - closed?: boolean; - label?: SeriesConfigLabel; - point?: PolarCommonPointOptions; - } - export interface CommonPolarSeriesSettings extends CommonPolarSeriesConfig { - /** An object that specifies configuration options for all series of the area type in the chart. */ - area?: CommonPolarSeriesConfig; - /** An object that specifies configuration options for all series of the _bar_ type in the chart. */ - bar?: CommonPolarSeriesConfig; - /** An object that specifies configuration options for all series of the _line_ type in the chart. */ - line?: CommonPolarSeriesConfig; - /** An object that specifies configuration options for all series of the _scatter_ type in the chart. */ - scatter?: CommonPolarSeriesConfig; - /** An object that specifies configuration options for all series of the _stackedBar_ type in the chart. */ - stackedbar?: CommonPolarSeriesConfig; - /** Sets a series type. */ - type?: string; - } - export interface PolarSeriesConfig extends CommonPolarSeriesConfig { - /** Specifies the name that identifies the series. */ - name?: string; - /** Specifies data about a series. */ - tag?: any; - /** Sets the series type. */ - type?: string; - } - export interface PieSeriesConfigLabel extends BaseSeriesConfigLabel { - /** Specifies how to shift labels from their initial position in a radial direction in pixels. */ - radialOffset?: number; - /** Specifies a precision for the percentage values displayed in labels. */ - percentPrecision?: number; - } - /** An object that defines configuration options for chart series. */ - export interface CommonPieSeriesConfig { - /** Specifies the data source field that provides arguments for series points. */ - argumentField?: string; - /** Specifies the required type for series arguments. */ - argumentType?: string; - /** An object defining the series border configuration options. */ - border?: viz.core.DashedBorder; - /** Specifies a series color. */ - color?: string; - /** Specifies the chart elements to highlight when a series is hovered over. */ - hoverMode?: string; - /** An object defining configuration options for a hovered series. */ - hoverStyle?: { - /** An object defining the border options for a hovered series. */ - border?: viz.core.DashedBorder; - /** Sets a color for the series when it is hovered over. */ - color?: string; - /** Specifies the hatching options to be applied when a point is hovered over. */ - hatching?: viz.core.Hatching; - }; - /** - * Specifies the fraction of the inner radius relative to the total radius in the series of the 'doughnut' type. - * @deprecated use the 'innerRadius' option instead - */ - innerRadius?: number; - /** An object defining the label configuration options. */ - label?: PieSeriesConfigLabel; - /** Specifies how many points are acceptable to be in a series to display all labels for these points. Otherwise, the labels will not be displayed. */ - maxLabelCount?: number; - /** Specifies a minimal size of a displayed pie segment. */ - minSegmentSize?: number; - /** - * Specifies the direction in which the dxPieChart series points are located. - * @deprecated use the 'segmentsDirection' option instead - */ - segmentsDirection?: string; - /**

Specifies the chart elements to highlight when the series is selected.

*/ - selectionMode?: string; - /** An object defining configuration options for the series when it is selected. */ - selectionStyle?: { - /** An object defining the border options for a selected series. */ - border?: viz.core.DashedBorder; - /** Sets a color for a series when it is selected. */ - color?: string; - /** Specifies the hatching options to be applied when a point is selected. */ - hatching?: viz.core.Hatching; - }; - /** Specifies chart segment grouping options. */ - smallValuesGrouping?: { - /** Specifies the name of the grouped chart segment. This name represents the segment in the chart legend. */ - groupName?: string; - /** Specifies the segment grouping mode. */ - mode?: string; - /** Specifies a threshold for segment values. */ - threshold?: number; - /** Specifies how many segments must not be grouped. */ - topCount?: number; - }; - /** - * Specifies a start angle for a pie chart in arc degrees. - * @deprecated use the 'startAngle' option instead - */ - startAngle?: number; - /**

Specifies the name of the data source field that provides data about a point.

*/ - tagField?: string; - /** Specifies the data source field that provides values for series points. */ - valueField?: string; - } - export interface CommonPieSeriesSettings extends CommonPieSeriesConfig { - /** - * Sets a series type for all series. - * @deprecated use the 'type' option instead - */ - type?: string; - } - export interface PieSeriesConfig extends CommonPieSeriesConfig { - /** - * Sets the series type. - * @deprecated use the 'type' option instead - */ - type?: string; - /** Specifies the name that identifies the series. */ - name?: string; - /** Specifies data about a series. */ - tag?: any; - } - export interface SeriesTemplate { - /** Specifies a callback function that returns a series object with individual series settings. */ - customizeSeries?: (seriesName: string) => SeriesConfig; - /** Specifies a data source field that represents the series name. */ - nameField?: string; - } - export interface PolarSeriesTemplate { - /** Specifies a callback function that returns a series object with individual series settings. */ - customizeSeries?: (seriesName: string) => PolarSeriesConfig; - /** Specifies a data source field that represents the series name. */ - nameField?: string; - } - export interface ChartCommonConstantLineLabel { - /** Specifies font options for a constant line label. */ - font?: viz.core.Font; - /** Specifies the position of the constant line label relative to the chart plot. */ - position?: string; - /** Indicates whether or not to display labels for the axis constant lines. */ - visible?: boolean; - } - export interface PolarCommonConstantLineLabel { - /** Indicates whether or not to display labels for the axis constant lines. */ - visible?: boolean; - /** Specifies font options for a constant line label. */ - font?: viz.core.Font; - } - export interface ConstantLineStyle { - /** Specifies a color for a constant line. */ - color?: string; - /** Specifies a dash style for a constant line. */ - dashStyle?: string; - /** Specifies a constant line width in pixels. */ - width?: number; - } - export interface ChartCommonConstantLineStyle extends ConstantLineStyle { - /** An object defining constant line label options. */ - label?: ChartCommonConstantLineLabel; - /** Specifies the space between the constant line label and the left/right side of the constant line. */ - paddingLeftRight?: number; - /** Specifies the space between the constant line label and the top/bottom side of the constant line. */ - paddingTopBottom?: number; - } - export interface PolarCommonConstantLineStyle extends ConstantLineStyle { - /** An object defining constant line label options. */ - label?: PolarCommonConstantLineLabel; - } - export interface CommonAxisLabel { - /** Specifies font options for axis labels. */ - font?: viz.core.Font; - /** Specifies the spacing between an axis and its labels in pixels. */ - indentFromAxis?: number; - /** Indicates whether or not axis labels are visible. */ - visible?: boolean; - } - export interface ChartCommonAxisLabel extends CommonAxisLabel { - /** Specifies the label's position relative to the tick (grid line). */ - alignment?: string; - /** Specifies the overlap resolving algorithm to be applied to axis labels. */ - overlappingBehavior?: { - /** Specifies how to arrange axis labels. */ - mode?: string; - /** Specifies the angle used to rotate axis labels. */ - rotationAngle?: number; - /** Specifies the spacing that must be set between staggered rows when the 'stagger' algorithm is applied. */ - staggeringSpacing?: number; - }; - } - export interface PolarCommonAxisLabel extends CommonAxisLabel { - /** Specifies the overlap resolving algorithm to be applied to axis labels. */ - overlappingBehavior?: string; - } - export interface CommonAxisTitle { - /** Specifies font options for an axis title. */ - font?: viz.core.Font; - /** Specifies a margin for an axis title in pixels. */ - margin?: number; - } - export interface BaseCommonAxisSettings { - /** Specifies the color of the line that represents an axis. */ - color?: string; - /** Specifies whether ticks/grid lines of a discrete axis are located between labels or cross the labels. */ - discreteAxisDivisionMode?: string; - /** An object defining the configuration options for the grid lines of an axis in the dxPolarChart widget. */ - grid?: { - /** Specifies a color for grid lines. */ - color?: string; - /** Specifies an opacity for grid lines. */ - opacity?: number; - /** Indicates whether or not the grid lines of an axis are visible. */ - visible?: boolean; - /** Specifies the width of grid lines. */ - width?: number; - }; - /** Specifies the options of the minor grid. */ - minorGrid?: { - /** Specifies a color for the lines of the minor grid. */ - color?: string; - /** Specifies an opacity for the lines of the minor grid. */ - opacity?: number; - /** Indicates whether the minor grid is visible or not. */ - visible?: boolean; - /** Specifies a width for the lines of the minor grid. */ - width?: number; - }; - /** Indicates whether or not an axis is inverted. */ - inverted?: boolean; - /** Specifies the opacity of the line that represents an axis. */ - opacity?: number; - /** Indicates whether or not to set ticks/grid lines of a continuous axis of the 'date-time' type at the beginning of each date-time interval. */ - setTicksAtUnitBeginning?: boolean; - /** An object defining the configuration options for axis ticks. */ - tick?: { - /** Specifies ticks color. */ - color?: string; - /** Specifies tick opacity. */ - opacity?: number; - /** Indicates whether or not ticks are visible on an axis. */ - visible?: boolean; - /** Specifies tick width. */ - width?: number; - /** Specifies tick length. */ - length?: number; - }; - /** Specifies the options of the minor ticks. */ - minorTick?: { - /** Specifies a color for the minor ticks. */ - color?: string; - /** Specifies an opacity for the minor ticks. */ - opacity?: number; - /** Indicates whether or not the minor ticks are displayed on an axis. */ - visible?: boolean; - /** Specifies minor tick width. */ - width?: number; - /** Specifies minor tick length. */ - length?: number; - }; - /** Indicates whether or not the line that represents an axis in a chart is visible. */ - visible?: boolean; - /** Specifies the width of the line that represents an axis in the chart. */ - width?: number; - } - export interface ChartCommonAxisSettings extends BaseCommonAxisSettings { - /** Specifies the appearance of all the widget's constant lines. */ - constantLineStyle?: ChartCommonConstantLineStyle; - /** An object defining the label configuration options that are common for all axes in the dxChart widget. */ - label?: ChartCommonAxisLabel; - /** Specifies a coefficient that determines the spacing between the maximum series point and the axis. */ - maxValueMargin?: number; - /** Specifies a coefficient that determines the spacing between the minimum series point and the axis. */ - minValueMargin?: number; - /** Specifies, in pixels, the space reserved for an axis. */ - placeholderSize?: number; - /** An object defining configuration options for strip style. */ - stripStyle?: { - /** An object defining the configuration options for a strip label style. */ - label?: { - /** Specifies font options for a strip label. */ - font?: viz.core.Font; - /** Specifies the label's position on a strip. */ - horizontalAlignment?: string; - /** Specifies a label's position on a strip. */ - verticalAlignment?: string; - }; - /** Specifies the spacing, in pixels, between the left/right strip border and the strip label. */ - paddingLeftRight?: number; - /** Specifies the spacing, in pixels, between the top/bottom strip borders and the strip label. */ - paddingTopBottom?: number; - }; - /** An object defining the title configuration options that are common for all axes in the dxChart widget. */ - title?: CommonAxisTitle; - /** Indicates whether or not to display series with indents from axis boundaries. */ - valueMarginsEnabled?: boolean; - } - export interface PolarCommonAxisSettings extends BaseCommonAxisSettings { - /** Specifies the appearance of all the widget's constant lines. */ - constantLineStyle?: PolarCommonConstantLineStyle; - /** An object defining the label configuration options that are common for all axes in the dxPolarChart widget. */ - label?: PolarCommonAxisLabel; - /** An object defining configuration options for strip style. */ - stripStyle?: { - /** An object defining the configuration options for a strip label style. */ - label?: { - /** Specifies font options for a strip label. */ - font?: viz.core.Font; - }; - }; - } - export interface ChartConstantLineLabel extends ChartCommonConstantLineLabel { - /** Specifies the horizontal alignment of a constant line label. */ - horizontalAlignment?: string; - /** Specifies the vertical alignment of a constant line label. */ - verticalAlignment?: string; - /** Specifies the text to be displayed in a constant line label. */ - text?: string; - } - export interface PolarConstantLineLabel extends PolarCommonConstantLineLabel { - /** Specifies the text to be displayed in a constant line label. */ - text?: string; - } - export interface AxisLabel { - /** Specifies the text for a hint that appears when a user hovers the mouse pointer over a label on the value axis. */ - customizeHint?: (argument: { value: any; valueText: string }) => string; - /** Specifies a callback function that returns the text to be displayed in value axis labels. */ - customizeText?: (argument: { value: any; valueText: string }) => string; - /** Specifies a format for the text displayed by axis labels. */ - format?: string; - /** Specifies a precision for the formatted value displayed in the axis labels. */ - precision?: number; - } - export interface ChartAxisLabel extends ChartCommonAxisLabel, AxisLabel { } - export interface PolarAxisLabel extends PolarCommonAxisLabel, AxisLabel { } - export interface AxisTitle extends CommonAxisTitle { - /** Specifies the text for the value axis title. */ - text?: string; - } - export interface ChartConstantLineStyle extends ChartCommonConstantLineStyle { - /** An object defining constant line label options. */ - label?: ChartConstantLineLabel; - } - export interface ChartConstantLine extends ChartConstantLineStyle { - /** An object defining constant line label options. */ - label?: ChartConstantLineLabel; - /** Specifies a value to be displayed by a constant line. */ - value?: any; - } - export interface PolarConstantLine extends PolarCommonConstantLineStyle { - /** An object defining constant line label options. */ - label?: PolarConstantLineLabel; - /** Specifies a value to be displayed by a constant line. */ - value?: any; - } - export interface Axis { - /** Specifies a coefficient for dividing the value axis. */ - axisDivisionFactor?: number; - /** Specifies the order in which discrete values are arranged on the value axis. */ - categories?: Array; - /** Specifies the value to be raised to a power when generating ticks for a logarithmic axis. */ - logarithmBase?: number; - /** Specifies an interval between axis ticks/grid lines. */ - tickInterval?: any; - /** Specifies the interval between minor ticks. */ - minorTickInterval?: any; - /** Specifies the number of minor ticks between two neighboring major ticks. */ - minorTickCount?: number; - /** Specifies the required type of the value axis. */ - type?: string; - /** Specifies the pane on which the current value axis will be displayed. */ - pane?: string; - /** Specifies options for value axis strips. */ - strips?: Array; - } - export interface ChartAxis extends ChartCommonAxisSettings, Axis { - /** Defines an array of the value axis constant lines. */ - constantLines?: Array; - /** Specifies the appearance options for the constant lines of the value axis. */ - constantLineStyle?: ChartCommonConstantLineStyle; - /** Specifies options for value axis labels. */ - label?: ChartAxisLabel; - /** Specifies the maximum value on the value axis. */ - max?: any; - /** Specifies the minimum value on the value axis. */ - min?: any; - /** Specifies the position of the value axis on a chart. */ - position?: string; - /** Specifies the title for a value axis. */ - title?: AxisTitle; - } - export interface PolarAxis extends PolarCommonAxisSettings, Axis { - /** Defines an array of the value axis constant lines. */ - constantLines?: Array; - /** Specifies options for value axis labels. */ - label?: PolarAxisLabel; - } - export interface ArgumentAxis { - /** Specifies the desired type of axis values. */ - argumentType?: string; - /** Specifies the elements that will be highlighted when the argument axis is hovered over. */ - hoverMode?: string; - } - export interface ChartArgumentAxis extends ChartAxis, ArgumentAxis { } - export interface PolarArgumentAxis extends PolarAxis, ArgumentAxis { - /** Specifies a start angle for the argument axis in degrees. */ - startAngle?: number; - /** Specifies whether or not to display the first point at the angle specified by the startAngle option. */ - firstPointOnStartAngle?: boolean; - /** Specifies the period of the argument values in the data source. */ - period?: number; - } - export interface ValueAxis { - /** Specifies the name of the value axis. */ - name?: string; - /** Specifies whether or not to indicate a zero value on the value axis. */ - showZero?: boolean; - /** Specifies the desired type of axis values. */ - valueType?: string; - } - export interface ChartValueAxis extends ChartAxis, ValueAxis { - /** Specifies the spacing, in pixels, between multiple value axes in a chart. */ - multipleAxesSpacing?: number; - /** Specifies the value by which the chart's value axes are synchronized. */ - synchronizedValue?: number; - } - export interface PolarValueAxis extends PolarAxis, ValueAxis { - /** Indicates whether to display series with indents from axis boundaries. */ - valueMarginsEnabled?: boolean; - /** Specifies a coefficient that determines the spacing between the maximum series point and the axis. */ - maxValueMargin?: number; - /** Specifies a coefficient that determines the spacing between the minimum series point and the axis. */ - minValueMargin?: number; - tick?: { - visible?: boolean; - } - } - export interface CommonPane { - /** Specifies a background color in a pane. */ - backgroundColor?: string; - /** Specifies the border options of a chart's pane. */ - border?: PaneBorder; - } - export interface Pane extends CommonPane { - /** Specifies the name of a pane. */ - name?: string; - } - export interface PaneBorder extends viz.core.DashedBorderWithOpacity { - /** Specifies the bottom border's visibility state in a pane. */ - bottom?: boolean; - /** Specifies the left border's visibility state in a pane. */ - left?: boolean; - /** Specifies the right border's visibility state in a pane. */ - right?: boolean; - /** Specifies the top border's visibility state in a pane. */ - top?: boolean; - } - export interface ChartAnimation extends viz.core.Animation { - /** Specifies the maximum series point count in the chart that the animation supports. */ - maxPointCountSupported?: number; - } - export interface BaseChartTooltip extends viz.core.Tooltip { - /** Specifies a format for arguments of the chart's series points. */ - argumentFormat?: string; - /** Specifies a precision for formatted arguments displayed in tooltips. */ - argumentPrecision?: number; - /** Specifies a precision for a percent value displayed in tooltips for stacked series and dxPieChart series. */ - percentPrecision?: number; - } - export interface BaseChartOptions extends viz.core.BaseWidgetOptions { - /** Specifies adaptive layout options. */ - adaptiveLayout?: { - /** Specifies the width of the widget that is small enough for the layout to begin adapting. */ - width?: number; - /** Specifies the height of the widget that is small enough for the layout to begin adapting. */ - height?: number; - /** Specifies whether or not point labels can be hidden when the layout is adapting. */ - keepLabels?: boolean; - }; - /** Specifies animation options. */ - animation?: ChartAnimation; - /** Specifies a callback function that returns an object with options for a specific point label. */ - customizeLabel?: (labelInfo: Object) => Object; - /** Specifies a callback function that returns an object with options for a specific point. */ - customizePoint?: (pointInfo: Object) => Object; - /** Specifies a data source for the chart. */ - dataSource?: any; - /** Specifies the appearance of the loading indicator. */ - loadingIndicator?: viz.core.LoadingIndicator; - /** Specifies options of a dxChart's (dxPieChart's) legend. */ - legend?: core.BaseLegend; - /** Specifies the blank space between the chart's extreme elements and the boundaries of the area provided for the widget (see size) in pixels. */ - margin?: viz.core.Margins; - /** Sets the name of the palette to be used in the chart. Alternatively, an array of colors can be set as a custom palette to be used within this chart. */ - palette?: any; - /** A handler for the done event. */ - onDone?: (e: { - component: BaseChart; - element: Element; - }) => void; - /** A handler for the pointClick event. */ - onPointClick?: any; - /** A handler for the pointHoverChanged event. */ - onPointHoverChanged?: (e: { - component: BaseChart; - element: Element; - target: TPoint; - }) => void; - /** A handler for the pointSelectionChanged event. */ - onPointSelectionChanged?: (e: { - component: BaseChart; - element: Element; - target: TPoint; - }) => void; - /** Specifies whether a single point or multiple points can be selected in the chart. */ - pointSelectionMode?: string; - /** Specifies whether to redraw the widget when the size of the parent browser window changes or a mobile device rotates. */ - redrawOnResize?: boolean; - /** Specifies options for the dxChart and dxPieChart widget series. */ - series?: any; - /** Specifies the size of the widget in pixels. */ - size?: viz.core.Size; - /** Specifies a title for the chart. */ - title?: viz.core.Title; - /** Specifies tooltip options. */ - tooltip?: BaseChartTooltip; - /** A handler for the tooltipShown event. */ - onTooltipShown?: (e: { - component: BaseChart; - element: Element; - target: BasePoint; - }) => void; - /** A handler for the tooltipHidden event. */ - onTooltipHidden?: (e: { - component: BaseChart; - element: Element; - target: BasePoint; - }) => void; - } - /** A base class for all chart widgets included in the ChartJS library. */ - export class BaseChart extends viz.core.BaseWidget { - /** Deselects the chart's selected series. The series is displayed in an initial style. */ - clearSelection(): void; - /** Gets the current size of the widget. */ - getSize(): { width: number; height: number }; - /** Returns an array of all series in the chart. */ - getAllSeries(): Array; - /** Gets a series within the chart's series collection by the specified name (see the name option). */ - getSeriesByName(seriesName: string): BaseSeries; - /** Gets a series within the chart's series collection by its position number. */ - getSeriesByPos(seriesIndex: number): BaseSeries; - /** Displays the loading indicator. */ - showLoadingIndicator(): void; - /** Conceals the loading indicator. */ - hideLoadingIndicator(): void; - /** Hides all widget tooltips. */ - hideTooltip(): void; - /** Redraws a widget. */ - render(renderOptions?: { - force?: boolean; - animate?: boolean; - asyncSeriesRendering?: boolean; - }): void; - } - export interface AdvancedLegend extends core.BaseLegend { - /** Specifies the text for a hint that appears when a user hovers the mouse pointer over a legend item. */ - customizeHint?: (seriesInfo: { seriesName: string; seriesIndex: number; seriesColor: string; }) => string; - /**

Specifies a callback function that returns the text to be displayed by legend items.

*/ - customizeText?: (seriesInfo: { seriesName: string; seriesIndex: number; seriesColor: string; }) => string; - /** Specifies what series elements to highlight when a corresponding item in the legend is hovered over. */ - hoverMode?: string; - } - export interface AdvancedOptions extends BaseChartOptions { - /** A handler for the argumentAxisClick event. */ - onArgumentAxisClick?: any; - /** Specifies the color of the parent page element. */ - containerBackgroundColor?: string; - /** An object providing options for managing data from a data source. */ - dataPrepareSettings?: { - /** Specifies whether or not to validate the values from a data source. */ - checkTypeForAllData?: boolean; - /** Specifies whether or not to convert the values from a data source into the data type of an axis. */ - convertToAxisDataType?: boolean; - /** Specifies how to sort the series points. */ - sortingMethod?: any; - }; - /** A handler for the legendClick event. */ - onLegendClick?: any; - /** A handler for the seriesClick event. */ - onSeriesClick?: any; - /** A handler for the seriesHoverChanged event. */ - onSeriesHoverChanged?: (e: { - component: BaseChart; - element: Element; - target: TSeries; - }) => void; - /** A handler for the seriesSelectionChanged event. */ - onSeriesSelectionChanged?: (e: { - component: BaseChart; - element: Element; - target: TSeries; - }) => void; - /** Specifies whether a single series or multiple series can be selected in the chart. */ - seriesSelectionMode?: string; - /** Specifies how the chart must behave when series point labels overlap. */ - resolveLabelOverlapping?: string; - /** Specifies whether or not all bars in a series must have the same angle, or may have different angles if any points in other series are missing. */ - equalBarWidth?: boolean; - /** Specifies a common bar width as a percentage from 0 to 1. */ - barWidth?: number; - } - export interface Legend extends AdvancedLegend { - /** Specifies whether the legend is located outside or inside the chart's plot. */ - position?: string; - } - export interface ChartTooltip extends BaseChartTooltip { - /** Specifies whether the tooltip must be located in the center of a bar or on its edge. Applies to the Bar and Bubble series. */ - location?: string; - /** Specifies the kind of information to display in a tooltip. */ - shared?: boolean; - } - export interface dxChartOptions extends AdvancedOptions { - adaptiveLayout?: { - keepLabels?: boolean; - }; - /** Indicates whether or not to synchronize value axes when they are displayed on a single pane. */ - synchronizeMultiAxes?: boolean; - /** Specifies whether or not to filter the series points depending on their quantity. */ - useAggregation?: boolean; - /** Indicates whether or not to adjust a value axis to the current minimum and maximum values of a zoomed chart. */ - adjustOnZoom?: boolean; - /** Specifies argument axis options for the dxChart widget. */ - argumentAxis?: ChartArgumentAxis; - /** An object defining the configuration options that are common for all axes of the dxChart widget. */ - commonAxisSettings?: ChartCommonAxisSettings; - /** An object defining the configuration options that are common for all panes in the dxChart widget. */ - commonPaneSettings?: CommonPane; - /** An object defining the configuration options that are common for all series of the dxChart widget. */ - commonSeriesSettings?: CommonSeriesSettings; - /** An object that specifies the appearance options of the chart crosshair. */ - crosshair?: { - /** Specifies a color for the crosshair lines. */ - color?: string; - /** Specifies a dash style for the crosshair lines. */ - dashStyle?: string; - /** Specifies whether to enable the crosshair or not. */ - enabled?: boolean; - /** Specifies the opacity of the crosshair lines. */ - opacity?: number; - /** Specifies the width of the crosshair lines. */ - width?: number; - /** Specifies the appearance of the horizontal crosshair line. */ - horizontalLine?: CrosshaierWithLabel; - /** Specifies the appearance of the vertical crosshair line. */ - verticalLine?: CrosshaierWithLabel; - /** Specifies the options of the crosshair labels. */ - label?: { - /** Specifies a color for the background of the crosshair labels. */ - backgroundColor?: string; - /** Specifies whether the crosshair labels are visible or not. */ - visible?: boolean; - /** Specifies font options for the text of the crosshair labels. */ - font?: viz.core.Font; - } - }; - /** Specifies a default pane for the chart's series. */ - defaultPane?: string; - /** Specifies a coefficient determining the diameter of the largest bubble. */ - maxBubbleSize?: number; - /** Specifies the diameter of the smallest bubble measured in pixels. */ - minBubbleSize?: number; - /** Defines the dxChart widget's pane(s). */ - panes?: Array; - /** Swaps the axes round so that the value axis becomes horizontal and the argument axes becomes vertical. */ - rotated?: boolean; - /** Specifies the options of a chart's legend. */ - legend?: Legend; - /** Specifies options for dxChart widget series. */ - series?: Array; - /** Defines options for the series template. */ - seriesTemplate?: SeriesTemplate; - /** Specifies tooltip options. */ - tooltip?: ChartTooltip; - /** Specifies value axis options for the dxChart widget. */ - valueAxis?: Array; - /** Enables scrolling in your chart. */ - scrollingMode?: string; - /** Enables zooming in your chart. */ - zoomingMode?: string; - /** Specifies the settings of the scroll bar. */ - scrollBar?: { - /** Specifies whether the scroll bar is visible or not. */ - visible?: boolean; - /** Specifies the spacing between the scroll bar and the chart's plot in pixels. */ - offset?: number; - /** Specifies the color of the scroll bar. */ - color?: string; - /** Specifies the width of the scroll bar in pixels. */ - width?: number; - /** Specifies the opacity of the scroll bar. */ - opacity?: number; - /** Specifies the position of the scroll bar in the chart. */ - position?: string; - }; - } - /** A widget used to embed charts into HTML JS applications. */ - export class dxChart extends BaseChart { - constructor(element: JQuery, options?: dxChartOptions); - constructor(element: Element, options?: dxChartOptions); - /** Sets the specified start and end values for the chart's argument axis. */ - zoomArgument(startValue: any, endValue: any): void; - } - interface CrosshaierWithLabel extends viz.core.DashedBorderWithOpacity { - /** Configures the label that belongs to the horizontal crosshair line. */ - label?: { - /** Specifies a color for the background of the label that belongs to the horizontal crosshair line. */ - backgroundColor?: string; - /** Specifies whether the label of the horizontal crosshair line is visible or not. */ - visible?: boolean; - /** Specifies font options for the text of the label that belongs to the horizontal crosshair line. */ - font?: viz.core.Font; - } - } - export interface PolarChartTooltip extends BaseChartTooltip { - /** Specifies the kind of information to display in a tooltip. */ - shared?: boolean; - } - export interface dxPolarChartOptions extends AdvancedOptions { - /** Specifies adaptive layout options. */ - adaptiveLayout?: { - width?: number; - height?: number; - /** Specifies whether or not point labels can be hidden when the layout is adapting. */ - keepLabels?: boolean; - }; - /** Indicates whether or not to display a "spider web". */ - useSpiderWeb?: boolean; - /** Specifies argument axis options for the dxPolarChart widget. */ - argumentAxis?: PolarArgumentAxis; - /** An object defining the configuration options that are common for all axes of the dxPolarChart widget. */ - commonAxisSettings?: PolarCommonAxisSettings; - /** An object defining the configuration options that are common for all series of the dxPolarChart widget. */ - commonSeriesSettings?: CommonPolarSeriesSettings; - /** Specifies the options of a chart's legend. */ - legend?: AdvancedLegend; - /** Specifies options for dxPolarChart widget series. */ - series?: Array; - /** Defines options for the series template. */ - seriesTemplate?: PolarSeriesTemplate; - /** Specifies tooltip options. */ - tooltip?: PolarChartTooltip; - /** Specifies value axis options for the dxPolarChart widget. */ - valueAxis?: PolarValueAxis; - } - /** A chart widget displaying data in a polar coordinate system. */ - export class dxPolarChart extends BaseChart { - constructor(element: JQuery, options?: dxPolarChartOptions); - constructor(element: Element, options?: dxPolarChartOptions); - } - export interface PieLegend extends core.BaseLegend { - /** Specifies what chart elements to highlight when a corresponding item in the legend is hovered over. */ - hoverMode?: string; - /** Specifies the text for a hint that appears when a user hovers the mouse pointer over a legend item. */ - customizeHint?: (pointInfo: { pointName: string; pointIndex: number; pointColor: string; }) => string; - /** Specifies a callback function that returns the text to be displayed by a legend item. */ - customizeText?: (pointInfo: { pointName: string; pointIndex: number; pointColor: string; }) => string; - } - export interface dxPieChartOptions extends BaseChartOptions { - /** Specifies adaptive layout options. */ - adaptiveLayout?: { - /** Specifies whether or not point labels can be hidden when the layout is adapting. */ - keepLabels?: boolean; - }; - /** Specifies dxPieChart legend options. */ - legend?: PieLegend; - /** Specifies options for the series of the dxPieChart widget. */ - series?: Array; - /** Specifies the diameter of the pie. */ - diameter?: number; - /** Specifies the direction that the pie chart segments will occupy. */ - segmentsDirection?: string; - /** Specifies the starting angle in arc degrees for the first segment in a pie chart. */ - startAngle?: number; - /** Specifies the fraction of the inner radius relative to the total radius in the series of the 'doughnut' type. The value should be between 0 and 1. */ - innerRadius?: number; - /** A handler for the legendClick event. */ - onLegendClick?: any; - /** Specifies how a chart must behave when series point labels overlap. */ - resolveLabelOverlapping?: string; - /** An object defining the configuration options that are common for all series of the dxPieChart widget. */ - commonSeriesSettings?: CommonPieSeriesSettings; - /** Specifies the type of the pie chart series. */ - type?: string; - } - /** A circular chart widget for HTML JS applications. */ - export class dxPieChart extends BaseChart { - constructor(element: JQuery, options?: dxPieChartOptions); - constructor(element: Element, options?: dxPieChartOptions); - /** - * Provides access to the dxPieChart series. - * @deprecated ..\..\BaseChart\3 Methods\getAllSeries().md - */ - getSeries(): PieSeries; - } -} -interface JQuery { - dxChart(options?: DevExpress.viz.charts.dxChartOptions): JQuery; - dxChart(methodName: string, ...params: any[]): any; - dxChart(methodName: "instance"): DevExpress.viz.charts.dxChart; - dxPieChart(options?: DevExpress.viz.charts.dxPieChartOptions): JQuery; - dxPieChart(methodName: string, ...params: any[]): any; - dxPieChart(methodName: "instance"): DevExpress.viz.charts.dxPieChart; - dxPolarChart(options?: DevExpress.viz.charts.dxPolarChartOptions): JQuery; - dxPolarChart(methodName: string, ...params: any[]): any; - dxPolarChart(methodName: "instance"): DevExpress.viz.charts.dxPolarChart; -} -declare module DevExpress.viz.gauges { - export interface BaseRangeContainer { - /** Specifies a range container's background color. */ - backgroundColor?: string; - /** Specifies the offset of the range container from an invisible scale line in pixels. */ - offset?: number; - /** Sets the name of the palette or an array of colors to be used for coloring the gauge range container. */ - palette?: any; - /** An array of objects representing ranges contained in the range container. */ - ranges?: Array<{ startValue: number; endValue: number; color: string }>; - /** Specifies a color of a range. */ - color?: string; - /** Specifies an end value of a range. */ - endValue?: number; - /** Specifies a start value of a range. */ - startValue?: number; - } - export interface ScaleTick { - /** Specifies the color of the scale's minor ticks. */ - color?: string; - /** - * Specifies an array of custom minor ticks. - * @deprecated ..\customMinorTicks.md - */ - customTickValues?: Array; - /** Specifies the length of the scale's minor ticks. */ - length?: number; - /** - * Indicates whether automatically calculated minor ticks are visible or not. - * @deprecated This functionality in not more available - */ - showCalculatedTicks?: boolean; - /** - * Specifies an interval between minor ticks. - * @deprecated ..\minorTickInterval.md - */ - tickInterval?: number; - /** Indicates whether scale minor ticks are visible or not. */ - visible?: boolean; - /** Specifies the width of the scale's minor ticks. */ - width?: number; - } - export interface ScaleMajorTick extends ScaleTick { - /** - * Specifies whether or not to expand the current major tick interval if labels overlap each other. - * @deprecated ..\label\overlappingBehavior\useAutoArrangement.md - */ - useTicksAutoArrangement?: boolean; - } - export interface ScaleMinorTick extends ScaleTick { - /** Specifies the opacity of the scale's minor ticks. */ - opacity?: number; - } - export interface BaseScaleLabel { - /** Specifies whether or not scale labels should be colored similarly to their corresponding ranges in the range container. */ - useRangeColors?: boolean; - /** Specifies a callback function that returns the text to be displayed in scale labels. */ - customizeText?: (scaleValue: { value: number; valueText: string }) => string; - /** Specifies the overlap resolving options to be applied to scale labels. */ - overlappingBehavior?: { - /** Specifies whether or not to expand the current major tick interval if labels overlap each other. */ - useAutoArrangement?: boolean; - /** Specifies what label to hide in case of overlapping. */ - hideFirstOrLast?: string; - }; - /** Specifies font options for the text displayed in the scale labels of the gauge. */ - font?: viz.core.Font; - /** Specifies a format for the text displayed in scale labels. */ - format?: string; - /** Specifies a precision for the formatted value displayed in the scale labels. */ - precision?: number; - /** Specifies whether or not scale labels are visible on the gauge. */ - visible?: boolean; - } - export interface BaseScale { - /** Specifies the end value for the scale of the gauge. */ - endValue?: number; - /** - * Specifies whether or not to hide the first scale label. - * @deprecated This functionality in not more available - */ - hideFirstLabel?: boolean; - /** - * Specifies whether or not to hide the first major tick on the scale. - * @deprecated This functionality in not more available - */ - hideFirstTick?: boolean; - /** - * Specifies whether or not to hide the last scale label. - * @deprecated This functionality in not more available - */ - hideLastLabel?: boolean; - /** - * Specifies whether or not to hide the last major tick on the scale. - * @deprecated This functionality in not more available - */ - hideLastTick?: boolean; - /** Specifies an interval between major ticks. */ - tickInterval?: number; - /** Specifies an interval between minor ticks. */ - minorTickInterval?: number; - /** Specifies an array of custom major ticks. */ - customTicks?: Array; - /** Specifies an array of custom minor ticks. */ - customMinorTicks?: Array; - /** Specifies common options for scale labels. */ - label?: BaseScaleLabel; - /** - * Specifies options of the gauge's major ticks. - * @deprecated ..\tick\tick.md - */ - majorTick?: ScaleMajorTick; - /** Specifies options of the gauge's major ticks. */ - tick?: { - /** Specifies the color of the scale's major ticks. */ - color?: string; - /** Specifies the length of the scale's major ticks. */ - length?: number; - /** Indicates whether scale major ticks are visible or not. */ - visible?: boolean; - /** Specifies the width of the scale's major ticks. */ - width?: number; - /** Specifies the opacity of the scale's major ticks. */ - opacity?: number; - }; - /** Specifies options of the gauge's minor ticks. */ - minorTick?: ScaleMinorTick; - /** Specifies the start value for the scale of the gauge. */ - startValue?: number; - } - export interface BaseValueIndicator { - /** Specifies the type of subvalue indicators. */ - type?: string; - /** Specifies the background color for the indicator of the rangeBar type. */ - backgroundColor?: string; - /** Specifies the base value for the indicator of the rangeBar type. */ - baseValue?: number; - /** Specifies a color of the indicator. */ - color?: string; - /** Specifies the range bar size for an indicator of the rangeBar type. */ - size?: number; - text?: { - /** Specifies a callback function that returns the text to be displayed in an indicator. */ - customizeText?: (indicatedValue: { value: number; valueText: string }) => string; - font?: viz.core.Font; - /** Specifies a format for the text displayed in an indicator. */ - format?: string; - /** Specifies the range bar's label indent in pixels. */ - indent?: number; - /** Specifies a precision for the formatted value displayed by an indicator. */ - precision?: number; - }; - offset?: number; - length?: number; - width?: number; - /** Specifies the length of an arrow for the indicator of the textCloud type in pixels. */ - arrowLength?: number; - /** Sets the array of colors to be used for coloring subvalue indicators. */ - palette?: Array; - /** Specifies the distance between the needle and the center of a gauge for the indicator of a needle-like type. */ - indentFromCenter?: number; - /** Specifies the second color for the indicator of the twoColorNeedle type. */ - secondColor?: string; - /** Specifies the length of a twoNeedleColor type indicator tip as a percentage. */ - secondFraction?: number; - /** Specifies the spindle's diameter in pixels for the indicator of a needle-like type. */ - spindleSize?: number; - /** Specifies the inner diameter in pixels, so that the spindle has the shape of a ring. */ - spindleGapSize?: number; - /** Specifies the orientation of the rangeBar indicator on a vertically oriented dxLinearGauge widget. */ - horizontalOrientation?: string; - /** Specifies the orientation of the rangeBar indicator on a horizontally oriented dxLinearGauge widget. */ - verticalOrientation?: string; - } - export interface SharedGaugeOptions { - /** Specifies animation options. */ - animation?: viz.core.Animation; - /** Specifies the appearance of the loading indicator. */ - loadingIndicator?: viz.core.LoadingIndicator; - /** Specifies whether to redraw the widget when the size of the parent browser window changes or a mobile device rotates. */ - redrawOnResize?: boolean; - /** Specifies the size of the widget in pixels. */ - size?: viz.core.Size; - /** - * Specifies a subtitle for the widget. - * @deprecated ..\..\..\BaseGauge\1 Configuration\title\subtitle\subtitle.md - */ - subtitle?: { - /** - * Specifies font options for the subtitle. - * @deprecated ..\..\title\subtitle\font\font.md - */ - font?: viz.core.Font; - /** - * Specifies a text for the subtitle. - * @deprecated ..\title\subtitle\text.md - */ - text?: string; - }; - /** Specifies a title for a gauge. */ - title?: { - /** Specifies font options for the title. */ - font?: viz.core.Font; - /** - * Specifies a title's position on the gauge. - * @deprecated basegaugeoptions_title_verticalAlignment and basegaugeoptions_title_horizontalAlignment - */ - position?: string; - /** Specifies the distance between the title and surrounding gauge elements in pixels. */ - margin?: viz.core.Margins; - /** Specifies the height of the space reserved for the title. */ - placeholderSize?: number; - /** Specifies the gauge title's position in the vertical direction. */ - verticalAlignment?: string; - /** Specifies the gauge title's horizontal position. */ - horizontalAlignment?: string; - /** Specifies text for the title. */ - text?: string; - /** Specifies a subtitle for the widget. */ - subtitle?: { - /** Specifies font options for the subtitle. */ - font?: viz.core.Font; - /** Specifies text for the subtitle. */ - text?: string; - } - }; - /** Specifies options for gauge tooltips. */ - tooltip?: viz.core.Tooltip; - /** A handler for the tooltipShown event. */ - onTooltipShown?: (e: { - component: dxBaseGauge; - element: Element; - target: {}; - }) => void; - /** A handler for the tooltipHidden event. */ - onTooltipHidden?: (e: { - component: dxBaseGauge; - element: Element; - target: {}; - }) => void; - } - export interface BaseGaugeOptions extends viz.core.BaseWidgetOptions, SharedGaugeOptions { - /** Specifies the color of the parent page element. */ - containerBackgroundColor?: string; - /** Specifies the blank space in pixels between the widget's extreme elements and the boundaries of the area provided for the widget (see the size option). */ - margin?: viz.core.Margins; - /** Specifies options of the gauge's range container. */ - rangeContainer?: BaseRangeContainer; - /** Specifies a gauge's scale options. */ - scale?: BaseScale; - /** Specifies the appearance options of subvalue indicators. */ - subvalueIndicator?: BaseValueIndicator; - /** Specifies a set of subvalues to be designated by the subvalue indicators. */ - subvalues?: Array; - /** Specifies the main value on a gauge. */ - value?: number; - /** Specifies the appearance options of the value indicator. */ - valueIndicator?: BaseValueIndicator; - } - /** A gauge widget. */ - export class dxBaseGauge extends viz.core.BaseWidget { - /** Displays the loading indicator. */ - showLoadingIndicator(): void; - /** Conceals the loading indicator. */ - hideLoadingIndicator(): void; - /** Redraws a widget. */ - render(): void; - /** Returns the main gauge value. */ - value(): number; - /** Updates a gauge value. */ - value(value: number): void; - /** Returns an array of gauge subvalues. */ - subvalues(): Array; - /** Updates gauge subvalues. */ - subvalues(subvalues: Array): void; - } - export interface LinearRangeContainer extends BaseRangeContainer { - /** Specifies the orientation of the range container on a vertically oriented dxLinearGauge widget. */ - horizontalOrientation?: string; - /** Specifies the orientation of a range container on a horizontally oriented dxLinearGauge widget. */ - verticalOrientation?: string; - /** Specifies the width of the range container's start and end boundaries in the dxLinearGauge widget. */ - width?: any; - /** Specifies an end width of a range container. */ - end?: number; - /** Specifies a start width of a range container. */ - start?: number; - } - export interface LinearScaleLabel extends BaseScaleLabel { - /** Specifies the spacing between scale labels and ticks. */ - indentFromTick?: number; - } - export interface LinearScale extends BaseScale { - /** Specifies the orientation of scale ticks on a vertically oriented dxLinearGauge widget. */ - horizontalOrientation?: string; - label?: LinearScaleLabel; - /** Specifies the orientation of scale ticks on a horizontally oriented dxLinearGauge widget. */ - verticalOrientation?: string; - } - export interface dxLinearGaugeOptions extends BaseGaugeOptions { - /** Specifies the options required to set the geometry of the dxLinearGauge widget. */ - geometry?: { - /** Indicates whether to display the dxLinearGauge widget vertically or horizontally. */ - orientation?: string; - }; - /** Specifies gauge range container options. */ - rangeContainer?: LinearRangeContainer; - scale?: LinearScale; - } - /** A widget that represents a gauge with a linear scale. */ - export class dxLinearGauge extends dxBaseGauge { - constructor(element: JQuery, options?: dxLinearGaugeOptions); - constructor(element: Element, options?: dxLinearGaugeOptions); - } - export interface CircularRangeContainer extends BaseRangeContainer { - /** Specifies the orientation of the range container in the dxCircularGauge widget. */ - orientation?: string; - /** Specifies the range container's width in pixels. */ - width?: number; - } - export interface CircularScaleLabel extends BaseScaleLabel { - /** Specifies the spacing between scale labels and ticks. */ - indentFromTick?: number; - } - export interface CircularScale extends BaseScale { - label?: CircularScaleLabel; - /** Specifies the orientation of scale ticks. */ - orientation?: string; - } - export interface dxCircularGaugeOptions extends BaseGaugeOptions { - /** Specifies the options required to set the geometry of the dxCircularGauge widget. */ - geometry?: { - /** Specifies the end angle of the circular gauge's arc. */ - endAngle?: number; - /** Specifies the start angle of the circular gauge's arc. */ - startAngle?: number; - }; - /** Specifies gauge range container options. */ - rangeContainer?: CircularRangeContainer; - scale?: CircularScale; - } - /** A widget that represents a gauge with a circular scale. */ - export class dxCircularGauge extends dxBaseGauge { - constructor(element: JQuery, options?: dxCircularGaugeOptions); - constructor(element: Element, options?: dxCircularGaugeOptions); - } - export interface dxBarGaugeOptions extends viz.core.BaseWidgetOptions, SharedGaugeOptions { - /** Specifies a color for the remaining segment of the bar's track. */ - backgroundColor?: string; - /** Specifies a distance between bars in pixels. */ - barSpacing?: number; - /** Specifies a base value for bars. */ - baseValue?: number; - /** Specifies an end value for the gauge's invisible scale. */ - endValue?: number; - /** Defines the shape of the gauge's arc. */ - geometry?: { - /** Specifies the end angle of the bar gauge's arc. */ - endAngle?: number; - /** Specifies the start angle of the bar gauge's arc. */ - startAngle?: number; - }; - /** Specifies the options of the labels that accompany gauge bars. */ - label?: { - /** Specifies a color for the label connector text. */ - connectorColor?: string; - /** Specifies the width of the label connector in pixels. */ - connectorWidth?: number; - /** Specifies a callback function that returns a text for labels. */ - customizeText?: (barValue: { value: number; valueText: string }) => string; - /** Specifies font options for bar labels. */ - font?: viz.core.Font; - /** Specifies a format for bar labels. */ - format?: string; - /** Specifies the distance between the upper bar and bar labels in pixels. */ - indent?: number; - /** Specifies a precision for the formatted value displayed by labels. */ - precision?: number; - /** Specifies whether bar labels appear on a gauge or not. */ - visible?: boolean; - }; - /** Sets the name of the palette or an array of colors to be used for coloring the gauge range container. */ - palette?: string; - /** Defines the radius of the bar that is closest to the center relatively to the radius of the topmost bar. */ - relativeInnerRadius?: number; - /** Specifies a start value for the gauge's invisible scale. */ - startValue?: number; - /** Specifies the array of values to be indicated on a bar gauge. */ - values?: Array; - } - /** A circular bar widget. */ - export class dxBarGauge extends viz.core.BaseWidget { - constructor(element: JQuery, options?: dxBarGaugeOptions); - constructor(element: Element, options?: dxBarGaugeOptions); - /** Displays the loading indicator. */ - showLoadingIndicator(): void; - /** Conceals the loading indicator. */ - hideLoadingIndicator(): void; - /** Redraws the widget. */ - render(): void; - /** Returns an array of gauge values. */ - values(): Array; - /** Updates the values displayed by a gauge. */ - values(values: Array): void; - } -} -interface JQuery { - dxLinearGauge(options?: DevExpress.viz.gauges.dxLinearGaugeOptions): JQuery; - dxLinearGauge(methodName: string, ...params: any[]): any; - dxLinearGauge(methodName: "instance"): DevExpress.viz.gauges.dxLinearGauge; - dxCircularGauge(options?: DevExpress.viz.gauges.dxCircularGaugeOptions): JQuery; - dxCircularGauge(methodName: string, ...params: any[]): any; - dxCircularGauge(methodName: "instance"): DevExpress.viz.gauges.dxCircularGauge; - dxBarGauge(options?: DevExpress.viz.gauges.dxBarGaugeOptions): JQuery; - dxBarGauge(methodName: string, ...params: any[]): any; - dxBarGauge(methodName: "instance"): DevExpress.viz.gauges.dxBarGauge; -} -declare module DevExpress.viz.rangeSelector { - export interface dxRangeSelectorOptions extends viz.core.BaseWidgetOptions { - /** Specifies the options for the range selector's background. */ - background?: { - /** Specifies the background color for the dxRangeSelector. */ - color?: string; - /** Specifies image options. */ - image?: { - /** Specifies a location for the image in the background of a range selector. */ - location?: string; - /** Specifies the image's URL. */ - url?: string; - }; - /** Indicates whether or not the background (background color and/or image) is visible. */ - visible?: boolean; - }; - /** Specifies a title for the range selector. */ - title?: viz.core.Title; - /** Specifies the dxRangeSelector's behavior options. */ - behavior?: { - /** Indicates whether or not you can swap sliders. */ - allowSlidersSwap?: boolean; - /** Indicates whether or not animation is enabled. */ - animationEnabled?: boolean; - /** Specifies when to call the onSelectedRangeChanged function. */ - callSelectedRangeChanged?: string; - /** Indicates whether or not an end user can specify the range using a mouse, without the use of sliders. */ - manualRangeSelectionEnabled?: boolean; - /** Indicates whether or not an end user can shift the selected range to the required location on a scale by clicking. */ - moveSelectedRangeByClick?: boolean; - /** Indicates whether to snap a slider to ticks. */ - snapToTicks?: boolean; - }; - /** Specifies the options required to display a chart as the range selector's background. */ - chart?: { - /** Specifies a coefficient for determining an indent from the bottom background boundary to the lowest chart point. */ - bottomIndent?: number; - /** An object defining the common configuration options for the chart’s series. */ - commonSeriesSettings?: viz.charts.CommonSeriesSettings; - /** An object providing options for managing data from a data source. */ - dataPrepareSettings?: { - /** Specifies whether or not to validate values from a data source. */ - checkTypeForAllData?: boolean; - /** Specifies whether or not to convert the values from a data source into the data type of an axis. */ - convertToAxisDataType?: boolean; - /** Specifies how to sort series points. */ - sortingMethod?: any; - }; - /** Specifies whether all bars in a series must have the same width, or may have different widths if any points in other series are missing. */ - equalBarWidth?: boolean; - /** Specifies a common bar width as a percentage from 0 to 1. */ - barWidth?: number; - /** Sets the name of the palette to be used in the range selector's chart. Alternatively, an array of colors can be set as a custom palette to be used within this chart. */ - palette?: any; - /** An object defining the chart’s series. */ - series?: Array; - /** Defines options for the series template. */ - seriesTemplate?: viz.charts.SeriesTemplate; - /** Specifies a coefficient for determining an indent from the background's top boundary to the topmost chart point. */ - topIndent?: number; - /** Specifies whether or not to filter the series points depending on their quantity. */ - useAggregation?: boolean; - /** Specifies options for the chart's value axis. */ - valueAxis?: { - /** Indicates whether or not the chart's value axis must be inverted. */ - inverted?: boolean; - /** Specifies the value to be raised to a power when generating ticks for a logarithmic value axis. */ - logarithmBase?: number; - /** Specifies the maximum value of the chart's value axis. */ - max?: number; - /** Specifies the minimum value of the chart's value axis. */ - min?: number; - /** Specifies the type of the value axis. */ - type?: string; - /** Specifies the desired type of axis values. */ - valueType?: string; - }; - }; - /** Specifies the color of the parent page element. */ - containerBackgroundColor?: string; - /** Specifies a data source for the scale values and for the chart at the background. */ - dataSource?: any; - /** Specifies the data source field that provides data for the scale. */ - dataSourceField?: string; - /** Specifies the appearance of the loading indicator. */ - loadingIndicator?: viz.core.LoadingIndicator; - /** Specifies the blank space in pixels between the dxRangeSelector widget's extreme elements and the boundaries of the area provided for the widget (see size). */ - margin?: viz.core.Margins; - /** Specifies whether to redraw the widget when the size of the parent browser window changes or a mobile device rotates. */ - redrawOnResize?: boolean; - /** Specifies options of the range selector's scale. */ - scale?: { - /** Specifies the scale's end value. */ - endValue?: any; - /** Specifies common options for scale labels. */ - label?: { - /** Specifies a callback function that returns the text to be displayed in scale labels. */ - customizeText?: (scaleValue: { value: any; valueText: string; }) => string; - /** Specifies font options for the text displayed in the range selector's scale labels. */ - font?: viz.core.Font; - /** Specifies a format for the text displayed in scale labels. */ - format?: string; - /** Specifies a precision for the formatted value displayed in the scale labels. */ - precision?: number; - /** Specifies a spacing between scale labels and the background bottom edge. */ - topIndent?: number; - /** Specifies whether or not the scale's labels are visible. */ - visible?: boolean; - }; - /** Specifies the value to be raised to a power when generating ticks for a logarithmic scale. */ - logarithmBase?: number; - /** Specifies an interval between major ticks. */ - majorTickInterval?: any; - /** Specifies options for the date-time scale's markers. */ - marker?: { - /** Defines the options that can be set for the text that is displayed by the scale markers. */ - label?: { - /** Specifies a callback function that returns the text to be displayed in scale markers. */ - customizeText?: (markerValue: { value: any; valueText: string }) => string; - /** Specifies a format for the text displayed in scale markers. */ - format?: string; - }; - /** Specifies the height of the marker's separator. */ - separatorHeight?: number; - /** Specifies the space between the marker label and the marker separator. */ - textLeftIndent?: number; - /** Specifies the space between the marker's label and the top edge of the marker's separator. */ - textTopIndent?: number; - /** Specified the indent between the marker and the scale lables. */ - topIndent?: number; - /** Indicates whether scale markers are visible. */ - visible?: boolean; - }; - /** Specifies the maximum range that can be selected. */ - maxRange?: any; - /** Specifies the number of minor ticks between neighboring major ticks. */ - minorTickCount?: number; - /** Specifies an interval between minor ticks. */ - minorTickInterval?: any; - /** Specifies the minimum range that can be selected. */ - minRange?: any; - /** Specifies the height of the space reserved for the scale in pixels. */ - placeholderHeight?: number; - /** Indicates whether or not to set ticks of a date-time scale at the beginning of each date-time interval. */ - setTicksAtUnitBeginning?: boolean; - /** Specifies whether or not to show ticks for the boundary scale values, when neither major ticks nor minor ticks are created for these values. */ - showCustomBoundaryTicks?: boolean; - /** Indicates whether or not to show minor ticks on the scale. */ - showMinorTicks?: boolean; - /** Specifies the scale's start value. */ - startValue?: any; - /** Specifies options defining the appearance of scale ticks. */ - tick?: { - /** Specifies the color of scale ticks (both major and minor ticks). */ - color?: string; - /** Specifies the opacity of scale ticks (both major and minor ticks). */ - opacity?: number; - /** Specifies the width of the scale's ticks (both major and minor ticks). */ - width?: number; - }; - /** Specifies the type of the scale. */ - type?: string; - /** Specifies whether or not to expand the current tick interval if labels overlap each other. */ - useTicksAutoArrangement?: boolean; - /** Specifies the type of values on the scale. */ - valueType?: string; - /** Specifies the order of arguments on a discrete scale. */ - categories?: Array; - }; - /** Specifies the range to be selected when displaying the dxRangeSelector. */ - selectedRange?: { - /** Specifies the start value of the range to be selected when displaying the dxRangeSelector widget on a page. */ - startValue?: any; - /** Specifies the end value of the range to be selected when displaying the dxRangeSelector widget on a page. */ - endValue?: any; - }; - /** Specifies the color of the selected range. */ - selectedRangeColor?: string; - /** Range selector's indent options. */ - indent?: { - /** Specifies range selector's left indent. */ - left?: number; - /** Specifies range selector's right indent. */ - right?: number; - }; - /** A handler for the selectedRangeChanged event. */ - onSelectedRangeChanged?: (e: { - startValue: any; - endValue: any; - component: dxRangeSelector; - element: Element; - }) => void; - /** Specifies range selector shutter options. */ - shutter?: { - /** Specifies shutter color. */ - color?: string; - /** Specifies the opacity of the color of shutters. */ - opacity?: number; - }; - /** Specifies in pixels the size of the dxRangeSelector widget. */ - size?: viz.core.Size; - /** Specifies the appearance of the range selector's slider handles. */ - sliderHandle?: { - /** Specifies the color of the slider handles. */ - color?: string; - /** Specifies the opacity of the slider handles. */ - opacity?: number; - /** Specifies the width of the slider handles. */ - width?: number; - }; - /** Defines the options of the range selector slider markers. */ - sliderMarker?: { - /** Specifies the color of the slider markers. */ - color?: string; - /** Specifies a callback function that returns the text to be displayed by slider markers. */ - customizeText?: (scaleValue: { value: any; valueText: any; }) => string; - /** Specifies font options for the text displayed by the range selector slider markers. */ - font?: viz.core.Font; - /** Specifies a format for the text displayed in slider markers. */ - format?: string; - /** Specifies the color used for the slider marker text when the currently selected range does not match the minRange and maxRange values. */ - invalidRangeColor?: string; - /** - * Specifies the empty space between the marker's border and the marker’s text. - * @deprecated Use the 'paddingTopBottom' and 'paddingLeftRight' options instead - */ - padding?: number; - /** Specifies the empty space between the marker's top and bottom borders and the marker's text. */ - paddingTopBottom?: number; - /** Specifies the empty space between the marker's left and right borders and the marker's text. */ - paddingLeftRight?: number; - /** Specifies the placeholder height of the slider marker. */ - placeholderHeight?: number; - /** - * Specifies in pixels the height and width of the space reserved for the range selector slider markers. - * @deprecated Use the 'placeholderHeight' and 'indent' options instead - */ - placeholderSize?: { - /** Specifies the height of the placeholder for the left and right slider markers. */ - height?: number; - /** Specifies the width of the placeholder for the left and right slider markers. */ - width?: { - /** Specifies the width of the left slider marker's placeholder. */ - left?: number; - /** Specifies the width of the right slider marker's placeholder. */ - right?: number; - }; - }; - /** Specifies a precision for the formatted value displayed in slider markers. */ - precision?: number; - /** Indicates whether or not the slider markers are visible. */ - visible?: boolean; - }; - } - /** A widget that allows end users to select a range of values on a scale. */ - export class dxRangeSelector extends viz.core.BaseWidget { - constructor(element: JQuery, options?: dxRangeSelectorOptions); - constructor(element: Element, options?: dxRangeSelectorOptions); - /** Displays the loading indicator. */ - showLoadingIndicator(): void; - /** Conceals the loading indicator. */ - hideLoadingIndicator(): void; - /** Redraws a widget. */ - render(skipChartAnimation?: boolean): void; - /** Returns the currently selected range. */ - getSelectedRange(): { startValue: any; endValue: any; }; - /** Sets a specified range. */ - setSelectedRange(selectedRange: { startValue: any; endValue: any; }): void; - } -} -interface JQuery { - dxRangeSelector(options?: DevExpress.viz.rangeSelector.dxRangeSelectorOptions): JQuery; - dxRangeSelector(methodName: string, ...params: any[]): any; - dxRangeSelector(methodName: "instance"): DevExpress.viz.rangeSelector.dxRangeSelector; -} -declare module DevExpress.viz.map { - /** This section describes the fields and methods that can be used in code to manipulate the Layer object. */ - export interface MapLayer { - /** The name of the layer. */ - name: string; - /** The layer index in the layers array. */ - index: number; - /** The layer type. Can be "area", "line" or "marker". */ - type: string; - /** The type of the layer elements. */ - elementType: string; - /** Gets all layer elements. */ - getElements(): Array; - /** Deselects all layer elements. */ - clearSelection(): void; - } - /** This section describes the fields and methods that can be used in code to manipulate the Layer Element object. */ - export interface MapLayerElement { - /** The parent layer of the layer element. */ - layer: MapLayer; - /** Gets the layer element coordinates. */ - coordinates(): Object; - /** Sets the value of an attribute. */ - attribute(name: string, value: any): void; - /** Gets the value of an attribute. */ - attribute(name: string): any; - /** Gets the selection state of the layer element. */ - selected(): boolean; - /** Sets the selection state of the layer element. */ - selected(state: boolean): void; - /** Applies the layer element settings and updates the element appearance. */ - applySettings(settings: any): void; - } - /** - * This section describes the fields and methods that can be used in code to manipulate the Area object. - * @deprecated Use the "Layer Element" instead - */ - export interface Area { - /** - * Contains the element type. - * @deprecated ..\..\Layer\2 Fields\type.md - */ - type: string; - /** - * Return the value of an attribute. - * @deprecated ..\..\Layer Element\3 Methods\attribute(name_value).md - */ - attribute(name: string): any; - /** - * Provides information about the selection state of an area. - * @deprecated Use the "selected()" method of the Layer Element - */ - selected(): boolean; - /** - * Sets a new selection state for an area. - * @deprecated Use the "selected(state)" method of the Layer Element - */ - selected(state: boolean): void; - /** - * Applies the area settings specified as a parameter and updates the area appearance. - * @deprecated ..\..\Layer Element\3 Methods\applySettings(settings).md - */ - applySettings(settings: any): void; - } - /** - * This section describes the fields and methods that can be used in code to manipulate the Markers object. - * @deprecated Use the "Layer Element" instead - */ - export interface Marker { - /** - * Contains the descriptive text accompanying the map marker. - * @deprecated Get the text with the "attribute" method (using the "layers.label.dataField" value) - */ - text: string; - /** - * Contains the type of the element. - * @deprecated ..\..\Layer\2 Fields\type.md - */ - type: string; - /** - * Contains the URL of an image map marker. - * @deprecated Get the url with the "attribute" method (using the "layers.dataField" value) - */ - url: string; - /** - * Contains the value of a bubble map marker. - * @deprecated Get the value with the "attribute" method (using the "layers.dataField" value) - */ - value: number; - /** - * Contains the values of a pie map marker. - * @deprecated Get the values with the "attribute" method (using the "layers.dataField" value) - */ - values: Array; - /** - * Returns the value of an attribute. - * @deprecated ..\..\Layer Element\3 Methods\attribute(name_value).md - */ - attribute(name: string): any; - /** - * Returns the coordinates of a specific marker. - * @deprecated ..\..\Layer Element\3 Methods\coordinates().md - */ - coordinates(): Array; - /** - * Provides information about the selection state of a marker. - * @deprecated Use the "selected()" method of the Layer Element - */ - selected(): boolean; - /** - * Sets a new selection state for a marker. - * @deprecated Use the "selected(state)" method of the Layer Element - */ - selected(state: boolean): void; - /** - * Applies the marker settings specified as a parameter and updates marker appearance. - * @deprecated ..\..\Layer Element\3 Methods\applySettings(settings).md - */ - applySettings(settings: any): void; - } - export interface MapLayerSettings { - /** Specifies the layer name. */ - name?: string; - /** Specifies layer type. */ - type?: string; - /** Specifies the type of a marker element. Setting this option makes sense only if the layer type is "marker". */ - elementType?: string; - /** Specifies a data source for the layer element. */ - data?: any; - /** Specifies the width of the layer elements border in pixels. */ - borderWidth?: number; - /** Specifies a color for the border of the layer elements. */ - borderColor?: string; - /** Specifies a color for layer elements. */ - color?: string; - /** Specifies a color for the border of the layer element when it is hovered over. */ - hoveredBorderColor?: string; - /** Specifies the pixel-measured width for the border of the layer element when it is hovered over. */ - hoveredBorderWidth?: number; - /** Specifies a color for a layer element when it is hovered over. */ - hoveredColor?: string; - /** Specifies a pixel-measured width for the border of the layer element when it is selected. */ - selectedBorderWidth?: number; - /** Specifies a color for the border of the layer element when it is selected. */ - selectedBorderColor?: string; - /** Specifies a color for the layer element when it is selected. */ - selectedColor?: string; - /** Specifies the layer opacity (from 0 to 1). */ - opacity?: number; - /** Specifies the size of markers. Setting this option makes sense only if the layer type is "marker" and the elementType is "dot", "pie" or "image". */ - size?: number; - /** Specifies the pixel-measured diameter of the marker that represents the smallest value. Setting this option makes sense only if the layer type is "marker". */ - minSize?: number; - /** Specifies the pixel-measured diameter of the marker that represents the biggest value. Setting this option makes sense only if the layer type is "marker". */ - maxSize?: number; - /** Specifies whether or not to change the appearance of a layer element when it is hovered over. */ - hoverEnabled?: boolean; - /** Specifies whether single or multiple map elements can be selected on a vector map. */ - selectionMode?: string; - /** Specifies the name of the palette or a custom range of colors to be used for coloring a layer. */ - palette?: any; - /** Specifies the number of colors in a palette. */ - paletteSize?: number; - /** Allows you to paint layer elements with similar attributes in the same color. */ - colorGroups?: Array; - /** Specifies the field that provides data to be used for coloring of layer elements. */ - colorGroupingField?: string; - /** Allows you to display bubbles with similar attributes in the same size. Setting this option makes sense only if the layer type is "marker" and the elementType is "bubble". */ - sizeGroups?: Array; - /** Specifies the field that provides data to be used for sizing bubble markers. Setting this option makes sense only if the layer type is "marker" and the elementType is "bubble". */ - sizeGroupingField?: string; - /** Specifies the name of the attribute containing marker data. Setting this option makes sense only if the layer type is "marker" and the elementType is "bubble", "pie" or "image". */ - dataField?: string; - /** Specifies the function that customizes each layer element individually. */ - customize?: (eleemnts: Array) => void; - /** Specifies marker label options. */ - label?: { - /** The name of the data attribute containing marker texts. */ - dataField?: string; - /** Enables marker labels. */ - enabled?: boolean; - /** Specifies font options for marker labels. */ - font?: viz.core.Font; - }; - } - export interface AreaSettings { - /** - * Specifies the width of the area border in pixels. - * @deprecated ..\layers\borderWidth.md - */ - borderWidth?: number; - /** - * Specifies a color for the area border. - * @deprecated ..\layers\borderColor.md - */ - borderColor?: string; - /** - * Specifies a color for an area. - * @deprecated ..\layers\color.md - */ - color?: string; - /** - * Specifies the function that customizes each area individually. - * @deprecated ..\layers\customize.md - */ - customize?: (areaInfo: Area) => AreaSettings; - /** - * Specifies a color for the area border when the area is hovered over. - * @deprecated ..\layers\hoveredBorderColor.md - */ - hoveredBorderColor?: string; - /** - * Specifies the pixel-measured width of the area border when the area is hovered over. - * @deprecated ..\layers\hoveredBorderWidth.md - */ - hoveredBorderWidth?: number; - /** - * Specifies a color for an area when this area is hovered over. - * @deprecated ..\layers\hoveredColor.md - */ - hoveredColor?: string; - /** - * Specifies whether or not to change the appearance of an area when it is hovered over. - * @deprecated ..\layers\hoverEnabled.md - */ - hoverEnabled?: boolean; - /** - * Configures area labels. - * @deprecated ..\..\layers\label\label.md - */ - label?: { - /** - * Specifies the data field that provides data for area labels. - * @deprecated ..\..\layers\label\dataField.md - */ - dataField?: string; - /** - * Enables area labels. - * @deprecated ..\..\layers\label\enabled.md - */ - enabled?: boolean; - /** - * Specifies font options for area labels. - * @deprecated ..\..\..\layers\label\font\font.md - */ - font?: viz.core.Font; - }; - /** - * Specifies the name of the palette or a custom range of colors to be used for coloring a map. - * @deprecated ..\layers\palette.md - */ - palette?: any; - /** - * Specifies the number of colors in a palette. - * @deprecated ..\layers\paletteSize.md - */ - paletteSize?: number; - /** - * Allows you to paint areas with similar attributes in the same color. - * @deprecated ..\layers\colorGroups.md - */ - colorGroups?: Array; - /** - * Specifies the field that provides data to be used for coloring areas. - * @deprecated ..\layers\colorGroupingField.md - */ - colorGroupingField?: string; - /** - * Specifies a color for the area border when the area is selected. - * @deprecated ..\layers\selectedBorderColor.md - */ - selectedBorderColor?: string; - /** - * Specifies a color for an area when this area is selected. - * @deprecated ..\layers\selectedColor.md - */ - selectedColor?: string; - /** - * Specifies the pixel-measured width of the area border when the area is selected. - * @deprecated ..\layers\selectedBorderWidth.md - */ - selectedBorderWidth?: number; - /** - * Specifies whether single or multiple areas can be selected on a vector map. - * @deprecated ..\layers\selectionMode.md - */ - selectionMode?: string; - } - export interface MarkerSettings { - /** - * Specifies a color for the marker border. - * @deprecated ..\layers\borderColor.md - */ - borderColor?: string; - /** - * Specifies the width of the marker border in pixels. - * @deprecated ..\layers\borderWidth.md - */ - borderWidth?: number; - /** - * Specifies a color for a marker of the dot or bubble type. - * @deprecated ..\layers\color.md - */ - color?: string; - /** - * Specifies the function that customizes each marker individually. - * @deprecated ..\layers\customize.md - */ - customize?: (markerInfo: Marker) => MarkerSettings; - /** - * Specifies the pixel-measured width of the marker border when the marker is hovered over. - * @deprecated ..\layers\hoveredBorderWidth.md - */ - hoveredBorderWidth?: number; - /** - * Specifies a color for the marker border when the marker is hovered over. - * @deprecated ..\layers\hoveredBorderColor.md - */ - hoveredBorderColor?: string; - /** - * Specifies a color for a marker of the dot or bubble type when this marker is hovered over. - * @deprecated ..\layers\hoveredColor.md - */ - hoveredColor?: string; - /** - * Specifies whether or not to change the appearance of a marker when it is hovered over. - * @deprecated ..\layers\hoverEnabled.md - */ - hoverEnabled?: boolean; - /** - * Specifies marker label options. - * @deprecated ..\..\layers\label\label.md - */ - label?: { - /** - * Enables marker labels. - * @deprecated ..\..\layers\label\enabled.md - */ - enabled?: boolean; - /** - * Specifies font options for marker labels. - * @deprecated ..\..\..\layers\label\font\font.md - */ - font?: viz.core.Font; - }; - /** - * Specifies the pixel-measured diameter of the marker that represents the biggest value. Setting this option makes sense only if you use markers of the bubble type. - * @deprecated ..\layers\maxSize.md - */ - maxSize?: number; - /** - * Specifies the pixel-measured diameter of the marker that represents the smallest value. Setting this option makes sense only if you use markers of the bubble type. - * @deprecated ..\layers\minSize.md - */ - minSize?: number; - /** - * Specifies the opacity of markers. Setting this option makes sense only if you use markers of the bubble type. - * @deprecated ..\layers\opacity.md - */ - opacity?: number; - /** - * Specifies the pixel-measured width of the marker border when the marker is selected. - * @deprecated ..\layers\selectedBorderWidth.md - */ - selectedBorderWidth?: number; - /** - * Specifies a color for the marker border when the marker is selected. - * @deprecated ..\layers\selectedBorderColor.md - */ - selectedBorderColor?: string; - /** - * Specifies a color for a marker of the dot or bubble type when this marker is selected. - * @deprecated ..\layers\selectedColor.md - */ - selectedColor?: string; - /** - * Specifies whether a single or multiple markers can be selected on a vector map. - * @deprecated ..\layers\selectionMode.md - */ - selectionMode?: string; - /** - * Specifies the size of markers. Setting this option makes sense for any type of marker except bubble. - * @deprecated ..\layers\size.md - */ - size?: number; - /** - * Specifies the type of markers to be used on the map. - * @deprecated ..\layers\elementType.md - */ - type?: string; - /** - * Specifies the name of a palette or a custom set of colors to be used for coloring markers of the pie type. - * @deprecated ..\layers\palette.md - */ - palette?: any; - /** - * Allows you to paint markers with similar attributes in the same color. - * @deprecated ..\layers\colorGroups.md - */ - colorGroups?: Array; - /** - * Specifies the field that provides data to be used for coloring markers. - * @deprecated ..\layers\colorGroupingField.md - */ - colorGroupingField?: string; - /** - * Allows you to display bubbles with similar attributes in the same size. - * @deprecated ..\layers\sizeGroups.md - */ - sizeGroups?: Array; - /** - * Specifies the field that provides data to be used for sizing bubble markers. - * @deprecated ..\layers\sizeGroupingField.md - */ - sizeGroupingField?: string; - } - export interface dxVectorMapOptions extends viz.core.BaseWidgetOptions { - /** - * An object specifying options for the map areas. - * @deprecated Use the 'layers' option instead - */ - areaSettings?: AreaSettings; - /** Specifies the options for the map background. */ - background?: { - /** Specifies a color for the background border. */ - borderColor?: string; - /** Specifies a color for the background. */ - color?: string; - }; - /** Specifies options for dxVectorMap widget layers. */ - layers?: Array; - /** Specifies the map projection. */ - projection?: Object; - /** Specifies the positioning of a map in geographical coordinates. */ - bounds?: Array; - /** Specifies the options of the control bar. */ - controlBar?: { - /** Specifies a color for the outline of the control bar elements. */ - borderColor?: string; - /** Specifies a color for the inner area of the control bar elements. */ - color?: string; - /** Specifies whether or not to display the control bar. */ - enabled?: boolean; - /** Specifies the margin of the control bar in pixels. */ - margin?: number; - /** Specifies the position of the control bar. */ - horizontalAlignment?: string; - /** Specifies the position of the control bar. */ - verticalAlignment?: string; - /** Specifies the opacity of the Control_Bar. */ - opacity?: number; - }; - /** Specifies the appearance of the loading indicator. */ - loadingIndicator?: viz.core.LoadingIndicator; - /** - * Specifies a data source for the map area. - * @deprecated Use the 'layers.data' option instead - */ - mapData?: any; - /** - * Specifies a data source for the map markers. - * @deprecated Use the 'layers.data' option instead - */ - markers?: any; - /** - * An object specifying options for the map markers. - * @deprecated Use the 'layers' option instead - */ - markerSettings?: MarkerSettings; - /** Specifies the size of the dxVectorMap widget. */ - size?: viz.core.Size; - /** Specifies a title for the vector map. */ - title?: viz.core.Title; - /** Specifies tooltip options. */ - tooltip?: viz.core.Tooltip; - /** Configures map legends. */ - legends?: Array; - /** Specifies whether or not the map should respond when a user rolls the mouse wheel. */ - wheelEnabled?: boolean; - /** Specifies whether the map should respond to touch gestures. */ - touchEnabled?: boolean; - /** Disables the zooming capability. */ - zoomingEnabled?: boolean; - /** Specifies the geographical coordinates of the center for a map. */ - center?: Array; - /** A handler for the centerChanged event. */ - onCenterChanged?: (e: { - center: Array; - component: dxVectorMap; - element: Element; - }) => void; - /** A handler for the tooltipShown event. */ - onTooltipShown?: (e: { - component: dxVectorMap; - element: Element; - target: {}; - }) => void; - /** A handler for the tooltipHidden event. */ - onTooltipHidden?: (e: { - component: dxVectorMap; - element: Element; - target: {}; - }) => void; - /** Specifies a number that is used to zoom a map initially. */ - zoomFactor?: number; - /** Specifies a map's maximum zoom factor. */ - maxZoomFactor?: number; - /** A handler for the zoomFactorChanged event. */ - onZoomFactorChanged?: (e: { - component: dxVectorMap; - element: Element; - zoomFactor: number; - }) => void; - /** A handler for the click event. */ - onClick?: any; - /** A handler for the selectionChanged event. */ - onSelectionChanged?: (e: { - component: dxVectorMap; - element: Element; - target: MapLayerElement; - }) => void; - /** - * A handler for the areaClick event. - * @deprecated Use the 'onClick' option instead - */ - onAreaClick?: any; - /** - * A handler for the areaSelectionChanged event. - * @deprecated Use the 'onSelectionChanged' option instead - */ - onAreaSelectionChanged?: (e: { - target: Area; - component: dxVectorMap; - element: Element; - }) => void; - /** - * A handler for the markerClick event. - * @deprecated Use the 'onClick' option instead - */ - onMarkerClick?: any; - /** - * A handler for the markerSelectionChanged event. - * @deprecated Use the 'onSelecitonChanged' option instead - */ - onMarkerSelectionChanged?: (e: { - target: Marker; - component: dxVectorMap; - element: Element; - }) => void; - /** Disables the panning capability. */ - panningEnabled?: boolean; - } - export interface Legend extends viz.core.BaseLegend { - /** Specifies the color of item markers in the legend. The specified color applied only when the legend uses 'size' source. */ - markerColor?: string; - /** Specifies text for legend items. */ - customizeText?: (itemInfo: { start: number; end: number; index: number; color: string; size: number; }) => string; - /** Specifies text for a hint that appears when a user hovers the mouse pointer over the text of a legend item. */ - customizeHint?: (itemInfo: { start: number; end: number; index: number; color: string; size: number }) => string; - /** Specifies the source of data for the legend. */ - source?: { - /** Specifies a layer to which the legend belongs. */ - layer?: string; - /** Specifies the type of the legend grouping. */ - grouping?: string; - } - } - /** A vector map widget. */ - export class dxVectorMap extends viz.core.BaseWidget { - constructor(element: JQuery, options?: dxVectorMapOptions); - constructor(element: Element, options?: dxVectorMapOptions); - /** Displays the loading indicator. */ - showLoadingIndicator(): void; - /** Conceals the loading indicator. */ - hideLoadingIndicator(): void; - /** Redraws a widget. */ - render(): void; - /** Gets the current coordinates of the map center. */ - center(): Array; - /** Sets the coordinates of the map center. */ - center(centerCoordinates: Array): void; - /** - * Deselects all the selected areas on a map. The areas are displayed in their initial style after. - * @deprecated Use the 'clearSelection' method on a layer instead - */ - clearAreaSelection(): void; - /** - * Deselects all the selected markers on a map. The markers are displayed in their initial style after. - * @deprecated Use the 'clearSelection' method on a layer instead - */ - clearMarkerSelection(): void; - /** Deselects all the selected area and markers on a map at once. The areas and markers are displayed in their initial style after. */ - clearSelection(): void; - /** Converts client area coordinates into map coordinates. */ - convertCoordinates(x: number, y: number): Array; - /** Gets all map layers. */ - getLayers(): Array; - /** Gets the layer by its index. */ - getLayerByIndex(index: number): MapLayer; - /** Gets the layer by its name. */ - getLayerByName(name: string): MapLayer; - /** - * Returns an array with all the map areas. - * @deprecated Use the 'getElements' method on a layer instead - */ - getAreas(): Array; - /** - * Returns an array with all the map markers. - * @deprecated Use the 'getElements' method on a layer instead - */ - getMarkers(): Array; - /** Gets the current coordinates of the map viewport. */ - viewport(): Array; - /** Sets the coordinates of the map viewport. */ - viewport(viewportCoordinates: Array): void; - /** Gets the current value of the map zoom factor. */ - zoomFactor(): number; - /** Sets the value of the map zoom factor. */ - zoomFactor(zoomFactor: number): void; - } - export var projection: ProjectionCreator; - export interface ProjectionCreator { - /** Creates a new projection. */ - (data: { - to?: (coordinates: Array) => Array; - from?: (coordinates: Array) => Array; - aspectRatio?: number; - }): Object; - /** Gets the default or custom projection from the projection storage. */ - get(name: string): Object; - /** Adds a new projection to the internal projections storage. */ - add(name: string, projection: Object): void; - } -} -interface JQuery { - dxVectorMap(options?: DevExpress.viz.map.dxVectorMapOptions): JQuery; - dxVectorMap(methodName: string, ...params: any[]): any; - dxVectorMap(methodName: "instance"): DevExpress.viz.map.dxVectorMap; -} -declare module DevExpress.viz.sparklines { - export interface SparklineTooltip extends viz.core.Tooltip { - /** - * Specifies how a tooltip is horizontally aligned relative to the graph. - * @deprecated Tooltip alignment is no more available. - */ - horizontalAlignment?: string; - /** - * Specifies how a tooltip is vertically aligned relative to the graph. - * @deprecated Tooltip alignment is no more available. - */ - verticalAlignment?: string; - } - export interface BaseSparklineOptions extends viz.core.BaseWidgetOptions { - /** Specifies the blank space between the widget's extreme elements and the boundaries of the area provided for the widget in pixels. */ - margin?: viz.core.Margins; - /** Specifies the size of the widget. */ - size?: viz.core.Size; - /** Specifies tooltip options. */ - tooltip?: SparklineTooltip; - /** A handler for the tooltipShown event. */ - onTooltipShown?: (e: { - component: BaseSparkline; - element: Element; - }) => void; - /** A handler for the tooltipHidden event. */ - onTooltipHidden?: (e: { - component: BaseSparkline; - element: Element; - }) => void; - } - /** Overridden by descriptions for particular widgets. */ - export class BaseSparkline extends viz.core.BaseWidget { - /** Redraws a widget. */ - render(): void; - } - export interface dxBulletOptions extends BaseSparkline { - /** Specifies a color for the bullet bar. */ - color?: string; - /** Specifies an end value for the invisible scale. */ - endScaleValue?: number; - /** Specifies whether or not to show the target line. */ - showTarget?: boolean; - /** Specifies whether or not to show the line indicating zero on the invisible scale. */ - showZeroLevel?: boolean; - /** Specifies a start value for the invisible scale. */ - startScaleValue?: number; - /** Specifies the value indicated by the target line. */ - target?: number; - /** Specifies a color for both the target and zero level lines. */ - targetColor?: string; - /** Specifies the width of the target line. */ - targetWidth?: number; - /** Specifies the primary value indicated by the bullet bar. */ - value?: number; - } - /** A bullet graph widget. */ - export class dxBullet extends BaseSparkline { - constructor(element: JQuery, options?: dxBulletOptions); - constructor(element: Element, options?: dxBulletOptions); - } - export interface dxSparklineOptions extends BaseSparklineOptions { - /** Specifies the data source field that provides arguments for a sparkline. */ - argumentField?: string; - /** Sets a color for the bars indicating negative values. Available for a sparkline of the bar type only. */ - barNegativeColor?: string; - /** Sets a color for the bars indicating positive values. Available for a sparkline of the bar type only. */ - barPositiveColor?: string; - /** Specifies a data source for the sparkline. */ - dataSource?: Array; - /** Sets a color for the boundary of both the first and last points on a sparkline. */ - firstLastColor?: string; - /** Specifies whether a sparkline ignores null data points or not. */ - ignoreEmptyPoints?: boolean; - /** Sets a color for a line on a sparkline. Available for the sparklines of the line- and area-like types. */ - lineColor?: string; - /** Specifies a width for a line on a sparkline. Available for the sparklines of the line- and area-like types. */ - lineWidth?: number; - /** Sets a color for the bars indicating the values that are less than the winloss threshold. Available for a sparkline of the winloss type only. */ - lossColor?: string; - /** Sets a color for the boundary of the maximum point on a sparkline. */ - maxColor?: string; - /** Sets a color for the boundary of the minimum point on a sparkline. */ - minColor?: string; - /** Sets a color for points on a sparkline. Available for the sparklines of the line- and area-like types. */ - pointColor?: string; - /** Specifies the diameter of sparkline points in pixels. Available for the sparklines of line- and area-like types. */ - pointSize?: number; - /** Specifies a symbol to use as a point marker on a sparkline. Available for the sparklines of the line- and area-like types. */ - pointSymbol?: string; - /** Specifies whether or not to indicate both the first and last values on a sparkline. */ - showFirstLast?: boolean; - /** Specifies whether or not to indicate both the minimum and maximum values on a sparkline. */ - showMinMax?: boolean; - /** Determines the type of a sparkline. */ - type?: string; - /** Specifies the data source field that provides values for a sparkline. */ - valueField?: string; - /** Sets a color for the bars indicating the values greater than a winloss threshold. Available for a sparkline of the winloss type only. */ - winColor?: string; - /** Specifies a value that serves as a threshold for the sparkline of the winloss type. */ - winlossThreshold?: number; - /** Specifies the minimum value of the sparkline value axis. */ - minValue?: number; - /** Specifies the maximum value of the sparkline's value axis. */ - maxValue?: number; - } - /** A sparkline widget. */ - export class dxSparkline extends BaseSparkline { - constructor(element: JQuery, options?: dxSparklineOptions); - constructor(element: Element, options?: dxSparklineOptions); - } -} -interface JQuery { - dxBullet(options?: DevExpress.viz.sparklines.dxBulletOptions): JQuery; - dxBullet(methodName: string, ...params: any[]): any; - dxBullet(methodName: "instance"): DevExpress.viz.sparklines.dxBullet; - dxSparkline(options?: DevExpress.viz.sparklines.dxSparklineOptions): JQuery; - dxSparkline(methodName: string, ...params: any[]): any; - dxSparkline(methodName: "instance"): DevExpress.viz.sparklines.dxSparkline; -} \ No newline at end of file From 059c4ae43cf78f560b31f503a564edef1edbc3e6 Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Wed, 27 Jan 2016 19:21:20 +0900 Subject: [PATCH 18/65] Remove trailing whitespaces --- zepto/zepto.d.ts | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/zepto/zepto.d.ts b/zepto/zepto.d.ts index b01df91739..40d7bb9d81 100644 --- a/zepto/zepto.d.ts +++ b/zepto/zepto.d.ts @@ -9,23 +9,23 @@ zepto-1.0rc1.d.ts may be freely distributed under the MIT license. Copyright (c) 2013 Josh Baldwin https://github.com/jbaldwin/zepto.d.ts Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ @@ -448,7 +448,7 @@ interface ZeptoCollection { * @see ZeptoCollection.after **/ after(content: HTMLElement[]): ZeptoCollection; - + /** * @see ZeptoCollection.after **/ @@ -470,7 +470,7 @@ interface ZeptoCollection { * @see ZeptoCollection.append **/ append(content: HTMLElement[]): ZeptoCollection; - + /** * @see ZeptoCollection.append **/ @@ -541,7 +541,7 @@ interface ZeptoCollection { * @see ZeptoCollection.before **/ before(content: HTMLElement[]): ZeptoCollection; - + /** * @see ZeptoCollection.before **/ @@ -606,7 +606,7 @@ interface ZeptoCollection { /** * Read or write data-* DOM attributes. Behaves like attr, but prepends data- to the attribute name. - * When reading attribute values, the following conversions apply: + * When reading attribute values, the following conversions apply: * “true”, “false”, and “null” are converted to corresponding types; * number values are converted to actual numeric types; * JSON values are parsed, if it’s valid JSON; @@ -1117,12 +1117,12 @@ interface ZeptoCollection { * @return **/ size(): number; - + /** * Get the number of elements in this collection. **/ length: number; - + /** * Extract the subset of this array, starting at start index. If end is specified, extract up to but not including end index. * @param start @@ -1513,7 +1513,7 @@ interface ZeptoCollection { * @return Seralized form values in URL-encoded string. **/ serialize(): string; - + /** * Serialize form into an array of objects with name and value properties. Disabled form controls, buttons, and unchecked radio buttons/checkboxes are skipped. The result doesn’t include data from file inputs. * @return Array with name value pairs from the Form. From 4b802c338ba45167491075399a2afcdd73d14315 Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Wed, 27 Jan 2016 19:27:29 +0900 Subject: [PATCH 19/65] Remove trailing whitespaces --- yeoman-generator/yeoman-generator-tests.ts | 42 +++++++++++----------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/yeoman-generator/yeoman-generator-tests.ts b/yeoman-generator/yeoman-generator-tests.ts index fdb341177c..69ff087bf8 100644 --- a/yeoman-generator/yeoman-generator-tests.ts +++ b/yeoman-generator/yeoman-generator-tests.ts @@ -157,27 +157,27 @@ generator.options['opt'] === 'string'; // http://yeoman.io/generator/Base.html#prompt // https://github.com/SBoudrias/Inquirer.js -generator.prompt({ name: 'Name', message: 'Message' }, (answer) => {}); -generator.prompt({ name: 'Name', message: (answers) => 'Message' }, (answer) => {}); -generator.prompt({ name: 'Name', message: '', choices: [ 'c1', 'c2' ] }, (answer) => {}); -generator.prompt({ name: 'Name', message: '', choices: [ { name: 'Choice 1', value: 'c1' } ] }, (answer) => {}); -generator.prompt({ name: 'Name', message: '', choices: (answers) => [ 'c1', 'c2' ] }, (answer) => {}); -generator.prompt({ name: 'Name', message: '', choices: (answers) => [ { name: 'Choice 1', value: 'c1' } ] }, (answer) => {}); -generator.prompt({ name: 'Name', message: '', choices: (answers) => [ { name: 'Choice 1', value: 'c1', short: '1' } ] }, (answer) => {}); -generator.prompt({ name: 'Name', message: '', default: 'string' }, (answer) => {}); -generator.prompt({ name: 'Name', message: '', default: 10 }, (answer) => {}); -generator.prompt({ name: 'Name', message: '', default: [ 'string' ] }, (answer) => {}); -generator.prompt({ name: 'Name', message: '', default: [ 10 ] }, (answer) => {}); -generator.prompt({ name: 'Name', message: '', default: (answers) => [ 'string' ] }, (answer) => {}); -generator.prompt({ name: 'Name', message: '', default: (answers) => [ 10 ] }, (answer) => {}); -generator.prompt({ name: 'Name', message: '', default: (answers) => 'string' }, (answer) => {}); -generator.prompt({ name: 'Name', message: '', default: (answers) => 10 }, (answer) => {}); -generator.prompt({ name: 'Name', message: '', type: "list" }, (answer) => {}); -generator.prompt({ name: 'Name', message: '', validate: (input) => true }, (answer) => {}); -generator.prompt({ name: 'Name', message: '', validate: (input) => "Error" }, (answer) => {}); -generator.prompt({ name: 'Name', message: '', filter: (input) => input }, (answer) => {}); -generator.prompt({ name: 'Name', message: '', when: (answers) => true }, (answer) => {}); -generator.prompt({ name: 'Name', message: '', when: true }, (answer) => {}); +generator.prompt({ name: 'Name', message: 'Message' }, (answer) => {}); +generator.prompt({ name: 'Name', message: (answers) => 'Message' }, (answer) => {}); +generator.prompt({ name: 'Name', message: '', choices: [ 'c1', 'c2' ] }, (answer) => {}); +generator.prompt({ name: 'Name', message: '', choices: [ { name: 'Choice 1', value: 'c1' } ] }, (answer) => {}); +generator.prompt({ name: 'Name', message: '', choices: (answers) => [ 'c1', 'c2' ] }, (answer) => {}); +generator.prompt({ name: 'Name', message: '', choices: (answers) => [ { name: 'Choice 1', value: 'c1' } ] }, (answer) => {}); +generator.prompt({ name: 'Name', message: '', choices: (answers) => [ { name: 'Choice 1', value: 'c1', short: '1' } ] }, (answer) => {}); +generator.prompt({ name: 'Name', message: '', default: 'string' }, (answer) => {}); +generator.prompt({ name: 'Name', message: '', default: 10 }, (answer) => {}); +generator.prompt({ name: 'Name', message: '', default: [ 'string' ] }, (answer) => {}); +generator.prompt({ name: 'Name', message: '', default: [ 10 ] }, (answer) => {}); +generator.prompt({ name: 'Name', message: '', default: (answers) => [ 'string' ] }, (answer) => {}); +generator.prompt({ name: 'Name', message: '', default: (answers) => [ 10 ] }, (answer) => {}); +generator.prompt({ name: 'Name', message: '', default: (answers) => 'string' }, (answer) => {}); +generator.prompt({ name: 'Name', message: '', default: (answers) => 10 }, (answer) => {}); +generator.prompt({ name: 'Name', message: '', type: "list" }, (answer) => {}); +generator.prompt({ name: 'Name', message: '', validate: (input) => true }, (answer) => {}); +generator.prompt({ name: 'Name', message: '', validate: (input) => "Error" }, (answer) => {}); +generator.prompt({ name: 'Name', message: '', filter: (input) => input }, (answer) => {}); +generator.prompt({ name: 'Name', message: '', when: (answers) => true }, (answer) => {}); +generator.prompt({ name: 'Name', message: '', when: true }, (answer) => {}); // http://yeoman.io/generator/Base.html // https://github.com/SBoudrias/mem-fs-editor From 069003c1d2038c1123b84c60d73d93e8e227b22a Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Wed, 27 Jan 2016 19:30:04 +0900 Subject: [PATCH 20/65] Remove trailing whitespaces --- youtube/youtube.d.ts | 330 +++++++++++++++++++++---------------------- 1 file changed, 165 insertions(+), 165 deletions(-) diff --git a/youtube/youtube.d.ts b/youtube/youtube.d.ts index a90ab4c88a..d8ba26b634 100644 --- a/youtube/youtube.d.ts +++ b/youtube/youtube.d.ts @@ -1,165 +1,165 @@ -// Type definitions for YouTube -// Project: https://developers.google.com/youtube/ -// Definitions by: Daz Wilkin , Ian Obermiller -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -declare module YT { - interface EventArgs { - target: Player; - data: any; - } - - interface EventHandler { - (event: EventArgs): void; - } - - export interface Events { - onReady?: EventHandler; - onPlayback?: EventHandler; - onStateChange?: EventHandler; - onError?: EventHandler; - } - - export enum ListType { - search, - user_uploads, - playlist, - } - - export interface PlayerVars { - autohide?: number; - autoplay?: number; - cc_load_policy?: any; - color?: string; - controls?: number; - disablekb?: number; - enablejsapi?: number; - end?: number; - fs?: number; - iv_load_policy?: number; - list?: string; - listType?: ListType; - loop?: number; - modestbranding?: number; - origin?: string; - playerpiid?: string; - playlist?: string[]; - playsinline?: number; - rel?: number; - showinfo?: number; - start?: number; - theme?: string; - } - - export interface PlayerOptions { - width?: string | number; - height?: string | number; - videoId?: string; - playerVars?: PlayerVars; - events?: Events; - } - - interface VideoByIdParams { - videoId: string; - startSeconds?: number; - endSeconds?: number; - suggestedQuality?: string; - } - - interface VideoByUrlParams { - mediaContentUrl: string; - startSeconds?: number; - endSeconds?: number; - suggestedQuality?: string; - } - - export interface VideoData - { - video_id: string; - author: string; - title: string; - } - - export class Player { - // Constructor - constructor(id: string, playerOptions: PlayerOptions); - - // Queueing functions - loadVideoById(videoId: string, startSeconds?: number, suggestedQuality?: string): void; - loadVideoById(VideoByIdParams: Object): void; - cueVideoById(videoId: string, startSeconds?: number, suggestedQuality?: string): void; - cueVideoById(VideoByIdParams: Object): void; - - loadVideoByUrl(mediaContentUrl: string, startSeconds?: number, suggestedQuality?: string): void; - loadVideoByUrl(VideoByUrlParams: Object): void; - cueVideoByUrl(mediaContentUrl: string, startSeconds?: number, suggestedQuality?: string): void; - cueVideoByUrl(VideoByUrlParams: Object): void; - - // Properties - size: any; - - // Playing - playVideo(): void; - pauseVideo(): void; - stopVideo(): void; - seekTo(seconds:number, allowSeekAhead:boolean): void; - clearVideo(): void; - - // Playlist - nextVideo(): void; - previousVideo(): void; - playVideoAt(index: number): void; - - // Volume - mute(): void; - unMute(): void; - isMuted(): boolean; - setVolume(volume: number): void; - getVolume(): number; - - // Sizing - setSize(width: number, height: number): any; - - // Playback - getPlaybackRate(): number; - setPlaybackRate(suggestedRate:number): void; - getAvailablePlaybackRates(): number[]; - - // Behavior - setLoop(loopPlaylists: boolean): void; - setShuffle(shufflePlaylist: boolean): void; - - // Status - getVideoLoadedFraction(): number; - getPlayerState(): number; - getCurrentTime(): number; - getVideoStartBytes(): number; - getVideoBytesLoaded(): number; - getVideoBytesTotal(): number; - - // Information - getDuration(): number; - getVideoUrl(): string; - getVideoEmbedCode(): string; - getVideoData(): VideoData; - - // Playlist - getPlaylist(): any[]; - getPlaylistIndex(): number; - - // Event Listener - addEventListener(event: string, handler: EventHandler): void; - - // DOM - destroy(): void; - } - - export enum PlayerState { - UNSTARTED, - BUFFERING, - CUED, - ENDED, - PAUSED, - PLAYING - } -} +// Type definitions for YouTube +// Project: https://developers.google.com/youtube/ +// Definitions by: Daz Wilkin , Ian Obermiller +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module YT { + interface EventArgs { + target: Player; + data: any; + } + + interface EventHandler { + (event: EventArgs): void; + } + + export interface Events { + onReady?: EventHandler; + onPlayback?: EventHandler; + onStateChange?: EventHandler; + onError?: EventHandler; + } + + export enum ListType { + search, + user_uploads, + playlist, + } + + export interface PlayerVars { + autohide?: number; + autoplay?: number; + cc_load_policy?: any; + color?: string; + controls?: number; + disablekb?: number; + enablejsapi?: number; + end?: number; + fs?: number; + iv_load_policy?: number; + list?: string; + listType?: ListType; + loop?: number; + modestbranding?: number; + origin?: string; + playerpiid?: string; + playlist?: string[]; + playsinline?: number; + rel?: number; + showinfo?: number; + start?: number; + theme?: string; + } + + export interface PlayerOptions { + width?: string | number; + height?: string | number; + videoId?: string; + playerVars?: PlayerVars; + events?: Events; + } + + interface VideoByIdParams { + videoId: string; + startSeconds?: number; + endSeconds?: number; + suggestedQuality?: string; + } + + interface VideoByUrlParams { + mediaContentUrl: string; + startSeconds?: number; + endSeconds?: number; + suggestedQuality?: string; + } + + export interface VideoData + { + video_id: string; + author: string; + title: string; + } + + export class Player { + // Constructor + constructor(id: string, playerOptions: PlayerOptions); + + // Queueing functions + loadVideoById(videoId: string, startSeconds?: number, suggestedQuality?: string): void; + loadVideoById(VideoByIdParams: Object): void; + cueVideoById(videoId: string, startSeconds?: number, suggestedQuality?: string): void; + cueVideoById(VideoByIdParams: Object): void; + + loadVideoByUrl(mediaContentUrl: string, startSeconds?: number, suggestedQuality?: string): void; + loadVideoByUrl(VideoByUrlParams: Object): void; + cueVideoByUrl(mediaContentUrl: string, startSeconds?: number, suggestedQuality?: string): void; + cueVideoByUrl(VideoByUrlParams: Object): void; + + // Properties + size: any; + + // Playing + playVideo(): void; + pauseVideo(): void; + stopVideo(): void; + seekTo(seconds:number, allowSeekAhead:boolean): void; + clearVideo(): void; + + // Playlist + nextVideo(): void; + previousVideo(): void; + playVideoAt(index: number): void; + + // Volume + mute(): void; + unMute(): void; + isMuted(): boolean; + setVolume(volume: number): void; + getVolume(): number; + + // Sizing + setSize(width: number, height: number): any; + + // Playback + getPlaybackRate(): number; + setPlaybackRate(suggestedRate:number): void; + getAvailablePlaybackRates(): number[]; + + // Behavior + setLoop(loopPlaylists: boolean): void; + setShuffle(shufflePlaylist: boolean): void; + + // Status + getVideoLoadedFraction(): number; + getPlayerState(): number; + getCurrentTime(): number; + getVideoStartBytes(): number; + getVideoBytesLoaded(): number; + getVideoBytesTotal(): number; + + // Information + getDuration(): number; + getVideoUrl(): string; + getVideoEmbedCode(): string; + getVideoData(): VideoData; + + // Playlist + getPlaylist(): any[]; + getPlaylistIndex(): number; + + // Event Listener + addEventListener(event: string, handler: EventHandler): void; + + // DOM + destroy(): void; + } + + export enum PlayerState { + UNSTARTED, + BUFFERING, + CUED, + ENDED, + PAUSED, + PLAYING + } +} From 5b2f3cb384f9a03749ff06659c1d5ecdf0d3d901 Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Wed, 27 Jan 2016 19:31:17 +0900 Subject: [PATCH 21/65] Remove trailing whitespaces --- xpath/xpath.d.ts | 394 +++++++++++++++++++++++------------------------ 1 file changed, 197 insertions(+), 197 deletions(-) diff --git a/xpath/xpath.d.ts b/xpath/xpath.d.ts index c9a11f1888..f409ee578e 100644 --- a/xpath/xpath.d.ts +++ b/xpath/xpath.d.ts @@ -1,197 +1,197 @@ -// Type definitions for xpath v0.0.7 -// Project: https://github.com/goto100/xpath -// Definitions by: Andrew Bradley -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -// Some documentation prose is copied from the XPath documentation at https://developer.mozilla.org. - -declare module 'xpath' { - - // select1 can return any of: `Node`, `boolean`, `string`, `number`. - // select and selectWithResolver can return any of the above return types or `Array`. - // For this reason, their return types are `any`. - - interface SelectFn { - /** - * Evaluate an XPath expression against a DOM node. Returns the result as one of the following: - * * Array - * * Node - * * boolean - * * number - * * string - * @param xpathText - * @param contextNode - * @param single If true and the evaluation result is one or more Nodes, will return only the first Node instead of an Array - */ - (xpathText: string, contextNode: Node, single?: boolean): any; - } - - var select: SelectFn; - - /** - * Evaluate an xpath expression against a DOM node, returning the first result only. - * Equivalent to `select(xpathText, contextNode, true)` - * @param xpathText - * @param contextNode - */ - function select1(xpathText: string, contextNode: Node): any; - - /** - * Evaluate an XPath expression against a DOM node using a given namespace resolver. Returns the result as one of the following: - * * Array - * * Node - * * boolean - * * number - * * string - * @param xpathText - * @param contextNode - * @param resolver - * @param single If true and the evaluation result is one or more Nodes, will return only the first Node instead of an Array - */ - function selectWithResolver(xpathText: string, contextNode: Node, resolver: XPathNSResolver, single?: boolean): any; - - /** - * Evaluate an xpath expression against a DOM. - * @param xpathText xpath expression as a string. - * @param contextNode xpath expression is evaluated relative to this DOM node. - * @param resolver XML namespace resolver - * @param resultType - * @param result If non-null, xpath *may* reuse this XPathResult object instead of creating a new one. However, it is not required to do so. - * @return XPathResult object containing the result of the expression. - */ - function evaluate(xpathText: string, contextNode: Node, resolver: XPathNSResolver, resultType: number, result?: XPathResult): XPathResult; - - /** - * Creates a `select` function that uses the given namespace prefix to URI mappings when evaluating queries. - * @param namespaceMappings an object mapping namespace prefixes to namespace URIs. Each key is a prefix; each value is a URI. - * @return a function with the same signature as `xpath.select` - */ - function useNamespaces(namespaceMappings: NamespaceMap): typeof select; - interface NamespaceMap { - [namespacePrefix: string]: string; - } - - /** - * Compile an XPath expression into an XPathExpression which can be (repeatedly) evaluated against a DOM. - * @param xpathText XPath expression as a string - * @param namespaceURLMapper Namespace resolver - * @return compiled expression - */ - function createExpression(xpathText: string, namespaceURLMapper: XPathNSResolver): XPathExpression; - - /** - * Create an XPathNSResolver that resolves based on the information available in the context of a DOM node. - * @param node - */ - function createNSResolver(node: Node): XPathNSResolver; - - /** - * Result of evaluating an XPathExpression. - */ - class XPathResult { - /** - * A result set containing whatever type naturally results from evaluation of the expression. Note that if the result is a node-set then UNORDERED_NODE_ITERATOR_TYPE is always the resulting type. - */ - static ANY_TYPE: number; - /** - * A result containing a single number. This is useful for example, in an XPath expression using the count() function. - */ - static NUMBER_TYPE: number; - /** - * A result containing a single string. - */ - static STRING_TYPE: number; - /** - * A result containing a single boolean value. This is useful for example, in an XPath expression using the not() function. - */ - static BOOLEAN_TYPE: number; - /** - * A result node-set containing all the nodes matching the expression. The nodes may not necessarily be in the same order that they appear in the document. - */ - static UNORDERED_NODE_ITERATOR_TYPE: number; - /** - * A result node-set containing all the nodes matching the expression. The nodes in the result set are in the same order that they appear in the document. - */ - static ORDERED_NODE_ITERATOR_TYPE: number; - /** - * A result node-set containing snapshots of all the nodes matching the expression. The nodes may not necessarily be in the same order that they appear in the document. - */ - static UNORDERED_NODE_SNAPSHOT_TYPE: number; - /** - * A result node-set containing snapshots of all the nodes matching the expression. The nodes in the result set are in the same order that they appear in the document. - */ - static ORDERED_NODE_SNAPSHOT_TYPE: number; - /** - * A result node-set containing any single node that matches the expression. The node is not necessarily the first node in the document that matches the expression. - */ - static ANY_UNORDERED_NODE_TYPE: number; - /** - * A result node-set containing the first node in the document that matches the expression. - */ - static FIRST_ORDERED_NODE_TYPE: number; - - /** - * Type of this result. It is one of the enumerated result types. - */ - resultType: number; - - /** - * Returns the next node in this result, if this result is one of the _ITERATOR_ result types. - */ - iterateNext(): Node; - - /** - * returns the result node for a given index, if this result is one of the _SNAPSHOT_ result types. - * @param index - */ - snapshotItem(index: number): Node; - - /** - * Number of nodes in this result, if this result is one of the _SNAPSHOT_ result types. - */ - snapshotLength: number; - - /** - * Value of this result, if it is a BOOLEAN_TYPE result. - */ - booleanValue: boolean; - /** - * Value of this result, if it is a NUMBER_TYPE result. - */ - numberValue: number; - /** - * Value of this result, if it is a STRING_TYPE result. - */ - stringValue: string; - - /** - * Value of this result, if it is a FIRST_ORDERED_NODE_TYPE result. - */ - singleNodeValue: Node; - } - - /** - * A compiled XPath expression, ready to be (repeatedly) evaluated against a DOM node. - */ - interface XPathExpression { - /** - * evaluate this expression against a DOM node. - * @param contextNode - * @param resultType - * @param result - */ - evaluate(contextNode: Node, resultType: number, result?: XPathResult): XPathResult; - } - - /** - * Object that can resolve XML namespace prefixes to namespace URIs. - */ - interface XPathNSResolver { - /** - * Given an XML namespace prefix, returns the corresponding XML namespace URI. - * @param prefix XML namespace prefix - * @return XML namespace URI - */ - lookupNamespaceURI(prefix: string): string; - } -} +// Type definitions for xpath v0.0.7 +// Project: https://github.com/goto100/xpath +// Definitions by: Andrew Bradley +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +// Some documentation prose is copied from the XPath documentation at https://developer.mozilla.org. + +declare module 'xpath' { + + // select1 can return any of: `Node`, `boolean`, `string`, `number`. + // select and selectWithResolver can return any of the above return types or `Array`. + // For this reason, their return types are `any`. + + interface SelectFn { + /** + * Evaluate an XPath expression against a DOM node. Returns the result as one of the following: + * * Array + * * Node + * * boolean + * * number + * * string + * @param xpathText + * @param contextNode + * @param single If true and the evaluation result is one or more Nodes, will return only the first Node instead of an Array + */ + (xpathText: string, contextNode: Node, single?: boolean): any; + } + + var select: SelectFn; + + /** + * Evaluate an xpath expression against a DOM node, returning the first result only. + * Equivalent to `select(xpathText, contextNode, true)` + * @param xpathText + * @param contextNode + */ + function select1(xpathText: string, contextNode: Node): any; + + /** + * Evaluate an XPath expression against a DOM node using a given namespace resolver. Returns the result as one of the following: + * * Array + * * Node + * * boolean + * * number + * * string + * @param xpathText + * @param contextNode + * @param resolver + * @param single If true and the evaluation result is one or more Nodes, will return only the first Node instead of an Array + */ + function selectWithResolver(xpathText: string, contextNode: Node, resolver: XPathNSResolver, single?: boolean): any; + + /** + * Evaluate an xpath expression against a DOM. + * @param xpathText xpath expression as a string. + * @param contextNode xpath expression is evaluated relative to this DOM node. + * @param resolver XML namespace resolver + * @param resultType + * @param result If non-null, xpath *may* reuse this XPathResult object instead of creating a new one. However, it is not required to do so. + * @return XPathResult object containing the result of the expression. + */ + function evaluate(xpathText: string, contextNode: Node, resolver: XPathNSResolver, resultType: number, result?: XPathResult): XPathResult; + + /** + * Creates a `select` function that uses the given namespace prefix to URI mappings when evaluating queries. + * @param namespaceMappings an object mapping namespace prefixes to namespace URIs. Each key is a prefix; each value is a URI. + * @return a function with the same signature as `xpath.select` + */ + function useNamespaces(namespaceMappings: NamespaceMap): typeof select; + interface NamespaceMap { + [namespacePrefix: string]: string; + } + + /** + * Compile an XPath expression into an XPathExpression which can be (repeatedly) evaluated against a DOM. + * @param xpathText XPath expression as a string + * @param namespaceURLMapper Namespace resolver + * @return compiled expression + */ + function createExpression(xpathText: string, namespaceURLMapper: XPathNSResolver): XPathExpression; + + /** + * Create an XPathNSResolver that resolves based on the information available in the context of a DOM node. + * @param node + */ + function createNSResolver(node: Node): XPathNSResolver; + + /** + * Result of evaluating an XPathExpression. + */ + class XPathResult { + /** + * A result set containing whatever type naturally results from evaluation of the expression. Note that if the result is a node-set then UNORDERED_NODE_ITERATOR_TYPE is always the resulting type. + */ + static ANY_TYPE: number; + /** + * A result containing a single number. This is useful for example, in an XPath expression using the count() function. + */ + static NUMBER_TYPE: number; + /** + * A result containing a single string. + */ + static STRING_TYPE: number; + /** + * A result containing a single boolean value. This is useful for example, in an XPath expression using the not() function. + */ + static BOOLEAN_TYPE: number; + /** + * A result node-set containing all the nodes matching the expression. The nodes may not necessarily be in the same order that they appear in the document. + */ + static UNORDERED_NODE_ITERATOR_TYPE: number; + /** + * A result node-set containing all the nodes matching the expression. The nodes in the result set are in the same order that they appear in the document. + */ + static ORDERED_NODE_ITERATOR_TYPE: number; + /** + * A result node-set containing snapshots of all the nodes matching the expression. The nodes may not necessarily be in the same order that they appear in the document. + */ + static UNORDERED_NODE_SNAPSHOT_TYPE: number; + /** + * A result node-set containing snapshots of all the nodes matching the expression. The nodes in the result set are in the same order that they appear in the document. + */ + static ORDERED_NODE_SNAPSHOT_TYPE: number; + /** + * A result node-set containing any single node that matches the expression. The node is not necessarily the first node in the document that matches the expression. + */ + static ANY_UNORDERED_NODE_TYPE: number; + /** + * A result node-set containing the first node in the document that matches the expression. + */ + static FIRST_ORDERED_NODE_TYPE: number; + + /** + * Type of this result. It is one of the enumerated result types. + */ + resultType: number; + + /** + * Returns the next node in this result, if this result is one of the _ITERATOR_ result types. + */ + iterateNext(): Node; + + /** + * returns the result node for a given index, if this result is one of the _SNAPSHOT_ result types. + * @param index + */ + snapshotItem(index: number): Node; + + /** + * Number of nodes in this result, if this result is one of the _SNAPSHOT_ result types. + */ + snapshotLength: number; + + /** + * Value of this result, if it is a BOOLEAN_TYPE result. + */ + booleanValue: boolean; + /** + * Value of this result, if it is a NUMBER_TYPE result. + */ + numberValue: number; + /** + * Value of this result, if it is a STRING_TYPE result. + */ + stringValue: string; + + /** + * Value of this result, if it is a FIRST_ORDERED_NODE_TYPE result. + */ + singleNodeValue: Node; + } + + /** + * A compiled XPath expression, ready to be (repeatedly) evaluated against a DOM node. + */ + interface XPathExpression { + /** + * evaluate this expression against a DOM node. + * @param contextNode + * @param resultType + * @param result + */ + evaluate(contextNode: Node, resultType: number, result?: XPathResult): XPathResult; + } + + /** + * Object that can resolve XML namespace prefixes to namespace URIs. + */ + interface XPathNSResolver { + /** + * Given an XML namespace prefix, returns the corresponding XML namespace URI. + * @param prefix XML namespace prefix + * @return XML namespace URI + */ + lookupNamespaceURI(prefix: string): string; + } +} From 1209610bb338b0e50d15920c82d8f4e312faee26 Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Wed, 27 Jan 2016 19:35:39 +0900 Subject: [PATCH 22/65] Remove trailing whitespaces --- xrm/xrm-6.d.ts | 120 ++++++++++++++++++++++---------------------- xrm/xrm-7.0.d.ts | 126 +++++++++++++++++++++++----------------------- xrm/xrm.d.ts | 128 +++++++++++++++++++++++------------------------ 3 files changed, 187 insertions(+), 187 deletions(-) diff --git a/xrm/xrm-6.d.ts b/xrm/xrm-6.d.ts index 0177638034..09c5baa1f9 100644 --- a/xrm/xrm-6.d.ts +++ b/xrm/xrm-6.d.ts @@ -49,7 +49,7 @@ declare module Xrm * Gets current styling theme. * * @return The name of the current theme, as either "default", "Office12Blue", or "Office14Silver" - * + * * @remarks This function does not work with Dynamics CRM for tablets. */ getCurrentTheme(): string; @@ -58,7 +58,7 @@ declare module Xrm * Gets organization's LCID (language code). * * @return The organization language code. - * + * * @see {@link http://msdn.microsoft.com/en-us/library/ms912047(WinEmbedded.10).aspx|Microsoft Locale ID Values} */ getOrgLcid(): number; @@ -67,7 +67,7 @@ declare module Xrm * Gets organization's unique name. * * @return The organization's unique name. - * + * * @remarks This value can be found on the Developer Resources page within Dynamics CRM */ getOrgUniqueName(): string; @@ -83,7 +83,7 @@ declare module Xrm * Gets user's unique identifier. * * @return The user's identifier in Guid format. - * + * * @remarks Example: "{B05EC7CE-5D51-DF11-97E0-00155DB232D0}" */ getUserId(): string; @@ -92,7 +92,7 @@ declare module Xrm * Gets user's LCID (language code). * * @return The user's language code. - * + * * @see {@link http://msdn.microsoft.com/en-us/library/ms912047(WinEmbedded.10).aspx|Microsoft Locale ID Values} */ getUserLcid(): number; @@ -108,7 +108,7 @@ declare module Xrm * Gets all user security roles. * * @return An array of user role identifiers, in Guid format. - * + * * @remarks Example: ["cf4cc7ce-5d51-df11-97e0-00155db232d0"] */ getUserRoles(): string[]; @@ -119,7 +119,7 @@ declare module Xrm * @param {string} sPath Local pathname of the resource. * * @return A path string with the organization name. - * + * * @remarks Format: "/"+ OrgName + sPath */ prependOrgName( sPath: string ): string; @@ -247,7 +247,7 @@ declare module Xrm * @param {string} itemName The item name to get. * * @return The T matching the key itemName. - * + * * @see {@link Xrm.Page.Control.getName()} for Control-naming schemes. */ get( itemName: string ): T; @@ -270,7 +270,7 @@ declare module Xrm /** * The Xrm.Page API - * + * * @see {@link http://msdn.microsoft.com/en-us/library/gg328255.aspx|Documentation} for details. */ export module Page @@ -329,7 +329,7 @@ declare module Xrm * Gets save-event arguments. * * @return The event arguments. - * + * * @remarks Returns null for all but the "save" event. */ getEventArgs(): SaveEventArguments; @@ -348,7 +348,7 @@ declare module Xrm * @param {string} key The key. * * @return The shared variable. - * + * * @remarks Used to pass values between handlers of an event. */ getSharedVariable( key: string ): T; @@ -359,7 +359,7 @@ declare module Xrm * @tparam T Generic type parameter. * @param {string} key The key. * @param {T} value The value. - * + * * @remarks Used to pass values between handlers of an event. */ setSharedVariable( key: string, value: T ): void; @@ -508,7 +508,7 @@ declare module Xrm * Gets attribute type. * * @return The attribute's type name. - * + * * @remarks Values returned are: boolean * datetime * decimal @@ -526,9 +526,9 @@ declare module Xrm * Gets the attribute format. * * @return The format of the attribute. - * + * * @see {@link getAttributeType()} - * + * * @remarks Values returned are: date (datetime) * datetime (datetime) * duration (integer) @@ -576,7 +576,7 @@ declare module Xrm * Gets current submit mode for the attribute. * * @return The submit mode, as either "always", "never", or "dirty" - * + * * @remarks The default value is "dirty" */ getSubmitMode(): string; @@ -648,7 +648,7 @@ declare module Xrm * Sets the submit mode. * * @param {string} submitMode The submit mode, as either "always", "never", or "dirty". - * + * * @remarks The default value is "dirty" */ setSubmitMode( submitMode: string ): void; @@ -693,7 +693,7 @@ declare module Xrm * Sets the value. * * @param {number} value The value. - * + * * @remarks Attributes on Quick Create Forms will not save values set with this method. */ setValue( value: number ): void; @@ -710,7 +710,7 @@ declare module Xrm * Gets maximum length allowed. * * @return The maximum length allowed. - * + * * @remarks The email form's "Description" attribute does not have the this method. */ getMaxLength(): number; @@ -889,7 +889,7 @@ declare module Xrm * Sets the value. * * @param {LookupValue[]} value The value. - * + * * @remarks Attributes on Quick Create Forms will not save values set with this method. */ setValue( value: LookupValue[] ): void; @@ -951,7 +951,7 @@ declare module Xrm * Gets the record's primary attribute value. * * @return The primary attribute value. - * + * * @remarks The value for this attribute is used when links to the record are displayed. */ getPrimaryAttributeValue(): string; @@ -1007,7 +1007,7 @@ declare module Xrm * @remarks Values returned are: 1 Save * 2 Save and Close * 59 Save and New - * 70 AutoSave (Where enabled; can be used with an OnSave handler + * 70 AutoSave (Where enabled; can be used with an OnSave handler * to conditionally disable auto-saving) * 58 Save as Completed (Activities) * 5 Deactivate @@ -1073,7 +1073,7 @@ declare module Xrm * @param {string} uniqueId (Optional) Unique identifier. * * @return true if it succeeds, false if it fails. - * + * * @remarks If the uniqueId parameter is not used, the current notification shown will be removed. */ clearNotification( uniqueId?: string ): boolean; @@ -1124,7 +1124,7 @@ declare module Xrm * @return The parent Section. */ getParent(): Section; - + /** * Sets the state of the control to either enabled, or disabled. * @@ -1209,7 +1209,7 @@ declare module Xrm /** * Adds an additional custom filter to the lookup, with the "AND" filter operator. * Can only be used within a "pre search" event handler - * + * * @sa addPreSearch * * @param {string} filter Specifies the filter, as a serialized FetchXML @@ -1233,7 +1233,7 @@ declare module Xrm * @param {string} fetchXml The FetchXML query for the view's contents, serialized as a string. * @param {string} layoutXml The Layout XML, serialized as a string. * @param {boolean} isDefault true, to treat this view as default. - * + * * @remarks Cannot be used on "Owner" Lookup controls. * The viewId is never saved to CRM, but must be unique across available views. Generating * a new value can be accomplished with a {@link http://www.guidgen.com/|Guid generator}. @@ -1253,7 +1253,7 @@ declare module Xrm * Gets the unique identifier of the default view. * * @return The default view, in Guid format. - * + * * @remarks Example: "{00000000-0000-0000-0000-000000000000}" */ getDefaultView(): string; @@ -1269,7 +1269,7 @@ declare module Xrm * Sets the Lookup's default view. * * @param {string} viewGuid Unique identifier for the view. - * + * * @remarks Example viewGuid value: "{00000000-0000-0000-0000-000000000000}" */ setDefaultView( viewGuid: string ): void; @@ -1287,7 +1287,7 @@ declare module Xrm * * @param {OptionSetValue} option The option. * @param {number} index (Optional) zero-based index of the option. - * + * * @remarks This method does not check that the values within the options you add are valid. * If index is not provided, the new option will be added to the end of the list. */ @@ -1322,7 +1322,7 @@ declare module Xrm { /** * Refreshes the sub grid. - * + * * @remarks Not available during the "on load" event of the form. */ refresh(): void; @@ -1342,7 +1342,7 @@ declare module Xrm * Gets the DOM element containing the control. * * @return The container object. - * + * * @remarks Unavailable for Microsoft Dynamics CRM for tablets. */ getObject(): HTMLIFrameElement; @@ -1351,7 +1351,7 @@ declare module Xrm * Gets the URL value of the control. * * @return The source URL. - * + * * @remarks Unavailable for Microsoft Dynamics CRM for tablets. */ getSrc(): string; @@ -1360,7 +1360,7 @@ declare module Xrm * Sets the URL value of the control. * * @param {string} src The source URL. - * + * * @remarks Unavailable for Microsoft Dynamics CRM for tablets. */ setSrc( src: string ): void; @@ -1377,7 +1377,7 @@ declare module Xrm * Gets initial URL defined for the Iframe. * * @return The initial URL. - * + * * @remarks Unavailable for Microsoft Dynamics CRM for tablets. */ getInitialUrl(): string; @@ -1394,7 +1394,7 @@ declare module Xrm * Gets the query string value passed to Silverlight. * * @return The data. - * + * * @remarks Unavailable for Microsoft Dynamics CRM for tablets. */ getData(): string; @@ -1403,7 +1403,7 @@ declare module Xrm * Sets the query string value passed to Silverlight. * * @param {string} data The data. - * + * * @remarks Unavailable for Microsoft Dynamics CRM for tablets. */ setData( data: string ): void; @@ -1412,7 +1412,7 @@ declare module Xrm * Gets the DOM element containing the control. * * @return The container object. - * + * * @remarks Unavailable for Microsoft Dynamics CRM for tablets. */ getObject(): HTMLObjectElement; @@ -1513,14 +1513,14 @@ declare module Xrm /** * The form selector API. - * + * * @remarks This API does not exist with Microsoft Dynamics CRM for tablets. */ formSelector: FormSelector; /** * The navigation API. - * + * * @remarks This API does not exist with Microsoft Dynamics CRM for tablets. */ navigation: Navigation; @@ -1550,10 +1550,10 @@ declare module Xrm * @return The form type. * * @remarks Values returned are: 0 Undefined - * 1 Create - * 2 Update - * 3 Read Only - * 4 Disabled + * 1 Create + * 2 Update + * 3 Read Only + * 4 Disabled * 6 Bulk Edit * Deprecated values are 5 (Quick Create), and 11 (Read Optimized) */ @@ -1563,7 +1563,7 @@ declare module Xrm * Gets view port height. * * @return The view port height, in pixels. - * + * * @remarks This method does not work with Microsoft Dynamics CRM for tablets. */ getViewPortHeight(): number; @@ -1572,14 +1572,14 @@ declare module Xrm * Gets view port width. * * @return The view port width, in pixels. - * + * * @remarks This method does not work with Microsoft Dynamics CRM for tablets. */ getViewPortWidth(): number; /** * Re-evaluates the ribbon's configured EnableRules - * + * * @remarks This method does not work with Microsoft Dynamics CRM for tablets. */ refreshRibbon(): void; @@ -1690,7 +1690,7 @@ declare module Xrm * Gets current form. * * @return The current item. - * + * * @remarks When only one form is available this method will return null. */ getCurrentItem(): FormItem; @@ -1807,7 +1807,7 @@ declare module Xrm /** * An definition module for URL-based, CRM component parameters. - * + * * @see {@link http://msdn.microsoft.com/en-us/library/gg328483.aspx} for details. */ export module Url @@ -1823,11 +1823,11 @@ declare module Xrm /** * Interface for defining parameters on a request to open a form with main.aspx (as with - * window.open). Useful for parsing the keys and values into a string of the format: + * window.open). Useful for parsing the keys and values into a string of the format: * "&key=value". * * @see {@link http://msdn.microsoft.com/en-us/library/gg328483.aspx} for details. - * + * * @remarks A member for "pagetype" is not provided. The value "entityrecord" is required in * the URL, for forms. Example: "pagetype=entityrecord" */ @@ -1842,7 +1842,7 @@ declare module Xrm * Additional parameters can be provided to the request. This can only be used to provide * default field values for the form, or pass data to custom parameters that have been * customized for the form. See example below for setting the selected form. - * + * * @remarks Example: encodeURIComponent( "formid={8c9f3e6f-7839-e211-831e-00155db7d98f}" ); */ extraqs?: string; @@ -1866,9 +1866,9 @@ declare module Xrm /** * Interface for defining parameters on a request to open a view with main.aspx (as with - * window.open). Useful for parsing the keys and values into a string of the format: + * window.open). Useful for parsing the keys and values into a string of the format: * "&key=value". - * + * * @see {@link http://msdn.microsoft.com/en-us/library/gg328483.aspx} for details. * * @remarks A member for "pagetype" is not provided. The value "entitylist" is required in @@ -1914,9 +1914,9 @@ declare module Xrm /** * Interface for defining parameters of a request to open a dialog with rundialog.aspx (as with - * window.open). Useful for parsing the keys and values into a string of the format: + * window.open). Useful for parsing the keys and values into a string of the format: * "&key=value". - * + * * @see {@link http://msdn.microsoft.com/en-us/library/gg328483.aspx} for details. */ export interface DialogOpenParameters @@ -1942,7 +1942,7 @@ declare module Xrm * Interface for defining parameters of a request to open a report with viewer.apsx (as with * window.open). Useful for parsing out the keys and values into a string of the format: * "&key=value" - * + * * @see {@link http://msdn.microsoft.com/en-us/library/gg328483.aspx} for details. */ export interface ReportOpenParameters @@ -1950,7 +1950,7 @@ declare module Xrm /** * The action to perform, as either "run" or "filter". * - * @remarks "run" Executes the report with default filters. + * @remarks "run" Executes the report with default filters. * "filter" Presents the user with the filter editor, and a "Run Report" button. */ action: string; @@ -1970,7 +1970,7 @@ declare module Xrm /** * The Xrm.Utility API - * + * * @see {@link http://msdn.microsoft.com/en-us/library/gg328255.aspx|Documentation} for details. */ export module Utility @@ -2056,7 +2056,7 @@ declare module Xrm * @param {number} height (Optional) The height of the new window. * * @return A Window reference, containing the opened Web Resource. - * + * * @remarks This function will not work with Microsoft Dynamics CRM for tablets. * Valid WebResource URL Parameters: typename * type @@ -2073,7 +2073,7 @@ declare module Xrm /** * Gets the xRM application context, for HTML web resources, included by ClientGlobalContext.js.aspx * @returns {Xrm.Context} The application context for the user's current session. - * @remarks The ClientGlobalContext.js.aspx page will include some global event handlers. These event handlers will + * @remarks The ClientGlobalContext.js.aspx page will include some global event handlers. These event handlers will * cancel the onselectstart, contextmenu, and ondragstart events. */ declare function GetGlobalContext(): Xrm.Context; diff --git a/xrm/xrm-7.0.d.ts b/xrm/xrm-7.0.d.ts index c098759cbd..733a25fc7d 100644 --- a/xrm/xrm-7.0.d.ts +++ b/xrm/xrm-7.0.d.ts @@ -49,7 +49,7 @@ declare module Xrm * Gets current styling theme. * * @return The name of the current theme, as either "default", "Office12Blue", or "Office14Silver" - * + * * @remarks This function does not work with Dynamics CRM for tablets. */ getCurrentTheme(): string; @@ -65,7 +65,7 @@ declare module Xrm * Gets organization's LCID (language code). * * @return The organization language code. - * + * * @see {@link http://msdn.microsoft.com/en-us/library/ms912047(WinEmbedded.10).aspx|Microsoft Locale ID Values} */ getOrgLcid(): number; @@ -74,7 +74,7 @@ declare module Xrm * Gets organization's unique name. * * @return The organization's unique name. - * + * * @remarks This value can be found on the Developer Resources page within Dynamics CRM */ getOrgUniqueName(): string; @@ -90,7 +90,7 @@ declare module Xrm * Gets user's unique identifier. * * @return The user's identifier in Guid format. - * + * * @remarks Example: "{B05EC7CE-5D51-DF11-97E0-00155DB232D0}" */ getUserId(): string; @@ -99,7 +99,7 @@ declare module Xrm * Gets user's LCID (language code). * * @return The user's language code. - * + * * @see {@link http://msdn.microsoft.com/en-us/library/ms912047(WinEmbedded.10).aspx|Microsoft Locale ID Values} */ getUserLcid(): number; @@ -115,7 +115,7 @@ declare module Xrm * Gets all user security roles. * * @return An array of user role identifiers, in Guid format. - * + * * @remarks Example: ["cf4cc7ce-5d51-df11-97e0-00155db232d0"] */ getUserRoles(): string[]; @@ -126,7 +126,7 @@ declare module Xrm * @param {string} sPath Local pathname of the resource. * * @return A path string with the organization name. - * + * * @remarks Format: "/"+ OrgName + sPath */ prependOrgName( sPath: string ): string; @@ -242,7 +242,7 @@ declare module Xrm * @param {string} itemName The item name to get. * * @return The T matching the key itemName. - * + * * @see {@link Xrm.Page.Control.getName()} for Control-naming schemes. */ get( itemName: string ): T; @@ -265,7 +265,7 @@ declare module Xrm /** * The Xrm.Page API - * + * * @see {@link http://msdn.microsoft.com/en-us/library/gg328255.aspx|Documentation} for details. */ export module Page @@ -321,7 +321,7 @@ declare module Xrm * Returns the unique identifier of the process. * * @return The identifier for this process, in GUID format. - * + * * @remarks Example: "{825CB223-A651-DF11-AA8B-00155DBA3804}". */ getId(): string; @@ -372,7 +372,7 @@ declare module Xrm * Returns the unique identifier of the stage. * * @return The identifier of the Stage, in GUID format. - * + * * @remarks Example: "{825CB223-A651-DF11-AA8B-00155DBA3804}". */ getId(): string; @@ -454,7 +454,7 @@ declare module Xrm * Gets save-event arguments. * * @return The event arguments. - * + * * @remarks Returns null for all but the "save" event. */ getEventArgs(): SaveEventArguments; @@ -473,7 +473,7 @@ declare module Xrm * @param {string} key The key. * * @return The shared variable. - * + * * @remarks Used to pass values between handlers of an event. */ getSharedVariable( key: string ): T; @@ -484,7 +484,7 @@ declare module Xrm * @tparam T Generic type parameter. * @param {string} key The key. * @param {T} value The value. - * + * * @remarks Used to pass values between handlers of an event. */ setSharedVariable( key: string, value: T ): void; @@ -628,7 +628,7 @@ declare module Xrm * Gets attribute type. * * @return The attribute's type name. - * + * * @remarks Values returned are: boolean * datetime * decimal @@ -646,9 +646,9 @@ declare module Xrm * Gets the attribute format. * * @return The format of the attribute. - * + * * @see {@link getAttributeType()} - * + * * @remarks Values returned are: date (datetime) * datetime (datetime) * duration (integer) @@ -696,7 +696,7 @@ declare module Xrm * Gets current submit mode for the attribute. * * @return The submit mode, as either "always", "never", or "dirty" - * + * * @remarks The default value is "dirty" */ getSubmitMode(): string; @@ -768,7 +768,7 @@ declare module Xrm * Sets the submit mode. * * @param {string} submitMode The submit mode, as either "always", "never", or "dirty". - * + * * @remarks The default value is "dirty" */ setSubmitMode( submitMode: string ): void; @@ -818,7 +818,7 @@ declare module Xrm * Sets the value. * * @param {number} value The value. - * + * * @remarks Attributes on Quick Create Forms will not save values set with this method. */ setValue( value: number ): void; @@ -835,7 +835,7 @@ declare module Xrm * Gets maximum length allowed. * * @return The maximum length allowed. - * + * * @remarks The email form's "Description" attribute does not have the this method. */ getMaxLength(): number; @@ -1014,7 +1014,7 @@ declare module Xrm * Sets the value. * * @param {LookupValue[]} value The value. - * + * * @remarks Attributes on Quick Create Forms will not save values set with this method. */ setValue( value: LookupValue[] ): void; @@ -1071,7 +1071,7 @@ declare module Xrm * Gets the record's primary attribute value. * * @return The primary attribute value. - * + * * @remarks The value for this attribute is used when links to the record are displayed. */ getPrimaryAttributeValue(): string; @@ -1132,7 +1132,7 @@ declare module Xrm * @remarks Values returned are: 1 Save * 2 Save and Close * 59 Save and New - * 70 AutoSave (Where enabled; can be used with an OnSave handler + * 70 AutoSave (Where enabled; can be used with an OnSave handler * to conditionally disable auto-saving) * 58 Save as Completed (Activities) * 5 Deactivate @@ -1220,7 +1220,7 @@ declare module Xrm * Id of the business process flow and the value of * the property is the name of the business process * flow. - * + * * The enabled processes are filtered according to * the user’s privileges. The list of enabled * processes is the same ones a user can see in the @@ -1323,7 +1323,7 @@ declare module Xrm * @param {string} uniqueId (Optional) Unique identifier. * * @return true if it succeeds, false if it fails. - * + * * @remarks If the uniqueId parameter is not used, the current notification shown will be removed. */ clearNotification( uniqueId?: string ): boolean; @@ -1374,7 +1374,7 @@ declare module Xrm * @return The parent Section. */ getParent(): Section; - + /** * Sets the state of the control to either enabled, or disabled. * @@ -1459,7 +1459,7 @@ declare module Xrm /** * Adds an additional custom filter to the lookup, with the "AND" filter operator. * Can only be used within a "pre search" event handler - * + * * @sa addPreSearch * * @param {string} filter Specifies the filter, as a serialized FetchXML @@ -1483,7 +1483,7 @@ declare module Xrm * @param {string} fetchXml The FetchXML query for the view's contents, serialized as a string. * @param {string} layoutXml The Layout XML, serialized as a string. * @param {boolean} isDefault true, to treat this view as default. - * + * * @remarks Cannot be used on "Owner" Lookup controls. * The viewId is never saved to CRM, but must be unique across available views. Generating * a new value can be accomplished with a {@link http://www.guidgen.com/|Guid generator}. @@ -1503,7 +1503,7 @@ declare module Xrm * Gets the unique identifier of the default view. * * @return The default view, in Guid format. - * + * * @remarks Example: "{00000000-0000-0000-0000-000000000000}" */ getDefaultView(): string; @@ -1519,7 +1519,7 @@ declare module Xrm * Sets the Lookup's default view. * * @param {string} viewGuid Unique identifier for the view. - * + * * @remarks Example viewGuid value: "{00000000-0000-0000-0000-000000000000}" */ setDefaultView( viewGuid: string ): void; @@ -1537,7 +1537,7 @@ declare module Xrm * * @param {OptionSetValue} option The option. * @param {number} index (Optional) zero-based index of the option. - * + * * @remarks This method does not check that the values within the options you add are valid. * If index is not provided, the new option will be added to the end of the list. */ @@ -1572,7 +1572,7 @@ declare module Xrm { /** * Refreshes the sub grid. - * + * * @remarks Not available during the "on load" event of the form. */ refresh(): void; @@ -1592,7 +1592,7 @@ declare module Xrm * Gets the DOM element containing the control. * * @return The container object. - * + * * @remarks Unavailable for Microsoft Dynamics CRM for tablets. */ getObject(): HTMLIFrameElement; @@ -1601,7 +1601,7 @@ declare module Xrm * Gets the URL value of the control. * * @return The source URL. - * + * * @remarks Unavailable for Microsoft Dynamics CRM for tablets. */ getSrc(): string; @@ -1610,7 +1610,7 @@ declare module Xrm * Sets the URL value of the control. * * @param {string} src The source URL. - * + * * @remarks Unavailable for Microsoft Dynamics CRM for tablets. */ setSrc( src: string ): void; @@ -1627,7 +1627,7 @@ declare module Xrm * Gets initial URL defined for the Iframe. * * @return The initial URL. - * + * * @remarks Unavailable for Microsoft Dynamics CRM for tablets. */ getInitialUrl(): string; @@ -1644,7 +1644,7 @@ declare module Xrm * Gets the query string value passed to Silverlight. * * @return The data. - * + * * @remarks Unavailable for Microsoft Dynamics CRM for tablets. */ getData(): string; @@ -1653,7 +1653,7 @@ declare module Xrm * Sets the query string value passed to Silverlight. * * @param {string} data The data. - * + * * @remarks Unavailable for Microsoft Dynamics CRM for tablets. */ setData( data: string ): void; @@ -1662,7 +1662,7 @@ declare module Xrm * Gets the DOM element containing the control. * * @return The container object. - * + * * @remarks Unavailable for Microsoft Dynamics CRM for tablets. */ getObject(): HTMLObjectElement; @@ -1810,10 +1810,10 @@ declare module Xrm * @return The form type. * * @remarks Values returned are: 0 Undefined - * 1 Create - * 2 Update - * 3 Read Only - * 4 Disabled + * 1 Create + * 2 Update + * 3 Read Only + * 4 Disabled * 6 Bulk Edit * Deprecated values are 5 (Quick Create), and 11 (Read Optimized) */ @@ -1823,7 +1823,7 @@ declare module Xrm * Gets view port height. * * @return The view port height, in pixels. - * + * * @remarks This method does not work with Microsoft Dynamics CRM for tablets. */ export function getViewPortHeight(): number; @@ -1832,14 +1832,14 @@ declare module Xrm * Gets view port width. * * @return The view port width, in pixels. - * + * * @remarks This method does not work with Microsoft Dynamics CRM for tablets. */ export function getViewPortWidth(): number; /** * Re-evaluates the ribbon's configured EnableRules - * + * * @remarks This method does not work with Microsoft Dynamics CRM for tablets. */ export function refreshRibbon(): void; @@ -1897,14 +1897,14 @@ declare module Xrm /** * The form selector API. - * + * * @remarks This API does not exist with Microsoft Dynamics CRM for tablets. */ export var formSelector: FormSelector; /** * The navigation API. - * + * * @remarks This API does not exist with Microsoft Dynamics CRM for tablets. */ export var navigation: Navigation; @@ -1976,7 +1976,7 @@ declare module Xrm * Gets current form. * * @return The current item. - * + * * @remarks When only one form is available this method will return null. */ getCurrentItem(): FormItem; @@ -2083,7 +2083,7 @@ declare module Xrm /** * An definition module for URL-based, CRM component parameters. - * + * * @see {@link http://msdn.microsoft.com/en-us/library/gg328483.aspx} for details. */ export module Url @@ -2099,11 +2099,11 @@ declare module Xrm /** * Interface for defining parameters on a request to open a form with main.aspx (as with - * window.open). Useful for parsing the keys and values into a string of the format: + * window.open). Useful for parsing the keys and values into a string of the format: * "&key=value". * * @see {@link http://msdn.microsoft.com/en-us/library/gg328483.aspx} for details. - * + * * @remarks A member for "pagetype" is not provided. The value "entityrecord" is required in * the URL, for forms. Example: "pagetype=entityrecord" */ @@ -2118,7 +2118,7 @@ declare module Xrm * Additional parameters can be provided to the request. This can only be used to provide * default field values for the form, or pass data to custom parameters that have been * customized for the form. See example below for setting the selected form. - * + * * @remarks Example: encodeURIComponent( "formid={8c9f3e6f-7839-e211-831e-00155db7d98f}" ); */ extraqs?: string; @@ -2142,9 +2142,9 @@ declare module Xrm /** * Interface for defining parameters on a request to open a view with main.aspx (as with - * window.open). Useful for parsing the keys and values into a string of the format: + * window.open). Useful for parsing the keys and values into a string of the format: * "&key=value". - * + * * @see {@link http://msdn.microsoft.com/en-us/library/gg328483.aspx} for details. * * @remarks A member for "pagetype" is not provided. The value "entitylist" is required in @@ -2190,9 +2190,9 @@ declare module Xrm /** * Interface for defining parameters of a request to open a dialog with rundialog.aspx (as with - * window.open). Useful for parsing the keys and values into a string of the format: + * window.open). Useful for parsing the keys and values into a string of the format: * "&key=value". - * + * * @see {@link http://msdn.microsoft.com/en-us/library/gg328483.aspx} for details. */ export interface DialogOpenParameters @@ -2218,7 +2218,7 @@ declare module Xrm * Interface for defining parameters of a request to open a report with viewer.apsx (as with * window.open). Useful for parsing out the keys and values into a string of the format: * "&key=value" - * + * * @see {@link http://msdn.microsoft.com/en-us/library/gg328483.aspx} for details. */ export interface ReportOpenParameters @@ -2226,7 +2226,7 @@ declare module Xrm /** * The action to perform, as either "run" or "filter". * - * @remarks "run" Executes the report with default filters. + * @remarks "run" Executes the report with default filters. * "filter" Presents the user with the filter editor, and a "Run Report" button. */ action: string; @@ -2246,7 +2246,7 @@ declare module Xrm /** * The Xrm.Utility API - * + * * @see {@link http://msdn.microsoft.com/en-us/library/gg328255.aspx|Documentation} for details. */ export module Utility @@ -2335,7 +2335,7 @@ declare module Xrm * @param {number} height (Optional) The height of the new window. * * @return A Window reference, containing the opened Web Resource. - * + * * @remarks This function will not work with Microsoft Dynamics CRM for tablets. * Valid WebResource URL Parameters: typename * type @@ -2352,7 +2352,7 @@ declare module Xrm /** * Gets the xRM application context, for HTML web resources, included by ClientGlobalContext.js.aspx * @returns {Xrm.Context} The application context for the user's current session. - * @remarks The ClientGlobalContext.js.aspx page will include some global event handlers. These event handlers will + * @remarks The ClientGlobalContext.js.aspx page will include some global event handlers. These event handlers will * cancel the onselectstart, contextmenu, and ondragstart events. */ declare function GetGlobalContext(): Xrm.Context; diff --git a/xrm/xrm.d.ts b/xrm/xrm.d.ts index b3848f1080..a2f7c515ba 100644 --- a/xrm/xrm.d.ts +++ b/xrm/xrm.d.ts @@ -49,7 +49,7 @@ declare module Xrm * Gets current styling theme. * * @return The name of the current theme, as either "default", "Office12Blue", or "Office14Silver" - * + * * @remarks This function does not work with Dynamics CRM for tablets. */ getCurrentTheme(): string; @@ -65,7 +65,7 @@ declare module Xrm * Gets organization's LCID (language code). * * @return The organization language code. - * + * * @see {@link http://msdn.microsoft.com/en-us/library/ms912047(WinEmbedded.10).aspx|Microsoft Locale ID Values} */ getOrgLcid(): number; @@ -74,7 +74,7 @@ declare module Xrm * Gets organization's unique name. * * @return The organization's unique name. - * + * * @remarks This value can be found on the Developer Resources page within Dynamics CRM */ getOrgUniqueName(): string; @@ -97,7 +97,7 @@ declare module Xrm * Gets user's unique identifier. * * @return The user's identifier in Guid format. - * + * * @remarks Example: "{B05EC7CE-5D51-DF11-97E0-00155DB232D0}" */ getUserId(): string; @@ -106,7 +106,7 @@ declare module Xrm * Gets user's LCID (language code). * * @return The user's language code. - * + * * @see {@link http://msdn.microsoft.com/en-us/library/ms912047(WinEmbedded.10).aspx|Microsoft Locale ID Values} */ getUserLcid(): number; @@ -122,7 +122,7 @@ declare module Xrm * Gets all user security roles. * * @return An array of user role identifiers, in Guid format. - * + * * @remarks Example: ["cf4cc7ce-5d51-df11-97e0-00155db232d0"] */ getUserRoles(): string[]; @@ -133,7 +133,7 @@ declare module Xrm * @param {string} sPath Local pathname of the resource. * * @return A path string with the organization name. - * + * * @remarks Format: "/"+ OrgName + sPath */ prependOrgName( sPath: string ): string; @@ -249,7 +249,7 @@ declare module Xrm * @param {string} itemName The item name to get. * * @return The T matching the key itemName. - * + * * @see {@link Xrm.Page.Control.getName()} for Control-naming schemes. */ get( itemName: string ): T; @@ -272,7 +272,7 @@ declare module Xrm /** * The Xrm.Page API - * + * * @see {@link http://msdn.microsoft.com/en-us/library/gg328255.aspx|Documentation} for details. */ export module Page @@ -343,7 +343,7 @@ declare module Xrm * Returns the unique identifier of the process. * * @return The identifier for this process, in GUID format. - * + * * @remarks Example: "{825CB223-A651-DF11-AA8B-00155DBA3804}". */ getId(): string; @@ -394,7 +394,7 @@ declare module Xrm * Returns the unique identifier of the stage. * * @return The identifier of the Stage, in GUID format. - * + * * @remarks Example: "{825CB223-A651-DF11-AA8B-00155DBA3804}". */ getId(): string; @@ -476,7 +476,7 @@ declare module Xrm * Gets save-event arguments. * * @return The event arguments. - * + * * @remarks Returns null for all but the "save" event. */ getEventArgs(): SaveEventArguments; @@ -495,7 +495,7 @@ declare module Xrm * @param {string} key The key. * * @return The shared variable. - * + * * @remarks Used to pass values between handlers of an event. */ getSharedVariable( key: string ): T; @@ -506,7 +506,7 @@ declare module Xrm * @tparam T Generic type parameter. * @param {string} key The key. * @param {T} value The value. - * + * * @remarks Used to pass values between handlers of an event. */ setSharedVariable( key: string, value: T ): void; @@ -650,7 +650,7 @@ declare module Xrm * Gets attribute type. * * @return The attribute's type name. - * + * * @remarks Values returned are: boolean * datetime * decimal @@ -668,9 +668,9 @@ declare module Xrm * Gets the attribute format. * * @return The format of the attribute. - * + * * @see {@link getAttributeType()} - * + * * @remarks Values returned are: date (datetime) * datetime (datetime) * duration (integer) @@ -718,7 +718,7 @@ declare module Xrm * Gets current submit mode for the attribute. * * @return The submit mode, as either "always", "never", or "dirty" - * + * * @remarks The default value is "dirty" */ getSubmitMode(): string; @@ -790,7 +790,7 @@ declare module Xrm * Sets the submit mode. * * @param {string} submitMode The submit mode, as either "always", "never", or "dirty". - * + * * @remarks The default value is "dirty" */ setSubmitMode( submitMode: string ): void; @@ -840,7 +840,7 @@ declare module Xrm * Sets the value. * * @param {number} value The value. - * + * * @remarks Attributes on Quick Create Forms will not save values set with this method. */ setValue( value: number ): void; @@ -857,7 +857,7 @@ declare module Xrm * Gets maximum length allowed. * * @return The maximum length allowed. - * + * * @remarks The email form's "Description" attribute does not have the this method. */ getMaxLength(): number; @@ -1036,7 +1036,7 @@ declare module Xrm * Sets the value. * * @param {LookupValue[]} value The value. - * + * * @remarks Attributes on Quick Create Forms will not save values set with this method. */ setValue( value: LookupValue[] ): void; @@ -1093,7 +1093,7 @@ declare module Xrm * Gets the record's primary attribute value. * * @return The primary attribute value. - * + * * @remarks The value for this attribute is used when links to the record are displayed. */ getPrimaryAttributeValue(): string; @@ -1154,7 +1154,7 @@ declare module Xrm * @remarks Values returned are: 1 Save * 2 Save and Close * 59 Save and New - * 70 AutoSave (Where enabled; can be used with an OnSave handler + * 70 AutoSave (Where enabled; can be used with an OnSave handler * to conditionally disable auto-saving) * 58 Save as Completed (Activities) * 5 Deactivate @@ -1242,7 +1242,7 @@ declare module Xrm * Id of the business process flow and the value of * the property is the name of the business process * flow. - * + * * The enabled processes are filtered according to * the user’s privileges. The list of enabled * processes is the same ones a user can see in the @@ -1345,7 +1345,7 @@ declare module Xrm * @param {string} uniqueId (Optional) Unique identifier. * * @return true if it succeeds, false if it fails. - * + * * @remarks If the uniqueId parameter is not used, the current notification shown will be removed. */ clearNotification( uniqueId?: string ): boolean; @@ -1397,7 +1397,7 @@ declare module Xrm * @return The parent Section. */ getParent(): Section; - + /** * Sets the state of the control to either enabled, or disabled. * @@ -1489,7 +1489,7 @@ declare module Xrm /** * Adds an additional custom filter to the lookup, with the "AND" filter operator. * Can only be used within a "pre search" event handler - * + * * @sa addPreSearch * * @param {string} filter Specifies the filter, as a serialized FetchXML @@ -1513,7 +1513,7 @@ declare module Xrm * @param {string} fetchXml The FetchXML query for the view's contents, serialized as a string. * @param {string} layoutXml The Layout XML, serialized as a string. * @param {boolean} isDefault true, to treat this view as default. - * + * * @remarks Cannot be used on "Owner" Lookup controls. * The viewId is never saved to CRM, but must be unique across available views. Generating * a new value can be accomplished with a {@link http://www.guidgen.com/|Guid generator}. @@ -1533,7 +1533,7 @@ declare module Xrm * Gets the unique identifier of the default view. * * @return The default view, in Guid format. - * + * * @remarks Example: "{00000000-0000-0000-0000-000000000000}" */ getDefaultView(): string; @@ -1549,7 +1549,7 @@ declare module Xrm * Sets the Lookup's default view. * * @param {string} viewGuid Unique identifier for the view. - * + * * @remarks Example viewGuid value: "{00000000-0000-0000-0000-000000000000}" */ setDefaultView( viewGuid: string ): void; @@ -1567,7 +1567,7 @@ declare module Xrm * * @param {OptionSetValue} option The option. * @param {number} index (Optional) zero-based index of the option. - * + * * @remarks This method does not check that the values within the options you add are valid. * If index is not provided, the new option will be added to the end of the list. */ @@ -1637,7 +1637,7 @@ declare module Xrm /** * Refreshes the sub grid. - * + * * @remarks Not available during the "on load" event of the form. */ refresh(): void; @@ -1664,7 +1664,7 @@ declare module Xrm * Gets the DOM element containing the control. * * @return The container object. - * + * * @remarks Unavailable for Microsoft Dynamics CRM for tablets. */ getObject(): HTMLIFrameElement; @@ -1673,7 +1673,7 @@ declare module Xrm * Gets the URL value of the control. * * @return The source URL. - * + * * @remarks Unavailable for Microsoft Dynamics CRM for tablets. */ getSrc(): string; @@ -1682,7 +1682,7 @@ declare module Xrm * Sets the URL value of the control. * * @param {string} src The source URL. - * + * * @remarks Unavailable for Microsoft Dynamics CRM for tablets. */ setSrc( src: string ): void; @@ -1699,7 +1699,7 @@ declare module Xrm * Gets initial URL defined for the Iframe. * * @return The initial URL. - * + * * @remarks Unavailable for Microsoft Dynamics CRM for tablets. */ getInitialUrl(): string; @@ -1716,7 +1716,7 @@ declare module Xrm * Gets the query string value passed to Silverlight. * * @return The data. - * + * * @remarks Unavailable for Microsoft Dynamics CRM for tablets. */ getData(): string; @@ -1725,7 +1725,7 @@ declare module Xrm * Sets the query string value passed to Silverlight. * * @param {string} data The data. - * + * * @remarks Unavailable for Microsoft Dynamics CRM for tablets. */ setData( data: string ): void; @@ -1734,7 +1734,7 @@ declare module Xrm * Gets the DOM element containing the control. * * @return The container object. - * + * * @remarks Unavailable for Microsoft Dynamics CRM for tablets. */ getObject(): HTMLObjectElement; @@ -1942,7 +1942,7 @@ declare module Xrm * Returns the id for the record in the row. * * @return The identifier of the GridEntity, in GUID format. - * + * * @remarks Example return: "{00000000-0000-0000-0000-000000000000}" */ getId(): string; @@ -2017,10 +2017,10 @@ declare module Xrm * @return The form type. * * @remarks Values returned are: 0 Undefined - * 1 Create - * 2 Update - * 3 Read Only - * 4 Disabled + * 1 Create + * 2 Update + * 3 Read Only + * 4 Disabled * 6 Bulk Edit * Deprecated values are 5 (Quick Create), and 11 (Read Optimized) */ @@ -2030,7 +2030,7 @@ declare module Xrm * Gets view port height. * * @return The view port height, in pixels. - * + * * @remarks This method does not work with Microsoft Dynamics CRM for tablets. */ export function getViewPortHeight(): number; @@ -2039,14 +2039,14 @@ declare module Xrm * Gets view port width. * * @return The view port width, in pixels. - * + * * @remarks This method does not work with Microsoft Dynamics CRM for tablets. */ export function getViewPortWidth(): number; /** * Re-evaluates the ribbon's configured EnableRules - * + * * @remarks This method does not work with Microsoft Dynamics CRM for tablets. */ export function refreshRibbon(): void; @@ -2104,14 +2104,14 @@ declare module Xrm /** * The form selector API. - * + * * @remarks This API does not exist with Microsoft Dynamics CRM for tablets. */ export var formSelector: FormSelector; /** * The navigation API. - * + * * @remarks This API does not exist with Microsoft Dynamics CRM for tablets. */ export var navigation: Navigation; @@ -2183,7 +2183,7 @@ declare module Xrm * Gets current form. * * @return The current item. - * + * * @remarks When only one form is available this method will return null. */ getCurrentItem(): FormItem; @@ -2290,7 +2290,7 @@ declare module Xrm /** * An definition module for URL-based, CRM component parameters. - * + * * @see {@link http://msdn.microsoft.com/en-us/library/gg328483.aspx} for details. */ export module Url @@ -2306,11 +2306,11 @@ declare module Xrm /** * Interface for defining parameters on a request to open a form with main.aspx (as with - * window.open). Useful for parsing the keys and values into a string of the format: + * window.open). Useful for parsing the keys and values into a string of the format: * "&key=value". * * @see {@link http://msdn.microsoft.com/en-us/library/gg328483.aspx} for details. - * + * * @remarks A member for "pagetype" is not provided. The value "entityrecord" is required in * the URL, for forms. Example: "pagetype=entityrecord" */ @@ -2325,7 +2325,7 @@ declare module Xrm * Additional parameters can be provided to the request. This can only be used to provide * default field values for the form, or pass data to custom parameters that have been * customized for the form. See example below for setting the selected form. - * + * * @remarks Example: encodeURIComponent( "formid={8c9f3e6f-7839-e211-831e-00155db7d98f}" ); */ extraqs?: string; @@ -2349,9 +2349,9 @@ declare module Xrm /** * Interface for defining parameters on a request to open a view with main.aspx (as with - * window.open). Useful for parsing the keys and values into a string of the format: + * window.open). Useful for parsing the keys and values into a string of the format: * "&key=value". - * + * * @see {@link http://msdn.microsoft.com/en-us/library/gg328483.aspx} for details. * * @remarks A member for "pagetype" is not provided. The value "entitylist" is required in @@ -2397,9 +2397,9 @@ declare module Xrm /** * Interface for defining parameters of a request to open a dialog with rundialog.aspx (as with - * window.open). Useful for parsing the keys and values into a string of the format: + * window.open). Useful for parsing the keys and values into a string of the format: * "&key=value". - * + * * @see {@link http://msdn.microsoft.com/en-us/library/gg328483.aspx} for details. */ export interface DialogOpenParameters @@ -2425,7 +2425,7 @@ declare module Xrm * Interface for defining parameters of a request to open a report with viewer.apsx (as with * window.open). Useful for parsing out the keys and values into a string of the format: * "&key=value" - * + * * @see {@link http://msdn.microsoft.com/en-us/library/gg328483.aspx} for details. */ export interface ReportOpenParameters @@ -2433,7 +2433,7 @@ declare module Xrm /** * The action to perform, as either "run" or "filter". * - * @remarks "run" Executes the report with default filters. + * @remarks "run" Executes the report with default filters. * "filter" Presents the user with the filter editor, and a "Run Report" button. */ action: string; @@ -2453,7 +2453,7 @@ declare module Xrm /** * The Xrm.Utility API - * + * * @see {@link http://msdn.microsoft.com/en-us/library/gg328255.aspx|Documentation} for details. */ export module Utility @@ -2571,7 +2571,7 @@ declare module Xrm * @param {number} height (Optional) The height of the new window. * * @return A Window reference, containing the opened Web Resource. - * + * * @remarks This function will not work with Microsoft Dynamics CRM for tablets. * Valid WebResource URL Parameters: typename * type @@ -2588,7 +2588,7 @@ declare module Xrm /** * Gets the xRM application context, for HTML web resources, included by ClientGlobalContext.js.aspx * @returns {Xrm.Context} The application context for the user's current session. - * @remarks The ClientGlobalContext.js.aspx page will include some global event handlers. These event handlers will + * @remarks The ClientGlobalContext.js.aspx page will include some global event handlers. These event handlers will * cancel the onselectstart, contextmenu, and ondragstart events. */ declare function GetGlobalContext(): Xrm.Context; From fad5a491fbd306c1425d76eba6f64787e4b2232c Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Wed, 27 Jan 2016 19:37:59 +0900 Subject: [PATCH 23/65] Remove trailing whitespaces --- wake_on_lan/wake_on_lan.d.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/wake_on_lan/wake_on_lan.d.ts b/wake_on_lan/wake_on_lan.d.ts index 97e4a7177b..52a274607e 100644 --- a/wake_on_lan/wake_on_lan.d.ts +++ b/wake_on_lan/wake_on_lan.d.ts @@ -8,30 +8,30 @@ declare module wol { export interface WakeOptions { - + /** * The ip address to which the packet is send (default: 255.255.255.255) */ address?:string; - + /** * Number of packets to send (default: 3) */ num_packets?:number; - + /** * The interval between packets (default: 100ms) */ interval?:number; - + /** * The port to send to (default: 9) */ port?:number; } - + type ErrorCallback = (Error:any) => void; - + export interface Wol { /** * Send a sequence of Wake-on-LAN magic packets to the given MAC address. @@ -39,7 +39,7 @@ declare module wol { * @param {string} macAddress the mac address of the target device */ wake(macAddress:string):void; - + /** * Send a sequence of Wake-on-LAN magic packets to the given MAC address. * @@ -47,7 +47,7 @@ declare module wol { * @param {ErrorCallback} callback is called when all packets have been sent or an error occurs. */ wake(macAddress:string, callback:ErrorCallback):void; - + /** * Send a sequence of Wake-on-LAN magic packets to the given MAC address. * @@ -56,10 +56,10 @@ declare module wol { * @param {ErrorCallback} callback is called when all packets have been sent or an error occurs. */ wake(macAddress:string, opts:WakeOptions, callback?:Function):void; - + /** * Creates a buffer with a magic packet for the given MAC address. - * + * * @param {string} macAddress mac address of the target device * @return {Buffer} the magic packet */ From 5bebd66c1e625818ae19ed0614e4e1c0dceaaa56 Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Wed, 27 Jan 2016 19:41:18 +0900 Subject: [PATCH 24/65] Remove trailing whitespaces --- wake_on_lan/wake_on_lan.d.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/wake_on_lan/wake_on_lan.d.ts b/wake_on_lan/wake_on_lan.d.ts index 97e4a7177b..52a274607e 100644 --- a/wake_on_lan/wake_on_lan.d.ts +++ b/wake_on_lan/wake_on_lan.d.ts @@ -8,30 +8,30 @@ declare module wol { export interface WakeOptions { - + /** * The ip address to which the packet is send (default: 255.255.255.255) */ address?:string; - + /** * Number of packets to send (default: 3) */ num_packets?:number; - + /** * The interval between packets (default: 100ms) */ interval?:number; - + /** * The port to send to (default: 9) */ port?:number; } - + type ErrorCallback = (Error:any) => void; - + export interface Wol { /** * Send a sequence of Wake-on-LAN magic packets to the given MAC address. @@ -39,7 +39,7 @@ declare module wol { * @param {string} macAddress the mac address of the target device */ wake(macAddress:string):void; - + /** * Send a sequence of Wake-on-LAN magic packets to the given MAC address. * @@ -47,7 +47,7 @@ declare module wol { * @param {ErrorCallback} callback is called when all packets have been sent or an error occurs. */ wake(macAddress:string, callback:ErrorCallback):void; - + /** * Send a sequence of Wake-on-LAN magic packets to the given MAC address. * @@ -56,10 +56,10 @@ declare module wol { * @param {ErrorCallback} callback is called when all packets have been sent or an error occurs. */ wake(macAddress:string, opts:WakeOptions, callback?:Function):void; - + /** * Creates a buffer with a magic packet for the given MAC address. - * + * * @param {string} macAddress mac address of the target device * @return {Buffer} the magic packet */ From d910fa325ba3b1cb13ddf6b4bb05bf05eee2a49a Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Wed, 27 Jan 2016 19:42:22 +0900 Subject: [PATCH 25/65] Remove trailing whitespaces --- webaudioapi/waa.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webaudioapi/waa.d.ts b/webaudioapi/waa.d.ts index 80823700a7..fdda43005f 100644 --- a/webaudioapi/waa.d.ts +++ b/webaudioapi/waa.d.ts @@ -185,12 +185,12 @@ interface AudioContext { } interface MediaStreamAudioSourceNode extends AudioNode { - + } interface AudioBuffer { copyFromChannel(destination: Float32Array, channelNumber: number, startInChannel?: number): void; - + copyToChannel(source: Float32Array, channelNumber: number, startInChannel?: number): void; } From 95dbe2dd1a9e9d1a8dfaa9ba495b2e21d981d75a Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Wed, 27 Jan 2016 19:43:15 +0900 Subject: [PATCH 26/65] Remove trailing whitespaces --- webfontloader/webfontloader.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/webfontloader/webfontloader.d.ts b/webfontloader/webfontloader.d.ts index bea108ec17..9e10d54b52 100644 --- a/webfontloader/webfontloader.d.ts +++ b/webfontloader/webfontloader.d.ts @@ -24,10 +24,10 @@ declare module WebFont { fontactive?(familyName:string, fvd:string):void; /** This event is triggered if the font can't be loaded. */ fontinactive?(familyName:string, fvd:string):void; - + /** Child window or iframes to manage fonts for */ context?:Array; - + custom?:Custom; google?:Google; typekit?:Typekit; @@ -35,7 +35,7 @@ declare module WebFont { monotype?:Monotype; } export interface Google { - families:Array; + families:Array; text?: string; } export interface Typekit { @@ -53,7 +53,7 @@ declare module WebFont { projectId?:string; version?:number; } - + } declare module "webfontloader" { export = WebFont; From ea28c1d2ff9e6489e70bcb748fd15e1e8d336246 Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Wed, 27 Jan 2016 19:44:35 +0900 Subject: [PATCH 27/65] Remove trailing whitespaces --- websql/websql-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/websql/websql-tests.ts b/websql/websql-tests.ts index 131883c243..5cf0300548 100644 --- a/websql/websql-tests.ts +++ b/websql/websql-tests.ts @@ -207,7 +207,7 @@ interface Results { var prop = props[i]; args.push(record[prop]); } - + execSqlStatements(dbState.transaction, [sqlStatement], callback); } From 7d69a900a5894bb71a41a81fab1e5a1ddefba9da Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Wed, 27 Jan 2016 19:45:48 +0900 Subject: [PATCH 28/65] Remove trailing whitespaces --- winjs/winjs-2.1.d.ts | 160 +++++++++++++++++++++---------------------- 1 file changed, 80 insertions(+), 80 deletions(-) diff --git a/winjs/winjs-2.1.d.ts b/winjs/winjs-2.1.d.ts index 5c8f53641a..cfa75f3630 100644 --- a/winjs/winjs-2.1.d.ts +++ b/winjs/winjs-2.1.d.ts @@ -4,16 +4,16 @@ // Definitions: https://github.com/borisyankov/DefinitelyTyped /* ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. 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 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ @@ -394,7 +394,7 @@ declare module WinJS.Binding { /** * Creates a List object. - * @constructor + * @constructor * @param list The array containing the elements to initalize the list. * @param options You can set two Boolean options: binding and proxy. If options.binding is true, the list contains the result of calling as on the element values. If options.proxy is true, the list specified as the first parameter is used as the storage for the List. This option should be used with care, because uncoordinated edits to the data storage may result in errors. **/ @@ -954,7 +954,7 @@ declare module WinJS.Binding { /** * Creates a template that provides a reusable declarative binding element. - * @constructor + * @constructor * @param element The DOM element to convert to a template. * @param options If this parameter is supplied, the template is loaded from the URI and the content of the element parameter is ignored. You can add the following options: href. **/ @@ -1217,7 +1217,7 @@ declare module WinJS { /** * Creates an Error object with the specified name and message properties. - * @constructor + * @constructor * @param name The name of this error. The name is meant to be consumed programmatically and should not be localized. * @param message The message for this error. The message is meant to be consumed by humans and should be localized. **/ @@ -1249,7 +1249,7 @@ declare module WinJS { /** * A promise provides a mechanism to schedule work to be done on a value that has not yet been computed. It is a convenient abstraction for managing interactions with asynchronous APIs. For more information about asynchronous programming, see Asynchronous programming. For more information about promises in JavaScript, see Asynchronous programming in JavaScript. For more information about using promises, see the WinJS Promise sample. - * @constructor + * @constructor * @param init The function that is called during construction of the Promise that contains the implementation of the operation that the Promise will represent. This can be synchronous or asynchronous, depending on the nature of the operation. Note that placing code within this function does not automatically run it asynchronously; that must be done explicitly with other asynchronous APIs such as setImmediate, setTimeout, requestAnimationFrame, and the Windows Runtime asynchronous APIs. The init function is given three arguments: completeDispatch, errorDispatch, progressDispatch. This parameter is optional. * @param onCancel The function to call if a consumer of this promise wants to cancel its undone work. Promises are not required to support cancellation. **/ @@ -3634,7 +3634,7 @@ declare module WinJS.UI { /** * Creates a new AppBar object. - * @constructor + * @constructor * @param element The DOM element that will host the control. * @param options The set of properties and values to apply to the new AppBar. **/ @@ -3744,7 +3744,7 @@ declare module WinJS.UI { //#region Properties /** - * Gets or sets how the app bar is displayed when hidden is true. + * Gets or sets how the app bar is displayed when hidden is true. **/ closedDisplayMode: string; @@ -3795,7 +3795,7 @@ declare module WinJS.UI { /** * Creates a new AppBarCommand object. - * @constructor + * @constructor * @param element The DOM element that will host the control. * @param options The set of properties and values to apply to the new AppBarCommand. **/ @@ -3953,7 +3953,7 @@ declare module WinJS.UI { /** * Creates a new FlipView. - * @constructor + * @constructor * @param element The DOM element that hosts the control. * @param options An object that contains one or more property/value pairs to apply to the new control. Each property corresponds to one of the control's properties or events. Event names must begin with "on". For example, to provide a handler for the pageselected event, add a property named "onpageselected" and set its value to the event handler. **/ @@ -4095,7 +4095,7 @@ declare module WinJS.UI { /** * Creates a new GridLayout object. - * @constructor + * @constructor * @param options The set of properties and values to apply to the new GridLayout. **/ constructor(options?: any); @@ -4106,15 +4106,15 @@ declare module WinJS.UI { /** * This method is no longer supported. - * @param beginScrollPosition - * @param wholeItem + * @param beginScrollPosition + * @param wholeItem **/ calculateFirstVisible(beginScrollPosition: number, wholeItem: boolean): void; /** * This method is no longer supported. - * @param endScrollPosition - * @param wholeItem + * @param endScrollPosition + * @param wholeItem **/ calculateLastVisible(endScrollPosition: number, wholeItem: boolean): void; @@ -4148,22 +4148,22 @@ declare module WinJS.UI { /** * This method is no longer supported. - * @param itemIndex + * @param itemIndex **/ getItemPosition(itemIndex: number): void; /** * This method is no longer supported. - * @param itemIndex - * @param element - * @param keyPressed + * @param itemIndex + * @param element + * @param keyPressed **/ getKeyboardNavigatedItem(itemIndex: number, element: any, keyPressed: any): void; /** * This method is no longer supported. - * @param beginScrollPosition - * @param endScrollPosition + * @param beginScrollPosition + * @param endScrollPosition **/ getScrollbarRange(beginScrollPosition: number, endScrollPosition: number): void; @@ -4188,7 +4188,7 @@ declare module WinJS.UI { /** * This method is no longer supported. - * @param elements + * @param elements **/ itemsAdded(elements: any): void; @@ -4206,50 +4206,50 @@ declare module WinJS.UI { /** * This method is no longer supported. - * @param elements + * @param elements **/ itemsRemoved(elements: any): void; /** * This API supports the WinJS infrastructure and is not intended to be used directly from your code. - * @param tree - * @param changedRange - * @param modifiedItems - * @param modifiedGroups + * @param tree + * @param changedRange + * @param modifiedItems + * @param modifiedGroups **/ layout(tree: any, changedRange: any, modifiedItems: any, modifiedGroups: any): void; /** * This method is no longer supported. - * @param groupIndex + * @param groupIndex * @param element A DOM element. **/ layoutHeader(groupIndex: number, element: any): void; /** * This method is no longer supported. - * @param itemIndex + * @param itemIndex * @param element A DOM element. **/ layoutItem(itemIndex: number, element: any): void; /** * This method is no longer supported. - * @param element + * @param element **/ prepareHeader(element: HTMLElement): void; /** * This method is no longer supported. - * @param itemIndex + * @param itemIndex * @param element A DOM element. **/ prepareItem(itemIndex: number, element: any): void; /** * This method is no longer supported. - * @param item - * @param newItem + * @param item + * @param newItem **/ releaseItem(item: any, newItem: any): void; @@ -4260,7 +4260,7 @@ declare module WinJS.UI { /** * This method is no longer supported. - * @param layoutSite + * @param layoutSite **/ setSite(layoutSite: any): void; @@ -4271,8 +4271,8 @@ declare module WinJS.UI { /** * This method is no longer supported. - * @param beginScrollPosition - * @param endScrollPositionScrollPosition + * @param beginScrollPosition + * @param endScrollPositionScrollPosition **/ startLayout(beginScrollPosition: number, endScrollPositionScrollPosition: number): void; @@ -4283,7 +4283,7 @@ declare module WinJS.UI { /** * This method is no longer supported. - * @param count + * @param count **/ updateBackdrop(count: number): void; @@ -4371,7 +4371,7 @@ declare module WinJS.UI { /** * Creates a new ItemContainer. - * @constructor + * @constructor * @param element The DOM element hosts the new ItemContainer. For the ItemContainer to be accessible, this element must have its role attribute set to "list" or "listbox". If tapBehavior is set to none and selectionDisabled is true, then use the "list" role; otherwise, use the "listbox" role. * @param options An object that contains one or more property/value pairs to apply to the new control. Each property of the options object corresponds to one of the control's properties or events. **/ @@ -4489,7 +4489,7 @@ declare module WinJS.UI { /** * Creates a new ListLayout. - * @constructor + * @constructor * @param options An object that contains one or more property/value pairs to apply to the new ListLayout. Each property of the options object corresponds to one of the object's properties or events. Event names must begin with "on". **/ constructor(options?: any); @@ -4500,15 +4500,15 @@ declare module WinJS.UI { /** * This method is no longer supported. - * @param beginScrollPosition - * @param wholeItem + * @param beginScrollPosition + * @param wholeItem **/ calculateFirstVisible(beginScrollPosition: number, wholeItem: boolean): void; /** * This method is no longer supported. - * @param endScrollPosition - * @param wholeItem + * @param endScrollPosition + * @param wholeItem **/ calculateLastVisible(endScrollPosition: number, wholeItem: boolean): void; @@ -4542,22 +4542,22 @@ declare module WinJS.UI { /** * This method is no longer supported. - * @param itemIndex + * @param itemIndex **/ getItemPosition(itemIndex: number): void; /** * This method is no longer supported. - * @param itemIndex - * @param element - * @param keyPressed + * @param itemIndex + * @param element + * @param keyPressed **/ getKeyboardNavigatedItem(itemIndex: number, element: HTMLElement, keyPressed: any): void; /** * This method is no longer supported. - * @param beginScrollPosition - * @param endScrollPosition + * @param beginScrollPosition + * @param endScrollPosition **/ getScrollbarRange(beginScrollPosition: number, endScrollPosition: number): void; @@ -4580,14 +4580,14 @@ declare module WinJS.UI { /** * This method is no longer supported. - * @param elements + * @param elements **/ itemsAdded(elements: any): void; /** * This API supports the WinJS infrastructure and is not intended to be used directly from your code. - * @param firstPixel - * @param lastPixel + * @param firstPixel + * @param lastPixel **/ itemsFromRange(firstPixel: number, lastPixel: number): void; @@ -4598,50 +4598,50 @@ declare module WinJS.UI { /** * This method is no longer supported. - * @param elements + * @param elements **/ itemsRemoved(elements: any): void; /** * This API supports the WinJS infrastructure and is not intended to be used directly from your code. - * @param tree - * @param changedRange - * @param modifiedItems - * @param modifiedGroups + * @param tree + * @param changedRange + * @param modifiedItems + * @param modifiedGroups **/ layout(tree: any, changedRange: any, modifiedItems: any, modifiedGroups: any): void; /** * This method is no longer supported. - * @param groupIndex + * @param groupIndex * @param element A DOM element. **/ layoutHeader(groupIndex: number, element: any): void; /** * This method is no longer supported. - * @param itemIndex + * @param itemIndex * @param element A DOM element. **/ layoutItem(itemIndex: number, element: any): void; /** * This method is no longer supported. - * @param element + * @param element **/ prepareHeader(element: HTMLElement): void; /** * This method is no longer supported. - * @param itemIndex + * @param itemIndex * @param element A DOM element. **/ prepareItem(itemIndex: number, element: any): void; /** * This method is no longer supported. - * @param item - * @param newItem + * @param item + * @param newItem **/ releaseItem(item: any, newItem: any): void; @@ -4652,7 +4652,7 @@ declare module WinJS.UI { /** * This method is no longer supported. - * @param layoutSite + * @param layoutSite **/ setSite(layoutSite: any): void; @@ -4663,8 +4663,8 @@ declare module WinJS.UI { /** * This method is no longer supported. - * @param beginScrollPosition - * @param endScrollPositionScrollPosition + * @param beginScrollPosition + * @param endScrollPositionScrollPosition **/ startLayout(beginScrollPosition: number, endScrollPositionScrollPosition: number): void; @@ -4675,7 +4675,7 @@ declare module WinJS.UI { /** * This method is no longer supported. - * @param count + * @param count **/ updateBackdrop(count: number): void; @@ -4735,7 +4735,7 @@ declare module WinJS.UI { /** * Creates a new ListView. - * @constructor + * @constructor * @param element The DOM element that hosts the ListView control. * @param options An object that contains one or more property/value pairs to apply to the new control. Each property of the options object corresponds to one of the control's properties or events. Event names must begin with "on". For example, to provide a handler for the selectionchanged event, add a property named "onselectionchanged" to the options object and set its value to the event handler. **/ @@ -4996,7 +4996,7 @@ declare module WinJS.UI { /** * Creates a new Pivot. - * @constructor + * @constructor * @param element The DOM element hosts the new Pivot. * @param options An object that contains one or more property/value pairs to apply to the new control. Each property of the options object corresponds to one of the control's properties or events. Event names must begin with "on". For example, to provide a handler for the cancel event, add a property named "oncancel" to the options object and set its value to the event handler. **/ @@ -5102,7 +5102,7 @@ declare module WinJS.UI { /** * Creates a new PivotItem. - * @constructor + * @constructor * @param element The DOM element hosts the new PivotItem. * @param options An object that contains one or more property/value pairs to apply to the new control. Each property of the options object corresponds to one of the control's properties or events. Event names must begin with "on". For example, to provide a handler for the cancel event, add a property named "oncancel" to the options object and set its value to the event handler. **/ @@ -5147,7 +5147,7 @@ declare module WinJS.UI { /** * Creates a new Repeater control. - * @constructor + * @constructor * @param elemnt The DOM element that will host the new control. The Repeater will create an element if this value is null. * @param options An object that contains one or more property/value pairs to apply to the new Repeater. Each property of the options object corresponds to one of the object's properties or events. Event names must begin with "on". **/ @@ -5299,7 +5299,7 @@ declare module WinJS.UI { /** * Creates a new SemanticZoom. - * @constructor + * @constructor * @param element The DOM element that hosts the SemanticZoom. * @param options An object that contains one or more property/value pairs to apply to the new control. This object can contain these properties: initiallyZoomedOut Boolean, zoomFactor 0.2–0.85. **/ @@ -5424,7 +5424,7 @@ declare module WinJS.UI { /** * Creates a new TabContainer. - * @constructor + * @constructor * @param element The DOM element that hosts the TabContainer control. * @param options An object that contains one or more property/value pairs to apply to the new control. Each property of the options object corresponds to one of the control's properties. **/ @@ -5465,7 +5465,7 @@ declare module WinJS.UI { /** * Creates a new ToggleSwitch. - * @constructor + * @constructor * @param element The DOM that hosts the control. * @param options An object that contains one or more property/value pairs to apply to the new control. Each property of the options object corresponds to one of the control's properties or events. Event names must begin with "on". For example, to provide a handler for the change event, add a property named "onchange" to the options object and set its value to the event handler. **/ @@ -5638,7 +5638,7 @@ declare module WinJS.UI { /** * Initializes the VirtualizedDataSource base class of a custom data source. - * @constructor + * @constructor * @param listDataAdapter The object that supplies data to the VirtualizedDataSource. * @param options An object that can contain properties that specify additional options for the VirtualizedDataSource. It supports these properties: cacheSize. **/ @@ -6830,7 +6830,7 @@ declare module WinJS.Utilities { /** * Indicates whether the app is running on Windows Phone. - **/ + **/ var isPhone: boolean; //#endregion Properties From 917a08ec32c5b7f2f8cba9639f0392d054e80b47 Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Wed, 27 Jan 2016 19:48:40 +0900 Subject: [PATCH 29/65] Remove trailing whitespaces --- winrt/winrt-uwp.d.ts | 296 +++++++++++++++++++++---------------------- winrt/winrt.d.ts | 20 +-- 2 files changed, 158 insertions(+), 158 deletions(-) diff --git a/winrt/winrt-uwp.d.ts b/winrt/winrt-uwp.d.ts index e7216e732a..4de542180c 100644 --- a/winrt/winrt-uwp.d.ts +++ b/winrt/winrt-uwp.d.ts @@ -34,7 +34,7 @@ declare namespace Windows.Foundation { type IPromiseWithIAsyncActionWithProgress = IPromiseWithOperation>; type IPromiseWithIAsyncOperation = IPromiseWithOperation>; type IPromiseWithIAsyncOperationWithProgress = IPromiseWithOperation>; - + namespace Collections { interface IVector extends Array { indexOf(value: T, ...extra: any[]): { index: number; returnValue: boolean; } /* hack */ @@ -1015,7 +1015,7 @@ declare namespace Windows { */ getAppointmentAsync(localId: string): Windows.Foundation.IPromiseWithIAsyncOperation; /** - * + * * @param localId The LocalId of the appointment to be retrieved. * @param prefetchProperties A list of names of the properties for which data should be included when the appointment is retrieved. * @return An asynchronous operation that returns Appointment on successful completion. @@ -2794,19 +2794,19 @@ declare namespace Windows { /** * Deletes entries in the store. * @param callHistoryEntries The entries to delete. - * @return + * @return */ deleteEntriesAsync(callHistoryEntries: Windows.Foundation.Collections.IIterable): any; /* unmapped return type */ /** * Delete an entry from the store. * @param callHistoryEntry The entry to delete. - * @return + * @return */ deleteEntryAsync(callHistoryEntry: Windows.ApplicationModel.Calls.PhoneCallHistoryEntry): any; /* unmapped return type */ /** * Gets an entry from the store based on the entry id. * @param callHistoryEntryId The PhoneCallHistoryEntryt.Id of the relevant entry. - * @return + * @return */ getEntryAsync(callHistoryEntryId: string): any; /* unmapped return type */ /** @@ -2833,31 +2833,31 @@ declare namespace Windows { getUnseenCountAsync(): Windows.Foundation.IPromiseWithIAsyncOperation; /** * Update all the entries to indicate they have all been seen by the user. - * @return + * @return */ markAllAsSeenAsync(): any; /* unmapped return type */ /** * Updates entries to indicate they have been seen by the user. * @param callHistoryEntries The entries to mark as seen. This updates the PhoneCallHistoryEntry.IsSeen property. - * @return + * @return */ markEntriesAsSeenAsync(callHistoryEntries: Windows.Foundation.Collections.IIterable): any; /* unmapped return type */ /** * Updates an entry to indicate it has been seen. * @param callHistoryEntry The entry to update. - * @return + * @return */ markEntryAsSeenAsync(callHistoryEntry: Windows.ApplicationModel.Calls.PhoneCallHistoryEntry): any; /* unmapped return type */ /** * Marks all entries from the specified sources as seen. * @param sourceIds The list of source identifiers to mark as seen. Only entries that match PhoneCallHistoryEntry.SourceId will be updated. - * @return + * @return */ markSourcesAsSeenAsync(sourceIds: Windows.Foundation.Collections.IIterable): any; /* unmapped return type */ /** * Saves an entry to the store. * @param callHistoryEntry The entry to save. - * @return + * @return */ saveEntryAsync(callHistoryEntry: Windows.ApplicationModel.Calls.PhoneCallHistoryEntry): any; /* unmapped return type */ } @@ -5373,7 +5373,7 @@ declare namespace Windows { size: number; /** * Divides the object into two views - * @return + * @return */ split(): { /** The first half of the object. */ first: Windows.Foundation.Collections.IMapView; /** The second half of the object. */ second: Windows.Foundation.Collections.IMapView; }; /** Gets the source app's logo. */ @@ -7341,13 +7341,13 @@ declare namespace Windows { /** * Returns the ResourceCandidate objects that start at the specified index in the set. * @param startIndex The zero-based index of the start of the ResourceCandidate objects in the set to return. - * @return + * @return */ getMany(startIndex: number): { /** The ResourceCandidate objects in the set that start at startIndex. */ items: Windows.ApplicationModel.Resources.Core.ResourceCandidate; /** The number of ResourceCandidate objects returned. */ returnValue: number; }; /** * Returns the index of a specified ResourceCandidate in the set. * @param value The ResourceCandidate to find in the set. - * @return + * @return */ indexOf(value: Windows.ApplicationModel.Resources.Core.ResourceCandidate): { /** The zero-based index of the ResourceCandidate , if the item is found. The method returns zero if the item is not found. */ index: number; /** A Boolean that is TRUE if the ResourceCandidate is found, otherwise FALSE if the item is not found. */ returnValue: boolean; }; /** Gets the number of ResourceCandidate objects in the set. */ @@ -7433,13 +7433,13 @@ declare namespace Windows { /** * Returns the ResourceContext language qualifiers that start at the specified index in the set. * @param startIndex The zero-based index of the start of the ResourceContext language qualifiers in the set to return. - * @return + * @return */ getMany(startIndex: number): { /** The ResourceContext language qualifiers in the set that start at startIndex. */ items: string[]; /** The number of ResourceContext language qualifiers returned. */ returnValue: number; }; /** * Returns the index of a specified ResourceContext language qualifier in the set. * @param value The ResourceContext language qualifier to find in the set. - * @return + * @return */ indexOf(value: string): { /** The zero-based index of the ResourceContext language qualifier, if the item is found. The method returns zero if the item is not found. */ index: number; /** A Boolean that is TRUE if the ResourceContext language qualifier is found; otherwise, FALSE. */ returnValue: boolean; }; /** Gets the number of ResourceContext language qualifiers in the set. */ @@ -7530,7 +7530,7 @@ declare namespace Windows { size: number; /** * Splits the map view into two views. - * @return + * @return */ split(): { /** One half of the original map. */ first: Windows.Foundation.Collections.IMapView; /** The second half of the original map. */ second: Windows.Foundation.Collections.IMapView; }; /** Gets a URI that can be used to refer to this ResourceMap . */ @@ -7542,7 +7542,7 @@ declare namespace Windows { current: Windows.Foundation.Collections.IKeyValuePair; /** * Returns all the items in the ResourceMap . - * @return + * @return */ getMany(): { /** The items in the map. */ items: Windows.Foundation.Collections.IKeyValuePair; /** The number of items in the map. */ returnValue: number; }; /** Gets a value that indicates whether there is a current item, or whether the iterator is at the end of the ResourceMap . */ @@ -7576,7 +7576,7 @@ declare namespace Windows { size: number; /** * Splits the map view into two views. - * @return + * @return */ split(): { /** One half of the original map. */ first: Windows.Foundation.Collections.IMapView; /** The second half of the original map. */ second: Windows.Foundation.Collections.IMapView; }; } @@ -7586,7 +7586,7 @@ declare namespace Windows { current: Windows.Foundation.Collections.IKeyValuePair; /** * Returns all the items in the ResourceMapMapView . - * @return + * @return */ getMany(): { /** The items in the map view. */ items: Windows.Foundation.Collections.IKeyValuePair; /** The number of items in the map view. */ returnValue: number; }; /** Gets a value that indicates whether there is a current item, or whether the iterator is at the end of the ResourceMapMapView . */ @@ -7633,7 +7633,7 @@ declare namespace Windows { size: number; /** * Splits the map view into two views. - * @return + * @return */ split(): { /** One half of the original map. */ first: Windows.Foundation.Collections.IMapView; /** The second half of the original map. */ second: Windows.Foundation.Collections.IMapView; }; } @@ -7707,13 +7707,13 @@ declare namespace Windows { /** * Returns the ResourceQualifier objects that start at the specified index in the view. * @param startIndex The zero-based index of the start of the objects in the view to return. - * @return + * @return */ getMany(startIndex: number): { /** The objects in the view that start at startIndex. */ items: Windows.ApplicationModel.Resources.Core.ResourceQualifier; /** The number of objects returned. */ returnValue: number; }; /** * Returns the index of a specified ResourceQualifier in the view. * @param value The ResourceQualifier to find in the set. - * @return + * @return */ indexOf(value: Windows.ApplicationModel.Resources.Core.ResourceQualifier): { /** The zero-based index of the object, if found. The method returns zero if the object is not found. */ index: number; /** A Boolean that is TRUE if the object is found, otherwise FALSE if the object is not found. */ returnValue: boolean; }; /** Gets the number of ResourceQualifier objects in the view. */ @@ -9963,7 +9963,7 @@ declare namespace Windows { /** * Returns the high and low surrogate pair values for the specified supplementary Unicode character. * @param codepoint A Unicode character. This must be in the proper range: 0 <= codepoint <= 0x10FFFF. - * @return + * @return */ static getSurrogatePairFromCodepoint(codepoint: number): { /** The high surrogate value returned. */ highSurrogate: string; /** The low surrogate value returned. */ lowSurrogate: string; }; /** @@ -11592,7 +11592,7 @@ declare namespace Windows { /** * Returns the items that start at the specified index of the vector view. * @param startIndex The zero-based index of the start of the items in the vector to return. - * @return + * @return */ getMany(startIndex: number): { /** The items in the vector view that start at startIndex. */ items: Windows.Data.Xml.Dom.IXmlNode; /** The number of items returned. */ returnValue: number; }; /** @@ -11611,7 +11611,7 @@ declare namespace Windows { /** * Returns the index of a specified item in the vector view. * @param value The item to find in the vector view. - * @return + * @return */ indexOf(value: Windows.Data.Xml.Dom.IXmlNode): { /** The zero-based index of the item if found. Zero is returned if the item is not found. */ index: number; /** TRUE if the item is found; otherwise, FALSE if it is not found. */ returnValue: boolean; }; /** @@ -11668,13 +11668,13 @@ declare namespace Windows { /** * Returns the items that start at the specified index of the vector view. * @param startIndex The zero-based index of the start of the items in the vector to return. - * @return + * @return */ getMany(startIndex: number): { /** The items in the vector view that start at startIndex. */ items: Windows.Data.Xml.Dom.IXmlNode; /** The number of items returned. */ returnValue: number; }; /** * Returns the index of a specified item in the vector. * @param value The item to find in the vector. - * @return + * @return */ indexOf(value: Windows.Data.Xml.Dom.IXmlNode): { /** The zero-based index of the item if found. Zero is returned if the item is not found. */ index: number; /** TRUE if the item is found; otherwise, FALSE if the item is not found. */ returnValue: boolean; }; /** @@ -13155,7 +13155,7 @@ declare namespace Windows { /** Provides functionality to determine the Bluetooth Low Energy (LE) Appearance information for a device. */ abstract class BluetoothLEAppearance { /** - * + * * @param appearanceCategory The Bluetooth LE appearance category. See BluetoothLEAppearanceSubcategories . * @param appearanceSubCategory The Bluetooth LE appearance subcategory. See BluetoothLEAppearanceSubcategories . * @return The Bluetooth LE appearance object that was created from the appearance category and subcategory. @@ -14586,13 +14586,13 @@ declare namespace Windows { /** * Gets a range of DeviceInformation objects. * @param startIndex The index at which to start retrieving DeviceInformation objects. - * @return + * @return */ getMany(startIndex: number): { /** The array of DeviceInformation objects starting at the index specified by startIndex. */ items: Windows.Devices.Enumeration.DeviceInformation; /** The number of DeviceInformation objects returned. */ returnValue: number; }; /** * Returns the index of the specified DeviceInformation object in the collection. * @param value The DeviceInformation object in the collection. - * @return + * @return */ indexOf(value: Windows.Devices.Enumeration.DeviceInformation): { /** The index. */ index: number; /** true if the method succeeded; otherwise, false. */ returnValue: boolean; }; /** The number of DeviceInformation objects in the collection. */ @@ -15136,13 +15136,13 @@ declare namespace Windows { /** * Retrieves multiple elements in a single pass through the iterator. * @param startIndex The index from which to start retrieval. - * @return + * @return */ getMany(startIndex: number): { /** Provides the destination for the result. Size the initial array size as a "capacity" in order to specify how many results should be retrieved. */ items: Windows.Devices.Enumeration.Pnp.PnpObject; /** The number of items retrieved. */ returnValue: number; }; /** * Retrieves the index of the specified item. * @param value The value to find in the collection. - * @return + * @return */ indexOf(value: Windows.Devices.Enumeration.Pnp.PnpObject): { /** The index of the item to find, if found. */ index: number; /** True if an item with the specified value was found; otherwise, False. */ returnValue: boolean; }; /** Returns the number of items in the collection. */ @@ -15759,7 +15759,7 @@ declare namespace Windows { * Opens the specified general-purpose I/O (GPIO) pin in the specified mode, and gets a status value that you can use to handle a failure to open the pin programmatically. * @param pinNumber The pin number of the GPIO pin that you want to open. Some pins may not be available in user mode. For information about how the pin numbers correspond to physical pins, see the documentation for your circuit board. * @param sharingMode The mode in which you want to open the GPIO pin, which determines whether other connections to the pin can be opened while you have the pin open. - * @return + * @return */ tryOpenPin(pinNumber: number, sharingMode: Windows.Devices.Gpio.GpioSharingMode): { /** The opened GPIO pin if the return value is true; otherwise null. */ pin: Windows.Devices.Gpio.GpioPin; /** An enumeration value that indicates either that the attempt to open the GPIO pin succeeded, or the reason that the attempt to open the GPIO pin failed. */ openStatus: Windows.Devices.Gpio.GpioOpenStatus; /** True if the method successfully opened the pin; otherwise false. */ returnValue: boolean; }; } @@ -17214,7 +17214,7 @@ declare namespace Windows { /** * This method returns the transform from the color frame source to the target entity and sets hasResult to true, if a correlation exists. If a correlation does not exist, hasResult is set to false and result is not modified. * @param targetId The unique ID of the target entity. - * @return + * @return */ tryGetTransformTo(targetId: string): { /** If a correlation exists, this will be set to a 4x4 transform matrix that changes basis from the color frame source coordinate system to the target entity coordinate system. */ result: Windows.Foundation.Numerics.Matrix4x4; /** Returns true if a correlation exists, otherwise false. */ returnValue: boolean; }; /** @@ -17289,7 +17289,7 @@ declare namespace Windows { /** * Unprojects all pixels in an image from camera image space out into the coordinate frame of the camera device, using the corresponding depth values from a correlated depth camera. * @param depthFrame The depth frame containing the depth value to use when projecting the points into camera space. The coordinates of each pixel in the image will be mapped from camera image space to depth image space, and then used to look up the depth in this depth frame. - * @return + * @return */ unprojectAllPixelsAtCorrelatedDepthAsync(depthFrame: Windows.Devices.Perception.PerceptionDepthFrame): { /** Returns a set of coordinates, relative to the coordinate system of the camera device and with correlated depth values. */ results: Windows.Foundation.Numerics.Vector3; /** This method returns asynchronously. */ returnValue: Windows.Foundation.IPromiseWithIAsyncAction; }; /** @@ -17310,7 +17310,7 @@ declare namespace Windows { * Unprojects a region of pixels in an image from camera image space out into the coordinate frame of the camera device, using the corresponding depth values from a correlated depth camera. * @param region The region of pixels to project from camera image space out into the coordinate frame of the camera device. * @param depthFrame The depth frame containing the depth value to use when projecting the points into camera space. The pixelCoordinates will be mapped from camera image space to depth image space, and then used to look up the depth in depthFrame. - * @return + * @return */ unprojectRegionPixelsAtCorrelatedDepthAsync(region: Windows.Foundation.Rect, depthFrame: Windows.Devices.Perception.PerceptionDepthFrame): { /** A set of coordinates, relative to the coordinate system of the camera device and with correlated depth values. */ results: Windows.Foundation.Numerics.Vector3; /** This method returns asynchronously. */ returnValue: Windows.Foundation.IPromiseWithIAsyncAction; }; } @@ -17319,7 +17319,7 @@ declare namespace Windows { /** * Maps all pixels in an image from camera image space to depth image space. * @param depthFrame The depth frame to map the pixels to. - * @return + * @return */ mapAllPixelsToTargetAsync(depthFrame: Windows.Devices.Perception.PerceptionDepthFrame): { /** Returns the pixel coordinates, mapped to depth image space. */ targetCoordinates: Windows.Foundation.Point; /** This function returns asynchronously. */ returnValue: Windows.Foundation.IPromiseWithIAsyncAction; }; /** @@ -17340,7 +17340,7 @@ declare namespace Windows { * Maps a region of pixels from camera image space to depth image space. * @param region The region of pixels to map from camera image space to depth image space. * @param depthFrame The depth frame to map the region of pixels to. - * @return + * @return */ mapRegionOfPixelsToTargetAsync(region: Windows.Foundation.Rect, depthFrame: Windows.Devices.Perception.PerceptionDepthFrame): { /** The pixel coordinates, mapped to depth image space. */ targetCoordinates: Windows.Foundation.Point; /** This function returns asynchronously. */ returnValue: Windows.Foundation.IPromiseWithIAsyncAction; }; } @@ -17483,7 +17483,7 @@ declare namespace Windows { /** * Gets the transform from the depth frame source to the target entity and sets hasResult to true, if a correlation exists. If a correlation does not exist, hasResult is set to false and result is not modified. * @param targetId The unique ID of the target entity. - * @return + * @return */ tryGetTransformTo(targetId: string): { /** If a correlation exists, this will be set to a 4x4 transform matrix that changes basis from the depth frame source coordinate system to the target entity coordinate system. */ result: Windows.Foundation.Numerics.Matrix4x4; /** True if a correlation exists, otherwise false. */ returnValue: boolean; }; /** @@ -17714,7 +17714,7 @@ declare namespace Windows { /** * Gets the transform from the infrared frame source to the target entity and sets hasResult to true, if a correlation exists. If a correlation does not exist, hasResult is set to false and result is not modified. * @param targetId The unique ID of the target entity. - * @return + * @return */ tryGetTransformTo(targetId: string): { /** If a correlation exists, this will be set to a 4x4 transform matrix that changes basis from the infrared frame source coordinate system to the target entity coordinate system. */ result: Windows.Foundation.Numerics.Matrix4x4; /** True if a correlation exists, otherwise false. */ returnValue: boolean; }; /** @@ -18646,7 +18646,7 @@ declare namespace Windows { /** * Puts the device into an authenticated state. * @param responseToken A buffer containing the response token generated from the challenge token retrieved from a previous call to the RetrieveDeviceAuthenticationDataAsync method. - * @return + * @return */ authenticateDeviceAsync(responseToken: number[]): any; /* unmapped return type */ /** Releases the exclusive claim to the magnetic strip reader. */ @@ -18656,7 +18656,7 @@ declare namespace Windows { /** * Puts the device into an unauthenticated state. * @param responseToken A buffer containing the response token generated from the challenge token retrieved from a previous call to the RetrieveDeviceAuthenticationDataAsync method. - * @return + * @return */ deAuthenticateDeviceAsync(responseToken: number[]): any; /* unmapped return type */ /** Gets the DeviceInformation.Id of the claimed magnetic stripe reader. */ @@ -18725,7 +18725,7 @@ declare namespace Windows { * Provides a new encryption key to the device. * @param key The HEX-ASCII or base64-encoded value for the new key. * @param keyName The name used to identify the key. - * @return + * @return */ updateKeyAsync(key: string, keyName: string): any; /* unmapped return type */ /** @@ -22978,7 +22978,7 @@ declare namespace Windows { /** * Retrieves the first 9 bytes of a USB configuration descriptor in a UsbConfigurationDescriptor object that is contained in a UsbDescriptor object. * @param descriptor The UsbDescriptor object to parse. - * @return + * @return */ static tryParse(descriptor: Windows.Devices.Usb.UsbDescriptor): { /** Receives a UsbConfigurationDescriptor object. */ parsed: Windows.Devices.Usb.UsbConfigurationDescriptor; /** True, if a UsbConfigurationDescriptor object was found in the specified UsbDescriptor object. Otherwise, false. */ returnValue: boolean; }; /** Gets the bConfigurationValue field of a USB configuration descriptor. The value is the number that identifies the configuration. */ @@ -23165,7 +23165,7 @@ declare namespace Windows { /** * Retrieves the USB endpoint descriptor in a UsbEndpointDescriptor object that is contained in a UsbDescriptor object. * @param descriptor The UsbDescriptor object to parse. - * @return + * @return */ static tryParse(descriptor: Windows.Devices.Usb.UsbDescriptor): { /** Receives a UsbEndpointDescriptor object. */ parsed: Windows.Devices.Usb.UsbEndpointDescriptor; /** True, if the specified UsbDescriptor object is a USB endpoint descriptor. Otherwise, false. */ returnValue: boolean; }; /** Gets an object that represents the endpoint descriptor for the USB bulk IN endpoint. */ @@ -23222,7 +23222,7 @@ declare namespace Windows { /** * Retrieves information about the alternate setting in a UsbInterfaceDescriptor object that is contained in a UsbDescriptor object. * @param descriptor The UsbDescriptor object to parse. - * @return + * @return */ static tryParse(descriptor: Windows.Devices.Usb.UsbDescriptor): { /** Receives a UsbInterfaceDescriptor object. */ parsed: Windows.Devices.Usb.UsbInterfaceDescriptor; /** True, if the specified UsbDescriptor object is USB interface descriptor. Otherwise, false. */ returnValue: boolean; }; /** Gets the bAlternateSetting field of the USB interface descriptor. The value is a number that identifies the alternate setting defined by the interface. */ @@ -24238,13 +24238,13 @@ declare namespace Windows { /** * Retrieves the items that start at the specified index in the vector view. * @param startIndex The zero-based index of the start of the items in the vector view. - * @return + * @return */ getMany(startIndex: number): { /** The items that start at startIndex in the vector view. */ items: T; /** The number of items retrieved. */ returnValue: number; }; /** * Retrieves the index of a specified item in the vector view. * @param value The item to find in the vector view. - * @return + * @return */ indexOf(value: T): { /** If the item is found, this is the zero-based index of the item; otherwise, this parameter is 0. */ index: number; /** true if the item is found; otherwise, false. */ returnValue: boolean; }; /** Gets the number of items in the vector view. */ @@ -24268,7 +24268,7 @@ declare namespace Windows { /** * Retrieves the items that start at the specified index in the vector. * @param startIndex The zero-based index of the start of the items in the vector. - * @return + * @return */ getMany(startIndex: number): { /** The items that start at startIndex in the vector. */ items: T; /** The number of items retrieved. */ returnValue: number; }; /** @@ -24279,7 +24279,7 @@ declare namespace Windows { /** * Retrieves the index of a specified item in the vector. * @param value The item to find in the vector. - * @return + * @return */ indexOf(value: T): { /** If the item is found, this is the zero-based index of the item; otherwise, this parameter is 0. */ index: number; /** true if the item is found; otherwise, false. */ returnValue: boolean; }; /** @@ -24333,7 +24333,7 @@ declare namespace Windows { lookup(key: K): V; /** * Splits the map view into two views. - * @return + * @return */ split(): { /** One half of the original map. */ first: Windows.Foundation.Collections.IMapView; /** The second half of the original map. */ second: Windows.Foundation.Collections.IMapView; }; /** Gets the number of elements in the map. */ @@ -24381,7 +24381,7 @@ declare namespace Windows { interface IIterator { /** * Retrieves all items in the collection. - * @return + * @return */ getMany(): { /** The items in the collection. */ items: T; /** The number of items in the collection. */ returnValue: number; }; /** @@ -26400,13 +26400,13 @@ declare namespace Windows { /** * Gets name-value pairs starting at the specified index in the current URL query string. * @param startIndex The index to start getting name-value pairs at. - * @return + * @return */ getMany(startIndex: number): { /** The name-value pairs. */ items: Windows.Foundation.IWwwFormUrlDecoderEntry; /** The number of name-value pairs in items. */ returnValue: number; }; /** * Gets a value indicating whether the specified IWwwFormUrlDecoderEntry is at the specified index in the current URL query string. * @param value The name-value pair to get the index of. - * @return + * @return */ indexOf(value: Windows.Foundation.IWwwFormUrlDecoderEntry): { /** The position in value. */ index: number; /** true if value is at the position specified by index; otherwise, false. */ returnValue: boolean; }; /** Gets the number of the name-value pairs in the current URL query string. */ @@ -27377,13 +27377,13 @@ declare namespace Windows { /** * Returns the CharacterGrouping objects that start at the specified index in the set of character groups. * @param startIndex The zero-based index of the start of the CharacterGrouping objects in the set to return. - * @return + * @return */ getMany(startIndex: number): { /** The CharacterGrouping objects in the set that start at startIndex. */ items: Windows.Globalization.Collation.CharacterGrouping; /** The number of objects returned. */ returnValue: number; }; /** * Returns the index of a specified CharacterGrouping object in the set of character groups. * @param value The CharacterGrouping object to find in the set. - * @return + * @return */ indexOf(value: Windows.Globalization.Collation.CharacterGrouping): { /** The zero-based index of the CharacterGrouping object, if found. The method returns zero if the object is not found. */ index: number; /** True if the object is found, otherwise false. */ returnValue: boolean; }; /** @@ -28981,7 +28981,7 @@ declare namespace Windows { static autoRotationPreferences: Windows.Graphics.Display.DisplayOrientations; static currentOrientation: Windows.Graphics.Display.DisplayOrientations; /** - * + * * @return Object that manages the asynchronous retrieval of the color profile. */ static getColorProfileAsync(): Windows.Foundation.IPromiseWithIAsyncOperation; @@ -35911,12 +35911,12 @@ declare namespace Windows { capabilities: Windows.Media.Devices.MediaDeviceControlCapabilities; /** * Indicates whether automatic adjustment of the camera setting is enabled. - * @return + * @return */ tryGetAuto(): { /** True if automatic adjustment is enabled; false otherwise. */ value: boolean; /** Returns true if the method succeeds, or false otherwise. */ returnValue: boolean; }; /** * Gets the value of the camera setting. - * @return + * @return */ tryGetValue(): { /** The current value of the setting. The units depend on the setting. */ value: number; /** Returns true if the method succeeds, or false otherwise. */ returnValue: boolean; }; /** @@ -36180,7 +36180,7 @@ declare namespace Windows { torchControl: Windows.Media.Devices.TorchControl; /** * Gets the local power line frequency. - * @return + * @return */ tryGetPowerlineFrequency(): { /** The power line frequency. */ value: Windows.Media.Capture.PowerlineFrequency; /** Returns true if the method succeeded, or false otherwise. */ returnValue: boolean; }; /** @@ -38634,13 +38634,13 @@ declare namespace Windows { /** * Retrieves the audio tracks that start at the specified index in the list. * @param startIndex The zero-based index of the start of the audio tracks in the list. - * @return + * @return */ getMany(startIndex: number): { /** The audio tracks that start at startIndex in the list. */ items: Windows.Media.Core.AudioTrack; /** The number of audio tracks retrieved. */ returnValue: number; }; /** * Retrieves the index of a specified audio track in the list. * @param value The audio track to find in the vector view. - * @return + * @return */ indexOf(value: Windows.Media.Core.AudioTrack): { /** If the audio track is found, this is the zero-based index of the audio track; otherwise, this parameter is 0. */ index: number; /** True if the audio track is found; otherwise, false. */ returnValue: boolean; }; /** Occurs when the index of the currently selected audio track changes. */ @@ -38793,7 +38793,7 @@ declare namespace Windows { /** * Retrieves the timed metadata tracks that start at the specified index in the list. * @param startIndex The zero-based index of the start of the timed metadata tracks in the list. - * @return + * @return */ getMany(startIndex: number): { /** The timed metadata tracks that start at startIndex in the list. */ items: Windows.Media.Core.TimedMetadataTrack; /** The number of timed metadata tracks retrieved. */ returnValue: number; }; /** @@ -38805,7 +38805,7 @@ declare namespace Windows { /** * Retrieves the index of a specified timed metadata track in the list. * @param value The timed metadata track to find in the vector view. - * @return + * @return */ indexOf(value: Windows.Media.Core.TimedMetadataTrack): { /** If the timed metadata track is found, this is the zero-based index of the audio track; otherwise, this parameter is 0. */ index: number; /** True if the timed metadata track is found; otherwise, false. */ returnValue: boolean; }; /** Occurs when the presentation mode of the MediaPlaybackTimedMetadataTrackList changes. */ @@ -38841,13 +38841,13 @@ declare namespace Windows { /** * Retrieves the video tracks that start at the specified index in the list. * @param startIndex The zero-based index of the start of the video tracks in the list. - * @return + * @return */ getMany(startIndex: number): { /** The video tracks that start at startIndex in the list. */ items: Windows.Media.Core.VideoTrack; /** The number of video tracks retrieved. */ returnValue: number; }; /** * Retrieves the index of a specified video track in the list. * @param value The video track to find in the vector view. - * @return + * @return */ indexOf(value: Windows.Media.Core.VideoTrack): { /** If the video track is found, this is the zero-based index of the audio track; otherwise, this parameter is 0. */ index: number; /** True if the video track is found; otherwise, false. */ returnValue: boolean; }; /** Occurs when the index of the currently selected video track changes. */ @@ -39667,7 +39667,7 @@ declare namespace Windows { current: Windows.Media.Protection.PlayReady.IPlayReadyDomain; /** * Retrieves all items in the PlayReady domain collection. - * @return + * @return */ getMany(): { /** The items in the collection. */ items: Windows.Media.Protection.PlayReady.IPlayReadyDomain; /** The number of items in the collection. */ returnValue: number; }; /** Gets a value that indicates whether there is a current item or the iterator is at the end of the PlayReady domain collection. */ @@ -39918,7 +39918,7 @@ declare namespace Windows { current: Windows.Media.Protection.PlayReady.IPlayReadyLicense; /** * Retrieves all items in the PlayReady license collection. - * @return + * @return */ getMany(): { /** The items in the collection. */ items: Windows.Media.Protection.PlayReady.IPlayReadyLicense; /** The number of items in the collection. */ returnValue: number; }; /** Gets a value that indicates whether there is a current item or the iterator is at the end of the PlayReady license collection. */ @@ -40049,7 +40049,7 @@ declare namespace Windows { current: Windows.Media.Protection.PlayReady.IPlayReadySecureStopServiceRequest; /** * Retrieves all items in the PlayReady secure stop collection. - * @return + * @return */ getMany(): { /** The items in the collection. */ items: Windows.Media.Protection.PlayReady.IPlayReadySecureStopServiceRequest; /** The number of items in the collection. */ returnValue: number; }; /** Gets a value that indicates whether there is a current item or the iterator is at the end of the PlayReady secure stop collection. */ @@ -40247,7 +40247,7 @@ declare namespace Windows { /** * Retrieves the stream type (audio or video) and stream identifier of the media stream descriptor. * @param descriptor The media stream from which this method gets information. - * @return + * @return */ getStreamInformation(descriptor: Windows.Media.Core.IMediaStreamDescriptor): { /** The type of the media stream. This type can be either Audio or Video. */ streamType: Windows.Media.Protection.PlayReady.NDMediaStreamType; /** The stream identifier for the media stream. */ returnValue: number; }; /** @@ -41615,7 +41615,7 @@ declare namespace Windows { */ static getCurrentDownloadsForTransferGroupAsync(group: Windows.Networking.BackgroundTransfer.BackgroundTransferGroup): Windows.Foundation.IPromiseWithIAsyncOperation>; /** - * + * * @param operations The download operation to run unconstrained. * @return Indicates if the operations will run unconstrained. */ @@ -41815,7 +41815,7 @@ declare namespace Windows { */ static getCurrentUploadsForTransferGroupAsync(group: Windows.Networking.BackgroundTransfer.BackgroundTransferGroup): Windows.Foundation.IPromiseWithIAsyncOperation>; /** - * + * * @param operations The upload operation to run unconstrained. * @return Indicates if the operations will run unconstrained. */ @@ -42740,7 +42740,7 @@ declare namespace Windows { /** * Gets the context of an authentication attempt. * @param evenToken The event token retrieved from the network operator hotspot authentication event . The token is a GUID in string format. - * @return + * @return */ static tryGetAuthenticationContext(evenToken: string): { /** The network operator hotspot authentication context. */ context: Windows.Networking.NetworkOperators.HotspotAuthenticationContext; /** If true, the authentication context was retrieved. The authentication context can only be retrieved if the calling application matches the application ID specified in the hotspot profile of the underlying WLAN connection and if the authentication hasn’t be completed by the corresponding context already or timed out. */ returnValue: boolean; }; /** @@ -44213,13 +44213,13 @@ declare namespace Windows { /** * Gets multiple DnssdServiceInstance objects from a DNS-SD service instance collection. * @param startIndex Index of the first collection item to be retrieved. - * @return + * @return */ getMany(startIndex: number): { /** The retrieved DnssdServiceInstance objects. */ items: Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceInstance; /** The number of items in items. */ returnValue: number; }; /** * Gets a value indicating whether a given DnssdServiceInstance is at the specified index in this service instance collection. * @param value The DnssdServiceInstance to get the index of. - * @return + * @return */ indexOf(value: Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceInstance): { /** The index, if the DnssdServiceInstance is found. */ index: number; /** true if value is found at index, false otherwise. */ returnValue: boolean; }; /** Gets the number of items in the collection */ @@ -45215,7 +45215,7 @@ declare namespace Windows { getSnapshotAsBuffer(): Windows.Storage.Streams.IBuffer; /** * This API is not available to all apps. Unless your developer account is specially provisioned by Microsoft, calls to these APIs will fail at runtime. - * @return + * @return */ getSnapshotAsBytes(): { /** This API is not available to all apps. Unless your developer account is specially provisioned by Microsoft, calls to these APIs will fail at runtime. */ buffer: number[]; /** This API is not available to all apps. Unless your developer account is specially provisioned by Microsoft, calls to these APIs will fail at runtime. */ bytesWritten: number; }; /** This API is not available to all apps. Unless your developer account is specially provisioned by Microsoft, calls to these APIs will fail at runtime. */ @@ -46574,31 +46574,31 @@ declare namespace Windows { clear(): void; /** * This method is reserved for internal use and is not intended to be used in your code. - * @return + * @return */ first(): any; /* unmapped return type */ /** * This method is reserved for internal use and is not intended to be used in your code. - * @return + * @return */ getView(): any; /* unmapped return type */ /** * This method is reserved for internal use and is not intended to be used in your code. * @param key Reserved. - * @return + * @return */ hasKey(key: string): any; /* unmapped return type */ /** * This method is reserved for internal use and is not intended to be used in your code. * @param key Reserved. * @param value Reserved. - * @return + * @return */ insert(key: string, value: any): any; /* unmapped return type */ /** * This method is reserved for internal use and is not intended to be used in your code. * @param key Reserved. - * @return + * @return */ lookup(key: string): any; /* unmapped return type */ /** This method is reserved for internal use and is not intended to be used in your code. */ @@ -48977,13 +48977,13 @@ declare namespace Windows { /** * Retrieves the storage items that start at the specified index in the access list or most recently used (MRU) list. * @param startIndex The zero-based index of the start of the items in the collection to retrieve. - * @return + * @return */ getMany(startIndex: number): { /** The items in the collection that start at startIndex. */ items: Windows.Storage.AccessCache.AccessListEntry; /** The number of items retrieved. */ returnValue: number; }; /** * Retrieves the index of the specified storage item in the access list or most recently used (MRU) list. * @param value The storage item. - * @return + * @return */ indexOf(value: Windows.Storage.AccessCache.AccessListEntry): { /** The zero-based index of the storage item. */ index: number; /** True if the specified storage item exists in the list; otherwise false. */ returnValue: boolean; }; /** Gets the number of storage items in the access list or most recently used (MRU) list. */ @@ -50948,7 +50948,7 @@ declare namespace Windows { /** * Retrieves the file name extensions that start at the specified index in the collection. * @param startIndex The zero-based index of the start of the file name extensions in the collection to retrieve. - * @return + * @return */ getMany(startIndex: number): { /** The file name extensions in the collection that start at startIndex. */ items: string[]; /** The number of items retrieved. */ returnValue: number; }; /** @@ -50959,7 +50959,7 @@ declare namespace Windows { /** * Retrieves the index of a specified file name extension in the collection. * @param value The file name extension to find in the collection. - * @return + * @return */ indexOf(value: string): { /** The zero-based index of the file name extension if found. This parameter is set to zero if the file name extension is not found. */ index: number; /** True if the file name extension is found; otherwise FALSE. */ returnValue: boolean; }; /** @@ -51086,13 +51086,13 @@ declare namespace Windows { /** * Retrieves the StorageFile objects that start at the specified index in the collection. * @param startIndex The zero-based index of the start of the objects in the collection to return. - * @return + * @return */ getMany(startIndex: number): { /** The items in the collection that start at startIndex. */ items: Windows.Storage.StorageFile; /** The number of items returned. */ returnValue: number; }; /** * Retrieves the index of a specified StorageFile object in the collection. * @param value The object to find in the collection. - * @return + * @return */ indexOf(value: Windows.Storage.StorageFile): { /** The zero-based index of the object if found. Zero is returned if the object is not found. */ index: number; /** True if the object is found; otherwise false. */ returnValue: boolean; }; /** Gets the number of StorageFile objects in the collection. */ @@ -51528,7 +51528,7 @@ declare namespace Windows { /** * Adds app-defined items with properties and content to the system index. * @param indexableContent The content properties to index. - * @return + * @return */ addAsync(indexableContent: Windows.Storage.Search.IIndexableContent): any; /* unmapped return type */ /** @@ -51557,19 +51557,19 @@ declare namespace Windows { createQuery(searchFilter: string, propertiesToRetrieve: Windows.Foundation.Collections.IIterable): Windows.Storage.Search.ContentIndexerQuery; /** * Removes all app-defined items from the ContentIndexer . - * @return + * @return */ deleteAllAsync(): any; /* unmapped return type */ /** * Removes the specified app-defined item from the ContentIndexer . * @param contentId The identifier of the item to remove. - * @return + * @return */ deleteAsync(contentId: string): any; /* unmapped return type */ /** * Removes the specified app-defined items from the ContentIndexer . * @param contentIds The identifier of the item to remove. - * @return + * @return */ deleteMultipleAsync(contentIds: Windows.Foundation.Collections.IIterable): any; /* unmapped return type */ /** @@ -51584,7 +51584,7 @@ declare namespace Windows { /** * Updates app content and properties in the ContentIndexer . * @param indexableContent The content properties to update. - * @return + * @return */ updateAsync(indexableContent: Windows.Storage.Search.IIndexableContent): any; /* unmapped return type */ } @@ -51753,7 +51753,7 @@ declare namespace Windows { /** * Retrieves the sort entries that start at the specified index in the collection. * @param startIndex The zero-based index of the start of the sort entries in the collection to retrieve. - * @return + * @return */ getMany(startIndex: number): { /** The sort entries in the collection that start at startIndex. */ items: Windows.Storage.Search.SortEntry; /** The number of items retrieved. */ returnValue: number; }; /** @@ -51764,7 +51764,7 @@ declare namespace Windows { /** * Retrieves the index of a specified sort entry in the collection. * @param value The sort entry to find in the collection. - * @return + * @return */ indexOf(value: Windows.Storage.Search.SortEntry): { /** The zero-based index of the sort entry, if found. This parameter is set to zero if the sort entry is not found. */ index: number; /** True if the sort entry is found; otherwise false. */ returnValue: boolean; }; /** @@ -54528,7 +54528,7 @@ declare namespace Windows { size: number; /** * Splits the map view into two views. - * @return + * @return */ split(): { /** The first part of the original map. */ first: Windows.Foundation.Collections.IMapView; /** The second part of the original map. */ second: Windows.Foundation.Collections.IMapView; }; } @@ -56944,7 +56944,7 @@ declare namespace Windows { /** * Attempts to perform the transformation on the specified input point. * @param inPoint The original input point. - * @return + * @return */ tryTransform(inPoint: Windows.Foundation.Point): { /** The transformed input point. */ outPoint: Windows.Foundation.Point; /** True if inPoint was transformed successfully; otherwise, false. */ returnValue: boolean; }; /** Gets the inverse of the specified transformation. */ @@ -60914,7 +60914,7 @@ declare namespace Windows { /** * Retrieves the HttpNameValueHeaderValue items that start at the specified index in the collection. * @param startIndex The zero-based index of the start of the HttpNameValueHeaderValue items in the HttpCacheDirectiveHeaderValueCollection . - * @return + * @return */ getMany(startIndex: number): { /** An array of HttpNameValueHeaderValue items that start at startIndex in the HttpCacheDirectiveHeaderValueCollection . */ items: Windows.Web.Http.Headers.HttpNameValueHeaderValue; /** The number of HttpNameValueHeaderValue items retrieved. */ returnValue: number; }; /** @@ -60925,7 +60925,7 @@ declare namespace Windows { /** * Retrieves the index of an HttpNameValueHeaderValue in the collection. * @param value The HttpNameValueHeaderValue to find in the HttpCacheDirectiveHeaderValueCollection . - * @return + * @return */ indexOf(value: Windows.Web.Http.Headers.HttpNameValueHeaderValue): { /** The index of the HttpNameValueHeaderValue in the HttpCacheDirectiveHeaderValueCollection . */ index: number; /** Indicates whether the item is found. */ returnValue: boolean; }; /** @@ -60998,7 +60998,7 @@ declare namespace Windows { /** * Determines whether a string is valid HttpChallengeHeaderValue information. * @param input The string to validate. - * @return + * @return */ static tryParse(input: string): { /** The HttpChallengeHeaderValue version of the string. */ challengeHeaderValue: Windows.Web.Http.Headers.HttpChallengeHeaderValue; /** true if input is valid HttpChallengeHeaderValue information; otherwise, false. */ returnValue: boolean; }; /** @@ -61042,7 +61042,7 @@ declare namespace Windows { /** * Retrieves the HttpChallengeHeaderValue items that start at the specified index in the collection. * @param startIndex The zero-based index of the start of the HttpChallengeHeaderValue items in the HttpChallengeHeaderValueCollection . - * @return + * @return */ getMany(startIndex: number): { /** An array of HttpChallengeHeaderValue items that start at startIndex in the HttpChallengeHeaderValueCollection . */ items: Windows.Web.Http.Headers.HttpChallengeHeaderValue; /** The number of HttpChallengeHeaderValue items retrieved. */ returnValue: number; }; /** @@ -61053,7 +61053,7 @@ declare namespace Windows { /** * Retrieves the index of an HttpChallengeHeaderValue in the collection. * @param value The HttpChallengeHeaderValue to find in the HttpChallengeHeaderValueCollection . - * @return + * @return */ indexOf(value: Windows.Web.Http.Headers.HttpChallengeHeaderValue): { /** The index of the HttpChallengeHeaderValue in the HttpChallengeHeaderValueCollection . */ index: number; /** Indicates whether the item is found. */ returnValue: boolean; }; /** @@ -61118,7 +61118,7 @@ declare namespace Windows { /** * Determines whether a string is valid HttpConnectionOptionHeaderValue information. * @param input The string to validate. - * @return + * @return */ static tryParse(input: string): { /** The HttpConnectionOptionHeaderValue version of the string. */ connectionOptionHeaderValue: Windows.Web.Http.Headers.HttpConnectionOptionHeaderValue; /** true if input is valid HttpConnectionOptionHeaderValue information; otherwise, false. */ returnValue: boolean; }; /** @@ -61152,7 +61152,7 @@ declare namespace Windows { /** * Retrieves the HttpConnectionOptionHeaderValue items that start at the specified index in the collection. * @param startIndex The zero-based index of the start of the HttpConnectionOptionHeaderValue items in the HttpConnectionOptionHeaderValueCollection . - * @return + * @return */ getMany(startIndex: number): { /** An array of HttpConnectionOptionHeaderValue items that start at startIndex in the HttpConnectionOptionHeaderValueCollection . */ items: Windows.Web.Http.Headers.HttpConnectionOptionHeaderValue; /** The number of HttpConnectionOptionHeaderValue items retrieved. */ returnValue: number; }; /** @@ -61163,7 +61163,7 @@ declare namespace Windows { /** * Retrieves the index of an HttpConnectionOptionHeaderValue in the collection. * @param value The HttpConnectionOptionHeaderValue to find in the HttpConnectionOptionHeaderValueCollection . - * @return + * @return */ indexOf(value: Windows.Web.Http.Headers.HttpConnectionOptionHeaderValue): { /** The index of the HttpConnectionOptionHeaderValue in the HttpConnectionOptionHeaderValueCollection . */ index: number; /** Indicates whether the item is found. */ returnValue: boolean; }; /** @@ -61228,7 +61228,7 @@ declare namespace Windows { /** * Determines whether a string is valid HttpContentCodingHeaderValue information. * @param input The string to validate. - * @return + * @return */ static tryParse(input: string): { /** The HttpContentCodingHeaderValue version of the string. */ contentCodingHeaderValue: Windows.Web.Http.Headers.HttpContentCodingHeaderValue; /** true if input is valid HttpContentCodingHeaderValue information; otherwise, false. */ returnValue: boolean; }; /** @@ -61262,7 +61262,7 @@ declare namespace Windows { /** * Retrieves the HttpContentCodingHeaderValue items that start at the specified index in the collection. * @param startIndex The zero-based index of the start of the HttpContentCodingHeaderValue items in the HttpContentCodingHeaderValueCollection . - * @return + * @return */ getMany(startIndex: number): { /** An array of HttpContentCodingHeaderValue items that start at startIndex in the HttpContentCodingHeaderValueCollection . */ items: Windows.Web.Http.Headers.HttpContentCodingHeaderValue; /** The number of HttpContentCodingHeaderValue items retrieved. */ returnValue: number; }; /** @@ -61273,7 +61273,7 @@ declare namespace Windows { /** * Retrieves the index of an HttpContentCodingHeaderValue in the collection. * @param value The HttpContentCodingHeaderValue to find in the HttpContentCodingHeaderValueCollection . - * @return + * @return */ indexOf(value: Windows.Web.Http.Headers.HttpContentCodingHeaderValue): { /** The index of the HttpContentCodingHeaderValue in the HttpContentCodingHeaderValueCollection . */ index: number; /** Indicates whether the item is found. */ returnValue: boolean; }; /** @@ -61338,7 +61338,7 @@ declare namespace Windows { /** * Determines whether a string is valid HttpContentCodingWithQualityHeaderValue information. * @param input The string to validate. - * @return + * @return */ static tryParse(input: string): { /** The HttpContentCodingWithQualityHeaderValue version of the string. */ contentCodingWithQualityHeaderValue: Windows.Web.Http.Headers.HttpContentCodingWithQualityHeaderValue; /** true if input is valid HttpContentCodingWithQualityHeaderValue information; otherwise, false. */ returnValue: boolean; }; /** @@ -61380,7 +61380,7 @@ declare namespace Windows { /** * Retrieves the HttpContentCodingWithQualityHeaderValue items that start at the specified index in the collection. * @param startIndex The zero-based index of the start of the HttpContentCodingWithQualityHeaderValue items in the HttpContentCodingWithQualityHeaderValueCollection . - * @return + * @return */ getMany(startIndex: number): { /** An array of HttpContentCodingWithQualityHeaderValue items that start at startIndex in the HttpContentCodingWithQualityHeaderValueCollection . */ items: Windows.Web.Http.Headers.HttpContentCodingWithQualityHeaderValue; /** The number of HttpContentCodingWithQualityHeaderValue items retrieved. */ returnValue: number; }; /** @@ -61391,7 +61391,7 @@ declare namespace Windows { /** * Retrieves the index of an HttpContentCodingWithQualityHeaderValue in the collection. * @param value The HttpContentCodingWithQualityHeaderValue to find in the HttpContentCodingWithQualityHeaderValueCollection . - * @return + * @return */ indexOf(value: Windows.Web.Http.Headers.HttpContentCodingWithQualityHeaderValue): { /** The index of the HttpContentCodingWithQualityHeaderValue in the HttpContentCodingWithQualityHeaderValueCollection . */ index: number; /** Indicates whether the item is found. */ returnValue: boolean; }; /** @@ -61456,7 +61456,7 @@ declare namespace Windows { /** * Determines whether a string is valid HttpContentDispositionHeaderValue information. * @param input The string to validate. - * @return + * @return */ static tryParse(input: string): { /** The HttpContentDispositionHeaderValue version of the string. */ contentDispositionHeaderValue: Windows.Web.Http.Headers.HttpContentDispositionHeaderValue; /** true if input is valid HttpContentDispositionHeaderValue information; otherwise, false. */ returnValue: boolean; }; /** @@ -61570,7 +61570,7 @@ declare namespace Windows { /** * Determines whether a string is valid HttpContentRangeHeaderValue information. * @param input The string to validate. - * @return + * @return */ static tryParse(input: string): { /** The HttpContentRangeHeaderValue version of the string. */ contentRangeHeaderValue: Windows.Web.Http.Headers.HttpContentRangeHeaderValue; /** true if input is valid HttpContentRangeHeaderValue information; otherwise, false. */ returnValue: boolean; }; /** @@ -61611,7 +61611,7 @@ declare namespace Windows { /** * Determines whether a string is valid HttpCookiePairHeaderValue information. * @param input The string to validate. - * @return + * @return */ static tryParse(input: string): { /** The HttpCookiePairHeaderValue version of the string. */ cookiePairHeaderValue: Windows.Web.Http.Headers.HttpCookiePairHeaderValue; /** true if input is valid HttpCookiePairHeaderValue information; otherwise, false. */ returnValue: boolean; }; /** @@ -61653,7 +61653,7 @@ declare namespace Windows { /** * Retrieves the HttpCookiePairHeaderValue items that start at the specified index in the collection. * @param startIndex The zero-based index of the start of the HttpCookiePairHeaderValue items in the HttpCookiePairHeaderValueCollection . - * @return + * @return */ getMany(startIndex: number): { /** An array of HttpCookiePairHeaderValue items that start at startIndex in the HttpCookiePairHeaderValueCollection . */ items: Windows.Web.Http.Headers.HttpCookiePairHeaderValue; /** The number of HttpCookiePairHeaderValue items retrieved. */ returnValue: number; }; /** @@ -61664,7 +61664,7 @@ declare namespace Windows { /** * Retrieves the index of an HttpCookiePairHeaderValue in the collection. * @param value The HttpCookiePairHeaderValue to find in the HttpCookiePairHeaderValueCollection . - * @return + * @return */ indexOf(value: Windows.Web.Http.Headers.HttpCookiePairHeaderValue): { /** The index of the HttpCookiePairHeaderValue in the HttpCookiePairHeaderValueCollection . */ index: number; /** Indicates whether the item is found. */ returnValue: boolean; }; /** @@ -61729,7 +61729,7 @@ declare namespace Windows { /** * Determines whether a string is valid HttpCredentialsHeaderValue information. * @param input The string to validate. - * @return + * @return */ static tryParse(input: string): { /** The HttpCredentialsHeaderValue version of the string. */ credentialsHeaderValue: Windows.Web.Http.Headers.HttpCredentialsHeaderValue; /** true if input is valid HttpCredentialsHeaderValue information; otherwise, false. */ returnValue: boolean; }; /** @@ -61761,7 +61761,7 @@ declare namespace Windows { /** * Determines whether a string is valid HttpDateOrDeltaHeaderValue information. * @param input The string to validate. - * @return + * @return */ static tryParse(input: string): { /** The HttpDateOrDeltaHeaderValue version of the string. */ dateOrDeltaHeaderValue: Windows.Web.Http.Headers.HttpDateOrDeltaHeaderValue; /** true if input is valid HttpDateOrDeltaHeaderValue information; otherwise, false. */ returnValue: boolean; }; /** Gets the value of the HTTP-date information used in the Retry-After HTTP header. */ @@ -61780,7 +61780,7 @@ declare namespace Windows { /** * Determines whether a string is valid HttpCredentialsHeaderValue information. * @param input The string to validate. - * @return + * @return */ static tryParse(input: string): { /** The HttpExpectationHeaderValue version of the string. */ expectationHeaderValue: Windows.Web.Http.Headers.HttpExpectationHeaderValue; /** true if input is valid HttpExpectationHeaderValue information; otherwise, false. */ returnValue: boolean; }; /** @@ -61824,7 +61824,7 @@ declare namespace Windows { /** * Retrieves the HttpExpectationHeaderValue items that start at the specified index in the collection. * @param startIndex The zero-based index of the start of the HttpExpectationHeaderValue items in the HttpExpectationHeaderValueCollection . - * @return + * @return */ getMany(startIndex: number): { /** An array of HttpExpectationHeaderValue items that start at startIndex in the HttpExpectationHeaderValueCollection . */ items: Windows.Web.Http.Headers.HttpExpectationHeaderValue; /** The number of items retrieved. */ returnValue: number; }; /** @@ -61835,7 +61835,7 @@ declare namespace Windows { /** * Retrieves the index of an HttpExpectationHeaderValue in the collection. * @param value The HttpExpectationHeaderValue to find in the HttpExpectationHeaderValueCollection . - * @return + * @return */ indexOf(value: Windows.Web.Http.Headers.HttpExpectationHeaderValue): { /** The index of the HttpExpectationHeaderValue in the HttpExpectationHeaderValueCollection . */ index: number; /** Indicates whether the item is found. */ returnValue: boolean; }; /** @@ -61912,7 +61912,7 @@ declare namespace Windows { /** * Retrieves the Language items that start at the specified index in the collection. * @param startIndex The zero-based index of the start of the Language items in the HttpLanguageHeaderValueCollection . - * @return + * @return */ getMany(startIndex: number): { /** An array of Language items that start at startIndex in the HttpLanguageHeaderValueCollection . */ items: Windows.Globalization.Language; /** The number of items retrieved. */ returnValue: number; }; /** @@ -61923,7 +61923,7 @@ declare namespace Windows { /** * Retrieves the index of a Language in the collection. * @param value The item to find in the HttpLanguageHeaderValueCollection . - * @return + * @return */ indexOf(value: Windows.Globalization.Language): { /** The index of the Language item in the HttpLanguageHeaderValueCollection . */ index: number; /** Indicates whether the item is found. */ returnValue: boolean; }; /** @@ -61988,7 +61988,7 @@ declare namespace Windows { /** * Determines whether a string is valid HttpLanguageRangeWithQualityHeaderValue information. * @param input The string to validate. - * @return + * @return */ static tryParse(input: string): { /** The HttpLanguageRangeWithQualityHeaderValue version of the string. */ languageRangeWithQualityHeaderValue: Windows.Web.Http.Headers.HttpLanguageRangeWithQualityHeaderValue; /** true if input is valid HttpLanguageRangeWithQualityHeaderValue information; otherwise, false. */ returnValue: boolean; }; /** @@ -62030,7 +62030,7 @@ declare namespace Windows { /** * Retrieves the HttpLanguageRangeWithQualityHeaderValue items that start at the specified index in the collection. * @param startIndex The zero-based index of the start of the HttpLanguageRangeWithQualityHeaderValue items in the HttpLanguageRangeWithQualityHeaderValueCollection . - * @return + * @return */ getMany(startIndex: number): { /** An array of HttpLanguageRangeWithQualityHeaderValue items that start at startIndex in the HttpLanguageRangeWithQualityHeaderValueCollection . */ items: Windows.Web.Http.Headers.HttpLanguageRangeWithQualityHeaderValue; /** The number of items retrieved. */ returnValue: number; }; /** @@ -62041,7 +62041,7 @@ declare namespace Windows { /** * Retrieves the index of an HttpLanguageRangeWithQualityHeaderValue in the collection. * @param value The HttpLanguageRangeWithQualityHeaderValue to find in the HttpLanguageRangeWithQualityHeaderValueCollection . - * @return + * @return */ indexOf(value: Windows.Web.Http.Headers.HttpLanguageRangeWithQualityHeaderValue): { /** The index of the HttpLanguageRangeWithQualityHeaderValue in the HttpLanguageRangeWithQualityHeaderValueCollection . */ index: number; /** Indicates whether the item is found. */ returnValue: boolean; }; /** @@ -62106,7 +62106,7 @@ declare namespace Windows { /** * Determines whether a string is valid HttpMediaTypeHeaderValue information. * @param input The string to validate. - * @return + * @return */ static tryParse(input: string): { /** The HttpMediaTypeHeaderValue version of the string. */ mediaTypeHeaderValue: Windows.Web.Http.Headers.HttpMediaTypeHeaderValue; /** true if input is valid HttpMediaTypeHeaderValue information; otherwise, false. */ returnValue: boolean; }; /** @@ -62132,7 +62132,7 @@ declare namespace Windows { /** * Determines whether a string is valid HttpMediaTypeWithQualityHeaderValue information. * @param input The string to validate. - * @return + * @return */ static tryParse(input: string): { /** The HttpMediaTypeWithQualityHeaderValue version of the string. */ mediaTypeWithQualityHeaderValue: Windows.Web.Http.Headers.HttpMediaTypeWithQualityHeaderValue; /** true if input is valid HttpMediaTypeWithQualityHeaderValue information; otherwise, false. */ returnValue: boolean; }; /** @@ -62178,7 +62178,7 @@ declare namespace Windows { /** * Retrieves the HttpMediaTypeWithQualityHeaderValue items that start at the specified index in the collection. * @param startIndex The zero-based index of the start of the HttpMediaTypeWithQualityHeaderValue items in the HttpMediaTypeWithQualityHeaderValueCollection . - * @return + * @return */ getMany(startIndex: number): { /** An array of HttpMediaTypeWithQualityHeaderValue items that start at startIndex in the HttpMediaTypeWithQualityHeaderValueCollection . */ items: Windows.Web.Http.Headers.HttpMediaTypeWithQualityHeaderValue; /** The number of items retrieved. */ returnValue: number; }; /** @@ -62189,7 +62189,7 @@ declare namespace Windows { /** * Retrieves the index of an HttpMediaTypeWithQualityHeaderValue in the collection. * @param value The HttpMediaTypeWithQualityHeaderValue to find in the HttpMediaTypeWithQualityHeaderValueCollection . - * @return + * @return */ indexOf(value: Windows.Web.Http.Headers.HttpMediaTypeWithQualityHeaderValue): { /** The index of the HttpMediaTypeWithQualityHeaderValue in the HttpMediaTypeWithQualityHeaderValueCollection . */ index: number; /** Indicates whether the item is found. */ returnValue: boolean; }; /** @@ -62266,7 +62266,7 @@ declare namespace Windows { /** * Retrieves the HttpMethod items that start at the specified index in the collection. * @param startIndex The zero-based index of the start of the HttpMethod items in the HttpMethodHeaderValueCollection . - * @return + * @return */ getMany(startIndex: number): { /** An array of HttpMethod items that start at startIndex in the HttpMethodHeaderValueCollection . */ items: Windows.Web.Http.HttpMethod; /** The number of items retrieved. */ returnValue: number; }; /** @@ -62277,7 +62277,7 @@ declare namespace Windows { /** * Retrieves the index of an HttpMethod in the collection. * @param value The HttpMethod to find in the HttpMethodHeaderValueCollection . - * @return + * @return */ indexOf(value: Windows.Web.Http.HttpMethod): { /** The index of the HttpMethod in the HttpMethodHeaderValueCollection . */ index: number; /** Indicates whether the item is found. */ returnValue: boolean; }; /** @@ -62342,7 +62342,7 @@ declare namespace Windows { /** * Determines whether a string is valid HttpNameValueHeaderValue information. * @param input The string to validate. - * @return + * @return */ static tryParse(input: string): { /** The HttpNameValueHeaderValue version of the string. */ nameValueHeaderValue: Windows.Web.Http.Headers.HttpNameValueHeaderValue; /** true if input is valid HttpNameValueHeaderValue information; otherwise, false. */ returnValue: boolean; }; /** @@ -62372,7 +62372,7 @@ declare namespace Windows { /** * Determines whether a string is valid HttpProductHeaderValue information. * @param input The string to validate. - * @return + * @return */ static tryParse(input: string): { /** The HttpProductHeaderValue version of the string. */ productHeaderValue: Windows.Web.Http.Headers.HttpProductHeaderValue; /** true if input is valid HttpProductHeaderValue information; otherwise, false. */ returnValue: boolean; }; /** @@ -62402,7 +62402,7 @@ declare namespace Windows { /** * Determines whether a string is valid HttpProductInfoHeaderValue information. * @param input The string to validate. - * @return + * @return */ static tryParse(input: string): { /** The HttpProductInfoHeaderValue version of the string. */ productInfoHeaderValue: Windows.Web.Http.Headers.HttpProductInfoHeaderValue; /** true if input is valid HttpProductInfoHeaderValue information; otherwise, false. */ returnValue: boolean; }; /** @@ -62444,7 +62444,7 @@ declare namespace Windows { /** * Retrieves the HttpProductInfoHeaderValue items that start at the specified index in the collection. * @param startIndex The zero-based index of the start of the HttpProductInfoHeaderValue items in the HttpProductInfoHeaderValueCollection . - * @return + * @return */ getMany(startIndex: number): { /** An array of HttpProductInfoHeaderValue items that start at startIndex in the HttpProductInfoHeaderValueCollection . */ items: Windows.Web.Http.Headers.HttpProductInfoHeaderValue; /** The number of items retrieved. */ returnValue: number; }; /** @@ -62461,7 +62461,7 @@ declare namespace Windows { /** * Retrieves the index of an HttpProductInfoHeaderValue in the collection. * @param value The HttpProductInfoHeaderValue to find in the HttpProductInfoHeaderValueCollection . - * @return + * @return */ indexOf(value: Windows.Web.Http.Headers.HttpProductInfoHeaderValue): { /** The index of the HttpProductInfoHeaderValue in the HttpProductInfoHeaderValueCollection . */ index: number; /** Indicates whether the item is found. */ returnValue: boolean; }; /** @@ -62696,7 +62696,7 @@ declare namespace Windows { /** * Determines whether a string is valid HttpTransferCodingHeaderValue information. * @param input The string to validate. - * @return + * @return */ static tryParse(input: string): { /** The HttpTransferCodingHeaderValue version of the string. */ transferCodingHeaderValue: Windows.Web.Http.Headers.HttpTransferCodingHeaderValue; /** true if input is valid HttpTransferCodingHeaderValue information; otherwise, false. */ returnValue: boolean; }; /** @@ -62732,7 +62732,7 @@ declare namespace Windows { /** * Retrieves the HttpTransferCodingHeaderValue items that start at the specified index in the collection. * @param startIndex The zero-based index of the start of the HttpTransferCodingHeaderValue items in the HttpTransferCodingHeaderValueCollection . - * @return + * @return */ getMany(startIndex: number): { /** An array of HttpTransferCodingHeaderValue items that start at startIndex in the HttpTransferCodingHeaderValueCollection . */ items: Windows.Web.Http.Headers.HttpTransferCodingHeaderValue; /** The number of items retrieved. */ returnValue: number; }; /** @@ -62755,7 +62755,7 @@ declare namespace Windows { /** * Retrieves the index of an HttpTransferCodingHeaderValue in the collection. * @param value The HttpTransferCodingHeaderValue to find in the HttpTransferCodingHeaderValueCollection . - * @return + * @return */ indexOf(value: Windows.Web.Http.Headers.HttpTransferCodingHeaderValue): { /** The index of the HttpTransferCodingHeaderValue in the HttpTransferCodingHeaderValueCollection . */ index: number; /** Indicates whether the item is found. */ returnValue: boolean; }; /** @@ -62844,7 +62844,7 @@ declare namespace Windows { readAsStringAsync(): Windows.Foundation.IPromiseWithIAsyncOperationWithProgress; /** * Computes the HttpBufferContent length in bytes. - * @return + * @return */ tryComputeLength(): { /** The length in bytes of the HttpBufferContent . */ length: number; /** true if length is a valid length; otherwise, false. */ returnValue: boolean; }; /** @@ -62979,13 +62979,13 @@ declare namespace Windows { /** * Retrieves the HttpCookie items that start at the specified index in the HttpCookieCollection . * @param startIndex The zero-based index of the start of the HttpCookie items in the HttpCookieCollection . - * @return + * @return */ getMany(startIndex: number): { /** The HttpCookie items that start at startIndex in the HttpCookieCollection . */ items: Windows.Web.Http.HttpCookie; /** The number of HttpCookie items retrieved. */ returnValue: number; }; /** * Retrieves the index of an HttpCookie in the HttpCookieCollection . * @param value The HttpCookie to find in the HttpCookieCollection . - * @return + * @return */ indexOf(value: Windows.Web.Http.HttpCookie): { /** The index of the HttpCookie in the HttpCookieCollection . */ index: number; /** Indicates whether the item is found. */ returnValue: boolean; }; /** Gets the number of cookies in the HttpCookieCollection . */ @@ -63053,7 +63053,7 @@ declare namespace Windows { readAsStringAsync(): Windows.Foundation.IPromiseWithIAsyncOperationWithProgress; /** * Computes the HttpFormUrlEncodedContent length in bytes. - * @return + * @return */ tryComputeLength(): { /** The length in bytes of the HttpFormUrlEncodedContent . */ length: number; /** true if length is a valid length; otherwise, false. */ returnValue: boolean; }; /** @@ -63138,7 +63138,7 @@ declare namespace Windows { readAsStringAsync(): Windows.Foundation.IPromiseWithIAsyncOperationWithProgress; /** * Determines whether the HttpMultipartContent has a valid length in bytes. - * @return + * @return */ tryComputeLength(): { /** The length in bytes of the HttpMultipartContent . */ length: number; /** true if length is a valid length; otherwise, false. */ returnValue: boolean; }; /** @@ -63206,7 +63206,7 @@ declare namespace Windows { readAsStringAsync(): Windows.Foundation.IPromiseWithIAsyncOperationWithProgress; /** * Determines whether the HttpMultipartFormDataContent has a valid length in bytes. - * @return + * @return */ tryComputeLength(): { /** The length in bytes of the HttpMultipartFormDataContent . */ length: number; /** true if length is a valid length; otherwise, false. */ returnValue: boolean; }; /** @@ -63458,7 +63458,7 @@ declare namespace Windows { readAsStringAsync(): Windows.Foundation.IPromiseWithIAsyncOperationWithProgress; /** * Determines whether the HttpStreamContent has a valid length in bytes. - * @return + * @return */ tryComputeLength(): { /** The length in bytes of the HttpStreamContent . */ length: number; /** true if length is a valid length; otherwise, false. */ returnValue: boolean; }; /** @@ -63514,7 +63514,7 @@ declare namespace Windows { readAsStringAsync(): Windows.Foundation.IPromiseWithIAsyncOperationWithProgress; /** * Compute the HttpStringContent length in bytes. - * @return + * @return */ tryComputeLength(): { /** The length in bytes of the HttpStringContent . */ length: number; /** true if length is a valid length; otherwise, false. */ returnValue: boolean; }; /** @@ -63585,7 +63585,7 @@ declare namespace Windows { readAsStringAsync(): Windows.Foundation.IAsyncOperationWithProgress; /** * Determines whether the HTTP content has a valid length in bytes. - * @return + * @return */ tryComputeLength(): { /** The length in bytes of the HTTP content. */ length: number; /** true if length is a valid length; otherwise, false. */ returnValue: boolean; }; /** diff --git a/winrt/winrt.d.ts b/winrt/winrt.d.ts index 63b438fb42..687d7f83d4 100644 --- a/winrt/winrt.d.ts +++ b/winrt/winrt.d.ts @@ -4,16 +4,16 @@ // Definitions: https://github.com/borisyankov/DefinitelyTyped /* ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. 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 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ @@ -11606,12 +11606,12 @@ declare module Windows { * Gets the window (app view) for the current app. **/ static getForCurrentView(): ApplicationView; - + /** * Attempts to unsnap a previously snapped app. This call will only succeed when the app is running in the foreground. **/ static tryUnsnap(): boolean; - + /** * Gets the state of the current app view. **/ @@ -11661,7 +11661,7 @@ declare module Windows { * Gets whether the current window (app view) is adjacent to the left edge of the screen. **/ adjacentToLeftDisplayEdge: number; - + /** * Gets the title bar of the app. **/ @@ -14857,4 +14857,4 @@ declare module Windows.UI.ViewManagement { **/ inactiveForegroundColor: Color; } -} \ No newline at end of file +} From fd9f16f862587bde12e5254e4c1e3d21ae94f9d1 Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Wed, 27 Jan 2016 19:49:29 +0900 Subject: [PATCH 30/65] Remove trailing whitespaces --- winston/winston.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winston/winston.d.ts b/winston/winston.d.ts index 5fecf42018..aa7b0c7cf7 100644 --- a/winston/winston.d.ts +++ b/winston/winston.d.ts @@ -47,7 +47,7 @@ declare module "winston" { export function setLevels(target: any): any; export function cli(): LoggerInstance; export function addRewriter(rewriter: MetadataRewriter): void; - + export interface MetadataRewriter { (level: string, msg: string, meta: any): any; } From fd645a69abe1e3b50d9894fd9367896bbec8b56d Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Wed, 27 Jan 2016 19:50:45 +0900 Subject: [PATCH 31/65] Remove trailing whitespaces --- wiredep/wiredep.d.ts | 744 +++++++++++++++++++++---------------------- 1 file changed, 372 insertions(+), 372 deletions(-) diff --git a/wiredep/wiredep.d.ts b/wiredep/wiredep.d.ts index ec256b47b8..6807c79d2c 100644 --- a/wiredep/wiredep.d.ts +++ b/wiredep/wiredep.d.ts @@ -1,372 +1,372 @@ -// Type definitions for Wiredep v3.0.x -// Project: https://github.com/taptapship/wiredep -// Definitions by: Abraão Alves -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/// - -declare module 'wiredep' { - - interface PathFiles{ - [type: string]: string[]; - } - - /** - * @return {PathFiles} paths to your files by extension - * @example: - * { - * js: [ - * 'paths/to/your/js/files.js', - * 'in/their/order/of/dependency.js' - * ], - * css: [ - * 'paths/to/your/css/files.css' - * ], - * // etc. - * } - */ - function Wiredep(config: WiredepParams): PathFiles; - - module Wiredep { - export function stream(config: WiredepParams): NodeJS.ReadWriteStream; - } - - - interface WiredepParams { - src?: string | string[]; - /** - * the directory of your Bower packages. - * Default: '.bowerrc'.directory || bower_components - */ - directory?: string; - /** - * your bower.json file contents. - * Default: require('./bower.json') - */ - bowerJson?: string; - - - // ----- Advanced Configuration ----- - // All of the below settings are for advanced configuration, to - // give your project support for additional file types and more - // control. - // - // Out of the box, wiredep will handle HTML files just fine for - // JavaScript and CSS injection. - - /** - * path to where we are pretending to be - */ - cwd?: string; - /** - * Default: true - */ - dependencies?: boolean; - /** - * Default: false - */ - devDependencies?: boolean; - /** - * Default: false - */ - includeSelf?: boolean; - /** - * @example: - * [ /jquery/, 'bower_components/modernizr/modernizr.js' ] - */ - exclude?: Array; - - /** - * string or regexp to ignore from the injected filepath - * @example: - * [ /jquery/, 'bower_components/modernizr/modernizr.js' ] - */ - ignorePath?: string | RegExp; - - /** - * This inline object offers another way to define your overrides if - * modifying your project's `bower.json` isn't an option. - */ - overrides?: Object; - - /** - * If not overridden, an error will throw - * - * err.code can be: - * - "PKG_NOT_INSTALLED" (a Bower package was not found) - * - "BOWER_COMPONENTS_MISSING" (cannot find the `bower_components` directory) - */ - onError?: (err: Error) => void; - - /** - * @param {string} filePath name of file that was updated - */ - onFileUpdated?: (filePath: string) => void; - - /** - * @param {FileObject} fileObject - */ - onPathInjected?: (fileObject: FileObject) => void; - - /** - * @param {string} pkg name of bower package without main - */ - onMainNotFound?: (pkg: string) => void; - - fileTypes? : FileTypes; - } - - interface FileObject { - /** - * type of wiredep block ('js', 'css', etc) - */ - block: string; - /** - * name of file that was updated - */ - file: string; - /** - * path to file that was injected - */ - path: string - } - - interface FileTypes { - fileExtension: { - /** - * match the beginning-to-end of a bower block in this type of file - */ - block: RegExp; - detect: { - /** - * match the way this type of file is included - */ - typeOfBowerFile: RegExp; - }; - replace: { - /** - * - */ - typeOfBowerFile: string; - /** - * @exemple: - * return '' - */ - anotherTypeOfBowerFile: (filePath: string) => string; - } - }; - - // defaults: - html: { - /** - * @example: - * /(([ \t]*))(\n|\r|.)*?()/gi - */ - block: RegExp; - - detect: { - /** - * @example: - * /' - */ - js: string; - /** - * @example: - * '' - */ - css: string; - }; - }; - - jade: { - /** - * @example: - * /(([ \t]*)\/\/\s*bower:*(\S*))(\n|\r|.)*?(\/\/\s*endbower)/gi - */ - block: RegExp; - detect: { - /** - * @example: - * /script\(.*src=['"]([^'"]+)/gi - */ - js: RegExp; - /** - * @example: - * /link\(.*href=['"]([^'"]+)/gi - */ - css: RegExp; - }; - - replace: { - /** - * @example: - * 'script(src=\'{{filePath}}\')' - */ - js: string; - /** - * @example: - * 'link(rel=\'stylesheet\', href=\'{{filePath}}\')' - */ - css: string; - } - }; - - less: { - /** - * @example: - * /(([ \t]*)\/\/\s*bower:*(\S*))(\n|\r|.)*?(\/\/\s*endbower)/gi - */ - block: RegExp; - detect: { - /** - * @example: - * /@import\s['"](.+css)['"]/gi - */ - css: RegExp; - /** - * @example: - * /@import\s['"](.+less)['"]/gi - */ - less: RegExp - }; - - replace: { - /** - * @example: - * '@import "{{filePath}}";' - */ - css: string; - /** - * @example: - * '@import "{{filePath}}";' - */ - less: string; - }; - }; - - scss: { - /** - * @example: - * /(([ \t]*)\/\/\s*bower:*(\S*))(\n|\r|.)*?(\/\/\s*endbower)/gi - */ - block: RegExp; - detect: { - /** - * @example: - * /@import\s['"](.+css)['"]/gi - */ - css: RegExp; - /** - * @example: - * /@import\s['"](.+sass)['"]/gi - */ - sass: RegExp; - /** - * @example: - * /@import\s['"](.+scss)['"]/gi - */ - scss: RegExp; - }, - replace: { - /** - * @example: - * '@import "{{filePath}}";' - */ - css: string; - /** - * @example: - * '@import "{{filePath}}";' - */ - sass: string; - /** - * @example: - * '@import "{{filePath}}";' - */ - scss: string; - } - }; - - styl: { - /** - * @example: - * /(([ \t]*)\/\/\s*bower:*(\S*))(\n|\r|.)*?(\/\/\s*endbower)/gi - */ - block: RegExp; - - detect: { - /** - * @example: - * /@import\s['"](.+css)['"]/gi - */ - css: RegExp; - /** - * @example: - * /@import\s['"](.+styl)['"]/gi - */ - styl: RegExp; - }; - replace: { - /** - * @example: - * '@import "{{filePath}}"' - */ - css: string; - /** - * @example: - * '@import "{{filePath}}"' - */ - styl: string; - }; - }; - - yaml: { - /** - * @example: - * /(([ \t]*)#\s*bower:*(\S*))(\n|\r|.)*?(#\s*endbower)/gi - */ - block: RegExp; - - detect: { - /** - * @example: - * /-\s(.+js)/gi - */ - js: RegExp; - /** - * @example: - * /-\s(.+css)/gi - */ - css: RegExp; - }; - - replace: { - /** - * @example: - * '- {{filePath}}' - */ - js: string; - /** - * @example: - * '- {{filePath}}' - */ - css: string; - }; - }; - } - - -export = Wiredep; -} \ No newline at end of file +// Type definitions for Wiredep v3.0.x +// Project: https://github.com/taptapship/wiredep +// Definitions by: Abraão Alves +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module 'wiredep' { + + interface PathFiles{ + [type: string]: string[]; + } + + /** + * @return {PathFiles} paths to your files by extension + * @example: + * { + * js: [ + * 'paths/to/your/js/files.js', + * 'in/their/order/of/dependency.js' + * ], + * css: [ + * 'paths/to/your/css/files.css' + * ], + * // etc. + * } + */ + function Wiredep(config: WiredepParams): PathFiles; + + module Wiredep { + export function stream(config: WiredepParams): NodeJS.ReadWriteStream; + } + + + interface WiredepParams { + src?: string | string[]; + /** + * the directory of your Bower packages. + * Default: '.bowerrc'.directory || bower_components + */ + directory?: string; + /** + * your bower.json file contents. + * Default: require('./bower.json') + */ + bowerJson?: string; + + + // ----- Advanced Configuration ----- + // All of the below settings are for advanced configuration, to + // give your project support for additional file types and more + // control. + // + // Out of the box, wiredep will handle HTML files just fine for + // JavaScript and CSS injection. + + /** + * path to where we are pretending to be + */ + cwd?: string; + /** + * Default: true + */ + dependencies?: boolean; + /** + * Default: false + */ + devDependencies?: boolean; + /** + * Default: false + */ + includeSelf?: boolean; + /** + * @example: + * [ /jquery/, 'bower_components/modernizr/modernizr.js' ] + */ + exclude?: Array; + + /** + * string or regexp to ignore from the injected filepath + * @example: + * [ /jquery/, 'bower_components/modernizr/modernizr.js' ] + */ + ignorePath?: string | RegExp; + + /** + * This inline object offers another way to define your overrides if + * modifying your project's `bower.json` isn't an option. + */ + overrides?: Object; + + /** + * If not overridden, an error will throw + * + * err.code can be: + * - "PKG_NOT_INSTALLED" (a Bower package was not found) + * - "BOWER_COMPONENTS_MISSING" (cannot find the `bower_components` directory) + */ + onError?: (err: Error) => void; + + /** + * @param {string} filePath name of file that was updated + */ + onFileUpdated?: (filePath: string) => void; + + /** + * @param {FileObject} fileObject + */ + onPathInjected?: (fileObject: FileObject) => void; + + /** + * @param {string} pkg name of bower package without main + */ + onMainNotFound?: (pkg: string) => void; + + fileTypes? : FileTypes; + } + + interface FileObject { + /** + * type of wiredep block ('js', 'css', etc) + */ + block: string; + /** + * name of file that was updated + */ + file: string; + /** + * path to file that was injected + */ + path: string + } + + interface FileTypes { + fileExtension: { + /** + * match the beginning-to-end of a bower block in this type of file + */ + block: RegExp; + detect: { + /** + * match the way this type of file is included + */ + typeOfBowerFile: RegExp; + }; + replace: { + /** + * + */ + typeOfBowerFile: string; + /** + * @exemple: + * return '' + */ + anotherTypeOfBowerFile: (filePath: string) => string; + } + }; + + // defaults: + html: { + /** + * @example: + * /(([ \t]*))(\n|\r|.)*?()/gi + */ + block: RegExp; + + detect: { + /** + * @example: + * /' + */ + js: string; + /** + * @example: + * '' + */ + css: string; + }; + }; + + jade: { + /** + * @example: + * /(([ \t]*)\/\/\s*bower:*(\S*))(\n|\r|.)*?(\/\/\s*endbower)/gi + */ + block: RegExp; + detect: { + /** + * @example: + * /script\(.*src=['"]([^'"]+)/gi + */ + js: RegExp; + /** + * @example: + * /link\(.*href=['"]([^'"]+)/gi + */ + css: RegExp; + }; + + replace: { + /** + * @example: + * 'script(src=\'{{filePath}}\')' + */ + js: string; + /** + * @example: + * 'link(rel=\'stylesheet\', href=\'{{filePath}}\')' + */ + css: string; + } + }; + + less: { + /** + * @example: + * /(([ \t]*)\/\/\s*bower:*(\S*))(\n|\r|.)*?(\/\/\s*endbower)/gi + */ + block: RegExp; + detect: { + /** + * @example: + * /@import\s['"](.+css)['"]/gi + */ + css: RegExp; + /** + * @example: + * /@import\s['"](.+less)['"]/gi + */ + less: RegExp + }; + + replace: { + /** + * @example: + * '@import "{{filePath}}";' + */ + css: string; + /** + * @example: + * '@import "{{filePath}}";' + */ + less: string; + }; + }; + + scss: { + /** + * @example: + * /(([ \t]*)\/\/\s*bower:*(\S*))(\n|\r|.)*?(\/\/\s*endbower)/gi + */ + block: RegExp; + detect: { + /** + * @example: + * /@import\s['"](.+css)['"]/gi + */ + css: RegExp; + /** + * @example: + * /@import\s['"](.+sass)['"]/gi + */ + sass: RegExp; + /** + * @example: + * /@import\s['"](.+scss)['"]/gi + */ + scss: RegExp; + }, + replace: { + /** + * @example: + * '@import "{{filePath}}";' + */ + css: string; + /** + * @example: + * '@import "{{filePath}}";' + */ + sass: string; + /** + * @example: + * '@import "{{filePath}}";' + */ + scss: string; + } + }; + + styl: { + /** + * @example: + * /(([ \t]*)\/\/\s*bower:*(\S*))(\n|\r|.)*?(\/\/\s*endbower)/gi + */ + block: RegExp; + + detect: { + /** + * @example: + * /@import\s['"](.+css)['"]/gi + */ + css: RegExp; + /** + * @example: + * /@import\s['"](.+styl)['"]/gi + */ + styl: RegExp; + }; + replace: { + /** + * @example: + * '@import "{{filePath}}"' + */ + css: string; + /** + * @example: + * '@import "{{filePath}}"' + */ + styl: string; + }; + }; + + yaml: { + /** + * @example: + * /(([ \t]*)#\s*bower:*(\S*))(\n|\r|.)*?(#\s*endbower)/gi + */ + block: RegExp; + + detect: { + /** + * @example: + * /-\s(.+js)/gi + */ + js: RegExp; + /** + * @example: + * /-\s(.+css)/gi + */ + css: RegExp; + }; + + replace: { + /** + * @example: + * '- {{filePath}}' + */ + js: string; + /** + * @example: + * '- {{filePath}}' + */ + css: string; + }; + }; + } + + +export = Wiredep; +} From ea10ebfa5775e7f85cd6947094dca185d7b3d33e Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Wed, 27 Jan 2016 19:53:06 +0900 Subject: [PATCH 32/65] Remove trailing whitespaces --- ws/ws.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ws/ws.d.ts b/ws/ws.d.ts index 321e0ec966..a4adfaf5d8 100644 --- a/ws/ws.d.ts +++ b/ws/ws.d.ts @@ -76,7 +76,7 @@ declare module "ws" { on(event: 'pong', cb: (data: any, flags: {binary: boolean}) => void): WebSocket; on(event: 'open', cb: () => void): WebSocket; on(event: string, listener: () => void): WebSocket; - + addListener(event: 'error', cb: (err: Error) => void): WebSocket; addListener(event: 'close', cb: (code: number, message: string) => void): WebSocket; addListener(event: 'message', cb: (data: any, flags: {binary: boolean}) => void): WebSocket; @@ -119,7 +119,7 @@ declare module "ws" { on(event: 'headers', cb: (headers: string[]) => void): Server; on(event: 'connection', cb: (client: WebSocket) => void): Server; on(event: string, listener: () => void): Server; - + addListener(event: 'error', cb: (err: Error) => void): Server; addListener(event: 'headers', cb: (headers: string[]) => void): Server; addListener(event: 'connection', cb: (client: WebSocket) => void): Server; From 8772519c05164c715d0a0c4ca5637c5be993b167 Mon Sep 17 00:00:00 2001 From: Josua Meier Date: Wed, 27 Jan 2016 11:55:23 +0100 Subject: [PATCH 33/65] Fix Typo in google.maps.d.ts --- googlemaps/google.maps.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/googlemaps/google.maps.d.ts b/googlemaps/google.maps.d.ts index 699115473b..82a13d9122 100644 --- a/googlemaps/google.maps.d.ts +++ b/googlemaps/google.maps.d.ts @@ -353,7 +353,7 @@ declare module google.maps { setDraggable(flag: boolean): void; setIcon(icon: string|Icon|Symbol): void; setMap(map: Map|StreetViewPanorama): void; - getOpacity(opacity: number): void; + setOpacity(opacity: number): void; setOptions(options: MarkerOptions): void; setPlace(place: Place): void; setPosition(latlng: LatLng|LatLngLiteral): void; From a72556dd7d61a9d302b2bc8e0a60581171b8ee50 Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Wed, 27 Jan 2016 19:56:25 +0900 Subject: [PATCH 34/65] Remove trailing whitespaces --- wordcloud/wordcloud.d.ts | 62 ++++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/wordcloud/wordcloud.d.ts b/wordcloud/wordcloud.d.ts index 61c7003a45..4b3e8b6697 100644 --- a/wordcloud/wordcloud.d.ts +++ b/wordcloud/wordcloud.d.ts @@ -8,21 +8,21 @@ declare function WordCloud(elements: HTMLElement | HTMLElement[], options: WordC declare namespace WordCloud { var isSupported: boolean; var miniumFontSize: number; - + interface Options { - /** - * List of words/text to paint on the canvas in a 2-d array, in the form of [word, size], - * e.g. [['foo', 12] , ['bar', 6]]. + /** + * List of words/text to paint on the canvas in a 2-d array, in the form of [word, size], + * e.g. [['foo', 12] , ['bar', 6]]. */ list?: Array | any[]; /** font to use. */ fontFamily?: string; /** font weight to use, e.g. normal, bold or 600 */ fontWeight?: string | number; - /** - * color of the text, can be any CSS color, or a callback(word, weight, fontSize, distance, theta) - * specifies different color for each item in the list. You may also specify colors with built-in - * keywords: random-dark and random-light. + /** + * color of the text, can be any CSS color, or a callback(word, weight, fontSize, distance, theta) + * specifies different color for each item in the list. You may also specify colors with built-in + * keywords: random-dark and random-light. */ color?: string | ((word: string, weight: string | number, fontSize: number, distance: number, theta: number) => string); /** minimum font size to draw on the canvas. */ @@ -33,73 +33,73 @@ declare namespace WordCloud { clearCanvas?: boolean; /** color of the background. */ backgroundColor?: string; - - /** - * size of the grid in pixels for marking the availability of the canvas — the larger the grid size, - * the bigger the gap between words. + + /** + * size of the grid in pixels for marking the availability of the canvas — the larger the grid size, + * the bigger the gap between words. */ gridSize?: number; /** origin of the “cloud” in [x, y]. */ origin?: [number, number]; - + /** visualize the grid by draw squares to mask the drawn areas. */ drawMask?: boolean; /** color of the mask squares. */ maskColor?: string; /** width of the gaps between mask squares. */ maskGapWidth?: number; - + /** Wait for x milliseconds before start drawn the next item using setTimeout. */ wait?: number; /** If the call with in the loop takes more than x milliseconds (and blocks the browser), abort immediately. */ abortThreshold?: number; /** callback function to call when abort. */ abort?: Function; - + /** If the word should rotate, the minimum rotation (in rad) the text should rotate. */ minRotation?: number; - /** - * If the word should rotate, the maximum rotation (in rad) the text should rotate. Set the two value equal - * to keep all text in one angle. + /** + * If the word should rotate, the maximum rotation (in rad) the text should rotate. Set the two value equal + * to keep all text in one angle. */ maxRotation?: number; - + /** Shuffle the points to draw so the result will be different each time for the same list and settings. */ shuffle?: boolean; /** Probability for the word to rotate. Set the number to 1 to always rotate. */ rotateRatio?: number; - - /** + + /** * The shape of the "cloud" to draw. Can be any polar equation represented as a callback function, or a * keyword present. Available presents are circle (default), cardioid (apple or heart shape curve, the most * known polar equation), diamond (alias of square), triangle-forward, triangle, (alias of triangle-upright, - * pentagon, and star. + * pentagon, and star. */ shape?: string | ((theta: number) => number); /** degree of "flatness" of the shape wordcloud2.js should draw. */ ellipticity?: number; - - /** + + /** * callback to call when the cursor enters or leaves a region occupied by a word. The callback will take * arugments callback(item, dimension, event), where event is the original mousemove event. This only will work - * on HTML5 canvas word clouds. + * on HTML5 canvas word clouds. */ hover?: EventCallback; - /** - * callback to call when the user clicks on a word. The callback will take arugments + /** + * callback to call when the user clicks on a word. The callback will take arugments * callback(item, dimension, event), where event is the original click event. This only will work on HTML5 - * canvas word clouds. + * canvas word clouds. */ click?: EventCallback; } - + interface Dimension { x: number; y: number; w: number; h: number; } - + type ListEntry = [string, number]; type EventCallback = (item: ListEntry, dimension: Dimension, event: MouseEvent) => void; -} \ No newline at end of file +} From 57c1547719b1b195f3bb4b71eea064c6c3802abf Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Wed, 27 Jan 2016 19:57:21 +0900 Subject: [PATCH 35/65] Remove trailing whitespaces --- wnumb/wnumb.d.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/wnumb/wnumb.d.ts b/wnumb/wnumb.d.ts index d3645768c8..4aad29b3a8 100644 --- a/wnumb/wnumb.d.ts +++ b/wnumb/wnumb.d.ts @@ -10,7 +10,7 @@ interface wNumbOptions { */ decimals?: number; /** - * The decimal separator. + * The decimal separator. * Defaults to '.' if thousand isn't already set to '.'. */ mark?: string; @@ -35,7 +35,7 @@ interface wNumbOptions { */ negativeBefore?: string; /**This is a powerful option to manually modify the slider output. - * + * *For example, to show a number in another currency: * function( value ){ * return value * 1.32; @@ -43,7 +43,7 @@ interface wNumbOptions { */ encoder?: (value: number) => number; /** - * Reverse the operations set in encoder. + * Reverse the operations set in encoder. * Use this option to undo modifications made while encoding the value. * function( value ){ * return value / 1.32; @@ -59,22 +59,22 @@ interface wNumbOptions { * Applied before all other formatting options are applied. */ undo?: (value: number) => number; -} +} interface wNumb { /** - * Create a wNumb - * + * Create a wNumb + * * @param options - the options */ (options?: wNumbOptions): wNumbInstance; } interface wNumbInstance { - - - + + + /** * format to string */ @@ -83,4 +83,4 @@ interface wNumbInstance { * get number from formatted string */ from(val: string): number; -} \ No newline at end of file +} From 94e9eb1be47e62b2940b6b1e50a03d3753ec1ec4 Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Wed, 27 Jan 2016 20:06:53 +0900 Subject: [PATCH 36/65] Remove trailing whitespaces --- valerie/valerie-tests.ts | 2 +- valerie/valerie.d.ts | 12 +- vec3/vec3.d.ts | 4 +- vega/vega.d.ts | 6 +- vexflow/vexflow.d.ts | 254 +++++++++---------- videojs/videojs-tests.ts | 2 +- videojs/videojs.d.ts | 4 +- voximplant-websdk/voximplant-websdk-tests.ts | 2 +- voximplant-websdk/voximplant-websdk.d.ts | 122 ++++----- vso-node-api/vso-node-api-tests.ts | 8 +- vue/vue-tests.ts | 10 +- vue/vue.d.ts | 32 +-- 12 files changed, 229 insertions(+), 229 deletions(-) diff --git a/valerie/valerie-tests.ts b/valerie/valerie-tests.ts index b33932e290..6657682eed 100644 --- a/valerie/valerie-tests.ts +++ b/valerie/valerie-tests.ts @@ -294,7 +294,7 @@ function ModelValidation() { var validatedModel = valerie.validatableModel(model) .validateAll() .end(); - + } function UtilsStaticTests() { diff --git a/valerie/valerie.d.ts b/valerie/valerie.d.ts index abe5aea281..d08b18c752 100644 --- a/valerie/valerie.d.ts +++ b/valerie/valerie.d.ts @@ -255,7 +255,7 @@ declare module Valerie { /* //TODO: additional namespaces/statics not yet used - dom: DomStatic; + dom: DomStatic; formatting: FormattingStatic; koBindingsHelper: KoBindingsHelperStatic; koExtras: KoExtrasStatic; @@ -278,7 +278,7 @@ declare module Valerie { // Contains converters, always singletons. interface ConvertersStatic { - + //TODO: other converters to be added passThrough: Valerie.IConverter; @@ -365,19 +365,19 @@ declare module Valerie { */ clearSummary(valueOrFunction: any): ModelValidationState; - /*** + /*** * Gets whether the model has failed validation. * @return {boolean} */ failed(): boolean; - /*** + /*** * Gets the validation states that belong to the model that are in a failure state. * @return {Valerie.IValidationState[]} */ failedStates(): Valerie.IValidationState[]; - /*** + /*** * Gets the name of the model. * @return {string} */ @@ -387,7 +387,7 @@ declare module Valerie { message(): string; passed(): boolean; - /*** + /*** * Gets or sets whether the computation that updates the validation result has been paused. * @param {boolean} [value = false] true if the computation should be paused, false if the computation should not be paused * @return {boolean} true if computation is paused, false otherwise diff --git a/vec3/vec3.d.ts b/vec3/vec3.d.ts index 29bac0c561..28cb46c3ec 100644 --- a/vec3/vec3.d.ts +++ b/vec3/vec3.d.ts @@ -9,7 +9,7 @@ declare module "vec3" { constructor(location: number[]); constructor(location: {x: number; y: number; z: number}); constructor(locationStr: string); - + set(x: number, y: number, z: number): Vec3; update(other: Vec3): Vec3; floored(): Vec3; @@ -31,4 +31,4 @@ declare module "vec3" { min(other: Vec3): Vec3; max(other: Vec3): Vec3; } -} \ No newline at end of file +} diff --git a/vega/vega.d.ts b/vega/vega.d.ts index 4441cceaeb..80c91149a6 100644 --- a/vega/vega.d.ts +++ b/vega/vega.d.ts @@ -65,7 +65,7 @@ declare namespace Vega { props?: string; items?: any; duration?: number; - ease?: string; + ease?: string; } export interface Bounds { @@ -518,7 +518,7 @@ declare namespace vg { export namespace scene { export function item(mark: Vega.Node): Vega.Node; } - + export class Bounds implements Vega.Bounds { x1: number; y1: number; @@ -540,4 +540,4 @@ declare namespace vg { } // TODO: classes for View, Model, etc. -} \ No newline at end of file +} diff --git a/vexflow/vexflow.d.ts b/vexflow/vexflow.d.ts index c17e96576e..5c304fa307 100644 --- a/vexflow/vexflow.d.ts +++ b/vexflow/vexflow.d.ts @@ -4,10 +4,10 @@ // Definitions: https://github.com/borisyankov/DefinitelyTyped //inconsistent namespace: this is a helper funtion from tables.js and should not pollute the global namespace! -declare function sanitizeDuration(duration : string) : string; +declare function sanitizeDuration(duration : string) : string; declare namespace Vex { - + function L(block : string, args : any[]) : void; function Merge(destination : T, source : Object) : T; function Min(a : number, b : number) : number; @@ -20,15 +20,15 @@ declare namespace Vex { function drawDot(ctx : IRenderContext, x : number, y : number, color? : string) : void; function BM(s : number, f : Function) : void; function Inherit(child : T, parent : Object, object : Object) : T; - + class RuntimeError { constructor(code : string, message : string); } - + class RERR { constructor(code : string, message : string); } - + /** * Helper interface for handling the different rendering contexts (i.e. CanvasContext, RaphaelContext, SVGContext). Not part of VexFlow! */ @@ -61,13 +61,13 @@ declare namespace Vex { fillText(text : string, x : number, y : number) : IRenderContext; save() : IRenderContext; restore() : IRenderContext; - + /** * canvas returns TextMetrics, SVG returns SVGRect, Raphael returns {width : number, height : number}. Only width is used throughout VexFlow. */ measureText(text : string) : {width : number}; } - + /** * Helper interface for handling the Vex.Flow.Font object in Vex.Flow.Glyph. Not part of VexFlow! */ @@ -83,17 +83,17 @@ declare namespace Vex { familyName : string; lineHeight : number; underlineThickness : number; - + /** * This property is missing in vexflow_font.js, but present in gonville_original.js and gonville_all.js. */ original_font_information? : {postscript_name : string, version_string : string, vendor_url : string, full_font_name : string, font_family_name : string, copyright : string, description : string, trademark : string, designer : string, designer_url : string, unique_font_identifier : string, license_url : string, license_description : string, manufacturer_name : string, font_sub_family_name : string}; } - + namespace Flow { - + const RESOLUTION : number; - + // from tables.js: const STEM_WIDTH : number; const STEM_HEIGHT : number; @@ -115,10 +115,10 @@ declare namespace Vex { function durationToNumber(duration : string) : number; function durationToTicks(duration : string) : number; function durationToGlyph(duration : string, type : string) : {head_width : number, stem : boolean, stem_offset : number, flag : boolean, stem_up_extension : number, stem_down_extension : number, gracenote_stem_up_extension : number, gracenote_stem_down_extension : number, tabnote_stem_up_extension : number, tabnote_stem_down_extension : number, dot_shiftY : number, line_above : number, line_below : number, code_head? : string, rest? : boolean, position? : string}; - + // from glyph.js: function renderGlyph(ctx : IRenderContext, x_pos : number, y_pos : number, point : number, val : string, nocache : boolean) : void; - + // from vexflow_font.js / gonville_original.js / gonville_all.js var Font : { glyphs : {x_min : number, x_max : number, ha : number, o : string[]}[]; @@ -132,15 +132,15 @@ declare namespace Vex { familyName : string; lineHeight : number; underlineThickness : number; - + //inconsistent member : this is missing in vexflow_font.js, but present in gonville_original.js and gonville_all.js original_font_information : {postscript_name : string, version_string : string, vendor_url : string, full_font_name : string, font_family_name : string, copyright : string, description : string, trademark : string, designer : string, designer_url : string, unique_font_identifier : string, license_url : string, license_description : string, manufacturer_name : string, font_sub_family_name : string}; } - + class Accidental extends Modifier { //TODO remove the following lines once TypeScript allows subclass overrides with type changes setNote(note : Note) : Modifier; - + constructor(type : string); static DEBUG : boolean; static format(accidentals : Accidental[], state : {left_shift : number, right_shift : number, text_line : number}) : void; @@ -149,11 +149,11 @@ declare namespace Vex { draw() : void; static applyAccidentals(voices : Voice[], keySignature? : string) : void; } - + namespace Accidental { const CATEGORY : string; } - + class Annotation extends Modifier { constructor(text : string); static DEBUG : boolean; @@ -165,24 +165,24 @@ declare namespace Vex { setJustification(justification : Annotation.Justify) : Annotation; draw() : void; } - + namespace Annotation { const enum Justify {LEFT, CENTER, RIGHT, CENTER_STEM} const enum VerticalJustify {TOP, CENTER, BOTTOM, CENTER_STEM} const CATEGORY : string; } - + class Articulation extends Modifier { constructor(type : string); static DEBUG : boolean; static format(articulations : Articulation[], state : {left_shift : number, right_shift : number, text_line : number}) : boolean; draw() : void; } - + namespace Articulation { const CATEGORY : string; } - + class BarNote extends Note { static DEBUG : boolean; getType() : Barline.type; @@ -192,11 +192,11 @@ declare namespace Vex { preFormat() : BarNote; draw() : void; } - + namespace Barline { const enum type {SINGLE, DOUBLE, END, REPEAT_BEGIN, REPEAT_END, REPEAT_BOTH, NONE} } - + class Barline extends StaveModifier { constructor(type : Barline.type, x : number); getCategory() : string; @@ -206,7 +206,7 @@ declare namespace Vex { drawVerticalEndBar(stave : Stave, x : number) : void; drawRepeatBar(stave : Stave, x : number, begin : boolean) : void; } - + class Beam { constructor(notes : StemmableNote[], auto_stem? : boolean); setContext(context : IRenderContext) : Beam; @@ -227,7 +227,7 @@ declare namespace Vex { static applyAndGetBeams(voice : Voice, stem_direction : number, groups : Fraction[]) : Beam[]; static generateBeams(notes : StemmableNote[], config? : {groups? : Fraction[], stem_direction? : number, beam_rests? : boolean, beam_middle_only? : boolean, show_stemlets? : boolean, maintain_stem_directions? : boolean}) : Beam[]; } - + class Bend extends Modifier { constructor(text : string, release? : boolean, phrase? : {type : number, text : string, width : number}[]); static UP : number; @@ -239,11 +239,11 @@ declare namespace Vex { updateWidth() : Bend; draw() : void; } - + namespace Bend { const CATEGORY : string; } - + class BoundingBox { constructor(x : number, y : number, w : number, h : number); static copy(that : BoundingBox) : BoundingBox; @@ -260,7 +260,7 @@ declare namespace Vex { mergeWith(boundingBox : BoundingBox, ctx? : IRenderContext) : BoundingBox; draw(ctx : IRenderContext, x : number, y : number) : void; } - + class CanvasContext implements IRenderContext { //TODO remove the following lines once TypeScript allows subclass overrides with type changes or type inconsistencies mentioned below are fixed setLineDash(dash : string) : CanvasContext; @@ -281,7 +281,7 @@ declare namespace Vex { fillText(text : string, x : number, y : number) : CanvasContext; save() : CanvasContext; restore() : CanvasContext; - + constructor(context : CanvasRenderingContext2D); static WIDTH : number; static HEIGHT : number; @@ -295,7 +295,7 @@ declare namespace Vex { setShadowBlur(blur : string) : CanvasContext; setLineWidth(width : number) : CanvasContext; setLineCap(cap_type : string) : CanvasContext; - + //inconsistent type: void -> CanvasContext setLineDash(dash : string) : void; scale(x : number, y : number) : void; @@ -317,22 +317,22 @@ declare namespace Vex { save() : void; restore() : void; } - + class Clef extends StaveModifier { //TODO remove the following lines once TypeScript allows subclass overrides with type changes addModifier() : void; addEndModifier() : void; - + constructor(clef : string, size? : string, annotation? : string); static DEBUG : boolean; addModifier(stave : Stave) : void; addEndModifier(stave : Stave) : void; } - + class ClefNote extends Note { //TODO remove the following lines once TypeScript allows subclass overrides with type changes setStave(stave : Stave) : Note; - + constructor(clef : string, size? : string, annotation? : string); setClef(clef : string, size? : string, annotation? : string) : ClefNote; getClef() : string; @@ -343,7 +343,7 @@ declare namespace Vex { preFormat() : ClefNote; draw() : void; } - + class Crescendo extends Note { constructor(note_struct : {duration : number, line? : number}); static DEBUG : boolean; @@ -353,7 +353,7 @@ declare namespace Vex { preFormat() : Crescendo; draw() : void; } - + class Curve { constructor(from : Note, to : Note, options? : {spacing? : number, thickness? : number, x_shift? : number, y_shift : number, position : Curve.Position, invert : boolean, cps? : {x : number, y : number}[]}); static DEBUG : boolean; @@ -363,28 +363,28 @@ declare namespace Vex { renderCurve(params : {first_x : number, first_y : number, last_x : number, last_y : number, direction : number}) : void; draw() : boolean; } - + namespace Curve { const enum Position {NEAR_HEAD, NEAR_TOP} } - + class Dot extends Modifier { //TODO remove the following lines once TypeScript allows subclass overrides with type changes or type inconsistencies mentioned below are fixed setNote(note : Note) : Dot; - + static format(dots : number, state : {left_shift : number, right_shift : number, text_line : number}) : void; setNote(note : Note) : void; //inconsistent type: void -> Dot setDotShiftY(y : number) : Dot; draw() : void; } - + namespace Dot { const CATEGORY : string; } - + class Formatter { static DEBUG : boolean; - static FormatAndDraw(ctx : IRenderContext, stave : Stave, notes : Note[], params? : {auto_beam : boolean, align_rests : boolean}) : BoundingBox; + static FormatAndDraw(ctx : IRenderContext, stave : Stave, notes : Note[], params? : {auto_beam : boolean, align_rests : boolean}) : BoundingBox; static FormatAndDraw(ctx : IRenderContext, stave : Stave, notes : Note[], params? : boolean) : BoundingBox; static FormatAndDrawTab(ctx : IRenderContext, tabstave : TabStave, stave : Stave, tabnotes : TabNote[], notes : Note[], autobeam? : boolean, params? : {auto_beam : boolean, align_rests : boolean}) : void; static FormatAndDrawTab(ctx : IRenderContext, tabstave : TabStave, stave : Stave, tabnotes : TabNote[], notes : Note[], autobeam? : boolean, params? : boolean) : void; @@ -400,7 +400,7 @@ declare namespace Vex { format(voices : Voice[], justifyWidth : number, options? : {align_rests? : boolean, context : IRenderContext}) : Formatter; formatToStave(voices : Voice[], stave : Stave, options? : {align_rests? : boolean, context : IRenderContext}) : Formatter; } - + class Fraction { constructor(numerator : number, denominator : number); static GCD(a : number, b : number) : number; @@ -432,7 +432,7 @@ declare namespace Vex { toMixedString() : string; parse(str : string) : Fraction; } - + class FretHandFinger extends Modifier { constructor(number : number); static format(nums : FretHandFinger[], state : {left_shift : number, right_shift : number, text_line : number}) : void; @@ -447,15 +447,15 @@ declare namespace Vex { setOffsetY(y : number) : FretHandFinger; draw() : void; } - + namespace FretHandFinger { const CATEGORY : string; } - + class GhostNote extends StemmableNote { //TODO remove the following lines once TypeScript allows subclass overrides with type changes or type inconsistencies mentioned below are fixed setStave(stave : Stave) : Note; - + constructor(duration : string); constructor(note_struct : {type? : string, dots? : number, duration : string}); //inconsistent name : init struct is called 'duration', should be 'params'/'options' (may be string or Object) isRest() : boolean; @@ -464,7 +464,7 @@ declare namespace Vex { preFormat() : GhostNote; draw() : void; } - + class Glyph { constructor(code : string, point : number, options? : {cache? : boolean, font? : IFont}); setOptions(options : {cache? : boolean, font? : IFont}) : void; @@ -481,19 +481,19 @@ declare namespace Vex { static loadMetrics(font : IFont, code : string, cache : boolean) : {x_min : number, x_max : number, ha : number, outline : number[]}; static renderOutline(ctx : IRenderContext, outline : number[], scale : number, x_pos : number, y_pos : number) : void; } - + class GraceNote extends StaveNote { constructor(note_struct : {slash? : boolean, type? : string, dots? : number, duration : string, clef? : string, keys : string[], octave_shift? : number, auto_stem? : boolean, stem_direction? : number}); getStemExtension() : number; getCategory() : string; draw() : void; } - + class GraceNoteGroup extends Modifier { //TODO remove the following lines once TypeScript allows subclass overrides with type changes or type inconsistencies mentioned below are fixed setWidth(width : number) : Modifier; setNote(note : StaveNote) : Modifier; - + constructor(grace_notes : GraceNote[], show_slur? : boolean); //inconsistent name: 'show_slur' is called 'config', suggesting object (is boolean) static DEBUG : boolean; static format(gracenote_groups : GraceNoteGroup[], state : {left_shift : number, right_shift : number, text_line : number}) : boolean; @@ -505,11 +505,11 @@ declare namespace Vex { setXShift(x_shift : number) : void; draw() : void; } - + namespace GraceNoteGroup { const CATEGORY : string; } - + class KeyManager { constructor(key : string); setKey(key : string) : KeyManager; @@ -518,11 +518,11 @@ declare namespace Vex { getAccidental(key : string) : {note : string, accidental : string}; selectNote(note : string) : {note : string, accidental : string, change : boolean}; } - + class KeySignature extends StaveModifier { //TODO remove the following lines once TypeScript allows subclass overrides with type changes addModifier() : void; - + constructor(key_spec : string); addAccToStave(stave : Stave, acc : {type : string, line : number}, next? : {type : string, line : number}) : void; cancelKey(spec : string) : KeySignature; @@ -530,7 +530,7 @@ declare namespace Vex { addToStave(stave : Stave, firstGlyph? : boolean) : KeySignature; convertAccLines(clef : string, type : string) : void; } - + class Modifier { static DEBUG : boolean; getCategory() : string; @@ -551,12 +551,12 @@ declare namespace Vex { setXShift(x : number) : void; //inconsistent type: void -> Modifier draw() : void; } - + namespace Modifier { const enum Position {LEFT, RIGHT, ABOVE, BELOW} const CATEGORY : string } - + class ModifierContext { static DEBUG : boolean; addModifier(modifier : Modifier) : ModifierContext; @@ -569,7 +569,7 @@ declare namespace Vex { preFormat() : void; postFormat() : void; } - + class Music { isValidNoteValue(note : number) : boolean; isValidIntervalValue(interval : number) : boolean; @@ -585,7 +585,7 @@ declare namespace Vex { getIntervalBetween(note1 : number, note2 : number, direction? : number) : number; createScaleMap(keySignature : string) : {[rootName : string] : string}; } - + namespace Music { const NUM_TONES : number; const roots : string[]; @@ -599,7 +599,7 @@ declare namespace Vex { const accidentals : string[]; const noteValues : {[value : string] : {root_index : number, int_val : number}}; } - + class Note implements Tickable { //from tickable interface: getTicks() : Fraction; @@ -616,7 +616,7 @@ declare namespace Vex { getTickMultiplier() : Fraction; applyTickMultiplier(numerator : number, denominator : number) : void; setDuration(duration : Fraction) : void; - + constructor(note_struct : {type? : string, dots? : number, duration : string}); getPlayNote() : any; setPlayNote(note : any) : Note; @@ -659,11 +659,11 @@ declare namespace Vex { getAbsoluteX() : number; setPreFormatted(value : boolean) : void; } - + namespace Note { const CATEGORY : string; } - + class NoteHead extends Note { constructor(head_options : {x? : number, y? : number, note_type? : string, duration : string, displaced? : boolean, stem_direction? : number, line : number, x_shift : number, custom_glyph_code? : string, style? : string, slashed? : boolean, glyph_font_scale? : number}); static DEBUG : boolean; @@ -686,7 +686,7 @@ declare namespace Vex { preFormat() : NoteHead; draw() : void; } - + class Ornament extends Modifier { constructor(type : string); static DEBUG : boolean; @@ -696,11 +696,11 @@ declare namespace Vex { setLowerAccidental(acc : string) : Ornament; draw() : void; } - + namespace Ornament { const CATEGORY : string; } - + class PedalMarking { constructor(notes : Note[]); //inconsistent name: 'notes' is called 'type', suggesting string (is Note[]) static DEBUG : boolean; @@ -715,17 +715,17 @@ declare namespace Vex { drawText() : void; draw() : void; } - + namespace PedalMarking { const enum Styles {TEXT, BRACKET, MIXED} const GLYPHS : {[name : string] : {code : string, x_shift : number, y_shift : number}}; } - + class RaphaelContext implements IRenderContext { //TODO remove the following lines once TypeScript allows subclass overrides with type changes or type inconsistencies mentioned below are fixed setLineWidth(width : number) : RaphaelContext; glow() : RaphaelContext; - + constructor(element : HTMLElement); setFont(family : string, size : number, weight? : number) : RaphaelContext; setRawFont(font : string) : RaphaelContext; @@ -759,7 +759,7 @@ declare namespace Vex { save() : RaphaelContext; restore() : RaphaelContext; } - + class Renderer { constructor(sel : HTMLElement, backend : Renderer.Backends) static USE_CANVAS_PROXY : boolean; @@ -772,12 +772,12 @@ declare namespace Vex { resize(width : number, height : number) : Renderer; getContext() : IRenderContext; } - + namespace Renderer { const enum Backends {CANVAS, RAPHAEL, SVG, VML} const enum LineEndType {NONE, UP, DOWN} } - + class Repetition extends StaveModifier { constructor(type : Repetition.type, x : number, y_shift : number); getCategory() : string; @@ -792,7 +792,7 @@ declare namespace Vex { namespace Repetition { const enum type { NONE, CODA_LEFT, CODA_RIGHT, SEGNO_LEFT, SEGNO_RIGHT, DC, DC_AL_CODA, DC_AL_FINE, DS, DS_AL_CODA, DS_AL_FINE, FINE } } - + class Stave { constructor(x : number, y : number, width : number, options? : {vertical_bar_width? : number, glyph_spacing_px? : number, num_lines? : number, fill_style? : string, spacing_between_lines_px? : number, space_above_staff_ln? : number, space_below_staff_ln? : number, top_text_position? : number}); resetLines() : void; @@ -846,7 +846,7 @@ declare namespace Vex { setConfigForLine(line_number : number, line_config : {visible : boolean}) : Stave; setConfigForLines(lines_configuration : {visible : boolean}[]) : Stave; } - + class StaveConnector { constructor(top_stave : Stave, bottom_stave : Stave); setContext(ctx : IRenderContext) : StaveConnector; @@ -861,7 +861,7 @@ declare namespace Vex { namespace StaveConnector { const enum type { SINGLE_RIGHT, SINGLE_LEFT, SINGLE, DOUBLE, BRACE, BRACKET, BOLD_DOUBLE_LEFT, BOLD_DOUBLE_RIGHT, THIN_DOUBLE } } - + class StaveHairpin { constructor(notes : {first_note : Note, last_note : Note}, type : StaveHairpin.type); static FormatByTicksAndDraw(ctx : IRenderContext, formatter : Formatter, notes : {first_note : Note, last_note : Note}, type : StaveHairpin.type, position : Modifier.Position, options? : {height : number, y_shift : number, left_shift_ticks : number, right_shift_ticks : number}) : void; @@ -876,7 +876,7 @@ declare namespace Vex { namespace StaveHairpin { const enum type { CRESC, DECRESC } } - + class StaveLine { constructor(notes : {first_note: Note, last_note: Note, first_indices : number[], last_indices : number[]}); setContext(context : Object) : StaveLine; @@ -886,11 +886,11 @@ declare namespace Vex { applyLineStyle() : void; applyFontStyle() : void; draw() : StaveLine; - + //inconsistent API: this should be set via an options object in the constructor render_options : {padding_left : number, padding_right : number, line_width : number, line_dash : number[], rounded_end : boolean, color : string, draw_start_arrow : boolean, draw_end_arrow : boolean, arrowhead_length : number, arrowhead_angle : number, text_position_vertical : StaveLine.TextVerticalPosition, text_justification : StaveLine.TextJustification}; } - + namespace StaveLine { const enum TextVerticalPosition { TOP, BOTTOM } const enum TextJustification { LEFT, CENTER, RIGHT } @@ -906,10 +906,10 @@ declare namespace Vex { addModifier() : void; addEndModifier() : void; } - + class StaveNote extends StemmableNote { //TODO remove the following lines once TypeScript allows subclass overrides with type changes and/or inconsistencies mentioned below are fixed - buildStem() : StemmableNote; + buildStem() : StemmableNote; setStave(stave : Stave) : Note; addModifier(modifier : Modifier, index? : number) : Note; getModifierStartXY() : {x : number, y : number}; @@ -972,11 +972,11 @@ declare namespace Vex { const STEM_DOWN: number; const CATEGORY: string; } - + class StaveSection extends Modifier { //TODO remove the following lines once TypeScript allows subclass overrides with type changes draw() : void; - + constructor(section : string, x : number, shift_y : number); getCategory() : string; setStaveSection(section : string) : StaveSection; @@ -984,7 +984,7 @@ declare namespace Vex { setShiftY(y : number) : StaveSection; draw(stave : Stave, shift_x : number) : StaveSection; } - + class StaveTempo extends StaveModifier { constructor(tempo : {name? : string, duration : string, dots : number, bpm : number}, x : number, shift_y : number); getCategory() : string; @@ -993,11 +993,11 @@ declare namespace Vex { setShiftY(y : number) : StaveTempo; draw(stave : Stave, shift_x : number) : StaveTempo; } - + class StaveText extends Modifier { //TODO remove the following lines once TypeScript allows subclass overrides with type changes draw() : void; - + constructor(text : string, position : Modifier.Position, options? : {shift_x? : number, shift_y? : number, justification? : TextNote.Justification}); getCategory() : string; setStaveText(text : string) : StaveText; @@ -1007,7 +1007,7 @@ declare namespace Vex { setText(text : string) : void; draw(stave : Stave) : StaveText; } - + class StaveTie { constructor(notes : {first_note: Note, last_note: Note, first_indices : number[], last_indices : number[]}, text? : string); setContext(context : IRenderContext) : StaveTie; @@ -1018,7 +1018,7 @@ declare namespace Vex { renderText(first_x_px : number, last_x_px : number) : void; draw() : boolean; } - + class Stem { constructor(options : {x_begin? : number, x_end? : number, y_top? : number, y_bottom? : number, y_extend? : number, stem_extension? : number, stem_direction? : number}); static DEBUG : boolean; @@ -1035,7 +1035,7 @@ declare namespace Vex { getStyle() : {shadowColor? : string, shadowBlur? : string, fillStyle? : string, strokeStyle? : string}; applyStyle(context : IRenderContext) : Stem; draw() : void; - + //inconsistent API: this should be set via the options object in the constructor hide : boolean; } @@ -1044,11 +1044,11 @@ declare namespace Vex { const UP: number; const DOWN: number; } - + class StemmableNote extends Note { //TODO remove the following lines once TypeScript allows subclass overrides with type changes setBeam() : Note; - + constructor(note_struct : {type? : string, dots? : number, duration : string}); static DEBUG : boolean; getStem() : Stem; @@ -1070,11 +1070,11 @@ declare namespace Vex { postFormat() : StemmableNote; drawStem(stem_struct : {x_begin? : number, x_end? : number, y_top? : number, y_bottom? : number, y_extend? : number, stem_extension? : number, stem_direction? : number}) : void; } - + class StringNumber extends Modifier { //TODO remove the following lines once TypeScript allows subclass overrides with type changes setNote(note : Note) : StringNumber; - + constructor(number : number); static format(nums : StringNumber[], state : {left_shift : number, right_shift : number, text_line : number}) : boolean; getNote() : Note; @@ -1095,7 +1095,7 @@ declare namespace Vex { namespace StringNumber { const CATEGORY: string; } - + class Stroke extends Modifier { constructor(type : Stroke.Type, options : {all_voices? : boolean}); static format(strokes : Stroke[], state : {left_shift : number, right_shift : number, text_line : number}) : boolean; @@ -1103,7 +1103,7 @@ declare namespace Vex { addEndNote(note : Note) : Stroke; draw() : void; } - + namespace Stroke { const enum Type {BRUSH_DOWN, BRUSH_UP, ROLL_DOWN, ROLL_UP, RASQUEDO_DOWN, RASQUEDO_UP} const CATEGORY : string; @@ -1145,12 +1145,12 @@ declare namespace Vex { save() : SVGContext; restore() : SVGContext; } - + class TabNote extends StemmableNote { //TODO remove the following lines once TypeScript allows subclass overrides with type changes setStave(stave : Stave) : Note; getModifierStartXY() : {x : number, y : number}; - + constructor(tab_struct : {positions : {str : number, fret : number}[], type? : string, dots? : number, duration : string, stem_direction? : boolean}, draw_stem? : boolean); getCategory() : string; setGhost(ghost : boolean) : TabNote; @@ -1174,32 +1174,32 @@ declare namespace Vex { drawStemThrough() : void; draw() : void; } - + class TabSlide extends TabTie { constructor(notes : {first_note: Note, last_note: Note, first_indices : number[], last_indices : number[]}, direction? : number); static createSlideUp(notes : {first_note: Note, last_note: Note, first_indices : number[], last_indices : number[]}) : TabSlide; static createSlideDown(notes : {first_note: Note, last_note: Note, first_indices : number[], last_indices : number[]}) : TabSlide; renderTie(params : {first_ys : number[], last_ys : number[], last_x_px : number, first_x_px : number, direction : number}) : void; } - + namespace TabSlide { const SLIDE_UP : number; const SLIDE_DOWN : number; } - + class TabStave extends Stave { constructor(x : number, y : number, width : number, options? : {vertical_bar_width? : number, glyph_spacing_px? : number, num_lines? : number, fill_style? : string, spacing_between_lines_px? : number, space_above_staff_ln? : number, space_below_staff_ln? : number, top_text_position? : number}); getYForGlyphs() : number; addTabGlyph() : TabStave; } - + class TabTie extends StaveTie { constructor(notes : {first_note: Note, last_note: Note, first_indices : number[], last_indices : number[]}, text? : string); createHammeron(notes : {first_note: Note, last_note: Note, first_indices : number[], last_indices : number[]}) : TabTie; createPulloff(notes : {first_note: Note, last_note: Note, first_indices : number[], last_indices : number[]}) : TabTie; draw() : boolean; } - + class TextBracket { constructor(bracket_data : {start : Note, stop : Note, text? : string, superscript? : string, position? : TextBracket.Positions}); static DEBUG : boolean; @@ -1210,11 +1210,11 @@ declare namespace Vex { setLine(line : number) : TextBracket; draw() : void; } - + namespace TextBracket { const enum Positions {TOP, BOTTOM} } - + class TextDynamics extends Note { constructor(text_struct : {duration : string, text : string, line? : number}); static DEBUG : boolean; @@ -1230,12 +1230,12 @@ declare namespace Vex { preFormat() : void; draw() : void; } - + namespace TextNote { const enum Justification {LEFT, CENTER, RIGHT} const GLYPHS : {[name : string] : {code : string, point : number, x_shift : number, y_shift : number}} } - + interface Tickable { setContext(context : IRenderContext) : void; getBoundingBox() : BoundingBox; @@ -1261,7 +1261,7 @@ declare namespace Vex { applyTickMultiplier(numerator : number, denominator : number) : void; setDuration(duration : Fraction) : void; } - + class TickContext { setContext(context : IRenderContext) : void; getContext() : IRenderContext; @@ -1285,12 +1285,12 @@ declare namespace Vex { postFormat() : TickContext; static getNextContext(tContext : TickContext) : TickContext; } - + class TimeSignature extends StaveModifier { //TODO remove the following lines once TypeScript allows subclass overrides with type changes addModifier() : void; addEndModifier() : void; - + constructor(timeSpec : string, customPadding? : number); parseTimeSpec(timeSpec : string) : {num : number, glyph : Glyph}; makeTimeSignatureGlyph(topNums : number[], botNums : number[]) : Glyph; @@ -1298,11 +1298,11 @@ declare namespace Vex { addModifier(stave : Stave) : void; addEndModifier(stave : Stave) : void; } - + namespace TimeSignature { const glyphs : {[name : string] : {code : string, point : number, line : number}}; } - + class TimeSigNote extends Note { //TODO remove the following lines once TypeScript allows subclass overrides with type changes or type inconsistencies mentioned below are fixed setStave(stave : Stave) : Note; @@ -1314,26 +1314,26 @@ declare namespace Vex { preFormat() : TimeSigNote; draw() : void; } - + class Tremolo extends Modifier { constructor(num : number); getCategory() : string; draw() : void; } - + class Tuning { constructor(tuningString? : string); noteToInteger(noteString : string) : number; setTuning(tuningString : string) : void; getValueForString(stringNum : string) : number; getValueForFret(fretNum : string, stringNum : string) : number; - getNoteForFret(fretNum : string, stringNum : string) : string; + getNoteForFret(fretNum : string, stringNum : string) : string; } - + namespace Tuning { const names: { [name: string]: string }; } - + class Tuplet { constructor(notes : StaveNote[], options : {num_notes? : number, beats_occupied? : number}); attach() : void; @@ -1352,20 +1352,20 @@ declare namespace Vex { namespace Tuplet { const LOCATION_TOP : number; - const LOCATION_BOTTOM : number; + const LOCATION_BOTTOM : number; } - + class Vibrato extends Modifier { static format(vibratos : Vibrato[], state : {left_shift : number, right_shift : number, text_line : number}, context : ModifierContext) : boolean; setHarsh(harsh : boolean) : Vibrato; setVibratoWidth(width : number) : Vibrato; - draw() : void; + draw() : void; } - + namespace Vibrato { const CATEGORY : string; } - + class Voice { constructor(time : {num_beats? : number, beat_value? : number, resolution? : number}); getTotalTicks() : Fraction; @@ -1388,26 +1388,26 @@ declare namespace Vex { preFormat() : Voice; draw(context : IRenderContext, stave? : Stave) : void; } - + namespace Voice { const enum Mode {STRICT, SOFT, FULL} } - + class VoiceGroup { getVoices() : Voice[]; getModifierContexts() : ModifierContext[]; addVoice(voice : Voice) : void; } - + class Volta extends StaveModifier { constructor(type : Volta.type, number : number, x : number, y_shift : number); getCategory() : string; setShiftY(y : number) : Volta; draw(stave : Stave, x : number) : Volta; } - + namespace Volta { const enum type {NONE, BEGIN, MID, END, BEGIN_END} } } -} \ No newline at end of file +} diff --git a/videojs/videojs-tests.ts b/videojs/videojs-tests.ts index 00a70a661f..15cbc2f8b8 100644 --- a/videojs/videojs-tests.ts +++ b/videojs/videojs-tests.ts @@ -63,7 +63,7 @@ videojs("example_video_1").ready(function(){ myPlayer.cancelFullScreen(); - + var myFunc = function(){ var myPlayer: VideoJSPlayer = this; // Do something when the event is fired diff --git a/videojs/videojs.d.ts b/videojs/videojs.d.ts index e29f3b43dd..7723f8801b 100644 --- a/videojs/videojs.d.ts +++ b/videojs/videojs.d.ts @@ -34,10 +34,10 @@ interface VideoJSPlayer { currentTime(): number; duration(): number; buffered(): TimeRanges; - bufferedPercent(): number; + bufferedPercent(): number; volume(percentAsDecimal: number): TimeRanges; volume(): number; - width(): number; + width(): number; width(pixels: number): VideoJSPlayer; height(): number; height(pixels: number): VideoJSPlayer; diff --git a/voximplant-websdk/voximplant-websdk-tests.ts b/voximplant-websdk/voximplant-websdk-tests.ts index 5dcb6c62e7..ace457cd26 100644 --- a/voximplant-websdk/voximplant-websdk-tests.ts +++ b/voximplant-websdk/voximplant-websdk-tests.ts @@ -5,7 +5,7 @@ var vox: VoxImplant.Client = VoxImplant.getInstance(), room: string; vox.init({ - micRequired: true + micRequired: true }); vox.addEventListener(VoxImplant.Events.SDKReady, function(event: VoxImplant.Events.SDKReady) { diff --git a/voximplant-websdk/voximplant-websdk.d.ts b/voximplant-websdk/voximplant-websdk.d.ts index e3ba00655d..1df4e5e316 100644 --- a/voximplant-websdk/voximplant-websdk.d.ts +++ b/voximplant-websdk/voximplant-websdk.d.ts @@ -3,7 +3,7 @@ // Definitions by: Alexey Aylarov // Definitions: https://github.com/borisyankov/DefinitelyTyped -declare namespace VoxImplant { +declare namespace VoxImplant { /** * VoxImplant.Client general events @@ -12,7 +12,7 @@ declare namespace VoxImplant { AuthResult, ConnectionClosed, ConnectionEstablished, - ConnectionFailed, + ConnectionFailed, IncomingCall, MicAccessResult, NetStatsReceived, @@ -44,14 +44,14 @@ declare namespace VoxImplant { ChatRoomPresenceUpdate, ChatRoomStateUpdate, ChatRoomSubjectChange, - ChatRoomsDataReceived, + ChatRoomsDataReceived, ChatStateUpdate, - MessageModified, - MessageNotModified, + MessageModified, + MessageNotModified, MessageReceived, - MessageRemoved, + MessageRemoved, MessageStatus, - PresenceUpdate, + PresenceUpdate, RosterItemChange, RosterPresenceUpdate, RosterReceived, @@ -123,7 +123,7 @@ declare namespace VoxImplant { * Failure reason description */ message: string; - } + } /** * Event dispatched when there is a new incoming call to current user @@ -196,7 +196,7 @@ declare namespace VoxImplant { */ headers?: Object; } - + /** * Event dispatched after call was disconnected */ @@ -320,7 +320,7 @@ declare namespace VoxImplant { } } - module IMEvents { + module IMEvents { /** * Event dispatched when chat history received @@ -389,7 +389,7 @@ declare namespace VoxImplant { /** * Event dispatched when chat room history received */ - interface ChatRoomHistoryReceived { + interface ChatRoomHistoryReceived { /** * Message id specified in getInstantMessagingHistory method */ @@ -407,7 +407,7 @@ declare namespace VoxImplant { /** * Event dispatched when user joins chat room */ - interface ChatRoomInfo { + interface ChatRoomInfo { /** * Room features */ @@ -429,7 +429,7 @@ declare namespace VoxImplant { /** * Event dispatched when invitation to chat room received */ - interface ChatRoomInvitation { + interface ChatRoomInvitation { /** * The body of the message */ @@ -455,7 +455,7 @@ declare namespace VoxImplant { /** * Event dispatched if an invitation to chat room was declined by the invitee */ - interface ChatRoomInviteDeclined { + interface ChatRoomInviteDeclined { /** * User id (invitee) */ @@ -473,7 +473,7 @@ declare namespace VoxImplant { /** * Event dispatched when chat room message modified */ - interface ChatRoomMessageModified { + interface ChatRoomMessageModified { /** * New message content */ @@ -507,7 +507,7 @@ declare namespace VoxImplant { /** * Event dispatched in case of error during chat room message modification */ - interface ChatRoomMessageNotModified { + interface ChatRoomMessageNotModified { /** * Error code */ @@ -529,7 +529,7 @@ declare namespace VoxImplant { /** * Event dispatched when instant message was sent to chat room */ - interface ChatRoomMessageReceived { + interface ChatRoomMessageReceived { /** * Message content */ @@ -563,7 +563,7 @@ declare namespace VoxImplant { /** * Event dispatched when chat room message removed */ - interface ChatRoomMessageRemoved { + interface ChatRoomMessageRemoved { /** * User id */ @@ -593,7 +593,7 @@ declare namespace VoxImplant { /** * Event dispatched when new participant joined the chat room */ - interface ChatRoomNewParticipant { + interface ChatRoomNewParticipant { /** * User display name */ @@ -609,7 +609,7 @@ declare namespace VoxImplant { } /** - * Event dispatched when chat room participant was banned/unbanned + * Event dispatched when chat room participant was banned/unbanned */ interface ChatRoomOperation { /** @@ -629,7 +629,7 @@ declare namespace VoxImplant { /** * Event dispatched when participant left the chat room */ - interface ChatRoomParticipantExit { + interface ChatRoomParticipantExit { /** * User id */ @@ -643,7 +643,7 @@ declare namespace VoxImplant { /** * Event dispatched when info about chat room participants received */ - interface ChatRoomParticipants { + interface ChatRoomParticipants { /** * Participants list */ @@ -657,7 +657,7 @@ declare namespace VoxImplant { /** * Event dispatched if chat room participant presence status was updated */ - interface ChatRoomPresenceUpdate { + interface ChatRoomPresenceUpdate { /** * Optional presence message */ @@ -679,7 +679,7 @@ declare namespace VoxImplant { /** * Event dispatched when chat session state updated */ - interface ChatRoomStateUpdate { + interface ChatRoomStateUpdate { /** * User id */ @@ -687,7 +687,7 @@ declare namespace VoxImplant { /** * Resource name */ - resource: string; + resource: string; /** * Room id */ @@ -701,7 +701,7 @@ declare namespace VoxImplant { /** * Event dispatched if chat room subject was changed */ - interface ChatRoomSubjectChange { + interface ChatRoomSubjectChange { /** * User id who changed the subject */ @@ -709,7 +709,7 @@ declare namespace VoxImplant { /** * Resource name */ - resource: string; + resource: string; /** * Room id */ @@ -723,7 +723,7 @@ declare namespace VoxImplant { /** * Event dispatched when information about chat rooms where user participates received */ - interface ChatRoomsDataReceived { + interface ChatRoomsDataReceived { /** * Rooms list */ @@ -899,7 +899,7 @@ declare namespace VoxImplant { /** * Roster item event type. See VoxImplant.RosterItemEvent enum */ - type: RosterItemEvent; + type: RosterItemEvent; } /** @@ -987,7 +987,7 @@ declare namespace VoxImplant { } type VoxImplantEvent = Events.AuthResult | Events.ConnectionClosed | Events.ConnectionEstablished | - Events.ConnectionFailed | Events.IncomingCall | Events.MicAccessResult | + Events.ConnectionFailed | Events.IncomingCall | Events.MicAccessResult | Events.NetStatsReceived | Events.PlaybackFinished | Events.SDKReady | Events.SourcesInfoUpdated; @@ -995,17 +995,17 @@ declare namespace VoxImplant { CallEvents.InfoReceived | CallEvents.MessageReceived | CallEvents.ProgressToneStart | CallEvents.ProgressToneStop | CallEvents.TransferComplete | CallEvents.TransferFailed; - type VoxImplantIMEvent = IMEvents.ChatHistoryReceived | IMEvents.ChatRoomBanList | - IMEvents.ChatRoomCreated | IMEvents.ChatRoomError | IMEvents.ChatRoomHistoryReceived | - IMEvents.ChatRoomInfo | IMEvents.ChatRoomInvitation | IMEvents.ChatRoomInviteDeclined | - IMEvents.ChatRoomMessageModified | IMEvents.ChatRoomMessageNotModified | IMEvents.ChatRoomMessageReceived | - IMEvents.ChatRoomMessageRemoved | IMEvents.ChatRoomNewParticipant | IMEvents.ChatRoomOperation | - IMEvents.ChatRoomParticipantExit | IMEvents.ChatRoomParticipants | IMEvents.ChatRoomPresenceUpdate | - IMEvents.ChatRoomStateUpdate | IMEvents.ChatRoomSubjectChange | IMEvents.ChatRoomsDataReceived | - IMEvents.ChatStateUpdate | IMEvents.MessageModified | IMEvents.MessageNotModified | - IMEvents.MessageReceived | IMEvents.MessageRemoved | IMEvents.MessageStatus | - IMEvents.PresenceUpdate | IMEvents.RosterItemChange | IMEvents.RosterPresenceUpdate | - IMEvents.RosterReceived | IMEvents.SubscriptionRequest | IMEvents.SystemError | + type VoxImplantIMEvent = IMEvents.ChatHistoryReceived | IMEvents.ChatRoomBanList | + IMEvents.ChatRoomCreated | IMEvents.ChatRoomError | IMEvents.ChatRoomHistoryReceived | + IMEvents.ChatRoomInfo | IMEvents.ChatRoomInvitation | IMEvents.ChatRoomInviteDeclined | + IMEvents.ChatRoomMessageModified | IMEvents.ChatRoomMessageNotModified | IMEvents.ChatRoomMessageReceived | + IMEvents.ChatRoomMessageRemoved | IMEvents.ChatRoomNewParticipant | IMEvents.ChatRoomOperation | + IMEvents.ChatRoomParticipantExit | IMEvents.ChatRoomParticipants | IMEvents.ChatRoomPresenceUpdate | + IMEvents.ChatRoomStateUpdate | IMEvents.ChatRoomSubjectChange | IMEvents.ChatRoomsDataReceived | + IMEvents.ChatStateUpdate | IMEvents.MessageModified | IMEvents.MessageNotModified | + IMEvents.MessageReceived | IMEvents.MessageRemoved | IMEvents.MessageStatus | + IMEvents.PresenceUpdate | IMEvents.RosterItemChange | IMEvents.RosterPresenceUpdate | + IMEvents.RosterReceived | IMEvents.SubscriptionRequest | IMEvents.SystemError | IMEvents.UCConnected | IMEvents.UCDisconnected; /** @@ -1115,23 +1115,23 @@ declare namespace VoxImplant { } enum ChatStateType { - /** - * User is actively participating in the chat session + /** + * User is actively participating in the chat session */ Active, - /** + /** * User is composing a message */ Composing, - /** + /** * User has effectively ended their participation in the chat session */ Gone, - /** + /** * User has not been actively participating in the chat session */ Inactive, - /** + /** * Invalid type */ Invalid, @@ -1488,7 +1488,7 @@ declare namespace VoxImplant { * @param direction False/true to get messages older/newer than the message with specified id * @param count Number of messages */ - getInstantMessagingHistory(user_id: string, message_id?: string, direction?: boolean, count?: number): void; + getInstantMessagingHistory(user_id: string, message_id?: string, direction?: boolean, count?: number): void; /** * Initialize SDK. SDKReady event will be dispatched after succesful SDK initialization. SDK can't be used until it's initialized * @@ -1524,25 +1524,25 @@ declare namespace VoxImplant { /** * Login into application * - * @param username + * @param username * @param password - * @param options Login options + * @param options Login options */ login(username: string, password: string, options?: LoginOptions): void; /** * Login into application using 'code' auth method * - * @param username + * @param username * @param code - * @param options Login options + * @param options Login options */ loginWithCode(username: string, code: string, options?: LoginOptions): void; /** * Login into application using 'onetimekey' auth method * - * @param username + * @param username * @param hash - * @param options Login options + * @param options Login options */ loginWithOneTimeKey(username: string, hash: string, options?: LoginOptions): void; /** @@ -1700,7 +1700,7 @@ declare namespace VoxImplant { setPresenceStatus(status: UserStatuses, msg: string): void; /** * Set background color of flash app (only for Flash mode) - * + * * @param color Color in web format (i.e. #000000 for black) */ setSwfColor(color: string): void; @@ -1720,7 +1720,7 @@ declare namespace VoxImplant { setVideoSettings(settings: VideoSettings | FlashVideoSettings, successCallback?: () => any, failedCallback?: () => any): void; /** * Show flash settings panel - * + * * @param panel Settings type - default/microphone/camera/etc as described in SecurityPanel class */ showFlashSettingsPanel(panel?: string): void; @@ -1782,18 +1782,18 @@ declare namespace VoxImplant { * @param eventName Event name * @param eventHandler Handler function. A single parameter is passed - object with the event information */ - addEventListener(eventName: VoxImplant.CallEvents, eventHandler: (eventObject: VoxImplantCallEvent) => any): void; + addEventListener(eventName: VoxImplant.CallEvents, eventHandler: (eventObject: VoxImplantCallEvent) => any): void; /** * Answer on incoming call * * @param customData Set custom string associated with call session. It can be later obtained from Call History using HTTP API - * @param extraHeaders Optional custom parameters (SIP headers) that should be sent after accepting incoming call. Parameter names must start with "X-" to be processed by application + * @param extraHeaders Optional custom parameters (SIP headers) that should be sent after accepting incoming call. Parameter names must start with "X-" to be processed by application */ answer(customData?: string, extraHeaders?: Object): void; /** * Reject incoming call * - * @param extraHeaders Optional custom parameters (SIP headers) that should be sent after accepting incoming call. Parameter names must start with "X-" to be processed by application + * @param extraHeaders Optional custom parameters (SIP headers) that should be sent after accepting incoming call. Parameter names must start with "X-" to be processed by application */ decline(extraHeaders?: Object): void; /** @@ -1944,7 +1944,7 @@ declare namespace VoxImplant { /** * Optional constraints object */ - optional?: Object; + optional?: Object; } /** @@ -2029,7 +2029,7 @@ declare namespace VoxImplant { * VoxImplant Web SDK lib version */ function version(): String; - + } declare module "voximplant-websdk" { diff --git a/vso-node-api/vso-node-api-tests.ts b/vso-node-api/vso-node-api-tests.ts index d362487cc4..b2c1880479 100644 --- a/vso-node-api/vso-node-api-tests.ts +++ b/vso-node-api/vso-node-api-tests.ts @@ -22,7 +22,7 @@ test_apis(); function test_apis() { var webapi: webapim.WebApi = new webapim.WebApi('http://serverfoobar.com', webapim.getBasicHandler('fooser', 'barssword')); - + var buildapi: buildm.IBuildApi = webapi.getBuildApi(); var qbuildapi: buildm.IQBuildApi = webapi.getQBuildApi(); var coreapi: corem.ICoreApi = webapi.getCoreApi(); @@ -43,14 +43,14 @@ function test_apis() { var qtfvcapi: tfvcm.IQTfvcApi = webapi.getQTfvcApi(); var witapi: workitemtrackingm.IWorkItemTrackingApi = webapi.getWorkItemTrackingApi(); var qwitapi: workitemtrackingm.IQWorkItemTrackingApi = webapi.getQWorkItemTrackingApi(); - + var apis: basem.ClientApiBase[] = [buildapi, coreapi, filecontainerapi, galleryapi, gitapi, taskapi, agentapi, testapi, tfvcapi, witapi]; var qapis: basem.QClientApiBase[] = [qbuildapi, qcoreapi, qfilecontainerapi, qgalleryapi, qgitapi, qtaskapi, qagentapi, qtestapi, qtfvcapi, qwitapi]; - + for(var api in apis) { console.log('API user agent name: ' + api.userAgent); } for(var qapi in qapis) { console.log('Q API user agent name: ' + qapi.api.userAgent); } -} \ No newline at end of file +} diff --git a/vue/vue-tests.ts b/vue/vue-tests.ts index 03c3e684f1..d16bc0104f 100644 --- a/vue/vue-tests.ts +++ b/vue/vue-tests.ts @@ -126,7 +126,7 @@ namespace TestInstanceProperty { namespace TestInscanceMethods { "use strict"; - + var vm = new Vue({el: '#app'}); vm.$watch('a.b.c', function(newVal: string, oldVal: number) {}); vm.$watch(function() {return this.a + this.b}, function(newVal: string, oldVal: string) {}); @@ -141,7 +141,7 @@ namespace TestInscanceMethods { s = vm.$interpolate('{{msg}} world!'); vm.$log(); vm.$log('item'); - + vm .$on('test', (msg: any) => {}) .$once('testOnce', (msg: any) => {}) @@ -149,13 +149,13 @@ namespace TestInscanceMethods { .$emit("event", 1, 2) .$dispatch("event", 1, 2, 3) .$broadcast("event", 1, 2, 3, 4) - + .$appendTo(document.createElement("div"), () => {}) .$before('#app', () => {}) .$after(document.getElementById('app')) .$remove(() => {}) .$nextTick(() => {}); - + vm .$mount('#app') .$destroy(false); @@ -163,7 +163,7 @@ namespace TestInscanceMethods { namespace TestVueUtil { "use strict"; - + var _ = Vue.util; var target = document.createElement('div'); var child = document.createElement('div'); diff --git a/vue/vue.d.ts b/vue/vue.d.ts index 650c8d98c4..2696e3247e 100644 --- a/vue/vue.d.ts +++ b/vue/vue.d.ts @@ -17,18 +17,18 @@ declare namespace vuejs { twoWay?: boolean; validator?(value: any): boolean; } - + interface ComputedOption { get(): any; set(value: any): void; } - + interface WatchOption { handler(val: any, oldVal: any): void; deep?: boolean; immidiate?: boolean; } - + interface DirectiveOption { bind?(): any; update?(newVal?: any, oldVal?: any): any; @@ -40,12 +40,12 @@ declare namespace vuejs { priority?: number; [key: string]: any; } - + interface FilterOption { read: Function; write: Function; } - + interface TransitionOption { css?: boolean; beforeEnter?(el: HTMLElement): void; @@ -58,7 +58,7 @@ declare namespace vuejs { leaveCancelled?(el: HTMLElement): void; stagger?(index: number): number; } - + interface ComponentOption { data?: {[key: string]: any } | Function; props?: string[] | { [key: string]: PropOption }; @@ -89,7 +89,7 @@ declare namespace vuejs { name?: string; [key: string]: any; } - + // instance/api/data.js interface $get { ( exp: string, asStatement?: boolean ): any; } interface $set { ( key: string | number, value: T ): T; } @@ -116,7 +116,7 @@ declare namespace vuejs { interface $mount { ( elementOrSelector?: ( HTMLElement | string ) ): V; } interface $destroy { (remove?: boolean): void; } interface $compile { (el: Element | DocumentFragment, host?: Vue): Function; } - + interface Vue { $data?: any; $el?: HTMLElement; @@ -126,7 +126,7 @@ declare namespace vuejs { $children?: Vue[]; $refs?: Object; $els?: Object; - + $get?: $get; $set?: $set; $delete?: $delete; @@ -148,10 +148,10 @@ declare namespace vuejs { $mount?: $mount; $destroy?: $destroy; $compile?: $compile; - + _init(options?: ComponentOption): void; } - + interface VueConfig { debug: boolean; delimiters: [string, string]; @@ -160,7 +160,7 @@ declare namespace vuejs { async: boolean; convertAllProperties: boolean; } - + interface VueUtil { // util/lang.js set(obj: Object, key: string, value: any): void; @@ -231,7 +231,7 @@ declare namespace vuejs { // observer/index.js defineReactive(obj: Object, key: string, val: any): void; } - + // instance/api/global.js interface VueStatic { new(options?: ComponentOption): Vue; @@ -241,13 +241,13 @@ declare namespace vuejs { set(object: Object, key: string, value: any): void; delete(object: Object, key: string): void; nextTick(callback: Function): any; - + cid: number; - + extend(options?: ComponentOption): VueStatic; use(callback: Function | {install: Function, [key: string]: any}, option?: Object): VueStatic; mixin(mixin: Object): void; - + directive(id: string, definition: T): T; directive(id: string): any; elementDirective(id: string, definition: T): T; From 6854c8f232953642fcc7a56daef7a49c5b0dbd42 Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Wed, 27 Jan 2016 20:11:30 +0900 Subject: [PATCH 37/65] Remove trailing whitespaces --- ui-grid/ui-grid.d.ts | 38 ++-- ui-router-extras/ui-router-extras-tests.ts | 8 +- underscore.string/underscore.string.d.ts | 2 +- underscore/underscore-tests.ts | 2 +- underscore/underscore.d.ts | 44 ++-- unity-webapi/unity-webapi.d.ts | 11 +- .../urbanairship-cordova.d.ts | 194 +++++++++--------- username/username.d.ts | 4 +- 8 files changed, 151 insertions(+), 152 deletions(-) diff --git a/ui-grid/ui-grid.d.ts b/ui-grid/ui-grid.d.ts index a480d7bb4d..bd0ecd835c 100644 --- a/ui-grid/ui-grid.d.ts +++ b/ui-grid/ui-grid.d.ts @@ -535,9 +535,9 @@ declare module uiGrid { } export type IGridOptions = IGridOptionsOf; export interface IGridOptionsOf extends cellNav.IGridOptions, edit.IGridOptions, expandable.IGridOptions, - exporter.IGridOptions, grouping.IGridOptions, importer.IGridOptions, + exporter.IGridOptions, grouping.IGridOptions, importer.IGridOptions, infiniteScroll.IGridOptions, moveColumns.IGridOptions, pagination.IGridOptions, pinning.IGridOptions, - resizeColumns.IGridOptions, rowEdit.IGridOptions, saveState.IGridOptions, selection.IGridOptions, + resizeColumns.IGridOptions, rowEdit.IGridOptions, saveState.IGridOptions, selection.IGridOptions, treeBase.IGridOptions, treeView.IGridOptions { /** * Default time in milliseconds to throttle aggregation calcuations, defaults to 500ms @@ -610,8 +610,8 @@ declare module uiGrid { */ enableFiltering?: boolean; /** - * False by default. When enabled, this adds a settings icon in the top right of the grid, - * which floats above the column header. The menu by default gives access to show/hide columns, + * False by default. When enabled, this adds a settings icon in the top right of the grid, + * which floats above the column header. The menu by default gives access to show/hide columns, * but can be customized to show additional actions. * @default false */ @@ -1117,8 +1117,8 @@ declare module uiGrid { export interface sortChangedHandler { /** - * Sort change event callback - * @param {IGridInstance} grid instance + * Sort change event callback + * @param {IGridInstance} grid instance * @param {IGridColumn} array of gridColumns that have sorting on them, sorted in priority order */ (grid: IGridInstanceOf, columns: Array>): void; @@ -1342,8 +1342,8 @@ declare module uiGrid { reader.readAsText( files[0] ); } */ - editFileChooserCallback?: (gridRow: uiGrid.IGridRowOf, - gridCol: IGridColumnOf, + editFileChooserCallback?: (gridRow: uiGrid.IGridRowOf, + gridCol: IGridColumnOf, files: FileList) => void; /** * A bindable string value that is used when binding to edit controls instead of colDef.field @@ -1558,7 +1558,7 @@ declare module uiGrid { */ (row: IGridRowOf): void; } - + /** * GridRow settings for expandable */ @@ -1632,9 +1632,9 @@ declare module uiGrid { * @param {any} value The cell value * @returns {any} Formatted value */ - exporterFieldCallback?: (grid: IGridInstanceOf, - row: uiGrid.IGridRowOf, - col: IGridColumnOf, + exporterFieldCallback?: (grid: IGridInstanceOf, + row: uiGrid.IGridRowOf, + col: IGridColumnOf, value: any) => any; /** * A function to apply to the header displayNames before exporting. Useful for internationalisation, @@ -2079,7 +2079,7 @@ declare module uiGrid { * This callback can be used to change the decoded value back into a code. * Defaults to angular.identity. * @param {IGridInstance} grid The grid - * @param {TEntity} newObject The new object as importer has created it. Modify it and return modified + * @param {TEntity} newObject The new object as importer has created it. Modify it and return modified * version * @returns {TEntity} The modified object * @default angular.identity @@ -3218,7 +3218,7 @@ declare module uiGrid { export interface rowCollapsedHandler { /** * Row Collapsed callback - * @param {IGridRow} row The row that was collapsed. You can also retrieve the grid from this row with + * @param {IGridRow} row The row that was collapsed. You can also retrieve the grid from this row with * row.grid */ (row: IGridRowOf): void; @@ -3227,7 +3227,7 @@ declare module uiGrid { export interface rowExpandedHandler { /** * Row Expanded callback - * @param {IGridRow} row The row that was expanded. You can also retrieve the grid from this row with + * @param {IGridRow} row The row that was expanded. You can also retrieve the grid from this row with * row.grid */ (row: IGridRowOf): void; @@ -3429,7 +3429,7 @@ declare module uiGrid { new(entity: TEntity, index: number, reference: IGridInstanceOf): IGridRowOf; } export type IGridRow = IGridRowOf; - export interface IGridRowOf extends cellNav.IGridRow, edit.IGridRow, exporter.IGridRow, + export interface IGridRowOf extends cellNav.IGridRow, edit.IGridRow, exporter.IGridRow, selection.IGridRow, expandable.IGridRow { /** A reference to an item in gridOptions.data[] */ entity: TEntity; @@ -3611,7 +3611,7 @@ declare module uiGrid { */ export type IColumnDef = IColumnDefOf; export interface IColumnDefOf extends cellNav.IColumnDef, edit.IColumnDef, exporter.IColumnDef, - grouping.IColumnDef, moveColumns.IColumnDef, pinning.IColumnDef, resizeColumns.IColumnDef, + grouping.IColumnDef, moveColumns.IColumnDef, pinning.IColumnDef, resizeColumns.IColumnDef, treeBase.IColumnDef { /** * defaults to false @@ -3767,10 +3767,10 @@ declare module uiGrid { */ sortCellFiltered?: boolean; /** - *(optional) An array of sort directions, specifying the order that they should cycle through as + *(optional) An array of sort directions, specifying the order that they should cycle through as * the user repeatedly clicks on the column heading. The default is [null, uiGridConstants.ASC, uiGridConstants.DESC]. * Null refers to the unsorted state. This does not affect the initial sort direction; use the sort property for that. - * If suppressRemoveSort is also set, the unsorted state will be skipped even if it is listed here. Each direction may + * If suppressRemoveSort is also set, the unsorted state will be skipped even if it is listed here. Each direction may * not appear in the list more than once (e.g. [ASC, DESC, DESC] is not allowed), and the list may not be empty.* */ sortDirectionCycle?: Array; diff --git a/ui-router-extras/ui-router-extras-tests.ts b/ui-router-extras/ui-router-extras-tests.ts index a87b95863c..045a3049c7 100644 --- a/ui-router-extras/ui-router-extras-tests.ts +++ b/ui-router-extras/ui-router-extras-tests.ts @@ -9,10 +9,10 @@ myApp.config(($stateProvider: angular.ui.IStateProvider, $stickyStateProvider: a dsr: { default: 'substate', params: ['param1', 'param2'], - fn: function ($dsr$) { + fn: function ($dsr$) { return $dsr$.to; - } + } }, onInactivate: function ($state: angular.ui.IState) { var iAmInjectedByInjector = $state; @@ -36,10 +36,10 @@ myApp.config(($stateProvider: angular.ui.IStateProvider, $stickyStateProvider: a 'stateParam1': ['value1', 'value2'], 'stateParam2': 'value' }); - }, + }, views: { //named views are mandatory - 'name1': {} + 'name1': {} } }; diff --git a/underscore.string/underscore.string.d.ts b/underscore.string/underscore.string.d.ts index 1b08dcf852..b465ad2eb9 100644 --- a/underscore.string/underscore.string.d.ts +++ b/underscore.string/underscore.string.d.ts @@ -300,7 +300,7 @@ interface UnderscoreStringStaticExports { * @param delimiter */ words(str: string): string[]; - + /** * Split string by delimiter (String or RegExp). * /\s+/ by default. diff --git a/underscore/underscore-tests.ts b/underscore/underscore-tests.ts index 74cef85ec7..92858bb010 100644 --- a/underscore/underscore-tests.ts +++ b/underscore/underscore-tests.ts @@ -462,7 +462,7 @@ function chain_tests() { .flatten() .find(num => num % 2 == 0) .value(); - + var firstVal: number = _.chain([1, 2, 3]) .first() .value(); diff --git a/underscore/underscore.d.ts b/underscore/underscore.d.ts index 66b2e8f3ec..7218d2f9ba 100644 --- a/underscore/underscore.d.ts +++ b/underscore/underscore.d.ts @@ -684,7 +684,7 @@ interface UnderscoreStatic { size(list: _.Collection): number; /** - * Split array into two arrays: + * Split array into two arrays: * one whose elements all satisfy predicate and one whose elements all do not satisfy predicate. * @param array Array to split in two. * @param iterator Filter iterator function for each element in `array`. @@ -902,12 +902,12 @@ interface UnderscoreStatic { zip(...arrays: any[]): any[]; /** - * The opposite of zip. Given a number of arrays, returns a series of new arrays, the first + * The opposite of zip. Given a number of arrays, returns a series of new arrays, the first * of which contains all of the first elements in the input arrays, the second of which - * contains all of the second elements, and so on. Use with apply to pass in an array + * contains all of the second elements, and so on. Use with apply to pass in an array * of arrays * @param arrays The arrays to unzip. - * @return Unzipped version of `arrays`. + * @return Unzipped version of `arrays`. **/ unzip(...arrays: any[][]): any[][]; @@ -972,7 +972,7 @@ interface UnderscoreStatic { array: _.List, value: T, from?: number): number; - + /** * Returns the first index of an element in `array` where the predicate truth test passes * @param array The array to search for the index of the first element where the predicate truth test passes. @@ -984,7 +984,7 @@ interface UnderscoreStatic { array: _.List, predicate: _.ListIterator, context?: any): number; - + /** * Returns the last index of an element in `array` where the predicate truth test passes * @param array The array to search for the index of the last element where the predicate truth test passes. @@ -1066,8 +1066,8 @@ interface UnderscoreStatic { /** * Partially apply a function by filling in any number of its arguments, without changing its dynamic this value. - * A close cousin of bind. You may pass _ in your list of arguments to specify an argument that should not be - * pre-filled, but left open to supply at call-time. + * A close cousin of bind. You may pass _ in your list of arguments to specify an argument that should not be + * pre-filled, but left open to supply at call-time. * @param fn Function to partially fill in arguments. * @param arguments The partial arguments. * @return `fn` with partially filled in arguments. @@ -1247,7 +1247,7 @@ interface UnderscoreStatic { * @return List of all the values on `object`. **/ values(object: any): any[]; - + /** * Like map, but for objects. Transform the value of each property in turn. * @param object The object to transform @@ -1256,7 +1256,7 @@ interface UnderscoreStatic { * @return a new _.Dictionary of property values */ mapObject(object: _.Dictionary, iteratee: (val: T, key: string, object: _.Dictionary) => U, context?: any): _.Dictionary; - + /** * Like map, but for objects. Transform the value of each property in turn. * @param object The object to transform @@ -1264,7 +1264,7 @@ interface UnderscoreStatic { * @param context The optional context (value of `this`) to bind to */ mapObject(object: any, iteratee: (val: any, key: string, object: any) => T, context?: any): _.Dictionary; - + /** * Like map, but for objects. Retrieves a property from each entry in the object, as if by _.property * @param object The object to transform @@ -1319,7 +1319,7 @@ interface UnderscoreStatic { extendOwn( destination: any, ...source: any[]): any; - + /** * Like extend, but only copies own properties over to the destination object. (alias: extendOwn) */ @@ -1486,7 +1486,7 @@ interface UnderscoreStatic { * @return True if `object` is a Function, otherwise false. **/ isFunction(object: any): boolean; - + /** * Returns true if object inherits from an Error. * @param object Check if this object is an Error. @@ -1586,7 +1586,7 @@ interface UnderscoreStatic { constant(value: T): () => T; /** - * Returns undefined irrespective of the arguments passed to it. Useful as the default + * Returns undefined irrespective of the arguments passed to it. Useful as the default * for optional callback arguments. * Note there is no way to indicate a 'undefined' return, so it is currently typed as void. * @return undefined @@ -1685,7 +1685,7 @@ interface UnderscoreStatic { * @return Returns the compiled Underscore HTML template. **/ template(templateString: string, settings?: _.TemplateSettings): (...data: any[]) => string; - + /** * By default, Underscore uses ERB-style template delimiters, change the * following template settings to use alternative delimiters. @@ -2404,7 +2404,7 @@ interface Underscore { * @see _.property **/ property(): (object: Object) => any; - + /** * Wrapped type `object`. * @see _.propertyOf @@ -2422,12 +2422,12 @@ interface Underscore { * @see _.isEmpty **/ isEmpty(): boolean; - + /** * Wrapped type `object`. * @see _.isMatch **/ - isMatch(): boolean; + isMatch(): boolean; /** * Wrapped type `object`. @@ -2458,7 +2458,7 @@ interface Underscore { * @see _.isFunction **/ isFunction(): boolean; - + /** * Wrapped type `object`. * @see _.isError @@ -3322,7 +3322,7 @@ interface _Chain { * @see _.property **/ property(): _Chain; - + /** * Wrapped type `object`. * @see _.propertyOf @@ -3340,7 +3340,7 @@ interface _Chain { * @see _.isEmpty **/ isEmpty(): _Chain; - + /** * Wrapped type `object`. * @see _.isMatch @@ -3521,7 +3521,7 @@ interface _Chain { /************* * * Array proxy * ************** */ - + /** * Returns a new array comprised of the array on which it is called * joined with the array(s) and/or value(s) provided as arguments. diff --git a/unity-webapi/unity-webapi.d.ts b/unity-webapi/unity-webapi.d.ts index 857fe973db..5b9c3a8cd5 100644 --- a/unity-webapi/unity-webapi.d.ts +++ b/unity-webapi/unity-webapi.d.ts @@ -41,11 +41,11 @@ interface UnityMediaPlayer { setCanGoPrev(cangoprev:Boolean); setCanPlay(canplay:Boolean); setCanPause(canpause:Boolean); -} +} interface UnityNotification { showNotification (summary:String, body:String, iconUrl?:String); -} +} declare class UnityIndicatorProperties { public count:Number; @@ -63,7 +63,7 @@ interface UnityMessagingIndicator { removeAction(name:String); removeActions(); onPresenceChanged(onPresenceChanged:Function); - + // This is suppose to be readonly, but i'm not sure how to do this // in a definition file. presence:String; @@ -72,7 +72,7 @@ interface UnityMessagingIndicator { interface UnityLauncher { setCount(count:number); clearCount(); - + setProgress(progress:number); clearProgress(); @@ -81,7 +81,7 @@ interface UnityMessagingIndicator { addAction(name:String, onActionInvoked:Function); removeAction(name:String); removeActions(); -} +} interface Unity { init(settings:UnitySettings); @@ -98,4 +98,3 @@ interface Unity { interface BrowserPublic { getUnityObject(version:number):Unity; } - diff --git a/urbanairship-cordova/urbanairship-cordova.d.ts b/urbanairship-cordova/urbanairship-cordova.d.ts index 2d17721d05..c6486cb75d 100644 --- a/urbanairship-cordova/urbanairship-cordova.d.ts +++ b/urbanairship-cordova/urbanairship-cordova.d.ts @@ -27,56 +27,56 @@ declare module UrbanAirshipPlugin { /** * Enables or disables user notifications on the device. * This will prompt users to opt-in to notifications on iOS. - * + * * @param enabled Set to true to enable notifications, false to disable. * @param callback The function to call on completion. */ setUserNotificationsEnabled(enabled: boolean, callback: (status: string) => void): void; - + /** * Checks if user notifications are enabled or not. - * + * * @param callback The function to call on completion. */ isUserNotificationsEnabled(callback: (enabled: boolean) => void): void; - + /** * Get the push identifier for the device. The channel ID is used to send * messages to the device for testing, and is the canonical identifier for * the device in Urban Airship. - * + * * @param callback The function to call on completion. */ getChannelID(callback: (id: string) => void): void; - + /** * Returns the push message object that contains the data associated with a * push notification. The extras dictionary can contain arbitrary key/value * data that you use in your application. - * + * * @param clear Set to true to clear the notification. * @param callback The function to call on completion. */ getLaunchNotification(clear: boolean, callback: (push: UrbanAirshipPlugin.PushEvent) => void): void; - + /** * Enables or disables quiet time. - * + * * @param enabled Set to true to enable quiet time, false to disable. * @param callback The function to call on completion. */ setQuietTimeEnabled(enabled: boolean, callback: () => void): void; - + /** * Checks if quiet time is enabled or not. - * + * * @param callback The function to call on completion. */ isQuietTimeEnabled(callback: (enabled: boolean) => void): void; - + /** * Set the quiet time for the device. - * + * * @param startHour The start hour for quiet time. * @param startMinute The start minute for quiet time. * @param endHour The end hour for quiet time. @@ -84,260 +84,260 @@ declare module UrbanAirshipPlugin { * @param callback The function to call on completion. */ setQuietTime(startHour: number, startMinute: number, endHour: number, endMinute: number, callback: () => void): void; - + /** * Get the current quiet time. The quietTime object represents a timespan * during which notifications should be silenced. The typical use case is * to expose a preference to your users so that they can enable this setting * and specify an interval during which they do not wish to be disturbed. - * + * * @param callback The function to call on completion. */ getQuietTime(callback: (quietTime: UrbanAirshipPlugin.QuietTimeTimeSpan) => void): void; - + /** * Checks if quiet time is currently in effect. - * + * * @param callback The function to call on completion. */ isInQuietTime(callback: (inQuietTime: boolean) => void): void; - + /** * (iOS Only) - * + * * On iOS, registration for push requires specifying what * combination of badges, sound and alerts are desired. This function * must be explicitly called in order to begin the registration process. - * + * * For example: - * + * * UAirship.setNotificationTypes(UAirship.notificationType.sound | * UAirship.notificationType.alert); - * + * * @param bitmask The notification types to set. * @param callback The function to call on completion. */ setNotificationTypes(bitmask: number, callback: () => void): void; - + /** * (iOS Only) - * + * * Set whether the UA Autobadge feature is enabled. - * + * * @param enabled Set to true to enable Autobadge, false to disable. * @param callback The function to call on completion. */ setAutobadgeEnabled(enabled: boolean, callback: () => void): void; - + /** * (iOS Only) - * + * * Set the current application badge number. - * + * * @param badge The number to use for the badge. * @param callback The function to call on completion. */ setBadgeNumber(badge: number, callback: () => void): void; - + /** * (iOS Only) - * + * * Gets the current application badge number. - * + * * @param callback The function to call on completion. */ getBadgeNumber(callback: (badgeNumber: number) => void): void; - + /** * (iOS Only) - * + * * Reset the badge number to zero. - * + * * @param callback The function to call on completion. */ resetBadge(callback: () => void): void; - + /** * (Android Only) - * + * * Clears the notifications posted by the application. - * + * * @param callback The function to call on completion. */ clearNotifications(callback: () => void): void; - + /** * (Android only, iOS sound settings come in the push) - * + * * Set whether the device makes sound on push. - * + * * @param enabled Set to true to enable sound, false to disable. * @param callback The function to call on completion. */ setSoundEnabled(enabled: boolean, callback: () => void): void; - + /** * (Android Only) - * + * * Checks if sound is enabled or not. - * + * * @param callback The function to call on completion. */ isSoundEnabled(callback: (enabled: boolean) => void): void; - + /** * (Android Only) - * + * * Set whether the device vibrates on push. - * + * * @param enabled Set to true to enable vibration, false to disable. * @param callback The function to call on completion. */ setVibrateEnabled(enabled: boolean, callback: () => void): void; - + /** * (Android Only) - * + * * Checks if vibration is enabled or not. - * + * * @param callback The function to call on completion. */ isVibrateEnabled(callback: (enabled: boolean) => void): void; - + /** * Sets tags for the device. - * + * * @param tags An array of tags. * @param callback The function to call on completion. */ setTags(tags: string[], callback: () => void): void; - + /** * Returns the tags for the device. - * + * * @param callback The function to call on completion. */ getTags(callback: (tags: string[]) => void): void; - + /** * Set alias for the device. - * + * * @param alias The alias to set for this device. * @param callback The function to call on completion. */ setAlias(alias: string, callback: () => void): void; - + /** * Gets the alias for this device. - * + * * @param callback The function to call on completion. */ getAlias(callback: (alias: string) => void): void; - + /** * Set the named user ID for this device. - * + * * @param namedUser The named user ID. * @param callback The function to call on completion. */ setNamedUser(namedUserId: string, callback: () => void): void; - + /** * Gets the named user ID for this device. - * + * * @param callback The function to call on completion. */ getNamedUser(callback: (namedUserId: string) => void): void; - + /** * Fluent API to edit the named user tag groups by adding or removing * tags, then applying the changes. - * + * * For example: - * + * * UAirship.editNamedUserTagGroups() * .addTags("loyalty", ["platinum-member", "gold-member"]) * .removeTags("loyalty", ["silver-member", "bronze-member"]) * .apply() - * + * * @returns The chainable API instance. */ editNamedUserTagGroups(): UrbanAirshipPlugin.EditNamedUserTagGroupsApi; - + /** * Fluent API to edit the channel tag groups by adding or removing tags, * then applying the changes. - * + * * For exmaple: - * + * * UAirship.editChannelTagGroups() * .addTags("loyalty", ["platinum-member", "gold-member"]) * .removeTags("loyalty", ["silver-member", "bronze-member"]) * .apply() */ editChannelTagGroups(): UrbanAirshipPlugin.EditChannelTagGroupsApi; - + /** * Enables or disables analytics. Disabling analytics will delete any * locally stored events and prevent any events from uploading. Features * that depend on analytics being enabled may not work properly if it’s * disabled (reports, region triggers, location segmentation, push to * local time). - * + * * @param enabled Set to true to enable analytics, false to disable. * @param callback The function to call on completion. */ setAnalyticsEnabled(enabled: boolean, callback: () => void): void; - + /** * Checks if analytics is enabled or not. - * + * * @param callback The function to call on completion. */ isAnalyticsEnabled(callback: (enabled: boolean) => void): void; - + /** * Runs an Urban Airship action. - * + * * @param actionName The name of the action to run. * @param actionValue The value for the action. * @param callback The function to call on completion. */ runAction(actionName: string, actionValue: string, callback: (result: UrbanAirshipPlugin.RunActionResult) => void): void; - + /** * Enables or disables Urban Airship location services on the device. - * + * * @param enabled Set to true to enable location, false to disable. * @param callback The function to call on completion. */ setLocationEnabled(enabled: boolean, callback: () => void): void; - + /** * Checks if location is enabled or not. - * + * * @param callback The function to call on completion. */ isLocationEnabled(callback: (enabled: boolean) => void): void; - + /** * Enables or disables background location on the device. - * + * * @param enabled Set to true to enable background location, false to disable. * @param callback The function to call on completion. */ setBackgroundLocationEnabled(enabled: boolean, callback: () => void): void; - + /** * Checks if background location updates are enabled or not. - * + * * @param callback The function to call on completion. */ isBackgroundLocationEnabled(callback: () => void): void; - + /** * Records the current location of the device. - * + * * @param callback The function to call on completion. */ recordCurrentLocation(callback: () => void): void; @@ -350,27 +350,27 @@ declare module UrbanAirshipPlugin { /** * Used to add the given tags to the given tag group. - * + * * @param tagGroup The tag group to add tags to. * @param tags The tags to add to the group. - * + * * @returns The chainable API instance. */ addTags: (tagGroup: string, tags: string[]) => EditNamedUserTagGroupsApi; /** * Used to remove the given tags from the given tag group. - * + * * @param tagGroup The tag group to remove tags from. * @param tags The tags to remove from the group. - * + * * @returns The chainable API instance. */ removeTags: (tagGroup: string, tags: string[]) => EditNamedUserTagGroupsApi; /** * Used to apply the changes from the chained API call. - * + * * @param callback The optional function to call on completion. */ apply: (callback?: () => void) => void; @@ -383,27 +383,27 @@ declare module UrbanAirshipPlugin { /** * Used to add the given tags to the given tag group. - * + * * @param tagGroup The tag group to add tags to. * @param tags The tags to add to the group. - * + * * @returns The chainable API instance. */ addTags: (tagGroup: string, tags: string[]) => EditChannelTagGroupsApi; /** * Used to remove the given tags from the given tag group. - * + * * @param tagGroup The tag group to remove tags from. * @param tags The tags to remove from the group. - * + * * @returns The chainable API instance. */ removeTags: (tagGroup: string, tags: string[]) => EditChannelTagGroupsApi; /** * Used to apply the changes from the chained API call. - * + * * @param callback The optional function to call on completion. */ apply: (callback?: () => void) => void; @@ -429,7 +429,7 @@ declare module UrbanAirshipPlugin { /** * (iOS Only) - * + * * The push token for the device. */ deviceToken: string; @@ -437,7 +437,7 @@ declare module UrbanAirshipPlugin { /** * Represents a timespan during which notifications should be silenced. - * + * * For example, 10PM - 6AM would be: * { startHour: 22, startMinute: 0, endHour: 6, endMinute: 0 } */ @@ -474,4 +474,4 @@ interface Document { addEventListener(type: "urbanairship.registration", listener: (ev: UrbanAirshipPlugin.RegistrationEvent) => void, useCapture?: boolean): void; } -//#endregion \ No newline at end of file +//#endregion diff --git a/username/username.d.ts b/username/username.d.ts index 5784f46ff5..06808434df 100644 --- a/username/username.d.ts +++ b/username/username.d.ts @@ -6,13 +6,13 @@ declare module "username" { /** * Tries to get the username from the LOGNAME, USER, LNAME or USERNAME environment variables. - * Falls back to `id -un` on OS X / Linux and `whoami` on Windows in the rare case none of the environment + * Falls back to `id -un` on OS X / Linux and `whoami` on Windows in the rare case none of the environment * variables are set. The result is cached. * * @param callback The callback function to call asynchronously with the result. */ function username(callback: (err: Error, result: string) => void): void; - + module username { /** * Tries to get the username from the LOGNAME, USER, LNAME or USERNAME environment variables. Falls back From 48f20e97bfaf70fc1a9537b38aed98e9749be0ae Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Wed, 27 Jan 2016 20:17:35 +0900 Subject: [PATCH 38/65] Remove trailing whitespaces --- tabtab/tabtab.d.ts | 14 +- tedious/tedious.d.ts | 146 ++++++++--------- teechart/teechart.d.ts | 2 +- threejs/detector.d.ts | 2 +- threejs/three-effectcomposer.d.ts | 2 +- threejs/three-maskpass.d.ts | 2 +- threejs/three-orbitcontrols.d.ts | 4 +- threejs/three-projector.d.ts | 8 +- threejs/three.d.ts | 4 +- through2/through2.d.ts | 2 +- timezonecomplete/timezonecomplete.d.ts | 13 +- tinycolor/tinycolor.d.ts | 2 +- titanium/titanium-tests.ts | 10 +- titanium/titanium.d.ts | 4 +- tmp/tmp.d.ts | 8 +- tooltipster/tooltipster.d.ts | 26 +-- tv4/tv4.d.ts | 4 +- tween.js/tween.js.d.ts | 2 +- tweenjs/tweenjs.d.ts | 2 +- twitter/twitter-tests.ts | 2 +- typeahead/typeahead.d.ts | 158 +++++++++---------- typescript-deferred/typescript-deferred.d.ts | 2 +- 22 files changed, 209 insertions(+), 210 deletions(-) diff --git a/tabtab/tabtab.d.ts b/tabtab/tabtab.d.ts index a744904acc..05b7dff086 100644 --- a/tabtab/tabtab.d.ts +++ b/tabtab/tabtab.d.ts @@ -51,37 +51,37 @@ declare module "tabtab" { * Holds interesting values to drive the output of the completion. */ interface Data { - + /** * full command being completed */ line: string; - + /** * number of words */ words: number; - + /** * cursor position */ point: number; - + /** * tabing in the middle of a word: foo bar baz bar foobarrrrrrr */ partial: string; - + /** * last word of the line */ last: string; - + /** * last partial of the line */ lastPartial: string; - + /** * the previous word */ diff --git a/tedious/tedious.d.ts b/tedious/tedious.d.ts index 490af100e6..db317a3536 100644 --- a/tedious/tedious.d.ts +++ b/tedious/tedious.d.ts @@ -15,13 +15,13 @@ declare module 'tedious' { */ name: string; } - + export interface ColumnMetaData { /** * The column's name */ colName: string; - + /** * The column type. */ @@ -31,18 +31,18 @@ declare module 'tedious' { * The precision. Only applicable to numeric and decimal. */ precision?: number; - + /** * The scale. Only applicable to numeric, decimal, time, datetime2 and datetimeoffset. */ scale?: number; /** - * The length, for char, varchar, nvarchar and varbinary. + * The length, for char, varchar, nvarchar and varbinary. */ dataLength?: number; } - + export interface DebugOptions { /** * A boolean, controlling whether debug events will be emitted with text describing packet details (default: false). @@ -58,13 +58,13 @@ declare module 'tedious' { * A boolean, controlling whether debug events will be emitted with text describing packet payload details (default: false). */ payload?: boolean; - + /** * A boolean, controlling whether debug events will be emitted with text describing token stream tokens (default: false). */ token?: boolean; } - + export enum ISOLATION_LEVEL { NO_CHANGE = 0x00, READ_UNCOMMITTED = 0x01, @@ -73,7 +73,7 @@ declare module 'tedious' { SERIALIZABLE = 0x04, SNAPSHOT = 0x05 } - + /** * Unfortunately these aren't valid JavaScript identifiers * so I cannot list the values here as enum values @@ -89,7 +89,7 @@ declare module 'tedious' { type: string; name: string; } - + export interface TediousTypes { BigInt: TediousType; Binary: TediousType; @@ -130,82 +130,82 @@ declare module 'tedious' { VarChar: TediousType; Xml: TediousType; } - + export var TYPES: TediousTypes; - + export interface ConnectionOptions { - + /** * Port to connect to (default: 1433). Mutually exclusive with options.instanceName. */ port?: number; - + /** * The instance name to connect to. The SQL Server Browser service must be running on the database server, * and UDP port 1444 on the database server must be reachable. (no default) Mutually exclusive with options.port. */ instanceName?: string; - + /** * Database to connect to (default: dependent on server configuration). */ database?: string; - + /** - * By default, if the database requestion by options.database cannot be accessed, - * the connection will fail with an error. However, if options.fallbackToDefaultDb is set to true, + * By default, if the database requestion by options.database cannot be accessed, + * the connection will fail with an error. However, if options.fallbackToDefaultDb is set to true, * then the user's default database will be * used instead (Default: false). */ fallbackToDefaultDb?: boolean; - + /** * The number of milliseconds before the attempt to connect is considered failed (default: 15000). */ connectTimeout?: number; - + /** * The number of milliseconds before a request is considered failed, or 0 for no timeout (default: 15000). */ requestTimeout?: number; - + /** * The number of milliseconds before the cancel (abort) of a request is considered failed (default: 5000). */ cancelTimeout?: number; - + /** * The size of TDS packets (subject to negotiation with the server). Should be a power of 2. (default: 4096). */ packetSize?: number; - + /** * A boolean determining whether to pass time values in UTC or local time. (default: true). */ useUTC?: boolean; - + /** * A boolean determining whether to rollback a transaction automatically if any error is encountered - * during the given transaction's execution. This sets the value for SET XACT_ABORT during the initial + * during the given transaction's execution. This sets the value for SET XACT_ABORT during the initial * SQL phase of a connection (documentation). */ abortTransactionOnError?: boolean; - + /** * A string indicating which network interface (ip addres) to use when connecting to SQL Server. */ localAddress?: string; - + /** * A boolean determining whether to return rows as arrays or key-value collections. (default: false). */ useColumnNames?: boolean; - + /** * A boolean, controlling whether the column names returned will have the first letter converted * to lower case (true) or not. This value is ignored if you provide a columnNameReplacer. (default: false). */ camelCaseColumns?: boolean; - + /** * A function with parameters (columnName, index, columnMetaData) and returning a string. If provided, * this will be called once per column per result-set. The returned value will be used instead of the @@ -213,56 +213,56 @@ declare module 'tedious' { * naming conventions. (default: null). */ columnNameReplacer?: (columnName: string, index: number, columnMetaData: ColumnMetaData) => string; - + /** * Debug options */ debug?: DebugOptions; - + /** * The default isolation level that transactions will be run with. (default: READ_COMMITED). */ isolationLevel?: ISOLATION_LEVEL; - + /** * The default isolation level for new connections. All out-of-transaction queries are executed with this setting. (default: READ_COMMITED) */ connectionIsolationLevel?: ISOLATION_LEVEL; - + /** * A boolean, determining whether the connection will request read only access from a SQL Server Availability Group. For more information, see here. (default: false). */ readOnlyIntent?: boolean; - + /** * A boolean determining whether or not the connection will be encrypted. Set to true if you're on Windows Azure. (default: false). */ encrypt?: boolean; - + /** * When encryption is used, an object may be supplied that will be used for the first argument when calling tls.createSecurePair (default: {}). */ cryptoCredentialsDetails?: Object; - + /** * A boolean, that when true will expose received rows in Requests' done* events. See done, doneInProc and doneProc. (default: false) * Caution: If many row are received, enabling this option could result in excessive memory usage. */ rowCollectionOnDone?: boolean; - + /** * A boolean, that when true will expose received rows in Requests' completion callback. See new Request. (default: false) * Caution: If many row are received, enabling this option could result in excessive memory usage. */ rowCollectionOnRequestCompletion?: boolean; - + /** * The version of TDS to use. If server doesn't support specified version, negotiated version is used instead. (default: 7_4). * Take this from tedious.TDS_VERSION.7_4 . */ tdsVersion?: number; } - + export interface ConnectionConfig { /** * User name to use for authentication. @@ -283,13 +283,13 @@ declare module 'tedious' { * Once you set domain, driver will connect to SQL Server using domain login. */ domain?: string; - + /** * Further options */ options?: ConnectionOptions; } - + export interface ParameterOptions { // for VarChar, NVarChar, VarBinary length?: number; @@ -298,7 +298,7 @@ declare module 'tedious' { // scale for Numeric, Decimal, Time, DateTime2, DateTimeOffset scale?: number; } - + /** * Type of each column in the Request#row event */ @@ -306,7 +306,7 @@ declare module 'tedious' { metadata: ColumnMetaData; value: any; } - + /** * A Request instance represents a request that can be executed on a connection * @event 'columnMetadata' This event, describing result set columns, will be emitted before row events are emitted. This event may be emited multiple times when more than one recordset is produced by the statement. @@ -317,7 +317,7 @@ declare module 'tedious' { * @event 'returnValue' A value for an output parameter (that was added to the request with addOutputParameter(...)). See also Using Parameters. */ export class Request extends events.EventEmitter { - + /** * Constructor * @param sql The SQL statement to be executed (or a procedure name, if the request is to be used with connection.callProcedure). @@ -327,7 +327,7 @@ declare module 'tedious' { * rows: Rows as a result of executing the SQL statement. Will only be avaiable if Connection's config.options.rowCollectionOnRequestCompletion is true. */ constructor(sql: string, callback: (error: Error, rowCount: number, rows: any[]) => void); - + /** * Add an input parameter to the request. * @param name The parameter name. This should correspond to a parameter in the SQL, or a parameter that a called procedure expects. The name should not start '@'. @@ -336,26 +336,26 @@ declare module 'tedious' { * @param options Additional type options. Optional. */ addParameter(name: string, type: TediousType, value: any, options?: ParameterOptions): void; - + /** - * Add an output parameter to the request. The parameter's value will be provide by an emitted returnValue event. + * Add an output parameter to the request. The parameter's value will be provide by an emitted returnValue event. * @param name The parameter name. This should correspond to a parameter in the SQL, or a parameter that a called procedure expects. * @param type One of the supported data types. * @param value The value that the parameter is to be given. The Javascript type of the argument should match that documented for data types. Optional. - * @param options Additional type options. Optional. + * @param options Additional type options. Optional. */ addOutputParameter(name: string, type: TediousType, value?: any, options?: ParameterOptions): void; } - + export interface BulkLoadColumnOpts extends ParameterOptions { // indicates whether the column accepts NULL values. - nullable: boolean; + nullable: boolean; // If the name of the column is different from the name of the property found on rowObj arguments passed to , then you can use this option to specify the property name. objName?: string; } - + export interface BulkLoad { - + /** * Adds a column to the bulk load. The column definitions should match the table you are trying to insert into. Attempting to call addColumn after the first row has been added will throw an exception. * @param name The name of the column. @@ -363,7 +363,7 @@ declare module 'tedious' { * @param options Additional column type information. At a minimum, nullable must be set to true or false. */ addColumn(name: string, type: TediousType, options: BulkLoadColumnOpts): void; - + /** * Adds a row to the bulk insert. This method accepts arguments in three different formats: * @param rowObj An object of key/value pairs representing column name (or objName) and value. @@ -392,30 +392,30 @@ declare module 'tedious' { export interface InfoObject { /** * Error number - */ + */ number: number; /** * The error state, used as a modifier to the error number. - */ + */ state: any; /** * The class (severity) of the error. A class of less than 10 indicates an informational message. - */ + */ class: number; /** * The message text. - */ + */ message: string; /** * The stored procedure name (if a stored procedure generated the message). - */ + */ procName: string; /** * The line number in the SQL batch or stored procedure that caused the error. Line numbers begin at 1; therefore, if the line number is not applicable to the message, the value of LineNumber will be 0. - */ + */ lineNumber: number; } - + /** * Connection * @event 'connect' The attempt to connect and validate has completed. @@ -430,26 +430,26 @@ declare module 'tedious' { * @event 'secure' A secure connection has been established. */ export class Connection extends events.EventEmitter { - + constructor(config: ConnectionConfig); /** - * Start a transaction. As only one request at a time may be executed on + * Start a transaction. As only one request at a time may be executed on * a connection, another request should not be initiated until this callback is called. * @param callback The callback is called when the request to start the transaction has completed, either successfully or with an error. If an error occured then err will describe the error. * @param name A string representing a name to associate with the transaction. Optional, and defaults to an empty string. Required when isolationLevel is present. * @param isolationLevel The isolation level that the transaction is to be run with. */ beginTransaction(callback: (error?: Error) => void, name?: string, isolationLevel?: ISOLATION_LEVEL): void; - + /** - * Commit a transaction. + * Commit a transaction. * There should be an active transaction. That is, beginTransaction should have been previously called. * @param callback The callback is called when the request to commit the transaction has completed, either successfully or with an error. If an error occured then err will describe the error. * As only one request at a time may be executed on a connection, another request should not be initiated until this callback is called. */ commitTransaction(callback: (error: Error) => void): void; - + /** * Rollback a transaction. There should be an active transaction. That is, beginTransaction should have been previously called. * @param callback The callback is called when the request to rollback the transaction has completed, either successfully or with an error. If an error occured then err will describe the error. @@ -462,7 +462,7 @@ declare module 'tedious' { * @param request A Request object representing the request. Parameters only require a name and type. Parameter values are ignored. */ prepare(request: Request): void; - + /** * Release the SQL Server resources associated with a previously prepared request. */ @@ -472,20 +472,20 @@ declare module 'tedious' { * Call a stored procedure represented by request. */ callProcedure(request: Request): void; - + /** * Execute the SQL represented by request. * As sp_executesql is used to execute the SQL, if the same SQL is executed multiples times using this function, the SQL Server query optimizer is likely to reuse the execution plan it generates for the first execution. * Beware of the way that scoping rules apply, and how they may affect local temp tables. If you're running in to scoping issues, then execSqlBatch may be a better choice. See also issue #24. */ execSql(request: Request): void; - + /** * Execute the SQL batch represented by request. There is no param support, and unlike execSql, it is not likely that SQL Server will reuse the execution plan it generates for the SQL. * In almost all cases, execSql will be a better choice. */ execSqlBatch(request: Request): void; - + /** * Execute previously prepared SQL, using the supplied parameters. * @param request A previously prepared Request. @@ -499,7 +499,7 @@ declare module 'tedious' { * @param callback A function which will be called after the BulkLoad finishes executing. rowCount will equal the number of rows inserted. */ newBulkLoad(tableName: string, callback: (error: Error, rowCount: number) => void): BulkLoad; - + /** * Executes a BulkLoad. */ @@ -508,19 +508,19 @@ declare module 'tedious' { /** * Reset the connection to its initial state. Can be useful for connection pool implementations. * @param callback The callback is called when the connection reset has completed, either successfully or with an error. If an error occured then err will describe the error. - * As only one request at a time may be executed on a connection, another request should not be initiated until this callback is called. + * As only one request at a time may be executed on a connection, another request should not be initiated until this callback is called. */ reset(callback: (error: Error) => void): void; - + /** * Cancel currently executed request. */ cancel(): void; - + /** * Closes the connection to the database. The end will be emmited once the connection has been closed. */ close(): void; - + } } diff --git a/teechart/teechart.d.ts b/teechart/teechart.d.ts index 2b747b3d9f..6e7ac39449 100644 --- a/teechart/teechart.d.ts +++ b/teechart/teechart.d.ts @@ -316,7 +316,7 @@ declare module Tee { calc(value: number): number; fromPos(position: number): number; fromSize(size: number): number; - + hasAnySeries(): boolean; scroll(delta: number): void; setMinMax(minimum: number, maximum: number): void; diff --git a/threejs/detector.d.ts b/threejs/detector.d.ts index 6cf8a2ca66..a0514db210 100644 --- a/threejs/detector.d.ts +++ b/threejs/detector.d.ts @@ -8,7 +8,7 @@ interface DetectorStatic { webgl: boolean; workers: boolean; fileapi: boolean; - + getWebGLErrorMessage(): HTMLElement; addGetWebGLMessage(parameters?: {id?: string; parent?: HTMLElement}): void; } diff --git a/threejs/three-effectcomposer.d.ts b/threejs/three-effectcomposer.d.ts index df10afab58..37e904fe76 100644 --- a/threejs/three-effectcomposer.d.ts +++ b/threejs/three-effectcomposer.d.ts @@ -17,7 +17,7 @@ declare module THREE { readBuffer: WebGLRenderTarget; passes: any[]; copyPass: ShaderPass; - + swapBuffers(): void; addPass(pass: any): void; insertPass(pass: any, index: number): void; diff --git a/threejs/three-maskpass.d.ts b/threejs/three-maskpass.d.ts index 5b36cde828..7b7ea589c6 100644 --- a/threejs/three-maskpass.d.ts +++ b/threejs/three-maskpass.d.ts @@ -18,7 +18,7 @@ declare module THREE { render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget, delta: number): void; } - + export class ClearMaskPass { constructor(); diff --git a/threejs/three-orbitcontrols.d.ts b/threejs/three-orbitcontrols.d.ts index b904ab3219..c51b5469e5 100644 --- a/threejs/three-orbitcontrols.d.ts +++ b/threejs/three-orbitcontrols.d.ts @@ -51,11 +51,11 @@ declare module THREE { reset(): void; getPolarAngle(): number; getAzimuthalAngle(): number; - + // EventDispatcher mixins addEventListener(type: string, listener: (event: any) => void): void; hasEventListener(type: string, listener: (event: any) => void): void; removeEventListener(type: string, listener: (event: any) => void): void; dispatchEvent(event: { type: string; target: any; }): void; } -} \ No newline at end of file +} diff --git a/threejs/three-projector.d.ts b/threejs/three-projector.d.ts index 05b6f678e5..c872186565 100644 --- a/threejs/three-projector.d.ts +++ b/threejs/three-projector.d.ts @@ -72,7 +72,7 @@ declare module THREE { */ export class Projector { constructor(); - + // deprecated. projectVector(vector: Vector3, camera: Camera): Vector3; @@ -88,10 +88,10 @@ declare module THREE { * @param sort select whether to sort elements using the Painter's algorithm. */ projectScene(scene: Scene, camera: Camera, sortObjects: boolean, sortElements?: boolean): { - objects: Object3D[]; // Mesh, Line or other object - sprites: Object3D[]; // Sprite or Particle + objects: Object3D[]; // Mesh, Line or other object + sprites: Object3D[]; // Sprite or Particle lights: Light[]; elements: Face3[]; // Line, Particle, Face3 or Face4 }; } -} \ No newline at end of file +} diff --git a/threejs/three.d.ts b/threejs/three.d.ts index ac211561e0..8c637d4bfc 100644 --- a/threejs/three.d.ts +++ b/threejs/three.d.ts @@ -4618,7 +4618,7 @@ declare module THREE { getMaxAnisotropy(): number; getPixelRatio(): number; setPixelRatio(value: number): void; - + getSize(): { width: number; height: number; }; /** @@ -4960,7 +4960,7 @@ declare module THREE { export class WebGLProgram{ constructor(renderer: WebGLRenderer, code: string, material: ShaderMaterial, parameters: WebGLRendererParameters); - + getUniforms(): any; getAttributes(): any; diff --git a/through2/through2.d.ts b/through2/through2.d.ts index 32e566e72e..40198134c1 100644 --- a/through2/through2.d.ts +++ b/through2/through2.d.ts @@ -8,7 +8,7 @@ declare module 'through2' { import stream = require('stream'); - + type TransfofmCallback = (err?: any, data?: any) => void; type TransformFunction = (chunk: any, enc: string, callback: TransfofmCallback) => void; type FlashCallback = (flushCallback: () => void) => void; diff --git a/timezonecomplete/timezonecomplete.d.ts b/timezonecomplete/timezonecomplete.d.ts index 7a605a5556..635f4558f3 100644 --- a/timezonecomplete/timezonecomplete.d.ts +++ b/timezonecomplete/timezonecomplete.d.ts @@ -275,27 +275,27 @@ declare module '__timezonecomplete/basics' { /** * Year, 1970-... */ - year?: number, + year?: number, /** * Month 1-12 */ - month?: number, + month?: number, /** * Day of month, 1-31 */ - day?: number, + day?: number, /** * Hour 0-23 */ - hour?: number, + hour?: number, /** * Minute 0-59 */ - minute?: number, + minute?: number, /** * Seconds, 0-59 */ - second?: number, + second?: number, /** * Milliseconds 0-999 */ @@ -1517,4 +1517,3 @@ declare module '__timezonecomplete/globals' { */ export function abs(d: Duration): Duration; } - diff --git a/tinycolor/tinycolor.d.ts b/tinycolor/tinycolor.d.ts index d7bc543420..d011f89bbb 100644 --- a/tinycolor/tinycolor.d.ts +++ b/tinycolor/tinycolor.d.ts @@ -329,7 +329,7 @@ interface tinycolorInstance { * Gets the complement of the current color */ complement(): tinycolorInstance; - + /** * Gets a new instance with the current color */ diff --git a/titanium/titanium-tests.ts b/titanium/titanium-tests.ts index 087ba05c27..79688cd5ff 100644 --- a/titanium/titanium-tests.ts +++ b/titanium/titanium-tests.ts @@ -6,13 +6,13 @@ function test_window() { backgroundColor: 'white', borderRadius: 10 }); - + window.setBackgroundColor('blue'); window.opacity = 0.92; - + var matrix = Ti.UI.create2DMatrix().scale(1.1, 1); window.transform = matrix; - + var label: Ti.UI.Label; label = Ti.UI.createLabel({ color: '#900', @@ -100,7 +100,7 @@ function test_map() { mountainView.setTitle('Appcelerator'); mountainView.setSubtitle('Mountain View, CA'); mountainView.setPincolor(Ti.Map.ANNOTATION_RED); - + var mapview = Ti.Map.createView({ mapType: Ti.Map.STANDARD_TYPE, region: { @@ -118,4 +118,4 @@ function test_map() { }); win.add(mapview); win.open(); -} \ No newline at end of file +} diff --git a/titanium/titanium.d.ts b/titanium/titanium.d.ts index a325611df3..f2f1afd48f 100644 --- a/titanium/titanium.d.ts +++ b/titanium/titanium.d.ts @@ -6342,8 +6342,8 @@ declare class ErrorCallbackArgs { } declare class FailureResponse { - code: Number; - error: string; + code: Number; + error: string; success: boolean; } diff --git a/tmp/tmp.d.ts b/tmp/tmp.d.ts index 7c60d33ac8..4625fc19cd 100644 --- a/tmp/tmp.d.ts +++ b/tmp/tmp.d.ts @@ -9,7 +9,7 @@ declare module "tmp" { interface Options extends SimpleOptions { mode?: number; } - + interface SimpleOptions { prefix?: string; postfix?: string; @@ -19,7 +19,7 @@ declare module "tmp" { keep?: boolean; unsafeCleanup?: boolean; } - + interface SynchrounousResult { name: string; fd: number; @@ -28,9 +28,9 @@ declare module "tmp" { function file(callback: (err: any, path: string, fd: number, cleanupCallback: () => void) => void): void; function file(config: Options, callback?: (err: any, path: string, fd: number, cleanupCallback: () => void) => void): void; - + function fileSync(config?: Options): SynchrounousResult; - + function dir(callback: (err: any, path: string, cleanupCallback: () => void) => void): void; function dir(config: Options, callback?: (err: any, path: string, cleanupCallback: () => void) => void): void; diff --git a/tooltipster/tooltipster.d.ts b/tooltipster/tooltipster.d.ts index b1c263c164..fa264adecb 100644 --- a/tooltipster/tooltipster.d.ts +++ b/tooltipster/tooltipster.d.ts @@ -13,7 +13,7 @@ declare module JQueryTooltipster { export interface ITooltipsterOptions { /** - * Determines how the tooltip will animate in and out. Feel free to modify or create custom transitions in the tooltipster.css file. + * Determines how the tooltip will animate in and out. Feel free to modify or create custom transitions in the tooltipster.css file. * In IE9 and 8, all animations default to a JavaScript generated, fade animation. Default: 'fade' */ animation?: string; @@ -39,7 +39,7 @@ declare module JQueryTooltipster { content?: string; /** - * If the content of the tooltip is provided as a string, it is displayed as plain text by default. + * If the content of the tooltip is provided as a string, it is displayed as plain text by default. * If this content should actually be interpreted as HTML, set this option to true. Default: false */ contentAsHTML?: boolean; @@ -127,13 +127,13 @@ declare module JQueryTooltipster { iconTouch?: boolean; /** - * Give users the possibility to interact with the tooltip. Unless autoClose is set to false, the tooltip will still close if the user moves away from or clicks out of the tooltip. + * Give users the possibility to interact with the tooltip. Unless autoClose is set to false, the tooltip will still close if the user moves away from or clicks out of the tooltip. * Default: false */ interactive?: boolean; /** - * If the tooltip is interactive and activated by a hover event, set the amount of time (milliseconds) allowed for a user to hover off + * If the tooltip is interactive and activated by a hover event, set the amount of time (milliseconds) allowed for a user to hover off * of the tooltip activator (origin) on to the tooltip itself - keeping the tooltip from closing. Default: 350 */ interactiveTolerance?: number; @@ -170,14 +170,14 @@ declare module JQueryTooltipster { positionTracker?: boolean; /** - * Called after the tooltip has been repositioned by the position tracker (if enabled). + * Called after the tooltip has been repositioned by the position tracker (if enabled). * Default: A function that will close the tooltip if the trigger is 'hover' and autoClose is false. */ positionTrackerCallback?: Function; /** - * Specify if a TITLE attribute should be restored on the HTML element after a call to the 'destroy' method. - * This attribute may be omitted, or be restored with the value that existed before Tooltipster was initialized, or be restored with the stringified value of the current content. + * Specify if a TITLE attribute should be restored on the HTML element after a call to the 'destroy' method. + * This attribute may be omitted, or be restored with the value that existed before Tooltipster was initialized, or be restored with the stringified value of the current content. * Note: in case of multiple tooltips on a single element, only the last destroyed tooltip may trigger a restoration. Default: 'current' * * Possible values: 'none', 'previous' or 'current' @@ -200,8 +200,8 @@ declare module JQueryTooltipster { theme?: string; /** - * - * If set to false, tooltips will not show on pure-touch devices, unless you open them yourself with the 'show' method. + * + * If set to false, tooltips will not show on pure-touch devices, unless you open them yourself with the 'show' method. * Touch gestures on devices which also have a mouse will still open the tooltips though. Default: true */ touchDevices?: boolean; @@ -225,8 +225,8 @@ declare module JQueryTooltipster { /** * Updates the content of the tooltip. - * @param value - * @returns {} + * @param value + * @returns {} */ content(value: string): JQuery; @@ -254,7 +254,7 @@ declare module JQueryTooltipster { * Destroy the tooltip and its listeners. */ destroy(): void; - + /** * Reposition and resize the tooltip. */ @@ -275,4 +275,4 @@ declare module JQueryTooltipster { interface JQuery { tooltipster(options?: JQueryTooltipster.ITooltipsterOptions): JQuery|JQueryTooltipster.ITooltipsterInstance[]; -} \ No newline at end of file +} diff --git a/tv4/tv4.d.ts b/tv4/tv4.d.ts index 5e762155a5..78d07a7e0d 100644 --- a/tv4/tv4.d.ts +++ b/tv4/tv4.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/borisyankov/DefinitelyTyped declare module tv4 { - + // Note that every top-level property is optional in json-schema export interface JsonSchema { [key: string]: any; @@ -15,7 +15,7 @@ declare module tv4 { type?: string; items?: any; properties?: any; - patternProperties?: any; + patternProperties?: any; additionalProperties?: boolean; required?: string[]; definitions?: any; diff --git a/tween.js/tween.js.d.ts b/tween.js/tween.js.d.ts index ecf82d61eb..d83300cbaa 100644 --- a/tween.js/tween.js.d.ts +++ b/tween.js/tween.js.d.ts @@ -10,7 +10,7 @@ declare module TWEEN { export function add(tween:Tween): void; export function remove(tween:Tween): void; export function update(time?:number): boolean; - + export class Tween { constructor(object?:any); to(properties:any, duration:number): Tween; diff --git a/tweenjs/tweenjs.d.ts b/tweenjs/tweenjs.d.ts index 794e5e99e8..cb566dfccb 100644 --- a/tweenjs/tweenjs.d.ts +++ b/tweenjs/tweenjs.d.ts @@ -67,7 +67,7 @@ declare module createjs { static sineInOut: (amount: number) => number; static sineOut: (amount: number) => number; } - + export class MotionGuidePlugin { constructor(); diff --git a/twitter/twitter-tests.ts b/twitter/twitter-tests.ts index c94a89b572..156a9d3568 100644 --- a/twitter/twitter-tests.ts +++ b/twitter/twitter-tests.ts @@ -80,7 +80,7 @@ function bindLoadedEvent() { ); } -function bindRenderedEvent() { +function bindRenderedEvent() { twttr.events.bind( "rendered", event => { diff --git a/typeahead/typeahead.d.ts b/typeahead/typeahead.d.ts index b842786ccd..3fba4ff046 100644 --- a/typeahead/typeahead.d.ts +++ b/typeahead/typeahead.d.ts @@ -712,19 +712,19 @@ interface JQuery { declare module Twitter.Typeahead { interface Options { /** - * If true, when suggestions are rendered, pattern matches for the current query in text nodes will be wrapped in a strong element with its class set to {{classNames.highlight}}. + * If true, when suggestions are rendered, pattern matches for the current query in text nodes will be wrapped in a strong element with its class set to {{classNames.highlight}}. * Defaults to false. */ highlight?: boolean; /** - * If false, the typeahead will not show a hint. + * If false, the typeahead will not show a hint. * Defaults to true. */ hint?: boolean; /** - * The minimum character length needed before suggestions start getting rendered. + * The minimum character length needed before suggestions start getting rendered. * Defaults to 1. */ minLength?: number; @@ -736,14 +736,14 @@ declare module Twitter.Typeahead { } /** - * A typeahead is composed of one or more datasets. When an end-user - * modifies the value of a typeahead, each dataset will attempt to render + * A typeahead is composed of one or more datasets. When an end-user + * modifies the value of a typeahead, each dataset will attempt to render * suggestions for the new value. * For most use cases, one dataset should suffice. It's only in the scenario * where you want rendered suggestions to be grouped based on some sort of * categorical relationship that you'd need to use multiple datasets. For - * example, on twitter.com, the search typeahead groups results into recent - * searches, trends, and accounts – that would be a great use case for using + * example, on twitter.com, the search typeahead groups results into recent + * searches, trends, and accounts – that would be a great use case for using * multiple datasets. */ interface Dataset { @@ -751,23 +751,23 @@ declare module Twitter.Typeahead { * The backing data source for suggestions. * Expected to be a function with the signature (query, syncResults, asyncResults). * syncResults should be called with suggestions computed synchronously and - * asyncResults should be called with suggestions computed asynchronously + * asyncResults should be called with suggestions computed asynchronously * (e.g. suggestions that come for an AJAX request). - * source can also be a Bloodhound instance. + * source can also be a Bloodhound instance. */ source: Bloodhound | ((query: string, syncResults: (result: T[]) => void, asyncResults?: (result: T[]) => void) => void); /** - * Lets the dataset know if async suggestions should be expected. - * If not set, this information is inferred from the signature of - * source i.e. if the source function expects 3 arguments, async will + * Lets the dataset know if async suggestions should be expected. + * If not set, this information is inferred from the signature of + * source i.e. if the source function expects 3 arguments, async will * be set to true. */ async?: boolean; /** * The name of the dataset. - * This will be appended to {{classNames.dataset}} - to form the class name of the containing DOM element. + * This will be appended to {{classNames.dataset}} - to form the class name of the containing DOM element. * Must only consist of underscores, dashes, letters (a-z), and numbers. * Defaults to a random number. */ @@ -779,16 +779,16 @@ declare module Twitter.Typeahead { limit?: number; /** - * For a given suggestion, determines the string representation of it. - * This will be used when setting the value of the input control after - * a suggestion is selected. Can be either a key string or a function - * that transforms a suggestion object into a string. + * For a given suggestion, determines the string representation of it. + * This will be used when setting the value of the input control after + * a suggestion is selected. Can be either a key string or a function + * that transforms a suggestion object into a string. * Defaults to stringifying the suggestion. */ display?: string | ((obj: T) => string); - + /** - * A hash of templates to be used when rendering the dataset. Note a + * A hash of templates to be used when rendering the dataset. Note a * precompiled template is a function that takes a JavaScript object as * its first argument and returns a HTML string. */ @@ -796,7 +796,7 @@ declare module Twitter.Typeahead { } /** - * A hash of templates to be used when rendering the dataset. Note a + * A hash of templates to be used when rendering the dataset. Note a * precompiled template is a function that takes a JavaScript object as * its first argument and returns a HTML string. */ @@ -816,22 +816,22 @@ declare module Twitter.Typeahead { pending?: string | ((query: string) => string); /** - * Rendered at the top of the dataset when suggestions are present. Can be either a HTML string or - * a precompiled template. If it's a precompiled template, the passed in context will contain + * Rendered at the top of the dataset when suggestions are present. Can be either a HTML string or + * a precompiled template. If it's a precompiled template, the passed in context will contain * query and suggestions. */ header?: string | ((query: string, suggestions: T[]) => string); /** * Rendered at the bottom of the dataset when suggestions are present. Can be either a HTML string or - * a precompiled template. If it's a precompiled template, the passed in context will contain + * a precompiled template. If it's a precompiled template, the passed in context will contain * query and suggestions. */ footer?: string | ((query: string, suggestions: T[]) => string); /** - * Used to render a single suggestion. If set, this has to be a precompiled template. - * The associated suggestion object will serve as the context. + * Used to render a single suggestion. If set, this has to be a precompiled template. + * The associated suggestion object will serve as the context. * Defaults to the value of display wrapped in a div tag i.e.
{{value}}
. */ suggestion?: (suggestion: T) => string; @@ -854,16 +854,16 @@ declare module Twitter.Typeahead { /** * Added to menu element.Defaults to tt- menu. */ - menu?: string; + menu?: string; /** * Added to dataset elements.to Defaults to tt- dataset. */ - dataset?: string; + dataset?: string; /** * Added to suggestion elements.Defaults to tt- suggestion. */ - suggestion?: string; + suggestion?: string; /** * Added to menu element when it contains no content.Defaults to tt- empty. @@ -873,7 +873,7 @@ declare module Twitter.Typeahead { /** * Added to menu element when it is opened.Defaults to tt- open. */ - open?: string; + open?: string; /** * Added to suggestion element when menu cursor moves to said suggestion.Defaults to tt- cursor. @@ -891,7 +891,7 @@ declare module Bloodhound { interface BloodhoundOptions { /** * Transforms a datum into an array of string tokens. - * + * * @param datum Suggestion. * @returns An array of string tokens. */ @@ -899,38 +899,38 @@ declare module Bloodhound { /** * Transforms a query into an array of string tokens. - * + * * @param quiery Query. * @returns An array of string tokens. */ queryTokenizer: (query: string) => string[]; /** - * If set to false, the Bloodhound instance will not be implicitly + * If set to false, the Bloodhound instance will not be implicitly * initialized by the constructor function. Defaults to true. */ initialize?: boolean; - + /** - * Given a datum, returns a unique id for it. - * Defaults to JSON.stringify. Note that it is highly recommended + * Given a datum, returns a unique id for it. + * Defaults to JSON.stringify. Note that it is highly recommended * to override this option. - * + * * @param datum Suggestion. * @returns Unique id for the suggestion. */ identify?: (datum: T) => number; /** - * If the number of datums provided from the internal search index is - * less than sufficient, remote will be used to backfill search + * If the number of datums provided from the internal search index is + * less than sufficient, remote will be used to backfill search * requests triggered by calling #search. Defaults to 5. */ sufficient?: number; /** * A compare function used to sort data returned from the internal search index. - * + * * @param a First suggestion. * @param b Second suggestion. * @returns Comparison result. @@ -938,20 +938,20 @@ declare module Bloodhound { sorter?: (a: T, b: T) => number; /** - * An array of data or a function that returns an array of data. + * An array of data or a function that returns an array of data. * The data will be added to the internal search index when #initialize is called. */ local?: T[] | (() => T[]); /** - * Can be a URL to a JSON file containing an array of data or, + * Can be a URL to a JSON file containing an array of data or, * if more configurability is needed, a prefetch options hash. */ prefetch?: string | PrefetchOptions; /** * Can be a URL to fetch data from when the data provided by the internal - * search index is insufficient or, if more configurability is needed, + * search index is insufficient or, if more configurability is needed, * a remote options hash. */ remote?: string | RemoteOptions; @@ -962,7 +962,7 @@ declare module Bloodhound { * supports local storage, the processed data will be cached there to prevent * additional network requests on subsequent page loads. * - * WARNING: While it's possible to get away with it for smaller data sets, + * WARNING: While it's possible to get away with it for smaller data sets, * prefetched data isn't meant to contain entire sets of data. Rather, it should * act as a first-level cache. Ignoring this warning means you'll run the risk * of hitting local storage limits. @@ -974,31 +974,31 @@ declare module Bloodhound { url: string; /** - * If false, will not attempt to read or write to local storage and + * If false, will not attempt to read or write to local storage and * will always load prefetch data from url on initialization. Defaults to true. */ cache?: boolean; /** - * The time (in milliseconds) the prefetched data should be cached in + * The time (in milliseconds) the prefetched data should be cached in * local storage. Defaults to 86400000 (1 day). */ ttl?: number; /** - * The key that data will be stored in local storage under. + * The key that data will be stored in local storage under. * Defaults to value of url. */ cacheKey?: string; /** - * A string used for thumbprinting prefetched data. If this doesn't + * A string used for thumbprinting prefetched data. If this doesn't * match what's stored in local storage, the data will be refetched. */ thumbprint?: string; /** - * A function that provides a hook to allow you to prepare the settings + * A function that provides a hook to allow you to prepare the settings * object passed to transport when a request is about to be made. * Defaults to the identity function. * @@ -1008,10 +1008,10 @@ declare module Bloodhound { prepare?: (settings: JQueryAjaxSettings) => JQueryAjaxSettings; /** - * A function with the signature transform(response) that allows you to - * transform the prefetch response before the Bloodhound instance operates + * A function with the signature transform(response) that allows you to + * transform the prefetch response before the Bloodhound instance operates * on it. Defaults to the identity function. - * + * * @param response Prefetch response. * @returns Transform response. */ @@ -1019,8 +1019,8 @@ declare module Bloodhound { } /** - * Bloodhound only goes to the network when the internal search engine cannot - * provide a sufficient number of results. In order to prevent an obscene + * Bloodhound only goes to the network when the internal search engine cannot + * provide a sufficient number of results. In order to prevent an obscene * number of requests being made to the remote endpoint, requests are rate-limited. */ interface RemoteOptions { @@ -1030,13 +1030,13 @@ declare module Bloodhound { url: string; /** - * A function that provides a hook to allow you to prepare the settings - * object passed to transport when a request is about to be made. + * A function that provides a hook to allow you to prepare the settings + * object passed to transport when a request is about to be made. * The function signature should be prepare(query, settings), where query * is the query #search was called with and settings is the default settings * object created internally by the Bloodhound instance. The prepare function * should return a settings object. Defaults to the identity function. - * + * * @param query The query #search was called with. * @param settings The default settings object created internally by Bloodhound. * @returns A JqueryAjaxSettings object. @@ -1050,22 +1050,22 @@ declare module Bloodhound { wildcard?: string; /** - * The method used to rate-limit network requests. + * The method used to rate-limit network requests. * Can be either debounce or throttle. Defaults to debounce. */ rateLimitby?: string; - + /** - * The time interval in milliseconds that will be used by rateLimitBy. + * The time interval in milliseconds that will be used by rateLimitBy. * Defaults to 300. */ rateLimitWait?: number; /** * A function with the signature transform(response) that allows you to - * transform the remote response before the Bloodhound instance operates on it. + * transform the remote response before the Bloodhound instance operates on it. * Defaults to the identity function. - * + * * @param response Prefetch response. * @returns Transform response. */ @@ -1080,7 +1080,7 @@ declare module Bloodhound { * Split a given string on whitespace characters. */ whitespace(str: string): string[]; - + /** * Split a given string on non-word characters. */ @@ -1106,21 +1106,21 @@ declare module Bloodhound { } /** - * Bloodhound is the typeahead.js suggestion engine. Bloodhound is robust, - * flexible, and offers advanced functionalities such as prefetching, + * Bloodhound is the typeahead.js suggestion engine. Bloodhound is robust, + * flexible, and offers advanced functionalities such as prefetching, * intelligent caching, fast lookups, and backfilling with remote data. */ declare class Bloodhound { /** * The constructor function. - * + * * @constructor * @param options Options hash. */ constructor(options: Bloodhound.BloodhoundOptions); /** - * Returns a reference to Bloodhound and reverts window.Bloodhound to its + * Returns a reference to Bloodhound and reverts window.Bloodhound to its * previous value. Can be used to avoid naming collisions. */ public static noConflict(): Bloodhound; @@ -1132,17 +1132,17 @@ declare class Bloodhound { public static tokenizers: Bloodhound.Tokenizers; /** - * Kicks off the initialization of the suggestion engine. Initialization - * entails adding the data provided by local and prefetch to the internal - * search index as well as setting up transport mechanism used by remote. + * Kicks off the initialization of the suggestion engine. Initialization + * entails adding the data provided by local and prefetch to the internal + * search index as well as setting up transport mechanism used by remote. * Before #initialize is called, the #get and #search methods will effectively be no-ops. * * Note, unless the initialize option is false, this method is implicitly called by the constructor. - * - * After initialization, how subsequent invocations of #initialize behave depends on - * the reinitialize argument. If reinitialize is falsy, the method will not execute the - * initialization logic and will just return the same jQuery promise returned - * by the initial invocation. If reinitialize is truthy, the method will behave + * + * After initialization, how subsequent invocations of #initialize behave depends on + * the reinitialize argument. If reinitialize is falsy, the method will not execute the + * initialization logic and will just return the same jQuery promise returned + * by the initial invocation. If reinitialize is truthy, the method will behave * as if it were being called for the first time. * * @param reinitialize How subsequent invocations of #initialize will behave. @@ -1151,7 +1151,7 @@ declare class Bloodhound { public initialize(reinitialize?: boolean): JQueryPromise; /** - * Takes one argument, data, which is expected to be an array. + * Takes one argument, data, which is expected to be an array. * The data passed in will get added to the internal search index. * * @param data Data to be added to the internal search index. @@ -1167,11 +1167,11 @@ declare class Bloodhound { public get(ids: number[]): T[]; /** - * Returns the data that matches query. Matches found in the local search - * index will be passed to the sync callback. If the data passed to sync - * doesn't contain at least sufficient number of datums, remote data will + * Returns the data that matches query. Matches found in the local search + * index will be passed to the sync callback. If the data passed to sync + * doesn't contain at least sufficient number of datums, remote data will * be requested and then passed to the async callback. - * + * * @param query Query. * @param sync Sync callback * @param async Async callback. diff --git a/typescript-deferred/typescript-deferred.d.ts b/typescript-deferred/typescript-deferred.d.ts index bffc65b70f..b99fca95a5 100644 --- a/typescript-deferred/typescript-deferred.d.ts +++ b/typescript-deferred/typescript-deferred.d.ts @@ -42,6 +42,6 @@ declare module "typescript-deferred" { export function create(): DeferredInterface; export function when(value?: ThenableInterface): PromiseInterface; export function when(value?: T): PromiseInterface; - + } From 2da55a09042047ef9ecd8cafd5c1ed97d216ba29 Mon Sep 17 00:00:00 2001 From: Charly Delay Date: Tue, 26 Jan 2016 17:36:05 +0100 Subject: [PATCH 39/65] highlight.js: support v9.1.0 * expose hljs.COMMENT() * IModeBase.begin and IModeBase.end accept types string and RegExp --- highlightjs/highlightjs.d.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/highlightjs/highlightjs.d.ts b/highlightjs/highlightjs.d.ts index 8a0eceab52..5d6f89c711 100644 --- a/highlightjs/highlightjs.d.ts +++ b/highlightjs/highlightjs.d.ts @@ -1,4 +1,4 @@ -// Type definitions for highlight.js v8.2.0 +// Type definitions for highlight.js v9.1.0 // Project: https://github.com/isagalaev/highlight.js // Definitions by: Niklas Mollenhauer , Jeremy Hull // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -35,6 +35,11 @@ declare module hljs export function inherit(parent: Object, obj: Object): Object; + export function COMMENT( + begin: (string|RegExp), + end: (string|RegExp), + inherits: IModeBase): IMode; + // Common regexps export var IDENT_RE: string; export var UNDERSCORE_IDENT_RE: string; @@ -111,8 +116,8 @@ declare module hljs { className?: string; aliases?: string[]; - begin?: string; - end?: string; + begin?: (string|RegExp); + end?: (string|RegExp); case_insensitive?: boolean; beginKeyword?: string; endsWithParent?: boolean; From 0f4d651f755fd7012ccd0df15f893ceda85922a0 Mon Sep 17 00:00:00 2001 From: Xavier Stouder Date: Wed, 27 Jan 2016 13:50:07 +0100 Subject: [PATCH 40/65] Fix tab --- gandi-livedns/gandi-livedns-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gandi-livedns/gandi-livedns-tests.ts b/gandi-livedns/gandi-livedns-tests.ts index 36ff0f14d7..882f60a64b 100644 --- a/gandi-livedns/gandi-livedns-tests.ts +++ b/gandi-livedns/gandi-livedns-tests.ts @@ -1,7 +1,7 @@ /// let zone: ZoneRecord = { - rrset_name: "MyZone", + rrset_name: "MyZone", rrset_type: "AAAA", rrset_ttl: 10800, rrset_values: [] From c891948be21d354da885ea0b47c5f624d12ddda0 Mon Sep 17 00:00:00 2001 From: Isman Usoh Date: Wed, 27 Jan 2016 21:24:52 +0700 Subject: [PATCH 41/65] add type definitions from react-router-redux --- .../react-router-redux-tests.ts | 20 ++++++++ react-router-redux/react-router-redux.d.ts | 48 +++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 react-router-redux/react-router-redux-tests.ts create mode 100644 react-router-redux/react-router-redux.d.ts diff --git a/react-router-redux/react-router-redux-tests.ts b/react-router-redux/react-router-redux-tests.ts new file mode 100644 index 0000000000..98fcdca1be --- /dev/null +++ b/react-router-redux/react-router-redux-tests.ts @@ -0,0 +1,20 @@ +/// +/// +/// + + + +import { createStore, combineReducers, applyMiddleware } from 'redux'; +import { browserHistory } from 'react-router'; +import { syncHistory, routeReducer } from 'react-router-redux'; + +const reducer = combineReducers({ routing: routeReducer }); + +// Sync dispatched route actions to the history +const reduxRouterMiddleware = syncHistory(browserHistory); +const createStoreWithMiddleware = applyMiddleware(reduxRouterMiddleware)(createStore); + +const store = createStoreWithMiddleware(reducer); + +// Required for replaying actions from devtools to +reduxRouterMiddleware.listenForReplays(store); diff --git a/react-router-redux/react-router-redux.d.ts b/react-router-redux/react-router-redux.d.ts new file mode 100644 index 0000000000..1c67b3baf5 --- /dev/null +++ b/react-router-redux/react-router-redux.d.ts @@ -0,0 +1,48 @@ +// Type definitions for react-router v2.1.0 +// Project: https://github.com/rackt/react-router-redux +// Definitions by: Isman Usoh , Noah Shipley , Dimitri Rosenberg +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// +/// + +declare module ReactRouterRedux { + import R = Redux; + import H = HistoryModule; + + const TRANSITION: string; + const UPDATE_LOCATION: string; + + const push: PushAction; + const replace: ReplaceAction; + const go: GoAction; + const goBack: GoForwardAction; + const goForward: GoBackAction; + const routeActions: RouteActions; + + type LocationDescriptor = H.Location | H.Path; + type PushAction = (nextLocation: LocationDescriptor) => void; + type ReplaceAction = (nextLocation: LocationDescriptor) => void; + type GoAction = (n: number) => void; + type GoForwardAction = () => void; + type GoBackAction = () => void; + + interface RouteActions { + push: PushAction; + replace: ReplaceAction; + go: GoAction; + goForward: GoForwardAction; + goBack: GoBackAction; + } + interface HistoryMiddleware extends R.Middleware { + listenForReplays(store: R.Store, selectLocationState?: Function): void; + unsubscribe(): void; + } + + function routeReducer(state?: any, options?: any): R.Reducer; + function syncHistory(history: H.History): HistoryMiddleware; +} + +declare module "react-router-redux" { + export = ReactRouterRedux; +} From 422c5d768d0ad6cb96a5c0a0bbc8f09fd5e3d4a9 Mon Sep 17 00:00:00 2001 From: tkqubo Date: Wed, 27 Jan 2016 23:29:51 +0900 Subject: [PATCH 42/65] copy all the classes from node-asana --- asana/asana-tests.ts | 6 + asana/asana.d.ts | 1927 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 1933 insertions(+) create mode 100644 asana/asana-tests.ts create mode 100644 asana/asana.d.ts diff --git a/asana/asana-tests.ts b/asana/asana-tests.ts new file mode 100644 index 0000000000..30990d42c0 --- /dev/null +++ b/asana/asana-tests.ts @@ -0,0 +1,6 @@ +/// + +import * as asana from 'asana'; + +let version: string = asana.VERSION; + diff --git a/asana/asana.d.ts b/asana/asana.d.ts new file mode 100644 index 0000000000..267814376e --- /dev/null +++ b/asana/asana.d.ts @@ -0,0 +1,1927 @@ +// Type definitions for node-asana 0.14.0 +// Project: https://github.com/Asana/node-asana +// Definitions by: Qubo +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// +/// + +declare module "asana" { + namespace asana { + var Client: ClientStatic; + + interface ClientStatic { + /** + * Constructs a Client with instances of all the resources using the dispatcher. + * It also keeps a reference to the dispatcher so that way the end user can have + * access to it. + * @class + * @classdesc A wrapper for the Asana API which is authenticated for one user + * @param {Dispatcher} dispatcher The request dispatcher to use + * @param {Object} options Options to configure the client + * @param {String} [clientId] ID of the client, required for Oauth + * @param {String} [clientSecret] Secret key, for some Oauth flows + * @param {String} [redirectUri] Default redirect URI for this client + * @param {String} [asanaBaseUrl] Base URL for Asana, for debugging + */ + (dispatcher : any, options : any): asana.Client; + /** + * Creates a new client. + * @param {Object} options Options for specifying the client, see constructor. + */ + create(options?: any): any; + } + + interface Client { + /** + * @param dispatcher + * @param options + */ + (dispatcher : any, options : any): Client; + + /** + * Ensures the client is authorized to make requests. Kicks off the + * configured Oauth flow, if any. + * + * @returns {Promise} A promise that resolves to this client when + * authorization is complete. + */ + authorize(): void; + + /** + * Configure the Client to use a user's API Key and then authenticate + * through HTTP Basic Authentication. This should only be done for testing, + * as requests using Oauth can provide more security, higher rate limits, and + * more features. + * @param {String} apiKey The Asana Api Key of the user + * @return {Client} this + * @param apiKey + * @return + */ + useBasicAuth(apiKey : string): any; + + /** + * Configure the client to authenticate using a Personal Access Token. + * @param {String} accessToken The Personal Access Token to use for + * authenticating requests. + * @return {Client} this + * @param accessToken + * @return + */ + useAccessToken(accessToken : string): any; + + /** + * Configure the client to authenticate via Oauth. Credentials can be + * supplied, or they can be obtained by running an Oauth flow. + * @param {Object} options Options for Oauth. Includes any options for + * the selected flow. + * @option {Function} [flowType] Type of OauthFlow to use to obtain user + * authorization. Defaults to autodetect based on environment. + * @option {Object} [credentials] Credentials to use; no flow required to + * obtain authorization. This object should at a minimum contain an + * `access_token` string field. + * @return {Client} this + * @param options + * @return + */ + useOauth(options : any): Client; + + /** + * Creates a new client. + * @param {Object} options Options for specifying the client, see constructor. + * @param options + * @return + */ + create(options : any): Client; + } + + var Dispatcher: DispatcherStatic; + + interface DispatcherStatic { + /** + * Creates a dispatcher which will act as a basic wrapper for making HTTP + * requests to the API, and handle authentication. + * @class + * @classdesc A HTTP wrapper for the Asana API + * @param {Object} options for default behavior of the Dispatcher + * @option {Authenticator} [authenticator] Object to use for authentication. + * Can also be set later with `setAuthenticator`. + * @option {String} [retryOnRateLimit] Automatically handle `RateLimitEnforced` + * errors by sleeping and retrying after the waiting period. + * @option {Function} [handleUnauthorized] Automatically handle + * `NoAuthorization` with the callback. If the callback returns `true` + * (or a promise resolving to `true), will retry the request. + * @option {String} [asanaBaseUrl] Base URL for Asana, for debugging + * @option {Number} [requestTimeout] Timeout (in milliseconds) to wait for the + * request to finish. + */ + new (options : any): Dispatcher; + } + + interface Dispatcher { + /** + * Creates an Asana API Url by concatenating the ROOT_URL with path provided. + * @param {String} path The path + * @return {String} The url + * @param path + * @return + */ + url(path : string): string; + + /** + * Configure the authentication mechanism to use. + * @returns {Dispatcher} this + * @param authenticator + * @return + */ + setAuthenticator(authenticator : any): Dispatcher; + + /** + * Ensure the dispatcher is authorized to make requests. Call this before + * making any API requests. + * + * @returns {Promise} Resolves when the dispatcher is authorized, rejected if + * there was a problem authorizing. + * @return + */ + authorize(): any; + + /** + * Dispatches a request to the Asana API. The request parameters are passed to + * the request module. + * @param {Object} params The params for request + * @param {Object} [dispatchOptions] Options for handling request/response + * @return {Promise} The response for the request + * @param params + * @param dispatchOptions? + * @return + */ + dispatch(params : any, dispatchOptions? : any): any; + + /** + * Dispatches a GET request to the Asana API. + * @param {String} path The path of the API + * @param {Object} [query] The query params + * @param {Object} [dispatchOptions] Options for handling the request and + * response. See `dispatch`. + * @return {Promise} The response for the request + * @param path + * @param query? + * @param dispatchOptions? + * @return + */ + get(path : string, query? : any, dispatchOptions? : any): any; + + /** + * Dispatches a POST request to the Asana API. + * @param {String} path The path of the API + * @param {Object} data The data to be sent + * @param {Object} [dispatchOptions] Options for handling the request and + * response. See `dispatch`. + * @return {Promise} The response for the request + * @param path + * @param data + * @param dispatchOptions? + * @return + */ + post(path : string, data : any, dispatchOptions? : any): any; + + /** + * Dispatches a PUT request to the Asana API. + * @param {String} path The path of the API + * @param {Object} data The data to be sent + * @param {Object} [dispatchOptions] Options for handling the request and + * response. See `dispatch`. + * @return {Promise} The response for the request + * @param path + * @param data + * @param dispatchOptions? + * @return + */ + put(path : string, data : any, dispatchOptions? : any): any; + + /** + * Dispatches a DELETE request to the Asana API. + * @param {String} path The path of the API + * @param {Object} [dispatchOptions] Options for handling the request and + * response. See `dispatch`. + * @return {Promise} The response for the request + * @param path + * @param dispatchOptions? + * @return + */ + delete(path : string, dispatchOptions? : any): any; + + /** + * The relative API path for the current version of the Asana API. + * @type {String} + */ + API_PATH : string; + + /** + * Default handler for requests that are considered unauthorized. + * Requests that the authenticator try to refresh its credentials if + * possible. + * @return {Promise} True iff refresh was successful, false if not. + * @return + */ + maybeReauthorize(): boolean; + + /** + * The base URL for Asana + * @type {String} + */ + asanaBaseUrl : string; + + /** + * Whether requests should be automatically retried if rate limited. + * @type {Boolean} + */ + retryOnRateLimit : boolean; + + /** + * Handler for unauthorized requests which may seek reauthorization. + * Default behavior is available if configured with an Oauth authenticator + * that has a refresh token, and will refresh the current access token. + * @type {Function} + */ + handleUnauthorized : Function; + + /** + * The amount of time in milliseconds to wait for a request to finish. + * @type {Number} + */ + requestTimeout : number; + } + + namespace auth { + var App: AppStatic; + + interface AppStatic { + /** + * An abstraction around an App used with Asana. + * + * @options {Object} Options to construct the app + * @option {String} clientId The ID of the app + * @option {String} [clientSecret] The secret key, if available here + * @option {String} [redirectUri] The default redirect URI + * @option {String} [scope] Scope to use, supports `default` and `scim` + * @option {String} [asanaBaseUrl] Base URL to use for Asana, for debugging + * @constructor + */ + new (options : any): App; + } + + interface App { + /** + * @param {Object} options Overrides to the app's defaults + * @option {String} asanaBaseUrl + * @option {String} redirectUri + * @returns {String} The URL used to authorize a user for the app. + * @param options + * @return + */ + asanaAuthorizeUrl(options : any): string; + + /** + * @param {Object} options Overrides to the app's defaults + * @option {String} asanaBaseUrl + * @option {String} redirectUri + * @returns {String} The URL used to acquire an access token. + * @param options + * @return + */ + asanaTokenUrl(options : any): string; + + /** + * @param {String} code An authorization code obtained via `asanaAuthorizeUrl`. + * @param {Object} options Overrides to the app's defaults + * @option {String} asanaBaseUrl + * @option {String} redirectUri + * @return {Promise} The token, which will include the `access_token` + * used for API access, as well as a `refresh_token` which can be stored + * to get a new access token without going through the flow again. + * @param code + * @param options + * @return + */ + accessTokenFromCode(code : string, options : any): any; + + /** + * @param {String} refreshToken A refresh token obtained via Oauth. + * @param {Object} options Overrides to the app's defaults + * @option {String} asanaBaseUrl + * @option {String} redirectUri + * @return {Promise} The token, which will include the `access_token` + * used for API access. + * @param refreshToken + * @param options + * @return + */ + accessTokenFromRefreshToken(refreshToken : string, options : any): any; + + scope : string; + + asanaBaseUrl : string; + } + + var OauthError: OauthErrorStatic; + + interface OauthErrorStatic { + /** + * @param options {Object} A data blob parsed from a query string or JSON + * response from the Asana API + * @option {String} error The string code identifying the error. + * @option {String} [error_uri] A link to help and information about the error. + * @option {String} [error_description] A description of the error. + * @constructor + */ + new (options : any): OauthError; + } + + interface OauthError { } + + /** + * Auto-detects the type of Oauth flow to use that's appropriate to the + * environment. + * + * @returns {Function|null} The type of Oauth flow to use, or null if no + * appropriate type could be determined. + * @param env + * @return + */ + function autoDetect(env : any): Function; + + var RedirectFlow: RedirectFlowStatic; + + interface RedirectFlowStatic { + /** + * An Oauth flow that runs in the browser and requests user authorization by + * redirecting to an authorization page on Asana, and redirecting back with + * the credentials. + * @param {Object} options See `BaseBrowserFlow` for options. + * @constructor + */ + new (options : any): RedirectFlow; + } + + interface RedirectFlow { + getStateParam(): void; + + /** + * + * @param authUrl + */ + startAuthorization(authUrl : any): void; + + finishAuthorization(): void; + } + + var PopupFlow: PopupFlowStatic; + + interface PopupFlowStatic { + /** + * An Oauth flow that runs in the browser and requests user authorization by + * popping up a window and prompting the user. + * @param {Object} options See `BaseBrowserFlow` for options. + * @constructor + */ + new (options : any): PopupFlow; + } + + interface PopupFlow { + /** + * @param authUrl + * @param state + */ + startAuthorization(authUrl : any, state : any): void; + + /** + * @return + */ + finishAuthorization(): any; + + /** + * @param popupWidth + * @param popupHeight + */ + _popupParams(popupWidth : number, popupHeight : number): void; + + runReceiver(): void; + } + + var NativeFlow: NativeFlowStatic; + + interface NativeFlowStatic { + /** + * An Oauth flow that can be run from the console or an app that does + * not have the ability to open and manage a browser on its own. + * @param {Object} options + * @option {App} app App to authenticate for + * @option {String function(String)} [instructions] Function returning the + * instructions to output to the user. Passed the authorize url. + * @option {String function()} [prompt] String to output immediately before + * waiting for a line from stdin. + * @constructor + */ + new (options : any): NativeFlow; + } + + interface NativeFlow { + /** + * Run the Oauth flow, prompting the user to go to the authorization URL + * and enter the code it displays when finished. + * + * @return {Promise} The access token object, which will include + * `access_token` and `refresh_token`. + */ + run(): void; + + /** + * @returns {String} The URL used to authorize the user for the app. + * @return + */ + authorizeUrl(): string; + + /** + * @param {String} code An authorization code obtained via `asanaAuthorizeUrl`. + * @return {Promise} The token, which will include the `access_token` + * used for API access, as well as a `refresh_token` which can be stored + * to get a new access token without going through the flow again. + * @param code + */ + accessToken(code : string): void; + + /** + * @return {Promise} The access token, which will include a refresh token + * that can be stored in the future to create a client without going + * through the Oauth flow. + * @param url + * @return + */ + promptForCode(url : string): any; + } + + var ChromeExtensionFlow: ChromeExtensionFlowStatic; + + interface ChromeExtensionFlowStatic { + /** + * An Oauth flow that runs in a Chrome browser extension and requests user + * authorization by opening a temporary tab to prompt the user. + * @param {Object} options See `BaseBrowserFlow` for options, plus the below: + * @options {String} [receiverPath] Full path and filename from the base + * directory of the extension to the receiver page. This is an HTML file + * that has been made web-accessible, and that calls the receiver method + * `Asana.auth.ChromeExtensionFlow.runReceiver();`. + * @constructor + */ + new (options : any): ChromeExtensionFlow; + } + + interface ChromeExtensionFlow { + /** + * @return + */ + receiverUrl(): any; + + /** + * + * @param authUrl + * @param state + */ + startAuthorization(authUrl : any, state : any): void; + + /** + * @return + */ + finishAuthorization(): any; + + /** + * Runs the receiver code to send the Oauth result to the requesting tab. + */ + runReceiver(): void; + } + + var BaseBrowserFlow: BaseBrowserFlowStatic; + + interface BaseBrowserFlowStatic { + /** + * A base class for any flow that runs in the browser. All subclasses use the + * "implicit grant" flow to authenticate via the browser. + * @param {Object} options + * @option {App} app The app this flow is for + * @option {String} [redirectUri] The URL that Asana should redirect to once + * user authorization is complete. Defaults to the URL configured in + * the app, and if none then the current page URL. + * @constructor + */ + new (options : any): BaseBrowserFlow; + } + + interface BaseBrowserFlow { + /** + * @param {String} authUrl The URL the user should be navigated to in order + * to authorize the app. + * @param {String} state The unique state generated for this auth request. + * @return {Promise} Resolved when authorization has successfully started, + * i.e. the user has been navigated to a page requesting authorization. + * @param authUrl + * @param state + * @return + */ + startAuthorization(authUrl : string, state : string): any; + + /** + * @return {Promise} Credentials returned from Oauth. + * @param state + */ + finishAuthorization(state : string): void; + + /** + * @return {String} The URL to redirect to that will receive the + * @return + */ + receiverUrl(): string; + + /** + * @return {String} The URL to redirect to that will receive the + * @return + */ + asanaBaseUrl(): string; + + /** + * @returns {String} Generate a new unique state parameter for a request. + * @return + */ + getStateParam(): string; + + /** + * @returns {String} The URL used to authorize the user for the app. + * @return + */ + authorizeUrl(): string; + + /** + * Run the appropriate parts of the Oauth flow, attempting to establish user + * authorization. + * @returns {Promise} A promise that resolves to the Oauth credentials. + */ + run(): void; + } + } + + namespace errors { + class AsanaError { + /** + * @param message + * @return + */ + constructor(message : any); + } + + class Forbidden { + /** + * @param value + * @return + */ + constructor(value : any); + } + + + class InvalidRequest { + /** + * @param value + * @return + */ + constructor(value : any); + } + + class NoAuthorization { + /** + * @param value + * @return + */ + constructor(value : any); + } + + class NotFound { + /** + * @param value + * @return + */ + constructor(value : any); + } + + class RateLimitEnforced { + /** + * @param value + * @return + */ + constructor(value : any); + } + + class ServerError { + /** + * @param value + * @return + */ + constructor(value : any); + } + } + + namespace resources { + /** + * An _attachment_ object represents any file attached to a task in Asana, + * whether it's an uploaded file or one associated via a third-party service + * such as Dropbox or Google Drive. + * @class + * @param {Dispatcher} dispatcher The API dispatcher + */ + class Attachments { + /** + * @param dispatcher + */ + constructor(dispatcher : any); + + /** + * * Returns the full record for a single attachment. + * * @param {String} attachment Globally unique identifier for the attachment. + * * @param {Object} [params] Parameters for the request + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The requested resource + * @param attachment + * @param params? + * @param dispatchOptions? + * @return + */ + findById(attachment : string, params? : any, dispatchOptions? : any): any; + + /** + * * Returns the compact records for all attachments on the task. + * * @param {String} task Globally unique identifier for the task. + * * @param {Object} [params] Parameters for the request + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param task + * @param params? + * @param dispatchOptions? + * @return + */ + findByTask(task : string, params? : any, dispatchOptions? : any): any; + } + + /** + * An _event_ is an object representing a change to a resource that was observed + * by an event subscription. + * + * In general, requesting events on a resource is faster and subject to higher + * rate limits than requesting the resource itself. Additionally, change events + * bubble up - listening to events on a project would include when stories are + * added to tasks in the project, even on subtasks. + * + * Establish an initial sync token by making a request with no sync token. + * The response will be a `412` error - the same as if the sync token had + * expired. + * + * Subsequent requests should always provide the sync token from the immediately + * preceding call. + * + * Sync tokens may not be valid if you attempt to go 'backward' in the history + * by requesting previous tokens, though re-requesting the current sync token + * is generally safe, and will always return the same results. + * + * When you receive a `412 Precondition Failed` error, it means that the + * sync token is either invalid or expired. If you are attempting to keep a set + * of data in sync, this signals you may need to re-crawl the data. + * + * Sync tokens always expire after 24 hours, but may expire sooner, depending on + * load on the service. + * @class + * @param {Dispatcher} dispatcher The API dispatcher + */ + class Events { + /** + * @param dispatcher + * @return + */ + constructor(dispatcher : any); + } + + /** + * A _project_ represents a prioritized list of tasks in Asana. It exists in a + * single workspace or organization and is accessible to a subset of users in + * that workspace or organization, depending on its permissions. + * + * Projects in organizations are shared with a single team. You cannot currently + * change the team of a project via the API. Non-organization workspaces do not + * have teams and so you should not specify the team of project in a + * regular workspace. + * @class + * @param {Dispatcher} dispatcher The API dispatcher + */ + class Projects { + /** + * @param dispatcher + */ + constructor(dispatcher : any); + + /** + * * Creates a new project in a workspace or team. + * * + * * Every project is required to be created in a specific workspace or + * * organization, and this cannot be changed once set. Note that you can use + * * the `workspace` parameter regardless of whether or not it is an + * * organization. + * * + * * If the workspace for your project _is_ an organization, you must also + * * supply a `team` to share the project with. + * * + * * Returns the full record of the newly created project. + * * @param {Object} data Data for the request + * * @param {String} data.workspace The workspace or organization to create the project in. + * * @param {String} [data.team] If creating in an organization, the specific team to create the + * * project in. + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param data + * @param dispatchOptions? + * @return + */ + create(data : any, dispatchOptions? : any): any; + + /** + * * If the workspace for your project _is_ an organization, you must also + * * supply a `team` to share the project with. + * * + * * Returns the full record of the newly created project. + * * @param {String} workspace The workspace or organization to create the project in. + * * @param {Object} data Data for the request + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param workspace + * @param data + * @param dispatchOptions? + * @return + */ + createInWorkspace(workspace : string, data : any, dispatchOptions? : any): any; + + /** + * * Creates a project shared with the given team. + * * + * * Returns the full record of the newly created project. + * * @param {String} team The team to create the project in. + * * @param {Object} data Data for the request + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param team + * @param data + * @param dispatchOptions? + * @return + */ + createInTeam(team : string, data : any, dispatchOptions? : any): any; + + /** + * * Returns the complete project record for a single project. + * * @param {String} project The project to get. + * * @param {Object} [params] Parameters for the request + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The requested resource + * @param project + * @param params? + * @param dispatchOptions? + * @return + */ + findById(project : string, params? : any, dispatchOptions? : any): any; + + /** + * * A specific, existing project can be updated by making a PUT request on the + * * URL for that project. Only the fields provided in the `data` block will be + * * updated; any unspecified fields will remain unchanged. + * * + * * When using this method, it is best to specify only those fields you wish + * * to change, or else you may overwrite changes made by another user since + * * you last retrieved the task. + * * + * * Returns the complete updated project record. + * * @param {String} project The project to update. + * * @param {Object} data Data for the request + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param project + * @param data + * @param dispatchOptions? + * @return + */ + update(project : string, data : any, dispatchOptions? : any): any; + + /** + * * A specific, existing project can be deleted by making a DELETE request + * * on the URL for that project. + * * + * * Returns an empty data record. + * * @param {String} project The project to delete. + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param project + * @param dispatchOptions? + * @return + */ + delete(project : string, dispatchOptions? : any): any; + + /** + * * Returns the compact project records for some filtered set of projects. + * * Use one or more of the parameters provided to filter the projects returned. + * * @param {Object} [params] Parameters for the request + * * @param {String} [params.workspace] The workspace or organization to filter projects on. + * * @param {String} [params.team] The team to filter projects on. + * * @param {Boolean} [params.archived] Only return projects whose `archived` field takes on the value of + * * this parameter. + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param params? + * @param dispatchOptions? + * @return + */ + findAll(params? : any, dispatchOptions? : any): any; + + /** + * * Returns the compact project records for all projects in the workspace. + * * @param {String} workspace The workspace or organization to find projects in. + * * @param {Object} [params] Parameters for the request + * * @param {Boolean} [params.archived] Only return projects whose `archived` field takes on the value of + * * this parameter. + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param workspace + * @param params? + * @param dispatchOptions? + * @return + */ + findByWorkspace(workspace : string, params? : any, dispatchOptions? : any): any; + + /** + * * Returns the compact project records for all projects in the team. + * * @param {String} team The team to find projects in. + * * @param {Object} [params] Parameters for the request + * * @param {Boolean} [params.archived] Only return projects whose `archived` field takes on the value of + * * this parameter. + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param team + * @param params? + * @param dispatchOptions? + * @return + */ + findByTeam(team : string, params? : any, dispatchOptions? : any): any; + + /** + * * Returns compact records for all sections in the specified project. + * * @param {String} project The project to get sections from. + * * @param {Object} [params] Parameters for the request + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param project + * @param params? + * @param dispatchOptions? + * @return + */ + sections(project : string, params? : any, dispatchOptions? : any): any; + + /** + * * Returns the compact task records for all tasks within the given project, + * * ordered by their priority within the project. Tasks can exist in more than one project at a time. + * * @param {String} project The project in which to search for tasks. + * * @param {Object} [params] Parameters for the request + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param project + * @param params? + * @param dispatchOptions? + * @return + */ + tasks(project : string, params? : any, dispatchOptions? : any): any; + + /** + * * Adds the specified list of users as followers to the project. Followers are a subset of members, therefore if + * * the users are not already members of the project they will also become members as a result of this operation. + * * Returns the updated project record. + * * @param {String} project The project to add followers to. + * * @param {Object} data Data for the request + * * @param {Array} data.followers An array of followers to add to the project. + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param project + * @param data + * @param dispatchOptions? + * @return + */ + addFollowers(project : string, data : any, dispatchOptions? : any): any; + + /** + * * Removes the specified list of users from following the project, this will not affect project membership status. + * * Returns the updated project record. + * * @param {String} project The project to remove followers from. + * * @param {Object} data Data for the request + * * @param {Array} data.followers An array of followers to remove from the project. + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param project + * @param data + * @param dispatchOptions? + * @return + */ + removeFollowers(project : string, data : any, dispatchOptions? : any): any; + + /** + * * Adds the specified list of users as members of the project. Returns the updated project record. + * * @param {String} project The project to add members to. + * * @param {Object} data Data for the request + * * @param {Array} data.members An array of members to add to the project. + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param project + * @param data + * @param dispatchOptions? + * @return + */ + addMembers(project : string, data : any, dispatchOptions? : any): any; + + /** + * * Removes the specified list of members from the project. Returns the updated project record. + * * @param {String} project The project to remove members from. + * * @param {Object} data Data for the request + * * @param {Array} data.members An array of members to remove from the project. + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param project + * @param data + * @param dispatchOptions? + * @return + */ + removeMembers(project : string, data : any, dispatchOptions? : any): any; + } + + /** + * A _story_ represents an activity associated with an object in the Asana + * system. Stories are generated by the system whenever users take actions such + * as creating or assigning tasks, or moving tasks between projects. _Comments_ + * are also a form of user-generated story. + * + * Stories are a form of history in the system, and as such they are read-only. + * Once generated, it is not possible to modify a story. + * @class + * @param {Dispatcher} dispatcher The API dispatcher + */ + class Stories { + /** + * + * @param dispatcher + */ + constructor(dispatcher : any); + + /** + * * Returns the compact records for all stories on the task. + * * @param {String} task Globally unique identifier for the task. + * * @param {Object} [params] Parameters for the request + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param task + * @param params? + * @param dispatchOptions? + * @return + */ + findByTask(task : string, params? : any, dispatchOptions? : any): any; + + /** + * * Returns the full record for a single story. + * * @param {String} story Globally unique identifier for the story. + * * @param {Object} [params] Parameters for the request + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The requested resource + * @param story + * @param params? + * @param dispatchOptions? + * @return + */ + findById(story : string, params? : any, dispatchOptions? : any): any; + + /** + * * Adds a comment to a task. The comment will be authored by the + * * currently authenticated user, and timestamped when the server receives + * * the request. + * * + * * Returns the full record for the new story added to the task. + * * @param {String} task Globally unique identifier for the task. + * * @param {Object} data Data for the request + * * @param {String} data.text The plain text of the comment to add. + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param task + * @param data + * @param dispatchOptions? + * @return + */ + createOnTask(task : string, data : any, dispatchOptions? : any): any; + } + + /** + * A _tag_ is a label that can be attached to any task in Asana. It exists in a + * single workspace or organization. + * + * Tags have some metadata associated with them, but it is possible that we will + * simplify them in the future so it is not encouraged to rely too heavily on it. + * Unlike projects, tags do not provide any ordering on the tasks they + * are associated with. + * @class + * @param {Dispatcher} dispatcher The API dispatcher + */ + class Tags { + /** + * @param dispatcher + */ + constructor(dispatcher : any); + + /** + * * Creates a new tag in a workspace or organization. + * * + * * Every tag is required to be created in a specific workspace or + * * organization, and this cannot be changed once set. Note that you can use + * * the `workspace` parameter regardless of whether or not it is an + * * organization. + * * + * * Returns the full record of the newly created tag. + * * @param {Object} data Data for the request + * * @param {String} data.workspace The workspace or organization to create the tag in. + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param data + * @param dispatchOptions? + * @return + */ + create(data : any, dispatchOptions? : any): any; + + /** + * * Creates a new tag in a workspace or organization. + * * + * * Every tag is required to be created in a specific workspace or + * * organization, and this cannot be changed once set. Note that you can use + * * the `workspace` parameter regardless of whether or not it is an + * * organization. + * * + * * Returns the full record of the newly created tag. + * * @param {String} workspace The workspace or organization to create the tag in. + * * @param {Object} data Data for the request + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param workspace + * @param data + * @param dispatchOptions? + * @return + */ + createInWorkspace(workspace : string, data : any, dispatchOptions? : any): any; + + /** + * * Returns the complete tag record for a single tag. + * * @param {String} tag The tag to get. + * * @param {Object} [params] Parameters for the request + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The requested resource + * @param tag + * @param params? + * @param dispatchOptions? + * @return + */ + findById(tag : string, params? : any, dispatchOptions? : any): any; + + /** + * * Updates the properties of a tag. Only the fields provided in the `data` + * * block will be updated; any unspecified fields will remain unchanged. + * * + * * When using this method, it is best to specify only those fields you wish + * * to change, or else you may overwrite changes made by another user since + * * you last retrieved the task. + * * + * * Returns the complete updated tag record. + * * @param {String} tag The tag to update. + * * @param {Object} data Data for the request + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param tag + * @param data + * @param dispatchOptions? + * @return + */ + update(tag : string, data : any, dispatchOptions? : any): any; + + /** + * * A specific, existing tag can be deleted by making a DELETE request + * * on the URL for that tag. + * * + * * Returns an empty data record. + * * @param {String} tag The tag to delete. + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param tag + * @param dispatchOptions? + * @return + */ + delete(tag : string, dispatchOptions? : any): any; + + /** + * * Returns the compact tag records for some filtered set of tags. + * * Use one or more of the parameters provided to filter the tags returned. + * * @param {Object} [params] Parameters for the request + * * @param {String} [params.workspace] The workspace or organization to filter tags on. + * * @param {String} [params.team] The team to filter tags on. + * * @param {Boolean} [params.archived] Only return tags whose `archived` field takes on the value of + * * this parameter. + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param params? + * @param dispatchOptions? + * @return + */ + findAll(params? : any, dispatchOptions? : any): any; + + /** + * * Returns the compact tag records for all tags in the workspace. + * * @param {String} workspace The workspace or organization to find tags in. + * * @param {Object} [params] Parameters for the request + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param workspace + * @param params? + * @param dispatchOptions? + * @return + */ + findByWorkspace(workspace : string, params? : any, dispatchOptions? : any): any; + + /** + * * Returns the compact task records for all tasks with the given tag. + * * Tasks can have more than one tag at a time. + * * @param {String} tag The tag to fetch tasks from. + * * @param {Object} [params] Parameters for the request + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param tag + * @param params? + * @param dispatchOptions? + * @return + */ + getTasksWithTag(tag : string, params? : any, dispatchOptions? : any): any; + } + + /** + * The _task_ is the basic object around which many operations in Asana are + * centered. In the Asana application, multiple tasks populate the middle pane + * according to some view parameters, and the set of selected tasks determines + * the more detailed information presented in the details pane. + * @class + * @param {Dispatcher} dispatcher The API dispatcher + */ + class Tasks { + /** + * @param dispatcher + */ + constructor(dispatcher : any); + + /** + * * Creating a new task is as easy as POSTing to the `/tasks` endpoint + * * with a data block containing the fields you'd like to set on the task. + * * Any unspecified fields will take on default values. + * * + * * Every task is required to be created in a specific workspace, and this + * * workspace cannot be changed once set. The workspace need not be set + * * explicitly if you specify a `project` or a `parent` task instead. + * * @param {Object} data Data for the request + * * @param {String} [data.workspace] The workspace to create a task in. + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param data + * @param dispatchOptions? + * @return + */ + create(data : any, dispatchOptions? : any): any; + + /** + * * Creating a new task is as easy as POSTing to the `/tasks` endpoint + * * with a data block containing the fields you'd like to set on the task. + * * Any unspecified fields will take on default values. + * * + * * Every task is required to be created in a specific workspace, and this + * * workspace cannot be changed once set. The workspace need not be set + * * explicitly if you specify a `project` or a `parent` task instead. + * * @param {String} workspace The workspace to create a task in. + * * @param {Object} data Data for the request + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param workspace + * @param data + * @param dispatchOptions? + * @return + */ + createInWorkspace(workspace : string, data : any, dispatchOptions? : any): any; + + /** + * * Returns the complete task record for a single task. + * * @param {String} task The task to get. + * * @param {Object} [params] Parameters for the request + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The requested resource + * @param task + * @param params? + * @param dispatchOptions? + * @return + */ + findById(task : string, params? : any, dispatchOptions? : any): any; + + /** + * * A specific, existing task can be updated by making a PUT request on the + * * URL for that task. Only the fields provided in the `data` block will be + * * updated; any unspecified fields will remain unchanged. + * * + * * When using this method, it is best to specify only those fields you wish + * * to change, or else you may overwrite changes made by another user since + * * you last retrieved the task. + * * + * * Returns the complete updated task record. + * * @param {String} task The task to update. + * * @param {Object} data Data for the request + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param task + * @param data + * @param dispatchOptions? + * @return + */ + update(task : string, data : any, dispatchOptions? : any): any; + + /** + * * A specific, existing task can be deleted by making a DELETE request on the + * * URL for that task. Deleted tasks go into the "trash" of the user making + * * the delete request. Tasks can be recovered from the trash within a period + * * of 30 days; afterward they are completely removed from the system. + * * + * * Returns an empty data record. + * * @param {String} task The task to delete. + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param task + * @param dispatchOptions? + * @return + */ + delete(task : string, dispatchOptions? : any): any; + + /** + * * Returns the compact task records for all tasks within the given project, + * * ordered by their priority within the project. + * * @param {String} projectId The project in which to search for tasks. + * * @param {Object} [params] Parameters for the request + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param projectId + * @param params? + * @param dispatchOptions? + * @return + */ + findByProject(projectId : string, params? : any, dispatchOptions? : any): any; + + /** + * * Returns the compact task records for all tasks with the given tag. + * * @param {String} tag The tag in which to search for tasks. + * * @param {Object} [params] Parameters for the request + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param tag + * @param params? + * @param dispatchOptions? + * @return + */ + findByTag(tag : string, params? : any, dispatchOptions? : any): any; + + /** + * * Returns the compact task records for some filtered set of tasks. Use one + * * or more of the parameters provided to filter the tasks returned. + * * @param {Object} [params] Parameters for the request + * * @param {String} [params.assignee] The assignee to filter tasks on. + * * @param {String} [params.workspace] The workspace or organization to filter tasks on. + * * @param {String} [params.completed_since] Only return tasks that are either incomplete or that have been + * * completed since this time. + * * @param {String} [params.modified_since] Only return tasks that have been modified since the given time. + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param params? + * @param dispatchOptions? + * @return + */ + findAll(params? : any, dispatchOptions? : any): any; + + /** + * * Adds each of the specified followers to the task, if they are not already + * * following. Returns the complete, updated record for the affected task. + * * @param {String} task The task to add followers to. + * * @param {Object} data Data for the request + * * @param {Array} data.followers An array of followers to add to the task. + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param task + * @param data + * @param dispatchOptions? + * @return + */ + addFollowers(task : string, data : any, dispatchOptions? : any): any; + + /** + * * Removes each of the specified followers from the task if they are + * * following. Returns the complete, updated record for the affected task. + * * @param {String} task The task to remove followers from. + * * @param {Object} data Data for the request + * * @param {Array} data.followers An array of followers to remove from the task. + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param task + * @param data + * @param dispatchOptions? + * @return + */ + removeFollowers(task : string, data : any, dispatchOptions? : any): any; + + /** + * * Returns a compact representation of all of the projects the task is in. + * * @param {String} task The task to get projects on. + * * @param {Object} [params] Parameters for the request + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param task + * @param params? + * @param dispatchOptions? + * @return + */ + projects(task : string, params? : any, dispatchOptions? : any): any; + + /** + * * Adds the task to the specified project, in the optional location + * * specified. If no location arguments are given, the task will be added to + * * the beginning of the project. + * * + * * `addProject` can also be used to reorder a task within a project that + * * already contains it. + * * + * * Returns an empty data block. + * * @param {String} task The task to add to a project. + * * @param {Object} data Data for the request + * * @param {String} data.project The project to add the task to. + * * @param {String} [data.insertAfter] A task in the project to insert the task after, or `null` to + * * insert at the beginning of the list. + * * @param {String} [data.insertBefore] A task in the project to insert the task before, or `null` to + * * insert at the end of the list. + * * @param {String} [data.section] A section in the project to insert the task into. The task will be + * * inserted at the top of the section. + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param task + * @param data + * @param dispatchOptions? + * @return + */ + addProject(task : string, data : any, dispatchOptions? : any): any; + + /** + * * Removes the task from the specified project. The task will still exist + * * in the system, but it will not be in the project anymore. + * * + * * Returns an empty data block. + * * @param {String} task The task to remove from a project. + * * @param {Object} data Data for the request + * * @param {String} data.project The project to remove the task from. + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param task + * @param data + * @param dispatchOptions? + * @return + */ + removeProject(task : string, data : any, dispatchOptions? : any): any; + + /** + * * Returns a compact representation of all of the tags the task has. + * * @param {String} task The task to get tags on. + * * @param {Object} [params] Parameters for the request + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param task + * @param params? + * @param dispatchOptions? + * @return + */ + tags(task : string, params? : any, dispatchOptions? : any): any; + + /** + * * Adds a tag to a task. Returns an empty data block. + * * @param {String} task The task to add a tag to. + * * @param {Object} data Data for the request + * * @param {String} data.tag The tag to add to the task. + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param task + * @param data + * @param dispatchOptions? + * @return + */ + addTag(task : string, data : any, dispatchOptions? : any): any; + + /** + * * Removes a tag from the task. Returns an empty data block. + * * @param {String} task The task to remove a tag from. + * * @param {Object} data Data for the request + * * @param {String} data.tag The tag to remove from the task. + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param task + * @param data + * @param dispatchOptions? + * @return + */ + removeTag(task : string, data : any, dispatchOptions? : any): any; + + /** + * * Returns a compact representation of all of the subtasks of a task. + * * @param {String} task The task to get the subtasks of. + * * @param {Object} [params] Parameters for the request + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param task + * @param params? + * @param dispatchOptions? + * @return + */ + subtasks(task : string, params? : any, dispatchOptions? : any): any; + + /** + * * Creates a new subtask and adds it to the parent task. Returns the full record + * * for the newly created subtask. + * * @param {String} task The task to add a subtask to. + * * @param {Object} data Data for the request + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param task + * @param data + * @param dispatchOptions? + * @return + */ + addSubtask(task : string, data : any, dispatchOptions? : any): any; + + /** + * * Returns a compact representation of all of the stories on the task. + * * @param {String} task The task containing the stories to get. + * * @param {Object} [params] Parameters for the request + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param task + * @param params? + * @param dispatchOptions? + * @return + */ + stories(task : string, params? : any, dispatchOptions? : any): any; + + /** + * * Adds a comment to a task. The comment will be authored by the + * * currently authenticated user, and timestamped when the server receives + * * the request. + * * + * * Returns the full record for the new story added to the task. + * * @param {String} task Globally unique identifier for the task. + * * @param {Object} data Data for the request + * * @param {String} data.text The plain text of the comment to add. + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param task + * @param data + * @param dispatchOptions? + * @return + */ + addComment(task : string, data : any, dispatchOptions? : any): any; + } + + /** + * A _team_ is used to group related projects and people together within an + * organization. Each project in an organization is associated with a team. + * @class + * @param {Dispatcher} dispatcher The API dispatcher + */ + class Teams { + /** + * @param dispatcher + */ + constructor(dispatcher : any); + + /** + * * Returns the full record for a single team. + * * @param {String} team Globally unique identifier for the team. + * * @param {Object} [params] Parameters for the request + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The requested resource + * @param team + * @param params? + * @param dispatchOptions? + * @return + */ + findById(team : string, params? : any, dispatchOptions? : any): any; + + /** + * * Returns the compact records for all teams in the organization visible to + * * the authorized user. + * * @param {String} organization Globally unique identifier for the workspace or organization. + * * @param {Object} [params] Parameters for the request + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param organization + * @param params? + * @param dispatchOptions? + * @return + */ + findByOrganization(organization : string, params? : any, dispatchOptions? : any): any; + + /** + * * Returns the compact records for all users that are members of the team. + * * @param {String} team Globally unique identifier for the team. + * * @param {Object} [params] Parameters for the request + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param team + * @param params? + * @param dispatchOptions? + * @return + */ + users(team : string, params? : any, dispatchOptions? : any): any; + + /** + * * The user making this call must be a member of the team in order to add others. + * * The user to add must exist in the same organization as the team in order to be added. + * * The user to add can be referenced by their globally unique user ID or their email address. + * * Returns the full user record for the added user. + * * @param {String} team Globally unique identifier for the team. + * * @param {Object} data Data for the request + * * @param {String} data.user An identifier for the user. Can be one of an email address, + * * the globally unique identifier for the user, or the keyword `me` + * * to indicate the current user making the request. + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param team + * @param data + * @param dispatchOptions? + * @return + */ + addUser(team : string, data : any, dispatchOptions? : any): any; + + /** + * * The user to remove can be referenced by their globally unique user ID or their email address. + * * Removes the user from the specified team. Returns an empty data record. + * * @param {String} team Globally unique identifier for the team. + * * @param {Object} data Data for the request + * * @param {String} data.user An identifier for the user. Can be one of an email address, + * * the globally unique identifier for the user, or the keyword `me` + * * to indicate the current user making the request. + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param team + * @param data + * @param dispatchOptions? + * @return + */ + removeUser(team : string, data : any, dispatchOptions? : any): any; + } + + /** + * A _user_ object represents an account in Asana that can be given access to + * various workspaces, projects, and tasks. + * + * Like other objects in the system, users are referred to by numerical IDs. + * However, the special string identifier `me` can be used anywhere + * a user ID is accepted, to refer to the current authenticated user. + * @class + * @param {Dispatcher} dispatcher The API dispatcher + */ + class Users { + /** + * @param dispatcher + */ + constructor(dispatcher : any); + + /** + * * Returns the full user record for the currently authenticated user. + * * @param {Object} [params] Parameters for the request + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The requested resource + * @param params? + * @param dispatchOptions? + * @return + */ + me(params? : any, dispatchOptions? : any): any; + + /** + * * Returns the full user record for the single user with the provided ID. + * * @param {String} user An identifier for the user. Can be one of an email address, + * * the globally unique identifier for the user, or the keyword `me` + * * to indicate the current user making the request. + * * @param {Object} [params] Parameters for the request + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The requested resource + * @param user + * @param params? + * @param dispatchOptions? + * @return + */ + findById(user : string, params? : any, dispatchOptions? : any): any; + + /** + * * Returns the user records for all users in the specified workspace or + * * organization. + * * @param {String} workspace The workspace in which to get users. + * * @param {Object} [params] Parameters for the request + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param workspace + * @param params? + * @param dispatchOptions? + * @return + */ + findByWorkspace(workspace : string, params? : any, dispatchOptions? : any): any; + + /** + * * Returns the user records for all users in all workspaces and organizations + * * accessible to the authenticated user. Accepts an optional workspace ID + * * parameter. + * * @param {Object} [params] Parameters for the request + * * @param {String} [params.workspace] The workspace or organization to filter users on. + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param params? + * @param dispatchOptions? + * @return + */ + findAll(params? : any, dispatchOptions? : any): any; + } + + /** + * **Webhooks are currently in BETA - The information here may change.** + * + * Webhooks allow an application to be notified of changes. This is in addition + * to the ability to fetch those changes directly as + * [Events](/developers/api-reference/events) - in fact, Webhooks are just a way + * to receive Events via HTTP POST at the time they occur instead of polling for + * them. For services accessible via HTTP this is often vastly more convenient, + * and if events are not too frequent can be significantly more efficient. + * + * In both cases, however, changes are represented as Event objects - refer to + * the [Events documentation](/developers/api-reference/events) for more + * information on what data these events contain. + * + * **NOTE:** While Webhooks send arrays of Event objects to their target, the + * Event objects themselves contain *only IDs*, rather than the actual resource + * they are referencing. So while a normal event you receive via GET /events + * would look like this: + * + * {\ + * "resource": {\ + * "id": 1337,\ + * "name": "My Task"\ + * },\ + * "parent": null,\ + * "created_at": "2013-08-21T18:20:37.972Z",\ + * "user": {\ + * "id": 1123,\ + * "name": "Tom Bizarro"\ + * },\ + * "action": "changed",\ + * "type": "task"\ + * } + * + * In a Webhook payload you would instead receive this: + * + * {\ + * "resource": 1337,\ + * "parent": null,\ + * "created_at": "2013-08-21T18:20:37.972Z",\ + * "user": 1123,\ + * "action": "changed",\ + * "type": "task"\ + * } + * + * Webhooks themselves contain only the information necessary to deliver the + * events to the desired target as they are generated. + * @class + * @param {Dispatcher} dispatcher The API dispatcher + */ + class Webhooks { + /** + * @param dispatcher + */ + constructor(dispatcher : any); + + /** + * * Establishing a webhook is a two-part process. First, a simple HTTP POST + * * similar to any other resource creation. Since you could have multiple + * * webhooks we recommend specifying a unique local id for each target. + * * + * * Next comes the confirmation handshake. When a webhook is created, we will + * * send a test POST to the `target` with an `X-Hook-Secret` header as + * * described in the + * * [Resthooks Security documentation](http://resthooks.org/docs/security/). + * * The target must respond with a `200 OK` and a matching `X-Hook-Secret` + * * header to confirm that this webhook subscription is indeed expected. + * * + * * If you do not acknowledge the webhook's confirmation handshake it will + * * fail to setup, and you will receive an error in response to your attempt + * * to create it. This means you need to be able to receive and complete the + * * webhook *while* the POST request is in-flight. + * * @param {String} resource A resource ID to subscribe to. The resource can be a task or project. + * * @param {String} target The URL to receive the HTTP POST. + * * @param {Object} data Data for the request + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param resource + * @param target + * @param data + * @param dispatchOptions? + * @return + */ + create(resource : string, target : string, data : any, dispatchOptions? : any): any; + + /** + * * Returns the compact representation of all webhooks your app has + * * registered for the authenticated user in the given workspace. + * * @param {String} workspace The workspace to query for webhooks in. + * * @param {Object} [params] Parameters for the request + * * @param {String} [params.resource] Only return webhooks for the given resource. + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param workspace + * @param params? + * @param dispatchOptions? + * @return + */ + getAll(workspace : string, params? : any, dispatchOptions? : any): any; + + /** + * * Returns the full record for the given webhook. + * * @param {String} webhook The webhook to get. + * * @param {Object} [params] Parameters for the request + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The requested resource + * @param webhook + * @param params? + * @param dispatchOptions? + * @return + */ + getById(webhook : string, params? : any, dispatchOptions? : any): any; + + /** + * * This method permanently removes a webhook. Note that it may be possible + * * to receive a request that was already in flight after deleting the + * * webhook, but no further requests will be issued. + * * @param {String} webhook The webhook to delete. + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param webhook + * @param dispatchOptions? + * @return + */ + deleteById(webhook : string, dispatchOptions? : any): any; + } + + /** + * A _workspace_ is the highest-level organizational unit in Asana. All projects + * and tasks have an associated workspace. + * + * An _organization_ is a special kind of workspace that represents a company. + * In an organization, you can group your projects into teams. You can read + * more about how organizations work on the Asana Guide. + * To tell if your workspace is an organization or not, check its + * `is_organization` property. + * + * Over time, we intend to migrate most workspaces into organizations and to + * release more organization-specific functionality. We may eventually deprecate + * using workspace-based APIs for organizations. Currently, and until after + * some reasonable grace period following any further announcements, you can + * still reference organizations in any `workspace` parameter. + * @class + * @param {Dispatcher} dispatcher The API dispatcher + */ + class Workspaces { + /** + * @param dispatcher + */ + constructor(dispatcher : any); + + /** + * * Returns the full workspace record for a single workspace. + * * @param {String} workspace Globally unique identifier for the workspace or organization. + * * @param {Object} [params] Parameters for the request + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The requested resource + * @param workspace + * @param params? + * @param dispatchOptions? + * @return + */ + findById(workspace : string, params? : any, dispatchOptions? : any): any; + + /** + * * Returns the compact records for all workspaces visible to the authorized user. + * * @param {Object} [params] Parameters for the request + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param params? + * @param dispatchOptions? + * @return + */ + findAll(params? : any, dispatchOptions? : any): any; + + /** + * * A specific, existing workspace can be updated by making a PUT request on + * * the URL for that workspace. Only the fields provided in the data block + * * will be updated; any unspecified fields will remain unchanged. + * * + * * Currently the only field that can be modified for a workspace is its `name`. + * * + * * Returns the complete, updated workspace record. + * * @param {String} workspace The workspace to update. + * * @param {Object} data Data for the request + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param workspace + * @param data + * @param dispatchOptions? + * @return + */ + update(workspace : string, data : any, dispatchOptions? : any): any; + + /** + * * Retrieves objects in the workspace based on an auto-completion/typeahead + * * search algorithm. This feature is meant to provide results quickly, so do + * * not rely on this API to provide extremely accurate search results. The + * * result set is limited to a single page of results with a maximum size, + * * so you won't be able to fetch large numbers of results. + * * @param {String} workspace The workspace to fetch objects from. + * * @param {Object} [params] Parameters for the request + * * @param {String} params.type The type of values the typeahead should return. + * * Note that unlike in the names of endpoints, the types listed here are + * * in singular form (e.g. `task`). Using multiple types is not yet supported. + * * @param {String} [params.query] The string that will be used to search for relevant objects. If an + * * empty string is passed in, the API will currently return an empty + * * result set. + * * @param {Number} [params.count] The number of results to return. The default is `20` if this + * * parameter is omitted, with a minimum of `1` and a maximum of `100`. + * * If there are fewer results found than requested, all will be returned. + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param workspace + * @param params? + * @param dispatchOptions? + * @return + */ + typeahead(workspace : string, params? : any, dispatchOptions? : any): any; + + /** + * * The user can be referenced by their globally unique user ID or their email address. + * * Returns the full user record for the invited user. + * * @param {String} workspace The workspace or organization to invite the user to. + * * @param {Object} data Data for the request + * * @param {String} data.user An identifier for the user. Can be one of an email address, + * * the globally unique identifier for the user, or the keyword `me` + * * to indicate the current user making the request. + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param workspace + * @param data + * @param dispatchOptions? + * @return + */ + addUser(workspace : string, data : any, dispatchOptions? : any): any; + + /** + * * The user making this call must be an admin in the workspace. + * * Returns an empty data record. + * * @param {String} workspace The workspace or organization to invite the user to. + * * @param {Object} data Data for the request + * * @param {String} data.user An identifier for the user. Can be one of an email address, + * * the globally unique identifier for the user, or the keyword `me` + * * to indicate the current user making the request. + * * @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request + * * @return {Promise} The response from the API + * @param workspace + * @param data + * @param dispatchOptions? + * @return + */ + removeUser(workspace : string, data : any, dispatchOptions? : any): any; + } + } + + var VERSION: string; + } + + export = asana; +} + From 8cf699583ca3601beaa01e63ae8a09dc0dd48149 Mon Sep 17 00:00:00 2001 From: Isman Usoh Date: Wed, 27 Jan 2016 21:33:05 +0700 Subject: [PATCH 43/65] Update react-router-redux.d.ts --- react-router-redux/react-router-redux.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react-router-redux/react-router-redux.d.ts b/react-router-redux/react-router-redux.d.ts index 1c67b3baf5..6ada2e3215 100644 --- a/react-router-redux/react-router-redux.d.ts +++ b/react-router-redux/react-router-redux.d.ts @@ -3,7 +3,7 @@ // Definitions by: Isman Usoh , Noah Shipley , Dimitri Rosenberg // Definitions: https://github.com/borisyankov/DefinitelyTyped -/// +/// /// declare module ReactRouterRedux { From 26e76daaf55db14afe0a5da04447e559966fadfe Mon Sep 17 00:00:00 2001 From: Isman Usoh Date: Wed, 27 Jan 2016 21:42:17 +0700 Subject: [PATCH 44/65] Update react-router-redux.d.ts --- react-router-redux/react-router-redux.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react-router-redux/react-router-redux.d.ts b/react-router-redux/react-router-redux.d.ts index 6ada2e3215..a0cf53e77d 100644 --- a/react-router-redux/react-router-redux.d.ts +++ b/react-router-redux/react-router-redux.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-router v2.1.0 +// Type definitions for react-router-redux v2.1.0 // Project: https://github.com/rackt/react-router-redux // Definitions by: Isman Usoh , Noah Shipley , Dimitri Rosenberg // Definitions: https://github.com/borisyankov/DefinitelyTyped From c95ef825990f1f97c1ca9b9f21338242c592398a Mon Sep 17 00:00:00 2001 From: tkqubo Date: Thu, 28 Jan 2016 01:23:29 +0900 Subject: [PATCH 45/65] add typings other than resources --- asana/asana-tests.ts | 6 + asana/asana.d.ts | 560 +++++++++++++++++++++++++++---------------- 2 files changed, 360 insertions(+), 206 deletions(-) diff --git a/asana/asana-tests.ts b/asana/asana-tests.ts index 30990d42c0..464498dcf0 100644 --- a/asana/asana-tests.ts +++ b/asana/asana-tests.ts @@ -1,6 +1,12 @@ /// +/// import * as asana from 'asana'; let version: string = asana.VERSION; +let n: asana.auth.BaseBrowserFlow = new asana.auth.BaseBrowserFlow(null); + + +import * as request from 'request'; + diff --git a/asana/asana.d.ts b/asana/asana.d.ts index 267814376e..1f099878b6 100644 --- a/asana/asana.d.ts +++ b/asana/asana.d.ts @@ -7,6 +7,10 @@ /// declare module "asana" { + import * as Promise from 'bluebird'; + import {CoreOptions} from 'request'; + import * as request from 'request'; + namespace asana { var Client: ClientStatic; @@ -24,21 +28,23 @@ declare module "asana" { * @param {String} [redirectUri] Default redirect URI for this client * @param {String} [asanaBaseUrl] Base URL for Asana, for debugging */ - (dispatcher : any, options : any): asana.Client; + (dispatcher: Dispatcher, options?: ClientOptions): asana.Client; /** * Creates a new client. * @param {Object} options Options for specifying the client, see constructor. */ - create(options?: any): any; + create(options?: ClientOptions): Client; + } + + /** Options to configure the client */ + interface ClientOptions extends DispatcherOptions { + clientId?: string; + clientSecret?: string; + redirectUri?: string; + asanaBaseUrl?: string; } interface Client { - /** - * @param dispatcher - * @param options - */ - (dispatcher : any, options : any): Client; - /** * Ensures the client is authorized to make requests. Kicks off the * configured Oauth flow, if any. @@ -46,7 +52,7 @@ declare module "asana" { * @returns {Promise} A promise that resolves to this client when * authorization is complete. */ - authorize(): void; + authorize(): Promise; /** * Configure the Client to use a user's API Key and then authenticate @@ -58,7 +64,7 @@ declare module "asana" { * @param apiKey * @return */ - useBasicAuth(apiKey : string): any; + useBasicAuth(apiKey: string): this; /** * Configure the client to authenticate using a Personal Access Token. @@ -68,7 +74,7 @@ declare module "asana" { * @param accessToken * @return */ - useAccessToken(accessToken : string): any; + useAccessToken(accessToken: string): this; /** * Configure the client to authenticate via Oauth. Credentials can be @@ -80,19 +86,68 @@ declare module "asana" { * @option {Object} [credentials] Credentials to use; no flow required to * obtain authorization. This object should at a minimum contain an * `access_token` string field. - * @return {Client} this + * @return {Client} this * @param options * @return */ - useOauth(options : any): Client; + useOauth(options?: auth.OauthAuthenticatorOptions): this; /** - * Creates a new client. - * @param {Object} options Options for specifying the client, see constructor. - * @param options - * @return + * The internal dispatcher. This is mostly used by the resources but provided + * for custom requests to the API or API features that have not yet been added + * to the client. + * @type {Dispatcher} */ - create(options : any): Client; + dispatcher: Dispatcher; + /** + * An instance of the Attachments resource. + * @type {Attachments} + */ + attachments: resources.Attachments; + /** + * An instance of the Events resource. + * @type {Events} + */ + events: resources.Events; + /** + * An instance of the Projects resource. + * @type {Projects} + */ + projects: resources.Projects; + /** + * An instance of the Stories resource. + * @type {Stories} + */ + stories: resources.Stories; + /** + * An instance of the Tags resource. + * @type {Tags} + */ + tags: resources.Tags; + /** + * An instance of the Tasks resource. + * @type {Tasks} + */ + tasks: resources.Tasks; + /** + * An instance of the Teams resource. + * @type {Teams} + */ + teams: resources.Teams; + /** + * An instance of the Users resource. + * @type {Users} + */ + users: resources.Users; + /** + * An instance of the Workspaces resource. + * @type {Workspaces} + */ + workspaces: resources.Workspaces; + /** + * Store off Oauth info. + */ + app: auth.App; } var Dispatcher: DispatcherStatic; @@ -115,7 +170,29 @@ declare module "asana" { * @option {Number} [requestTimeout] Timeout (in milliseconds) to wait for the * request to finish. */ - new (options : any): Dispatcher; + new (options?: DispatcherOptions): Dispatcher; + + /** + * Default handler for requests that are considered unauthorized. + * Requests that the authenticator try to refresh its credentials if + * possible. + * @return {Promise} True iff refresh was successful, false if not. + * @return + */ + maybeReauthorize(): Promise; + + /** + * The relative API path for the current version of the Asana API. + * @type {String} + */ + API_PATH : string; + } + + interface DispatcherOptions { + authenticator?: auth.Authenticator; + retryOnRateLimit?: boolean; + handleUnauthorized?: () => boolean|Promise; + requestTimeout?: string; } interface Dispatcher { @@ -126,7 +203,7 @@ declare module "asana" { * @param path * @return */ - url(path : string): string; + url(path: string): string; /** * Configure the authentication mechanism to use. @@ -134,7 +211,7 @@ declare module "asana" { * @param authenticator * @return */ - setAuthenticator(authenticator : any): Dispatcher; + setAuthenticator(authenticator: auth.Authenticator): this; /** * Ensure the dispatcher is authorized to make requests. Call this before @@ -144,7 +221,7 @@ declare module "asana" { * there was a problem authorizing. * @return */ - authorize(): any; + authorize(): Promise; /** * Dispatches a request to the Asana API. The request parameters are passed to @@ -156,7 +233,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - dispatch(params : any, dispatchOptions? : any): any; + dispatch(params: any, dispatchOptions?: any): Promise; /** * Dispatches a GET request to the Asana API. @@ -170,7 +247,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - get(path : string, query? : any, dispatchOptions? : any): any; + get(path: string, query?: any, dispatchOptions?: any): Promise; /** * Dispatches a POST request to the Asana API. @@ -184,7 +261,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - post(path : string, data : any, dispatchOptions? : any): any; + post(path: string, data: any, dispatchOptions?: any): Promise; /** * Dispatches a PUT request to the Asana API. @@ -198,7 +275,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - put(path : string, data : any, dispatchOptions? : any): any; + put(path: string, data: any, dispatchOptions?: any): Promise; /** * Dispatches a DELETE request to the Asana API. @@ -210,22 +287,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - delete(path : string, dispatchOptions? : any): any; - - /** - * The relative API path for the current version of the Asana API. - * @type {String} - */ - API_PATH : string; - - /** - * Default handler for requests that are considered unauthorized. - * Requests that the authenticator try to refresh its credentials if - * possible. - * @return {Promise} True iff refresh was successful, false if not. - * @return - */ - maybeReauthorize(): boolean; + delete(path: string, dispatchOptions?: any): Promise; /** * The base URL for Asana @@ -245,7 +307,7 @@ declare module "asana" { * that has a refresh token, and will refresh the current access token. * @type {Function} */ - handleUnauthorized : Function; + handleUnauthorized : () => boolean|Promise; /** * The amount of time in milliseconds to wait for a request to finish. @@ -255,6 +317,111 @@ declare module "asana" { } namespace auth { + var BasicAuthenticator: BasicAuthenticatorStatic; + + interface BasicAuthenticatorStatic { + /** + * @param apiKey + */ + new (apiKey : string): BasicAuthenticator; + } + + interface BasicAuthenticator extends Authenticator { + /** + * @param {Object} request The request to modify, for the `request` library. + * @return {Object} The `request` parameter, modified to include authentication + * information using the stored credentials. + * @param request + * @return + */ + authenticateRequest(request : BasicAuthenticatorRequest): BasicAuthenticatorRequest; + } + + interface BasicAuthenticatorRequest { + auth : { + username : string; + password : string; + } + } + + var OauthAuthenticator: OauthAuthenticatorStatic; + + interface OauthAuthenticatorStatic { + /** + * Creates an authenticator that uses Oauth for authentication. + * + * @param {Object} options Configure the authenticator; must specify one + * of `flow` or `credentials`. + * @option {App} app The app being authenticated for. + * @option {OauthFlow} [flow] The flow to use to get credentials + * when needed. + * @option {String|Object} [credentials] Initial credentials to use. This can + * be either the object returned from an access token request (which + * contains the token and some other metadata) or just the `access_token` + * field. + * @constructor + */ + new (options : OauthAuthenticatorOptions): OauthAuthenticator; + } + + interface OauthAuthenticatorOptions { + flowType?: auth.FlowType; + credentials?: Credentials|string; + } + + interface Credentials { + access_token: string; + refresh_token?: string; + } + + interface OauthAuthenticator extends Authenticator { + /** + * @param {Object} request The request to modify, for the `request` library. + * @return {Object} The `request` parameter, modified to include authentication + * information using the stored credentials. + * @param request + * @return + */ + authenticateRequest(request : OauthAuthenticatorRequest): OauthAuthenticatorRequest; + } + + interface OauthAuthenticatorRequest { + /** + * When browserify-d, the `auth` component of the `request` library + * doesn't work so well, so we just manually set the bearer token instead. + */ + headers : { + Authorization : string; + } + } + + /** + * A layer to abstract the differences between using different types of + * authentication (Oauth vs. Basic). The Authenticator is responsible for + * establishing credentials and applying them to outgoing requests. + * @constructor + */ + interface Authenticator { + /** + * Establishes credentials. + * + * @return {Promise} Resolves when initial credentials have been + * completed and `authenticateRequest` calls can expect to succeed. + * @return + */ + establishCredentials(): Promise; + + /** + * Attempts to refresh credentials, if possible, given the current credentials. + * + * @return {Promise} Resolves to `true` if credentials have been successfully + * established and `authenticateRequests` can expect to succeed, else + * resolves to `false`. + * @return + */ + refreshCredentials(): Promise; + } + var App: AppStatic; interface AppStatic { @@ -269,7 +436,13 @@ declare module "asana" { * @option {String} [asanaBaseUrl] Base URL to use for Asana, for debugging * @constructor */ - new (options : any): App; + new (options: AppOptions): App; + } + + interface AppOptions extends AsanaAuthorizeUrlOptions { + clientId?: string; + clientSecret?: string; + scope?: string; } interface App { @@ -281,7 +454,7 @@ declare module "asana" { * @param options * @return */ - asanaAuthorizeUrl(options : any): string; + asanaAuthorizeUrl(options?: AsanaAuthorizeUrlOptions): string; /** * @param {Object} options Overrides to the app's defaults @@ -291,7 +464,7 @@ declare module "asana" { * @param options * @return */ - asanaTokenUrl(options : any): string; + asanaTokenUrl(options?: AsanaAuthorizeUrlOptions): string; /** * @param {String} code An authorization code obtained via `asanaAuthorizeUrl`. @@ -305,7 +478,7 @@ declare module "asana" { * @param options * @return */ - accessTokenFromCode(code : string, options : any): any; + accessTokenFromCode(code: string, options?: AsanaAuthorizeUrlOptions): Promise; /** * @param {String} refreshToken A refresh token obtained via Oauth. @@ -318,13 +491,18 @@ declare module "asana" { * @param options * @return */ - accessTokenFromRefreshToken(refreshToken : string, options : any): any; + accessTokenFromRefreshToken(refreshToken: string, options: AsanaAuthorizeUrlOptions): Promise; scope : string; asanaBaseUrl : string; } + interface AsanaAuthorizeUrlOptions { + redirectUri?: string; + asanaBaseUrl?: string; + } + var OauthError: OauthErrorStatic; interface OauthErrorStatic { @@ -336,10 +514,16 @@ declare module "asana" { * @option {String} [error_description] A description of the error. * @constructor */ - new (options : any): OauthError; + new (options: OauthErrorOptions): OauthError; } - interface OauthError { } + interface OauthErrorOptions { + error?: string; + error_uri?: string; + error_description?: string; + } + + interface OauthError extends Error { } /** * Auto-detects the type of Oauth flow to use that's appropriate to the @@ -350,11 +534,11 @@ declare module "asana" { * @param env * @return */ - function autoDetect(env : any): Function; + function autoDetect(env: any): Function; var RedirectFlow: RedirectFlowStatic; - interface RedirectFlowStatic { + interface RedirectFlowStatic extends FlowType { /** * An Oauth flow that runs in the browser and requests user authorization by * redirecting to an authorization page on Asana, and redirecting back with @@ -362,57 +546,36 @@ declare module "asana" { * @param {Object} options See `BaseBrowserFlow` for options. * @constructor */ - new (options : any): RedirectFlow; + new (options: any): RedirectFlow; } - interface RedirectFlow { - getStateParam(): void; - - /** - * - * @param authUrl - */ - startAuthorization(authUrl : any): void; - - finishAuthorization(): void; - } + interface RedirectFlow extends BaseBrowserFlow { } var PopupFlow: PopupFlowStatic; - interface PopupFlowStatic { + interface PopupFlowStatic extends FlowType { /** * An Oauth flow that runs in the browser and requests user authorization by * popping up a window and prompting the user. * @param {Object} options See `BaseBrowserFlow` for options. * @constructor */ - new (options : any): PopupFlow; + new (options: any): PopupFlow; } - interface PopupFlow { - /** - * @param authUrl - * @param state - */ - startAuthorization(authUrl : any, state : any): void; - - /** - * @return - */ - finishAuthorization(): any; - + interface PopupFlow extends BaseBrowserFlow { /** * @param popupWidth * @param popupHeight */ - _popupParams(popupWidth : number, popupHeight : number): void; + _popupParams(popupWidth: number, popupHeight: number): void; runReceiver(): void; } var NativeFlow: NativeFlowStatic; - interface NativeFlowStatic { + interface NativeFlowStatic extends FlowType { /** * An Oauth flow that can be run from the console or an app that does * not have the ability to open and manage a browser on its own. @@ -424,10 +587,10 @@ declare module "asana" { * waiting for a line from stdin. * @constructor */ - new (options : any): NativeFlow; + new (options: any): NativeFlow; } - interface NativeFlow { + interface NativeFlow extends Flow { /** * Run the Oauth flow, prompting the user to go to the authorization URL * and enter the code it displays when finished. @@ -437,12 +600,6 @@ declare module "asana" { */ run(): void; - /** - * @returns {String} The URL used to authorize the user for the app. - * @return - */ - authorizeUrl(): string; - /** * @param {String} code An authorization code obtained via `asanaAuthorizeUrl`. * @return {Promise} The token, which will include the `access_token` @@ -450,7 +607,7 @@ declare module "asana" { * to get a new access token without going through the flow again. * @param code */ - accessToken(code : string): void; + accessToken(code: string): void; /** * @return {Promise} The access token, which will include a refresh token @@ -459,12 +616,12 @@ declare module "asana" { * @param url * @return */ - promptForCode(url : string): any; + promptForCode(url: string): any; } var ChromeExtensionFlow: ChromeExtensionFlowStatic; - interface ChromeExtensionFlowStatic { + interface ChromeExtensionFlowStatic extends FlowType { /** * An Oauth flow that runs in a Chrome browser extension and requests user * authorization by opening a temporary tab to prompt the user. @@ -475,27 +632,10 @@ declare module "asana" { * `Asana.auth.ChromeExtensionFlow.runReceiver();`. * @constructor */ - new (options : any): ChromeExtensionFlow; + new (options: any): ChromeExtensionFlow; } - interface ChromeExtensionFlow { - /** - * @return - */ - receiverUrl(): any; - - /** - * - * @param authUrl - * @param state - */ - startAuthorization(authUrl : any, state : any): void; - - /** - * @return - */ - finishAuthorization(): any; - + interface ChromeExtensionFlow extends BaseBrowserFlow { /** * Runs the receiver code to send the Oauth result to the requesting tab. */ @@ -504,7 +644,7 @@ declare module "asana" { var BaseBrowserFlow: BaseBrowserFlowStatic; - interface BaseBrowserFlowStatic { + interface BaseBrowserFlowStatic extends FlowType { /** * A base class for any flow that runs in the browser. All subclasses use the * "implicit grant" flow to authenticate via the browser. @@ -515,10 +655,10 @@ declare module "asana" { * the app, and if none then the current page URL. * @constructor */ - new (options : any): BaseBrowserFlow; + new (options: any): BaseBrowserFlow; } - interface BaseBrowserFlow { + interface BaseBrowserFlow extends Flow { /** * @param {String} authUrl The URL the user should be navigated to in order * to authorize the app. @@ -529,13 +669,13 @@ declare module "asana" { * @param state * @return */ - startAuthorization(authUrl : string, state : string): any; + startAuthorization(authUrl: string, state: string): any; /** * @return {Promise} Credentials returned from Oauth. * @param state */ - finishAuthorization(state : string): void; + finishAuthorization(state: string): void; /** * @return {String} The URL to redirect to that will receive the @@ -554,7 +694,13 @@ declare module "asana" { * @return */ getStateParam(): string; + } + interface FlowType { + new (options: any): Flow; + } + + interface Flow { /** * @returns {String} The URL used to authorize the user for the app. * @return @@ -571,61 +717,63 @@ declare module "asana" { } namespace errors { - class AsanaError { + class AsanaError extends Error { /** * @param message * @return */ - constructor(message : any); + constructor(message: any); + code: number; + value: any; } - class Forbidden { + class Forbidden extends AsanaError { /** * @param value * @return */ - constructor(value : any); + constructor(value: any); } - class InvalidRequest { + class InvalidRequest extends AsanaError { /** * @param value * @return */ - constructor(value : any); + constructor(value: any); } - class NoAuthorization { + class NoAuthorization extends AsanaError { /** * @param value * @return */ - constructor(value : any); + constructor(value: any); } - class NotFound { + class NotFound extends AsanaError { /** * @param value * @return */ - constructor(value : any); + constructor(value: any); } - class RateLimitEnforced { + class RateLimitEnforced extends AsanaError { /** * @param value * @return */ - constructor(value : any); + constructor(value: any); } - class ServerError { + class ServerError extends AsanaError { /** * @param value * @return */ - constructor(value : any); + constructor(value: any); } } @@ -641,7 +789,7 @@ declare module "asana" { /** * @param dispatcher */ - constructor(dispatcher : any); + constructor(dispatcher: Dispatcher); /** * * Returns the full record for a single attachment. @@ -654,7 +802,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - findById(attachment : string, params? : any, dispatchOptions? : any): any; + findById(attachment: string, params?: any, dispatchOptions?: any): any; /** * * Returns the compact records for all attachments on the task. @@ -667,7 +815,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - findByTask(task : string, params? : any, dispatchOptions? : any): any; + findByTask(task: string, params?: any, dispatchOptions?: any): any; } /** @@ -704,7 +852,7 @@ declare module "asana" { * @param dispatcher * @return */ - constructor(dispatcher : any); + constructor(dispatcher: Dispatcher); } /** @@ -723,7 +871,7 @@ declare module "asana" { /** * @param dispatcher */ - constructor(dispatcher : any); + constructor(dispatcher: Dispatcher); /** * * Creates a new project in a workspace or team. @@ -747,7 +895,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - create(data : any, dispatchOptions? : any): any; + create(data: any, dispatchOptions?: any): any; /** * * If the workspace for your project _is_ an organization, you must also @@ -763,7 +911,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - createInWorkspace(workspace : string, data : any, dispatchOptions? : any): any; + createInWorkspace(workspace: string, data: any, dispatchOptions?: any): any; /** * * Creates a project shared with the given team. @@ -778,7 +926,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - createInTeam(team : string, data : any, dispatchOptions? : any): any; + createInTeam(team: string, data: any, dispatchOptions?: any): any; /** * * Returns the complete project record for a single project. @@ -791,7 +939,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - findById(project : string, params? : any, dispatchOptions? : any): any; + findById(project: string, params?: any, dispatchOptions?: any): any; /** * * A specific, existing project can be updated by making a PUT request on the @@ -812,7 +960,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - update(project : string, data : any, dispatchOptions? : any): any; + update(project: string, data: any, dispatchOptions?: any): any; /** * * A specific, existing project can be deleted by making a DELETE request @@ -826,7 +974,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - delete(project : string, dispatchOptions? : any): any; + delete(project: string, dispatchOptions?: any): any; /** * * Returns the compact project records for some filtered set of projects. @@ -842,7 +990,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - findAll(params? : any, dispatchOptions? : any): any; + findAll(params?: any, dispatchOptions?: any): any; /** * * Returns the compact project records for all projects in the workspace. @@ -857,7 +1005,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - findByWorkspace(workspace : string, params? : any, dispatchOptions? : any): any; + findByWorkspace(workspace: string, params?: any, dispatchOptions?: any): any; /** * * Returns the compact project records for all projects in the team. @@ -872,7 +1020,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - findByTeam(team : string, params? : any, dispatchOptions? : any): any; + findByTeam(team: string, params?: any, dispatchOptions?: any): any; /** * * Returns compact records for all sections in the specified project. @@ -885,7 +1033,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - sections(project : string, params? : any, dispatchOptions? : any): any; + sections(project: string, params?: any, dispatchOptions?: any): any; /** * * Returns the compact task records for all tasks within the given project, @@ -899,7 +1047,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - tasks(project : string, params? : any, dispatchOptions? : any): any; + tasks(project: string, params?: any, dispatchOptions?: any): any; /** * * Adds the specified list of users as followers to the project. Followers are a subset of members, therefore if @@ -915,7 +1063,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - addFollowers(project : string, data : any, dispatchOptions? : any): any; + addFollowers(project: string, data: any, dispatchOptions?: any): any; /** * * Removes the specified list of users from following the project, this will not affect project membership status. @@ -930,7 +1078,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - removeFollowers(project : string, data : any, dispatchOptions? : any): any; + removeFollowers(project: string, data: any, dispatchOptions?: any): any; /** * * Adds the specified list of users as members of the project. Returns the updated project record. @@ -944,7 +1092,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - addMembers(project : string, data : any, dispatchOptions? : any): any; + addMembers(project: string, data: any, dispatchOptions?: any): any; /** * * Removes the specified list of members from the project. Returns the updated project record. @@ -958,7 +1106,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - removeMembers(project : string, data : any, dispatchOptions? : any): any; + removeMembers(project: string, data: any, dispatchOptions?: any): any; } /** @@ -977,7 +1125,7 @@ declare module "asana" { * * @param dispatcher */ - constructor(dispatcher : any); + constructor(dispatcher: Dispatcher); /** * * Returns the compact records for all stories on the task. @@ -990,7 +1138,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - findByTask(task : string, params? : any, dispatchOptions? : any): any; + findByTask(task: string, params?: any, dispatchOptions?: any): any; /** * * Returns the full record for a single story. @@ -1003,7 +1151,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - findById(story : string, params? : any, dispatchOptions? : any): any; + findById(story: string, params?: any, dispatchOptions?: any): any; /** * * Adds a comment to a task. The comment will be authored by the @@ -1021,7 +1169,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - createOnTask(task : string, data : any, dispatchOptions? : any): any; + createOnTask(task: string, data: any, dispatchOptions?: any): any; } /** @@ -1039,7 +1187,7 @@ declare module "asana" { /** * @param dispatcher */ - constructor(dispatcher : any); + constructor(dispatcher: Dispatcher); /** * * Creates a new tag in a workspace or organization. @@ -1058,7 +1206,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - create(data : any, dispatchOptions? : any): any; + create(data: any, dispatchOptions?: any): any; /** * * Creates a new tag in a workspace or organization. @@ -1078,7 +1226,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - createInWorkspace(workspace : string, data : any, dispatchOptions? : any): any; + createInWorkspace(workspace: string, data: any, dispatchOptions?: any): any; /** * * Returns the complete tag record for a single tag. @@ -1091,7 +1239,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - findById(tag : string, params? : any, dispatchOptions? : any): any; + findById(tag: string, params?: any, dispatchOptions?: any): any; /** * * Updates the properties of a tag. Only the fields provided in the `data` @@ -1111,7 +1259,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - update(tag : string, data : any, dispatchOptions? : any): any; + update(tag: string, data: any, dispatchOptions?: any): any; /** * * A specific, existing tag can be deleted by making a DELETE request @@ -1125,7 +1273,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - delete(tag : string, dispatchOptions? : any): any; + delete(tag: string, dispatchOptions?: any): any; /** * * Returns the compact tag records for some filtered set of tags. @@ -1141,7 +1289,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - findAll(params? : any, dispatchOptions? : any): any; + findAll(params?: any, dispatchOptions?: any): any; /** * * Returns the compact tag records for all tags in the workspace. @@ -1154,7 +1302,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - findByWorkspace(workspace : string, params? : any, dispatchOptions? : any): any; + findByWorkspace(workspace: string, params?: any, dispatchOptions?: any): any; /** * * Returns the compact task records for all tasks with the given tag. @@ -1168,7 +1316,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - getTasksWithTag(tag : string, params? : any, dispatchOptions? : any): any; + getTasksWithTag(tag: string, params?: any, dispatchOptions?: any): any; } /** @@ -1183,7 +1331,7 @@ declare module "asana" { /** * @param dispatcher */ - constructor(dispatcher : any); + constructor(dispatcher: Dispatcher); /** * * Creating a new task is as easy as POSTing to the `/tasks` endpoint @@ -1201,7 +1349,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - create(data : any, dispatchOptions? : any): any; + create(data: any, dispatchOptions?: any): any; /** * * Creating a new task is as easy as POSTing to the `/tasks` endpoint @@ -1220,7 +1368,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - createInWorkspace(workspace : string, data : any, dispatchOptions? : any): any; + createInWorkspace(workspace: string, data: any, dispatchOptions?: any): any; /** * * Returns the complete task record for a single task. @@ -1233,7 +1381,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - findById(task : string, params? : any, dispatchOptions? : any): any; + findById(task: string, params?: any, dispatchOptions?: any): any; /** * * A specific, existing task can be updated by making a PUT request on the @@ -1254,7 +1402,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - update(task : string, data : any, dispatchOptions? : any): any; + update(task: string, data: any, dispatchOptions?: any): any; /** * * A specific, existing task can be deleted by making a DELETE request on the @@ -1270,7 +1418,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - delete(task : string, dispatchOptions? : any): any; + delete(task: string, dispatchOptions?: any): any; /** * * Returns the compact task records for all tasks within the given project, @@ -1284,7 +1432,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - findByProject(projectId : string, params? : any, dispatchOptions? : any): any; + findByProject(projectId: string, params?: any, dispatchOptions?: any): any; /** * * Returns the compact task records for all tasks with the given tag. @@ -1297,7 +1445,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - findByTag(tag : string, params? : any, dispatchOptions? : any): any; + findByTag(tag: string, params?: any, dispatchOptions?: any): any; /** * * Returns the compact task records for some filtered set of tasks. Use one @@ -1314,7 +1462,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - findAll(params? : any, dispatchOptions? : any): any; + findAll(params?: any, dispatchOptions?: any): any; /** * * Adds each of the specified followers to the task, if they are not already @@ -1329,7 +1477,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - addFollowers(task : string, data : any, dispatchOptions? : any): any; + addFollowers(task: string, data: any, dispatchOptions?: any): any; /** * * Removes each of the specified followers from the task if they are @@ -1344,7 +1492,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - removeFollowers(task : string, data : any, dispatchOptions? : any): any; + removeFollowers(task: string, data: any, dispatchOptions?: any): any; /** * * Returns a compact representation of all of the projects the task is in. @@ -1357,7 +1505,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - projects(task : string, params? : any, dispatchOptions? : any): any; + projects(task: string, params?: any, dispatchOptions?: any): any; /** * * Adds the task to the specified project, in the optional location @@ -1384,7 +1532,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - addProject(task : string, data : any, dispatchOptions? : any): any; + addProject(task: string, data: any, dispatchOptions?: any): any; /** * * Removes the task from the specified project. The task will still exist @@ -1401,7 +1549,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - removeProject(task : string, data : any, dispatchOptions? : any): any; + removeProject(task: string, data: any, dispatchOptions?: any): any; /** * * Returns a compact representation of all of the tags the task has. @@ -1414,7 +1562,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - tags(task : string, params? : any, dispatchOptions? : any): any; + tags(task: string, params?: any, dispatchOptions?: any): any; /** * * Adds a tag to a task. Returns an empty data block. @@ -1428,7 +1576,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - addTag(task : string, data : any, dispatchOptions? : any): any; + addTag(task: string, data: any, dispatchOptions?: any): any; /** * * Removes a tag from the task. Returns an empty data block. @@ -1442,7 +1590,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - removeTag(task : string, data : any, dispatchOptions? : any): any; + removeTag(task: string, data: any, dispatchOptions?: any): any; /** * * Returns a compact representation of all of the subtasks of a task. @@ -1455,7 +1603,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - subtasks(task : string, params? : any, dispatchOptions? : any): any; + subtasks(task: string, params?: any, dispatchOptions?: any): any; /** * * Creates a new subtask and adds it to the parent task. Returns the full record @@ -1469,7 +1617,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - addSubtask(task : string, data : any, dispatchOptions? : any): any; + addSubtask(task: string, data: any, dispatchOptions?: any): any; /** * * Returns a compact representation of all of the stories on the task. @@ -1482,7 +1630,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - stories(task : string, params? : any, dispatchOptions? : any): any; + stories(task: string, params?: any, dispatchOptions?: any): any; /** * * Adds a comment to a task. The comment will be authored by the @@ -1500,7 +1648,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - addComment(task : string, data : any, dispatchOptions? : any): any; + addComment(task: string, data: any, dispatchOptions?: any): any; } /** @@ -1513,7 +1661,7 @@ declare module "asana" { /** * @param dispatcher */ - constructor(dispatcher : any); + constructor(dispatcher: Dispatcher); /** * * Returns the full record for a single team. @@ -1526,7 +1674,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - findById(team : string, params? : any, dispatchOptions? : any): any; + findById(team: string, params?: any, dispatchOptions?: any): any; /** * * Returns the compact records for all teams in the organization visible to @@ -1540,7 +1688,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - findByOrganization(organization : string, params? : any, dispatchOptions? : any): any; + findByOrganization(organization: string, params?: any, dispatchOptions?: any): any; /** * * Returns the compact records for all users that are members of the team. @@ -1553,7 +1701,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - users(team : string, params? : any, dispatchOptions? : any): any; + users(team: string, params?: any, dispatchOptions?: any): any; /** * * The user making this call must be a member of the team in order to add others. @@ -1572,7 +1720,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - addUser(team : string, data : any, dispatchOptions? : any): any; + addUser(team: string, data: any, dispatchOptions?: any): any; /** * * The user to remove can be referenced by their globally unique user ID or their email address. @@ -1589,7 +1737,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - removeUser(team : string, data : any, dispatchOptions? : any): any; + removeUser(team: string, data: any, dispatchOptions?: any): any; } /** @@ -1606,7 +1754,7 @@ declare module "asana" { /** * @param dispatcher */ - constructor(dispatcher : any); + constructor(dispatcher: Dispatcher); /** * * Returns the full user record for the currently authenticated user. @@ -1617,7 +1765,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - me(params? : any, dispatchOptions? : any): any; + me(params?: any, dispatchOptions?: any): any; /** * * Returns the full user record for the single user with the provided ID. @@ -1632,7 +1780,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - findById(user : string, params? : any, dispatchOptions? : any): any; + findById(user: string, params?: any, dispatchOptions?: any): any; /** * * Returns the user records for all users in the specified workspace or @@ -1646,7 +1794,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - findByWorkspace(workspace : string, params? : any, dispatchOptions? : any): any; + findByWorkspace(workspace: string, params?: any, dispatchOptions?: any): any; /** * * Returns the user records for all users in all workspaces and organizations @@ -1660,7 +1808,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - findAll(params? : any, dispatchOptions? : any): any; + findAll(params?: any, dispatchOptions?: any): any; } /** @@ -1717,7 +1865,7 @@ declare module "asana" { /** * @param dispatcher */ - constructor(dispatcher : any); + constructor(dispatcher: Dispatcher); /** * * Establishing a webhook is a two-part process. First, a simple HTTP POST @@ -1746,7 +1894,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - create(resource : string, target : string, data : any, dispatchOptions? : any): any; + create(resource: string, target: string, data: any, dispatchOptions?: any): any; /** * * Returns the compact representation of all webhooks your app has @@ -1761,7 +1909,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - getAll(workspace : string, params? : any, dispatchOptions? : any): any; + getAll(workspace: string, params?: any, dispatchOptions?: any): any; /** * * Returns the full record for the given webhook. @@ -1774,7 +1922,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - getById(webhook : string, params? : any, dispatchOptions? : any): any; + getById(webhook: string, params?: any, dispatchOptions?: any): any; /** * * This method permanently removes a webhook. Note that it may be possible @@ -1787,7 +1935,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - deleteById(webhook : string, dispatchOptions? : any): any; + deleteById(webhook: string, dispatchOptions?: any): any; } /** @@ -1812,7 +1960,7 @@ declare module "asana" { /** * @param dispatcher */ - constructor(dispatcher : any); + constructor(dispatcher: Dispatcher); /** * * Returns the full workspace record for a single workspace. @@ -1825,7 +1973,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - findById(workspace : string, params? : any, dispatchOptions? : any): any; + findById(workspace: string, params?: any, dispatchOptions?: any): any; /** * * Returns the compact records for all workspaces visible to the authorized user. @@ -1836,7 +1984,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - findAll(params? : any, dispatchOptions? : any): any; + findAll(params?: any, dispatchOptions?: any): any; /** * * A specific, existing workspace can be updated by making a PUT request on @@ -1855,7 +2003,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - update(workspace : string, data : any, dispatchOptions? : any): any; + update(workspace: string, data: any, dispatchOptions?: any): any; /** * * Retrieves objects in the workspace based on an auto-completion/typeahead @@ -1881,7 +2029,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - typeahead(workspace : string, params? : any, dispatchOptions? : any): any; + typeahead(workspace: string, params?: any, dispatchOptions?: any): any; /** * * The user can be referenced by their globally unique user ID or their email address. @@ -1898,7 +2046,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - addUser(workspace : string, data : any, dispatchOptions? : any): any; + addUser(workspace: string, data: any, dispatchOptions?: any): any; /** * * The user making this call must be an admin in the workspace. @@ -1915,7 +2063,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - removeUser(workspace : string, data : any, dispatchOptions? : any): any; + removeUser(workspace: string, data: any, dispatchOptions?: any): any; } } From 16593406223de5f30d7b8445f24229f29de1d95d Mon Sep 17 00:00:00 2001 From: tkqubo Date: Thu, 28 Jan 2016 01:45:32 +0900 Subject: [PATCH 46/65] test: sample codes --- asana/asana-tests.ts | 96 +++++++++++++- asana/asana.d.ts | 296 ++++++++++++++++++++++++++++++------------- 2 files changed, 304 insertions(+), 88 deletions(-) diff --git a/asana/asana-tests.ts b/asana/asana-tests.ts index 464498dcf0..050fbb36f2 100644 --- a/asana/asana-tests.ts +++ b/asana/asana-tests.ts @@ -2,11 +2,103 @@ /// import * as asana from 'asana'; +import * as util from 'util'; let version: string = asana.VERSION; -let n: asana.auth.BaseBrowserFlow = new asana.auth.BaseBrowserFlow(null); +// https://github.com/Asana/node-asana#usage +// Usage +var client = asana.Client.create().useAccessToken('my_access_token'); +client.users.me().then(function(me) { + console.log(me); +}); -import * as request from 'request'; +client = asana.Client.create({ + clientId: 123, + clientSecret: 'my_client_secret', + redirectUri: 'my_redirect_uri' +}); + +client.useOauth({ + credentials: 'my_access_token' +}); + +var credentials = { + // access_token: 'my_access_token', + refresh_token: 'my_refresh_token' +}; + +client.useOauth({ + credentials: credentials +}); + +// https://github.com/Asana/node-asana#collections +// Collections + +let tagId: string = null; +client.tasks.findByTag(tagId, { limit: 5 }).then((collection: any) => { + console.log(collection.data); + // [ .. array of up to 5 task objects .. ] + + client.tasks.findByTag(tagId).then((firstPage: any) => { + console.log(firstPage.data); + collection.nextPage().then((secondPage: any) => { + console.log(secondPage.data); + }); + }); +}); + +client.tasks.findByTag(tagId).then((collection: any) => { + // Fetch up to 200 tasks, using multiple pages if necessary + collection.fetch(200).then((tasks: any) => { + console.log(tasks); + }); +}); + +client.tasks.findByTag(tagId).then((collection: any) => { + collection.stream().on('data', (task: any) => { + console.log(task); + }); +}); + +// https://github.com/Asana/node-asana#examples +// Examples + +var Asana = asana; + +// Using the API key for basic authentication. This is reasonable to get +// started with, but Oauth is more secure and provides more features. +var client = Asana.Client.create().useBasicAuth(process.env.ASANA_API_KEY); + +client.users.me() + .then((user: any) => { + var userId = user.id; + // The user's "default" workspace is the first one in the list, though + // any user can have multiple workspaces so you can't always assume this + // is the one you want to work with. + var workspaceId = user.workspaces[0].id; + return client.tasks.findAll({ + assignee: userId, + workspace: workspaceId, + completed_since: 'now', + opt_fields: 'id,name,assignee_status,completed' + }); + }) + .then((response: any) => { + // There may be more pages of data, we could stream or return a promise + // to request those here - for now, let's just return the first page + // of items. + return response.data; + }) + .filter((task: any) => { + return task.assignee_status === 'today' || + task.assignee_status === 'new'; + }) + .then((list: any) => { + console.log(util.inspect(list, { + colors: true, + depth: null + })); + }); diff --git a/asana/asana.d.ts b/asana/asana.d.ts index 1f099878b6..85e2027884 100644 --- a/asana/asana.d.ts +++ b/asana/asana.d.ts @@ -38,7 +38,7 @@ declare module "asana" { /** Options to configure the client */ interface ClientOptions extends DispatcherOptions { - clientId?: string; + clientId?: string|number; clientSecret?: string; redirectUri?: string; asanaBaseUrl?: string; @@ -323,7 +323,7 @@ declare module "asana" { /** * @param apiKey */ - new (apiKey : string): BasicAuthenticator; + new (apiKey: string): BasicAuthenticator; } interface BasicAuthenticator extends Authenticator { @@ -334,7 +334,7 @@ declare module "asana" { * @param request * @return */ - authenticateRequest(request : BasicAuthenticatorRequest): BasicAuthenticatorRequest; + authenticateRequest(request: BasicAuthenticatorRequest): BasicAuthenticatorRequest; } interface BasicAuthenticatorRequest { @@ -361,7 +361,7 @@ declare module "asana" { * field. * @constructor */ - new (options : OauthAuthenticatorOptions): OauthAuthenticator; + new (options: OauthAuthenticatorOptions): OauthAuthenticator; } interface OauthAuthenticatorOptions { @@ -370,7 +370,7 @@ declare module "asana" { } interface Credentials { - access_token: string; + access_token?: string; refresh_token?: string; } @@ -382,7 +382,7 @@ declare module "asana" { * @param request * @return */ - authenticateRequest(request : OauthAuthenticatorRequest): OauthAuthenticatorRequest; + authenticateRequest(request: OauthAuthenticatorRequest): OauthAuthenticatorRequest; } interface OauthAuthenticatorRequest { @@ -440,7 +440,7 @@ declare module "asana" { } interface AppOptions extends AsanaAuthorizeUrlOptions { - clientId?: string; + clientId?: string|number; clientSecret?: string; scope?: string; } @@ -523,7 +523,8 @@ declare module "asana" { error_description?: string; } - interface OauthError extends Error { } + interface OauthError extends Error { + } /** * Auto-detects the type of Oauth flow to use that's appropriate to the @@ -549,7 +550,8 @@ declare module "asana" { new (options: any): RedirectFlow; } - interface RedirectFlow extends BaseBrowserFlow { } + interface RedirectFlow extends BaseBrowserFlow { + } var PopupFlow: PopupFlowStatic; @@ -723,6 +725,7 @@ declare module "asana" { * @return */ constructor(message: any); + code: number; value: any; } @@ -785,7 +788,7 @@ declare module "asana" { * @class * @param {Dispatcher} dispatcher The API dispatcher */ - class Attachments { + class Attachments extends Resource { /** * @param dispatcher */ @@ -802,7 +805,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - findById(attachment: string, params?: any, dispatchOptions?: any): any; + findById(attachment: string, params?: any, dispatchOptions?: any): Promise; /** * * Returns the compact records for all attachments on the task. @@ -815,7 +818,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - findByTask(task: string, params?: any, dispatchOptions?: any): any; + findByTask(task: string, params?: any, dispatchOptions?: any): Promise; } /** @@ -847,7 +850,7 @@ declare module "asana" { * @class * @param {Dispatcher} dispatcher The API dispatcher */ - class Events { + class Events extends Resource { /** * @param dispatcher * @return @@ -867,7 +870,7 @@ declare module "asana" { * @class * @param {Dispatcher} dispatcher The API dispatcher */ - class Projects { + class Projects extends Resource { /** * @param dispatcher */ @@ -895,7 +898,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - create(data: any, dispatchOptions?: any): any; + create(data: any, dispatchOptions?: any): Promise; /** * * If the workspace for your project _is_ an organization, you must also @@ -911,7 +914,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - createInWorkspace(workspace: string, data: any, dispatchOptions?: any): any; + createInWorkspace(workspace: string, data: any, dispatchOptions?: any): Promise; /** * * Creates a project shared with the given team. @@ -926,7 +929,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - createInTeam(team: string, data: any, dispatchOptions?: any): any; + createInTeam(team: string, data: any, dispatchOptions?: any): Promise; /** * * Returns the complete project record for a single project. @@ -939,7 +942,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - findById(project: string, params?: any, dispatchOptions?: any): any; + findById(project: string, params?: any, dispatchOptions?: any): Promise; /** * * A specific, existing project can be updated by making a PUT request on the @@ -960,7 +963,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - update(project: string, data: any, dispatchOptions?: any): any; + update(project: string, data: any, dispatchOptions?: any): Promise; /** * * A specific, existing project can be deleted by making a DELETE request @@ -974,7 +977,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - delete(project: string, dispatchOptions?: any): any; + delete(project: string, dispatchOptions?: any): Promise; /** * * Returns the compact project records for some filtered set of projects. @@ -990,7 +993,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - findAll(params?: any, dispatchOptions?: any): any; + findAll(params?: any, dispatchOptions?: any): Promise; /** * * Returns the compact project records for all projects in the workspace. @@ -1005,7 +1008,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - findByWorkspace(workspace: string, params?: any, dispatchOptions?: any): any; + findByWorkspace(workspace: string, params?: any, dispatchOptions?: any): Promise; /** * * Returns the compact project records for all projects in the team. @@ -1020,7 +1023,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - findByTeam(team: string, params?: any, dispatchOptions?: any): any; + findByTeam(team: string, params?: any, dispatchOptions?: any): Promise; /** * * Returns compact records for all sections in the specified project. @@ -1033,7 +1036,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - sections(project: string, params?: any, dispatchOptions?: any): any; + sections(project: string, params?: any, dispatchOptions?: any): Promise; /** * * Returns the compact task records for all tasks within the given project, @@ -1047,7 +1050,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - tasks(project: string, params?: any, dispatchOptions?: any): any; + tasks(project: string, params?: any, dispatchOptions?: any): Promise; /** * * Adds the specified list of users as followers to the project. Followers are a subset of members, therefore if @@ -1063,7 +1066,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - addFollowers(project: string, data: any, dispatchOptions?: any): any; + addFollowers(project: string, data: any, dispatchOptions?: any): Promise; /** * * Removes the specified list of users from following the project, this will not affect project membership status. @@ -1078,7 +1081,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - removeFollowers(project: string, data: any, dispatchOptions?: any): any; + removeFollowers(project: string, data: any, dispatchOptions?: any): Promise; /** * * Adds the specified list of users as members of the project. Returns the updated project record. @@ -1092,7 +1095,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - addMembers(project: string, data: any, dispatchOptions?: any): any; + addMembers(project: string, data: any, dispatchOptions?: any): Promise; /** * * Removes the specified list of members from the project. Returns the updated project record. @@ -1106,7 +1109,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - removeMembers(project: string, data: any, dispatchOptions?: any): any; + removeMembers(project: string, data: any, dispatchOptions?: any): Promise; } /** @@ -1120,7 +1123,7 @@ declare module "asana" { * @class * @param {Dispatcher} dispatcher The API dispatcher */ - class Stories { + class Stories extends Resource { /** * * @param dispatcher @@ -1138,7 +1141,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - findByTask(task: string, params?: any, dispatchOptions?: any): any; + findByTask(task: string, params?: any, dispatchOptions?: any): Promise; /** * * Returns the full record for a single story. @@ -1151,7 +1154,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - findById(story: string, params?: any, dispatchOptions?: any): any; + findById(story: string, params?: any, dispatchOptions?: any): Promise; /** * * Adds a comment to a task. The comment will be authored by the @@ -1169,7 +1172,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - createOnTask(task: string, data: any, dispatchOptions?: any): any; + createOnTask(task: string, data: any, dispatchOptions?: any): Promise; } /** @@ -1183,7 +1186,7 @@ declare module "asana" { * @class * @param {Dispatcher} dispatcher The API dispatcher */ - class Tags { + class Tags extends Resource { /** * @param dispatcher */ @@ -1206,7 +1209,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - create(data: any, dispatchOptions?: any): any; + create(data: any, dispatchOptions?: any): Promise; /** * * Creates a new tag in a workspace or organization. @@ -1226,7 +1229,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - createInWorkspace(workspace: string, data: any, dispatchOptions?: any): any; + createInWorkspace(workspace: string, data: any, dispatchOptions?: any): Promise; /** * * Returns the complete tag record for a single tag. @@ -1239,7 +1242,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - findById(tag: string, params?: any, dispatchOptions?: any): any; + findById(tag: string, params?: any, dispatchOptions?: any): Promise; /** * * Updates the properties of a tag. Only the fields provided in the `data` @@ -1259,7 +1262,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - update(tag: string, data: any, dispatchOptions?: any): any; + update(tag: string, data: any, dispatchOptions?: any): Promise; /** * * A specific, existing tag can be deleted by making a DELETE request @@ -1273,7 +1276,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - delete(tag: string, dispatchOptions?: any): any; + delete(tag: string, dispatchOptions?: any): Promise; /** * * Returns the compact tag records for some filtered set of tags. @@ -1289,7 +1292,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - findAll(params?: any, dispatchOptions?: any): any; + findAll(params?: any, dispatchOptions?: any): Promise; /** * * Returns the compact tag records for all tags in the workspace. @@ -1302,7 +1305,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - findByWorkspace(workspace: string, params?: any, dispatchOptions?: any): any; + findByWorkspace(workspace: string, params?: any, dispatchOptions?: any): Promise; /** * * Returns the compact task records for all tasks with the given tag. @@ -1316,7 +1319,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - getTasksWithTag(tag: string, params?: any, dispatchOptions?: any): any; + getTasksWithTag(tag: string, params?: any, dispatchOptions?: any): Promise; } /** @@ -1327,7 +1330,7 @@ declare module "asana" { * @class * @param {Dispatcher} dispatcher The API dispatcher */ - class Tasks { + class Tasks extends Resource { /** * @param dispatcher */ @@ -1349,7 +1352,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - create(data: any, dispatchOptions?: any): any; + create(data: any, dispatchOptions?: any): Promise; /** * * Creating a new task is as easy as POSTing to the `/tasks` endpoint @@ -1368,7 +1371,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - createInWorkspace(workspace: string, data: any, dispatchOptions?: any): any; + createInWorkspace(workspace: string, data: any, dispatchOptions?: any): Promise; /** * * Returns the complete task record for a single task. @@ -1381,7 +1384,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - findById(task: string, params?: any, dispatchOptions?: any): any; + findById(task: string, params?: any, dispatchOptions?: any): Promise; /** * * A specific, existing task can be updated by making a PUT request on the @@ -1402,7 +1405,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - update(task: string, data: any, dispatchOptions?: any): any; + update(task: string, data: any, dispatchOptions?: any): Promise; /** * * A specific, existing task can be deleted by making a DELETE request on the @@ -1418,7 +1421,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - delete(task: string, dispatchOptions?: any): any; + delete(task: string, dispatchOptions?: any): Promise; /** * * Returns the compact task records for all tasks within the given project, @@ -1432,7 +1435,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - findByProject(projectId: string, params?: any, dispatchOptions?: any): any; + findByProject(projectId: string, params?: any, dispatchOptions?: any): Promise; /** * * Returns the compact task records for all tasks with the given tag. @@ -1445,7 +1448,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - findByTag(tag: string, params?: any, dispatchOptions?: any): any; + findByTag(tag: string, params?: any, dispatchOptions?: any): Promise; /** * * Returns the compact task records for some filtered set of tasks. Use one @@ -1462,7 +1465,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - findAll(params?: any, dispatchOptions?: any): any; + findAll(params?: any, dispatchOptions?: any): Promise; /** * * Adds each of the specified followers to the task, if they are not already @@ -1477,7 +1480,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - addFollowers(task: string, data: any, dispatchOptions?: any): any; + addFollowers(task: string, data: any, dispatchOptions?: any): Promise; /** * * Removes each of the specified followers from the task if they are @@ -1492,7 +1495,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - removeFollowers(task: string, data: any, dispatchOptions?: any): any; + removeFollowers(task: string, data: any, dispatchOptions?: any): Promise; /** * * Returns a compact representation of all of the projects the task is in. @@ -1505,7 +1508,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - projects(task: string, params?: any, dispatchOptions?: any): any; + projects(task: string, params?: any, dispatchOptions?: any): Promise; /** * * Adds the task to the specified project, in the optional location @@ -1532,7 +1535,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - addProject(task: string, data: any, dispatchOptions?: any): any; + addProject(task: string, data: any, dispatchOptions?: any): Promise; /** * * Removes the task from the specified project. The task will still exist @@ -1549,7 +1552,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - removeProject(task: string, data: any, dispatchOptions?: any): any; + removeProject(task: string, data: any, dispatchOptions?: any): Promise; /** * * Returns a compact representation of all of the tags the task has. @@ -1562,7 +1565,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - tags(task: string, params?: any, dispatchOptions?: any): any; + tags(task: string, params?: any, dispatchOptions?: any): Promise; /** * * Adds a tag to a task. Returns an empty data block. @@ -1576,7 +1579,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - addTag(task: string, data: any, dispatchOptions?: any): any; + addTag(task: string, data: any, dispatchOptions?: any): Promise; /** * * Removes a tag from the task. Returns an empty data block. @@ -1590,7 +1593,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - removeTag(task: string, data: any, dispatchOptions?: any): any; + removeTag(task: string, data: any, dispatchOptions?: any): Promise; /** * * Returns a compact representation of all of the subtasks of a task. @@ -1603,7 +1606,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - subtasks(task: string, params?: any, dispatchOptions?: any): any; + subtasks(task: string, params?: any, dispatchOptions?: any): Promise; /** * * Creates a new subtask and adds it to the parent task. Returns the full record @@ -1617,7 +1620,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - addSubtask(task: string, data: any, dispatchOptions?: any): any; + addSubtask(task: string, data: any, dispatchOptions?: any): Promise; /** * * Returns a compact representation of all of the stories on the task. @@ -1630,7 +1633,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - stories(task: string, params?: any, dispatchOptions?: any): any; + stories(task: string, params?: any, dispatchOptions?: any): Promise; /** * * Adds a comment to a task. The comment will be authored by the @@ -1648,7 +1651,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - addComment(task: string, data: any, dispatchOptions?: any): any; + addComment(task: string, data: any, dispatchOptions?: any): Promise; } /** @@ -1657,7 +1660,7 @@ declare module "asana" { * @class * @param {Dispatcher} dispatcher The API dispatcher */ - class Teams { + class Teams extends Resource { /** * @param dispatcher */ @@ -1674,7 +1677,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - findById(team: string, params?: any, dispatchOptions?: any): any; + findById(team: string, params?: any, dispatchOptions?: any): Promise; /** * * Returns the compact records for all teams in the organization visible to @@ -1688,7 +1691,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - findByOrganization(organization: string, params?: any, dispatchOptions?: any): any; + findByOrganization(organization: string, params?: any, dispatchOptions?: any): Promise; /** * * Returns the compact records for all users that are members of the team. @@ -1701,7 +1704,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - users(team: string, params?: any, dispatchOptions?: any): any; + users(team: string, params?: any, dispatchOptions?: any): Promise; /** * * The user making this call must be a member of the team in order to add others. @@ -1720,7 +1723,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - addUser(team: string, data: any, dispatchOptions?: any): any; + addUser(team: string, data: any, dispatchOptions?: any): Promise; /** * * The user to remove can be referenced by their globally unique user ID or their email address. @@ -1737,7 +1740,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - removeUser(team: string, data: any, dispatchOptions?: any): any; + removeUser(team: string, data: any, dispatchOptions?: any): Promise; } /** @@ -1750,7 +1753,7 @@ declare module "asana" { * @class * @param {Dispatcher} dispatcher The API dispatcher */ - class Users { + class Users extends Resource { /** * @param dispatcher */ @@ -1765,7 +1768,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - me(params?: any, dispatchOptions?: any): any; + me(params?: any, dispatchOptions?: any): Promise; /** * * Returns the full user record for the single user with the provided ID. @@ -1780,7 +1783,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - findById(user: string, params?: any, dispatchOptions?: any): any; + findById(user: string, params?: any, dispatchOptions?: any): Promise; /** * * Returns the user records for all users in the specified workspace or @@ -1794,7 +1797,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - findByWorkspace(workspace: string, params?: any, dispatchOptions?: any): any; + findByWorkspace(workspace: string, params?: any, dispatchOptions?: any): Promise; /** * * Returns the user records for all users in all workspaces and organizations @@ -1808,7 +1811,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - findAll(params?: any, dispatchOptions?: any): any; + findAll(params?: any, dispatchOptions?: any): Promise; } /** @@ -1861,7 +1864,7 @@ declare module "asana" { * @class * @param {Dispatcher} dispatcher The API dispatcher */ - class Webhooks { + class Webhooks extends Resource { /** * @param dispatcher */ @@ -1894,7 +1897,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - create(resource: string, target: string, data: any, dispatchOptions?: any): any; + create(resource: string, target: string, data: any, dispatchOptions?: any): Promise; /** * * Returns the compact representation of all webhooks your app has @@ -1909,7 +1912,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - getAll(workspace: string, params?: any, dispatchOptions?: any): any; + getAll(workspace: string, params?: any, dispatchOptions?: any): Promise; /** * * Returns the full record for the given webhook. @@ -1922,7 +1925,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - getById(webhook: string, params?: any, dispatchOptions?: any): any; + getById(webhook: string, params?: any, dispatchOptions?: any): Promise; /** * * This method permanently removes a webhook. Note that it may be possible @@ -1935,7 +1938,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - deleteById(webhook: string, dispatchOptions?: any): any; + deleteById(webhook: string, dispatchOptions?: any): Promise; } /** @@ -1956,7 +1959,7 @@ declare module "asana" { * @class * @param {Dispatcher} dispatcher The API dispatcher */ - class Workspaces { + class Workspaces extends Resource { /** * @param dispatcher */ @@ -1973,7 +1976,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - findById(workspace: string, params?: any, dispatchOptions?: any): any; + findById(workspace: string, params?: any, dispatchOptions?: any): Promise; /** * * Returns the compact records for all workspaces visible to the authorized user. @@ -1984,7 +1987,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - findAll(params?: any, dispatchOptions?: any): any; + findAll(params?: any, dispatchOptions?: any): Promise; /** * * A specific, existing workspace can be updated by making a PUT request on @@ -2003,7 +2006,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - update(workspace: string, data: any, dispatchOptions?: any): any; + update(workspace: string, data: any, dispatchOptions?: any): Promise; /** * * Retrieves objects in the workspace based on an auto-completion/typeahead @@ -2029,7 +2032,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - typeahead(workspace: string, params?: any, dispatchOptions?: any): any; + typeahead(workspace: string, params?: any, dispatchOptions?: any): Promise; /** * * The user can be referenced by their globally unique user ID or their email address. @@ -2046,7 +2049,7 @@ declare module "asana" { * @param dispatchOptions? * @return */ - addUser(workspace: string, data: any, dispatchOptions?: any): any; + addUser(workspace: string, data: any, dispatchOptions?: any): Promise; /** * * The user making this call must be an admin in the workspace. @@ -2063,7 +2066,128 @@ declare module "asana" { * @param dispatchOptions? * @return */ - removeUser(workspace: string, data: any, dispatchOptions?: any): any; + removeUser(workspace: string, data: any, dispatchOptions?: any): Promise; + } + + interface ResourceStatic { + /** + * @param dispatcher + */ + new (dispatcher: Dispatcher): Resource; + + /** + * @type {number} Default number of items to get per page. + */ + DEFAULT_PAGE_LIMIT: number; + + /** + * Helper method that dispatches a GET request to the API, where the expected + * result is a collection. + * @param {Dispatcher} dispatcher + * @param {String} path The path of the API + * @param {Object} [query] The query params + * @param {Object} [dispatchOptions] Options for handling the request and + * response. See `Dispatcher.dispatch`. + * @return {Promise} The Collection response for the request + * @param dispatcher + * @param path + * @param query? + * @param dispatchOptions? + */ + getCollection(dispatcher: any, path: string, query?: any, dispatchOptions?: any): Promise; + + /** + * Helper method for any request Promise from the Dispatcher, unwraps the `data` + * value from the payload. + * @param {Promise} promise A promise returned from a `Dispatcher` request. + * @return {Promise} The `data` portion of the response payload. + * @param promise + * @return + */ + unwrap(promise: any): Promise; + } + + var Resource: ResourceStatic; + + /** + * Base class for a resource accessible via the API. Uses a `Dispatcher` to + * access the resources. + * @param {Dispatcher} dispatcher + * @constructor + */ + interface Resource { + /** + * Dispatches a GET request to the API, where the expected result is a + * single resource. + * @param {String} path The path of the API + * @param {Object} [query] The query params + * @param {Object} [dispatchOptions] Options for handling the request and + * response. See `Dispatcher.dispatch`. + * @return {Promise} The response for the request + * @param path + * @param query? + * @param dispatchOptions? + * @return + */ + dispatchGet(path: string, query?: any, dispatchOptions?: any): Promise; + + /** + * Dispatches a GET request to the API, where the expected result is a + * collection. + * @param {String} path The path of the API + * @param {Object} [query] The query params + * @param {Object} [dispatchOptions] Options for handling the request and + * response. See `Dispatcher.dispatch`. + * @return {Promise} The response for the request + * @param path + * @param query? + * @param dispatchOptions? + * @return + */ + dispatchGetCollection(path: string, query?: any, dispatchOptions?: any): Promise; + + /** + * Dispatches a POST request to the API, where the expected response is a + * single resource. + * @param {String} path The path of the API + * @param {Object} [query] The query params + * @param {Object} [dispatchOptions] Options for handling the request and + * response. See `Dispatcher.dispatch`. + * @return {Promise} The response for the request + * @param path + * @param query? + * @param dispatchOptions? + * @return + */ + dispatchPost(path: string, query?: any, dispatchOptions?: any): Promise; + + /** + * Dispatches a POST request to the API, where the expected response is a + * single resource. + * @param {String} path The path of the API + * @param {Object} [query] The query params + * @param {Object} [dispatchOptions] Options for handling the request and + * response. See `Dispatcher.dispatch`. + * @return {Promise} The response for the request + * @param path + * @param query? + * @param dispatchOptions? + * @return + */ + dispatchPut(path: string, query?: any, dispatchOptions?: any): Promise; + + /** + * Dispatches a DELETE request to the API. The expected response is an + * empty resource. + * @param {String} path The path of the API + * @param {Object} [dispatchOptions] Options for handling the request and + * response. See `Dispatcher.dispatch`. + * @return {Promise} The response for the request + * @param path + * @param dispatchOptions? + * @return + */ + dispatchDelete(path: string, dispatchOptions?: any): Promise; } } From e6236157ce37fe1c8f2e3babd0bee364d8788c8b Mon Sep 17 00:00:00 2001 From: Isman Usoh Date: Thu, 28 Jan 2016 02:25:25 +0700 Subject: [PATCH 47/65] Update react-router-redux.d.ts fix tslint errors no-internal-module --- react-router-redux/react-router-redux.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react-router-redux/react-router-redux.d.ts b/react-router-redux/react-router-redux.d.ts index a0cf53e77d..7248fb3afc 100644 --- a/react-router-redux/react-router-redux.d.ts +++ b/react-router-redux/react-router-redux.d.ts @@ -6,7 +6,7 @@ /// /// -declare module ReactRouterRedux { +declare namespace ReactRouterRedux { import R = Redux; import H = HistoryModule; From 39a41a4404992fbee86e8096d2c4052680b5cdc2 Mon Sep 17 00:00:00 2001 From: Isman Usoh Date: Thu, 28 Jan 2016 04:11:34 +0700 Subject: [PATCH 48/65] add definitions for passport-http-bearer 1.0.1 --- .../passport-http-bearer-tests.ts | 60 +++++++++++++++++++ .../passport-http-bearer.d.ts | 40 +++++++++++++ 2 files changed, 100 insertions(+) create mode 100644 passport-http-bearer/passport-http-bearer-tests.ts create mode 100644 passport-http-bearer/passport-http-bearer.d.ts diff --git a/passport-http-bearer/passport-http-bearer-tests.ts b/passport-http-bearer/passport-http-bearer-tests.ts new file mode 100644 index 0000000000..b776bbbbd7 --- /dev/null +++ b/passport-http-bearer/passport-http-bearer-tests.ts @@ -0,0 +1,60 @@ +/// + +/** + * Created by Isman Usoh . + */ + +import express = require("express"); +import passport = require("passport"); +import httpBearer = require("passport-http-bearer"); + +//#region Test Models +interface IUser { + token: string; +} + +class User implements IUser { + public token: string; + + static findOne(user: IUser, callback: (err: Error, user: User) => void): void { + callback(null, new User()); + } +} +//#endregion + +passport.use(new httpBearer.Strategy((token: string, done: any) => { + User.findOne({ token: token }, function(err, user) { + if (err) { + return done(err); + } + + if (!user) { + return done(null, false); + } + + return done(null, user); + }); +})); + +passport.use(new httpBearer.Strategy({ + scope: ["read", "write"], + realm: "User", + passReqToCallback: true +}, function(req: express.Request, token: string, done: any) { + User.findOne({ token: token }, function(err, user) { + if (err) { + return done(err, null, { message: "Access Denied" }); + } + + if (!user) { + return done(null, false, "Access Denied"); + } + + return done(null, user); + }); +})); + +let app = express(); +app.post("/login", passport.authenticate("bearer", { failureRedirect: "/login" }), function(req, res) { + res.redirect("/"); +}); diff --git a/passport-http-bearer/passport-http-bearer.d.ts b/passport-http-bearer/passport-http-bearer.d.ts new file mode 100644 index 0000000000..6573b4afa4 --- /dev/null +++ b/passport-http-bearer/passport-http-bearer.d.ts @@ -0,0 +1,40 @@ +// Type definitions for passport-http-bearer 1.0.1 +// Project: https://github.com/jaredhanson/passport-http-bearer +// Definitions by: Isman Usoh +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// +/// + +declare module "passport-http-bearer" { + + import passport = require("passport"); + import express = require("express"); + + interface IStrategyOptions { + scope: string | Array; + realm: string; + passReqToCallback: boolean; + } + interface IVerifyOptions { + message: string; + scope: string | Array; + } + + interface VerifyFunction { + (token: string, done: (error: any, user?: any, options?: IVerifyOptions | string) => void): void; + } + + interface VerifyFunctionWithRequest { + (req: express.Request, token: string, done: (error: any, user?: any, options?: IVerifyOptions | string) => void): void; + } + + class Strategy implements passport.Strategy { + constructor(verify: VerifyFunction); + constructor(options: IStrategyOptions, verify: VerifyFunction); + constructor(options: IStrategyOptions, verify: VerifyFunctionWithRequest); + + name: string; + authenticate: (req: express.Request, options?: Object) => void; + } +} From ac66630429c81c86bd8309c111bb29edf48413bb Mon Sep 17 00:00:00 2001 From: Remko de Jong Date: Wed, 27 Jan 2016 21:57:37 +0100 Subject: [PATCH 49/65] 7847 added missing quotes to fix compilation with tsc --- prettyjson/prettyjson-tests.ts | 1 + prettyjson/prettyjson.d.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/prettyjson/prettyjson-tests.ts b/prettyjson/prettyjson-tests.ts index 80ecbbb0f7..5f83a1c1a1 100644 --- a/prettyjson/prettyjson-tests.ts +++ b/prettyjson/prettyjson-tests.ts @@ -1,4 +1,5 @@ /// +import prettyjson = require("prettyjson"); var options: prettyjson.RendererOptions, input: string, diff --git a/prettyjson/prettyjson.d.ts b/prettyjson/prettyjson.d.ts index cf2a69c197..252fccf334 100644 --- a/prettyjson/prettyjson.d.ts +++ b/prettyjson/prettyjson.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare module prettyjson { +declare module "prettyjson" { /** * Defines prettyjson version From af1c7301d57fa8fc4525e50021c13c6b381f61e3 Mon Sep 17 00:00:00 2001 From: Kanchalai Tanglertsampan Date: Wed, 27 Jan 2016 15:17:27 -0800 Subject: [PATCH 50/65] Remove date-constructor variable declaraiton as such thing is include in lib.d.ts --- date.format.js/date.format.d.ts | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/date.format.js/date.format.d.ts b/date.format.js/date.format.d.ts index 6e4ef4ea68..d31543aceb 100644 --- a/date.format.js/date.format.d.ts +++ b/date.format.js/date.format.d.ts @@ -180,32 +180,6 @@ interface Date { format(mask?: string, utc?: boolean) : string; } -declare var Date: { - new (): Date; - new (value: number): Date; - new (value: string): Date; - new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; - (): string; - prototype: Date; - /** - * Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970. - * @param s A date string - */ - parse(s: string): number; - /** - * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date. - * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. - * @param month The month as an number between 0 and 11 (January to December). - * @param date The date as an number between 1 and 31. - * @param hours Must be supplied if minutes is supplied. An number from 0 to 23 (midnight to 11pm) that specifies the hour. - * @param minutes Must be supplied if seconds is supplied. An number from 0 to 59 that specifies the minutes. - * @param seconds Must be supplied if milliseconds is supplied. An number from 0 to 59 that specifies the seconds. - * @param ms An number from 0 to 999 that specifies the milliseconds. - */ - UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; - now(): number; -}; - // Some common format strings interface DateFormatMasks { "default": string; From bc8c22045f4a2ba149636a98af48dfc2edd440e1 Mon Sep 17 00:00:00 2001 From: Adi Dahiya Date: Wed, 27 Jan 2016 18:53:39 -0500 Subject: [PATCH 51/65] Update Drop and Tether typings This is a breaking change that simplifies the definition files and exports the right thing for the external modules. Previously, the external module export was wrong (the global `Drop` and `Tether` constructors are exported when these libraries are imported in CommonJS, not the namespaces as the typings suggested). --- drop/drop.d.ts | 57 ++++++++++++++++++++++------------------------ tether/tether.d.ts | 31 ++++++++++++------------- 2 files changed, 41 insertions(+), 47 deletions(-) diff --git a/drop/drop.d.ts b/drop/drop.d.ts index 1b994c9a1e..6bd963ca5c 100644 --- a/drop/drop.d.ts +++ b/drop/drop.d.ts @@ -1,17 +1,36 @@ -// Type definitions for Drop v1.3.0 +// Type definitions for Drop v1.4 // Project: http://github.hubspot.com/drop/ // Definitions by: Adi Dahiya // Definitions: https://github.com/borisyankov/DefinitelyTyped /// -declare module drop { +// global Drop constructor +declare class Drop { + constructor(options: Drop.IDropOptions); - interface DropStatic { - new(options: IDropOptions): Drop; - createContext(options: IDropContextOptions): DropStatic; - } + public content: HTMLElement; + public element: HTMLElement; + public tether: Tether; + public open(): void; + public close(): void; + public remove(): void; + public toggle(): void; + public isOpened(): boolean; + public position(): void; + public destroy(): void; + /* + * Drop instances fire "open" and "close" events. + */ + public on(event: string, handler: Function, context?: any): void; + public once(event: string, handler: Function, context?: any): void; + public off(event: string, handler?: Function): void; + + public static createContext(options: Drop.IDropContextOptions): Drop; +} + +declare module Drop { interface IDropContextOptions { classPrefix?: string; defaults?: IDropOptions; @@ -27,33 +46,11 @@ declare module drop { constrainToScrollParent?: boolean; remove?: boolean; beforeClose?: () => boolean; - tetherOptions?: tether.ITetherOptions; + tetherOptions?: Tether.ITetherOptions; } - - interface Drop { - content: HTMLElement; - element: HTMLElement; - tether: tether.Tether; - open(): void; - close(): void; - remove(): void; - toggle(): void; - isOpened(): boolean; - position(): void; - destroy(): void; - /* - * Drop instances fire "open" and "close" events. - */ - on(event: string, handler: Function, context?: any): void; - once(event: string, handler: Function, context?: any): void; - off(event: string, handler?: Function): void; - } - } declare module "drop" { - export = drop; + export = Drop; } -declare var Drop: drop.DropStatic; - diff --git a/tether/tether.d.ts b/tether/tether.d.ts index 2fffb16c98..1a58d74330 100644 --- a/tether/tether.d.ts +++ b/tether/tether.d.ts @@ -1,14 +1,22 @@ -// Type definitions for Tether v0.6 +// Type definitions for Tether v1.1 // Project: http://github.hubspot.com/tether/ // Definitions by: Adi Dahiya // Definitions: https://github.com/borisyankov/DefinitelyTyped -declare module tether { +// global Tether constructor +declare class Tether { + constructor(options: Tether.ITetherOptions); - interface TetherStatic { - new(options: ITetherOptions): Tether; - } + public setOptions(options: Tether.ITetherOptions): void; + public disable(): void; + public enable(): void; + public destroy(): void; + public position(): void; + public static position(): void; +} + +declare namespace Tether { interface ITetherOptions { attachment?: string; classes?: {[className: string]: boolean}; @@ -31,20 +39,9 @@ declare module tether { pinnedClass?: string; to?: string | HTMLElement | number[]; } - - interface Tether { - setOptions(options: ITetherOptions): void; - disable(): void; - enable(): void; - destroy(): void; - position(): void; - } - } declare module "tether" { - export = tether; + export = Tether; } -declare var Tether: tether.TetherStatic; - From 48fea977d057c6d777bdc2ac6afad30be74849c2 Mon Sep 17 00:00:00 2001 From: Lucas Woo Date: Thu, 28 Jan 2016 11:07:07 +0800 Subject: [PATCH 52/65] add ua extensions definitions --- ua-parser-js/ua-parser-js.d.ts | 142 ++++++++++++++++++++++----------- 1 file changed, 96 insertions(+), 46 deletions(-) diff --git a/ua-parser-js/ua-parser-js.d.ts b/ua-parser-js/ua-parser-js.d.ts index 5ac748dcf5..4d93f66a39 100644 --- a/ua-parser-js/ua-parser-js.d.ts +++ b/ua-parser-js/ua-parser-js.d.ts @@ -1,6 +1,6 @@ -// Type definitions for js-cookie v2.0 +// Type definitions for ua-parser-js v0.7.10 // Project: https://github.com/faisalman/ua-parser-js -// Definitions by: Viktor Miroshnikov +// Definitions by: Viktor Miroshnikov , Lucas Woo // Definitions: https://github.com/borisyankov/DefinitelyTyped declare module UAParser { @@ -61,7 +61,7 @@ declare module UAParser { version: string; } - export interface IOS{ + export interface IOS { /** * Possible 'os.name' * AIX, Amiga OS, Android, Arch, Bada, BeOS, BlackBerry, CentOS, Chromium OS, Contiki, @@ -78,7 +78,7 @@ declare module UAParser { version: string; } - export interface ICPU{ + export interface ICPU { /** * Possible architecture: * 68k, amd64, arm, arm64, avr, ia32, ia64, irix, irix64, mips, mips64, pa-risc, @@ -87,7 +87,7 @@ declare module UAParser { architecture: string; } - export interface IResult{ + export interface IResult { ua: string; browser: IBrowser; device: IDevice; @@ -95,56 +95,106 @@ declare module UAParser { os: IOS; cpu: ICPU; } + + export interface BROWSER { + NAME: string, + + // Deprecated + MAJOR: string, + VERSION: string + } + export interface CPU { + ARCHITECTURE: string + } + + export interface DEVICE { + MODEL: string, + VENDOR: string, + TYPE: string, + CONSOLE: string, + MOBILE: string, + SMARTTV: string, + TABLET: string, + WEARABLE: string, + EMBEDDED: string + } + + export interface ENGINE { + NAME: string, + VERSION: string + } + + export interface OS { + NAME: string, + VERSION: string + } + } -declare class UAParser { - /** - * Returns browser information - */ - getBrowser(): UAParser.IBrowser; - /** - * Returns OS information - */ - getOS(): UAParser.IOS; +declare module "ua-parser-js" { - /** - * Returns browsers engine information - */ - getEngine(): UAParser.IEngine; + export class UAParser { + static VERSION: string; + static BROWSER: UAParser.BROWSER; + static CPU: UAParser.CPU; + static DEVICE: UAParser.DEVICE; + static ENGINE: UAParser.ENGINE; + static OS: UAParser.OS; + + /** + * Returns browser information + */ + getBrowser(): UAParser.IBrowser; + /** + * Returns OS information + */ + getOS(): UAParser.IOS; - /** - * Returns device information - */ - getDevice(): UAParser.IDevice; + /** + * Returns browsers engine information + */ + getEngine(): UAParser.IEngine; - /** - * Returns parsed CPU information - */ - getCPU(): UAParser.ICPU; + /** + * Returns device information + */ + getDevice(): UAParser.IDevice; - /** - * Returns UA string of current instance - */ - getUA(): string; + /** + * Returns parsed CPU information + */ + getCPU(): UAParser.ICPU; - /** - * Set & parse UA string - */ - setUA(ua: string): void; + /** + * Returns UA string of current instance + */ + getUA(): string; - /** - * Returns parse result - */ - getResult(): UAParser.IResult; + /** + * Set & parse UA string + */ + setUA(uastring: string): UAParser; - /** - * Create a new parser - */ - constructor (); + /** + * Returns parse result + */ + getResult(): UAParser.IResult; - /** - * Create a new parser with UA prepopulated - */ - constructor (ua: string); + /** + * Create a new parser + */ + constructor(); + + /** + * Create a new parser with UA prepopulated + */ + constructor(uastring: string); + + /** + * Create a new parser with UA prepopulated and extensions extended + */ + constructor(uastring: string, extensions: any); + } + } From 8284977a966c0d064e91b6548d63718973dac3c3 Mon Sep 17 00:00:00 2001 From: Lucas Woo Date: Thu, 28 Jan 2016 11:07:27 +0800 Subject: [PATCH 53/65] add ua extensions tests --- ua-parser-js/ua-parser-js-tests.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ua-parser-js/ua-parser-js-tests.ts b/ua-parser-js/ua-parser-js-tests.ts index 02ddf1403f..7ff2c5db56 100644 --- a/ua-parser-js/ua-parser-js-tests.ts +++ b/ua-parser-js/ua-parser-js-tests.ts @@ -1,6 +1,8 @@ /// -function test_parser(){ +import {UAParser} from 'ua-parser-js'; + +function test_parser() { var ua = 'Mozilla/5.0 (Windows NT 6.2) AppleWebKit/536.6 (KHTML, like Gecko) Chrome/20.0.1090.0 Safari/536.6'; var parser = new UAParser(ua); var result = parser.getResult(); @@ -41,4 +43,9 @@ function test_parser(){ result.cpu.architecture parser.getCPU().architecture + // Extensions + var uaString = 'ownbrowser/1.3'; + var ownBrowser = [[/(ownbrowser)\/([\w\.]+)/i], [UAParser.BROWSER.NAME, UAParser.BROWSER.VERSION]]; + var parser = new UAParser(uaString, { browser: ownBrowser }); + } From 5b84dddc7c9eddd127aaf5f66a5ae20b0346e719 Mon Sep 17 00:00:00 2001 From: Lucas Woo Date: Thu, 28 Jan 2016 12:10:20 +0800 Subject: [PATCH 54/65] remove redundant constructor --- ua-parser-js/ua-parser-js.d.ts | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/ua-parser-js/ua-parser-js.d.ts b/ua-parser-js/ua-parser-js.d.ts index 4d93f66a39..4eea1b3226 100644 --- a/ua-parser-js/ua-parser-js.d.ts +++ b/ua-parser-js/ua-parser-js.d.ts @@ -180,21 +180,11 @@ declare module "ua-parser-js" { * Returns parse result */ getResult(): UAParser.IResult; - - /** - * Create a new parser - */ - constructor(); - - /** - * Create a new parser with UA prepopulated - */ - constructor(uastring: string); /** * Create a new parser with UA prepopulated and extensions extended */ - constructor(uastring: string, extensions: any); + constructor(uastring?: string, extensions?: any); } } From 5b0c38ab2bd59980a095c025b11ebb6cc6cbf947 Mon Sep 17 00:00:00 2001 From: ukyo Date: Thu, 28 Jan 2016 14:26:57 +0900 Subject: [PATCH 55/65] add moment#isSameOrAfter --- moment/moment-node.d.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/moment/moment-node.d.ts b/moment/moment-node.d.ts index 1382a12068..830f39ef4b 100644 --- a/moment/moment-node.d.ts +++ b/moment/moment-node.d.ts @@ -18,7 +18,7 @@ declare module moment { seconds?: number; milliseconds?: number; } - + interface MomentInput { /** Year */ years?: number; @@ -313,6 +313,7 @@ declare module moment { * @since 2.10.7+ */ isSameOrBefore(b: MomentComparable, granularity?: string): boolean; + isSameOrAfter(b: MomentComparable, granularity?: string): boolean; /** * @deprecated since version 2.8.0 @@ -344,7 +345,7 @@ declare module moment { get(unit: string): number; set(unit: string, value: number): Moment; set(objectLiteral: MomentInput): Moment; - + /** * This returns an object containing year, month, day-of-month, hour, minute, seconds, milliseconds. * @since 2.10.5+ From 67ea9ab52c90bfecbc31ea262cf918e485f345a6 Mon Sep 17 00:00:00 2001 From: Denis Sokolov Date: Thu, 28 Jan 2016 11:02:31 +0200 Subject: [PATCH 56/65] once --- once/once-tests.ts | 13 +++++++++++++ once/once.d.ts | 23 +++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 once/once-tests.ts create mode 100644 once/once.d.ts diff --git a/once/once-tests.ts b/once/once-tests.ts new file mode 100644 index 0000000000..05f60f0400 --- /dev/null +++ b/once/once-tests.ts @@ -0,0 +1,13 @@ +/// + +import once from "once"; + +once(() => 3); +once(() => 3)(); +let s = once(() => ({foo: 1}))(); +s.foo; + +once.proto(); + +once(() => 3).called && true; +once(() => ({foo: 1})).value.foo; diff --git a/once/once.d.ts b/once/once.d.ts new file mode 100644 index 0000000000..a0aa60e798 --- /dev/null +++ b/once/once.d.ts @@ -0,0 +1,23 @@ +// Type definitions for once v1.3.3 +// Project: https://github.com/isaacs/once +// Definitions by: Denis Sokolov +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +interface SimpleFunction { + (...args: any[]): Result; +} + +interface OnceFunction extends SimpleFunction { + called: boolean; + value: Result; +} + +interface Once { + (f: SimpleFunction): OnceFunction; + proto: Function; +} + +declare module "once" { + var once: Once; + export default once; +} From 41875272e5b43f50f1832abb35f0bcaa5c1867c7 Mon Sep 17 00:00:00 2001 From: Julien P Date: Thu, 28 Jan 2016 16:20:48 +0100 Subject: [PATCH 57/65] Make options optional for Blazy constructor --- blazy/blazy.d.ts | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/blazy/blazy.d.ts b/blazy/blazy.d.ts index cb4747d6f7..dedeff4160 100644 --- a/blazy/blazy.d.ts +++ b/blazy/blazy.d.ts @@ -14,31 +14,31 @@ interface Blazy { interface BlazyOptions { - breakpoints: Breakpoint[]; + breakpoints?: Breakpoint[]; - container: string; + container?: string; - error: (ele: Element|HTMLElement, msg: string) => void; + error?: (ele: Element|HTMLElement, msg: string) => void; - errorClass: string; + errorClass?: string; - loadInvisible: boolean; + loadInvisible?: boolean; - offset: number; + offset?: number; - saveViewportOffsetDelay: number; + saveViewportOffsetDelay?: number; - selector: string; + selector?: string; - separator: string; + separator?: string; - src: string; + src?: string; - success: (ele: Element|HTMLElement) => void; + success?: (ele: Element|HTMLElement) => void; - successClass: string; + successClass?: string; - validateDelay: number; + validateDelay?: number; } From 3b43503a1fee32715886a125fc6ff96112c271a7 Mon Sep 17 00:00:00 2001 From: Aluan Haddad Date: Thu, 28 Jan 2016 10:24:56 -0500 Subject: [PATCH 58/65] Change ITemplateOptions.{onClick, etc.} to union Changed the types of the ```ITemplateOptions``` properties ```onBlur```, ```onChange```, ```onClick```, ```onFocus```, ```onKeydown```, ```onKeypress```, and ```onKeyup``` from ```TypeScript string ``` to ```TypeScript string | IExpresssionFunction ``` string | IExpresssionFunction --- angular-formly/angular-formly.d.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/angular-formly/angular-formly.d.ts b/angular-formly/angular-formly.d.ts index f42b35a89e..3dff7cd8a2 100644 --- a/angular-formly/angular-formly.d.ts +++ b/angular-formly/angular-formly.d.ts @@ -101,13 +101,13 @@ declare module AngularFormly { type?: string; //expression types - onBlur?: string; - onChange?: string; - onClick?: string; - onFocus?: string; - onKeydown?: string; - onKeypress?: string; - onKeyup?: string; + onBlur?: string | IExpresssionFunction; + onChange?: string | IExpresssionFunction; + onClick?: string | IExpresssionFunction; + onFocus?: string | IExpresssionFunction; + onKeydown?: string | IExpresssionFunction; + onKeypress?: string | IExpresssionFunction; + onKeyup?: string | IExpresssionFunction; //Bootstrap types label?: string; From 28392f58eda0da9d800a4992afac9f7b8db07050 Mon Sep 17 00:00:00 2001 From: Aluan Haddad Date: Thu, 28 Jan 2016 10:38:07 -0500 Subject: [PATCH 59/65] Update angular-formly.d.ts --- angular-formly/angular-formly.d.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/angular-formly/angular-formly.d.ts b/angular-formly/angular-formly.d.ts index 3dff7cd8a2..423e6ff9b3 100644 --- a/angular-formly/angular-formly.d.ts +++ b/angular-formly/angular-formly.d.ts @@ -101,13 +101,13 @@ declare module AngularFormly { type?: string; //expression types - onBlur?: string | IExpresssionFunction; - onChange?: string | IExpresssionFunction; - onClick?: string | IExpresssionFunction; - onFocus?: string | IExpresssionFunction; - onKeydown?: string | IExpresssionFunction; - onKeypress?: string | IExpresssionFunction; - onKeyup?: string | IExpresssionFunction; + onBlur?: string | IExpressionFunction; + onChange?: string | IExpressionFunction; + onClick?: string | IExpressionFunction; + onFocus?: string | IExpressionFunction; + onKeydown?: string | IExpressionFunction; + onKeypress?: string | IExpressionFunction; + onKeyup?: string | IExpressionFunction; //Bootstrap types label?: string; From b29fb02ebe6c03d4822e05e1b2de15e5ccc8fa29 Mon Sep 17 00:00:00 2001 From: David Pfeffer Date: Thu, 28 Jan 2016 10:42:53 -0500 Subject: [PATCH 60/65] Asynchronous encoding and synchronous decoding --- jsonwebtoken/jsonwebtoken.d.ts | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/jsonwebtoken/jsonwebtoken.d.ts b/jsonwebtoken/jsonwebtoken.d.ts index b558df2e5f..3c296d5329 100644 --- a/jsonwebtoken/jsonwebtoken.d.ts +++ b/jsonwebtoken/jsonwebtoken.d.ts @@ -43,12 +43,16 @@ declare module "jsonwebtoken" { maxAge?: string; } - export interface VerifyCallbak { + export interface VerifyCallback { (err: Error, decoded: any): void; } + export interface SignCallback { + (err: Error, encoded: string): void; + } + /** - * Sign the given payload into a JSON Web Token string + * Synchronously sign the given payload into a JSON Web Token string * @param {String|Object|Buffer} payload - Payload to sign, could be an literal, buffer or string * @param {String|Buffer} secretOrPrivateKey - Either the secret for HMAC algorithms, or the PEM encoded private key for RSA and ECDSA. * @param {SignOptions} [options] - Options for the signature @@ -57,14 +61,33 @@ declare module "jsonwebtoken" { export function sign(payload: string | Buffer | Object, secretOrPrivateKey: string | Buffer, options?: SignOptions): string; /** - * Verify given token using a secret or a public key to get a decoded token + * Sign the given payload into a JSON Web Token string + * @param {String|Object|Buffer} payload - Payload to sign, could be an literal, buffer or string + * @param {String|Buffer} secretOrPrivateKey - Either the secret for HMAC algorithms, or the PEM encoded private key for RSA and ECDSA. + * @param {SignOptions} [options] - Options for the signature + * @param {Function} callback - Callback to get the encoded token on + */ + export function sign(payload: string | Buffer | Object, secretOrPrivateKey: string | Buffer, options?: SignOptions, callback: SignCallback): void; + + /** + * Synchronously verify given token using a secret or a public key to get a decoded token + * @param {String} token - JWT string to verify + * @param {String|Buffer} secretOrPublicKey - Either the secret for HMAC algorithms, or the PEM encoded public key for RSA and ECDSA. + * @param {VerifyOptions} [options] - Options for the verification + * @returns The decoded token. + */ + function verify(token: string, secretOrPublicKey: string | Buffer): any; + function verify(token: string, secretOrPublicKey: string | Buffer, options?: VerifyOptions): any; + + /** + * Asynchronously verify given token using a secret or a public key to get a decoded token * @param {String} token - JWT string to verify * @param {String|Buffer} secretOrPublicKey - Either the secret for HMAC algorithms, or the PEM encoded public key for RSA and ECDSA. * @param {VerifyOptions} [options] - Options for the verification * @param {Function} callback - Callback to get the decoded token on */ - function verify(token: string, secretOrPublicKey: string | Buffer, callback?: VerifyCallbak): void; - function verify(token: string, secretOrPublicKey: string | Buffer, options?: VerifyOptions, callback?: VerifyCallbak): void; + function verify(token: string, secretOrPublicKey: string | Buffer, callback?: VerifyCallback): void; + function verify(token: string, secretOrPublicKey: string | Buffer, options?: VerifyOptions, callback?: VerifyCallback): void; /** * Returns the decoded payload without verifying if the signature is valid. From e9bbd8faccf27958c259854fa49c7cf24731f2a4 Mon Sep 17 00:00:00 2001 From: David Pfeffer Date: Thu, 28 Jan 2016 10:46:57 -0500 Subject: [PATCH 61/65] Fixed optional arg issue --- jsonwebtoken/jsonwebtoken.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jsonwebtoken/jsonwebtoken.d.ts b/jsonwebtoken/jsonwebtoken.d.ts index 3c296d5329..a616027e99 100644 --- a/jsonwebtoken/jsonwebtoken.d.ts +++ b/jsonwebtoken/jsonwebtoken.d.ts @@ -67,7 +67,8 @@ declare module "jsonwebtoken" { * @param {SignOptions} [options] - Options for the signature * @param {Function} callback - Callback to get the encoded token on */ - export function sign(payload: string | Buffer | Object, secretOrPrivateKey: string | Buffer, options?: SignOptions, callback: SignCallback): void; + export function sign(payload: string | Buffer | Object, secretOrPrivateKey: string | Buffer, callback: SignCallback): void; + export function sign(payload: string | Buffer | Object, secretOrPrivateKey: string | Buffer, options: SignOptions, callback: SignCallback): void; /** * Synchronously verify given token using a secret or a public key to get a decoded token From 2238bc22109e49bdeef018698db248dcd59df053 Mon Sep 17 00:00:00 2001 From: RonanDrouglazet Date: Thu, 28 Jan 2016 17:48:43 +0100 Subject: [PATCH 62/65] CKEDITOR.inline arguments Take a string OR HTMLElement on first param here http://docs.ckeditor.com/source/inline.html#CKEDITOR-method-inline then here http://docs.ckeditor.com/source/element.html#CKEDITOR-dom-element-static-method-get tested on CKEDITOR 4.5.6 --- ckeditor/ckeditor.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ckeditor/ckeditor.d.ts b/ckeditor/ckeditor.d.ts index b3c2f45243..88fee3674d 100644 --- a/ckeditor/ckeditor.d.ts +++ b/ckeditor/ckeditor.d.ts @@ -80,7 +80,7 @@ declare module CKEDITOR { function getTemplate(name: string): template; function getUrl(resource: string): string; function inline(element: string, instanceConfig?: config): editor; - function inline(element: HTMLTextAreaElement, instanceConfig?: config): editor; + function inline(element: HTMLElement, instanceConfig?: config): editor; function inlineAll(): void; function loadFullCore(): void; function replace(element: string, config?: config): editor; @@ -1147,4 +1147,4 @@ declare module CKEDITOR { function load(languageCode: string, defaultLanguage: string, callback: Function): void; function detect(defaultLanguage: string, probeLanguage: string): string; } -} \ No newline at end of file +} From 130dd500af985076aa1cd0274bbef30fa9e47ff7 Mon Sep 17 00:00:00 2001 From: Wesley Smith Date: Thu, 28 Jan 2016 12:18:30 -0800 Subject: [PATCH 63/65] Add "variable" to TemplateSettings. --- underscore/underscore-tests.ts | 1 + underscore/underscore.d.ts | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/underscore/underscore-tests.ts b/underscore/underscore-tests.ts index 74cef85ec7..262c987ea8 100644 --- a/underscore/underscore-tests.ts +++ b/underscore/underscore-tests.ts @@ -432,6 +432,7 @@ var template2 = _.template("Hello {{ name }}!"); template2({ name: "Mustache" }); _.template("Using 'with': <%= data.answer %>", oldTemplateSettings)({ variable: 'data' }); +_.template("Using 'with': <%= data.answer %>", { variable: 'data' })({ answer: 'no' }); _(['test', 'test']).pick(['test2', 'test2']); diff --git a/underscore/underscore.d.ts b/underscore/underscore.d.ts index 66b2e8f3ec..2f6ab1e757 100644 --- a/underscore/underscore.d.ts +++ b/underscore/underscore.d.ts @@ -39,6 +39,12 @@ declare module _ { * Default value is '/<%-([\s\S]+?)%>/g'. **/ escape?: RegExp; + + /** + * By default, 'template()' places the values from your data in the local scope via the 'with' statement. + * However, you can specify a single variable name with this setting. + **/ + variable?: string; } interface Collection { } From d81c162a12fe72416ecc510417338174c1b7aa38 Mon Sep 17 00:00:00 2001 From: Ilya Mochalov Date: Thu, 28 Jan 2016 00:23:02 +0500 Subject: [PATCH 64/65] lodash: _.times changed --- lodash/lodash-tests.ts | 15 +-------------- lodash/lodash.d.ts | 18 +++++++----------- 2 files changed, 8 insertions(+), 25 deletions(-) diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 5c52443587..02c29be3a6 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -10173,26 +10173,14 @@ module TestTimes { let result: number[]; result = _.times(42); + result = _(42).times(); } { let result: TResult[]; result = _.times(42, iteratee); - result = _.times(42, iteratee, any); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(42).times(); - } - - { - let result: _.LoDashImplicitArrayWrapper; - result = _(42).times(iteratee); - result = _(42).times(iteratee, any); } { @@ -10205,7 +10193,6 @@ module TestTimes { let result: _.LoDashExplicitArrayWrapper; result = _(42).chain().times(iteratee); - result = _(42).chain().times(iteratee, any); } } diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index b6e884fc9b..35d2a0801e 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -16632,18 +16632,16 @@ declare module _ { //_.times interface LoDashStatic { /** - * Invokes the iteratee function n times, returning an array of the results of each invocation. The iteratee is - * bound to thisArg and invoked with one argument; (index). + * Invokes the iteratee function n times, returning an array of the results of each invocation. The iteratee + * is invoked with one argument; (index). * * @param n The number of times to invoke iteratee. * @param iteratee The function invoked per iteration. - * @param thisArg The this binding of iteratee. * @return Returns the array of results. */ times( n: number, - iteratee: (num: number) => TResult, - thisArg?: any + iteratee: (num: number) => TResult ): TResult[]; /** @@ -16657,14 +16655,13 @@ declare module _ { * @see _.times */ times( - iteratee: (num: number) => TResult, - thisArgs?: any - ): LoDashImplicitArrayWrapper; + iteratee: (num: number) => TResult + ): TResult[]; /** * @see _.times */ - times(): LoDashImplicitArrayWrapper; + times(): number[]; } interface LoDashExplicitWrapper { @@ -16672,8 +16669,7 @@ declare module _ { * @see _.times */ times( - iteratee: (num: number) => TResult, - thisArgs?: any + iteratee: (num: number) => TResult ): LoDashExplicitArrayWrapper; /** From 67b4a67acdf6d2ee2c5774cf3311df152b3af34a Mon Sep 17 00:00:00 2001 From: Brandon Kase Date: Thu, 28 Jan 2016 18:02:59 -0800 Subject: [PATCH 65/65] react-native: Param added to ScrollView onScroll --- react-native/react-native.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react-native/react-native.d.ts b/react-native/react-native.d.ts index 1ffa1d5461..b3fa3e3cc4 100644 --- a/react-native/react-native.d.ts +++ b/react-native/react-native.d.ts @@ -2712,7 +2712,7 @@ declare namespace __React { * Fires at most once per frame during scrolling. * The frequency of the events can be contolled using the scrollEventThrottle prop. */ - onScroll?: () => void + onScroll?: (event?: { nativeEvent: NativeScrollEvent }) => void /** * Experimental: When true offscreen child views (whose `overflow` value is