From 3bf516e434ed1894b9b646ac1aa3be1db40e6e61 Mon Sep 17 00:00:00 2001 From: damianog Date: Sat, 7 Sep 2013 20:24:58 +0200 Subject: [PATCH 001/221] Update node.d.ts headers return an object http://nodejs.org/api/http.html#http_message_headers --- node/node.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node/node.d.ts b/node/node.d.ts index 8aa2f7beb..f6a321ee8 100644 --- a/node/node.d.ts +++ b/node/node.d.ts @@ -255,7 +255,7 @@ declare module "http" { export interface ServerRequest extends events.NodeEventEmitter, stream.ReadableStream { method: string; url: string; - headers: string; + headers: any; trailers: string; httpVersion: string; setEncoding(encoding?: string): void; From 64a51e86db17b9b82324cf67572f7cb5524857ac Mon Sep 17 00:00:00 2001 From: HowardRichards Date: Thu, 30 Jan 2014 14:10:37 +0000 Subject: [PATCH 002/221] Added additional definitions to Valerie Added ModelValidation types --- valerie/valerie-tests.ts | 12 +++- valerie/valerie.d.ts | 150 +++++++++++++++++++++++++++++++++------ 2 files changed, 139 insertions(+), 23 deletions(-) diff --git a/valerie/valerie-tests.ts b/valerie/valerie-tests.ts index bf9ce7880..22adc7a13 100644 --- a/valerie/valerie-tests.ts +++ b/valerie/valerie-tests.ts @@ -285,4 +285,14 @@ function RuleTests() { .rule(() => { return anyValue; }) .end(); -} \ No newline at end of file +} + +function ModelValidation() { + + var model = {}; + + var validatedModel = valerie.validatableModel(model) + .validateAll() + .end(); + +} diff --git a/valerie/valerie.d.ts b/valerie/valerie.d.ts index 847e0a7a0..1140d0a94 100644 --- a/valerie/valerie.d.ts +++ b/valerie/valerie.d.ts @@ -7,7 +7,10 @@ /** * - * Extensions to KO functions to provide validation + * Extensions to KO functions to provide validation + * + * Version 1.1 - added missing methods to ModelValidationState + * */ interface KnockoutObservable { // starts validation for observable @@ -23,7 +26,6 @@ interface KnockoutObservableArray { validate(validationOptions?: Valerie.ValidationOptions): Valerie.PropertyValidationState>; } - interface KnockoutObservableArrayFunctions { /** * Creates and sets a model validation state on a Knockout observable array.
@@ -198,8 +200,6 @@ interface KnockoutBindingHandlers { visibleWhenValid: KnockoutBindingHandler; } - - // // root valerie namespace - static methods // @@ -208,12 +208,10 @@ declare var valerie: Valerie.Static; // additional types for Valerie (all inside this namespace) declare module Valerie { - // // Static methods on valerie namespace // interface Static { - /** * Maps a source model to a destination model, including only applicable properties * @param {Object|Array} sourceModel the source model @@ -263,10 +261,128 @@ declare module Valerie { // ctor new: (model: any, options?: ModelValidationStateOptions) => ModelValidationState; - addValidationStates(validationStateOrStates: any): void; - model: any; options?: ModelValidationStateOptions + + // methods + + /** + * Adds validation states to this validation state.
+ * [fluent] + * @name valerie.ModelValidationState#addValidationStates + * @fluent + * @param {object|array.} validationStateOrStates the validation states to add + * @return {valerie.ModelValidationState} + */ + addValidationStates(validationStateOrStates: any): ModelValidationState; + + /** + * Sets the value or function used to determine if the model is applicable.
+ * [fluent] + * @name valerie.ModelValidationState#applicable + * @fluent + * @param {boolean|function} [valueOrFunction = true] the value or function to use + * @return {valerie.ModelValidationState} + */ + applicable(valueOrFunction: any): ModelValidationState; + + /** + * Clears the static summary of validation states that are in a failure state.
+ * [fluent] + * @name valerie.ModelValidationState#clearSummary + * @fluent + * @param {boolean} [clearSubModelSummaries = false] whether to clear the static summaries for sub-models + * @return {valerie.ModelValidationState} + */ + clearSummary(valueOrFunction: any): ModelValidationState; + + /** + * Includes any validation failures for this model in a validation summary.
+ * [fluent] + * @fluent + * @return {valerie.ModelValidationState} + */ + includeInSummary(): ModelValidationState; + + /** + * Sets the value or function used to determine the name of the model.
+ * [fluent] + * @fluent + * @param {string|function} valueOrFunction the value or function to use + * @return {valerie.ModelValidationState} + */ + name(valueOrFunction: any): ModelValidationState; + + /** + * Removes validation states.
+ * [fluent] + * @fluent + * @param {object|array.} validationStateOrStates the validation states to remove + * @return {valerie.ModelValidationState} + */ + removeValidationStates(validationStateOrStates: any): ModelValidationState; + + /** + * Stops validating the given sub-model by adding the validation state that belongs to it. + * @param {*} validatableSubModel the sub - model to start validating + * @return {valerie.ModelValidationState } + */ + startValidatingSubModel(validatableSubModel: any): ModelValidationState; + + /** + * Stops validating the given sub-model by removing the validation state that belongs to it. + * @param {*} validatableSubModel the sub-model to stop validating + * @return {valerie.ModelValidationState} + */ + stopValidatingSubModel(validatableSubModel: any): ModelValidationState; + + /** + * Updates the static summary of validation states that are in a failure state.
+ * [fluent] + * @fluent + * @param {boolean} [updateSubModelSummaries = false] whether to update the static summaries for sub-models + * @return {valerie.ModelValidationState} + */ + updateSummary(updateSubModelSummaries: boolean): ModelValidationState; + + /** + * Adds the validation states for all the descendant properties and sub-models that belong to the model.
+ * [fluent] + * @fluent + * @return {valerie.ModelValidationState} + */ + validateAll(): ModelValidationState; + + /** + * Adds the validation states for all the descendant properties that belong to the model.
+ * [fluent] + * @fluent + * @return {valerie.ModelValidationState} + */ + validateAllProperties(): ModelValidationState; + + /** + * Adds the validation states for all the child properties that belong to the model.
+ * [fluent] + * @fluent + * @return {valerie.ModelValidationState} + */ + validateChildProperties(): ModelValidationState; + + /** + * Adds the validation states for all the child properties and sub-models that belong to the model.
+ * [fluent] + * @fluent + * @return {valerie.ModelValidationState} + */ + validateChildPropertiesAndSubModels(): ModelValidationState; + + + /** + * Ends a chain of fluent method calls on this model validation state. + * @return {function} the model the validation state is for + */ + end(): any; } // Construction options for a model validation state. @@ -282,7 +398,6 @@ declare module Valerie { // PropertyValidationState // interface PropertyValidationState { - // properties: // the observable or computed the validation state is for @@ -310,12 +425,12 @@ declare module Valerie { during(earliest: () => Date, latest: Date, options?: ValidationOptions): PropertyValidationState; // dateFN + date during(earliest: Date, latest: () => Date, options?: ValidationOptions): PropertyValidationState; // date + dateFN during(earliest: () => Date, latest: () => Date, options?: ValidationOptions): PropertyValidationState; // dateFN + dateFN - earliest(earliest: Date, options?: ValidationOptions): PropertyValidationState; // date value + earliest(earliest: Date, options?: ValidationOptions): PropertyValidationState; // date value earliest(earliest: () => Date, options?: ValidationOptions): PropertyValidationState; // date function email(): PropertyValidationState; entryFormat(format: string): PropertyValidationState; excludeFromSummary(): PropertyValidationState; - expression(regularExpression: RegExp, options?: ValidationOptions): PropertyValidationState; // regex + expression(regularExpression: RegExp, options?: ValidationOptions): PropertyValidationState; // regex expression(regularExpressionString: string, options?: ValidationOptions): PropertyValidationState; // regex string float(options?: ValidationOptions): PropertyValidationState; integer(options?: ValidationOptions): PropertyValidationState; @@ -377,7 +492,6 @@ declare module Valerie { touched(): boolean; // get touched state touched(value: boolean): boolean; // set touched state result(): ValidationResult; - } interface ValidationResult { @@ -390,7 +504,6 @@ declare module Valerie { //TODO: not added static members/methods createFailedResult(message: string): ValidationResult; - } interface IRule { @@ -411,7 +524,7 @@ declare module Valerie { } interface ValidatableModel { - name: (value:string) => PropertyValidationState; + name: (value: string) => PropertyValidationState; // return original observableArray end: () => T; @@ -438,7 +551,6 @@ declare module Valerie { // A helper for parsing and formatting numeric values. interface NumericHelper { - // Adds thousands separators to the given numeric string. addThousandsSeparator(numericString: string): string; @@ -468,13 +580,10 @@ declare module Valerie { // Unformats a numeric string; removes currency signs, thousands separators and normalises decimal separators. unformat(numericString: string): string; - } - interface ValidationState { - - // Finds and returns the validation states + // Finds and returns the validation states findIn(model: any, includeSubModels?: boolean, recurse?: boolean, @@ -486,15 +595,12 @@ declare module Valerie { // nforms if the given model, observable or computed has a validation state. has(modelOrObservableOrComputed: any): boolean; - // Sets the validation state for the given model, observable or computed. setFor(modelOrObservableOrComputed: any, state: IValidationState): void; - } } declare module Valerie.Rules { - /* Todo: add classes in valerie.rules namespace From 0737d4dccb2f285c50b77da91dcf526e6fcf5347 Mon Sep 17 00:00:00 2001 From: HowardRichards Date: Wed, 16 Apr 2014 14:30:07 +0100 Subject: [PATCH 003/221] Added more static valerie namespace definitions --- valerie/valerie-tests.ts | 37 +++++++++++ valerie/valerie.d.ts | 128 +++++++++++++++++++++++++++++++++++++-- 2 files changed, 160 insertions(+), 5 deletions(-) diff --git a/valerie/valerie-tests.ts b/valerie/valerie-tests.ts index 22adc7a13..b33932e29 100644 --- a/valerie/valerie-tests.ts +++ b/valerie/valerie-tests.ts @@ -296,3 +296,40 @@ function ModelValidation() { .end(); } + +function UtilsStaticTests() { + + var t1 = valerie.utils.asArray(1); + var t2 = valerie.utils.asArray([1,2]); + + var t3 = valerie.utils.asFunction(1); + var t4 = valerie.utils.asFunction(() => { return 1; }); + + var t5 = valerie.utils.isArray([1, 2]); + var t5 = valerie.utils.isArrayOrObject(1); + var t6 = valerie.utils.isFunction("x"); + var t7 = valerie.utils.isMissing(null); + var t8 = valerie.utils.isObject({}); + var t9 = valerie.utils.isString("test"); + + var opts: Valerie.ValidationOptions = {}; // all values are optional + var t10 = valerie.utils.mergeOptions(opts, opts); +} + +function ValidationResultStaticTests() { + + var t1 = valerie.ValidationResult.passedInstance; + + var t2 = valerie.ValidationResult.createFailedResult("message"); + +} + +function ValidationStateStaticTests() { + + var t1 = valerie.validationState.findIn({}); + var t2 = valerie.validationState.getFor({}); + var t3 = valerie.validationState.has({}); + + var state = {}; + var t4 = valerie.validationState.setFor({}, state); +} diff --git a/valerie/valerie.d.ts b/valerie/valerie.d.ts index 1140d0a94..1514f3a4d 100644 --- a/valerie/valerie.d.ts +++ b/valerie/valerie.d.ts @@ -3,13 +3,13 @@ // Definitions by: Howard Richards // Definitions: https://github.com/borisyankov/DefinitelyTyped -/// + /** * * Extensions to KO functions to provide validation * - * Version 1.1 - added missing methods to ModelValidationState + * Version 1.2 - added more static methods to valerie object * */ interface KnockoutObservable { @@ -246,9 +246,78 @@ declare module Valerie { // (value should be observable or computed) validatableProperty(value: T, options?: ValidationOptions): PropertyValidationState; + // Validation result class + ValidationResult: ValidationResultStatic; + // additional namespaces for static methods: + converters: ConvertersStatic; + + /* + //TODO: additional namespaces/statics not yet used + dom: DomStatic; + formatting: FormattingStatic; + koBindingsHelper: KoBindingsHelperStatic; + koExtras: KoExtrasStatic; + rules: RulesStatic; + */ + + utils: UtilsStatic; + validationState: ValidationState; + + } + + interface ValidationResultStatic { + + passedInstance: ValidationResult; + + // static method to create validatio failed message + createFailedResult(message: string): ValidationResult; + } + + // Contains converters, always singletons. + interface ConvertersStatic { + + //TODO: other converters to be added + + passThrough: Valerie.IConverter; + } + + + interface UtilsStatic { + + // Creates a function that returns the given value as an array of one item, or simply returns the given value if it is already an array. + asArray(value: any): any[]; + + // Creates a function that returns the given value, or simply returns the given value if it is already a function + asFunction(value: T): () => T; + asFunction(fn: () => T): () => T; + + // Tests whether the given value is an array + isArray(value: any): boolean; + + // Tests whether the given value is an array or object. + isArrayOrObject(value: any): boolean; + + // Tests whether the given value is a function. + isFunction(value: any): boolean; + + // Tests whether the given value is "missing".undefined, null, an empty string or an empty array are considered to be "missing". + isMissing(value: any): boolean; + + // Tests whether the given value is an object. + isObject(value: any): boolean; + + // Tests whether the give value is a string. + isString(value: any): boolean; + + //Merges the given default options with the given options. + // - either parameter can be omitted and a clone of the other parameter will be returned + // - the merge is shallow + // - array properties are shallow cloned + mergeOptions(defaultOptions: ValidationOptions, options): ValidationOptions; + } // callback interface (see mapModel above) @@ -296,6 +365,53 @@ 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} + */ + getName(): string; + + isApplicable(): boolean; + 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 + */ + paused(value: boolean): boolean; + + pending(): boolean; + + pendingStates(): IValidationState[]; + + refresh(): void; + + result(): ValidationResult; + + summary(): summaryItem[] + + /*** + * Gets or sets whether the model has been 'touched' by user action + */ + touched(value: boolean): boolean; + + + validationStates(): IValidationState[]; + /** * Includes any validation failures for this model in a validation summary.
* [fluent] @@ -501,9 +617,6 @@ declare module Valerie { pending: boolean; //true if the activity hasn't yet completed message: string; //a message from the activity new: (state: any, message?: string) => ValidationResult; - - //TODO: not added static members/methods - createFailedResult(message: string): ValidationResult; } interface IRule { @@ -598,6 +711,11 @@ declare module Valerie { // Sets the validation state for the given model, observable or computed. setFor(modelOrObservableOrComputed: any, state: IValidationState): void; } + + interface summaryItem { + name: string; + message: string; + } } declare module Valerie.Rules { From 4241fd0e05217a833fba04ef34dafe3091fe83fb Mon Sep 17 00:00:00 2001 From: Dave Allen Date: Mon, 4 Aug 2014 10:21:06 -0700 Subject: [PATCH 004/221] Updated for Meteor 0.8.3 using new auto-generation script that parses the official Meteor api.js documentation file. Updated the test file accordingly. --- meteor/meteor-tests.ts | 84 +-- meteor/meteor.d.ts | 1137 +++++++++++++++++++--------------------- 2 files changed, 549 insertions(+), 672 deletions(-) diff --git a/meteor/meteor-tests.ts b/meteor/meteor-tests.ts index ca1973f63..bb7928b1e 100644 --- a/meteor/meteor-tests.ts +++ b/meteor/meteor-tests.ts @@ -1,4 +1,4 @@ -/// +/// /** * All code below was copied from the examples at http://docs.meteor.com/. @@ -10,16 +10,17 @@ /*********************************** Begin setup for tests ******************************/ // A developer must declare a var Template like this in a separate file to use this TypeScript type definition file -interface ITemplate { - adminDashboard: IMeteorViewModel; - chat: IMeteorViewModel; -} -declare var Template: ITemplate; +//interface ITemplate { +// adminDashboard: Meteor.Template; +// chat: Meteor.Template; +//} +//declare var Template: ITemplate; var Rooms = new Meteor.Collection('rooms'); var Messages = new Meteor.Collection('messages'); var Monkeys = new Meteor.Collection('monkeys'); +var check = function(str1, str2) {}; /********************************** End setup for tests *********************************/ @@ -203,7 +204,7 @@ Items.insert({list: groceriesId, name: "Persimmons"}); */ var Players = new Meteor.Collection('Players'); -Template.adminDashboard.events({ +Template['adminDashboard'].events({ 'click .givePoints': function () { Players.update(Session.get("currentPlayer"), {$inc: {score: 5}}); } @@ -223,7 +224,7 @@ Meteor.methods({ /** * From Collections, collection.remove section */ -Template.chat.events({ +Template['chat'].events({ 'click .remove': function () { Messages.remove(this._id); } @@ -282,16 +283,6 @@ topPosts.forEach(function (post) { count += 1; }); -/** - * From Collections, cursor.count section - */ -var frag = Meteor.render(function () { - var highScoring = Posts.find({score: {$gt: 10}}); - return "

There are " + highScoring.count() + " posts with " + - "scores greater than 10

"; -}); -document.body.appendChild(frag); - /** * From Collections, cursor.observeChanges section */ @@ -328,12 +319,6 @@ Session.set("currentRoomId", "home"); /** * From Sessions, Session.get section */ -Session.set("enemy", "Eastasia"); -var frag1 = Meteor.render(function () { - return "

We've always been at war with " + - Session.get("enemy") + "

"; -}); - // Page will say "We've always been at war with Eastasia" // DA: commented out since transpiler didn't like append() @@ -362,15 +347,6 @@ Meteor.users.deny({update: function () { return true; }}); /** * From Accounts, Meteor.loginWithExternalService section */ -Accounts.loginServiceConfiguration.remove({ - service: "weibo" -}); -Accounts.loginServiceConfiguration.insert({ - service: "weibo", - clientId: "1292962797", - secret: "75a730b58f5691de5522789070c319bc" -}); - Meteor.loginWithGithub({ requestPermissions: ['user', 'public_repo'] }, function (err) { @@ -434,52 +410,12 @@ Accounts.emailTemplates.enrollAccount.text = function (user, url) { /** * From Templates, Template.myTemplate.helpers section */ -Template.adminDashboard.helpers({ +Template['adminDashboard'].helpers({ foo: function () { return Session.get("foo"); } }); -/** - * From Templates, Template.myTemplate.preserve - */ -Template.adminDashboard.preserve({ - 'input[id]': function (node) { return node.id; } -}); - -/** - * From Templates, Meteor.render section - */ -var frag2 = Meteor.render(function () { - return "

There are " + Players.find({online: true}).count() + - " players online.

"; -}); -document.body.appendChild(frag2); - -Players.update({idleTime: {$gt: 30}}, {$set: {online: false}}); - -/** - * From Templates, Meteor.renderList section - */ -var frag3 = Meteor.renderList( - Posts.find({tags: "frontpage"}), - function(post) { - var style = Session.equals("selectedId", post._id) ? "selected" : ""; - // A real app would need to quote/sanitize post.name - return '
' + post.name + '
'; - }); -document.body.appendChild(frag3); - -var somePost = Posts.findOne({tags: "frontpage"}); -Session.set("selectedId", somePost._id); - -var eventTester = { - 'click p': function (event: IMeteorEvent) { - var paragraph = event.currentTarget; // always a P - var clickedElement = event.target; // could be the P or a child element - } -} - /** * From Match section */ diff --git a/meteor/meteor.d.ts b/meteor/meteor.d.ts index a321dc00e..b1611f51a 100644 --- a/meteor/meteor.d.ts +++ b/meteor/meteor.d.ts @@ -1,604 +1,545 @@ -// Type definitions for Meteor 0.6.5 -// Project: http://www.meteor.com/ -// Definitions by: Dave Allen -// Definitions: https://github.com/borisyankov/DefinitelyTyped - - -interface IMeteor { - - /******** - * Core * - ********/ - isClient: boolean; - isServer: boolean; - startup(func: Function): void; - absoluteUrl(path: string, - options: { - secure?: boolean; - replaceLocalhost?: boolean; - rootUrl?: string; - }): void; - settings: Object; - release: string; - - - /************************* - * Publish and Subscribe * - *************************/ - - /** - * Publish a record set. - * - * @param name Name of the attribute set. If null, the set has no name, and the record set is - * automatically sent to all connected clients. - * @param func Function called on the server each time a client subscribes. Inside the function, - * this is the publish handler object, described below. If the client passed arguments - * to subscribe, the function is called with the same arguments. - */ - publish(name: string, func: Function): any; - //Todo: Figure out a way to define this.userId, this.added, this.changed, etc that can be called from within publish - - /** - * Subscribe to a record set. Returns a handle that provides stop() and ready() methods. - * - * @param name Name of the subscription. Matches name of server's publish() call. - * @param arg1,arg2,arg3 Optional arguments passed to publisher function on server. - * @param callbacks Optional. May include onError and onReady callbacks. Can be Object or Function. If a function - * is passed instead of an object, it is interpreted as an onReady callback. - */ - subscribe(name: string, arg1?: any, arg2?: any, ars3?: any, arg4?: any, callbacks?: Object): IMeteorHandle; - - - /*********** - * Methods * - ***********/ - methods(methods: Object): void; - Error(error: number, reason?: string, details?: string): void; - // DA: Really should be defined like this: call(name: string, ...args?: any[], asyncCallback?: Function): void; - // But typescript does not allow Rest parameter (..args) to not be the last parameter defined - call(name: string, param1?: Object, param2?: Object, param3?: Object, param4?: Object, asyncCallback?: Function): void; - apply(name: string, options: any[], asyncCallback?: Function): void; - defer(callback: Function): void; - - - /********************* - * ServerConnections * - *********************/ - status(): { - connected: boolean; - status: string; - retryCount: number; - retryTime: number; - reason: string; - }; - reconnect(): void; - disconnect(): void; - - - /*************** - * Collections * - ***************/ - Collection(name: string, - options?: { - connection?: Object; - idGeneration?: string; - transform?: Function; - }): void; - - - /************ - * Accounts * - ************/ - user(): IMeteorUser; - userId(): string; - users: IMeteorUserCollection; - loggingIn(): boolean; - logout(callback?: Function): void; - loginWithPassword(user: Object, password: string, callback?: Function): void; - loginWithExternalService(options?: { - requestPermissions?: string[]; - requestOfflineToken?: boolean; - forceApprovalPrompt?: boolean; - }, - callback?: Function): void; - loginWithFacebook(options?: { - requestPermissions?: string[]; - requestOfflineToken?: boolean; - forceApprovalPrompt?: boolean; - }, - callback?: Function): void; - loginWithGithub(options?: { - requestPermissions?: string[]; - requestOfflineToken?: boolean; - forceApprovalPrompt?: boolean; - }, - callback?: Function): void; - loginWithGoogle(options?: { - requestPermissions?: string[]; - requestOfflineToken?: boolean; - forceApprovalPrompt?: boolean; - }, - callback?: Function): void; - loginWithMeetup(options?: { - requestPermissions?: string[]; - requestOfflineToken?: boolean; - forceApprovalPrompt?: boolean; - }, - callback?: Function): void; - loginWithTwitter(options?: { - requestPermissions?: string[]; - requestOfflineToken?: boolean; - forceApprovalPrompt?: boolean; - }, - callback?: Function): void; - loginWithWeibo(options?: { - requestPermissions?: string[]; - requestOfflineToken?: boolean; - forceApprovalPrompt?: boolean; - }, - callback?: Function): void; - - /************* - * Templates * - *************/ - render(htmlFunc: Function): DocumentFragment; - renderList(observable: IMeteorCursor, docFunc: Function, elseFunc?: Function): DocumentFragment; - - /********** - * Timers * - **********/ - setTimeout(func: Function, delay: number): void; - setInterval(func: Function, delay: number): void; - clearTimeout(id: number): void; - clearInterval(id: number): void; - - - /******************** Begin definitions for contributed packages from Atmosphere (or elsewhere) *******************/ - - /************************************************** - * For Paginated-Subscription contributed package * - **************************************************/ - subscribeWithPagination(collection: string, limit: number): IMeteorHandle; - Template(): void; - - /************************************************* - * For Router or Iron-Router contributed package * - *************************************************/ - Router: IMeteorRouter; - - /********************************* - * For Error contributed package * - *********************************/ - Errors: IMeteorErrors; - - /******************** End definitions for contributed packages from Atmosphere (or elsewhere) *********************/ - -} // End Meteor.someFunction definitions - - -/*************** - * Collections * - ***************/ -interface IMeteorCollection { - find(selector?, options?: Object): IMeteorCursor; - findOne(selector, options?: Object): any; - insert(doc: Object, callback?: Function): string; - update(selector, modifier, options?: Object, callback?: Function): void; - remove(selector, callback?: Function): void; - allow(options: Object): boolean; - deny(options: Object): boolean; - ObjectID(hexString?: string): Object; -} - -interface IMeteorCursor { - forEach(callback: Function): void; - map(callback: Function): void; - fetch(): any[]; - count(): number; - rewind(): void; - observe(callbacks: Object): void; - observeChanges(callbacks: Object): void; -} - - -/************* - * Templates * - *************/ - /** - * To use Meteor's Template.templateName.function, you must define an interface in a separate file with - * extension ".d.ts". Within the interface, every template name must have a property by that name that - * is of type IMeteorViewModel or IMeteorManager (choose either depending on your philosophical - * preference -- both work the same) - * e.g. file ".../client/views/view-model-types.d.ts": * - * interface ITemplate { - * postsList: IMeteorViewModel; - * comment: IMeteorViewModel; - * notifications: IMeteorViewModel; - * [your template name]: IMeteorViewModel; - * } - * declare var Template: ITemplate; + * Meteor definitions for TypeScript + * author - Olivier Refalo - orefalo@yahoo.com + * author - David Allen - dave@fullflavedave.com + * + * Thanks to Sam Hatoum for the base code for auto-generating this file + * + * supports Meteor 0.8.3 + * */ -interface IMeteorViewModel { - rendered(callback: Function): void; - created(callback: Function): void; - destroyed(callback: Function): void; - events(eventMap: {[eventName: string]: Function;}): void; - helpers(helpers: Object): void; - preserve(selector: Object): void; -} -interface IMeteorManager { - rendered(callback: Function): void; - created(callback: Function): void; - destroyed(callback: Function): void; - events(eventMap: {[eventType: string]: Function;}): void; - helpers(helpers: Object): any; - preserve(selector: Object): void; -} - -// DA: Currently not used, but I'd like to figure out a way to define the function signature -// for teh callbacks in IMeteorViewModel, IMeteorManager, and many other interfaces -interface IMeteorEvent { - type?: MeteorEventType.Value; - target?: Element; - currentTarget?: Element; - which?: number; - stopPropogation(): void; - stopImmediatePropogation(): void; - preventDefault(): void; - isPropogationStopped(): boolean; - isImmediatePropogationStopped(): boolean; - isDefaultPrevented(): boolean; -} - -declare module MeteorEventType { - export enum Value {'click', 'dblclick', 'focus', 'blur', 'change', - 'mouseenter', 'mouseleave', 'mousedown', 'mouseup', 'keydown', 'keypress', 'keyup', 'tap'} -} - -/*********** - * Session * - ***********/ -interface IMeteorSession { - set(key: string, value: Object): void; - setDefault(key: string, value: Object): void; - get(key: string): Object; - equals(key: string, value: any): void; -} - -interface IMeteorHandle { - loaded(): number; - limit(): number; - ready(): boolean; - loadNextPage(): void; -} - -/************************** - * Accounts and Passwords * - **************************/ -interface IMeteorUser { - _id?: string; - username?: string; - emails?: { - address: string; - verified: boolean; - }; - profile?: any; - services?: any; - createdAt?: number; -} - -interface IMeteorUserCollection { - find(selector?, options?: Object): IMeteorCursor; - findOne(selector, options?: Object): IMeteorUser; - insert(doc: IMeteorUser, callback?: Function): IMeteorUser; - update(selector, modifier, options?: Object, callback?: Function): void; - remove(selector, callback?: Function): void; - allow(options: Object): boolean; - deny(options: Object): boolean; - ObjectID(hexString?: string): Object; -} - -interface IMeteorAccounts { - config(options: { - sendVerificationEmail?: boolean; - forbidClientAccountCreation?: boolean; - }): void; - ui: { - config(options: { - requestPermissions?: Object; - requestOfflineToken?: Object; - passwordSignupFields?: string; - }); - }; - validateNewUser(func: Function): void; - onCreateUser(func: Function): void; - createUser(options: { - username?: string; - email?: string; - password?: string; - profile?: string; - }, - callback?: Function): void; - changePassword(oldPassword: string, newPassword: string, callback?: Function): void; - forgotPassword(options: { - email: string; - }, - callback?: Function): void; - resetPassword(token: string, newPassword: string, callback?: Function): void; - setPassword(userId: string, newPassword: string): void; - verifyEmail(token: string, callback?: Function): void; - sendResetPasswordEmail(userId: string, email?: string): void; - sendEnrollmentEmail(userId: string, email?: string): void; - sendVerificationEmail(userId: string, email?: string): void; - emailTemplates: { - from: string; - siteName: string; - resetPassword: IMeteorEmailValues; - enrollAccount: IMeteorEmailValues; - verifyEmail: IMeteorEmailValues; - }; - // DA: I didn't see the signature for this, but it appears in the examples - loginServiceConfiguration: { - remove(options: Object): void; - insert(options: Object): void; - }; -} - -interface IMeteorEmailValues { - subject?: Function; - text?: Function; -} - -interface IMeteorMatch { - test(value: any, pattern: any): boolean; - Any; - String; - Number; - Boolean; - undefined; - null; - Integer; - ObjectIncluding; - Object; - Optional(pattern: string); - OneOf(...args: string[]); - Where(condition: boolean); -} - -interface IExternalServiceParams { - options?: { - requestPermissions?: string[]; - requestOfflineToken?: boolean; - forceApprovalPrompt?: boolean; - }; - callback?: Function; -} - -/******** - * Deps * - ********/ -interface IMeteorDeps { - autorun(runFunc: Function): IMeteorComputationObject; - flush(): void; - nonreactive(func: Function): void; - active: boolean; - currentComputation: IMeteorComputationObject; - onInvalidate(callback: Function): void; - afterFlush(callback: Function): void; - - /** - * @constructor - */ - Computation(): void; - - /** - * @constructor - */ - Dependency(): void; -} - -interface IMeteorComputationObject { - stop(): void; - invalidate(): void; - onInvalidate(callback: Function): void; - stopped: boolean; - invalidated: boolean; - firstRun: boolean; -} - -interface IMeteorDependencyObject { - changed(): void; - depend(fromComputation?: IMeteorComputationObject): boolean; - hasDependents(): boolean; -} - -/********* - * EJSON * - *********/ -interface IMeteorEJSON { - parse(str: string): void; - stringify(val: any): string; - fromJSONValue(val): any; - toJSONValue(val): JSON; - equals(any: any): boolean; - clone(val: any): any; - newBinary(size: number): void; - isBinary(x: any): boolean; - addType(name: string, factory: Function): void; -} - -/**************** - * HTTP package * - ****************/ -interface IMeteorHTTP { - call(method: string, url: string, options: { - content?: string; - data?: Object; - query?: string; - params?: Object; - auth?: string; - headers?: Object; - timeout?: number; - followRedirects?: boolean; - }, asyncCallback?: Function): IMeteorHTTPResult; - get(url: string, options?: { - content?: string; - data?: Object; - query?: string; - params?: Object; - auth?: string; - headers?: Object; - timeout?: number; - followRedirects?: boolean; - }, asyncCallback?: Function): IMeteorHTTPResult; - post(url: string, options?: { - content?: string; - data?: Object; - query?: string; - params?: Object; - auth?: string; - headers?: Object; - timeout?: number; - followRedirects?: boolean; - }, asyncCallback?: Function): IMeteorHTTPResult; - put(url: string, options?: { - content?: string; - data?: Object; - query?: string; - params?: Object; - auth?: string; - headers?: Object; - timeout?: number; - followRedirects?: boolean; - }, asyncCallback?: Function): IMeteorHTTPResult; - del(url: string, options?: { - content?: string; - data?: Object; - query?: string; - params?: Object; - auth?: string; - headers?: Object; - timeout?: number; - followRedirects?: boolean; - }, asyncCallback?: Function): IMeteorHTTPResult; -} - -// DA: Currently not used -// I would like to figure out a way to specify this as type for options for IMeteorHTTP methods. -// Tests don't work if I simply specify this interface as the type. -interface IMeteorHTTPCallOptions { - content?: string; - data?: Object; - query?: string; - params?: Object; - auth?: string; - headers?: Object; - timeout?: number; - followRedirects?: boolean; -} - -interface IMeteorHTTPResult { - statusCode: number; - content: string; - data?: JSON; - headers: Object; -} - -/********* - * Email * - *********/ -interface IMeteorEmail { - send(options: { - from?: string; - to: any; - cc?: any; - bcc?: any; - replyTo?: any; - subject?: string; - text?: string; - html?: string; - headers?: Object; - }): void; -} - - -/********** - * Assets * - **********/ -interface IMeteorAssets { - getText(assetPath: string, asyncCallback?: Function): string; - getBinary(assetPath: string, asyncCallback?: Function): any; -} - -/******* - * DPP * - *******/ -interface IMeteorDPP { - connect(url: string): void; -} - -declare var Meteor: IMeteor; -declare var Collection: IMeteorCollection; -declare var Session: IMeteorSession; -declare var Deps: IMeteorDeps; -declare var Accounts: IMeteorAccounts; -declare var Match: IMeteorMatch; -declare function check(value: any, pattern: any): void; -declare var Computation: IMeteorComputationObject; -declare var Dependency: IMeteorDependencyObject; -declare var EJSON: IMeteorEJSON; -declare var HTTP: IMeteorHTTP; -declare var Email: IMeteorEmail; -declare var Assets: IMeteorAssets; -declare var DPP: IMeteorDPP; - -declare function changed(collection: string, id: string, fields, Object): void; - -/******************** Begin definitions for contributed packages from Atmosphere (or elsewhere) *********************/ - -/*************************************************** - * For Router and Iron-Router contributed packages * - ***************************************************/ -interface IMeteorRouter { - - // These are for Router - page(): void; - add(route: Object): void; - to(path: string, ...args: any[]): void; - filters(filtersMap: Object); - filter(filterName: string, options?: Object); - - // These are for Iron-Router - map(routeMap: Function): void; - path(route: string, params?: Object): void; - url(route: string): void; - routes: Object; - configure(options: IMeteorRouterConfig): void; -} - -// For Iron-Router -interface IMeteorRouterConfig { - layout: string; - notFoundTemplate: string; - loadingTemplate: string; - renderTemplates: Object; -} - -interface IMeteorErrors { - throw(message: string): void; - clear(): void; -} - -// For Router and Iron-Router contributed packages -declare var Router: IMeteorRouter; - -/******************** End definitions for contributed packages from Atmosphere (or elsewhere) ***********************/ +/// /** - * Todo: - * Define "this.function" functions. - * Define the signatures of callback functions and other functions. - ***/ + * These are the modules and interfaces that can't be automatically generated from the Meteor api.js file + */ +declare module Meteor { + interface EJSONObject extends Object {} + + interface LoginWithExternalServiceOptions { + requestPermissions?: string[]; + requestOfflineToken?: Boolean; + forceApprovalPrompt?: Boolean; + userEmail?: string; + } + + function loginWithMeteorDeveloperAccount(options?: Meteor.LoginWithExternalServiceOptions, callback?: Function): void; + function loginWithFacebook(options?: Meteor.LoginWithExternalServiceOptions, callback?: Function): void; + function loginWithGithub(options?: Meteor.LoginWithExternalServiceOptions, callback?: Function): void; + function loginWithGoogle(options?: Meteor.LoginWithExternalServiceOptions, callback?: Function): void; + function loginWithMeetup(options?: Meteor.LoginWithExternalServiceOptions, callback?: Function): void; + function loginWithTwitter(options?: Meteor.LoginWithExternalServiceOptions, callback?: Function): void; + function loginWithWeibo(options?: Meteor.LoginWithExternalServiceOptions, callback?: Function): void; + + interface UserEmail { + address:string; + verified:boolean; + } + + interface User { + _id?:string; + username?:string; + emails?:Meteor.UserEmail[]; + createdAt?: number; + profile?: any; + services?: any; + } + + interface SubscriptionHandle { + stop(): void; + ready(): boolean; + } + + interface CollectionFieldSpecifier { + [id: string]: Number; + } + + interface TemplateBase { + [templateName: string]: Meteor.Template; + } + + interface RenderedTemplate extends Object {} + + interface DataContext extends Object {} + + enum CollectionIdGenerationEnum { + STRING, + MONGO + } + + interface CollectionOptions { + connection: Object; + idGeneration: Meteor.CollectionIdGenerationEnum; + transform?: (document)=>any; + } + + function Collection(name:string, options?:Meteor.CollectionOptions) : void; + + interface Tinytest { + add(name:string, func:Function); + addAsync(name:string, func:Function); + } + + enum StatusEnum { + connected, + connecting, + failed, + waiting, + offline + } + + interface LiveQueryHandle { + stop(): void; + } + + interface EmailFields { + subject?: Function; + text?: Function; + } + + interface EmailTemplates { + from: string; + siteName: string; + resetPassword: Meteor.EmailFields; + enrollAccount: Meteor.EmailFields; + verifyEmail: Meteor.EmailFields; + } + + interface AccountsBase { + EmailTemplates: { + from: string; + siteName: string; + resetPassword: Meteor.EmailFields; + enrollAccount: Meteor.EmailFields; + verifyEmail: Meteor.EmailFields; + } + loginServicesConfigured(): boolean; + } + + interface MatchBase { + Any; + String; + Integer; + Boolean; + undefined; + null; + Object; + Optional(pattern):boolean; + ObjectIncluding(dico):boolean; + OneOf(...patterns); + Where(condition); + } + + interface AllowDenyOptions { + insert?: (userId:string, doc) => boolean; + update?: (userId, doc, fieldNames, modifier) => boolean; + remove?: (userId, doc) => boolean; + fetch?: string[]; + transform?: Function; + } + + interface Error { + error: number; + reason?: string; + details?: string; + } +} + +declare module Deps { + function Computation(): void; + function Dependency(): void; +} + +declare module Package { + function describe(metadata:PackageDescribeAPI); + function on_use(func:{(api:Api, where?:string[]):void}); + function on_use(func:{(api:Api, where?:string):void}); + function on_test(func:{(api:Api):void}) ; + function register_extension(extension:string, options:PackageRegisterExtensionOptions); + interface PackageRegisterExtensionOptions {(bundle:Bundle, source_path:string, serve_path:string, where?:string[]):void} + interface PackageDescribeAPI { + summary: string; + } + interface Api { + export(variable:string); + export(variables:string[]); + use(deps:string, where?:string[]); + use(deps:string, where?:string); + use(deps:string[], where?:string[]); + use(deps:string[], where?:string); + add_files(file:string, where?:string[]); + add_files(file:string, where?:string); + add_files(file:string[], where?:string[]); + add_files(file:string[], where?:string); + imply(package:string); + imply(packages:string[]); + } + interface BundleOptions { + type: string; + path: string; + data: any; + where: string[]; + } + interface Bundle { + add_resource(options:BundleOptions); + error(diagnostics:string); + } +} + +declare module Npm { + function require(module:string); + function depends(dependencies:{[id:string]:string}); +} + +declare module HTTP { + enum HTTPMethodEnum { + GET, + POST, + PUT, + DELETE + } + + interface HTTPRequest { + content?:string; + data?:any; + query?:string; + params?:{[id:string]:string}; + auth?:string; + headers?:{[id:string]:string}; + timeout?:number; + followRedirects?:boolean; + } + + interface HTTPResponse { + statusCode:number; + content:string; + // response is not always json + data:any; + headers:{[id:string]:string}; + } +} + +declare module Email { + interface EmailMessage { + from: string; + to: any; // string or string[] + cc?: any; // string or string[] + bcc?: any; // string or string[] + replyTo?: any; // string or string[] + subject: string; + text?: string; + html?: string; + headers?: {[id: string]: string}; + } +} + +declare module DDP { + interface DDPStatic { + subscribe(name, ...rest); + call(method:string, ...parameters):void; + apply(method:string, ...parameters):void; + methods(IMeteorMethodsDictionary); + status():DDPStatus; + reconnect(); + disconnect(); + onReconnect(); + } + + interface DDPStatus { + connected: boolean; + status: Meteor.StatusEnum; + retryCount: number; + //To turn this into an interval until the next reconnection, use retryTime - (new Date()).getTime() + retryTime?: number; + reason?: string; + } +} + +declare module Random { + function fraction():number; + function hexString(numberOfDigits:number):string; // @param numberOfDigits, @returns a random hex string of the given length + function choice(array:any[]):string; // @param array, @return a random element in array + function choice(str:string):string; // @param str, @return a random char in str +} + +/** + * These modules and interfaces are automatically generated from the Meteor api.js file + */ +declare module Meteor { + var isClient: boolean; + var isServer: boolean; + function startup(func: Function): void; + function absoluteUrl(path?, options?: { + secure?: Boolean; + replaceLocalhost?: Boolean; + rootUrl?: string; + }): string; + var settings: {[id:string]: any}; + var release: string; + function publish(name: string, func: Function): void; + function subscribe(name, ...args): SubscriptionHandle; + function methods(methods: Object): void; + function Error(error, reason?, details?): void; + function call(name: string, ...params): void; + function apply(name: string, params, options?: { + wait?: Boolean; + onResultReceived?: Function; + }, asyncCallback?): void; + function status(): Meteor.StatusEnum; + function reconnect(): void; + function disconnect(): void; + function onConnection(callback: Function): void; + function Collection(name: string, options?: { + connection?: Object; + idGeneration?: string; + transform?: Function; + }): void; + function user(): Meteor.User; + function userId(): string; + var users: Meteor.Collection; + function loggingIn(): boolean; + function logout(callback?: Function): void; + function logoutOtherClients(callback?: Function): void; + function loginWithPassword(user: any, password: string, callback?: Function): void; + function loginWithExternalService(options?: { + requestPermissions?: string[]; + requestOfflineToken?: Boolean; + forceApprovalPrompt?: Boolean; + userEmail?: string; + }, callback?: Function): void; + function setTimeout(func: Function, delay: Number): number; + function setInterval(func: Function, delay: Number): number; + function clearTimeout(id: Number): void; + function clearInterval(id: Number): void; + function EnvironmentVariable(): void; + function get(): string; + function withValue(value: any, func: Function): void; + function bindEnvironment(func: Function, onException: Function, _this: Object): Function; +} + +declare module Meteor { + interface EJSON { + parse(str: string): EJSON; + stringify(val: Meteor.EJSON, options?: { + indent?: any; // boolean, integer, or string + canonical?: Boolean; + }): string; + fromJSONValue(val: JSON): any; + toJSONValue(val: Meteor.EJSON): JSON; + equals(a: Meteor.EJSONObject, b: Meteor.EJSONObject, options?: { + keyOrderSensitive?: Boolean; + }): boolean; + clone(v:T): T; + newBinary(size: Number): any; + isBinary(): boolean; + addType(name: string, factory: Function): void; + } +} + +declare module DDP { + function connect(url: string): DDP.DDPStatic; +} + +declare module Meteor { + interface Collection { + find(selector?: any, options?: { + sort?: any; + skip?: Number; + limit?: Number; + fields?: Meteor.CollectionFieldSpecifier; + reactive?: Boolean; + transform?: Function; + }); + findOne(selector?: any, options?: { + sort?: any; + skip?: Number; + fields?: Meteor.CollectionFieldSpecifier; + reactive?: Boolean; + transform?: Function; + }); + insert(doc: Object, callback?: Function); + update(selector: any, modifier: any, options?: { + multi?: Boolean; + upsert?: Boolean; + }, callback?: Function): number; + upsert(selector: any, modifier: any, options?: { + multi?: Boolean; + }, callback?: Function): {numberAffected?: number; insertedId?: string;}; + remove(selector: any, callback?: Function): void; + allow(options: Meteor.AllowDenyOptions): boolean; + deny(options: Meteor.AllowDenyOptions): boolean; + ObjectID(hexString: string): Object; + } +} + +declare module Meteor { + interface Cursor { + count(): number; + fetch(): Array; + forEach(callback: Function, thisArg?): void; + map(callback: Function, thisArg?): void; + observe(callbacks: Object): Meteor.LiveQueryHandle; + observeChanges(callbacks: Object): Meteor.LiveQueryHandle; + } +} + +declare module Random { + function id(): string; +} + +declare module Deps { + function autorun(runFunc: Function): Deps.Computation; + function flush(): void; + function nonreactive(func: Function): void; + var active: boolean; + var currentComputation: Deps.Computation; + function onInvalidate(callback: Function): void; + function afterFlush(callback: Function): void; +} + +declare module Deps { + interface Computation { + stop(): void; + invalidate(): void; + onInvalidate(callback: Function): void; + stopped: boolean; + invalidated: boolean; + firstRun: boolean; + } +} + +declare module Deps { + interface Dependency { + changed(): void; + depend(fromComputation?): boolean; + hasDependents(): boolean; + } +} + +declare module Meteor { + interface Accounts extends Meteor.AccountsBase { + config(options: { + sendVerificationEmail?: Boolean; + forbidClientAccountCreation?: Boolean; + restrictCreationByEmailDomain?: any; // string or Function + loginExpirationInDays?: Number; + oauthSecretKey?: string; + }): void; + ui: { + config(options: { + requestPermissions?: Object; + requestOfflineToken?: Object; + forceApprovalPrompt?: Boolean; + passwordSignupFields?: string; + }); + } + validateNewUser(func: Function): void; + onCreateUser(func: Function): void; + validateLoginAttempt(func: Function); + onLogin(func: Function); + onLoginFailure(func: Function); + createUser(options: { + username?: string; + email?: string; + password?: string; + profile?: Object; + }, callback?: Function): string; + changePassword(oldPassword: string, newPassword: string, callback?: Function): void; + forgotPassword(options: { + email?: string; + }, callback?: Function): void; + resetPassword(token: string, newPassword: string, callback?: Function): void; + setPassword(userId: string, newPassword: string): void; + verifyEmail(token: string, callback?: Function): void; + sendResetPasswordEmail(userId: string, email?): void; + sendEnrollmentEmail(userId: string, email?): void; + sendVerificationEmail(userId: string, email?): void; + emailTemplates: Meteor.EmailTemplates; + } +} + +declare module Meteor { + interface Match extends Meteor.MatchBase { + test(value: any, pattern: any): boolean; + } +} + +declare module Meteor { + interface Session { + set(key: string, value: any): void; + setDefault(key: string, value: any): void; + get(key: string): any; + equals(key: string, value: any): boolean; + } +} + +declare module HTTP { + function call(method: string, url, options?: { + content?: string; + data?: Object; + query?: string; + params?: Object; + auth?: string; + headers?: Object; + timeout?: Number; + followRedirects?: Boolean; + }, asyncCallback?): HTTP.HTTPResponse; + function get(url, options?: { + }, asyncCallback?): HTTP.HTTPResponse; + function post(url, options?: { + }, asyncCallback?): HTTP.HTTPResponse; + function put(url, options?: { + }, asyncCallback?): HTTP.HTTPResponse; + function del(url, options?: { + }, asyncCallback?): HTTP.HTTPResponse; +} + +declare module Meteor { + interface Template { + rendered: Function; + created: Function; + destroyed: Function; + events(eventMap: {[id:string]: Function}): void; + helpers(helpers: Object): void; + } +} + +declare module Meteor { + interface UI { + registerHelper(name: string, func: Function): void; + body: Meteor.Template; + render(template): Meteor.RenderedTemplate; + renderWithData(template, data: Object): Meteor.RenderedTemplate; + insert(renderedTemplate: RenderedTemplate, parentNode, nextNode?): void; + remove(renderedTemplate: RenderedTemplate): void; + getElementData(el: HTMLElement): Meteor.DataContext; + } +} + +declare module Email { + function send(options: { + from?: string; + to?: any; // string or string[] + cc?: any; // string or string[] + bcc?: any; // string or string[] + replyTo?: any; // string or string[] + subject?: string; + text?: string; + html?: string; + headers?: Object; + }): void; +} + +declare module Assets { + function getText(assetPath: string, asyncCallback?): string; + function getBinary(assetPath: string, asyncCallback?): Meteor.EJSON; +} + +declare var Template: Meteor.TemplateBase; +declare var Session: Meteor.Session; +declare var Accounts: Meteor.Accounts; +declare var Match: Meteor.Match; +declare var EJSON: Meteor.EJSON; +declare var Tinytest: Meteor.Tinytest; From 8dc6096566de51d25504998ff02d2d818ed7d884 Mon Sep 17 00:00:00 2001 From: Dave Allen Date: Mon, 4 Aug 2014 10:23:39 -0700 Subject: [PATCH 005/221] Fixed test file reference to meteor def file. --- meteor/meteor-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor/meteor-tests.ts b/meteor/meteor-tests.ts index bb7928b1e..4dd6ed50b 100644 --- a/meteor/meteor-tests.ts +++ b/meteor/meteor-tests.ts @@ -1,4 +1,4 @@ -/// +/// /** * All code below was copied from the examples at http://docs.meteor.com/. From 6e0a9732855af34e0e299c97a267bb91d5968403 Mon Sep 17 00:00:00 2001 From: Dave Allen Date: Mon, 4 Aug 2014 10:25:39 -0700 Subject: [PATCH 006/221] Remove reference to lib.d.ts --- meteor/meteor.d.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/meteor/meteor.d.ts b/meteor/meteor.d.ts index b1611f51a..86b4a01e4 100644 --- a/meteor/meteor.d.ts +++ b/meteor/meteor.d.ts @@ -10,8 +10,6 @@ * */ -/// - /** * These are the modules and interfaces that can't be automatically generated from the Meteor api.js file */ From 45aa8fbb7c49d02b92900d4427cc3da5c96cc8ce Mon Sep 17 00:00:00 2001 From: Igor Kriklivets Date: Tue, 26 Aug 2014 14:55:21 +0400 Subject: [PATCH 007/221] Defs for all DevExtreme products version 14.1 --- devextreme/dx.chartjs-tests.ts | 26 + devextreme/dx.chartjs.d.ts | 1861 +++++++++++++++++++++++++++++++ devextreme/dx.phonejs-tests.ts | 258 +++++ devextreme/dx.phonejs.d.ts | 1502 +++++++++++++++++++++++++ devextreme/dx.webappjs-tests.ts | 93 ++ devextreme/dx.webappjs.d.ts | 1597 ++++++++++++++++++++++++++ 6 files changed, 5337 insertions(+) create mode 100644 devextreme/dx.chartjs-tests.ts create mode 100644 devextreme/dx.chartjs.d.ts create mode 100644 devextreme/dx.phonejs-tests.ts create mode 100644 devextreme/dx.phonejs.d.ts create mode 100644 devextreme/dx.webappjs-tests.ts create mode 100644 devextreme/dx.webappjs.d.ts diff --git a/devextreme/dx.chartjs-tests.ts b/devextreme/dx.chartjs-tests.ts new file mode 100644 index 000000000..70c53a602 --- /dev/null +++ b/devextreme/dx.chartjs-tests.ts @@ -0,0 +1,26 @@ +/// + +module Test { + $("
").appendTo(document.body).dxChart({ + size: { + width: 600, + height: 400 + }, + title: { + text: 'Chart in jQuery mode', + font: { color: 'rgb(0, 128, 128)!important' } + }, + argumentAxis: { + categories: ['January', 'February', 'March', 'April', 'May', 'June'] + }, + dataSource: [ + { arg: 'January', v1: 10, v2: 20, v3: 24 }, + { arg: 'February', v1: 5, v2: 35, v3: 43 }, + { arg: 'March', v1: 50, v2: 10, v3: 80 }, + { arg: 'April', v1: 9, v2: 79, v3: 39 }, + { arg: 'May', v1: 100, v2: 42, v3: 22 }, + { arg: 'June', v1: 95, v2: 11, v3: 41 } + ], + series: [{ valueField: 'v1' }, { valueField: 'v2' }, { valueField: 'v3' }] + }); +} \ No newline at end of file diff --git a/devextreme/dx.chartjs.d.ts b/devextreme/dx.chartjs.d.ts new file mode 100644 index 000000000..0559c098a --- /dev/null +++ b/devextreme/dx.chartjs.d.ts @@ -0,0 +1,1861 @@ +// Type definitions for ChartJS +// Project: http://js.devexpress.com/WebDevelopment/Charts/ +// Definitions by: DevExpress Inc. +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module DevExpress { +export function abstract(): void; + export var rtlEnabled: boolean; + export var hardwareBackButton: JQueryCallback; + interface Endpoint { + local?: string; + production: string; + } + class EndpointSelector { + constructor(config: { [key: string]: Endpoint }); + urlFor(key: string): string; + } + export interface ActionOptions { + context?: Object; + component?: any; + beforeExecute? (e:ActionExecuteArgs): void; + afterExecute? (e:ActionExecuteArgs): void; + } + export interface ActionExecuteArgs { + action: any; + args: any[]; + context: any; + component: any; + cancel: boolean; + handled: boolean; + } + export class Action { + constructor(action?: any, config?: ActionOptions); + execute(): any; + } + export interface IDevice { + deviceType?: string; + platform?: string; + version?: Array; + phone?: boolean; + tablet?: boolean; + android?: boolean; + ios?: boolean; + win8?: boolean; + tizen?: boolean; + generic?: boolean; + } + export module devices { + export function orientation(): string; + export var orientationChanged: JQueryCallback; + export function real(): IDevice; + export function current(deviceOrName: string): IDevice; + export function current(deviceOrName: IDevice): IDevice; + } + export function registerComponent(name: string, componentClass: any): void; + export interface ComponentOptions { + disabled?: boolean; + } + export class Component { + constructor(element: Element, options?: ComponentOptions); + constructor(element: JQuery, options?: ComponentOptions); + disposing: JQueryCallback; + optionChanged: JQueryCallback; + instance(): Component; + beginUpdate(): void; + endUpdate(): void; + option(): any; + option(options: string): any; + option(options: string): T; + option(options: string, value: any): void; + option(options: { [key: string]: any }): void; + option(options?: any): any; + } + export interface DOMComponentOptions extends ComponentOptions { + rtlEnabled?: boolean; + } + export class DOMComponent extends Component { + constructor(element: HTMLElement, options?: DOMComponentOptions); + static defaultOptions(rule: { + device: any; + options: { [key: string]: any }; + }): void; + } +} +declare module DevExpress.data { +export interface DataError extends Error { + httpStatus?: number; + errorDetails?: any; + } + export interface ErrorHandler { (e: DataError): void; } + export interface EntityOptions { key: any; keyType: any; } + export interface Getter { (obj: any, options?: any): any; } + export interface Setter { (obj: any, value: any, options?: any): void; } + export interface QueryOptions { + errorHandler?: ErrorHandler; + requireTotalCount?: boolean; + } + export interface ODataQueryOptions extends QueryOptions { + adapter?: any; + } + interface IQuery { + enumerate(): JQueryPromise>; + count(): JQueryPromise; + slice(skip: number, take?: number): IQuery; + sortBy(field: string): IQuery; + sortBy(field: Getter): IQuery; + sortBy(field: { field: string; desc?: boolean }): IQuery; + sortBy(field: { field: Getter; desc?: boolean }): IQuery; + thenBy(field: string): IQuery; + thenBy(field: Getter): IQuery; + thenBy(field: { field: string; desc?: boolean }): IQuery; + thenBy(field: { field: Getter; desc?: boolean }): IQuery; + filter(field: string, operator: string, value: any): IQuery; + filter(field: string, value: any): IQuery; + filter(criteria: any[]): IQuery; + select(field: string): IQuery; + select(field: string[]): IQuery; + select(...field: string[]): IQuery; + select(field: Getter): IQuery; + select(field: Getter[]): IQuery; + select(...field: Getter[]): IQuery; + groupBy(field: string[]): IQuery; + groupBy(field: Getter[]): IQuery; + groupBy(field: { field: string; desc?: boolean }[]): IQuery; + groupBy(field: { field: Getter; desc?: boolean }[]): IQuery; + sum(getter?: string): JQueryPromise; + min(getter?: string): JQueryPromise; + max(getter?: string): JQueryPromise; + avg(getter?: string): JQueryPromise; + aggregate(step: number): JQueryPromise; + aggregate(seed: number, step: (accumulator: any, current: any) => any, finalize?: (accumulator: any) => any): JQueryPromise; + } + export interface ArrayQuery extends IQuery { + toArray(): Array; + } + export interface RemoteQuery extends IQuery { /*todo: exec() ? */ } + export function base64_encode(input: string): string; + export function base64_encode(input: any[]): string; + export function query(items?: any[]): IQuery; + export var queryImpl: { + remote: (url: string, queryOptions: QueryOptions) => RemoteQuery; + array: (iter: Array, queryOptions: QueryOptions) => ArrayQuery; + }; + export class Guid { + constructor(value?: string); + constructor(value?: any); + toString(): string; + valueOf(): string; + toJSON(): string; + } + export class EdmLiteral { + constructor(value: any); + valueOf(): any; + } + export module utils { + export function normalizeSortingInfo(info: string): Array<{ selector: string; desc?: boolean }>; + export function normalizeSortingInfo(info: string[]): Array<{ selector: string; desc?: boolean }>; + export function normalizeSortingInfo(info: Getter): Array<{ selector: string; desc?: boolean }>; + export function normalizeSortingInfo(info: Getter[]): Array<{ selector: string; desc?: boolean }>; + export function normalizeSortingInfo(info: { field: string; dir?: string }): Array<{ selector: string; desc?: boolean }>; + export function normalizeSortingInfo(info: { field: string; dir?: string }[]): Array<{ selector: string; desc?: boolean }>; + export function normalizeSortingInfo(info: { field: string; desc?: boolean }): Array<{ selector: string; desc?: boolean }>; + export function normalizeSortingInfo(info: { field: string; desc?: boolean }[]): Array<{ selector: string; desc?: boolean }>; + export function normalizeSortingInfo(info: { selector: string; dir?: string }): Array<{ selector: string; desc?: boolean }>; + export function normalizeSortingInfo(info: { selector: string; dir?: string }[]): Array<{ selector: string; desc?: boolean }>; + export function normalizeSortingInfo(info: { selector: string; desc?: boolean }): Array<{ selector: string; desc?: boolean }>; + export function normalizeSortingInfo(info: { selector: string; desc?: boolean }[]): Array<{ selector: string; desc?: boolean }>; + export function normalizeBinaryCriterion(criteria: Array): Array; + export function keysEqual(key1: any, key2: any): boolean; + export function keysEqual(keyExpr: any, key1: any, key2: any): boolean; + export function toComparable(value: Date, caseSensitive?: boolean): number; + export function toComparable(value: Guid, caseSensitive?: boolean): string; + export function toComparable(value: string, caseSensitive?: boolean): string; + export function compileGetter(): Getter; + export function compileGetter(expr: any[]): Getter; + export function compileGetter(expr: string): Getter; + export function compileGetter(expr: "this"): Getter; + export function compileGetter(expr: Getter): Getter; + export function compileSetter(expr: string): Setter; + export module odata { + export function sendRequest(request: JQueryXHR, requestOptions?: JQueryAjaxSettings): any; + export function serializePropName(propName: EdmLiteral): string; + export function serializePropName(propName: string): string; + export function serializeValue(value: Date): string; + export function serializeValue(value: Guid): string; + export function serializeValue(value: string): string; + export function serializeValue(value: "string"): string; + export function serializeValue(value: EdmLiteral): string; + export function serializeKey(key: any): string; + export function serializeKey(key: Date): string; + export function serializeKey(key: Guid): string; + export function serializeKey(key: string): string; + export function serializeKey(key: "string"): string; + export function serializeKey(key: EdmLiteral): string; + export var keyConverters: { + String(value: any): string; + Guid(value: any): Guid; + Int32(value: any): number; + Int64(value: any): EdmLiteral; + }; + } + } + export module queryAdapters { + export function odata(queryOptions: ODataQueryOptions): RemoteQuery; + } +export interface DataSourceOptions { + map? (item: any): any; + postProcess? (result: any[]): any; + pageSize: number; + paginate: boolean; + } + export class DataSource { + public changed: JQueryCallback; + public loadError: JQueryCallback; + public loadingChanged: JQueryCallback; + constructor(options?: Store); + constructor(options?: string); + constructor(options?: Array); + constructor(options?: { store: Store }); + constructor(options?: CustomStoreOptions); + constructor(options?: { store: Array }); + constructor(options?: { store: { type: string } }); + constructor(options?: { load(options?: LoadOptions): JQueryXHR; }); + constructor(options?: { load(options?: LoadOptions): Array; }); + constructor(options?: { load(options?: LoadOptions): JQueryPromise; }); + constructor(options?: DataSourceOptions); + loadOptions(): { [key: string]: any }; + items(): Array; + store(): data.Store; + isLastPage(): boolean; + pageIndex(newIndex?: number): number; + sort(expr: any[]): any[]; + group(expr: any[]): any[]; + filter(expr: any[]): any[]; + select(expr: string[]): string[]; + searchValue(value?: string): string; + searchOperation(op?: string): string; + searchExpr(selector: string): string; + key(): any; + isLoaded(): boolean; + isLoading(): boolean; + totalCount(): number; + load(): JQueryPromise; + dispose(): void; + } +export interface StoreOptions { + key?: any; + errorHandler?: ErrorHandler; + loaded?: (result: Array) => void; + loading?: (loadOptions: LoadOptions) => void; + modified?: () => void; + modifying?: () => void; + inserted?: (values: Object, key: any) => void; + inserting?: (values: Object) => void; + updated?: (key: any, values: Object) => void; + updating?: (key: any, values: Object) => void; + removed?: (key: any) => void; + removing?: (key: any) => void; + } + export interface LoadOptions extends QueryOptions { + skip?: number; + take?: number; + sort?: any; + select?: any; + filter?: any; + group?: any; + expand?: any; + } + export class Store { + loaded: JQueryCallback; + loading: JQueryCallback; + modified: JQueryCallback; + modifying: JQueryCallback; + inserted: JQueryCallback; + inserting: JQueryCallback; + updated: JQueryCallback; + updating: JQueryCallback; + removed: JQueryCallback; + removing: JQueryCallback; + constructor(options?: StoreOptions); + key(): any; + keyOf(obj: any): any; + load(options?: LoadOptions): JQueryPromise; + createQuery(options?: QueryOptions): IQuery; + totalCount(options?: { + filter?: any[]; + group?: string[]; + }): JQueryPromise; + byKey(key: any, extraOptions?: { + expand?: string[] + }): JQueryPromise; + remove(key: any): JQueryPromise; + insert(values: any): JQueryPromise; + update(key: any, values: any): JQueryPromise; + } + export interface CustomStoreOptions extends StoreOptions { + load? (options?: LoadOptions): any; + byKey? (key: any): any; + insert? (values: any): any; + update? (key: any, values: any): any; + remove? (key: any): any; + totalCount? (options?: { + filter?: any[]; + group?: string[]; + }): any; + } + export class CustomStore extends Store { + constructor(options?: CustomStoreOptions); + } + export interface ArrayStoreOptions extends StoreOptions { + data?: Array + } + export class ArrayStore extends Store { + constructor(options?: Array); + constructor(options?: ArrayStoreOptions); + } + export interface LocalStoreOptions extends ArrayStoreOptions { + name: string; + } + export class LocalStore extends ArrayStore { + constructor(options?: string); + constructor(options?: LocalStoreOptions); + clear(): void; + } + export interface ODataStoreOptions extends StoreOptions { + url?: string; + name?: string; + keyType?: string; + jsonp?: boolean; + withCredentials?: boolean; + } + export class ODataStore extends Store { + constructor(options?: ODataStoreOptions); + } + export interface ODataContextOptions { + url: string; + jsonp?: boolean; + withCredentials?: boolean; + errorHandler?: ErrorHandler; + beforeSend?: () => any; + entities?: { + [entityAlias: string]: ODataStoreOptions; + }; + } + export class ODataContext { + constructor(options?: ODataContextOptions); + get(operationName: string, params: { [key: string]: any }): JQueryPromise>; + invoke(operationName: string, params: { [key: string]: any }, httpMethod?: string): JQueryPromise>; + objectLink(entityAlias: string, key: any): { __metadata: { uri: string }; }; + } +} +declare module DevExpress.ui { + interface ViewportOptions { + allowPan?: boolean; + allowZoom?: boolean; + } + export interface ITemplate { + compile(html: string): any; + render(template: JQuery, data: any): any; + render(template: any, data: any): any; + } + class Template { + constructor(element: HTMLElement); + constructor(element: JQueryStatic); + render(container: HTMLElement): any; + render(container: JQueryStatic): any; + dispose(): void; + } + interface TemplateStatic { + new (element: HTMLElement): Template; + new (element: JQueryStatic): Template; + } + class TemplateProvider { + constructor(); + getTemplateClass(widget: any): TemplateStatic; + getDefaultTemplate(widget: any): void; supportDefaultTemplate(): boolean; + } + export function initViewport(options: ViewportOptions): void; + interface NotifyOptions { + message: string; + type?: string; + displayTime?: number; + hiddenAction: () => any; + } + export function notyfy(options: any): void; + export function notify(message: string, type?: string, displayTime?: number): void; + export module dialog { + interface Dialog { + show(): JQueryPromise; + hide(value?: any): void; + } + interface DialogButton { + text: string; + icon: string; + clickAction: () => any; + } + interface DialogOptions { + message: string; + title?: string; + } + export function custom(options: DialogOptions): Dialog; + export function custom(message: string, title?: string): Dialog; + export function alert(options: DialogOptions): JQueryPromise; + export function alert(message: string, title?: string): JQueryPromise; + export function confirm(options: DialogOptions): JQueryPromise; + export function confirm(message: string, title?: string): JQueryPromise; + } +export interface CollectionContainerWidgetOptions extends WidgetOptions { + items?: Array; + itemTemplate?: any; + itemRender?: Function; + itemClickAction?: any; + itemRenderedAction?: any; + noDataText?: string; + dataSource?: data.DataSource; + selectedIndex?: number; + itemSelectAction?: any; + itemHoldAction?: any; + itemHoldTimeout?: number; + } + export class CollectionContainerWidget extends Widget { + constructor(element: Element, options?: CollectionContainerWidgetOptions); + constructor(element: JQuery, options?: CollectionContainerWidgetOptions); + } +export interface WidgetOptions extends ComponentOptions { + contentReadyAction?: any; + width?: any; + height?: any; + visible?: boolean; + activeStateEnabled?: boolean; + } + export class Widget extends Component { + constructor(element: Element, options?: WidgetOptions); + constructor(element: JQuery, options?: WidgetOptions); + init(): void; + repaint(): void; + addTemplate(template: ITemplate): void; + } +export interface dxEditorOptions extends WidgetOptions { + value?: any; + valueChangeAction?: any; + } + export class dxEditor extends Widget { + constructor(element: Element, options?: dxEditorOptions); + constructor(element: JQuery, options?: dxEditorOptions); + } +} +declare module DevExpress.viz { +export class Chart extends Component { + constructor(element: Element, options?: viz.charts.ChartOptions); + constructor(element: JQuery, options?: viz.charts.ChartOptions); + clearSelection(): void; + getSeries(): viz.charts.series.Series; + hidiTooltip(): void; + render(options: viz.charts.RenderOptions): void; + render(): void; + zoomArgument(minArg: any, maxArg: any): void; + getSeriesByPos(seriesIndex: number): viz.charts.series.Series; + getSeriesByName(seriesName: string): viz.charts.series.Series; + getAllSeries(): Array; + instance(): Chart; + showLoadingIndicator(): void; + hideLoadingIndicator(): void; + svg(): string; + getSize(): { width: number; height: number }; + } + export class PieChart extends Component { + constructor(element: Element, options?: viz.charts.PieOptions); + constructor(element: JQuery, options?: viz.charts.PieOptions); + clearSelection(): void; + getSeries(): viz.charts.series.PieSeries; + hidiTooltip(): void; + render(options: viz.charts.RenderOptions): void; + render(): void; + instance(): PieChart; + showLoadingIndicator(): void; + hideLoadingIndicator(): void; + svg(): string; + getSize(): { width: number; height: number }; + } + export class RangeSelector extends Component { + constructor(element: Element, options?: viz.rangeSelector.RangeSelectorOptions); + constructor(element: JQuery, options?: viz.rangeSelector.RangeSelectorOptions); + getSelectedRange: () => viz.rangeSelector.SelectedRange; + setSelectedRange: (selectedRange: viz.rangeSelector.SelectedRange) => void; + render(): RangeSelector; + instance(): RangeSelector; + showLoadingIndicator(): void; + hideLoadingIndicator(): void; + svg(): string; + } + export class CircularGauge extends Component { + constructor(element: Element, options?: viz.gauges.CircularGaugeOptions); + constructor(element: JQuery, options?: viz.gauges.CircularGaugeOptions); + value(): number; + value(val: number): CircularGauge; + subvalues(): Array; + subvalues(values: Array): CircularGauge; + render(): CircularGauge; + instance(): CircularGauge; + showLoadingIndicator(): void; + hideLoadingIndicator(): void; + svg(): string; + } + export class LinearGauge extends Component { + constructor(element: Element, options?: viz.gauges.LinearGaugeOptions); + constructor(element: JQuery, options?: viz.gauges.LinearGaugeOptions); + value(): number; + value(val: number): LinearGauge; + subvalues(): Array; + subvalues(values: Array): LinearGauge; + render(): LinearGauge; + instance(): LinearGauge; + showLoadingIndicator(): void; + hideLoadingIndicator(): void; + svg(): string; + } + export class BarGauge extends Component { + constructor(element: Element, options?: viz.gauges.BarGaugeOptions); + constructor(element: JQuery, options?: viz.gauges.BarGaugeOptions); + values(): Array; + values(vals: Array): BarGauge; + render(): BarGauge; + instance(): BarGauge; + showLoadingIndicator(): void; + hideLoadingIndicator(): void; + svg(): string; + } + export class Sparkline extends Component { + constructor(element: Element, options?: viz.sparklines.SparklineOptions); + constructor(element: JQuery, options?: viz.sparklines.SparklineOptions); + render(): Sparkline; + instance(): Sparkline; + svg(): string; + } + export class Bullet extends Component { + constructor(element: Element, options?: viz.sparklines.BulletOptions); + constructor(element: JQuery, options?: viz.sparklines.BulletOptions); + render(): Bullet; + instance(): Bullet; + svg(): string; + } + export class Map extends Component { + constructor(element: Element, options?: viz.map.VectorMapOptions); + constructor(element: JQuery, options?: viz.map.VectorMapOptions); + render(): Map; + instance(): Map; + getAreas(): Array; + getMarkers(): Array; + clearAreaSelection(): Map; + clearMarkerSelection(): Map; + clearSelection(): Map; + showLoadingIndicator(): void; + hideLoadingIndicator(): void; + svg(): string; + center(): Array; + center(center: Array): Map; + zoomFactor(): number; + zoomFactor(zoomFactor: number): Map; + viewport(): Array; + viewport(viewport: Array): Map; + convertCoordinates(x: number, y: number): Array; + } +} +declare module DevExpress.viz.charts { +interface z_BaseLegendOptions { + backgroundColor?: string; + hoverMode?: string; + customizeText?: (arg: { + seriesName: string; + seriesNumber: number; + seriesColor: string; + }) => string; + verticalAlignment?: string; + horizontalAlignment?: string; + itemTextPosition?: string; + equalColumnWidth?: boolean; + font?: viz.common.FontOptions; + visible?: boolean; + margin?: any; + markerSize?: number; + border?: { + visible?: boolean; + width?: number; + color?: string; + cornerRadius?: number; + opacity?: number; + dashStyle?: string; + }; + paddingLeftRight?: number; + paddingTopBottom?: number; + columnsCount?: number; + rowsCount?: number; + columnItemSpacing?: number; + rowItemSpacing?: number; + orientation?: string; + } + interface z_BaseTooltipCustomizeArgument { + value?: any; + valueText: string; + originalValue: string; + argument: any; + argumentText: string; + originalArgument: any; + percent?: any; + percentText?: string; + seriesName: string; + } + interface z_BaseTooltipOptions extends common.BaseTooltipOptions { + customizeText?: (arg: z_BaseTooltipCustomizeArgument) => string; + customizeTooltip?: (arg: z_BaseTooltipCustomizeArgument) => common.CustomizeTooltipResult; + format?: string; + argumentFormat?: string; + precision?: number; + argumentPrecision?: number; + percentPrecision?: number; + } + interface z_ChartTooltipCustomizeArgument extends z_BaseTooltipCustomizeArgument{ + closeValueText?: string; + highValueText?: string; + lowValueText?: string; + openValueText?: string; + originalCloseValue?: any; + originalHighValue?: any; + originalLowValue?: any; + originalOpenValue?: any; + closeValue?: any; + highValue?: any; + lowValue?: any; + openValue?: any; + reductionValue?: any; + reductionValueText?: string; + originalMinValue?: any; + rangeValue1?: any; + rangeValue1Text?: string; + rangeValue2?: any; + rangeValue2Text?: string; + point: series.Point; + } + interface z_ChartTooltipOptions extends z_BaseTooltipOptions { + customizeText?: (arg: z_ChartTooltipCustomizeArgument) => string; + customizeTooltip?: (arg: z_ChartTooltipCustomizeArgument) => common.CustomizeTooltipResult; + shared?: boolean; + } + interface z_BaseChartOptions extends ComponentOptions { + incidentOccured?: () => void; + done?: () => void; + tooltipShown?: () => void; + tooltipHidden?: () => void; + pointSelectionMode?: string; + redrawOnResize?: boolean; + tooltip?: z_BaseTooltipOptions; + loadingIndicator?: common.LoadingIndicatorOptions; + margin?: { + left?: number; + top?: number; + right?: number; + bottom?: number; + }; + size?: { + width?: number; + height?: number; + }; + title?: { + horizontalAlignment?: string; + verticalAlignment?: string; + font?: viz.common.FontOptions; + text?: string; + placeholderSize?: number; + margin?: any; + }; + dataSource?: any; + palette?: any; legend?: z_BaseLegendOptions; + theme?: string; + animation?: { + enabled?: boolean; + duration?: number; + easing?: string; + maxPointCountSupported?: number; + asyncSeriesRendering?: boolean; + asyncTrackersRendering?: boolean; + trackerRenderingDelay?: number; + }; + pathModified?: boolean; + } + export interface CommonPaneSettings { + backgroundColor?: string; + border?: { + color?: string; + bottom?: boolean; + left?: boolean; + right?: boolean; + top?: boolean; + dashStyle?: string; + visible?: boolean; + width?: number; + opacity?: number; + }; + } + export interface PaneSettings extends CommonPaneSettings { + name: string; + } + export interface ChartLegendOptions extends z_BaseLegendOptions { + hoverMode?: string; + position?: string; + } + interface z_CommonAxisLabelSettings { + alignment?: string; + font?: viz.common.FontOptions; + indentFromAxis?: number; + overlappingBehavior?: { + mode?: string; + rotationAngle?: number; + staggeringSpacing?: number; + }; + rotationAngle?: number; + staggered?: boolean; + staggeringSpacing?: number; + } + interface z_BaseConstantLineLabel { + visible?: boolean; + position?: string; + font?: viz.common.FontOptions; + } + interface ConstantLineAxisLabel extends z_BaseConstantLineLabel { + horizontalAlignment?: string; + verticalAlignment?: string; + } + export interface ConstantLineLabel extends ConstantLineAxisLabel { + text?: string; + } + export interface CommonConstantLineStyle { + paddingLeftRight?: number; + paddingTopBottom?: number; + width?: number; + dashStyle?: string; + color?: string; + label?: z_BaseConstantLineLabel; + } + export interface ConstantLineOptions extends CommonConstantLineStyle{ + value?: any; + label?: ConstantLineLabel; + } + interface z_AxisConstantLineStyle extends CommonConstantLineStyle { + label?: ConstantLineAxisLabel; + } + interface z_StripStyle { + label?: { + font?: viz.common.FontOptions; + horizontalAlignment?: string; + verticalAlignment?: string; + }; + paddingLeftRight?: number; + paddingTopBottom?: number; + } + export interface CommonAxisSettings { + color?: string; + discreteAxisDivisionMode?: string; + grid?: { + color?: string; + opacity?: string; + visible?: boolean; + width?: number; + } + inverted?: boolean; + label?: z_CommonAxisLabelSettings; + maxValueMargin?: number; + minValueMargin?: number; + opacity?: number; + placeholderSize?: number; + setTicksAtUnitBeginning?: boolean; + stripStyle?: z_StripStyle + constantLineStyle?: CommonConstantLineStyle; + tick?: { + color?: string; + opacity?: number; + visible?: boolean; + }; + title?: { + font?: viz.common.FontOptions; + margin?: number; + text?: string; + }; + valueMarginsEnabled?: boolean; + visible?: boolean; + width?: number; + } + export interface StripOptions extends z_StripStyle{ + color?: string; + endValue: any; + startValue: any; + label?: { + font?: viz.common.FontOptions; + horizontalAlignment?: string; + verticalAlignment?: string; + text?: string; + }; + } + interface z_AxisLabelSettings extends z_CommonAxisLabelSettings{ + customizeText: (arg: { + value: any; + valueText: string; + }) => string; + } + export interface ArgumentAxisOptions extends CommonAxisSettings { + argumentType?: string; + axisDivisionFactor?: number; + categories?: Array; + hoverMode?: string; + label?: z_AxisLabelSettings; + max?: number; + min?: number; + tickInterval?: any; + position?: string; + constantLineStyle?: z_AxisConstantLineStyle; + strips?: Array; + constantLines?: Array; + type?: string; + } + export interface ValueAxisOptions extends CommonAxisSettings { + valueType?: string; + axisDivisionFactor?: number; + categories?: Array; + hoverMode?: string; + max?: number; + min?: number; + tickInterval?: any; position?: string; + strips?: Array; + constantLines?: Array; + constantLineStyle?: z_AxisConstantLineStyle; + type?: string; + name?: string; + label?: z_AxisLabelSettings; + } + interface z_CrosshairLine { + color?: string; + width?: number; + dashStyle?: string; + opacity?: number; + } + interface z_CrosshairOptions extends z_CrosshairLine { + enabled?: boolean; + verticalLine?: z_CrosshairLine; + horizontalLine?: z_CrosshairLine; + } + export interface ChartOptions extends z_BaseChartOptions { + needAggregate?: boolean; + defaultPane?: string; + adjustOnZoom?: boolean; + rotated?: boolean; + synchronizeMultiAxes?: boolean; + equalBarWidth?: { + spacing?: number; + width?: number; + }; + adaptiveLayout?: { + width?: number; + height?: number; + keepLabels?: boolean; + }; + customizePoint?: (arg: { + index: number; + argument: any; + seriesName: string; + tag: any; + value?: any; + rangeValue1?: any; + rangeValue2?: any; + }) => series.BasePointOptions; + customizeLabel?: (arg: { + index: number; + argument: any; + seriesName: string; + tag: any; + value?: any; + ramgeValue1?: any; + rangeValue2?: any; + }) => series.z_BaseLabelOptions; + commonPaneSettings?: CommonPaneSettings; + panes?: Array; + containerBackgroundColor?: string; + seriesTemplate?: { + nameField?: string; + customizeSeries?: (valueFromNameField: string) => viz.charts.series.SeriesOptions; + }; + crosshair?: z_CrosshairOptions; + seriesSelectionMode?: string; + tooltip?: z_ChartTooltipOptions; + dataPrepareSettings?: { + checkTypeForAllData?: boolean; + convertToAxisDataType?: boolean; + sortingMethod?: any; + }; + useAggregation?: boolean; + argumentAxisClick?: (axis: any, argument: any, event: JQueryMouseEventObject) => void; + legend?: ChartLegendOptions; + argumentAxis?: ArgumentAxisOptions; + valueAxis?: Array; + commonAxisSettings?: CommonAxisSettings; + series?: Array; + commonSeriesSettings?: viz.charts.series.commonSeriesSettings; + seriesClick?: (series: viz.charts.series.Series, event: JQueryMouseEventObject) => void; + seriesHover?: (series: viz.charts.series.Series) => void; + seriesSelected?: (series: viz.charts.series.Series) => void; + seriesHoverChanged?: (series: viz.charts.series.Series) => void; + pointClick?: (point: viz.charts.series.Point, event: JQueryMouseEventObject) => void; + legendClick?: (obj: any, event: JQueryMouseEventObject) => void; pointHover?: (point: viz.charts.series.Point) => void; + pointSelected?: (point: viz.charts.series.Point) => void; + seriesSelectionChanged?: (series: viz.charts.series.Series) => void; + pointSelectionChanged?: (point: viz.charts.series.Point) => void; + pointHoverChanged?: (point: viz.charts.series.Point) => void; + drawn?: (arg:viz.Chart) => void; + minBubbleSize?: number; + maxBubbleSize?: number; + } + export interface PieOptions extends z_BaseChartOptions { + pointClick?: (point: viz.charts.series.PiePoint, event: JQueryMouseEventObject) => void; + legendClick?: (point: viz.charts.series.PiePoint, event: JQueryMouseEventObject) => void; + pointHover?: (point: viz.charts.series.PiePoint) => void; + pointSelected?: (point: viz.charts.series.PiePoint) => void; + pointSelectionChanged?: (point: viz.charts.series.PiePoint) => void; + pointHoverChanged?: (point: viz.charts.series.PiePoint) => void; + series?: viz.charts.series.PieSeriesOptions; + drawn?: (arg:viz.PieChart) => void; + } + export interface RenderOptions { + force?: boolean; + animate?: boolean; + asyncSeriesRendering?: boolean; + } +} +declare module DevExpress.viz.charts.series { +export interface z_BasePointStyle { + color?: string; + border?: { + visible?: boolean; + width?: number; + color?: string; + }; + size?: number; + } + interface BasePointOptions extends z_BasePointStyle { + hoverMode?: string; + selectionMode?: string; + visible?: boolean; + symbol?: string; + image?: any; + hoverStyle?: z_BasePointStyle; + selectionStyle?: z_BasePointStyle; + } + interface z_BaseSeriesOptions { + argumentField?: string; + hoverMode?: string; + maxLabelCount?: number; + label?: z_BaseLabelOptions; + selectionMode?: string; + showInLegend?: boolean; + tagField?: string; + visible?: boolean; + } + interface z_BaseLabelOptions { + visible?: boolean; + alignment?: string; + rotationAngle?: number; + format?: string; + precision?: number; + argumentFormat?: string; + argumentPrecision?: number; + precission?: number; + percentPrecision?: number; + font?: viz.common.FontOptions; + backgroundColor?: string; + border?: { + visible?: boolean; + width?: number; + color?: string; + dashStyle?: string; + }; + connector?: { + visible?: boolean; + width?: number; + color?: string; + } + } + interface z_BaseChartSeriesLabelOptions extends z_BaseLabelOptions { + horizontalOffset?: number; + verticalOffset?: number; + customizeText?: (arg: { + originalValue: any; + value: any; + valueText: string; + originalArgument: any; + argument: any; + argumentText: string; + seriesName: string; + }) => string; + } + interface z_BaseSeriesStyle { + color?: string; + } + export interface ScatterSeriesOptions extends z_BaseSeriesOptions, z_BaseSeriesStyle { + selectionStyle?: z_BaseSeriesStyle; + hoverStyle?: z_BaseSeriesStyle; + valueField?: string; + point?: BasePointOptions; + axis?: string; + pane?: string; + } + export interface LineSeriesStyle extends z_BaseSeriesStyle { + dashStyle?: string; + width?: number; + } + export interface LineSeriesOptions extends LineSeriesStyle, z_BaseSeriesOptions { + selectionStyle?: LineSeriesStyle; + hoverStyle?: LineSeriesStyle; + valueField?: string; + point?: BasePointOptions; + pane?: string; + } + export interface AreaSeriesStyle extends z_BaseSeriesStyle { + hatching?: { + direction?: string; + width?: number; + step?: number; + opacity?: number + }; + border?: { + visible?: boolean; + width?: number; + color?: string; + dashStyle?: string; + }; + } + export interface AreaSeriesOptions extends AreaSeriesStyle, z_BaseSeriesOptions { + selectionStyle?: AreaSeriesStyle; + hoverStyle?: AreaSeriesStyle; + valueField?: string; + point?: BasePointOptions; + pane?: string; + axis?: string; + } + export interface BarSeriesLabel extends z_BaseChartSeriesLabelOptions { + position?: string; + showForZeroValues?: boolean; + } + export interface BarSeriesStyle extends AreaSeriesStyle { } + interface z_BaseBarSeriesOptions extends z_BaseSeriesOptions, BarSeriesStyle { + minBarSize?: number; + cornerRadius?: number; + label?: BarSeriesLabel; + selectionStyle?: BarSeriesStyle; + hoverStyle?: BarSeriesStyle; + pane?: string; + axis?: string; + } + export interface BarSeriesOptions extends z_BaseBarSeriesOptions { + valueField?: string; + } + export interface OHLCSeriesStyle extends z_BaseSeriesStyle{ + width?: number; + } + interface z_BaseOHLCSeries extends z_BaseSeriesOptions{ + openValueField?: string; + highValueField?: string; + lowValueField?: string; + closeValueField?: string; + reduction?: { + color?: string; + level?: string; + }; + pane?: string; + axis?: string; + } + export interface CandleStickSeriesOptions extends z_BaseOHLCSeries, OHLCSeriesStyle { + innerColor?: string; + selectionStyle?: OHLCSeriesStyle; + hoverStyle?: OHLCSeriesStyle; + } + export interface StockSeriesOptions extends z_BaseOHLCSeries, OHLCSeriesStyle { + selectionStyle?: OHLCSeriesStyle; + hoverStyle?: OHLCSeriesStyle; + } + export interface FullStackedAreaSeriesOptions extends z_BaseSeriesOptions, AreaSeriesOptions { + valueField?: string; + selectionStyle?: AreaSeriesStyle; + hoverStyle?: AreaSeriesStyle; + point?: BasePointOptions; + } + export interface FullStackedBarSeriesOptions extends BarSeriesOptions { + stack?: string; + } + export interface FullStackedLineSeriesOptions extends LineSeriesOptions{ + point?: BasePointOptions; + } + interface z_BaseRangeSeriesOptions extends z_BaseSeriesOptions { + rangeValue1Field?: string; + rangeValue2Field?: string; + pane?: string; + axis?: string; + } + export interface RangeAreaSeriesOptions extends z_BaseSeriesOptions, AreaSeriesStyle { + selectionStyle?: AreaSeriesStyle; + hoverStyle?: AreaSeriesStyle; + point?: BasePointOptions; + } + export interface RangeBarSeriesOptions extends z_BaseBarSeriesOptions { + rangeValue1Field?: string; + rangeValue2Field?: string; + pane?: string; + axis?: string; + } + export interface SplineSeriesOptions extends LineSeriesOptions {} + export interface SplineAreaSeries extends AreaSeriesOptions { } + export interface StackedLineSeries extends LineSeriesOptions { } + export interface StackedAreaSeries extends AreaSeriesOptions { } + export interface StackedBasrSeriesOptions extends BarSeriesOptions { + stack?: string; + } + export interface BubbleSeriesStyle extends AreaSeriesStyle { } + export interface BubbleSeriesOptions extends z_BaseBarSeriesOptions, BubbleSeriesStyle { + selectionStyle?: LineSeriesStyle; + hoverStyle?: LineSeriesStyle; + valueField?: string; + pane?: string; + sizeField?: string; + } + export interface StepLineSeries extends LineSeriesOptions { } + export interface StepAreaSeries extends AreaSeriesOptions { } + export interface PieSeriesStyle extends AreaSeriesStyle { } + interface PieSeriesLabelOptions extends z_BaseLabelOptions { + customizeText: (arg: { + value: any; + valueText: string; + originalValue: any; + argument: any; + argumentText: string; + originalArgument: any; + percent: any; + percentText: string; + seriesName: string; + }) => string; + radialOffset?: number; + } + export interface PieSeriesOptions extends z_BaseSeriesOptions, PieSeriesStyle{ + valueField?: string; + minSegmentSize?: string; + selectionStyle?: PieSeriesStyle; + hoverStyle?: PieSeriesStyle; + segmentsDirection?: string; + startAngle?: number; + type?: string; + label?: PieSeriesLabelOptions; + smallValuesGrouping?: valuesGrouping; + } + interface valuesGrouping{ + mode?: string; + topCount?: number; + threshold?: number; + groupName?: string; + } + interface AllSeriesStyleOptions extends z_BaseSeriesStyle, AreaSeriesStyle, LineSeriesStyle { } + interface z_AllLabelsOptions extends z_BaseChartSeriesLabelOptions, BarSeriesLabel { } + export interface CommonSeriesOptions extends z_BaseSeriesOptions, z_BaseBarSeriesOptions, z_BaseRangeSeriesOptions, z_BaseOHLCSeries, AllSeriesStyleOptions, BubbleSeriesOptions { + selectionStyle?: AllSeriesStyleOptions; + hoverStyle?: AllSeriesStyleOptions; + label?: z_AllLabelsOptions; + valueField?: string; + } + export interface SeriesOptions extends CommonSeriesOptions { + tag?: any; + name?: string; + type?: string; + } + export interface commonSeriesSettings extends CommonSeriesOptions { + area?: AreaSeriesOptions; + bar?: BarSeriesOptions; + candlestick?: CandleStickSeriesOptions; + fullstackedarea?: FullStackedAreaSeriesOptions; + fullstackedbar?: FullStackedBarSeriesOptions; + fullstackedline?: FullStackedLineSeriesOptions; + line?: LineSeriesOptions; + rangearea?: RangeAreaSeriesOptions; + rangebar?: RangeBarSeriesOptions; + scatter?: ScatterSeriesOptions; + spline?: SplineSeriesOptions; + splinearea?: SplineAreaSeries; + stackedarea?: StackedAreaSeries; + stackedbar?: StackedBasrSeriesOptions; + stackedline?: StackedLineSeries; + steparea?: StepAreaSeries; + stepline?: StepLineSeries; + stock?: StockSeriesOptions; + bubble?: BubbleSeriesOptions; + } + class z_BasePoint { + fullState: number; + originalArgument: any; + originalValue: any; + tag: any; + clearSelection(): void; + select(): void; + hideTootip(): void; + isSelected(): boolean; + isHovered(): boolean; + getColor(): string; + } + export class Point extends z_BasePoint{ + series: Series; + } + export class PiePoint extends z_BasePoint { + percent: any; + series: PieSeries; + isVisible():boolean; + hide(): void; + show(): void; + } + export class Series { + axis: string; + fullState: number; + name: string; + pane: string; + tag: any; + type: string; + clearSelection (): void; + deselectPoint (point:Point) : void; + getAllPoints () : Array + getPointByArg(pointArg: any): Point; + getPointByPos(positionIndex: number): Point; + select () : void; + selectPoint (point:Point) : void; + isSelected (): boolean; + isHovered(): boolean; + isVisible(): boolean; + show(): void; + hode(): void; + } + export class PieSeries { + fullState: number; + type: string; + clearSelection(): void; + deselectPoint(point:PiePoint): void; + getAllPoints(): Array + getPointByArg(pointArg: any): PiePoint; + getPointByPos(positionIndex: number): PiePoint; + select(): void; + selectPoint(point: PiePoint): void; + isSelected(): boolean; + isHovered(): boolean; + } +} +declare module DevExpress.viz.common { +export interface FontOptions { + color?: string; + family?: string; + opacity?: number; + size?: number; + weight?: number; + } + export interface tickIntervalObject { + years?: number; + quarters?: number; + months?: number; + days?: number; + hours?: number; + minutes?: number; + seconds?: number; + milliseconds?: number; + } + export interface LoadingIndicatorOptions { + backgroundColor?: string; + text?: string; + font?: FontOptions; + } + export interface CustomizeTooltipResult { + color?: string; + text?:string; + } + export interface BaseTooltipOptions { + enabled?: boolean; + color?: string; + border?: { + dashStyle?: string; + color?: string; + opacity?: number; + visible?: boolean; + width?: number; + }; + font?: FontOptions; + arrowLength?: number; + paddingLeftRight?: number; + paddingTopBottom?: number; + opacity?: number; + chadow?: { + color?: string; + opacity?: number; + offsetX?: number; + offsetY?: number; + blur?: number; + } + } +} +declare module DevExpress.viz.gauges { +interface CustomizeTextArgument { + value: number; + valueText: string; + color: string; + } + interface z_textOptions { + format?: string; + precision?: number; + customizeText?: (arg: CustomizeTextArgument) => string; + font?: viz.common.FontOptions; + } + interface z_textOptionsWithIndent extends z_textOptions { + indent?: number; + } + interface z_GaugeTooltipOptions extends common.BaseTooltipOptions { + format?: string; + precision?: number; + customizeText?: (arg: CustomizeTextArgument) => string; + customizeTooltip?: (arg: CustomizeTextArgument) => common.CustomizeTooltipResult; + } + interface z_BaseGaugeOptions { + size?: { + width?: number; + height?: number; + }; + margin?: { + left?: number; + right?: number; + top?: number; + bottom?: number; + }; + theme?: string; + loadingIndicator?: common.LoadingIndicatorOptions; + containerBackgroundColor?: string; + animation?: { + enabled?: boolean; + duration?: number; + easing?: string; + }; + redrawOnResize?: boolean; + title?: { + position?: string; + text?: string; + font?: viz.common.FontOptions; + }; + subtitle?: { + text?: string; + font?: viz.common.FontOptions; + }; + tooltip?: z_GaugeTooltipOptions; + value?: number; + subvalues?: Array; + pathModified?: boolean; + } + interface z_BaseRangeContainer { + offset?: number; + backgroundColor?: string; + ranges?: Array<{ + startValue?: number; + endValue?: number; + color?: string; + }> + } + interface z_BaseScale { + startValue?: number; + endValue?: number; + hideFirstTick?: boolean; + hideLastTick?: boolean; + hideFirstLabel?: boolean; + hideLastLabel?: boolean; + majorTick?: { + color?: string; + length?: number; + width?: number; + customTickValues?: Array; + useTicksAutoArrangement?: boolean; + tickInterval?: number; + showCalculatedTicks?: boolean; + visible?: boolean; + }; + minorTick?: { + color?: string; + length?: number; + width?: number; + customTickValues?: Array; + tickInterval?: number; + showCalculatedTicks?: boolean; + visible?: boolean; + }; + label?: z_textOptions; + } + interface z_BaseValueIndicator { + color?: string; + baseValue?: number; + size?: number; + backgroundColor?: string; + text?: z_textOptionsWithIndent; + } + interface z_BaseSubValueIndicator { + type?: string; + length?: number; + width?: number; + color?: string; + arrowLength?: number; + text?: z_textOptions; + palette?: Array + } + export interface CircularGaugeRangeContainer extends z_BaseRangeContainer { + width?: number; + orientation?: string; + } + export interface CircularGaugeScale extends z_BaseScale{ + orientation: string; + label: { + format?: string; + precision?: number; + customizeText?: (arg:CustomizeTextArgument) => string; + font?: viz.common.FontOptions; + indentFromTick?: number; + } + } + export interface CircularGaugeValueIndicator extends z_BaseValueIndicator { + type?: string; + offset?: number; + indentFromCenter?: number; + width?: number; + secondColor?: string; + secondFraction?: number; + spindleSize?: number; + spindleGapSize?: number; + } + export interface CircularGaugeSubValueIndicator extends z_BaseSubValueIndicator { + offset?: number; + } + export interface CircularGaugeOptions extends z_BaseGaugeOptions{ + rangeContainer?: CircularGaugeRangeContainer; + geometry?: { + startAngle?: number; + endAngle?: number; + }; + scale?: CircularGaugeScale; + valueIndicator?: CircularGaugeValueIndicator; + spindle?: { + visible?: boolean; + size?: number; + gapSize?: number; + color?: string; + }; + drawn?: (arg:viz.CircularGauge) => void; + } + export interface LinearGaugeScale extends z_BaseScale { + verticalOrientation?: string; + horizontalOrientation?: string; + label?: { + format?: string; + precision?: number; + customizeText?: (arg:CustomizeTextArgument) => string; + font?: viz.common.FontOptions; + indentFromTick?: number; + } + } + export interface LinearGaugeRangeContainer extends z_BaseRangeContainer { + width?: { + start?: number; + end?: number; + }; + verticalOrientation?: string; + horizontalOrientation?: string; + } + export interface LinearGaugeValueIndicator extends z_BaseValueIndicator { + offset?: number; + horizontalOrientation?: string; + verticalOrientation?: string; + length?: number; + width?: number; + } + export interface LinearGaugeSubValueIndicator extends z_BaseSubValueIndicator { + offset?: number; + horizontalOrientation?: string; + verticalOrientation?: string; + } + export interface LinearGaugeOptions extends z_BaseGaugeOptions { + geometry?: { + orientation?: string; + }; + scale?: LinearGaugeScale; + valueIndicator?: LinearGaugeValueIndicator; + drawn?: (arg:viz.LinearGauge) => void; + } + export interface BarGaugeOptions { + size?: { + width?: number; + height?: number; + }; + theme?: string; + loadingIndicator?: common.LoadingIndicatorOptions; + animationEnabled?: boolean; + animationDuration?: number; + animation?: { + enabled?: boolean; + duration?: number; + easing?: string; + }; + redrawOnResize?: boolean; + title?: { + position?: string; + text?: string; + font?: viz.common.FontOptions; + }; + subtitle?: { + text?: string; + font?: viz.common.FontOptions; + }; + tooltip?: z_GaugeTooltipOptions; + geometry?: { + startAngle?: number; + endAngle?: number; + }; + label?: { + visible?: boolean; + indent?: number; + connectorWidth?: number; + connectorColor?: string; + format?: string; + precision?: number; + customizeText?: (arg:CustomizeTextArgument) => string; + font?: viz.common.FontOptions; + }; + startValue?: number; + endValue?: number; + baseValue?: number; + values?: Array; + drawn?: (arg:viz.BarGauge) => void; + pathModified?: boolean; + } +} +declare module DevExpress.viz.map { +interface TooltipOptions extends common.BaseTooltipOptions { + customizeText?: (arg: Proxy) => string; + customizeTooltip?: (arg: Proxy) => common.CustomizeTooltipResult; + borderColor?: string; + } + export interface VectorMapOptions { + size?: { + width?: number; + height?: number; + }; + theme?: string; + background?: { + borderColor?: string; + color?: string; + }; + loadingIndicator?: common.LoadingIndicatorOptions; + mapData?: any; + areaSettings?: { + borderColor?: string; + color?: string; + hoveredBorderColor?: string; + hoveredColor?: string; + selectedBorderColor?: string; + selectedColor?: string; + hoverEnabled?: boolean; + selectionMode?: string; + palette?: any; + paletteSize?: number; + customize?: (arg: any) => AreaOptions; + click?: (arg: AreaProxy, event: JQueryMouseEventObject) => void; + selectionChanged?: (arg: AreaProxy) => void; + }; + markers?: any; + markerSettings?: { + size?: number; + minSize?: number; + maxSize?: number; + borderColor?: string; + color?: string; + hoveredBorderColor?: string; + hoveredColor?: string; + selectedBorderColor?: string; + selectedColor?: string; + font?: common.FontOptions; + hoverEnabled?: boolean; + selectionMode?: string; + customize?: (arg: any) => MarkerOptions; + click?: (arg: MarkerProxy, event: JQueryMouseEventObject) => void; + selectionChanged?: (arg: MarkerProxy) => void; + }; + controlBar?: { + enabled?: boolean; + borderColor?: string; + color?: string; + }; + tooltip?: TooltipOptions; + bounds?: Array; + center?: Array; + zoomFactor?: number; + click?: (event: JQueryMouseEventObject) => void; + centerChanged?: (arg: Array) => void; + zoomFactorChanged?: (arg: number) => void; + drawn?: (arg: viz.Map) => void; + pathModified?: boolean; + } + export interface AreaOptions { + borderColor?: string; + color?: string; + hoveredBorderColor?: string; + hoveredColor?: string; + selectedBorderColor?: string; + selectedColor?: string; + paletteIndex?: number; + isSelected?: boolean; + } + export interface MarkerOptions { + borderColor?: string; + color?: string; + hoveredBorderColor?: string; + hoveredColor?: string; + selectedBorderColor?: string; + selectedColor?: string; + isSelected?: boolean; + } + export interface Proxy { + type: string; + attribute(name: string): any; + selected(state: boolean): void; + selected(): boolean; + } + export interface AreaProxy extends Proxy { + } + export interface MarkerProxy extends Proxy { + coordinates(): Array; + } +} +declare module DevExpress.viz.rangeSelector { +export interface SelectedRange { + startValue: any; endValue: any; + } + interface CustomizeTextArgument { + value: any; + valueText: string; + } + export interface RangeSelectorOptions { + background?: { + color?: string; + image?: { + location?: string; + url?: string; + } + visible?: boolean; + }; + loadingIndicator?: common.LoadingIndicatorOptions; + behavior?: { + allowSlidersSwap?: boolean; + animationEnabled?: boolean; + callSelectedRangeChanged?: string; + manualRangeSelectionEnabled?: boolean; + moveSelectedRangeByClick?: boolean; + snapToTicks?: boolean; + }; + chart?: { + bottomIndent?: number; + equalBarWidth?: { + spacing?: number; + width?: number; + }; + dataPrepareSettings?: { + checkTypeForAllData?: boolean; + convertToAxisDataType?: boolean; + sortingMethod?: any; }; + useAggregation?: boolean; + series?: Array; + commonSeriesSettings?: viz.charts.series.commonSeriesSettings; + topIndent?: number; + valueAxis?: { + max?: any; min?: any; inverted?: boolean; + valueType?: string; + type?: string; + logarithmBase?: number; + }; + } + containerBackgroundColor?: string; + dataSource?: Array<{}>; + dataSourceField?: string; + margin?: { + left?: number; + top?: number; + right?: number; + bottom?: number; + }; + redrawOnResize?: boolean; + scale?: { + startValue?: any; endValue?: any; + label?: { + customizeText?: (arg: CustomizeTextArgument) => string; + font?: viz.common.FontOptions; + format?: string; + precision?: number; + topIndent?: number; + visible?: boolean; + }; + majorTickInterval?: any; marker?: { + label?: { + customizeText?: (arg: CustomizeTextArgument) => string; + format?: string; + }; + separatorHeight?: number; + textLeftIndent?: number; + textTopIndent?: number; + topIndent?: number; + visible?: boolean; + }; + maxRange?: any; minorTickCount?: number; + placeHolderHeight?: number; + setTicksAtUnitBeginning?: boolean; + showCustomBoundaryTicks?: boolean; + showMinorTicks?: boolean; + tick?: { + color?: string; + opacity?: number; + width?: number; + }; + minorTickInterval?: any; useTicksAutoArrangement?: boolean; + valueType?: string; + type?: string; + logarithmBase?: number; + } + selectedRange?: SelectedRange; + selectedRangeChaged?: (startValue: any, endValue: any) => void; + shutter?: { + color?: string; + opacity?: string; + } + size?: { + width?: number; + height?: number; + }; + sliderHandle?: { + color?: string; + opacity?: number; + width?: string; + }; + sliderMarker?: { + color?: string; + customizeText?: (arg: CustomizeTextArgument) => string; + font?: viz.common.FontOptions; + format?: string; + invalidRangeColor?: string; + padding?: number; + placeHolderSize?: { + height?: number; + width?: { + left?: number; + right?: number; + } + precission?: number; + visible?: boolean; + } + }; + theme?: string; + drawn?: (arg:viz.RangeSelector) => void; + pathModified?: boolean; + } +} +declare module DevExpress.viz.sparklines { +interface z_SparklineTooltipFormatObject { + firstValue?: string; + lastValue?: string; + maxValue?: string; + minValue?: string; + originalFirstValue?: any; + originalLastValue?: any; + originalMaxValue?: any; + originalMinValue?: any; + } + interface SparklineTooltipOptions extends common.BaseTooltipOptions { + customizeText?: (arg: z_SparklineTooltipFormatObject) => string; + customizeTooltip?: (arg: z_SparklineTooltipFormatObject) => common.CustomizeTooltipResult; + allowContainerResizing?: boolean; + horizontalAlignment?: string; + verticalAlignment?: string; + format?: string; + precision?: number; + } + interface z_BaseSparklineSettings { + theme?: string; + size?: { + width?: number; + height?: number; + }; + tooltip?: SparklineTooltipOptions; + pathModified?: boolean; + } + interface SparklineOptions extends z_BaseSparklineSettings { + dataSource?: Array; + argumentField?: string; + valueField?: string; + type?: string; + lineColor?: string; + lineWidth?: number; + showFirstLast?: boolean; + showMinMax?: boolean; + minColor?: string; + maxColor?: string; + firstLastColor?: string; + barPositiveColor?: string; + barNegativeColor?: string; + winColor?: string; + lossColor?: string; + pointSymbol?: string; + pointSize?: number; + pointColor?: string; + winlossThreshold?: number; + drawn?: (arg:viz.Sparkline) => void; + ignoreEmptyPoints?: boolean; + } + interface z_BulletTooltipFormatObject { + originalValue?: any; + originalTarget?: any; + value?: string; + target?: string; + } + interface BulletTooltipOptions extends SparklineTooltipOptions { + customizeText?: (arg: z_BulletTooltipFormatObject) => string; + customizeTooltip?: (arg: z_BulletTooltipFormatObject) => common.CustomizeTooltipResult; + } + interface BulletOptions extends z_BaseSparklineSettings{ + value?: number; + target?: number; + endScaleValue?: number; + color?: string; + targetColor?: string; + targetWidth?: number; + targetVisible?: boolean; + tooltip?: BulletTooltipOptions; + drawn?: (arg:viz.Bullet) => void; + } +} +interface JQuery { +dxChart(options?: DevExpress.viz.charts.ChartOptions): JQuery; + dxChart(method: string, param1?:any, param2?:any): any; + dxPieChart(options?: DevExpress.viz.charts.PieOptions): JQuery; + dxPieChart(method: string, param1?: any, param2?: any): any; + dxRangeSelector(options?: DevExpress.viz.rangeSelector.RangeSelectorOptions): JQuery; + dxRangeSelector(method: string, param1?: any, param2?: any): any; + dxCircularGauge(options?: DevExpress.viz.gauges.CircularGaugeOptions): JQuery; + dxCircularGauge(method: string, param1?: any, param2?: any): any; + dxLinearGauge(options?: DevExpress.viz.gauges.LinearGaugeOptions): JQuery; + dxLinearGauge(method: string, param1?: any, param2?: any): any; + dxBarGauge(options?: DevExpress.viz.gauges.BarGaugeOptions): JQuery; + dxBarGauge(method: string, param1?: any, param2?: any): any; + dxSparkline(options?: DevExpress.viz.sparklines.SparklineOptions): JQuery; + dxSparkline(method: string, param1?: any, param2?: any): any; + dxBullet(options?: DevExpress.viz.sparklines.BulletOptions): JQuery; + dxBullet(method: string, param1?: any, param2?: any): any; + dxVectorMap(options?: DevExpress.viz.map.VectorMapOptions): JQuery; + dxVectorMap(method: string, param1?: any, param2?: any): any; +} \ No newline at end of file diff --git a/devextreme/dx.phonejs-tests.ts b/devextreme/dx.phonejs-tests.ts new file mode 100644 index 000000000..478e1ce2f --- /dev/null +++ b/devextreme/dx.phonejs-tests.ts @@ -0,0 +1,258 @@ +/// + +module Test { + var url = "http://some-json-service.net/data.json"; + var dsFromUrl = new DevExpress.data.DataSource(url); + + var dsFromObject = new DevExpress.data.DataSource({ + load: function (loadOptions?: DevExpress.data.LoadOptions) { + return $.ajax(url); + } + }); + + var application:DevExpress.framework.html.HtmlApplication = new DevExpress.framework.html.HtmlApplication({ + namespace: "global", + defaultLayout: "slideout", + navigation: [ + { id: "first", title: "Home", action: "#home" }, + { id: "second", title: "About", action: "#about" } + ] + }); + application.router.register(":view/:id", { view: "home", id: undefined }); + application.navigate(); + + $("div").appendTo(document.body).dxMap({ + location: [40.749825, -73.987963], + zoom: 13, + provider: "googleStatic", + controls: true, + routes: [ + { + weight: 4, + opacity: 0.75, + color: "red", + mode: "walking", + locations: [ + [40.737102, -73.990318], + [40.749825, -73.987963], + [40.75, -73.98], + [40.755823, -73.986397] + ] + } + ] + }); + $("div").appendTo(document.body).dxTabs({ + itemClickAction: function (e: any) { + console.log(e.itemData.text); + }, + items: [ + { text: "user" }, + { text: "analytics" }, + { text: "customers" }, + { text: "search" }, + { text: "favorites" } + ] + }); + + $("div").appendTo(document.body).dxList({ + scrollByContent: true, + items: ["item1", "item2", "item3"], + itemHoldAction: function (e: any) { console.log("itemHold"); }, + itemClickAction: function (e: any) { console.log("itemClick"); }, + itemSwipeAction: function (e: any) { console.log("itemSwipe " + e.direction); } + }); + $("div").appendTo(document.body).dxToast({ + type: 'error', + message: 'Sample error message' + }); + $("div").appendTo(document.body).dxPopup({ + closeButton: true, + title: "Popup title" + }); + $("div").appendTo(document.body).dxPivot({ + items: [ + { title: "all", text: "all" }, + { title: "unread", text: "unread" }, + { title: "favorites", text: "favorites" } + ], + itemSelectAction: function (e: Object) { console.log("itemSelectAction"); } + }); + $("div").appendTo(document.body).dxLookup({ + items: [ + { id: 1, caption: "red" }, + { id: 3, caption: "blue" }, + { id: 6, caption: "white" }, + { id: 2, caption: "green" }, + { id: 4, caption: "yellow" }, + { id: 5, caption: "orange" }, + { id: 7, caption: "purple" } + ], + valueExpr: 'id', + displayExpr: 'caption', + itemRender: function (item: any) { + return "Text is: " + item.caption; + } + }); + $("div").appendTo(document.body).dxSlider({ + min: 50, + value: 75, + max: 100, + disabled: false + }); + $("div").appendTo(document.body).dxNavBar({ + items: [ + { text: "user", icon: "user" }, + { text: "find", icon: "find", disabled: false }, + { text: "favorites", icon: "favorites" }, + { text: "about", icon: "info" }, + { text: "home", icon: "home" }, + { text: "URI", icon: "tips" } + ], + itemClickAction: function (e: any) { console.log(e.itemData.text); } + }); + $("div").appendTo(document.body).dxSwitch({ + value: false, + onText: 'LongName', + offText: 'Short', + width: "100%", + visible: true + }); + $("div").appendTo(document.body).dxButton({ + text: "Click me", + icon: 'add', + clickAction: function () { console.log("clicked"); } + }); + $("div").appendTo(document.body).dxOverlay({ + visible: false, + closeOnOutsideClick: true, + contentReadyAction: function () { + $("#hideButton").dxButton({ + text: "Hide", + clickAction: function () { $("#overlay").data("dxOverlay").option("visible", false); } + }); + } + }); + $("div").appendTo(document.body).dxDateBox({ + value: new Date(), + format: "datetime" + }); + $("div").appendTo(document.body).dxPopover({ + width: '300', + height: 'auto', + visible: true, + target: '.dx-button' + }); + $("div").appendTo(document.body).dxTextBox({ + value: "Text", + placeholder: "Placeholder", + mode: "email", + maxLength: 20, + readOnly: false, + changeAction: function (e:Object) { console.log("value changed"); }, + valueUpdateAction: function (e:Object) { console.log("value updated"); } + }); + $("div").appendTo(document.body).dxToolbar({ + items: [ + { align: 'left', widget: 'button', options: { type: 'back', text: 'Back', clickAction: function (e:Object) { console.log("back clicked"); } } }, + { align: 'center', widget: 'button', options: { text: 'button', clickAction: function (e:Object) { console.log("button clicked"); } } }, + { align: 'center', widget: 'button', options: { icon: 'plus', text: 'add', clickAction: function (e:Object) { console.log("plus clicked"); } } }, + { align: 'right', widget: 'button', options: { icon: 'find', clickAction: function (e:Object) { console.log("find clicked"); } }, useMenu: false }, + { text: 'Products', isMenu: true } + ] + }); + $("div").appendTo(document.body).dxTileView({ + items: [ + { text: "item1", widthRatio: 1.7, heightRatio: 1.7 }, + { text: "item2", widthRatio: 0.2, heightRatio: 0.2 }, + { text: "item3", widthRatio: 2, heightRatio: 2 } + ], + listHeight: 500, + itemRender: function (item: any) { return "Text is: " + item.text; }, + itemClickAction: function () { console.log("itemClick"); }, + baseItemWidth: 100, + baseItemHeight: 100, + itemMargin: 20 + }); + $("div").appendTo(document.body).dxPanorama({ + title: "my panorama", + items: [ + { header: "first", text: "first item" }, + { text: "second item" }, + { text: "third" }, + { text: "fourth" } + ], + selectedIndex: 0, + backgroundImage: { width: 89, height: 50 }, + itemSelectAction: function () { console.log("item selected"); } + }); + $("div").appendTo(document.body).dxCheckBox({ + checked: false, + disabled: false, + clickAction: function (e:Object) { console.log("clicked"); } + }); + $("div").appendTo(document.body).dxTextArea({ + value: 'Disabled', + disabled: true, + placeholder: "Placeholder" + }); + $("div").appendTo(document.body).dxLoadPanel({ + message: 'Please wait ...', + showIndicator: true, + visible: true + }); + $("div").appendTo(document.body).dxNumberBox({ + value: 100, + min: 0, + max: 200 + }); + $("div").appendTo(document.body).dxSelectBox({ + value: 2, + dataSource: new DevExpress.data.DataSource([1, 2, 2, 3]) + }); + $("div").appendTo(document.body).dxScrollable({ + useNative: false, + startAction: function (e:Object) { console.log("start"); }, + endAction: function (e:Object) { console.log("end"); } + }); + $("div").appendTo(document.body).dxRadioGroup({ + items: [{ text: "0" }, { text: "1" }, { text: "2" }], + name: "Sample", + selectedIndex: -1 + }); + $("div").appendTo(document.body).dxScrollView({ + pullDownAction: function (e:Object) { console.log("pulling down"); }, + reachBottomAction: function (e:Object) { console.log("bottom reached"); }, + disabled: false + }); + $("div").appendTo(document.body).dxActionSheet({ + title: 'Select action', + items: [ + { text: "Reply", clickAction: function () { console.log("Reply"); } }, + { text: "Forward", clickAction: function () { console.log("Forward"); } }, + { text: "Delete", clickAction: function () { console.log("Delete"); }, type: "danger" }, + { text: "Save Image", clickAction: function () { console.log("Save Image"); }, disabled: true } + ], + showTitle: true, + disabled: false, + target: '#button' + }); + $("div").appendTo(document.body).dxRangeSlider({ + start: 30, + end: 70, + min: 0, + max: 100, + step: 1 + }); + $("div").appendTo(document.body).dxAutocomplete({ + value: "Ivan", + dataSource: new DevExpress.data.DataSource(["Ivan", "Svyatoslav", "Alexander", "Nikolay", "Dmitry", "Afanasiy", "John", "Nash", "Stacy", "Izabella", "Margarita", "Anna"]), + placeholder: "Type name, please", + maxItemsCount: 3, + minSearchLength: 2, + searchTimeout: 1000 + }); + $("div").appendTo(document.body).dxDropDownMenu({ + items: ["Item 1", "Item 2", "Item 3"], + itemTemplate: 'itemWithIcon' + }); +} \ No newline at end of file diff --git a/devextreme/dx.phonejs.d.ts b/devextreme/dx.phonejs.d.ts new file mode 100644 index 000000000..dd97faebb --- /dev/null +++ b/devextreme/dx.phonejs.d.ts @@ -0,0 +1,1502 @@ +// Type definitions for PhoneJS +// Project: http://js.devexpress.com/MobileDevelopment/ +// Definitions by: DevExpress Inc. +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module DevExpress { +export function abstract(): void; + export var rtlEnabled: boolean; + export var hardwareBackButton: JQueryCallback; + interface Endpoint { + local?: string; + production: string; + } + class EndpointSelector { + constructor(config: { [key: string]: Endpoint }); + urlFor(key: string): string; + } + export interface ActionOptions { + context?: Object; + component?: any; + beforeExecute? (e:ActionExecuteArgs): void; + afterExecute? (e:ActionExecuteArgs): void; + } + export interface ActionExecuteArgs { + action: any; + args: any[]; + context: any; + component: any; + cancel: boolean; + handled: boolean; + } + export class Action { + constructor(action?: any, config?: ActionOptions); + execute(): any; + } + export interface IDevice { + deviceType?: string; + platform?: string; + version?: Array; + phone?: boolean; + tablet?: boolean; + android?: boolean; + ios?: boolean; + win8?: boolean; + tizen?: boolean; + generic?: boolean; + } + export module devices { + export function orientation(): string; + export var orientationChanged: JQueryCallback; + export function real(): IDevice; + export function current(deviceOrName: string): IDevice; + export function current(deviceOrName: IDevice): IDevice; + } + export function registerComponent(name: string, componentClass: any): void; + export interface ComponentOptions { + disabled?: boolean; + } + export class Component { + constructor(element: Element, options?: ComponentOptions); + constructor(element: JQuery, options?: ComponentOptions); + disposing: JQueryCallback; + optionChanged: JQueryCallback; + instance(): Component; + beginUpdate(): void; + endUpdate(): void; + option(): any; + option(options: string): any; + option(options: string): T; + option(options: string, value: any): void; + option(options: { [key: string]: any }): void; + option(options?: any): any; + } + export interface DOMComponentOptions extends ComponentOptions { + rtlEnabled?: boolean; + } + export class DOMComponent extends Component { + constructor(element: HTMLElement, options?: DOMComponentOptions); + static defaultOptions(rule: { + device: any; + options: { [key: string]: any }; + }): void; + } +} +declare module DevExpress.data { +export interface DataError extends Error { + httpStatus?: number; + errorDetails?: any; + } + export interface ErrorHandler { (e: DataError): void; } + export interface EntityOptions { key: any; keyType: any; } + export interface Getter { (obj: any, options?: any): any; } + export interface Setter { (obj: any, value: any, options?: any): void; } + export interface QueryOptions { + errorHandler?: ErrorHandler; + requireTotalCount?: boolean; + } + export interface ODataQueryOptions extends QueryOptions { + adapter?: any; + } + interface IQuery { + enumerate(): JQueryPromise>; + count(): JQueryPromise; + slice(skip: number, take?: number): IQuery; + sortBy(field: string): IQuery; + sortBy(field: Getter): IQuery; + sortBy(field: { field: string; desc?: boolean }): IQuery; + sortBy(field: { field: Getter; desc?: boolean }): IQuery; + thenBy(field: string): IQuery; + thenBy(field: Getter): IQuery; + thenBy(field: { field: string; desc?: boolean }): IQuery; + thenBy(field: { field: Getter; desc?: boolean }): IQuery; + filter(field: string, operator: string, value: any): IQuery; + filter(field: string, value: any): IQuery; + filter(criteria: any[]): IQuery; + select(field: string): IQuery; + select(field: string[]): IQuery; + select(...field: string[]): IQuery; + select(field: Getter): IQuery; + select(field: Getter[]): IQuery; + select(...field: Getter[]): IQuery; + groupBy(field: string[]): IQuery; + groupBy(field: Getter[]): IQuery; + groupBy(field: { field: string; desc?: boolean }[]): IQuery; + groupBy(field: { field: Getter; desc?: boolean }[]): IQuery; + sum(getter?: string): JQueryPromise; + min(getter?: string): JQueryPromise; + max(getter?: string): JQueryPromise; + avg(getter?: string): JQueryPromise; + aggregate(step: number): JQueryPromise; + aggregate(seed: number, step: (accumulator: any, current: any) => any, finalize?: (accumulator: any) => any): JQueryPromise; + } + export interface ArrayQuery extends IQuery { + toArray(): Array; + } + export interface RemoteQuery extends IQuery { /*todo: exec() ? */ } + export function base64_encode(input: string): string; + export function base64_encode(input: any[]): string; + export function query(items?: any[]): IQuery; + export var queryImpl: { + remote: (url: string, queryOptions: QueryOptions) => RemoteQuery; + array: (iter: Array, queryOptions: QueryOptions) => ArrayQuery; + }; + export class Guid { + constructor(value?: string); + constructor(value?: any); + toString(): string; + valueOf(): string; + toJSON(): string; + } + export class EdmLiteral { + constructor(value: any); + valueOf(): any; + } + export module utils { + export function normalizeSortingInfo(info: string): Array<{ selector: string; desc?: boolean }>; + export function normalizeSortingInfo(info: string[]): Array<{ selector: string; desc?: boolean }>; + export function normalizeSortingInfo(info: Getter): Array<{ selector: string; desc?: boolean }>; + export function normalizeSortingInfo(info: Getter[]): Array<{ selector: string; desc?: boolean }>; + export function normalizeSortingInfo(info: { field: string; dir?: string }): Array<{ selector: string; desc?: boolean }>; + export function normalizeSortingInfo(info: { field: string; dir?: string }[]): Array<{ selector: string; desc?: boolean }>; + export function normalizeSortingInfo(info: { field: string; desc?: boolean }): Array<{ selector: string; desc?: boolean }>; + export function normalizeSortingInfo(info: { field: string; desc?: boolean }[]): Array<{ selector: string; desc?: boolean }>; + export function normalizeSortingInfo(info: { selector: string; dir?: string }): Array<{ selector: string; desc?: boolean }>; + export function normalizeSortingInfo(info: { selector: string; dir?: string }[]): Array<{ selector: string; desc?: boolean }>; + export function normalizeSortingInfo(info: { selector: string; desc?: boolean }): Array<{ selector: string; desc?: boolean }>; + export function normalizeSortingInfo(info: { selector: string; desc?: boolean }[]): Array<{ selector: string; desc?: boolean }>; + export function normalizeBinaryCriterion(criteria: Array): Array; + export function keysEqual(key1: any, key2: any): boolean; + export function keysEqual(keyExpr: any, key1: any, key2: any): boolean; + export function toComparable(value: Date, caseSensitive?: boolean): number; + export function toComparable(value: Guid, caseSensitive?: boolean): string; + export function toComparable(value: string, caseSensitive?: boolean): string; + export function compileGetter(): Getter; + export function compileGetter(expr: any[]): Getter; + export function compileGetter(expr: string): Getter; + export function compileGetter(expr: "this"): Getter; + export function compileGetter(expr: Getter): Getter; + export function compileSetter(expr: string): Setter; + export module odata { + export function sendRequest(request: JQueryXHR, requestOptions?: JQueryAjaxSettings): any; + export function serializePropName(propName: EdmLiteral): string; + export function serializePropName(propName: string): string; + export function serializeValue(value: Date): string; + export function serializeValue(value: Guid): string; + export function serializeValue(value: string): string; + export function serializeValue(value: "string"): string; + export function serializeValue(value: EdmLiteral): string; + export function serializeKey(key: any): string; + export function serializeKey(key: Date): string; + export function serializeKey(key: Guid): string; + export function serializeKey(key: string): string; + export function serializeKey(key: "string"): string; + export function serializeKey(key: EdmLiteral): string; + export var keyConverters: { + String(value: any): string; + Guid(value: any): Guid; + Int32(value: any): number; + Int64(value: any): EdmLiteral; + }; + } + } + export module queryAdapters { + export function odata(queryOptions: ODataQueryOptions): RemoteQuery; + } +export interface DataSourceOptions { + map? (item: any): any; + postProcess? (result: any[]): any; + pageSize: number; + paginate: boolean; + } + export class DataSource { + public changed: JQueryCallback; + public loadError: JQueryCallback; + public loadingChanged: JQueryCallback; + constructor(options?: Store); + constructor(options?: string); + constructor(options?: Array); + constructor(options?: { store: Store }); + constructor(options?: CustomStoreOptions); + constructor(options?: { store: Array }); + constructor(options?: { store: { type: string } }); + constructor(options?: { load(options?: LoadOptions): JQueryXHR; }); + constructor(options?: { load(options?: LoadOptions): Array; }); + constructor(options?: { load(options?: LoadOptions): JQueryPromise; }); + constructor(options?: DataSourceOptions); + loadOptions(): { [key: string]: any }; + items(): Array; + store(): data.Store; + isLastPage(): boolean; + pageIndex(newIndex?: number): number; + sort(expr: any[]): any[]; + group(expr: any[]): any[]; + filter(expr: any[]): any[]; + select(expr: string[]): string[]; + searchValue(value?: string): string; + searchOperation(op?: string): string; + searchExpr(selector: string): string; + key(): any; + isLoaded(): boolean; + isLoading(): boolean; + totalCount(): number; + load(): JQueryPromise; + dispose(): void; + } +export interface StoreOptions { + key?: any; + errorHandler?: ErrorHandler; + loaded?: (result: Array) => void; + loading?: (loadOptions: LoadOptions) => void; + modified?: () => void; + modifying?: () => void; + inserted?: (values: Object, key: any) => void; + inserting?: (values: Object) => void; + updated?: (key: any, values: Object) => void; + updating?: (key: any, values: Object) => void; + removed?: (key: any) => void; + removing?: (key: any) => void; + } + export interface LoadOptions extends QueryOptions { + skip?: number; + take?: number; + sort?: any; + select?: any; + filter?: any; + group?: any; + expand?: any; + } + export class Store { + loaded: JQueryCallback; + loading: JQueryCallback; + modified: JQueryCallback; + modifying: JQueryCallback; + inserted: JQueryCallback; + inserting: JQueryCallback; + updated: JQueryCallback; + updating: JQueryCallback; + removed: JQueryCallback; + removing: JQueryCallback; + constructor(options?: StoreOptions); + key(): any; + keyOf(obj: any): any; + load(options?: LoadOptions): JQueryPromise; + createQuery(options?: QueryOptions): IQuery; + totalCount(options?: { + filter?: any[]; + group?: string[]; + }): JQueryPromise; + byKey(key: any, extraOptions?: { + expand?: string[] + }): JQueryPromise; + remove(key: any): JQueryPromise; + insert(values: any): JQueryPromise; + update(key: any, values: any): JQueryPromise; + } + export interface CustomStoreOptions extends StoreOptions { + load? (options?: LoadOptions): any; + byKey? (key: any): any; + insert? (values: any): any; + update? (key: any, values: any): any; + remove? (key: any): any; + totalCount? (options?: { + filter?: any[]; + group?: string[]; + }): any; + } + export class CustomStore extends Store { + constructor(options?: CustomStoreOptions); + } + export interface ArrayStoreOptions extends StoreOptions { + data?: Array + } + export class ArrayStore extends Store { + constructor(options?: Array); + constructor(options?: ArrayStoreOptions); + } + export interface LocalStoreOptions extends ArrayStoreOptions { + name: string; + } + export class LocalStore extends ArrayStore { + constructor(options?: string); + constructor(options?: LocalStoreOptions); + clear(): void; + } + export interface ODataStoreOptions extends StoreOptions { + url?: string; + name?: string; + keyType?: string; + jsonp?: boolean; + withCredentials?: boolean; + } + export class ODataStore extends Store { + constructor(options?: ODataStoreOptions); + } + export interface ODataContextOptions { + url: string; + jsonp?: boolean; + withCredentials?: boolean; + errorHandler?: ErrorHandler; + beforeSend?: () => any; + entities?: { + [entityAlias: string]: ODataStoreOptions; + }; + } + export class ODataContext { + constructor(options?: ODataContextOptions); + get(operationName: string, params: { [key: string]: any }): JQueryPromise>; + invoke(operationName: string, params: { [key: string]: any }, httpMethod?: string): JQueryPromise>; + objectLink(entityAlias: string, key: any): { __metadata: { uri: string }; }; + } +} +declare module DevExpress.framework { +export interface dxViewOptions { + name: string; + title?: string; + layout?: string; + } + export class dxView extends Component { + constructor(options?: dxViewOptions); + } + export interface dxLayoutOptions { + name: string; + controller: string; + } + export class dxLayout extends Component { + constructor(options?: dxLayoutOptions); + } + export interface dxViewPlaceholderOptions { + viewName: string; + } + export class dxViewPlaceholder extends Component { + constructor(options?: dxLayoutOptions); + } + export interface dxTransitionOptions { + name: string; + type: string; + } + export class dxTransition extends Component { + constructor(options?: dxLayoutOptions); + } + export interface dxContentPlaceholderOptions { + name: string; + transition: string; + } + export class dxContentPlaceholder extends Component { + constructor(options?: dxLayoutOptions); + } + export interface dxContentOptions { + targetPlaceholder: string; + } + export class dxContent extends Component { + constructor(options?: dxLayoutOptions); + } + export interface dxCommandOptions extends ComponentOptions { + id: string; + action?: any; + icon?: string; + title?: string; + iconSrc?: string; + visible?: boolean; + } + export class dxCommand extends Component { + public beforeExecute: JQueryCallback; + public afterExecute: JQueryCallback; + constructor(element: JQuery, options?: dxCommandOptions); + constructor(element: Element, options?: dxCommandOptions); + execute(): void; + } + export class dxCommandContainer extends Component { + constructor(options: ComponentOptions); + constructor(element: JQuery, options?: ComponentOptions); + constructor(element: Element, options?: ComponentOptions); + } + export interface CommandMap { + [containerId: string]: { commands: any[]; defaults?: any; } + } + export class CommandMapping { + constructor(); + static defaultMapping: CommandMap; + mapCommands(containerId: string, commandMappings: any[]): CommandMapping; + unmapCommands(containerId: string, commandIds: string[]): void; + getCommandMappingForContainer(commandId: string, containerId: string): any; + load(config: CommandMap): CommandMapping; + } + interface IViewCache { + viewRemoved: JQueryCallback; + setView(key: string, viewInfo: any): void; + removeView(key: string): any; + hasView(viewInfo: any): boolean; + getView(key: string): any; + clear(): void; + } + export class ViewCache implements IViewCache { + viewRemoved: JQueryCallback; + constructor(); + setView(key: string, viewInfo: any): void; + removeView(key: string): any; + hasView(viewInfo: any): boolean; + getView(key: string): any; + clear(): void; + } + export class NullViewCache implements IViewCache { + viewRemoved: JQueryCallback; + constructor(); + setView(key: string, viewInfo: any): void; + removeView(key: string): any; + hasView(viewInfo: any): boolean; + getView(key: string): any; + clear(): void; + } + export class CapacityViewCacheDecorator implements IViewCache { + viewRemoved: JQueryCallback; + constructor(options: { + size: number; + viewCache: IViewCache; + }); + setView(key: string, viewInfo: any): void; + removeView(key: string): any; + hasView(viewInfo: any): boolean; + getView(key: string): any; + clear(): void; + } + export class ConditionalViewCacheDecorator implements IViewCache { + viewRemoved: JQueryCallback; + constructor(options: { + filter: (key: string, viewInfo: any) => boolean; + viewCache: IViewCache; + }); + setView(key: string, viewInfo: any): void; + removeView(key: string): any; + hasView(viewInfo: any): boolean; + getView(key: string): any; + clear(): void; + } + export class HistoryDependentViewCacheDecorator implements IViewCache { + viewRemoved: JQueryCallback; + constructor(options: { + navigationManager: StackBasedNavigationManager; + viewCache: IViewCache; + }); + setView(key: string, viewInfo: any): void; + removeView(key: string): any; + hasView(viewInfo: any): boolean; + getView(key: string): any; + clear(): void; + } + export interface IStorage { + getItem(key: string): any; + setItem(key: string, value: any): void; + removeItem(key: string): void; + } + export class MemoryKeyValueStorage implements IStorage { + constructor(); + getItem(key: string): any; + setItem(key: string, value: any): void; + removeItem(key: string): void; + } + export interface StateManagerOptions { + storage?: IStorage; + stateSources?: any[]; + } + export class StateManager { + public storage: IStorage; + public stateSources: any[]; + constructor(options?: StateManagerOptions); + addStateSource(stateSource: any): void; + removeStateSource(stateSource: any): void; + saveState(): void; + restoreState(): void; + clearState(): void; + } + export class Route { + constructor(pattern: string, defaults?: any, constraints?: any); + parse(url: string): any; + format(routeValues: any): string; + formatSegment(value: any): string; + parseSegment(): any; + } + export class MvcRouter { + constructor(); + register(pattern: string, defaults?: any, constraints?: any): void; + parse(uri: string): any; + format(obj: any): string; + } + interface BrowserAdapterOptions { + window: Window; + } + export class DefaultBrowserAdapter { + constructor(options?: BrowserAdapterOptions); + replaceState(uri: string): void; + pushState(uri: string): void; + createRootPage(): void; + getWindowName(): string; + setWindowName(windowName: string): void; + back(): void; + getHash(): string; + isRootPage(): boolean; + } + export class OldBrowserAdapter extends DefaultBrowserAdapter { } + export class HistorylessBrowserAdapter extends DefaultBrowserAdapter { } + export interface INavigationDevice { + init: Function; + setUri(uri: string): void; + getUri(): string; + back(): void; + } + export class StackBasedNavigationDevice extends HistoryBasedNavigationDevice implements INavigationDevice { + uriChanged: JQueryCallback; + constructor(options?: BrowserAdapterOptions); + } + export class HistoryBasedNavigationDevice implements INavigationDevice { + backInitiated: JQueryCallback; + init: Function; + setUri(uri: string): void; + getUri(): string; + back(): void; + } + export class NavigationStack { + public items: any[]; + public currentIndex: number; + public itemsRemoved: JQueryCallback; + constructor(); + currentItem(): any; + back(uri: string): void; + forward(): void; + navigate(uri: any, replaceCurrent?: boolean): any; + getPreviousItem(): any; + canBack(): boolean; + clear(): void; + } + export interface NavigationManagerOptions { + stateStorageKey?: string; + navigationDevice?: INavigationDevice; + keepPositionInStack?: boolean; + } + export interface INavigationManager { + navigating: JQueryCallback; + navigated: JQueryCallback; + navigatingBack: JQueryCallback; + navigationCanceled: JQueryCallback; + itemRemoved: JQueryCallback; + navigate(uri: any, options?: { + root?: boolean; + target?: string; + direction?: string; + }): void; + back(): void; + back(alternate: any): void; + canBack(): boolean; + rootUri(): string; + currentItem(): any; + previousItem(): any; + saveState(): void; + removeState(): void; + restoreState(): void; + } + export class StackBasedNavigationManager extends HistoryBasedNavigationManager { + init(): JQueryPromise; + public currentStack: NavigationStack; + public navigationStacks: { + [key: string]: NavigationStack + }; + public navigating: JQueryCallback; + public navigated: JQueryCallback; + public navigatingBack: JQueryCallback; + public navigationCanceled: JQueryCallback; + public itemRemoved: JQueryCallback; + constructor(options?: NavigationManagerOptions); + navigate(uri: any, options?: { + root?: boolean; + target?: string; + direction?: string; + }): void; + currentIndex(): number; + getItemByIndex(index: number): any; + clearHistory(): void; + } + export class HistoryBasedNavigationManager implements INavigationManager { + navigating: JQueryCallback; + navigated: JQueryCallback; + navigatingBack: JQueryCallback; + navigationCanceled: JQueryCallback; + itemRemoved: JQueryCallback; + constructor(options?: NavigationManagerOptions); + navigate(uri: any, options?: { + root?: boolean; + target?: string; + direction?: string; + }): void; + back(): void; + back(alternate: any): void; + canBack(): boolean; + rootUri(): string; + currentItem(): any; + previousItem(): any; + saveState(): void; + removeState(): void; + restoreState(): void; + } + export module utils { + export function mergeCommands(destination: any, source: any): dxCommand[]; + } + export interface ApplicationOptions { + router?: MvcRouter; + ns?: Object; + namespace?: Object; + viewCache?: IViewCache; + viewCacheSize?: number; + disableViewCache?: boolean; + useViewTitleAsBackText?: boolean; + stateManager?: StateManager; + navigationManager?: StackBasedNavigationManager; + navigation?: dxCommandOptions[]; + commandMapping?: CommandMap; + } + export class Application { + public router: MvcRouter; + public namespace: any; + public components: any[]; + public viewCache: IViewCache; + public stateManager: StateManager; + public commandMapping: CommandMap; + public navigation: dxCommand[]; + public navigationManager: StackBasedNavigationManager; + public beforeViewSetup: JQueryCallback; + public afterViewSetup: JQueryCallback; + public viewShowing: JQueryCallback; + public viewShown: JQueryCallback; + public viewHidden: JQueryCallback; + public viewDisposing: JQueryCallback; + public viewDisposed: JQueryCallback; + public navigating: JQueryCallback; + public navigatingBack: JQueryCallback; + constructor(options?: ApplicationOptions); + init(): any; + navigate(uri?: any, options?: { + root?: boolean; + target?: string; + direction?: string; + }): void; + back(): void; + canBack(): boolean; + saveState(): void; + clearState(): void; + restoreState(): void; + } + export function createActionExecutors(app: Application): { + [key: string]: { execute(e: any): void; } + }; +} +declare module DevExpress.framework.html { +export interface ILayoutController { + viewReleased: JQueryCallback; + init(options: InitLayoutControllerOptions): void; + activate(): void; + deactivate(): void; + showView(viewInfo: any, direction?: string): JQueryPromise; + } + export interface ILayoutControllerRegistration extends IDevice { + name: string; + controller: ILayoutController; + root?: boolean; + } + export var layoutControllers: Array; + export var layoutSets: Object; + export interface InitLayoutControllerOptions { + $viewPort?: JQuery; + $hiddenBag?: JQuery; + navigationManager?: framework.StackBasedNavigationManager; + } + export class DefaultLayoutController implements ILayoutController { + public viewReleased: JQueryCallback; + constructor(options?: { layoutTemplateName: string }); + init(options: InitLayoutControllerOptions): void; + activate(): void; + deactivate(): void; + showView(viewInfo: any, direction?: string): JQueryPromise; + } + export interface CommandManagerOptions { + globalCommands?: framework.dxCommand[]; + commandMapping?: framework.CommandMapping; + } + export class CommandManager { + public globalCommands: framework.dxCommand[]; + public commandMapping: framework.CommandMapping; + constructor(options?: CommandManagerOptions); + layoutCommands($markup: JQuery, extraCommands?: any): void; } + export interface ITemplateEngine { + applyTemplate(template: string, model: any): void; + applyTemplate(template: Element, model: any): void; + applyTemplate(template: JQuery, model: any): void; + } + export class KnockoutJSTemplateEngine implements ITemplateEngine { + constructor(); + applyTemplate(template: string, model: any): void; + applyTemplate(template: Element, model: any): void; + applyTemplate(template: JQuery, model: any): void; + } + export interface TransitionExecutorOptions { + type?: string; + source?: JQuery; + destination?: JQuery; + } + export class TransitionExecutor { + public container: JQuery; + constructor(container: JQuery, options: TransitionExecutorOptions); + finalize(): void; + exec(): JQueryPromise; + static create(container: JQuery, options: TransitionExecutorOptions): TransitionExecutor; + } + export interface ViewEngineOptions { + $root?: JQuery; + device?: IDevice; + commandManager?: CommandManager; + templateEngine?: ITemplateEngine; + dataOptionsAttributeName?: string; + } + export class ViewEngineBase { + public $root: JQuery; + public device: IDevice; + public commandManager: CommandManager; + public templateEngine: ITemplateEngine; + public dataOptionsAttributeName: string; + public viewSelecting: JQueryCallback; + public modelFromViewDataExtended: JQueryCallback; + constructor(options?: ViewEngineOptions); + init(): JQueryPromise; + findViewTemplate(viewName: string): JQuery; + afterViewSetup(viewInfo: any): void; + } + export class ViewEngine extends ViewEngineBase { + public layoutSelecting: JQueryCallback; + constructor(options?: ViewEngineOptions); + init(): JQueryPromise; + findLayoutTemplate(layoutName: string): JQuery; + } + export interface HtmlApplicationOptions extends framework.ApplicationOptions { + commandManager?: CommandManager; + templateEngine?: ITemplateEngine; + navigateToRootViewMode?: string; + layoutControllers?: Array + device?: IDevice; + layoutSet?: Array; + } + export class HtmlApplication extends framework.Application { + public viewEngine: ViewEngineBase; + public viewRendered: JQueryCallback; + public resolveLayoutController: JQueryCallback; + constructor(options?: HtmlApplicationOptions); + init(): any; + viewPort(): JQuery; + } +} +declare module DevExpress.ui { + interface ViewportOptions { + allowPan?: boolean; + allowZoom?: boolean; + } + export interface ITemplate { + compile(html: string): any; + render(template: JQuery, data: any): any; + render(template: any, data: any): any; + } + class Template { + constructor(element: HTMLElement); + constructor(element: JQueryStatic); + render(container: HTMLElement): any; + render(container: JQueryStatic): any; + dispose(): void; + } + interface TemplateStatic { + new (element: HTMLElement): Template; + new (element: JQueryStatic): Template; + } + class TemplateProvider { + constructor(); + getTemplateClass(widget: any): TemplateStatic; + getDefaultTemplate(widget: any): void; supportDefaultTemplate(): boolean; + } + export function initViewport(options: ViewportOptions): void; + interface NotifyOptions { + message: string; + type?: string; + displayTime?: number; + hiddenAction: () => any; + } + export function notyfy(options: any): void; + export function notify(message: string, type?: string, displayTime?: number): void; + export module dialog { + interface Dialog { + show(): JQueryPromise; + hide(value?: any): void; + } + interface DialogButton { + text: string; + icon: string; + clickAction: () => any; + } + interface DialogOptions { + message: string; + title?: string; + } + export function custom(options: DialogOptions): Dialog; + export function custom(message: string, title?: string): Dialog; + export function alert(options: DialogOptions): JQueryPromise; + export function alert(message: string, title?: string): JQueryPromise; + export function confirm(options: DialogOptions): JQueryPromise; + export function confirm(message: string, title?: string): JQueryPromise; + } +export interface CollectionContainerWidgetOptions extends WidgetOptions { + items?: Array; + itemTemplate?: any; + itemRender?: Function; + itemClickAction?: any; + itemRenderedAction?: any; + noDataText?: string; + dataSource?: data.DataSource; + selectedIndex?: number; + itemSelectAction?: any; + itemHoldAction?: any; + itemHoldTimeout?: number; + } + export class CollectionContainerWidget extends Widget { + constructor(element: Element, options?: CollectionContainerWidgetOptions); + constructor(element: JQuery, options?: CollectionContainerWidgetOptions); + } +export interface WidgetOptions extends ComponentOptions { + contentReadyAction?: any; + width?: any; + height?: any; + visible?: boolean; + activeStateEnabled?: boolean; + } + export class Widget extends Component { + constructor(element: Element, options?: WidgetOptions); + constructor(element: JQuery, options?: WidgetOptions); + init(): void; + repaint(): void; + addTemplate(template: ITemplate): void; + } +export interface dxEditorOptions extends WidgetOptions { + value?: any; + valueChangeAction?: any; + } + export class dxEditor extends Widget { + constructor(element: Element, options?: dxEditorOptions); + constructor(element: JQuery, options?: dxEditorOptions); + } +export interface dxAutocompleteOptions extends dxDropDownEditorOptions { + minSearchLength?: number; + searchTimeout?: number; + placeholder?: string; + filterOperator?: string; + displayExpr?: string; + searchMode?: string; + dataSource?: data.DataSource; + items?: Array; + itemRender?: Function; + itemTemplate?: any; + } + export class dxAutocomplete extends dxDropDownEditor { + constructor(element: Element, options?: dxAutocompleteOptions); + constructor(element: JQuery, options?: dxAutocompleteOptions); + } +export interface dxButtonOptions extends WidgetOptions { + type?: string; + text?: string; + icon?: string; + iconSrc?: string; + } + export class dxButton extends Widget { + constructor(element: Element, options?: dxButtonOptions); + constructor(element: JQuery, options?: dxButtonOptions); + } +export interface dxCheckBoxOptions extends dxEditorOptions { } + export class dxCheckBox extends dxEditor { + constructor(element: Element, options?: dxCheckBoxOptions); + constructor(element: JQuery, options?: dxCheckBoxOptions); + } +export interface dxCalendarOptions extends dxEditorOptions { + value?: Date; + min?: Date; + max?: Date; + firstDayOfWeek?: number; + } + export class dxCalendar extends dxEditor { + constructor(element: Element, options?: dxEditorOptions); + constructor(element: JQuery, options?: dxEditorOptions); + } +export interface dxDateBoxOptions extends dxTextEditorOptions { + format?: string; + useNativePicker?: boolean; + value?: Date; + type?: string; + min?: Date; + max?: Date; + useCalendar?: boolean; + formatString?: string; + closeOnValueChange?: boolean; + calendarOptions?: Object; + } + export class dxDateBox extends dxTextEditor { + constructor(element: Element, options?: dxDateBoxOptions); + constructor(element: JQuery, options?: dxDateBoxOptions); + } +export interface dxTextEditorOptions extends dxEditorOptions { + valueChangeEvent?: string; + placeholder?: string; + readOnly?: boolean; + focusInAction?: any; + focusOutAction?: any; + keyDownAction?: any; + keyPressAction?: any; + keyUpAction?: any; + changeAction?: any; + enterKeyAction?: any; + copyAction?: any; + pasteAction?: any; + cutAction?: any; + inputAction?: any; + showClearButton?: boolean; + mode?: string; + } + export class dxTextEditor extends dxEditor { + constructor(element: Element, options?: dxTextEditorOptions); + constructor(element: JQuery, options?: dxTextEditorOptions); + focus(): void; + blur(): void; + } +export interface dxListOptions extends CollectionContainerWidgetOptions { + pullRefreshEnabled?: boolean; + autoPagingEnabled?: boolean; + scrollingEnabled?: boolean; + showScrollbar?: boolean; + useNativeScrolling?: boolean; + grouped?: boolean; + editEnabled?: boolean; + showNextButton?: boolean; + groupTemplate?: string; + pullingDownText?: string; + pulledDownText?: string; + refreshingText?: string; + pageLoadingText?: string; + scrollAction?: any; + pullRefreshAction?: any; + pageLoadingAction?: any; + itemHoldAction?: any; + itemSwipeAction?: any; + itemHoldTimeout?: number; + groupRender? (groupData: any, groupIndex: number, groupElement: Element): any; + editConfig?: { + itemTemplate?: any; + itemRenderer? (itemData: any, itemIndex: number, itemElement: Element): any; + menuType?: string; + menuItems?: any[]; + deleteEnabled?: boolean; + deleteMode?: string; + selectionEnabled?: boolean; + selectionMode?: string; + selectionType?: string; + reorderEnabled?: boolean; + } + itemDeleteAction?: any; + selectedItems?: any[]; + itemSelectAction?: any; + itemUnselectAction?: any; + itemReorderAction?: any; + nextButtonText?: string; + selectionMode?: string; + } + export class dxList extends CollectionContainerWidget { + constructor(element: Element, options?: dxListOptions); + constructor(element: JQuery, options?: dxListOptions); + update(): JQueryPromise; + updateDimensions(): JQueryPromise; + refresh(): JQueryPromise; + reload(): JQueryPromise; + deleteItem(itemElement: JQuery): JQueryPromise; + deleteItem(itemElement: Element): JQueryPromise; + clearSelectedItems() : void; + isItemSelected(itemElement: JQuery): boolean; + isItemSelected(itemElement: Element): boolean; + selectItem(itemElement: JQuery): void; + selectItem(itemElement: Element): void; + unselectItem(itemElement: JQuery): void; + unselectItem(itemElement: Element): void; + reorderItem(itemElement: JQuery, toItemElement: JQuery): JQueryPromise; + reorderItem(itemElement: Element, toItemElement: Element): JQueryPromise; + getSelectedItems(): number[]; + clientHeight(): number; + scrollHeight(): number; + scrollBy(distance: number): void; + scrollTo(targetLocation: number): void; + scrollTop(): number; + } +export interface dxLoadPanelOptions extends dxOverlayOptions { + message?: string; + width?: number; + height?: number; + delay?: number; + showPane?: boolean; + showIndicator?: boolean; + indicatorSrc?: string; + } + export class dxLoadPanel extends dxOverlay { + constructor(element: Element, options?: dxLoadPanelOptions); + constructor(element: JQuery, options?: dxLoadPanelOptions); + hide(): void; + show(): void; + toggle(showing: boolean): void; + } +export interface dxLookupOptions extends dxEditorOptions { + dataSource?: data.DataSource; + displayValue?: string; + title?: string; + titleTemplate?: any; + valueExpr?: string; + displayExpr?: string; + placeholder?: string; + searchPlaceholder?: string; + searchEnabled?: boolean; + searchTimeout?: number; + minFilterLength?: number; + fullScreen?: boolean; + itemTemplate?: any; + itemRender?: Function; + showCancelButton?: boolean; + showClearButton?: boolean; + showDoneButton?: boolean; + showNextButton?: boolean; + doneButtonText?: string; + cancelButtonText?: string; + clearButtonText?: string; + nextButtonText?: string; + grouped?: boolean; + groupRender?: Function; + groupTemplate?: string; + pullingDownText?: string; + pulledDownText?: string; + refreshingText?: string; + pageLoadingText?: string; + noDataText?: string; + scrollAction?: any; + shading?: boolean; + closeOnOutsideClick?: boolean; + position?: any; + animation?: any; + shownAction?: any; + hiddenAction?: any; + popupWidth?: any; + popupHeight?: any; + autoPagingEnabled?: boolean; + useNativeScrolling?: boolean; + usePopover?: boolean; + openAction?: any; + closeAction?: any; + } + export class dxLookup extends dxEditor { + constructor(element: Element, options?: dxLookupOptions); + constructor(element: JQuery, options?: dxLookupOptions); + close(): void; + open(): void; + } +export interface dxMapOptions extends WidgetOptions { + location?: any; + width?: number; + height?: number; + zoom?: number; + mapType?: string; + provider?: string; + markers?: Array; + routes?: Array; + key?: string; + controls?: any; + mapReadyAction?: any; + autoAdjust?: boolean; + center?: any; + markerAddedAction?: any; + markerRemovedAction?: any; + markerIconSrc?: string; + routeAddedAction?: any; + routeRemovedAction?: any; + type?: string; + } + export class dxMap extends Widget { + constructor(element: Element, options?: dxMapOptions); + constructor(element: JQuery, options?: dxMapOptions); + addMarker(markerOptions: any, callback: Function): JQueryPromise; + removeMarker(marker: any): void; + addRoute(routeOptions: any, callback: Function): JQueryPromise; + removeRoute(route: any): void; + } +export interface dxNavBarOptions extends dxTabsOptions { } + export class dxNavBar extends dxTabs { + constructor(element: Element, options?: dxNavBarOptions); + constructor(element: JQuery, options?: dxNavBarOptions); + } +export interface dxNumberBoxOptions extends dxTextEditorOptions { + min?: number; + max?: number; + value?: number; + step?: number; + showSpinButtons?: boolean; + } + export class dxNumberBox extends dxTextEditor { + constructor(element: Element, options?: dxNumberBoxOptions); + constructor(element: JQuery, options?: dxNumberBoxOptions); + } +export interface dxOverlayOptions extends WidgetOptions { + activeStateEnabled?: boolean; + shading?: boolean; + closeOnOutsideClick?: boolean; + position?: any; + animation?: any; + showingAction?: any; + shownAction?: any; + hidingAction?: any; + hiddenAction?: any; + deferRendering?: boolean; + targetContainer?: any; + contentTemplate?: any; + } + export class dxOverlay extends Widget { + constructor(element: Element, options?: dxOverlayOptions); + constructor(element: JQuery, options?: dxOverlayOptions); + content(): JQuery; + hide(): void; + show(): void; + toggle(showing: boolean): void; + } +export interface dxPopupOptions extends dxOverlayOptions { + title?: string; + showTitle?: boolean; + fullScreen?: boolean; + cancelButton?: any; + doneButton?: any; + clearButton?: any; + titleTemplate?: any; + dragEnabled?: boolean; + } + export class dxPopup extends dxOverlay { + constructor(element: Element, options?: dxPopupOptions); + constructor(element: JQuery, options?: dxPopupOptions); + } +export interface dxPopoverOptions extends dxPopupOptions { + target?: any; + } + export class dxPopover extends dxPopup { + constructor(element: Element, options?: dxPopoverOptions); + constructor(element: JQuery, options?: dxPopoverOptions); + } +export interface dxTooltipOptions extends dxPopoverOptions { + target?: any; + } + export class dxTooltip extends dxPopover { + constructor(element: Element, options?: dxTooltipOptions); + constructor(element: JQuery, options?: dxTooltipOptions); + } +export interface dxRadioGroupOptions extends CollectionContainerWidgetOptions { + layout?: string; + name?: string; + value?: Object; + valueExpr?: string; + } + export class dxRadioGroup extends CollectionContainerWidget { + constructor(element: Element, options?: dxRadioGroupOptions); + constructor(element: JQuery, options?: dxRadioGroupOptions); + } +export interface dxRangeSliderOptions extends dxSliderOptions { + start?: number; + end?: number; + } + export class dxRangeSlider extends dxSlider { + constructor(element: Element, options?: dxRangeSliderOptions); + constructor(element: JQuery, options?: dxRangeSliderOptions); + } +export interface dxScrollableOptions extends ComponentOptions { + startAction?: any; + scrollAction?: any; + endAction?: any; + stopAction?: any; + inertiaAction?: any; + bounceAction?: any; + updateAction?: any; + bounceEnabled?: boolean; + direction?: string; + showScrollbar?: boolean; + useNative?: boolean; + } + export class dxScrollable extends Component { + constructor(element: Element, options?: dxScrollableOptions); + constructor(element: JQuery, options?: dxScrollableOptions); + update(): void; + content(): JQuery; + clientHeight(): number; + scrollHeight(): number; + clientWidth(): number; + scrollWidth(): number; + scrollLeft(): number; + scrollTop(): number; + scrollOffset(): Object; + scrollBy(distance: number): void; + scrollBy(distance: Object): void; + scrollTo(targetLocation: number): void; + scrollTo(targetLocation: Object): void; + } +export interface dxScrollViewOptions extends dxScrollableOptions { + pullingDownText?: string; + pulledDownText?: string; + refreshingText?: string; + reachBottomText?: string; + pullDownAction?: any; + reachBottomAction?: any; + } + export class dxScrollView extends dxScrollable { + constructor(element: Element, options?: dxScrollViewOptions); + constructor(element: JQuery, options?: dxScrollViewOptions); + release(preventReachBottom: boolean): JQueryPromise; + toggleLoading(showOrHide: boolean): void; + refresh(): void; + } +export interface dxSelectBoxOptions extends dxAutocompleteOptions { + fieldTemplate?: any; + displayValue?: string; + multiSelectEnabled?: boolean; + values?: any[]; + openAction?: any; + closeAction?: any; + } + export class dxSelectBox extends dxAutocomplete { + constructor(element: Element, options?: dxSelectBoxOptions); + constructor(element: JQuery, options?: dxSelectBoxOptions); + } +export interface dxSliderOptions extends dxEditorOptions { + min?: number; + max?: number; + step?: number; + showRange?: boolean; + label?: { + visible: boolean; + format?: any; + position?: string; + } + tooltip?: { + enabled?: boolean; + format?: any; + position?: string; + showMode?: string; + } + } + export class dxSlider extends dxEditor { + constructor(element: Element, options?: dxSliderOptions); + constructor(element: JQuery, options?: dxSliderOptions); + } +export interface dxTabsOptions extends CollectionContainerWidgetOptions { } + export class dxTabs extends CollectionContainerWidget { + constructor(element: Element, options?: dxTabsOptions); + constructor(element: JQuery, options?: dxTabsOptions); + } +export interface dxTextAreaOptions extends dxTextEditorOptions { + cols?: number; + rows?: number; + } + export class dxTextArea extends dxTextEditor { + constructor(element: Element, options?: dxTextAreaOptions); + constructor(element: JQuery, options?: dxTextAreaOptions); + } +export interface dxTextBoxOptions extends dxTextEditorOptions { + maxLength?: any; + } + export class dxTextBox extends dxTextEditor { + constructor(element: Element, options?: dxTextBoxOptions); + constructor(element: JQuery, options?: dxTextBoxOptions); + } +export interface dxToastOptions extends dxOverlayOptions { + message?: string; + type?: string; + displayTime?: number; + } + export class dxToast extends dxOverlay { + constructor(element: Element, options?: dxToastOptions); + constructor(element: JQuery, options?: dxToastOptions); + } +export interface dxToolbarOptions extends CollectionContainerWidgetOptions { + menuItemRender?: Function; + menuItemTemplate?: any; + submenuType?: string; + renderAs?: string; + } + export class dxToolbar extends CollectionContainerWidget { + constructor(element: Element, options?: dxToolbarOptions); + constructor(element: JQuery, options?: dxToolbarOptions); + } +export interface dxDropDownEditorOptions extends dxTextBoxOptions { + closeAction?: any; + openAction?: any; + } + export class dxDropDownEditor extends dxTextBox { + constructor(element: Element, options?: dxDropDownEditorOptions); + constructor(element: JQuery, options?: dxDropDownEditorOptions); + } +export interface dxLoadIndicatorOptions extends WidgetOptions { + indicatorSrc?: string; + } + export class dxLoadIndicator extends Widget { + constructor(element: Element, options?: dxLoadIndicatorOptions); + constructor(element: JQuery, options?: dxLoadIndicatorOptions); + } +export interface dxMultiViewOptions extends CollectionContainerWidgetOptions { + loop?: boolean; + swipeEnabled?: boolean; + animationEnabled?: boolean; + selectedIndex?: number; + } + export class dxMultiView extends CollectionContainerWidget { + constructor(element: Element, options?: dxMultiViewOptions); + constructor(element: JQuery, options?: dxMultiViewOptions); + } +export interface dxGalleryOptions extends CollectionContainerWidgetOptions { + activeStateEnabled?: boolean; + animationDuration?: number; + loop?: boolean; + swipeEnabled?: boolean; + indicatorEnabled?: boolean; + showIndicator?: boolean; + selectedIndex?: number; + slideshowDelay?: number; + showNavButtons?: boolean; + } + export class dxGallery extends CollectionContainerWidget { + constructor(element: Element, options?: dxGalleryOptions); + constructor(element: JQuery, options?: dxGalleryOptions); + goToItem(itemIndex?: number, animation?: boolean): JQueryPromise; + prevItem(animation?: boolean): JQueryPromise; + nextItem(animation?: boolean): JQueryPromise; + } +export interface dxActionSheetOptions extends CollectionContainerWidgetOptions { + usePopover?: boolean; + target?: any; + title?: string; + showTitle?: boolean; + cancelText?: string; + noDataText?: string; + cancelClickAction?: any; + showCancelButton?: boolean; + } + export class dxActionSheet extends CollectionContainerWidget { + constructor(element: Element, options?: dxActionSheetOptions); + constructor(element: JQuery, options?: dxActionSheetOptions); + toggle(): void; + show(): void; + hide(): void; + } +export interface dxDropDownMenuOptions extends WidgetOptions { + items?: Array; + itemClickAction?: any; + dataSource?: data.DataSource; + itemTemplate?: any; + itemRender?: Function; + buttonText?: string; + buttonIcon?: string; + buttonIconSrc?: string; + buttonClickAction?: any; + usePopover?: boolean; + } + export class dxDropDownMenu extends Widget { + constructor(element: Element, options?: dxDropDownMenuOptions); + constructor(element: JQuery, options?: dxDropDownMenuOptions); + } +export interface dxPanoramaOptions extends CollectionContainerWidgetOptions { + title?: string; + backgroundImage?: any; + } + export class dxPanorama extends CollectionContainerWidget { + constructor(element: Element, options?: dxPanoramaOptions); + constructor(element: JQuery, options?: dxPanoramaOptions); + } +export interface dxPivotOptions extends CollectionContainerWidgetOptions { } + export class dxPivot extends CollectionContainerWidget { + constructor(element: Element, options?: dxPivotOptions); + constructor(element: JQuery, options?: dxPivotOptions); + } +export interface dxSwitchOptions extends dxEditorOptions { + onText?: string; + offText?: string; + } + export class dxSwitch extends dxEditor { + constructor(element: Element, options?: dxSwitchOptions); + constructor(element: JQuery, options?: dxSwitchOptions); + } +export interface dxTileViewOptions extends CollectionContainerWidgetOptions { + bounceEnabled?: boolean; + showScrollbar?: boolean; + listHeight?: number; + baseItemWidth?: number; + baseItemHeight?: number; + itemMargin?: number; + } + export class dxTileView extends CollectionContainerWidget { + constructor(element: Element, options?: dxTileViewOptions); + constructor(element: JQuery, options?: dxTileViewOptions); + } +export interface dxSlideOutOptions extends CollectionContainerWidgetOptions { + activeStateEnabled?: boolean; + menuItemRender? (itemData: any, itemIndex: number, itemElement: Element): any; + menuItemTemplate?: any; + swipeEnabled?: boolean; + menuVisible?: boolean; + menuGrouped?: boolean; + menuGroupRender? (groupData: any, groupIndex: number, groupElement: Element): any; + menuGroupTemplate?: any; + } + export class dxSlideOut extends CollectionContainerWidget { + constructor(element: Element, options?: dxSlideOutOptions); + constructor(element: JQuery, options?: dxSlideOutOptions); + showMenu(): JQueryPromise; + hideMenu(): JQueryPromise; + toggleMenuVisibility(showing?: boolean): JQueryPromise; + } +} +interface JQuery { +dxAutocomplete(options?: DevExpress.ui.dxAutocompleteOptions): JQuery; +dxButton(options?: DevExpress.ui.dxButtonOptions): JQuery; +dxCheckBox(options?: DevExpress.ui.dxCheckBoxOptions): JQuery; +dxCalendar(options?: DevExpress.ui.dxCalendarOptions): JQuery; +dxDateBox(options?: DevExpress.ui.dxDateBoxOptions): JQuery; +dxTextEditor(options?: DevExpress.ui.dxTextEditorOptions): JQuery; +dxList(options?: DevExpress.ui.dxListOptions): JQuery; +dxLoadPanel(options?: DevExpress.ui.dxLoadPanelOptions): JQuery; +dxLookup(options?: DevExpress.ui.dxLookupOptions): JQuery; +dxMap(options?: DevExpress.ui.dxMapOptions): JQuery; +dxNavBar(options?: DevExpress.ui.dxNavBarOptions): JQuery; +dxNumberBox(options?: DevExpress.ui.dxNumberBoxOptions): JQuery; +dxOverlay(options?: DevExpress.ui.dxOverlayOptions): JQuery; +dxPopup(options?: DevExpress.ui.dxPopupOptions): JQuery; +dxPopover(options?: DevExpress.ui.dxPopoverOptions): JQuery; +dxTooltip(options?: DevExpress.ui.dxTooltipOptions): JQuery; +dxRadioGroup(options?: DevExpress.ui.dxRadioGroupOptions): JQuery; +dxRangeSlider(options?: DevExpress.ui.dxRangeSliderOptions): JQuery; +dxScrollable(options?: DevExpress.ui.dxScrollableOptions): JQuery; +dxScrollView(options?: DevExpress.ui.dxScrollViewOptions): JQuery; +dxSelectBox(options?: DevExpress.ui.dxSelectBoxOptions): JQuery; +dxSlider(options?: DevExpress.ui.dxSliderOptions): JQuery; +dxTabs(options?: DevExpress.ui.dxTabsOptions): JQuery; +dxTextArea(options?: DevExpress.ui.dxTextAreaOptions): JQuery; +dxTextBox(options?: DevExpress.ui.dxTextBoxOptions): JQuery; +dxToast(options?: DevExpress.ui.dxToastOptions): JQuery; +dxToolbar(options?: DevExpress.ui.dxToolbarOptions): JQuery; +dxDropDownEditor(options?: DevExpress.ui.dxDropDownEditorOptions): JQuery; +dxLoadIndicator(options?: DevExpress.ui.dxLoadIndicatorOptions): JQuery; +dxMultiView(options?: DevExpress.ui.dxMultiViewOptions): JQuery; +dxGallery(options?: DevExpress.ui.dxGalleryOptions): JQuery; +dxActionSheet(options?: DevExpress.ui.dxActionSheetOptions): JQuery; +dxDropDownMenu(options?: DevExpress.ui.dxDropDownMenuOptions): JQuery; +dxPanorama(options?: DevExpress.ui.dxPanoramaOptions): JQuery; +dxPivot(options?: DevExpress.ui.dxPivotOptions): JQuery; +dxSwitch(options?: DevExpress.ui.dxSwitchOptions): JQuery; +dxTileView(options?: DevExpress.ui.dxTileViewOptions): JQuery; +dxSlideOut(options?: DevExpress.ui.dxSlideOutOptions): JQuery; +} \ No newline at end of file diff --git a/devextreme/dx.webappjs-tests.ts b/devextreme/dx.webappjs-tests.ts new file mode 100644 index 000000000..14b249e35 --- /dev/null +++ b/devextreme/dx.webappjs-tests.ts @@ -0,0 +1,93 @@ +/// + +module Test { + $('
').appendTo(document.body) + .dxDataGrid({ + allowColumnResizing: true, + allowColumnReordering: true, + cellClick: (clickedCell: Object) => { }, + rowClick: (clickedRow: Object) => { }, + columnChooser: { + enabled: true, + height: 180, + width: 400, + emptyPanelText: 'A place to hide the columns' + }, + columnAutoWidth: true, + columns: [ + 'author', 'title', 'year', 'genre', 'format', + { dataField: 'price', visible: false }, + { dataField: 'length', visible: false } + ], + dataSource: new DevExpress.data.DataSource({ + store: { + type: 'array', + data: [ + { id: 1, title: "The Catcher in the Rye", author: "J. D. Salinger", year: 1951, genre: "Bildungsroman", format: "paperback" }, + { id: 2, title: "The Hitchhiker's Guide to the Galaxy", author: "D. Adams", year: 1979, genre: "Comedy, sci-fi", format: "hardcover" }, + { id: 3, title: "Fahrenheit 451", author: "R. Bradbury", year: 1953, genre: "Dystopian novel", format: "paperback" }, + { id: 4, title: "Nineteen Eighty-Four", author: "G. Orwell", year: 1949, genre: "Dystopian novel, political fiction", format: "hardcover" }, + { id: 5, title: "Crime and Punishment", author: "F. Dostoyevsky", year: 1866, genre: "Philosophical novel", format: "paperback" } + ], + key: "id" + } + }), + customizeColumns: (columns: Array) => { }, + dataErrorOccurred: (error: Error) => { }, + disabled: false, + editing: { + editMode: 'batch', + editEnabled: true, + insertEnabled: true, + removeEnabled: true + }, + filterRow: { + visible: true, + showOperationChooser: false + }, + groupPanel: { + visible: true + }, + grouping: { + autoExpandAll: false + }, + height: () => { + return 200; + }, + hoverStateEnabled: true, + loadPanel: { + height: 150, + width: 400, + text: 'Data is loading...' + }, + noDataText: "It isn't the data you're looking for", + pager: { + showPageSizeSelector: true, + allowedPageSizes: [3, 5, 8] + }, + paging: { + pageSize: 8, + pageIndex: 19 + }, + rowAlternationEnabled: true, + rowPrepared: (rowElement: JQuery, rowInfo: Object) => { }, + rtlEnabled: false, + scrolling: { mode: 'infinite' }, + searchPanel: { + visible: true, + width: 250 + }, + selectedRowKeys: [1, 2, 4], + selection: { + mode: 'multiple', + allowSelectAll: false + }, + showColumnHeaders: true, + showColumnLines: true, + showRowLines: true, + sorting: { mode: 'multiple' }, + visible: true, + width: () => { return 400; }, + wordWrapEnabled: true + }); +} \ No newline at end of file diff --git a/devextreme/dx.webappjs.d.ts b/devextreme/dx.webappjs.d.ts new file mode 100644 index 000000000..956b1cbef --- /dev/null +++ b/devextreme/dx.webappjs.d.ts @@ -0,0 +1,1597 @@ +// Type definitions for WebAppJS +// Project: http://js.devexpress.com/WebDevelopment/ +// Definitions by: DevExpress Inc. +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module DevExpress { +export function abstract(): void; + export var rtlEnabled: boolean; + export var hardwareBackButton: JQueryCallback; + interface Endpoint { + local?: string; + production: string; + } + class EndpointSelector { + constructor(config: { [key: string]: Endpoint }); + urlFor(key: string): string; + } + export interface ActionOptions { + context?: Object; + component?: any; + beforeExecute? (e:ActionExecuteArgs): void; + afterExecute? (e:ActionExecuteArgs): void; + } + export interface ActionExecuteArgs { + action: any; + args: any[]; + context: any; + component: any; + cancel: boolean; + handled: boolean; + } + export class Action { + constructor(action?: any, config?: ActionOptions); + execute(): any; + } + export interface IDevice { + deviceType?: string; + platform?: string; + version?: Array; + phone?: boolean; + tablet?: boolean; + android?: boolean; + ios?: boolean; + win8?: boolean; + tizen?: boolean; + generic?: boolean; + } + export module devices { + export function orientation(): string; + export var orientationChanged: JQueryCallback; + export function real(): IDevice; + export function current(deviceOrName: string): IDevice; + export function current(deviceOrName: IDevice): IDevice; + } + export function registerComponent(name: string, componentClass: any): void; + export interface ComponentOptions { + disabled?: boolean; + } + export class Component { + constructor(element: Element, options?: ComponentOptions); + constructor(element: JQuery, options?: ComponentOptions); + disposing: JQueryCallback; + optionChanged: JQueryCallback; + instance(): Component; + beginUpdate(): void; + endUpdate(): void; + option(): any; + option(options: string): any; + option(options: string): T; + option(options: string, value: any): void; + option(options: { [key: string]: any }): void; + option(options?: any): any; + } + export interface DOMComponentOptions extends ComponentOptions { + rtlEnabled?: boolean; + } + export class DOMComponent extends Component { + constructor(element: HTMLElement, options?: DOMComponentOptions); + static defaultOptions(rule: { + device: any; + options: { [key: string]: any }; + }): void; + } +} +declare module DevExpress.data { +export interface DataError extends Error { + httpStatus?: number; + errorDetails?: any; + } + export interface ErrorHandler { (e: DataError): void; } + export interface EntityOptions { key: any; keyType: any; } + export interface Getter { (obj: any, options?: any): any; } + export interface Setter { (obj: any, value: any, options?: any): void; } + export interface QueryOptions { + errorHandler?: ErrorHandler; + requireTotalCount?: boolean; + } + export interface ODataQueryOptions extends QueryOptions { + adapter?: any; + } + interface IQuery { + enumerate(): JQueryPromise>; + count(): JQueryPromise; + slice(skip: number, take?: number): IQuery; + sortBy(field: string): IQuery; + sortBy(field: Getter): IQuery; + sortBy(field: { field: string; desc?: boolean }): IQuery; + sortBy(field: { field: Getter; desc?: boolean }): IQuery; + thenBy(field: string): IQuery; + thenBy(field: Getter): IQuery; + thenBy(field: { field: string; desc?: boolean }): IQuery; + thenBy(field: { field: Getter; desc?: boolean }): IQuery; + filter(field: string, operator: string, value: any): IQuery; + filter(field: string, value: any): IQuery; + filter(criteria: any[]): IQuery; + select(field: string): IQuery; + select(field: string[]): IQuery; + select(...field: string[]): IQuery; + select(field: Getter): IQuery; + select(field: Getter[]): IQuery; + select(...field: Getter[]): IQuery; + groupBy(field: string[]): IQuery; + groupBy(field: Getter[]): IQuery; + groupBy(field: { field: string; desc?: boolean }[]): IQuery; + groupBy(field: { field: Getter; desc?: boolean }[]): IQuery; + sum(getter?: string): JQueryPromise; + min(getter?: string): JQueryPromise; + max(getter?: string): JQueryPromise; + avg(getter?: string): JQueryPromise; + aggregate(step: number): JQueryPromise; + aggregate(seed: number, step: (accumulator: any, current: any) => any, finalize?: (accumulator: any) => any): JQueryPromise; + } + export interface ArrayQuery extends IQuery { + toArray(): Array; + } + export interface RemoteQuery extends IQuery { /*todo: exec() ? */ } + export function base64_encode(input: string): string; + export function base64_encode(input: any[]): string; + export function query(items?: any[]): IQuery; + export var queryImpl: { + remote: (url: string, queryOptions: QueryOptions) => RemoteQuery; + array: (iter: Array, queryOptions: QueryOptions) => ArrayQuery; + }; + export class Guid { + constructor(value?: string); + constructor(value?: any); + toString(): string; + valueOf(): string; + toJSON(): string; + } + export class EdmLiteral { + constructor(value: any); + valueOf(): any; + } + export module utils { + export function normalizeSortingInfo(info: string): Array<{ selector: string; desc?: boolean }>; + export function normalizeSortingInfo(info: string[]): Array<{ selector: string; desc?: boolean }>; + export function normalizeSortingInfo(info: Getter): Array<{ selector: string; desc?: boolean }>; + export function normalizeSortingInfo(info: Getter[]): Array<{ selector: string; desc?: boolean }>; + export function normalizeSortingInfo(info: { field: string; dir?: string }): Array<{ selector: string; desc?: boolean }>; + export function normalizeSortingInfo(info: { field: string; dir?: string }[]): Array<{ selector: string; desc?: boolean }>; + export function normalizeSortingInfo(info: { field: string; desc?: boolean }): Array<{ selector: string; desc?: boolean }>; + export function normalizeSortingInfo(info: { field: string; desc?: boolean }[]): Array<{ selector: string; desc?: boolean }>; + export function normalizeSortingInfo(info: { selector: string; dir?: string }): Array<{ selector: string; desc?: boolean }>; + export function normalizeSortingInfo(info: { selector: string; dir?: string }[]): Array<{ selector: string; desc?: boolean }>; + export function normalizeSortingInfo(info: { selector: string; desc?: boolean }): Array<{ selector: string; desc?: boolean }>; + export function normalizeSortingInfo(info: { selector: string; desc?: boolean }[]): Array<{ selector: string; desc?: boolean }>; + export function normalizeBinaryCriterion(criteria: Array): Array; + export function keysEqual(key1: any, key2: any): boolean; + export function keysEqual(keyExpr: any, key1: any, key2: any): boolean; + export function toComparable(value: Date, caseSensitive?: boolean): number; + export function toComparable(value: Guid, caseSensitive?: boolean): string; + export function toComparable(value: string, caseSensitive?: boolean): string; + export function compileGetter(): Getter; + export function compileGetter(expr: any[]): Getter; + export function compileGetter(expr: string): Getter; + export function compileGetter(expr: "this"): Getter; + export function compileGetter(expr: Getter): Getter; + export function compileSetter(expr: string): Setter; + export module odata { + export function sendRequest(request: JQueryXHR, requestOptions?: JQueryAjaxSettings): any; + export function serializePropName(propName: EdmLiteral): string; + export function serializePropName(propName: string): string; + export function serializeValue(value: Date): string; + export function serializeValue(value: Guid): string; + export function serializeValue(value: string): string; + export function serializeValue(value: "string"): string; + export function serializeValue(value: EdmLiteral): string; + export function serializeKey(key: any): string; + export function serializeKey(key: Date): string; + export function serializeKey(key: Guid): string; + export function serializeKey(key: string): string; + export function serializeKey(key: "string"): string; + export function serializeKey(key: EdmLiteral): string; + export var keyConverters: { + String(value: any): string; + Guid(value: any): Guid; + Int32(value: any): number; + Int64(value: any): EdmLiteral; + }; + } + } + export module queryAdapters { + export function odata(queryOptions: ODataQueryOptions): RemoteQuery; + } +export interface DataSourceOptions { + map? (item: any): any; + postProcess? (result: any[]): any; + pageSize: number; + paginate: boolean; + } + export class DataSource { + public changed: JQueryCallback; + public loadError: JQueryCallback; + public loadingChanged: JQueryCallback; + constructor(options?: Store); + constructor(options?: string); + constructor(options?: Array); + constructor(options?: { store: Store }); + constructor(options?: CustomStoreOptions); + constructor(options?: { store: Array }); + constructor(options?: { store: { type: string } }); + constructor(options?: { load(options?: LoadOptions): JQueryXHR; }); + constructor(options?: { load(options?: LoadOptions): Array; }); + constructor(options?: { load(options?: LoadOptions): JQueryPromise; }); + constructor(options?: DataSourceOptions); + loadOptions(): { [key: string]: any }; + items(): Array; + store(): data.Store; + isLastPage(): boolean; + pageIndex(newIndex?: number): number; + sort(expr: any[]): any[]; + group(expr: any[]): any[]; + filter(expr: any[]): any[]; + select(expr: string[]): string[]; + searchValue(value?: string): string; + searchOperation(op?: string): string; + searchExpr(selector: string): string; + key(): any; + isLoaded(): boolean; + isLoading(): boolean; + totalCount(): number; + load(): JQueryPromise; + dispose(): void; + } +export interface StoreOptions { + key?: any; + errorHandler?: ErrorHandler; + loaded?: (result: Array) => void; + loading?: (loadOptions: LoadOptions) => void; + modified?: () => void; + modifying?: () => void; + inserted?: (values: Object, key: any) => void; + inserting?: (values: Object) => void; + updated?: (key: any, values: Object) => void; + updating?: (key: any, values: Object) => void; + removed?: (key: any) => void; + removing?: (key: any) => void; + } + export interface LoadOptions extends QueryOptions { + skip?: number; + take?: number; + sort?: any; + select?: any; + filter?: any; + group?: any; + expand?: any; + } + export class Store { + loaded: JQueryCallback; + loading: JQueryCallback; + modified: JQueryCallback; + modifying: JQueryCallback; + inserted: JQueryCallback; + inserting: JQueryCallback; + updated: JQueryCallback; + updating: JQueryCallback; + removed: JQueryCallback; + removing: JQueryCallback; + constructor(options?: StoreOptions); + key(): any; + keyOf(obj: any): any; + load(options?: LoadOptions): JQueryPromise; + createQuery(options?: QueryOptions): IQuery; + totalCount(options?: { + filter?: any[]; + group?: string[]; + }): JQueryPromise; + byKey(key: any, extraOptions?: { + expand?: string[] + }): JQueryPromise; + remove(key: any): JQueryPromise; + insert(values: any): JQueryPromise; + update(key: any, values: any): JQueryPromise; + } + export interface CustomStoreOptions extends StoreOptions { + load? (options?: LoadOptions): any; + byKey? (key: any): any; + insert? (values: any): any; + update? (key: any, values: any): any; + remove? (key: any): any; + totalCount? (options?: { + filter?: any[]; + group?: string[]; + }): any; + } + export class CustomStore extends Store { + constructor(options?: CustomStoreOptions); + } + export interface ArrayStoreOptions extends StoreOptions { + data?: Array + } + export class ArrayStore extends Store { + constructor(options?: Array); + constructor(options?: ArrayStoreOptions); + } + export interface LocalStoreOptions extends ArrayStoreOptions { + name: string; + } + export class LocalStore extends ArrayStore { + constructor(options?: string); + constructor(options?: LocalStoreOptions); + clear(): void; + } + export interface ODataStoreOptions extends StoreOptions { + url?: string; + name?: string; + keyType?: string; + jsonp?: boolean; + withCredentials?: boolean; + } + export class ODataStore extends Store { + constructor(options?: ODataStoreOptions); + } + export interface ODataContextOptions { + url: string; + jsonp?: boolean; + withCredentials?: boolean; + errorHandler?: ErrorHandler; + beforeSend?: () => any; + entities?: { + [entityAlias: string]: ODataStoreOptions; + }; + } + export class ODataContext { + constructor(options?: ODataContextOptions); + get(operationName: string, params: { [key: string]: any }): JQueryPromise>; + invoke(operationName: string, params: { [key: string]: any }, httpMethod?: string): JQueryPromise>; + objectLink(entityAlias: string, key: any): { __metadata: { uri: string }; }; + } +} +declare module DevExpress.framework { +export interface dxViewOptions { + name: string; + title?: string; + layout?: string; + } + export class dxView extends Component { + constructor(options?: dxViewOptions); + } + export interface dxLayoutOptions { + name: string; + controller: string; + } + export class dxLayout extends Component { + constructor(options?: dxLayoutOptions); + } + export interface dxViewPlaceholderOptions { + viewName: string; + } + export class dxViewPlaceholder extends Component { + constructor(options?: dxLayoutOptions); + } + export interface dxTransitionOptions { + name: string; + type: string; + } + export class dxTransition extends Component { + constructor(options?: dxLayoutOptions); + } + export interface dxContentPlaceholderOptions { + name: string; + transition: string; + } + export class dxContentPlaceholder extends Component { + constructor(options?: dxLayoutOptions); + } + export interface dxContentOptions { + targetPlaceholder: string; + } + export class dxContent extends Component { + constructor(options?: dxLayoutOptions); + } + export interface dxCommandOptions extends ComponentOptions { + id: string; + action?: any; + icon?: string; + title?: string; + iconSrc?: string; + visible?: boolean; + } + export class dxCommand extends Component { + public beforeExecute: JQueryCallback; + public afterExecute: JQueryCallback; + constructor(element: JQuery, options?: dxCommandOptions); + constructor(element: Element, options?: dxCommandOptions); + execute(): void; + } + export class dxCommandContainer extends Component { + constructor(options: ComponentOptions); + constructor(element: JQuery, options?: ComponentOptions); + constructor(element: Element, options?: ComponentOptions); + } + export interface CommandMap { + [containerId: string]: { commands: any[]; defaults?: any; } + } + export class CommandMapping { + constructor(); + static defaultMapping: CommandMap; + mapCommands(containerId: string, commandMappings: any[]): CommandMapping; + unmapCommands(containerId: string, commandIds: string[]): void; + getCommandMappingForContainer(commandId: string, containerId: string): any; + load(config: CommandMap): CommandMapping; + } + interface IViewCache { + viewRemoved: JQueryCallback; + setView(key: string, viewInfo: any): void; + removeView(key: string): any; + hasView(viewInfo: any): boolean; + getView(key: string): any; + clear(): void; + } + export class ViewCache implements IViewCache { + viewRemoved: JQueryCallback; + constructor(); + setView(key: string, viewInfo: any): void; + removeView(key: string): any; + hasView(viewInfo: any): boolean; + getView(key: string): any; + clear(): void; + } + export class NullViewCache implements IViewCache { + viewRemoved: JQueryCallback; + constructor(); + setView(key: string, viewInfo: any): void; + removeView(key: string): any; + hasView(viewInfo: any): boolean; + getView(key: string): any; + clear(): void; + } + export class CapacityViewCacheDecorator implements IViewCache { + viewRemoved: JQueryCallback; + constructor(options: { + size: number; + viewCache: IViewCache; + }); + setView(key: string, viewInfo: any): void; + removeView(key: string): any; + hasView(viewInfo: any): boolean; + getView(key: string): any; + clear(): void; + } + export class ConditionalViewCacheDecorator implements IViewCache { + viewRemoved: JQueryCallback; + constructor(options: { + filter: (key: string, viewInfo: any) => boolean; + viewCache: IViewCache; + }); + setView(key: string, viewInfo: any): void; + removeView(key: string): any; + hasView(viewInfo: any): boolean; + getView(key: string): any; + clear(): void; + } + export class HistoryDependentViewCacheDecorator implements IViewCache { + viewRemoved: JQueryCallback; + constructor(options: { + navigationManager: StackBasedNavigationManager; + viewCache: IViewCache; + }); + setView(key: string, viewInfo: any): void; + removeView(key: string): any; + hasView(viewInfo: any): boolean; + getView(key: string): any; + clear(): void; + } + export interface IStorage { + getItem(key: string): any; + setItem(key: string, value: any): void; + removeItem(key: string): void; + } + export class MemoryKeyValueStorage implements IStorage { + constructor(); + getItem(key: string): any; + setItem(key: string, value: any): void; + removeItem(key: string): void; + } + export interface StateManagerOptions { + storage?: IStorage; + stateSources?: any[]; + } + export class StateManager { + public storage: IStorage; + public stateSources: any[]; + constructor(options?: StateManagerOptions); + addStateSource(stateSource: any): void; + removeStateSource(stateSource: any): void; + saveState(): void; + restoreState(): void; + clearState(): void; + } + export class Route { + constructor(pattern: string, defaults?: any, constraints?: any); + parse(url: string): any; + format(routeValues: any): string; + formatSegment(value: any): string; + parseSegment(): any; + } + export class MvcRouter { + constructor(); + register(pattern: string, defaults?: any, constraints?: any): void; + parse(uri: string): any; + format(obj: any): string; + } + interface BrowserAdapterOptions { + window: Window; + } + export class DefaultBrowserAdapter { + constructor(options?: BrowserAdapterOptions); + replaceState(uri: string): void; + pushState(uri: string): void; + createRootPage(): void; + getWindowName(): string; + setWindowName(windowName: string): void; + back(): void; + getHash(): string; + isRootPage(): boolean; + } + export class OldBrowserAdapter extends DefaultBrowserAdapter { } + export class HistorylessBrowserAdapter extends DefaultBrowserAdapter { } + export interface INavigationDevice { + init: Function; + setUri(uri: string): void; + getUri(): string; + back(): void; + } + export class StackBasedNavigationDevice extends HistoryBasedNavigationDevice implements INavigationDevice { + uriChanged: JQueryCallback; + constructor(options?: BrowserAdapterOptions); + } + export class HistoryBasedNavigationDevice implements INavigationDevice { + backInitiated: JQueryCallback; + init: Function; + setUri(uri: string): void; + getUri(): string; + back(): void; + } + export class NavigationStack { + public items: any[]; + public currentIndex: number; + public itemsRemoved: JQueryCallback; + constructor(); + currentItem(): any; + back(uri: string): void; + forward(): void; + navigate(uri: any, replaceCurrent?: boolean): any; + getPreviousItem(): any; + canBack(): boolean; + clear(): void; + } + export interface NavigationManagerOptions { + stateStorageKey?: string; + navigationDevice?: INavigationDevice; + keepPositionInStack?: boolean; + } + export interface INavigationManager { + navigating: JQueryCallback; + navigated: JQueryCallback; + navigatingBack: JQueryCallback; + navigationCanceled: JQueryCallback; + itemRemoved: JQueryCallback; + navigate(uri: any, options?: { + root?: boolean; + target?: string; + direction?: string; + }): void; + back(): void; + back(alternate: any): void; + canBack(): boolean; + rootUri(): string; + currentItem(): any; + previousItem(): any; + saveState(): void; + removeState(): void; + restoreState(): void; + } + export class StackBasedNavigationManager extends HistoryBasedNavigationManager { + init(): JQueryPromise; + public currentStack: NavigationStack; + public navigationStacks: { + [key: string]: NavigationStack + }; + public navigating: JQueryCallback; + public navigated: JQueryCallback; + public navigatingBack: JQueryCallback; + public navigationCanceled: JQueryCallback; + public itemRemoved: JQueryCallback; + constructor(options?: NavigationManagerOptions); + navigate(uri: any, options?: { + root?: boolean; + target?: string; + direction?: string; + }): void; + currentIndex(): number; + getItemByIndex(index: number): any; + clearHistory(): void; + } + export class HistoryBasedNavigationManager implements INavigationManager { + navigating: JQueryCallback; + navigated: JQueryCallback; + navigatingBack: JQueryCallback; + navigationCanceled: JQueryCallback; + itemRemoved: JQueryCallback; + constructor(options?: NavigationManagerOptions); + navigate(uri: any, options?: { + root?: boolean; + target?: string; + direction?: string; + }): void; + back(): void; + back(alternate: any): void; + canBack(): boolean; + rootUri(): string; + currentItem(): any; + previousItem(): any; + saveState(): void; + removeState(): void; + restoreState(): void; + } + export module utils { + export function mergeCommands(destination: any, source: any): dxCommand[]; + } + export interface ApplicationOptions { + router?: MvcRouter; + ns?: Object; + namespace?: Object; + viewCache?: IViewCache; + viewCacheSize?: number; + disableViewCache?: boolean; + useViewTitleAsBackText?: boolean; + stateManager?: StateManager; + navigationManager?: StackBasedNavigationManager; + navigation?: dxCommandOptions[]; + commandMapping?: CommandMap; + } + export class Application { + public router: MvcRouter; + public namespace: any; + public components: any[]; + public viewCache: IViewCache; + public stateManager: StateManager; + public commandMapping: CommandMap; + public navigation: dxCommand[]; + public navigationManager: StackBasedNavigationManager; + public beforeViewSetup: JQueryCallback; + public afterViewSetup: JQueryCallback; + public viewShowing: JQueryCallback; + public viewShown: JQueryCallback; + public viewHidden: JQueryCallback; + public viewDisposing: JQueryCallback; + public viewDisposed: JQueryCallback; + public navigating: JQueryCallback; + public navigatingBack: JQueryCallback; + constructor(options?: ApplicationOptions); + init(): any; + navigate(uri?: any, options?: { + root?: boolean; + target?: string; + direction?: string; + }): void; + back(): void; + canBack(): boolean; + saveState(): void; + clearState(): void; + restoreState(): void; + } + export function createActionExecutors(app: Application): { + [key: string]: { execute(e: any): void; } + }; +} +declare module DevExpress.framework.html { +export interface ILayoutController { + viewReleased: JQueryCallback; + init(options: InitLayoutControllerOptions): void; + activate(): void; + deactivate(): void; + showView(viewInfo: any, direction?: string): JQueryPromise; + } + export interface ILayoutControllerRegistration extends IDevice { + name: string; + controller: ILayoutController; + root?: boolean; + } + export var layoutControllers: Array; + export var layoutSets: Object; + export interface InitLayoutControllerOptions { + $viewPort?: JQuery; + $hiddenBag?: JQuery; + navigationManager?: framework.StackBasedNavigationManager; + } + export class DefaultLayoutController implements ILayoutController { + public viewReleased: JQueryCallback; + constructor(options?: { layoutTemplateName: string }); + init(options: InitLayoutControllerOptions): void; + activate(): void; + deactivate(): void; + showView(viewInfo: any, direction?: string): JQueryPromise; + } + export interface CommandManagerOptions { + globalCommands?: framework.dxCommand[]; + commandMapping?: framework.CommandMapping; + } + export class CommandManager { + public globalCommands: framework.dxCommand[]; + public commandMapping: framework.CommandMapping; + constructor(options?: CommandManagerOptions); + layoutCommands($markup: JQuery, extraCommands?: any): void; } + export interface ITemplateEngine { + applyTemplate(template: string, model: any): void; + applyTemplate(template: Element, model: any): void; + applyTemplate(template: JQuery, model: any): void; + } + export class KnockoutJSTemplateEngine implements ITemplateEngine { + constructor(); + applyTemplate(template: string, model: any): void; + applyTemplate(template: Element, model: any): void; + applyTemplate(template: JQuery, model: any): void; + } + export interface TransitionExecutorOptions { + type?: string; + source?: JQuery; + destination?: JQuery; + } + export class TransitionExecutor { + public container: JQuery; + constructor(container: JQuery, options: TransitionExecutorOptions); + finalize(): void; + exec(): JQueryPromise; + static create(container: JQuery, options: TransitionExecutorOptions): TransitionExecutor; + } + export interface ViewEngineOptions { + $root?: JQuery; + device?: IDevice; + commandManager?: CommandManager; + templateEngine?: ITemplateEngine; + dataOptionsAttributeName?: string; + } + export class ViewEngineBase { + public $root: JQuery; + public device: IDevice; + public commandManager: CommandManager; + public templateEngine: ITemplateEngine; + public dataOptionsAttributeName: string; + public viewSelecting: JQueryCallback; + public modelFromViewDataExtended: JQueryCallback; + constructor(options?: ViewEngineOptions); + init(): JQueryPromise; + findViewTemplate(viewName: string): JQuery; + afterViewSetup(viewInfo: any): void; + } + export class ViewEngine extends ViewEngineBase { + public layoutSelecting: JQueryCallback; + constructor(options?: ViewEngineOptions); + init(): JQueryPromise; + findLayoutTemplate(layoutName: string): JQuery; + } + export interface HtmlApplicationOptions extends framework.ApplicationOptions { + commandManager?: CommandManager; + templateEngine?: ITemplateEngine; + navigateToRootViewMode?: string; + layoutControllers?: Array + device?: IDevice; + layoutSet?: Array; + } + export class HtmlApplication extends framework.Application { + public viewEngine: ViewEngineBase; + public viewRendered: JQueryCallback; + public resolveLayoutController: JQueryCallback; + constructor(options?: HtmlApplicationOptions); + init(): any; + viewPort(): JQuery; + } +} +declare module DevExpress.ui { + interface ViewportOptions { + allowPan?: boolean; + allowZoom?: boolean; + } + export interface ITemplate { + compile(html: string): any; + render(template: JQuery, data: any): any; + render(template: any, data: any): any; + } + class Template { + constructor(element: HTMLElement); + constructor(element: JQueryStatic); + render(container: HTMLElement): any; + render(container: JQueryStatic): any; + dispose(): void; + } + interface TemplateStatic { + new (element: HTMLElement): Template; + new (element: JQueryStatic): Template; + } + class TemplateProvider { + constructor(); + getTemplateClass(widget: any): TemplateStatic; + getDefaultTemplate(widget: any): void; supportDefaultTemplate(): boolean; + } + export function initViewport(options: ViewportOptions): void; + interface NotifyOptions { + message: string; + type?: string; + displayTime?: number; + hiddenAction: () => any; + } + export function notyfy(options: any): void; + export function notify(message: string, type?: string, displayTime?: number): void; + export module dialog { + interface Dialog { + show(): JQueryPromise; + hide(value?: any): void; + } + interface DialogButton { + text: string; + icon: string; + clickAction: () => any; + } + interface DialogOptions { + message: string; + title?: string; + } + export function custom(options: DialogOptions): Dialog; + export function custom(message: string, title?: string): Dialog; + export function alert(options: DialogOptions): JQueryPromise; + export function alert(message: string, title?: string): JQueryPromise; + export function confirm(options: DialogOptions): JQueryPromise; + export function confirm(message: string, title?: string): JQueryPromise; + } +export interface CollectionContainerWidgetOptions extends WidgetOptions { + items?: Array; + itemTemplate?: any; + itemRender?: Function; + itemClickAction?: any; + itemRenderedAction?: any; + noDataText?: string; + dataSource?: data.DataSource; + selectedIndex?: number; + itemSelectAction?: any; + itemHoldAction?: any; + itemHoldTimeout?: number; + } + export class CollectionContainerWidget extends Widget { + constructor(element: Element, options?: CollectionContainerWidgetOptions); + constructor(element: JQuery, options?: CollectionContainerWidgetOptions); + } +export interface WidgetOptions extends ComponentOptions { + contentReadyAction?: any; + width?: any; + height?: any; + visible?: boolean; + activeStateEnabled?: boolean; + } + export class Widget extends Component { + constructor(element: Element, options?: WidgetOptions); + constructor(element: JQuery, options?: WidgetOptions); + init(): void; + repaint(): void; + addTemplate(template: ITemplate): void; + } +export interface dxEditorOptions extends WidgetOptions { + value?: any; + valueChangeAction?: any; + } + export class dxEditor extends Widget { + constructor(element: Element, options?: dxEditorOptions); + constructor(element: JQuery, options?: dxEditorOptions); + } +export interface dxAutocompleteOptions extends dxDropDownEditorOptions { + minSearchLength?: number; + searchTimeout?: number; + placeholder?: string; + filterOperator?: string; + displayExpr?: string; + searchMode?: string; + dataSource?: data.DataSource; + items?: Array; + itemRender?: Function; + itemTemplate?: any; + } + export class dxAutocomplete extends dxDropDownEditor { + constructor(element: Element, options?: dxAutocompleteOptions); + constructor(element: JQuery, options?: dxAutocompleteOptions); + } +export interface dxButtonOptions extends WidgetOptions { + type?: string; + text?: string; + icon?: string; + iconSrc?: string; + } + export class dxButton extends Widget { + constructor(element: Element, options?: dxButtonOptions); + constructor(element: JQuery, options?: dxButtonOptions); + } +export interface dxCheckBoxOptions extends dxEditorOptions { } + export class dxCheckBox extends dxEditor { + constructor(element: Element, options?: dxCheckBoxOptions); + constructor(element: JQuery, options?: dxCheckBoxOptions); + } +export interface dxCalendarOptions extends dxEditorOptions { + value?: Date; + min?: Date; + max?: Date; + firstDayOfWeek?: number; + } + export class dxCalendar extends dxEditor { + constructor(element: Element, options?: dxEditorOptions); + constructor(element: JQuery, options?: dxEditorOptions); + } +export interface dxDateBoxOptions extends dxTextEditorOptions { + format?: string; + useNativePicker?: boolean; + value?: Date; + type?: string; + min?: Date; + max?: Date; + useCalendar?: boolean; + formatString?: string; + closeOnValueChange?: boolean; + calendarOptions?: Object; + } + export class dxDateBox extends dxTextEditor { + constructor(element: Element, options?: dxDateBoxOptions); + constructor(element: JQuery, options?: dxDateBoxOptions); + } +export interface dxTextEditorOptions extends dxEditorOptions { + valueChangeEvent?: string; + placeholder?: string; + readOnly?: boolean; + focusInAction?: any; + focusOutAction?: any; + keyDownAction?: any; + keyPressAction?: any; + keyUpAction?: any; + changeAction?: any; + enterKeyAction?: any; + copyAction?: any; + pasteAction?: any; + cutAction?: any; + inputAction?: any; + showClearButton?: boolean; + mode?: string; + } + export class dxTextEditor extends dxEditor { + constructor(element: Element, options?: dxTextEditorOptions); + constructor(element: JQuery, options?: dxTextEditorOptions); + focus(): void; + blur(): void; + } +export interface dxListOptions extends CollectionContainerWidgetOptions { + pullRefreshEnabled?: boolean; + autoPagingEnabled?: boolean; + scrollingEnabled?: boolean; + showScrollbar?: boolean; + useNativeScrolling?: boolean; + grouped?: boolean; + editEnabled?: boolean; + showNextButton?: boolean; + groupTemplate?: string; + pullingDownText?: string; + pulledDownText?: string; + refreshingText?: string; + pageLoadingText?: string; + scrollAction?: any; + pullRefreshAction?: any; + pageLoadingAction?: any; + itemHoldAction?: any; + itemSwipeAction?: any; + itemHoldTimeout?: number; + groupRender? (groupData: any, groupIndex: number, groupElement: Element): any; + editConfig?: { + itemTemplate?: any; + itemRenderer? (itemData: any, itemIndex: number, itemElement: Element): any; + menuType?: string; + menuItems?: any[]; + deleteEnabled?: boolean; + deleteMode?: string; + selectionEnabled?: boolean; + selectionMode?: string; + selectionType?: string; + reorderEnabled?: boolean; + } + itemDeleteAction?: any; + selectedItems?: any[]; + itemSelectAction?: any; + itemUnselectAction?: any; + itemReorderAction?: any; + nextButtonText?: string; + selectionMode?: string; + } + export class dxList extends CollectionContainerWidget { + constructor(element: Element, options?: dxListOptions); + constructor(element: JQuery, options?: dxListOptions); + update(): JQueryPromise; + updateDimensions(): JQueryPromise; + refresh(): JQueryPromise; + reload(): JQueryPromise; + deleteItem(itemElement: JQuery): JQueryPromise; + deleteItem(itemElement: Element): JQueryPromise; + clearSelectedItems() : void; + isItemSelected(itemElement: JQuery): boolean; + isItemSelected(itemElement: Element): boolean; + selectItem(itemElement: JQuery): void; + selectItem(itemElement: Element): void; + unselectItem(itemElement: JQuery): void; + unselectItem(itemElement: Element): void; + reorderItem(itemElement: JQuery, toItemElement: JQuery): JQueryPromise; + reorderItem(itemElement: Element, toItemElement: Element): JQueryPromise; + getSelectedItems(): number[]; + clientHeight(): number; + scrollHeight(): number; + scrollBy(distance: number): void; + scrollTo(targetLocation: number): void; + scrollTop(): number; + } +export interface dxLoadPanelOptions extends dxOverlayOptions { + message?: string; + width?: number; + height?: number; + delay?: number; + showPane?: boolean; + showIndicator?: boolean; + indicatorSrc?: string; + } + export class dxLoadPanel extends dxOverlay { + constructor(element: Element, options?: dxLoadPanelOptions); + constructor(element: JQuery, options?: dxLoadPanelOptions); + hide(): void; + show(): void; + toggle(showing: boolean): void; + } +export interface dxLookupOptions extends dxEditorOptions { + dataSource?: data.DataSource; + displayValue?: string; + title?: string; + titleTemplate?: any; + valueExpr?: string; + displayExpr?: string; + placeholder?: string; + searchPlaceholder?: string; + searchEnabled?: boolean; + searchTimeout?: number; + minFilterLength?: number; + fullScreen?: boolean; + itemTemplate?: any; + itemRender?: Function; + showCancelButton?: boolean; + showClearButton?: boolean; + showDoneButton?: boolean; + showNextButton?: boolean; + doneButtonText?: string; + cancelButtonText?: string; + clearButtonText?: string; + nextButtonText?: string; + grouped?: boolean; + groupRender?: Function; + groupTemplate?: string; + pullingDownText?: string; + pulledDownText?: string; + refreshingText?: string; + pageLoadingText?: string; + noDataText?: string; + scrollAction?: any; + shading?: boolean; + closeOnOutsideClick?: boolean; + position?: any; + animation?: any; + shownAction?: any; + hiddenAction?: any; + popupWidth?: any; + popupHeight?: any; + autoPagingEnabled?: boolean; + useNativeScrolling?: boolean; + usePopover?: boolean; + openAction?: any; + closeAction?: any; + } + export class dxLookup extends dxEditor { + constructor(element: Element, options?: dxLookupOptions); + constructor(element: JQuery, options?: dxLookupOptions); + close(): void; + open(): void; + } +export interface dxMapOptions extends WidgetOptions { + location?: any; + width?: number; + height?: number; + zoom?: number; + mapType?: string; + provider?: string; + markers?: Array; + routes?: Array; + key?: string; + controls?: any; + mapReadyAction?: any; + autoAdjust?: boolean; + center?: any; + markerAddedAction?: any; + markerRemovedAction?: any; + markerIconSrc?: string; + routeAddedAction?: any; + routeRemovedAction?: any; + type?: string; + } + export class dxMap extends Widget { + constructor(element: Element, options?: dxMapOptions); + constructor(element: JQuery, options?: dxMapOptions); + addMarker(markerOptions: any, callback: Function): JQueryPromise; + removeMarker(marker: any): void; + addRoute(routeOptions: any, callback: Function): JQueryPromise; + removeRoute(route: any): void; + } +export interface dxNavBarOptions extends dxTabsOptions { } + export class dxNavBar extends dxTabs { + constructor(element: Element, options?: dxNavBarOptions); + constructor(element: JQuery, options?: dxNavBarOptions); + } +export interface dxNumberBoxOptions extends dxTextEditorOptions { + min?: number; + max?: number; + value?: number; + step?: number; + showSpinButtons?: boolean; + } + export class dxNumberBox extends dxTextEditor { + constructor(element: Element, options?: dxNumberBoxOptions); + constructor(element: JQuery, options?: dxNumberBoxOptions); + } +export interface dxOverlayOptions extends WidgetOptions { + activeStateEnabled?: boolean; + shading?: boolean; + closeOnOutsideClick?: boolean; + position?: any; + animation?: any; + showingAction?: any; + shownAction?: any; + hidingAction?: any; + hiddenAction?: any; + deferRendering?: boolean; + targetContainer?: any; + contentTemplate?: any; + } + export class dxOverlay extends Widget { + constructor(element: Element, options?: dxOverlayOptions); + constructor(element: JQuery, options?: dxOverlayOptions); + content(): JQuery; + hide(): void; + show(): void; + toggle(showing: boolean): void; + } +export interface dxPopupOptions extends dxOverlayOptions { + title?: string; + showTitle?: boolean; + fullScreen?: boolean; + cancelButton?: any; + doneButton?: any; + clearButton?: any; + titleTemplate?: any; + dragEnabled?: boolean; + } + export class dxPopup extends dxOverlay { + constructor(element: Element, options?: dxPopupOptions); + constructor(element: JQuery, options?: dxPopupOptions); + } +export interface dxPopoverOptions extends dxPopupOptions { + target?: any; + } + export class dxPopover extends dxPopup { + constructor(element: Element, options?: dxPopoverOptions); + constructor(element: JQuery, options?: dxPopoverOptions); + } +export interface dxTooltipOptions extends dxPopoverOptions { + target?: any; + } + export class dxTooltip extends dxPopover { + constructor(element: Element, options?: dxTooltipOptions); + constructor(element: JQuery, options?: dxTooltipOptions); + } +export interface dxRadioGroupOptions extends CollectionContainerWidgetOptions { + layout?: string; + name?: string; + value?: Object; + valueExpr?: string; + } + export class dxRadioGroup extends CollectionContainerWidget { + constructor(element: Element, options?: dxRadioGroupOptions); + constructor(element: JQuery, options?: dxRadioGroupOptions); + } +export interface dxRangeSliderOptions extends dxSliderOptions { + start?: number; + end?: number; + } + export class dxRangeSlider extends dxSlider { + constructor(element: Element, options?: dxRangeSliderOptions); + constructor(element: JQuery, options?: dxRangeSliderOptions); + } +export interface dxScrollableOptions extends ComponentOptions { + startAction?: any; + scrollAction?: any; + endAction?: any; + stopAction?: any; + inertiaAction?: any; + bounceAction?: any; + updateAction?: any; + bounceEnabled?: boolean; + direction?: string; + showScrollbar?: boolean; + useNative?: boolean; + } + export class dxScrollable extends Component { + constructor(element: Element, options?: dxScrollableOptions); + constructor(element: JQuery, options?: dxScrollableOptions); + update(): void; + content(): JQuery; + clientHeight(): number; + scrollHeight(): number; + clientWidth(): number; + scrollWidth(): number; + scrollLeft(): number; + scrollTop(): number; + scrollOffset(): Object; + scrollBy(distance: number): void; + scrollBy(distance: Object): void; + scrollTo(targetLocation: number): void; + scrollTo(targetLocation: Object): void; + } +export interface dxScrollViewOptions extends dxScrollableOptions { + pullingDownText?: string; + pulledDownText?: string; + refreshingText?: string; + reachBottomText?: string; + pullDownAction?: any; + reachBottomAction?: any; + } + export class dxScrollView extends dxScrollable { + constructor(element: Element, options?: dxScrollViewOptions); + constructor(element: JQuery, options?: dxScrollViewOptions); + release(preventReachBottom: boolean): JQueryPromise; + toggleLoading(showOrHide: boolean): void; + refresh(): void; + } +export interface dxSelectBoxOptions extends dxAutocompleteOptions { + fieldTemplate?: any; + displayValue?: string; + multiSelectEnabled?: boolean; + values?: any[]; + openAction?: any; + closeAction?: any; + } + export class dxSelectBox extends dxAutocomplete { + constructor(element: Element, options?: dxSelectBoxOptions); + constructor(element: JQuery, options?: dxSelectBoxOptions); + } +export interface dxSliderOptions extends dxEditorOptions { + min?: number; + max?: number; + step?: number; + showRange?: boolean; + label?: { + visible: boolean; + format?: any; + position?: string; + } + tooltip?: { + enabled?: boolean; + format?: any; + position?: string; + showMode?: string; + } + } + export class dxSlider extends dxEditor { + constructor(element: Element, options?: dxSliderOptions); + constructor(element: JQuery, options?: dxSliderOptions); + } +export interface dxTabsOptions extends CollectionContainerWidgetOptions { } + export class dxTabs extends CollectionContainerWidget { + constructor(element: Element, options?: dxTabsOptions); + constructor(element: JQuery, options?: dxTabsOptions); + } +export interface dxTextAreaOptions extends dxTextEditorOptions { + cols?: number; + rows?: number; + } + export class dxTextArea extends dxTextEditor { + constructor(element: Element, options?: dxTextAreaOptions); + constructor(element: JQuery, options?: dxTextAreaOptions); + } +export interface dxTextBoxOptions extends dxTextEditorOptions { + maxLength?: any; + } + export class dxTextBox extends dxTextEditor { + constructor(element: Element, options?: dxTextBoxOptions); + constructor(element: JQuery, options?: dxTextBoxOptions); + } +export interface dxToastOptions extends dxOverlayOptions { + message?: string; + type?: string; + displayTime?: number; + } + export class dxToast extends dxOverlay { + constructor(element: Element, options?: dxToastOptions); + constructor(element: JQuery, options?: dxToastOptions); + } +export interface dxToolbarOptions extends CollectionContainerWidgetOptions { + menuItemRender?: Function; + menuItemTemplate?: any; + submenuType?: string; + renderAs?: string; + } + export class dxToolbar extends CollectionContainerWidget { + constructor(element: Element, options?: dxToolbarOptions); + constructor(element: JQuery, options?: dxToolbarOptions); + } +export interface dxDropDownEditorOptions extends dxTextBoxOptions { + closeAction?: any; + openAction?: any; + } + export class dxDropDownEditor extends dxTextBox { + constructor(element: Element, options?: dxDropDownEditorOptions); + constructor(element: JQuery, options?: dxDropDownEditorOptions); + } +export interface dxLoadIndicatorOptions extends WidgetOptions { + indicatorSrc?: string; + } + export class dxLoadIndicator extends Widget { + constructor(element: Element, options?: dxLoadIndicatorOptions); + constructor(element: JQuery, options?: dxLoadIndicatorOptions); + } +export interface dxMultiViewOptions extends CollectionContainerWidgetOptions { + loop?: boolean; + swipeEnabled?: boolean; + animationEnabled?: boolean; + selectedIndex?: number; + } + export class dxMultiView extends CollectionContainerWidget { + constructor(element: Element, options?: dxMultiViewOptions); + constructor(element: JQuery, options?: dxMultiViewOptions); + } +export interface dxGalleryOptions extends CollectionContainerWidgetOptions { + activeStateEnabled?: boolean; + animationDuration?: number; + loop?: boolean; + swipeEnabled?: boolean; + indicatorEnabled?: boolean; + showIndicator?: boolean; + selectedIndex?: number; + slideshowDelay?: number; + showNavButtons?: boolean; + } + export class dxGallery extends CollectionContainerWidget { + constructor(element: Element, options?: dxGalleryOptions); + constructor(element: JQuery, options?: dxGalleryOptions); + goToItem(itemIndex?: number, animation?: boolean): JQueryPromise; + prevItem(animation?: boolean): JQueryPromise; + nextItem(animation?: boolean): JQueryPromise; + } +export interface dxDataGridFilterDescriptions { + '='?: string; + '<>'?: string; + '<'?: string; + '<='?: string; + '>'?: string; + '>='?: string; + 'startswith'?: string; + 'contains'?: string; + 'notcontains'?: string; + 'endswith'?: string; + } + export interface dxDataGridColumn { + allowSorting?: boolean; + allowFiltering?: boolean; + allowHiding?: boolean; + allowEditing?: boolean; + allowGrouping?: boolean; + allowReordering?: boolean; + allowResizing?: boolean; + visible?: boolean; + dataField?: string; + dataType?: string; + calculateCellValue?: (rowData: {}) => any; + calculateFilterExpression?: (filterValue: any, selectedFilterOperation: string) => Array; + caption?: string; + width?: any; cssClass?: string; + trueText?: string; + falseText?: string; + sortOrder?: string; + sortIndex?: number; + groupIndex?: number; + alignment?: string; + format?: string; + precision?: number; + customizeText?: (options: { value: any; valueText: string }) => string; + filterOperations?: dxDataGridFilterDescriptions; + selectedFilterOperation?: string; + cellTemplate?: any; headerCellTemplate?: any; editCellTemplate?: any; groupCellTemplate?: any; lookup?: { + dataSource?: any; valueExpr?: any; displayExpr?: any; }; + } + export interface dxDataGridOptions extends ui.WidgetOptions { + dataSource?: any; + dataErrorOccurred?: (errorObject: {}) => void; + showColumnHeaders?: boolean; + columnAutoWidth?: boolean; + noDataText?: string; + wordWrapEnabled?: boolean; + showColumnLines?: boolean; + showRowLines?: boolean; + rowAlternationEnabled?: boolean; + allowColumnReordering?: boolean; + allowColumnResizing?: boolean; + hoverStateEnabled?: boolean; + selectedItems?: Array; + columnChooser?: { + enabled?: boolean; + width?: number; + height?: number; + title?: string; + emptyPanelText?: string; + }; + selection?: { + mode?: string; + allowSelectAll?: boolean; + }; + sorting?: { + mode?: string; + ascendingText?: string; + descendingText?: string; + clearText?: string; + }; + searchPanel?: { + visible?: boolean; + width?: number; + placeholder?: string; + highlightSearchText?: boolean; + }; + grouping?: { + autoExpandAll?: boolean; + allowCollapsing?: boolean; + groupContinuesMessage?: string; + groupContinuedMessage?: string; + }; + groupPanel?: { + visible?: boolean; + emptyPanelText?: string; + allowColumnDragging?: boolean; + }; + filterRow?: { + visible?: boolean; + showOperationChooser?: boolean; + showAllText?: string; + resetOperationText?: string; + operationDescriptions?: dxDataGridFilterDescriptions; + }; + paging?: { + enabled?: boolean; + pageSize?: number; + pageIndex?: number; + }; + pager?: { + visible?: any; showPageSizeSelector?: boolean; + allowedPageSizes?: Array; + }; + editing?: { + editMode?: string; + insertEnabled?: boolean; + editEnabled?: boolean; + removeEnabled?: boolean; + texts?: { + editRow?: string; + saveRowChanges?: string; + cancelRowChanges?: string; + deleteRow?: string; + recoverRow?: string; + undeleteRow?: string; + confirmDeleteMessage?: string; + confirmDeleteTitle?: string; + } + }; + scrolling?: { + mode?: string; + preloadEnabled?: boolean; + useNativeScrolling?: boolean; + }; + loadPanel?: { + enabled?: boolean; + text?: string; + width?: number; + height?: number; + }; + stateStoring?: { + enabled?: boolean; + storageKey?: string; + type?: string; + customLoad?: () => any; + customSave?: (state: {}) => void; + }; + rowTemplate?: any; columns?: Array; + selectionChanged?: (options: {}) => void; + customizeColumns?: (columns: Array) => void; + rowClick?: (data: {}) => void; + cellClick?: (clickedCell: {}) => void; + cellHoverChanged?: (hoveredCell: {}) => void; + } + export class dxDataGrid extends Widget { + constructor(element: Element, options?: dxDataGridOptions); + constructor(element: JQuery, options?: dxDataGridOptions); + showColumnChooser: () => void; + hideColumnChooser: () => void; + beginCustomLoading: (messageText?: string) => void; + endCustomLoading: () => void; + startSelectionWithCheckboxes: () => void; + stopSelectionWithCheckboxes: () => void; + selectAll: () => void; + clearSelection: () => void; + getSelectedRowKeys: () => Array; + getSelectedRowsData: () => Array; + selectRows: (keys: Array) => void; + searchByText: (text: string) => void; + insertRow: () => void; + editRow: (rowIndex: number) => void; + editCell: (rowIndex: number, columnIndex: number) => void; + removeRow: (rowIndex: number) => void; + saveEditData: () => void; + undeleteRow: (rowIndex: number) => void; + cancelEditData: () => void; + refresh: () => void; + filter: (expr: any) => void; + clearFilter: () => void; + keyOf: (data: {}) => any; + byKey: (key: any) => {}; + getDataByKeys: (rowKeys: Array) => Array<{}>; + pageIndex: (value: number) => number; + totalCount: () => number; + closeEditCell: () => void; + collapseAll: (groupIndex?: number) => void; + expandAll: (groupIndex?: number) => void; + addColumn: (options: any) => void; + columnOption: (columnIndex: number, optionName?: string, optionValue?: any) => {}; + isScrollbarVisible: () => boolean; + getTopVisibleRowData: () => {}; + } +} +interface JQuery { +dxAutocomplete(options?: DevExpress.ui.dxAutocompleteOptions): JQuery; +dxButton(options?: DevExpress.ui.dxButtonOptions): JQuery; +dxCheckBox(options?: DevExpress.ui.dxCheckBoxOptions): JQuery; +dxCalendar(options?: DevExpress.ui.dxCalendarOptions): JQuery; +dxDateBox(options?: DevExpress.ui.dxDateBoxOptions): JQuery; +dxTextEditor(options?: DevExpress.ui.dxTextEditorOptions): JQuery; +dxList(options?: DevExpress.ui.dxListOptions): JQuery; +dxLoadPanel(options?: DevExpress.ui.dxLoadPanelOptions): JQuery; +dxLookup(options?: DevExpress.ui.dxLookupOptions): JQuery; +dxMap(options?: DevExpress.ui.dxMapOptions): JQuery; +dxNavBar(options?: DevExpress.ui.dxNavBarOptions): JQuery; +dxNumberBox(options?: DevExpress.ui.dxNumberBoxOptions): JQuery; +dxOverlay(options?: DevExpress.ui.dxOverlayOptions): JQuery; +dxPopup(options?: DevExpress.ui.dxPopupOptions): JQuery; +dxPopover(options?: DevExpress.ui.dxPopoverOptions): JQuery; +dxTooltip(options?: DevExpress.ui.dxTooltipOptions): JQuery; +dxRadioGroup(options?: DevExpress.ui.dxRadioGroupOptions): JQuery; +dxRangeSlider(options?: DevExpress.ui.dxRangeSliderOptions): JQuery; +dxScrollable(options?: DevExpress.ui.dxScrollableOptions): JQuery; +dxScrollView(options?: DevExpress.ui.dxScrollViewOptions): JQuery; +dxSelectBox(options?: DevExpress.ui.dxSelectBoxOptions): JQuery; +dxSlider(options?: DevExpress.ui.dxSliderOptions): JQuery; +dxTabs(options?: DevExpress.ui.dxTabsOptions): JQuery; +dxTextArea(options?: DevExpress.ui.dxTextAreaOptions): JQuery; +dxTextBox(options?: DevExpress.ui.dxTextBoxOptions): JQuery; +dxToast(options?: DevExpress.ui.dxToastOptions): JQuery; +dxToolbar(options?: DevExpress.ui.dxToolbarOptions): JQuery; +dxDropDownEditor(options?: DevExpress.ui.dxDropDownEditorOptions): JQuery; +dxLoadIndicator(options?: DevExpress.ui.dxLoadIndicatorOptions): JQuery; +dxMultiView(options?: DevExpress.ui.dxMultiViewOptions): JQuery; +dxGallery(options?: DevExpress.ui.dxGalleryOptions): JQuery; +dxDataGrid(options?: DevExpress.ui.dxDataGridOptions): JQuery; +} \ No newline at end of file From 173f4b08417bc987585e8c4d326e0d504365428b Mon Sep 17 00:00:00 2001 From: Kon P Date: Thu, 28 Aug 2014 22:02:03 -0700 Subject: [PATCH 008/221] updated bootboxjs and tests --- bootbox/bootbox-tests.ts | 94 +++++++++++++++++++--------------------- bootbox/bootbox.d.ts | 81 ++++++++++++++++++++-------------- 2 files changed, 92 insertions(+), 83 deletions(-) diff --git a/bootbox/bootbox-tests.ts b/bootbox/bootbox-tests.ts index 66922ab2e..189c26209 100644 --- a/bootbox/bootbox-tests.ts +++ b/bootbox/bootbox-tests.ts @@ -2,73 +2,67 @@ /// bootbox.alert("Are we ok?"); -bootbox.alert("Are we ok with Test button?", "Test"); -bootbox.alert("Are we ok with callback?", function() { +bootbox.alert("Are we ok with callback?", function () { console.log("Callback called!"); }); -bootbox.alert("Are we ok with callback and custom button?", "Test", function() { - console.log("Callback called!"); +bootbox.alert({ + message: "Are we ok with callback and custom button?", + callback: function () { + console.log("Callback called!"); + } }); -bootbox.confirm("Click ok to pass test", function(result) { - console.log(result); -}); +bootbox.confirm("Click ok to pass test"); -bootbox.confirm("Click cancel to pass test", function(result) { +bootbox.confirm("Click cancel to pass test", function (result) { console.log(!result); }); - -bootbox.confirm("Click confirm to pass test", "Cancel?", "Confirm?", function(result) { - console.log(result); -}); - -bootbox.confirm("Click cancel to pass test", "Cancel?", "Confirm?", function(result) { - console.log(!result); +bootbox.confirm({ + message: "Click confirm to pass test", + callback: function (result) { + console.log(result); + } }); bootbox.prompt("Are we ok?"); - -bootbox.prompt("Enter 'ok' to pass test", function(result) { +bootbox.prompt("Enter 'ok' to pass test", function (result) { console.log(result); }); - -bootbox.prompt("Enter 'ok' to pass test", "Cancel?", "Confirm?", function(result) { - console.log(result); +bootbox.prompt({ + message: "Enter 'ok' to pass test", callback: function (result) { + console.log(result); + } }); -bootbox.prompt("Keep default value and click ok", "Cancel?", "Confirm?", function(result) { - console.log(result); -}, "Test Value"); - bootbox.dialog("Test Dialog"); -var handler = { - label: "OK", - class: "MyClass", + + +bootbox.dialog("Test Dialog", function (result) { + return result; +}); + +bootbox.dialog({ + message: "Test Dialog", + callback: function (result) { } +}); + +var bdo: BootboxDialogOptions; +var sampleButton: BootboxButton = { + label: 'ButtonLabelToUse', callback: function () { - console.log("Test Dialog"); + return 'callback of button click' + }, + className: 'additionalButtonClassName' +}; + +bdo = { + message: '', + className: 'callName', + buttons: { + 'ButtonTextLabel': sampleButton } }; -var option = { - header: "header", - headerCloseButton: true -}; +bootbox.dialog(bdo); -bootbox.dialog("Test Dialog", handler); -bootbox.dialog("Test Dialog", [handler], option); - -bootbox.hideAll(); -bootbox.animate(false); -bootbox.backdrop("backdrop"); -bootbox.classes("myClass"); - -var icons: BootboxIcons = { - OK: "OK Icon", - CANCEL: "Cancel Icon", - CONFIRM: "Confirm Icon" -}; -bootbox.setIcons(icons); - -bootbox.setLocale("en"); - -bootbox.addLocale("klingon", { OK: "luq", CANCEL: "qIl", CONFIRM: "Confirm" }); \ No newline at end of file +bootbox.hideAll(); \ No newline at end of file diff --git a/bootbox/bootbox.d.ts b/bootbox/bootbox.d.ts index 17732b603..fd0ce06d8 100644 --- a/bootbox/bootbox.d.ts +++ b/bootbox/bootbox.d.ts @@ -1,48 +1,63 @@ -// Type definitions for Bootbox 3.0.0 +// Type definitions for Bootbox 4.0.0 // Project: https://github.com/makeusabrew/bootbox -// Definitions by: Vincent Bortone +// Definitions by: Kon Pik // Definitions: https://github.com/borisyankov/DefinitelyTyped -interface BootboxLocale { - OK: string; - CANCEL: string; - CONFIRM: string; + +interface BootboxAlertOptions { + message: string; + callback?: () => any; } -interface BootboxIcons { - OK: any; - CANCEL: any; - CONFIRM: any; +interface BootboxConfirmOptions { + message: string; + callback?: (result: boolean) => any; } -interface BootboxHandler { - label: string; - class: string; - callback: (result?: any) => void; +interface BootboxPromptOptions { + message: string; + callback?: (result: string) => any; } -interface BootboxOption { - header: string; - headerCloseButton: boolean; +interface BootboxButton { + label?: string; + className?: string; + callback?: () => any; +} + +interface BootboxDialogOptions { + message: any; // String | Element + title?: any; // String | Element + callback?: (result: boolean) => any; + show?: boolean; + onEscape?: () => any; + backdrop?: boolean; + closeButton?: boolean; + animate?: boolean; + className?: string; + buttons?: Object; // complex object where each key is of type BootboxButton +} + +interface BootboxDefaultOptions { + locale?: string; + show?: boolean; + backdrop?: boolean; + closeButton: boolean; + animate?: boolean; + className?: string; } interface BootboxStatic { - alert(message: string, callback: () => void): void; - alert(message: string, customButtonText?: string, callback?: () => void): void; - confirm(message: string, callback: (result: boolean) => void): void; - confirm(message: string, cancelButtonText?: string, confirmButtonText?: string, callback?: (result: boolean) => void): void; - prompt(message: string, callback: (result: string) => void, defaultValue?: string): void; - prompt(message: string, cancelButtonText?: string, confirmButtonText?: string, callback?: (result: string) => void, defaultValue?: string): void; - dialog(message: string, handlers: BootboxHandler[], options?: any): void; - dialog(message: string, handler: BootboxHandler): void; - dialog(message: string): void; + alert(message: string, callback?: () => void): void; + alert(options: BootboxAlertOptions): void; + confirm(message: string, callback?: (result: boolean) => void): void; + confirm(options: BootboxConfirmOptions): void; + prompt(message: string, callback?: (result: string) => void): void; + prompt(options: BootboxPromptOptions): void; + dialog(message: string, callback?: (result: string) => void): void; + dialog(options: BootboxDialogOptions): void; + setDefaults(options): void; hideAll(): void; - animate(shouldAnimate: boolean): void; - backdrop(backdropValue: string): void; - classes(customCssClasses: string): void; - setIcons(icons: BootboxIcons): void; - setLocale(localeName: string): void; - addLocale(localeName: string, translations: BootboxLocale) : void; } -declare var bootbox : BootboxStatic; \ No newline at end of file +declare var bootbox: BootboxStatic; \ No newline at end of file From 99e5a01f09a3ef163e0aa2acda692d0ddaa95a3f Mon Sep 17 00:00:00 2001 From: Kon P Date: Thu, 28 Aug 2014 22:26:00 -0700 Subject: [PATCH 009/221] fixed setOptions & tests --- bootbox/bootbox-tests.ts | 9 +++++++++ bootbox/bootbox.d.ts | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/bootbox/bootbox-tests.ts b/bootbox/bootbox-tests.ts index 189c26209..7cf6124cd 100644 --- a/bootbox/bootbox-tests.ts +++ b/bootbox/bootbox-tests.ts @@ -65,4 +65,13 @@ bdo = { bootbox.dialog(bdo); +bootbox.setDefaults({ + locale: 'en_US', + animate: false, + backdrop: false, + className: 'newClassName', + closeButton: true, + show: true +}) + bootbox.hideAll(); \ No newline at end of file diff --git a/bootbox/bootbox.d.ts b/bootbox/bootbox.d.ts index fd0ce06d8..173e3a2a7 100644 --- a/bootbox/bootbox.d.ts +++ b/bootbox/bootbox.d.ts @@ -42,7 +42,7 @@ interface BootboxDefaultOptions { locale?: string; show?: boolean; backdrop?: boolean; - closeButton: boolean; + closeButton?: boolean; animate?: boolean; className?: string; } @@ -56,7 +56,7 @@ interface BootboxStatic { prompt(options: BootboxPromptOptions): void; dialog(message: string, callback?: (result: string) => void): void; dialog(options: BootboxDialogOptions): void; - setDefaults(options): void; + setDefaults(options: BootboxDefaultOptions): void; hideAll(): void; } From 2b4eb035ffad1fe950ad008e72784f870279071c Mon Sep 17 00:00:00 2001 From: HowardRichards Date: Fri, 29 Aug 2014 14:02:20 +0100 Subject: [PATCH 010/221] Knockout: amended components.register to overloads supported by 3.2 KO Version 3.2 added components. The .register method in the current code is incorrect and does not support the correct overloads permitted. --- knockout/knockout.d.ts | 52 +++++++++++++++++++++++++++++++- knockout/tests/knockout-tests.ts | 45 +++++++++++++++++++++++++++ 2 files changed, 96 insertions(+), 1 deletion(-) diff --git a/knockout/knockout.d.ts b/knockout/knockout.d.ts index 48f550dfe..494b6f844 100644 --- a/knockout/knockout.d.ts +++ b/knockout/knockout.d.ts @@ -556,7 +556,13 @@ interface KnockoutBindingProvider { } interface KnockoutComponents { - register(componentName: string, definition: KnockoutComponentDefinition): void; + // overloads for register method: + register(componentName: string, config: KnockoutComponentRegister): void; + register(componentName: string, config: KnockoutComponentRegisterStringTemplate): void; + register(componentName: string, config: KnockoutComponentRegisterFnViewModel): void; + register(componentName: string, config: KnockoutComponentRegisterStringTemplateFnViewModel): void; + register(componentName: string, config: KnockoutComponentRegisterAMD): void; + isRegistered(componentName: string): boolean; unregister(componentName: string): void; get(componentName: string, callback: (definition: KnockoutComponentDefinition) => void): void; @@ -566,6 +572,50 @@ interface KnockoutComponents { getComponentNameForNode(node: Node): string; } +/* interfaces for register overloads*/ + +interface KnockoutComponentRegister { + template: KnockoutComponentTemplate; + viewModel?: KnockoutComponentConfigViewModel; +} + +interface KnockoutComponentRegisterAMD { + // load self-describing module using AMD module name + require: string; +} + +interface KnockoutComponentRegisterFnViewModel { + template: KnockoutComponentTemplate; + viewModel?: (params: any) => any; +} + +interface KnockoutComponentRegisterStringTemplate { + template: string; + viewModel?: KnockoutComponentConfigViewModel; +} + +interface KnockoutComponentRegisterStringTemplateFnViewModel { + template: string; + viewModel?: (params: any) => any; +} + +interface KnockoutComponentConfigViewModel { + instance?: any; + createViewModel? (params?: any, componentInfo?: KnockoutComponentInfo): any; + require?: string; +} + +interface KnockoutComponentTemplate { + // specify element id (string) or a node + element?: any; + // AMD module load + require?: string; +} + +interface KnockoutComponentInfo { + element: any; +} +/* end register overloads */ interface KnockoutComponentDefinition { template: Node[]; createViewModel?(params: any, options: { element: Node; }): any; diff --git a/knockout/tests/knockout-tests.ts b/knockout/tests/knockout-tests.ts index 6d4c9e25d..82b5aa25c 100644 --- a/knockout/tests/knockout-tests.ts +++ b/knockout/tests/knockout-tests.ts @@ -602,4 +602,49 @@ function test_allBindingsAccessor() { var fnAccessorBinding = allBindingsAccessor().myBindingName; } }; +} + +function test_Components() { + + function test_Register() { + // test all possible ko.components.register() overloads + var nodeArray = [new Node, new Node]; + var singleNode = new Node; + + // ------- string-templates with different viewmodel overloads: + + // string template and inline function (commonly used in examples) + ko.components.register("name", { template: "string-template", viewModel: function (params) { return null; } }); + + // string template and instance vm + ko.components.register("name", { template: "string-template", viewModel: { instance: null } }); + + // string template and createViewModel factory method + ko.components.register("name", { template: "string-template", viewModel: { createViewModel: function (params: any, componentInfo: KnockoutComponentInfo) { return null; } } }); + + // string template and require module vm + ko.components.register("name", { template: "string-template", viewModel: { require: "module" } }); + + // ------- non-string templates + + // viewmodel as function and four types of template + ko.components.register("name", { template: { element: "elementID" }, viewModel: function (params) { return null; } }); + // Node template for element and inline function (commonly used in examples) + ko.components.register("name", { template: { element: singleNode }, viewModel: function (params) { return null; } }); + // object template for element and inline function (commonly used in examples) + ko.components.register("name", { template: nodeArray, viewModel: function (params) { return null; } }); + // object template for element and inline function (commonly used in examples) + ko.components.register("name", { template: { require: "module" }, viewModel: function (params) { return null; } }); + + // viewmodel as object, and four types of non-string tempalte + ko.components.register("name", { template: { element: "elementID" }, viewModel: { instance: null } }); + // Node template for element and inline function (commonly used in examples) + ko.components.register("name", { template: { element: singleNode }, viewModel: { instance: null } }); + // object template for element and inline function (commonly used in examples) + ko.components.register("name", { template: nodeArray, viewModel: { instance: null } }); + // object template for element and inline function (commonly used in examples) + ko.components.register("name", { template: { require: "module" }, viewModel: { instance: null } }); + + // + } } \ No newline at end of file From 7878659ee9875b6b2ed49509b262bd63a84ca0eb Mon Sep 17 00:00:00 2001 From: HowardRichards Date: Fri, 29 Aug 2014 14:22:34 +0100 Subject: [PATCH 011/221] Fixed valerie.d.ts re-added missing reference for knockout --- valerie/valerie.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/valerie/valerie.d.ts b/valerie/valerie.d.ts index 1514f3a4d..d22227ecc 100644 --- a/valerie/valerie.d.ts +++ b/valerie/valerie.d.ts @@ -1,9 +1,10 @@ + // Type definitions for valerie // Project: https://github.com/davewatts/valerie // Definitions by: Howard Richards // Definitions: https://github.com/borisyankov/DefinitelyTyped - +/// /** * From 5b4566963904b30f0e09a638f0ec128896d04e80 Mon Sep 17 00:00:00 2001 From: Howard Richards Date: Fri, 29 Aug 2014 14:28:38 +0100 Subject: [PATCH 012/221] Removed blank line 1 --- valerie/valerie.d.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/valerie/valerie.d.ts b/valerie/valerie.d.ts index d22227ecc..8e9d12988 100644 --- a/valerie/valerie.d.ts +++ b/valerie/valerie.d.ts @@ -1,4 +1,3 @@ - // Type definitions for valerie // Project: https://github.com/davewatts/valerie // Definitions by: Howard Richards @@ -725,4 +724,4 @@ declare module Valerie.Rules { Todo: add classes in valerie.rules namespace */ -} \ No newline at end of file +} From dade09fe9d0b5205c4c2f5de9f185f64e59c701c Mon Sep 17 00:00:00 2001 From: HowardRichards Date: Fri, 29 Aug 2014 14:33:47 +0100 Subject: [PATCH 013/221] added any to options type Fixed failing run --- valerie/valerie.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/valerie/valerie.d.ts b/valerie/valerie.d.ts index 8e9d12988..abe5aea28 100644 --- a/valerie/valerie.d.ts +++ b/valerie/valerie.d.ts @@ -316,7 +316,7 @@ declare module Valerie { // - either parameter can be omitted and a clone of the other parameter will be returned // - the merge is shallow // - array properties are shallow cloned - mergeOptions(defaultOptions: ValidationOptions, options): ValidationOptions; + mergeOptions(defaultOptions: ValidationOptions, options:any): ValidationOptions; } From a21e99a99968e2156b0f3cb0044d20808d5babbf Mon Sep 17 00:00:00 2001 From: Kon P Date: Sat, 30 Aug 2014 14:15:33 -0700 Subject: [PATCH 014/221] Re-adding original definition owner --- bootbox/bootbox.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/bootbox/bootbox.d.ts b/bootbox/bootbox.d.ts index 173e3a2a7..699bc39bf 100644 --- a/bootbox/bootbox.d.ts +++ b/bootbox/bootbox.d.ts @@ -1,5 +1,6 @@ // Type definitions for Bootbox 4.0.0 // Project: https://github.com/makeusabrew/bootbox +// Definitions by: Vincent Bortone // Definitions by: Kon Pik // Definitions: https://github.com/borisyankov/DefinitelyTyped From 2d244ed02ae920cd23e5759ac8fce2a25b51f8ef Mon Sep 17 00:00:00 2001 From: Kon P Date: Sat, 30 Aug 2014 14:24:46 -0700 Subject: [PATCH 015/221] fixed header --- bootbox/bootbox.d.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bootbox/bootbox.d.ts b/bootbox/bootbox.d.ts index 699bc39bf..6177e1396 100644 --- a/bootbox/bootbox.d.ts +++ b/bootbox/bootbox.d.ts @@ -1,7 +1,6 @@ // Type definitions for Bootbox 4.0.0 // Project: https://github.com/makeusabrew/bootbox -// Definitions by: Vincent Bortone -// Definitions by: Kon Pik +// Definitions by: Vincent Bortone , Kon Pik // Definitions: https://github.com/borisyankov/DefinitelyTyped From 6b7657b69d7f3fdd700c6b9b9ea64a0da1d919ce Mon Sep 17 00:00:00 2001 From: mzsm Date: Tue, 2 Sep 2014 03:54:34 +0900 Subject: [PATCH 016/221] JQuery.one can omit `selector`. (like JQuery.on) --- jquery/jquery.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jquery/jquery.d.ts b/jquery/jquery.d.ts index 1884180fb..80ca7e3b8 100644 --- a/jquery/jquery.d.ts +++ b/jquery/jquery.d.ts @@ -2806,7 +2806,7 @@ interface JQuery { * @param selector A selector string to filter the descendants of the selected elements that will call the handler. If the selector is null or omitted, the handler is always called when it reaches the selected element. * @param data Data to be passed to the handler in event.data when an event occurs. */ - one(events: { [key: string]: any; }, selector?: string, data?: any): JQuery; + one(events: { [key: string]: any; }, selector?: any, data?: any): JQuery; /** From c1be07edcf03510acdeb1f8bfbfa4ef011d969a3 Mon Sep 17 00:00:00 2001 From: Drew Noakes Date: Tue, 2 Sep 2014 10:57:42 +0100 Subject: [PATCH 017/221] [minor] Fix typo in URL --- jasmine/jasmine.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jasmine/jasmine.d.ts b/jasmine/jasmine.d.ts index e3f46ca17..04c4f4671 100644 --- a/jasmine/jasmine.d.ts +++ b/jasmine/jasmine.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/borisyankov/DefinitelyTyped -// For ddescribe / iit use : hhttps://github.com/borisyankov/DefinitelyTyped/blob/master/karma-jasmine/karma-jasmine.d.ts +// For ddescribe / iit use : https://github.com/borisyankov/DefinitelyTyped/blob/master/karma-jasmine/karma-jasmine.d.ts declare function describe(description: string, specDefinitions: () => void): void; // declare function ddescribe(description: string, specDefinitions: () => void): void; Not a part of jasmine. Angular team adds these From e2b37fc9788ceb82572893fdea3d0b32fa0ff24c Mon Sep 17 00:00:00 2001 From: Brandon Luong Date: Tue, 2 Sep 2014 11:47:22 -0700 Subject: [PATCH 018/221] stack layout out update definition --- d3/d3.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/d3/d3.d.ts b/d3/d3.d.ts index e2bf337e4..158462aa3 100644 --- a/d3/d3.d.ts +++ b/d3/d3.d.ts @@ -1104,6 +1104,7 @@ declare module D3 { offset(offset: string): StackLayout; x(accessor: (d: any, i: number) => any): StackLayout; y(accessor: (d: any, i: number) => any): StackLayout; + out(setter: (d: any, y0: number, y: number) => void): StackLayout; } export interface TreeLayout { From 0ea44c6c0a505d4bb3a61b152ccafc9006f47c9e Mon Sep 17 00:00:00 2001 From: Pedro Casaubon Date: Tue, 2 Sep 2014 21:02:39 +0200 Subject: [PATCH 019/221] Added HowlerJS Definitions https://github.com/goldfire/howler.js --- howlerjs/howler-tests.ts | 35 +++++++++++++++++++ howlerjs/howler.d.ts | 73 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 108 insertions(+) create mode 100644 howlerjs/howler-tests.ts create mode 100644 howlerjs/howler.d.ts diff --git a/howlerjs/howler-tests.ts b/howlerjs/howler-tests.ts new file mode 100644 index 000000000..aff0df926 --- /dev/null +++ b/howlerjs/howler-tests.ts @@ -0,0 +1,35 @@ +/** + * howler-tests.ts + * Created by xperiments on 02/09/14. + */ +/// + + +Howler.codecs('ogg'); +Howler.iOSAutoEnable = true; +var sound = new Howl({ + urls: ['sound.mp3'] +}).play(); + + +var sound = new Howl({ + urls: ['sound.mp3', 'sound.ogg', 'sound.wav'], + autoplay: true, + loop: true, + volume: 0.5, + onend: function() { + console.log('Finished!'); + } +}); + +var sound = new Howl({ + urls: ['sounds.mp3', 'sounds.ogg'], + sprite: { + blast: [0, 1000], + laser: [2000, 3000], + winner: [4000, 7500] + } +}); + +// shoot the laser! +sound.play('laser'); \ No newline at end of file diff --git a/howlerjs/howler.d.ts b/howlerjs/howler.d.ts new file mode 100644 index 000000000..577c9fd78 --- /dev/null +++ b/howlerjs/howler.d.ts @@ -0,0 +1,73 @@ +// Type definitions for howler.js v1.1.25 +// Project: https://github.com/goldfire/howler.js +// Definitions by: Pedro Casaubon +// Definitions: https://github.com/borisyankov/DefinitelyTyped + + +declare class HowlerGlobal { + mute(): HowlerGlobal; + unmute(): HowlerGlobal; + volume(): number; + volume(volume: number): HowlerGlobal; + codecs(extension: string): boolean; + iOSAutoEnable: boolean; +} + +declare var Howler: HowlerGlobal; + + +interface IHowlCallback { + (): void; +} +interface IHowlSoundSpriteDefinition { + [name: string]: number[] +} +interface IHowlProperties { + autoplay?: boolean; + buffer?: boolean; + format?: string; + loop?: boolean; + sprite?: IHowlSoundSpriteDefinition; + volume?: number; + urls?: string[]; + onend?: IHowlCallback; + onload?: IHowlCallback; + onloaderror?: IHowlCallback; + onpause?: IHowlCallback; + onplay?: IHowlCallback; +} + + +declare class Howl { + + autoplay: Boolean; + buffer: Boolean; + format: string; + rate: number; + model: string; + onend: IHowlCallback; + onload: IHowlCallback; + onloaderror: IHowlCallback; + onpause: IHowlCallback; + onplay: IHowlCallback; + constructor(properties: IHowlProperties); + play(sprite?: string, callback?: (soundId: number) => void): Howl; + pause(soundId?: number): Howl; + stop(soundId?: number): Howl; + mute(soundId?: number): Howl; + unmute(soundId?: number): Howl; + fade(from: number, to: number, duration: number, callback?: IHowlCallback, soundId?: number): Howl; + loop(): boolean; + loop(loop: boolean): Howl; + pos(position?: number, soundId?: number): number; + pos3d(x: number, y: number, z: number, soundId?: number): any; + sprite(definition?: IHowlSoundSpriteDefinition): IHowlSoundSpriteDefinition; + volume(): number; + volume(volume?: number, soundId?: number): Howl; + urls(): string[]; + urls(urls: string[]): Howl; + on(event: string, listener?: () => void): Howl; + off(event: string, listener?: () => void): Howl; + unload(): void; +} + From 7affe8e6edf688d0f3fc0a52afd0c43311dc70e9 Mon Sep 17 00:00:00 2001 From: Florian Verdonck Date: Tue, 2 Sep 2014 22:35:22 +0200 Subject: [PATCH 020/221] Added $asyncValidators Check https://docs.angularjs.org/api/ng/type/ngModel.NgModelController#$asyncValidators --- angularjs/angular.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index 084bea034..b341825e0 100755 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -445,6 +445,7 @@ declare module ng { $untouched: boolean; $validators: IModelValidators; + $asyncValidators: IModelValidators; $pristine: boolean; $dirty: boolean; From 7d1ef8108d0eb432362a3dbf8229cc48f77a5881 Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Tue, 2 Sep 2014 14:25:53 -0700 Subject: [PATCH 021/221] Update WinRT typings to fix extend conflict as both 'IWebSocket' and 'IClosable' implemetn a close method with diffrent signatures --- winrt/winrt.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/winrt/winrt.d.ts b/winrt/winrt.d.ts index 350b43153..a6829956e 100644 --- a/winrt/winrt.d.ts +++ b/winrt/winrt.d.ts @@ -7940,6 +7940,8 @@ declare module Windows { control: Windows.Networking.Sockets.MessageWebSocketControl; information: Windows.Networking.Sockets.MessageWebSocketInformation; onmessagereceived: any/* TODO */; + close(): void; + close(code: number, reason: string): void; } export class MessageWebSocketControl implements Windows.Networking.Sockets.IMessageWebSocketControl, Windows.Networking.Sockets.IWebSocketControl { maxMessageSize: number; @@ -7978,6 +7980,8 @@ declare module Windows { control: Windows.Networking.Sockets.StreamWebSocketControl; information: Windows.Networking.Sockets.StreamWebSocketInformation; inputStream: Windows.Storage.Streams.IInputStream; + close(): void; + close(code: number, reason: string): void; } export class StreamWebSocketControl implements Windows.Networking.Sockets.IStreamWebSocketControl, Windows.Networking.Sockets.IWebSocketControl { noDelay: boolean; From 11c3bec4212ed162740bf1b181104ddf3fc43d7b Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Tue, 2 Sep 2014 14:32:15 -0700 Subject: [PATCH 022/221] Add missing 'new' to PouchDB test --- pouchDB/pouch-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pouchDB/pouch-tests.ts b/pouchDB/pouch-tests.ts index 5534ca367..eb5ea7746 100644 --- a/pouchDB/pouch-tests.ts +++ b/pouchDB/pouch-tests.ts @@ -9,7 +9,7 @@ window.alert = function (thing?: string) { var pouch: PouchDB; function pouchTests() { - PouchDB('testdb', function (err: PouchError, res: PouchDB) { + new PouchDB('testdb', function (err: PouchError, res: PouchDB) { if (err) { alert('Error ' + err.status + ' occurred ' + err.error + ' - ' + err.reason); } From 2aaa293cb1af459b5815621227c204d93906a793 Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Tue, 2 Sep 2014 14:53:39 -0700 Subject: [PATCH 023/221] Remove quotes from response files --- ace/ace.d.ts.tscparams | 2 +- ace/all-tests.ts.tscparams | 2 +- ace/tests/ace-anchor-tests.ts.tscparams | 2 +- ace/tests/ace-background_tokenizer-tests.ts.tscparams | 2 +- ace/tests/ace-default-tests.ts.tscparams | 2 +- ace/tests/ace-document-tests.ts.tscparams | 2 +- ace/tests/ace-edit_session-tests.ts.tscparams | 2 +- ace/tests/ace-editor1-tests.ts.tscparams | 2 +- .../ace-editor_highlight_selected_word-tests.ts.tscparams | 2 +- ace/tests/ace-editor_navigation-tests.ts.tscparams | 2 +- ace/tests/ace-editor_text_edit-tests.ts.tscparams | 2 +- ace/tests/ace-multi_select-tests.ts.tscparams | 2 +- ace/tests/ace-placeholder-tests.ts.tscparams | 2 +- ace/tests/ace-range-tests.ts.tscparams | 2 +- ace/tests/ace-range_list-tests.ts.tscparams | 2 +- ace/tests/ace-search-tests.ts.tscparams | 2 +- ace/tests/ace-selection-tests.ts.tscparams | 2 +- ace/tests/ace-token_iterator-tests.ts.tscparams | 2 +- ace/tests/ace-virtual_renderer-tests.ts.tscparams | 2 +- amcharts/AmCharts.d.ts.tscparams | 2 +- amplifyjs/amplifyjs-tests.ts.tscparams | 2 +- amplifyjs/amplifyjs.d.ts.tscparams | 2 +- angularjs/legacy/angular-1.0-tests.ts.tscparams | 2 +- angularjs/legacy/angular-scenario-1.0.d.ts.tscparams | 2 +- asciify/asciify.ts.tscparams | 2 +- async/async-tests.ts.tscparams | 2 +- atom/atom-tests.ts.tscparams | 2 +- .../AzureMobileServicesClient-tests.ts.tscparams | 2 +- backbone-relational/backbone-relational-tests.ts.tscparams | 2 +- backbone-relational/backbone-relational.d.ts.tscparams | 2 +- backgrid/backgrid-tests.ts.tscparams | 2 +- backgrid/backgrid.d.ts.tscparams | 2 +- bootstrap-notify/bootstrap-notify.d.ts.tscparams | 2 +- bootstrap.paginator/bootstrap.paginator.d.ts.tscparams | 2 +- browser-harness/browser-harness-tests.ts.tscparams | 2 +- browser-harness/browser-harness.d.ts.tscparams | 2 +- camljs/camljs-tests.ts.tscparams | 2 +- camljs/camljs.d.ts.tscparams | 2 +- chai-fuzzy/chai-fuzzy.d.ts.tscparams | 2 +- chai-jquery/chai-jquery-tests.ts.tscparams | 2 +- chai/chai-tests.ts.tscparams | 2 +- chrome/chrome-app-tests.ts.tscparams | 2 +- chrome/chrome-app.d.ts.tscparams | 2 +- chrome/chrome-tests.ts.tscparams | 2 +- convert-source-map/convert-source-map-tests.ts.tscparams | 2 +- convert-source-map/convert-source-map.d.ts.tscparams | 2 +- crossroads/crossroads-tests.ts.tscparams | 2 +- crossroads/crossroads.d.ts.tscparams | 2 +- d3/d3-tests.ts.tscparams | 2 +- d3/plugins/d3.superformula-tests.ts.tscparams | 2 +- dhtmlxgantt/dhtmlxgantt-tests.ts.tscparams | 2 +- dhtmlxgantt/dhtmlxgantt.d.ts.tscparams | 2 +- dhtmlxscheduler/dhtmlxscheduler-tests.ts.tscparams | 2 +- dhtmlxscheduler/dhtmlxscheduler.d.ts.tscparams | 2 +- domo/domo-tests.ts.tscparams | 2 +- dropzone/dropzone.d.ts.tscparams | 2 +- durandal/durandal-1.x.d.ts.tscparams | 2 +- durandal/durandal.d.ts.tscparams | 2 +- dustjs-linkedin/dustjs-linkedin-tests.ts.tscparams | 2 +- dustjs-linkedin/dustjs-linkedin.d.ts.tscparams | 2 +- ember/ember-tests.ts.tscparams | 2 +- ember/ember.d.ts.tscparams | 2 +- epiceditor/epiceditor-tests.ts.tscparams | 2 +- epiceditor/epiceditor.d.ts.tscparams | 2 +- express/express-tests.ts.tscparams | 2 +- extjs/ExtJS-tests.ts.tscparams | 2 +- fabricjs/fabricjs-tests.ts.tscparams | 2 +- fabricjs/fabricjs.d.ts.tscparams | 2 +- fancybox/fancybox-tests.ts.tscparams | 2 +- fancybox/fancybox.d.ts.tscparams | 2 +- flexSlider/flexSlider-tests.ts.tscparams | 2 +- flexSlider/flexSlider.d.ts.tscparams | 2 +- flot/jquery.flot.d.ts.tscparams | 2 +- foundation/foundation-tests.ts.tscparams | 2 +- foundation/foundation.d.ts.tscparams | 2 +- fullCalendar/fullCalendar-tests.ts.tscparams | 2 +- gamequery/gamequery-tests.ts.tscparams | 2 +- giraffe/giraffe-tests.ts.tscparams | 2 +- giraffe/giraffe.d.ts.tscparams | 2 +- globalize/globalize-tests.ts.tscparams | 2 +- goJS/goJS-tests.ts.tscparams | 2 +- goJS/goJS.d.ts.tscparams | 2 +- history/history-tests.ts.tscparams | 2 +- history/history.d.ts.tscparams | 2 +- humane/humane-tests.ts.tscparams | 2 +- humane/humane.d.ts.tscparams | 2 +- jake/jake-tests.ts.tscparams | 2 +- jasmine-fixture/jasmine-fixture-tests.ts.tscparams | 2 +- jasmine-jquery/jasmine-jquery-tests.ts.tscparams | 2 +- jasmine-jquery/jasmine-jquery.d.ts.tscparams | 2 +- jasmine-matchers/jasmine-matchers-tests.ts.tscparams | 2 +- jointjs/jointjs.d.ts.tscparams | 2 +- jqrangeslider/jqrangeslider-tests.ts.tscparams | 2 +- jqrangeslider/jqrangeslider.d.ts.tscparams | 2 +- jquery.address/jquery.address.d.ts.tscparams | 2 +- jquery.bbq/jquery.bbq-tests.ts.tscparams | 2 +- jquery.bbq/jquery.bbq.d.ts.tscparams | 2 +- jquery.colorbox/jquery.colorbox-tests.ts.tscparams | 2 +- jquery.colorbox/jquery.colorbox.d.ts.tscparams | 2 +- jquery.colorpicker/jquery.colorpicker-tests.ts.tscparams | 2 +- jquery.contextMenu/jquery.contextMenu.d.ts.tscparams | 2 +- jquery.cycle/jquery.cycle-tests.ts.tscparams | 2 +- jquery.dataTables/jquery.dataTables-tests.ts.tscparams | 2 +- jquery.dynatree/jquery.dynatree.d.ts.tscparams | 2 +- jquery.jnotify/jquery.jnotify-tests.ts.tscparams | 2 +- jquery.jnotify/jquery.jnotify.d.ts.tscparams | 2 +- jquery.noty/jquery.noty.d.ts.tscparams | 2 +- jquery.payment/jquery.payment.d.ts.tscparams | 2 +- jquery.pickadate/jquery.pickadate-tests.ts.tscparams | 2 +- jquery.pickadate/jquery.pickadate.d.ts.tscparams | 2 +- jquery.timeago/jquery.timeago-tests.ts.tscparams | 2 +- jquery.timepicker/jquery.timepicker-tests.ts.tscparams | 2 +- jquery.timer/jquery.timer-tests.ts.tscparams | 2 +- jquery.timer/jquery.timer.d.ts.tscparams | 2 +- jquery.tooltipster/jquery.tooltipster-tests.ts.tscparams | 2 +- jquery.tooltipster/jquery.tooltipster.d.ts.tscparams | 2 +- jquery.ui.layout/jquery.ui.layout.d.ts.tscparams | 2 +- jquery.validation/jquery.validation-tests.ts.tscparams | 2 +- jquery.watermark/jquery.watermark-tests.ts.tscparams | 2 +- jquery/jquery-tests.ts.tscparams | 2 +- jquerymobile/jquerymobile-tests.ts.tscparams | 2 +- jqueryui/jqueryui-tests.ts.tscparams | 2 +- js-signals/js-signals.d.ts.tscparams | 2 +- jscrollpane/jscrollpane.d.ts.tscparams | 2 +- jsdeferred/jsdeferred-tests.ts.tscparams | 2 +- jsdeferred/jsdeferred.d.ts.tscparams | 2 +- jsfl/jsfl.d.ts.tscparams | 2 +- jsfl/xJSFL.d.ts.tscparams | 2 +- jsoneditoronline/jsoneditoronline-tests.ts.tscparams | 2 +- jsoneditoronline/jsoneditoronline.d.ts.tscparams | 2 +- jsplumb/jquery.jsPlumb.d.ts.tscparams | 2 +- knockback/knockback.d.ts.tscparams | 2 +- .../knockout.deferred.updates-tests.ts.tscparams | 2 +- .../knockout.deferred.updates.d.ts.tscparams | 2 +- knockout.es5/knockout.es5-tests.ts.tscparams | 2 +- knockout.es5/knockout.es5.d.ts.tscparams | 2 +- knockout.mapping/knockout.mapping.d.ts.tscparams | 2 +- knockout.viewmodel/knockout.viewmodel.d.ts.tscparams | 2 +- knockout/all-tests.ts.tscparams | 2 +- knockout/tests/knockout-templatingBehaviors-tests.ts.tscparams | 2 +- knockout/tests/knockout-tests.ts.tscparams | 2 +- kolite/kolite-tests.ts.tscparams | 2 +- kolite/kolite.d.ts.tscparams | 2 +- less/less-tests.ts.tscparams | 2 +- less/less.d.ts.tscparams | 2 +- levelup/levelup-tests.ts.tscparams | 2 +- levelup/levelup.d.ts.tscparams | 2 +- libxmljs/libxmljs-tests.ts.tscparams | 2 +- libxmljs/libxmljs.d.ts.tscparams | 2 +- linq/linq-tests.ts.tscparams | 2 +- linq/linq.3.0.3-Beta4.d.ts.tscparams | 2 +- linq/linq.d.ts.tscparams | 2 +- linq/linq.jquery.d.ts.tscparams | 2 +- marionette/marionette.d.ts.tscparams | 2 +- meteor/meteor-tests.ts.tscparams | 2 +- meteor/meteor.d.ts.tscparams | 2 +- modernizr/modernizr-tests.ts.tscparams | 2 +- msnodesql/msnodesql-tests.ts.tscparams | 2 +- msnodesql/msnodesql.d.ts.tscparams | 2 +- mustache/mustache-tests.ts.tscparams | 2 +- mustache/mustache.d.ts.tscparams | 2 +- noVNC/noVNC-tests.ts.tscparams | 2 +- noVNC/noVNC.d.ts.tscparams | 2 +- node-fibers/node-fibers-tests.ts.tscparams | 2 +- node-fibers/node-fibers.d.ts.tscparams | 2 +- node/node-0.8.8.d.ts.tscparams | 2 +- node_redis/node_redis-tests.ts.tscparams | 2 +- node_redis/node_redis.d.ts.tscparams | 2 +- parallel/parallel-tests.ts.tscparams | 2 +- pdf/pdf-tests.ts.tscparams | 2 +- pdf/pdf.d.ts.tscparams | 2 +- persona/persona-tests.ts.tscparams | 2 +- persona/persona.d.ts.tscparams | 2 +- phonegap/phonegap-tests.ts.tscparams | 2 +- phonejs/dx.phonejs-tests.ts.tscparams | 2 +- pixi/pixi-tests.ts.tscparams | 2 +- pixi/pixi.d.ts.tscparams | 2 +- popcorn/popcorn.d.ts.tscparams | 2 +- pouchDB/pouch-tests.ts.tscparams | 2 +- pouchDB/pouch.d.ts.tscparams | 2 +- qunit/qunit-tests.ts.tscparams | 2 +- raphael/raphael-tests.ts.tscparams | 2 +- restangular/restangular-tests.ts.tscparams | 2 +- restify/restify-tests.ts.tscparams | 2 +- rethinkdb/rethinkdb-tests.ts.tscparams | 2 +- rethinkdb/rethinkdb.d.ts.tscparams | 2 +- sammyjs/sammyjs-tests.ts.tscparams | 2 +- sammyjs/sammyjs.d.ts.tscparams | 2 +- scroller/scroller-tests.ts.tscparams | 2 +- select2/select2-tests.ts.tscparams | 2 +- sencha_touch/SenchaTouch-Tests.ts.tscparams | 2 +- sharepoint/SharePoint-tests.ts.tscparams | 2 +- sharepoint/SharePoint.d.ts.tscparams | 2 +- siesta/siesta-tests.ts.tscparams | 2 +- siesta/siesta.d.ts.tscparams | 2 +- sinon-chai/sinon-chai-tests.ts.tscparams | 2 +- socket.io/socket.io-tests.ts.tscparams | 2 +- stripe/stripe.d.ts.tscparams | 2 +- swiper/swiper-tests.ts.tscparams | 2 +- swiper/swiper.d.ts.tscparams | 2 +- swipeview/swipeview-tests.ts.tscparams | 2 +- teechart/teechart.d.ts.tscparams | 2 +- threejs/three-tests.ts.tscparams | 3 +-- through/through-tests.ts.tscparams | 2 +- through/through.d.ts.tscparams | 2 +- titanium/titanium-tests.ts.tscparams | 2 +- toastr/toastr-tests.ts.tscparams | 2 +- tween.js/tween.js.d.ts.tscparams | 2 +- underscore/underscore-tests.ts.tscparams | 2 +- unity-webapi/unity-webapi-tests.ts.tscparams | 2 +- unity-webapi/unity-webapi.d.ts.tscparams | 2 +- urijs/URI.d.ts.tscparams | 2 +- viewporter/viewporter-tests.ts.tscparams | 2 +- vimeo/froogaloop.d.ts.tscparams | 2 +- webaudioapi/waa-nightly.d.ts.tscparams | 2 +- webrtc/MediaStream-tests.ts.tscparams | 2 +- webrtc/MediaStream.d.ts.tscparams | 2 +- webrtc/RTCPeerConnection-tests.ts.tscparams | 2 +- webrtc/RTCPeerConnection.d.ts.tscparams | 2 +- xsockets/XSockets-tests.ts.tscparams | 2 +- youtube/youtube.d.ts.tscparams | 2 +- zepto/zepto-tests.ts.tscparams | 2 +- 222 files changed, 222 insertions(+), 223 deletions(-) diff --git a/ace/ace.d.ts.tscparams b/ace/ace.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/ace/ace.d.ts.tscparams +++ b/ace/ace.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/ace/all-tests.ts.tscparams b/ace/all-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/ace/all-tests.ts.tscparams +++ b/ace/all-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/ace/tests/ace-anchor-tests.ts.tscparams b/ace/tests/ace-anchor-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/ace/tests/ace-anchor-tests.ts.tscparams +++ b/ace/tests/ace-anchor-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/ace/tests/ace-background_tokenizer-tests.ts.tscparams b/ace/tests/ace-background_tokenizer-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/ace/tests/ace-background_tokenizer-tests.ts.tscparams +++ b/ace/tests/ace-background_tokenizer-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/ace/tests/ace-default-tests.ts.tscparams b/ace/tests/ace-default-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/ace/tests/ace-default-tests.ts.tscparams +++ b/ace/tests/ace-default-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/ace/tests/ace-document-tests.ts.tscparams b/ace/tests/ace-document-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/ace/tests/ace-document-tests.ts.tscparams +++ b/ace/tests/ace-document-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/ace/tests/ace-edit_session-tests.ts.tscparams b/ace/tests/ace-edit_session-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/ace/tests/ace-edit_session-tests.ts.tscparams +++ b/ace/tests/ace-edit_session-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/ace/tests/ace-editor1-tests.ts.tscparams b/ace/tests/ace-editor1-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/ace/tests/ace-editor1-tests.ts.tscparams +++ b/ace/tests/ace-editor1-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/ace/tests/ace-editor_highlight_selected_word-tests.ts.tscparams b/ace/tests/ace-editor_highlight_selected_word-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/ace/tests/ace-editor_highlight_selected_word-tests.ts.tscparams +++ b/ace/tests/ace-editor_highlight_selected_word-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/ace/tests/ace-editor_navigation-tests.ts.tscparams b/ace/tests/ace-editor_navigation-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/ace/tests/ace-editor_navigation-tests.ts.tscparams +++ b/ace/tests/ace-editor_navigation-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/ace/tests/ace-editor_text_edit-tests.ts.tscparams b/ace/tests/ace-editor_text_edit-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/ace/tests/ace-editor_text_edit-tests.ts.tscparams +++ b/ace/tests/ace-editor_text_edit-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/ace/tests/ace-multi_select-tests.ts.tscparams b/ace/tests/ace-multi_select-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/ace/tests/ace-multi_select-tests.ts.tscparams +++ b/ace/tests/ace-multi_select-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/ace/tests/ace-placeholder-tests.ts.tscparams b/ace/tests/ace-placeholder-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/ace/tests/ace-placeholder-tests.ts.tscparams +++ b/ace/tests/ace-placeholder-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/ace/tests/ace-range-tests.ts.tscparams b/ace/tests/ace-range-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/ace/tests/ace-range-tests.ts.tscparams +++ b/ace/tests/ace-range-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/ace/tests/ace-range_list-tests.ts.tscparams b/ace/tests/ace-range_list-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/ace/tests/ace-range_list-tests.ts.tscparams +++ b/ace/tests/ace-range_list-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/ace/tests/ace-search-tests.ts.tscparams b/ace/tests/ace-search-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/ace/tests/ace-search-tests.ts.tscparams +++ b/ace/tests/ace-search-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/ace/tests/ace-selection-tests.ts.tscparams b/ace/tests/ace-selection-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/ace/tests/ace-selection-tests.ts.tscparams +++ b/ace/tests/ace-selection-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/ace/tests/ace-token_iterator-tests.ts.tscparams b/ace/tests/ace-token_iterator-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/ace/tests/ace-token_iterator-tests.ts.tscparams +++ b/ace/tests/ace-token_iterator-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/ace/tests/ace-virtual_renderer-tests.ts.tscparams b/ace/tests/ace-virtual_renderer-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/ace/tests/ace-virtual_renderer-tests.ts.tscparams +++ b/ace/tests/ace-virtual_renderer-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/amcharts/AmCharts.d.ts.tscparams b/amcharts/AmCharts.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/amcharts/AmCharts.d.ts.tscparams +++ b/amcharts/AmCharts.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/amplifyjs/amplifyjs-tests.ts.tscparams b/amplifyjs/amplifyjs-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/amplifyjs/amplifyjs-tests.ts.tscparams +++ b/amplifyjs/amplifyjs-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/amplifyjs/amplifyjs.d.ts.tscparams b/amplifyjs/amplifyjs.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/amplifyjs/amplifyjs.d.ts.tscparams +++ b/amplifyjs/amplifyjs.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/angularjs/legacy/angular-1.0-tests.ts.tscparams b/angularjs/legacy/angular-1.0-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/angularjs/legacy/angular-1.0-tests.ts.tscparams +++ b/angularjs/legacy/angular-1.0-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/angularjs/legacy/angular-scenario-1.0.d.ts.tscparams b/angularjs/legacy/angular-scenario-1.0.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/angularjs/legacy/angular-scenario-1.0.d.ts.tscparams +++ b/angularjs/legacy/angular-scenario-1.0.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/asciify/asciify.ts.tscparams b/asciify/asciify.ts.tscparams index 64dbb84a5..d68b297cb 100644 --- a/asciify/asciify.ts.tscparams +++ b/asciify/asciify.ts.tscparams @@ -1 +1 @@ -"--noImplicitAny --module commonjs" \ No newline at end of file +--noImplicitAny --module commonjs diff --git a/async/async-tests.ts.tscparams b/async/async-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/async/async-tests.ts.tscparams +++ b/async/async-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/atom/atom-tests.ts.tscparams b/atom/atom-tests.ts.tscparams index 5f84b9777..6331805a5 100644 --- a/atom/atom-tests.ts.tscparams +++ b/atom/atom-tests.ts.tscparams @@ -1 +1 @@ ---noImplicitAny --module commonjs --target es5 +--noImplicitAny --module commonjs --target es5 diff --git a/azure-mobile-services-client/AzureMobileServicesClient-tests.ts.tscparams b/azure-mobile-services-client/AzureMobileServicesClient-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/azure-mobile-services-client/AzureMobileServicesClient-tests.ts.tscparams +++ b/azure-mobile-services-client/AzureMobileServicesClient-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/backbone-relational/backbone-relational-tests.ts.tscparams b/backbone-relational/backbone-relational-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/backbone-relational/backbone-relational-tests.ts.tscparams +++ b/backbone-relational/backbone-relational-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/backbone-relational/backbone-relational.d.ts.tscparams b/backbone-relational/backbone-relational.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/backbone-relational/backbone-relational.d.ts.tscparams +++ b/backbone-relational/backbone-relational.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/backgrid/backgrid-tests.ts.tscparams b/backgrid/backgrid-tests.ts.tscparams index e85b4ac55..d45eb7650 100644 --- a/backgrid/backgrid-tests.ts.tscparams +++ b/backgrid/backgrid-tests.ts.tscparams @@ -1 +1 @@ ---target ES5 \ No newline at end of file +--target ES5 diff --git a/backgrid/backgrid.d.ts.tscparams b/backgrid/backgrid.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/backgrid/backgrid.d.ts.tscparams +++ b/backgrid/backgrid.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/bootstrap-notify/bootstrap-notify.d.ts.tscparams b/bootstrap-notify/bootstrap-notify.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/bootstrap-notify/bootstrap-notify.d.ts.tscparams +++ b/bootstrap-notify/bootstrap-notify.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/bootstrap.paginator/bootstrap.paginator.d.ts.tscparams b/bootstrap.paginator/bootstrap.paginator.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/bootstrap.paginator/bootstrap.paginator.d.ts.tscparams +++ b/bootstrap.paginator/bootstrap.paginator.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/browser-harness/browser-harness-tests.ts.tscparams b/browser-harness/browser-harness-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/browser-harness/browser-harness-tests.ts.tscparams +++ b/browser-harness/browser-harness-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/browser-harness/browser-harness.d.ts.tscparams b/browser-harness/browser-harness.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/browser-harness/browser-harness.d.ts.tscparams +++ b/browser-harness/browser-harness.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/camljs/camljs-tests.ts.tscparams b/camljs/camljs-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/camljs/camljs-tests.ts.tscparams +++ b/camljs/camljs-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/camljs/camljs.d.ts.tscparams b/camljs/camljs.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/camljs/camljs.d.ts.tscparams +++ b/camljs/camljs.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/chai-fuzzy/chai-fuzzy.d.ts.tscparams b/chai-fuzzy/chai-fuzzy.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/chai-fuzzy/chai-fuzzy.d.ts.tscparams +++ b/chai-fuzzy/chai-fuzzy.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/chai-jquery/chai-jquery-tests.ts.tscparams b/chai-jquery/chai-jquery-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/chai-jquery/chai-jquery-tests.ts.tscparams +++ b/chai-jquery/chai-jquery-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/chai/chai-tests.ts.tscparams b/chai/chai-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/chai/chai-tests.ts.tscparams +++ b/chai/chai-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/chrome/chrome-app-tests.ts.tscparams b/chrome/chrome-app-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/chrome/chrome-app-tests.ts.tscparams +++ b/chrome/chrome-app-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/chrome/chrome-app.d.ts.tscparams b/chrome/chrome-app.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/chrome/chrome-app.d.ts.tscparams +++ b/chrome/chrome-app.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/chrome/chrome-tests.ts.tscparams b/chrome/chrome-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/chrome/chrome-tests.ts.tscparams +++ b/chrome/chrome-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/convert-source-map/convert-source-map-tests.ts.tscparams b/convert-source-map/convert-source-map-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/convert-source-map/convert-source-map-tests.ts.tscparams +++ b/convert-source-map/convert-source-map-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/convert-source-map/convert-source-map.d.ts.tscparams b/convert-source-map/convert-source-map.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/convert-source-map/convert-source-map.d.ts.tscparams +++ b/convert-source-map/convert-source-map.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/crossroads/crossroads-tests.ts.tscparams b/crossroads/crossroads-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/crossroads/crossroads-tests.ts.tscparams +++ b/crossroads/crossroads-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/crossroads/crossroads.d.ts.tscparams b/crossroads/crossroads.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/crossroads/crossroads.d.ts.tscparams +++ b/crossroads/crossroads.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/d3/d3-tests.ts.tscparams b/d3/d3-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/d3/d3-tests.ts.tscparams +++ b/d3/d3-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/d3/plugins/d3.superformula-tests.ts.tscparams b/d3/plugins/d3.superformula-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/d3/plugins/d3.superformula-tests.ts.tscparams +++ b/d3/plugins/d3.superformula-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/dhtmlxgantt/dhtmlxgantt-tests.ts.tscparams b/dhtmlxgantt/dhtmlxgantt-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/dhtmlxgantt/dhtmlxgantt-tests.ts.tscparams +++ b/dhtmlxgantt/dhtmlxgantt-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/dhtmlxgantt/dhtmlxgantt.d.ts.tscparams b/dhtmlxgantt/dhtmlxgantt.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/dhtmlxgantt/dhtmlxgantt.d.ts.tscparams +++ b/dhtmlxgantt/dhtmlxgantt.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/dhtmlxscheduler/dhtmlxscheduler-tests.ts.tscparams b/dhtmlxscheduler/dhtmlxscheduler-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/dhtmlxscheduler/dhtmlxscheduler-tests.ts.tscparams +++ b/dhtmlxscheduler/dhtmlxscheduler-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/dhtmlxscheduler/dhtmlxscheduler.d.ts.tscparams b/dhtmlxscheduler/dhtmlxscheduler.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/dhtmlxscheduler/dhtmlxscheduler.d.ts.tscparams +++ b/dhtmlxscheduler/dhtmlxscheduler.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/domo/domo-tests.ts.tscparams b/domo/domo-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/domo/domo-tests.ts.tscparams +++ b/domo/domo-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/dropzone/dropzone.d.ts.tscparams b/dropzone/dropzone.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/dropzone/dropzone.d.ts.tscparams +++ b/dropzone/dropzone.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/durandal/durandal-1.x.d.ts.tscparams b/durandal/durandal-1.x.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/durandal/durandal-1.x.d.ts.tscparams +++ b/durandal/durandal-1.x.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/durandal/durandal.d.ts.tscparams b/durandal/durandal.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/durandal/durandal.d.ts.tscparams +++ b/durandal/durandal.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/dustjs-linkedin/dustjs-linkedin-tests.ts.tscparams b/dustjs-linkedin/dustjs-linkedin-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/dustjs-linkedin/dustjs-linkedin-tests.ts.tscparams +++ b/dustjs-linkedin/dustjs-linkedin-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/dustjs-linkedin/dustjs-linkedin.d.ts.tscparams b/dustjs-linkedin/dustjs-linkedin.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/dustjs-linkedin/dustjs-linkedin.d.ts.tscparams +++ b/dustjs-linkedin/dustjs-linkedin.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/ember/ember-tests.ts.tscparams b/ember/ember-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/ember/ember-tests.ts.tscparams +++ b/ember/ember-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/ember/ember.d.ts.tscparams b/ember/ember.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/ember/ember.d.ts.tscparams +++ b/ember/ember.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/epiceditor/epiceditor-tests.ts.tscparams b/epiceditor/epiceditor-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/epiceditor/epiceditor-tests.ts.tscparams +++ b/epiceditor/epiceditor-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/epiceditor/epiceditor.d.ts.tscparams b/epiceditor/epiceditor.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/epiceditor/epiceditor.d.ts.tscparams +++ b/epiceditor/epiceditor.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/express/express-tests.ts.tscparams b/express/express-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/express/express-tests.ts.tscparams +++ b/express/express-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/extjs/ExtJS-tests.ts.tscparams b/extjs/ExtJS-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/extjs/ExtJS-tests.ts.tscparams +++ b/extjs/ExtJS-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/fabricjs/fabricjs-tests.ts.tscparams b/fabricjs/fabricjs-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/fabricjs/fabricjs-tests.ts.tscparams +++ b/fabricjs/fabricjs-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/fabricjs/fabricjs.d.ts.tscparams b/fabricjs/fabricjs.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/fabricjs/fabricjs.d.ts.tscparams +++ b/fabricjs/fabricjs.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/fancybox/fancybox-tests.ts.tscparams b/fancybox/fancybox-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/fancybox/fancybox-tests.ts.tscparams +++ b/fancybox/fancybox-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/fancybox/fancybox.d.ts.tscparams b/fancybox/fancybox.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/fancybox/fancybox.d.ts.tscparams +++ b/fancybox/fancybox.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/flexSlider/flexSlider-tests.ts.tscparams b/flexSlider/flexSlider-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/flexSlider/flexSlider-tests.ts.tscparams +++ b/flexSlider/flexSlider-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/flexSlider/flexSlider.d.ts.tscparams b/flexSlider/flexSlider.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/flexSlider/flexSlider.d.ts.tscparams +++ b/flexSlider/flexSlider.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/flot/jquery.flot.d.ts.tscparams b/flot/jquery.flot.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/flot/jquery.flot.d.ts.tscparams +++ b/flot/jquery.flot.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/foundation/foundation-tests.ts.tscparams b/foundation/foundation-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/foundation/foundation-tests.ts.tscparams +++ b/foundation/foundation-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/foundation/foundation.d.ts.tscparams b/foundation/foundation.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/foundation/foundation.d.ts.tscparams +++ b/foundation/foundation.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/fullCalendar/fullCalendar-tests.ts.tscparams b/fullCalendar/fullCalendar-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/fullCalendar/fullCalendar-tests.ts.tscparams +++ b/fullCalendar/fullCalendar-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/gamequery/gamequery-tests.ts.tscparams b/gamequery/gamequery-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/gamequery/gamequery-tests.ts.tscparams +++ b/gamequery/gamequery-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/giraffe/giraffe-tests.ts.tscparams b/giraffe/giraffe-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/giraffe/giraffe-tests.ts.tscparams +++ b/giraffe/giraffe-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/giraffe/giraffe.d.ts.tscparams b/giraffe/giraffe.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/giraffe/giraffe.d.ts.tscparams +++ b/giraffe/giraffe.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/globalize/globalize-tests.ts.tscparams b/globalize/globalize-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/globalize/globalize-tests.ts.tscparams +++ b/globalize/globalize-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/goJS/goJS-tests.ts.tscparams b/goJS/goJS-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/goJS/goJS-tests.ts.tscparams +++ b/goJS/goJS-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/goJS/goJS.d.ts.tscparams b/goJS/goJS.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/goJS/goJS.d.ts.tscparams +++ b/goJS/goJS.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/history/history-tests.ts.tscparams b/history/history-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/history/history-tests.ts.tscparams +++ b/history/history-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/history/history.d.ts.tscparams b/history/history.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/history/history.d.ts.tscparams +++ b/history/history.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/humane/humane-tests.ts.tscparams b/humane/humane-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/humane/humane-tests.ts.tscparams +++ b/humane/humane-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/humane/humane.d.ts.tscparams b/humane/humane.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/humane/humane.d.ts.tscparams +++ b/humane/humane.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/jake/jake-tests.ts.tscparams b/jake/jake-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/jake/jake-tests.ts.tscparams +++ b/jake/jake-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/jasmine-fixture/jasmine-fixture-tests.ts.tscparams b/jasmine-fixture/jasmine-fixture-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/jasmine-fixture/jasmine-fixture-tests.ts.tscparams +++ b/jasmine-fixture/jasmine-fixture-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/jasmine-jquery/jasmine-jquery-tests.ts.tscparams b/jasmine-jquery/jasmine-jquery-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/jasmine-jquery/jasmine-jquery-tests.ts.tscparams +++ b/jasmine-jquery/jasmine-jquery-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/jasmine-jquery/jasmine-jquery.d.ts.tscparams b/jasmine-jquery/jasmine-jquery.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/jasmine-jquery/jasmine-jquery.d.ts.tscparams +++ b/jasmine-jquery/jasmine-jquery.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/jasmine-matchers/jasmine-matchers-tests.ts.tscparams b/jasmine-matchers/jasmine-matchers-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/jasmine-matchers/jasmine-matchers-tests.ts.tscparams +++ b/jasmine-matchers/jasmine-matchers-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/jointjs/jointjs.d.ts.tscparams b/jointjs/jointjs.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/jointjs/jointjs.d.ts.tscparams +++ b/jointjs/jointjs.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/jqrangeslider/jqrangeslider-tests.ts.tscparams b/jqrangeslider/jqrangeslider-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/jqrangeslider/jqrangeslider-tests.ts.tscparams +++ b/jqrangeslider/jqrangeslider-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/jqrangeslider/jqrangeslider.d.ts.tscparams b/jqrangeslider/jqrangeslider.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/jqrangeslider/jqrangeslider.d.ts.tscparams +++ b/jqrangeslider/jqrangeslider.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/jquery.address/jquery.address.d.ts.tscparams b/jquery.address/jquery.address.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/jquery.address/jquery.address.d.ts.tscparams +++ b/jquery.address/jquery.address.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/jquery.bbq/jquery.bbq-tests.ts.tscparams b/jquery.bbq/jquery.bbq-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/jquery.bbq/jquery.bbq-tests.ts.tscparams +++ b/jquery.bbq/jquery.bbq-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/jquery.bbq/jquery.bbq.d.ts.tscparams b/jquery.bbq/jquery.bbq.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/jquery.bbq/jquery.bbq.d.ts.tscparams +++ b/jquery.bbq/jquery.bbq.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/jquery.colorbox/jquery.colorbox-tests.ts.tscparams b/jquery.colorbox/jquery.colorbox-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/jquery.colorbox/jquery.colorbox-tests.ts.tscparams +++ b/jquery.colorbox/jquery.colorbox-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/jquery.colorbox/jquery.colorbox.d.ts.tscparams b/jquery.colorbox/jquery.colorbox.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/jquery.colorbox/jquery.colorbox.d.ts.tscparams +++ b/jquery.colorbox/jquery.colorbox.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/jquery.colorpicker/jquery.colorpicker-tests.ts.tscparams b/jquery.colorpicker/jquery.colorpicker-tests.ts.tscparams index 3cc762b55..d3f5a12fa 100644 --- a/jquery.colorpicker/jquery.colorpicker-tests.ts.tscparams +++ b/jquery.colorpicker/jquery.colorpicker-tests.ts.tscparams @@ -1 +1 @@ -"" \ No newline at end of file + diff --git a/jquery.contextMenu/jquery.contextMenu.d.ts.tscparams b/jquery.contextMenu/jquery.contextMenu.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/jquery.contextMenu/jquery.contextMenu.d.ts.tscparams +++ b/jquery.contextMenu/jquery.contextMenu.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/jquery.cycle/jquery.cycle-tests.ts.tscparams b/jquery.cycle/jquery.cycle-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/jquery.cycle/jquery.cycle-tests.ts.tscparams +++ b/jquery.cycle/jquery.cycle-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/jquery.dataTables/jquery.dataTables-tests.ts.tscparams b/jquery.dataTables/jquery.dataTables-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/jquery.dataTables/jquery.dataTables-tests.ts.tscparams +++ b/jquery.dataTables/jquery.dataTables-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/jquery.dynatree/jquery.dynatree.d.ts.tscparams b/jquery.dynatree/jquery.dynatree.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/jquery.dynatree/jquery.dynatree.d.ts.tscparams +++ b/jquery.dynatree/jquery.dynatree.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/jquery.jnotify/jquery.jnotify-tests.ts.tscparams b/jquery.jnotify/jquery.jnotify-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/jquery.jnotify/jquery.jnotify-tests.ts.tscparams +++ b/jquery.jnotify/jquery.jnotify-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/jquery.jnotify/jquery.jnotify.d.ts.tscparams b/jquery.jnotify/jquery.jnotify.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/jquery.jnotify/jquery.jnotify.d.ts.tscparams +++ b/jquery.jnotify/jquery.jnotify.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/jquery.noty/jquery.noty.d.ts.tscparams b/jquery.noty/jquery.noty.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/jquery.noty/jquery.noty.d.ts.tscparams +++ b/jquery.noty/jquery.noty.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/jquery.payment/jquery.payment.d.ts.tscparams b/jquery.payment/jquery.payment.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/jquery.payment/jquery.payment.d.ts.tscparams +++ b/jquery.payment/jquery.payment.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/jquery.pickadate/jquery.pickadate-tests.ts.tscparams b/jquery.pickadate/jquery.pickadate-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/jquery.pickadate/jquery.pickadate-tests.ts.tscparams +++ b/jquery.pickadate/jquery.pickadate-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/jquery.pickadate/jquery.pickadate.d.ts.tscparams b/jquery.pickadate/jquery.pickadate.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/jquery.pickadate/jquery.pickadate.d.ts.tscparams +++ b/jquery.pickadate/jquery.pickadate.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/jquery.timeago/jquery.timeago-tests.ts.tscparams b/jquery.timeago/jquery.timeago-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/jquery.timeago/jquery.timeago-tests.ts.tscparams +++ b/jquery.timeago/jquery.timeago-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/jquery.timepicker/jquery.timepicker-tests.ts.tscparams b/jquery.timepicker/jquery.timepicker-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/jquery.timepicker/jquery.timepicker-tests.ts.tscparams +++ b/jquery.timepicker/jquery.timepicker-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/jquery.timer/jquery.timer-tests.ts.tscparams b/jquery.timer/jquery.timer-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/jquery.timer/jquery.timer-tests.ts.tscparams +++ b/jquery.timer/jquery.timer-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/jquery.timer/jquery.timer.d.ts.tscparams b/jquery.timer/jquery.timer.d.ts.tscparams index 3cc762b55..d3f5a12fa 100644 --- a/jquery.timer/jquery.timer.d.ts.tscparams +++ b/jquery.timer/jquery.timer.d.ts.tscparams @@ -1 +1 @@ -"" \ No newline at end of file + diff --git a/jquery.tooltipster/jquery.tooltipster-tests.ts.tscparams b/jquery.tooltipster/jquery.tooltipster-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/jquery.tooltipster/jquery.tooltipster-tests.ts.tscparams +++ b/jquery.tooltipster/jquery.tooltipster-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/jquery.tooltipster/jquery.tooltipster.d.ts.tscparams b/jquery.tooltipster/jquery.tooltipster.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/jquery.tooltipster/jquery.tooltipster.d.ts.tscparams +++ b/jquery.tooltipster/jquery.tooltipster.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/jquery.ui.layout/jquery.ui.layout.d.ts.tscparams b/jquery.ui.layout/jquery.ui.layout.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/jquery.ui.layout/jquery.ui.layout.d.ts.tscparams +++ b/jquery.ui.layout/jquery.ui.layout.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/jquery.validation/jquery.validation-tests.ts.tscparams b/jquery.validation/jquery.validation-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/jquery.validation/jquery.validation-tests.ts.tscparams +++ b/jquery.validation/jquery.validation-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/jquery.watermark/jquery.watermark-tests.ts.tscparams b/jquery.watermark/jquery.watermark-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/jquery.watermark/jquery.watermark-tests.ts.tscparams +++ b/jquery.watermark/jquery.watermark-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/jquery/jquery-tests.ts.tscparams b/jquery/jquery-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/jquery/jquery-tests.ts.tscparams +++ b/jquery/jquery-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/jquerymobile/jquerymobile-tests.ts.tscparams b/jquerymobile/jquerymobile-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/jquerymobile/jquerymobile-tests.ts.tscparams +++ b/jquerymobile/jquerymobile-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/jqueryui/jqueryui-tests.ts.tscparams b/jqueryui/jqueryui-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/jqueryui/jqueryui-tests.ts.tscparams +++ b/jqueryui/jqueryui-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/js-signals/js-signals.d.ts.tscparams b/js-signals/js-signals.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/js-signals/js-signals.d.ts.tscparams +++ b/js-signals/js-signals.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/jscrollpane/jscrollpane.d.ts.tscparams b/jscrollpane/jscrollpane.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/jscrollpane/jscrollpane.d.ts.tscparams +++ b/jscrollpane/jscrollpane.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/jsdeferred/jsdeferred-tests.ts.tscparams b/jsdeferred/jsdeferred-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/jsdeferred/jsdeferred-tests.ts.tscparams +++ b/jsdeferred/jsdeferred-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/jsdeferred/jsdeferred.d.ts.tscparams b/jsdeferred/jsdeferred.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/jsdeferred/jsdeferred.d.ts.tscparams +++ b/jsdeferred/jsdeferred.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/jsfl/jsfl.d.ts.tscparams b/jsfl/jsfl.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/jsfl/jsfl.d.ts.tscparams +++ b/jsfl/jsfl.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/jsfl/xJSFL.d.ts.tscparams b/jsfl/xJSFL.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/jsfl/xJSFL.d.ts.tscparams +++ b/jsfl/xJSFL.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/jsoneditoronline/jsoneditoronline-tests.ts.tscparams b/jsoneditoronline/jsoneditoronline-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/jsoneditoronline/jsoneditoronline-tests.ts.tscparams +++ b/jsoneditoronline/jsoneditoronline-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/jsoneditoronline/jsoneditoronline.d.ts.tscparams b/jsoneditoronline/jsoneditoronline.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/jsoneditoronline/jsoneditoronline.d.ts.tscparams +++ b/jsoneditoronline/jsoneditoronline.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/jsplumb/jquery.jsPlumb.d.ts.tscparams b/jsplumb/jquery.jsPlumb.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/jsplumb/jquery.jsPlumb.d.ts.tscparams +++ b/jsplumb/jquery.jsPlumb.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/knockback/knockback.d.ts.tscparams b/knockback/knockback.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/knockback/knockback.d.ts.tscparams +++ b/knockback/knockback.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/knockout.deferred.updates/knockout.deferred.updates-tests.ts.tscparams b/knockout.deferred.updates/knockout.deferred.updates-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/knockout.deferred.updates/knockout.deferred.updates-tests.ts.tscparams +++ b/knockout.deferred.updates/knockout.deferred.updates-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/knockout.deferred.updates/knockout.deferred.updates.d.ts.tscparams b/knockout.deferred.updates/knockout.deferred.updates.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/knockout.deferred.updates/knockout.deferred.updates.d.ts.tscparams +++ b/knockout.deferred.updates/knockout.deferred.updates.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/knockout.es5/knockout.es5-tests.ts.tscparams b/knockout.es5/knockout.es5-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/knockout.es5/knockout.es5-tests.ts.tscparams +++ b/knockout.es5/knockout.es5-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/knockout.es5/knockout.es5.d.ts.tscparams b/knockout.es5/knockout.es5.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/knockout.es5/knockout.es5.d.ts.tscparams +++ b/knockout.es5/knockout.es5.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/knockout.mapping/knockout.mapping.d.ts.tscparams b/knockout.mapping/knockout.mapping.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/knockout.mapping/knockout.mapping.d.ts.tscparams +++ b/knockout.mapping/knockout.mapping.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/knockout.viewmodel/knockout.viewmodel.d.ts.tscparams b/knockout.viewmodel/knockout.viewmodel.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/knockout.viewmodel/knockout.viewmodel.d.ts.tscparams +++ b/knockout.viewmodel/knockout.viewmodel.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/knockout/all-tests.ts.tscparams b/knockout/all-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/knockout/all-tests.ts.tscparams +++ b/knockout/all-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/knockout/tests/knockout-templatingBehaviors-tests.ts.tscparams b/knockout/tests/knockout-templatingBehaviors-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/knockout/tests/knockout-templatingBehaviors-tests.ts.tscparams +++ b/knockout/tests/knockout-templatingBehaviors-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/knockout/tests/knockout-tests.ts.tscparams b/knockout/tests/knockout-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/knockout/tests/knockout-tests.ts.tscparams +++ b/knockout/tests/knockout-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/kolite/kolite-tests.ts.tscparams b/kolite/kolite-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/kolite/kolite-tests.ts.tscparams +++ b/kolite/kolite-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/kolite/kolite.d.ts.tscparams b/kolite/kolite.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/kolite/kolite.d.ts.tscparams +++ b/kolite/kolite.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/less/less-tests.ts.tscparams b/less/less-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/less/less-tests.ts.tscparams +++ b/less/less-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/less/less.d.ts.tscparams b/less/less.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/less/less.d.ts.tscparams +++ b/less/less.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/levelup/levelup-tests.ts.tscparams b/levelup/levelup-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/levelup/levelup-tests.ts.tscparams +++ b/levelup/levelup-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/levelup/levelup.d.ts.tscparams b/levelup/levelup.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/levelup/levelup.d.ts.tscparams +++ b/levelup/levelup.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/libxmljs/libxmljs-tests.ts.tscparams b/libxmljs/libxmljs-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/libxmljs/libxmljs-tests.ts.tscparams +++ b/libxmljs/libxmljs-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/libxmljs/libxmljs.d.ts.tscparams b/libxmljs/libxmljs.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/libxmljs/libxmljs.d.ts.tscparams +++ b/libxmljs/libxmljs.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/linq/linq-tests.ts.tscparams b/linq/linq-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/linq/linq-tests.ts.tscparams +++ b/linq/linq-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/linq/linq.3.0.3-Beta4.d.ts.tscparams b/linq/linq.3.0.3-Beta4.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/linq/linq.3.0.3-Beta4.d.ts.tscparams +++ b/linq/linq.3.0.3-Beta4.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/linq/linq.d.ts.tscparams b/linq/linq.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/linq/linq.d.ts.tscparams +++ b/linq/linq.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/linq/linq.jquery.d.ts.tscparams b/linq/linq.jquery.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/linq/linq.jquery.d.ts.tscparams +++ b/linq/linq.jquery.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/marionette/marionette.d.ts.tscparams b/marionette/marionette.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/marionette/marionette.d.ts.tscparams +++ b/marionette/marionette.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/meteor/meteor-tests.ts.tscparams b/meteor/meteor-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/meteor/meteor-tests.ts.tscparams +++ b/meteor/meteor-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/meteor/meteor.d.ts.tscparams b/meteor/meteor.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/meteor/meteor.d.ts.tscparams +++ b/meteor/meteor.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/modernizr/modernizr-tests.ts.tscparams b/modernizr/modernizr-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/modernizr/modernizr-tests.ts.tscparams +++ b/modernizr/modernizr-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/msnodesql/msnodesql-tests.ts.tscparams b/msnodesql/msnodesql-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/msnodesql/msnodesql-tests.ts.tscparams +++ b/msnodesql/msnodesql-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/msnodesql/msnodesql.d.ts.tscparams b/msnodesql/msnodesql.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/msnodesql/msnodesql.d.ts.tscparams +++ b/msnodesql/msnodesql.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/mustache/mustache-tests.ts.tscparams b/mustache/mustache-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/mustache/mustache-tests.ts.tscparams +++ b/mustache/mustache-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/mustache/mustache.d.ts.tscparams b/mustache/mustache.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/mustache/mustache.d.ts.tscparams +++ b/mustache/mustache.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/noVNC/noVNC-tests.ts.tscparams b/noVNC/noVNC-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/noVNC/noVNC-tests.ts.tscparams +++ b/noVNC/noVNC-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/noVNC/noVNC.d.ts.tscparams b/noVNC/noVNC.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/noVNC/noVNC.d.ts.tscparams +++ b/noVNC/noVNC.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/node-fibers/node-fibers-tests.ts.tscparams b/node-fibers/node-fibers-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/node-fibers/node-fibers-tests.ts.tscparams +++ b/node-fibers/node-fibers-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/node-fibers/node-fibers.d.ts.tscparams b/node-fibers/node-fibers.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/node-fibers/node-fibers.d.ts.tscparams +++ b/node-fibers/node-fibers.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/node/node-0.8.8.d.ts.tscparams b/node/node-0.8.8.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/node/node-0.8.8.d.ts.tscparams +++ b/node/node-0.8.8.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/node_redis/node_redis-tests.ts.tscparams b/node_redis/node_redis-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/node_redis/node_redis-tests.ts.tscparams +++ b/node_redis/node_redis-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/node_redis/node_redis.d.ts.tscparams b/node_redis/node_redis.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/node_redis/node_redis.d.ts.tscparams +++ b/node_redis/node_redis.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/parallel/parallel-tests.ts.tscparams b/parallel/parallel-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/parallel/parallel-tests.ts.tscparams +++ b/parallel/parallel-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/pdf/pdf-tests.ts.tscparams b/pdf/pdf-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/pdf/pdf-tests.ts.tscparams +++ b/pdf/pdf-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/pdf/pdf.d.ts.tscparams b/pdf/pdf.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/pdf/pdf.d.ts.tscparams +++ b/pdf/pdf.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/persona/persona-tests.ts.tscparams b/persona/persona-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/persona/persona-tests.ts.tscparams +++ b/persona/persona-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/persona/persona.d.ts.tscparams b/persona/persona.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/persona/persona.d.ts.tscparams +++ b/persona/persona.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/phonegap/phonegap-tests.ts.tscparams b/phonegap/phonegap-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/phonegap/phonegap-tests.ts.tscparams +++ b/phonegap/phonegap-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/phonejs/dx.phonejs-tests.ts.tscparams b/phonejs/dx.phonejs-tests.ts.tscparams index 3cc762b55..d3f5a12fa 100644 --- a/phonejs/dx.phonejs-tests.ts.tscparams +++ b/phonejs/dx.phonejs-tests.ts.tscparams @@ -1 +1 @@ -"" \ No newline at end of file + diff --git a/pixi/pixi-tests.ts.tscparams b/pixi/pixi-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/pixi/pixi-tests.ts.tscparams +++ b/pixi/pixi-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/pixi/pixi.d.ts.tscparams b/pixi/pixi.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/pixi/pixi.d.ts.tscparams +++ b/pixi/pixi.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/popcorn/popcorn.d.ts.tscparams b/popcorn/popcorn.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/popcorn/popcorn.d.ts.tscparams +++ b/popcorn/popcorn.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/pouchDB/pouch-tests.ts.tscparams b/pouchDB/pouch-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/pouchDB/pouch-tests.ts.tscparams +++ b/pouchDB/pouch-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/pouchDB/pouch.d.ts.tscparams b/pouchDB/pouch.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/pouchDB/pouch.d.ts.tscparams +++ b/pouchDB/pouch.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/qunit/qunit-tests.ts.tscparams b/qunit/qunit-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/qunit/qunit-tests.ts.tscparams +++ b/qunit/qunit-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/raphael/raphael-tests.ts.tscparams b/raphael/raphael-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/raphael/raphael-tests.ts.tscparams +++ b/raphael/raphael-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/restangular/restangular-tests.ts.tscparams b/restangular/restangular-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/restangular/restangular-tests.ts.tscparams +++ b/restangular/restangular-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/restify/restify-tests.ts.tscparams b/restify/restify-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/restify/restify-tests.ts.tscparams +++ b/restify/restify-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/rethinkdb/rethinkdb-tests.ts.tscparams b/rethinkdb/rethinkdb-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/rethinkdb/rethinkdb-tests.ts.tscparams +++ b/rethinkdb/rethinkdb-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/rethinkdb/rethinkdb.d.ts.tscparams b/rethinkdb/rethinkdb.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/rethinkdb/rethinkdb.d.ts.tscparams +++ b/rethinkdb/rethinkdb.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/sammyjs/sammyjs-tests.ts.tscparams b/sammyjs/sammyjs-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/sammyjs/sammyjs-tests.ts.tscparams +++ b/sammyjs/sammyjs-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/sammyjs/sammyjs.d.ts.tscparams b/sammyjs/sammyjs.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/sammyjs/sammyjs.d.ts.tscparams +++ b/sammyjs/sammyjs.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/scroller/scroller-tests.ts.tscparams b/scroller/scroller-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/scroller/scroller-tests.ts.tscparams +++ b/scroller/scroller-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/select2/select2-tests.ts.tscparams b/select2/select2-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/select2/select2-tests.ts.tscparams +++ b/select2/select2-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/sencha_touch/SenchaTouch-Tests.ts.tscparams b/sencha_touch/SenchaTouch-Tests.ts.tscparams index 3cc762b55..d3f5a12fa 100644 --- a/sencha_touch/SenchaTouch-Tests.ts.tscparams +++ b/sencha_touch/SenchaTouch-Tests.ts.tscparams @@ -1 +1 @@ -"" \ No newline at end of file + diff --git a/sharepoint/SharePoint-tests.ts.tscparams b/sharepoint/SharePoint-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/sharepoint/SharePoint-tests.ts.tscparams +++ b/sharepoint/SharePoint-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/sharepoint/SharePoint.d.ts.tscparams b/sharepoint/SharePoint.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/sharepoint/SharePoint.d.ts.tscparams +++ b/sharepoint/SharePoint.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/siesta/siesta-tests.ts.tscparams b/siesta/siesta-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/siesta/siesta-tests.ts.tscparams +++ b/siesta/siesta-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/siesta/siesta.d.ts.tscparams b/siesta/siesta.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/siesta/siesta.d.ts.tscparams +++ b/siesta/siesta.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/sinon-chai/sinon-chai-tests.ts.tscparams b/sinon-chai/sinon-chai-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/sinon-chai/sinon-chai-tests.ts.tscparams +++ b/sinon-chai/sinon-chai-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/socket.io/socket.io-tests.ts.tscparams b/socket.io/socket.io-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/socket.io/socket.io-tests.ts.tscparams +++ b/socket.io/socket.io-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/stripe/stripe.d.ts.tscparams b/stripe/stripe.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/stripe/stripe.d.ts.tscparams +++ b/stripe/stripe.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/swiper/swiper-tests.ts.tscparams b/swiper/swiper-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/swiper/swiper-tests.ts.tscparams +++ b/swiper/swiper-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/swiper/swiper.d.ts.tscparams b/swiper/swiper.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/swiper/swiper.d.ts.tscparams +++ b/swiper/swiper.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/swipeview/swipeview-tests.ts.tscparams b/swipeview/swipeview-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/swipeview/swipeview-tests.ts.tscparams +++ b/swipeview/swipeview-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/teechart/teechart.d.ts.tscparams b/teechart/teechart.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/teechart/teechart.d.ts.tscparams +++ b/teechart/teechart.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/threejs/three-tests.ts.tscparams b/threejs/three-tests.ts.tscparams index 3b6942a9d..d3f5a12fa 100644 --- a/threejs/three-tests.ts.tscparams +++ b/threejs/three-tests.ts.tscparams @@ -1,2 +1 @@ -"" - + diff --git a/through/through-tests.ts.tscparams b/through/through-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/through/through-tests.ts.tscparams +++ b/through/through-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/through/through.d.ts.tscparams b/through/through.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/through/through.d.ts.tscparams +++ b/through/through.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/titanium/titanium-tests.ts.tscparams b/titanium/titanium-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/titanium/titanium-tests.ts.tscparams +++ b/titanium/titanium-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/toastr/toastr-tests.ts.tscparams b/toastr/toastr-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/toastr/toastr-tests.ts.tscparams +++ b/toastr/toastr-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/tween.js/tween.js.d.ts.tscparams b/tween.js/tween.js.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/tween.js/tween.js.d.ts.tscparams +++ b/tween.js/tween.js.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/underscore/underscore-tests.ts.tscparams b/underscore/underscore-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/underscore/underscore-tests.ts.tscparams +++ b/underscore/underscore-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/unity-webapi/unity-webapi-tests.ts.tscparams b/unity-webapi/unity-webapi-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/unity-webapi/unity-webapi-tests.ts.tscparams +++ b/unity-webapi/unity-webapi-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/unity-webapi/unity-webapi.d.ts.tscparams b/unity-webapi/unity-webapi.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/unity-webapi/unity-webapi.d.ts.tscparams +++ b/unity-webapi/unity-webapi.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/urijs/URI.d.ts.tscparams b/urijs/URI.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/urijs/URI.d.ts.tscparams +++ b/urijs/URI.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/viewporter/viewporter-tests.ts.tscparams b/viewporter/viewporter-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/viewporter/viewporter-tests.ts.tscparams +++ b/viewporter/viewporter-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/vimeo/froogaloop.d.ts.tscparams b/vimeo/froogaloop.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/vimeo/froogaloop.d.ts.tscparams +++ b/vimeo/froogaloop.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/webaudioapi/waa-nightly.d.ts.tscparams b/webaudioapi/waa-nightly.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/webaudioapi/waa-nightly.d.ts.tscparams +++ b/webaudioapi/waa-nightly.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/webrtc/MediaStream-tests.ts.tscparams b/webrtc/MediaStream-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/webrtc/MediaStream-tests.ts.tscparams +++ b/webrtc/MediaStream-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/webrtc/MediaStream.d.ts.tscparams b/webrtc/MediaStream.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/webrtc/MediaStream.d.ts.tscparams +++ b/webrtc/MediaStream.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/webrtc/RTCPeerConnection-tests.ts.tscparams b/webrtc/RTCPeerConnection-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/webrtc/RTCPeerConnection-tests.ts.tscparams +++ b/webrtc/RTCPeerConnection-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/webrtc/RTCPeerConnection.d.ts.tscparams b/webrtc/RTCPeerConnection.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/webrtc/RTCPeerConnection.d.ts.tscparams +++ b/webrtc/RTCPeerConnection.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/xsockets/XSockets-tests.ts.tscparams b/xsockets/XSockets-tests.ts.tscparams index 3cc762b55..d3f5a12fa 100644 --- a/xsockets/XSockets-tests.ts.tscparams +++ b/xsockets/XSockets-tests.ts.tscparams @@ -1 +1 @@ -"" \ No newline at end of file + diff --git a/youtube/youtube.d.ts.tscparams b/youtube/youtube.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/youtube/youtube.d.ts.tscparams +++ b/youtube/youtube.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/zepto/zepto-tests.ts.tscparams b/zepto/zepto-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/zepto/zepto-tests.ts.tscparams +++ b/zepto/zepto-tests.ts.tscparams @@ -1 +1 @@ -"" + From 0f047f851f5c5ccd7876ecabddd46e476e678b84 Mon Sep 17 00:00:00 2001 From: Kim Birkelund Date: Wed, 3 Sep 2014 12:30:12 +0200 Subject: [PATCH 024/221] Fixed definition of KnockoutComputedContext.isInitial: should be () => boolean, was boolean. --- knockout/knockout.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/knockout/knockout.d.ts b/knockout/knockout.d.ts index 48f550dfe..27487c7a6 100644 --- a/knockout/knockout.d.ts +++ b/knockout/knockout.d.ts @@ -586,7 +586,7 @@ interface KnockoutComponentConfig { interface KnockoutComputedContext { getDependenciesCount(): number; - isInitial: boolean; + isInitial: () => boolean; isSleeping: boolean; } From f29f862cf4ac99e66790ad2b6f326c924a847b93 Mon Sep 17 00:00:00 2001 From: Saftpresse99 Date: Wed, 3 Sep 2014 13:56:53 +0200 Subject: [PATCH 025/221] Update typeahead.d.ts Implement typeahead.js bloodhound suggestion engine: https://github.com/twitter/typeahead.js/blob/master/doc/bloodhound.md Take input from here: https://github.com/borisyankov/DefinitelyTyped/pull/2239 with some modifications. --- typeahead/typeahead.d.ts | 224 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 224 insertions(+) diff --git a/typeahead/typeahead.d.ts b/typeahead/typeahead.d.ts index c2d50dfc4..34ea56597 100644 --- a/typeahead/typeahead.d.ts +++ b/typeahead/typeahead.d.ts @@ -186,3 +186,227 @@ declare module Twitter.Typeahead { minLength?: number; } } +declare module Bloodhound +{ + interface BloodhoundOptions + { + /** + * Transforms a datum into an array of string tokens + * + * @constructor + * @param datum individual units that compose the dataset + */ + datumTokenizer?: any; + /** + * Transforms a query into an array of string tokens + * + * @constructor + * @param query tokenizer query + */ + queryTokenizer?: any; + /** + * The max number of suggestions to return from Bloodhound#get. + * If not reached, the data source will attempt to backfill the suggestions from remote. Defaults to 5 + */ + limit?: number; + /** + * If set, this is expected to be a function with the signature (remoteMatch, localMatch) that returns true if the datums are duplicates or false otherwise. + * If not set, duplicate detection will not be performed. + */ + dupDetector?: (remoteMatch: T, localMatch: T) => boolean; + /** + * A compare function used to sort matched datums for a given query. + */ + sorter?: (a: T, b: T) => T[]; + /** + *An array of datums or a function that returns an array of datums. + */ + local?: () => T[]; + /** + * Can be a URL to a JSON file containing an array of datums or, if more configurability is needed, a prefetch options hash. + */ + prefetch?: PrefetchOptions; + /** + * Can be a URL to fetch suggestions from when the data provided by local and prefetch is insufficient or, if more configurability is needed, a remote options hash. + */ + remote?: RemoteOptions; + } + + /** + * Prefetched data is fetched and processed on initialization. + * If the browser supports localStorage, the processed data will be cached + * there to prevent additional network requests on subsequent page loads. + */ + interface PrefetchOptions + { + /** + * A URL to a JSON file containing an array of datums. Required. + */ + url: string; + /** + * The time (in milliseconds) the prefetched data should be cached + * in localStorage. Defaults to 86400000 (1 day). + */ + ttl?: number; + /** + * A function that transforms the response body into an array of datums. + * + * @param parsedResponse Response body + */ + filter?: (parsedResponse: any) => T[]; + /** 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 match what's stored in local storage, the data will be refetched. + */ + thumbprint?: string; + /** + * The ajax settings object passed to jQuery.ajax. + */ + ajax?: JQueryAjaxSettings; + } + + /** + * Remote data is only used when the data provided by local and prefetch + * is insufficient. In order to prevent an obscene number of requests + * being made to remote endpoint, typeahead.js rate-limits remote requests. + */ + interface RemoteOptions + { + /** + * A URL to make requests to when the data provided by local and + * prefetch is insufficient. Required. + */ + url: string; + /** + * The pattern in url that will be replaced with the user's query + * when a request is made. Defaults to %QUERY. + */ + wildcard?: string; + /** + * Overrides the request URL. If set, no wildcard substitution will + * be performed on url. + * + * @param url Replacement URL + * @param uriEncodedQuery Encoded query + * @returns A valid URL + */ + replace?: (url: string, uriEncodedQuery: string) => string; + /** + * The function used for rate-limiting network requests. + * Can be either 'debounce' or 'throttle'. Defaults to 'debounce'. + */ + rateLimitby?: string; + /** + * The time interval in milliseconds that will be used by rateLimitFn. + * Defaults to 300. + */ + rateLimitWait?: number; + + /** + * Transforms the response body into an array of datums. + * + * @param parsedResponse Response body + */ + filter?: (parsedResponse: any) => T[]; + /** + * The ajax settings object passed to jQuery.ajax. + */ + ajax?: JQueryAjaxSettings; + } + + /** + * The most common tokenization methods. + */ + interface Tokenizers + { + /** + * Split a given string on whitespace characters. + */ + whitespace(query: string): string[]; + /** + * Split a given string on non-word characters. + */ + nonword(query: string): string[]; + + /** + * Instances of the most common tokenization methods. + */ + obj: ObjTokenizer; + } + + interface ObjTokenizer + { + /** + * Split a given string on whitespace characters. + */ + whitespace(query: string): string[]; + /** + * Split a given string on non-word characters. + */ + nonword(query: string): string[]; + } +} + +declare class Bloodhound { + constructor(options: Bloodhound.BloodhoundOptions) + /** + * wraps the suggestion engine in an adapter that is compatible with the typeahead jQuery plugin + */ + public ttAdapter(): any; + /** + * Kicks off the initialization of the suggestion engine. This includes processing the data provided through local and fetching/processing the data provided through prefetch. + * Until initialized, all other methods will behave as no-ops. + * Returns a jQuery promise which is resolved when engine has been initialized. + * + * After the initial call of initialize, how subsequent invocations of the method 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. + * + * var promise1 = engine.initialize(); + * var promise2 = engine.initialize(); + * var promise3 = engine.initialize(true); + * + * promise1 === promise2; + * promise3 !== promise1 && promise3 !== promise2; + */ + public initialize(reinitialize?: boolean): JQueryPromise; + /** + * Takes one argument, datums, which is expected to be an array of datums. + * The passed in datums will get added to the search index that powers the suggestion engine. + */ + public add(datums: T[]): void; + /** + * Removes all suggestions from the search index. + */ + public clear(): void; + /** + * If you're using prefetch, data gets cached in local storage in an effort to cut down on unnecessary network requests. + * clearPrefetchCache offers a way to programmatically clear said cache. + */ + public clearPrefetchCache(): void; + /** + * If you're using remote, Bloodhound will cache the 10 most recent responses in an effort to provide a better user experience. + * clearRemoteCache offers a way to programmatically clear said cache. + */ + public clearRemoteCache(): void; + /** + * Returns a reference to the Bloodhound constructor and reverts window.Bloodhound to its previous value. Can be used to avoid naming collisions. + */ + public noConflict(): any; + + /** + * Computes a set of suggestions for query. cb will be invoked with an array of datums that represent said set. + * cb will always be invoked once synchronously with suggestions that were available on the client. + * If those suggestions are insufficient (# of suggestions is less than limit) and remote was configured, cb may also be invoked asynchronously with the suggestions available on the client mixed with suggestions from the remote source. + */ + public get(query: string, cb: (datums: T[]) => void): void; + + /** + * The Bloodhound suggestion engine is token-based, so how datums and queries are tokenized plays a vital role in the quality of search results. + * Specify how you want datums and queries tokenized. + */ + public static tokenizers: Bloodhound.Tokenizers; +} From 660d172a48a1a36612d99a37597fdbe5c834aa3d Mon Sep 17 00:00:00 2001 From: Masaya Nasu Date: Wed, 3 Sep 2014 23:32:20 +0900 Subject: [PATCH 026/221] add leanModal --- jquery.leanModal/jquery.leanModal-tests.ts | 18 ++++++++++++++++ jquery.leanModal/jquery.leanModal.d.ts | 24 ++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100755 jquery.leanModal/jquery.leanModal-tests.ts create mode 100755 jquery.leanModal/jquery.leanModal.d.ts diff --git a/jquery.leanModal/jquery.leanModal-tests.ts b/jquery.leanModal/jquery.leanModal-tests.ts new file mode 100755 index 000000000..fdcaee53e --- /dev/null +++ b/jquery.leanModal/jquery.leanModal-tests.ts @@ -0,0 +1,18 @@ +/// +/// + +class LeanModalOptions implements JQueryLeanModalOption { + top : number; + overlay : number; + closeButton: string; +} + +$.leanModal(); + +var leanModalOptions = new LeanModalOptions; + +leanModalOptions.top = 200; +leanModalOptions.overlay = 0.5; +leanModalOptions.closeButton = ".close_button"; + +$.leanModal(leanModalOptions); diff --git a/jquery.leanModal/jquery.leanModal.d.ts b/jquery.leanModal/jquery.leanModal.d.ts new file mode 100755 index 000000000..f4f395e58 --- /dev/null +++ b/jquery.leanModal/jquery.leanModal.d.ts @@ -0,0 +1,24 @@ + + +/// + +interface JQueryLeanModalOption { + top : number; + overlay : number; + closeButton : String; +} + +interface JQueryLeanModalStatic { + ():any; + (JQueryLeanModalOption):any; +} + +interface JQueryStatic { + leanModal(): JQueryLeanModalStatic; + leanModal(JQueryLeanModalOption): JQueryLeanModalStatic; +} + +interface JQuery { + leanModal(): JQueryLeanModalStatic; + leanModal(JQueryLeanModalOption): JQueryLeanModalStatic; +} \ No newline at end of file From f2646a12ef822d0f639a859153e864c6312a75b4 Mon Sep 17 00:00:00 2001 From: Igor Kriklivets Date: Wed, 3 Sep 2014 19:58:15 +0400 Subject: [PATCH 027/221] Old versions removed --- chartjs/dx.chartjs-tests.ts | 26 - chartjs/dx.chartjs.d.ts | 1662 ----------------------------------- phonejs/dx.phonejs-tests.ts | 265 ------ phonejs/dx.phonejs.d.ts | 1220 ------------------------- 4 files changed, 3173 deletions(-) delete mode 100644 chartjs/dx.chartjs-tests.ts delete mode 100644 chartjs/dx.chartjs.d.ts delete mode 100644 phonejs/dx.phonejs-tests.ts delete mode 100644 phonejs/dx.phonejs.d.ts diff --git a/chartjs/dx.chartjs-tests.ts b/chartjs/dx.chartjs-tests.ts deleted file mode 100644 index 70c53a602..000000000 --- a/chartjs/dx.chartjs-tests.ts +++ /dev/null @@ -1,26 +0,0 @@ -/// - -module Test { - $("
").appendTo(document.body).dxChart({ - size: { - width: 600, - height: 400 - }, - title: { - text: 'Chart in jQuery mode', - font: { color: 'rgb(0, 128, 128)!important' } - }, - argumentAxis: { - categories: ['January', 'February', 'March', 'April', 'May', 'June'] - }, - dataSource: [ - { arg: 'January', v1: 10, v2: 20, v3: 24 }, - { arg: 'February', v1: 5, v2: 35, v3: 43 }, - { arg: 'March', v1: 50, v2: 10, v3: 80 }, - { arg: 'April', v1: 9, v2: 79, v3: 39 }, - { arg: 'May', v1: 100, v2: 42, v3: 22 }, - { arg: 'June', v1: 95, v2: 11, v3: 41 } - ], - series: [{ valueField: 'v1' }, { valueField: 'v2' }, { valueField: 'v3' }] - }); -} \ No newline at end of file diff --git a/chartjs/dx.chartjs.d.ts b/chartjs/dx.chartjs.d.ts deleted file mode 100644 index 7c961da9e..000000000 --- a/chartjs/dx.chartjs.d.ts +++ /dev/null @@ -1,1662 +0,0 @@ -// Type definitions for ChartJS -// Project: http://chartjs.devexpress.com -// Definitions by: DevExpress Inc. -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/// - -declare module DevExpress { - export function abstract(): void; - interface Endpoint { - local?: string; - production: string; - } - class EndpointSelector { - constructor(config: { [key: string]: Endpoint }); - urlFor(key: string): string; - } - export interface ActionOptions { - context?: Object; - component?: any; - beforeExecute? (e: ActionExecuteArgs): void; - afterExecute? (e: ActionExecuteArgs): void; - } - export interface ActionExecuteArgs { - action: any; - args: any[]; - context: any; - component: any; - canceled: boolean; - handled: boolean; - } - export class Action { - constructor(action?: any, config?: ActionOptions); - execute(): any; - } - export module devices { - interface Device { - phone?: boolean; - tablet?: boolean; - android?: boolean; - ios?: boolean; - win8?: boolean; - tizen?: boolean; - platform?: string; - deviceType?: string; - } - export function current(): Device; - export function current(device: Device): Device; - export var real: Device; - } -} -declare module DevExpress.data { - export interface ErrorHandler { (e: Error): void; } - export interface EntityOptions { key: any; keyType: any; } - export interface Getter { (obj: any, options?: any): any; } - export interface Setter { (obj: any, value: any, options?: any): void; } - export interface QueryOptions { - errorHandler?: ErrorHandler; - requireTotalCount?: boolean; - } - export interface ODataQueryOptions extends QueryOptions { - adapter?: any; - } - interface IQuery { - enumerate(): JQueryDeferred>; - count(): JQueryDeferred; - slice(skip: number, take?: number): IQuery; - sortBy(field: string[]): IQuery; - sortBy(field: Getter[]): IQuery; - sortBy(field: { field: string; desc?: boolean }[]): IQuery; - sortBy(field: { field: Getter; desc?: boolean }[]): IQuery; - thenBy(field: string[]): IQuery; - thenBy(field: Getter[]): IQuery; - thenBy(field: { field: string; desc?: boolean }[]): IQuery; - thenBy(field: { field: Getter; desc?: boolean }[]): IQuery; - filter(field: string, operator: string, value: any): IQuery; - filter(field: string, value: any): IQuery; - filter(criteria: any[]): IQuery; - select(field: string): IQuery; - select(field: string[]): IQuery; - select(...field: string[]): IQuery; - select(field: Getter): IQuery; - select(field: Getter[]): IQuery; - select(...field: Getter[]): IQuery; - groupBy(field: string[]): IQuery; - groupBy(field: Getter[]): IQuery; - groupBy(field: { field: string; desc?: boolean }[]): IQuery; - groupBy(field: { field: Getter; desc?: boolean }[]): IQuery; - sum(getter?: string): JQueryDeferred; - min(getter?: string): JQueryDeferred; - max(getter?: string): JQueryDeferred; - avg(getter?: string): JQueryDeferred; - aggregate(step: number): JQueryDeferred; - aggregate(seed: number, step: (accumulator: any, current: any) => any, finalize?: (accumulator: any) => any): JQueryDeferred; - } - export interface ArrayQuery extends IQuery { - toArray(): Array; - } - export interface RemoteQuery extends IQuery { /*todo: exec() ? */ } - export function base64_encode(input: string): string; - export function base64_encode(input: any[]): string; - export function query(items?: any[]): IQuery; - export var queryImpl: { - remote: (url: string, queryOptions: QueryOptions) => RemoteQuery; - array: (iter: Array, queryOptions: QueryOptions) => ArrayQuery; - }; - export class Guid { - constructor(value?: string); - constructor(value?: any); - toString(): string; - valueOf(): string; - toJSON(): string; - } - export class EdmLiteral { - constructor(value: any); - valueOf(): any; - } - export module utils { - export function normalizeSortingInfo(info: string): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: string[]): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: Getter): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: Getter[]): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: { field: string; dir?: string }): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: { field: string; dir?: string }[]): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: { field: string; desc?: boolean }): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: { field: string; desc?: boolean }[]): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: { selector: string; dir?: string }): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: { selector: string; dir?: string }[]): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: { selector: string; desc?: boolean }): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: { selector: string; desc?: boolean }[]): Array<{ selector: string; desc?: boolean }>; - export function normalizeBinaryCriterion(criteria: Array): Array; - export function keysEqual(key1: any, key2: any): boolean; - export function keysEqual(keyExpr: any, key1: any, key2: any): boolean; - export function toComparable(value: Date, caseSensitive?: boolean): number; - export function toComparable(value: Guid, caseSensitive?: boolean): string; - export function toComparable(value: string, caseSensitive?: boolean): string; - export function compileGetter(): Getter; - export function compileGetter(expr: any[]): Getter; - export function compileGetter(expr: string): Getter; - export function compileGetter(expr: "this"): Getter; - export function compileGetter(expr: Getter): Getter; - export function compileSetter(expr: string): Setter; - export module odata { - export function sendRequest(request: JQueryXHR, requestOptions?: JQueryAjaxSettings): any; - export function serializePropName(propName: EdmLiteral): string; - export function serializePropName(propName: string): string; - export function serializeValue(value: Date): string; - export function serializeValue(value: Guid): string; - export function serializeValue(value: string): string; - export function serializeValue(value: "string"): string; - export function serializeValue(value: EdmLiteral): string; - export function serializeKey(key: any): string; - export function serializeKey(key: Date): string; - export function serializeKey(key: Guid): string; - export function serializeKey(key: string): string; - export function serializeKey(key: "string"): string; - export function serializeKey(key: EdmLiteral): string; - export var keyConverters: { - String(value: any): string; - Guid(value: any): Guid; - Int32(value: any): number; - Int64(value: any): EdmLiteral; - }; - } - } - export module queryAdapters { - export function odata(queryOptions: ODataQueryOptions): RemoteQuery; - } - export interface DataSourceOptions { - map? (item: any): any; - postProcess? (result: any[]): any; - pageSize: number; - paginate: boolean; - } - export class DataSource { - public changed: JQueryCallback; - public loadError: JQueryCallback; - public loadingChanged: JQueryCallback; - constructor(options?: Store); - constructor(options?: string); - constructor(options?: Array); - constructor(options?: { store: Store }); - constructor(options?: CustomStoreOptions); - constructor(options?: { store: Array }); - constructor(options?: { store: { type: string } }); - constructor(options?: { load(options?: LoadOptions): JQueryXHR; }); - constructor(options?: { load(options?: LoadOptions): Array; }); - constructor(options?: { load(options?: LoadOptions): JQueryDeferred; }); - constructor(options?: DataSourceOptions); - loadOptions(): { [key: string]: any }; - items(): Array; - store(): data.Store; - isLastPage(): boolean; - pageIndex(newIndex?: number): number; - sort(expr: any[]): any[]; - group(expr: any[]): any[]; - filter(expr: any[]): any[]; - select(expr: string[]): string[]; - searchValue(value?: string): string; - searchOperation(op?: string): string; - searchExpr(selector: string): string; - key(): any; - isLoaded(): boolean; - isLoading(): boolean; - totalCount(): number; - load(): JQueryDeferred; - dispose(): void; - } - export interface StoreOptions { - key?: any; - errorHandler?: ErrorHandler; - loaded?: JQueryCallback; - loading?: JQueryCallback; - modified?: JQueryCallback; - modifying?: JQueryCallback; - inserted?: JQueryCallback; - inserting?: JQueryCallback; - updated?: JQueryCallback; - updating?: JQueryCallback; - removed?: JQueryCallback; - removing?: JQueryCallback; - } - export interface LoadOptions extends QueryOptions { - skip?: number; - take?: number; - sort?: any; - select?: any; - filter?: any; - group?: any; - } - export class Store { - loaded: JQueryCallback; - loading: JQueryCallback; - modified: JQueryCallback; - modifying: JQueryCallback; - inserted: JQueryCallback; - inserting: JQueryCallback; - updated: JQueryCallback; - updating: JQueryCallback; - removed: JQueryCallback; - removing: JQueryCallback; - constructor(options?: StoreOptions); - key(): any; - keyOf(obj: any): any; - load(options?: LoadOptions): JQueryDeferred; - createQuery(options?: QueryOptions): IQuery; - totalCount(options?: { - filter?: any[]; - group?: string[]; - }): JQueryDeferred; - byKey(key: any, extraOptions?: { - expand?: string[] - }): JQueryDeferred; - remove(key: any): JQueryDeferred; - insert(values: any): JQueryDeferred; - update(key: any, values: any): JQueryDeferred; - } - export interface CustomStoreOptions extends StoreOptions { - load? (options?: LoadOptions): any; - byKey? (key: any): any; - insert? (values: any): any; - update? (key: any, values: any): any; - remove? (key: any): any; - totalCount? (options?: { - filter?: any[]; - group?: string[]; - }): any; - } - export class CustomStore extends Store { - constructor(options?: CustomStoreOptions); - } - export interface ArrayStoreOptions extends StoreOptions { - data?: Array - } - export class ArrayStore extends Store { - constructor(options?: Array); - constructor(options?: ArrayStoreOptions); - } - export interface LocalStoreOptions extends ArrayStoreOptions { - name: string; - } - export class LocalStore extends ArrayStore { - constructor(options?: string); - constructor(options?: LocalStoreOptions); - clear(): void; - } - export interface ODataStoreOptions extends StoreOptions { - url?: string; - name?: string; - keyType?: string; - jsonp?: boolean; - withCredentials?: boolean; - } - export class ODataStore extends Store { - constructor(options?: ODataStoreOptions); - } - export interface ODataContextOptions { - url: string; - jsonp?: boolean; - withCredentials?: boolean; - errorHandler?: ErrorHandler; - beforeSend?: () => any; - entities?: Array; - } - export class ODataContext { - constructor(options?: ODataContextOptions); - get(operationName: string, params: { [key: string]: any }): JQueryDeferred>; - invoke(operationName: string, params: { [key: string]: any }, httpMethod?: string): JQueryDeferred>; - objectLink(entityAlias: string, key: any): { __metadata: { uri: string }; }; - } -} -declare module DevExpress.ui { - interface ViewportOptions { - allowPan?: boolean; - allowZoom?: boolean; - } - export interface ITemplate { - compile(html: string): any; - render(template: JQuery, data: any): any; - render(template: any, data: any): any; - } - class Template { - constructor(element: HTMLElement); - constructor(element: JQueryStatic); - render(container: HTMLElement): any; - render(container: JQueryStatic): any; - dispose(): void; - } - interface TemplateStatic { - new (element: HTMLElement): Template; - new (element: JQueryStatic): Template; - } - class TemplateProvider { - constructor(); - getTemplateClass(widget: any): TemplateStatic; - getDefaultTemplate(widget: any): void; supportDefaultTemplate(): boolean; - } - export function initViewport(options: ViewportOptions): void; - interface NotifyOptions { - message: string; - type?: string; - displayTime?: number; - hiddenAction: () => any; - } - export function notyfy(options: any): void; - export function notify(message: string, type?: string, displayTime?: number): void; - export module dialog { - interface Dialog { - show(): JQueryDeferred; - hide(value?: any): void; - } - interface DialogButton { - text: string; - icon: string; - clickAction: () => any; - } - interface DialogOptions { - message: string; - title?: string; - } - export function custom(options: DialogOptions): Dialog; - export function custom(message: string, title?: string): Dialog; - export function alert(options: DialogOptions): JQueryDeferred; - export function alert(message: string, title?: string): JQueryDeferred; - export function confirm(options: DialogOptions): JQueryDeferred; - export function confirm(message: string, title?: string): JQueryDeferred; - } - export interface CollectionContainerWidgetOptions extends ContainerWidgetOptions { - items?: Array; - itemTemplate?: any; - itemRender?: Function; - itemClickAction?: any; - itemRenderedAction?: any; - noDataText?: string; - dataSource?: data.DataSource; - } - export class CollectionContainerWidget extends ContainerWidget { - constructor(element: Element, options?: CollectionContainerWidgetOptions); - constructor(element: JQuery, options?: CollectionContainerWidgetOptions); - } - export interface ComponentOptions { - disabled?: boolean; - } - export class Component { - constructor(element: Element, options?: ComponentOptions); - constructor(element: JQuery, options?: ComponentOptions); - disposing: JQueryCallback; - optionChanged: JQueryCallback; - instance(): Component; - beginUpdate(): void; - endUpdate(): void; - option(): any; - option(options: string): any; - option(options: string): T; - option(options: string, value: any): void; - option(options: { [key: string]: any }): void; - option(options?: any): any; - } - export interface ContainerWidgetOptions extends WidgetOptions { - contentReadyAction?: any - } - export class ContainerWidget extends Widget { - constructor(element: Element, options?: WidgetOptions); - constructor(element: JQuery, options?: WidgetOptions); - addTemplate(template: ITemplate): void; - } - export interface SelectableCollectionWidgetOptions extends CollectionContainerWidgetOptions { - selectedIndex?: number; - itemSelectAction?: any; - } - export class SelectableCollectionWidget extends CollectionContainerWidget { - constructor(element: Element, options?: SelectableCollectionWidget); - constructor(element: JQuery, options?: SelectableCollectionWidget); - } - export interface WidgetOptions extends ComponentOptions { - clickAction?: any; - width?: any; - height?: any; - visible?: boolean; - activeStateEnabled?: boolean; - } - export class Widget extends Component { - constructor(element: Element, options?: WidgetOptions); - constructor(element: JQuery, options?: WidgetOptions); - init(): void; - repaint(): void; - } -} -declare module DevExpress.viz { - export class Chart extends ui.Component { - constructor(element: Element, options?: viz.charts.ChartOptions); - constructor(element: JQuery, options?: viz.charts.ChartOptions); - clearSelection(): void; - getSeries(): viz.charts.series.Series; - hidiTooltip(): void; - render(options: viz.charts.RenderOptions): void; - render(): void; - zoomArgument(minArg: any, maxArg: any): void; - getSeriesByPos(seriesIndex: number): viz.charts.series.Series; - getSeriesByName(seriesName: string): viz.charts.series.Series; - getAllSeries(): Array; - instance(): Chart; - } - export class PieChart extends ui.Component { - constructor(element: Element, options?: viz.charts.PieOptions); - constructor(element: JQuery, options?: viz.charts.PieOptions); - clearSelection(): void; - getSeries(): viz.charts.series.PieSeries; - hidiTooltip(): void; - render(options: viz.charts.RenderOptions): void; - render(): void; - instance(): PieChart; - } - export class RangeSelector extends ui.Component { - constructor(element: Element, options?: viz.rangeSelector.RangeSelectorOptions); - constructor(element: JQuery, options?: viz.rangeSelector.RangeSelectorOptions); - getSelectedRange: () => viz.rangeSelector.SelectedRange; - setSelectedRange: (selectedRange: viz.rangeSelector.SelectedRange) => void; - instance(): RangeSelector; - } - export class CircularGauge extends ui.Component { - constructor(element: Element, options?: viz.gauges.CircularGaugeOptions); - constructor(element: JQuery, options?: viz.gauges.CircularGaugeOptions); - value(): number; - value(val: number): CircularGauge; - subvalues(): Array; - subvalues(values: Array): CircularGauge; - instance(): CircularGauge; - } - export class LinearGauge extends ui.Component { - constructor(element: Element, options?: viz.gauges.LinearGaugeOptions); - constructor(element: JQuery, options?: viz.gauges.LinearGaugeOptions); - value(): number; - value(val: number): LinearGauge; - subvalues(): Array; - subvalues(values: Array): LinearGauge; - instance(): LinearGauge; - } - export class Sparkline extends ui.Component { - constructor(element: Element, options?: viz.sparklines.SparklineOptions); - constructor(element: JQuery, options?: viz.sparklines.SparklineOptions); - render(): Sparkline; - instance(): Sparkline; - } - export class Bullet extends ui.Component { - constructor(element: Element, options?: viz.sparklines.BulletOptions); - constructor(element: JQuery, options?: viz.sparklines.BulletOptions); - render(): Bullet; - instance(): Bullet; - } - export class Map extends ui.Component { - constructor(element: Element, options?: viz.map.VectorMapOptions); - constructor(element: JQuery, options?: viz.map.VectorMapOptions); - render(): void; - instance(): Map; - getAreas(): Array; - getMarkers(): Array; - clearAreaSelection(): void; - clearMarkerSelection(): void; - clearSelection(): void; - } -} -declare module DevExpress.viz.charts { - interface z_BaseLegendOptions { - backgroundColor?: string; - hoverMode?: string; - customizeText?: (arg: { - seriesName: string; - seriesNumber: number; - seriesColor: string; - }) => string; - verticalAlignment?: string; - horizontalAlignment?: string; - itemTextPosition?: string; - equalColumnWidth?: boolean; - font?: viz.common.FontOptions; - visible?: boolean; - margin?: number; - markerSize?: number; - border?: { - visible?: boolean; - width?: number; - color?: string; - cornerRadius?: number; - opacity?: number; - dashStyle?: string; - }; - paddingLeftRight?: number; - paddingTopBottom?: number; - columnsCount?: number; - rowsCount?: number; - columnItemSpacing?: number; - rowItemSpacing?: number; - } - interface z_BaseTooltipCustomizeArgument { - value?: any; - valueText: string; - originalValue: string; - argument: any; - argumentText: string; - originalArgument: any; - percent?: any; - percentText?: string; - seriesName: string; - } - interface z_BaseTooltipOptions { - enabled?: boolean; - color?: string; - customizeText?: (arg: z_BaseTooltipCustomizeArgument) => string; - format?: string; - argumentFormat?: string; - precision?: number; - argumentPrecision?: number; - percentPrecision?: number; - font?: viz.common.FontOptions; - arrowLength?: number; - paddingLeftRight?: number; - paddingTopBottom?: number; - } - interface z_ChartTooltipCustomizeArgument extends z_BaseTooltipCustomizeArgument { - closeValueText?: string; - highValueText?: string; - lowValueText?: string; - openValueText?: string; - originalCloseValue?: any; - originalHighValue?: any; - originalLowValue?: any; - originalOpenValue?: any; - closeValue?: any; - highValue?: any; - lowValue?: any; - openValue?: any; - reductionValue?: any; - reductionValueText?: string; - originalMinValue?: any; - rangeValue1?: any; - rangeValue1Text?: string; - rangeValue2?: any; - rangeValue2Text?: string; - point: series.Point; - } - interface z_ChartTooltipOptions extends z_BaseTooltipOptions { - customizeText?: (arg: z_ChartTooltipCustomizeArgument) => string; - shared?: boolean; - } - interface z_BaseChartOptions extends ui.ComponentOptions { - incidentOccured?: () => void; - done?: () => void; - drawn?: () => void; - tooltipShown?: () => void; - tooltipHidden?: () => void; - pointSelectionMode?: string; - redrawOnResize?: boolean; - tooltip?: z_BaseTooltipOptions; - margin?: { - left?: number; - top?: number; - right?: number; - bottom?: number; - }; - size?: { - width?: number; - height?: number; - }; - title?: { - horizontalAlignment?: string; - verticalAlignment?: string; - font?: viz.common.FontOptions; - text?: string; - placeholderSize?: number; - }; - dataSource?: any; - palette?: any; legend?: z_BaseLegendOptions; - theme?: string; - animation?: { - enabled?: boolean; - duration?: number; - easing?: string; - maxPointCountSupported?: number; - asyncSeriesRendering?: boolean; - asyncTrackersRendering?: boolean; - trackerRenderingDelay?: number; - }; - } - export interface CommonPaneSettings { - backgroundColor?: string; - border?: { - color?: string; - bottom?: boolean; - left?: boolean; - right?: boolean; - top?: boolean; - dashStyle?: string; - visible?: boolean; - width?: number; - opacity?: number; - }; - } - export interface PaneSettings extends CommonPaneSettings { - name: string; - } - export interface ChartLegendOptions extends z_BaseLegendOptions { - hoverMode?: string; - position?: string; - } - interface z_CommonAxisLabelSettings { - alignment?: string; - font?: viz.common.FontOptions; - indentFromAxis?: number; - overlappingBehavior?: { - mode?: string; - rotationAngle?: number; - staggeringSpacing?: number; - }; - rotationAngle?: number; - staggered?: boolean; - staggeringSpacing?: number; - } - interface z_BaseConstantLineLabel { - visible?: boolean; - position?: string; - font?: viz.common.FontOptions; - } - interface ConstantLineAxisLabel extends z_BaseConstantLineLabel { - horizontalAlignment?: string; - verticalAlignment?: string; - } - export interface ConstantLineLabel extends ConstantLineAxisLabel { - text?: string; - } - export interface CommonConstantLineStyle { - paddingLeftRight?: number; - paddingTopBottom?: number; - width?: number; - dashStyle?: string; - color?: string; - label?: z_BaseConstantLineLabel; - } - export interface ConstantLineOptions extends CommonConstantLineStyle { - value?: any; - label?: ConstantLineLabel; - } - interface z_AxisConstantLineStyle extends CommonConstantLineStyle { - label?: ConstantLineAxisLabel; - } - interface z_StripStyle { - label?: { - font?: viz.common.FontOptions; - horizontalAlignment?: string; - verticalAlignment?: string; - }; - paddingLeftRight?: number; - paddingTopBottom?: number; - } - export interface CommonAxisSettings { - color?: string; - discreteAxisDivisionMode?: string; - grid?: { - color?: string; - opacity?: string; - visible?: boolean; - width?: number; - } - inverted?: boolean; - label?: z_CommonAxisLabelSettings; - maxValueMargin?: number; - minValueMargin?: number; - opacity?: number; - placeholderSize?: number; - setTicksAtUnitBeginning?: boolean; - stripStyle?: z_StripStyle - constantLineStyle?: CommonConstantLineStyle; - tick?: { - color?: string; - opacity?: number; - visible?: boolean; - }; - title?: { - font?: viz.common.FontOptions; - margin?: number; - text?: string; - }; - valueMarginsEnabled?: boolean; - visible?: boolean; - width?: number; - } - export interface StripOptions extends z_StripStyle { - color?: string; - endValue: any; - startValue: any; - label?: { - font?: viz.common.FontOptions; - horizontalAlignment?: string; - verticalAlignment?: string; - text?: string; - }; - } - interface z_AxisLabelSettings extends z_CommonAxisLabelSettings { - customizeText: (arg: { - value: any; - valueText: string; - }) => string; - } - export interface ArgumentAxisOptions extends CommonAxisSettings { - argumentType?: string; - axisDivisionFactor?: number; - categories?: Array; - hoverMode?: string; - label?: z_AxisLabelSettings; - max?: number; - min?: number; - tickInterval?: any; - position?: string; - constantLineStyle?: z_AxisConstantLineStyle; - strips?: Array; - constantLines?: Array; - type?: string; - } - export interface ValueAxisOptions extends CommonAxisSettings { - valueType?: string; - axisDivisionFactor?: number; - categories?: Array; - hoverMode?: string; - max?: number; - min?: number; - tickInterval?: any; position?: string; - strips?: Array; - constantLines?: Array; - constantLineStyle?: z_AxisConstantLineStyle; - type?: string; - name?: string; - label?: z_AxisLabelSettings; - } - interface z_CrosshairLine { - color?: string; - width?: number; - dashStyle?: string; - opacity?: number; - } - interface z_CrosshairOptions extends z_CrosshairLine { - enabled?: boolean; - verticalLine?: z_CrosshairLine; - horizontalLine?: z_CrosshairLine; - } - export interface ChartOptions extends z_BaseChartOptions { - needAggregate?: boolean; - defaultPane?: string; - adjustOnZoom?: boolean; - rotated?: boolean; - synchronizeMultiAxes?: boolean; - equalBarWidth?: { - spacing?: number; - width?: number; - }; - customizePoint?: (arg: { - index: number; - argument: any; - seriesName: string; - tag: any; - value?: any; - rangeValue1?: any; - rangeValue2?: any; - }) => series.BasePointOptions; - commonPaneSettings?: CommonPaneSettings; - panes?: Array; - containerBackgroundColor?: string; - seriesTemplate?: { - nameField?: string; - customizeSeries?: (valueFromNameField: string) => viz.charts.series.SeriesOptions; - }; - crosshair?: z_CrosshairOptions; - seriesSelectionMode?: string; - tooltip?: z_ChartTooltipOptions; - dataPrepareSettings?: { - checkTypeForAllData?: boolean; - convertToAxisDataType?: boolean; - sortingMethod?: any; - }; - useAggregation?: boolean; - argumentAxisClick?: (axis: any, argument: any, event: JQueryMouseEventObject) => void; - legend?: ChartLegendOptions; - argumentAxis?: ArgumentAxisOptions; - valueAxis?: Array; - commonAxisSettings?: CommonAxisSettings; - series?: Array; - commonSeriesSettings?: viz.charts.series.commonSeriesSettings; - seriesClick?: (series: viz.charts.series.Series, event: JQueryMouseEventObject) => void; - seriesHover?: (series: viz.charts.series.Series) => void; - seriesSelected?: (series: viz.charts.series.Series) => void; - seriesHoverChanged?: (series: viz.charts.series.Series) => void; - pointClick?: (point: viz.charts.series.Point, event: JQueryMouseEventObject) => void; - legendClick?: (obj: any, event: JQueryMouseEventObject) => void; pointHover?: (point: viz.charts.series.Point) => void; - pointSelected?: (point: viz.charts.series.Point) => void; - seriesSelectionChanged?: (series: viz.charts.series.Series) => void; - pointSelectionChanged?: (point: viz.charts.series.Point) => void; - pointHoverChanged?: (point: viz.charts.series.Point) => void; - } - export interface PieOptions extends z_BaseChartOptions { - pointClick?: (point: viz.charts.series.PiePoint, event: JQueryMouseEventObject) => void; - legendClick?: (point: viz.charts.series.PiePoint, event: JQueryMouseEventObject) => void; - pointHover?: (point: viz.charts.series.PiePoint) => void; - pointSelected?: (point: viz.charts.series.PiePoint) => void; - pointSelectionChanged?: (point: viz.charts.series.PiePoint) => void; - pointHoverChanged?: (point: viz.charts.series.PiePoint) => void; - series?: viz.charts.series.PieSeriesOptions; - } - export interface RenderOptions { - force?: boolean; - animate?: boolean; - asyncSeriesRendering?: boolean; - } -} -declare module DevExpress.viz.charts.series { - export interface z_BasePointStyle { - color?: string; - border?: { - visible?: boolean; - width?: number; - color?: string; - }; - size?: number; - } - interface BasePointOptions extends z_BasePointStyle { - hoverMode?: string; - selectionMode?: string; - visible?: boolean; - symbol?: string; - image?: any; - hoverStyle?: z_BasePointStyle; - selectionStyle?: z_BasePointStyle; - } - interface z_BaseSeriesOptions { - argumentField?: string; - hoverMode?: string; - maxLabelCount?: number; - label?: z_BaseLabelOptions; - selectionMode?: string; - showInLegend?: boolean; - tagField?: string; - } - interface z_BaseLabelOptions { - visible?: boolean; - alignment?: string; - rotationAngle?: number; - format?: string; - precision?: number; - argumentFormat?: string; - argumentPrecision?: number; - precission?: number; - percentPrecision?: number; - font?: viz.common.FontOptions; - backgroundColor?: string; - border?: { - visible?: boolean; - width?: number; - color?: string; - dashStyle?: string; - }; - connector?: { - visible?: boolean; - width?: number; - color?: string; - } - } - interface z_BaseChartSeriesLabelOptions extends z_BaseLabelOptions { - horizontalOffset?: number; - verticalOffset?: number; - customizeText?: (arg: { - originalValue: any; - value: any; - valueText: string; - originalArgument: any; - argument: any; - argumentText: string; - seriesName: string; - }) => string; - } - interface z_BaseSeriesStyle { - color?: string; - } - export interface ScatterSeriesOptions extends z_BaseSeriesOptions, z_BaseSeriesStyle { - selectionStyle?: z_BaseSeriesStyle; - hoverStyle?: z_BaseSeriesStyle; - valueField?: string; - point?: BasePointOptions; - axis?: string; - pane?: string; - } - export interface LineSeriesStyle extends z_BaseSeriesStyle { - dashStyle?: string; - width?: number; - } - export interface LineSeriesOptions extends LineSeriesStyle, z_BaseSeriesOptions { - selectionStyle?: LineSeriesStyle; - hoverStyle?: LineSeriesStyle; - valueField?: string; - point?: BasePointOptions; - pane?: string; - } - export interface AreaSeriesStyle extends z_BaseSeriesStyle { - hatching?: { - direction?: string; - width?: number; - step?: number; - opacity?: number - }; - border?: { - visible?: boolean; - width?: number; - color?: string; - }; - } - export interface AreaSeriesOptions extends AreaSeriesStyle, z_BaseSeriesOptions { - selectionStyle?: AreaSeriesStyle; - hoverStyle?: AreaSeriesStyle; - valueField?: string; - point?: BasePointOptions; - pane?: string; - axis?: string; - } - export interface BarSeriesLabel extends z_BaseChartSeriesLabelOptions { - position?: string; - showForZeroValues?: boolean; - } - export interface BarSeriesStyle extends AreaSeriesStyle { } - interface z_BaseBarSeriesOptions extends z_BaseSeriesOptions, BarSeriesStyle { - minBarSize?: number; - cornerRadius?: number; - label?: BarSeriesLabel; - selectionStyle?: BarSeriesStyle; - hoverStyle?: BarSeriesStyle; - pane?: string; - axis?: string; - } - export interface BarSeriesOptions extends z_BaseBarSeriesOptions { - valueField?: string; - } - export interface OHLCSeriesStyle extends z_BaseSeriesStyle { - width?: number; - } - interface z_BaseOHLCSeries extends z_BaseSeriesOptions { - openValueField?: string; - highValueField?: string; - lowValueField?: string; - closeValueField?: string; - reduction?: { - color?: string; - level?: string; - }; - pane?: string; - axis?: string; - } - export interface CandleStickSeriesOptions extends z_BaseOHLCSeries, OHLCSeriesStyle { - innerColor?: string; - selectionStyle?: OHLCSeriesStyle; - hoverStyle?: OHLCSeriesStyle; - } - export interface StockSeriesOptions extends z_BaseOHLCSeries, OHLCSeriesStyle { - selectionStyle?: OHLCSeriesStyle; - hoverStyle?: OHLCSeriesStyle; - } - export interface FullStackedAreaSeriesOptions extends z_BaseSeriesOptions, AreaSeriesOptions { - valueField?: string; - selectionStyle?: AreaSeriesStyle; - hoverStyle?: AreaSeriesStyle; - point?: BasePointOptions; - } - export interface FullStackedBarSeriesOptions extends BarSeriesOptions { - stack?: string; - } - export interface FullStackedLineSeriesOptions extends LineSeriesOptions { - point?: BasePointOptions; - } - interface z_BaseRangeSeriesOptions extends z_BaseSeriesOptions { - rangeValue1Field?: string; - rangeValue2Field?: string; - pane?: string; - axis?: string; - } - export interface RangeAreaSeriesOptions extends z_BaseSeriesOptions, AreaSeriesStyle { - selectionStyle?: AreaSeriesStyle; - hoverStyle?: AreaSeriesStyle; - point?: BasePointOptions; - } - export interface RangeBarSeriesOptions extends z_BaseBarSeriesOptions { - rangeValue1Field?: string; - rangeValue2Field?: string; - pane?: string; - axis?: string; - } - export interface SplineSeriesOptions extends LineSeriesOptions { } - export interface SplineAreaSeries extends AreaSeriesOptions { } - export interface StackedLineSeries extends LineSeriesOptions { } - export interface StackedAreaSeries extends AreaSeriesOptions { } - export interface StackedBasrSeriesOptions extends BarSeriesOptions { - stack?: string; - } - export interface BubbleSeriesStyle extends AreaSeriesStyle { } - export interface BubbleSeriesOptions extends z_BaseBarSeriesOptions, BubbleSeriesStyle { - selectionStyle?: LineSeriesStyle; - hoverStyle?: LineSeriesStyle; - valueField?: string; - pane?: string; - sizeField?: string; - } - export interface StepLineSeries extends LineSeriesOptions { } - export interface StepAreaSeries extends AreaSeriesOptions { } - export interface PieSeriesStyle extends AreaSeriesStyle { } - interface PieSeriesLabelOptions extends z_BaseLabelOptions { - customizeText: (arg: { - value: any; - valueText: string; - originalValue: any; - argument: any; - argumentText: string; - originalArgument: any; - percent: any; - percentText: string; - seriesName: string; - }) => string; - radialOffset?: number; - } - export interface PieSeriesOptions extends z_BaseSeriesOptions, PieSeriesStyle { - valueField?: string; - minSegmentSize?: string; - selectionStyle?: PieSeriesStyle; - hoverStyle?: PieSeriesStyle; - segmentsDirection?: string; - type?: string; - label?: PieSeriesLabelOptions; - } - interface AllSeriesStyleOptions extends z_BaseSeriesStyle, AreaSeriesStyle, LineSeriesStyle { } - interface z_AllLabelsOptions extends z_BaseChartSeriesLabelOptions, BarSeriesLabel { } - export interface CommonSeriesOptions extends z_BaseSeriesOptions, z_BaseBarSeriesOptions, z_BaseRangeSeriesOptions, z_BaseOHLCSeries, AllSeriesStyleOptions, BubbleSeriesOptions { - selectionStyle?: AllSeriesStyleOptions; - hoverStyle?: AllSeriesStyleOptions; - label?: z_AllLabelsOptions; - valueField?: string; - } - export interface SeriesOptions extends CommonSeriesOptions { - tag?: any; - name?: string; - type?: string; - } - export interface commonSeriesSettings extends CommonSeriesOptions { - area?: AreaSeriesOptions; - bar?: BarSeriesOptions; - candlestick?: CandleStickSeriesOptions; - fullstackedarea?: FullStackedAreaSeriesOptions; - fullstackedbar?: FullStackedBarSeriesOptions; - fullstackedline?: FullStackedLineSeriesOptions; - line?: LineSeriesOptions; - rangearea?: RangeAreaSeriesOptions; - rangebar?: RangeBarSeriesOptions; - scatter?: ScatterSeriesOptions; - spline?: SplineSeriesOptions; - splinearea?: SplineAreaSeries; - stackedarea?: StackedAreaSeries; - stackedbar?: StackedBasrSeriesOptions; - stackedline?: StackedLineSeries; - steparea?: StepAreaSeries; - stepline?: StepLineSeries; - stock?: StockSeriesOptions; - bubble?: BubbleSeriesOptions; - } - export class Point { - fullState: number; - originalArgument: any; - originalValue: any; - series: Series; - tag: any; - clearSelection(): void; - select(): void; - hideTootip(): void; - isSelected(): boolean; - isHovered(): boolean; - } - export class PiePoint { - fullState: number; - originalArgument: any; - originalValue: any; - percent: any; - series: PieSeries; - tag: any; - clearSelection(): void; - select(): void; - hideTootip(): void; - isSelected(): boolean; - isHovered(): boolean; - } - export class Series { - axis: string; - fullState: number; - name: string; - pane: string; - tag: any; - type: string; - clearSelection(): void; - deselectPoint(point: Point): void; - getAllPoints(): Array - getPointByArg(pointArg: any): Point; - getPointByPos(positionIndex: number): Point; - select(): void; - selectPoint(point: Point): void; - isSelected(): boolean; - isHovered(): boolean; - } - export class PieSeries { - fullState: number; - type: string; - clearSelection(): void; - deselectPoint(point: PiePoint): void; - getAllPoints(): Array - getPointByArg(pointArg: any): PiePoint; - getPointByPos(positionIndex: number): PiePoint; - select(): void; - selectPoint(point: PiePoint): void; - isSelected(): boolean; - isHovered(): boolean; - } -} -declare module DevExpress.viz.common { - export interface FontOptions { - color?: string; - family?: string; - opacity?: number; - size?: number; - weight?: number; - } - export interface tickIntervalObject { - years?: number; - quarters?: number; - months?: number; - days?: number; - hours?: number; - minutes?: number; - seconds?: number; - milliseconds?: number; - } -} -declare module DevExpress.viz.gauges { - interface CustomizeTextArgument { - value: number; - valueText: string; - } - interface z_textOptions { - format?: string; - precision?: number; - customizeText?: (arg: CustomizeTextArgument) => string; - font?: viz.common.FontOptions; - } - interface z_textOptionsWithIndent extends z_textOptions { - indent?: number; - } - interface z_BaseGaugeOptions { - size?: { - width?: number; - height?: number; - }; - margin?: { - left?: number; - right?: number; - top?: number; - bottom?: number; - }; - containerBackgroundColor?: string; - animationEnabled?: boolean; - animationDuration?: number; - redrawOnResize?: boolean; - title?: { - position?: string; - text?: string; - font?: viz.common.FontOptions; - }; - subtitle?: { - text?: string; - font?: viz.common.FontOptions; - }; - tooltip?: { - enabled?: boolean; - format?: string; - precision?: number; - customizeText?: (arg: CustomizeTextArgument) => string; - font?: viz.common.FontOptions; - }; - value?: number; - subvalues?: Array - } - interface z_BaseRangeContainer { - offset?: number; - backgroundColor?: string; - ranges?: Array<{ - startValue?: number; - endValue?: number; - color?: string; - }> - } - interface z_BaseScale { - startValue?: number; - endValue?: number; - hideFirstTick?: boolean; - hideLastTick?: boolean; - hideFirstLabel?: boolean; - hideLastLabel?: boolean; - majorTick?: { - color?: string; - length?: number; - width?: number; - customTickValues?: Array; - useTicksAutoArrangement?: boolean; - tickInterval?: number; - showCalculatedTicks?: boolean; - visible?: boolean; - }; - minorTick?: { - color?: string; - length?: number; - width?: number; - customTickValues?: Array; - tickInterval?: number; - showCalculatedTicks?: boolean; - visible?: boolean; - }; - label?: z_textOptions; - } - interface z_BaseValueIndicator { - color?: string; - baseValue?: number; - size?: number; - backgroundColor?: string; - text?: z_textOptionsWithIndent; - } - interface z_BaseSubValueIndicator { - type?: string; - length?: number; - width?: number; - color?: string; - arrowLength?: number; - text?: z_textOptions; - } - export interface CircularGaugeRangeContainer extends z_BaseRangeContainer { - width?: number; - orientation?: string; - } - export interface CircularGaugeScale extends z_BaseScale { - orientation: string; - label: { - format?: string; - precision?: number; - customizeText?: (arg: CustomizeTextArgument) => string; - font?: viz.common.FontOptions; - indentFromTick?: number; - } - } - export interface CircularGaugeValueIndicator extends z_BaseValueIndicator { - type?: string; - offset?: number; - indentFromCenter?: number; - width?: number; - secondColor?: string; - secondFraction?: number; - spindleSize?: number; - spindleGapSize?: number; - } - export interface CircularGaugeSubValueIndicator extends z_BaseSubValueIndicator { - offset?: number; - } - export interface CircularGaugeOptions extends z_BaseGaugeOptions { - rangeContainer?: CircularGaugeRangeContainer; - geometry?: { - startAngle?: number; - endAngle?: number; - }; - scale?: CircularGaugeScale; - valueIndicator?: CircularGaugeValueIndicator; - spindle?: { - visible?: boolean; - size?: number; - gapSize?: number; - color?: string; - } - } - export interface LinearGaugeScale extends z_BaseScale { - verticalOrientation?: string; - horizontalOrientation?: string; - label?: { - format?: string; - precision?: number; - customizeText?: (arg: CustomizeTextArgument) => string; - font?: viz.common.FontOptions; - indentFromTick?: number; - } - } - export interface LinearGaugeRangeContainer extends z_BaseRangeContainer { - width?: { - start?: number; - end?: number; - }; - verticalOrientation?: string; - horizontalOrientation?: string; - } - export interface LinearGaugeValueIndicator extends z_BaseValueIndicator { - offset?: number; - horizontalOrientation?: string; - verticalOrientation?: string; - length?: number; - width?: number; - } - export interface LinearGaugeSubValueIndicator extends z_BaseSubValueIndicator { - offset?: number; - horizontalOrientation?: string; - verticalOrientation?: string; - } - export interface LinearGaugeOptions extends z_BaseGaugeOptions { - geometry?: { - orientation?: string; - }; - scale?: LinearGaugeScale; - valueIndicator?: LinearGaugeValueIndicator; - } -} -declare module DevExpress.viz.map { - export interface VectorMapOptions { - size?: { - width?: number; - height?: number; - }; - theme?: string; - background?: { - borderColor?: string; - color?: string; - }; - mapData?: any; - areaSettings?: { - borderColor?: string; - color?: string; - hoveredBorderColor?: string; - hoveredColor?: string; - selectedBorderColor?: string; - selectedColor?: string; - hoverEnabled?: boolean; - selectionMode?: string; - palette?: any; - paletteSize?: number; - customize?: (arg: any) => AreaOptions; - click?: (arg: Proxy) => void; - selectionChanged?: (arg: Proxy) => void; - }; - markers?: any; - markerSettings?: { - borderColor?: string; - color?: string; - hoveredBorderColor?: string; - hoveredColor?: string; - selectedBorderColor?: string; - selectedColor?: string; - font?: common.FontOptions; - hoverEnabled?: boolean; - selectionMode?: string; - customize?: (arg: any) => MarkerOptions; - click?: (arg: Proxy) => void; - selectionChanged?: (arg: Proxy) => void; - }; - controlBar?: { - enabled?: boolean; - borderColor?: string; - color?: string; - }; - tooltip?: { - enabled?: boolean; - borderColor?: string; - color?: string; - font?: common.FontOptions; - }; - bounds?: { - minLat?: number; - maxLat?: number; - minLon?: number; - maxLon?: number; - }; - center?: { - lat?: number; - lon?: number; - }; - zoomFactor?: number; - } - export interface AreaOptions { - borderColor?: string; - color?: string; - hoveredBorderColor?: string; - hoveredColor?: string; - selectedBorderColor?: string; - selectedColor?: string; - paletteIndex?: number; - isSelected?: boolean; - } - export interface MarkerOptions { - borderColor?: string; - color?: string; - hoveredBorderColor?: string; - hoveredColor?: string; - selectedBorderColor?: string; - selectedColor?: string; - isSelected?: boolean; - } - export class Proxy { - type: string; - attribute(name: string): any; - selected(state: boolean): void; - selected(): boolean; - } -} -declare module DevExpress.viz.rangeSelector { - export interface SelectedRange { - startValue: any; endValue: any; - } - interface CustomizeTextArgument { - value: any; - valueText: string; - } - export interface RangeSelectorOptions { - background?: { - color?: string; - image?: { - location?: string; - url?: string; - } - visible?: boolean; - }; - behavior?: { - allowSlidersSwap?: boolean; - animationEnabled?: boolean; - callSelectedRangeChanged?: string; - manualRangeSelectionEnabled?: boolean; - moveSelectedRangeByClick?: boolean; - snapToTicks?: boolean; - }; - chart?: { - bottomIndent?: number; - equalBarWidth?: { - spacing?: number; - width?: number; - }; - dataPrepareSettings?: { - checkTypeForAllData?: boolean; - convertToAxisDataType?: boolean; - sortingMethod?: any; - }; - useAggregation?: boolean; - series?: Array; - commonSeriesSettings?: viz.charts.series.commonSeriesSettings; - topIndent?: number; - valueAxis?: { - max?: any; min?: any; inverted?: boolean; - valueType?: string; - }; - } - containerBackgroundColor?: string; - dataSource?: Array<{}>; - dataSourceField?: string; - margin?: { - left?: number; - top?: number; - right?: number; - bottom?: number; - }; - redrawOnResize?: boolean; - scale?: { - startValue?: any; endValue?: any; - label?: { - customizeText?: (arg: CustomizeTextArgument) => string; - font?: viz.common.FontOptions; - format?: string; - precision?: number; - topIndent?: number; - visible?: boolean; - }; - majorTickInterval?: any; marker?: { - label?: { - customizeText?: (arg: CustomizeTextArgument) => string; - format?: string; - }; - separatorHeight?: number; - textLeftIndent?: number; - textTopIndent?: number; - topIndent?: number; - visible?: boolean; - }; - maxRange?: any; minorTickCount?: number; - placeHolderHeight?: number; - setTicksAtUnitBeginning?: boolean; - showCustomBoundaryTicks?: boolean; - showMinorTicks?: boolean; - tick?: { - color?: string; - opacity?: number; - width?: number; - }; - minorTickInterval?: any; useTicksAutoArrangement?: boolean; - valueType?: string; - } - selectedRange?: SelectedRange; - selectedRangeChaged?: (startValue: any, endValue: any) => void; - shutter?: { - color?: string; - opacity?: string; - } - size?: { - width?: number; - height?: number; - }; - sliderHandle?: { - color?: string; - opacity?: number; - width?: string; - }; - sliderMarker?: { - color?: string; - customizeText?: (arg: CustomizeTextArgument) => string; - font?: viz.common.FontOptions; - format?: string; - invalidRangeColor?: string; - padding?: number; - placeHolderSize?: { - height?: number; - width?: { - left?: number; - right?: number; - } - precission?: number; - visible?: boolean; - } - }; - theme?: string; - } -} -declare module DevExpress.viz.sparklines { - interface SparklineTooltipOptions { - customizeText?: (arg: { - firstValue?: string; - lastValue?: string; - maxValue?: string; - minValue?: string; - originalFirstValue?: any; - originalLastValue?: any; - originalMaxValue?: any; - originalMinValue?: any; - }) => string; - enabled?: boolean; - allowContainerResizing?: boolean; - position?: string; - format?: string; - precision?: number; - color?: string; - font?: common.FontOptions; - } - interface z_BaseSparklineSettings { - theme?: string; - size?: { - width?: number; - height?: number; - }; - tooltip?: SparklineTooltipOptions; - } - interface SparklineOptions extends z_BaseSparklineSettings { - dataSource?: Array; - argumentField?: string; - valueField?: string; - type?: string; - lineColor?: string; - lineWidth?: number; - showFirstLast?: boolean; - showMinMax?: boolean; - minColor?: string; - maxColor?: string; - firstLastColor?: string; - barPositiveColor?: string; - barNegativeColor?: string; - winColor?: string; - lossColor?: string; - pointSymbol?: string; - pointSize?: number; - pointColor?: string; - winlossThreshold?: number; - } - interface BulletTooltipOptions extends SparklineTooltipOptions { - customizeText?: (arg: { - originalValue?: any; - originalTarget?: any; - value?: string; - target?: string; - }) => string; - } - interface BulletOptions extends z_BaseSparklineSettings { - value?: number; - target?: number; - endScaleValue?: number; - color?: string; - targetColor?: string; - targetWidth?: number; - targetVisible?: boolean; - tooltip?: BulletTooltipOptions; - } -} -interface JQuery { - dxChart(options?: DevExpress.viz.charts.ChartOptions): JQuery; - dxChart(method: string, param1?: any, param2?: any): any; - dxPieChart(options?: DevExpress.viz.charts.PieOptions): JQuery; - dxPieChart(method: string, param1?: any, param2?: any): any; - dxRangeSelector(options?: DevExpress.viz.rangeSelector.RangeSelectorOptions): JQuery; - dxRangeSelector(method: string, param1?: any, param2?: any): any; - dxCircularGauge(options?: DevExpress.viz.gauges.CircularGaugeOptions): JQuery; - dxCircularGauge(method: string, param1?: any, param2?: any): any; - dxLinearGauge(options?: DevExpress.viz.gauges.LinearGaugeOptions): JQuery; - dxLinearGauge(method: string, param1?: any, param2?: any): any; - dxSparkline(options?: DevExpress.viz.sparklines.SparklineOptions): JQuery; - dxSparkline(method: string, param1?: any, param2?: any): any; - dxBullet(options?: DevExpress.viz.sparklines.BulletOptions): JQuery; - dxBullet(method: string, param1?: any, param2?: any): any; - dxVectorMap(options?: DevExpress.viz.map.VectorMapOptions): JQuery; - dxVectorMap(method: string, param1?: any, param2?: any): any; -} \ No newline at end of file diff --git a/phonejs/dx.phonejs-tests.ts b/phonejs/dx.phonejs-tests.ts deleted file mode 100644 index 049eaef5c..000000000 --- a/phonejs/dx.phonejs-tests.ts +++ /dev/null @@ -1,265 +0,0 @@ -/// - -module Test { - var url = "http://some-json-service.net/data.json"; - var dsFromUrl = new DevExpress.data.DataSource(url); - - var dsFromObject = new DevExpress.data.DataSource({ - load: function (loadOptions?: DevExpress.data.LoadOptions) { - return $.ajax(url); - } - }); - - var application = new DevExpress.framework.html.HtmlApplication({ - namespace: "global", - defaultLayout: "slideout", - navigation: [ - { id: "first", title: "Home", action: "#home" }, - { id: "second", title: "About", action: "#about" } - ] - }); - application.router.register(":view/:id", { view: "home", id: undefined }); - application.navigate(); - - $("div").appendTo(document.body).dxMap({ - location: [40.749825, -73.987963], - zoom: 13, - provider: "googleStatic", - controls: true, - routes: [ - { - weight: 4, - opacity: 0.75, - color: "red", - mode: "walking", - locations: [ - [40.737102, -73.990318], - [40.749825, -73.987963], - [40.75, -73.98], - [40.755823, -73.986397] - ] - } - ] - }); - $("div").appendTo(document.body).dxTabs({ - itemClickAction: function (e) { - console.log(e.itemData.text); - }, - items: [ - { text: "user" }, - { text: "analytics" }, - { text: "customers" }, - { text: "search" }, - { text: "favorites" } - ] - }); - - $("div").appendTo(document.body).dxList({ - scrollByContent: true, - items: ["item1", "item2", "item3"], - itemHoldAction: function (e: any) { console.log("itemHold"); }, - itemClickAction: function (e: any) { console.log("itemClick"); }, - itemSwipeAction: function (e: any) { console.log("itemSwipe " + e.direction); } - }); - $("div").appendTo(document.body).dxToast({ - type: 'error', - message: 'Sample error message' - }); - $("div").appendTo(document.body).dxPopup({ - closeButton: true, - title: "Popup title" - }); - $("div").appendTo(document.body).dxPivot({ - items: [ - { title: "all", text: "all" }, - { title: "unread", text: "unread" }, - { title: "favorites", text: "favorites" } - ], - itemSelectAction: function (e) { console.log("itemSelectAction"); } - }); - $("div").appendTo(document.body).dxLookup({ - items: [ - { id: 1, caption: "red" }, - { id: 3, caption: "blue" }, - { id: 6, caption: "white" }, - { id: 2, caption: "green" }, - { id: 4, caption: "yellow" }, - { id: 5, caption: "orange" }, - { id: 7, caption: "purple" } - ], - valueExpr: 'id', - displayExpr: 'caption', - itemRender: function (item) { - return "Text is: " + item.caption; - } - }); - $("div").appendTo(document.body).dxSlider({ - min: 50, - value: 75, - max: 100, - disabled: false - }); - $("div").appendTo(document.body).dxNavBar({ - items: [ - { text: "user", icon: "user" }, - { text: "find", icon: "find", disabled: false }, - { text: "favorites", icon: "favorites" }, - { text: "about", icon: "info" }, - { text: "home", icon: "home" }, - { text: "URI", icon: "tips" } - ], - itemClickAction: function (e) { console.log(e.itemData.text); } - }); - $("div").appendTo(document.body).dxSwitch({ - value: false, - onText: 'LongName', - offText: 'Short', - width: "100%", - visible: true - }); - $("div").appendTo(document.body).dxButton({ - text: "Click me", - icon: 'add', - clickAction: function () { console.log("clicked"); } - }); - $("div").appendTo(document.body).dxOverlay({ - visible: false, - closeOnOutsideClick: true, - contentReadyAction: function () { - $("#hideButton").dxButton({ - text: "Hide", - clickAction: function () { $("#overlay").data("dxOverlay").option("visible", false); } - }); - } - }); - $("div").appendTo(document.body).dxDateBox({ - value: new Date(), - format: "datetime" - }); - $("div").appendTo(document.body).dxPopover({ - width: '300', - height: 'auto', - visible: true, - target: '.dx-button' - }); - $("div").appendTo(document.body).dxEditBox({ - value: "Value", - readOnly: false, - enterKeyAction: function (e) { console.log("key entered"); }, - focusOutAction: function (e) { console.log("focus out"); }, - focusInAction: function (e) { console.log("focus in"); } - }); - $("div").appendTo(document.body).dxTextBox({ - value: "Text", - placeholder: "Placeholder", - mode: "email", - maxLength: 20, - readOnly: false, - changeAction: function (e) { console.log("value changed"); }, - valueUpdateAction: function (e) { console.log("value updated"); } - }); - $("div").appendTo(document.body).dxToolbar({ - items: [ - { align: 'left', widget: 'button', options: { type: 'back', text: 'Back', clickAction: function (e) { console.log("back clicked"); } } }, - { align: 'center', widget: 'button', options: { text: 'button', clickAction: function (e) { console.log("button clicked"); } } }, - { align: 'center', widget: 'button', options: { icon: 'plus', text: 'add', clickAction: function (e) { console.log("plus clicked"); } } }, - { align: 'right', widget: 'button', options: { icon: 'find', clickAction: function (e) { console.log("find clicked"); } }, useMenu: false }, - { text: 'Products', isMenu: true } - ] - }); - $("div").appendTo(document.body).dxTileView({ - items: [ - { text: "item1", widthRatio: 1.7, heightRatio: 1.7 }, - { text: "item2", widthRatio: 0.2, heightRatio: 0.2 }, - { text: "item3", widthRatio: 2, heightRatio: 2 } - ], - listHeight: 500, - itemRender: function (item) { return "Text is: " + item.text; }, - itemClickAction: function () { console.log("itemClick"); }, - baseItemWidth: 100, - baseItemHeight: 100, - itemMargin: 20 - }); - $("div").appendTo(document.body).dxPanorama({ - title: "my panorama", - items: [ - { header: "first", text: "first item" }, - { text: "second item" }, - { text: "third" }, - { text: "fourth" } - ], - selectedIndex: 0, - backgroundImage: { width: 89, height: 50 }, - itemSelectAction: function () { console.log("item selected"); } - }); - $("div").appendTo(document.body).dxCheckBox({ - checked: false, - disabled: false, - clickAction: function (e) { console.log("clicked"); } - }); - $("div").appendTo(document.body).dxTextArea({ - value: 'Disabled', - disabled: true, - placeholder: "Placeholder" - }); - $("div").appendTo(document.body).dxLoadPanel({ - message: 'Please wait ...', - showIndicator: true, - visible: true - }); - $("div").appendTo(document.body).dxNumberBox({ - value: 100, - min: 0, - max: 200 - }); - $("div").appendTo(document.body).dxSelectBox({ - value: 2, - dataSource: new DevExpress.data.DataSource([1, 2, 2, 3]) - }); - $("div").appendTo(document.body).dxScrollable({ - useNative: false, - startAction: function (e) { console.log("start"); }, - endAction: function (e) { console.log("end"); } - }); - $("div").appendTo(document.body).dxRadioGroup({ - items: [{ text: "0" }, { text: "1" }, { text: "2" }], - name: "Sample", - selectedIndex: -1 - }); - $("div").appendTo(document.body).dxScrollView({ - pullDownAction: function (e) { console.log("pulling down"); }, - reachBottomAction: function (e) { console.log("bottom reached"); }, - disabled: false - }); - $("div").appendTo(document.body).dxActionSheet({ - title: 'Select action', - items: [ - { text: "Reply", clickAction: function () { console.log("Reply"); } }, - { text: "Forward", clickAction: function () { console.log("Forward"); } }, - { text: "Delete", clickAction: function () { console.log("Delete"); }, type: "danger" }, - { text: "Save Image", clickAction: function () { console.log("Save Image"); }, disabled: true } - ], - showTitle: true, - disabled: false, - target: '#button' - }); - $("div").appendTo(document.body).dxRangeSlider({ - start: 30, - end: 70, - min: 0, - max: 100, - step: 1 - }); - $("div").appendTo(document.body).dxAutocomplete({ - value: "Ivan", - dataSource: new DevExpress.data.DataSource(["Ivan", "Svyatoslav", "Alexander", "Nikolay", "Dmitry", "Afanasiy", "John", "Nash", "Stacy", "Izabella", "Margarita", "Anna"]), - placeholder: "Type name, please", - maxItemsCount: 3, - minSearchLength: 2, - searchTimeout: 1000 - }); - $("div").appendTo(document.body).dxDropDownMenu({ - items: ["Item 1", "Item 2", "Item 3"], - itemTemplate: 'itemWithIcon' - }); -} \ No newline at end of file diff --git a/phonejs/dx.phonejs.d.ts b/phonejs/dx.phonejs.d.ts deleted file mode 100644 index 185ee4d41..000000000 --- a/phonejs/dx.phonejs.d.ts +++ /dev/null @@ -1,1220 +0,0 @@ -// Type definitions for PhoneJS -// Project: http://phonejs.devexpress.com -// Definitions by: DevExpress Inc. -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/// - -declare module DevExpress { - export function abstract(): void; - interface Endpoint { - local?: string; - production: string; - } - class EndpointSelector { - constructor(config: { [key: string]: Endpoint }); - urlFor(key: string): string; - } - export interface ActionOptions { - context?: Object; - component?: any; - beforeExecute? (e: ActionExecuteArgs): void; - afterExecute? (e: ActionExecuteArgs): void; - } - export interface ActionExecuteArgs { - action: any; - args: any[]; - context: any; - component: any; - canceled: boolean; - handled: boolean; - } - export class Action { - constructor(action?: any, config?: ActionOptions); - execute(): any; - } - export module devices { - interface Device { - phone?: boolean; - tablet?: boolean; - android?: boolean; - ios?: boolean; - win8?: boolean; - tizen?: boolean; - platform?: string; - deviceType?: string; - } - export function current(): Device; - export function current(device: Device): Device; - export var real: Device; - } -} -declare module DevExpress.data { - export interface ErrorHandler { (e: Error): void; } - export interface EntityOptions { key: any; keyType: any; } - export interface Getter { (obj: any, options?: any): any; } - export interface Setter { (obj: any, value: any, options?: any): void; } - export interface QueryOptions { - errorHandler?: ErrorHandler; - requireTotalCount?: boolean; - } - export interface ODataQueryOptions extends QueryOptions { - adapter?: any; - } - interface IQuery { - enumerate(): JQueryDeferred>; - count(): JQueryDeferred; - slice(skip: number, take?: number): IQuery; - sortBy(field: string[]): IQuery; - sortBy(field: Getter[]): IQuery; - sortBy(field: { field: string; desc?: boolean }[]): IQuery; - sortBy(field: { field: Getter; desc?: boolean }[]): IQuery; - thenBy(field: string[]): IQuery; - thenBy(field: Getter[]): IQuery; - thenBy(field: { field: string; desc?: boolean }[]): IQuery; - thenBy(field: { field: Getter; desc?: boolean }[]): IQuery; - filter(field: string, operator: string, value: any): IQuery; - filter(field: string, value: any): IQuery; - filter(criteria: any[]): IQuery; - select(field: string): IQuery; - select(field: string[]): IQuery; - select(...field: string[]): IQuery; - select(field: Getter): IQuery; - select(field: Getter[]): IQuery; - select(...field: Getter[]): IQuery; - groupBy(field: string[]): IQuery; - groupBy(field: Getter[]): IQuery; - groupBy(field: { field: string; desc?: boolean }[]): IQuery; - groupBy(field: { field: Getter; desc?: boolean }[]): IQuery; - sum(getter?: string): JQueryDeferred; - min(getter?: string): JQueryDeferred; - max(getter?: string): JQueryDeferred; - avg(getter?: string): JQueryDeferred; - aggregate(step: number): JQueryDeferred; - aggregate(seed: number, step: (accumulator: any, current: any) => any, finalize?: (accumulator: any) => any): JQueryDeferred; - } - export interface ArrayQuery extends IQuery { - toArray(): Array; - } - export interface RemoteQuery extends IQuery { /*todo: exec() ? */ } - export function base64_encode(input: string): string; - export function base64_encode(input: any[]): string; - export function query(items?: any[]): IQuery; - export var queryImpl: { - remote: (url: string, queryOptions: QueryOptions) => RemoteQuery; - array: (iter: Array, queryOptions: QueryOptions) => ArrayQuery; - }; - export class Guid { - constructor(value?: string); - constructor(value?: any); - toString(): string; - valueOf(): string; - toJSON(): string; - } - export class EdmLiteral { - constructor(value: any); - valueOf(): any; - } - export module utils { - export function normalizeSortingInfo(info: string): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: string[]): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: Getter): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: Getter[]): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: { field: string; dir?: string }): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: { field: string; dir?: string }[]): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: { field: string; desc?: boolean }): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: { field: string; desc?: boolean }[]): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: { selector: string; dir?: string }): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: { selector: string; dir?: string }[]): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: { selector: string; desc?: boolean }): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: { selector: string; desc?: boolean }[]): Array<{ selector: string; desc?: boolean }>; - export function normalizeBinaryCriterion(criteria: Array): Array; - export function keysEqual(key1: any, key2: any): boolean; - export function keysEqual(keyExpr: any, key1: any, key2: any): boolean; - export function toComparable(value: Date, caseSensitive?: boolean): number; - export function toComparable(value: Guid, caseSensitive?: boolean): string; - export function toComparable(value: string, caseSensitive?: boolean): string; - export function compileGetter(): Getter; - export function compileGetter(expr: any[]): Getter; - export function compileGetter(expr: string): Getter; - export function compileGetter(expr: "this"): Getter; - export function compileGetter(expr: Getter): Getter; - export function compileSetter(expr: string): Setter; - export module odata { - export function sendRequest(request: JQueryXHR, requestOptions?: JQueryAjaxSettings): any; - export function serializePropName(propName: EdmLiteral): string; - export function serializePropName(propName: string): string; - export function serializeValue(value: Date): string; - export function serializeValue(value: Guid): string; - export function serializeValue(value: string): string; - export function serializeValue(value: "string"): string; - export function serializeValue(value: EdmLiteral): string; - export function serializeKey(key: any): string; - export function serializeKey(key: Date): string; - export function serializeKey(key: Guid): string; - export function serializeKey(key: string): string; - export function serializeKey(key: "string"): string; - export function serializeKey(key: EdmLiteral): string; - export var keyConverters: { - String(value: any): string; - Guid(value: any): Guid; - Int32(value: any): number; - Int64(value: any): EdmLiteral; - }; - } - } - export module queryAdapters { - export function odata(queryOptions: ODataQueryOptions): RemoteQuery; - } - export interface DataSourceOptions { - map? (item: any): any; - postProcess? (result: any[]): any; - pageSize: number; - paginate: boolean; - } - export class DataSource { - public changed: JQueryCallback; - public loadError: JQueryCallback; - public loadingChanged: JQueryCallback; - constructor(options?: Store); - constructor(options?: string); - constructor(options?: Array); - constructor(options?: { store: Store }); - constructor(options?: CustomStoreOptions); - constructor(options?: { store: Array }); - constructor(options?: { store: { type: string } }); - constructor(options?: { load(options?: LoadOptions): JQueryXHR; }); - constructor(options?: { load(options?: LoadOptions): Array; }); - constructor(options?: { load(options?: LoadOptions): JQueryDeferred; }); - constructor(options?: DataSourceOptions); - loadOptions(): { [key: string]: any }; - items(): Array; - store(): data.Store; - isLastPage(): boolean; - pageIndex(newIndex?: number): number; - sort(expr: any[]): any[]; - group(expr: any[]): any[]; - filter(expr: any[]): any[]; - select(expr: string[]): string[]; - searchValue(value?: string): string; - searchOperation(op?: string): string; - searchExpr(selector: string): string; - key(): any; - isLoaded(): boolean; - isLoading(): boolean; - totalCount(): number; - load(): JQueryDeferred; - dispose(): void; - } - export interface StoreOptions { - key?: any; - errorHandler?: ErrorHandler; - loaded?: JQueryCallback; - loading?: JQueryCallback; - modified?: JQueryCallback; - modifying?: JQueryCallback; - inserted?: JQueryCallback; - inserting?: JQueryCallback; - updated?: JQueryCallback; - updating?: JQueryCallback; - removed?: JQueryCallback; - removing?: JQueryCallback; - } - export interface LoadOptions extends QueryOptions { - skip?: number; - take?: number; - sort?: any; - select?: any; - filter?: any; - group?: any; - } - export class Store { - loaded: JQueryCallback; - loading: JQueryCallback; - modified: JQueryCallback; - modifying: JQueryCallback; - inserted: JQueryCallback; - inserting: JQueryCallback; - updated: JQueryCallback; - updating: JQueryCallback; - removed: JQueryCallback; - removing: JQueryCallback; - constructor(options?: StoreOptions); - key(): any; - keyOf(obj: any): any; - load(options?: LoadOptions): JQueryDeferred; - createQuery(options?: QueryOptions): IQuery; - totalCount(options?: { - filter?: any[]; - group?: string[]; - }): JQueryDeferred; - byKey(key: any, extraOptions?: { - expand?: string[] - }): JQueryDeferred; - remove(key: any): JQueryDeferred; - insert(values: any): JQueryDeferred; - update(key: any, values: any): JQueryDeferred; - } - export interface CustomStoreOptions extends StoreOptions { - load? (options?: LoadOptions): any; - byKey? (key: any): any; - insert? (values: any): any; - update? (key: any, values: any): any; - remove? (key: any): any; - totalCount? (options?: { - filter?: any[]; - group?: string[]; - }): any; - } - export class CustomStore extends Store { - constructor(options?: CustomStoreOptions); - } - export interface ArrayStoreOptions extends StoreOptions { - data?: Array - } - export class ArrayStore extends Store { - constructor(options?: Array); - constructor(options?: ArrayStoreOptions); - } - export interface LocalStoreOptions extends ArrayStoreOptions { - name: string; - } - export class LocalStore extends ArrayStore { - constructor(options?: string); - constructor(options?: LocalStoreOptions); - clear(): void; - } - export interface ODataStoreOptions extends StoreOptions { - url?: string; - name?: string; - keyType?: string; - jsonp?: boolean; - withCredentials?: boolean; - } - export class ODataStore extends Store { - constructor(options?: ODataStoreOptions); - } - export interface ODataContextOptions { - url: string; - jsonp?: boolean; - withCredentials?: boolean; - errorHandler?: ErrorHandler; - beforeSend?: () => any; - entities?: Array; - } - export class ODataContext { - constructor(options?: ODataContextOptions); - get(operationName: string, params: { [key: string]: any }): JQueryDeferred>; - invoke(operationName: string, params: { [key: string]: any }, httpMethod?: string): JQueryDeferred>; - objectLink(entityAlias: string, key: any): { __metadata: { uri: string }; }; - } -} -declare module DevExpress.framework { - export interface dxViewOptions { - name: string; - title?: string; - layout?: string; - } - export class dxView extends ui.Component { - constructor(options?: dxViewOptions); - } - export interface dxLayoutOptions { - name: string; - controller: string; - } - export class dxLayout extends ui.Component { - constructor(options?: dxLayoutOptions); - } - export interface dxViewPlaceholderOptions { - viewName: string; - } - export class dxViewPlaceholder extends ui.Component { - constructor(options?: dxLayoutOptions); - } - export interface dxTransitionOptions { - name: string; - type: string; - } - export class dxTransition extends ui.Component { - constructor(options?: dxLayoutOptions); - } - export interface dxContentPlaceholderOptions { - name: string; - transition: string; - } - export class dxContentPlaceholder extends ui.Component { - constructor(options?: dxLayoutOptions); - } - export interface dxContentOptions { - targetPlaceholder: string; - } - export class dxContent extends ui.Component { - constructor(options?: dxLayoutOptions); - } - export interface dxCommandOptions extends ui.ComponentOptions { - id: string; - action?: any; - icon?: string; - title?: string; - iconSrc?: string; - visible?: boolean; - } - export class dxCommand extends ui.Component { - public beforeExecute: JQueryCallback; - public afterExecute: JQueryCallback; - constructor(element: JQuery, options?: dxCommandOptions); - constructor(element: Element, options?: dxCommandOptions); - execute(): void; - } - export class dxCommandContainer extends ui.Component { - constructor(options: ui.ComponentOptions); - constructor(element: JQuery, options?: ui.ComponentOptions); - constructor(element: Element, options?: ui.ComponentOptions); - } - export interface CommandMap { - [containerId: string]: { commands: any[]; defaults?: any; } - } - export class CommandMapping { - constructor(); - static defaultMapping: CommandMap; - mapCommands(containerId: string, commandMappings: any[]): CommandMapping; - unmapCommands(containerId: string, commandIds: string[]): void; - getCommandMappingForContainer(commandId: string, containerId: string): any; - load(config: CommandMap): CommandMapping; - } - interface IViewCache { - setView(key: string, viewInfo: any): void; - removeView(key: string): any; - hasView(viewInfo: any): boolean; - getView(key: string): any; - clear(): void; - } - export class ViewCache implements IViewCache { - constructor(); - setView(key: string, viewInfo: any): void; - removeView(key: string): any; - hasView(viewInfo: any): boolean; - getView(key: string): any; - clear(): void; - } - export class NullViewCache implements IViewCache { - constructor(); - setView(key: string, viewInfo: any): void; - removeView(key: string): any; - hasView(viewInfo: any): boolean; - getView(key: string): any; - clear(): void; - } - export interface IStorage { - getItem(key: string): any; - setItem(key: string, value: any): void; - removeItem(key: string): void; - } - export class MemoryKeyValueStorage implements IStorage { - constructor(); - getItem(key: string): any; - setItem(key: string, value: any): void; - removeItem(key: string): void; - } - export interface StateManagerOptions { - storage?: IStorage; - stateSources?: any[]; - } - export class StateManager { - public storage: IStorage; - public stateSources: any[]; - constructor(options?: StateManagerOptions); - addStateSource(stateSource: any): void; - removeStateSource(stateSource: any): void; - saveState(): void; - restoreState(): void; - clearState(): void; - } - export class Route { - constructor(pattern: string, defaults?: any, constraints?: any); - parse(url: string): any; - format(routeValues: any): string; - formatSegment(value: any): string; - parseSegment(): any; - } - export class MvcRouter { - constructor(); - register(pattern: string, defaults?: any, constraints?: any): void; - parse(uri: string): any; - format(obj: any): string; - } - interface BrowserAdapterOptions { - window: Window; - } - export class DefaultBrowserAdapter { - constructor(options?: BrowserAdapterOptions); - replaceState(uri: string): void; - pushState(uri: string): void; - createRootPage(): void; - getWindowName(): string; - setWindowName(windowName: string): void; - back(): void; - getHash(): string; - isRootPage(): boolean; - } - export class OldBrowserAdapter extends DefaultBrowserAdapter { } - export class HistorylessBrowserAdapter extends DefaultBrowserAdapter { } - export interface INavigationDevice { - setUri(uri: string): void; - getUri(): string; - back(): void; - } - export class BrowserNavigationDevice implements INavigationDevice { - constructor(options?: BrowserAdapterOptions); - setUri(uri: string): void; - getUri(): string; - back(): void; - } - export class NavigationStack { - public items: any[]; - public currentIndex: number; - public itemsRemoved: JQueryCallback; - constructor(); - currentItem(): any; - back(uri: string): void; - forward(): void; - navigate(uri: any, replaceCurrent?: boolean): any; - getPreviousItem(): any; - canBack(): boolean; - clear(): void; - } - export interface NavigationManagerOptions { - stateStorageKey?: string; - navigationDevice?: INavigationDevice; - keepPositionInStack?: boolean; - } - export class NavigationManager { - public currentUri: string; - public currentStack: NavigationStack; - public navigationStacks: { - [key: string]: NavigationStack - }; - public navigating: JQueryCallback; - public navigated: JQueryCallback; - public navigatingBack: JQueryCallback; - public navigationCanceled: JQueryCallback; - public itemRemoved: JQueryCallback; - constructor(options?: NavigationManagerOptions); - navigate(uri: any, options?: { - root?: boolean; - target?: string; - direction?: string; - }): void; - back(alternate: any): void; - rootUri(): string; - canBack(): boolean; - currentItem(): any; - currentIndex(): number; - getPreviousItem(): any; - getItemByIndex(index: number): any; - saveState(storage: IStorage): void; - restoreState(storage: IStorage): void; - removeState(storage: IStorage): void; - clearHistory(): void; - static NAVIGATION_TARGETS: { - [key: string]: string - }; - } - export module utils { - export function mergeCommands(destination: any, source: any): dxCommand[]; - } - export interface ApplicationOptions { - router?: MvcRouter; - namespace?: any; - disableViewCache?: boolean; - stateManager?: StateManager; - navigationManager?: NavigationManager; - navigation?: dxCommandOptions[]; - commandMapping?: CommandMap; - } - export class Application { - public router: MvcRouter; - public namespace: any; - public components: any[]; - public stateManager: StateManager; - public commandMapping: CommandMap; - public navigation: dxCommand[]; - public navigationManager: NavigationManager; - public beforeViewSetup: JQueryCallback; - public afterViewSetup: JQueryCallback; - public viewShowing: JQueryCallback; - public viewShown: JQueryCallback; - public viewHidden: JQueryCallback; - public viewDisposing: JQueryCallback; - public viewDisposed: JQueryCallback; - public navigating: JQueryCallback; - constructor(options?: ApplicationOptions); - init(): any; - navigate(uri?: any, options?: { - root?: boolean; - target?: string; - direction?: string; - }): void; - back(): void; - canBack(): boolean; - saveState(): void; - clearState(): void; - restoreState(): void; - } - export function createActionExecutors(app: Application): { - [key: string]: { execute(e: any): void; } - }; -} -declare module DevExpress.framework.html { - export interface ILayoutController { - viewReleased: JQueryCallback; - init(options: InitLayoutControllerOptions): void; - activate(): void; - deactivate(): void; - showView(viewInfo: any, direction?: string): JQueryDeferred; - } - export interface ILayoutControllerRegistration extends devices.Device { - name: string; - controller: ILayoutController; - root?: boolean; - } - export var layoutControllers: Array; - export interface InitLayoutControllerOptions { - $viewPort: JQuery; - $hiddenBag: JQuery; - navigationManager: framework.NavigationManager; - } - export class DefaultLayoutController implements ILayoutController { - public viewReleased: JQueryCallback; - constructor(options?: { layoutTemplateName: string }); - init(options: InitLayoutControllerOptions): void; - activate(): void; - deactivate(): void; - showView(viewInfo: any, direction?: string): JQueryDeferred; - } - export interface CommandManagerOptions { - globalCommands?: framework.dxCommand[]; - commandMapping?: framework.CommandMapping; - } - export class CommandManager { - public globalCommands: framework.dxCommand[]; - public commandMapping: framework.CommandMapping; - constructor(options?: CommandManagerOptions); - layoutCommands($markup: JQuery, extraCommands?: any): void; - } - export interface ITemplateEngine { - applyTemplate(template: string, model: any): void; - applyTemplate(template: Element, model: any): void; - applyTemplate(template: JQuery, model: any): void; - } - export class KnockoutJSTemplateEngine implements ITemplateEngine { - constructor(); - applyTemplate(template: string, model: any): void; - applyTemplate(template: Element, model: any): void; - applyTemplate(template: JQuery, model: any): void; - } - export interface TransitionExecutorOptions { - type: string; - source: JQuery; - destination: JQuery; - } - export class TransitionExecutor { - public container: JQuery; - constructor(container: JQuery, options: TransitionExecutorOptions); - finalize(): void; - exec(): JQueryDeferred; - static create(container: JQuery, options: TransitionExecutorOptions): TransitionExecutor; - } - export interface ViewEngineOptions { - $root?: JQuery; - device?: devices.Device; - commandManager: CommandManager; - templateEngine: ITemplateEngine; - dataOptionsAttributeName?: string; - } - export class ViewEngineBase { - public $root: JQuery; - public device: devices.Device; - public commandManager: CommandManager; - public templateEngine: ITemplateEngine; - public dataOptionsAttributeName: string; - public viewSelecting: JQueryCallback; - public modelFromViewDataExtended: JQueryCallback; - constructor(options?: ViewEngineOptions); - init(): JQueryDeferred; - findViewTemplate(viewName: string): JQuery; - afterViewSetup(viewInfo: any): void; - } - export class ViewEngine extends ViewEngineBase { - public layoutSelecting: JQueryCallback; - public layoutApplying: JQueryCallback; - public layoutApplied: JQueryCallback; - constructor(options?: ViewEngineOptions); - init(): JQueryDeferred; - findLayoutTemplate(layoutName: string): JQuery; - } - export interface HtmlApplicationBaseOptions extends framework.ApplicationOptions { - device?: devices.Device; - navigationType?: string; - } - export class HtmlApplicationBase extends framework.Application { - public viewRendered: JQueryCallback; - constructor(options?: HtmlApplicationBaseOptions); - init(): any; - viewPort(): JQuery; - } - export interface HtmlApplicationOptions extends HtmlApplicationBaseOptions { - commandManager?: CommandManager; - templateEngine?: ITemplateEngine; - navigateToRootViewMode?: string; - layoutControllers?: Array - } - export class HtmlApplication extends HtmlApplicationBase { - public viewEngine: ViewEngineBase; - constructor(options?: HtmlApplicationOptions); - } -} -declare module DevExpress.ui { - interface ViewportOptions { - allowPan?: boolean; - allowZoom?: boolean; - } - export interface ITemplate { - compile(html: string): any; - render(template: JQuery, data: any): any; - render(template: any, data: any): any; - } - class Template { - constructor(element: HTMLElement); - constructor(element: JQueryStatic); - render(container: HTMLElement): any; - render(container: JQueryStatic): any; - dispose(): void; - } - interface TemplateStatic { - new (element: HTMLElement): Template; - new (element: JQueryStatic): Template; - } - class TemplateProvider { - constructor(); - getTemplateClass(widget: any): TemplateStatic; - getDefaultTemplate(widget: any): void; supportDefaultTemplate(): boolean; - } - export function initViewport(options: ViewportOptions): void; - interface NotifyOptions { - message: string; - type?: string; - displayTime?: number; - hiddenAction: () => any; - } - export function notyfy(options: any): void; - export function notify(message: string, type?: string, displayTime?: number): void; - export module dialog { - interface Dialog { - show(): JQueryDeferred; - hide(value?: any): void; - } - interface DialogButton { - text: string; - icon: string; - clickAction: () => any; - } - interface DialogOptions { - message: string; - title?: string; - } - export function custom(options: DialogOptions): Dialog; - export function custom(message: string, title?: string): Dialog; - export function alert(options: DialogOptions): JQueryDeferred; - export function alert(message: string, title?: string): JQueryDeferred; - export function confirm(options: DialogOptions): JQueryDeferred; - export function confirm(message: string, title?: string): JQueryDeferred; - } - export interface CollectionContainerWidgetOptions extends ContainerWidgetOptions { - items?: Array; - itemTemplate?: any; - itemRender?: Function; - itemClickAction?: any; - itemRenderedAction?: any; - noDataText?: string; - dataSource?: data.DataSource; - } - export class CollectionContainerWidget extends ContainerWidget { - constructor(element: Element, options?: CollectionContainerWidgetOptions); - constructor(element: JQuery, options?: CollectionContainerWidgetOptions); - } - export interface ComponentOptions { - disabled?: boolean; - } - export class Component { - constructor(element: Element, options?: ComponentOptions); - constructor(element: JQuery, options?: ComponentOptions); - disposing: JQueryCallback; - optionChanged: JQueryCallback; - instance(): Component; - beginUpdate(): void; - endUpdate(): void; - option(): any; - option(options: string): any; - option(options: string): T; - option(options: string, value: any): void; - option(options: { [key: string]: any }): void; - option(options?: any): any; - } - export interface ContainerWidgetOptions extends WidgetOptions { - contentReadyAction?: any - } - export class ContainerWidget extends Widget { - constructor(element: Element, options?: WidgetOptions); - constructor(element: JQuery, options?: WidgetOptions); - addTemplate(template: ITemplate): void; - } - export interface SelectableCollectionWidgetOptions extends CollectionContainerWidgetOptions { - selectedIndex?: number; - itemSelectAction?: any; - } - export class SelectableCollectionWidget extends CollectionContainerWidget { - constructor(element: Element, options?: SelectableCollectionWidget); - constructor(element: JQuery, options?: SelectableCollectionWidget); - } - export interface WidgetOptions extends ComponentOptions { - clickAction?: any; - width?: any; - height?: any; - visible?: boolean; - activeStateEnabled?: boolean; - } - export class Widget extends Component { - constructor(element: Element, options?: WidgetOptions); - constructor(element: JQuery, options?: WidgetOptions); - init(): void; - repaint(): void; - } - export interface ActionSheetOptions extends CollectionContainerWidgetOptions { - usePopover?: boolean; - target?: any; - title?: string; - showTitle?: boolean; - cancelText?: string; - noDataText?: string; - } - export class ActionSheet extends CollectionContainerWidget { - constructor(element: Element, options?: ActionSheetOptions); - constructor(element: JQuery, options?: ActionSheetOptions); - toggle(): void; - show(): void; - hide(): void; - } - export interface AutocompleteOptions extends CollectionContainerWidgetOptions { - value?: any; - minSearchLength?: number; - searchTimeout?: number; - placeholder?: string; - filterOperator?: string; - displayExpr?: string; - valueUpdateAction?: any; - valueUpdateEvent?: string; - } - export class Autocomplete extends CollectionContainerWidget { - constructor(element: Element, options?: AutocompleteOptions); - constructor(element: JQuery, options?: AutocompleteOptions); - toggle(): void; - show(): void; - hide(): void; - } - export interface ButtonOptions extends WidgetOptions { - type?: string; - text?: string; - icon?: string; - iconSrc?: string; - } - export class Button extends Widget { - constructor(element: Element, options?: ButtonOptions); - constructor(element: JQuery, options?: ButtonOptions); - } - export interface CheckBoxOptions extends WidgetOptions { - checked?: boolean; - } - export class CheckBox extends Widget { - constructor(element: Element, options?: CheckBoxOptions); - constructor(element: JQuery, options?: CheckBoxOptions); - } - export interface DateBoxOptions extends EditBoxOptions { - format?: string; - useNativePicker?: boolean; - value?: Date; - } - export class DateBox extends EditBox { - constructor(element: Element, options?: DateBoxOptions); - constructor(element: JQuery, options?: DateBoxOptions); - } - export interface DropDownMenuOptions extends ContainerWidgetOptions { - items?: Array; - itemClickAction?: any; - dataSource?: data.DataSource; - itemTemplate?: any; - itemRender?: Function; - buttonText?: string; - buttonIcon?: string; - buttonIconSrc?: string; - buttonClickAction?: any; - usePopover?: boolean; - } - export class DropDownMenu extends ContainerWidget { - constructor(element: Element, options?: DropDownMenuOptions); - constructor(element: JQuery, options?: DropDownMenuOptions); - } - export interface EditBoxOptions extends WidgetOptions { - value?: any; - valueUpdateEvent?: string; - valueUpdateAction?: any; - placeholder?: string; - readOnly?: boolean; - focusInAction?: any; - focusOutAction?: any; - keyDownAction?: any; - keyPressAction?: any; - keyUpAction?: any; - changeAction?: any; - enterKeyAction?: any; - mode?: string; - } - export class EditBox extends Widget { - constructor(element: Element, options?: EditBoxOptions); - constructor(element: JQuery, options?: EditBoxOptions); - focus(): void; - } - export interface ListOptions extends CollectionContainerWidgetOptions { - pullRefreshEnabled?: boolean; - autoPagingEnabled?: boolean; - scrollingEnabled?: boolean; - showScrollbar?: boolean; - useNativeScrolling?: boolean; - grouped?: boolean; - editEnabled?: boolean; - showNextButton?: boolean; - groupTemplate?: string; - pullingDownText?: string; - pulledDownText?: string; - refreshingText?: string; - pageLoadingText?: string; - scrollAction?: any; - pullRefreshAction?: any; - pageLoadingAction?: any; - itemHoldAction?: any; - itemSwipeAction?: any; - itemHoldTimeout?: number; - groupRender? (groupData: any, groupIndex: number, groupElement: Element): any; - editConfig?: { - itemTemplate?: any; - itemRenderer? (itemData: any, itemIndex: number, itemElement: Element): any; - deleteEnabled?: boolean; - deleteMode?: string; - selectionEnabled?: boolean; - selectionMode?: string; - } - itemDeleteAction?: any; - selectedItems?: any[]; - itemSelectAction?: any; - itemUnselectAction?: any; - } - export class List extends CollectionContainerWidget { - constructor(element: Element, options?: ListOptions); - constructor(element: JQuery, options?: ListOptions); - update(): JQueryDeferred; - deleteItem(itemElement: JQuery): JQueryDeferred; - deleteItem(itemElement: Element): JQueryDeferred; - clearSelectedItems(): void; - isItemSelected(itemElement: JQuery): boolean; - isItemSelected(itemElement: Element): boolean; - selectItem(itemElement: JQuery): void; - selectItem(itemElement: Element): void; - unselectItem(itemElement: JQuery): void; - unselectItem(itemElement: Element): void; - getSelectedItems(): number[]; - } - export interface LoadPanelOptions extends OverlayOptions { - message?: string; - width?: number; - height?: number; - } - export class LoadPanel extends Overlay { - constructor(element: Element, options?: LoadPanelOptions); - constructor(element: JQuery, options?: LoadPanelOptions); - } - export interface LookupOptions extends ContainerWidgetOptions { - dataSource?: data.DataSource; - value?: any; - displayValue?: string; - title?: string; - valueExpr?: string; - displayExpr?: string; - placeholder?: string; - searchPlaceholder?: string; - searchEnabled?: boolean; - searchTimeout?: number; - minFilterLength?: number; - fullScreen?: boolean; - valueChangeAction?: any; - itemTemplate?: any; - itemRender?: Function; - showCancelButton?: boolean; - showClearButton?: boolean; - showDoneButton?: boolean; - } - export class Lookup extends ContainerWidget { - constructor(element: Element, options?: LookupOptions); - constructor(element: JQuery, options?: LookupOptions); - } - export interface MapOptions extends WidgetOptions { - location?: any; - width?: number; - height?: number; - zoom?: number; - mapType?: string; - provider?: string; - markers?: Array; - routes?: Array; - key?: string; - controls?: any; - mapReadyAction?: any; - } - export class Map extends Widget { - constructor(element: Element, options?: MapOptions); - constructor(element: JQuery, options?: MapOptions); - addMarker(markerOptions: any, callback: Function): JQueryDeferred; - removeMarker(marker: any): void; - addRoute(routeOptions: any, callback: Function): JQueryDeferred; - removeRoute(route: any): void; - } - export interface NavBarOptions extends TabsOptions { } - export class NavBar extends Tabs { - constructor(element: Element, options?: NavBarOptions); - constructor(element: JQuery, options?: NavBarOptions); - } - export interface NumberBoxOptions extends EditBoxOptions { - min?: number; - max?: number; - value?: number; - } - export class NumberBox extends EditBox { - constructor(element: Element, options?: NumberBoxOptions); - constructor(element: JQuery, options?: NumberBoxOptions); - } - export interface OverlayOptions extends WidgetOptions { - activeStateEnabled?: boolean; - shading?: boolean; - closeOnOutsideClick?: boolean; - position?: any; - animation?: any; - showingAction?: any; - shownAction?: any; - hidingAction?: any; - hiddenAction?: any; - deferRendering?: boolean; - targetContainer?: any; - } - export class Overlay extends Widget { - constructor(element: Element, options?: OverlayOptions); - constructor(element: JQuery, options?: OverlayOptions); - } - export interface PanoramaOptions extends SelectableCollectionWidgetOptions { - title?: string; - backgroundImage?: any; - } - export class Panorama extends SelectableCollectionWidget { - constructor(element: Element, options?: PanoramaOptions); - constructor(element: JQuery, options?: PanoramaOptions); - } - export interface PivotOptions extends SelectableCollectionWidgetOptions { } - export class Pivot extends SelectableCollectionWidget { - constructor(element: Element, options?: PivotOptions); - constructor(element: JQuery, options?: PivotOptions); - } - export interface PopoverOptions extends PopupOptions { - target?: any; - } - export class Popover extends Popup { - constructor(element: Element, options?: PopoverOptions); - constructor(element: JQuery, options?: PopoverOptions); - } - export interface PopupOptions extends OverlayOptions { - title?: string; - showTitle?: boolean; - fullScreen?: boolean; - cancelButton?: any; - doneButton?: any; - clearButton?: any; - } - export class Popup extends Overlay { - constructor(element: Element, options?: PopupOptions); - constructor(element: JQuery, options?: PopupOptions); - content(): Element; - } - export interface RadioGroupOptions extends SelectableCollectionWidgetOptions { - layout?: string; - name?: string; - } - export class RadioGroup extends SelectableCollectionWidget { - constructor(element: Element, options?: RadioGroupOptions); - constructor(element: JQuery, options?: RadioGroupOptions); - } - export interface RangeSliderOptions extends SliderOptions { - start?: number; - end?: number; - } - export class RangeSlider extends Slider { - constructor(element: Element, options?: RangeSliderOptions); - constructor(element: JQuery, options?: RangeSliderOptions); - } - export interface ScrollableOptions extends ComponentOptions { - startAction?: any; - scrollAction?: any; - endAction?: any; - stopAction?: any; - inertiaAction?: any; - bounceAction?: any; - updateAction?: any; - bounceEnabled?: boolean; - direction?: string; - showScrollbar?: boolean; - useNative?: boolean; - } - export class Scrollable extends Component { - constructor(element: Element, options?: ScrollableOptions); - constructor(element: JQuery, options?: ScrollableOptions); - update(): void; - content(): JQuery; - location(): Object; - clientHeight(): number; - scrollHeight(): number; - scrollBy(distance: number): void; - scrollBy(distance: Object): void; - scrollTo(targetLocation: number): void; - scrollTo(targetLocation: Object): void; - } - export interface ScrollViewOptions extends ScrollableOptions { - pullingDownText?: string; - pulledDownText?: string; - refreshingText?: string; - reachBottomText?: string; - pullDownAction?: any; - reachBottomAction?: any; - } - export class ScrollView extends Scrollable { - constructor(element: Element, options?: ScrollViewOptions); - constructor(element: JQuery, options?: ScrollViewOptions); - release(preventReachBottom: boolean): JQueryDeferred; - toggleLoading(showOrHide: boolean): void; - isFull(): boolean; - } - export interface SelectBoxOptions extends AutocompleteOptions { - valueChangeAction?: any; - } - export class SelectBox extends Autocomplete { - constructor(element: Element, options?: SelectBoxOptions); - constructor(element: JQuery, options?: SelectBoxOptions); - } - export interface SliderOptions extends WidgetOptions { - min?: number; - max?: number; - step?: number; - value?: number; - } - export class Slider extends Widget { - constructor(element: Element, options?: SliderOptions); - constructor(element: JQuery, options?: SliderOptions); - } - export interface SwitchOptions extends WidgetOptions { - onText?: string; - offText?: string; - value?: boolean; - } - export class Switch extends Widget { - constructor(element: Element, options?: SwitchOptions); - constructor(element: JQuery, options?: SwitchOptions); - } - export interface TabsOptions extends SelectableCollectionWidgetOptions { } - export class Tabs extends SelectableCollectionWidget { - constructor(element: Element, options?: TabsOptions); - constructor(element: JQuery, options?: TabsOptions); - } - export interface TextAreaOptions extends EditBoxOptions { - cols?: number; - rows?: number; - } - export class TextArea extends EditBox { - constructor(element: Element, options?: TextAreaOptions); - constructor(element: JQuery, options?: TextAreaOptions); - } - export interface TextBoxOptions extends EditBoxOptions { - maxLength?: any; - } - export class TextBox extends EditBox { - constructor(element: Element, options?: TextBoxOptions); - constructor(element: JQuery, options?: TextBoxOptions); - } - export interface TileViewOptions extends CollectionContainerWidgetOptions { - bounceEnabled?: boolean; - showScrollbar?: boolean; - listHeight?: number; - baseItemWidth?: number; - baseItemHeight?: number; - itemMargin?: number; - } - export class TileView extends CollectionContainerWidget { - constructor(element: Element, options?: TileViewOptions); - constructor(element: JQuery, options?: TileViewOptions); - } - export interface ToastOptions extends OverlayOptions { - message?: string; - type?: string; - displayTime?: number; - } - export class Toast extends Overlay { - constructor(element: Element, options?: ToastOptions); - constructor(element: JQuery, options?: ToastOptions); - } - export interface ToolbarOptions extends CollectionContainerWidgetOptions { - menuItemRender?: Function; - menuItemTemplate?: any; - submenuType?: string; - } - export class Toolbar extends CollectionContainerWidget { - constructor(element: Element, options?: ToolbarOptions); - constructor(element: JQuery, options?: ToolbarOptions); - } -} -interface JQuery { - dxActionSheet(options?: DevExpress.ui.ActionSheetOptions): JQuery; - dxAutocomplete(options?: DevExpress.ui.AutocompleteOptions): JQuery; - dxButton(options?: DevExpress.ui.ButtonOptions): JQuery; - dxCheckBox(options?: DevExpress.ui.CheckBoxOptions): JQuery; - dxDateBox(options?: DevExpress.ui.DateBoxOptions): JQuery; - dxDropDownMenu(options?: DevExpress.ui.DropDownMenuOptions): JQuery; - dxEditBox(options?: DevExpress.ui.EditBoxOptions): JQuery; - dxList(options?: DevExpress.ui.ListOptions): JQuery; - dxLoadPanel(options?: DevExpress.ui.LoadPanelOptions): JQuery; - dxLookup(options?: DevExpress.ui.LookupOptions): JQuery; - dxMap(options?: DevExpress.ui.MapOptions): JQuery; - dxNavBar(options?: DevExpress.ui.NavBarOptions): JQuery; - dxNumberBox(options?: DevExpress.ui.NumberBoxOptions): JQuery; - dxOverlay(options?: DevExpress.ui.OverlayOptions): JQuery; - dxPanorama(options?: DevExpress.ui.PanoramaOptions): JQuery; - dxPivot(options?: DevExpress.ui.PivotOptions): JQuery; - dxPopover(options?: DevExpress.ui.PopoverOptions): JQuery; - dxPopup(options?: DevExpress.ui.PopupOptions): JQuery; - dxRadioGroup(options?: DevExpress.ui.RadioGroupOptions): JQuery; - dxRangeSlider(options?: DevExpress.ui.RangeSliderOptions): JQuery; - dxScrollable(options?: DevExpress.ui.ScrollableOptions): JQuery; - dxScrollView(options?: DevExpress.ui.ScrollViewOptions): JQuery; - dxSelectBox(options?: DevExpress.ui.SelectBoxOptions): JQuery; - dxSlider(options?: DevExpress.ui.SliderOptions): JQuery; - dxSwitch(options?: DevExpress.ui.SwitchOptions): JQuery; - dxTabs(options?: DevExpress.ui.TabsOptions): JQuery; - dxTextArea(options?: DevExpress.ui.TextAreaOptions): JQuery; - dxTextBox(options?: DevExpress.ui.TextBoxOptions): JQuery; - dxTileView(options?: DevExpress.ui.TileViewOptions): JQuery; - dxToast(options?: DevExpress.ui.ToastOptions): JQuery; - dxToolbar(options?: DevExpress.ui.ToolbarOptions): JQuery; -} \ No newline at end of file From 6e0bae985d640a78126eca4b6533557dcd172679 Mon Sep 17 00:00:00 2001 From: Earl Ferguson Date: Wed, 3 Sep 2014 16:04:51 -0400 Subject: [PATCH 028/221] Added Parse SDK Definition --- parse/parse-tests.ts | 519 ++++++++++++++++++++++++ parse/parse.d.ts | 943 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 1462 insertions(+) create mode 100644 parse/parse-tests.ts create mode 100644 parse/parse.d.ts diff --git a/parse/parse-tests.ts b/parse/parse-tests.ts new file mode 100644 index 000000000..6316aaf17 --- /dev/null +++ b/parse/parse-tests.ts @@ -0,0 +1,519 @@ +/// + +function test_events() { + + var object = new Parse.Events(); + object.on("alert", (eventName: string) => alert("Triggered " + eventName)); + + object.trigger("alert", "an event"); + + var onChange = () => console.log('whatever'); + var context: any; + + object.off("change", onChange); + object.off("change"); + object.off(null, onChange); + object.off(null, null, context); + object.off(); +} + +class GameScore extends Parse.Object { + + constructor(options?: any) { + + super("GameScore", options); + } +} + +class Game extends Parse.Object { + + constructor(options?: any) { + + super("GameScore", options); + } + + set score(score: GameScore) { + this.set('score', score); + } + + get score(): GameScore { + return this.get("gameScore"); + } +} + +function test_object() { + + var game = new Game(); + +// Create a new instance of that class. + var gameScore = new GameScore(); + + gameScore.set("score", 1337); + gameScore.set("playerName", "Sean Plott"); + gameScore.set("cheatMode", false); + + + var score = gameScore.get("score"); + var playerName = gameScore.get("playerName"); + var cheatMode = gameScore.get("cheatMode"); + + gameScore.increment("score"); + gameScore.addUnique("skills", "flying"); + gameScore.addUnique("skills", "kungfu"); + + game.set("gameScore", gameScore); + game.score = gameScore; + + var newGameScore = game.score; + + game.save(null, { + success: (game) => { + // Execute any logic that should take place after the object is saved. + console.log('New object created with objectId: ' + game.id); + }, + error: (game, error) => { + // Execute any logic that should take place if the save fails. + // error is a Parse.Error with an error code and description. + console.log('Fa iled to create new object, with error code: ' + error.message); + } + }).then( + + (response) => { + + console.log(response); + }, + (error) => { + + console.log(error); + } + ); + + game.fetch().then( + + (response) => { + + console.log(response); + }, + (error) => { + + console.log(error); + } + ); + + game.destroy().then( + + (response) => { + + console.log(response); + }, + (error) => { + + console.log(error); + } + ); +} + +function test_query() { + + var gameScore = new GameScore(); + + var query = new Parse.Query(GameScore); + query.equalTo("playerName", "Dan Stemkoski"); + query.notEqualTo("playerName", "Michael Yabuti"); + query.greaterThan("playerAge", 18); + query.limit(10); + query.skip(10); + + // Sorts the results in ascending order by the score field + query.ascending("score"); + + // Sorts the results in descending order by the score field + query.descending("score"); + + // Restricts to wins < 50 + query.lessThan("wins", 50); + + // Restricts to wins <= 50 + query.lessThanOrEqualTo("wins", 50); + + // Restricts to wins > 50 + query.greaterThan("wins", 50); + + // Restricts to wins >= 50 + query.greaterThanOrEqualTo("wins", 50); + + // Finds scores from any of Jonathan, Dario, or Shawn + query.containedIn("playerName", + ["Jonathan Walsh", "Dario Wunsch", "Shawn Simon"]); + + // Finds scores from anyone who is neither Jonathan, Dario, nor Shawn + query.notContainedIn("playerName", + ["Jonathan Walsh", "Dario Wunsch", "Shawn Simon"]); + + // Finds objects that have the score set + query.exists("score"); + + // Finds objects that don't have the score set + query.doesNotExist("score"); + query.matchesKeyInQuery("hometown", "city", query); + query.doesNotMatchKeyInQuery("hometown", "city", query); + query.select("score", "playerName"); + + // Find objects where the array in arrayKey contains 2. + query.equalTo("arrayKey", 2); + + // Find objects where the array in arrayKey contains all of the elements 2, 3, and 4. + query.containsAll("arrayKey", [2, 3, 4]); + + query.startsWith("name", "Big Daddy's"); + query.equalTo("score", gameScore); + query.exists("score"); + query.include("score"); + query.include(["score.team"]); + + var testQuery = Parse.Query.or(query, query); + + query.count().then( + (object) => { + + }, + (error) => { + console.log("Error: " + error.code + " " + error.message); + } + ); + + query.find({ + success: (results) => { + alert("Successfully retrieved " + results.length + " scores."); + // Do something with the returned Parse.Object values + for (var i = 0; i < results.length; i++) { + var object = results[i]; + console.log(object.id + ' - ' + object.get('playerName')); + } + }, + error: (error) => { + alert("Error: " + error.code + " " + error.message); + } + }); + + query.first().then( + (object) => { + + }, + (error) => { + console.log("Error: " + error.code + " " + error.message); + } + ); +} + +class TestCollection extends Parse.Collection { + + constructor(models?: Parse.Object[]) { + + super(models); + } +} + +function test_collections() { + + var collection = new TestCollection(); + + var query = new Parse.Query(Game); + query.equalTo("temperature", "hot"); + query.greaterThan("degreesF", 100); + + collection = query.collection(); + + collection.comparator = (object) => { + return object.get("temperature"); + }; + + collection.add([ + {"name": "Duke"}, + {"name": "Scarlett"} + ]); + + collection.fetch().then( + (data) => { + + }, + (error) => { + console.log("Error: " + error.code + " " + error.message); + } + ); + + var model = collection.at(0); + + // Or you can get it by Parse objectId. + var modelAgain = collection.get(model.id); + + // Remove "Duke" from the collection. + collection.remove(model); + + // Completely replace all items in the collection. + collection.reset([ + {"name": "Hawk"}, + {"name": "Jane"} + ]); +} + +function test_file() { + + var base64 = "V29ya2luZyBhdCBQYXJzZSBpcyBncmVhdCE="; + var file = new Parse.File("myfile.txt", { base64: base64 }); + + var bytes = [ 0xBE, 0xEF, 0xCA, 0xFE ]; + var file = new Parse.File("myfile.txt", bytes); + + var file = new Parse.File("myfile.zzz", {}, "image/png"); + + var src = file.url(); + + file.save().then( + () => { + // The file has been saved to Parse. + }, + (error) => { + // The file either could n ot be read, or could not be saved to Parse. + }); + + Parse.Cloud.httpRequest({ url: file.url() }).then((response: Parse.Promise) => { + // result + }); + + // TODO: Check +} + +function test_analytics() { + + var dimensions = { + // Define ranges to bucket data points into meaningful segments + priceRange: '1000-1500', + // Did the user filter the query? + source: 'craigslist', + // Do searches happen more often on weekdays or weekends? + dayType: 'weekday' + }; + // Send the dimensions to Parse along with the 'search' event + Parse.Analytics.track('search', dimensions); + + var codeString = '404'; + Parse.Analytics.track('error', { code: codeString }) +} + +function test_user_acl_roles() { + + var user = new Parse.User(); + user.set("username", "my name"); + user.set("password", "my pass"); + user.set("email", "email@example.com"); + +// other fields can be set just like with Parse.Object + user.set("phone", "415-392-0202"); + + user.signUp(null, { + success: function(user) { + // Hooray! Let them use the app now. + }, + error: function(user, error) { + // Show the error message somewhere and let the user try again. + alert("Error: " + error.code + " " + error.message); + } + }); + + Parse.User.logIn("myname", "mypass").then( + (data) => { + + }, + (error) => { + console.log("Error: " + error.code + " " + error.message); + } + ); + + var currentUser = Parse.User.current(); + if (currentUser) { + // do stuff with the user + } else { + // show the signup or login page + } + + Parse.User.become("session-token-here").then(function (user) { + // The current user is now set to user. + }, function (error) { + // The token could not be validated. + }); + + var game = new Game(); + game.set("score", new GameScore()); + game.setACL(new Parse.ACL(Parse.User.current())); + game.save(); + + var groupACL = new Parse.ACL(); + + var userList = []; + // userList is an array with the users we are sending this message to. + for (var i = 0; i < userList.length; i++) { + groupACL.setReadAccess(userList[i], true); + groupACL.setWriteAccess(userList[i], true); + } + + groupACL.setPublicReadAccess(true); + + game.setACL(groupACL); + + Parse.User.requestPasswordReset("email@example.com").then(function (data) { + // The current user is now set to user. + }, function (error) { + // The token could not be validated. + }); + + // By specifying no write privileges for the ACL, we can ensure the role cannot be altered. + var role = new Parse.Role("Administrator", groupACL); + role.getUsers().add(role); + role.getRoles().add(role); + role.save(); + + Parse.User.logOut(); +} + +function test_facebook_util() { + + Parse.FacebookUtils.init({ + appId : 'YOUR_APP_ID', // Facebook App ID + channelUrl : '//WWW.YOUR_DOMAIN.COM/channel.html', // Channel File + cookie : true, // enable cookies to allow Parse to access the session + xfbml : true // parse XFBML + }); + + Parse.FacebookUtils.logIn(null, { + success: (user) => { + if (!user.existed()) { + alert("User signed up and logged in through Facebook!"); + } else { + alert("User logged in through Facebook!"); + } + }, + error: (user, error) => { + alert("User cancelled the Facebook login or did not fully authorize."); + } + }); + + var user = Parse.User.current(); + + if (!Parse.FacebookUtils.isLinked(user)) { + Parse.FacebookUtils.link(user, null, { + success: (user) => { + alert("Woohoo, user logged in with Facebook!"); + }, + error: (user, error) => { + alert("User cancelled the Facebook login or did not fully authorize."); + } + }); + } + + Parse.FacebookUtils.unlink(user, { + success: (user) => { + alert("The user is no longer associated with their Facebook account."); + } + }); +} + +function test_cloud_functions() { + + Parse.Cloud.run('hello', {}, { + success: (result) => { + // result + }, + error: (error) => { + } + }); + + Parse.Cloud.afterDelete('MyCustomClass', (request: Parse.Cloud.AfterDeleteRequest) => { + // result + }); + + Parse.Cloud.afterSave('MyCustomClass', (request: Parse.Cloud.AfterSaveRequest) => { + // result + }); + + Parse.Cloud.beforeDelete('MyCustomClass', (request: Parse.Cloud.BeforeDeleteRequest, + response: Parse.Cloud.BeforeDeleteResponse) => { + // result + }); +} + +class PlaceObject extends Parse.Object {} + +function test_geo_points() { + + var point = new Parse.GeoPoint({latitude: 40.0, longitude: -30.0}); + + var userObject = Parse.User.current(); + + // User's location + var userGeoPoint = userObject.get("location"); + + // Create a query for places + var query = new Parse.Query(Parse.User); +// Interested in locations near user. + query.near("location", userGeoPoint); + // Limit what could be a lot of points. + query.limit(10); + // Final list of objects + query.find({ + success: (placesObjects) => { + } + }); + + + var southwestOfSF = new Parse.GeoPoint(37.708813, -122.526398); + var northeastOfSF = new Parse.GeoPoint(37.822802, -122.373962); + + var query = new Parse.Query(PlaceObject); + query.withinGeoBox("location", southwestOfSF, northeastOfSF); + query.find({ + success: function(place) { + + } + }); +} + +function test_push() { + + Parse.Push.send({ + channels: [ "Gia nts", "Mets" ], + data: { + alert: "The Giants won against the Mets 2-3." + } + }, { + success: () => { + // Push was successful + }, + error: (error) => { + // Handle error + } + }); + + var query = new Parse.Query(Parse.Installation); + query.equalTo('injuryReports', true); + + Parse.Push.send({ + where: query, // Set our Installation query + data: { + alert: "Willie Hayes injured by own pop fly." + } + }, { + success: function() { + // Push was successful + }, + error: function(error) { + // Handle error + } + }); +} + +function test_view() { + + var model = Parse.User.current(); + var view = new Parse.View(); +} \ No newline at end of file diff --git a/parse/parse.d.ts b/parse/parse.d.ts new file mode 100644 index 000000000..697e3bf87 --- /dev/null +++ b/parse/parse.d.ts @@ -0,0 +1,943 @@ +// Type definitions for Parse v1.2.19 +// Project: https://parse.com/ +// Definitions by: Ullisen Media Group, LLC <[http://ullisenmedia.com]> +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// +/// +/// + +declare module Parse { + + var applicationId: string; + var javaScriptKey: string; + var masterKey: string; + var serverURL: string; + var VERSION: string; + + interface ParseDefaultOptions { + wait?: boolean; + silent?: boolean; + success?: Function; + error?: Function; + useMasterKey?: boolean; + } + + interface CollectionOptions { + model?: Object; + query?: Query; + comparator?: string; + } + + interface CollectionAddOptions { + at?: number; + } + + interface RouterOptions { + routes: any; + } + + interface NavigateOptions { + trigger?: boolean; + } + + interface ViewOptions { + model?: any; + collection?: any; + el?: any; + id?: string; + className?: string; + tagName?: string; + attributes?: any[]; + } + + interface PushData { + channels?: string[]; + push_time?: Date; + expiration_time?: Date; + expiration_interval?: number; + where?: Query; + data?: any; + alert?: string; + badge?: string; + sound?: string; + title?: string; + } + + /** + * A Promise is returned by async methods as a hook to provide callbacks to be + * called when the async task is fulfilled. + * + *

Typical usage would be like:

+     *    query.find().then(function(results) {
+     *      results[0].set("foo", "bar");
+     *      return results[0].saveAsync();
+     *    }).then(function(result) {
+     *      console.log("Updated " + result.id);
+     *    });
+     * 

+ * + * @see Parse.Promise.prototype.then + * @class + */ + + interface IPromise { + + then(resolvedCallback: (value: T) => IPromise, rejectedCallback?: (reason: any) => IPromise): IPromise; + then(resolvedCallback: (value: T) => U, rejectedCallback?: (reason: any) => IPromise): IPromise; + then(resolvedCallback: (value: T) => U, rejectedCallback?: (reason: any) => U): IPromise; + } + + interface Promise { + + always(callback: Function): Promise; + as(): Promise; + done(callback: Function): Promise; + error(): Promise; + fail(callback: Function): Promise; + is(): Promise; + reject(error: any): void; + resolve(result: any): void; + then(resolvedCallback: (value: T) => Promise, + rejectedCallback?: (reason: any) => Promise): IPromise; + then(resolvedCallback: (value: T) => U, + rejectedCallback?: (reason: any) => IPromise): IPromise; + then(resolvedCallback: (value: T) => U, + rejectedCallback?: (reason: any) => U): IPromise; + + when(promises: Promise[]): Promise; + } + + interface IBaseObject { + toJSON(): any; + } + + class BaseObject implements IBaseObject { + toJSON(): any; + } + + /** + * Creates a new ACL. + * If no argument is given, the ACL has no permissions for anyone. + * If the argument is a Parse.User, the ACL will have read and write + * permission for only that user. + * If the argument is any other JSON object, that object will be interpretted + * as a serialized ACL created with toJSON(). + * @see Parse.Object#setACL + * @class + * + *

An ACL, or Access Control List can be added to any + * Parse.Object to restrict access to only a subset of users + * of your application.

+ */ + class ACL extends BaseObject { + + permissionsById: any; + + constructor(arg1?: any); + + setPublicReadAccess(allowed: boolean); + getPublicReadAccess(): boolean; + + setPublicWriteAccess(allowed: boolean); + getPublicWriteAccess(): boolean; + + setReadAccess(userId: User, allowed: boolean); + getReadAccess(userId: User): boolean; + + setReadAccess(userId: string, allowed: boolean); + getReadAccess(userId: string): boolean; + + setRoleReadAccess(role: Role, allowed: boolean); + setRoleReadAccess(role: string, allowed: boolean); + getRoleReadAccess(role: Role): boolean; + getRoleReadAccess(role: string): boolean; + + setRoleWriteAccess(role: Role, allowed: boolean); + setRoleWriteAccess(role: string, allowed: boolean); + getRoleWriteAccess(role: Role): boolean; + getRoleWriteAccess(role: string): boolean; + + setWriteAccess(userId: User, allowed: boolean); + setWriteAccess(userId: string, allowed: boolean); + getWriteAccess(userId: User): boolean; + getWriteAccess(userId: string): boolean; + } + + + /** + * A Parse.File is a local representation of a file that is saved to the Parse + * cloud. + * @class + * @param name {String} The file's name. This will be prefixed by a unique + * value once the file has finished saving. The file name must begin with + * an alphanumeric character, and consist of alphanumeric characters, + * periods, spaces, underscores, or dashes. + * @param data {Array} The data for the file, as either: + * 1. an Array of byte value Numbers, or + * 2. an Object like { base64: "..." } with a base64-encoded String. + * 3. a File object selected with a file upload control. (3) only works + * in Firefox 3.6+, Safari 6.0.2+, Chrome 7+, and IE 10+. + * For example:
+     * var fileUploadControl = $("#profilePhotoFileUpload")[0];
+     * if (fileUploadControl.files.length > 0) {
+     *   var file = fileUploadControl.files[0];
+     *   var name = "photo.jpg";
+     *   var parseFile = new Parse.File(name, file);
+     *   parseFile.save().then(function() {
+     *     // The file has been saved to Parse.
+     *   }, function(error) {
+     *     // The file either could not be read, or could not be saved to Parse.
+     *   });
+     * }
+ * @param type {String} Optional Content-Type header to use for the file. If + * this is omitted, the content type will be inferred from the name's + * extension. + */ + class File { + + constructor(name: string, data: any, type?: string); + name(): string; + url(): string; + save(options?: ParseDefaultOptions); + + } + + /** + * Creates a new GeoPoint with any of the following forms:
+ *
+     *   new GeoPoint(otherGeoPoint)
+     *   new GeoPoint(30, 30)
+     *   new GeoPoint([30, 30])
+     *   new GeoPoint({latitude: 30, longitude: 30})
+     *   new GeoPoint()  // defaults to (0, 0)
+     *   
+ * @class + * + *

Represents a latitude / longitude point that may be associated + * with a key in a ParseObject or used as a reference point for geo queries. + * This allows proximity-based queries on the key.

+ * + *

Only one key in a class may contain a GeoPoint.

+ * + *

Example:

+     *   var point = new Parse.GeoPoint(30.0, -20.0);
+     *   var object = new Parse.Object("PlaceObject");
+     *   object.set("location", point);
+     *   object.save();

+ */ + class GeoPoint extends BaseObject { + + latitude: number; + longitude: number; + + constructor(arg1?: any, arg2?: any); + + current(options?: ParseDefaultOptions): GeoPoint; + radiansTo(point: GeoPoint): number; + kilometersTo(point: GeoPoint): number; + milesTo(point: GeoPoint): number; + } + + /** + * History serves as a global router (per frame) to handle hashchange + * events or pushState, match the appropriate route, and trigger + * callbacks. You shouldn't ever have to create one of these yourself + * — you should use the reference to Parse.history + * that will be created for you automatically if you make use of + * Routers with routes. + * @class + * + *

A fork of Backbone.History, provided for your convenience. If you + * use this class, you must also include jQuery, or another library + * that provides a jQuery-compatible $ function. For more information, + * see the + * Backbone documentation.

+ *

Available in the client SDK only.

+ */ + class History { + + handlers: any[]; + interval: number; + fragment: string; + + checkUrl(e?: any): void; + getFragment(fragment?: string, forcePushState?: boolean): string; + getHash(windowOverride: Window): string; + loadUrl(fragmentOverride: any): boolean; + navigate(fragment: string, options?: any): any; + route(route: any, callback: Function): void; + start(options: any): boolean; + stop(): void; + } + + /** + * A class that is used to access all of the children of a many-to-many relationship. + * Each instance of Parse.Relation is associated with a particular parent object and key. + */ + class Relation extends BaseObject { + + parent: Object; + key: string; + targetClassName: string; + + constructor(parent?: Object, key?: string); + + //Adds a Parse.Object or an array of Parse.Objects to the relation. + add(object: Object): void; + + // Returns a Parse.Query that is limited to objects in this relation. + query(): Query; + + // Removes a Parse.Object or an array of Parse.Objects from this relation. + remove(object: Object): void; + } + + /** + * Creates a new model with defined attributes. A client id (cid) is + * automatically generated and assigned for you. + * + *

You won't normally call this method directly. It is recommended that + * you use a subclass of Parse.Object instead, created by calling + * extend.

+ * + *

However, if you don't want to use a subclass, or aren't sure which + * subclass is appropriate, you can use this form:

+     *     var object = new Parse.Object("ClassName");
+     * 
+ * That is basically equivalent to:
+     *     var MyClass = Parse.Object.extend("ClassName");
+     *     var object = new MyClass();
+     * 

+ * + * @param {Object} attributes The initial set of data to store in the object. + * @param {Object} options A set of Backbone-like options for creating the + * object. The only option currently supported is "collection". + * @see Parse.Object.extend + * + * @class + * + *

The fundamental unit of Parse data, which implements the Backbone Model + * interface.

+ */ + class Object extends BaseObject { + + id: any; + attributes: any; + cid: string; + changed: boolean; + className: string; + + constructor(className?: string, options?: any); + constructor(attributes?: string[], options?: any); + + static extend(className: string, protoProps?: any, classProps?: any): any; + static fetchAll(list: Object[], options: ParseDefaultOptions): Promise; + static fetchAllIfNeeded(list: Object[], options: ParseDefaultOptions): Promise; + + initialize(); + add(attr: string, item: any); + addUnique(attr: string, item: any); + change(options: any); + changedAttributes(diff: any): any; + clear(options: any): any; + clone(): Object; + destroy(options?: ParseDefaultOptions): Promise; + destroyAll(list: Object[], options?: ParseDefaultOptions): Promise; + dirty(attr: String): boolean; + dirtyKeys(): string[]; + escape(attr: string); + existed(): boolean; + fetch(options?: ParseDefaultOptions): Promise; + get(attr: string): any; + getACL(): ACL; + has(attr: string): boolean; + hasChanged(attr: string): boolean; + increment(attr: string, amount?: number): any; + isValid(): boolean; + op(attr: string): any; + previous(attr: string): any; + previousAttributes(): any; + relation(attr: string): Relation; + remove(attr: string, item: any): any; + save(options?: ParseDefaultOptions, arg2?: any, arg3?: any): Promise; + saveAll(list: Object[], options?: ParseDefaultOptions): Promise; + set(key: string, value: any, options?: ParseDefaultOptions): boolean; + setACL(acl: ACL, options?: ParseDefaultOptions): boolean; + unset(attr: string, options?: any): any; + validate(attrs: any, options?: ParseDefaultOptions): boolean; + + } + + /** + * Every Parse application installed on a device registered for + * push notifications has an associated Installation object. + */ + class Installation extends Object { + + badge: any; + channels: string[]; + timeZone: any; + deviceType: string; + pushType: string; + installationId: string; + deviceToken: string; + channelUris: string; + appName: string; + appVersion: string; + parseVersion: string; + appIdentifier: string; + + } + + /** + * Creates a new instance with the given models and options. Typically, you + * will not call this method directly, but will instead make a subclass using + * Parse.Collection.extend. + * + * @param {Array} models An array of instances of Parse.Object. + * + * @param {Object} options An optional object with Backbone-style options. + * Valid options are:
    + *
  • model: The Parse.Object subclass that this collection contains. + *
  • query: An instance of Parse.Query to use when fetching items. + *
  • comparator: A string property name or function to sort by. + *
+ * + * @see Parse.Collection.extend + * + * @class + * + *

Provides a standard collection class for our sets of models, ordered + * or unordered. For more information, see the + * Backbone + * documentation.

+ */ + class Collection extends Events implements IBaseObject { + + model: Object; + models: Object[]; + query: Query; + comparator: (object: Object) => any; + + constructor(models?: Object[], options?: CollectionOptions); + static extend(instanceProps: any, classProps: any): any; + + initialize(): void; + add(models: any[], options?: CollectionAddOptions); + at(index: number): Object; + chain(): _Chain>; + fetch(options?: ParseDefaultOptions): Promise; + create(model: Object, options?: ParseDefaultOptions): Object; + get(id: string): Object; + getByCid(cid: any): any; + pluck(attr: string): any[]; + remove(model: any, options?: ParseDefaultOptions): Collection; + remove(models: any[], options?: ParseDefaultOptions): Collection; + reset(models: any[], options?: ParseDefaultOptions): Collection; + sort(options?: ParseDefaultOptions): Collection; + toJSON(): any; + + } + + /** + * @class + * + *

Parse.Events is a fork of Backbone's Events module, provided for your + * convenience.

+ * + *

A module that can be mixed in to any object in order to provide + * it with custom events. You may bind callback functions to an event + * with `on`, or remove these functions with `off`. + * Triggering an event fires all callbacks in the order that `on` was + * called. + * + *

+     *     var object = {};
+     *     _.extend(object, Parse.Events);
+     *     object.on('expand', function(){ alert('expanded'); });
+     *     object.trigger('expand');

+ * + *

For more information, see the + * Backbone + * documentation.

+ */ + class Events { + + static off(events: string[], callback?: Function, context?: any); + static on(events: string[], callback?: Function, context?: any); + static trigger(events: string[]); + static bind(); + static unbind(); + + on(eventName: string, callback?: Function, context?: any): any; + off(eventName?: string, callback?: Function, context?: any): any; + trigger(eventName: string, ...args: any[]): any; + bind(eventName: string, callback: Function, context?: any): any; + unbind(eventName?: string, callback?: Function, context?: any): any; + + } + + /** + * Creates a new parse Parse.Query for the given Parse.Object subclass. + * @param objectClass - + * An instance of a subclass of Parse.Object, or a Parse className string. + * @class + * + *

Parse.Query defines a query that is used to fetch Parse.Objects. The + * most common use case is finding all objects that match a query through the + * find method. For example, this sample code fetches all objects + * of class MyClass. It calls a different function depending on + * whether the fetch succeeded or not. + * + *

+     * var query = new Parse.Query(MyClass);
+     * query.find({
+     *   success: function(results) {
+     *     // results is an array of Parse.Object.
+     *   },
+     *
+     *   error: function(error) {
+     *     // error is an instance of Parse.Error.
+     *   }
+     * });

+ * + *

A Parse.Query can also be used to retrieve a single object whose id is + * known, through the get method. For example, this sample code fetches an + * object of class MyClass and id myId. It calls a + * different function depending on whether the fetch succeeded or not. + * + *

+     * var query = new Parse.Query(MyClass);
+     * query.get(myId, {
+     *   success: function(object) {
+     *     // object is an instance of Parse.Object.
+     *   },
+     *
+     *   error: function(object, error) {
+     *     // error is an instance of Parse.Error.
+     *   }
+     * });

+ * + *

A Parse.Query can also be used to count the number of objects that match + * the query without retrieving all of those objects. For example, this + * sample code counts the number of objects of the class MyClass + *

+     * var query = new Parse.Query(MyClass);
+     * query.count({
+     *   success: function(number) {
+     *     // There are number instances of MyClass.
+     *   },
+     *
+     *   error: function(error) {
+     *     // error is an instance of Parse.Error.
+     *   }
+     * });

+ */ + class Query extends BaseObject { + + objectClass: any; + className: string; + + constructor(objectClass: any); + + static or(...var_args: Query[]): Query; + + addAscending(key: string): Query; + addAscending(key: string[]): Query; + addDescending(key: string): Query; + addDescending(key: string[]): Query; + ascending(key: string): Query; + ascending(key: string[]): Query; + collection(items?: Object[], options?: ParseDefaultOptions): Collection; + containedIn(key: string, values: any[]): Query; + contains(key: string, substring: string): Query; + containsAll(key: string, values: any[]): Query; + count(options?: ParseDefaultOptions): Promise; + descending(key: string): Query; + descending(key: string[]): Query; + doesNotExist(key: string): Query; + doesNotMatchKeyInQuery(key: string, queryKey: string, query: Query): Query; + doesNotMatchQuery(key: string, query: Query): Query; + each(callback: Function, options?: ParseDefaultOptions): Promise; + endsWith(key: string, suffix: string): Query; + equalTo(key: string, value: any): Query; + exists(key: string): Query; + find(options?: ParseDefaultOptions): Promise; + first(options?: ParseDefaultOptions): Promise; + get(objectId: string, options?: ParseDefaultOptions): Promise; + greaterThan(key: string, value: any): Query; + greaterThanOrEqualTo(key: string, value: any): Query; + include(key: string): Query; + include(keys: string[]): Query; + lessThan(key: string, value: any): Query; + lessThanOrEqualTo(key: string, value: any): Query; + limit(n: number): Query; + matches(key: string, regex: RegExp, modifiers: any): Query; + matchesKeyInQuery(key: string, queryKey: string, query: Query): Query; + matchesQuery(key: string, query: Query): Query; + near(key: string, point: GeoPoint): Query; + notContainedIn(key: string, values: any[]): Query; + notEqualTo(key: string, value: any): Query; + select(...keys: string[]): Query; + skip(n: number): Query; + startsWith(key: string, prefix: string): Query; + withinGeoBox(key: string, southwest: GeoPoint, northeast: GeoPoint): Query; + withinKilometers(key: string, point: GeoPoint, maxDistance: number): Query; + withinMiles(key: string, point: GeoPoint, maxDistance: number): Query; + withinRadians(key: string, point: GeoPoint, maxDistance: number): Query; + } + + /** + * Represents a Role on the Parse server. Roles represent groupings of + * Users for the purposes of granting permissions (e.g. specifying an ACL + * for an Object). Roles are specified by their sets of child users and + * child roles, all of which are granted any permissions that the parent + * role has. + * + *

Roles must have a name (which cannot be changed after creation of the + * role), and must specify an ACL.

+ * @class + * A Parse.Role is a local representation of a role persisted to the Parse + * cloud. + */ + class Role extends Object { + + constructor(name: string, acl: ACL); + + getRoles(): Relation; + getUsers(): Relation; + getName(): string; + setName(name: string, options?: ParseDefaultOptions); + } + + /** + * Routers map faux-URLs to actions, and fire events when routes are + * matched. Creating a new one sets its `routes` hash, if not set statically. + * @class + * + *

A fork of Backbone.Router, provided for your convenience. + * For more information, see the + * Backbone + * documentation.

+ *

Available in the client SDK only.

+ */ + class Router extends Events { + + routes: any[]; + + constructor(options?: RouterOptions); + + static extend(instanceProps: any, classProps: any): any; + + initialize(): void; + navigate(fragment: string, options?: NavigateOptions): Router; + navigate(fragment: string, trigger?: boolean): Router; + route(route: string, name: string, callback: Function): Router; + } + + /** + * @class + * + *

A Parse.User object is a local representation of a user persisted to the + * Parse cloud. This class is a subclass of a Parse.Object, and retains the + * same functionality of a Parse.Object, but also extends it with various + * user specific methods, like authentication, signing up, and validation of + * uniqueness.

+ */ + class User extends Object { + + static current(): User; + static signUp(username: string, password: string, attrs: any, options?: ParseDefaultOptions): Promise; + static logIn(username: string, password: string, options?: ParseDefaultOptions): Promise; + static logOut(): void; + static allowCustomUserClass(isAllowed: boolean): void; + static become(sessionToken: string, options?: ParseDefaultOptions): Promise; + static requestPasswordReset(email: string, options?: ParseDefaultOptions): Promise; + + signUp(attrs: any, options?: ParseDefaultOptions): Promise; + logIn(options?: ParseDefaultOptions): Promise; + fetch(options?: ParseDefaultOptions): Promise; + save(arg1: any, arg2: any, arg3: any): Promise; + authenticated(): boolean; + isCurrent(): boolean; + + getEmail(): string; + setEmail(email: string, options: ParseDefaultOptions): boolean; + + getUsername(): string; + setUsername(username: string, options?: ParseDefaultOptions): boolean; + + setPassword(password: string, options?: ParseDefaultOptions): boolean; + + getSessionToken(): string; + } + + /** + * Creating a Parse.View creates its initial element outside of the DOM, + * if an existing element is not provided... + * @class + * + *

A fork of Backbone.View, provided for your convenience. If you use this + * class, you must also include jQuery, or another library that provides a + * jQuery-compatible $ function. For more information, see the + * Backbone + * documentation.

+ *

Available in the client SDK only.

+ */ + class View extends Events { + + model: any; + collection: any; + id: string; + cid: string; + className: string; + tagName: string; + el: any; + $el: JQuery; + attributes: any; + + constructor(options?: ViewOptions); + + static extend(properties: any, classProperties?: any): any; + + $(selector?: string): JQuery; + setElement(element: HTMLElement, delegate?: boolean): View; + setElement(element: JQuery, delegate?: boolean): View; + render(): View; + remove(): View; + make(tagName: any, attributes?: any, content?: any): any; + delegateEvents(events?: any): any; + undelegateEvents(): any; + + } + + module Analytics { + + function track(name: string, dimensions: any):Promise; + } + + /** + * Provides a set of utilities for using Parse with Facebook. + * @namespace + * Provides a set of utilities for using Parse with Facebook. + */ + module FacebookUtils { + + function init(options?: any); + function isLinked(user: User): boolean; + function link(user: User, permissions: any, options?: ParseDefaultOptions): void; + function logIn(permissions: any, options?: ParseDefaultOptions): void; + function unlink(user: User, options?: ParseDefaultOptions): void; + } + + /** + * @namespace Contains functions for calling and declaring + * cloud functions. + *

+ * Some functions are only available from Cloud Code. + *

+ */ + module Cloud { + + interface CookieOptions { + domain?: string; + expires?: Date; + httpOnly?: boolean; + maxAge?: number; + path?: string; + secure?: boolean; + } + + interface HttpResponse { + buffer?: Buffer; + cookies?: any; + data?: any; + headers?: any; + status?: number; + text?: string; + } + + interface JobRequest { + params: any; + } + + interface JobStatus { + error?: Function; + message?: Function; + success?: Function; + } + + interface FunctionRequest { + installationId?: String; + master?: boolean; + params?: any; + user?: User; + } + + interface FunctionResponse { + success?: (response: HttpResponse) => void; + error?: (response: HttpResponse) => void; + } + + interface Cookie { + name?: string; + options?: CookieOptions; + value?: string; + } + + interface AfterSaveRequest extends FunctionRequest {} + interface AfterDeleteRequest extends FunctionRequest {} + interface BeforeDeleteRequest extends FunctionRequest {} + interface BeforeDeleteResponse extends FunctionResponse {} + interface BeforeSaveRequest extends FunctionRequest {} + interface BeforeSaveResponse extends FunctionResponse {} + + function afterDelete(arg1: any, func?: (request: AfterDeleteRequest) => void): void; + function afterSave(arg1: any, func?: (request: AfterSaveRequest) => void): void; + function beforeDelete(arg1: any, func?: (request: BeforeDeleteRequest, response: BeforeDeleteResponse) => void): void; + function beforeSave(arg1: any, func?: (request: BeforeSaveRequest, response: BeforeSaveResponse) => void): void; + function define(name: string, func?: (request: FunctionRequest, response: FunctionResponse) => void): void; + function httpRequest(options: ParseDefaultOptions): Promise; + function job(name: string, func?: (request: JobRequest, status: JobStatus) => void): HttpResponse; + function run(name: string, data?: any, options?: ParseDefaultOptions): Promise; + function useMasterKey(): void; + } + + + class Error { + + code: ErrorCode; + message: string; + + constructor(code: ErrorCode, message: string); + + } + + enum ErrorCode { + + OTHER_CAUSE = -1, + INTERNAL_SERVER_ERROR = 1, + CONNECTION_FAILED = 100, + OBJECT_NOT_FOUND = 101, + INVALID_QUERY = 102, + INVALID_CLASS_NAME = 103, + MISSING_OBJECT_ID = 104, + INVALID_KEY_NAME = 105, + INVALID_POINTER = 106, + INVALID_JSON = 107, + COMMAND_UNAVAILABLE = 108, + NOT_INITIALIZED = 109, + INCORRECT_TYPE = 111, + INVALID_CHANNEL_NAME = 112, + PUSH_MISCONFIGURED = 115, + OBJECT_TOO_LARGE = 116, + OPERATION_FORBIDDEN = 119, + CACHE_MISS = 120, + INVALID_NESTED_KEY = 121, + INVALID_FILE_NAME = 122, + INVALID_ACL = 123, + TIMEOUT = 124, + INVALID_EMAIL_ADDRESS = 125, + MISSING_CONTENT_TYPE = 126, + MISSING_CONTENT_LENGTH = 127, + INVALID_CONTENT_LENGTH = 128, + FILE_TOO_LARGE = 129, + FILE_SAVE_ERROR = 130, + FILE_DELETE_ERROR = 153, + DUPLICATE_VALUE = 137, + INVALID_ROLE_NAME = 139, + EXCEEDED_QUOTA = 140, + SCRIPT_FAILED = 141, + VALIDATION_ERROR = 142, + INVALID_IMAGE_DATA = 150, + UNSAVED_FILE_ERROR = 151, + INVALID_PUSH_TIME_ERROR = 152, + USERNAME_MISSING = 200, + PASSWORD_MISSING = 201, + USERNAME_TAKEN = 202, + EMAIL_TAKEN = 203, + EMAIL_MISSING = 204, + EMAIL_NOT_FOUND = 205, + SESSION_MISSING = 206, + MUST_CREATE_USER_THROUGH_SIGNUP = 207, + ACCOUNT_ALREADY_LINKED = 208, + LINKED_ID_MISSING = 250, + INVALID_LINKED_SESSION = 251, + UNSUPPORTED_SERVICE = 252, + AGGREGATE_ERROR = 600, + FILE_READ_ERROR = 601, + X_DOMAIN_REQUEST = 602 + } + + /** + * @class + * A Parse.Op is an atomic operation that can be applied to a field in a + * Parse.Object. For example, calling object.set("foo", "bar") + * is an example of a Parse.Op.Set. Calling object.unset("foo") + * is a Parse.Op.Unset. These operations are stored in a Parse.Object and + * sent to the server as part of object.save() operations. + * Instances of Parse.Op should be immutable. + * + * You should not create subclasses of Parse.Op or instantiate Parse.Op + * directly. + */ + module Op { + + interface BaseOperation extends IBaseObject { + objects(): any[]; + } + + interface Add extends BaseOperation { + } + + interface AddUnique extends BaseOperation { + } + + interface Increment extends IBaseObject { + amount: number; + } + + interface Relation extends IBaseObject { + added(): Object[]; + removed: Object[]; + } + + interface Set extends IBaseObject { + value(): any; + } + + interface Unset extends IBaseObject { + } + + } + + /** + * Contains functions to deal with Push in Parse + * @name Parse.Push + * @namespace + */ + module Push { + + function send(data: PushData, options?: ParseDefaultOptions):Promise; + } + + /** + * Call this method first to set up your authentication tokens for Parse. + * You can get your keys from the Data Browser on parse.com. + * @param {String} applicationId Your Parse Application ID. + * @param {String} javaScriptKey Your Parse JavaScript Key. + * @param {String} masterKey (optional) Your Parse Master Key. (Node.js only!) + */ + function initialize(applicationId: string, javaScriptKey: string, masterKey?: string); + +} + +declare module "parse" { + var type: typeof Parse; + var subType: { + Parse: typeof type; + } + + export = subType; +} From f43c2d163ab7bf8672caa0921a6559b5758a74e4 Mon Sep 17 00:00:00 2001 From: Earl Ferguson Date: Wed, 3 Sep 2014 16:16:54 -0400 Subject: [PATCH 029/221] Cleaning up test --- parse/parse-tests.ts | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/parse/parse-tests.ts b/parse/parse-tests.ts index 6316aaf17..49b2e62b2 100644 --- a/parse/parse-tests.ts +++ b/parse/parse-tests.ts @@ -31,14 +31,6 @@ class Game extends Parse.Object { super("GameScore", options); } - - set score(score: GameScore) { - this.set('score', score); - } - - get score(): GameScore { - return this.get("gameScore"); - } } function test_object() { @@ -62,9 +54,6 @@ function test_object() { gameScore.addUnique("skills", "kungfu"); game.set("gameScore", gameScore); - game.score = gameScore; - - var newGameScore = game.score; game.save(null, { success: (game) => { From 577175844db5f7efe7d0a19a8e3d47605c468fc5 Mon Sep 17 00:00:00 2001 From: Earl Ferguson Date: Wed, 3 Sep 2014 16:59:24 -0400 Subject: [PATCH 030/221] Bug fixes after running tests --- parse/parse-tests.ts | 128 ++++--------------------------------------- parse/parse.d.ts | 66 +++++++++++----------- 2 files changed, 42 insertions(+), 152 deletions(-) diff --git a/parse/parse-tests.ts b/parse/parse-tests.ts index 49b2e62b2..c7cc6ff49 100644 --- a/parse/parse-tests.ts +++ b/parse/parse-tests.ts @@ -54,52 +54,6 @@ function test_object() { gameScore.addUnique("skills", "kungfu"); game.set("gameScore", gameScore); - - game.save(null, { - success: (game) => { - // Execute any logic that should take place after the object is saved. - console.log('New object created with objectId: ' + game.id); - }, - error: (game, error) => { - // Execute any logic that should take place if the save fails. - // error is a Parse.Error with an error code and description. - console.log('Fa iled to create new object, with error code: ' + error.message); - } - }).then( - - (response) => { - - console.log(response); - }, - (error) => { - - console.log(error); - } - ); - - game.fetch().then( - - (response) => { - - console.log(response); - }, - (error) => { - - console.log(error); - } - ); - - game.destroy().then( - - (response) => { - - console.log(response); - }, - (error) => { - - console.log(error); - } - ); } function test_query() { @@ -161,38 +115,6 @@ function test_query() { query.include(["score.team"]); var testQuery = Parse.Query.or(query, query); - - query.count().then( - (object) => { - - }, - (error) => { - console.log("Error: " + error.code + " " + error.message); - } - ); - - query.find({ - success: (results) => { - alert("Successfully retrieved " + results.length + " scores."); - // Do something with the returned Parse.Object values - for (var i = 0; i < results.length; i++) { - var object = results[i]; - console.log(object.id + ' - ' + object.get('playerName')); - } - }, - error: (error) => { - alert("Error: " + error.code + " " + error.message); - } - }); - - query.first().then( - (object) => { - - }, - (error) => { - console.log("Error: " + error.code + " " + error.message); - } - ); } class TestCollection extends Parse.Collection { @@ -300,25 +222,6 @@ function test_user_acl_roles() { // other fields can be set just like with Parse.Object user.set("phone", "415-392-0202"); - user.signUp(null, { - success: function(user) { - // Hooray! Let them use the app now. - }, - error: function(user, error) { - // Show the error message somewhere and let the user try again. - alert("Error: " + error.code + " " + error.message); - } - }); - - Parse.User.logIn("myname", "mypass").then( - (data) => { - - }, - (error) => { - console.log("Error: " + error.code + " " + error.message); - } - ); - var currentUser = Parse.User.current(); if (currentUser) { // do stuff with the user @@ -339,7 +242,7 @@ function test_user_acl_roles() { var groupACL = new Parse.ACL(); - var userList = []; + var userList: Parse.User[] = [Parse.User.current()]; // userList is an array with the users we are sending this message to. for (var i = 0; i < userList.length; i++) { groupACL.setReadAccess(userList[i], true); @@ -375,14 +278,14 @@ function test_facebook_util() { }); Parse.FacebookUtils.logIn(null, { - success: (user) => { + success: (user: Parse.User) => { if (!user.existed()) { alert("User signed up and logged in through Facebook!"); } else { alert("User logged in through Facebook!"); } }, - error: (user, error) => { + error: (user: Parse.User, error: any) => { alert("User cancelled the Facebook login or did not fully authorize."); } }); @@ -391,17 +294,17 @@ function test_facebook_util() { if (!Parse.FacebookUtils.isLinked(user)) { Parse.FacebookUtils.link(user, null, { - success: (user) => { + success: (user: any) => { alert("Woohoo, user logged in with Facebook!"); }, - error: (user, error) => { + error: (user: any, error: any) => { alert("User cancelled the Facebook login or did not fully authorize."); } }); } Parse.FacebookUtils.unlink(user, { - success: (user) => { + success: (user: Parse.User) => { alert("The user is no longer associated with their Facebook account."); } }); @@ -410,10 +313,10 @@ function test_facebook_util() { function test_cloud_functions() { Parse.Cloud.run('hello', {}, { - success: (result) => { + success: (result: any) => { // result }, - error: (error) => { + error: (error: any) => { } }); @@ -448,23 +351,12 @@ function test_geo_points() { query.near("location", userGeoPoint); // Limit what could be a lot of points. query.limit(10); - // Final list of objects - query.find({ - success: (placesObjects) => { - } - }); - var southwestOfSF = new Parse.GeoPoint(37.708813, -122.526398); var northeastOfSF = new Parse.GeoPoint(37.822802, -122.373962); var query = new Parse.Query(PlaceObject); query.withinGeoBox("location", southwestOfSF, northeastOfSF); - query.find({ - success: function(place) { - - } - }); } function test_push() { @@ -478,7 +370,7 @@ function test_push() { success: () => { // Push was successful }, - error: (error) => { + error: (error: any) => { // Handle error } }); @@ -495,7 +387,7 @@ function test_push() { success: function() { // Push was successful }, - error: function(error) { + error: function(error: any) { // Handle error } }); diff --git a/parse/parse.d.ts b/parse/parse.d.ts index 697e3bf87..4f179eb91 100644 --- a/parse/parse.d.ts +++ b/parse/parse.d.ts @@ -1,6 +1,6 @@ // Type definitions for Parse v1.2.19 // Project: https://parse.com/ -// Definitions by: Ullisen Media Group, LLC <[http://ullisenmedia.com]> +// Definitions by: Ullisen Media Group LLC // Definitions: https://github.com/borisyankov/DefinitelyTyped /// @@ -136,30 +136,30 @@ declare module Parse { constructor(arg1?: any); - setPublicReadAccess(allowed: boolean); + setPublicReadAccess(allowed: boolean): void; getPublicReadAccess(): boolean; - setPublicWriteAccess(allowed: boolean); + setPublicWriteAccess(allowed: boolean): void; getPublicWriteAccess(): boolean; - setReadAccess(userId: User, allowed: boolean); + setReadAccess(userId: User, allowed: boolean): void; getReadAccess(userId: User): boolean; - setReadAccess(userId: string, allowed: boolean); + setReadAccess(userId: string, allowed: boolean): void; getReadAccess(userId: string): boolean; - setRoleReadAccess(role: Role, allowed: boolean); - setRoleReadAccess(role: string, allowed: boolean); + setRoleReadAccess(role: Role, allowed: boolean): void; + setRoleReadAccess(role: string, allowed: boolean): void; getRoleReadAccess(role: Role): boolean; getRoleReadAccess(role: string): boolean; - setRoleWriteAccess(role: Role, allowed: boolean); - setRoleWriteAccess(role: string, allowed: boolean); + setRoleWriteAccess(role: Role, allowed: boolean): void; + setRoleWriteAccess(role: string, allowed: boolean): void; getRoleWriteAccess(role: Role): boolean; getRoleWriteAccess(role: string): boolean; - setWriteAccess(userId: User, allowed: boolean); - setWriteAccess(userId: string, allowed: boolean); + setWriteAccess(userId: User, allowed: boolean): void; + setWriteAccess(userId: string, allowed: boolean): void; getWriteAccess(userId: User): boolean; getWriteAccess(userId: string): boolean; } @@ -199,7 +199,7 @@ declare module Parse { constructor(name: string, data: any, type?: string); name(): string; url(): string; - save(options?: ParseDefaultOptions); + save(options?: ParseDefaultOptions): Promise; } @@ -335,18 +335,18 @@ declare module Parse { static fetchAll(list: Object[], options: ParseDefaultOptions): Promise; static fetchAllIfNeeded(list: Object[], options: ParseDefaultOptions): Promise; - initialize(); - add(attr: string, item: any); - addUnique(attr: string, item: any); - change(options: any); - changedAttributes(diff: any): any; + initialize(): void; + add(attr: string, item: any): Object; + addUnique(attr: string, item: any): any; + change(options: any): Object; + changedAttributes(diff: any): boolean; clear(options: any): any; clone(): Object; destroy(options?: ParseDefaultOptions): Promise; destroyAll(list: Object[], options?: ParseDefaultOptions): Promise; dirty(attr: String): boolean; dirtyKeys(): string[]; - escape(attr: string); + escape(attr: string): string; existed(): boolean; fetch(options?: ParseDefaultOptions): Promise; get(attr: string): any; @@ -424,7 +424,7 @@ declare module Parse { static extend(instanceProps: any, classProps: any): any; initialize(): void; - add(models: any[], options?: CollectionAddOptions); + add(models: any[], options?: CollectionAddOptions): Collection; at(index: number): Object; chain(): _Chain>; fetch(options?: ParseDefaultOptions): Promise; @@ -464,17 +464,17 @@ declare module Parse { */ class Events { - static off(events: string[], callback?: Function, context?: any); - static on(events: string[], callback?: Function, context?: any); - static trigger(events: string[]); - static bind(); - static unbind(); + static off(events: string[], callback?: Function, context?: any): Events; + static on(events: string[], callback?: Function, context?: any): Events; + static trigger(events: string[]): Events; + static bind(): Events; + static unbind(): Events; - on(eventName: string, callback?: Function, context?: any): any; - off(eventName?: string, callback?: Function, context?: any): any; - trigger(eventName: string, ...args: any[]): any; - bind(eventName: string, callback: Function, context?: any): any; - unbind(eventName?: string, callback?: Function, context?: any): any; + on(eventName: string, callback?: Function, context?: any): Events; + off(eventName?: string, callback?: Function, context?: any): Events; + trigger(eventName: string, ...args: any[]): Events; + bind(eventName: string, callback: Function, context?: any): Events; + unbind(eventName?: string, callback?: Function, context?: any): Events; } @@ -608,7 +608,7 @@ declare module Parse { getRoles(): Relation; getUsers(): Relation; getName(): string; - setName(name: string, options?: ParseDefaultOptions); + setName(name: string, options?: ParseDefaultOptions): any; } /** @@ -627,7 +627,6 @@ declare module Parse { routes: any[]; constructor(options?: RouterOptions); - static extend(instanceProps: any, classProps: any): any; initialize(): void; @@ -669,7 +668,6 @@ declare module Parse { setUsername(username: string, options?: ParseDefaultOptions): boolean; setPassword(password: string, options?: ParseDefaultOptions): boolean; - getSessionToken(): string; } @@ -724,7 +722,7 @@ declare module Parse { */ module FacebookUtils { - function init(options?: any); + function init(options?: any): void; function isLinked(user: User): boolean; function link(user: User, permissions: any, options?: ParseDefaultOptions): void; function logIn(permissions: any, options?: ParseDefaultOptions): void; @@ -929,7 +927,7 @@ declare module Parse { * @param {String} javaScriptKey Your Parse JavaScript Key. * @param {String} masterKey (optional) Your Parse Master Key. (Node.js only!) */ - function initialize(applicationId: string, javaScriptKey: string, masterKey?: string); + function initialize(applicationId: string, javaScriptKey: string, masterKey?: string): void; } From 32bfad140fa864dea286f5f5db7e9385f7172cbc Mon Sep 17 00:00:00 2001 From: Earl Ferguson Date: Wed, 3 Sep 2014 17:08:59 -0400 Subject: [PATCH 031/221] Header cleanup --- parse/parse.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parse/parse.d.ts b/parse/parse.d.ts index 4f179eb91..1acc44c6b 100644 --- a/parse/parse.d.ts +++ b/parse/parse.d.ts @@ -1,6 +1,6 @@ // Type definitions for Parse v1.2.19 // Project: https://parse.com/ -// Definitions by: Ullisen Media Group LLC +// Definitions by: Ullisen Media Group // Definitions: https://github.com/borisyankov/DefinitelyTyped /// From 2167630b2ae3332c01cf985832e3146efb0458b8 Mon Sep 17 00:00:00 2001 From: Basarat Ali Syed Date: Thu, 4 Sep 2014 09:50:18 +1000 Subject: [PATCH 032/221] Argument to eval and evalAsync are optional Reference : https://github.com/angular/angular.js/pull/8558 --- angularjs/angular.d.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index 084bea034..7e2f5ddba 100755 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -482,13 +482,11 @@ declare module ng { $digest(): void; $emit(name: string, ...args: any[]): IAngularEvent; - // Documentation says exp is optional, but actual implementaton counts on it - $eval(expression: string, args?: Object): any; - $eval(expression: (scope: IScope) => any, args?: Object): any; + $eval(expression?: string, args?: Object): any; + $eval(expression?: (scope: IScope) => any, args?: Object): any; - // Documentation says exp is optional, but actual implementaton counts on it - $evalAsync(expression: string): void; - $evalAsync(expression: (scope: IScope) => any): void; + $evalAsync(expression?: string): void; + $evalAsync(expression?: (scope: IScope) => any): void; // Defaults to false by the implementation checking strategy $new(isolate?: boolean): IScope; From d8c36a37f5e3d4cfac1b262304d12a8317f67b86 Mon Sep 17 00:00:00 2001 From: tomato360 Date: Thu, 4 Sep 2014 09:11:26 +0900 Subject: [PATCH 033/221] add header and modification JQueryLeanModalOption --- jquery.leanModal/jquery.leanModal.d.ts | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/jquery.leanModal/jquery.leanModal.d.ts b/jquery.leanModal/jquery.leanModal.d.ts index f4f395e58..47c0e3537 100755 --- a/jquery.leanModal/jquery.leanModal.d.ts +++ b/jquery.leanModal/jquery.leanModal.d.ts @@ -1,24 +1,22 @@ - +// Type definitions for leanModal.js 1.1 +// Project: http://leanmodal.finelysliced.com.au/ +// Definitions by: FinelySliced +// Definitions: https://github.com/borisyankov/DefinitelyTyped /// interface JQueryLeanModalOption { - top : number; - overlay : number; - closeButton : String; -} - -interface JQueryLeanModalStatic { - ():any; - (JQueryLeanModalOption):any; + top? : number; + overlay? : number; + closeButton? : String; } interface JQueryStatic { - leanModal(): JQueryLeanModalStatic; - leanModal(JQueryLeanModalOption): JQueryLeanModalStatic; + leanModal(): JQuery; + leanModal(val : JQueryLeanModalOption): JQuery; } interface JQuery { - leanModal(): JQueryLeanModalStatic; - leanModal(JQueryLeanModalOption): JQueryLeanModalStatic; + leanModal(): JQuery; + leanModal(val : JQueryLeanModalOption): JQuery; } \ No newline at end of file From 556005691d5f42fd2a49a4de37273997a42b704b Mon Sep 17 00:00:00 2001 From: tomato360 Date: Thu, 4 Sep 2014 09:11:26 +0900 Subject: [PATCH 034/221] add header and modification JQueryLeanModalOption --- CONTRIBUTORS.md | 5 +- ...TORS_98f07bc20cb66328be238119df96c490.html | 407 ++++++++++++++++++ jquery.leanModal/jquery.leanModal.d.ts | 24 +- 3 files changed, 421 insertions(+), 15 deletions(-) create mode 100644 CONTRIBUTORS_98f07bc20cb66328be238119df96c490.html diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 1cded38d5..afc287da3 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -1,4 +1,4 @@ -# Contributors +# Contributors This is a non-exhaustive list of definitions and their creators. If you created a definition but are not listed then feel free to send a pull request on this file with your name and url. @@ -175,6 +175,7 @@ All definitions files include a header with the author and editors, so at some p * [jQuery.jNotify](http://jnotify.codeplex.com) (by [James Curran](https://github.com/jamescurran/)) * [jQuery.joyride](http://zurb.com/playground/jquery-joyride-feature-tour-plugin) (by [Vincent Bortone](https://github.com/vbortone)) * [jQuery.jSignature](https://github.com/willowsystems/jSignature) (by [Patrick Magee](https://github.com/pjmagee)) +* [jQuery.leanModal](http://leanmodal.finelysliced.com.au/)(by [tomato360](https://github.com/tomato360)) * [jQuery.notifyBar](http://www.whoop.ee/posts/2013-04-05-the-resurrection-of-jquery-notify-bar/) (by [Shunsuke Ohtani](https://github.com/zaneli)) * [jQuery.noty](http://needim.github.io/noty/) (by [Aaron King](https://github.com/kingdango/)) * [jQuery.payment](http://needim.github.io/noty/) (by [Eric J. Smith](https://github.com/ejsmith/)) @@ -244,7 +245,7 @@ All definitions files include a header with the author and editors, so at some p * [Marked](https://github.com/chjj/marked) (by [William Orr](https://github.com/worr)) * [MathJax](https://github.com/mathjax/MathJax) (by [Roland Zwaga](https://github.com/rolandzwaga)) * [mCustomScrollbar](https://github.com/malihu/malihu-custom-scrollbar-plugin) (by [Sarah Williams](https://github.com/flurg)) -* [Meteor](https://www.meteor.com) (by [Dave Allen](https://github.com/fullflavedave)) +* [Meteor](https://www.meteor.com) (by [Dave Allen](https://github.com/fullflavedave)) * [md5.js](http://labs.cybozu.co.jp/blog/mitsunari/2007/07/md5js_1.html) (by [MIZUNE Pine](https://github.com/pine613)) * [Microsoft Ajax](http://msdn.microsoft.com/en-us/library/ee341002(v=vs.100).aspx) (by [Patrick Magee](https://github.com/pjmagee)) * [Microsoft Live Connect](http://msdn.microsoft.com/en-us/library/live/hh243643.aspx) (by [John Vilk](https://github.com/jvilk)) diff --git a/CONTRIBUTORS_98f07bc20cb66328be238119df96c490.html b/CONTRIBUTORS_98f07bc20cb66328be238119df96c490.html new file mode 100644 index 000000000..5fbae25d6 --- /dev/null +++ b/CONTRIBUTORS_98f07bc20cb66328be238119df96c490.html @@ -0,0 +1,407 @@ + + + + + + +CONTRIBUTORS.md + + +

Contributors

+

This is a non-exhaustive list of definitions and their creators. If you created a definition but are not listed then feel free to send a pull request on this file with your name and url.

+

All definitions files include a header with the author and editors, so at some point this list will be auto-generated.

+ +
    +
  • jQuery.leanModal(by tomato360)
  • +
  • jQuery.notifyBar (by Shunsuke Ohtani)
  • +
  • jQuery.noty (by Aaron King)
  • +
  • jQuery.payment (by Eric J. Smith)
  • +
  • jQuery.pickadate (by Theodore Brown)
  • +
  • jQuery.pjax (by Junle Li)
  • +
  • jQuery.pjax.falsandtru (by NewNotMoon)
  • +
  • jQuery.pnotify (by David Sichau)
  • +
  • jQuery.postMessage (by Junle Li)
  • +
  • jQuery.prettyphoto (by Paul Gaske)
  • +
  • jQuery.scrollTo (by Neil Stalker)
  • +
  • jQuery.simplePagination (by Natan Vivo)
  • +
  • jquery.superLink (by Blake Niemyjski)
  • +
  • jQuery.tile (by Shunsuke Ohtani)
  • +
  • jQuery.timeago (by François Guillot)
  • +
  • jQuery.Timepicker (by Anwar Javed)
  • +
  • jQuery.Timer (by Joshua Strobl)
  • +
  • jQuery.TinyCarousel (by Christiaan Rakowski)
  • +
  • jQuery.TinyScrollbar (by Christiaan Rakowski)
  • +
  • jQuery.tooltipster (by Patrick Magee)
  • +
  • jQuery.total-storage (by Jeremy Brooks)
  • +
  • jQuery.Transit (by MrBigDog2U)
  • +
  • jQuery.Validation (by Boris Yankov)
  • +
  • jQuery.Watermark (by Anwar Javed)
  • +
  • jQuery.base64 (by Shinya Mochizuki)
  • +
  • jquery-handsontable (by Ted John)
  • +
  • js-git (by Bart van der Schoor)
  • +
  • js-url (by MIZUNE Pine)
  • +
  • js-yaml (by Bart van der Schoor)
  • +
  • jsbn (by Eugene Chernyshov)
  • +
  • jScrollPane (by Dániel Tar)
  • +
  • JSDeferred (by Daisuke Mino)
  • +
  • JSONEditorOnline (by Vincent Bortone)
  • +
  • JSON-Pointer (by Bart van der Schoor)
  • +
  • JsRender (by Kensuke MATSUZAKI)
  • +
  • jStorage (by Danil Flores)
  • +
  • jsTree (by Adam Pluciński)
  • +
  • JWPlayer (by Martin Duparc)
  • +
  • KeyboardJS (by Vincent Bortone)
  • +
  • keymaster.js (by Marting W. Kirst)
  • +
  • KineticJS (by Basarat Ali Syed)
  • +
  • Knockback (by Marcel Binot)
  • +
  • Knockout.js (by Boris Yankov)
  • +
  • Knockout.Amd.Helpers (by David Sichau)
  • +
  • Knockout.DeferredUpdates (by Sebastián Galiano)
  • +
  • Knockout.ES5 (by Sebastián Galiano)
  • +
  • Knockout.Mapper (by Brandon Meyer)
  • +
  • Knockout.Mapping (by Boris Yankov)
  • +
  • Knockout.Postbox (by Judah Gabriel Himango)
  • +
  • Knockout.Rx (by Igor Oleinikov)
  • +
  • Knockout.Validation (by Dan Ludwig)
  • +
  • Knockout.Viewmodel (by Oisin Grehan)
  • +
  • ko.editables (by Oisin Grehan)
  • +
  • KoLite (by Boris Yankov)
  • +
  • Lazy.js (by Bart van der Schoor)
  • +
  • Leaflet (by Vladimir)
  • +
  • Libxmljs (by François de Campredon)
  • +
  • ladda (by Danil Flores)
  • +
  • Levelup (by Bret Little)
  • +
  • linq.js (by Marcin Najder)
  • +
  • Livestamp.js (by Vincent Bortone)
  • +
  • localForage (by david pichsenmeister)
  • +
  • Lodash (by Brian Zengel)
  • +
  • Logg (by Bret Little)
  • +
  • Long.js (by Toshihide Hara)
  • +
  • lz-string (by Roman Nikitin)
  • +
  • Mapbox (by Maxime Fabre)
  • +
  • Marked (by William Orr)
  • +
  • MathJax (by Roland Zwaga)
  • +
  • mCustomScrollbar (by Sarah Williams)
  • +
  • Meteor (by Dave Allen)
  • +
  • md5.js (by MIZUNE Pine)
  • +
  • Microsoft Ajax (by Patrick Magee)
  • +
  • Microsoft Live Connect (by John Vilk)
  • +
  • Minimatch (by vvakame)
  • +
  • minimist (by Bart van der Schoor)
  • +
  • Mixpanel (by Knut Eirik Leira Hjelle)
  • +
  • mixto (by vvakame)
  • +
  • Modernizr (by Boris Yankov and Theodore Brown)
  • +
  • Moment.js (by Michael Lakerveld)
  • +
  • MongoDB (from TypeScript samples, updated by Niklas Mollenhauer)
  • +
  • mongoose (by Hiroki Horiuchi)
  • +
  • morgan (by James Roland Cabresos)
  • +
  • Mousetrap (by Dániel Tar)
  • +
  • msgpack.js (by Shinya Mochizuki)
  • +
  • Mustache.js (by Boris Yankov)
  • +
  • mysql (by William Johnston)
  • +
  • nconf (by Jeff Goddard)
  • +
  • needle (by San Chen)
  • +
  • noble (by Seon-Wook Park)
  • +
  • nock (by bonnici)
  • +
  • Node.js (from TypeScript samples)
  • +
  • node_redis (by Boris Yankov)
  • +
  • node-ffi (by Paul Loyd)
  • +
  • node-form (by Roman Samec)
  • +
  • node-git (by vvakame)
  • +
  • nodeunit (by Jeff Goddard)
  • +
  • node_zeromq (by Dave McKeown)
  • +
  • node-sqlserver (by Boris Yankov)
  • +
  • node-uuid (by Jeff May)
  • +
  • notify.js (by soundTricker)
  • +
  • NProgress (by Judah Gabriel Himango)
  • +
  • Numeral.js (by Vincent Bortone)
  • +
  • object-path (by Paulo Cesar)
  • +
  • ocLazyLoad (by Roland Zwaga)
  • +
  • OpenLayers (by Ilya Bolkhovsky)
  • +
  • Optimist (by Carlos Ballesteros Velasco)
  • +
  • Passport (by Hiroki Horiuchi)
  • +
  • passport-facebook (by James Roland Cabresos)
  • +
  • passport-strategy (by Lior Mualem)
  • +
  • pathwatcher (by vvakame)
  • +
  • Parallel.js (by Josh Baldwin)
  • +
  • Parsimmon (by Bart van der Schoor)
  • +
  • PDF.js (by Josh Baldwin)
  • +
  • PEG.js (by vvakame)
  • +
  • Persona (by James Frasca)
  • +
  • PhantomJS (by Jed Hunsaker)
  • +
  • PhoneGap (by Boris Yankov)
  • +
  • Physijs (by gyoh_k)
  • +
  • PixiJS (by Pedro Casaubon)
  • +
  • Platform (by Jake Hickman)
  • +
  • PouchDB (by Bill Sears)
  • +
  • PreloadJS (by Pedro Ferreira)
  • +
  • ProgressJs (by Shunsuke Ohtani)
  • +
  • promise-pool (by VILIC VANE)
  • +
  • Q (by Barrie Nemetchek, Andrew Gaspar)
  • +
  • Q-io (by Bart van der Schoor)
  • +
  • q-retry (by VILIC VANE)
  • +
  • QUnit (by Diullei Gomes)
  • +
  • Raven.js (by Santi Albo)
  • +
  • Recaptcha.js (by Brent Jenkins)
  • +
  • Rickshaw (by Blake Niemyjski)
  • +
  • Riot.js (by vvakame)
  • +
  • Restify (by Bret Little)
  • +
  • Redis (by Carlos Ballesteros Velasco)
  • +
  • Request (by Carlos Ballesteros Velasco)
  • +
  • Royalslider (by Christiaan Rakowski)
  • +
  • Rx.js (by gsino, Igor Oleinikov, Carl de Billy, zoetrope)
  • +
  • Raphael (by CheCoxshall)
  • +
  • Restangular (by Boris Yankov)
  • +
  • require.js (by Josh Baldwin)
  • +
  • rtree.js (by Omede Firouz)
  • +
  • Sammy.js (by Boris Yankov)
  • +
  • Select2 (by Boris Yankov)
  • +
  • Selenium WebDriverJS (by Bill Armstrong)
  • +
  • Semver (by Bart van der Schoor)
  • +
  • Sencha Touch (by Brian Kotek)
  • +
  • SharePoint (by Stanislav Vyshchepan and Andrey Markeev)
  • +
  • ShellJS (by Niklas Mollenhauer)
  • +
  • SignalR (by Boris Yankov)
  • +
  • simple-cw-node (by vvakame)
  • +
  • Sinon (by William Sears)
  • +
  • SIPml (by Adriaan Groenenboom)
  • +
  • sjcl (by Eugene Chernyshov)
  • +
  • SlickGrid (by Josh Baldwin)
  • +
  • smoothie (by Mike H. Hawley and Drew Noakes)
  • +
  • socket.io (by William Orr)
  • +
  • socket.io-client (by Maido Kaara)
  • +
  • SockJS (by Emil Ivanov)
  • +
  • sockjs-node (by Phil McCloghry-Laing)
  • +
  • SoundJS (by Pedro Ferreira)
  • +
  • source-map (by Morten Houston Ludvigsen)
  • +
  • Spin (by Boris Yankov)
  • +
  • sqlite3 (by Nick Malaguti)
  • +
  • status-bar (by vvakame)
  • +
  • stripe (by Eric J. Smith)
  • +
  • Store.js (by Vincent Bortone)
  • +
  • Sugar (by Josh Baldwin)
  • +
  • Swiper (by Sebastián Galiano)
  • +
  • SwipeView (by Boris Yankov)
  • +
  • Swiz (by Jeff Goddard)
  • +
  • TV4 (by Bart van der Schoor)
  • +
  • Tags Manager (by Vincent Bortone)
  • +
  • Teechart (by Steema)
  • +
  • text-buffer (by vvakame)
  • +
  • text-encoding (by MIZUNE Pine)
  • +
  • three.js (by Kon)
  • +
  • TimelineJS (by Roland Zwaga)
  • +
  • timezonecomplete (by Rogier Schouten)
  • +
  • Toastr (by Boris Yankov)
  • +
  • trunk8 (by Blake Niemyjski)
  • +
  • TweenJS (by Pedro Ferreira)
  • +
  • tween.js (by Adam R. Smith)
  • +
  • twitter-bootstrap-wizard (by Blake Niemyjski)
  • +
  • Twitter Typeahead (by Ivaylo Gochkov)
  • +
  • Ubuntu Unity Web API (by John Vrbanac)
  • +
  • Underscore.js (by Boris Yankov)
  • +
  • Underscore.js (Typed) (by Josh Baldwin)
  • +
  • Underscore-ko.js (by Maurits Elbers)
  • +
  • universal-analytics (by Bart van der Schoor)
  • +
  • update-notifier (by vvakame)
  • +
  • uri-templates (by Bart van der Schoor)
  • +
  • urlrouter (by Carlos Ballesteros Velasco)
  • +
  • UUID.js (by Jason Jarrett)
  • +
  • Valerie (by Howard Richards)
  • +
  • Velocity (by Greg Smith)
  • +
  • Viewporter (by Boris Yankov)
  • +
  • Vimeo (by Daz Wilkin)
  • +
  • vinyl (by vvakame)
  • +
  • vinyl-fs (by vvakame)
  • +
  • WebRTC (by Ken Smith)
  • +
  • websocket (by Paul Loyd)
  • +
  • WinJS (from TypeScript samples)
  • +
  • WinRT (from TypeScript samples)
  • +
  • ws (by Paul Loyd)
  • +
  • x2js (by Hiroki Horiuchi)
  • +
  • xml2js (by Michel Salib)
  • +
  • xpath (by Andrew Bradley)
  • +
  • XRegExp (by Bart van der Schoor)
  • +
  • YouTube (by Daz Wilkin)
  • +
  • YouTube Analytics API (by Frank M)
  • +
  • YouTube Data API (by Frank M)
  • +
  • Zepto.js (by Josh Baldwin)
  • +
  • Zynga Scroller (by Boris Yankov)
  • +
  • ZeroClipboard (by Eric J. Smith)
  • + + + +> diff --git a/jquery.leanModal/jquery.leanModal.d.ts b/jquery.leanModal/jquery.leanModal.d.ts index f4f395e58..47c0e3537 100755 --- a/jquery.leanModal/jquery.leanModal.d.ts +++ b/jquery.leanModal/jquery.leanModal.d.ts @@ -1,24 +1,22 @@ - +// Type definitions for leanModal.js 1.1 +// Project: http://leanmodal.finelysliced.com.au/ +// Definitions by: FinelySliced +// Definitions: https://github.com/borisyankov/DefinitelyTyped /// interface JQueryLeanModalOption { - top : number; - overlay : number; - closeButton : String; -} - -interface JQueryLeanModalStatic { - ():any; - (JQueryLeanModalOption):any; + top? : number; + overlay? : number; + closeButton? : String; } interface JQueryStatic { - leanModal(): JQueryLeanModalStatic; - leanModal(JQueryLeanModalOption): JQueryLeanModalStatic; + leanModal(): JQuery; + leanModal(val : JQueryLeanModalOption): JQuery; } interface JQuery { - leanModal(): JQueryLeanModalStatic; - leanModal(JQueryLeanModalOption): JQueryLeanModalStatic; + leanModal(): JQuery; + leanModal(val : JQueryLeanModalOption): JQuery; } \ No newline at end of file From 029781c46f906f960cfdbc18acd8d3fe9d00b33f Mon Sep 17 00:00:00 2001 From: Masaya Nasu Date: Thu, 4 Sep 2014 09:33:18 +0900 Subject: [PATCH 035/221] Delete unnecessary files Delete unnecessary files --- ...TORS_98f07bc20cb66328be238119df96c490.html | 407 ------------------ 1 file changed, 407 deletions(-) delete mode 100644 CONTRIBUTORS_98f07bc20cb66328be238119df96c490.html diff --git a/CONTRIBUTORS_98f07bc20cb66328be238119df96c490.html b/CONTRIBUTORS_98f07bc20cb66328be238119df96c490.html deleted file mode 100644 index 5fbae25d6..000000000 --- a/CONTRIBUTORS_98f07bc20cb66328be238119df96c490.html +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - -CONTRIBUTORS.md - - -

    Contributors

    -

    This is a non-exhaustive list of definitions and their creators. If you created a definition but are not listed then feel free to send a pull request on this file with your name and url.

    -

    All definitions files include a header with the author and editors, so at some point this list will be auto-generated.

    - -
      -
    • jQuery.leanModal(by tomato360)
    • -
    • jQuery.notifyBar (by Shunsuke Ohtani)
    • -
    • jQuery.noty (by Aaron King)
    • -
    • jQuery.payment (by Eric J. Smith)
    • -
    • jQuery.pickadate (by Theodore Brown)
    • -
    • jQuery.pjax (by Junle Li)
    • -
    • jQuery.pjax.falsandtru (by NewNotMoon)
    • -
    • jQuery.pnotify (by David Sichau)
    • -
    • jQuery.postMessage (by Junle Li)
    • -
    • jQuery.prettyphoto (by Paul Gaske)
    • -
    • jQuery.scrollTo (by Neil Stalker)
    • -
    • jQuery.simplePagination (by Natan Vivo)
    • -
    • jquery.superLink (by Blake Niemyjski)
    • -
    • jQuery.tile (by Shunsuke Ohtani)
    • -
    • jQuery.timeago (by François Guillot)
    • -
    • jQuery.Timepicker (by Anwar Javed)
    • -
    • jQuery.Timer (by Joshua Strobl)
    • -
    • jQuery.TinyCarousel (by Christiaan Rakowski)
    • -
    • jQuery.TinyScrollbar (by Christiaan Rakowski)
    • -
    • jQuery.tooltipster (by Patrick Magee)
    • -
    • jQuery.total-storage (by Jeremy Brooks)
    • -
    • jQuery.Transit (by MrBigDog2U)
    • -
    • jQuery.Validation (by Boris Yankov)
    • -
    • jQuery.Watermark (by Anwar Javed)
    • -
    • jQuery.base64 (by Shinya Mochizuki)
    • -
    • jquery-handsontable (by Ted John)
    • -
    • js-git (by Bart van der Schoor)
    • -
    • js-url (by MIZUNE Pine)
    • -
    • js-yaml (by Bart van der Schoor)
    • -
    • jsbn (by Eugene Chernyshov)
    • -
    • jScrollPane (by Dániel Tar)
    • -
    • JSDeferred (by Daisuke Mino)
    • -
    • JSONEditorOnline (by Vincent Bortone)
    • -
    • JSON-Pointer (by Bart van der Schoor)
    • -
    • JsRender (by Kensuke MATSUZAKI)
    • -
    • jStorage (by Danil Flores)
    • -
    • jsTree (by Adam Pluciński)
    • -
    • JWPlayer (by Martin Duparc)
    • -
    • KeyboardJS (by Vincent Bortone)
    • -
    • keymaster.js (by Marting W. Kirst)
    • -
    • KineticJS (by Basarat Ali Syed)
    • -
    • Knockback (by Marcel Binot)
    • -
    • Knockout.js (by Boris Yankov)
    • -
    • Knockout.Amd.Helpers (by David Sichau)
    • -
    • Knockout.DeferredUpdates (by Sebastián Galiano)
    • -
    • Knockout.ES5 (by Sebastián Galiano)
    • -
    • Knockout.Mapper (by Brandon Meyer)
    • -
    • Knockout.Mapping (by Boris Yankov)
    • -
    • Knockout.Postbox (by Judah Gabriel Himango)
    • -
    • Knockout.Rx (by Igor Oleinikov)
    • -
    • Knockout.Validation (by Dan Ludwig)
    • -
    • Knockout.Viewmodel (by Oisin Grehan)
    • -
    • ko.editables (by Oisin Grehan)
    • -
    • KoLite (by Boris Yankov)
    • -
    • Lazy.js (by Bart van der Schoor)
    • -
    • Leaflet (by Vladimir)
    • -
    • Libxmljs (by François de Campredon)
    • -
    • ladda (by Danil Flores)
    • -
    • Levelup (by Bret Little)
    • -
    • linq.js (by Marcin Najder)
    • -
    • Livestamp.js (by Vincent Bortone)
    • -
    • localForage (by david pichsenmeister)
    • -
    • Lodash (by Brian Zengel)
    • -
    • Logg (by Bret Little)
    • -
    • Long.js (by Toshihide Hara)
    • -
    • lz-string (by Roman Nikitin)
    • -
    • Mapbox (by Maxime Fabre)
    • -
    • Marked (by William Orr)
    • -
    • MathJax (by Roland Zwaga)
    • -
    • mCustomScrollbar (by Sarah Williams)
    • -
    • Meteor (by Dave Allen)
    • -
    • md5.js (by MIZUNE Pine)
    • -
    • Microsoft Ajax (by Patrick Magee)
    • -
    • Microsoft Live Connect (by John Vilk)
    • -
    • Minimatch (by vvakame)
    • -
    • minimist (by Bart van der Schoor)
    • -
    • Mixpanel (by Knut Eirik Leira Hjelle)
    • -
    • mixto (by vvakame)
    • -
    • Modernizr (by Boris Yankov and Theodore Brown)
    • -
    • Moment.js (by Michael Lakerveld)
    • -
    • MongoDB (from TypeScript samples, updated by Niklas Mollenhauer)
    • -
    • mongoose (by Hiroki Horiuchi)
    • -
    • morgan (by James Roland Cabresos)
    • -
    • Mousetrap (by Dániel Tar)
    • -
    • msgpack.js (by Shinya Mochizuki)
    • -
    • Mustache.js (by Boris Yankov)
    • -
    • mysql (by William Johnston)
    • -
    • nconf (by Jeff Goddard)
    • -
    • needle (by San Chen)
    • -
    • noble (by Seon-Wook Park)
    • -
    • nock (by bonnici)
    • -
    • Node.js (from TypeScript samples)
    • -
    • node_redis (by Boris Yankov)
    • -
    • node-ffi (by Paul Loyd)
    • -
    • node-form (by Roman Samec)
    • -
    • node-git (by vvakame)
    • -
    • nodeunit (by Jeff Goddard)
    • -
    • node_zeromq (by Dave McKeown)
    • -
    • node-sqlserver (by Boris Yankov)
    • -
    • node-uuid (by Jeff May)
    • -
    • notify.js (by soundTricker)
    • -
    • NProgress (by Judah Gabriel Himango)
    • -
    • Numeral.js (by Vincent Bortone)
    • -
    • object-path (by Paulo Cesar)
    • -
    • ocLazyLoad (by Roland Zwaga)
    • -
    • OpenLayers (by Ilya Bolkhovsky)
    • -
    • Optimist (by Carlos Ballesteros Velasco)
    • -
    • Passport (by Hiroki Horiuchi)
    • -
    • passport-facebook (by James Roland Cabresos)
    • -
    • passport-strategy (by Lior Mualem)
    • -
    • pathwatcher (by vvakame)
    • -
    • Parallel.js (by Josh Baldwin)
    • -
    • Parsimmon (by Bart van der Schoor)
    • -
    • PDF.js (by Josh Baldwin)
    • -
    • PEG.js (by vvakame)
    • -
    • Persona (by James Frasca)
    • -
    • PhantomJS (by Jed Hunsaker)
    • -
    • PhoneGap (by Boris Yankov)
    • -
    • Physijs (by gyoh_k)
    • -
    • PixiJS (by Pedro Casaubon)
    • -
    • Platform (by Jake Hickman)
    • -
    • PouchDB (by Bill Sears)
    • -
    • PreloadJS (by Pedro Ferreira)
    • -
    • ProgressJs (by Shunsuke Ohtani)
    • -
    • promise-pool (by VILIC VANE)
    • -
    • Q (by Barrie Nemetchek, Andrew Gaspar)
    • -
    • Q-io (by Bart van der Schoor)
    • -
    • q-retry (by VILIC VANE)
    • -
    • QUnit (by Diullei Gomes)
    • -
    • Raven.js (by Santi Albo)
    • -
    • Recaptcha.js (by Brent Jenkins)
    • -
    • Rickshaw (by Blake Niemyjski)
    • -
    • Riot.js (by vvakame)
    • -
    • Restify (by Bret Little)
    • -
    • Redis (by Carlos Ballesteros Velasco)
    • -
    • Request (by Carlos Ballesteros Velasco)
    • -
    • Royalslider (by Christiaan Rakowski)
    • -
    • Rx.js (by gsino, Igor Oleinikov, Carl de Billy, zoetrope)
    • -
    • Raphael (by CheCoxshall)
    • -
    • Restangular (by Boris Yankov)
    • -
    • require.js (by Josh Baldwin)
    • -
    • rtree.js (by Omede Firouz)
    • -
    • Sammy.js (by Boris Yankov)
    • -
    • Select2 (by Boris Yankov)
    • -
    • Selenium WebDriverJS (by Bill Armstrong)
    • -
    • Semver (by Bart van der Schoor)
    • -
    • Sencha Touch (by Brian Kotek)
    • -
    • SharePoint (by Stanislav Vyshchepan and Andrey Markeev)
    • -
    • ShellJS (by Niklas Mollenhauer)
    • -
    • SignalR (by Boris Yankov)
    • -
    • simple-cw-node (by vvakame)
    • -
    • Sinon (by William Sears)
    • -
    • SIPml (by Adriaan Groenenboom)
    • -
    • sjcl (by Eugene Chernyshov)
    • -
    • SlickGrid (by Josh Baldwin)
    • -
    • smoothie (by Mike H. Hawley and Drew Noakes)
    • -
    • socket.io (by William Orr)
    • -
    • socket.io-client (by Maido Kaara)
    • -
    • SockJS (by Emil Ivanov)
    • -
    • sockjs-node (by Phil McCloghry-Laing)
    • -
    • SoundJS (by Pedro Ferreira)
    • -
    • source-map (by Morten Houston Ludvigsen)
    • -
    • Spin (by Boris Yankov)
    • -
    • sqlite3 (by Nick Malaguti)
    • -
    • status-bar (by vvakame)
    • -
    • stripe (by Eric J. Smith)
    • -
    • Store.js (by Vincent Bortone)
    • -
    • Sugar (by Josh Baldwin)
    • -
    • Swiper (by Sebastián Galiano)
    • -
    • SwipeView (by Boris Yankov)
    • -
    • Swiz (by Jeff Goddard)
    • -
    • TV4 (by Bart van der Schoor)
    • -
    • Tags Manager (by Vincent Bortone)
    • -
    • Teechart (by Steema)
    • -
    • text-buffer (by vvakame)
    • -
    • text-encoding (by MIZUNE Pine)
    • -
    • three.js (by Kon)
    • -
    • TimelineJS (by Roland Zwaga)
    • -
    • timezonecomplete (by Rogier Schouten)
    • -
    • Toastr (by Boris Yankov)
    • -
    • trunk8 (by Blake Niemyjski)
    • -
    • TweenJS (by Pedro Ferreira)
    • -
    • tween.js (by Adam R. Smith)
    • -
    • twitter-bootstrap-wizard (by Blake Niemyjski)
    • -
    • Twitter Typeahead (by Ivaylo Gochkov)
    • -
    • Ubuntu Unity Web API (by John Vrbanac)
    • -
    • Underscore.js (by Boris Yankov)
    • -
    • Underscore.js (Typed) (by Josh Baldwin)
    • -
    • Underscore-ko.js (by Maurits Elbers)
    • -
    • universal-analytics (by Bart van der Schoor)
    • -
    • update-notifier (by vvakame)
    • -
    • uri-templates (by Bart van der Schoor)
    • -
    • urlrouter (by Carlos Ballesteros Velasco)
    • -
    • UUID.js (by Jason Jarrett)
    • -
    • Valerie (by Howard Richards)
    • -
    • Velocity (by Greg Smith)
    • -
    • Viewporter (by Boris Yankov)
    • -
    • Vimeo (by Daz Wilkin)
    • -
    • vinyl (by vvakame)
    • -
    • vinyl-fs (by vvakame)
    • -
    • WebRTC (by Ken Smith)
    • -
    • websocket (by Paul Loyd)
    • -
    • WinJS (from TypeScript samples)
    • -
    • WinRT (from TypeScript samples)
    • -
    • ws (by Paul Loyd)
    • -
    • x2js (by Hiroki Horiuchi)
    • -
    • xml2js (by Michel Salib)
    • -
    • xpath (by Andrew Bradley)
    • -
    • XRegExp (by Bart van der Schoor)
    • -
    • YouTube (by Daz Wilkin)
    • -
    • YouTube Analytics API (by Frank M)
    • -
    • YouTube Data API (by Frank M)
    • -
    • Zepto.js (by Josh Baldwin)
    • -
    • Zynga Scroller (by Boris Yankov)
    • -
    • ZeroClipboard (by Eric J. Smith)
    • - - - -> From 27305dfa79bf115f5f843199949e3d2b270f8d6c Mon Sep 17 00:00:00 2001 From: MIZUNE Pine Date: Thu, 4 Sep 2014 20:45:10 +0900 Subject: [PATCH 036/221] Add event shortcut methods --- zepto/zepto-tests.ts | 6 ++++ zepto/zepto.d.ts | 69 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) diff --git a/zepto/zepto-tests.ts b/zepto/zepto-tests.ts index fc3760f9a..2d85f16c0 100644 --- a/zepto/zepto-tests.ts +++ b/zepto/zepto-tests.ts @@ -306,3 +306,9 @@ $.browser.playbook; !!$.os.ios; // => true !!$.os.version; // => "6.1" !!$.browser.version; // => "536.26" + +// shortcut methods for `.bind(event, fn)` for each event type +$('#example').click(); +$('#example').click(() => { + alert('clicked'); +}); \ No newline at end of file diff --git a/zepto/zepto.d.ts b/zepto/zepto.d.ts index ba75e7556..04f11289e 100644 --- a/zepto/zepto.d.ts +++ b/zepto/zepto.d.ts @@ -1407,6 +1407,75 @@ interface ZeptoCollection { **/ undelegate(selector: string, type: string, fn: (e: Event) => boolean): ZeptoCollection; + focusin(): ZeptoCollection; + focusin(fn: (e: Event) => any): ZeptoCollection; + + focusout(): ZeptoCollection; + focusout(fn: (e: Event) => any): ZeptoCollection; + + load(): ZeptoCollection; + load(fn: (e: Event) => any): ZeptoCollection; + + resize(): ZeptoCollection; + resize(fn: (e: Event) => any): ZeptoCollection; + + scroll(): ZeptoCollection; + scroll(fn: (e: Event) => any): ZeptoCollection; + + unload(): ZeptoCollection; + unload(fn: (e: Event) => any): ZeptoCollection; + + click(): ZeptoCollection; + click(fn: (e: Event) => any): ZeptoCollection; + + dblclick(): ZeptoCollection; + dblclick(fn: (e: Event) => any): ZeptoCollection; + + mousedown(): ZeptoCollection; + mousedown(fn: (e: Event) => any): ZeptoCollection; + + mouseup(): ZeptoCollection; + mouseup(fn: (e: Event) => any): ZeptoCollection; + + mousemove(): ZeptoCollection; + mousemove(fn: (e: Event) => any): ZeptoCollection; + + mouseover(): ZeptoCollection; + mouseover(fn: (e: Event) => any): ZeptoCollection; + + mouseout(): ZeptoCollection; + mouseout(fn: (e: Event) => any): ZeptoCollection; + + mouseenter(): ZeptoCollection; + mouseenter(fn: (e: Event) => any): ZeptoCollection; + + mouseleave(): ZeptoCollection; + mouseleave(fn: (e: Event) => any): ZeptoCollection; + + change(): ZeptoCollection; + change(fn: (e: Event) => any): ZeptoCollection; + + select(): ZeptoCollection; + select(fn: (e: Event) => any): ZeptoCollection; + + keydown(): ZeptoCollection; + keydown(fn: (e: Event) => any): ZeptoCollection; + + keypress(): ZeptoCollection; + keypress(fn: (e: Event) => any): ZeptoCollection; + + keyup(): ZeptoCollection; + keyup(fn: (e: Event) => any): ZeptoCollection; + + error(): ZeptoCollection; + error(fn: (e: Event) => any): ZeptoCollection; + + focus(): ZeptoCollection; + focus(fn: (e: Event) => any): ZeptoCollection; + + blur(): ZeptoCollection; + blur(fn: (e: Event) => any): ZeptoCollection; + /** * Ajax **/ From 3ecf2530af5571a6f5cee52018bab2d5e658a413 Mon Sep 17 00:00:00 2001 From: Carl-Erik Kopseng Date: Thu, 4 Sep 2014 17:03:58 +0200 Subject: [PATCH 037/221] Fixed error in test for indexedDB While Modernizr 3 uses 'indexeddb' (lower caps), the Modernizr 2 versions all use 'indexedDB'. --- modernizr/modernizr.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modernizr/modernizr.d.ts b/modernizr/modernizr.d.ts index 5827bbf9e..25043375c 100644 --- a/modernizr/modernizr.d.ts +++ b/modernizr/modernizr.d.ts @@ -75,7 +75,7 @@ interface ModernizrStatic { history: boolean; audio: Audioboolean; video: Videoboolean; - indexeddb: boolean; + indexedDB: boolean; input: Inputboolean; inputtypes: InputTypesboolean; localstorage: boolean; From e7c2d0b916102f5edbfb022f3e5ae6f23ba5d30f Mon Sep 17 00:00:00 2001 From: mzsm Date: Fri, 5 Sep 2014 11:58:03 +0900 Subject: [PATCH 038/221] Add overload JQuery.one and jQuery.on --- jquery/jquery.d.ts | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/jquery/jquery.d.ts b/jquery/jquery.d.ts index 80ca7e3b8..064f6f51a 100644 --- a/jquery/jquery.d.ts +++ b/jquery/jquery.d.ts @@ -2763,7 +2763,14 @@ interface JQuery { * @param selector A selector string to filter the descendants of the selected elements that will call the handler. If the selector is null or omitted, the handler is always called when it reaches the selected element. * @param data Data to be passed to the handler in event.data when an event occurs. */ - on(events: { [key: string]: any; }, selector?: any, data?: any): JQuery; + on(events: { [key: string]: any; }, selector?: string, data?: any): JQuery; + /** + * Attach an event handler function for one or more events to the selected elements. + * + * @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s). + * @param data Data to be passed to the handler in event.data when an event occurs. + */ + on(events: { [key: string]: any; }, data?: any): JQuery; /** * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. @@ -2806,7 +2813,15 @@ interface JQuery { * @param selector A selector string to filter the descendants of the selected elements that will call the handler. If the selector is null or omitted, the handler is always called when it reaches the selected element. * @param data Data to be passed to the handler in event.data when an event occurs. */ - one(events: { [key: string]: any; }, selector?: any, data?: any): JQuery; + one(events: { [key: string]: any; }, selector?: string, data?: any): JQuery; + + /** + * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. + * + * @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s). + * @param data Data to be passed to the handler in event.data when an event occurs. + */ + one(events: { [key: string]: any; }, data?: any): JQuery; /** From 54de4356d0d53628e234c687ae9e1764cd543bc3 Mon Sep 17 00:00:00 2001 From: vvakame Date: Fri, 5 Sep 2014 12:31:46 +0900 Subject: [PATCH 039/221] add rows property to OnRowsChangedEventData --- slickgrid/SlickGrid.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slickgrid/SlickGrid.d.ts b/slickgrid/SlickGrid.d.ts index 7301ecb1a..a27b038ff 100644 --- a/slickgrid/SlickGrid.d.ts +++ b/slickgrid/SlickGrid.d.ts @@ -1595,7 +1595,7 @@ declare module Slick { // empty } export interface OnRowsChangedEventData { - // empty + rows: number[]; } export interface OnPagingInfoChangedEventData extends PagingOptions { From 81f4b1f3c05f01e5acbc7208a74fb48a92779a5e Mon Sep 17 00:00:00 2001 From: Roger Chen Date: Thu, 4 Sep 2014 13:31:51 -0400 Subject: [PATCH 040/221] Add typings for Keypress v2.0.3 --- CONTRIBUTORS.md | 3 +- keypress/keypress-tests.ts | 61 ++++++++++++++++++++++++++++++++++++++ keypress/keypress.d.ts | 61 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 124 insertions(+), 1 deletion(-) create mode 100644 keypress/keypress-tests.ts create mode 100644 keypress/keypress.d.ts diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 1cded38d5..cdd9a5f78 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -214,6 +214,7 @@ All definitions files include a header with the author and editors, so at some p * [JWPlayer](http://developer.longtailvideo.com/trac/) (by [Martin Duparc](https://github.com/martinduparc/)) * [KeyboardJS](https://github.com/RobertWHurst/KeyboardJS) (by [Vincent Bortone](https://github.com/vbortone/)) * [keymaster.js](https://github.com/madrobby/keymaster) (by [Marting W. Kirst](https://github.com/nitram509/)) +* [Keypress](https://github.com/dmauro/Keypress/) (by [Roger Chen](https://github.com/rcchen/)) * [KineticJS](http://kineticjs.com/) (by [Basarat Ali Syed](https://github.com/basarat)) * [Knockback](http://kmalakoff.github.com/knockback/) (by [Marcel Binot](https://github.com/docgit)) * [Knockout.js](http://knockoutjs.com/) (by [Boris Yankov](https://github.com/borisyankov)) @@ -244,7 +245,7 @@ All definitions files include a header with the author and editors, so at some p * [Marked](https://github.com/chjj/marked) (by [William Orr](https://github.com/worr)) * [MathJax](https://github.com/mathjax/MathJax) (by [Roland Zwaga](https://github.com/rolandzwaga)) * [mCustomScrollbar](https://github.com/malihu/malihu-custom-scrollbar-plugin) (by [Sarah Williams](https://github.com/flurg)) -* [Meteor](https://www.meteor.com) (by [Dave Allen](https://github.com/fullflavedave)) +* [Meteor](https://www.meteor.com) (by [Dave Allen](https://github.com/fullflavedave)) * [md5.js](http://labs.cybozu.co.jp/blog/mitsunari/2007/07/md5js_1.html) (by [MIZUNE Pine](https://github.com/pine613)) * [Microsoft Ajax](http://msdn.microsoft.com/en-us/library/ee341002(v=vs.100).aspx) (by [Patrick Magee](https://github.com/pjmagee)) * [Microsoft Live Connect](http://msdn.microsoft.com/en-us/library/live/hh243643.aspx) (by [John Vilk](https://github.com/jvilk)) diff --git a/keypress/keypress-tests.ts b/keypress/keypress-tests.ts new file mode 100644 index 000000000..38d12c12f --- /dev/null +++ b/keypress/keypress-tests.ts @@ -0,0 +1,61 @@ +/// + +module KeypressComboTests { + var listener = new window.keypress.Listener(); + + var copyCombo = { + keys: "cmd c", + on_keydown: () => { + console.log("Key down"); + }, + on_keyup: () => { + console.log("Key up"); + }, + on_release: () => { + console.log("Released"); + }, + prevent_default: true, + prevent_repeat: false, + is_unordered: true, + is_counting: false, + is_exclusive: false, + is_sequence: true, + is_solitary: true + }; + + var pasteCombo = { + keys: "ctrl v", + on_keydown: () => { + console.log("Paste"); + }, + prevent_default: true, + prevent_repeat: true, + is_exclusive: true + }; + + listener.register_combo(copyCombo); + listener.unregister_combo("cmd c"); + + listener.register_many([copyCombo, pasteCombo]); + listener.stop_listening(); + listener.listen(); + listener.unregister_many(["cmd c", "cmd v"]); + + listener.reset(); +} + +module KeypressBindingTests { + var element = document.createElement('div'); + var defaults = { + prevent_default: true, + prevent_repeat: true, + is_unordered: true, + is_counting: false, + is_exclusive: false, + is_solitary: false, + is_sequence: false + }; + var listener = new window.keypress.Listener(element); + listener = new window.keypress.Listener(element, defaults); + listener.reset(); +} diff --git a/keypress/keypress.d.ts b/keypress/keypress.d.ts new file mode 100644 index 000000000..bd831d5b0 --- /dev/null +++ b/keypress/keypress.d.ts @@ -0,0 +1,61 @@ +// Type definitions for Keypress v2.0.3 +// Project: https://github.com/dmauro/Keypress/ +// Definitions by: Roger Chen +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +// A keyboard input capturing utility in which any key can be a modifier key. +declare module Keypress { + + interface ListenerDefaults { + keys: string; + prevent_default: boolean; + prevent_repeat: boolean; + is_unordered: boolean; + is_counting: boolean; + is_exclusive: boolean; + is_solitary: boolean; + is_sequence: boolean; + } + + interface Combo { + keys: string; + on_keydown: () => any; + on_keyup: () => any; + on_release: () => any; + this: Element; + prevent_default: boolean; + prevent_repeat: boolean; + is_unordered: boolean; + is_counting: boolean; + is_exclusive: boolean; + is_sequence: boolean; + is_solitary: boolean; + } + + interface Listener { + new(element: Element, defaults: ListenerDefaults): Listener; + new(element: Element): Listener; + new(): Listener; + simple_combo(keys: string, on_keydown_callback: () => any): void; + counting_combo(keys: string, on_count_callback: () => any): void; + sequence_combo(keys: string, callback: () => any): void; + register_combo(combo: Combo): void; + unregister_combo(combo: Combo): void; + unregister_combo(keys: string): void; + register_many(combos: Combo[]): void; + unregister_many(combos: Combo[]): void; + unregister_many(keys: string[]): void; + get_registered_combos(): Combo[]; + reset(): void; + listen(): void; + stop_listening(): void; + } + + interface Keypress { + Listener: Listener; + } +} + +interface Window { + keypress: Keypress.Keypress; +} From 6a002cfbb3cdab2328d6d5c77d1a50c11fa2db9e Mon Sep 17 00:00:00 2001 From: Vladimir Kotikov Date: Mon, 1 Sep 2014 18:20:06 +0400 Subject: [PATCH 041/221] Updates definitions and tests according to 3.6.0 changes. --- cordova/.gitignore | 1 + cordova/cordova-tests.ts | 80 +++++++++++++++++--- cordova/cordova.d.ts | 27 +++++++ cordova/plugins/Camera.d.ts | 17 +++-- cordova/plugins/Contacts.d.ts | 13 +++- cordova/plugins/Dialogs.d.ts | 5 +- cordova/plugins/FileSystem.d.ts | 120 +++++++++++++++++++++++++----- cordova/plugins/FileTransfer.d.ts | 7 +- cordova/plugins/Vibration.d.ts | 13 ++++ 9 files changed, 245 insertions(+), 38 deletions(-) create mode 100644 cordova/.gitignore diff --git a/cordova/.gitignore b/cordova/.gitignore new file mode 100644 index 000000000..3be8493bd --- /dev/null +++ b/cordova/.gitignore @@ -0,0 +1 @@ +cordova-tests.js \ No newline at end of file diff --git a/cordova/cordova-tests.ts b/cordova/cordova-tests.ts index 4cd95e694..dfaa25cc3 100644 --- a/cordova/cordova-tests.ts +++ b/cordova/cordova-tests.ts @@ -10,19 +10,33 @@ console.log('cordova.version: ' + cordova.version + ', cordova.platformId: ' + c cordova.exec(null, null, "NativeClassName", "MethodName"); -cordova.define('mymodule', (require, exports, module) => { }); +cordova.define('mymodule', (req, exp, mod)=> { + mod.exports = { dummy: () => { console.log("i'm a dummy"); }}; +}); + var myModule = cordova.require('mymodule'); +myModule.dummy(); var argsCheck: ArgsCheck = cordova.require('cordova/argcheck'); argsCheck.checkArgs('ssA', 'cordova.exec', [() => { }, () => { }, 'window', 'openDatabase']); +class Application { + start() { console.log("Starting app"); } + pause() { console.log('app paused'); } +} + +declare var app: Application; + +document.addEventListener('deviceready', () => { app.start(); }); +document.addEventListener('pause', ()=> { app.pause(); }); + // Battery status plugin //---------------------------------------------------------------------- window.addEventListener('batterystatus', (ev: BatteryStatusEvent) => { console.log('Battery level is ' + ev.level); }); window.addEventListener('batterycritical', - ()=> { alert('Battery is critical low!'); }); + () => { alert('Battery is critical low!'); }); // Camera plugin //---------------------------------------------------------------------- @@ -51,10 +65,12 @@ var contact: Contact = navigator.contacts.create({ navigator.contacts.find(["phoneNumbers"], (contacts: Contact[])=> { alert('Find ' + contacts.length + ' contacts'); }, (error: ContactError) => { alert('Error: ' + error.message); }, - { - filter: "+1", - multiple: true - } + new ContactFindOptions("+1", true) +); + +navigator.contacts.pickContact( + (contact: Contact)=> { console.log(contact); }, + (err: ContactError)=> { console.log(err.message); } ); // Device API @@ -105,26 +121,64 @@ function fsaccessor(fs: FileSystem) { var fsreader: DirectoryReader = fs.root.createReader(); fsreader.readEntries( (entries: Entry[]) => { console.log(fs.root.name + ' has ' + entries.length + ' child elements'); }, - (err: Error)=> { alert('Error: ' + err.message); }); + (err: FileError)=> { alert('Error: ' + err.code); }); } window.requestFileSystem( window.TEMPORARY, 1024 * 1024 * 5, fsaccessor, - (err: Error) => { alert('Error: ' + err.message); }); + (err: FileError) => { alert('Error: ' + err.code); } +); + +window.resolveLocalFileSystemURI(cordova.file.applicationDirectory, + (entry: Entry)=> { + if (entry.isDirectory) { + console.log('successfully resolved ' + entry.fullPath + 'directory'); + console.log(entry.toURL()); + console.log(entry.toInternalURL()); + } else { + var fentry = entry; + fentry.file((f: File) => { console.log(f.slice(f.size - 10, f.size)); }); + fentry.createWriter((writer: FileWriter)=> { + if (writer.readyState == FileWriter.INIT) { + console.log('Init FileWriter'); + writer.write(new Blob(['sdfdsfsdf'])); + writer.onprogress = function(ev: ProgressEvent) { + console.log('Writing ' + ev.target); + }; + } + }); + } + }, + (error: FileError) => { console.log(error.code); } +); // FileTransfer plugin //---------------------------------------------------------------------- var file = new FileTransfer(); + +file.onprogress = (ev: ProgressEvent) => { + if (ev.lengthComputable) { + console.log(ev.loaded + '/' + ev.total); + } +}; + file.download('http://some.server.com/download.php', 'cdvfile://localhost/persistent/path/to/downloads/', (file: FileEntry)=> { console.log('File Downloaded to ' + file.fullPath); }, - (err: FileTransferError)=> { alert('Error ' + err.code); }, + (err: FileTransferError) => { + console.error('Error ' + err.code); + if (err.exception) { + console.error('Failed with exception ' + err.exception); + } + }, { headers: null }, true); +file.abort(); + // InAppBrowser plugin //---------------------------------------------------------------------- @@ -135,6 +189,10 @@ file.download('http://some.server.com/download.php', var iab = window.open('google.com', '_self'); iab.addEventListener('loadstart', (ev: InAppBrowserEvent) => { console.log('Start opening ' + ev.url); }); iab.show(); +iab.executeScript( + { code: "console.log('Injected script in action')" }, + ()=> { console.log('Script is executed'); } +); // Globalization plugin //---------------------------------------------------------------------- @@ -226,4 +284,6 @@ db.transaction( // Vibration plugin //---------------------------------------------------------------------- -navigator.notification.vibrate(100); \ No newline at end of file +navigator.notification.vibrate(100); +navigator.notification.vibrateWithPattern([100, 200, 200, 150, 50], 3); +setTimeout(navigator.notification.cancelVibration, 1000); \ No newline at end of file diff --git a/cordova/cordova.d.ts b/cordova/cordova.d.ts index 9377912b0..06d13e8cf 100644 --- a/cordova/cordova.d.ts +++ b/cordova/cordova.d.ts @@ -44,6 +44,33 @@ interface Cordova { require(moduleName: string): any; } +interface Document { + addEventListener(type: "deviceready", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "resume", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "backbutton", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "menubutton", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "searchbutton", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "startcallbutton", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "endcallbutton", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "volumedownbutton", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "volumeupbutton", listener: (ev: Event) => any, useCapture?: boolean): void; + + removeEventListener(type: "deviceready", listener: (ev: Event) => any, useCapture?: boolean): void; + removeEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void; + removeEventListener(type: "resume", listener: (ev: Event) => any, useCapture?: boolean): void; + removeEventListener(type: "backbutton", listener: (ev: Event) => any, useCapture?: boolean): void; + removeEventListener(type: "menubutton", listener: (ev: Event) => any, useCapture?: boolean): void; + removeEventListener(type: "searchbutton", listener: (ev: Event) => any, useCapture?: boolean): void; + removeEventListener(type: "startcallbutton", listener: (ev: Event) => any, useCapture?: boolean): void; + removeEventListener(type: "endcallbutton", listener: (ev: Event) => any, useCapture?: boolean): void; + removeEventListener(type: "volumedownbutton", listener: (ev: Event) => any, useCapture?: boolean): void; + removeEventListener(type: "volumeupbutton", listener: (ev: Event) => any, useCapture?: boolean): void; + + addEventListener(type: string, listener: (ev: Event) => any, useCapture?: boolean): void; + removeEventListener(type: string, listener: (ev: Event) => any, useCapture?: boolean): void; +} + // cordova/argscheck module interface ArgsCheck { checkArgs(argsSpec: string, functionName: string, args: any[], callee?: any): void; diff --git a/cordova/plugins/Camera.d.ts b/cordova/plugins/Camera.d.ts index eb0c97147..126b329ff 100644 --- a/cordova/plugins/Camera.d.ts +++ b/cordova/plugins/Camera.d.ts @@ -44,11 +44,11 @@ interface Camera { } interface CameraOptions { - /** Picture quality in range o-100 */ + /** Picture quality in range 0-100. Default is 50 */ quality?: number; /** * Choose the format of the return value. - * Defined in navigator.camera.DestinationType + * Defined in navigator.camera.DestinationType. Default is FILE_URI. * DATA_URL : 0, Return image as base64-encoded string * FILE_URI : 1, Return image file URI * NATIVE_URI : 2 Return image native URI @@ -56,7 +56,8 @@ interface CameraOptions { */ destinationType?: number; /** - * Set the source of the picture. Defined in navigator.camera.PictureSourceType + * Set the source of the picture. + * Defined in navigator.camera.PictureSourceType. Default is CAMERA. * PHOTOLIBRARY : 0, * CAMERA : 1, * SAVEDPHOTOALBUM : 2 @@ -65,7 +66,8 @@ interface CameraOptions { /** Allow simple editing of image before selection. */ allowEdit?: boolean; /** - * Choose the returned image file's encoding. Defined in navigator.camera.EncodingType + * Choose the returned image file's encoding. + * Defined in navigator.camera.EncodingType. Default is JPEG * JPEG : 0 Return JPEG encoded image * PNG : 1 Return PNG encoded image */ @@ -93,7 +95,12 @@ interface CameraOptions { correctOrientation?: boolean; /** Save the image to the photo album on the device after capture. */ saveToPhotoAlbum?: boolean; - /** Choose the camera to use (front- or back-facing). Defined in navigator.camera.Direction */ + /** + * Choose the camera to use (front- or back-facing). + * Defined in navigator.camera.Direction. Default is BACK. + * FRONT: 0 + * BACK: 1 + */ cameraDirection?: number; /** iOS-only options that specify popover location in iPad. Defined in CameraPopoverOptions. */ popoverOptions?: CameraPopoverOptions; diff --git a/cordova/plugins/Contacts.d.ts b/cordova/plugins/Contacts.d.ts index f054c12d0..29a9a596c 100644 --- a/cordova/plugins/Contacts.d.ts +++ b/cordova/plugins/Contacts.d.ts @@ -34,6 +34,14 @@ interface Contacts { onSuccess: (contacts: Contact[]) => void, onError: (error: ContactError) => void, options?: ContactFindOptions): void; + /** + * The navigator.contacts.pickContact method launches the Contact Picker to select a single contact. + * The resulting object is passed to the contactSuccess callback function specified by the contactSuccess parameter. + * @param onSuccess Success callback function invoked with the array of Contact objects returned from the database + * @param onError Error callback function, invoked when an error occurs. + */ + pickContact(onSuccess: (contact: Contact) => void, + onError: (error: ContactError) => void): void } interface ContactProperties { @@ -253,10 +261,13 @@ interface ContactFindOptions { filter?: string; /** Determines if the find operation returns multiple navigator.contacts. */ multiple?: boolean; + /* Contact fields to be returned back. If specified, the resulting Contact object only features values for these fields. */ + desiredFields?: string[]; } declare var ContactFindOptions: { /** Constructor for ContactFindOptions object */ new(filter?: string, - multiple?: boolean): ContactFindOptions + multiple?: boolean, + desiredFields?: string[]): ContactFindOptions }; \ No newline at end of file diff --git a/cordova/plugins/Dialogs.d.ts b/cordova/plugins/Dialogs.d.ts index 5e2a7416d..6d86c6228 100644 --- a/cordova/plugins/Dialogs.d.ts +++ b/cordova/plugins/Dialogs.d.ts @@ -59,7 +59,10 @@ interface Notification { /** Object, passed to promptCallback */ interface NotificationPromptResult { - /** The index of the pressed button. Note that the index uses one-based indexing, so the value is 1, 2, 3, etc. */ + /** + * The index of the pressed button. Note that the index uses one-based indexing, so the value is 1, 2, 3, etc. + * 0 is the result when the dialog is dismissed without a button press. + */ buttonIndex: number; /** The text entered in the prompt dialog box. */ input1: string; diff --git a/cordova/plugins/FileSystem.d.ts b/cordova/plugins/FileSystem.d.ts index 569f9a209..1e1476b39 100644 --- a/cordova/plugins/FileSystem.d.ts +++ b/cordova/plugins/FileSystem.d.ts @@ -18,7 +18,16 @@ interface Window { type: number, size: number, successCallback: (fileSystem: FileSystem) => void, - errorCallback?: (fileError: Error) => void): void; + errorCallback?: (fileError: FileError) => void): void; + /** + * Look up file system Entry referred to by local URI. + * @param string uri URI referring to a local file or directory + * @param successCallback invoked with Entry object corresponding to URI + * @param errorCallback invoked if error occurs retrieving file system entry + */ + resolveLocalFileSystemURI(uri: string, + successCallback: (entry: Entry) => void, + errorCallback?: (error: FileError) => void): void; TEMPORARY: number; PERSISTENT: number; } @@ -54,7 +63,7 @@ interface Entry { */ getMetadata( successCallback: (metadata: Metadata) => void, - errorCallback?: (error: Error) => void): void; + errorCallback?: (error: FileError) => void): void; /** * Move an entry to a different location on the file system. It is an error to try to: * move a directory inside itself or to any child at any depth;move an entry into its parent if a name different from its current one isn't provided; @@ -69,9 +78,9 @@ interface Entry { * @param errorCallback A callback that is called when errors happen. */ moveTo(parent: DirectoryEntry, - newName?: string, - successCallback?: (entry: Entry) => void , - errorCallback?: (error: Error) => void ): void; + newName?: string, + successCallback?: (entry: Entry) => void, + errorCallback?: (error: FileError) => void): void; /** * Copy an entry to a different location on the file system. It is an error to try to: * copy a directory inside itself or to any child at any depth; @@ -88,24 +97,34 @@ interface Entry { * @param errorCallback A callback that is called when errors happen. */ copyTo(parent: DirectoryEntry, - newName?: string, - successCallback?: (entry: Entry) => void , - errorCallback?: (error: Error) => void ): void; + newName?: string, + successCallback?: (entry: Entry) => void, + errorCallback?: (error: FileError) => void): void; + /** + * Returns a URL that can be used as the src attribute of a