diff --git a/amqp-rpc/amqp-rpc-tests.ts b/amqp-rpc/amqp-rpc-tests.ts index 30d740d3e5..71df096a8d 100644 --- a/amqp-rpc/amqp-rpc-tests.ts +++ b/amqp-rpc/amqp-rpc-tests.ts @@ -39,4 +39,42 @@ rpc.call('withoutCB', {}, function (msg) { console.log('withoutCB results:', msg); //output: please run function without cb parameter }); -rpc.call('withoutCB', {}); //output message on server side console \ No newline at end of file +rpc.call('withoutCB', {}); //output message on server side console + +import os = require('os'); +interface State { + type: string; +} + +var counter = 0; +rpc.onBroadcast('getWorkerStat', function (params, cb) { + if (params && params.type == 'fullStat') { + cb(null, { + pid: process.pid, + hostname: os.hostname(), + uptime: process.uptime(), + counter: counter++ + }); + } + else { + cb(null, { counter: counter++ }) + } +}); + +var all_stats: any = {}; +rpc.callBroadcast( + 'getWorkerStat', + { type: 'fullStat' }, //request parameters + { //call options + ttl: 1000, //wait response time (1 seconds), after run onComplete + onResponse: function (err: any, stat: any) { //callback on each worker response + all_stats[stat.hostname + ':' + stat.pid] = stat; + }, + onComplete: function () { //callback on ttl expired + console.log('----------------------- WORKER STATISTICS ----------------------------------------'); + for (var worker in all_stats) { + var s: any = all_stats[worker]; + console.log(worker, '\tuptime=', s.uptime.toFixed(2) + ' seconds', '\tcounter=', s.counter); + } + } + }); \ No newline at end of file diff --git a/amqp-rpc/amqp-rpc.d.ts b/amqp-rpc/amqp-rpc.d.ts index a848fd4c40..a7334460f1 100644 --- a/amqp-rpc/amqp-rpc.d.ts +++ b/amqp-rpc/amqp-rpc.d.ts @@ -35,7 +35,7 @@ declare module "amqp-rpc" { } export interface BroadcastOptions { - ttl?: boolean; + ttl?: number; onResponse?: any; context?: any; onComplete?: any; @@ -52,6 +52,10 @@ declare module "amqp-rpc" { (...args: any[]): void; } + export interface CallbackWithError { + (err: any, ...args: any[]): void; + } + export function factory(opt?: Options): amqpRPC; export class amqpRPC { @@ -61,8 +65,8 @@ declare module "amqp-rpc" { call(cmd: string, params: T, cb?: Callback, context?: any, options?: CallOptions): string; on(cmd: string, cb: (param?: T, cb?: Callback, info?: CommandInfo) => void, context?: any, options?: HandlerOptions): boolean; off(cmd: string): boolean; - callBroadcast(cmd: string, params: any, options: BroadcastOptions): void; - onBroadcast(cmd: string, cb: (err: any) => void, context: any, options?: any): boolean; + callBroadcast(cmd: string, params: T, options?: BroadcastOptions): void; + onBroadcast(cmd: string, cb?: (params?: T, cb?: CallbackWithError) => void, context?: any, options?: any): boolean; offBroadcast(cmd: string): boolean; } -} \ No newline at end of file +} diff --git a/angular-local-storage/angular-local-storage-tests.ts b/angular-local-storage/angular-local-storage-tests.ts new file mode 100644 index 0000000000..9f59a90dd4 --- /dev/null +++ b/angular-local-storage/angular-local-storage-tests.ts @@ -0,0 +1,75 @@ +/// +/// + +interface TestScope extends ng.IScope { + submit: (key: string, value: string) => boolean; + getItem: (key: string) => string; + removeItem: (key: string) => boolean; + clearNumbers: () => boolean; + clearAll: () => boolean; + unbind: Function; + update: (val: string) => void; + property: string; +} + +module ng.local.storage.tests { + export class TestController { + constructor($scope: TestScope, localStorageService: ng.local.storage.ILocalStorageService) { + // isSupported + if (localStorageService.isSupported) { + // do something + } + + // getStorageType + var storageType: string = localStorageService.getStorageType(); + + // set + $scope.submit = (key, value) => { + return localStorageService.set(key, value); + }; + + // get + $scope.getItem = (key) => { + return localStorageService.get(key); + }; + + // remove + $scope.removeItem = (key) => { + return localStorageService.remove(key); + }; + + // clearAll(regexp) + $scope.clearNumbers = () => { + return localStorageService.clearAll(/^\d+$/); + }; + + // clearAll + $scope.clearAll = () => { + return localStorageService.clearAll(); + }; + + // keys + var lsKeys = localStorageService.keys(); + + // bind + localStorageService.set('property', 'oldValue'); + $scope.unbind = localStorageService.bind($scope, 'property'); + + // deriveKey + console.log(localStorageService.deriveKey('property')); // ls.property + + // length + var lsLength: number = localStorageService.length(); + } + } +} + +var app = angular.module('angular-local-storage-tests', ['LocalStorageModule']); +app.config(function (localStorageServiceProvider: ng.local.storage.ILocalStorageServiceProvider) { + localStorageServiceProvider + .setPrefix('myApp') + .setStorageType('sessionStorage') + .setNotify(true, true); +}); + +app.controller('TestController', ng.local.storage.tests.TestController); \ No newline at end of file diff --git a/angular-local-storage/angular-local-storage.d.ts b/angular-local-storage/angular-local-storage.d.ts new file mode 100644 index 0000000000..27d287dd3b --- /dev/null +++ b/angular-local-storage/angular-local-storage.d.ts @@ -0,0 +1,149 @@ +// Type definitions for angular-local-storage v0.1.5 +// Project: https://github.com/grevory/angular-local-storage +// Definitions by: Ken Fukuyama +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module ng.local.storage { + interface ILocalStorageServiceProvider extends IServiceProvider { + /** + * Setter for the prefix + * You should set a prefix to avoid overwriting any local storage variables from the rest of your app + * e.g. localStorageServiceProvider.setPrefix('youAppName'); + * With provider you can use config as this: + * myApp.config(function (localStorageServiceProvider) { + * localStorageServiceProvider.prefix = 'yourAppName'; + * }); + * @param prefix default: ls. + */ + setPrefix(prefix: string):ILocalStorageServiceProvider; + /** + * Setter for the storageType + * @param storageType localstorage or sessionStorage. default: localStorage + */ + setStorageType(storageType: string):ILocalStorageServiceProvider; + /** + * Setter for cookie config + * @param exp number of days before cookies expire (0 = does not expire). default: 30 + * @param path the web path the cookie represents. default: '/' + */ + setStorageCookie(exp: number, path: string):ILocalStorageServiceProvider; + /** + * Set the cookie domain, since this runs inside a the config() block, only providers and constants can be injected. As a result, $location service can't be used here, use a hardcoded string or window.location. + * No default value + */ + setStorageCookieDomain(domain: string):ILocalStorageServiceProvider; + /** + * Send signals for each of the following actions: + * @param setItem default: true + * @param removeItem default: false + */ + setNotify(setItem: boolean, removeItem: boolean):ILocalStorageServiceProvider; + } + + interface ICookie { + /** + * Checks if cookies are enabled in the browser. + * Returns: Boolean + */ + isSupported:boolean; + /** + * Directly adds a value to cookies. + * Note: Typically used as a fallback if local storage is not supported. + * Returns: Boolean + * @param key + * @param val + */ + set(key:string, val:string):boolean; + /** + * Directly get a value from a cookie. + * Returns: value from local storage + * @param key + */ + get(key:string):string; + /** + * Remove directly value from a cookie. + * Returns: Boolean + * @param key + */ + remove(key:string):boolean; + /** + * Remove all data for this app from cookie. + */ + clearAll():any; + + } + + interface ILocalStorageService { + /** + * Checks if the browser support the current storage type(e.g: localStorage, sessionStorage). + * Returns: Boolean + */ + isSupported:boolean; + /** + * Returns: String + */ + getStorageType():string; + /** + * Directly adds a value to local storage. + * If local storage is not supported, use cookies instead. + * Returns: Boolean + * @param key + * @param value + */ + set(key: string, value: string): boolean; + /** + * Directly get a value from local storage. + * If local storage is not supported, use cookies instead. + * Returns: value from local storage + * @param key + */ + get(key: string): string; + /** + * Return array of keys for local storage, ignore keys that not owned. + * Returns: value from local storage + */ + keys(): string[]; + /** + * Remove an item from local storage by key. + * If local storage is not supported, use cookies instead. + * Returns: Boolean + * @param key + */ + remove(key: string): boolean; + /** + * Remove all data for this app from local storage. + * If local storage is not supported, use cookies instead. + * Note: Optionally takes a regular expression string and removes matching. + * Returns: Boolean + * @param regularExpression + */ + clearAll(regularExpression?:RegExp):boolean; + /** + * Bind $scope key to localStorageService. + * Usage: localStorageService.bind(scope, property, value[optional], key[optional]) + * Returns: deregistration function for this listener. + * @param scope + * @param property + * @param value optional + * @param key The corresponding key used in local storage + */ + bind(scope:ng.IScope, property: string, value?: any, key?: string): Function; + /** + * Return the derive key + * Returns String + * @param key + */ + deriveKey(key:string):string; + /** + * Return localStorageService.length, ignore keys that not owned. + * Returns Number + */ + length():number; + /** + * Deal with browser's cookies directly. + */ + cookie:ICookie; + } +} \ No newline at end of file diff --git a/angular-protractor/angular-protractor-tests.ts b/angular-protractor/angular-protractor-tests.ts index 5ca9ecde46..b8b9585f47 100644 --- a/angular-protractor/angular-protractor-tests.ts +++ b/angular-protractor/angular-protractor-tests.ts @@ -1,11 +1,7 @@ /// function TestWebDriverExports() { - var abstractBuilder: protractor.AbstractBuilder = new protractor.AbstractBuilder(); - var baseAbstractBuilder: webdriver.AbstractBuilder = abstractBuilder; - - var button: protractor.Button = new protractor.Button(); - var baseButton: webdriver.Button = button; + var button: number = protractor.Button.LEFT; var key: string = protractor.Key.ADD; var chord: string = protractor.Key.chord(protractor.Key.NUMPAD0, protractor.Key.NUMPAD1); @@ -18,12 +14,6 @@ function TestWebDriverExports() { var action: protractor.ActionSequence = new protractor.ActionSequence(driver); var baseAction: webdriver.ActionSequence = action; - var alert: protractor.Alert = new protractor.Alert(driver, 'Message'); - var baseAlert: webdriver.Alert = alert; - - var unhandledAlertError: protractor.UnhandledAlertError = new protractor.UnhandledAlertError('Message', alert); - var baseUnhandledAlertError: webdriver.UnhandledAlertError = unhandledAlertError; - var browser: string = protractor.Browser.ANDROID; var builder: protractor.Builder = new protractor.Builder(); @@ -42,89 +32,168 @@ function TestWebDriverExports() { var eventEmitter: protractor.EventEmitter = new protractor.EventEmitter(); var baseEventEmitter: webdriver.EventEmitter = eventEmitter; - var firefoxDomExecutor: protractor.FirefoxDomExecutor = new protractor.FirefoxDomExecutor(); - var baseFirefoxDomExecutor: webdriver.FirefoxDomExecutor = firefoxDomExecutor; - var webElement: protractor.WebElement = new protractor.WebElement(driver, new protractor.promise.Promise()); var baseWebElement: webdriver.WebElement = webElement; - var locator: protractor.Locator = new protractor.Locator('id', 'ABC'); - var baseLocator: webdriver.Locator = locator; + var locator: webdriver.Locator = by.id('abc'); var session: protractor.Session = new protractor.Session('ABC', webdriver.Capabilities.android()); var baseSession: webdriver.Session = session; locator = protractor.By.name('name'); - // logging module + var driver: protractor.WebDriver = new protractor.WebDriver(session, {}); + driver = new protractor.WebDriver(session, {}, new webdriver.promise.ControlFlow()); + var baseDriver: webdriver.WebDriver = driver; - var levelName: string = protractor.logging.LevelName.ALL; + var webElement: protractor.WebElement = new protractor.WebElement(driver, { ELEMENT: 'abc' }); + var baseWebElement: webdriver.WebElement = webElement; + + var webElementPromise: protractor.WebElementPromise = new protractor.WebElementPromise(driver, { ELEMENT: 'abc' }); + var baseWebElementPromise: webdriver.WebElementPromise = webElementPromise; +} + +function TestWebDriverErrorModule() { + var errorCode: number = protractor.error.ErrorCode.ELEMENT_NOT_VISIBLE; + var error: protractor.error.Error = new protractor.error.Error(protractor.error.ErrorCode.ELEMENT_NOT_VISIBLE); + var baseError: webdriver.error.Error = error; +} + +function TestWebDriverLoggingModule() { + var levelName: string = protractor.logging.Level.ALL.name; var loggingType: string = protractor.logging.Type.CLIENT; - var level: webdriver.logging.Level = protractor.logging.Level.ALL; + var level: webdriver.logging.ILevel = protractor.logging.Level.ALL; var entry: protractor.logging.Entry = new protractor.logging.Entry(protractor.logging.Level.ALL, 'Message'); var baseEntry: webdriver.logging.Entry = entry; level = protractor.logging.getLevel('DEBUG'); - protractor.logging.Preferences = { a: 123 }; + var prefs: protractor.logging.Preferences = new protractor.logging.Preferences(); +} - // promise module +function TestWebDriverPromiseModule() { + var cancelError: protractor.promise.CancellationError = new protractor.promise.CancellationError(); + cancelError = new protractor.promise.CancellationError('message'); + var baseCancelError: webdriver.promise.CancellationError = cancelError; - var promise: protractor.promise.Promise = new protractor.promise.Promise(); - var basePromise: webdriver.promise.Promise = promise; + var thenable: protractor.promise.Thenable = new protractor.promise.Thenable(); + var baseThenable: webdriver.promise.Thenable = thenable; - var deferred: protractor.promise.Deferred = new protractor.promise.Deferred(); - var baseDeferred: webdriver.promise.Deferred = deferred; + var promise: protractor.promise.Promise = new protractor.promise.Promise(); + var basePromise: webdriver.promise.Promise = promise; + + var deferred: protractor.promise.Deferred = new protractor.promise.Deferred(); + var baseDeferred: webdriver.promise.Deferred = deferred; var flow: protractor.promise.ControlFlow = new protractor.promise.ControlFlow(); var baseFlow: webdriver.promise.ControlFlow = flow; - protractor.promise.asap(promise, function(value: any){ return true; }); - protractor.promise.asap(promise, function(value: any){}, function(err: any) { return 'ABC'; }); + var arrayPromise: protractor.promise.Promise = protractor.promise.all([new protractor.promise.Promise(), new protractor.promise.Promise()]); - promise = protractor.promise.checkedNodeCall(function(err: any, value: any) { return 123; }); + protractor.promise.asap(promise, function (value: any) { return true; }); + protractor.promise.asap(promise, function (value: any) { }, function (err: any) { return 'ABC'; }); + + promise = protractor.promise.checkedNodeCall(function (err: any, value: any) { return 123; }); + + promise = protractor.promise.consume(function () { + return 5; + }); + promise = protractor.promise.consume(function () { + return 5; + }, this); + promise = protractor.promise.consume(function () { + return 5; + }, this, 1, 2, 3); flow = protractor.promise.controlFlow(); - promise = protractor.promise.createFlow(function(newFlow: webdriver.promise.ControlFlow) { }); + promise = protractor.promise.createFlow(function (newFlow: webdriver.promise.ControlFlow) { }); - deferred = protractor.promise.defer(function() {}); - deferred = protractor.promise.defer(function(reason?: any) {}); + deferred = protractor.promise.defer(); promise = protractor.promise.delayed(123); + var numbersPromise: protractor.promise.Promise = protractor.promise.filter([1, 2, 3], function (el: number, index: number, arr: number[]) { + return true; + }); + numbersPromise = protractor.promise.filter([1, 2, 3], function (el: number, index: number, arr: number[]) { + return true; + }, this); + numbersPromise = protractor.promise.filter(numbersPromise, function (el: number, index: number, arr: number[]) { + return true; + }); + numbersPromise = protractor.promise.filter(numbersPromise, function (el: number, index: number, arr: number[]) { + return true; + }, this); + + numbersPromise = protractor.promise.map([1, 2, 3], function (el: number, index: number, arr: number[]) { + return true; + }); + numbersPromise = protractor.promise.map([1, 2, 3], function (el: number, index: number, arr: number[]) { + return true; + }, this); + numbersPromise = protractor.promise.map(numbersPromise, function (el: number, index: number, arr: number[]) { + return true; + }); + numbersPromise = protractor.promise.map(numbersPromise, function (el: number, index: number, arr: number[]) { + return true; + }, this); + promise = protractor.promise.fulfilled(); - promise = protractor.promise.fulfilled({a: 123}); + promise = protractor.promise.fulfilled({ a: 123 }); - promise = protractor.promise.fullyResolved({a: 123}); + promise = protractor.promise.fullyResolved({ a: 123 }); - var isPromise: boolean = protractor.promise.isPromise('ABC'); + var bool: boolean = protractor.promise.isGenerator(function () { }); + var bool: boolean = protractor.promise.isPromise('ABC'); - promise = protractor.promise.rejected({a: 123}); + promise = protractor.promise.rejected({ a: 123 }); protractor.promise.setDefaultFlow(new webdriver.promise.ControlFlow()); - promise = protractor.promise.when(promise, function(value: any) { return 123; }, function(err: Error) { return 123; }); + promise = protractor.promise.when(promise, function (value: any) { return 123; }, function (err: Error) { return 123; }); +} - // error module +function TestWebDriverStacktraceModule() { + var bool: boolean = protractor.stacktrace.BROWSER_SUPPORTED; - var errorCode: number = protractor.error.ErrorCode.ELEMENT_NOT_VISIBLE; - var error: protractor.error.Error = new protractor.error.Error(protractor.error.ErrorCode.ELEMENT_NOT_VISIBLE); - var baseError: webdriver.error.Error = error; + var frame: protractor.stacktrace.Frame = new protractor.stacktrace.Frame(); + var baseFrame: webdriver.stacktrace.Frame = frame; - // process module + var snapshot: protractor.stacktrace.Snapshot = new protractor.stacktrace.Snapshot(); + var baseSnapshot: webdriver.stacktrace.Snapshot = snapshot; - var isNative: boolean = protractor.process.isNative(); - var value: string; + var err: Error = protractor.stacktrace.format(new Error("Error")); + var frames: protractor.stacktrace.Frame[] = protractor.stacktrace.get(); +} - value = protractor.process.getEnv('name'); - value = protractor.process.getEnv('name', 'default'); +function TestWebDriverUntilModule() { + var conditionB: protractor.until.Condition = new protractor.until.Condition('message', function (driver: webdriver.WebDriver) { return true; }); + var conditionBBase: webdriver.until.Condition = conditionB; + var conditionWebElement: protractor.until.Condition; + var conditionWebElements: protractor.until.Condition; - protractor.process.setEnv('name', 'value'); - protractor.process.setEnv('name', 123); + conditionB = protractor.until.ableToSwitchToFrame(5); + var conditionAlert: protractor.until.Condition = protractor.until.alertIsPresent(); + var el: protractor.ElementFinder = element(by.id('id')); + conditionB = protractor.until.elementIsDisabled(el); + conditionB = protractor.until.elementIsEnabled(el); + conditionB = protractor.until.elementIsNotSelected(el); + conditionB = protractor.until.elementIsNotVisible(el); + conditionB = protractor.until.elementIsSelected(el); + conditionB = protractor.until.elementIsVisible(el); + conditionB = protractor.until.elementTextContains(el, 'text'); + conditionB = protractor.until.elementTextIs(el, 'text'); + conditionB = protractor.until.elementTextMatches(el, /text/); + conditionB = protractor.until.stalenessOf(el); + conditionB = protractor.until.titleContains('text'); + conditionB = protractor.until.titleIs('text'); + conditionB = protractor.until.titleMatches(/text/); + conditionWebElement = protractor.until.elementLocated(by.id('id')); + conditionWebElements = protractor.until.elementsLocated(by.className('class')); } function TestProtractor() { @@ -133,31 +202,47 @@ function TestProtractor() { withCapabilities(webdriver.Capabilities.chrome()). build(); - ptor = new protractor.Protractor(driver); - ptor = new protractor.Protractor(driver, 'baseUrl'); - ptor = new protractor.Protractor(driver, 'baseUrl', 'rootElement'); - ptor = protractor.getInstance(); - protractor.setInstance(ptor); - ptor = protractor.wrapDriver(driver); ptor = protractor.wrapDriver(driver, 'baseUrl'); ptor = protractor.wrapDriver(driver, 'baseUrl', 'rootElement'); ptor = browser; + var actions: protractor.ActionSequence = ptor.actions(); + + var promise: protractor.promise.Promise = ptor.call(function () { }); + var promise: protractor.promise.Promise = ptor.call(function () { }, this); + var promise: protractor.promise.Promise = ptor.call(function (a: number, b: number, c:number) { }, this, 1, 2,3); + + promise = ptor.executeAsyncScript('SomeScript'); + promise = ptor.executeAsyncScript('SomeScript', 1, 2, 3); + promise = ptor.executeAsyncScript(function () { }); + promise = ptor.executeAsyncScript(function (a: number, b: number, c: number) { }, 1, 2, 3); + + promise = ptor.executeScript('SomeScript'); + promise = ptor.executeScript('SomeScript', 1, 2, 3); + promise = ptor.executeScript(function () { }); + promise = ptor.executeScript(function (a: number, b: number, c: number) { }, 1, 2, 3); + + ptor = browser.forkNewDriverInstance(); + ptor = browser.forkNewDriverInstance(true); + ptor = browser.forkNewDriverInstance(true, false); + driver = ptor.driver; var baseUrl: string = ptor.baseUrl; var rootEl: string = ptor.rootEl; var ignoreSynchronization: boolean = ptor.ignoreSynchronization; var params: any = ptor.params; + ptor.resetUrl = "url"; ptor.debugger(); + ptor.close(); + var controlFlow: protractor.promise.ControlFlow = ptor.controlFlow(); var webElement: protractor.WebElement = ptor.findElement(by.css('.class')); - var promise: webdriver.promise.Promise; - promise = ptor.findElements(by.css('.class')); - promise = ptor.isElementPresent(by.css('.class')); - promise = ptor.isElementPresent(webElement); + ptor.findElements(by.css('.class')).then(function (elements: webdriver.WebElement[]) { }); + ptor.isElementPresent(by.css('.class')).then(function (present: boolean) { }); + ptor.isElementPresent(webElement).then(function (present: boolean) { }); ptor.clearMockModules(); ptor.addMockModule('name', 'script'); @@ -173,16 +258,43 @@ function TestProtractor() { elementArrayFinder = ptor.$$('.class'); - var locationAbsUrl: webdriver.promise.Promise = ptor.getLocationAbsUrl(); + var locationAbsUrl: webdriver.promise.Promise = ptor.getLocationAbsUrl(); ptor.setLocation('webaddress.com'); - promise = ptor.get('webaddress.com'); - promise = ptor.get('webdaddress.com', 45); + var voidPromise: webdriver.promise.Promise = ptor.get('webaddress.com'); + voidPromise = ptor.get('webdaddress.com', 45); + voidPromise = ptor.quit(); + voidPromise = ptor.sleep(5000); + ptor.refresh(); ptor.refresh(45); var navigation: webdriver.WebDriverNavigation = ptor.navigate(); ptor.pause(); ptor.pause(8080); + + ptor.getAllWindowHandles().then(function (handles: string[]) { }); + + var capabilities: protractor.promise.Promise = ptor.getCapabilities(); + + var stringPromise: webdriver.promise.Promise; + stringPromise = ptor.getCurrentUrl(); + stringPromise = ptor.getPageSource(); + stringPromise = ptor.getTitle(); + stringPromise = ptor.getWindowHandle(); + stringPromise = ptor.takeScreenshot(); + + ptor.getPageTimeout = 5000; + + var session: protractor.promise.Promise = ptor.getSession(); + + var options: webdriver.WebDriverOptions = ptor.manage(); + + promise = ptor.schedule(new protractor.Command(protractor.CommandName.ACCEPT_ALERT), 'asdf'); + + var targetLocator: webdriver.WebDriverTargetLocator = ptor.switchTo(); + + ptor.wait(protractor.until.elementLocated(by.id('id')), 5000).then(function (el: webdriver.IWebElement) { });; + ptor.wait(protractor.until.elementLocated(by.id('id')), 5000, 'message').then(function (el: webdriver.IWebElement) { });; } function TestElement() { @@ -192,80 +304,121 @@ function TestElement() { function TestElementFinder() { var elementFinder: protractor.ElementFinder = element(by.id('id')); - var promise: webdriver.promise.Promise; + var voidPromise: webdriver.promise.Promise; + var stringPromise: webdriver.promise.Promise; + var booleanPromise: webdriver.promise.Promise; - promise = elementFinder.click(); - promise = elementFinder.allowAnimations('string'); - promise = elementFinder.sendKeys(protractor.Key.UP, protractor.Key.DOWN); - promise = elementFinder.getTagName(); - promise = elementFinder.getCssValue('display'); - promise = elementFinder.getAttribute('atribute'); - promise = elementFinder.getText(); - promise = elementFinder.getSize(); - promise = elementFinder.getLocation(); - promise = elementFinder.isEnabled(); - promise = elementFinder.isSelected(); - promise = elementFinder.submit(); - promise = elementFinder.clear(); - promise = elementFinder.isDisplayed(); - promise = elementFinder.getOuterHtml(); - promise = elementFinder.getInnerHtml(); - promise = elementFinder.isElementPresent(by.id('id')); - promise = elementFinder.$('.class'); - promise = elementFinder.$$('.class'); - promise = elementFinder.evaluate('expression'); - promise = elementFinder.isPresent(); + elementFinder.getId().then(function (id: webdriver.IWebElementId) { }); + voidPromise = elementFinder.click(); + elementFinder = elementFinder.allowAnimations('string'); + voidPromise = elementFinder.sendKeys(protractor.Key.UP, protractor.Key.DOWN); + stringPromise = elementFinder.getTagName(); + stringPromise = elementFinder.getCssValue('display'); + stringPromise = elementFinder.getAttribute('atribute'); + stringPromise = elementFinder.getText(); + elementFinder.getSize().then(function (size: webdriver.ISize) { }); + elementFinder.getLocation().then(function (location: webdriver.ILocation) { }); + booleanPromise = elementFinder.isEnabled(); + booleanPromise = elementFinder.isSelected(); + voidPromise = elementFinder.submit(); + voidPromise = elementFinder.clear(); + booleanPromise = elementFinder.isDisplayed(); + stringPromise = elementFinder.getOuterHtml(); + stringPromise = elementFinder.getInnerHtml(); + booleanPromise = elementFinder.isElementPresent(by.id('id')); + elementFinder = elementFinder.$('.class'); + var finders: protractor.ElementArrayFinder = elementFinder.$$('.class'); + elementFinder = elementFinder.evaluate('expression'); + booleanPromise = elementFinder.isPresent(); - var webElement: webdriver.WebElement; + var webElement: webdriver.WebElement = elementFinder.getWebElement(); + finders = elementFinder.all(by.className('class')); + elementFinder = elementFinder.allowAnimations('abc'); + elementFinder = elementFinder.clone(); + elementFinder = elementFinder.element(by.id('id')); + + var b: boolean = elementFinder.isPending(); + var locator: webdriver.Locator = elementFinder.locator(); } function TestElementArrayFinder() { var elementArrayFinder: protractor.ElementArrayFinder = element.all(by.id('id')); - var promise: webdriver.promise.Promise; - var elementFinder: protractor.ElementFinder; + + var voidPromise: webdriver.promise.Promise; + var stringPromise: webdriver.promise.Promise; + var booleanPromise: webdriver.promise.Promise; + + elementArrayFinder.getId().then(function (id: webdriver.IWebElementId[]) { }); + voidPromise = elementArrayFinder.click(); + elementArrayFinder = elementArrayFinder.allowAnimations(true); + voidPromise = elementArrayFinder.sendKeys(protractor.Key.UP, protractor.Key.DOWN); + stringPromise = elementArrayFinder.getTagName(); + stringPromise = elementArrayFinder.getCssValue('display'); + stringPromise = elementArrayFinder.getAttribute('atribute'); + stringPromise = elementArrayFinder.getText(); + elementArrayFinder.getSize().then(function (size: webdriver.ISize[]) { }); + elementArrayFinder.getLocation().then(function (location: webdriver.ILocation[]) { }); + booleanPromise = elementArrayFinder.isEnabled(); + booleanPromise = elementArrayFinder.isSelected(); + voidPromise = elementArrayFinder.submit(); + voidPromise = elementArrayFinder.clear(); + booleanPromise = elementArrayFinder.isDisplayed(); + stringPromise = elementArrayFinder.getOuterHtml(); + stringPromise = elementArrayFinder.getInnerHtml(); + var finders: protractor.ElementArrayFinder = elementArrayFinder.$$('.class'); + elementArrayFinder = elementArrayFinder.evaluate('expression'); + + finders = elementArrayFinder.all(by.className('class')); + elementArrayFinder = elementArrayFinder.clone(); + + var b: boolean = elementArrayFinder.isPending(); + var locator: webdriver.Locator = elementArrayFinder.locator(); + + var findersArray: protractor.ElementFinder[] = elementArrayFinder.asElementFinders_(); var driverElementArray: webdriver.WebElement[] = elementArrayFinder.getWebElements(); - elementFinder = elementArrayFinder.get(42); + var elementFinder: protractor.ElementFinder = elementArrayFinder.get(42); elementFinder = elementArrayFinder.first(); elementFinder = elementArrayFinder.last(); - promise = elementArrayFinder.count(); - promise = elementArrayFinder.asElementFinders_(); + elementFinder = elementArrayFinder.toElementFinder_() + var numberPromise: protractor.promise.Promise = elementArrayFinder.count(); elementArrayFinder.each(function(element: protractor.ElementFinder){ // nothing }); - elementArrayFinder.map(function(element: protractor.ElementFinder, index: number){ - // nothing - }); - elementArrayFinder.filter(function(element: protractor.ElementFinder, index: number){ + stringPromise = elementArrayFinder.map(function(element: protractor.ElementFinder, index: number){ + return 'abc'; + }) + elementArrayFinder = elementArrayFinder.filter(function(element: protractor.ElementFinder, index: number){ return element.getText().then((text: string) => { return text === "foo"; }); }); - elementArrayFinder.reduce(function(accumulator: string, element: protractor.ElementFinder){ + elementArrayFinder.reduce(function (accumulator: string, element: protractor.ElementFinder) { return element.getText().then((text: string) => { return accumulator + ',' + text; }); - }, ''); + }, '').then(function (result: string) { }); elementArrayFinder.reduce(function(accumulator: string, element: protractor.ElementFinder, index: number, array: protractor.ElementFinder[]){ return element.getText().then((text: string) => { return accumulator + ',' + text; }); - }, ''); + }, '').then(function (result: string) { }); elementArrayFinder.then(function(underlyingElementFinders: protractor.ElementFinder[]){ //nothing }); } -// This function tests the angular specific locator strategies. +// This function tests the locator strategies. function TestLocatorStrategies() { - var ptor: protractor.Protractor = protractor.getInstance(); + var ptor: protractor.Protractor = browser; var webElement: webdriver.WebElement; - // Protractor Specific Locators protractor.By.addLocator('customLocator', 'script'); protractor.By.addLocator('customLocator2', function(){ // nothing }); + + // Angular specific locators. webElement = ptor.findElement(protractor.By.binding('binding')); webElement = ptor.findElement(protractor.By.exactBinding('exactBinding')); webElement = ptor.findElement(protractor.By.model('model')); @@ -277,4 +430,23 @@ function TestLocatorStrategies() { webElement = ptor.findElement(protractor.By.partialButtonText('partialButtonText')); webElement = ptor.findElement(protractor.By.cssContainingText('cssSelector', 'search text')); webElement = ptor.findElement(protractor.By.options('options')); + // One standard locator for good measure. + webElement = ptor.findElement(protractor.By.id('id')); + + var el: protractor.ElementFinder; + + // Angular specific locators. + el = element(by.binding('binding')); + el = element(by.exactBinding('exactBinding')); + el = element(by.model('model')); + el = element(by.repeater('repeater')); + el = element(by.repeater('repeater').column(0)); + el = element(by.repeater('repeater').row(0)); + el = element(by.repeater('repeater').row(0).column(0)); + el = element(by.buttonText('buttonText')); + el = element(by.partialButtonText('partialButtonText')); + el = element(by.cssContainingText('cssSelector', 'search text')); + el = element(by.options('options')); + // One standard locator for good measure. + el = element(by.id('id')); } diff --git a/angular-protractor/angular-protractor.d.ts b/angular-protractor/angular-protractor.d.ts index 2de49a0a45..8e24c5f572 100644 --- a/angular-protractor/angular-protractor.d.ts +++ b/angular-protractor/angular-protractor.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Angular Protractor 1.0.0-rc4 +// Type definitions for Angular Protractor 1.5.0 // Project: https://github.com/angular/protractor // Definitions by: Bill Armstrong // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -8,55 +8,72 @@ declare module protractor { //region Wrapped webdriver Items - class AbstractBuilder extends webdriver.AbstractBuilder {} class ActionSequence extends webdriver.ActionSequence {} - class Alert extends webdriver.Alert {} class Builder extends webdriver.Builder {} - class Button extends webdriver.Button {} class Capabilities extends webdriver.Capabilities {} class Command extends webdriver.Command {} class EventEmitter extends webdriver.EventEmitter {} - class FirefoxDomExecutor extends webdriver.FirefoxDomExecutor {} - class Locator extends webdriver.Locator {} class Session extends webdriver.Session {} class WebDriver extends webdriver.WebDriver {} - class Browser extends webdriver.Browser {} - class Capability extends webdriver.Capability {} - class CommandName extends webdriver.CommandName {} - class Key extends webdriver.Key {} - class UnhandledAlertError extends webdriver.UnhandledAlertError {} class WebElement extends webdriver.WebElement {} + class WebElementPromise extends webdriver.WebElementPromise { } - module command { - class Command extends webdriver.Command {} - class CommandName extends webdriver.CommandName {} - } + var Browser: webdriver.IBrowser; + var Button: webdriver.IButton; + var Capability: webdriver.ICapability; + var CommandName: webdriver.ICommandName; + var Key: webdriver.IKey; module error { class Error extends webdriver.error.Error {} - class ErrorCode extends webdriver.error.ErrorCode {} - } - - module events { - class EventEmitter extends webdriver.EventEmitter {} + var ErrorCode: webdriver.error.IErrorCode; } module logging { - var Preferences: any; + class Preferences extends webdriver.logging.Preferences { } + class Entry extends webdriver.logging.Entry { } - class LevelName extends webdriver.logging.LevelName {} - class Type extends webdriver.logging.Type {} - class Level extends webdriver.logging.Level {} - class Entry extends webdriver.logging.Entry {} + var Type: webdriver.logging.IType; + var Level: webdriver.logging.ILevelValues; - function getLevel(nameOrValue: string): webdriver.logging.Level; - function getLevel(nameOrValue: number): webdriver.logging.Level; + function getLevel(nameOrValue: string): webdriver.logging.ILevel; + function getLevel(nameOrValue: number): webdriver.logging.ILevel; } module promise { - class Promise extends webdriver.promise.Promise {} - class Deferred extends webdriver.promise.Deferred {} - class ControlFlow extends webdriver.promise.ControlFlow {} + class Thenable extends webdriver.promise.Thenable { } + class Promise extends webdriver.promise.Promise { } + class Deferred extends webdriver.promise.Deferred { } + class ControlFlow extends webdriver.promise.ControlFlow { } + class CancellationError extends webdriver.promise.CancellationError { } + + /** + * Given an array of promises, will return a promise that will be fulfilled + * with the fulfillment values of the input array's values. If any of the + * input array's promises are rejected, the returned promise will be rejected + * with the same reason. + * + * @param {!Array.<(T|!webdriver.promise.Promise.)>} arr An array of + * promises to wait on. + * @return {!webdriver.promise.Promise.>} A promise that is + * fulfilled with an array containing the fulfilled values of the + * input array, or rejected with the same reason as the first + * rejected value. + * @template T + */ + function all(arr: webdriver.promise.Promise[]): webdriver.promise.Promise; + + /** + * Invokes the appropriate callback function as soon as a promised + * {@code value} is resolved. This function is similar to + * {@link webdriver.promise.when}, except it does not return a new promise. + * @param {*} value The value to observe. + * @param {Function} callback The function to call when the value is + * resolved successfully. + * @param {Function=} opt_errback The function to call when the value is + * rejected. + */ + function asap(value: any, callback: Function, opt_errback?: Function): void; /** * @return {!webdriver.promise.ControlFlow} The currently active control flow. @@ -72,7 +89,7 @@ declare module protractor { * @return {!webdriver.promise.Promise} A promise that resolves to the callback * result. */ - function createFlow(callback: (flow: webdriver.promise.ControlFlow) => any): webdriver.promise.Promise; + function createFlow(callback: (flow: webdriver.promise.ControlFlow) => R): webdriver.promise.Promise; /** * Determines whether a {@code value} should be treated as a promise. @@ -83,28 +100,83 @@ declare module protractor { */ function isPromise(value: any): boolean; + /** + * Tests is a function is a generator. + * @param {!Function} fn The function to test. + * @return {boolean} Whether the function is a generator. + */ + function isGenerator(fn: Function): boolean; + /** * Creates a promise that will be resolved at a set time in the future. * @param {number} ms The amount of time, in milliseconds, to wait before * resolving the promise. * @return {!webdriver.promise.Promise} The promise. */ - function delayed(ms: number): webdriver.promise.Promise; + function delayed(ms: number): webdriver.promise.Promise; + + /** + * Calls a function for each element in an array, and if the function returns + * true adds the element to a new array. + * + *

If the return value of the filter function is a promise, this function + * will wait for it to be fulfilled before determining whether to insert the + * element into the new array. + * + *

If the filter function throws or returns a rejected promise, the promise + * returned by this function will be rejected with the same reason. Only the + * first failure will be reported; all subsequent errors will be silently + * ignored. + * + * @param {!(Array.|webdriver.promise.Promise.>)} arr The + * array to iterator over, or a promise that will resolve to said array. + * @param {function(this: SELF, TYPE, number, !Array.): ( + * boolean|webdriver.promise.Promise.)} fn The function + * to call for each element in the array. + * @param {SELF=} opt_self The object to be used as the value of 'this' within + * {@code fn}. + * @template TYPE, SELF + */ + function filter(arr: T[], fn: (element: T, index: number, array: T[]) => any, opt_self?: any): webdriver.promise.Promise; + function filter(arr: webdriver.promise.Promise, fn: (element: T, index: number, array: T[]) => any, opt_self?: any): webdriver.promise.Promise /** * Creates a new deferred object. - * @param {Function=} opt_canceller Function to call when cancelling the - * computation of this instance's value. * @return {!webdriver.promise.Deferred} The new deferred object. */ - function defer(opt_canceller?: any): webdriver.promise.Deferred; + function defer(): webdriver.promise.Deferred; /** * Creates a promise that has been resolved with the given value. * @param {*=} opt_value The resolved value. * @return {!webdriver.promise.Promise} The resolved promise. */ - function fulfilled(opt_value?: any): webdriver.promise.Promise; + function fulfilled(opt_value?: T): webdriver.promise.Promise; + + /** + * Calls a function for each element in an array and inserts the result into a + * new array, which is used as the fulfillment value of the promise returned + * by this function. + * + *

If the return value of the mapping function is a promise, this function + * will wait for it to be fulfilled before inserting it into the new array. + * + *

If the mapping function throws or returns a rejected promise, the + * promise returned by this function will be rejected with the same reason. + * Only the first failure will be reported; all subsequent errors will be + * silently ignored. + * + * @param {!(Array.|webdriver.promise.Promise.>)} arr The + * array to iterator over, or a promise that will resolve to said array. + * @param {function(this: SELF, TYPE, number, !Array.): ?} fn The + * function to call for each element in the array. This function should + * expect three arguments (the element, the index, and the array itself. + * @param {SELF=} opt_self The object to be used as the value of 'this' within + * {@code fn}. + * @template TYPE, SELF + */ + function map(arr: T[], fn: (element: T, index: number, array: T[]) => any, opt_self?: any): webdriver.promise.Promise + function map(arr: webdriver.promise.Promise, fn: (element: T, index: number, array: T[]) => any, opt_self?: any): webdriver.promise.Promise /** * Creates a promise that has been rejected with the given reason. @@ -112,7 +184,7 @@ declare module protractor { * usually an Error or a string. * @return {!webdriver.promise.Promise} The rejected promise. */ - function rejected(opt_reason?: any): webdriver.promise.Promise; + function rejected(opt_reason?: any): webdriver.promise.Promise; /** * Wraps a function that is assumed to be a node-style callback as its final @@ -124,7 +196,49 @@ declare module protractor { * @return {!webdriver.promise.Promise} A promise that will be resolved with the * result of the provided function's callback. */ - function checkedNodeCall(fn: (error: any, value: any) => any): webdriver.promise.Promise; + function checkedNodeCall(fn: Function, ...var_args: any[]): webdriver.promise.Promise; + + /** + * Consumes a {@code GeneratorFunction}. Each time the generator yields a + * promise, this function will wait for it to be fulfilled before feeding the + * fulfilled value back into {@code next}. Likewise, if a yielded promise is + * rejected, the rejection error will be passed to {@code throw}. + * + *

Example 1: the Fibonacci Sequence. + *


+         * webdriver.promise.consume(function* fibonacci() {
+         *   var n1 = 1, n2 = 1;
+         *   for (var i = 0; i < 4; ++i) {
+         *     var tmp = yield n1 + n2;
+         *     n1 = n2;
+         *     n2 = tmp;
+         *   }
+         *   return n1 + n2;
+         * }).then(function(result) {
+         *   console.log(result);  // 13
+         * });
+         * 
+ * + *

Example 2: a generator that throws. + *


+         * webdriver.promise.consume(function* () {
+         *   yield webdriver.promise.delayed(250).then(function() {
+         *     throw Error('boom');
+         *   });
+         * }).thenCatch(function(e) {
+         *   console.log(e.toString());  // Error: boom
+         * });
+         * 
+ * + * @param {!Function} generatorFn The generator function to execute. + * @param {Object=} opt_self The object to use as "this" when invoking the + * initial generator. + * @param {...*} var_args Any arguments to pass to the initial generator. + * @return {!webdriver.promise.Promise.} A promise that will resolve to the + * generator's final result. + * @throws {TypeError} If the given function is not a generator. + */ + function consume(generatorFn: Function, opt_self?: any, ...var_args: any[]): webdriver.promise.Promise; /** * Registers an observer on a promised {@code value}, returning a new promise @@ -137,19 +251,8 @@ declare module protractor { * rejected. * @return {!webdriver.promise.Promise} A new promise. */ - function when(value: any, opt_callback?: (value: any) => any, opt_errback?: (error: any) => any): webdriver.promise.Promise; - - /** - * Invokes the appropriate callback function as soon as a promised - * {@code value} is resolved. This function is similar to - * {@code webdriver.promise.when}, except it does not return a new promise. - * @param {*} value The value to observe. - * @param {Function} callback The function to call when the value is - * resolved successfully. - * @param {Function=} opt_errback The function to call when the value is - * rejected. - */ - function asap(value: any, callback: (value: any) => any, opt_errback?: (error: any) => any): void; + function when(value: T, opt_callback?: (value: T) => any, opt_errback?: (error: any) => any): webdriver.promise.Promise; + function when(value: webdriver.promise.Promise, opt_callback?: (value: T) => any, opt_errback?: (error: any) => any): webdriver.promise.Promise; /** * Returns a promise that will be resolved with the input value in a @@ -170,7 +273,7 @@ declare module protractor { * @return {!webdriver.promise.Promise} A promise for a fully resolved version * of the input value. */ - function fullyResolved(value: any): webdriver.promise.Promise; + function fullyResolved(value: any): webdriver.promise.Promise; /** * Changes the default flow to use when no others are active. @@ -178,55 +281,246 @@ declare module protractor { * @throws {Error} If the default flow is not currently active. */ function setDefaultFlow(flow: webdriver.promise.ControlFlow): void; - } - module process { + module stacktrace { + class Frame extends webdriver.stacktrace.Frame { } + class Snapshot extends webdriver.stacktrace.Snapshot { } /** - * Queries for a named environment variable. - * @param {string} name The name of the environment variable to look up. - * @param {string=} opt_default The default value if the named variable is not - * defined. - * @return {string} The queried environment variable. + * Formats an error's stack trace. + * @param {!(Error|goog.testing.JsUnitException)} error The error to format. + * @return {!(Error|goog.testing.JsUnitException)} The formatted error. */ - function getEnv(name: string, opt_default?: string): string; + function format(error: any): any; /** - * @return {boolean} Whether the current process is Node's native process - * object. + * Gets the native stack trace if available otherwise follows the call chain. + * The generated trace will exclude all frames up to and including the call to + * this function. + * @return {!Array.} The frames of the stack trace. */ - function isNative(): boolean; + function get(): webdriver.stacktrace.Frame[]; /** - * Sets an environment value. If the new value is either null or undefined, the - * environment variable will be cleared. - * @param {string} name The value to set. - * @param {*} value The new value; will be coerced to a string. + * Whether the current browser supports stack traces. + * + * @type {boolean} + * @const */ - function setEnv(name: string, value: any): void; + var BROWSER_SUPPORTED: boolean; + } + module until { + class Condition extends webdriver.until.Condition { } + + /** + * Creates a condition that will wait until the input driver is able to switch + * to the designated frame. The target frame may be specified as: + *
    + *
  1. A numeric index into {@code window.frames} for the currently selected + * frame. + *
  2. A {@link webdriver.WebElement}, which must reference a FRAME or IFRAME + * element on the current page. + *
  3. A locator which may be used to first locate a FRAME or IFRAME on the + * current page before attempting to switch to it. + *
+ * + *

Upon successful resolution of this condition, the driver will be left + * focused on the new frame. + * + * @param {!(number|webdriver.WebElement| + * webdriver.Locator|webdriver.By.Hash| + * function(!webdriver.WebDriver): !webdriver.WebElement)} frame + * The frame identifier. + * @return {!until.Condition.} A new condition. + */ + function ableToSwitchToFrame(frame: number): webdriver.until.Condition; + function ableToSwitchToFrame(frame: webdriver.IWebElement): webdriver.until.Condition; + function ableToSwitchToFrame(frame: webdriver.Locator): webdriver.until.Condition; + function ableToSwitchToFrame(frame: (webdriver: webdriver.WebDriver) => webdriver.IWebElement): webdriver.until.Condition; + function ableToSwitchToFrame(frame: any): webdriver.until.Condition; + + /** + * Creates a condition that waits for an alert to be opened. Upon success, the + * returned promise will be fulfilled with the handle for the opened alert. + * + * @return {!until.Condition.} The new condition. + */ + function alertIsPresent(): webdriver.until.Condition; + + /** + * Creates a condition that will wait for the given element to be disabled. + * + * @param {!webdriver.WebElement} element The element to test. + * @return {!until.Condition.} The new condition. + * @see webdriver.WebDriver#isEnabled + */ + function elementIsDisabled(element: webdriver.IWebElement): webdriver.until.Condition; + + /** + * Creates a condition that will wait for the given element to be enabled. + * + * @param {!webdriver.WebElement} element The element to test. + * @return {!until.Condition.} The new condition. + * @see webdriver.WebDriver#isEnabled + */ + function elementIsEnabled(element: webdriver.IWebElement): webdriver.until.Condition; + + /** + * Creates a condition that will wait for the given element to be deselected. + * + * @param {!webdriver.WebElement} element The element to test. + * @return {!until.Condition.} The new condition. + * @see webdriver.WebDriver#isSelected + */ + function elementIsNotSelected(element: webdriver.IWebElement): webdriver.until.Condition; + + /** + * Creates a condition that will wait for the given element to be in the DOM, + * yet not visible to the user. + * + * @param {!webdriver.WebElement} element The element to test. + * @return {!until.Condition.} The new condition. + * @see webdriver.WebDriver#isDisplayed + */ + function elementIsNotVisible(element: webdriver.IWebElement): webdriver.until.Condition; + + /** + * Creates a condition that will wait for the given element to be selected. + * @param {!webdriver.WebElement} element The element to test. + * @return {!until.Condition.} The new condition. + * @see webdriver.WebDriver#isSelected + */ + function elementIsSelected(element: webdriver.IWebElement): webdriver.until.Condition; + + /** + * Creates a condition that will wait for the given element to become visible. + * + * @param {!webdriver.WebElement} element The element to test. + * @return {!until.Condition.} The new condition. + * @see webdriver.WebDriver#isDisplayed + */ + function elementIsVisible(element: webdriver.IWebElement): webdriver.until.Condition; + + /** + * Creates a condition that will loop until an element is + * {@link webdriver.WebDriver#findElement found} with the given locator. + * + * @param {!(webdriver.Locator|webdriver.By.Hash|Function)} locator The locator + * to use. + * @return {!until.Condition.} The new condition. + */ + function elementLocated(locator: webdriver.Locator): webdriver.until.Condition; + function elementLocated(locator: any): webdriver.until.Condition; + + /** + * Creates a condition that will wait for the given element's + * {@link webdriver.WebDriver#getText visible text} to contain the given + * substring. + * + * @param {!webdriver.WebElement} element The element to test. + * @param {string} substr The substring to search for. + * @return {!until.Condition.} The new condition. + * @see webdriver.WebDriver#getText + */ + function elementTextContains(element: webdriver.IWebElement, substr: string): webdriver.until.Condition; + + /** + * Creates a condition that will wait for the given element's + * {@link webdriver.WebDriver#getText visible text} to match the given + * {@code text} exactly. + * + * @param {!webdriver.WebElement} element The element to test. + * @param {string} text The expected text. + * @return {!until.Condition.} The new condition. + * @see webdriver.WebDriver#getText + */ + function elementTextIs(element: webdriver.IWebElement, text: string): webdriver.until.Condition; + + /** + * Creates a condition that will wait for the given element's + * {@link webdriver.WebDriver#getText visible text} to match a regular + * expression. + * + * @param {!webdriver.WebElement} element The element to test. + * @param {!RegExp} regex The regular expression to test against. + * @return {!until.Condition.} The new condition. + * @see webdriver.WebDriver#getText + */ + function elementTextMatches(element: webdriver.IWebElement, regex: RegExp): webdriver.until.Condition; + + /** + * Creates a condition that will loop until at least one element is + * {@link webdriver.WebDriver#findElement found} with the given locator. + * + * @param {!(webdriver.Locator|webdriver.By.Hash|Function)} locator The locator + * to use. + * @return {!until.Condition.>} The new + * condition. + */ + function elementsLocated(locator: webdriver.Locator): webdriver.until.Condition; + function elementsLocated(locator: any): webdriver.until.Condition; + + /** + * Creates a condition that will wait for the given element to become stale. An + * element is considered stale once it is removed from the DOM, or a new page + * has loaded. + * + * @param {!webdriver.WebElement} element The element that should become stale. + * @return {!until.Condition.} The new condition. + */ + function stalenessOf(element: webdriver.IWebElement): webdriver.until.Condition; + + /** + * Creates a condition that will wait for the current page's title to contain + * the given substring. + * + * @param {string} substr The substring that should be present in the page + * title. + * @return {!until.Condition.} The new condition. + */ + function titleContains(substr: string): webdriver.until.Condition; + + /** + * Creates a condition that will wait for the current page's title to match the + * given value. + * + * @param {string} title The expected page title. + * @return {!until.Condition.} The new condition. + */ + function titleIs(title: string): webdriver.until.Condition; + + /** + * Creates a condition that will wait for the current page's title to match the + * given regular expression. + * + * @param {!RegExp} regex The regular expression to test against. + * @return {!until.Condition.} The new condition. + */ + function titleMatches(regex: RegExp): webdriver.until.Condition; } //endregion - /** - * Use as: element(locator) - * - * The ElementFinder can be treated as a WebElement for most purposes, in - * particular, you may perform actions (i.e. click, getText) on them as you - * would a WebElement. ElementFinders extend Promise, and once an action - * is performed on an ElementFinder, the latest result from the chain can be - * accessed using then. Unlike a WebElement, an ElementFinder will wait for - * angular to settle before performing finds or actions. - * - * ElementFinder can be used to build a chain of locators that is used to find - * an element. An ElementFinder does not actually attempt to find the element - * until an action is called, which means they can be set up in helper files - * before the page is available. - * - * @param {webdriver.Locator} locator An element locator. - * @return {ElementFinder} - */ + + /** + * Use as: element(locator) + * + * The ElementFinder can be treated as a WebElement for most purposes, in + * particular, you may perform actions (i.e. click, getText) on them as you + * would a WebElement. ElementFinders extend Promise, and once an action + * is performed on an ElementFinder, the latest result from the chain can be + * accessed using then. Unlike a WebElement, an ElementFinder will wait for + * angular to settle before performing finds or actions. + * + * ElementFinder can be used to build a chain of locators that is used to find + * an element. An ElementFinder does not actually attempt to find the element + * until an action is called, which means they can be set up in helper files + * before the page is available. + * + * @param {webdriver.Locator} locator An element locator. + * @return {ElementFinder} + */ interface Element { (locator: webdriver.Locator): ElementFinder; @@ -240,115 +534,605 @@ declare module protractor { all(locator: webdriver.Locator): ElementArrayFinder; } - interface ElementFinder { + interface ElementFinder extends webdriver.IWebElement, webdriver.promise.IThenable { /** - * Use as: element(locator).element(locator) - * Calls to element may be chained to find elements within a parent. - * - * @param {webdriver.Locator} locator The locator that will be used to find descendents. - * - * @return {protractor.ElementFinder} The descendent element found by the locator - */ - element(locator: webdriver.Locator): protractor.ElementFinder; + * Calls to element may be chained to find elements within a parent. + * + * @alias element(locator).element(locator) + * @view + *

+ *
+ * Child text + *
{{person.phone}}
+ *
+ *
+ * + * @example + * // Chain 2 element calls. + * var child = element(by.css('.parent')). + * element(by.css('.child')); + * expect(child.getText()).toBe('Child text\n555-123-4567'); + * + * // Chain 3 element calls. + * var triple = element(by.css('.parent')). + * element(by.css('.child')). + * element(by.binding('person.phone')); + * expect(triple.getText()).toBe('555-123-4567'); + * + * @param {webdriver.Locator} subLocator + * @return {ElementFinder} + */ + element(subLocator: webdriver.Locator): ElementFinder; + + /** + * Calls to element may be chained to find an array of elements within a parent. + * + * @alias element(locator).all(locator) + * @view + *
+ *
    + *
  • First
  • + *
  • Second
  • + *
  • Third
  • + *
+ *
+ * + * @example + * var items = element(by.css('.parent')).all(by.tagName('li')) + * + * @param {webdriver.Locator} subLocator + * @return {ElementArrayFinder} + */ + all(subLocator: webdriver.Locator): ElementArrayFinder; /** - * Use as: element(locator).all(locator) - * Calls to element may be chained to find an array of elements within a parent. - * - * @param {webdriver.Locator} locator The locator that will be used to find descendents. - * - * @return {protractor.ElementArrayFinder} The descendent elements found by the locator - */ - all(locator: webdriver.Locator): protractor.ElementArrayFinder; + * Shortcut for querying the document directly with css. + * + * @alias $(cssSelector) + * @view + *
+ * First + * Second + *
+ * + * @example + * var item = $('.count .two'); + * expect(item.getText()).toBe('Second'); + * + * @param {string} selector A css selector + * @return {ElementFinder} which identifies the located + * {@link webdriver.WebElement} + */ + $(selector: string): ElementFinder; /** - * Shortcut for querying the document directly with css. - * - * @param {string} selector a css selector - * @see webdriver.WebElement.findElement - * @return {!protractor.WebElement} - */ - $(selector: string): protractor.WebElement; + * Shortcut for querying the document directly with css. + * + * @alias $$(cssSelector) + * @view + *
+ * First + * Second + *
+ * + * @example + * // The following protractor expressions are equivalent. + * var list = element.all(by.css('.count span')); + * expect(list.count()).toBe(2); + * + * list = $$('.count span'); + * expect(list.count()).toBe(2); + * expect(list.get(0).getText()).toBe('First'); + * expect(list.get(1).getText()).toBe('Second'); + * + * @param {string} selector a css selector + * @return {ElementArrayFinder} which identifies the + * array of the located {@link webdriver.WebElement}s. + */ + $$(selector: string): ElementArrayFinder; /** - * Shortcut for querying the document directly with css. - * - * @param {string} selector a css selector - * @see webdriver.WebElement.findElements - * @return {!webdriver.promise.Promise} A promise that will be resolved to an - * array of the located {@link webdriver.WebElement}s. - */ - $$(selector: string): webdriver.promise.Promise; + * Determine whether the element is present on the page. + * + * @view + * {{person.name}} + * + * @example + * // Element exists. + * expect(element(by.binding('person.name')).isPresent()).toBe(true); + * + * // Element not present. + * expect(element(by.binding('notPresent')).isPresent()).toBe(false); + * + * @return {ElementFinder} which resolves to whether + * the element is present on the page. + */ + isPresent(): webdriver.promise.Promise; /** - * Use as: element(locator).isPresent() - * Determine whether the element is present on the page. - * - * @return {protractor.ElementFinder} Which resolves to whether the element is present on the page. - */ - isPresent(): webdriver.promise.Promise; + * Override for WebElement.prototype.isElementPresent so that protractor waits + * for Angular to settle before making the check. + * + * @see ElementFinder.isPresent + * + * @param {webdriver.Locator} subLocator Locator for element to look for. + * @return {ElementFinder} which resolves to whether + * the element is present on the page. + */ + isElementPresent(subLocator: webdriver.Locator): webdriver.promise.Promise; /** - * Override for WebElement.prototype.isElementPresent so that protractor waits - * for Angular to settle before making the check. - * - * @see ElementFinder.isPresent - * @return {!webdriver.promise.Promise} which resolves to whether the element is present on the page. - */ - isElementPresent(locator: webdriver.Locator): webdriver.promise.Promise; - - /** - * Return this ElementFinder's locator. - * - * @return {webdriver.Locator} - */ + * @see ElementArrayFinder.prototype.locator + * + * @return {webdriver.Locator} + */ locator(): webdriver.Locator; /** - * Use as: element(locator).getWebElement() - * Returns the WebElement represented by this ElementFinder. - * Throws the WebDriver error if the element doesn't exist. - * If index is null, it makes sure that there is only one underlying WebElement - * described by the chain of locators and issues a warning otherwise. - * If index is not null, it retrieves the WebElement specified by the index.. - * @return {webdriver.WebElement} The WebElement represented by the ElementFinder. - */ + * Returns the WebElement represented by this ElementFinder. + * Throws the WebDriver error if the element doesn't exist. + * + * @example + * The following three expressions are equivalent. + * element(by.css('.parent')).getWebElement(); + * browser.waitForAngular(); browser.driver.findElement(by.css('.parent')); + * browser.findElement(by.css('.parent')); + * + * @alias element(locator).getWebElement() + * @return {webdriver.WebElement} + */ getWebElement(): webdriver.WebElement; /** - * Evalates the input as if it were on the scope of the current element. + * Evaluates the input as if it were on the scope of the current element. + * @see ElementArrayFinder.evaluate + * + * @param {string} expression + * + * @return {ElementFinder} which resolves to the evaluated expression. + */ + evaluate(expression: string): ElementFinder; + + /** + * @see ElementArrayFinder.prototype.allowAnimations. + * @param {string} value + * + * @return {ElementFinder} which resolves to whether animation is allowed. + */ + allowAnimations(value: string): ElementFinder; + + /** + * Cancels the computation of this promise's value, rejecting the promise in the + * process. This method is a no-op if the promise has alreayd been resolved. + * + * @param {string=} opt_reason The reason this promise is being cancelled. + */ + cancel(opt_reason?: string): void; + + + /** @return {boolean} Whether this promise's value is still being computed. */ + isPending(): boolean; + + + /** + * Registers listeners for when this instance is resolved. + * + * @param {?(function(T): (R|webdriver.promise.Promise.))=} opt_callback The + * function to call if this promise is successfully resolved. The function + * should expect a single argument: the promise's resolved value. + * @param {?(function(*): (R|webdriver.promise.Promise.))=} opt_errback The + * function to call if this promise is rejected. The function should expect + * a single argument: the rejection reason. + * @return {!webdriver.promise.Promise.} A new promise which will be + * resolved with the result of the invoked callback. + * @template R + */ + then(opt_callback?: (value: ElementFinder) => any, opt_errback?: (error: any) => any): webdriver.promise.Promise; + + + /** + * Registers a listener for when this promise is rejected. This is synonymous + * with the {@code catch} clause in a synchronous API: + *

+         *   // Synchronous API:
+         *   try {
+         *     doSynchronousWork();
+         *   } catch (ex) {
+         *     console.error(ex);
+         *   }
+         *
+         *   // Asynchronous promise API:
+         *   doAsynchronousWork().thenCatch(function(ex) {
+         *     console.error(ex);
+         *   });
+         * 
+ * + * @param {function(*): (R|webdriver.promise.Promise.)} errback The function + * to call if this promise is rejected. The function should expect a single + * argument: the rejection reason. + * @return {!webdriver.promise.Promise.} A new promise which will be + * resolved with the result of the invoked callback. + * @template R + */ + thenCatch(errback: (error: any) => any): webdriver.promise.Promise; + + + /** + * Registers a listener to invoke when this promise is resolved, regardless + * of whether the promise's value was successfully computed. This function + * is synonymous with the {@code finally} clause in a synchronous API: + *

+         *   // Synchronous API:
+         *   try {
+         *     doSynchronousWork();
+         *   } finally {
+         *     cleanUp();
+         *   }
+         *
+         *   // Asynchronous promise API:
+         *   doAsynchronousWork().thenFinally(cleanUp);
+         * 
+ * + * Note: similar to the {@code finally} clause, if the registered + * callback returns a rejected promise or throws an error, it will silently + * replace the rejection error (if any) from this promise: + *

+         *   try {
+         *     throw Error('one');
+         *   } finally {
+         *     throw Error('two');  // Hides Error: one
+         *   }
+         *
+         *   webdriver.promise.rejected(Error('one'))
+         *       .thenFinally(function() {
+         *         throw Error('two');  // Hides Error: one
+         *       });
+         * 
+ * + * + * @param {function(): (R|webdriver.promise.Promise.)} callback The function + * to call when this promise is resolved. + * @return {!webdriver.promise.Promise.} A promise that will be fulfilled + * with the callback result. + * @template R + */ + thenFinally(callback: () => any): webdriver.promise.Promise; + + /** + * Create a shallow copy of ElementFinder. + * + * @return {!ElementFinder} A shallow copy of this. + */ + clone(): ElementFinder; + } + + interface ElementArrayFinder extends webdriver.promise.IThenable { + /** + * Returns the elements as an array of WebElements. + */ + getWebElements(): webdriver.WebElement[]; + + + /** + * Get an element within the ElementArrayFinder by index. The index starts at 0. + * Negative indices are wrapped (i.e. -i means ith element from last) + * This does not actually retrieve the underlying element. + * + * @alias element.all(locator).get(index) + * @view + *
    + *
  • First
  • + *
  • Second
  • + *
  • Third
  • + *
+ * + * @example + * var list = element.all(by.css('.items li')); + * expect(list.get(0).getText()).toBe('First'); + * expect(list.get(1).getText()).toBe('Second'); + * + * @param {number} index Element index. + * @return {ElementFinder} finder representing element at the given index. + */ + get(index: number): ElementFinder; + + /** + * Get the first matching element for the ElementArrayFinder. This does not + * actually retrieve the underlying element. + * + * @alias element.all(locator).first() + * @view + *
    + *
  • First
  • + *
  • Second
  • + *
  • Third
  • + *
+ * + * @example + * var first = element.all(by.css('.items li')).first(); + * expect(first.getText()).toBe('First'); + * + * @return {ElementFinder} finder representing the first matching element + */ + first(): ElementFinder; + + /** + * Get the last matching element for the ElementArrayFinder. This does not + * actually retrieve the underlying element. + * + * @alias element.all(locator).last() + * @view + *
    + *
  • First
  • + *
  • Second
  • + *
  • Third
  • + *
+ * + * @example + * var last = element.all(by.css('.items li')).last(); + * expect(last.getText()).toBe('Third'); + * + * @return {ElementFinder} finder representing the last matching element + */ + last(): ElementFinder; + + /** + * Count the number of elements represented by the ElementArrayFinder. + * + * @alias element.all(locator).count() + * @view + *
    + *
  • First
  • + *
  • Second
  • + *
  • Third
  • + *
+ * + * @example + * var list = element.all(by.css('.items li')); + * expect(list.count()).toBe(3); + * + * @return {!webdriver.promise.Promise} A promise which resolves to the + * number of elements matching the locator. + */ + count(): webdriver.promise.Promise; + + /** + * Calls the input function on each ElementFinder represented by the ElementArrayFinder. + * + * @alias element.all(locator).each(eachFunction) + * @view + *
    + *
  • First
  • + *
  • Second
  • + *
  • Third
  • + *
+ * + * @example + * element.all(by.css('.items li')).each(function(element) { + * // Will print First, Second, Third. + * element.getText().then(console.log); + * }); + * + * @param {function(ElementFinder)} fn Input function + */ + each(fn: (element: ElementFinder, index: number) => void): void; + + /** + * Apply a map function to each element within the ElementArrayFinder. The + * callback receives the ElementFinder as the first argument and the index as + * a second arg. + * + * @alias element.all(locator).map(mapFunction) + * @view + *
    + *
  • First
  • + *
  • Second
  • + *
  • Third
  • + *
+ * + * @example + * var items = element.all(by.css('.items li')).map(function(elm, index) { + * return { + * index: index, + * text: elm.getText(), + * class: elm.getAttribute('class') + * }; + * }); + * expect(items).toEqual([ + * {index: 0, text: 'First', class: 'one'}, + * {index: 1, text: 'Second', class: 'two'}, + * {index: 2, text: 'Third', class: 'three'} + * ]); + * + * @param {function(ElementFinder, number)} mapFn Map function that + * will be applied to each element. + * @return {!webdriver.promise.Promise} A promise that resolves to an array + * of values returned by the map function. + */ + map(mapFn: (element: ElementFinder, index: number) => T): webdriver.promise.Promise; + + /** + * Apply a filter function to each element within the ElementArrayFinder. Returns + * a new ElementArrayFinder with all elements that pass the filter function. The + * filter function receives the ElementFinder as the first argument + * and the index as a second arg. + * This does not actually retrieve the underlying list of elements, so it can + * be used in page objects. + * + * @alias element.all(locator).filter(filterFn) + * @view + *
    + *
  • First
  • + *
  • Second
  • + *
  • Third
  • + *
+ * + * @example + * element.all(by.css('.items li')).filter(function(elem, index) { + * return elem.getText().then(function(text) { + * return text === 'Third'; + * }); + * }).then(function(filteredElements) { + * filteredElements[0].click(); + * }); + * + * @param {function(ElementFinder, number): webdriver.WebElement.Promise} filterFn + * Filter function that will test if an element should be returned. + * filterFn can either return a boolean or a promise that resolves to a boolean. + * @return {!ElementArrayFinder} A ElementArrayFinder that represents an array + * of element that satisfy the filter function. + */ + filter(filterFn: (element: ElementFinder, index: number) => any): ElementArrayFinder; + + /** + * Apply a reduce function against an accumulator and every element found + * using the locator (from left-to-right). The reduce function has to reduce + * every element into a single value (the accumulator). Returns promise of + * the accumulator. The reduce function receives the accumulator, current + * ElementFinder, the index, and the entire array of ElementFinders, + * respectively. + * + * @alias element.all(locator).reduce(reduceFn) + * @view + *
    + *
  • First
  • + *
  • Second
  • + *
  • Third
  • + *
+ * + * @example + * var value = element.all(by.css('.items li')).reduce(function(acc, elem) { + * return elem.getText().then(function(text) { + * return acc + text + ' '; + * }); + * }); + * + * expect(value).toEqual('First Second Third '); + * + * @param {function(number, ElementFinder, number, Array.)} + * reduceFn Reduce function that reduces every element into a single value. + * @param {*} initialValue Initial value of the accumulator. + * @return {!webdriver.promise.Promise} A promise that resolves to the final + * value of the accumulator. + */ + reduce(reduceFn: (acc: T, element: ElementFinder, index: number, arr: ElementFinder[]) => T, initialValue: T): webdriver.promise.Promise; + + /** + * Represents the ElementArrayFinder as an array of ElementFinders. + * + * @return {Array.} Return a promise, which resolves to a list + * of ElementFinders specified by the locator. + */ + asElementFinders_(): ElementFinder[]; + + /** + * Create a shallow copy of ElementArrayFinder. + * + * @return {!ElementArrayFinder} A shallow copy of this. + */ + clone(): ElementArrayFinder; + + /** + * Calls to ElementArrayFinder may be chained to find an array of elements + * using the current elements in this ElementArrayFinder as the starting point. + * This function returns a new ElementArrayFinder which would contain the + * children elements found (and could also be empty). + * + * @alias element.all(locator).all(locator) + * @view + *
+ *
    + *
  • 1a
  • + *
  • 1b
  • + *
+ *
+ *
+ *
    + *
  • 2a
  • + *
  • 2b
  • + *
+ *
+ * + * @example + * var foo = element.all(by.css('.parent')).all(by.css('.foo')) + * expect(foo.getText()).toEqual(['1a', '2a']) + * var baz = element.all(by.css('.parent')).all(by.css('.baz')) + * expect(baz.getText()).toEqual(['1b']) + * var nonexistent = element.all(by.css('.parent')).all(by.css('.NONEXISTENT')) + * expect(nonexistent.getText()).toEqual(['']) + * + * @param {webdriver.Locator} subLocator + * @return {ElementArrayFinder} + */ + all(locator: webdriver.Locator): ElementArrayFinder; + + /** + * Shorthand function for finding arrays of elements by css. + * + * @type {function(string): ElementArrayFinder} + */ + $$(selector: string): ElementArrayFinder; + + /** + * Returns an ElementFinder representation of ElementArrayFinder. It ensures + * that the ElementArrayFinder resolves to one and only one underlying element. + * + * @return {ElementFinder} An ElementFinder representation + * @private + */ + toElementFinder_(): ElementFinder; + + /** + * Returns the most relevant locator. + * + * @example + * $('#ID1').locator() // returns by.css('#ID1') + * $('#ID1').$('#ID2').locator() // returns by.css('#ID2') + * $$('#ID1').filter(filterFn).get(0).click().locator() // returns by.css('#ID1') + * + * @return {webdriver.Locator} + */ + locator(): webdriver.Locator; + + /** + * Evaluates the input as if it were on the scope of the current underlying + * elements. + * + * @view + * {{variableInScope}} + * + * @example + * var value = element(by.id('foo')).evaluate('variableInScope'); + * * @param {string} expression * - * @return {!webdriver.promise.Promise} A promise that will resolve to the - * evaluated expression. The result will be resolved as in + * @return {ElementArrayFinder} which resolves to the + * evaluated expression for each underlying element. + * The result will be resolved as in * {@link webdriver.WebDriver.executeScript}. In summary - primitives will * be resolved as is, functions will be converted to string, and elements * will be returned as a WebElement. */ - evaluate(expression: string): webdriver.promise.Promise; + evaluate(expression: string): ElementArrayFinder; /** - * Determine if animation is allowed on the current element. + * Determine if animation is allowed on the current underlying elements. * @param {string} value * - * @return {ElementFinder} which resolves to whether animation is allowed. - */ - allowAnimations(value: string): webdriver.promise.Promise; - - /** - * Access the underlying actionResult of ElementFinder. Implementation allows ElementFinder to be used as a webdriver.promise.Promise. - * @param {function(webdriver.promise.Promise)} fn Function which takes the value of the underlying actionResult. + * @example + * // Turns off ng-animate animations for all elements in the + * element(by.css('body')).allowAnimations(false); * - * @return {webdriver.promise.Promise} Promise which contains the results of evaluating fn. + * @return {ElementArrayFinder} which resolves to whether animation is allowed. */ - then(fn: IThenFunction): webdriver.promise.Promise; + allowAnimations(value: boolean): ElementArrayFinder; /** * Schedules a command to click on this element. * @return {!webdriver.promise.Promise} A promise that will be resolved when * the click command has completed. */ - click(): webdriver.promise.Promise; + click(): webdriver.promise.Promise; /** * Schedules a command to type a sequence on the DOM element represented by this @@ -390,14 +1174,14 @@ declare module protractor { * @return {!webdriver.promise.Promise} A promise that will be resolved when all * keys have been typed. */ - sendKeys(...var_args: string[]): webdriver.promise.Promise; + sendKeys(...var_args: string[]): webdriver.promise.Promise; /** * Schedules a command to query for the tag/node name of this element. * @return {!webdriver.promise.Promise} A promise that will be resolved with the * element's tag name. */ - getTagName(): webdriver.promise.Promise; + getTagName(): webdriver.promise.Promise; /** * Schedules a command to query for the computed style of the element @@ -414,7 +1198,7 @@ declare module protractor { * @return {!webdriver.promise.Promise} A promise that will be resolved with the * requested CSS value. */ - getCssValue(cssStyleProperty: string): webdriver.promise.Promise; + getCssValue(cssStyleProperty: string): webdriver.promise.Promise; /** * Schedules a command to query for the value of the given attribute of the @@ -443,7 +1227,7 @@ declare module protractor { * @return {!webdriver.promise.Promise} A promise that will be resolved with the * attribute's value. */ - getAttribute(attributeName: string): webdriver.promise.Promise; + getAttribute(attributeName: string): webdriver.promise.Promise; /** * Get the visible (i.e. not hidden by CSS) innerText of this element, including @@ -451,7 +1235,7 @@ declare module protractor { * @return {!webdriver.promise.Promise} A promise that will be resolved with the * element's visible text. */ - getText(): webdriver.promise.Promise; + getText(): webdriver.promise.Promise; /** * Schedules a command to compute the size of this element's bounding box, in @@ -459,14 +1243,14 @@ declare module protractor { * @return {!webdriver.promise.Promise} A promise that will be resolved with the * element's size as a {@code {width:number, height:number}} object. */ - getSize(): webdriver.promise.Promise; + getSize(): webdriver.promise.Promise; /** * Schedules a command to compute the location of this element in page space. * @return {!webdriver.promise.Promise} A promise that will be resolved to the * element's location as a {@code {x:number, y:number}} object. */ - getLocation(): webdriver.promise.Promise; + getLocation(): webdriver.promise.Promise; /** * Schedules a command to query whether the DOM element represented by this @@ -474,14 +1258,14 @@ declare module protractor { * @return {!webdriver.promise.Promise} A promise that will be resolved with * whether this element is currently enabled. */ - isEnabled(): webdriver.promise.Promise; + isEnabled(): webdriver.promise.Promise; /** * Schedules a command to query whether this element is selected. * @return {!webdriver.promise.Promise} A promise that will be resolved with * whether this element is currently selected. */ - isSelected(): webdriver.promise.Promise; + isSelected(): webdriver.promise.Promise; /** * Schedules a command to submit the form containing this element (or this @@ -490,7 +1274,7 @@ declare module protractor { * @return {!webdriver.promise.Promise} A promise that will be resolved when * the form has been submitted. */ - submit(): webdriver.promise.Promise; + submit(): webdriver.promise.Promise; /** * Schedules a command to clear the {@code value} of this element. This command @@ -499,276 +1283,173 @@ declare module protractor { * @return {!webdriver.promise.Promise} A promise that will be resolved when * the element has been cleared. */ - clear(): webdriver.promise.Promise; + clear(): webdriver.promise.Promise; /** * Schedules a command to test whether this element is currently displayed. * @return {!webdriver.promise.Promise} A promise that will be resolved with * whether this element is currently visible on the page. */ - isDisplayed(): webdriver.promise.Promise; + isDisplayed(): webdriver.promise.Promise; /** * Schedules a command to retrieve the outer HTML of this element. * @return {!webdriver.promise.Promise} A promise that will be resolved with * the element's outer HTML. */ - getOuterHtml(): webdriver.promise.Promise; + getOuterHtml(): webdriver.promise.Promise; + + /** + * @return {!webdriver.promise.Promise.} A promise + * that resolves to this element's JSON representation as defined by the + * WebDriver wire protocol. + * @see http://code.google.com/p/selenium/wiki/JsonWireProtocol + */ + getId(): webdriver.promise.Promise /** * Schedules a command to retrieve the inner HTML of this element. * @return {!webdriver.promise.Promise} A promise that will be resolved with the * element's inner HTML. */ - getInnerHtml(): webdriver.promise.Promise; - - /** - * @return {!webdriver.promise.Promise.} A promise - * that resolves to this element's JSON representation as defined by the - * WebDriver wire protocol. - * @see http://code.google.com/p/selenium/wiki/JsonWireProtocol - */ - toWireValue(): webdriver.promise.Promise; + getInnerHtml(): webdriver.promise.Promise; } - interface IThenFunction { - (promiseResult: any): any; - } - - - interface ElementArrayFinder { - /** - * Use as: element.all(locator).getWebElements() - * Returns the array of WebElements represented by this ElementArrayFinder. - * - * @return {Array.} Array of WebElements represented by this ElementArrayFinder - */ - getWebElements(): webdriver.WebElement[]; - - /** - * Use as: element.all(locator).get(index) - * Get an element found by the locator by index. The index starts at 0. This does not actually retrieve the underlying element. - * - * @param {number} index Element index. - * - * @return {protractor.ElementFinder} Finder representing element at the given index - */ - get(index: number): protractor.ElementFinder; - - - /** - * Use as: element.all(locator).first() - * Get the first matching element for the locator. This does not actually retrieve the underlying element. - * - * @return {Protractor.ElementFinder} Finder representing the first matching element - */ - first(): protractor.ElementFinder; - - /** - * Use as: element.all(locator).last() - * Get the last matching element for the locator. This does not actually retrieve the underlying element. - * - * @return {Protractor.ElementFinder} Finder representing the last matching element - */ - last(): protractor.ElementFinder; - - /** - * Use as: element.all(locator).getWebElements() - * Returns the array of WebElements represented by this ElementArrayFinder. - * - * @return {!webdriver.promise.Promise} The array of WebElements represented by this ElementArrayFinder - */ - count(): webdriver.promise.Promise; - - /** - * Use as: element.all(locator).each(eachFunction) - * Calls the input function on each ElementFinder found by the locator. - * - * @param {function(ElementFinder)} fn Input function. - */ - each(fn: IEachFunction): void; - - /** - * Use as: element.all(locator).map(mapFunction) - * Apply a map function to each element found using the locator. The callback receives the ElementFinder as the first argument and the index as a second arg. - * - * @param {function(ElementFinder, number)} mapFn Map function that will be applied to each element. - * - * @return {!webdriver.promise.Promise} A promise that resolves to an array of values returned by the map function. - */ - map(mapFn: IMapFunction): webdriver.promise.Promise; - - /** - * Use as: element.all(locator).filter(filterFn) - * Apply a filter function to each element found using the locator. Returns promise of a new array with all elements that pass the filter function. The filter function receives the ElementFinder as the first argument and the index as a second arg. - * - * @param {function(ElementFinder, number): webdriver.promise.Promise} filterFn Filter function that will test if an element should be returned. filterFn should return a promise that resolves to a boolean. - * - * @return {!webdriver.promise.Promise} A promise that resolves to an array of ElementFinders that satisfy the filter function. - */ - filter(func: IFilterFunction): webdriver.promise.Promise; - - /** - * Use as: element.all(locator).reduce(reduceFn) - * Apply a reduce function against an accumulator and every element found using the locator (from left-to-right). - * The reduce function has to reduce every element into a single value (the accumulator). - * Returns promise of the accumulator. - * The reduce function receives the accumulator, current ElementFinder, the index, and the entire array of ElementFinders, respectively. - * - * @param {function(number, ElementFinder, number, Array.): webdriver.promise.Promise} reduceFn Reduce function that reduces every element into a single value. - * @param {*} initialValue Initial value of the accumulator. - * - * @return {!webdriver.promise.Promise} A promise that resolves to the final value of the accumulator. - */ - reduce(func: IReductionFunction, initialValue: any): webdriver.promise.Promise; - - /** - * Represents the ElementArrayFinder as an array of ElementFinders. - * - * @return {!webdriver.promise.Promise} Return a promise, which resolves to a list (array) - * of ElementFinders specified by the locator. - */ - asElementFinders_(): webdriver.promise.Promise; - - - /** - * Find the elements specified by the locator. The input function is passed - * to the resulting promise, which resolves to an array of ElementFinders. - * - * Use as: element.all(locator).then(thenFunction) - *
    - *
  • First
  • - *
  • Second
  • - *
  • Third
  • - *
- * - * element.all(by.css('.items li')).then(function(arr) { - * expect(arr.length).toEqual(3); - * }); - * - * @param {function(Array.)} fn - * - * @type {webdriver.promise.Promise} a promise which will resolve to - * an array of ElementFinders matching the locator. - */ - then(fn: IElementArrayFinderThenFunction): webdriver.promise.Promise; - } - - interface IEachFunction { - (element: protractor.ElementFinder): void; - } - - interface IMapFunction { - (element: ElementFinder, index: number): any; - } - - interface IFilterFunction { - (element: ElementFinder, index: number): webdriver.promise.Promise; - } - - interface IReductionFunction { - (accumulator: any, element: protractor.ElementFinder, index?: number, array?: protractor.ElementFinder[]): webdriver.promise.Promise; - } - - interface IElementArrayFinderThenFunction { - (promiseResult: ElementFinder[]): any; - } - - class LocatorWithColumn extends webdriver.Locator { + interface LocatorWithColumn extends webdriver.Locator { column(index: number): webdriver.Locator; } - class RepeaterLocator extends LocatorWithColumn { + interface RepeaterLocator extends LocatorWithColumn { row(index: number): LocatorWithColumn; } interface IProtractorLocatorStrategy extends webdriver.ILocatorStrategy { /** * Add a locator to this instance of ProtractorBy. This locator can then be - * used with element(by.()). + * used with element(by.locatorName(args)). * - * @param {string} name - * @param {function|string} script A script to be run in the context of + * @view + * + * + * @example + * // Add the custom locator. + * by.addLocator('buttonTextSimple', + * function(buttonText, opt_parentElement, opt_rootSelector) { + * // This function will be serialized as a string and will execute in the + * // browser. The first argument is the text for the button. The second + * // argument is the parent element, if any. + * var using = opt_parentElement, + * buttons = using.querySelectorAll('button'); + * + * // Return an array of buttons with the text. + * return Array.prototype.filter.call(buttons, function(button) { + * return button.textContent === buttonText; + * }); + * }); + * + * // Use the custom locator. + * element(by.buttonTextSimple('Go!')).click(); + * + * @alias by.addLocator(locatorName, functionOrScript) + * @param {string} name The name of the new locator. + * @param {Function|string} script A script to be run in the context of * the browser. This script will be passed an array of arguments - * that begins with the element scoping the search, and then - * contains any args passed into the locator. It should return - * an array of elements. + * that contains any args passed into the locator followed by the + * element scoping the search and the css selector for the root angular + * element. It should return an array of elements. */ - addLocator(name: string, script: any): void; + addLocator(name: string, script: string): void; + addLocator(name: string, script: Function): void; /** - * Usage: - * {{status}} - * var status = element(by.binding('{{status}}')); + * Find an element by binding. + * + * @view + * {{person.name}} + * + * + * @example + * var span1 = element(by.binding('person.name')); + * expect(span1.getText()).toBe('Foo'); + * + * var span2 = element(by.binding('person.email')); + * expect(span2.getText()).toBe('foo@bar.com'); * * @param {string} bindingDescriptor - * @return {webdriver.Locator} + * @return {{findElementsOverride: findElementsOverride, toString: Function|string}} */ binding(bindingDescriptor: string): webdriver.Locator; /** * Find an element by exact binding. * + * @view * {{ person.name }} * * {{person_phone|uppercase}} * + * @example * expect(element(by.exactBinding('person.name')).isPresent()).toBe(true); * expect(element(by.exactBinding('person-email')).isPresent()).toBe(true); * expect(element(by.exactBinding('person')).isPresent()).toBe(false); * expect(element(by.exactBinding('person_phone')).isPresent()).toBe(true); * expect(element(by.exactBinding('person_phone|uppercase')).isPresent()).toBe(true); * expect(element(by.exactBinding('phone')).isPresent()).toBe(false); - * + * * @param {string} bindingDescriptor - * @return {webdriver.Locator} + * @return {{findElementsOverride: findElementsOverride, toString: Function|string}} */ exactBinding(bindingDescriptor: string): webdriver.Locator; /** - * * Find an element by ng-model expression. * - * Usage: - * - * var input = element(by.model('person.name')); - * input.sendKeys('123'); - * expect(input.getAttribute('value')).toBe('Foo123'); + * @alias by.model(modelName) + * @view + * + * + * @example + * var input = element(by.model('person.name')); + * input.sendKeys('123'); + * expect(input.getAttribute('value')).toBe('Foo123'); * * @param {string} model ng-model expression. - * @return {webdriver.Locator} */ model(model: string): webdriver.Locator; /** * Find a button by text. * - * Usage: - * - * element(by.buttonText('Save')); + * @view + * + * + * @example + * element(by.buttonText('Save')); * * @param {string} searchText - * @return {webdriver.Locator} + * @return {{findElementsOverride: findElementsOverride, toString: Function|string}} */ buttonText(searchText: string): webdriver.Locator; - /** * Find a button by partial text. * - * Usage: - * - * element(by.partialButtonText('Save')); + * @view + * + * + * @example + * element(by.partialButtonText('Save')); * * @param {string} searchText - * @return {webdriver.Locator} + * @return {{findElementsOverride: findElementsOverride, toString: Function|string}} */ partialButtonText(searchText: string): webdriver.Locator; + /** * Find elements inside an ng-repeat. * - * Usage: + * @view *
* {{cat.name}} * {{cat.age}} @@ -782,6 +1463,7 @@ declare module protractor { *

{{book.blurb}}

*
* + * @example * // Returns the DIV for the second cat. * var secondCat = element(by.repeater('cat in pets').row(1)); * @@ -829,98 +1511,111 @@ declare module protractor { * @example * // Returns the DIV for the dog, but not cat. * var dog = element(by.cssContainingText('.pet', 'Dog')); - * - * @param cssSelector {string} - * @param searchText {string} - * @return {webdriver.Locator} */ cssContainingText(cssSelector: string, searchText: string): webdriver.Locator; /** * Find an element by ng-options expression. * - * Usage: + * @alias by.options(optionsDescriptor) + * @view * * + * @example * var allOptions = element.all(by.options('c for c in colors')); * expect(allOptions.count()).toEqual(2); * var firstOption = allOptions.first(); * expect(firstOption.getText()).toEqual('red'); * * @param {string} optionsDescriptor ng-options expression. - * @return {webdriver.Locator} */ options(optionsDescriptor: string): webdriver.Locator; } var By: IProtractorLocatorStrategy; - class Protractor extends webdriver.WebDriver { - - //region Constructors + interface Protractor extends webdriver.WebDriver { /** - * @param {webdriver.WebDriver} webdriver - * @param {string=} opt_baseUrl A base URL to run get requests against. - * @param {string=body} opt_rootElement Selector element that has an ng-app in - * scope. - * @constructor - */ - constructor(webdriver: webdriver.WebDriver, opt_baseUrl?: string, opt_rootElement?: string); - - //endregion - - //region Properties - - /** - * The wrapped webdriver instance. Use this to interact with pages that do - * not contain Angular (such as a log-in screen). - * - * @type {webdriver.WebDriver} - */ + * The wrapped webdriver instance. Use this to interact with pages that do + * not contain Angular (such as a log-in screen). + * + * @type {webdriver.WebDriver} + */ driver: webdriver.WebDriver; /** - * All get methods will be resolved against this base URL. Relative URLs are = - * resolved the way anchor tags resolve. - * - * @type {string} - */ + * Helper function for finding elements. + * + * @type {function(webdriver.Locator): ElementFinder} + */ + element(locator: webdriver.Locator): ElementFinder; + + /** + * Shorthand function for finding elements by css. + * + * @type {function(string): ElementFinder} + */ + $(selector: string): ElementFinder; + + /** + * Shorthand function for finding arrays of elements by css. + * + * @type {function(string): ElementArrayFinder} + */ + $$(selector: string): ElementArrayFinder; + + /** + * All get methods will be resolved against this base URL. Relative URLs are = + * resolved the way anchor tags resolve. + * + * @type {string} + */ baseUrl: string; /** - * The css selector for an element on which to find Angular. This is usually - * 'body' but if your ng-app is on a subsection of the page it may be - * a subelement. - * - * @type {string} - */ + * The css selector for an element on which to find Angular. This is usually + * 'body' but if your ng-app is on a subsection of the page it may be + * a subelement. + * + * @type {string} + */ rootEl: string; /** - * If true, Protractor will not attempt to synchronize with the page before - * performing actions. This can be harmful because Protractor will not wait - * until $timeouts and $http calls have been processed, which can cause - * tests to become flaky. This should be used only when necessary, such as - * when a page continuously polls an API using $timeout. - * - * @type {boolean} - */ + * If true, Protractor will not attempt to synchronize with the page before + * performing actions. This can be harmful because Protractor will not wait + * until $timeouts and $http calls have been processed, which can cause + * tests to become flaky. This should be used only when necessary, such as + * when a page continuously polls an API using $timeout. + * + * @type {boolean} + */ ignoreSynchronization: boolean; /** - * An object that holds custom test parameters. - * - * @type {Object} - */ + * Timeout in milliseconds to wait for pages to load when calling `get`. + * + * @type {number} + */ + getPageTimeout: number; + + /** + * An object that holds custom test parameters. + * + * @type {Object} + */ params: any; - //endregion - - //region Methods + /** + * The reset URL to use between page loads. + * + * @type {string} + */ + resetUrl: string; /** * Instruct webdriver to wait until Angular has finished rendering and has @@ -929,56 +1624,7 @@ declare module protractor { * @return {!webdriver.promise.Promise} A promise that will resolve to the * scripts return value. */ - waitForAngular(): webdriver.promise.Promise; - - /** - * Waits for Angular to finish rendering before searching for elements. - * @see webdriver.WebDriver.findElement - * - * @param {webdriver.Locator} locator The locator used to find the element. - * @return {!webdriver.WebElement} - */ - findElement(locator: webdriver.Locator): protractor.WebElement; - - /** - * Waits for Angular to finish rendering before searching for elements. - * @see webdriver.WebDriver.findElements - * - * @param {webdriver.Locator} locator The locator used to find the elements. - * @return {!webdriver.promise.Promise} A promise that will be resolved to an - * array of the located {@link webdriver.WebElement}s. - */ - findElements(locator: webdriver.Locator): webdriver.promise.Promise; - - /** - * Tests if an element is present on the page. - * @see webdriver.WebDriver.isElementPresent - * @return {!webdriver.promise.Promise} A promise that will resolve to whether - * the element is present on the page. - */ - isElementPresent(locatorOrElement: webdriver.Locator): webdriver.promise.Promise; - isElementPresent(locatorOrElement: any): webdriver.promise.Promise; - - /** - * Helper function for finding elements. - * - * @type {function(webdriver.Locator): ElementFinder} - */ - element(locator: webdriver.Locator): ElementFinder; - - /** - * Helper function for finding elements by css. - * - * @type {function(string): ElementFinder} - */ - $(cssLocator: string): ElementFinder; - - /** - * Helper function for finding arrays of elements by css. - * - * @type {function(string): ElementArrayFinder} - */ - $$(cssLocator: string): ElementArrayFinder; + waitForAngular(): webdriver.promise.Promise; /** * Add a module to load before Angular whenever Protractor.get is called. @@ -986,13 +1632,18 @@ declare module protractor { * so any module registered here will override preexisting modules with the same * name. * - * @param {string} name The name of the module to load or override. - * @param {string|Function} script The JavaScript to load the module. + * @example + * browser.addMockModule('modName', function() { + * angular.module('modName', []).value('foo', 'bar'); + * }); + * + * @param {!string} name The name of the module to load or override. + * @param {!string|Function} script The JavaScript to load the module. * @param {...*} varArgs Any additional arguments will be provided to * the script and may be referenced using the `arguments` object. */ addMockModule(name: string, script: string, ...varArgs: any[]): void; - addMockModule(name: string, script: any, ...varArgs: any[]): void; + addMockModule(name: string, script: Function, ...varArgs: any[]): void; /** * Clear the list of registered mock modules. @@ -1001,12 +1652,16 @@ declare module protractor { /** * Remove a registered mock module. + * + * @example + * browser.removeMockModule('modName'); + * * @param {!string} name The name of the module to remove. */ removeMockModule(name: string): void; /** - * See webdriver.WebDriver.get + * @see webdriver.WebDriver.get * * Navigate to the given destination and loads mock modules before * Angular. Assumes that the page being loaded uses Angular. @@ -1014,9 +1669,10 @@ declare module protractor { * the wrapped webdriver directly. * * @param {string} destination Destination URL. - * @param {number=} opt_timeout Number of seconds to wait for Angular to start. + * @param {number=} opt_timeout Number of milliseconds to wait for Angular to + * start. */ - get(destination: string, opt_timeout?: number): webdriver.promise.Promise; + get(destination: string, opt_timeout?: number): webdriver.promise.Promise; /** * See webdriver.WebDriver.refresh @@ -1028,13 +1684,7 @@ declare module protractor { * * @param {number=} opt_timeout Number of seconds to wait for Angular to start. */ - refresh(opt_timeout?: number): void; - - /** - * Mixin navigation methods back into the navigation object so that - * they are invoked as before, i.e. driver.navigate().refresh() - */ - navigate(): webdriver.WebDriverNavigation; + refresh(opt_timeout?: number): webdriver.promise.Promise; /** * Browse to another page using in-page navigation. @@ -1043,12 +1693,12 @@ declare module protractor { * @returns {!webdriver.promise.Promise} A promise that will resolve once * page has been changed. */ - setLocation(url: string): webdriver.promise.Promise; + setLocation(url: string): webdriver.promise.Promise; /** * Returns the current absolute url from AngularJS. */ - getLocationAbsUrl(): webdriver.promise.Promise; + getLocationAbsUrl(): webdriver.promise.Promise; /** * Pauses the test and injects some helper functions into the browser, so that @@ -1057,6 +1707,7 @@ declare module protractor { * This should be used under node in debug mode, i.e. with * protractor debug * + * @example * While in the debugger, commands can be scheduled through webdriver by * entering the repl: * debug> repl @@ -1076,11 +1727,27 @@ declare module protractor { * point in the control flow. * Does not require changes to the command line (no need to add 'debug'). * - * @param {=number} opt_debugPort Optional port to use for the debugging process + * @example + * element(by.id('foo')).click(); + * browser.pause(); + * // Execution will stop before the next click action. + * element(by.id('bar')).click(); + * + * @param {number=} opt_debugPort Optional port to use for the debugging process */ pause(opt_debugPort?: number): void; + } - //endregion + // Interface for the global browser object. + interface IBrowser extends Protractor { + /** + * Fork another instance of protractor for use in interactive tests. + * + * @param {boolean} opt_useSameUrl Whether to navigate to current url on creation + * @param {boolean} opt_copyMockModules Whether to apply same mock modules on creation + * @return {Protractor} a protractor instance. + */ + forkNewDriverInstance(opt_useSameUrl?: boolean, opt_copyMockModules?: boolean): Protractor; } /** @@ -1091,19 +1758,6 @@ declare module protractor { * @return {Protractor} */ function wrapDriver(webdriver: webdriver.WebDriver, opt_baseUrl?: string, opt_rootElement?: string): Protractor; - - /** - * Set a singleton instance of protractor. - * @param {Protractor} ptor - */ - function setInstance(ptor: Protractor): void; - - /** - * Get the singleton instance. - * @return {Protractor} - */ - function getInstance(): Protractor; - } interface cssSelectorHelper { @@ -1114,8 +1768,9 @@ interface cssArraySelectorHelper { (cssLocator: string): protractor.ElementArrayFinder; } -declare var browser: protractor.Protractor; +declare var browser: protractor.IBrowser; declare var by: protractor.IProtractorLocatorStrategy; +declare var By: protractor.IProtractorLocatorStrategy; declare var element: protractor.Element; declare var $: cssSelectorHelper; declare var $$: cssArraySelectorHelper; diff --git a/angular-protractor/legacy/angular-protractor-0.17.0-tests.ts b/angular-protractor/legacy/angular-protractor-0.17.0-tests.ts deleted file mode 100644 index dfd413d0e0..0000000000 --- a/angular-protractor/legacy/angular-protractor-0.17.0-tests.ts +++ /dev/null @@ -1,244 +0,0 @@ -/// - -function TestWebDriverExports() { - var abstractBuilder: protractor.AbstractBuilder = new protractor.AbstractBuilder(); - var baseAbstractBuilder: webdriver.AbstractBuilder = abstractBuilder; - - var button: protractor.Button = new protractor.Button(); - var baseButton: webdriver.Button = button; - - var key: string = protractor.Key.ADD; - var chord: string = protractor.Key.chord(protractor.Key.NUMPAD0, protractor.Key.NUMPAD1); - - var driver: protractor.WebDriver = new protractor.Builder(). - withCapabilities(protractor.Capabilities.chrome()). - build(); - var baseDriver: webdriver.WebDriver = driver; - - var action: protractor.ActionSequence = new protractor.ActionSequence(driver); - var baseAction: webdriver.ActionSequence = action; - - var alert: protractor.Alert = new protractor.Alert(driver, 'Message'); - var baseAlert: webdriver.Alert = alert; - - var unhandledAlertError: protractor.UnhandledAlertError = new protractor.UnhandledAlertError('Message', alert); - var baseUnhandledAlertError: webdriver.UnhandledAlertError = unhandledAlertError; - - var browser: string = protractor.Browser.ANDROID; - - var builder: protractor.Builder = new protractor.Builder(); - var baseBuilder: webdriver.Builder = builder; - - var capability: string = protractor.Capability.BROWSER_NAME; - - var capabilities: protractor.Capabilities = protractor.Capabilities.chrome(); - var baseCapabilities: webdriver.Capabilities = capabilities; - - var commandName: string = protractor.CommandName.CLICK_ELEMENT; - - var command: protractor.Command = new protractor.Command(protractor.CommandName.CLICK); - var baseCommand: webdriver.Command = command; - - var eventEmitter: protractor.EventEmitter = new protractor.EventEmitter(); - var baseEventEmitter: webdriver.EventEmitter = eventEmitter; - - var firefoxDomExecutor: protractor.FirefoxDomExecutor = new protractor.FirefoxDomExecutor(); - var baseFirefoxDomExecutor: webdriver.FirefoxDomExecutor = firefoxDomExecutor; - - var webElement: protractor.WebElement = new protractor.WebElement(driver, new protractor.promise.Promise()); - var baseWebElement: webdriver.WebElement = webElement; - - var locator: protractor.Locator = new protractor.Locator('id', 'ABC'); - var baseLocator: webdriver.Locator = locator; - - var session: protractor.Session = new protractor.Session('ABC', webdriver.Capabilities.android()); - var baseSession: webdriver.Session = session; - - locator = protractor.By.name('name'); - - // logging module - - var levelName: string = protractor.logging.LevelName.ALL; - var loggingType: string = protractor.logging.Type.CLIENT; - - var level: webdriver.logging.Level = protractor.logging.Level.ALL; - - var entry: protractor.logging.Entry = new protractor.logging.Entry(protractor.logging.Level.ALL, 'Message'); - var baseEntry: webdriver.logging.Entry = entry; - - level = protractor.logging.getLevel('DEBUG'); - - protractor.logging.Preferences = { a: 123 }; - - // promise module - - var promise: protractor.promise.Promise = new protractor.promise.Promise(); - var basePromise: webdriver.promise.Promise = promise; - - var deferred: protractor.promise.Deferred = new protractor.promise.Deferred(); - var baseDeferred: webdriver.promise.Deferred = deferred; - - var flow: protractor.promise.ControlFlow = new protractor.promise.ControlFlow(); - var baseFlow: webdriver.promise.ControlFlow = flow; - - protractor.promise.asap(promise, function(value: any){ return true; }); - protractor.promise.asap(promise, function(value: any){}, function(err: any) { return 'ABC'; }); - - promise = protractor.promise.checkedNodeCall(function(err: any, value: any) { return 123; }); - - flow = protractor.promise.controlFlow(); - - promise = protractor.promise.createFlow(function(newFlow: webdriver.promise.ControlFlow) { }); - - deferred = protractor.promise.defer(function() {}); - deferred = protractor.promise.defer(function(reason?: any) {}); - - promise = protractor.promise.delayed(123); - - promise = protractor.promise.fulfilled(); - promise = protractor.promise.fulfilled({a: 123}); - - promise = protractor.promise.fullyResolved({a: 123}); - - var isPromise: boolean = protractor.promise.isPromise('ABC'); - - promise = protractor.promise.rejected({a: 123}); - - protractor.promise.setDefaultFlow(new webdriver.promise.ControlFlow()); - - promise = protractor.promise.when(promise, function(value: any) { return 123; }, function(err: Error) { return 123; }); - - // error module - - var errorCode: number = protractor.error.ErrorCode.ELEMENT_NOT_VISIBLE; - var error: protractor.error.Error = new protractor.error.Error(protractor.error.ErrorCode.ELEMENT_NOT_VISIBLE); - var baseError: webdriver.error.Error = error; - - // process module - - var isNative: boolean = protractor.process.isNative(); - var value: string; - - value = protractor.process.getEnv('name'); - value = protractor.process.getEnv('name', 'default'); - - protractor.process.setEnv('name', 'value'); - protractor.process.setEnv('name', 123); - -} - -function TestProtractor() { - var ptor: protractor.Protractor; - var driver: webdriver.WebDriver = new webdriver.Builder(). - withCapabilities(webdriver.Capabilities.chrome()). - build(); - - ptor = new protractor.Protractor(driver); - ptor = new protractor.Protractor(driver, 'baseUrl'); - ptor = new protractor.Protractor(driver, 'baseUrl', 'rootElement'); - ptor = protractor.getInstance(); - protractor.setInstance(ptor); - - ptor = protractor.wrapDriver(driver); - ptor = protractor.wrapDriver(driver, 'baseUrl'); - ptor = protractor.wrapDriver(driver, 'baseUrl', 'rootElement'); - - ptor = browser; - - driver = ptor.driver; - var baseUrl: string = ptor.baseUrl; - var rootEl: string = ptor.rootEl; - var ignoreSynchronization: boolean = ptor.ignoreSynchronization; - var params: any = ptor.params; - - ptor.debugger(); - - ptor.clearMockModules(); - ptor.addMockModule('name', 'script'); - ptor.addMockModule('name', function() {}); - ptor.waitForAngular(); - - var elementFinder: protractor.ElementFinder; - - elementFinder = ptor.element(by.id('ABC')); - elementFinder = ptor.$('.class'); - - var elementArrayFinder: protractor.ElementArrayFinder = ptor.$$('.class'); - - var webElement: webdriver.WebElement = ptor.wrapWebElement(new webdriver.WebElement(driver, 'id')); - - var locationAbsUrl: webdriver.promise.Promise = ptor.getLocationAbsUrl(); -} - -function TestElement() { - var elementFinder: protractor.ElementFinder = element(by.id('id')); - var elementArrayFinder: protractor.ElementArrayFinder = element.all(by.className('class')); -} - -function TestElementFinder() { - var elementFinder: protractor.ElementFinder = element(by.id('id')); - var promise: webdriver.promise.Promise; - - promise = elementFinder.click(); - promise = elementFinder.sendKeys(protractor.Key.UP, protractor.Key.DOWN); - promise = elementFinder.getTagName(); - promise = elementFinder.getCssValue('display'); - promise = elementFinder.getAttribute('atribute'); - promise = elementFinder.getText(); - promise = elementFinder.getSize(); - promise = elementFinder.getLocation(); - promise = elementFinder.isEnabled(); - promise = elementFinder.isSelected(); - promise = elementFinder.submit(); - promise = elementFinder.clear(); - promise = elementFinder.isDisplayed(); - promise = elementFinder.getOuterHtml(); - promise = elementFinder.getInnerHtml(); - promise = elementFinder.isElementPresent(by.id('id')); - promise = elementFinder.isElementPresent(by.js('function(a, b, c) {}'), 1, 2, 3); - promise = elementFinder.findElements(by.className('class')); - promise = elementFinder.findElements(by.js('function(a, b, c) {}'), 1, 2, 3); - promise = elementFinder.$$('.class'); - promise = elementFinder.evaluate('expression'); - promise = elementFinder.isPresent(); - - var webElement: webdriver.WebElement; - - webElement = elementFinder.$('.class'); - webElement = elementFinder.findElement(by.id('id')); - webElement = elementFinder.findElement(by.js('function(a, b, c) {}'), 1, 2, 3); - webElement = elementFinder.find(); -} - -// This function tests the angular specific locator strategies. -function TestLocatorStrategies() { - var ptor: protractor.Protractor = protractor.getInstance(); - var webElement: webdriver.WebElement; - - // Protractor Specific Locators - webElement = ptor.findElement(protractor.By.binding('binding')); - webElement = ptor.findElement(protractor.By.select('select')); - webElement = ptor.findElement(protractor.By.selectedOption('selectedOptions')); - webElement = ptor.findElement(protractor.By.input('input')); - webElement = ptor.findElement(protractor.By.model('model')); - webElement = ptor.findElement(protractor.By.textarea('textarea')); - webElement = ptor.findElement(protractor.By.repeater('repeater')); - webElement = ptor.findElement(protractor.By.buttonText('buttonText')); - webElement = ptor.findElement(protractor.By.partialButtonText('partialButtonText')); -} - -// This function tests the methods that were added to the base WebElement class -function TestWebElements() { - var ptor: protractor.Protractor = protractor.getInstance(); - - var webElement: protractor.WebElement; - var promise: webdriver.promise.Promise; - - webElement = ptor.findElement(by.id('id')).$('.class'); - promise = ptor.findElement(by.id('id')).$$('.class'); - promise = ptor.findElement(by.id('id')).evaluate('something'); - - webElement = webElement.findElement(by.id('id')).$('.class'); - promise = webElement.findElement(by.id('id')).$$('.class'); - promise = webElement.findElement(by.id('id')).evaluate('something'); -} diff --git a/angular-protractor/legacy/angular-protractor-0.17.0.d.ts b/angular-protractor/legacy/angular-protractor-0.17.0.d.ts deleted file mode 100644 index 38458b4933..0000000000 --- a/angular-protractor/legacy/angular-protractor-0.17.0.d.ts +++ /dev/null @@ -1,906 +0,0 @@ -// Type definitions for Angular Protractor 0.17.0 -// Project: https://github.com/angular/protractor -// Definitions by: Bill Armstrong -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/// - -declare module protractor { - //region Wrapped webdriver Items - - class AbstractBuilder extends webdriver.AbstractBuilder {} - class ActionSequence extends webdriver.ActionSequence {} - class Alert extends webdriver.Alert {} - class Builder extends webdriver.Builder {} - class Button extends webdriver.Button {} - class Capabilities extends webdriver.Capabilities {} - class Command extends webdriver.Command {} - class EventEmitter extends webdriver.EventEmitter {} - class FirefoxDomExecutor extends webdriver.FirefoxDomExecutor {} - class Locator extends webdriver.Locator {} - class Session extends webdriver.Session {} - class WebDriver extends webdriver.WebDriver {} - class Browser extends webdriver.Browser {} - class Capability extends webdriver.Capability {} - class CommandName extends webdriver.CommandName {} - class Key extends webdriver.Key {} - class UnhandledAlertError extends webdriver.UnhandledAlertError {} - - class WebElement extends webdriver.WebElement { - /** - * Shortcut for querying the document directly with css. - * - * @param {string} selector a css selector - * @see webdriver.WebElement.findElement - * @return {!protractor.WebElement} - */ - $(selector: string): protractor.WebElement; - - /** - * Shortcut for querying the document directly with css. - * - * @param {string} selector a css selector - * @see webdriver.WebElement.findElements - * @return {!webdriver.promise.Promise} A promise that will be resolved to an - * array of the located {@link webdriver.WebElement}s. - */ - $$(selector: string): webdriver.promise.Promise; - - /** - * Evalates the input as if it were on the scope of the current element. - * @param {string} expression - * - * @return {!webdriver.promise.Promise} A promise that will resolve to the - * evaluated expression. The result will be resolved as in - * {@link webdriver.WebDriver.executeScript}. In summary - primitives will - * be resolved as is, functions will be converted to string, and elements - * will be returned as a WebElement. - */ - evaluate(expression: string): webdriver.promise.Promise; - - /** - * Schedule a command to find a descendant of this element. If the element - * cannot be found, a {@code bot.ErrorCode.NO_SUCH_ELEMENT} result will - * be returned by the driver. Unlike other commands, this error cannot be - * suppressed. In other words, scheduling a command to find an element doubles - * as an assert that the element is present on the page. To test whether an - * element is present on the page, use {@code #isElementPresent} instead. - *

- * The search criteria for find an element may either be a - * {@code webdriver.Locator} object, or a simple JSON object whose sole key - * is one of the accepted locator strategies, as defined by - * {@code webdriver.Locator.Strategy}. For example, the following two - * statements are equivalent: - *

-         * var e1 = element.findElement(By.id('foo'));
-         * var e2 = element.findElement({id:'foo'});
-         * 
- *

- * Note that JS locator searches cannot be restricted to a subtree. All such - * searches are delegated to this instance's parent WebDriver. - * - * @param {webdriver.Locator|Object.} locator The locator - * strategy to use when searching for the element. - * @param {...} var_args Arguments to pass to {@code WebDriver#executeScript} if - * using a JavaScript locator. Otherwise ignored. - * @return {protractor.WebElement} A WebElement that can be used to issue - * commands against the located element. If the element is not found, the - * element will be invalidated and all scheduled commands aborted. - */ - findElement(locator: webdriver.Locator, ...var_args: any[]): protractor.WebElement; - findElement(locator: any, ...var_args: any[]): protractor.WebElement; - } - - module command { - class Command extends webdriver.Command {} - class CommandName extends webdriver.CommandName {} - } - - module error { - class Error extends webdriver.error.Error {} - class ErrorCode extends webdriver.error.ErrorCode {} - } - - module events { - class EventEmitter extends webdriver.EventEmitter {} - } - - module logging { - var Preferences: any; - - class LevelName extends webdriver.logging.LevelName {} - class Type extends webdriver.logging.Type {} - class Level extends webdriver.logging.Level {} - class Entry extends webdriver.logging.Entry {} - - function getLevel(nameOrValue: string): webdriver.logging.Level; - function getLevel(nameOrValue: number): webdriver.logging.Level; - } - - module promise { - class Promise extends webdriver.promise.Promise {} - class Deferred extends webdriver.promise.Deferred {} - class ControlFlow extends webdriver.promise.ControlFlow {} - - /** - * @return {!webdriver.promise.ControlFlow} The currently active control flow. - */ - function controlFlow(): webdriver.promise.ControlFlow; - - /** - * Creates a new control flow. The provided callback will be invoked as the - * first task within the new flow, with the flow as its sole argument. Returns - * a promise that resolves to the callback result. - * @param {function(!webdriver.promise.ControlFlow)} callback The entry point - * to the newly created flow. - * @return {!webdriver.promise.Promise} A promise that resolves to the callback - * result. - */ - function createFlow(callback: (flow: webdriver.promise.ControlFlow) => any): webdriver.promise.Promise; - - /** - * Determines whether a {@code value} should be treated as a promise. - * Any object whose "then" property is a function will be considered a promise. - * - * @param {*} value The value to test. - * @return {boolean} Whether the value is a promise. - */ - function isPromise(value: any): boolean; - - /** - * Creates a promise that will be resolved at a set time in the future. - * @param {number} ms The amount of time, in milliseconds, to wait before - * resolving the promise. - * @return {!webdriver.promise.Promise} The promise. - */ - function delayed(ms: number): webdriver.promise.Promise; - - /** - * Creates a new deferred object. - * @param {Function=} opt_canceller Function to call when cancelling the - * computation of this instance's value. - * @return {!webdriver.promise.Deferred} The new deferred object. - */ - function defer(opt_canceller?: any): webdriver.promise.Deferred; - - /** - * Creates a promise that has been resolved with the given value. - * @param {*=} opt_value The resolved value. - * @return {!webdriver.promise.Promise} The resolved promise. - */ - function fulfilled(opt_value?: any): webdriver.promise.Promise; - - /** - * Creates a promise that has been rejected with the given reason. - * @param {*=} opt_reason The rejection reason; may be any value, but is - * usually an Error or a string. - * @return {!webdriver.promise.Promise} The rejected promise. - */ - function rejected(opt_reason?: any): webdriver.promise.Promise; - - /** - * Wraps a function that is assumed to be a node-style callback as its final - * argument. This callback takes two arguments: an error value (which will be - * null if the call succeeded), and the success value as the second argument. - * If the call fails, the returned promise will be rejected, otherwise it will - * be resolved with the result. - * @param {!Function} fn The function to wrap. - * @return {!webdriver.promise.Promise} A promise that will be resolved with the - * result of the provided function's callback. - */ - function checkedNodeCall(fn: (error: any, value: any) => any): webdriver.promise.Promise; - - /** - * Registers an observer on a promised {@code value}, returning a new promise - * that will be resolved when the value is. If {@code value} is not a promise, - * then the return promise will be immediately resolved. - * @param {*} value The value to observe. - * @param {Function=} opt_callback The function to call when the value is - * resolved successfully. - * @param {Function=} opt_errback The function to call when the value is - * rejected. - * @return {!webdriver.promise.Promise} A new promise. - */ - function when(value: any, opt_callback?: (value: any) => any, opt_errback?: (error: any) => any): webdriver.promise.Promise; - - /** - * Invokes the appropriate callback function as soon as a promised - * {@code value} is resolved. This function is similar to - * {@code webdriver.promise.when}, except it does not return a new promise. - * @param {*} value The value to observe. - * @param {Function} callback The function to call when the value is - * resolved successfully. - * @param {Function=} opt_errback The function to call when the value is - * rejected. - */ - function asap(value: any, callback: (value: any) => any, opt_errback?: (error: any) => any): void; - - /** - * Returns a promise that will be resolved with the input value in a - * fully-resolved state. If the value is an array, each element will be fully - * resolved. Likewise, if the value is an object, all keys will be fully - * resolved. In both cases, all nested arrays and objects will also be - * fully resolved. All fields are resolved in place; the returned promise will - * resolve on {@code value} and not a copy. - * - * Warning: This function makes no checks against objects that contain - * cyclical references: - * - * var value = {}; - * value['self'] = value; - * webdriver.promise.fullyResolved(value); // Stack overflow. - * - * @param {*} value The value to fully resolve. - * @return {!webdriver.promise.Promise} A promise for a fully resolved version - * of the input value. - */ - function fullyResolved(value: any): webdriver.promise.Promise; - - /** - * Changes the default flow to use when no others are active. - * @param {!webdriver.promise.ControlFlow} flow The new default flow. - * @throws {Error} If the default flow is not currently active. - */ - function setDefaultFlow(flow: webdriver.promise.ControlFlow): void; - - } - - module process { - - /** - * Queries for a named environment variable. - * @param {string} name The name of the environment variable to look up. - * @param {string=} opt_default The default value if the named variable is not - * defined. - * @return {string} The queried environment variable. - */ - function getEnv(name: string, opt_default?: string): string; - - /** - * @return {boolean} Whether the current process is Node's native process - * object. - */ - function isNative(): boolean; - - /** - * Sets an environment value. If the new value is either null or undefined, the - * environment variable will be cleared. - * @param {string} name The value to set. - * @param {*} value The new value; will be coerced to a string. - */ - function setEnv(name: string, value: any): void; - - } - - //endregion - - interface Element { - (locator: webdriver.Locator): ElementFinder; - all(locator: webdriver.Locator): ElementArrayFinder; - } - - interface ElementFinder { - /** - * Schedules a command to click on this element. - * @return {!webdriver.promise.Promise} A promise that will be resolved when - * the click command has completed. - */ - click(): webdriver.promise.Promise; - - /** - * Schedules a command to type a sequence on the DOM element represented by this - * instance. - *

- * Modifier keys (SHIFT, CONTROL, ALT, META) are stateful; once a modifier is - * processed in the keysequence, that key state is toggled until one of the - * following occurs: - *

    - *
  • The modifier key is encountered again in the sequence. At this point the - * state of the key is toggled (along with the appropriate keyup/down events). - *
  • - *
  • The {@code webdriver.Key.NULL} key is encountered in the sequence. When - * this key is encountered, all modifier keys current in the down state are - * released (with accompanying keyup events). The NULL key can be used to - * simulate common keyboard shortcuts: - * - * element.sendKeys("text was", - * webdriver.Key.CONTROL, "a", webdriver.Key.NULL, - * "now text is"); - * // Alternatively: - * element.sendKeys("text was", - * webdriver.Key.chord(webdriver.Key.CONTROL, "a"), - * "now text is"); - *
  • - *
  • The end of the keysequence is encountered. When there are no more keys - * to type, all depressed modifier keys are released (with accompanying keyup - * events). - *
  • - *
- * Note: On browsers where native keyboard events are not yet - * supported (e.g. Firefox on OS X), key events will be synthesized. Special - * punctionation keys will be synthesized according to a standard QWERTY en-us - * keyboard layout. - * - * @param {...string} var_args The sequence of keys to - * type. All arguments will be joined into a single sequence (var_args is - * permitted for convenience). - * @return {!webdriver.promise.Promise} A promise that will be resolved when all - * keys have been typed. - */ - sendKeys(...var_args: string[]): webdriver.promise.Promise; - - /** - * Schedules a command to query for the tag/node name of this element. - * @return {!webdriver.promise.Promise} A promise that will be resolved with the - * element's tag name. - */ - getTagName(): webdriver.promise.Promise; - - /** - * Schedules a command to query for the computed style of the element - * represented by this instance. If the element inherits the named style from - * its parent, the parent will be queried for its value. Where possible, color - * values will be converted to their hex representation (e.g. #00ff00 instead of - * rgb(0, 255, 0)). - *

- * Warning: the value returned will be as the browser interprets it, so - * it may be tricky to form a proper assertion. - * - * @param {string} cssStyleProperty The name of the CSS style property to look - * up. - * @return {!webdriver.promise.Promise} A promise that will be resolved with the - * requested CSS value. - */ - getCssValue(cssStyleProperty: string): webdriver.promise.Promise; - - /** - * Schedules a command to query for the value of the given attribute of the - * element. Will return the current value even if it has been modified after the - * page has been loaded. More exactly, this method will return the value of the - * given attribute, unless that attribute is not present, in which case the - * value of the property with the same name is returned. If neither value is - * set, null is returned. The "style" attribute is converted as best can be to a - * text representation with a trailing semi-colon. The following are deemed to - * be "boolean" attributes and will be returned as thus: - * - *

async, autofocus, autoplay, checked, compact, complete, controls, declare, - * defaultchecked, defaultselected, defer, disabled, draggable, ended, - * formnovalidate, hidden, indeterminate, iscontenteditable, ismap, itemscope, - * loop, multiple, muted, nohref, noresize, noshade, novalidate, nowrap, open, - * paused, pubdate, readonly, required, reversed, scoped, seamless, seeking, - * selected, spellcheck, truespeed, willvalidate - * - *

Finally, the following commonly mis-capitalized attribute/property names - * are evaluated as expected: - *

    - *
  • "class" - *
  • "readonly" - *
- * @param {string} attributeName The name of the attribute to query. - * @return {!webdriver.promise.Promise} A promise that will be resolved with the - * attribute's value. - */ - getAttribute(attributeName: string): webdriver.promise.Promise; - - /** - * Get the visible (i.e. not hidden by CSS) innerText of this element, including - * sub-elements, without any leading or trailing whitespace. - * @return {!webdriver.promise.Promise} A promise that will be resolved with the - * element's visible text. - */ - getText(): webdriver.promise.Promise; - - /** - * Schedules a command to compute the size of this element's bounding box, in - * pixels. - * @return {!webdriver.promise.Promise} A promise that will be resolved with the - * element's size as a {@code {width:number, height:number}} object. - */ - getSize(): webdriver.promise.Promise; - - /** - * Schedules a command to compute the location of this element in page space. - * @return {!webdriver.promise.Promise} A promise that will be resolved to the - * element's location as a {@code {x:number, y:number}} object. - */ - getLocation(): webdriver.promise.Promise; - - /** - * Schedules a command to query whether the DOM element represented by this - * instance is enabled, as dicted by the {@code disabled} attribute. - * @return {!webdriver.promise.Promise} A promise that will be resolved with - * whether this element is currently enabled. - */ - isEnabled(): webdriver.promise.Promise; - - /** - * Schedules a command to query whether this element is selected. - * @return {!webdriver.promise.Promise} A promise that will be resolved with - * whether this element is currently selected. - */ - isSelected(): webdriver.promise.Promise; - - /** - * Schedules a command to submit the form containing this element (or this - * element if it is a FORM element). This command is a no-op if the element is - * not contained in a form. - * @return {!webdriver.promise.Promise} A promise that will be resolved when - * the form has been submitted. - */ - submit(): webdriver.promise.Promise; - - /** - * Schedules a command to clear the {@code value} of this element. This command - * has no effect if the underlying DOM element is neither a text INPUT element - * nor a TEXTAREA element. - * @return {!webdriver.promise.Promise} A promise that will be resolved when - * the element has been cleared. - */ - clear(): webdriver.promise.Promise; - - /** - * Schedules a command to test whether this element is currently displayed. - * @return {!webdriver.promise.Promise} A promise that will be resolved with - * whether this element is currently visible on the page. - */ - isDisplayed(): webdriver.promise.Promise; - - /** - * Schedules a command to retrieve the outer HTML of this element. - * @return {!webdriver.promise.Promise} A promise that will be resolved with - * the element's outer HTML. - */ - getOuterHtml(): webdriver.promise.Promise; - - /** - * Schedules a command to retrieve the inner HTML of this element. - * @return {!webdriver.promise.Promise} A promise that will be resolved with the - * element's inner HTML. - */ - getInnerHtml(): webdriver.promise.Promise; - - /** - * Schedules a command to test if there is at least one descendant of this - * element that matches the given search criteria. - * - *

Note that JS locator searches cannot be restricted to a subtree of the - * DOM. All such searches are delegated to this instance's parent WebDriver. - * - * @param {webdriver.Locator|Object.} locator The locator - * strategy to use when searching for the element. - * @param {...} var_args Arguments to pass to {@code WebDriver#executeScript} if - * using a JavaScript locator. Otherwise ignored. - * @return {!webdriver.promise.Promise} A promise that will be resolved with - * whether an element could be located on the page. - */ - isElementPresent(locator: webdriver.Locator, ...var_args: any[]): webdriver.promise.Promise; - isElementPresent(locator: any, ...var_args: any[]): webdriver.promise.Promise; - - /** - * Schedules a command to find all of the descendants of this element that match - * the given search criteria. - *

- * Note that JS locator searches cannot be restricted to a subtree. All such - * searches are delegated to this instance's parent WebDriver. - * - * @param {webdriver.Locator|Object.} locator The locator - * strategy to use when searching for the elements. - * @param {...} var_args Arguments to pass to {@code WebDriver#executeScript} if - * using a JavaScript locator. Otherwise ignored. - * @return {!webdriver.promise.Promise} A promise that will be resolved with an - * array of located {@link webdriver.WebElement}s. - */ - findElements(locator: webdriver.Locator, ...var_args: any[]): webdriver.promise.Promise; - findElements(locator: any, ...var_args: any[]): webdriver.promise.Promise; - - /** - * Shortcut for querying the document directly with css. - * - * @param {string} selector a css selector - * @see webdriver.WebElement.findElement - * @return {!protractor.WebElement} - */ - $(selector: string): protractor.WebElement; - - /** - * Shortcut for querying the document directly with css. - * - * @param {string} selector a css selector - * @see webdriver.WebElement.findElements - * @return {!webdriver.promise.Promise} A promise that will be resolved to an - * array of the located {@link webdriver.WebElement}s. - */ - $$(selector: string): webdriver.promise.Promise; - - /** - * Schedule a command to find a descendant of this element. If the element - * cannot be found, a {@code bot.ErrorCode.NO_SUCH_ELEMENT} result will - * be returned by the driver. Unlike other commands, this error cannot be - * suppressed. In other words, scheduling a command to find an element doubles - * as an assert that the element is present on the page. To test whether an - * element is present on the page, use {@code #isElementPresent} instead. - *

- * The search criteria for find an element may either be a - * {@code webdriver.Locator} object, or a simple JSON object whose sole key - * is one of the accepted locator strategies, as defined by - * {@code webdriver.Locator.Strategy}. For example, the following two - * statements are equivalent: - *

-         * var e1 = element.findElement(By.id('foo'));
-         * var e2 = element.findElement({id:'foo'});
-         * 
- *

- * Note that JS locator searches cannot be restricted to a subtree. All such - * searches are delegated to this instance's parent WebDriver. - * - * @param {webdriver.Locator|Object.} locator The locator - * strategy to use when searching for the element. - * @param {...} var_args Arguments to pass to {@code WebDriver#executeScript} if - * using a JavaScript locator. Otherwise ignored. - * @return {protractor.WebElement} A WebElement that can be used to issue - * commands against the located element. If the element is not found, the - * element will be invalidated and all scheduled commands aborted. - */ - findElement(locator: webdriver.Locator, ...var_args: any[]): protractor.WebElement; - findElement(locator: any, ...var_args: any[]): protractor.WebElement; - - /** - * Evalates the input as if it were on the scope of the current element. - * @param {string} expression - * - * @return {!webdriver.promise.Promise} A promise that will resolve to the - * evaluated expression. The result will be resolved as in - * {@link webdriver.WebDriver.executeScript}. In summary - primitives will - * be resolved as is, functions will be converted to string, and elements - * will be returned as a WebElement. - */ - evaluate(expression: string): webdriver.promise.Promise; - - /** - * Use as: element(locator).element(locator) - * Calls to element may be chained to find elements within a parent. - * - * @param {webdriver.Locator} The locator that will be used to find descendents. - * - * @return {protractor.ElementFinder} the descendent element found by the locator - */ - element(locator: webdriver.Locator): protractor.ElementFinder; - - /** - * Use as: element(locator).all(locator) - * Calls to element may be chained to find an array of elements within a parent. - * - * @param {webdriver.Locator} The locator that will be used to find descendents. - * - * @return {protractor.ElementArrayFinder} the descendent elements found by the locator - */ - all(locator: webdriver.Locator): protractor.ElementArrayFinder; - - find(): protractor.WebElement; - - isPresent(): webdriver.promise.Promise; - } - - interface ElementArrayFinder{ - count(): webdriver.promise.Promise; - get(index: number): protractor.WebElement; - first(): protractor.WebElement; - last(): protractor.WebElement; - then(fn: (value: any) => any): webdriver.promise.Promise; - } - - class LocatorWithColumn extends webdriver.Locator { - column(index: number): webdriver.Locator; - } - - class RepeaterLocator extends LocatorWithColumn { - row(index: number): LocatorWithColumn; - } - - interface IProtractorLocatorStrategy extends webdriver.ILocatorStrategy { - /** - * Add a locator to this instance of ProtractorBy. This locator can then be - * used with element(by.()). - * - * @param {string} name - * @param {function|string} script A script to be run in the context of - * the browser. This script will be passed an array of arguments - * that begins with the element scoping the search, and then - * contains any args passed into the locator. It should return - * an array of elements. - */ - addLocator(name: string, script: any): void; - - /** - * Usage: - * {{status}} - * var status = element(by.binding('{{status}}')); - */ - binding(bindingDescriptor: string): webdriver.Locator; - - /** - * Usage: - * - * element(by.select("user")); - */ - select(model: string): webdriver.Locator; - - /** - * Usage: - * - * element(by.selectedOption("user")); - */ - selectedOption(model: string): webdriver.Locator; - - /** - * @DEPRECATED - use 'model' instead. - * Usage: - * - * element(by.input('user')); - */ - input(model: string): webdriver.Locator; - - /** - * Usage: - * - * element(by.model('user')); - */ - model(model: string): webdriver.Locator; - - /** - * Usage: - * - * element(by.textarea("user")); - */ - textarea(model: string): webdriver.Locator; - - /** - * Usage: - *

- * {{cat.name}} - * {{cat.age}} - *
- * - * // Returns the DIV for the second cat. - * var secondCat = element(by.repeater("cat in pets").row(2)); - * // Returns the SPAN for the first cat's name. - * var firstCatName = element( - * by.repeater("cat in pets").row(1).column("{{cat.name}}")); - * // Returns a promise that resolves to an array of WebElements from a column - * var ages = element( - * by.repeater("cat in pets").column("{{cat.age}}")); - * // Returns a promise that resolves to an array of WebElements containing - * // all rows of the repeater. - * var rows = element(by.repeater("cat in pets")); - */ - repeater(repeatDescriptor: string): RepeaterLocator; - - buttonText(searchText: string): webdriver.Locator; - - partialButtonText(searchText: string): webdriver.Locator; - } - - var By: IProtractorLocatorStrategy; - - class Protractor extends webdriver.WebDriver { - - //region Constructors - - /** - * @param {webdriver.WebDriver} webdriver - * @param {string=} opt_baseUrl A base URL to run get requests against. - * @param {string=body} opt_rootElement Selector element that has an ng-app in - * scope. - * @constructor - */ - constructor(webdriver: webdriver.WebDriver, opt_baseUrl?: string, opt_rootElement?: string); - - //endregion - - //region Properties - - /** - * The wrapped webdriver instance. Use this to interact with pages that do - * not contain Angular (such as a log-in screen). - * - * @type {webdriver.WebDriver} - */ - driver: webdriver.WebDriver; - - /** - * All get methods will be resolved against this base URL. Relative URLs are = - * resolved the way anchor tags resolve. - * - * @type {string} - */ - baseUrl: string; - - /** - * The css selector for an element on which to find Angular. This is usually - * 'body' but if your ng-app is on a subsection of the page it may be - * a subelement. - * - * @type {string} - */ - rootEl: string; - - /** - * If true, Protractor will not attempt to synchronize with the page before - * performing actions. This can be harmful because Protractor will not wait - * until $timeouts and $http calls have been processed, which can cause - * tests to become flaky. This should be used only when necessary, such as - * when a page continuously polls an API using $timeout. - * - * @type {boolean} - */ - ignoreSynchronization: boolean; - - /** - * An object that holds custom test parameters. - * - * @type {Object} - */ - params: any; - - //endregion - - //region Methods - - /** - * Helper function for finding elements. - * - * @type {function(webdriver.Locator): ElementFinder} - */ - element(locator: webdriver.Locator): ElementFinder; - - /** - * Helper function for finding elements by css. - * - * @type {function(string): ElementFinder} - */ - $(cssLocator: string): ElementFinder; - - /** - * Helper function for finding arrays of elements by css. - * - * @type {function(string): ElementArrayFinder} - */ - $$(cssLocator: string): ElementArrayFinder; - - /** - * Instruct webdriver to wait until Angular has finished rendering and has - * no outstanding $http calls before continuing. - * - * @return {!webdriver.promise.Promise} A promise that will resolve to the - * scripts return value. - */ - waitForAngular(): webdriver.promise.Promise; - - /** - * Wrap a webdriver.WebElement with protractor specific functionality. - * - * @param {webdriver.WebElement} element - * @return {protractor.WebElement} the wrapped web element. - */ - wrapWebElement(element: webdriver.WebElement): protractor.WebElement; - - /** - * Add a module to load before Angular whenever Protractor.get is called. - * Modules will be registered after existing modules already on the page, - * so any module registered here will override preexisting modules with the same - * name. - * - * @param {!string} name The name of the module to load or override. - * @param {!string|Function} script The JavaScript to load the module. - */ - addMockModule(name: string, script: string): void; - addMockModule(name: string, script: any): void; - - /** - * Clear the list of registered mock modules. - */ - clearMockModules(): void; - - /** - * Returns the current absolute url from AngularJS. - */ - getLocationAbsUrl(): webdriver.promise.Promise; - - /** - * Pauses the test and injects some helper functions into the browser, so that - * debugging may be done in the browser console. - * - * This should be used under node in debug mode, i.e. with - * protractor debug - * - * While in the debugger, commands can be scheduled through webdriver by - * entering the repl: - * debug> repl - * Press Ctrl + C to leave rdebug repl - * > ptor.findElement(protractor.By.input('user').sendKeys('Laura')); - * > ptor.debugger(); - * debug> c - * - * This will run the sendKeys command as the next task, then re-enter the - * debugger. - */ - debugger(): void; - - /** - * Schedule a command to find an element on the page. If the element cannot be - * found, a {@code bot.ErrorCode.NO_SUCH_ELEMENT} result will be returned - * by the driver. Unlike other commands, this error cannot be suppressed. In - * other words, scheduling a command to find an element doubles as an assert - * that the element is present on the page. To test whether an element is - * present on the page, use {@code #isElementPresent} instead. - * - *

The search criteria for find an element may either be a - * {@code webdriver.Locator} object, or a simple JSON object whose sole key - * is one of the accepted locator strategies, as defined by - * {@code webdriver.Locator.Strategy}. For example, the following two statements - * are equivalent: - *

-         * var e1 = driver.findElement(By.id('foo'));
-         * var e2 = driver.findElement({id:'foo'});
-         * 
- * - *

When running in the browser, a WebDriver cannot manipulate DOM elements - * directly; it may do so only through a {@link webdriver.WebElement} reference. - * This function may be used to generate a WebElement from a DOM element. A - * reference to the DOM element will be stored in a known location and this - * driver will attempt to retrieve it through {@link #executeScript}. If the - * element cannot be found (eg, it belongs to a different document than the - * one this instance is currently focused on), a - * {@link bot.ErrorCode.NO_SUCH_ELEMENT} error will be returned. - * - * @param {!(webdriver.Locator|Object.|Element)} locatorOrElement The - * locator strategy to use when searching for the element, or the actual - * DOM element to be located by the server. - * @param {...} var_args Arguments to pass to {@code #executeScript} if using a - * JavaScript locator. Otherwise ignored. - * @return {!protractor.WebElement} A WebElement that can be used to issue - * commands against the located element. If the element is not found, the - * element will be invalidated and all scheduled commands aborted. - */ - findElement(locatorOrElement: webdriver.Locator, ...var_args: any[]): protractor.WebElement; - findElement(locatorOrElement: any, ...var_args: any[]): protractor.WebElement; - - //endregion - } - - /** - * Create a new instance of Protractor by wrapping a webdriver instance. - * - * @param {webdriver.WebDriver} webdriver The configured webdriver instance. - * @param {string=} opt_baseUrl A URL to prepend to relative gets. - * @return {Protractor} - */ - function wrapDriver(webdriver: webdriver.WebDriver, opt_baseUrl?: string, opt_rootElement?: string): Protractor; - - /** - * Set a singleton instance of protractor. - * @param {Protractor} ptor - */ - function setInstance(ptor: Protractor): void; - - /** - * Get the singleton instance. - * @return {Protractor} - */ - function getInstance(): Protractor; - -} - -interface cssSelectorHelper { - (cssLocator: string): protractor.ElementFinder; -} - -declare var browser: protractor.Protractor; -declare var by: protractor.IProtractorLocatorStrategy; -declare var element: protractor.Element; -declare var $: cssSelectorHelper; -declare var $$: cssSelectorHelper; - -declare module 'protractor' { - export = protractor; -} diff --git a/angularjs/angular-scenario.d.ts b/angular-scenario/angular-scenario.d.ts similarity index 100% rename from angularjs/angular-scenario.d.ts rename to angular-scenario/angular-scenario.d.ts diff --git a/breeze/breeze.d.ts b/breeze/breeze.d.ts index f8f9c851ad..cf26f9aa1a 100644 --- a/breeze/breeze.d.ts +++ b/breeze/breeze.d.ts @@ -297,6 +297,8 @@ declare module breeze { getValidationErrors(property: IProperty): ValidationError[]; hasValidationErrors: boolean; + isNavigationPropertyLoaded(navigationProperty: string): boolean; + isNavigationPropertyLoaded(navigationProperty: NavigationProperty): boolean; loadNavigationProperty(navigationProperty: string, callback?: Function, errorCallback?: Function): Q.Promise; loadNavigationProperty(navigationProperty: NavigationProperty, callback?: Function, errorCallback?: Function): Q.Promise; diff --git a/convict/convict-tests.ts b/convict/convict-tests.ts new file mode 100644 index 0000000000..a36b234802 --- /dev/null +++ b/convict/convict-tests.ts @@ -0,0 +1,58 @@ +/// +/// + +import convict = require('convict'); +import validator = require('validator'); + +// define a schema + +var conf = convict({ + env: { + doc: 'The applicaton environment.', + format: ['production', 'development', 'test'], + default: 'development', + env: 'NODE_ENV', + arg: 'node-env', + }, + ip: { + doc: 'The IP address to bind.', + format: 'ipaddress', + default: '127.0.0.1', + env: 'IP_ADDRESS', + }, + port: { + doc: 'The port to bind.', + format: 'port', + default: 0, + env: 'PORT', + arg: 'port', + }, + key: { + doc: "API key", + format: (val: string) => validator.isUUID(val), + default: '01527E56-8431-11E4-AF91-47B661C210CA' + }, +}); + + +// load environment dependent configuration + +var env = conf.get('env'); +conf.loadFile('./config/' + env + '.json'); +conf.loadFile(['./configs/always.json', './configs/sometimes.json']); + +// perform validation + +conf.validate(); + +var port: number = conf.default('port'); + +if (conf.has('key')) { + conf.set('the.awesome', true); + conf.load({ + thing: { + a: 'b' + } + }); +} +// vim:et:sw=2:ts=2 diff --git a/convict/convict.d.ts b/convict/convict.d.ts new file mode 100644 index 0000000000..dc2b8e82bf --- /dev/null +++ b/convict/convict.d.ts @@ -0,0 +1,33 @@ +// Type definitions for node-convict v0.6.0 +// Project: https://github.com/mozilla/node-convict +// Definitions by: Wim Looman +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module "convict" { + function convict(schema: convict.Schema): convict.Config; + + module convict { + interface Schema { + [name: string]: { + default: any; + doc?: string; + format?: any; + env?: string; + arg?: string; + }; + } + + interface Config { + get(name: string): any; + default(name: string): any; + has(name: string): boolean; + set(name: string, value: any): void; + load(conf: Object): void; + loadFile(file: string): void; + loadFile(files: string[]): void; + validate(): void; + } + } + + export = convict; +} diff --git a/devextreme/dx.chartjs-tests.ts b/devextreme/14.1/dx.chartjs-14.1-tests.ts similarity index 94% rename from devextreme/dx.chartjs-tests.ts rename to devextreme/14.1/dx.chartjs-14.1-tests.ts index 70c53a6020..b9a0be0dfb 100644 --- a/devextreme/dx.chartjs-tests.ts +++ b/devextreme/14.1/dx.chartjs-14.1-tests.ts @@ -1,4 +1,4 @@ -/// +/// module Test { $("

").appendTo(document.body).dxChart({ diff --git a/devextreme/dx.chartjs.d.ts b/devextreme/14.1/dx.chartjs-14.1.d.ts similarity index 99% rename from devextreme/dx.chartjs.d.ts rename to devextreme/14.1/dx.chartjs-14.1.d.ts index 0999c8211c..632767e7ed 100644 --- a/devextreme/dx.chartjs.d.ts +++ b/devextreme/14.1/dx.chartjs-14.1.d.ts @@ -1,9 +1,9 @@ -// Type definitions for ChartJS +// Type definitions for ChartJS 14.1.+ // Project: http://js.devexpress.com/WebDevelopment/Charts/ // Definitions by: DevExpress Inc. // Definitions: https://github.com/borisyankov/DefinitelyTyped -/// +/// declare module DevExpress { export function abstract(): void; diff --git a/devextreme/dx.phonejs-tests.ts b/devextreme/14.1/dx.phonejs-14.1-tests.ts similarity index 99% rename from devextreme/dx.phonejs-tests.ts rename to devextreme/14.1/dx.phonejs-14.1-tests.ts index 478e1ce2f4..9c3f49db36 100644 --- a/devextreme/dx.phonejs-tests.ts +++ b/devextreme/14.1/dx.phonejs-14.1-tests.ts @@ -1,4 +1,4 @@ -/// +/// module Test { var url = "http://some-json-service.net/data.json"; diff --git a/devextreme/dx.phonejs.d.ts b/devextreme/14.1/dx.phonejs-14.1.d.ts similarity index 99% rename from devextreme/dx.phonejs.d.ts rename to devextreme/14.1/dx.phonejs-14.1.d.ts index c432f239d3..54c2e19b72 100644 --- a/devextreme/dx.phonejs.d.ts +++ b/devextreme/14.1/dx.phonejs-14.1.d.ts @@ -1,9 +1,9 @@ -// Type definitions for PhoneJS +// Type definitions for PhoneJS 14.1.+ // Project: http://js.devexpress.com/MobileDevelopment/ // Definitions by: DevExpress Inc. // Definitions: https://github.com/borisyankov/DefinitelyTyped -/// +/// declare module DevExpress { export function abstract(): void; diff --git a/devextreme/dx.webappjs-tests.ts b/devextreme/14.1/dx.webappjs-14.1-tests.ts similarity index 98% rename from devextreme/dx.webappjs-tests.ts rename to devextreme/14.1/dx.webappjs-14.1-tests.ts index 14b249e351..63b203ed10 100644 --- a/devextreme/dx.webappjs-tests.ts +++ b/devextreme/14.1/dx.webappjs-14.1-tests.ts @@ -1,4 +1,4 @@ -/// +/// module Test { $('
').appendTo(document.body) diff --git a/devextreme/dx.webappjs.d.ts b/devextreme/14.1/dx.webappjs-14.1.d.ts similarity index 99% rename from devextreme/dx.webappjs.d.ts rename to devextreme/14.1/dx.webappjs-14.1.d.ts index fd236e5e4d..908b816f96 100644 --- a/devextreme/dx.webappjs.d.ts +++ b/devextreme/14.1/dx.webappjs-14.1.d.ts @@ -1,9 +1,9 @@ -// Type definitions for WebAppJS +// Type definitions for WebAppJS 14.1.+ // Project: http://js.devexpress.com/WebDevelopment/ // Definitions by: DevExpress Inc. // Definitions: https://github.com/borisyankov/DefinitelyTyped -/// +/// declare module DevExpress { export function abstract(): void; diff --git a/devextreme/README.md b/devextreme/README.md new file mode 100644 index 0000000000..0a2c4ecabf --- /dev/null +++ b/devextreme/README.md @@ -0,0 +1,9 @@ +# DevExtreme TypeScript definitions # + +You can use DevExtreme TypeScript definitions to add DevExtreme widgets ([UI widgets](http://js.devexpress.com/Documentation/ApiReference/UI_Widgets) and [Data Visualization widgets](http://js.devexpress.com/Documentation/ApiReference/Data_Visualization_Widgets)) to your TypeScript apps, as well as build [DevExtreme single-page applications](http://js.devexpress.com/Documentation/Howto/SPA_Framework/Application_Design) using TypeScript. To do that, simply add at the top of your code. + +The API enclosed into the DevExtreme TypeScript definition file fully corresponds to the API described in the DevExtreme JavaScript [Reference](http://js.devexpress.com/Documentation/ApiReference) documentation. + +To build applications based on the DevExtreme SPA framework in Visual Studio, use TypeScript [application templates](http://js.devexpress.com/Documentation/Howto/VS_Integration/Project_Templates) integrated into Visual Studio. + +If you have any issues while using the DevExtreme TypeScript definitions, please refer to our [Support Center](https://www.devexpress.com/Support/Center/Question/List/1). diff --git a/devextreme/dx.devextreme-tests.ts b/devextreme/dx.devextreme-tests.ts new file mode 100644 index 0000000000..ef147c2c6e --- /dev/null +++ b/devextreme/dx.devextreme-tests.ts @@ -0,0 +1,335 @@ +/// + +module Tests.ui { + var dataGridOptions: DevExpress.ui.dxDataGridOptions = { + activeStateEnabled: true, + allowColumnReordering: true, + allowColumnResizing: true, + onCellClick: function () { }, + cellHintEnabled: true, + columnAutoWidth: true, + columnChooser: { + emptyPanelText: "Nothing is here", + enabled: true, + height: 400, + width: 200, + title: "Column chooser" + }, + columns: [ + { + text: '5 columns with custom css class', value: [ + { dataField: 'Processed', dataType: 'boolean', allowSorting: false }, + { dataField: 'CustomerID', cssClass: 'customCssClass' }, + 'OrderDate', + { dataField: 'Freight', validationRules: [{ type: "range", min: 1, max: 100 }] }, + { dataField: 'ShipName', validationRules: [{ type: 'required' }] }, + 'ShipCity'] + }, + { + text: 'with show editor always', value: [ + { dataField: 'Processed', dataType: 'boolean', allowSorting: false, showEditorAlways: true }, + { dataField: 'OrderDate', dataType: 'date', showEditorAlways: true }, + { dataField: 'CustomerID', showEditorAlways: true }, + { dataField: 'Freight', showEditorAlways: true }, + { dataField: 'ShipName', showEditorAlways: true }] + }, + { + text: 'custom template/edit/header template', value: [ + 'CustomerID', + 'OrderDate', + 'Freight', + { + dataField: 'ShipVia', + editCellTemplate: function (container: JQuery, options: { value: number }) { + container.addClass('dx-editor-cell'); + container.append($('
').dxSelectBox({ + value: options.value, + dataSource: [ + { ShipperID: 1, CompanyName: 'Speedy Express' }, + { ShipperID: 2, CompanyName: 'United Package' }, + { ShipperID: 3, CompanyName: 'Federal Shipping' } + ], + valueExpr: 'ShipperID', + displayExpr: 'CompanyName' + })); + }, + cellTemplate: function (container: JQuery, options: { value: number }) { + container.text(String(options.value)); + }, + headerCellTemplate: function (container: JQuery, options: { headerCaption: string }) { + container.append($('
').css({ border: '1px solid red' }).text(options.headerCaption)); + } + }, + 'ShipName', + 'ShipCity'] + }, + { text: 'none', value: '' }, + { + text: 'custom template/header hogan template', value: [ + 'CustomerID', + 'OrderDate', + 'Freight', + { + dataField: 'ShipVia', + cellTemplate: '#hoganColumnTemplate', + headerCellTemplate: $('#hoganHeaderColumnTemplate') + }, + 'ShipName', + 'ShipCity'] + }], + customizeColumns: function (columns) { + var i: number; + for (i = 0; i < columns.length; i++) { + if (columns[i].dataField.indexOf('Date') > 0) { + columns[i].dataType = 'date'; + } + + if (columns[i].dataField === 'Freight') { + columns[i].dataType = 'number'; + } + + if (columns[i].dataField === 'CustomerID') { + columns[i].lookup = { + dataSource: { store: [], sort: 'ContactName' }, + valueExpr: 'CustomerID', + displayExpr: 'ContactName' + } + } + if (columns[i].dataField === 'EmployeeID') { + columns[i].lookup = { + dataSource: { store: [], sort: 'LastName' }, + valueExpr: 'EmployeeID', + displayExpr: function (data: any) { + return data.LastName + ' ' + data.FirstName; + } + } + } + if (columns[i].dataField === 'ShipVia') { + columns[i].lookup = { + dataSource: [ + { ShipperID: 1, CompanyName: 'Speedy Express' }, + { ShipperID: 2, CompanyName: 'United Package' }, + { ShipperID: 3, CompanyName: 'Federal Shipping' } + ], + valueExpr: 'ShipperID', + displayExpr: 'CompanyName' + } + } + if (columns[i].dataField === 'ShipCity') { + columns[i].editCellTemplate = function (container: JQuery, options: { value: string; setValue: Function }) { + $('
').dxAutocomplete({ + items: ["Bern", "Lyon", "Lander"], + value: options.value, + onValueChange: function (e:{ value: string }) { + options.setValue(e.value); + } + }).appendTo(container); + } + } + } + }, + summary: { + totalItems: [{ + column: 'CustomerID', + summaryType: 'count' + }, { + column: 'Freight', + summaryType: 'min', + valueFormat: "percent", + showInColumn: "CustomerID" + }, + { + column: 'OrderDate', + summaryType: 'min', + valueFormat: "shortDate" + }, + { + column: 'Freight', + summaryType: 'avg', + valueFormat: "fixedPoint", + precision: 2 + }], + groupItems: [{ + column: 'CustomerID', + summaryType: 'count', + showInGroupFooter: true + }, { + column: 'Freight', + summaryType: 'min' + }, { + column: 'Freight', + summaryType: 'max' + }, + { + column: 'ShipName', + summaryType: 'count', + showInGroupFooter: true + }, + { + column: 'OrderDate', + summaryType: 'min', + valueFormat: "shortDate", + showInColumn: "CustomerID", + showInGroupFooter: true + }] + }, + sortByGroupSummaryInfo: [{ summaryItem: 'count' }], + groupPanel: { + visible: true + }, + filterRow: { + visible: true + }, + pager: { + visible: true, + showInfo: true, + showNavigationButtons: true, + showPageSizeSelector: true + }, + stateStoring: { + enabled: false + }, + rowAlternationEnabled: true, + editing: { + editMode: 'batch', + insertEnabled: true, + editEnabled: true, + removeEnabled: true + }, + searchPanel: { + visible: true + }, + sorting: { + mode: 'multiple' + } + }; + + new DevExpress.ui.dxDataGrid($("#data-grid"), dataGridOptions); + new DevExpress.ui.dxDataGrid($("#data-grid").get(0), dataGridOptions); + $("#data-grid").dxDataGrid(dataGridOptions); +} + +module Tests.viz { + var chartOptions: DevExpress.viz.charts.dxChartOptions = { + dataSource: [ + { arg: "Illinois", s1: 100, s2: 50, s3: 75, s4: 25, s5: 50, s6: 100, s7: 25, s8: 75 }, + { arg: "Indiana", s1: 100, s2: 50, s3: 75, s4: 25, s5: 50, s6: 100, s7: 25, s8: 75 }, + { arg: "Michigan", s1: 100, s2: 50, s3: 75, s4: 25, s5: 50, s6: 100, s7: 25, s8: 75 } + ], + valueAxis: [{ title: 'Value Axis Title' }], + argumentAxis: { title: 'Argument Axis Title', grid: { visible: true } }, + legend: { border: { visible: true } }, + tooltip: { enabled: true }, + commonPaneSettings: { border: { visible: true } }, + commonSeriesSettings: { + type: 'bar', + hoverMode: 'allArgumentPoints', + selectionMode: 'allArgumentPoints', + label: { + visible: true, + format: 'fixedPoint', + precision: 2 + } + }, + series: [ + { valueField: 's1' }, + { valueField: 's2' }, + { valueField: 's3' }, + { valueField: 's4' }, + { valueField: 's5' }, + { valueField: 's6' }, + { valueField: 's7' }, + { valueField: 's8' } + ], + title: 'Long Chart\'s Title', + onPointClick: function (arg: any) { + arg.target.isSelected() ? arg.target.clearSelection() : arg.target.select(); + }, + onSeriesClick: function (arg: any) { + arg.target.isVisible() ? arg.target.hide() : arg.target.show(); + } + }; + + var pieChartOptions: DevExpress.viz.charts.dxPieChartOptions = { + dataSource: [{ arg: "Index1", arg1: 1, val: 100 }, + { arg: "Index2", arg1: 2, val: 50 }, + { arg: "Index3", arg1: 3, val: 75 }, + { arg: "Index4", arg1: 4, val: 25 }, + { arg: "Index5", arg1: 5, val: 50 }, + { arg: "Index6", arg1: 6, val: 100 }, + { arg: "Index7", arg1: 7, val: 25 }, + { arg: "Index8", arg1: 8, val: 75 }], + tooltip: { + enabled: true + }, + series: [{ + type: 'doughnut', + label: { + visible: true, + format: 'fixedPoint', + precision: 2 + } + }], + title: 'Long PieChart\'s Title' + }; + + new DevExpress.viz.charts.dxChart($("chart"), chartOptions); + new DevExpress.viz.charts.dxChart($("#chart").get(0), chartOptions); + $("#chart").dxChart(chartOptions); + + new DevExpress.viz.charts.dxPieChart($("#pie-chart"), pieChartOptions); + new DevExpress.viz.charts.dxPieChart($("#pie-chart").get(0), pieChartOptions); + $("#pie-chart").dxPieChart(pieChartOptions); +} + +module Tests.framework { + var app = new DevExpress.framework.html.HtmlApplication({ + namespace: "Application", + navigation: [ + { + title: "Home", + action: "#home", + icon: "home" + }, + { + title: "About", + action: "#about", + icon: "info" + } + ] + }); + + app.router.register(":view/:id", { view: "home", id: undefined }); + app.navigate(); +} + +module Tests.data { + new DevExpress.data.DataSource({ + sort: ["value", true], + group: ["id", false], + select: ["value"], + filter: ["value", "startswith", "first"], + + pageSize: 25, + paginate: true, + + map: function (item) { return item; }, + postProcess: function (data) { return data; }, + searchExpr: "expr", + searchOperation: "contains", + searchValue: "somevalue", + store: [1, 2, 3] + }); + + new DevExpress.data.ArrayStore(); + new DevExpress.data.ArrayStore({ + data: [{ id: 1, value: "First one" }, { id: 2, value: "Second one" }], + key: "id" + }); + + new DevExpress.data.CustomStore({ + load: function () { + return $.Deferred().promise(); + } + }); +} \ No newline at end of file diff --git a/devextreme/dx.devextreme.d.ts b/devextreme/dx.devextreme.d.ts new file mode 100644 index 0000000000..36e3bb6159 --- /dev/null +++ b/devextreme/dx.devextreme.d.ts @@ -0,0 +1,5670 @@ +// Type definitions for DevExtreme 14.2+ +// Project: http://js.devexpress.com/ +// Definitions by: DevExpress Inc. +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module DevExpress { + /** A mixin that provides a capability to fire and subscribe to events. */ + export interface EventsMixin { + /** Subscribes to a specified event. */ + on(eventName: string, eventHandler: Function): T; + /** Subscribes to the specified events. */ + on(events: { [eventName: string]: Function; }): T; + /** Detaches all event handlers from the specified event. */ + off(eventName: string): Object; + /** Detaches a particular event handler from the specified event. */ + off(eventName: string, eventHandler: Function): T; + } + /** An object that serves as a namespace for the methods required to perform validation. */ + export module validationEngine { + export interface IValidator { + validate(): ValidatorValidationResult; + } + export interface ValidatorValidationResult { + isValid: boolean; + name?: string; + value: any; + brokenRule: any; + validationRules: any[]; + } + export interface ValidationGroupValidationResult { + isValid: boolean; + brokenRules: any[]; + validators: IValidator[]; + } + export interface GroupConfig extends EventsMixin { + group: any; + validators: IValidator[]; + validate(): ValidationGroupValidationResult; + } + /** Provides access to the object that represents the specified validation group. */ + export function getGroupConfig(group: any): GroupConfig + /** Provides access to the object that represents the default validation group. */ + export function getGroupConfig(): GroupConfig + /** Validates rules of the validators that belong to the specified validation group. */ + export function validateGroup(group: any): ValidationGroupValidationResult; + /** Validates rules of the validators that belong to the default validation group. */ + export function validateGroup(): ValidationGroupValidationResult; + /** Validates the rules that are defined within the dxValidator objects that are registered for the specified ViewModel. */ + export function validateModel(model: Object): ValidationGroupValidationResult; + /** Registers all the dxValidator objects by which the fields of the specified ViewModel are extended. */ + export function registerModelForValidation(model: Object): void; + } + export var hardwareBackButton: JQueryCallback; + /** Processes the hardware back button click. */ + export function processHardwareBackButton(): void; + /** Specifies whether or not the entire application/site supports right-to-left representation. */ + export var rtlEnabled: boolean; + /** Registers a new component in the DevExpress.ui namespace, and a jQuery plugin and Knockout binding for the required component. */ + export function registerComponent(name: string, componentClass: Object): void; + /** Registers a new component in the specified namespace as a jQuery plugin, Angular directive and Knockout binding. */ + export function registerComponent(name: string, namespace: Object, componentClass: Object): void; + /** Requests that the browser call a specified function to update animation before the next repaint. */ + export function requestAnimationFrame(callback: Function): number; + /** Cancels an animation frame request scheduled with the requestAnimationFrame method. */ + export function cancelAnimationFrame(requestID: number): void; + /** Custom Knockout binding that links an HTML element with a specific action. */ + export class Action { } + /** Used to get URLs that vary in a locally running application and the application running on production. */ + export class EndpointSelector { + constructor(options: { + [key: string]: { + local?: string; + production?: string; + } + }); + /** Returns a local or a productional URL depending on how the application is currently running. */ + urlFor(key: string): string; + } + /** An object that serves as a namespace for the methods that are used to animate UI elements. */ + export module fx { + /** The animation object specifies the widget animation options. */ + export interface AnimationOptions { + /** A function called after animation is completed. */ + complete?: (element: JQuery, config: AnimationOptions) => void; + /** A number specifying wait time before animation execution. */ + delay?: number; + /** A number specifying the time in milliseconds spent on animation. */ + duration?: number; + /** A string specifying the type of an easing function used for animation. */ + easing?: string; + /** Specifies the initial widget animation state. */ + from?: any; + /** A function called before animation is started. */ + start?: (element: JQuery, config: AnimationOptions) => void; + /** Specifies the initial widget animation state. */ + to?: any; + /** A string value specifying the animation type. */ + type?: string; + /** Specifies the animation direction for the "slideIn" and "slideOut" animation types. */ + direction?: string; + } + /** Animates the specified element. */ + export function animate(element: HTMLElement, config: Object): Object; + /** Returns a value indicating whether the specified element is being animated. */ + export function isAnimating(element: HTMLElement): boolean; + /** Stops the animation. */ + export function stop(element: HTMLElement, jumpToEnd: boolean): void; + } + /** An object that serves as a namespace for the methods and events specifying information on the current device. */ + export module devices { + /** The device object defines the device on which the application is running. */ + export interface Device { + /** Indicates whether or not the device platform is Android. */ + android?: boolean; + /** Specifies the type of the device on which the application is running. */ + deviceType?: string; + /** Indicates whether or not the device platform is generic, which means that the application will look and behave according to a generic "light" or "dark" theme. */ + generic?: boolean; + /** Indicates whether or not the device platform is iOS. */ + ios?: boolean; + /** Indicates whether or not the device type is 'phone'. */ + phone?: boolean; + /** Specifies the platform of the device on which the application is running. */ + platform?: string; + /** Indicates whether or not the device type is 'tablet'. */ + tablet?: boolean; + /** Indicates whether or not the device platform is Tizen. */ + tizen?: boolean; + /** Specifies an array with the major and minor versions of the device platform. */ + version?: Array; + /** Indicates whether or not the device platform is Windows8. */ + win8?: boolean; + } + export var orientationChanged: JQueryCallback; + /** Overrides actual device information to force the application to operate as if it was running on the specified device. */ + export function current(deviceName: any): void; + /** Returns information about the current device. */ + export function current(): Device; + /** Returns the current device orientation. */ + export function orientation(): string; + /** Returns real information about the current device regardless of the value passed to the devices.current(deviceName) method. */ + export function real(): Device; + } + /** The position object specifies the widget positioning options. */ + export interface PositionOptions { + /** The target element position that the widget is positioned against. */ + at?: string; + /** The element within which the widget is positioned. */ + boundary?: Element; + /** A string value holding horizontal and vertical offset from the window's boundaries. */ + boundaryOffset?: string; + /** Specifies how to move the widget if it overflows the screen. */ + collision?: any; + /** The position of the widget to align against the target element. */ + my?: string; + /** The target element that the widget is positioned against. */ + of?: HTMLElement; + /** A string value holding horizontal and vertical offset in pixels, separated by a space (e.g., "5 -10"). */ + offset?: string; + } + export interface ComponentOptions { + /** A handler for the optionChanged event. */ + onOptionChanged?: Function; + /** A handler for the disposing event. */ + onDisposing?: Function; + } + /** A base class for all components and widgets. */ + export class Component { + constructor(options?: ComponentOptions) + /** Prevents the component from refreshing until the endUpdate method is called. */ + beginUpdate(): void; + /** Enables the component to refresh after the beginUpdate method call. */ + endUpdate(): void; + /** Returns an instance of this component class. */ + instance(): Component; + /** Sets one or more options of this component. */ + option(options: Object): void; + /** Returns the configuration options of this component. */ + option(): Object; + /** Gets the value of the specified configuration option of this component. */ + option(optionName: string): any; + /** Sets a value to the specified configuration option of this component. */ + option(optionName: string, optionValue: any): void; + } + export interface DOMComponentOptions extends ComponentOptions { + /** Specifies whether or not the current component supports a right-to-left representation. */ + rtlEnabled?: boolean; + } + /** A base class for all components. */ + export class DOMComponent extends Component { + constructor(element: JQuery, options?: DOMComponentOptions); + constructor(element: HTMLElement, options?: DOMComponentOptions); + /** Returns the root HTML element of the widget. */ + element(): JQuery; + /** Specifies the device-dependent default configuration options for this component. */ + static defaultOptions(rule: { + device?: any; + options?: any; + }): void; + } + export module data { + export interface ODataError extends Error { + httpStatus?: number; + errorDetails?: any; + } + export interface StoreOptions { + inserted?: (values: Object, key: any) => void; + inserting?: (values: Object) => void; + loaded?: (result: Array) => void; + loading?: (loadOptions: LoadOptions) => void; + modified?: () => void; + modifying?: () => void; + removed?: (key: any) => void; + removing?: (key: any) => void; + updated?: (key: any, values: Object) => void; + updating?: (key: any, values: Object) => void; + /** A handler for the modified event. */ + onModified?: () => void; + /** A handler for the modifying event. */ + onModifying?: () => void; + /** A handler for the removed event. */ + onRemoved?: (key: any) => void; + /** A handler for the removing event. */ + onRemoving?: (key: any) => void; + /** A handler for the updated event. */ + onUpdated?: (key: any, values: Object) => void; + /** A handler for the updating event. */ + onUpdating?: (key: any, values: Object) => void; + /** A handler for the loaded event. */ + onLoaded?: (result: Array) => void; + /** A handler for the loading event. */ + onLoading?: (loadOptions: LoadOptions) => void; + /** A handler for the inserted event. */ + onInserted?: (values: Object, key: any) => void; + /** A handler for the inserting event. */ + onInserting?: (values: Object) => void; + /** Specifies the function called when the Store causes an error. */ + errorHandler?: (e: Error) => void; + /** Specifies the key properties within the data associated with the Store. */ + key?: any; + } + export interface LoadOptions { + filter?: Object; + sort?: Object; + select?: Object; + group?: Object; + skip?: number; + take?: number; + userData?: Object; + requireTotalCount?: boolean; + } + /** The base class for all Stores. */ + export class Store implements EventsMixin { + inserted: JQueryCallback; + inserting: JQueryCallback; + loaded: JQueryCallback; + loading: JQueryCallback; + modified: JQueryCallback; + modifying: JQueryCallback; + removed: JQueryCallback; + removing: JQueryCallback; + updated: JQueryCallback; + updating: JQueryCallback; + constructor(options?: StoreOptions); + /** Returns the data item specified by the key. */ + byKey(key: any, extraOptions?: Object): JQueryPromise; + /** Adds an item to the data associated with this Store. */ + insert(values: Object): JQueryPromise; + /** Returns the key expression specified via the key configuration option. */ + key(): any; + /** Returns the key of the Store item that matches the specified object. */ + keyOf(obj: Object): any; + /** Starts loading the data. */ + load(obj?: LoadOptions): JQueryPromise; + /** Removes the data item specified by the key. */ + remove(key: any): JQueryPromise; + /** Obtains the total count of items that will be returned by the load() function. */ + totalCount(obj?: { + filter?: Object; + select?: Object; + group?: Object; + sort?: Object; + }): JQueryPromise; + /** Updates the data item specified by the key. */ + update(key: any, values: Object): JQueryPromise; + on(eventName: "removing", eventHandler: (key: any) => void): Store; + on(eventName: "removed", eventHandler: (key: any) => void): Store; + on(eventName: "updating", eventHandler: (key: any, values: Object) => void): Store; + on(eventName: "updated", eventHandler: (key: any, values: Object) => void): Store; + on(eventName: "inserting", eventHandler: (values: Object) => void): Store; + on(eventName: "inserted", eventHandler: (values: Object, key: any) => void): Store; + on(eventName: "modifying", eventHandler: () => void): Store; + on(eventName: "modified", eventHandler: () => void): Store; + on(eventName: "loading", eventHandler: (loadOptions: LoadOptions) => void): Store; + on(eventName: "loaded", eventHandler: (result: Array) => void): Store; + on(eventName: string, eventHandler: Function): Store; + on(events: { [eventName: string]: Function; }): Store; + off(eventName: "removing"): Store; + off(eventName: "removed"): Store; + off(eventName: "updating"): Store; + off(eventName: "updated"): Store; + off(eventName: "inserting"): Store; + off(eventName: "inserted"): Store; + off(eventName: "modifying"): Store; + off(eventName: "modified"): Store; + off(eventName: "loading"): Store; + off(eventName: "loaded"): Store; + off(eventName: string): Store; + off(eventName: "removing", eventHandler: (key: any) => void): Store; + off(eventName: "removed", eventHandler: (key: any) => void): Store; + off(eventName: "updating", eventHandler: (key: any, values: Object) => void): Store; + off(eventName: "updated", eventHandler: (key: any, values: Object) => void): Store; + off(eventName: "inserting", eventHandler: (values: Object) => void): Store; + off(eventName: "inserted", eventHandler: (values: Object, key: any) => void): Store; + off(eventName: "modifying", eventHandler: () => void): Store; + off(eventName: "modified", eventHandler: () => void): Store; + off(eventName: "loading", eventHandler: (loadOptions: LoadOptions) => void): Store; + off(eventName: "loaded", eventHandler: (result: Array) => void): Store; + off(eventName: string, eventHandler: Function): Store; + } + export interface ArrayStoreOptions extends StoreOptions { + /** Specifies the array associated with this Store. */ + data?: Array; + } + /** A Store accessing an in-memory array. */ + export class ArrayStore extends Store { + constructor(options?: ArrayStoreOptions); + /** Clears all data associated with the current ArrayStore. */ + clear(): void; + /** Creates the Query object for the underlying array. */ + createQuery(): Query; + } + interface Promise { + then(doneFn?: Function, failFn?: Function, progressFn?: Function): Promise; + } + export interface CustomStoreOptions extends StoreOptions { + /** The user implementation of the byKey(key, extraOptions) method. */ + byKey?: (key: any) => Promise; + /** + * User implementation of the byKey(key, extraOptions) method. + * @deprecated Use "byKey" instead + */ + lookup?: (key: any) => Promise; + /** The user implementation of the insert(values) method. */ + insert?: (values: Object) => Promise; + /** The user implementation of the load(options) method. */ + load?: (options?: LoadOptions) => Promise; + /** The user implementation of the remove(key) method. */ + remove?: (key: any) => Promise; + /** The user implementation of the totalCount(options) method. */ + totalCount?: () => Promise; + /** The user implementation of the update(key, values) method. */ + update?: (key: any, values: Object) => Promise; + } + /** A Store object that enables you to implement your own data access logic. */ + export class CustomStore extends Store { + constructor(options: CustomStoreOptions); + } + export interface DataSourceOptions { + /** Specifies data filtering conditions. */ + filter?: Object; + /** Specifies data grouping conditions. */ + group?: Object; + /** The item mapping function. */ + map?: (record: any) => any; + /** Specifies the maximum number of items the page can contain. */ + pageSize?: number; + /** Specifies whether a DataSource loads data by pages, or all items at once. */ + paginate?: boolean; + /** The data post processing function. */ + postProcess?: (data: any[]) => any[]; + /** Specifies a value by which the required items are searched. */ + searchExpr?: Object; + /** Specifies the comparison operation used to search for the required items. */ + searchOperation?: string; + /** Specifies the value to which the search expression is compared. */ + searchValue?: Object; + /** Specifies the initial select option value. */ + select?: Object; + /** Specifies the initial sort option value. */ + sort?: Object; + /** Specifies the underlying Store instance used to access data. */ + store?: any; + /** A handler for the changed event. */ + onChanged?: () => void; + /** A handler for the loadingChanged event. */ + onLoadingChanged?: (isLoading: boolean) => void; + /** A handler for the loadError event. */ + onLoadError?: (e?: Error) => void; + } + /** An object that provides access to a data web service or local data storage for collection container widgets. */ + export class DataSource implements EventsMixin { + constructor(options?: DataSourceOptions); + changed: JQueryCallback; + loadError: JQueryCallback; + loadingChanged: JQueryCallback; + /** Disposes all resources associated with this DataSource. */ + dispose(): void; + /** Returns the current filter option value. */ + filter(): Object; + /** Sets the filter option value. */ + filter(filterExpr: Object): void; + /** Returns the current group option value. */ + group(): Object; + /** Sets the group option value. */ + group(groupExpr: Object): void; + /** Indicates whether or not the current page contains fewer items than the number of items specified by the pageSize configuration option. */ + isLastPage(): boolean; + /** Indicates whether or not at least one load() method execution has successfully finished. */ + isLoaded(): boolean; + /** Indicates whether or not the DataSource is currently being loaded. */ + isLoading(): boolean; + /** Returns the array of items currently operated by the DataSource. */ + items(): Array; + /** Returns the key expression. */ + key(): any; + /** Starts loading data. */ + load(): JQueryPromise>; + /** Returns an object that would be passed to the load() method of the underlying Store according to the current data shaping option values of the current DataSource instance. */ + loadOptions(): Object; + /** Returns the current pageSize option value. */ + pageSize(): number; + /** Sets the pageSize option value. */ + pageSize(value: number): void; + /** Specifies the index of the currently loaded page. */ + pageIndex(): number; + /** Specifies the index of the page to be loaded during the next load() method execution. */ + pageIndex(newIndex: number): void; + /** Returns the current paginate option value. */ + paginate(): boolean; + /** Sets the paginate option value. */ + paginate(value: boolean): void; + /** Returns the searchExpr option value. */ + searchExpr(): Object; + /** Sets the searchExpr option value. */ + searchExpr(expr: Object): void; + /** Returns the currently specified search operation. */ + searchOperation(): string; + /** Sets the current search operation. */ + searchOperation(op: string): void; + /** Returns the searchValue option value. */ + searchValue(): Object; + /** Sets the searchValue option value. */ + searchValue(value: Object): void; + /** Returns the current select option value. */ + select(): Object; + /** Sets the select option value. */ + select(expr: Object): void; + /** Returns the current sort option value. */ + sort(): Object; + /** Sets the sort option value. */ + sort(sortExpr: Object): void; + /** Returns the underlying Store instance. */ + store(): Store; + /** Returns the number of data items available in an underlying Store after the last load() operation without paging. */ + totalCount(): number; + on(eventName: "loadingChanged", eventHandler: (isLoading: boolean) => void): DataSource; + on(eventName: "loadError", eventHandler: (e?: Error) => void): DataSource; + on(eventName: "changed", eventHandler: () => void): DataSource; + on(eventName: string, eventHandler: Function): DataSource; + on(events: { [eventName: string]: Function; }): DataSource; + off(eventName: "loadingChanged"): DataSource; + off(eventName: "loadError"): DataSource; + off(eventName: "changed"): DataSource; + off(eventName: string): DataSource; + off(eventName: "loadingChanged", eventHandler: (isLoading: boolean) => void): DataSource; + off(eventName: "loadError", eventHandler: (e?: Error) => void): DataSource; + off(eventName: "changed", eventHandler: () => void): DataSource; + off(eventName: string, eventHandler: Function): DataSource; + } + /** An object used to work with primitive data types not supported by JavaScript when accessing an OData web service. */ + export class EdmLiteral { + /** Returns a string representation of the value associated with this EdmLiteral object. */ + valueOf(): string; + } + /** An object used to generate and hold the GUID. */ + export class Guid { + /** Creates a new Guid instance that holds the specified GUID. */ + constructor(value: string); + /** Creates a new Guid instance holding the generated GUID. */ + constructor(); + /** Returns a string representation of the Guid instance. */ + toString(): string; + /** Returns a string representation of the Guid instance. */ + valueOf(): string; + } + export interface LocalStoreOptions extends ArrayStoreOptions { + /** Specifies the time (in miliseconds) after the change operation, before the data is flushed. */ + flushInterval?: number; + /** Specifies whether the data is flushed immediatelly after each change operation, or after the delay specified via the flushInterval option. */ + immediate?: boolean; + /** The unique identifier used to distinguish the data within the HTML5 Web Storage. */ + name?: string; + } + /** A Store providing access to the HTML5 Web Storage. */ + export class LocalStore extends ArrayStore { + constructor(options?: LocalStoreOptions); + /** Removes all data associated with this Store. */ + clear(): void; + } + export interface ODataContextOptions extends ODataStoreOptions { + /** Specifies the list of entities to be accessed via the ODataContext. */ + entities?: Object; + /** Specifies the function called if the ODataContext causes an error. */ + errorHandler?: (e: Error) => void; + } + /** Provides access to the entire OData service. */ + export class ODataContext { + constructor(options?: ODataContextOptions); + /** Initiates the specified WebGet service operation that returns a value. For the information on service operations, refer to the OData documentation. */ + get(operationName: string, params: Object): JQueryPromise; + /** Initiates the specified WebGet service operation that returns nothing. For the information on service operations, refer to the OData documentation. */ + invoke(operationName: string, params: Object, httpMethod: Object): JQueryPromise; + /** Return a special proxy object to describe the entity link. */ + objectLink(entityAlias: string, key: any): Object; + } + export interface ODataStoreOptions extends StoreOptions { + /** A function used to customize a web request before it is sent. */ + beforeSend?: (request: Object) => void; + /** Specifies whether the ODataStore uses the JSONP approach to access non-CORS-compatible remote services. */ + jsonp?: boolean; + /** Specifies the type of the ODataStore key property. The following key types are supported out of the box: String, Int32, Int64, and Guid. */ + keyType?: any; + /** Specifies the URL of the data service being accessed via the current ODataContext. */ + url?: string; + /** Specifies the version of the OData protocol used to interact with the data service. */ + version?: number; + /** Specifies the value of the withCredentials field of the underlying jqXHR object. */ + withCredentials?: boolean; + } + /** A Store providing access to a separate OData web service entity. */ + export class ODataStore extends Store { + constructor(options?: ODataStoreOptions); + /** Creates the Query object for the OData endpoint. */ + createQuery(loadOptions: Object): Object; + } + /** An universal chainable data query interface object. */ + export interface Query { + /** Calculates a custom summary for the items in the current Query. */ + aggregate(step: (accumulator: any, value: any) => any): JQueryPromise; + /** Calculates a custom summary for the items in the current Query. */ + aggregate(seed: any, step: (accumulator: any, value: any) => any, finalize: (result: any) => any): JQueryPromise; + /** Calculates the average item value for the current Query. */ + avg(getter: Object): JQueryPromise; + /** Finds the item with the maximum getter value. */ + max(getter: Object): JQueryPromise; + /** Finds the item with the maximum value in the Query. */ + max(): JQueryPromise; + /** Finds the item with the minimum value in the Query. */ + min(): JQueryPromise; + /** Finds the item with the minimum getter value. */ + min(getter: Object): JQueryPromise; + /** Calculates the average item value for the current Query, if each Query item has a numeric type. */ + avg(): JQueryPromise; + /** Returns the total count of items in the current Query. */ + count(): JQueryPromise; + /** Executes the Query. */ + enumerate(): JQueryPromise; + /** Filters the current Query data. */ + filter(criteria: Array): Query; + /** Groups the current Query data. */ + groupBy(getter: Object): Query; + /** Applies the specified transformation to each item. */ + select(getter: Object): Query; + /** Limits the data item count. */ + slice(skip: number, take?: number): Query; + /** Sorts current Query data. */ + sortBy(getter: Object, desc: boolean): Query; + /** Sorts current Query data. */ + sortBy(getter: Object): Query; + /** Calculates the sum of item getter values in the current Query. */ + sum(getter: Object): JQueryPromise; + /** Calculates the sum of item values in the current Query. */ + sum(): JQueryPromise; + /** Adds one more sorting condition to the current Query. */ + thenBy(getter: Object): Query; + /** Adds one more sorting condition to the current Query. */ + thenBy(getter: Object, desc: boolean): Query; + /** Returns the array of current Query items. */ + toArray(): Array; + } + /** The global data layer error handler. */ + export var errorHandler: (e: Error) => void; + /** Encodes the specified string or array of bytes to base64 encoding. */ + export function base64_encode(input: any): string; + /** Creates a Query instance. */ + export function query(array: Array): Query; + /** Creates a Query instance for accessing the remote service specified by a URL. */ + export function query(url: string, queryOptions: Object): Query; + /** This section describes the utility objects provided by the DevExtreme data layer. */ + export var utils: { + /** Compiles a getter function from the getter expression. */ + compileGetter(expr: any): Function; + /** Compiles a setter function from the setter expression. */ + compileSetter(expr: any): Function; + odata: { + /** Holds key value converters for OData. */ + keyConverters: { + String(value: any): string; + Int32(value: any): number; + Int64(value: any): EdmLiteral; + Guid(value: any): Guid; + Boolean(value: any): boolean; + Single(value: any): EdmLiteral; + Decimal(value: any): EdmLiteral; + }; + } + } + } + /** An object that serves as a namespace for DevExtreme UI widgets as well as for methods implementing UI logic in DevExtreme sites/applications. */ + export module ui { + /** + * Sets parameters for the viewport meta tag. + * @deprecated Use the "DevExpress.utils.initMobileViewport" option instead. + */ + export function initViewport(options: { allowZoom?: boolean; allowPan?: boolean; allowSelection?: boolean }): void; + export interface WidgetOptions extends DOMComponentOptions { + /** A Boolean value specifying whether or not the widget changes its state when interacting with a user. */ + activeStateEnabled?: boolean; + /** A Boolean value specifying whether or not the widget can respond to user interaction. */ + disabled?: boolean; + /** Specifies the height of the widget. */ + height?: any; + /** A Boolean value specifying whether or not the widget changes its state when being hovered by an end user. */ + hoverStateEnabled?: boolean; + /** Specifies whether or not the widget can be focused. */ + focusStateEnabled?: boolean; + /** A Boolean value specifying whether or not the widget is visible. */ + visible?: boolean; + /** Specifies the width of the widget. */ + width?: any; + /** Specifies the widget tab index. */ + tabIndex?: number; + /** Specifies the text of the hint displayed for the widget. */ + hint?: string; + } + /** The base class for widgets. */ + export class Widget extends DOMComponent { + constructor(options?: WidgetOptions); + /** Redraws the widget. */ + repaint(): void; + /** Sets focus on the widget. */ + focus(): void; + } + export interface CollectionWidgetOptions extends WidgetOptions { + /** A data source used to fetch data to be displayed by the widget. */ + dataSource?: any; + itemClickAction?: any; + itemHoldAction?: Function; + /** The time period in milliseconds before the onItemHold event is raised. */ + itemHoldTimeout?: number; + itemRender?: any; + itemRenderedAction?: Function; + /** An array of items displayed by the widget. */ + items?: Array; + /** + * A function performed when a widget item is selected. + * @deprecated Use the 'onSelectionChanged' option instead + */ + itemSelectAction?: Function; + /** The template to be used for rendering items. */ + itemTemplate?: any; + loopItemFocus?: boolean; + /** The text or HTML markup displayed by the widget if the item collection is empty. */ + noDataText?: string; + onContentReady?: any; + contentReadyAction?: any; + /** A handler for the itemClick event. */ + onItemClick?: any; + /** A handler for the itemContextMenu event. */ + onItemContextMenu?: Function; + /** A handler for the itemHold event. */ + onItemHold?: Function; + /** A handler for the itemRendered event. */ + onItemRendered?: Function; + /** A handler for the selectionChanged event. */ + onSelectionChanged?: Function; + /** The index of the currently selected widget item. */ + selectedIndex?: number; + /** The selected item object. */ + selectedItem?: Object; + /** An array of currently selected item objects. */ + selectedItems?: Array; + /** A handler for the itemDeleting event. */ + onItemDeleting?: Function; + /** A handler for the itemDeleted event. */ + onItemDeleted?: Function; + /** A handler for the itemReordered event. */ + onItemReordered?: Function; + } + /** The base class for widgets containing an item collection. */ + export class CollectionWidget extends Widget { + constructor(element: JQuery, options?: CollectionWidgetOptions); + constructor(element: HTMLElement, options?: CollectionWidgetOptions); + selectItem(itemElement: any): void; + unselectItem(itemElement: any): void; + deleteItem(itemElement: any): JQueryPromise; + isItemSelected(itemElement: any): boolean; + reorderItem(itemElement: any, toItemElement: any): JQueryPromise; + } + export interface DataExpressionMixinOptions { + /** A data source used to fetch data to be displayed by the widget. */ + dataSource?: any; + /** Specifies the name of the data source item field whose value is displayed by the widget. */ + displayExpr?: any; + /** Specifies the name of a data source item field whose value is held in the value configuration option. */ + valueExpr?: any; + itemRender?: any; + /** An array of items displayed by the widget. */ + items?: Array; + /** The template to be used for rendering items. */ + itemTemplate?: any; + /** The currently selected value in the widget. */ + value?: any; + } + export interface EditorOptions extends WidgetOptions { + /** The currently specified value. */ + value?: any; + /** A handler for the valueChanged event. */ + onValueChanged?: Function; + valueChangeAction?: Function; + /** A Boolean value specifying whether or not the widget is read-only. */ + readOnly?: boolean; + /** Holds the object that defines the error that occurred during validation. */ + validationError?: Object; + /** Specifies whether the editor's value is valid. */ + isValid?: boolean; + /** Specifies how the message about the validation rules that are not satisfied by this editor's value is displayed. */ + validationMessageMode?: string; + } + /** A base class for editors. */ + export class Editor extends Widget { } + /** An object that serves as a namespace for methods displaying a message in an application/site. */ + export var dialog: { + /** Creates an alert dialog message containing a single "OK" button. */ + alert(message: string, title: string): JQueryPromise; + /** Creates a confirm dialog that contains "Yes" and "No" buttons. */ + confirm(message: string, title: string): JQueryPromise; + /** Creates a custom dialog using the options specified by the passed configuration object. */ + custom(options: { title?: string; message?: string; buttons?: Array; }): { + show(): JQueryPromise; + hide(): void; + hide(value: any): void; + }; + }; + /** Creates a toast message. */ + export function notify(message: any, type: string, displayTime: number): void; + /** Creates a toast message. */ + export function notify(options: Object): void; + /** An object that serves as a namespace for the methods that work with DevExtreme CSS Themes. */ + export var themes: { + /** Returns the name of the currently applied theme. */ + current(): string; + /** Changes the current theme to the specified one. */ + current(themeName: string): void; + }; + /** Sets a specified template engine. */ + export function setTemplateEngine(name: string): void; + /** Sets a custom template engine defined via custom compile and render functions. */ + export function setTemplateEngine(options: Object): void; + /** An object that serves as a namespace for utility methods that can be helpful when working with the DevExtreme framework and UI widgets. */ + export var utils: { + /** Sets parameters for the viewport meta tag. */ + initMobileViewport(options: { allowZoom?: boolean; allowPan?: boolean; allowSelection?: boolean }): void; + }; + } +} +declare module DevExpress.framework { + /** An object used to store information on the views displayed in an application. */ + export class ViewCache { + viewRemoved: JQueryCallback; + /** Removes all the viewInfo objects from the cache. */ + clear(): void; + /** Obtains a viewInfo object from the cache by the specified key. */ + getView(key: string): Object; + /** Checks whether or not a viewInfo object is contained in the view cache under the specified key. */ + hasView(key: string): boolean; + /** Removes a viewInfo object from the cache by the specified key. */ + removeView(key: string): Object; + /** Adds the specified viewInfo object to the cache under the specified key. */ + setView(key: string, viewInfo: Object): void; + } + export interface dxCommandOptions extends DOMComponentOptions { + action?: any; + /** Specifies an action performed when the execute() method of the command is called. */ + onExecute?: any; + /** Indicates whether or not the widget that displays this command is disabled. */ + disabled?: boolean; + /** Specifies the name of the icon shown inside the widget associated with this command. */ + icon?: string; + /** A URL pointing to the icon shown inside the widget associated with this command. */ + iconSrc?: string; + /** The identifier of the command. */ + id?: string; + /** Specifies the title of the widget associated with this command. */ + title?: string; + /** Specifies the type of the button, if the command is rendered as a dxButton widget. */ + type?: string; + /** A Boolean value specifying whether or not the widget associated with this command is visible. */ + visible?: boolean; + } + /** A markup component used to define markup options for a command. */ + export class dxCommand extends DOMComponent { + constructor(element: JQuery, options: dxCommandOptions); + constructor(options: dxCommandOptions); + /** Executes the action associated with this command. */ + execute(): void; + } + /** An object responsible for routing. */ + export class Router { + /** Adds a routing rule to the list of registered rules. */ + register(pattern: string, defaults?: Object, constraints?: Object): void; + /** Decodes the specified URI to an object using the registered routing rules. */ + parse(uri: string): Object; + /** Formats an object to a URI. */ + format(obj: Object): string; + } + export module html { + export var layoutSets: Array; + export interface HtmlApplicationOptions { + /** Specifies where the commands that are defined in the application's views must be displayed. */ + commandMapping?: Object; + /** + * The name of the default layout used by the application. + * @deprecated Use the "navigationType" option instead. + */ + defaultLayout?: string; + /** Specifies whether or not view caching is disabled. */ + disableViewCache?: boolean; + /** An array of layout controllers that should be used to show application views in the current navigation context. */ + layoutSet?: any; + /** Specifies whether the current application must behave as a mobile or web application. */ + mode?: string; + /** Specifies the object that represents a root namespace of the application. */ + namespace?: Object; + /** Specifies application behavior when the user navigates to a root view. */ + navigateToRootViewMode?: string; + /** An array of dxCommand configuration objects used to define commands available from the application's global navigation. */ + navigation?: Array; + /** + * Specifies a strategy for choosing layouts for views in your application. + * @deprecated Use the "layoutSet" option instead. + */ + navigationType?: string; + /** + * Specifies the object that represents the root namespace of the application. + * @deprecated Use the "namespace" option instead. + */ + ns?: Object; + /** Indicates whether on not to use the title of the previously displayed view as text on the Back button. */ + useViewTitleAsBackText?: boolean; + /** A custom view cache to be used in the application. */ + viewCache?: Object; + /** Specifies a limit for the views that can be cached. */ + viewCacheSize?: number; + /** Specifies options for the viewport meta tag of a mobile browser. */ + viewPort?: JQuery; + /** A custom router to be used in the application. */ + router?: Router; + } + /** An object used to manage views, as well as control the application life cycle. */ + export class HtmlApplication implements EventsMixin { + constructor(options: HtmlApplicationOptions); + afterViewSetup: JQueryCallback; + beforeViewSetup: JQueryCallback; + initialized: JQueryCallback; + navigating: JQueryCallback; + navigatingBack: JQueryCallback; + resolveLayoutController: JQueryCallback; + viewDisposed: JQueryCallback; + viewDisposing: JQueryCallback; + viewHidden: JQueryCallback; + viewRendered: JQueryCallback; + viewShowing: JQueryCallback; + viewShown: JQueryCallback; + /** Provides access to the ViewCache object. */ + viewCache: ViewCache; + /** An array of dxCommand components that are created based on the application's navigation option value. */ + navigation: Array; + /** Provides access to the Router object. */ + router: Router; + /** Navigates to the URI preceding the current one in the navigation history. */ + back(): void; + /** Returns a Boolean value indicating whether or not backwards navigation is currently possible. */ + canBack(): boolean; + /** Removes the application state that has been saved by the saveState() method to the state storage. */ + clearState(): void; + /** Creates global navigation commands. */ + createNavigation(navigationConfig: Array): void; + /** Returns an HTML template of the specified view. */ + getViewTemplate(viewName: string): JQuery; + /** Returns a configuration object used to create a dxView component for a specified view. */ + getViewTemplateInfo(viewName: string): Object; + /** Adds a specified HTML template to a collection of view or layout templates. */ + loadTemplates(source: any): JQueryPromise; + /** Navigates to the specified URI. */ + navigate(uri?: any, options?: Object): void; + /** Renders navigation commands to the navigation command containers that are located in the layouts used in the application. */ + renderNavigation(): void; + /** Restores the application state that has been saved by the saveState() method to the state storage, and applies it to the application. */ + restoreState(): void; + /** Saves the current application state. */ + saveState(): void; + /** Provides access to the object that defines the current context to be considered when choosing an appropriate template for a view. */ + templateContext(): Object; + on(eventName: "initialized", eventHandler: () => void): HtmlApplication; + on(eventName: "afterViewSetup", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + on(eventName: "beforeViewSetup", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + on(eventName: "navigating", eventHandler: (e: { + currentUri: string; + uri: string; + cancel: boolean; + options: { + root: boolean; + target: string; + direction: string; + rootInDetailPane: boolean; + modal: boolean; + }; + }) => void): HtmlApplication; + on(eventName: "navigatingBack", eventHandler: (e: { + cancel: boolean; + isHardwareButton: boolean; + }) => void): HtmlApplication; + on(eventName: "resolveLayoutController", eventHandler: (e: { + viewInfo: Object; + layoutController: Object; + availableLayoutControllers: Array; + }) => void): HtmlApplication; + on(eventName: "viewDisposed", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + on(eventName: "viewDisposing", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + on(eventName: "viewHidden", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + on(eventName: "viewRendered", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + on(eventName: "viewShowing", eventHandler: (e: { + viewInfo: Object; + direction: string; + }) => void): HtmlApplication; + on(eventName: "viewShown", eventHandler: (e: { + viewInfo: Object; + direction: string; + }) => void): HtmlApplication; + on(eventName: string, eventHandler: Function): HtmlApplication; + on(events: { [eventName: string]: Function; }): HtmlApplication; + off(eventName: "initialized"): HtmlApplication; + off(eventName: "afterViewSetup"): HtmlApplication; + off(eventName: "beforeViewSetup"): HtmlApplication; + off(eventName: "navigating"): HtmlApplication; + off(eventName: "navigatingBack"): HtmlApplication; + off(eventName: "resolveLayoutController"): HtmlApplication; + off(eventName: "viewDisposed"): HtmlApplication; + off(eventName: "viewDisposing"): HtmlApplication; + off(eventName: "viewHidden"): HtmlApplication; + off(eventName: "viewRendered"): HtmlApplication; + off(eventName: "viewShowing"): HtmlApplication; + off(eventName: "viewShown"): HtmlApplication; + off(eventName: string): HtmlApplication; + off(eventName: "initialized", eventHandler: () => void): HtmlApplication; + off(eventName: "afterViewSetup", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + off(eventName: "beforeViewSetup", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + off(eventName: "navigating", eventHandler: (e: { + currentUri: string; + uri: string; + cancel: boolean; + options: { + root: boolean; + target: string; + direction: string; + rootInDetailPane: boolean; + modal: boolean; + }; + }) => void): HtmlApplication; + off(eventName: "navigatingBack", eventHandler: (e: { + cancel: boolean; + isHardwareButton: boolean; + }) => void): HtmlApplication; + off(eventName: "resolveLayoutController", eventHandler: (e: { + viewInfo: Object; + layoutController: Object; + availableLayoutControllers: Array; + }) => void): HtmlApplication; + off(eventName: "viewDisposed", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + off(eventName: "viewDisposing", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + off(eventName: "viewHidden", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + off(eventName: "viewRendered", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + off(eventName: "viewShowing", eventHandler: (e: { + viewInfo: Object; + direction: string; + }) => void): HtmlApplication; + off(eventName: "viewShown", eventHandler: (e: { + viewInfo: Object; + direction: string; + }) => void): HtmlApplication; + off(eventName: string, eventHandler: Function): HtmlApplication; + } + } +} +declare module DevExpress.ui { + export interface dxValidatorOptions extends DOMComponentOptions { + /** An array of validation rules to be checked for the editor with which the dxValidator object is associated. */ + validationRules?: Array; + /** Specifies the editor name to be used in the validation default messages. */ + name?: string; + /** An object that specifies what and when to validate and how to apply the validation result. */ + adapter?: Object; + /** Specifies the validation group the editor will be related to. */ + validationGroup?: string; + /** A handler for the validated event. */ + onValidated?: (params: validationEngine.ValidatorValidationResult) => void; + } + /** A widget that is used to validate the associated DevExtreme editors against the defined validation rules. */ + export class dxValidator extends DOMComponent implements validationEngine.IValidator { + constructor(element: JQuery, options?: dxValidatorOptions); + constructor(element: Element, options?: dxValidatorOptions); + /** Validates the value of the editor that is controlled by the current dxValidator object against the list of the specified validation rules. */ + validate(): validationEngine.ValidatorValidationResult; + } + /** The widget that is used in the Knockout and Angular approaches to combine the editors to be validated. */ + export class dxValidationGroup extends DOMComponent { + constructor(element: JQuery); + constructor(element: Element); + /** Validates rules of the validators that belong to the current validation group. */ + validate(): validationEngine.ValidationGroupValidationResult; + } + export interface dxValidationSummaryOptions extends CollectionWidgetOptions { + /** Specifies the validation group for which summary should be generated. */ + validationGroup?: string; + } + /** A widget for displaying the result of checking validation rules for editors. */ + export class dxValidationSummary extends CollectionWidget { + constructor(element: JQuery, options?: dxValidationSummaryOptions); + constructor(element: Element, options?: dxValidationSummaryOptions); + } + export interface dxTooltipOptions extends dxPopoverOptions { + } + /** A tooltip widget. */ + export class dxTooltip extends dxPopover { + constructor(element: JQuery, options?: dxTooltipOptions); + constructor(element: Element, options?: dxTooltipOptions); + } + export interface dxDropDownListOptions extends dxDropDownEditorOptions { + /** Returns the value currently displayed by the widget. */ + displayValue?: string; + /** The minimum number of characters that must be entered into the text box to begin a search. */ + minSearchLength?: number; + /** Specifies the name of a data source item field or an expression whose value is compared to the search criterion. */ + searchExpr?: Object; + /** Specifies the binary operation used to filter data. */ + searchMode?: string; + /** Specifies the time delay, in milliseconds, after the last character has been typed in, before a search is executed. */ + searchTimeout?: number; + /** A handler for the valueChanged event. */ + onValueChanged?: Function; + /** Specifies DOM event names that update a widget's value. */ + valueChangeEvent?: string; + /** Specifies whether or not the widget supports searching. */ + searchEnabled?: boolean; + /** Specifies whether or not the widget displays items by pages. */ + pagingEnabled?: boolean; + } + /** A base class for drop-down list widgets. */ + export class dxDropDownList extends dxDropDownEditor { + constructor(element: JQuery, options?: dxDropDownListOptions); + constructor(element: Element, options?: dxDropDownListOptions); + } + export interface dxToolbarOptions extends CollectionWidgetOptions { + menuItemRender?: any; + /** The template used to render menu items. */ + menuItemTemplate?: any; + /** Informs the widget about its location in a view HTML markup. */ + renderAs?: string; + } + /** A toolbar widget. */ + export class dxToolbar extends CollectionWidget { + constructor(element: JQuery, options?: dxToolbarOptions); + constructor(element: Element, options?: dxToolbarOptions); + } + export interface dxToastOptions extends dxOverlayOptions { + animation?: fx.AnimationOptions; + /** The time span in milliseconds during which the dxToast widget is visible. */ + displayTime?: number; + height?: any; + /** The dxToast message text. */ + message?: string; + position?: PositionOptions; + shading?: boolean; + /** Specifies the dxToast widget type. */ + type?: string; + width?: any; + closeOnBackButton?: boolean; + } + /** The toast message widget. */ + export class dxToast extends dxOverlay { + constructor(element: JQuery, options?: dxToastOptions); + constructor(element: Element, options?: dxToastOptions); + } + export interface dxTextEditorOptions extends EditorOptions { + /** A handler for the change event. */ + onChange?: Function; + changeAction?: Function; + /** A handler for the copy event. */ + onCopy?: Function; + copyAction?: Function; + /** A handler for the cut event. */ + onCut?: Function; + cutAction?: Function; + /** A handler for the enterKey event. */ + onEnterKey?: Function; + enterKeyAction?: Function; + /** A handler for the focusIn event. */ + onFocusIn?: Function; + focusInAction?: Function; + /** A handler for the focusOut event. */ + onFocusOut?: Function; + focusOutAction?: Function; + /** A handler for the input event. */ + onInput?: Function; + inputAction?: Function; + /** A handler for the keyDown event. */ + onKeyDown?: Function; + keyDownAction?: Function; + /** A handler for the keyPress event. */ + onKeyPress?: Function; + keyPressAction?: Function; + /** A handler for the keyUp event. */ + onKeyUp?: Function; + keyUpAction?: Function; + /** A handler for the paste event. */ + onPaste?: Function; + pasteAction?: Function; + /** The text displayed by the widget when the widget value is empty. */ + placeholder?: string; + /** Specifies whether to display the Clear button in the widget. */ + showClearButton?: boolean; + /** Specifies the current value displayed by the widget. */ + value?: any; + valueUpdateAction?: Function; + valueChangeAction?: Function; + /** Specifies DOM event names that update a widget's value. */ + valueChangeEvent?: string; + valueUpdateEvent?: string; + /** Specifies whether or not the widget checks the inner text for spelling mistakes. */ + spellcheck?: boolean; + } + /** A base class for text editing widgets. */ + export class dxTextEditor extends Editor { + constructor(element: JQuery, options?: dxTextEditorOptions); + constructor(element: Element, options?: dxTextEditorOptions); + /** Removes focus from the input element. */ + blur(): void; + /** Sets focus to the input element representing the widget. */ + focus(): void; + } + export interface dxTextBoxOptions extends dxTextEditorOptions { + /** Specifies the maximum number of characters you can enter into the textbox. */ + maxLength?: any; + /** The "mode" attribute value of the actual HTML input element representing the text box. */ + mode?: string; + } + /** A single-line text box widget. */ + export class dxTextBox extends dxTextEditor { + constructor(element: JQuery, options?: dxTextBoxOptions); + constructor(element: Element, options?: dxTextBoxOptions); + } + export interface dxTextAreaOptions extends dxTextBoxOptions { + /** Specifies whether or not the widget checks the inner text for spelling mistakes. */ + spellcheck?: boolean; + } + /** A widget used to display and edit multi-line text. */ + export class dxTextArea extends dxTextBox { + constructor(element: JQuery, options?: dxTextAreaOptions); + constructor(element: Element, options?: dxTextAreaOptions); + } + export interface dxTabsOptions extends CollectionWidgetOptions { + /** Specifies whether or not an end-user can scroll tabs by swiping. */ + scrollByContent?: boolean; + /** Specifies whether or not an end-user can scroll tabs. */ + scrollingEnabled?: boolean; + /** A Boolean value that specifies the availability of navigation buttons. */ + showNavButtons?: boolean; + } + /** A tab strip used to switch between pages. */ + export class dxTabs extends CollectionWidget { + constructor(element: JQuery, options?: dxTabsOptions); + constructor(element: Element, options?: dxTabsOptions); + } + export interface dxTabPanelOptions extends dxMultiViewOptions { + /** A handler for the titleClick event. */ + onTitleClick?: any; + /** A handler for the titleHold event. */ + onTitleHold?: Function; + /** A handler for the titleRendered event. */ + onTitleRendered?: Function; + /** A template to be used for rendering the widget title. */ + titleTemplate?: any; + } + /** A widget used to display a view and to switch between several views by clicking the appropriate tabs. */ + export class dxTabPanel extends dxMultiView { + constructor(element: JQuery, options?: dxTabPanelOptions); + constructor(element: Element, options?: dxTabPanelOptions); + } + export interface dxSelectBoxOptions extends dxDropDownListOptions { + /** The template to be used for rendering the widget text field. */ + fieldTemplate?: any; + /** The text that is provided as a hint in the select box editor. */ + placeholder?: string; + /** Specifies whether or not the widget allows an end-user to enter a custom value. */ + editEnabled?: boolean; + } + /** A widget that allows you to select an item in a dropdown list. */ + export class dxSelectBox extends dxDropDownList { + constructor(element: JQuery, options?: dxSelectBoxOptions); + constructor(element: Element, options?: dxSelectBoxOptions); + /** Closes the drop-down editor. */ + close(): void; + /** Opens the drop-down editor. */ + open(): void; + } + export interface dxTagBoxOptions extends dxSelectBoxOptions { + /** Holds the list of selected values. */ + values?: Array; + /** Holds the last selected value. */ + value?: any; + /** A handler for the valueChanged event. */ + onValueChanged?: (e: { + component: dxTagBox; + element: JQuery; + model: Object; + value: Object; + values: Object; + itemData: Object; + jQueryEvent: JQueryEventObject; + }) => void; + } + /** A widget that allows you to select multiple items from a dropdown list. */ + export class dxTagBox extends dxSelectBox { + constructor(element: JQuery, options?: dxTagBoxOptions); + constructor(element: Element, options?: dxTagBoxOptions); + } + export interface dxScrollViewOptions extends dxScrollableOptions { + /** A handler for the pullDown event. */ + onPullDown?: Function; + pullDownAction?: Function; + /** Specifies the text shown in the pullDown panel when pulling the content down lowers the refresh threshold. */ + pulledDownText?: string; + /** Specifies the text shown in the pullDown panel while pulling the content down to the refresh threshold. */ + pullingDownText?: string; + /** A handler for the reachBottom event. */ + onReachBottom?: Function; + reachBottomAction?: Function; + /** Specifies the text shown in the pullDown panel displayed when content is scrolled to the bottom. */ + reachBottomText?: string; + /** Specifies the text shown in the pullDown panel displayed when the content is being refreshed. */ + refreshingText?: string; + /** Returns a value indicating if the scrollView content is larger then the widget container. */ + isFull(): boolean; + /** Locks the widget until the release(preventScrollBottom) method is called and executes the function passed to the onPullDown option and the handler assigned to the pullDown event. */ + refresh(): void; + /** Notifies the scroll view that data loading is finished. */ + release(preventScrollBottom: boolean): JQueryPromise; + /** Toggles the loading state of the widget. */ + toggleLoading(showOrHide: boolean): void; + } + /** A widget used to display scrollable content. */ + export class dxScrollView extends dxScrollable { + constructor(element: JQuery, options?: dxScrollViewOptions); + constructor(element: Element, options?: dxScrollViewOptions); + } + export interface dxScrollableLocation { + top?: number; + left?: number; + } + export interface dxScrollableOptions extends DOMComponentOptions { + /** A string value specifying the available scrolling directions. */ + direction?: string; + /** A Boolean value specifying whether or not the widget can respond to user interaction. */ + disabled?: boolean; + /** A handler for the scroll event. */ + onScroll?: Function; + scrollAction?: Function; + /** Specifies when the widget shows the scrollbar. */ + showScrollbar?: string; + /** A handler for the update event. */ + onUpdated?: Function; + updateAction?: Function; + /** Indicates whether to use native or simulated scrolling. */ + useNative?: boolean; + } + /** A widget used to display scrollable content. */ + export class dxScrollable extends DOMComponent { + constructor(element: JQuery, options?: dxScrollableOptions); + constructor(element: Element, options?: dxScrollableOptions); + /** Returns the height of the scrollable widget in pixels. */ + clientHeight(): number; + /** Returns the width of the scrollable widget in pixels. */ + clientWidth(): number; + /** An HTML element of the widget. */ + content(): JQuery; + /** Scrolls the widget content by the specified number of pixels. */ + scrollBy(distance: number): void; + /** Scrolls widget content by the specified number of pixels in horizontal and vertical directions. */ + scrollBy(distanceObject: dxScrollableLocation): void; + /** Returns the height of the scrollable content in pixels. */ + scrollHeight(): number; + /** Returns the current scroll position against the leftmost position. */ + scrollLeft(): number; + /** Returns how far the scrollable content is scrolled from the top and from the left. */ + scrollOffset(): dxScrollableLocation; + /** Scrolls widget content to the specified position. */ + scrollTo(targetLocation: number): void; + /** Scrolls widget content to a specified position. */ + scrollTo(targetLocation: dxScrollableLocation): void; + /** Scrolls widget content to the specified element. */ + scrollToElement(element: Element): void; + /** Returns the current scroll position against the topmost position. */ + scrollTop(): number; + /** Returns the width of the scrollable content in pixels. */ + scrollWidth(): number; + /** Updates the dimensions of the scrollable contents. */ + update(): void; + } + export interface dxRadioGroupOptions extends CollectionWidgetOptions { + /** Specifies the radio group layout. */ + layout?: string; + } + /** A widget that enables a user to select one item within a list of items represented by radio buttons. */ + export class dxRadioGroup extends CollectionWidget { + constructor(element: JQuery, options?: dxRadioGroupOptions); + constructor(element: Element, options?: dxRadioGroupOptions); + } + export interface dxPopupOptions extends dxOverlayOptions { + animation?: fx.AnimationOptions; + /** Specifies whether or not to allow a user to drag the popup window. */ + dragEnabled?: boolean; + /** A Boolean value specifying whether or not to display the widget in full-screen mode. */ + fullScreen?: boolean; + position?: PositionOptions; + /** A Boolean value specifying whether or not to display the title in the overlay window. */ + showTitle?: boolean; + /** The title in the overlay window. */ + title?: string; + /** A template to be used for rendering the widget title. */ + titleTemplate?: any; + width?: any; + /** Specifies items displayed on the top or bottom toolbar of the popup window. */ + buttons?: Array; + /** A handler for the titleRendered event. */ + onTitleRendered?: Function; + } + /** A widget that displays required content in a popup window. */ + export class dxPopup extends dxOverlay { + constructor(element: JQuery, options?: dxPopupOptions); + constructor(element: Element, options?: dxPopupOptions); + } + export interface dxPopoverOptions extends dxPopupOptions { + /** An object defining animation options of the widget. */ + animation?: fx.AnimationOptions; + /** Specifies the height of the widget. */ + height?: any; + /** An object defining widget positioning options. */ + position?: PositionOptions; + shading?: boolean; + /** A Boolean value specifying whether or not to display the title in the overlay window. */ + showTitle?: boolean; + /** The target element associated with a popover. */ + target?: any; + /** Specifies the width of the widget. */ + width?: any; + } + /** A widget that displays the required content in a popup window. */ + export class dxPopover extends dxPopup { + constructor(element: JQuery, options?: dxPopoverOptions); + constructor(element: Element, options?: dxPopoverOptions); + } + export interface dxOverlayOptions extends WidgetOptions { + /** An object that defines the animation options of the widget. */ + animation?: fx.AnimationOptions; + /** A Boolean value specifying whether or not the widget is closed if a user presses the Back hardware button. */ + closeOnBackButton?: boolean; + /** A Boolean value specifying whether or not the widget is closed if a user clicks outside of the overlapping window. */ + closeOnOutsideClick?: any; + /** A template to be used for rendering widget content. */ + contentTemplate?: any; + /** Specifies whether widget content is rendered when the widget is shown or when rendering the widget. */ + deferRendering?: boolean; + /** Specifies whether or not an end-user can drag the widget. */ + dragEnabled?: boolean; + /** The height of the widget in pixels. */ + height?: any; + /** A handler for the hidden event. */ + onHidden?: Function; + hiddenAction?: Function; + /** A handler for the hiding event. */ + onHiding?: Function; + hidingAction?: Function; + /** An object defining widget positioning options. */ + position?: PositionOptions; + /** A Boolean value specifying whether or not the main screen is inactive while the widget is active. */ + shading?: boolean; + /** Specifies the shading color. */ + shadingColor?: string; + /** A handler for the showing event. */ + onShowing?: Function; + showingAction?: Function; + /** A handler for the shown event. */ + onShown?: Function; + shownAction?: Function; + /** A Boolean value specifying whether or not the widget is visible. */ + visible?: boolean; + /** The widget width in pixels. */ + width?: any; + } + /** A widget displaying the required content in an overlay window. */ + export class dxOverlay extends Widget { + constructor(element: JQuery, options?: dxOverlayOptions); + constructor(element: Element, options?: dxOverlayOptions); + /** An HTML element of the widget. */ + content(): JQuery; + /** Hides the widget. */ + hide(): JQueryPromise; + /** Recalculates the overlay's size and position. */ + repaint(): void; + /** Shows the widget. */ + show(): JQueryPromise; + /** Toggles the visibility of the widget. */ + toggle(showing: boolean): JQueryPromise; + } + export interface dxNumberBoxOptions extends dxTextEditorOptions { + /** The maximum value accepted by the number box. */ + max?: number; + /** The minimum value accepted by the number box. */ + min?: number; + /** Specifies whether to show spin buttons. */ + showSpinButtons?: boolean; + useTouchSpinButtons?: boolean; + /** Specifies by which value the widget value changes when a spin button is clicked. */ + step?: number; + /** The current number box value. */ + value?: number; + } + /** A textbox widget that enables a user to enter numeric values. */ + export class dxNumberBox extends dxTextEditor { + constructor(element: JQuery, options?: dxNumberBoxOptions); + constructor(element: Element, options?: dxNumberBoxOptions); + } + export interface dxNavBarOptions extends dxTabsOptions { } + /** A widget that contains items used to navigate through application views. */ + export class dxNavBar extends dxTabs { + constructor(element: JQuery, options?: dxNavBarOptions); + constructor(element: Element, options?: dxNavBarOptions); + } + export interface dxMultiViewOptions extends CollectionWidgetOptions { + /** Specifies whether or not to animate the displayed item change. */ + animationEnabled?: boolean; + /** A Boolean value specifying whether or not to scroll back to the first item after the last item is swiped. */ + loop?: boolean; + /** The index of the currently displayed item. */ + selectedIndex?: number; + /** A Boolean value specifying whether or not to allow users to change the selected index by swiping. */ + swipeEnabled?: boolean; + } + /** A widget used to display a view and to switch between several views. */ + export class dxMultiView extends CollectionWidget { + constructor(element: JQuery, options?: dxMultiViewOptions); + constructor(element: Element, options?: dxMultiViewOptions); + } + export interface dxMapOptions extends WidgetOptions { + /** Specifies whether or not the widget automatically adjusts center and zoom option values when adding a new marker or route. */ + autoAdjust?: boolean; + bounds?: { + northEast?: { + lat?: number; + lng?: number; + }; + southWest?: { + lat?: number; + lng?: number; + }; + /** An object, a string, or an array specifying the location displayed at the center of the widget. */ + center?: { + /** The latitude location displayed in the center of the widget. */ + lat?: number; + /** The longitude location displayed in the center of the widget. */ + lng?: number; + }; + /** A handler for the click event. */ + onClick?: any; + clickAction?: any; + /** Specifies whether or not map widget controls are available. */ + controls?: boolean; + /** Specifies the height of the widget. */ + height?: number; + /** A key used to authenticate the application within the required map provider. */ + key?: { + /** A key used to authenticate the application within the "Bing" map provider. */ + bing?: string; + /** A key used to authenticate the application within the "Google" map provider. */ + google?: string; + /** A key used to authenticate the application within the "Google Static" map provider. */ + googleStatic?: string; + } + /** + * An object, a string, or an array specifying the location displayed at the center of the widget. + * @deprecated Use the 'center' option instead + */ + location?: { + lat?: number; + lng?: number; + }; + /** A handler for the markerAdded event. */ + onMarkerAdded?: Function; + markerAddedAction?: Function; + /** A URL pointing to the custom icon to be used for map markers. */ + markerIconSrc?: string; + /** A handler for the markerRemoved event. */ + onMarkerRemoved?: Function; + markerRemovedAction?: Function; + /** An array of markers displayed on a map. */ + markers?: Array; + /** The name of the current map data provider. */ + provider?: string; + /** A handler for the ready event. */ + onReady?: Function; + readyAction?: Function; + /** A handler for the routeAdded event. */ + onRouteAdded?: Function; + routeAddedAction?: Function; + /** A handler for the routeRemoved event. */ + onRouteRemoved?: Function; + routeRemovedAction?: Function; + /** An array of routes shown on the map. */ + routes?: Array; + /** The type of a map to display. */ + type?: string; + /** Specifies the width of the widget. */ + width?: number; + /** The zoom level of the map. */ + zoom?: number; + /** Adds a marker to the map. */ + addMarker(markerOptions: Object): JQueryPromise; + /** Adds a route to the map. */ + addRoute(options: Object): JQueryPromise; + /** Removes a marker from the map. */ + removeMarker(marker: Object): JQueryPromise; + /** Removes a route from the map. */ + removeRoute(route: any): JQueryPromise; + }; + } + /** An interactive map widget. */ + export class dxMap extends Widget { + constructor(element: JQuery, options?: dxMapOptions); + constructor(element: Element, options?: dxMapOptions); + } + export interface dxLookupOptions extends dxDropDownListOptions { + /** An object defining widget animation options. */ + animation?: fx.AnimationOptions; + autoPagingEnabled?: boolean; + /** The text displayed on the Cancel button. */ + cancelButtonText?: string; + /** The text displayed on the Clear button. */ + clearButtonText?: string; + /** A Boolean value specifying whether or not the widget is closed if a user clicks outside of the overlaying window. */ + closeOnOutsideClick?: any; + /** The text displayed on the Done button. */ + doneButtonText?: string; + /** A Boolean value specifying whether or not to display the lookup in full-screen mode. */ + fullScreen?: boolean; + /** A Boolean value specifying whether or not to group widget items. */ + grouped?: boolean; + groupRender?: any; + /** The name of the template used to display a group header. */ + groupTemplate?: any; + /** The text displayed on the button used to load the next page from the data source. */ + nextButtonText?: string; + /** The text or HTML markup displayed by the widget if there are no items satisfying the specified search condition. */ + noDataText?: string; + /** A handler for the pageLoading event. */ + onPageLoading?: Function; + pageLoadingAction?: Function; + /** Specifies the text shown in the pullDown panel, which is displayed when the widget is scrolled to the bottom. */ + pageLoadingText?: string; + /** The text displayed by the widget when nothing is selected. */ + placeholder?: string; + /** The height of the widget popup element. */ + popupHeight?: any; + /** The width of the widget popup element. */ + popupWidth?: any; + /** An object defining widget positioning options. */ + position?: PositionOptions; + /** Specifies the text displayed in the pullDown panel when the widget is pulled below the refresh threshold. */ + pulledDownText?: string; + /** Specifies the text shown in the pullDown panel while the list is being pulled down to the refresh threshold. */ + pullingDownText?: string; + /** A handler for the pullRefresh event. */ + onPullRefresh?: Function; + pullRefreshAction?: Function; + /** A Boolean value specifying whether or not the widget supports the "pull down to refresh" gesture. */ + pullRefreshEnabled?: boolean; + /** Specifies the text displayed in the pullDown panel while the widget is being refreshed. */ + refreshingText?: string; + /** A handler for the scroll event. */ + onScroll?: Function; + scrollAction?: Function; + /** A Boolean value specifying whether or not the search bar is visible. */ + searchEnabled?: boolean; + /** The text that is provided as a hint in the lookup's search bar. */ + searchPlaceholder?: string; + /** A Boolean value specifying whether or not the main screen is inactive while the lookup is active. */ + shading?: boolean; + /** Specifies whether to display the Cancel button in the lookup window. */ + showCancelButton?: boolean; + /** Specifies whether to display the Done button in the lookup window. */ + showDoneButton?: boolean; + /** A Boolean value specifying whether the widget loads the next page automatically when you reach the bottom of the list or when a button is clicked. */ + showNextButton?: boolean; + /** The title of the lookup window. */ + title?: string; + /** A template to be used for rendering the widget title. */ + titleTemplate?: any; + /** Specifies whether or not the widget uses native scrolling. */ + useNativeScrolling?: boolean; + /** Specifies whether or not to show lookup contents in a dxPopover widget. */ + usePopover?: boolean; + /** A handler for the valueChanged event. */ + onValueChanged?: Function; + contentReadyAction?: Function; + onContentReady?: Function; + titleRender?: any; + /** A handler for the titleRendered event. */ + onTitleRendered?: Function; + } + /** A widget that allows a user to select predefined values from a lookup window. */ + export class dxLookup extends dxDropDownList { + constructor(element: JQuery, options?: dxLookupOptions); + constructor(element: Element, options?: dxLookupOptions); + /** This section lists the data source fields that are used in a default template for lookup drop-down items. */ + } + export interface dxLoadPanelOptions extends dxOverlayOptions { + /** An object defining the animation options of the widget. */ + animation?: fx.AnimationOptions; + /** The delay in milliseconds after which the load panel is displayed. */ + delay?: number; + /** The height of the widget. */ + height?: number; + /** A URL pointing to an image to be used as a load indicator. */ + indicatorSrc?: string; + /** The text displayed in the load panel. */ + message?: string; + /** A Boolean value specifying whether or not to show a load indicator. */ + showIndicator?: boolean; + /** A Boolean value specifying whether or not to show the pane behind the load indicator. */ + showPane?: boolean; + /** The width of the widget. */ + width?: number; + } + /** A widget used to indicate whether or not an element is loading. */ + export class dxLoadPanel extends dxOverlay { + constructor(element: JQuery, options?: dxLoadPanelOptions); + constructor(element: Element, options?: dxLoadPanelOptions); + } + export interface dxLoadIndicatorOptions extends WidgetOptions { + /** Specifies the path to an image used as the indicator. */ + indicatorSrc?: string; + } + /** The widget used to indicate the loading process. */ + export class dxLoadIndicator extends Widget { + constructor(element: JQuery, options?: dxLoadIndicatorOptions); + constructor(element: Element, options?: dxLoadIndicatorOptions); + } + export interface dxListOptions extends CollectionWidgetOptions { + /** A Boolean value specifying whether or not to load the next page from the data source when the list is scrolled to the bottom. */ + autoPagingEnabled?: boolean; + /** Specifies whether or not the widget displays items by pages. */ + pagingEnabled?: boolean; + /** An object used to set configuration options for the dxList's edit mode. */ + editConfig?: { + /** Specifies whether the list items can be deleted. */ + deleteEnabled?: boolean; + /** + * A mode specifying how to delete a list item. + * @deprecated Use the "deleteType" option instead. + */ + deleteMode?: string; + /** Specifies the way a user can delete items from the list. */ + deleteType?: string; + itemRender?: any; + /** The template used to render list items in edit mode. */ + itemTemplate?: any; + /** Specifies the array of items for a context menu called for a list item. */ + menuItems?: Array; + /** Specifies whether an item context menu is shown when a user swipes or holds an item. */ + menuType?: string; + /** Specifies whether or not a user can reorder items. */ + reorderEnabled?: boolean; + /** Specifies whether the list items can be selected. */ + selectionEnabled?: boolean; + /** + * A mode specifying how to select a list item. + * @deprecated Use the "selectionType" option instead. + */ + selectionMode?: string; + /** A type specifying how to select a list item. */ + selectionType?: string; + /** Specifies whether the item list represented by this widget is editable. */ + editEnabled?: boolean; + /** Specifies whether or not to show the load panel during data loading. */ + indicateLoading?: boolean; + }; + /** A Boolean value specifying whether or not to display a grouped list. */ + grouped?: boolean; + groupRender?: any; + /** The name of the template used to display a group header. */ + groupTemplate?: any; + /** A handler for the itemDeleted event. */ + onItemDeleted?: Function; + itemDeleteAction?: Function; + /** A handler for the itemReordered event. */ + onItemReordered?: Function; + itemReorderAction?: Function; + /** A handler for the itemClick event. */ + onItemClick?: any; + /** A handler for the itemSwipe event. */ + onItemSwipe?: Function; + itemSwipeAction?: Function; + /** The text displayed on the button used to load the next page from the data source. */ + nextButtonText?: string; + /** A handler for the pageLoading event. */ + onPageLoading?: Function; + pageLoadingAction?: Function; + /** Specifies the text shown in the pullDown panel, which is displayed when the list is scrolled to the bottom. */ + pageLoadingText?: string; + /** Specifies the text displayed in the pullDown panel when the list is pulled below the refresh threshold. */ + pulledDownText?: string; + /** Specifies the text shown in the pullDown panel while the list is being pulled down to the refresh threshold. */ + pullingDownText?: string; + /** A handler for the pullRefresh event. */ + onPullRefresh?: Function; + pullRefreshAction?: Function; + /** A Boolean value specifying whether or not the widget supports the "pull down to refresh" gesture. */ + pullRefreshEnabled?: boolean; + /** Specifies the text displayed in the pullDown panel while the list is being refreshed. */ + refreshingText?: string; + /** A handler for the scroll event. */ + onScroll?: Function; + scrollAction?: Function; + /** A Boolean value specifying whether to enable or disable list scrolling. */ + scrollingEnabled?: boolean; + /** Specifies whether the list supports single item selection or multi-selection. */ + selectionMode?: string; + /** A Boolean value specifying whether the widget loads the next page automatically when you reach the bottom of the list or when a button is clicked. */ + showNextButton?: boolean; + /** A Boolean value specifying if the widget scrollbar is visible. */ + showScrollbar?: boolean; + /** Specifies whether or not the widget uses native scrolling. */ + useNativeScrolling?: boolean; + itemUnselectAction?: Function; + onItemContextMenu?: Function; + onItemHold?: Function; + /** Specifies whether or not an end-user can collapse groups. */ + collapsibleGroups?: boolean; + } + /** A list widget. */ + export class dxList extends CollectionWidget { + constructor(element: JQuery, options?: dxListOptions); + constructor(element: Element, options?: dxListOptions); + /** Returns the height of the widget in pixels. */ + clientHeight(): number; + /** Removes the specified item from the list. */ + deleteItem(itemIndex: any): JQueryPromise; + /** Removes the specified item from the list. */ + deleteItem(itemElement: Element): JQueryPromise; + /** Returns a Boolean value that indicates whether or not the specified item is selected. */ + isItemSelected(itemIndex: any): boolean; + /** Returns a Boolean value that indicates whether or not the specified item is selected. */ + isItemSelected(itemElement: Element): boolean; + /** + * Reloads list data. + * @deprecated Use the "reload" method instead. + */ + refresh(): void; + /** Reloads list data. */ + reload(): void; + /** Moves the specified item to the specified position in the list. */ + reorderItem(itemElement: Element, toItemElement: Element): JQueryPromise; + /** Moves the specified item to the specified position in the list. */ + reorderItem(itemIndex: any, toItemIndex: any): JQueryPromise; + /** Scrolls the list content by the specified number of pixels. */ + scrollBy(distance: number): void; + /** Returns the height of the list content in pixels. */ + scrollHeight(): number; + /** Scrolls list content to the specified position. */ + scrollTo(location: number): void; + /** Scrolls the list to the specified item. */ + scrollToItem(itemElement: Element): void; + /** Scrolls the list to the specified item. */ + scrollToItem(itemIndex: any): void; + /** Returns how far the list content is scrolled from the top. */ + scrollTop(): number; + /** Selects the specified item from the list. */ + selectItem(itemElement: Element): void; + /** Selects the specified item from the list. */ + selectItem(itemIndex: any): void; + /** Deselects the specified item from the list. */ + unselectItem(itemElement: Element): void; + /** Unselects the specified item from the list. */ + unselectItem(itemIndex: any): void; + /** + * Updates the widget scrollbar according to widget content size. + * @deprecated Use the "updateDimensions" method instead. + */ + update(): JQueryPromise; + /** Updates the widget scrollbar according to widget content size. */ + updateDimensions(): JQueryPromise; + /** Expands the specified group. */ + expandGroup(groupIndex: number): JQueryPromise; + /** Collapses the specified group. */ + collapseGroup(groupIndex: number): JQueryPromise; + } + export interface dxGalleryOptions extends CollectionWidgetOptions { + /** The time, in milliseconds, spent on slide animation. */ + animationDuration?: number; + /** A Boolean value specifying whether or not to allow users to switch between items by clicking an indicator. */ + indicatorEnabled?: boolean; + /** A Boolean value specifying whether or not to scroll back to the first item after the last item is swiped. */ + loop?: boolean; + /** The index of the currently active gallery item. */ + selectedIndex?: number; + /** A Boolean value specifying whether or not to display an indicator that points to the selected gallery item. */ + showIndicator?: boolean; + /** A Boolean value that specifies the availability of the "Forward" and "Back" navigation buttons. */ + showNavButtons?: boolean; + /** The time interval in milliseconds, after which the gallery switches to the next item. */ + slideshowDelay?: number; + /** A Boolean value specifying whether or not to allow users to switch between items by swiping. */ + swipeEnabled?: boolean; + } + /** An image gallery widget. */ + export class dxGallery extends CollectionWidget { + constructor(element: JQuery, options?: dxGalleryOptions); + constructor(element: Element, options?: dxGalleryOptions); + /** Shows the specified gallery item. */ + goToItem(itemIndex: number, animation: boolean): JQueryPromise; + /** Shows the next gallery item. */ + nextItem(animation: boolean): JQueryPromise; + /** Shows the previous gallery item. */ + prevItem(animation: boolean): JQueryPromise; + } + export interface dxDropDownEditorOptions extends dxTextBoxOptions { + /** A handler for the closed event. */ + onClosed?: Function; + /** A handler for the opened event. */ + onOpened?: Function; + /** Specifies whether or not the drop-down window is displayed. */ + opened?: boolean; + closeAction?: Function; + openAction?: Function; + shownAction?: Function; + hiddenAction?: Function; + } + /** A drop-down editor widget. */ + export class dxDropDownEditor extends dxTextBox { + constructor(element: JQuery, options?: dxDropDownEditorOptions); + constructor(element: Element, options?: dxDropDownEditorOptions); + /** Closes the drop-down editor. */ + close(): void; + /** Opens the drop-down editor. */ + open(): void; + } + export interface dxDateBoxOptions extends dxTextEditorOptions { + /** A dxCalendar configuration object used to initialize the drop-down calendar. */ + calendarOptions?: dxCalendarOptions; + /** Specifies whether or not to close the drop-down calendar when widget value has been changed. */ + closeOnValueChange?: boolean; + /** A format used to display date/time information. */ + format?: string; + /** A Globalize format string specifying the date display format. */ + formatString?: string; + /** The last date that can be selected within the widget. */ + max?: Date; + /** The minimum date that can be selected within the widget. */ + min?: Date; + /** The text displayed by the widget when the widget value is not yet specified. This text is also used as a title of the date picker. */ + placeholder?: string; + /** Specifies whether or not a user can pick out a date via the drop-down calendar. */ + useCalendar?: boolean; + /** A Date object specifying the date and time currently selected using the date box. */ + value?: Date; + /** Specifies whether or not the widget uses the native HTML input element. */ + useNative?: boolean; + /** Specifies the interval between neighboring values in the popup list in minutes. */ + interval?: number; + } + /** A date box widget. */ + export class dxDateBox extends dxTextEditor { + constructor(element: JQuery, options?: dxDateBoxOptions); + constructor(element: Element, options?: dxDateBoxOptions); + } + export interface dxCheckBoxOptions extends EditorOptions { + checked?: boolean; + /** Specifies the widget state. */ + value?: boolean; + /** Specifies the text displayed by the check box. */ + text?: string; + } + /** A check box widget. */ + export class dxCheckBox extends Editor { + constructor(element: JQuery, options?: dxCheckBoxOptions); + constructor(element: Element, options?: dxCheckBoxOptions); + } + export interface dxCalendarOptions extends EditorOptions { + /** Specifies a date displayed on the current calendar page. */ + currentDate?: Date; + /** Specifies the first day of a week. */ + firstDayOfWeek?: number; + /** The latest date the widget allows to select. */ + max?: Date; + /** The earliest date the widget allows to select. */ + min?: Date; + } + /** A calendar widget. */ + export class dxCalendar extends Editor { + constructor(element: JQuery, options?: dxCalendarOptions); + constructor(element: Element, options?: dxCalendarOptions); + } + export interface dxButtonOptions extends WidgetOptions { + /** A handler for the click event. */ + onClick?: any; + clickAction?: any; + /** The name of an icon to be displayed on the button. */ + icon?: string; + /** A URL pointing to the image to be displayed on the button. */ + iconSrc?: string; + /** The text displayed on the button. */ + text?: string; + /** Specifies the button type. */ + type?: string; + /** Specifies the name of the validation group to be accessed in the click event handler. */ + validationGroup?: string; + } + /** A button widget. */ + export class dxButton extends Widget { + constructor(element: JQuery, options?: dxButtonOptions); + constructor(element: Element, options?: dxButtonOptions); + } + export interface dxBoxOptions extends CollectionWidget { + /** Specifies how widget items are aligned along the main direction. */ + align?: string; + /** Specifies the direction of item positioning in the widget. */ + direction?: string; + /** Specifies how widget items are aligned cross-wise. */ + crossAlign?: string; + } + /** A container widget used to arrange inner elements. */ + export class dxBox extends CollectionWidget { + constructor(element: JQuery, options?: dxBoxOptions); + constructor(element: Element, options?: dxBoxOptions); + } + export interface dxResponsiveBoxOptions extends CollectionWidgetOptions { + /** Specifies the collection of rows for the grid used to position layout elements. */ + rows?: Array; + /** Specifies the collection of columns for the grid used to position layout elements. */ + cols?: Array; + /** Specifies the function returning the screen factor depending on the screen width. */ + screenByWidth?: (width: number) => string; + /** Specifies the screen factor with which all elements are located in a single column. */ + singleColumnScreen?: string; + } + /** A widget used to build an adaptive markup dependent on screen resolution. */ + export class dxResponsiveBox extends CollectionWidget { + constructor(element: JQuery, options?: dxBoxOptions); + constructor(element: Element, options?: dxBoxOptions); + } + export interface dxAutocompleteOptions extends dxDropDownListOptions { + /** The minimum number of characters that must be entered into the text box to begin a search. */ + minSearchLength?: number; + /** Specifies the maximum count of items displayed by the widget. */ + maxItemCount?: number; + /** Specifies the currently selected item. */ + selectedItem?: Object; + } + /** A textbox widget that supports autocompletion. */ + export class dxAutocomplete extends dxDropDownList { + constructor(element: JQuery, options?: dxAutocompleteOptions); + constructor(element: Element, options?: dxAutocompleteOptions); + /** Opens the drop-down editor. */ + open(): void; + /** Closes the drop-down editor. */ + close(): void; + } + export interface dxAccordionOptions extends CollectionWidgetOptions { + /** A number specifying the time in milliseconds spent on the animation of the expanding or collapsing of a panel. */ + animationDuration?: number; + /** Specifies the height of the widget. */ + height?: any; + /** Specifies whether all items can be collapsed or whether at least one item must always be expanded. */ + collapsible?: boolean; + /** Specifies whether the widget can expand several items or only a single item at once. */ + multiple?: boolean; + /** The template to be used for rendering dxAccordion items. */ + itemTemplate?: any; + /** A handler for the itemTitleClick event. */ + onItemTitleClick?: any; + /** A handler for the itemTitleHold event. */ + onItemTitleHold?: Function; + /** The template to be used for rendering an item title. */ + itemTitleTemplate?: any; + /** The index number of the currently selected item. */ + selectedIndex?: number; + } + /** A widget that displays data source items on collapsible panels. */ + export class dxAccordion extends CollectionWidget { + constructor(element: JQuery, options?: dxAccordionOptions); + constructor(element: Element, options?: dxAccordionOptions); + /** Collapses the specified item. */ + collapseItem(index: number): JQueryPromise; + /** Expands the specified item. */ + expandItem(index: number): JQueryPromise; + } + export interface dxFileUploaderFile { + /** Specifies the selected file name. */ + name?: string; + /** Specifies the selected file size in bytes. */ + size?: number; + /** Specifies the MIME type of the selected file. */ + type?: string; + /** Specifies the date and time of the last selected file modification. */ + lastModifiedDate?: Date; + } + export interface dxFileUploaderOptions extends EditorOptions { + /** An object that holds the selected file data. */ + value?: dxFileUploaderFile; + /** Holds data of the files selected in the widget. */ + values?: Array; + /** Specifies the text displayed on the button opening the file selection dialog. */ + buttonText?: string; + /** Specifies the text displayed on the area to which an end-user can drop a file. */ + labelText?: string; + /** Specifies the value passed to the name attribute of the underlying input element. */ + name?: string; + /** Specifies whether the widget enables an end-user to select a single file or multiple files. */ + multiple?: boolean; + /** Specifies a file type or several types accepted by the widget. */ + accept?: string; + } + /** A widget used to select and upload a file or multiple files. */ + export class dxFileUploader extends Editor { + constructor(element: JQuery, options?: dxFileUploaderOptions); + constructor(element: Element, options?: dxFileUploaderOptions); + } + export interface dxTrackBarOptions extends EditorOptions { + /** The minimum value the widget can accept. */ + min?: number; + /** The maximum value the widget can accept. */ + max?: number; + /** The current widget value. */ + value?: number; + } + /** A base class for track bar widgets. */ + export class dxTrackBar extends Editor { + constructor(element: JQuery, options?: dxTrackBarOptions); + constructor(element: Element, options?: dxTrackBarOptions); + } + export interface dxProgressBarOptions extends dxTrackBarOptions { + /** Specifies a format for the progress status. */ + statusFormat?: any; + /** Specifies whether or not the widget displays a progress status. */ + showStatus?: boolean; + /** A handler for the complete event. */ + onComplete?: Function; + } + /** A widget used to indicate a progress. */ + export class dxProgressBar extends dxTrackBar { + constructor(element: JQuery, options?: dxProgressBarOptions); + constructor(element: Element, options?: dxProgressBarOptions); + } + export interface dxSliderOptions extends dxTrackBarOptions { + /** The slider step size. */ + step?: number; + /** The current slider value. */ + value?: number; + /** Specifies whether or not to highlight a range selected within the widget. */ + showRange?: boolean; + /** Specifies options for the slider tooltip. */ + tooltip?: { + /** Specifies whether or not the tooltip is enabled. */ + enabled?: boolean; + /** Specifies format for the tooltip. */ + format?: any; + /** Specifies whether the tooltip is located over or under the slider. */ + position?: string; + /** Specifies whether the widget always shows a tooltip or only when a pointer is over the slider. */ + showMode?: string; + }; + /** Specifies options for labels displayed at the min and max values. */ + label?: { + /** Specifies whether or not slider labels are visible. */ + visible?: boolean; + /** Specifies whether labels are located over or under the scale. */ + position?: string; + /** Specifies a format for labels. */ + format?: any; + }; + } + /** A widget that allows a user to select a numeric value within a given range. */ + export class dxSlider extends dxTrackBar { + constructor(element: JQuery, options?: dxSliderOptions); + constructor(element: Element, options?: dxSliderOptions); + } + export interface dxRangeSliderOptions extends dxSliderOptions { + /** The left edge of the interval currently selected using the range slider. */ + start?: number; + /** The right edge of the interval currently selected using the range slider. */ + end?: number; + } + /** A widget that enables a user to select a range of numeric values. */ + export class dxRangeSlider extends dxSlider { + constructor(element: JQuery, options?: dxRangeSliderOptions); + constructor(element: Element, options?: dxRangeSliderOptions); + } + export interface dxTileViewOptions extends CollectionWidgetOptions { + /** Specifies the height of the base tile view item. */ + baseItemHeight?: number; + /** Specifies the width of the base tile view item. */ + baseItemWidth?: number; + /** Specifies the height of the widget. */ + height?: any; + /** Specifies the distance in pixels between adjacent tiles. */ + itemMargin?: number; + listHeight?: any; + /** A Boolean value specifying whether or not to display a scrollbar. */ + showScrollbar?: boolean; + } + /** A widget displaying several blocks of data as tiles. */ + export class dxTileView extends CollectionWidget { + constructor(element: JQuery, options?: dxTileViewOptions); + constructor(element: Element, options?: dxTileViewOptions); + /** Returns the current scroll position of the widget content. */ + scrollPosition(): number; + } + export interface dxSwitchOptions extends EditorOptions { + /** Text displayed when the widget is in a disabled state. */ + offText?: string; + /** Text displayed when the widget is in an enabled state. */ + onText?: string; + /** A Boolean value specifying whether the current switch state is "On" or "Off". */ + value?: boolean; + } + /** A switch widget. */ + export class dxSwitch extends Editor { + constructor(element: JQuery, options?: dxSwitchOptions); + constructor(element: Element, options?: dxSwitchOptions); + } + export interface dxSlideoutOptions extends CollectionWidgetOptions { + /** A Boolean value specifying whether or not the widget changes its state when interacting with a user. */ + activeStateEnabled?: boolean; + /** A Boolean value specifying whether or not to display a grouped menu. */ + menuGrouped?: boolean; + menuGroupRender?: any; + /** The name of the template used to display a group header. */ + menuGroupTemplate?: any; + menuItemRender?: any; + /** The template used to render menu items. */ + menuItemTemplate?: any; + /** Specifies whether or not the slide-out menu is displayed. */ + menuVisible?: boolean; + /** Indicates whether the menu can be shown/hidden by swiping the widget's main panel. */ + swipeEnabled?: boolean; + } + /** The dxSlideOut widget allows you to slide-out the current view to reveal an item list. */ + export class dxSlideOut extends CollectionWidget { + constructor(element: JQuery, options?: dxSlideoutOptions); + constructor(element: Element, options?: dxSlideoutOptions); + /** Hides the widget's slide-out menu. */ + hideMenu(): JQueryPromise; + /** Displays the widget's slide-out menu. */ + showMenu(): JQueryPromise; + /** Toggles the visibility of the widget's slide-out menu. */ + toggleMenuVisibility(showing: boolean): JQueryPromise; + } + export interface dxPivotOptions extends CollectionWidgetOptions { + /** The index of the currently active pivot item. */ + selectedIndex?: number; + } + /** A widget that is similar to a traditional tab control, but optimized for the phone with simplified end-user interaction. */ + export class dxPivot extends CollectionWidget { + constructor(element: JQuery, options?: dxPivotOptions); + constructor(element: Element, options?: dxPivotOptions); + } + export interface dxPanoramaOptions extends CollectionWidgetOptions { + /** An object exposing options for setting a background image for the panorama. */ + backgroundImage?: { + /** Specifies the height of the panorama's background image. */ + height?: number; + /** Specifies the URL of the image that is used as the panorama's background image. */ + url?: string; + /** Specifies the width of the panorama's background image. */ + width?: number; + }; + /** The index of the currently active panorama item. */ + selectedIndex?: number; + /** Specifies the widget content title. */ + title?: string; + } + /** A widget displaying the required content in a long horizontal canvas that extends beyond the frames of the screen. */ + export class dxPanorama extends CollectionWidget { + constructor(element: JQuery, options?: dxDropDownEditorOptions); + constructor(element: Element, options?: dxDropDownEditorOptions); + } + export interface dxDropDownMenuOptions extends WidgetOptions { + /** A handler for the buttonClick event. */ + onButtonClick?: any; + buttonClickAction?: any; + /** The name of the icon to be displayed by the DropDownMenu button. */ + buttonIcon?: string; + /** A URL pointing to the image to be displayed by the DropDownMenu button. */ + buttonIconSrc?: string; + /** The text displayed in the DropDownMenu button. */ + buttonText?: string; + /** A data source used to fetch data to be displayed by the widget. */ + dataSource?: any; + /** A handler for the itemClick event. */ + onItemClick?: any; + itemClickAction?: any; + itemRender?: any; + /** An array of items displayed by the widget. */ + items?: Array; + /** The template to be used for rendering items. */ + itemTemplate?: any; + /** Specifies whether or not to show the drop down menu within a dxPopover widget. */ + usePopover?: boolean; + /** The width of the menu popup in pixels. */ + popupWidth?: any; + /** The height of the menu popup in pixels. */ + popupHeight?: any; + } + /** A drop-down menu widget. */ + export class dxDropDownMenu extends Widget { + constructor(element: JQuery, options?: dxDropDownEditorOptions); + constructor(element: Element, options?: dxDropDownEditorOptions); + /** This section lists the data source fields that are used in a default template for drop-down menu items. */ + } + export interface dxActionSheetOptions extends CollectionWidgetOptions { + cancelClickAction?: any; + /** A handler for the cancelClick event. */ + onCancelClick?: any; + /** The text displayed in the button that closes the action sheet. */ + cancelText?: string; + /** Specifies whether to display the Cancel button in action sheet. */ + showCancelButton?: boolean; + /** A Boolean value specifying whether or not the title of the action sheet is visible. */ + showTitle?: boolean; + /** Specifies the element the action sheet popover points at. */ + target?: any; + /** The title of the action sheet. */ + title?: string; + /** Specifies whether or not to show the action sheet within a dxPopover widget. */ + usePopover?: boolean; + /** A Boolean value specifying whether or not the dxActionSheet widget is visible. */ + visible?: boolean; + } + /** A widget consisting of a set of choices related to a certain task. */ + export class dxActionSheet extends CollectionWidget { + constructor(element: JQuery, options?: dxActionSheetOptions); + constructor(element: Element, options?: dxActionSheetOptions); + /** Hides the widget. */ + hide(): JQueryPromise; + /** Shows the widget. */ + show(): JQueryPromise; + /** Shows or hides the widget depending on the Boolean value passed as the parameter. */ + toggle(showing: boolean): JQueryPromise; + } + export interface dxColorBoxOptions extends dxDropDownEditorOptions { + /** Specifies the text displayed on the button that applies changes and closes the drop-down editor. */ + applyButtonText?: string; + /** Specifies whether the widget value is updated after the Apply button is clicked or immediately after a color is selected in the palette. */ + applyValueMode?: string; + /** Specifies the text displayed on the button that cancels changes and closes the drop-down editor. */ + cancelButtonText?: string; + /** Specifies whether or not the widget value includes the alpha channel component. */ + editAlphaChannel?: boolean; + /** The color currently selected by the widget. */ + value?: string; + } + /** A widget used to specify a color value. */ + export class dxColorBox extends dxDropDownEditor { + constructor(element: JQuery, options?: dxColorBoxOptions); + constructor(element: Element, options?: dxColorBoxOptions); + } + export interface dxColorPickerOptions extends dxColorBoxOptions { } + /** + * A widget used to specify a color value. + * @deprecated Use the dxColorBox widget instead + */ + export class dxColorPicker extends dxColorBox { + constructor(element: JQuery, options?: dxColorPickerOptions); + constructor(element: Element, options?: dxColorPickerOptions); + } + export interface dxTreeViewOptions extends CollectionWidgetOptions { + /** Specifies whether a nested or plain array is used as a data source. */ + dataStructure?: string; + /** An array of currently expanded item objects. */ + expandedItems?: Array; + /** Specifies whether or not a check box is displayed at each tree view item. */ + showCheckBoxes?: boolean; + /** Specifies whether or not to select nodes recursively. */ + selectNodesRecursive?: boolean; + /** Specifies whether the "Select All" check box is displayed over the tree view. */ + selectAllEnabled?: boolean; + /** Specifies the text displayed at the "Select All" check box. */ + selectAllText?: string; + /** Specifies the name of the data source item field used as a key. */ + keyExpr?: any; + /** Specifies the name of the data source item field whose value is displayed by the widget. */ + displayExpr?: any; + /** Specifies the name of the data source item field whose value defines whether or not the corresponding node is selected. */ + selectedExpr?: any; + /** Specifies the name of the data source item field whose value defines whether or not the corresponding node is expanded. */ + expandedExpr?: any; + /** Specifies the name of the data source item field that contains an array of nested items. */ + itemsExpr?: any; + /** Specifies the name of the data source item field that holds the key of the parent item. */ + parentIdExpr?: any; + /** A string value specifying available scrolling directions. */ + scrollDirection?: string; + /** A handler for the itemSelected event. */ + onItemSelected?: Function; + /** A handler for the itemExpanded event. */ + onItemExpanded?: Function; + /** A handler for the itemCollapsed event. */ + onItemCollapsed?: Function; + } + /** A widget displaying specified data items as a tree. */ + export class dxTreeView extends CollectionWidget { + constructor(element: JQuery, options?: dxTreeViewOptions); + constructor(element: Element, options?: dxTreeViewOptions); + /** Updates the tree view scrollbars according to the current size of the widget content. */ + updateDimensions(): JQueryPromise; + /** Selects the specified item. */ + selectItem(itemElement: any): void; + /** Unselects the specified item. */ + unselectItem(itemElement: any): void; + /** Expands the specified item. */ + expandItem(itemElement: any): void; + /** Collapses the specified item. */ + collapseItem(itemElement: any): void; + /** Returns all nodes of the tree view. */ + getNodes(): Array; + } + export interface dxMenuBaseOptions extends CollectionWidgetOptions { + /** An object that defines the animation options of the widget. */ + animation?: fx.AnimationOptions; + /** A Boolean value specifying whether or not the widget changes its state when interacting with a user. */ + activeStateEnabled?: boolean; + /** Specifies the name of the CSS class associated with the menu. */ + cssClass?: string; + /** Holds an array of menu items. */ + items?: Array; + /** Specifies whether or not an item becomes selected if an end-user clicks it. */ + selectionByClick?: boolean; + /** Specifies the selection mode supported by the menu. */ + selectionMode?: string; + /** Specifies the user interaction by which submenus are shown. */ + showSubmenuMode?: string; + } + export class dxMenuBase extends CollectionWidget { + constructor(element: JQuery, options?: dxMenuBaseOptions); + constructor(element: Element, options?: dxMenuBaseOptions); + /** Selects the specified item. */ + selectItem(itemElement: any): void; + /** Unselects the specified item. */ + unselectItem(itemElement: any): void; + } + export interface dxMenuOptions extends dxMenuBaseOptions { + firstSubMenuDirection?: string; + /** Specifies whether the menu has horizontal or vertical orientation. */ + orientation?: string; + /** Specifies by which user interaction the first-level submenu is shown. */ + showFirstSubmenuMode?: string; + showPopupMode?: string; + /** Specifies by which user interaction secondary-level submenus are shown. */ + showSubmenuMode?: string; + /** Specifies the direction at which the submenus are displayed. */ + submenuDirection?: string; + /** A handler for the submenuHidden event. */ + onSubmenuHidden?: Function; + submenuHiddenAction?: Function; + /** A handler for the submenuHiding event. */ + onSubmenuHiding?: Function; + submenuHidingAction?: Function; + /** A handler for the submenuShowing event. */ + onSubmenuShowing?: Function; + submenuShowingAction?: Function; + /** A handler for the submenuShown event. */ + onSubmenuShown?: Function; + submenuShownAction?: Function; + } + /** A menu widget. */ + export class dxMenu extends dxMenuBase { + constructor(element: JQuery, options?: dxMenuOptions); + constructor(element: Element, options?: dxMenuOptions); + } + export interface dxContextMenuOptions extends dxMenuBaseOptions { + direction?: string; + hiddenAction?: Function; + hidingAction?: Function; + /** Specifies whether the context menu can be called only from code or by user interaction as well. */ + invokeOnlyFromCode?: boolean; + /** A handler for the hidden event. */ + onHidden?: Function; + /** A handler for the hiding event. */ + onHiding?: Function; + /** A handler for the positioning event. */ + onPositioning?: Function; + /** A handler for the showing event. */ + onShowing?: Function; + /** A handler for the shown event. */ + onShown?: Function; + /** An object defining widget positioning options. */ + position?: PositionOptions; + positioningAction?: Function; + showingAction?: Function; + shownAction?: Function; + /** Specifies by which user interaction the context menu is shown. */ + showSubmenuMode?: string; + /** Specifies the direction at which submenus are displayed. */ + submenuDirection?: string; + /** The target element associated with a popover. */ + target?: any; + /** A Boolean value specifying whether or not the widget is visible. */ + visible?: boolean; + } + /** A context menu widget. */ + export class dxContextMenu extends dxMenuBase { + constructor(element: JQuery, options?: dxContextMenuOptions); + constructor(element: Element, options?: dxContextMenuOptions); + } + export interface dxRemoteOperations { + /** Specifies whether or not filtering must be performed on the server side. */ + filtering?: boolean; + /** Specifies whether or not paging must be performed on the server side. */ + paging?: boolean; + /** Specifies whether or not sorting must be performed on the server side. */ + sorting?: boolean; + } + export interface dxDataGridColumn { + /** Specifies the content alignment within column cells. */ + alignment?: string; + /** Specifies whether the values in a column can be edited at runtime. Setting this option makes sense only when editing is enabled for a grid. */ + allowEditing?: boolean; + /** Specifies whether or not a column can be used for filtering grid records. Setting this option makes sense only when the filter row or search panel is visible. */ + allowFiltering?: boolean; + /** Specifies whether a column can be used for grouping grid records at runtime. Setting this option makes sense only when the group panel is visible. */ + allowGrouping?: boolean; + /** Specifies whether or not a column can be hidden by a user. Setting this option makes sense only when the column chooser is visible. */ + allowHiding?: boolean; + /** Specifies whether or not a particular column can be used in column reordering. Setting this option makes sense only when the allowColumnReordering option is set to true. */ + allowReordering?: boolean; + /** Specifies whether or not a particular column can be resized by a user. Setting this option makes sense only when the allowColumnResizing option is true. */ + allowResizing?: boolean; + /** Specifies whether grid records can be sorted by a specific column at runtime. Setting this option makes sense only when the sorting mode differs from none. */ + allowSorting?: boolean; + /** Specifies whether groups appear expanded or not when records are grouped by a specific column. Setting this option makes sense only when grouping is allowed for this column. */ + autoExpandGroup?: boolean; + /** Specifies a callback function that returns a value to be displayed in a column cell. */ + calculateCellValue?: (rowData: Object) => string; + /** Specifies a callback function that defines filters for customary calculated grid cells. */ + calculateFilterExpression?: (filterValue: any, selectedFilterOperation: string) => Array; + /** Specifies a caption for a column. */ + caption?: string; + /** Specifies a custom template for grid column cells. */ + cellTemplate?: any; + /** Specifies a CSS class to be applied to a column. */ + cssClass?: string; + /** Specifies a callback function that determines grouping values. */ + calculateGroupValue?: (rowData: Object) => string; + /** Specifies a callback function that returns the text to be displayed in the cells of a column. */ + customizeText?: (cellInfo: { value: any; valueText: string }) => string; + /** Specifies the field of a data source that provides data for a column. */ + dataField?: string; + /** Specifies the required type of column values. */ + dataType?: string; + /** Specifies a custom template for the cell of a grid column when it is in an editing state. */ + editCellTemplate?: any; + /** Specifies whether HTML tags are displayed as plain text or applied to the values of the column. */ + encodeHtml?: boolean; + /** In a boolean column, replaces all false items with a specified text. */ + falseText?: string; + /** Specifies the set of available filter operations. */ + filterOperations?: Array; + /** Specifies a filter value for a column. */ + filterValue?: any; + /** Specifies a format for the values displayed in a column. */ + format?: string; + /** Specifies a custom template for the group cell of a grid column. */ + groupCellTemplate?: any; + /** Specifies the index of a column when grid records are grouped by the values of this column. */ + groupIndex?: number; + /** Specifies a custom template for the header of a grid column. */ + headerCellTemplate?: any; + /** Specifies options of a lookup column. */ + lookup?: { + /** Specifies whether or not a user can nullify values of a lookup column. */ + allowClearing?: boolean; + /** +Specifies the data source providing data for a lookup column. + */ + dataSource?: any; + /** Specifies the expression defining the data source field whose values must be displayed. */ + displayExpr?: any; + /** Specifies the expression defining the data source field whose values must be replaced. */ + valueExpr?: string; + }; + /** Specifies a precision for formatted values displayed in a column. */ + precision?: number; + /** Specifies a filter operation applied to a column. */ + selectedFilterOperation?: string; + /** Specifies whether or not the column displays its values by using editors. */ + showEditorAlways?: boolean; + /** Specifies whether or not to display the column when grid records are grouped by it. */ + showWhenGrouped?: boolean; + /** Specifies the index of a column when grid records are sorted by the values of this column. */ + sortIndex?: number; + /** Specifies the initial sort order of column values. */ + sortOrder?: string; + /** In a boolean column, replaces all true items with a specified text. */ + trueText?: string; + /** Specifies whether a column is visible or not. */ + visible?: boolean; + /** Specifies the sequence number of the column in the grid. */ + visibleIndex?: number; + /** Specifies a column width in pixels or percentages. */ + width?: any; + /** Specifies an array of validation rules to be checked when updating column cell values. */ + validationRules?: Array; + /** Specifies whether or not to display the header of a hidden column in the column chooser. */ + showInColumnChooser?: boolean; + /** Specifies the identifier of the column. */ + name?: string; + } + export interface dxDataGridOptions extends WidgetOptions { + /** Specifies whether the outer borders of the grid are visible or not. */ + showBorders?: boolean; + /** Indicates whether to show the error row for the grid. */ + errorRowEnabled?: boolean; + /** A handler for the rowValidating event. */ + onRowValidating?: (e: Object) => void; + initNewRow?: (e: { data: Object }) => void; + /** A handler for the initNewRow event. */ + onInitNewRow?: (e: { data: Object }) => void; + rowInserted?: (e: { data: Object; key: any }) => void; + /** A handler for the rowInserted event. */ + onRowInserted?: (e: { data: Object; key: any }) => void; + rowInserting?: (e: { data: Object; cancel: boolean }) => void; + /** A handler for the rowInserting event. */ + onRowInserting?: (e: { data: Object; cancel: boolean }) => void; + rowRemoved?: (e: { data: Object; key: any }) => void; + /** A handler for the rowRemoved event. */ + onRowRemoved?: (e: { data: Object; key: any }) => void; + rowRemoving?: (e: { data: Object; key: any; cancel: boolean }) => void; + /** A handler for the rowRemoving event. */ + onRowRemoving?: (e: { data: Object; key: any; cancel: boolean }) => void; + rowUpdated?: (e: { data: Object; key: any }) => void; + /** A handler for the rowUpdated event. */ + onRowUpdated?: (e: { data: Object; key: any }) => void; + rowUpdating?: (e: { oldData: Object; newData: Object; key: any; cancel: boolean }) => void; + /** A handler for the rowUpdating event. */ + onRowUpdating?: (e: { oldData: Object; newData: Object; key: any; cancel: boolean }) => void; + /** Enables a hint that appears when a user hovers the mouse pointer over a cell with truncated content. */ + cellHintEnabled?: boolean; + /** Specifies whether or not grid columns can be reordered by a user. */ + allowColumnReordering?: boolean; + /** Specifies whether or not grid columns can be resized by a user. */ + allowColumnResizing?: boolean; + cellClick?: any; + /** A handler for the cellClick event. */ + onCellClick?: any; + cellHoverChanged?: (e: Object) => void; + /** A handler for the cellHoverChanged event. */ + onCellHoverChanged?: (e: Object) => void; + cellPrepared?: (e: Object) => void; + /** A handler for the cellPrepared event. */ + onCellPrepared?: (e: Object) => void; + /** Specifies whether or not the width of grid columns depends on column content. */ + columnAutoWidth?: boolean; + /** Specifies the options of a column chooser. */ + columnChooser?: { + /** Specifies text displayed by the column chooser panel when it does not contain any columns. */ + emptyPanelText?: string; + /** Specifies whether a user can invoke the column chooser or not. */ + enabled?: boolean; + /** Specifies the height of the column chooser panel. */ + height?: number; + /** Specifies text displayed in the title of the column chooser panel. */ + title?: string; + /** Specifies the width of the column chooser panel. */ + width?: number; + }; + /** +An array of grid columns. + */ + columns?: Array; + onContentReady?: Function; + contentReadyAction?: Function; + /** Specifies a function that customizes grid columns after they are created. */ + customizeColumns?: (columns: Array) => void; + dataErrorOccurred?: (errorObject: Error) => void; + /** Specifies a data source for the grid. */ + dataSource?: any; + editingStart?: (e: { + data: Object; + key: any; + cancel: boolean; + column: dxDataGridColumn + }) => void; + /** A handler for the editingStart event. */ + onEditingStart?: (e: { + data: Object; + key: any; + cancel: boolean; + column: dxDataGridColumn + }) => void; + editorPrepared?: (e: Object) => void; + /** A handler for the editorPrepared event. */ + onEditorPrepared?: (e: Object) => void; + editorPreparing?: (e: Object) => void; + /** A handler for the editorPreparing event. */ + onEditorPreparing?: (e: Object) => void; + /** Contains options that specify how grid content can be changed. */ + editing?: { + /** Specifies whether or not grid records can be edited at runtime. */ + editEnabled?: boolean; + /** Specifies how grid values can be edited manually. */ + editMode?: string; + /** Specifies whether or not new records can be inserted into a grid. */ + insertEnabled?: boolean; + /** Specifies whether or not records can be deleted from a grid. */ + removeEnabled?: boolean; + /** Contains options that specify texts for editing-related grid controls. */ + texts?: { + /** Specifies text for a hint that appears when a user hovers the mouse pointer over the "Save" button. Setting this option makes sense only when the editMode option is set to batch. */ + saveAllChanges?: string; + /** Specifies text for a cancel button displayed when a row is in the editing state. Setting this option makes sense only when the editEnabled option is set to true. */ + cancelRowChanges?: string; + /** Specifies text for a hint that appears when a user hovers the mouse pointer over the "Revert" button. Setting this option makes sense only when the editMode option is set to batch. */ + cancelAllChanges?: string; + /** Specifies a message to be displayed by a confirmation window. Setting this option makes sense only when the edit mode is "row". */ + confirmDeleteMessage?: string; + /** Specifies text to be displayed in the title of a confirmation window. Setting this option makes sense only when the edit mode is "row". */ + confirmDeleteTitle?: string; + /** Specifies text for a button that deletes a row from a grid. Setting this option makes sense only when the removeEnabled option is set to true. */ + deleteRow?: string; + /** Specifies text for a hint that appears when a user hovers the mouse pointer over the "Add" button. Setting this option makes sense only when the insertEnabled option is true. */ + addRow?: string; + /** Specifies text for a button that turns a row into the editing state. Setting this option makes sense only when the editEnabled option is set to true. */ + editRow?: string; + /** + * Specifies text for a button that recovers a deleted row. Setting this option makes sense only if the grid uses the batch edit mode and the removeEnabled option is set to true. + * @deprecated Use the "undeleteRow" option instead. + */ + recoverRow?: string; + /** Specifies text for a save button displayed when a row is in the editing state. Setting this option makes sense only when the editEnabled option is set to true. */ + saveRowChanges?: string; + /** Specifies text for a button that recovers a deleted row. Setting this option makes sense only if the grid uses the batch edit mode and the removeEnabled option is set to true. */ + undeleteRow?: string; + }; + }; + /** Specifies filter row options. */ + filterRow?: { + /** Specifies when to apply a filter. */ + applyFilter?: string; + /** Specifies text for the hint that pops up when a user hovers the mouse pointer over the "Apply Filter" button. */ + applyFilterText?: string; + /** Specifies descriptions for filter operations. */ + operationDescriptions?: { + "=": string; + "<>": string; + "<": string; + "<=": string; + ">": string; + ">=": string; + "startswith": string; + "contains": string; + "notcontains": string; + "endswith": string; + }; + /** Specifies text for the reset operation in a filter list. */ + resetOperationText?: string; + /** Specifies text for the operation of clearing the applied filter when a select box is used. */ + showAllText?: string; + /** Specifies whether or not an icon that allows the user to choose a filter operation is visible. */ + showOperationChooser?: boolean; + /** Specifies whether the filter row is visible or not. */ + visible?: boolean; + }; + /** Specifies the behavior of grouped grid records. */ + grouping?: { + /** Specifies whether the user can collapse grouped records in a grid or not. */ + allowCollapsing?: boolean; + /** Specifies whether groups appear expanded or not. */ + autoExpandAll?: boolean; + /** Specifies the message displayed in a group row when the corresponding group is continued from the previous page. */ + groupContinuedMessage?: string; + /** +Specifies the message displayed in a group row when the corresponding group continues on the next page. + */ + groupContinuesMessage?: string; + }; + /** Specifies options that configure the group panel. */ + groupPanel?: { + /** Specifies whether columns can be dragged onto or from the group panel. */ + allowColumnDragging?: boolean; + /** Specifies text displayed by the group panel when it does not contain any columns. */ + emptyPanelText?: string; + /** Specifies whether the group panel is visible or not. */ + visible?: boolean; + }; + /** Specifies options configuring the load panel. */ + loadPanel?: { + /** Specifies whether to show the load panel or not. */ + enabled?: boolean; + /** Specifies the height of the load panel in pixels. */ + height?: number; + /** Specifies a URL pointing to an image to be used as a loading indicator. */ + indicatorSrc?: string; + /** Specifies whether or not a loading indicator must be displayed on the load panel. */ + showIndicator?: boolean; + /** Specifies whether or not the pane of the load panel must be displayed. */ + showPane?: boolean; + /** Specifies text displayed by the load panel. */ + text?: string; + /** Specifies the width of the load panel in pixels. */ + width?: number; + }; + /** Specifies text displayed when a grid does not contain any records. */ + noDataText?: string; + /** Specifies the options of a grid pager. */ + pager?: { + /** Specifies the page sizes that can be selected at runtime. */ + allowedPageSizes?: any; + /** Specifies whether to show the page size selector or not. */ + showPageSizeSelector?: boolean; + /** Specifies whether to show the pager or not. */ + visible?: any; + /** Specifies the text accompanying the page navigator. */ + infoText?: string; + /** Specifies whether or not to display the text accompanying the page navigator. This text is specified by the infoText option. */ + showInfo?: boolean; + /** Specifies whether or not to display buttons that switch the grid to the previous or next page. */ + showNavigationButtons?: boolean; + }; + /** Specifies paging options. */ + paging?: { + /** Specifies whether dxDataGrid loads data page by page or all at once. */ + enabled?: boolean; + /** Specifies the grid page that should be displayed by default. */ + pageIndex?: number; + /** Specifies the size of grid pages. */ + pageSize?: number; + }; + /** Specifies whether or not grid rows must be shaded in a different way. */ + rowAlternationEnabled?: boolean; + rowClick?: any; + /** A handler for the rowClick event. */ + onRowClick?: any; + rowPrepared?: (e: Object) => void; + /** A handler for the rowPrepared event. */ + onRowPrepared?: (e: Object) => void; + /** Specifies a custom template for grid rows. */ + rowTemplate?: any; + /** A configuration object specifying scrolling options. */ + scrolling?: { + /** Specifies the scrolling mode. */ + mode?: string; + /** Specifies whether or not a grid must preload pages adjacent to the current page when using virtual scrolling. */ + preloadEnabled?: boolean; + }; + /** Specifies options of the search panel. */ + searchPanel?: { + /** Specifies whether or not search strings in the located grid records should be highlighted. */ + highlightSearchText?: boolean; + /** Specifies text displayed by the search panel when no search string was typed. */ + placeholder?: string; + /** Specifies whether the search panel is visible or not. */ + visible?: boolean; + /** Specifies the width of the search panel in pixels. */ + width?: number; + /** Sets a search string for the search panel. */ + text?: string; + }; + /** Specifies the operations that must be performed on the server side. */ + remoteOperations?: any; + /** Allows you to sort groups according to the values of group summary items. */ + sortByGroupSummaryInfo?: Array<{ + /** Specifies the group summary item whose values must be used to sort groups. */ + summaryItem?: string; + /** Specifies the identifier of the column that must be used in grouping so that sorting by group summary item values be applied. */ + groupColumn?: string; + /** Specifies the sort order of group summary item values. */ + sortOrder?: string; + }>; + /** Allows you to build a master-detail interface in the grid. */ + masterDetail?: { + /** Enables an end-user to expand/collapse detail sections. */ + enabled?: boolean; + /** Specifies whether detail sections appear expanded or collapsed. */ + autoExpandAll?: boolean; + /** Specifies the template for detail sections. */ + template?: any; + }; + /** Specifies the keys of the records that must appear selected initially. */ + selectedRowKeys?: Array; + /** Specifies options of runtime selection. */ + selection?: { + /** Specifies whether the user can select all grid records at once. */ + allowSelectAll?: boolean; + /** Specifies the selection mode. */ + mode?: string; + }; + selectionChanged?: (e: { + currentSelectedRowKeys: Array; + currentDeselectedRowKeys: Array; + selectedRowKeys: Array; + selectedRowsData: Array; + }) => void; + /** A handler for the dataErrorOccured event. */ + onDataErrorOccurred?: (e: { error: Error }) => void; + /** A handler for the selectionChanged event. */ + onSelectionChanged?: (e: { + currentSelectedRowKeys: Array; + currentDeselectedRowKeys: Array; + selectedRowKeys: Array; + selectedRowsData: Array; + }) => void; + /** Specifies whether column headers are visible or not. */ + showColumnHeaders?: boolean; + /** Specifies whether or not vertical lines separating one grid column from another are visible. */ + showColumnLines?: boolean; + /** Specifies whether or not horizontal lines separating one grid row from another are visible. */ + showRowLines?: boolean; + /** Specifies options of runtime sorting. */ + sorting?: { + /** Specifies text for the context menu item that sets an ascending sort order in a column. */ + ascendingText?: string; + /** Specifies text for the context menu item that resets sorting settings for a column. */ + clearText?: string; + /** Specifies text for the context menu item that sets a descending sort order in a column. */ + descendingText?: string; + /** Specifies the runtime sorting mode. */ + mode?: string; + }; + /** Specifies options of state storing. */ + stateStoring?: { + /** Specifies a callback function that performs specific actions on state loading. */ + customLoad?: () => JQueryPromise; + /** Specifies a callback function that performs specific actions on state saving. */ + customSave?: (gridState: Object) => void; + /** Specifies whether or not a grid saves its state. */ + enabled?: boolean; + /** Specifies the delay between the last change of a grid state and the operation of saving this state in milliseconds. */ + savingTimeout?: number; + /** Specifies a unique key to be used for storing the grid state. */ + storageKey?: string; + /** Specifies the type of storage to be used for state storing. */ + type?: string; + }; + /** Specifies the options of the grid summary. */ + summary?: { + /** Contains options that specify text patterns for summary items. */ + texts?: { + /** Specifies a pattern for the 'sum' summary items when they are displayed in the parent column. */ + sum?: string; + /** Specifies a pattern for the 'sum' summary items displayed in a group row or in any other column rather than the parent one. */ + sumOtherColumn?: string; + /** Specifies a pattern for the 'min' summary items when they are displayed in the parent column. */ + min?: string; + /** Specifies a pattern for the 'min' summary items displayed in a group row or in any other column rather than the parent one. */ + minOtherColumn?: string; + /** Specifies a pattern for the 'max' summary items when they are displayed in the parent column. */ + max?: string; + /** Specifies a pattern for the 'max' summary items displayed in a group row or in any other column rather than the parent one. */ + maxOtherColumn?: string; + /** Specifies a pattern for the 'avg' summary items when they are displayed in the parent column. */ + avg?: string; + /** Specifies a pattern for the 'avg' summary items displayed in a group row or in any other column rather than the parent one. */ + avgOtherColumn?: string; + /** Specifies a pattern for the 'count' summary items. */ + count?: string; + }; + /** Specifies items of the group summary. */ + groupItems?: Array<{ + /** Specifies the identifier of a summary item. */ + name?: string; + /** Specifies the column that provides data for a group summary item. */ + column?: string; + /** Customizes the text to be displayed in the summary item. */ + customizeText?: (itemInfo: { + value: any; + valueText: string; + }) => string; + /** Specifies a pattern for the summary item text. */ + displayFormat?: string; + /** Specifies a precision for the summary item value of a numeric format. */ + precision?: number; + /** Specifies whether or not a summary item must be displayed in the group footer. */ + showInGroupFooter?: boolean; + /** Specifies the column that must hold the summary item when this item is displayed in the group footer. */ + showInColumn?: string; + /** Specifies how to aggregate data for a summary item. */ + summaryType?: string; + /** Specifies a format for the summary item value. */ + valueFormat?: string; + }>; + /** Specifies items of the total summary. */ + totalItems?: Array<{ + /** Specifies the identifier of a summary item. */ + name?: string; + /** Specifies the alignment of a summary item. */ + alignment?: string; + /** Specifies the column that provides data for a summary item. */ + column?: string; + /** Specifies a CSS class to be applied to a summary item. */ + cssClass?: string; + /** Customizes the text to be displayed in the summary item. */ + customizeText?: (itemInfo: { + value: any; + valueText: string; + }) => string; + /** Specifies a pattern for the summary item text. */ + displayFormat?: string; + /** Specifies a precision for the summary item value of a numeric format. */ + precision?: number; + /** Specifies the column that must hold the summary item. */ + showInColumn?: string; + /** Specifies how to aggregate data for a summary item. */ + summaryType?: string; + /** Specifies a format for the summary item value. */ + valueFormat?: string; + }>; + /** Allows you to use a custom aggregate function to calculate the value of a summary item. */ + calculateCustomSummary?: (options: { + component: dxDataGrid; + name?: string; + value: any; + totalValue: any; + summaryProcess: string + }) => void; + }; + /** Specifies whether text that does not fit into a column should be wrapped. */ + wordWrapEnabled?: boolean; + } + /** +A data grid widget. + */ + export class dxDataGrid extends Widget { + constructor(element: JQuery, options?: dxDataGridOptions); + constructor(element: Element, options?: dxDataGridOptions); + /** Ungroups grid records. */ + clearGrouping(): void; + /** Clears sorting settings of all grid columns at once. */ + clearSorting(): void; + /** Allows you to obtain a cell by its row index and the data field of its column. */ + getCellElement(rowIndex: number, dataField: string): any; + /** Allows you to obtain a cell by its row index and the visible index of its column. */ + getCellElement(rowIndex: number, visibleColumnIndex: number): any; + /** Returns the current state of the grid. */ + state(): Object; + /** Sets the grid state. */ + state(state: Object): void; + /** Allows you to obtain the row index by a data key. */ + getRowIndexByKey(key: any): number; + /** Allows you to obtain the data key by a row index. */ + getKeyByRowIndex(rowIndex: number): any; + /** Adds a new column to a grid. */ + addColumn(columnOptions: dxDataGridColumn): void; + /** Displays the load panel. */ + beginCustomLoading(messageText: string): void; + /** Discards changes made in a grid. */ + cancelEditData(): void; + /** Clears the filter applied to grid records from code. */ + clearFilter(): void; + /** Deselects all grid records. */ + clearSelection(): void; + /** Draws the cell being edited from the editing state. Use this method when the edit mode is batch. */ + closeEditCell(): void; + /** Collapses groups or master rows in a grid. */ + collapseAll(groupIndex?: number): void; + /** Returns the number of data columns in a grid. */ + columnCount(): number; + /** Returns the value of a specific column option. */ + columnOption(id: number, optionName: string): any; + /** Sets an option of a specific column. */ + columnOption(id: number, optionName: string, optionValue: any): void; + /** Returns the options of a column by an identifier. */ + columnOption(id: any): Object; + /** Sets several options of a column at once. */ + columnOption(id: any, options: Object): void; + /** Sets a specific cell into the editing state. */ + editCell(rowIndex: number, columnIndex: number): void; + /** Sets a specific row into the editing state. */ + editRow(rowIndex: number): void; + /** Hides the load panel. */ + endCustomLoading(): void; + /** Expands groups or master rows in a grid. */ + expandAll(groupIndex: number): void; + /** Allows you to find out whether a specific group or master row is expanded or collapsed. */ + isRowExpanded(key: any): boolean; + /** Allows you to expand a specific group or master row by its key. */ + expandRow(key: any): void; + /** Allows you to collapse a specific group or master row by its key. */ + collapseRow(key: any): void; + /** Applies a filter to grid records. */ + filter(filterExpr: Array): void; + /** Gets the keys of currently selected grid records. */ + getSelectedRowKeys(): Array; + /** Gets the data objects of currently selected grid records. */ + getSelectedRowsData(): Array; + /** Hides the column chooser panel. */ + hideColumnChooser(): void; + /** Adds a new data row to a grid. */ + insertRow(): void; + /** Returns the key corresponding to the passed data object. */ + keyOf(obj: Object): any; + /** Switches a grid to a specified page. */ + pageIndex(newIndex: number): void; + /** Gets the index of the current page. */ + pageIndex(): number; + /** Sets the page size. */ + pageSize(value: number): void; + /** Gets the current page size. */ + pageSize(): number; + /** + * Recovers a row deleted in the batch edit mode. + * @deprecated Use the "undeleteRow" method instead. + */ + recoverRow(rowIndex: number): void; + /** Refreshes grid data. */ + refresh(): void; + /** Removes a specific row from a grid. */ + removeRow(rowIndex: number): void; + /** Saves changes made in a grid. */ + saveEditData(): void; + /** +Searches grid records by a search string. + */ + searchByText(text: string): void; + /** Selects all grid records. */ + selectAll(): void; + /** Selects specific grid records. */ + selectRows(keys: Array, preserve: boolean): void; + /** Deselects specific grid records. */ + deselectRows(keys: Array): void; + /** Selects grid rows by indexes. */ + selectRowsByIndexes(indexes: Array): void; + /** Allows you to find out whether a row is selected or not. */ + isRowSelected(key: any): boolean; + /** Invokes the column chooser panel. */ + showColumnChooser(): void; + startSelectionWithCheckboxes(): boolean; + /** Returns the number of records currently held by a grid. */ + totalCount(): number; + /** Recovers a row deleted in the batch edit mode. */ + undeleteRow(rowIndex: number): void; + /** Allows you to obtain a data object by its key. */ + byKey(key: any): JQueryPromise; + /** Gets the value of a total summary item. */ + getTotalSummaryValue(summaryItemName: string): any; + } +} +declare module DevExpress.viz.charts { + /** This section describes the fields and methods that can be used in code to manipulate the Series object. */ + export interface BaseSeries { + /** Provides information about the state of the series object. */ + fullState: number; + /** Returns the type of the series. */ + type: string; + /** Unselects all the selected points of the series. The points are displayed in an initial style. */ + clearSelection(): void; + /** Gets a point from the series point collection based on the specified argument. */ + getPointByArg(pointArg: any): Object; + /** Gets a point from the series point collection based on the specified point position. */ + getPointByPos(positionIndex: number): Object; + /** Selects the series. The series is displayed in a 'selected' style until another series is selected or the current series is deselected programmatically. */ + select(): void; + /** Selects the specified point. The point is displayed in a 'selected' style. */ + selectPoint(point: BasePoint): void; + /** Deselects the specified point. The point is displayed in an initial style. */ + deselectPoint(point: BasePoint): void; + /** Returns an array of all points in the series. */ + getAllPoints(): Array; + /** Returns visible series points. */ + getVisiblePoints(): Array; + } + /** This section describes the methods that can be used in code to manipulate the Point object. */ + export interface BasePoint { + /** Provides information about the state of the point object. */ + fullState: number; + /** Returns the point's argument value that was set in the data source. */ + originalArgument: any; + /** Returns the point's value that was set in the data source. */ + originalValue: any; + /** Returns the tag of the point. */ + tag: string; + /** Deselects the point. */ + clearSelection(): void; + /** Gets the color of a particular point. */ + getColor(): string; + /** Hides the tooltip of the point. */ + hideTooltip(): void; + /** Provides information about the hover state of a point. */ + isHovered(): any; + /** Provides information about the selection state of a point. */ + isSelected(): any; + /** Selects the point. The point is displayed in a 'selected' style until another point is selected or the current point is deselected programmatically. */ + select(): void; + /** Shows the tooltip of the point. */ + showTooltip(): void; + /** Allows you to obtain the label of a series point. */ + getLabel(): any; + /** Returns the series object to which the point belongs. */ + series: BaseSeries; + } + /** This section describes the fields and methods that can be used in code to manipulate the Series object. */ + export interface ChartSeries extends BaseSeries { + /** Returns the name of the series pane. */ + pane: string; + /** Returns the name of the value axis of the series. */ + axis: string; + /** Returns the name of the series. */ + name: string; + /** Returns the tag of the series. */ + tag: string; + /** Hides a particular series. */ + hide(): void; + /** Provides information about the hover state of a series. */ + isHovered(): any; + /** Provides information about the selection state of a series. */ + isSelected(): any; + /** Provides information about the visibility state of a series. */ + isVisible(): boolean; + /** Makes a particular series visible. */ + show(): void; + selectPoint(point: ChartPoint): void; + deselectPoint(point: ChartPoint): void; + getAllPoints(): Array; + getVisiblePoints(): Array; + } + /** This section describes the methods that can be used in code to manipulate the Point object. */ + export interface ChartPoint extends BasePoint { + /** Contains the close value of the point. This field is useful for points belonging to a series of the candle stick or stock type only. */ + originalCloseValue: any; + /** Contains the high value of the point. This field is useful for points belonging to a series of the candle stick or stock type only. */ + originalHighValue: any; + /** Contains the low value of the point. This field is useful for points belonging to a series of the candle stick or stock type only. */ + originalLowValue: any; + /** Contains the first value of the point. This field is useful for points belonging to a series of the range area or range bar type only. */ + originalMinValue: any; + /** Contains the open value of the point. This field is useful for points belonging to a series of the candle stick or stock type only. */ + originalOpenValue: any; + /** Contains the size of the bubble as it was set in the data source. This field is useful for points belonging to a series of the bubble type only. */ + size: any; + /** Gets the parameters of the point's minimum bounding rectangle (MBR). */ + getBoundingRect(): { x: number; y: number; width: number; height: number; }; + series: ChartSeries; + } + /** This section describes the methods that can be used in code to manipulate the Label object. */ + export interface Label { + /** Gets the parameters of the label's minimum bounding rectangle (MBR). */ + getBoundingRect(): { x: number; y: number; width: number; height: number; }; + /** Hides the point label. */ + hide(): void; + /** Shows the point label. */ + show(): void; + } + export interface PieSeries extends BaseSeries { + selectPoint(point: PiePoint): void; + deselectPoint(point: PiePoint): void; + getAllPoints(): Array; + getVisiblePoints(): Array; + } + /** This section describes the methods that can be used in code to manipulate the Point object. */ + export interface PiePoint extends BasePoint { + /** Gets the percentage value of the specific point. */ + percent: any; + /** Provides information about the visibility state of a point. */ + isVisible(): boolean; + /** Makes a specific point visible. */ + show(): void; + /** Hides a specific point. */ + hide(): void; + series: PieSeries; + } + /** This section describes the fields and methods that can be used in code to manipulate the Series object. */ + export interface PolarSeries extends BaseSeries { + /** Returns the name of the value axis of the series. */ + axis: string; + /** Returns the name of the series. */ + name: string; + /** Returns the tag of the series. */ + tag: string; + /** Hides a particular series. */ + hide(): void; + /** Provides information about the hover state of a series. */ + isHovered(): any; + /** Provides information about the selection state of a series. */ + isSelected(): any; + /** Provides information about the visibility state of a series. */ + isVisible(): boolean; + /** Makes a particular series visible. */ + show(): void; + selectPoint(point: PolarPoint): void; + deselectPoint(point: PolarPoint): void; + getAllPoints(): Array; + getVisiblePoints(): Array; + } + /** This section describes the methods that can be used in code to manipulate the Point object. */ + export interface PolarPoint extends BasePoint { + /** Gets the parameters of the point's minimum bounding rectangle (MBR). */ + getBoundingRect(): Object; + series: PolarSeries; + } + export interface Strip { + /** Specifies a color for a strip. */ + color?: string; + /** An object that defines the label configuration options of a strip. */ + label?: { + /** Specifies the text displayed in a strip. */ + text?: string; + }; + /** Specifies a start value for a strip. */ + startValue?: any; + /** Specifies an end value for a strip. */ + endValue?: any; + } + export interface BaseSeriesConfigLabel { + /** Specifies a format for arguments displayed by point labels. */ + argumentFormat?: string; + /** Specifies a precision for formatted point arguments displayed in point labels. */ + argumentPrecision?: number; + /** Specifies a background color for point labels. */ + backgroundColor?: string; + /** Specifies border options for point labels. */ + border?: viz.core.DashedBorder; + /** Specifies connector options for series point labels. */ + connector?: { + /** Specifies the color of label connectors. */ + color?: string; + /** Indicates whether or not label connectors are visible. */ + visible?: boolean; + /** Specifies the width of label connectors. */ + width?: number; + }; + /** Specifies a callback function that returns the text to be displayed by point labels. */ + customizeText?: (pointInfo: Object) => string; + /** Specifies font options for the text displayed in point labels. */ + font?: viz.core.Font; + /** Specifies a format for the text displayed by point labels. */ + format?: string; + position?: string; + /** Specifies a precision for formatted point values displayed in point labels. */ + precision?: number; + /** Specifies the angle used to rotate point labels from their initial position. */ + rotationAngle?: number; + /** Specifies the visibility of point labels. */ + visible?: boolean; + } + export interface SeriesConfigLabel extends BaseSeriesConfigLabel { + /** Specifies whether or not to show a label when the point has a zero value. */ + showForZeroValues?: boolean; + } + export interface ChartSeriesConfigLabel extends SeriesConfigLabel { + /** Specifies how to align point labels relative to the corresponding data points that they represent. */ + alignment?: string; + /** Specifies how to shift point labels horizontally from their initial positions. */ + horizontalOffset?: number; + /** Specifies how to shift point labels vertically from their initial positions. */ + verticalOffset?: number; + /** Specifies a precision for the percentage values displayed in the labels of a full-stacked-like series. */ + percentPrecision?: number; + } + export interface BaseCommonSeriesConfig { + /** Specifies the data source field that provides arguments for series points. */ + argumentField?: string; + axis?: string; + /** An object defining the label configuration options for a series in the dxChart widget. */ + label?: ChartSeriesConfigLabel; + /** Specifies border options for point labels. */ + border?: viz.core.DashedBorder; + /** Specifies a series color. */ + color?: string; + /** Specifies the dash style of the series' line. */ + dashStyle?: string; + hoverMode?: string; + /** An object defining configuration options for a hovered series. */ + hoverStyle?: { + /** An object defining the border options for a hovered series. */ + border?: viz.core.DashedBorder; + /**

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

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

Sets a color for a point when it is selected.

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

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

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

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

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

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

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

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

*/ + customizeText?: (seriesInfo: { seriesName: string; seriesIndex: number; seriesColor: string; }) => string; + /** Specifies what series elements to highlight when a corresponding item in the legend is hovered over. */ + hoverMode?: string; + } + export interface AdvancedOptions extends BaseChartOptions { + /** A handler for the argumentAxisClick event. */ + onArgumentAxisClick?: any; + /** Specifies the color of the parent page element. */ + containerBackgroundColor?: string; + /** An object providing options for managing data from a data source. */ + dataPrepareSettings?: { + /** Specifies whether or not to validate the values from a data source. */ + checkTypeForAllData?: boolean; + /** Specifies whether or not to convert the values from a data source into the data type of an axis. */ + convertToAxisDataType?: boolean; + /** Specifies how to sort the series points. */ + sortingMethod?: any; + }; + /** A handler for the legendClick event. */ + onLegendClick?: any; + /** A handler for the seriesClick event. */ + onSeriesClick?: any; + /** A handler for the seriesHoverChanged event. */ + onSeriesHoverChanged?: (e: { + component: BaseChart; + element: Element; + target: TSeries; + }) => void; + /** A handler for the seriesSelectionChanged event. */ + onSeriesSelectionChanged?: (e: { + component: BaseChart; + element: Element; + target: TSeries; + }) => void; + /** Specifies whether a single series or multiple series can be selected in the chart. */ + seriesSelectionMode?: string; + /** Specifies how the chart must behave when series point labels overlap. */ + resolveLabelOverlapping?: string; + } + export interface Legend extends AdvancedLegend { + /** Specifies whether the legend is located outside or inside the chart's plot. */ + position?: string; + } + export interface ChartTooltip extends BaseChartTooltip { + /** Specifies whether the tooltip must be located in the center of a bar or on its edge. Applies only to the Bar series. */ + location?: string; + /** Specifies the kind of information to display in a tooltip. */ + shared?: boolean; + } + export interface dxChartOptions extends AdvancedOptions { + /** Specifies a value indicating whether all bars in a series must have the same width, or may have different widths if any points in other series are missing. */ + equalBarWidth?: any; + adaptiveLayout?: { + keepLabels?: boolean; + }; + /** Indicates whether or not to synchronize value axes when they are displayed on a single pane. */ + synchronizeMultiAxes?: boolean; + /** Specifies whether or not to filter the series points depending on their quantity. */ + useAggregation?: boolean; + /** Indicates whether or not to adjust a value axis to the current minimum and maximum values of a zoomed chart. */ + adjustOnZoom?: boolean; + /** Specifies argument axis options for the dxChart widget. */ + argumentAxis?: ChartArgumentAxis; + argumentAxisClick?: any; + /** An object defining the configuration options that are common for all axes of the dxChart widget. */ + commonAxisSettings?: ChartCommonAxisSettings; + /** An object defining the configuration options that are common for all panes in the dxChart widget. */ + commonPaneSettings?: CommonPane; + /** An object defining the configuration options that are common for all series of the dxChart widget. */ + commonSeriesSettings?: CommonSeriesSettings; + /** An object that specifies the appearance options of the chart crosshair. */ + crosshair?: { + /** Specifies a color for the crosshair lines. */ + color?: string; + /** Specifies a dash style for the crosshair lines. */ + dashStyle?: string; + /** Specifies whether to enable the crosshair or not. */ + enabled?: boolean; + /** Specifies the opacity of the crosshair lines. */ + opacity?: number; + /** Specifies the width of the crosshair lines. */ + width?: number; + /** Specifies the appearance of the horizontal crosshair line. */ + horizontalLine?: CrosshaierWithLabel; + /** Specifies the appearance of the vertical crosshair line. */ + verticalLine?: CrosshaierWithLabel; + /** Specifies the options of the crosshair labels. */ + label?: { + /** Specifies a color for the background of the crosshair labels. */ + backgroundColor?: string; + /** Specifies whether the crosshair labels are visible or not. */ + visible?: boolean; + /** Specifies font options for the text of the crosshair labels. */ + font?: viz.core.Font; + } + }; + /** Specifies a default pane for the chart's series. */ + defaultPane?: string; + /** Specifies a coefficient determining the diameter of the largest bubble. */ + maxBubbleSize?: number; + /** Specifies the diameter of the smallest bubble measured in pixels. */ + minBubbleSize?: number; + /** Defines the dxChart widget's pane(s). */ + panes?: Array; + /** Swaps the axes round so that the value axis becomes horizontal and the argument axes becomes vertical. */ + rotated?: boolean; + /** Specifies the options of a chart's legend. */ + legend?: Legend; + /** Specifies options for dxChart widget series. */ + series?: Array; + legendClick?: any; + seriesClick?: any; + seriesHoverChanged?: (series: ChartSeries) => void; + seriesSelectionChanged?: (series: ChartSeries) => void; + /** Defines options for the series template. */ + seriesTemplate?: SeriesTemplate; + /** Specifies tooltip options. */ + tooltip?: ChartTooltip; + /** Specifies value axis options for the dxChart widget. */ + valueAxis?: Array; + /** Enables scrolling in your chart. */ + scrollingMode?: string; + /** Enables zooming in your chart. */ + zoomingMode?: string; + /** Specifies the settings of the scroll bar. */ + scrollBar?: { + /** Specifies whether the scroll bar is visible or not. */ + visible?: boolean; + /** Specifies the spacing between the scroll bar and the chart's plot in pixels. */ + offset?: number; + /** Specifies the color of the scroll bar. */ + color?: string; + /** Specifies the width of the scroll bar in pixels. */ + width?: number; + /** Specifies the opacity of the scroll bar. */ + opacity?: number; + /** Specifies the position of the scroll bar in the chart. */ + position?: string; + }; + } + /** A widget used to embed charts into HTML JS applications. */ + export class dxChart extends BaseChart { + constructor(element: JQuery, options?: dxChartOptions); + constructor(element: Element, options?: dxChartOptions); + /** Returns an array of all series in the chart. */ + getAllSeries(): Array; + /** Gets a series within the chart's series collection by the specified name (see the name option). */ + getSeriesByName(seriesName: string): ChartSeries; + /** Gets a series within the chart's series collection by its position number. */ + getSeriesByPos(seriesIndex: number): ChartSeries; + /** Sets the specified start and end values for the chart's argument axis. */ + zoomArgument(startValue: any, endValue: any): void; + } + interface CrosshaierWithLabel extends viz.core.DashedBorderWithOpacity { + /** Configures the label that belongs to the horizontal crosshair line. */ + label?: { + /** Specifies a color for the background of the label that belongs to the horizontal crosshair line. */ + backgroundColor?: string; + /** Specifies whether the label of the horizontal crosshair line is visible or not. */ + visible?: boolean; + /** Specifies font options for the text of the label that belongs to the horizontal crosshair line. */ + font?: viz.core.Font; + } + } + export interface PolarChartTooltip extends BaseChartTooltip { + /** Specifies the kind of information to display in a tooltip. */ + shared?: boolean; + } + export interface dxPolarChartOptions extends AdvancedOptions { + /** Specifies a value indicating whether all bars in a series must have the same angle, or may have different angles if any points in other series are missing. */ + equalBarWidth?: boolean; + /** Specifies adaptive layout options. */ + adaptiveLayout?: { + width?: number; + height?: number; + /** Specifies whether or not point labels can be hidden when the layout is adapting. */ + keepLabels?: boolean; + }; + /** Indicates whether or not to display a "spider web". */ + useSpiderWeb?: boolean; + /** Specifies argument axis options for the dxPolarChart widget. */ + argumentAxis?: PolarArgumentAxis; + /** An object defining the configuration options that are common for all axes of the dxPolarChart widget. */ + commonAxisSettings?: PolarCommonAxisSettings; + /** An object defining the configuration options that are common for all series of the dxPolarChart widget. */ + commonSeriesSettings?: CommonPolarSeriesSettings; + /** Specifies the options of a chart's legend. */ + legend?: AdvancedLegend; + /** Specifies options for dxPolarChart widget series. */ + series?: Array; + /** Defines options for the series template. */ + seriesTemplate?: PolarSeriesTemplate; + /** Specifies tooltip options. */ + tooltip?: PolarChartTooltip; + /** Specifies value axis options for the dxPolarChart widget. */ + valueAxis?: PolarValueAxis; + } + /** A chart widget displaying data in a polar coordinate system. */ + export class dxPolarChart extends BaseChart { + constructor(element: JQuery, options?: dxPolarChartOptions); + constructor(element: Element, options?: dxPolarChartOptions); + /** Returns an array of all series in the chart. */ + getAllSeries(): Array; + /** Gets a series within the chart's series collection by the specified name (see the name option). */ + getSeriesByName(seriesName: string): PolarSeries; + /** Gets a series within the chart's series collection by its position number. */ + getSeriesByPos(seriesIndex: number): PolarSeries; + } + export interface PieLegend extends core.BaseLegend { + /** Specifies what chart elements to highlight when a corresponding item in the legend is hovered over. */ + hoverMode?: string; + } + export interface dxPieChartOptions extends BaseChartOptions { + /** Specifies adaptive layout options. */ + adaptiveLayout?: { + /** Specifies whether or not point labels can be hidden when the layout is adapting. */ + keepLabels?: boolean; + }; + /** Specifies dxPieChart legend options. */ + legend?: PieLegend; + /** Specifies options for the series of the dxPieChart widget. */ + series?: Array; + /** Specifies the diameter of the pie. */ + diameter?: number; + /** A handler for the legendClick event. */ + onLegendClick?: any; + legendClick?: any; + /** Specifies how the chart must behave when series point labels overlap. */ + resolveLabelOverlapping?: string; + } + /** A circular chart widget for HTML JS applications. */ + export class dxPieChart extends BaseChart { + constructor(element: JQuery, options?: dxPieChartOptions); + constructor(element: Element, options?: dxPieChartOptions); + /** Provides access to the dxPieChart series. */ + getSeries(): PieSeries; + } +} +declare module DevExpress.viz.core { + export interface Border { + /** Sets a border color for a selected series. */ + color?: string; + /** Sets border visibility for a selected series. */ + visible?: boolean; + /** Sets a border width for a selected series. */ + width?: number; + } + export interface DashedBorder extends Border { + /** Specifies a dash style for the border of a selected series point. */ + dashStyle?: string; + } + export interface DashedBorderWithOpacity extends DashedBorder { + /** Specifies the opacity of the tooltip's border. */ + opacity?: number; + } + export interface Font { + /** Specifies the font color for a strip label. */ + color?: string; + /** Specifies the font family for a strip label. */ + family?: string; + /** Specifies the font opacity for a strip label. */ + opacity?: number; + /** Specifies the font size for a strip label. */ + size?: any; + /** Specifies the font weight for the text displayed in strips. */ + weight?: number; + } + export interface Hatching { + /** Specifies how to apply hatching to highlight a selected series. */ + direction?: string; + /** Specifies the opacity of hatching lines. */ + opacity?: number; + /** Specifies the distance between hatching lines in pixels. */ + step?: number; + /** Specifies the width of hatching lines in pixels. */ + width?: number; + } + export interface Margins { + /** Specifies the legend's bottom margin in pixels. */ + bottom?: number; + /** Specifies the legend's left margin in pixels. */ + left?: number; + /** Specifies the legend's right margin in pixels. */ + right?: number; + /** Specifies the legend's bottom margin in pixels. */ + top?: number; + } + export interface Size { + /** Specifies the width of the widget. */ + width?: number; + /** Specifies the height of the widget. */ + height?: number; + } + export interface Tooltip { + /** Specifies the length of the tooltip's arrow in pixels. */ + arrowLength?: number; + /** Specifies the appearance of the tooltip's border. */ + border?: viz.core.DashedBorderWithOpacity; + /** Specifies a color for the tooltip. */ + color?: string; + customizeText?: Function; + /** Allows you to change the appearance of particular tooltips. */ + customizeTooltip?: (arg: Object) => { color?: string; text?: string }; + /** Specifies whether or not the tooltip is enabled. */ + enabled?: boolean; + /** Specifies font options for the text displayed by the tooltip. */ + font?: Font; + /** Specifies a format for the text displayed by the tooltip. */ + format?: string; + /** Specifies the opacity of a tooltip. */ + opacity?: number; + /** Specifies a distance from the tooltip's left/right boundaries to the inner text in pixels. */ + paddingLeftRight?: number; + /** Specifies a distance from the tooltip's top/bottom boundaries to the inner text in pixels. */ + paddingTopBottom?: number; + /** Specifies a precision for formatted values displayed by the tooltip. */ + precision?: number; + /** Specifies options of the tooltip's shadow. */ + shadow?: { + /** Specifies the blur distance of the tooltip's shadow. */ + blur?: number; + /** Specifies the color of the tooltip's shadow. */ + color?: string; + /** Specifies the horizontal offset of the tooltip's shadow relative to the tooltip in pixels. */ + offsetX?: number; + /** Specifies the vertical offset of the tooltip's shadow relative to the tooltip in pixels. */ + offsetY?: number; + /** Specifies the opacity of the tooltip's shadow. */ + opacity?: number; + }; + } + export interface Animation { + /** Determines how long animation runs. */ + duration?: number; + /** Specifies the animation easing mode. */ + easing?: string; + /** Indicates whether or not animation is enabled. */ + enabled?: boolean; + } + export interface LoadingIndicator { + /** Specifies a color for the loading indicator background. */ + backgroundColor?: string; + /** Specifies font options for the loading indicator text. */ + font?: viz.core.Font; + /** Specifies whether to show the loading indicator or not. */ + show?: boolean; + /** Specifies a text to be displayed by the loading indicator. */ + text?: string; + } + export interface LegendBorder extends viz.core.DashedBorderWithOpacity { + /** Specifies a radius for the corners of the legend border. */ + cornerRadius?: number; + } + export interface BaseLegend { + /** Specifies the color of the legend's background. */ + backgroundColor?: string; + /** Specifies legend border settings. */ + border?: viz.core.LegendBorder; + /** Specifies how many columns must be taken to arrange legend items. */ + columnCount?: number; + /** Specifies the spacing between a pair of neighboring legend columns in pixels. */ + columnItemSpacing?: number; + /** Specifies whether or not item columns in the legend have an equal width. */ + equalColumnWidth?: boolean; + /** Specifies font options for legend items. */ + font?: viz.core.Font; + /** Specifies the legend's position on the map. */ + horizontalAlignment?: string; + /** Specifies the alignment of legend items. */ + itemsAlignment?: string; + /** Specifies the position of text relative to the item marker. */ + itemTextPosition?: string; + /** Specifies the distance between the legend and the container borders in pixels. */ + margin?: viz.core.Margins; + /** Specifies the size of item markers in the legend in pixels. */ + markerSize?: number; + /** Specifies whether to arrange legend items horizontally or vertically. */ + orientation?: string; + /** Specifies the spacing between the legend left/right border and legend items in pixels. */ + paddingLeftRight?: number; + /** Specifies the spacing between the legend top/bottom border and legend items in pixels. */ + paddingTopBottom?: number; + /** Specifies how many rows must be taken to arrange legend items. */ + rowCount?: number; + /** Specifies the spacing between a pair of neighboring legend rows in pixels. */ + rowItemSpacing?: number; + /** Specifies the legend's position on the map. */ + verticalAlignment?: string; + /** Specifies whether or not the legend is visible on the map. */ + visible?: boolean; + } + export interface BaseWidgetOptions { + drawn?: (widget: Object) => void; + /** A handler for the drawn event. */ + onDrawn?: (e: { + component: BaseWidget; + element: Element; + }) => void; + incidentOccured?: (incidentInfo: { + id: string; + type: string; + args: any; + text: string; + widget: string; + version: string; + }) => void; + /** A handler for the incidentOccurred event. */ + onIncidentOccurred?: ( + component: BaseWidget, + element: Element, + target: { + id: string; + type: string; + args: any; + text: string; + widget: string; + version: string; + } + ) => void; + /** Notifies a widget that it is embedded into an HTML page that uses a path modifier. */ + pathModified?: boolean; + /** Specifies whether or not the widget supports right-to-left representation. */ + rtlEnabled?: boolean; + } + /** This section describes options and methods that are common to all widgets. */ + export class BaseWidget extends DOMComponent { + /** Returns the widget's SVG markup. */ + svg(): string; + } +} +declare module DevExpress.viz.gauges { + export interface BaseRangeContainer { + /** Specifies a range container's background color. */ + backgroundColor?: string; + /** Specifies the offset of the range container from an invisible scale line in pixels. */ + offset?: number; + /** Sets the name of the palette or an array of colors to be used for coloring the gauge range container. */ + palette?: any; + /** An array of objects representing ranges contained in the range container. */ + ranges?: Array<{ startValue: number; endValue: number; color: string }>; + /** Specifies a color of a range. */ + color?: string; + /** Specifies an end value of a range. */ + endValue?: number; + /** Specifies a start value of a range. */ + startValue?: number; + } + export interface ScaleTick { + /** Specifies the color of the scale's minor ticks. */ + color?: string; + /** Specifies an array of custom minor ticks. */ + customTickValues?: Array; + /** Specifies the length of the scale's minor ticks. */ + length?: number; + /** Indicates whether automatically calculated minor ticks are visible or not. */ + showCalculatedTicks?: boolean; + /** Specifies an interval between minor ticks. */ + tickInterval?: number; + /** Indicates whether scale minor ticks are visible or not. */ + visible?: boolean; + /** Specifies the width of the scale's minor ticks. */ + width?: number; + } + export interface ScaleMajorTick extends ScaleTick { + /** Specifies whether or not to expand the current major tick interval if labels overlap each other. */ + useTicksAutoArrangement?: boolean; + } + export interface BaseScaleLabel { + /** Specifies whether or not scale labels should be colored similarly to their corresponding ranges in the range container. */ + useRangeColors?: boolean; + /** Specifies a callback function that returns the text to be displayed in scale labels. */ + customizeText?: (scaleValue: { value: number; valueText: string }) => string; + /** Specifies font options for the text displayed in the scale labels of the gauge. */ + font?: viz.core.Font; + /** Specifies a format for the text displayed in scale labels. */ + format?: string; + /** Specifies a precision for the formatted value displayed in the scale labels. */ + precision?: number; + /** Specifies whether or not scale labels are visible on the gauge. */ + visible?: boolean; + } + export interface BaseScale { + /** Specifies the end value for the scale of the gauge. */ + endValue?: number; + /** Specifies whether or not to hide the first scale label. */ + hideFirstLabel?: boolean; + /** Specifies whether or not to hide the first major tick on the scale. */ + hideFirstTick?: boolean; + /** Specifies whether or not to hide the last scale label. */ + hideLastLabel?: boolean; + /** Specifies whether or not to hide the last major tick on the scale. */ + hideLastTick?: boolean; + /** Specifies common options for scale labels. */ + label?: BaseScaleLabel; + /** Specifies options of the gauge's major ticks. */ + majorTick?: ScaleMajorTick; + /** Specifies options of the gauge's minor ticks. */ + minorTick?: ScaleTick; + /** Specifies the start value for the scale of the gauge. */ + startValue?: number; + } + export interface BaseSubvalueIndicator { + /** Specifies the length of an arrow for the subvalue indicator of the textCloud type in pixels. */ + arrowLength?: number; + /** Specifies the color of a subvalue indicator. */ + color?: string; + /** Specifies the length for a subvalue indicator of the triangleMarker type in pixels. */ + length?: number; + /** Sets the array of colors to be used for coloring the subvalue indicators. */ + palette?: Array; + /** Specifies the appearance of the text displayed in a subvalue indicator of the textCloud type. */ + text?: Object; + /** Specifies a callback function that returns the text to be displayed in a subvalue indicator of the textCloud type. */ + customizeText?: (indicatedSubvalue: { value: number; valueText: string }) => string; + /** Specifies font options for the text displayed by a subvalue indicator of the textCloud type. */ + font?: viz.core.Font; + /** Specifies a format for the text displayed in a subvalue indicator of the textCloud type. */ + format?: string; + /** Specifies a precision for the formatted value displayed in a subvalue indicator of the textCloud type. */ + precision?: number; + /** Overriden by descriptions for specific widgets. */ + type?: string; + /** Specifies the width for a subvalue indicator of the triangleMarker type in pixels. */ + width?: number; + } + export interface BaseValueIndicator { + /** Specifies the background color for the value indicator of the rangeBar type. */ + backgroundColor?: string; + /** Specifies the base value for the value indicator of the rangeBar type. */ + baseValue?: number; + /** Specifies the color of the value indicator. */ + color?: string; + /** Specifies the range bar size for a value indicator of the rangeBar type. */ + size?: number; + /** Specifies the appearance of the text displayed in a value indicator of the rangeBar type. */ + text?: { + /** Specifies a callback function that returns the text to be displayed in a value indicator of the rangeBar type. */ + customizeText?: (indicatedValue: { value: number; valueText: string }) => string; + /** Specifies font options for the text displayed by a value indicator of the rangeBar type. */ + font?: viz.core.Font; + /** Specifies a format for the text displayed in a value indicator of the rangeBar type. */ + format?: string; + /** Specifies the range bar's label indent in pixels. */ + indent?: number; + /** Specifies a precision for the formatted value displayed by a value indicator of the rangeBar type. */ + precision?: number; + }; + } + export interface SharedGaugeOptions { + /** Specifies animation options. */ + animation?: viz.core.Animation; + /** Specifies the appearance of the loading indicator. */ + loadingIndicator?: viz.core.LoadingIndicator; + /** Specifies whether to redraw the widget when the size of the parent browser window changes or a mobile device rotates. */ + redrawOnResize?: boolean; + /** Specifies the size of the widget in pixels. */ + size?: viz.core.Size; + /** Specifies a subtitle for a gauge. */ + subtitle?: { + /** Specifies font options for the subtitle. */ + font?: viz.core.Font; + /** Specifies a text for the subtitle. */ + text?: string; + }; + /** Specifies the name of the theme to be applied. */ + theme?: string; + /** Specifies a title for a gauge. */ + title?: { + /** Specifies font options for the title. */ + font?: viz.core.Font; + /** Specifies a title's position on the gauge. */ + position?: string; + /** Specifies a text for the title. */ + text?: string; + }; + /** Specifies options for gauge tooltips. */ + tooltip?: viz.core.Tooltip; + } + export interface BaseGaugeOptions extends viz.core.BaseWidgetOptions, SharedGaugeOptions { + /** Specifies the color of the parent page element. */ + containerBackgroundColor?: string; + /** Specifies the blank space in pixels between the widget's extreme elements and the boundaries of the area provided for the widget (see the size option). */ + margin?: viz.core.Margins; + /** Specifies options of the gauge's range container. */ + rangeContainer?: BaseRangeContainer; + /** Specifies a gauge's scale options. */ + scale?: BaseScale; + /** Specifies the appearance options of subvalue indicators. */ + subvalueIndicator?: BaseSubvalueIndicator; + /** Specifies a set of subvalues to be designated by the subvalue indicators. */ + subvalues?: Array; + /** Specifies the main value on a gauge. */ + value?: number; + /** Specifies the appearance options of the value indicator. */ + valueIndicator?: BaseValueIndicator; + } + /** A gauge widget. */ + export class dxBaseGauge extends viz.core.BaseWidget { + /** Displays the loading indicator. */ + showLoadingIndicator(): void; + /** Conceals the loading indicator. */ + hideLoadingIndicator(): void; + /** Redraws a widget. */ + render(): void; + /** Returns the main gauge value. */ + value(): number; + /** Updates a gauge value. */ + value(value: number): void; + /** Returns an array of gauge subvalues. */ + subvalues(): Array; + /** Updates gauge subvalues. */ + subvalues(subvalues: Array): void; + } + export interface LinearRangeContainer extends BaseRangeContainer { + /** Specifies the orientation of the range container on a vertically oriented dxLinearGauge widget. */ + horizontalOrientation?: string; + /** Specifies the orientation of a range container on a horizontally oriented dxLinearGauge widget. */ + verticalOrientation?: string; + /** Specifies the width of the range container's start and end boundaries in the dxLinearGauge widget. */ + width?: any; + /** Specifies an end width of a range container. */ + end?: number; + /** Specifies a start width of a range container. */ + start?: number; + } + export interface LinearScaleLabel extends BaseScaleLabel { + /** Specifies the spacing between scale labels and ticks. */ + indentFromTick?: number; + } + export interface LinearScale extends BaseScale { + /** Specifies the orientation of scale ticks on a vertically oriented dxLinearGauge widget. */ + horizontalOrientation?: string; + label?: LinearScaleLabel; + /** Specifies the orientation of scale ticks on a horizontally oriented dxLinearGauge widget. */ + verticalOrientation?: string; + } + export interface LinearSubvalueIndicator extends BaseSubvalueIndicator { + /** Specifies the orientation of the subvalue indicators on a vertically oriented dxLinearGauge widget. */ + horizontalOrientation?: string; + /** Specifies the distance between a subvalue indicator and an invisible scale line in pixels. */ + offset?: number; + /** Specifies the orientation of the subvalue indicators on a horizontally oriented dxLinearGauge widget. */ + verticalOrientation?: string; + } + export interface LinearValueIndicator extends BaseValueIndicator { + /** Specifies the orientation of the rangeBar value indicator on a vertically oriented dxLinearGauge widget. */ + horizontalOrientation?: string; + /** Specifies the length of a value indicator in pixels. */ + length?: number; + /** Specifies the distance between a value indicator and an invisible scale line. */ + offset?: number; + /** Specifies the type of the value indicator. */ + type?: string; + /** Specifies the orientation of the rangeBar value indicator on a horizontally oriented dxLinearGauge widget. */ + verticalOrientation?: string; + /** Specifies the width of a value indicator in pixels. */ + width?: number; + } + export interface dxLinearGaugeOptions extends BaseGaugeOptions { + /** Specifies the options required to set the geometry of the dxLinearGauge widget. */ + geometry?: { + /** Indicates whether to display the dxLinearGauge widget vertically or horizontally. */ + orientation?: string; + }; + /** Specifies gauge range container options. */ + rangeContainer?: LinearRangeContainer; + scale?: LinearScale; + subvalueIndicator?: LinearSubvalueIndicator; + valueIndicator?: LinearValueIndicator; + } + /** A widget that represents a gauge with a linear scale. */ + export class dxLinearGauge extends dxBaseGauge { + constructor(element: JQuery, options?: dxLinearGaugeOptions); + constructor(element: Element, options?: dxLinearGaugeOptions); + } + export interface CircularRangeContainer extends BaseRangeContainer { + /** Specifies the orientation of the range container in the dxCircularGauge widget. */ + orientation?: string; + /** Specifies the range container's width in pixels. */ + width?: number; + } + export interface CircularScaleLabel extends BaseScaleLabel { + /** Specifies the spacing between scale labels and ticks. */ + indentFromTick?: number; + } + export interface CircularScale extends BaseScale { + label?: CircularScaleLabel; + /** Specifies the orientation of scale ticks. */ + orientation?: string; + } + export interface CircularSubvalueIndicator extends BaseSubvalueIndicator { + /** Specifies the distance between a subvalue indicator and an invisible scale line in pixels. */ + offset?: number; + } + export interface CircularValueIndicator extends BaseValueIndicator { + /** Specifies the distance between the needle and the center of a gauge for the value indicator of needle-like types. */ + indentFromCenter?: number; + /** Specifies the distance between the value indicator and the invisible scale line. */ + offset?: number; + /** Specifies the second color for the value indicator of the twoColorNeedle type. */ + secondColor?: string; + /** Specifies the length of a twoNeedleColor type value indicator tip as a percentage. */ + secondFraction?: number; + /** Specifies the inner diameter in pixels, so that the spindle has the shape of a ring. */ + spindleGapSize?: number; + /** Specifies the spindle's diameter in pixels for the value indicator of a needle-like type. */ + spindleSize?: number; + /** Specifies the value indicator type. */ + type?: string; + /** Specifies, in pixels, the width for a value indicator of a needle-like type. */ + width?: number; + } + export interface dxCircularGaugeOptions extends BaseGaugeOptions { + /** Specifies the options required to set the geometry of the dxCircularGauge widget. */ + geometry?: { + /** Specifies the end angle of the circular gauge's arc. */ + endAngle?: number; + /** Specifies the start angle of the circular gauge's arc. */ + startAngle?: number; + }; + /** Specifies gauge range container options. */ + rangeContainer?: CircularRangeContainer; + scale?: CircularScale; + subvalueIndicator?: CircularSubvalueIndicator; + valueIndicator?: CircularValueIndicator; + } + /** A widget that represents a gauge with a circular scale. */ + export class dxCircularGauge extends dxBaseGauge { + constructor(element: JQuery, options?: dxCircularGaugeOptions); + constructor(element: Element, options?: dxCircularGaugeOptions); + } + export interface dxBarGaugeOptions extends viz.core.BaseWidgetOptions, SharedGaugeOptions { + /** Specifies a color for the remaining segment of the bar's track. */ + backgroundColor?: string; + /** Specifies a distance between bars in pixels. */ + barSpacing?: number; + /** Specifies a base value for bars. */ + baseValue?: number; + /** Specifies an end value for the gauge's invisible scale. */ + endValue?: number; + /** Defines the shape of the gauge's arc. */ + geometry?: { + /** Specifies the end angle of the bar gauge's arc. */ + endAngle?: number; + /** Specifies the start angle of the bar gauge's arc. */ + startAngle?: number; + }; + /** Specifies the options of the labels that accompany gauge bars. */ + label?: { + /** Specifies a color for the label connector text. */ + connectorColor?: string; + /** Specifies the width of the label connector in pixels. */ + connectorWidth?: number; + /** Specifies a callback function that returns a text for labels. */ + customizeText?: (barValue: { value: number; valueText: string }) => string; + /** Specifies font options for bar labels. */ + font?: viz.core.Font; + /** Specifies a format for bar labels. */ + format?: string; + /** Specifies the distance between the upper bar and bar labels in pixels. */ + indent?: number; + /** Specifies a precision for the formatted value displayed by labels. */ + precision?: number; + /** Specifies whether bar labels appear on a gauge or not. */ + visible?: boolean; + }; + /** Sets the name of the palette or an array of colors to be used for coloring the gauge range container. */ + palette?: string; + /** Defines the radius of the bar that is closest to the center relatively to the radius of the topmost bar. */ + relativeInnerRadius?: number; + /** Specifies a start value for the gauge's invisible scale. */ + startValue?: number; + /** Specifies the array of values to be indicated on a bar gauge. */ + values?: Array; + } + /** A circular bar widget. */ + export class dxBarGauge extends viz.core.BaseWidget { + constructor(element: JQuery, options?: dxBarGaugeOptions); + constructor(element: Element, options?: dxBarGaugeOptions); + /** Displays the loading indicator. */ + showLoadingIndicator(): void; + /** Conceals the loading indicator. */ + hideLoadingIndicator(): void; + /** Redraws the widget. */ + render(): void; + /** Returns an array of gauge values. */ + values(): Array; + /** Updates the values displayed by a gauge. */ + values(values: Array): void; + } +} +declare module DevExpress.viz.map { + /** This section describes the fields and methods that can be used in code to manipulate the Area object. */ + export interface Area { + /** Contains the element type. */ + type: string; + /** Return the value of an attribute. */ + attribute(name: string): any; + /** Provides information about the selection state of an area. */ + selected(): boolean; + /** Sets a new selection state for an area. */ + selected(state: boolean): void; + } + /** This section describes the fields and methods that can be used in code to manipulate the Markers object. */ + export interface Marker { + /** Contains the descriptive text accompanying the map marker. */ + text: string; + /** Contains the type of the element. */ + type: string; + /** Contains the URL of an image map marker. */ + url: string; + /** Contains the value of a bubble map marker. */ + value: number; + /** Contains the values of a pie map marker. */ + values: Array; + /** Returns the value of an attribute. */ + attribute(name: string): any; + /** Returns the coordinates of a specific marker. */ + coordinates(): Array; + /** Provides information about the selection state of a marker. */ + selected(): boolean; + /** Sets a new selection state for a marker. */ + selected(state: boolean): void; + } + export interface AreaSettings { + /** Specifies the width of the area border in pixels. */ + borderWidth?: number; + /** Specifies a color for the area border. */ + borderColor?: string; + click?: any; + /** Specifies a color for an area. */ + color?: string; + /** Specifies the function that customizes each area individually. */ + customize?: (areaInfo: Area) => AreaSettings; + /** Specifies a color for the area border when the area is hovered over. */ + hoveredBorderColor?: string; + /** Specifies the pixel-measured width of the area border when the area is hovered over. */ + hoveredBorderWidth?: number; + /** Specifies a color for an area when this area is hovered over. */ + hoveredColor?: string; + /** Specifies whether or not to change the appearance of an area when it is hovered over. */ + hoverEnabled?: boolean; + /** Configures area labels. */ + label?: { + /** Specifies the data field that provides data for area labels. */ + dataField?: string; + /** Enables area labels. */ + enabled?: boolean; + /** Specifies font options for area labels. */ + font?: viz.core.Font; + }; + /** Specifies the name of the palette or a custom range of colors to be used for coloring a map. */ + palette?: any; + /** Specifies the number of colors in a palette. */ + paletteSize?: number; + /** Allows you to paint areas with similar attributes in the same color. */ + colorGroups?: Array; + /** Specifies the field that provides data to be used for coloring areas. */ + colorGroupingField?: string; + /** Specifies a color for the area border when the area is selected. */ + selectedBorderColor?: string; + /** Specifies a color for an area when this area is selected. */ + selectedColor?: string; + /** Specifies the pixel-measured width of the area border when the area is selected. */ + selectedBorderWidth?: number; + selectionChanged?: (area: Area) => void; + /** Specifies whether single or multiple areas can be selected on a vector map. */ + selectionMode?: string; + } + export interface MarkerSettings { + /** Specifies a color for the marker border. */ + borderColor?: string; + /** Specifies the width of the marker border in pixels. */ + borderWidth?: number; + click?: any; + /** Specifies a color for a marker of the dot or bubble type. */ + color?: string; + /** Specifies the function that customizes each marker individually. */ + customize?: (markerInfo: Marker) => MarkerSettings; + font?: Object; + /** Specifies the pixel-measured width of the marker border when the marker is hovered over. */ + hoveredBorderWidth?: number; + /** Specifies a color for the marker border when the marker is hovered over. */ + hoveredBorderColor?: string; + /** Specifies a color for a marker of the dot or bubble type when this marker is hovered over. */ + hoveredColor?: string; + /** Specifies whether or not to change the appearance of a marker when it is hovered over. */ + hoverEnabled?: boolean; + /** Specifies marker label options. */ + label?: { + /** Enables marker labels. */ + enabled?: boolean; + /** Specifies font options for marker labels. */ + font?: viz.core.Font; + }; + /** Specifies the pixel-measured diameter of the marker that represents the biggest value. Setting this option makes sense only if you use markers of the bubble type. */ + maxSize?: number; + /** Specifies the pixel-measured diameter of the marker that represents the smallest value. Setting this option makes sense only if you use markers of the bubble type. */ + minSize?: number; + /** Specifies the opacity of markers. Setting this option makes sense only if you use markers of the bubble type. */ + opacity?: number; + /** Specifies the pixel-measured width of the marker border when the marker is selected. */ + selectedBorderWidth?: number; + /** Specifies a color for the marker border when the marker is selected. */ + selectedBorderColor?: string; + /** Specifies a color for a marker of the dot or bubble type when this marker is selected. */ + selectedColor?: string; + selectionChanged?: (marker: Marker) => void; + /** Specifies whether a single or multiple markers can be selected on a vector map. */ + selectionMode?: string; + /** Specifies the size of markers. Setting this option makes sense for any type of marker except bubble. */ + size?: number; + /** Specifies the type of markers to be used on the map. */ + type?: string; + /** Specifies the name of a palette or a custom set of colors to be used for coloring markers of the pie type. */ + palette?: any; + /** Allows you to paint markers with similar attributes in the same color. */ + colorGroups?: Array; + /** Specifies the field that provides data to be used for coloring markers. */ + colorGroupingField?: string; + /** Allows you to display bubbles with similar attributes in the same size. */ + sizeGroups?: Array; + /** Specifies the field that provides data to be used for sizing bubble markers. */ + sizeGroupingField?: string; + } + export interface dxVectorMapOptions extends viz.core.BaseWidgetOptions { + /** An object specifying options for the map areas. */ + areaSettings?: AreaSettings; + /** Specifies the options for the map background. */ + background?: { + /** Specifies a color for the background border. */ + borderColor?: string; + /** Specifies a color for the background. */ + color?: string; + }; + /** Specifies the positioning of a map in geographical coordinates. */ + bounds?: Array; + /** Specifies the options of the control bar. */ + controlBar?: { + /** Specifies a color for the outline of the control bar elements. */ + borderColor?: string; + /** Specifies a color for the inner area of the control bar elements. */ + color?: string; + /** Specifies whether or not to display the control bar. */ + enabled?: boolean; + /** Specifies the margin of the control bar in pixels. */ + margin?: number; + /** Specifies the position of the control bar. */ + horizontalAlignment?: string; + /** Specifies the position of the control bar. */ + verticalAlignment?: string; + }; + /** Specifies the appearance of the loading indicator. */ + loadingIndicator?: viz.core.LoadingIndicator; + /** Specifies a data source for the map area. */ + mapData?: any; + /** Specifies a data source for the map markers. */ + markers?: any; + /** An object specifying options for the map markers. */ + markerSettings?: MarkerSettings; + /** Specifies the size of the dxVectorMap widget. */ + size?: viz.core.Size; + /** Specifies the name of the theme to be applied. */ + theme?: Object; + /** Specifies tooltip options. */ + tooltip?: viz.core.Tooltip; + /** Configures map legends. */ + legends?: Array; + /** Specifies whether or not the map should respond when a user rolls the mouse wheel. */ + wheelEnabled?: boolean; + /** Specifies whether the map should respond to touch gestures. */ + touchEnabled?: boolean; + /** Disables the zooming capability. */ + zoomingEnabled?: boolean; + /** Specifies the geographical coordinates of the center for a map. */ + center?: Array; + centerChanged?: (center: Array) => void; + /** A handler for the centerChanged event. */ + onCenterChanged?: (e: { + center: Array; + component: dxVectorMap; + element: Element; + }) => void; + /** Specifies a number that is used to zoom a map initially. */ + zoomFactor?: number; + zoomFactorChanged?: (zoomFactor: number) => void; + /** A handler for the zoomFactorChanged event. */ + onZoomFactorChanged?: (e: { + zoomFactor: number; + component: dxVectorMap; + element: Element; + }) => void; + click?: any; + /** A handler for the click event. */ + onClick?: any; + /** A handler for the areaClick event. */ + onAreaClick?: any; + /** A handler for the areaSelectionChanged event. */ + onAreaSelectionChanged?: (e: { + target: Area; + component: dxVectorMap; + element: Element; + }) => void; + /** A handler for the markerClick event. */ + onMarkerClick?: any; + /** A handler for the markerSelectionChanged event. */ + onMarkerSelectionChanged?: (e: { + target: Marker; + component: dxVectorMap; + element: Element; + }) => void; + /** Disables the panning capability. */ + panningEnabled?: boolean; + } + export interface Legend extends viz.core.BaseLegend { + /** Specifies text for legend items. */ + customizeText?: (itemInfo: { start: number; end: number; index: number; color: string; size: number; }) => string; + /** Specifies text for a hint that appears when a user hovers the mouse pointer over the text of a legend item. */ + customizeHint?: (itemInfo: { start: number; end: number; index: number; color: string; size: number }) => string; + /** Specifies the source of data for the legend. */ + source?: string; + } + /** A vector map widget. */ + export class dxVectorMap extends viz.core.BaseWidget { + constructor(element: JQuery, options?: dxVectorMapOptions); + constructor(element: Element, options?: dxVectorMapOptions); + /** Displays the loading indicator. */ + showLoadingIndicator(): void; + /** Conceals the loading indicator. */ + hideLoadingIndicator(): void; + /** Redraws a widget. */ + render(): void; + /** Gets the current coordinates of the map center. */ + center(): Array; + /** Sets the coordinates of the map center. */ + center(centerCoordinates: Array): void; + /** Deselects all the selected areas on a map. The areas are displayed in their initial style after. */ + clearAreaSelection(): void; + /** Deselects all the selected markers on a map. The markers are displayed in their initial style after. */ + clearMarkerSelection(): void; + /** Deselects all the selected area and markers on a map at once. The areas and markers are displayed in their initial style after. */ + clearSelection(): void; + /** Converts client area coordinates into map coordinates. */ + convertCoordinates(x: number, y: number): Array; + /** Returns an array with all the map areas. */ + getAreas(): Array; + /** Returns an array with all the map markers. */ + getMarkers(): Array; + /** Gets the current coordinates of the map viewport. */ + viewport(): Array; + /** Sets the coordinates of the map viewport. */ + viewport(viewportCoordinates: Array): void; + /** Gets the current value of the map zoom factor. */ + zoomFactor(): number; + /** Sets the value of the map zoom factor. */ + zoomFactor(zoomFactor: number): void; + } +} +declare module DevExpress.viz.rangeSelector { + export interface dxRangeSelectorOptions extends viz.core.BaseWidgetOptions { + /** Specifies the options for the range selector's background. */ + background?: { + /** Specifies the background color for the dxRangeSelector. */ + color?: string; + /** Specifies image options. */ + image?: { + /** Specifies a location for the image in the background of a range selector. */ + location?: string; + /** Specifies the image's URL. */ + url?: string; + }; + /** Indicates whether or not the background (background color and/or image) is visible. */ + visible?: boolean; + }; + /** Specifies the dxRangeSelector's behavior options. */ + behavior?: { + /** Indicates whether or not you can swap sliders. */ + allowSlidersSwap?: boolean; + /** +Indicates whether or not animation is enabled. + */ + animationEnabled?: boolean; + /** Specifies when to call the onSelectedRangeChanged function. */ + callSelectedRangeChanged?: string; + /** Indicates whether or not an end user can specify the range using a mouse, without the use of sliders. */ + manualRangeSelectionEnabled?: boolean; + /** Indicates whether or not an end user can shift the selected range to the required location on a scale by clicking. */ + moveSelectedRangeByClick?: boolean; + /** Indicates whether to snap a slider to ticks. */ + snapToTicks?: boolean; + }; + /** Specifies the options required to display a chart as the range selector's background. */ + chart?: { + /** Specifies a coefficient for determining an indent from the bottom background boundary to the lowest chart point. */ + bottomIndent?: number; + /** An object defining the common configuration options for the chart’s series. */ + commonSeriesSettings?: viz.charts.CommonSeriesSettings; + /** An object providing options for managing data from a data source. */ + dataPrepareSettings?: { + /** Specifies whether or not to validate values from a data source. */ + checkTypeForAllData?: boolean; + /** Specifies whether or not to convert the values from a data source into the data type of an axis. */ + convertToAxisDataType?: boolean; + /** Specifies how to sort series points. */ + sortingMethod?: any; + }; + /** Specifies a value indicating whether all bars in a series must have the same width, or may have different widths if any points in other series are missing. */ + equalBarWidth?: any; + /** An object defining the chart’s series. */ + series?: Array; + /** Defines options for the series template. */ + seriesTemplate?: viz.charts.SeriesTemplate; + /** Specifies a coefficient for determining an indent from the background's top boundary to the topmost chart point. */ + topIndent?: number; + /** Specifies whether or not to filter the series points depending on their quantity. */ + useAggregation?: boolean; + /** Specifies options for the chart's value axis. */ + valueAxis?: { + /** Indicates whether or not the chart's value axis must be inverted. */ + inverted?: boolean; + /** Specifies the value to be raised to a power when generating ticks for a logarithmic value axis. */ + logarithmBase?: number; + /** Specifies the maximum value of the chart's value axis. */ + max?: number; + /** Specifies the minimum value of the chart's value axis. */ + min?: number; + /** Specifies the type of the value axis. */ + type?: string; + /** Specifies the desired type of axis values. */ + valueType?: string; + }; + }; + /** Specifies the color of the parent page element. */ + containerBackgroundColor?: string; + /** Specifies a data source for the scale values and for the chart at the background. */ + dataSource?: any; + /** Specifies the data source field that provides data for the scale. */ + dataSourceField?: string; + /** Specifies the appearance of the loading indicator. */ + loadingIndicator?: viz.core.LoadingIndicator; + /** Specifies the blank space in pixels between the dxRangeSelector widget's extreme elements and the boundaries of the area provided for the widget (see size). */ + margin?: viz.core.Margins; + /** Specifies whether to redraw the widget when the size of the parent browser window changes or a mobile device rotates. */ + redrawOnResize?: boolean; + /** Specifies options of the range selector's scale. */ + scale?: { + /** Specifies the scale's end value. */ + endValue?: any; + /** Specifies common options for scale labels. */ + label?: { + /** Specifies a callback function that returns the text to be displayed in scale labels. */ + customizeText?: (scaleValue: { value: any; valueText: string; }) => string; + /** Specifies font options for the text displayed in the range selector's scale labels. */ + font?: viz.core.Font; + /** Specifies a format for the text displayed in scale labels. */ + format?: string; + /** Specifies a precision for the formatted value displayed in the scale labels. */ + precision?: number; + /** Specifies a spacing between scale labels and the background bottom edge. */ + topIndent?: number; + /** Specifies whether or not the scale's labels are visible. */ + visible?: boolean; + }; + /** Specifies the value to be raised to a power when generating ticks for a logarithmic scale. */ + logarithmBase?: number; + /** Specifies an interval between major ticks. */ + majorTickInterval?: any; + /** Specifies options for the date-time scale's markers. */ + marker?: { + /** Defines the options that can be set for the text that is displayed by the scale markers. */ + label?: { + /** Specifies a callback function that returns the text to be displayed in scale markers. */ + customizeText?: (markerValue: { value: any; valueText: string }) => string; + /** Specifies a format for the text displayed in scale markers. */ + format?: string; + }; + /** Specifies the height of the marker's separator. */ + separatorHeight?: number; + /** Specifies the space between the marker label and the marker separator. */ + textLeftIndent?: number; + /** Specifies the space between the marker's label and the top edge of the marker's separator. */ + textTopIndent?: number; + /** Specified the indent between the marker and the scale lables. */ + topIndent?: number; + /** Indicates whether scale markers are visible. */ + visible?: boolean; + }; + /** Specifies the maximum range that can be selected. */ + maxRange?: any; + /** Specifies the number of minor ticks between neighboring major ticks. */ + minorTickCount?: number; + /** +Specifies an interval between minor ticks. + */ + minorTickInterval?: any; + /** Specifies the minimum range that can be selected. */ + minRange?: any; + /** Specifies the height of the space reserved for the scale in pixels. */ + placeholderHeight?: number; + /** Indicates whether or not to set ticks of a date-time scale at the beginning of each date-time interval. */ + setTicksAtUnitBeginning?: boolean; + /** Specifies whether or not to show ticks for the boundary scale values, when neither major ticks nor minor ticks are created for these values. */ + showCustomBoundaryTicks?: boolean; + /** Indicates whether or not to show minor ticks on the scale. */ + showMinorTicks?: boolean; + /** Specifies the scale's start value. */ + startValue?: any; + /** Specifies options defining the appearance of scale ticks. */ + tick?: { + /** Specifies the color of scale ticks (both major and minor ticks). */ + color?: string; + /** Specifies the opacity of scale ticks (both major and minor ticks). */ + opacity?: number; + /** Specifies the width of the scale's ticks (both major and minor ticks). */ + width?: number; + }; + /** Specifies the type of the scale. */ + type?: string; + /** Specifies whether or not to expand the current tick interval if labels overlap each other. */ + useTicksAutoArrangement?: boolean; + /** Specifies the type of values on the scale. */ + valueType?: string; + /** Specifies the order of arguments on a discrete scale. */ + categories?: Array; + }; + /** Specifies the range to be selected when displaying the dxRangeSelector. */ + selectedRange?: { + /** Specifies the start value of the range to be selected when displaying the dxRangeSelector widget on a page. */ + startValue?: any; + /** Specifies the end value of the range to be selected when displaying the dxRangeSelector widget on a page. */ + endValue?: any; + }; + selectedRangeChanged?: (selectedRange: { startValue: any; endValue: any; }) => void; + /** A handler for the selectedRangeChanged event. */ + onSelectedRangeChanged?: (e: { + startValue: any; + endValue: any; + component: dxRangeSelector; + element: Element; + }) => void; + /** Specifies the options of the range selector's shutters. */ + shutter?: { + /** Specifies shutter color. */ + color?: string; + /** Specifies the opacity of the color of shutters. */ + opacity?: number; + }; + /** Specifies in pixels the size of the dxRangeSelector widget. */ + size?: viz.core.Size; + /** Specifies the appearance of the range selector's slider handles. */ + sliderHandle?: { + /** Specifies the color of the slider handles. */ + color?: string; + /** Specifies the opacity of the slider handles. */ + opacity?: number; + /** Specifies the width of the slider handles. */ + width?: number; + }; + /** Defines the options of the range selector slider markers. */ + sliderMarker?: { + /** Specifies the color of the slider markers. */ + color?: string; + /** Specifies a callback function that returns the text to be displayed by slider markers. */ + customizeText?: (scaleValue: { value: any; valueText: any; }) => string; + /** Specifies font options for the text displayed by the range selector slider markers. */ + font?: viz.core.Font; + /** Specifies a format for the text displayed in slider markers. */ + format?: string; + /** Specifies the color used for the slider marker text when the currently selected range does not match the minRange and maxRange values. */ + invalidRangeColor?: string; + /** Specifies the empty space between the marker's border and the marker’s text. */ + padding?: number; + /** Specifies in pixels the height and width of the space reserved for the range selector slider markers. */ + placeholderSize?: { + /** Specifies the height of the placeholder for the left and right slider markers. */ + height?: number; + /** Specifies the width of the placeholder for the left and right slider markers. */ + width?: { + /** Specifies the width of the left slider marker's placeholder. */ + left?: number; + /** Specifies the width of the right slider marker's placeholder. */ + right?: number; + }; + }; + /** Specifies a precision for the formatted value displayed in slider markers. */ + precision?: number; + /** Indicates whether or not the slider markers are visible. */ + visible?: boolean; + }; + /** Sets the name of the theme to be used by the range selector. */ + theme?: string; + } + /** A widget that allows end users to select a range of values on a scale. */ + export class dxRangeSelector extends viz.core.BaseWidget { + constructor(element: JQuery, options?: dxRangeSelectorOptions); + constructor(element: Element, options?: dxRangeSelectorOptions); + /** Displays the loading indicator. */ + showLoadingIndicator(): void; + /** Conceals the loading indicator. */ + hideLoadingIndicator(): void; + /** Redraws a widget. */ + render(skipChartAnimation?: boolean): void; + /** Returns the currently selected range. */ + getSelectedRange(): { startValue: any; endValue: any; }; + /** Sets a specified range. */ + setSelectedRange(selectedRange: { startValue: any; endValue: any; }): void; + } +} +declare module DevExpress.viz.sparklines { + export interface SparklineTooltip extends viz.core.Tooltip { + /** Specifies how a tooltip is horizontally aligned relative to the graph. */ + horizontalAlignment?: string; + /** Specifies how a tooltip is vertically aligned relative to the graph. */ + verticalAlignment?: string; + } + export interface BaseSparklineOptions extends viz.core.BaseWidgetOptions { + /** Specifies the blank space between the widget's extreme elements and the boundaries of the area provided for the widget in pixels. */ + margin?: viz.core.Margins; + /** Specifies the size of the widget. */ + size?: viz.core.Size; + /** Specifies the name of the theme to be applied. */ + theme?: string; + /** Specifies tooltip options. */ + tooltip?: SparklineTooltip; + } + /** Overridden by descriptions for particular widgets. */ + export class BaseSparkline extends viz.core.BaseWidget { + /** Redraws a widget. */ + render(): void; + } + export interface dxBulletOptions extends BaseSparkline { + /** Specifies a color for the bullet bar. */ + color?: string; + /** Specifies an end value for the invisible scale. */ + endScaleValue?: number; + /** Specifies whether or not to show the target line. */ + showTarget?: boolean; + /** Specifies whether or not to show the line indicating zero on the invisible scale. */ + showZeroLevel?: boolean; + /** Specifies a start value for the invisible scale. */ + startScaleValue?: number; + /** Specifies the value indicated by the target line. */ + target?: number; + /** Specifies a color for both the target and zero level lines. */ + targetColor?: string; + /** Specifies the width of the target line. */ + targetWidth?: number; + /** Specifies the primary value indicated by the bullet bar. */ + value?: number; + } + /** A bullet graph widget. */ + export class dxBullet extends BaseSparkline { + constructor(element: JQuery, options?: dxBulletOptions); + constructor(element: Element, options?: dxBulletOptions); + } + export interface dxSparklineOptions extends BaseSparklineOptions { + /** Specifies the data source field that provides arguments for a sparkline. */ + argumentField?: string; + /** Sets a color for the bars indicating negative values. Available for a sparkline of the bar type only. */ + barNegativeColor?: string; + /** Sets a color for the bars indicating positive values. Available for a sparkline of the bar type only. */ + barPositiveColor?: string; + /** Specifies a data source for the sparkline. */ + dataSource?: Array; + /** Sets a color for the boundary of both the first and last points on a sparkline. */ + firstLastColor?: string; + /** Specifies whether a sparkline ignores null data points or not. */ + ignoreEmptyPoints?: boolean; + /** Sets a color for a line on a sparkline. Available for the sparklines of the line- and area-like types. */ + lineColor?: string; + /** Specifies a width for a line on a sparkline. Available for the sparklines of the line- and area-like types. */ + lineWidth?: number; + /** Sets a color for the bars indicating the values that are less than the winloss threshold. Available for a sparkline of the winloss type only. */ + lossColor?: string; + /** Sets a color for the boundary of the maximum point on a sparkline. */ + maxColor?: string; + /** Sets a color for the boundary of the minimum point on a sparkline. */ + minColor?: string; + /** Sets a color for points on a sparkline. Available for the sparklines of the line- and area-like types. */ + pointColor?: string; + /** Specifies the diameter of sparkline points in pixels. Available for the sparklines of line- and area-like types. */ + pointSize?: number; + /** Specifies a symbol to use as a point marker on a sparkline. Available for the sparklines of the line- and area-like types. */ + pointSymbol?: string; + /** Specifies whether or not to indicate both the first and last values on a sparkline. */ + showFirstLast?: boolean; + /** Specifies whether or not to indicate both the minimum and maximum values on a sparkline. */ + showMinMax?: boolean; + /** Determines the type of a sparkline. */ + type?: string; + /** Specifies the data source field that provides values for a sparkline. */ + valueField?: string; + /** Sets a color for the bars indicating the values greater than a winloss threshold. Available for a sparkline of the winloss type only. */ + winColor?: string; + /** Specifies a value that serves as a threshold for the sparkline of the winloss type. */ + winlossThreshold?: number; + } + /** A sparkline widget. */ + export class dxSparkline extends BaseSparkline { + constructor(element: JQuery, options?: dxSparklineOptions); + constructor(element: Element, options?: dxSparklineOptions); + } +} +interface JQuery { + dxProgressBar(options?: DevExpress.ui.dxProgressBarOptions): JQuery; + dxProgressBar(methodName: string, ...params: any[]): any; + dxProgressBar(methodName: "instance"): DevExpress.ui.dxProgressBar; + dxSlider(options?: DevExpress.ui.dxSliderOptions): JQuery; + dxSlider(methodName: string, ...params: any[]): any; + dxSlider(methodName: "instance"): DevExpress.ui.dxSlider; + dxRangeSlider(options?: DevExpress.ui.dxRangeSliderOptions): JQuery; + dxRangeSlider(methodName: string, ...params: any[]): any; + dxRangeSlider(methodName: "instance"): DevExpress.ui.dxRangeSlider; + dxFileUploader(options?: DevExpress.ui.dxFileUploaderOptions): JQuery; + dxFileUploader(methodName: string, ...params: any[]): any; + dxFileUploader(methodName: "instance"): DevExpress.ui.dxFileUploader; + dxValidator(): JQuery; + dxValidator(methodName: string, ...params: any[]): any; + dxValidator(methodName: "instance"): DevExpress.ui.dxValidator; + dxValidatonGroup(): JQuery; + dxValidatonGroup(methodName: string, ...params: any[]): any; + dxValidatonGroup(methodName: "instance"): DevExpress.ui.dxValidationGroup; + dxValidationSummary(): JQuery; + dxValidationSummary(methodName: string, ...params: any[]): any; + dxValidationSummary(methodName: "instance"): DevExpress.ui.dxValidationSummary; + dxTooltip(options?: DevExpress.ui.dxTooltipOptions): JQuery; + dxTooltip(methodName: string, ...params: any[]): any; + dxTooltip(methodName: "instance"): DevExpress.ui.dxTooltip; + dxDropDownList(options?: DevExpress.ui.dxDropDownListOptions): JQuery; + dxDropDownList(methodName: string, ...params: any[]): any; + dxDropDownList(methodName: "instance"): DevExpress.ui.dxDropDownList; + dxToolbar(options?: DevExpress.ui.dxToolbarOptions): JQuery; + dxToolbar(methodName: string, ...params: any[]): any; + dxToolbar(methodName: "instance"): DevExpress.ui.dxToolbar; + dxToast(options?: DevExpress.ui.dxToastOptions): JQuery; + dxToast(methodName: string, ...params: any[]): any; + dxToast(methodName: "instance"): DevExpress.ui.dxToast; + dxTextEditor(options?: DevExpress.ui.dxTextEditorOptions): JQuery; + dxTextEditor(methodName: string, ...params: any[]): any; + dxTextEditor(methodName: "instance"): DevExpress.ui.dxTextEditor; + dxTextBox(options?: DevExpress.ui.dxTextBoxOptions): JQuery; + dxTextBox(methodName: string, ...params: any[]): any; + dxTextBox(methodName: "instance"): DevExpress.ui.dxTextBox; + dxTextArea(options?: DevExpress.ui.dxTextAreaOptions): JQuery; + dxTextArea(methodName: string, ...params: any[]): any; + dxTextArea(methodName: "instance"): DevExpress.ui.dxTextArea; + dxTabs(options?: DevExpress.ui.dxTabsOptions): JQuery; + dxTabs(methodName: string, ...params: any[]): any; + dxTabs(methodName: "instance"): DevExpress.ui.dxTabs; + dxTabPanel(options?: DevExpress.ui.dxTabPanelOptions): JQuery; + dxTabPanel(methodName: string, ...params: any[]): any; + dxTabPanel(methodName: "instance"): DevExpress.ui.dxTabPanel; + dxSelectBox(options?: DevExpress.ui.dxSelectBoxOptions): JQuery; + dxSelectBox(methodName: string, ...params: any[]): any; + dxSelectBox(methodName: "instance"): DevExpress.ui.dxSelectBox; + dxScrollView(options?: DevExpress.ui.dxScrollViewOptions): JQuery; + dxScrollView(methodName: string, ...params: any[]): any; + dxScrollView(methodName: "instance"): DevExpress.ui.dxScrollView; + dxScrollable(options?: DevExpress.ui.dxScrollableOptions): JQuery; + dxScrollable(methodName: string, ...params: any[]): any; + dxScrollable(methodName: "instance"): DevExpress.ui.dxScrollable; + dxRadioGroup(options?: DevExpress.ui.dxRadioGroupOptions): JQuery; + dxRadioGroup(methodName: string, ...params: any[]): any; + dxRadioGroup(methodName: "instance"): DevExpress.ui.dxRadioGroup; + dxPopup(options?: DevExpress.ui.dxPopupOptions): JQuery; + dxPopup(methodName: string, ...params: any[]): any; + dxPopup(methodName: "instance"): DevExpress.ui.dxPopup; + dxPopover(options?: DevExpress.ui.dxPopoverOptions): JQuery; + dxPopover(methodName: string, ...params: any[]): any; + dxPopover(methodName: "instance"): DevExpress.ui.dxPopover; + dxOverlay(options?: DevExpress.ui.dxOverlayOptions): JQuery; + dxOverlay(methodName: string, ...params: any[]): any; + dxOverlay(methodName: "instance"): DevExpress.ui.dxOverlay; + dxNumberBox(options?: DevExpress.ui.dxNumberBoxOptions): JQuery; + dxNumberBox(methodName: string, ...params: any[]): any; + dxNumberBox(methodName: "instance"): DevExpress.ui.dxNumberBox; + dxNavBar(options?: DevExpress.ui.dxNavBarOptions): JQuery; + dxNavBar(methodName: string, ...params: any[]): any; + dxNavBar(methodName: "instance"): DevExpress.ui.dxNavBar; + dxMultiView(options?: DevExpress.ui.dxMultiViewOptions): JQuery; + dxMultiView(methodName: string, ...params: any[]): any; + dxMultiView(methodName: "instance"): DevExpress.ui.dxMultiView; + dxMap(options?: DevExpress.ui.dxMapOptions): JQuery; + dxMap(methodName: string, ...params: any[]): any; + dxMap(methodName: "instance"): DevExpress.ui.dxMap; + dxLookup(options?: DevExpress.ui.dxLookupOptions): JQuery; + dxLookup(methodName: string, ...params: any[]): any; + dxLookup(methodName: "instance"): DevExpress.ui.dxLookup; + dxLoadPanel(options?: DevExpress.ui.dxLoadPanelOptions): JQuery; + dxLoadPanel(methodName: string, ...params: any[]): any; + dxLoadPanel(methodName: "instance"): DevExpress.ui.dxLoadPanel; + dxLoadIndicator(options?: DevExpress.ui.dxLoadIndicatorOptions): JQuery; + dxLoadIndicator(methodName: string, ...params: any[]): any; + dxLoadIndicator(methodName: "instance"): DevExpress.ui.dxLoadIndicator; + dxList(options?: DevExpress.ui.dxListOptions): JQuery; + dxList(methodName: string, ...params: any[]): any; + dxList(methodName: "instance"): DevExpress.ui.dxList; + dxGallery(options?: DevExpress.ui.dxGalleryOptions): JQuery; + dxGallery(methodName: string, ...params: any[]): any; + dxGallery(methodName: "instance"): DevExpress.ui.dxGallery; + dxDropDownEditor(options?: DevExpress.ui.dxDropDownEditorOptions): JQuery; + dxDropDownEditor(methodName: string, ...params: any[]): any; + dxDropDownEditor(methodName: "instance"): DevExpress.ui.dxDropDownEditor; + dxDateBox(options?: DevExpress.ui.dxDateBoxOptions): JQuery; + dxDateBox(methodName: string, ...params: any[]): any; + dxDateBox(methodName: "instance"): DevExpress.ui.dxDateBox; + dxCheckBox(options?: DevExpress.ui.dxCheckBoxOptions): JQuery; + dxCheckBox(methodName: string, ...params: any[]): any; + dxCheckBox(methodName: "instance"): DevExpress.ui.dxCheckBox; + dxBox(options?: DevExpress.ui.dxBoxOptions): JQuery; + dxBox(methodName: string, ...params: any[]): any; + dxBox(methodName: "instance"): DevExpress.ui.dxBox; + dxButton(options?: DevExpress.ui.dxButtonOptions): JQuery; + dxButton(methodName: string, ...params: any[]): any; + dxButton(methodName: "instance"): DevExpress.ui.dxButton; + dxCalendar(options?: DevExpress.ui.dxCalendarOptions): JQuery; + dxCalendar(methodName: string, ...params: any[]): any; + dxCalendar(methodName: "instance"): DevExpress.ui.dxCalendar; + dxAccordion(options?: DevExpress.ui.dxAccordionOptions): JQuery; + dxAccordion(methodName: string, ...params: any[]): any; + dxAccordion(methodName: "instance"): DevExpress.ui.dxAccordion; + dxAutocomplete(options?: DevExpress.ui.dxAutocompleteOptions): JQuery; + dxAutocomplete(methodName: string, ...params: any[]): any; + dxAutocomplete(methodName: "instance"): DevExpress.ui.dxAutocomplete; + dxTileView(options?: DevExpress.ui.dxTileViewOptions): JQuery; + dxTileView(methodName: string, ...params: any[]): any; + dxTileView(methodName: "instance"): DevExpress.ui.dxTileView; + dxSwitch(options?: DevExpress.ui.dxSwitchOptions): JQuery; + dxSwitch(methodName: string, ...params: any[]): any; + dxSwitch(methodName: "instance"): DevExpress.ui.dxSwitch; + dxSlideOut(options?: DevExpress.ui.dxSlideoutOptions): JQuery; + dxSlideOut(methodName: string, ...params: any[]): any; + dxSlideOut(methodName: "instance"): DevExpress.ui.dxSlideOut; + dxPivot(options?: DevExpress.ui.dxPivotOptions): JQuery; + dxPivot(methodName: string, ...params: any[]): any; + dxPivot(methodName: "instance"): DevExpress.ui.dxPivot; + dxPanorama(options?: DevExpress.ui.dxPanoramaOptions): JQuery; + dxPanorama(methodName: string, ...params: any[]): any; + dxPanorama(methodName: "instance"): DevExpress.ui.dxPanorama; + dxActionSheet(options?: DevExpress.ui.dxActionSheetOptions): JQuery; + dxActionSheet(methodName: string, ...params: any[]): any; + dxActionSheet(methodName: "instance"): DevExpress.ui.dxActionSheet; + dxDropDownMenu(options?: DevExpress.ui.dxDropDownMenuOptions): JQuery; + dxDropDownMenu(methodName: string, ...params: any[]): any; + dxDropDownMenu(methodName: "instance"): DevExpress.ui.dxDropDownMenu; + dxTreeView(options?: DevExpress.ui.dxTreeViewOptions): JQuery; + dxTreeView(methodName: string, ...params: any[]): any; + dxTreeView(methodName: "instance"): DevExpress.ui.dxTreeView; + dxMenuBase(options?: DevExpress.ui.dxMenuBaseOptions): JQuery; + dxMenuBase(methodName: string, ...params: any[]): any; + dxMenuBase(methodName: "instance"): DevExpress.ui.dxMenuBase; + dxMenu(options?: DevExpress.ui.dxMenuOptions): JQuery; + dxMenu(methodName: string, ...params: any[]): any; + dxMenu(methodName: "instance"): DevExpress.ui.dxMenu; + dxContextMenu(options?: DevExpress.ui.dxContextMenuOptions): JQuery; + dxContextMenu(methodName: string, ...params: any[]): any; + dxContextMenu(methodName: "instance"): DevExpress.ui.dxContextMenu; + dxColorBox(options?: DevExpress.ui.dxColorBoxOptions): JQuery; + dxColorBox(methodName: string, ...params: any[]): any; + dxColorBox(methodName: "instance"): DevExpress.ui.dxColorBox; + dxDataGrid(options?: DevExpress.ui.dxDataGridOptions): JQuery; + dxDataGrid(methodName: string, ...params: any[]): any; + dxDataGrid(methodName: "instance"): DevExpress.ui.dxDataGrid; + dxChart(options?: DevExpress.viz.charts.dxChartOptions): JQuery; + dxChart(methodName: string, ...params: any[]): any; + dxChart(methodName: "instance"): DevExpress.viz.charts.dxChart; + dxPieChart(options?: DevExpress.viz.charts.dxPieChartOptions): JQuery; + dxPieChart(methodName: string, ...params: any[]): any; + dxPieChart(methodName: "instance"): DevExpress.viz.charts.dxPieChart; + dxPolarChart(options?: DevExpress.viz.charts.dxPolarChartOptions): JQuery; + dxPolarChart(methodName: string, ...params: any[]): any; + dxPolarChart(methodName: "instance"): DevExpress.viz.charts.dxPolarChart; + dxLinearGauge(options?: DevExpress.viz.gauges.dxLinearGaugeOptions): JQuery; + dxLinearGauge(methodName: string, ...params: any[]): any; + dxLinearGauge(methodName: "instance"): DevExpress.viz.gauges.dxLinearGauge; + dxCircularGauge(options?: DevExpress.viz.gauges.dxCircularGaugeOptions): JQuery; + dxCircularGauge(methodName: string, ...params: any[]): any; + dxCircularGauge(methodName: "instance"): DevExpress.viz.gauges.dxCircularGauge; + dxBarGauge(options?: DevExpress.viz.gauges.dxBarGaugeOptions): JQuery; + dxBarGauge(methodName: string, ...params: any[]): any; + dxBarGauge(methodName: "instance"): DevExpress.viz.gauges.dxBarGauge; + dxRangeSelector(options?: DevExpress.viz.rangeSelector.dxRangeSelectorOptions): JQuery; + dxRangeSelector(methodName: string, ...params: any[]): any; + dxRangeSelector(methodName: "instance"): DevExpress.viz.rangeSelector.dxRangeSelector; + dxVectorMap(options?: DevExpress.viz.map.dxVectorMapOptions): JQuery; + dxVectorMap(methodName: string, ...params: any[]): any; + dxVectorMap(methodName: "instance"): DevExpress.viz.map.dxVectorMap; + dxBullet(options?: DevExpress.viz.sparklines.dxBulletOptions): JQuery; + dxBullet(methodName: string, ...params: any[]): any; + dxBullet(methodName: "instance"): DevExpress.viz.sparklines.dxBullet; + dxSparkline(options?: DevExpress.viz.sparklines.dxSparklineOptions): JQuery; + dxSparkline(methodName: string, ...params: any[]): any; + dxSparkline(methodName: "instance"): DevExpress.viz.sparklines.dxSparkline; +} \ No newline at end of file diff --git a/dojo/README.md b/dojo/README.md index 1fa593757d..0e82ab4386 100644 --- a/dojo/README.md +++ b/dojo/README.md @@ -17,6 +17,7 @@ A normal dojo module might look something like this: define(['dojo/request', 'dojo/request/xhr'], function (request, xhr) { ... + } ); ``` @@ -24,275 +25,201 @@ A normal dojo module might look something like this: When using the TypeScript, you can write the following: ```ts - define(['dojo/request', 'dojo/request/xhr'], - function (request: dojo.request, - xhr: dojo.request.xhr) { - ... - } - ); +import request = require("dojo/request"); +import xhr = require("dojo/request/xhr"); + +... + ``` Inside of the define variable, both `request` and `xhr` will work as the functions that come from Dojo, only they are strongly typed. ## Advanced Usage - Dojo and TypeScript both use different and conflicting class semantics. This causes some issues when trying to create custom class modules that are strongly typed in other modules. The following technique is presented as **A** solution to the problem, but not necessarily the best one. Other ideas a welcomed! - - Using pure JavaScript, a class that has a base class and mixins can be defined in Dojo as follows: - - ```js - define(['dojo/_base/declare', 'dijit/_WidgetBase', 'dijit/_TemplatedMixin', 'dojo/request'], - function(dojoDeclare, _WidgetBase, _TemplatedMixin, request) { - var Foo = dojoDeclare([_WidgetBase, _TemplatedMixin], { - templateString: '
Hello TypeScript { - console.log(data); - }); - } - - } - } -``` - -This class is identical to the standard Dojo method, except that it is declared inside of a TypeScript module and it is declared using TypeScript instead of Dojo's `declare` method. Two problems arise however: -1. `Foo` has an error because it doesn't honor the interface declared by dijit._TemplatedMixin -2. `request` is undefined - -The first problem can be solved by adding the missing properties and methods, but this will only serve to clutter the code base over time. Instead, we are creating another base class that hides this requirement like so: - -```ts - module App { - export class Foo extends WidgetBaseWithTemplatedMixin { - constructor(public templateString= "
Hello TypeScript
", - public message= "") { - super(); - } - - sayMessage() { - alert(this.message); - } - - getServerInfo() { - request.get("http://dojoAndTypeScriptTogetherAtLast.html", (data: string) => { - console.log(data); - }); - } - - } - - export class WidgetBaseWithTemplatedMixin extends dijit._WidgetBase implements dijit._TemplatedMixin { - "attachScope": Object; - "searchContainerNode": boolean; - "templatePath": string; - "templateString": string; - buildRendering(): {} - destroyRendering(): {} - getCachedTemplate(templateString: String, alwaysUseString: boolean, doc: HTMLDocument): {} - - } - } -``` - -Now the base class meets TypeScript's requirements so it is happy. This class could easily be moved out to a general add-in file so that it can be created and forgotten since it is only here to make TypeScript happy. - -The second problem that we had as that `request` is undefined. This is going to take a bit more trickery as shown below: - -```ts - module App { - export class Foo extends WidgetBaseWithTemplatedMixin { - constructor(public templateString= "
Hello TypeScript
", - public message= "") { - super(); - } - - public request: dojo.request; - - sayMessage() { - alert(this.message); - } - - getServerInfo() { - this.request.get("http://dojoAndTypeScriptTogetherAtLast.html").then((data: string) => { - console.log(data); - }); - } - - } - - export class WidgetBaseWithTemplatedMixin extends dijit._WidgetBase implements dijit._TemplatedMixin { - public static getPrototype(deps: Object) { - if (deps) { - for (var i in deps) { - this.prototype[i] = deps[i]; - } - - return this.prototype; - } - } - - "attachScope": Object; - "searchContainerNode": boolean; - "templatePath": string; - "templateString": string; - buildRendering(): {} - destroyRendering(): {} - getCachedTemplate(templateString: String, alwaysUseString: boolean, doc: HTMLDocument): {} - - } - } - - - define(['dojo/_base/declare', 'dijit/_WidgetBase', 'dijit/_TemplatedMixin', 'dojo/request'], - function (dojoDeclare, _WidgetBase, _TemplatedMixin, request) { - var deps = { - request: request - }; - - var Foo = dojoDeclare([_WidgetBase, _TemplatedMixin], App.Foo.getPrototype(deps)); - - return Foo; - } - ); -``` - -Yes, I know - pretty crazy right. But, we're getting close... - -In the Dojo module, we are building an object that contains references to each of the dependencies. We are then passing that object into the static method `getPrototype` that we have added to the base class. This method takes an object literal and mixes it into the class's prototype. In this way, the module dependencies are made available to the TypeScript class via its prototype. The last thing we need to do is change the `getServerInfo()`'s call to `request` to be a `this.request` call since it is calling through its prototype instead of the ambient object that is used in Dojo. - -Okay, great. TypeScript is happy. Everything should be working right? Wrong. - -We have two more problems that are not apparent until the code is actually executed. They are both related to our usage of the `extends` keyword that we used to show that our `Foo` class extends from `dijit._WidgetBase`. - -The first problem is that, as stated previously, TypeScript has its own implementation of a class system in JavaScript. When one class extends another, TypeScript injects the following snippet into the module: +For the example, let's take this example custom Dojo widget: ```js - var __extends = this.__extends || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - __.prototype = b.prototype; - d.prototype = new __(); - }; -``` + define(["dojo/_base/declare", "dijit/_WidgetBase", "dijit/_TemplatedMixin", "dijit/_WidgetsInTemplateMixin", + "dojo/text!./templates/Foo.html", "dojo/i18n!app/common/nls/resources", + "dijit/form/TextBox"], + function(declare, _WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin, + template, res) { -This method is called in a closure that wraps the class definition and mixes the parent's prototype and owned properties into the child class. However, this won't work in our case, because our base class is `dijit._WidgetBase` which doesn't actually exist in the global namespace (where TypeScript expects it). This is because we are still using Dojo's class system (via `declare`). This is an important, and confusing, point. Our class is actually being constructed by Dojo using declare. However, we are working with the class as if it was created in the way the TypeScript expects. In short, this means that we don't actually need the `__extends` function to work, but something needs to be there so that the constructor function doesn't die. The solve is actually relatively easy: In the main HTML page, add this function before the tag that includes `dojo.js`: + templateString: template, + res: res, + myArray: null, -```js -var __extends = function (d, b) { - if (d && b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { - this.constructor = d; + constructor: function() { + this.myArray = []; + }, + + sayHello: function() { + alert(res.message.helloTypeScript); } - - __.prototype = b.prototype; - d.prototype = new __(); - } -}; + }); ``` -All this does is check to see if `d` and `b` are defined before running. Since TypeScript won't override __extends, it will allow us to override the default implementation. - -Okay, only one more thing to deal with: the call to super. This issue is also related to TypeScript's method for handling inheritance. After calling `__extends`, the generated constructor function will call the parent's constructor function. Once again, we are hit by the fact that our base class (`dijit._WidgetBase`) doesn't actually exist where TypeScript is expecting it. The only way around this is to give TypeScript something to call. This simplest thing to do is to add a no-op function for TypeScript to call. In short add this: - -```js - var dijit = dijit || {}; - dijit._WidgetBase = function() {} -``` - -Into the page after Dojo bootstraps, but before our module loads. The simplest way to do this is to create a little module that does this and added it to the array of modules loaded in the `define()` call of the module. - -Okay, so things look pretty messy right now. There are several hacks and tricks that we have to play in order to allow TypeScript and Dojo to work together. The nice thing about most of this is that it can all be shoved into a single helper module and never thought of again. Here is an example of what that module would look like: +the equivalent TypeScript version is next, explanation of each section below: ```ts - "use strict"; +/// +/// - define([], function () { }); +/// - var __extends = function (d, b) { - if (d && b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { - this.constructor = d; - } +/// +/// - __.prototype = b.prototype; - d.prototype = new __(); +declare var require: (moduleId: string) => any; + +import dojoDeclare = require("dojo/_base/declare"); +import _WidgetBase = require("dijit/_WidgetBase"); +import _TemplatedMixin = require("dijit/_TemplatedMixin"); +import _WidgetsInTemplateMixin = require("dijit/_WidgetsInTemplateMixin"); + + +// make sure to set the 'dynamic' fields of the dojo/text and dojo/i18n modules to 'false' in +// order to ensure that Dojo loads the tempalte and resources from its cache instead of trying to +// pull from the server +var template:string = require("dojo/text!./templates/Foo.html"); +var res = require("dojo/i18n!app/common/nls/resources"); + +class Foo extends dijit._WidgetBase { + constructor(args?: Object, elem?: HTMLElement) { + return new Foo_(args, elem); + super(); } - }; - window['dojo'] = {}; - window['dijit'] = { - _WidgetBase: function () { + res: any; + myArray: string[]; + + sayHello(): void { + alert(res.message.helloTypeScript); } - }; +} - module Base { - function getPrototype(type: Function, deps: Object): Object { - if (deps) { - for (var i in deps) { - type.prototype[i] = deps[i]; - } - - return this.prototype; +var Foo_ = dojoDeclare("", [_WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin], (function (Source: any) { + var result: any = {}; + result.templateString = template; + result.res = res; + result.constructor = function () { + this.myArray = []; + } + for (var i in Source.prototype) { + if (i !== "constructor" && Source.prototype.hasOwnProperty(i)) { + result[i] = Source.prototype[i]; } } - export class WidgetBaseWithTemplatedMixin extends dijit._WidgetBase implements dijit._TemplatedMixin { - public static getPrototype(deps: Object): Object { - return getPrototype(this, deps); - } + return result; +} (Foo))); - "attachScope": Object; - "searchContainerNode": boolean; - "templatePath": string; - "templateString": string; - buildRendering() { } - destroyRendering() { } - getCachedTemplate(templateString: String, alwaysUseString: boolean, doc: HTMLDocument) { } - - } - } +export =Foo; ``` -This module can then be added to whenever we have another base class / mix-in combination (e.g. dijit/_WidgetBase, dijit/_TemplatedMixin, and dijit/_WidgetsInTemplateMixin). When done this way, the only regularly visible changes that we have to do is to compose the hash of dependencies and call the `getPrototype` as the last argument to `declare`. - -## Appendix +Well, no one ever said that it would be easy... but it isn't too bad. Let's go through this one step at a time. -Examples: -* https://github.com/craigstjean/typescript-dojo-sample - +The first two lines are required due to TypeScript's inability to work with plugin-type modules. Since we need to use plugins, we use this technique. Basically, the 'amd-dependency' comments are directives to the TypeScript compiler that asks it to add the value in the "path" attribute as a dependency in the module's "define" statement. This directive, however, does not allow a variable to be assigned into the module. To obtain that, we need to add these two lines: + +```ts +var template:string = require("dojo/text!./templates/Foo.html"); +var res = require("dojo/i18n!app/common/nls/resources"); +``` + +These statements will trigger context-sensitive require calls to be made to pull the requested values from the Dojo loader's cache. Unfortunately, this usage of "require" is not recognized. In order to make this work a new function prototype must be declared, thus this line: + +```ts +declare var require: (moduleId: string) => any; +``` + +There is one more thing that we have to do in order to get the plugins to work properly. The AMD spec (that Dojo's loader adheres to) states that plugins should be loaded dynamically from the server (i.e. the loader shouldn't cache the response). This, I presume, is to allow content to be dynamically generated by the server. This, however, means that the context-sensitive require fails (since it isn't allowed to use the cache). In order correct this, the dojo/text and dojo/i18n modules must be loaded in advance and their 'dynamic' fields set to false. If your app has a single entry point, then you can create something like this (JavaScript shown): + +```js +define(["require", "dojo/dom", "dojo/text", "dojo/i18n"], + function (require, dom, text, i18n) { + + //set dojo/text and dojo/i18n to static resources to allow to be loaded via + //require() call inside of module and load cached version + text.dynamic = false; + i18n.dynamic = false; + require(["./views/ShellView"], function (ShellView) { + var shell = new ShellView(null, dom.byId("root")); + }); +}); +``` + +The main module above loads the basic modules, including dojo/text and dojo/i18n. Their dynamic fields are set to false, and then call is made to require to load pull in the application loader. By doing this in a two-step process, we can be sure that the dojo/text and dojo/i18n modules are properly configured before the application tries to make use of it. + +The rest isn't so complicated, I promise... + +The third line: +```ts +/// +``` + +is another amd-dependency call that will load a dijit/form/CheckBox. Presumeably, this control is used in the templated widget and, therefore, needs to be preloaded. Since we don't need access to it in the module, we load it this way. If we tried to use an "import" statement, the TypeScript compiler would recognize that we don't use the dependency in the module and would optimize it away. + +The next four lines: +```ts +import dojoDeclare = require("dojo/_base/declare"); +import _WidgetBase = require("dijit/_WidgetBase"); +import _TemplatedMixin = require("dijit/_TemplatedMixin"); +import _WidgetsInTemplateMixin = require("dijit/_WidgetsInTemplateMixin"); +``` +are simple requests for the AMD loader to pull in the Dojo modules that we need for the widget. All of Dojo's conventions (including relative module paths) can be used here. Notice that the dojo/_base/declare module is called "dojoDeclare"; this was done to prevent a conflict with TypeScript's "declare" keyword. + +The following is the class definition: +```ts +class Foo extends dijit._WidgetBase { + constructor(args?: Object, elem?: HTMLElement) { + return new Foo_(args, elem); + super(); + } + + res: any; + + myArray: string[]; + + sayHello(): void { + alert(res.message.helloTypeScript); + } +} +``` + +There are only three odd things going on here. + +The first is the constructor function which has a "return" statement. This means that the returned value will be used instead of a new "Foo" object. This allows us to defer to the Dojo class declaration and return that object. Also notice that we pass the arguments through to the Dojo class so that it has all of the information that it needs to properly construct the widget. + +The second odd thing is the call to super() after the return statement in the constuctor. This is just there to make the TypeScript compiler happy since it requires this whenever a class inherits from a base class (dijit._WidgetBase in this case). Since it occurs after the return statement, it is never called, but I won't tell if you don't :). + +The third odd thing is more subtle: the myArray field is declared, but never initialized. Normally, the constructor should initialize this. However, we are defering to the Dojo classes constructor. It will take the responsibility of inititializing the array. + +The final part of the module is this: + +```ts +var Foo_ = dojoDeclare("", [_WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin], (function (Source: any) { + var result: any = {}; + result.templateString = template; + result.res = res; + result.constructor = function () { + this.myArray = []; + } + for (var i in Source.prototype) { + if (i !== "constructor" && Source.prototype.hasOwnProperty(i)) { + result[i] = Source.prototype[i]; + } + } + return result; +} (Foo))); +``` + +You'll notice that the third argument to dojoDeclare is not an object literal, like you might expect. Rather, a self-executing function is used to dynamically generate the object literal. The templateString and res fields are manually set to equal the resources that were required above. Additionally, a constructor function is added to initialize the myArray array. Finally, the Foo class's prototype is inspected and all of its "ownProperties" are added. This allows the Foo class to evolved and its methods will automatically be mapped to the Dojo class. + +Mind blown? Let's try to look at it this way: + +Dojo expects things to work in a certain way and that way, in general, is fine. What we want TypeScript for is the strong typing. In order to get both, we are using a Dojo class, but implementing it in the context of a TypeScript one. + +The fact that the TypeScript class defers to the Dojo one means that we get a Dojo class instead of a TypeScript one. This means that everything that we do in the TypeScript class itself is really meaningless since it will be the Dojo class that we are working with. Here is the trick: we define the methods in the TypeScript class which provides the strong typing that we are looking for. We then point the Dojo class's methods to those implementations. In short, we are still using Dojo classes all the way down, but we implement the methods in a TypeScript class so that we get compiler and IDE support. + +Please submit any improvements to this technique. It isn't the prettiest thing ever, but it does accomplish the goal of integrating TypeScript and Dojo together. \ No newline at end of file diff --git a/dojo/dijit.d.ts b/dojo/dijit.d.ts index af1748161f..33144b9dad 100644 --- a/dojo/dijit.d.ts +++ b/dojo/dijit.d.ts @@ -106,7 +106,7 @@ declare module dijit { * @param widget * @param insertIndex Optional */ - addChild(widget: dijit._WidgetBase, insertIndex: number): void; + addChild(widget: dijit._WidgetBase, insertIndex?: number): void; /** * */ @@ -1767,7 +1767,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -2403,7 +2403,7 @@ declare module dijit { * @param eventObj Optional * @param callbackArgs Optional */ - emit(type: String, eventObj: Object, callbackArgs: any[]): any; + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Get a property from a widget. * Get a named property from a widget. The property may @@ -2463,7 +2463,7 @@ declare module dijit { * @param type Name of event (ex: "click") or extension event like touch.press. * @param func */ - on(type: String, func: Function): any; + on(type: String, func: Function): {remove:{():void}}; /** * Call specified function when event occurs, ex: myWidget.on("click", function(){ ... }). * Call specified function when event type occurs, ex: myWidget.on("click", function(){ ... }). @@ -2473,13 +2473,13 @@ declare module dijit { * @param type Name of event (ex: "click") or extension event like touch.press. * @param func */ - on(type: Function, func: Function): any; + on(type: Function, func: Function): {remove:{():void}}; /** * Track specified handles and remove/destroy them when this instance is destroyed, unless they were * already removed/destroyed manually. * */ - own(): any; + own(handle:any): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -2501,7 +2501,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: String): any; + placeAt(reference: HTMLElement, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -2512,7 +2512,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: String): any; + placeAt(reference: dijit._WidgetBase, position?: String): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -2523,7 +2523,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: String, position: number): any; + placeAt(reference: String, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -2534,7 +2534,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: HTMLElement, position: number): any; + placeAt(reference: HTMLElement, position?: number): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -2545,7 +2545,7 @@ declare module dijit { * @param reference Widget, DOMNode, or id of widget or DOMNode * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ - placeAt(reference: dijit._WidgetBase, position: number): any; + placeAt(reference: dijit._WidgetBase, position?: number): any; /** * Processing after the DOM fragment is created * Called after the DOM fragment has been created, but not necessarily @@ -2617,7 +2617,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -3331,7 +3331,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -4194,7 +4194,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -4351,7 +4351,7 @@ declare module dijit { * already removed/destroyed manually. * */ - own(): any; + own(handle:any): any; } /** * Permalink: http://dojotoolkit.org/api/1.9/dijit/CalendarLite.html @@ -5076,7 +5076,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -5721,7 +5721,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -6396,7 +6396,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -7362,7 +7362,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -8187,7 +8187,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -9281,7 +9281,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -10233,7 +10233,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -11066,7 +11066,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -11210,6 +11210,1360 @@ declare module dijit { */ onShow(): void; } + /** + * Permalink: http://dojotoolkit.org/api/1.10/dijit/_ConfirmDialogMixin.html + * + * Mixin for Dialog/TooltipDialog with OK/Cancel buttons. + * + */ + class _ConfirmDialogMixin extends dijit._WidgetsInTemplateMixin { + constructor(); + /** + * + */ + "actionBarTemplate": Object; + /** + * Label of cancel button + * + */ + "buttonCancel": string; + /** + * Label of OK button + * + */ + "buttonOk": string; + /** + * Used to provide a context require to the dojo/parser in order to be + * able to use relative MIDs (e.g. ./Widget) in the widget's template. + * + */ + "contextRequire": Function; + /** + * Should we parse the template to find widgets that might be + * declared in markup inside it? (Remove for 2.0 and assume true) + * + */ + "widgetsInTemplate": boolean; + /** + * + */ + startup(): void; + } + /** + * Permalink: http://dojotoolkit.org/api/1.10/dijit/ConfirmDialog.html + * + * A Dialog with OK/Cancel buttons. + * + * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. + * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified:use srcNodeRef.innerHTML as my contentsif this is a behavioral widget then apply behavior to that srcNodeRefotherwise, replace srcNodeRef with my generated DOM tree + */ + class ConfirmDialog extends dijit.Dialog implements dijit._ConfirmDialogMixin { + constructor(params: Object, srcNodeRef?: HTMLElement); + okButton: dijit.form.Button; + cancelButon: dijit.form.Button; + + /** + * HTML snippet to show the action bar (gray bar with OK/cancel buttons). + * Blank by default, but used by ConfirmDialog/ConfirmTooltipDialog subclasses. + * + */ + "actionBarTemplate": string; + set(property:"actionBarTemplate", value: string): void; + get(property:"actionBarTemplate"): string; + watch(property:"actionBarTemplate", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * True if mouse was pressed while over this widget, and hasn't been released yet + * + */ + "active": boolean; + set(property:"active", value: boolean): void; + get(property:"active"): boolean; + watch(property:"active", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * Object to which attach points and events will be scoped. Defaults + * to 'this'. + * + */ + "attachScope": Object; + set(property:"attachScope", value: Object): void; + get(property:"attachScope"): Object; + watch(property:"attachScope", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * Deprecated. Instead of attributeMap, widget should have a _setXXXAttr attribute + * for each XXX attribute to be mapped to the DOM. + * + * attributeMap sets up a "binding" between attributes (aka properties) + * of the widget and the widget's DOM. + * Changes to widget attributes listed in attributeMap will be + * reflected into the DOM. + * + * For example, calling set('title', 'hello') + * on a TitlePane will automatically cause the TitlePane's DOM to update + * with the new title. + * + * attributeMap is a hash where the key is an attribute of the widget, + * and the value reflects a binding to a: + * + * DOM node attribute + * focus: {node: "focusNode", type: "attribute"} + * Maps this.focus to this.focusNode.focus + * + * DOM node innerHTML + * title: { node: "titleNode", type: "innerHTML" } + * Maps this.title to this.titleNode.innerHTML + * + * DOM node innerText + * title: { node: "titleNode", type: "innerText" } + * Maps this.title to this.titleNode.innerText + * + * DOM node CSS class + * myClass: { node: "domNode", type: "class" } + * Maps this.myClass to this.domNode.className + * + * If the value is an array, then each element in the array matches one of the + * formats of the above list. + * + * There are also some shorthands for backwards compatibility: + * + * string --> { node: string, type: "attribute" }, for example: + * "focusNode" ---> { node: "focusNode", type: "attribute" } + * "" --> { node: "domNode", type: "attribute" } + * + */ + "attributeMap": Object; + set(property:"attributeMap", value: Object): void; + get(property:"attributeMap"): Object; + watch(property:"attributeMap", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * A Toggle to modify the default focus behavior of a Dialog, which + * is to focus on the first dialog element after opening the dialog. + * False will disable autofocusing. Default: true + * + */ + "autofocus": boolean; + set(property:"autofocus", value: boolean): void; + get(property:"autofocus"): boolean; + watch(property:"autofocus", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * + */ + "baseClass": string; + set(property:"baseClass", value: string): void; + get(property:"baseClass"): string; + watch(property:"baseClass", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Label of cancel button + * + */ + "buttonCancel": string; + set(property:"buttonCancel", value: string): void; + get(property:"buttonCancel"): string; + watch(property:"buttonCancel", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Label of OK button + * + */ + "buttonOk": string; + set(property:"buttonOk", value: string): void; + get(property:"buttonOk"): string; + watch(property:"buttonOk", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + */ + "class": string; + set(property:"class", value: string): void; + get(property:"class"): string; + watch(property:"class", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Dialog show [x] icon to close itself, and ESC key will close the dialog. + * + */ + "closable": boolean; + set(property:"closable", value: boolean): void; + get(property:"closable"): boolean; + watch(property:"closable", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * Designates where children of the source DOM node will be placed. + * "Children" in this case refers to both DOM nodes and widgets. + * For example, for myWidget: + * + *
+ * here's a plain DOM node + * and a widget + * and another plain DOM node + *
+ * containerNode would point to: + * + * here's a plain DOM node + * and a widget + * and another plain DOM node + * In templated widgets, "containerNode" is set via a + * data-dojo-attach-point assignment. + * + * containerNode must be defined for any widget that accepts innerHTML + * (like ContentPane or BorderContainer or even Button), and conversely + * is null for widgets that don't, like TextBox. + * + */ + "containerNode": HTMLElement; + set(property:"containerNode", value: HTMLElement): void; + get(property:"containerNode"): HTMLElement; + watch(property:"containerNode", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * The innerHTML of the ContentPane. + * Note that the initialization parameter / argument to set("content", ...) + * can be a String, DomNode, Nodelist, or _Widget. + * + */ + "content": string; + set(property:"content", value: string): void; + get(property:"content"): string; + watch(property:"content", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Used to provide a context require to the dojo/parser in order to be + * able to use relative MIDs (e.g. ./Widget) in the widget's template. + * + */ + "contextRequire": Function; + set(property:"contextRequire", value: Function): void; + get(property:"contextRequire"): Function; + watch(property:"contextRequire", callback:{(property?:string, oldValue?:Function, newValue?: Function):void}) :{unwatch():void} + /** + * + */ + "cssStateNodes": Object; + set(property:"cssStateNodes", value: Object): void; + get(property:"cssStateNodes"): Object; + watch(property:"cssStateNodes", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * Bi-directional support, as defined by the HTML DIR + * attribute. Either left-to-right "ltr" or right-to-left "rtl". If undefined, widgets renders in page's + * default direction. + * + */ + "dir": string; + set(property:"dir", value: string): void; + get(property:"dir"): string; + watch(property:"dir", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + * false - don't adjust size of children + * true - if there is a single visible child widget, set it's size to however big the ContentPane is + * + */ + "doLayout": boolean; + set(property:"doLayout", value: boolean): void; + get(property:"doLayout"): boolean; + watch(property:"doLayout", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * This is our visible representation of the widget! Other DOM + * Nodes may by assigned to other properties, usually through the + * template system's data-dojo-attach-point syntax, but the domNode + * property is the canonical "top level" node in widget UI. + * + */ + "domNode": HTMLElement; + set(property:"domNode", value: HTMLElement): void; + get(property:"domNode"): HTMLElement; + watch(property:"domNode", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * Toggles the movable aspect of the Dialog. If true, Dialog + * can be dragged by it's title. If false it will remain centered + * in the viewport. + * + */ + "draggable": boolean; + set(property:"draggable", value: boolean): void; + get(property:"draggable"): boolean; + watch(property:"draggable", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * The time in milliseconds it takes the dialog to fade in and out + * + */ + "duration": number; + set(property:"duration", value: number): void; + get(property:"duration"): number; + watch(property:"duration", callback:{(property?:string, oldValue?:number, newValue?: number):void}) :{unwatch():void} + /** + * Message that shows if an error occurs + * + */ + "errorMessage": string; + set(property:"errorMessage", value: string): void; + get(property:"errorMessage"): string; + watch(property:"errorMessage", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Extract visible content from inside of .... . + * I.e., strip and (and it's contents) from the href + * + */ + "extractContent": boolean; + set(property:"extractContent", value: boolean): void; + get(property:"extractContent"): boolean; + watch(property:"extractContent", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * This widget or a widget it contains has focus, or is "active" because + * it was recently clicked. + * + */ + "focused": boolean; + set(property:"focused", value: boolean): void; + get(property:"focused"): boolean; + watch(property:"focused", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * True if cursor is over this widget + * + */ + "hovering": boolean; + set(property:"hovering", value: boolean): void; + get(property:"hovering"): boolean; + watch(property:"hovering", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * The href of the content that displays now. + * Set this at construction if you want to load data externally when the + * pane is shown. (Set preload=true to load it immediately.) + * Changing href after creation doesn't have any effect; Use set('href', ...); + * + */ + "href": string; + set(property:"href", value: string): void; + get(property:"href"): string; + watch(property:"href", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * A unique, opaque ID string that can be assigned by users or by the + * system. If the developer passes an ID which is known not to be + * unique, the specified ID is ignored and the system-generated ID is + * used instead. + * + */ + "id": string; + set(property:"id", value: string): void; + get(property:"id"): string; + watch(property:"id", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Parameters to pass to xhrGet() request, for example: + * + *
+ * + */ + "ioArgs": Object; + set(property:"ioArgs", value: Object): void; + get(property:"ioArgs"): Object; + watch(property:"ioArgs", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * Indicates that this widget will call resize() on it's child widgets + * when they become visible. + * + */ + "isLayoutContainer": boolean; + set(property:"isLayoutContainer", value: boolean): void; + get(property:"isLayoutContainer"): boolean; + watch(property:"isLayoutContainer", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * True if the ContentPane has data in it, either specified + * during initialization (via href or inline content), or set + * via set('content', ...) / set('href', ...) + * + * False if it doesn't have any content, or if ContentPane is + * still in the process of downloading href. + * + */ + "isLoaded": boolean; + set(property:"isLoaded", value: boolean): void; + get(property:"isLoaded"): boolean; + watch(property:"isLoaded", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * Rarely used. Overrides the default Dojo locale used to render this widget, + * as defined by the HTML LANG attribute. + * Value must be among the list of locales specified during by the Dojo bootstrap, + * formatted according to RFC 3066 (like en-us). + * + */ + "lang": string; + set(property:"lang", value: string): void; + get(property:"lang"): string; + watch(property:"lang", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Message that shows while downloading + * + */ + "loadingMessage": string; + set(property:"loadingMessage", value: string): void; + get(property:"loadingMessage"): string; + watch(property:"loadingMessage", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Maximum size to allow the dialog to expand to, relative to viewport size + * + */ + "maxRatio": number; + set(property:"maxRatio", value: number): void; + get(property:"maxRatio"): number; + watch(property:"maxRatio", callback:{(property?:string, oldValue?:number, newValue?: number):void}) :{unwatch():void} + /** + * This is the dojo.Deferred returned by set('href', ...) and refresh(). + * Calling onLoadDeferred.then() registers your + * callback to be called only once, when the prior set('href', ...) call or + * the initial href parameter to the constructor finishes loading. + * + * This is different than an onLoad() handler which gets called any time any href + * or content is loaded. + * + */ + "onLoadDeferred": Object; + set(property:"onLoadDeferred", value: Object): void; + get(property:"onLoadDeferred"): Object; + watch(property:"onLoadDeferred", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * True if Dialog is currently displayed on screen. + * + */ + "open": boolean; + set(property:"open", value: boolean): void; + get(property:"open"): boolean; + watch(property:"open", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * The document this widget belongs to. If not specified to constructor, will default to + * srcNodeRef.ownerDocument, or if no sourceRef specified, then to the document global + * + */ + "ownerDocument": Object; + set(property:"ownerDocument", value: Object): void; + get(property:"ownerDocument"): Object; + watch(property:"ownerDocument", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * Parse content and create the widgets, if any. + * + */ + "parseOnLoad": boolean; + set(property:"parseOnLoad", value: boolean): void; + get(property:"parseOnLoad"): boolean; + watch(property:"parseOnLoad", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * Flag passed to parser. Root for attribute names to search for. If scopeName is dojo, + * will search for data-dojo-type (or dojoType). For backwards compatibility + * reasons defaults to dojo._scopeName (which is "dojo" except when + * multi-version support is used, when it will be something like dojo16, dojo20, etc.) + * + */ + "parserScope": string; + set(property:"parserScope", value: string): void; + get(property:"parserScope"): string; + watch(property:"parserScope", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Force load of data on initialization even if pane is hidden. + * + */ + "preload": boolean; + set(property:"preload", value: boolean): void; + get(property:"preload"): boolean; + watch(property:"preload", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * Prevent caching of data from href's by appending a timestamp to the href. + * + */ + "preventCache": boolean; + set(property:"preventCache", value: boolean): void; + get(property:"preventCache"): boolean; + watch(property:"preventCache", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * A Toggle to modify the default focus behavior of a Dialog, which + * is to re-focus the element which had focus before being opened. + * False will disable refocusing. Default: true + * + */ + "refocus": boolean; + set(property:"refocus", value: boolean): void; + get(property:"refocus"): boolean; + watch(property:"refocus", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * Refresh (re-download) content when pane goes from hidden to shown + * + */ + "refreshOnShow": boolean; + set(property:"refreshOnShow", value: boolean): void; + get(property:"refreshOnShow"): boolean; + watch(property:"refreshOnShow", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * + */ + "searchContainerNode": boolean; + set(property:"searchContainerNode", value: boolean): void; + get(property:"searchContainerNode"): boolean; + watch(property:"searchContainerNode", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * pointer to original DOM node + * + */ + "srcNodeRef": HTMLElement; + set(property:"srcNodeRef", value: HTMLElement): void; + get(property:"srcNodeRef"): HTMLElement; + watch(property:"srcNodeRef", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * Will be "Error" if one or more of the child widgets has an invalid value, + * "Incomplete" if not all of the required child widgets are filled in. Otherwise, "", + * which indicates that the form is ready to be submitted. + * + */ + "state": string; + set(property:"state", value: string): void; + get(property:"state"): string; + watch(property:"state", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + */ + "stopParser": boolean; + set(property:"stopParser", value: boolean): void; + get(property:"stopParser"): boolean; + watch(property:"stopParser", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * HTML style attributes as cssText string or name/value hash + * + */ + "style": string; + set(property:"style", value: string): void; + get(property:"style"): string; + watch(property:"style", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Path to template (HTML file) for this widget relative to dojo.baseUrl. + * Deprecated: use templateString with require([... "dojo/text!..."], ...) instead + * + */ + "templatePath": string; + set(property:"templatePath", value: string): void; + get(property:"templatePath"): string; + watch(property:"templatePath", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + */ + "templateString": string; + set(property:"templateString", value: string): void; + get(property:"templateString"): string; + watch(property:"templateString", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * HTML title attribute. + * + * For form widgets this specifies a tooltip to display when hovering over + * the widget (just like the native HTML title attribute). + * + * For TitlePane or for when this widget is a child of a TabContainer, AccordionContainer, + * etc., it's used to specify the tab label, accordion pane title, etc. In this case it's + * interpreted as HTML. + * + */ + "title": string; + set(property:"title", value: string): void; + get(property:"title"): string; + watch(property:"title", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * When this widget's title attribute is used to for a tab label, accordion pane title, etc., + * this specifies the tooltip to appear when the mouse is hovered over that text. + * + */ + "tooltip": string; + set(property:"tooltip", value: string): void; + get(property:"tooltip"): string; + watch(property:"tooltip", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Should we parse the template to find widgets that might be + * declared in markup inside it? (Remove for 2.0 and assume true) + * + */ + "widgetsInTemplate": boolean; + set(property:"widgetsInTemplate", value: boolean): void; + get(property:"widgetsInTemplate"): boolean; + watch(property:"widgetsInTemplate", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * Makes the given widget a child of this widget. + * Inserts specified child widget's dom node as a child of this widget's + * container node, and possibly does other processing (such as layout). + * + * @param widget + * @param insertIndex Optional + */ + addChild(widget: dijit._WidgetBase, insertIndex: number): void; + /** + * This method is deprecated, use get() or set() directly. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + */ + attr(name: String, value: Object): any; + /** + * This method is deprecated, use get() or set() directly. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + */ + attr(name: Object, value: Object): any; + /** + * + */ + buildRendering(): void; + /** + * Cancels an in-flight download of content + * + */ + cancel(): void; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: String, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: String, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: Function, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: Function, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: String, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: String, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: Function, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: Function, method: Function): any; + /** + * You can call this function directly, ex. in the event that you + * programmatically add a widget to the form after the form has been + * initialized. + * + * @param inStartup + */ + connectChildren(inStartup: boolean): void; + /** + * + * @param params + * @param srcNodeRef + */ + create(params: any, srcNodeRef: any): void; + /** + * Wrapper to setTimeout to avoid deferred functions executing + * after the originating widget has been destroyed. + * Returns an object handle with a remove method (that returns null) (replaces clearTimeout). + * + * @param fcn Function reference. + * @param delay OptionalDelay, defaults to 0. + */ + defer(fcn: Function, delay: number): Object; + /** + * + */ + destroy(): void; + /** + * Destroy all the widgets inside the ContentPane and empty containerNode + * + * @param preserveDom + */ + destroyDescendants(preserveDom: boolean): void; + /** + * Destroy the ContentPane and its contents + * + * @param preserveDom + */ + destroyRecursive(preserveDom: boolean): void; + /** + * Destroys the DOM nodes associated with this widget. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. + */ + destroyRendering(preserveDom: boolean): void; + /** + * Deprecated, will be removed in 2.0, use handle.remove() instead. + * + * Disconnects handle created by connect. + * + * @param handle + */ + disconnect(handle: any): void; + /** + * Deprecated method. Applications no longer need to call this. Remove for 2.0. + * + */ + disconnectChildren(): void; + /** + * Used by widgets to signal that a synthetic event occurred, ex: + * + * myWidget.emit("attrmodified-selectedChildWidget", {}). + * Emits an event on this.domNode named type.toLowerCase(), based on eventObj. + * Also calls onType() method, if present, and returns value from that method. + * By default passes eventObj to callback, but will pass callbackArgs instead, if specified. + * Modifies eventObj by adding missing parameters (bubbles, cancelable, widget). + * + * @param type + * @param eventObj Optional + * @param callbackArgs Optional + */ + emit(type: String, eventObj: Object, callbackArgs: any[]): any; + /** + * Callback when the user hits the submit button. + * Override this method to handle Dialog execution. + * After the user has pressed the submit button, the Dialog + * first calls onExecute() to notify the container to hide the + * dialog and restore focus to wherever it used to be. + * + * Then this method is called. + * + * @param formContents + */ + execute(formContents: Object): void; + /** + * + */ + focus(): void; + /** + * Get a property from a widget. + * Get a named property from a widget. The property may + * potentially be retrieved via a getter method. If no getter is defined, this + * just retrieves the object's property. + * + * For example, if the widget has properties foo and bar + * and a method named _getFooAttr(), calling: + * myWidget.get("foo") would be equivalent to calling + * widget._getFooAttr() and myWidget.get("bar") + * would be equivalent to the expression + * widget.bar2 + * + * @param name The property to get. + */ + get(name: any): any; + /** + * Returns all direct children of this widget, i.e. all widgets underneath this.containerNode whose parent + * is this widget. Note that it does not return all descendants, but rather just direct children. + * Analogous to Node.childNodes, + * except containing widgets rather than DOMNodes. + * + * The result intentionally excludes internally created widgets (a.k.a. supporting widgets) + * outside of this.containerNode. + * + * Note that the array returned is a simple array. Application code should not assume + * existence of methods like forEach(). + * + */ + getChildren(): any[]; + /** + * Returns all the widgets contained by this, i.e., all widgets underneath this.containerNode. + * This method should generally be avoided as it returns widgets declared in templates, which are + * supposed to be internal/hidden, but it's left here for back-compat reasons. + * + */ + getDescendants(): any[]; + /** + * Gets the index of the child in this container or -1 if not found + * + * @param child + */ + getIndexOfChild(child: dijit._WidgetBase): any; + /** + * Returns the parent widget of this widget. + * + */ + getParent(): any; + /** + * + */ + getValues(): any; + /** + * Returns true if widget has child widgets, i.e. if this.containerNode contains widgets. + * + */ + hasChildren(): boolean; + /** + * Hide the dialog + * + */ + hide(): any; + /** + * Function that should grab the content specified via href. + * + * @param args An object with the following properties:handleAs (String, optional): Acceptable values are: text (default), json, json-comment-optional,json-comment-filtered, javascript, xml. See dojo/_base/xhr.contentHandlerssync (Boolean, optional): false is default. Indicates whether the request shouldbe a synchronous (blocking) request.headers (Object, optional): Additional HTTP headers to send in the request.failOk (Boolean, optional): false is default. Indicates whether a request should beallowed to fail (and therefore no console error message inthe event of a failure)contentType (String|Boolean): "application/x-www-form-urlencoded" is default. Set to false toprevent a Content-Type header from being sent, or to a stringto send a different Content-Type.load: This function will becalled on a successful HTTP response code.error: This function willbe called when the request fails due to a network or server error, the urlis invalid, etc. It will also be called if the load or handle callback throws anexception, unless djConfig.debugAtAllCosts is true. This allows deployed applicationsto continue to run even when a logic error happens in the callback, while makingit easier to troubleshoot while in debug mode.handle: This function willbe called at the end of every request, whether or not an error occurs.url (String): URL to server endpoint.content (Object, optional): Contains properties with string values. Theseproperties will be serialized as name1=value2 andpassed in the request.timeout (Integer, optional): Milliseconds to wait for the response. If this timepasses, the then error callbacks are called.form (DOMNode, optional): DOM node for a form. Used to extract the form valuesand send to the server.preventCache (Boolean, optional): Default is false. If true, then a"dojo.preventCache" parameter is sent in the requestwith a value that changes with each request(timestamp). Useful only with GET-type requests.rawBody (String, optional): Sets the raw body for an HTTP request. If this is used, then the contentproperty is ignored. This is mostly useful for HTTP methods that havea body to their requests, like PUT or POST. This property can be used insteadof postData and putData for dojo/_base/xhr.rawXhrPost and dojo/_base/xhr.rawXhrPut respectively.ioPublish (Boolean, optional): Set this explicitly to false to prevent publishing of topics related toIO operations. Otherwise, if djConfig.ioPublish is set to true, topicswill be published via dojo/topic.publish() for different phases of an IO operation.See dojo/main.__IoPublish for a list of topics that are published. + */ + ioMethod(args: Object): any; + /** + * Return true if this widget can currently be focused + * and false if not + * + */ + isFocusable(): any; + /** + * Return this widget's explicit or implicit orientation (true for LTR, false for RTL) + * + */ + isLeftToRight(): any; + /** + * Returns true if all of the widgets are valid. + * Deprecated, will be removed in 2.0. Use get("state") instead. + * + */ + isValid: {(): boolean}; + /** + * + * @param params + * @param node + * @param ctor + */ + markupFactory(params: any, node: any, ctor: any): any; + /** + * + * @param type protected + * @param func + */ + on(type: String, func: Function): any; + /** + * + * @param type protected + * @param func + */ + on(type: Function, func: Function): any; + /** + * Track specified handles and remove/destroy them when this instance is destroyed, unless they were + * already removed/destroyed manually. + * + */ + own(): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, DocumentFragment, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: String, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, DocumentFragment, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: HTMLElement, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, DocumentFragment, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: dijit._WidgetBase, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, DocumentFragment, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: String, position: number): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, DocumentFragment, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: HTMLElement, position: number): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, DocumentFragment, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: dijit._WidgetBase, position: number): any; + /** + * + */ + postCreate(): void; + /** + * + */ + postMixInProperties(): void; + /** + * [Re]download contents of href and display + * cancels any currently in-flight requests + * posts "loading..." message + * sends XHR to download new data + * + */ + refresh(): any; + /** + * Removes the passed widget instance from this widget but does + * not destroy it. You can also pass in an integer indicating + * the index within the container to remove (ie, removeChild(5) removes the sixth widget). + * + * @param widget + */ + removeChild(widget: dijit._WidgetBase): void; + /** + * Removes the passed widget instance from this widget but does + * not destroy it. You can also pass in an integer indicating + * the index within the container to remove (ie, removeChild(5) removes the sixth widget). + * + * @param widget + */ + removeChild(widget: number): void; + /** + * + */ + reset(): void; + /** + * See dijit/layout/_LayoutWidget.resize() for description. + * Although ContentPane doesn't extend _LayoutWidget, it does implement + * the same API. + * + * @param changeSize + * @param resultSize + */ + resize(changeSize: any, resultSize: any): void; + /** + * Set a property on a widget + * Sets named properties on a widget which may potentially be handled by a + * setter in the widget. + * + * For example, if the widget has properties foo and bar + * and a method named _setFooAttr(), calling + * myWidget.set("foo", "Howdy!") would be equivalent to calling + * widget._setFooAttr("Howdy!") and myWidget.set("bar", 3) + * would be equivalent to the statement widget.bar = 3; + * + * set() may also be called with a hash of name/value pairs, ex: + * + * myWidget.set({ + * foo: "Howdy", + * bar: 3 + * }); + * This is equivalent to calling set(foo, "Howdy") and set(bar, 3) + * + * @param name The property to set. + * @param value The value to set in the property. + */ + set(name: any, value: any): any; + /** + * Deprecated. Use set() instead. + * + * @param attr + * @param value + */ + setAttribute(attr: String, value: any): void; + /** + * Deprecated. Use set('content', ...) instead. + * + * @param data + */ + setContent(data: String): void; + /** + * Deprecated. Use set('content', ...) instead. + * + * @param data + */ + setContent(data: HTMLElement): void; + /** + * Deprecated. Use set('content', ...) instead. + * + * @param data + */ + setContent(data: NodeList): void; + /** + * Deprecated. Use set('href', ...) instead. + * + * @param href + */ + setHref(href: String): any; + /** + * Deprecated. Use set('href', ...) instead. + * + * @param href + */ + setHref(href: URL): any; + /** + * + * @param val + */ + setValues(val: any): any; + /** + * Display the dialog + * + */ + show(): any; + /** + * Call startup() on all children including non _Widget ones like dojo/dnd/Source objects + * + */ + startup(): void; + /** + * Deprecated, will be removed in 2.0, use this.own(topic.subscribe()) instead. + * + * Subscribes to the specified topic and calls the specified method + * of this object and registers for unsubscribe() on widget destroy. + * + * Provide widget-specific analog to dojo.subscribe, except with the + * implicit use of this widget as the target object. + * + * @param t The topic + * @param method The callback + */ + subscribe(t: String, method: Function): any; + /** + * Returns a string that represents the widget. + * When a widget is cast to a string, this method will be used to generate the + * output. Currently, it does not implement any sort of reversible + * serialization. + * + */ + toString(): string; + /** + * Deprecated. Override destroy() instead to implement custom widget tear-down + * behavior. + * + */ + uninitialize(): boolean; + /** + * Deprecated, will be removed in 2.0, use handle.remove() instead. + * + * Unsubscribes handle created by this.subscribe. + * Also removes handle from this widget's list of subscriptions + * + * @param handle + */ + unsubscribe(handle: Object): void; + /** + * returns if the form is valid - same as isValid - but + * provides a few additional (ui-specific) features: + * + * it will highlight any sub-widgets that are not valid + * it will call focus() on the first invalid sub-widget + * + */ + validate(): any; + /** + * Watches a property for changes + * + * @param name OptionalIndicates the property to watch. This is optional (the callback may be theonly parameter), and if omitted, all the properties will be watched + * @param callback The function to execute when the property changes. This will be called afterthe property has been changed. The callback will be called with the |this|set to the instance, the first argument as the name of the property, thesecond argument as the old value and the third argument as the new value. + */ + watch(property: string, callback:{(property?:string, oldValue?:any, newValue?: any):void}) :{unwatch():void}; + /** + * Static method to get a template based on the templatePath or + * templateString key + */ + getCachedTemplate(): any; + /** + * Called when the widget stops being "active" because + * focus moved to something outside of it, or the user + * clicked somewhere outside of it, or the widget was + * hidden. + * + */ + onBlur(): void; + /** + * Called when user has pressed the Dialog's cancel button, to notify container. + * Developer shouldn't override or connect to this method; + * it's a private communication device between the TooltipDialog + * and the thing that opened it (ex: dijit/form/DropDownButton) + * + */ + onCancel(): void; + /** + * Connect to this function to receive notifications of mouse click events. + * + * @param event mouse Event + */ + onClick(event: any): void; + /** + * Called when this widget is being displayed as a popup (ex: a Calendar popped + * up from a DateTextBox), and it is hidden. + * This is called from the dijit.popup code, and should not be called directly. + * + * Also used as a parameter for children of dijit/layout/StackContainer or subclasses. + * Callback if a user tries to close the child. Child will be closed if this function returns true. + * + */ + onClose(): boolean; + /** + * Called on DOM faults, require faults etc. in content. + * + * In order to display an error message in the pane, return + * the error message from this method, as an HTML string. + * + * By default (if this method is not overriden), it returns + * nothing, so the error message is just printed to the console. + * + * @param error + */ + onContentError(error: Error): void; + /** + * Connect to this function to receive notifications of mouse double click events. + * + * @param event mouse Event + */ + onDblClick(event: any): void; + /** + * Called when download is finished. + * + */ + onDownloadEnd(): void; + /** + * Called when download error occurs. + * + * In order to display an error message in the pane, return + * the error message from this method, as an HTML string. + * + * Default behavior (if this method is not overriden) is to display + * the error message inside the pane. + * + * @param error + */ + onDownloadError(error: Error): any; + /** + * Called before download starts. + * The string returned by this function will be the html + * that tells the user we are loading something. + * Override with your own function if you want to change text. + * + */ + onDownloadStart(): any; + /** + * Called when user has pressed the dialog's OK button, to notify container. + * Developer shouldn't override or connect to this method; + * it's a private communication device between the TooltipDialog + * and the thing that opened it (ex: dijit/form/DropDownButton) + * + */ + onExecute(): void; + /** + * Called when the widget becomes "active" because + * it or a widget inside of it either has focus, or has recently + * been clicked. + * + */ + onFocus(): void; + /** + * Called when another widget becomes the selected pane in a + * dijit/layout/TabContainer, dijit/layout/StackContainer, + * dijit/layout/AccordionContainer, etc. + * + * Also called to indicate hide of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. + * + */ + onHide(): void; + /** + * Connect to this function to receive notifications of keys being pressed down. + * + * @param event key Event + */ + onKeyDown(event: any): void; + /** + * Connect to this function to receive notifications of printable keys being typed. + * + * @param event key Event + */ + onKeyPress(event: any): void; + /** + * Connect to this function to receive notifications of keys being released. + * + * @param event key Event + */ + onKeyUp(event: any): void; + /** + * Event hook, is called after everything is loaded and widgetified + * + * @param data + */ + onLoad(data: any): void; + /** + * Connect to this function to receive notifications of when the mouse button is pressed down. + * + * @param event mouse Event + */ + onMouseDown(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves onto this widget. + * + * @param event mouse Event + */ + onMouseEnter(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves off of this widget. + * + * @param event mouse Event + */ + onMouseLeave(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves over nodes contained within this widget. + * + * @param event mouse Event + */ + onMouseMove(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves off of nodes contained within this widget. + * + * @param event mouse Event + */ + onMouseOut(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves onto nodes contained within this widget. + * + * @param event mouse Event + */ + onMouseOver(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse button is released. + * + * @param event mouse Event + */ + onMouseUp(event: any): void; + /** + * Called when this widget becomes the selected pane in a + * dijit/layout/TabContainer, dijit/layout/StackContainer, + * dijit/layout/AccordionContainer, etc. + * + * Also called to indicate display of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. + * + */ + onShow(): void; + /** + * Event hook, is called before old content is cleared + * + */ + onUnload(): void; + /** + * Stub function to connect to if you want to do something + * (like disable/enable a submit button) when the valid + * state changes on the form as a whole. + * + * Deprecated. Will be removed in 2.0. Use watch("state", ...) instead. + * + * @param isValid + */ + onValidStateChange(isValid: boolean): void; + } + /** * Permalink: http://dojotoolkit.org/api/1.9/dijit/Dialog.html * @@ -12254,7 +13608,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -13516,7 +14870,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -14734,7 +16088,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -15793,7 +17147,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -16943,7 +18297,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -17813,7 +19167,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -18639,7 +19993,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -19443,7 +20797,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -20350,7 +21704,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -21453,7 +22807,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Detach menu from given node * @@ -22410,7 +23764,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -23327,7 +24681,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -24249,7 +25603,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -25156,7 +26510,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -26023,7 +27377,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -26976,7 +28330,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -27896,7 +29250,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -28778,7 +30132,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -29621,7 +30975,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -30422,7 +31776,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -31527,7 +32881,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -32681,7 +34035,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -34051,7 +35405,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -35049,7 +36403,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -36491,7 +37845,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -37654,7 +39008,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -38525,7 +39879,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -39398,7 +40752,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -40267,7 +41621,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -43574,7 +44928,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -44919,7 +46273,7 @@ declare module dijit { * Returns widget as a printable string using the widget's value * */ - toString(): String; + toString(): string; /** * Restore the value to the last value passed to onChange * @@ -46129,7 +47483,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Restore the value to the last value passed to onChange * @@ -46320,7 +47674,7 @@ declare module dijit { * Whether or not this specific option is disabled * */ - disabled: boolean; + disabled?: boolean; /** * The label for our option. It can contain html tags. * @@ -46330,7 +47684,7 @@ declare module dijit { * Whether or not we are a selected option * */ - selected: boolean; + selected?: boolean; /** * The value of the option. Setting to empty (or missing) will * place a separator at that location @@ -47157,7 +48511,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Restore the value to the last value passed to onChange * @@ -48115,7 +49469,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -49652,7 +51006,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -51016,7 +52370,7 @@ declare module dijit { * Returns widget as a printable string using the widget's value * */ - toString(): String; + toString(): string; /** * Restore the value to the last value passed to onChange * @@ -52058,7 +53412,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -53150,7 +54504,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -54606,7 +55960,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Restore the value to the last value passed to onChange * @@ -55877,7 +57231,7 @@ declare module dijit { * Returns widget as a printable string using the widget's value * */ - toString(): String; + toString(): string; /** * Restore the value to the last value passed to onChange * @@ -56843,7 +58197,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -57974,7 +59328,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -59283,7 +60637,7 @@ declare module dijit { * Returns widget as a printable string using the widget's value * */ - toString(): String; + toString(): string; /** * Restore the value to the last value passed to onChange * @@ -60137,7 +61491,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -61599,7 +62953,7 @@ declare module dijit { * Returns widget as a printable string using the widget's value * */ - toString(): String; + toString(): string; /** * */ @@ -62509,7 +63863,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -63539,7 +64893,7 @@ declare module dijit { * @param value * @param constraints */ - parse(value: String, constraints: Object): String; + parse(value: String, constraints?: Object): any; /** * Place this widget somewhere in the DOM based * on standard domConstruct.place() conventions. @@ -63702,7 +65056,7 @@ declare module dijit { * Returns widget as a printable string using the widget's value * */ - toString(): String; + toString(): string; /** * Restore the value to the last value passed to onChange * @@ -64716,7 +66070,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Restore the value to the last value passed to onChange * @@ -65746,7 +67100,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Restore the value to the last value passed to onChange * @@ -67036,7 +68390,7 @@ declare module dijit { * Returns widget as a printable string using the widget's value * */ - toString(): String; + toString(): string; /** * Restore the value to the last value passed to onChange * @@ -68463,7 +69817,7 @@ declare module dijit { * Returns widget as a printable string using the widget's value * */ - toString(): String; + toString(): string; /** * Restore the value to the last value passed to onChange * @@ -69493,7 +70847,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -70567,7 +71921,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Restore the value to the last value passed to onChange * @@ -71788,7 +73142,7 @@ declare module dijit { * Returns widget as a printable string using the widget's value * */ - toString(): String; + toString(): string; /** * Restore the value to the last value passed to onChange * @@ -72914,7 +74268,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Restore the value to the last value passed to onChange * @@ -74218,7 +75572,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Restore the value to the last value passed to onChange * @@ -75282,7 +76636,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -76385,7 +77739,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Restore the value to the last value passed to onChange * @@ -77713,7 +79067,7 @@ declare module dijit { * Returns widget as a printable string using the widget's value * */ - toString(): String; + toString(): string; /** * Restore the value to the last value passed to onChange * @@ -78734,7 +80088,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -79566,7 +80920,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -80440,7 +81794,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -81622,7 +82976,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Restore the value to the last value passed to onChange * @@ -82673,7 +84027,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Restore the value to the last value passed to onChange * @@ -83608,7 +84962,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -84460,7 +85814,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -85262,7 +86616,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -86101,7 +87455,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -87028,7 +88382,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -87898,7 +89252,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -88693,7 +90047,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -89513,7 +90867,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -90555,7 +91909,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -91494,7 +92848,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -92531,7 +93885,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -93610,7 +94964,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -94602,7 +95956,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -95520,7 +96874,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -96432,7 +97786,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -97326,7 +98680,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -98325,7 +99679,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -99286,7 +100640,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -100157,7 +101511,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -101132,7 +102486,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -104130,7 +105484,7 @@ declare module dijit { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -104747,3 +106101,844 @@ declare module dijit { } } +declare module "dijit/_BidiSupport" { + var exp: dijit._BidiSupport + export=exp; +} +declare module "dijit/BackgroundIframe" { + var exp: dijit.BackgroundIframe + export=exp; +} +declare module "dijit/hccss" { + var exp: dijit.hccss + export=exp; +} +declare module "dijit/_base" { + var exp: dijit._base + export=exp; +} +declare module "dijit/_base/popup" { + var exp: dijit._base.popup + export=exp; +} +declare module "dijit/_base/manager" { + var exp: dijit._base.manager + export=exp; +} +declare module "dijit/_base/place" { + var exp: dijit._base.place + export=exp; +} +declare module "dijit/_base/focus" { + var exp: dijit._base.focus + export=exp; +} +declare module "dijit/_base/scroll" { + var exp: dijit._base.scroll + export=exp; +} +declare module "dijit/_base/sniff" { + var exp: dijit._base.sniff + export=exp; +} +declare module "dijit/_base/typematic" { + var exp: dijit._base.typematic + export=exp; +} +declare module "dijit/_base/window" { + var exp: dijit._base.window + export=exp; +} +declare module "dijit/_base/wai" { + var exp: dijit._base.wai + export=exp; +} +declare module "dijit/_BidiMixin" { + var exp: dijit._BidiMixin + export=exp; +} +declare module "dijit/_Calendar" { + var exp: dijit._Calendar + export=exp; +} +declare module "dijit/a11y" { + var exp: dijit.a11y + export=exp; +} +declare module "dijit/a11yclick" { + var exp: dijit.a11yclick + export=exp; +} +declare module "dijit/dijit" { + var exp: dijit.dijit + export=exp; +} +declare module "dijit/dijit-all" { + var exp: dijit.dijit_all + export=exp; +} +declare module "dijit/main" { + var exp: dijit.main + export=exp; +} +declare module "dijit/main._Calendar" { + var exp: dijit.main._Calendar + export=exp; +} +declare module "dijit/main.place" { + var exp: dijit.main.place + export=exp; +} +declare module "dijit/main.typematic" { + var exp: dijit.main.typematic + export=exp; +} +declare module "dijit/main.registry" { + var exp: dijit.main.registry + export=exp; +} +declare module "dijit/place" { + var exp: dijit.place + export=exp; +} +declare module "dijit/place.__Rectangle" { + var exp: dijit.place.__Rectangle + export=exp; +} +declare module "dijit/place.__Position" { + var exp: dijit.place.__Position + export=exp; +} +declare module "dijit/registry" { + var exp: dijit.registry + export=exp; +} +declare module "dijit/registry._hash" { + var exp: dijit.registry._hash + export=exp; +} +declare module "dijit/typematic" { + var exp: dijit.typematic + export=exp; +} +declare module "dijit/Viewport" { + var exp: dijit.Viewport + export=exp; +} +declare module "dijit/_AttachMixin" { + var exp: typeof dijit._AttachMixin + export=exp; +} +declare module "dijit/_Contained" { + var exp: typeof dijit._Contained + export=exp; +} +declare module "dijit/_Container" { + var exp: typeof dijit._Container + export=exp; +} +declare module "dijit/_DialogMixin" { + var exp: typeof dijit._DialogMixin + export=exp; +} +declare module "dijit/_CssStateMixin" { + var exp: typeof dijit._CssStateMixin + export=exp; +} +declare module "dijit/_FocusMixin" { + var exp: typeof dijit._FocusMixin + export=exp; +} +declare module "dijit/_HasDropDown" { + var exp: typeof dijit._HasDropDown + export=exp; +} +declare module "dijit/_KeyNavMixin" { + var exp: typeof dijit._KeyNavMixin + export=exp; +} +declare module "dijit/_KeyNavContainer" { + var exp: typeof dijit._KeyNavContainer + export=exp; +} +declare module "dijit/_OnDijitClickMixin" { + var exp: typeof dijit._OnDijitClickMixin + export=exp; +} +declare module "dijit/_OnDijitClickMixin.a11yclick" { + var exp: dijit._OnDijitClickMixin.a11yclick + export=exp; +} +declare module "dijit/_Templated" { + var exp: typeof dijit._Templated + export=exp; +} +declare module "dijit/_TemplatedMixin" { + var exp: typeof dijit._TemplatedMixin + export=exp; +} +declare module "dijit/_TemplatedMixin._templateCache" { + var exp: dijit._TemplatedMixin._templateCache + export=exp; +} +declare module "dijit/_PaletteMixin" { + var exp: typeof dijit._PaletteMixin + export=exp; +} +declare module "dijit/_PaletteMixin.__Dye" { + var exp: typeof dijit._PaletteMixin.__Dye + export=exp; +} +declare module "dijit/_MenuBase" { + var exp: typeof dijit._MenuBase + export=exp; +} +declare module "dijit/_TimePicker" { + var exp: typeof dijit._TimePicker + export=exp; +} +declare module "dijit/_TimePicker.__Constraints" { + var exp: typeof dijit._TimePicker.__Constraints + export=exp; +} +declare module "dijit/_WidgetsInTemplateMixin" { + var exp: typeof dijit._WidgetsInTemplateMixin + export=exp; +} +declare module "dijit/_WidgetBase" { + var exp: typeof dijit._WidgetBase + export=exp; +} +declare module "dijit/_Widget" { + var exp: typeof dijit._Widget + export=exp; +} +declare module "dijit/Destroyable" { + var exp: typeof dijit.Destroyable + export=exp; +} +declare module "dijit/Calendar" { + var exp: typeof dijit.Calendar + export=exp; +} +declare module "dijit/Calendar._MonthDropDown" { + var exp: typeof dijit.Calendar._MonthDropDown + export=exp; +} +declare module "dijit/Calendar._MonthDropDownButton" { + var exp: typeof dijit.Calendar._MonthDropDownButton + export=exp; +} +declare module "dijit/CalendarLite" { + var exp: typeof dijit.CalendarLite + export=exp; +} +declare module "dijit/CalendarLite._MonthWidget" { + var exp: typeof dijit.CalendarLite._MonthWidget + export=exp; +} +declare module "dijit/CheckedMenuItem" { + var exp: typeof dijit.CheckedMenuItem + export=exp; +} +declare module "dijit/ColorPalette" { + var exp:typeof dijit.ColorPalette + export=exp; +} +declare module "dijit/ColorPalette._Color" { + var exp: typeof dijit.ColorPalette._Color + export=exp; +} +declare module "dijit/Declaration" { + var exp: typeof dijit.Declaration + export=exp; +} +declare module "dijit/DialogUnderlay" { + var exp: typeof dijit.DialogUnderlay + export=exp; +} +declare module "dijit/DropDownMenu" { + var exp: typeof dijit.DropDownMenu + export=exp; +} +declare module "dijit/Dialog" { + var exp: typeof dijit.Dialog + export=exp; +} +declare module "dijit/Dialog._DialogBase" { + var exp: typeof dijit.Dialog._DialogBase + export=exp; +} +declare module "dijit/Dialog._DialogLevelManager" { + var exp: dijit.Dialog._DialogLevelManager + export=exp; +} +declare module "dijit/Editor" { + var exp: typeof dijit.Editor + export=exp; +} +declare module "dijit/Fieldset" { + var exp: typeof dijit.Fieldset + export=exp; +} +declare module "dijit/InlineEditBox" { + var exp: typeof dijit.InlineEditBox + export=exp; +} +declare module "dijit/InlineEditBox._InlineEditor" { + var exp: typeof dijit.InlineEditBox._InlineEditor + export=exp; +} +declare module "dijit/Menu" { + var exp: typeof dijit.Menu + export=exp; +} +declare module "dijit/MenuBarItem" { + var exp: typeof dijit.MenuBarItem + export=exp; +} +declare module "dijit/MenuBarItem._MenuBarItemMixin" { + var exp: typeof dijit.MenuBarItem._MenuBarItemMixin + export=exp; +} +declare module "dijit/MenuSeparator" { + var exp: typeof dijit.MenuSeparator + export=exp; +} +declare module "dijit/MenuItem" { + var exp: typeof dijit.MenuItem + export=exp; +} +declare module "dijit/MenuBar" { + var exp:typeof dijit.MenuBar + export=exp; +} +declare module "dijit/PopupMenuBarItem" { + var exp: typeof dijit.PopupMenuBarItem + export=exp; +} +declare module "dijit/ProgressBar" { + var exp: typeof dijit.ProgressBar + export=exp; +} +declare module "dijit/RadioMenuItem" { + var exp: typeof dijit.RadioMenuItem + export=exp; +} +declare module "dijit/PopupMenuItem" { + var exp: typeof dijit.PopupMenuItem + export=exp; +} +declare module "dijit/TitlePane" { + var exp: typeof dijit.TitlePane + export=exp; +} +declare module "dijit/Toolbar" { + var exp: typeof dijit.Toolbar + export=exp; +} +declare module "dijit/Tooltip" { + var exp: typeof dijit.Tooltip + export=exp; +} +declare module "dijit/Tooltip._MasterTooltip" { + var exp: typeof dijit.Tooltip._MasterTooltip + export=exp; +} +declare module "dijit/ToolbarSeparator" { + var exp: typeof dijit.ToolbarSeparator + export=exp; +} +declare module "dijit/WidgetSet" { + var exp: typeof dijit.WidgetSet + export=exp; +} +declare module "dijit/TooltipDialog" { + var exp:typeof dijit.TooltipDialog + export=exp; +} +declare module "dijit/Tree" { + var exp: typeof dijit.Tree + export=exp; +} +declare module "dijit/Tree._TreeNode" { + var exp: typeof dijit.Tree._TreeNode + export=exp; +} +declare module "dijit/_editor/html" { + var exp: dijit._editor.html + export=exp; +} +declare module "dijit/_editor/range" { + var exp: dijit._editor.range + export=exp; +} +declare module "dijit/_editor/range.W3CRange" { + var exp: typeof dijit._editor.range.W3CRange + export=exp; +} +declare module "dijit/_editor/range.ie" { + var exp: dijit._editor.range.ie + export=exp; +} +declare module "dijit/_editor/selection" { + var exp: dijit._editor.selection + export=exp; +} +declare module "dijit/_editor/_Plugin" { + var exp: typeof dijit._editor._Plugin + export=exp; +} +declare module "dijit/_editor/_Plugin.registry" { + var exp: dijit._editor._Plugin.registry + export=exp; +} +declare module "dijit/_editor/RichText" { + var exp: typeof dijit._editor.RichText + export=exp; +} +declare module "dijit/_editor/plugins/AlwaysShowToolbar" { + var exp: typeof dijit._editor.plugins.AlwaysShowToolbar + export=exp; +} +declare module "dijit/_editor/plugins/FontChoice" { + var exp: typeof dijit._editor.plugins.FontChoice + export=exp; +} +declare module "dijit/_editor/plugins/FontChoice._FontDropDown" { + var exp: typeof dijit._editor.plugins.FontChoice._FontDropDown + export=exp; +} +declare module "dijit/_editor/plugins/FontChoice._FontSizeDropDown" { + var exp: typeof dijit._editor.plugins.FontChoice._FontSizeDropDown + export=exp; +} +declare module "dijit/_editor/plugins/FontChoice._FontNameDropDown" { + var exp: typeof dijit._editor.plugins.FontChoice._FontNameDropDown + export=exp; +} +declare module "dijit/_editor/plugins/FontChoice._FormatBlockDropDown" { + var exp: typeof dijit._editor.plugins.FontChoice._FormatBlockDropDown + export=exp; +} +declare module "dijit/_editor/plugins/EnterKeyHandling" { + var exp: typeof dijit._editor.plugins.EnterKeyHandling + export=exp; +} +declare module "dijit/_editor/plugins/LinkDialog" { + var exp: typeof dijit._editor.plugins.LinkDialog + export=exp; +} +declare module "dijit/_editor/plugins/LinkDialog.ImgLinkDialog" { + var exp: typeof dijit._editor.plugins.LinkDialog.ImgLinkDialog + export=exp; +} +declare module "dijit/_editor/plugins/FullScreen" { + var exp: typeof dijit._editor.plugins.FullScreen + export=exp; +} +declare module "dijit/_editor/plugins/NewPage" { + var exp: typeof dijit._editor.plugins.NewPage + export=exp; +} +declare module "dijit/_editor/plugins/Print" { + var exp: typeof dijit._editor.plugins.Print + export=exp; +} +declare module "dijit/_editor/plugins/TabIndent" { + var exp: typeof dijit._editor.plugins.TabIndent + export=exp; +} +declare module "dijit/_editor/plugins/TextColor" { + var exp: typeof dijit._editor.plugins.TextColor + export=exp; +} +declare module "dijit/_editor/plugins/ToggleDir" { + var exp: typeof dijit._editor.plugins.ToggleDir + export=exp; +} +declare module "dijit/_editor/plugins/ViewSource" { + var exp: typeof dijit._editor.plugins.ViewSource + export=exp; +} +declare module "dijit/_tree/dndSource" { + var exp: dijit._tree.dndSource + export=exp; +} +declare module "dijit/form/Slider" { + var exp: dijit.form.Slider + export=exp; +} +declare module "dijit/form/_ButtonMixin" { + var exp: typeof dijit.form._ButtonMixin + export=exp; +} +declare module "dijit/form/_AutoCompleterMixin" { + var exp: typeof dijit.form._AutoCompleterMixin + export=exp; +} +declare module "dijit/form/_CheckBoxMixin" { + var exp: typeof dijit.form._CheckBoxMixin + export=exp; +} +declare module "dijit/form/_ComboBoxMenuMixin" { + var exp: typeof dijit.form._ComboBoxMenuMixin + export=exp; +} +declare module "dijit/form/_ExpandingTextAreaMixin" { + var exp: typeof dijit.form._ExpandingTextAreaMixin + export=exp; +} +declare module "dijit/form/_FormMixin" { + var exp: typeof dijit.form._FormMixin + export=exp; +} +declare module "dijit/form/_FormValueMixin" { + var exp: typeof dijit.form._FormValueMixin + export=exp; +} +declare module "dijit/form/_FormWidgetMixin" { + var exp: typeof dijit.form._FormWidgetMixin + export=exp; +} +declare module "dijit/form/_ListBase" { + var exp: typeof dijit.form._ListBase + export=exp; +} +declare module "dijit/form/_ComboBoxMenu" { + var exp: typeof dijit.form._ComboBoxMenu + export=exp; +} +declare module "dijit/form/_RadioButtonMixin" { + var exp: typeof dijit.form._RadioButtonMixin + export=exp; +} +declare module "dijit/form/_SearchMixin" { + var exp: typeof dijit.form._SearchMixin + export=exp; +} +declare module "dijit/form/_ListMouseMixin" { + var exp: typeof dijit.form._ListMouseMixin + export=exp; +} +declare module "dijit/form/_FormSelectWidget" { + var exp:typeof dijit.form._FormSelectWidget + export=exp; +} +declare module "dijit/form/_FormSelectWidget.__SelectOption" { + var exp: dijit.form._FormSelectWidget.__SelectOption + export=exp; +} +declare module "dijit/form/_TextBoxMixin" { + var exp: typeof dijit.form._TextBoxMixin + export=exp; +} +declare module "dijit/form/_FormWidget" { + var exp: typeof dijit.form._FormWidget + export=exp; +} +declare module "dijit/form/_ToggleButtonMixin" { + var exp: typeof dijit.form._ToggleButtonMixin + export=exp; +} +declare module "dijit/form/_FormValueWidget" { + var exp: typeof dijit.form._FormValueWidget + export=exp; +} +declare module "dijit/form/_DateTimeTextBox" { + var exp: typeof dijit.form._DateTimeTextBox + export=exp; +} +declare module "dijit/form/_DateTimeTextBox.__Constraints" { + var exp: typeof dijit.form._DateTimeTextBox.__Constraints + export=exp; +} +declare module "dijit/form/ComboBoxMixin" { + var exp: typeof dijit.form.ComboBoxMixin + export=exp; +} +declare module "dijit/form/_Spinner" { + var exp: typeof dijit.form._Spinner + export=exp; +} +declare module "dijit/form/DataList" { + var exp: typeof dijit.form.DataList + export=exp; +} +declare module "dijit/form/Button" { + var exp: typeof dijit.form.Button + export=exp; +} +declare module "dijit/form/CheckBox" { + var exp: typeof dijit.form.CheckBox + export=exp; +} +declare module "dijit/form/ComboButton" { + var exp: typeof dijit.form.ComboButton + export=exp; +} +declare module "dijit/form/ComboBox" { + var exp: typeof dijit.form.ComboBox + export=exp; +} +declare module "dijit/form/CurrencyTextBox" { + var exp: typeof dijit.form.CurrencyTextBox + export=exp; +} +declare module "dijit/form/DropDownButton" { + var exp: typeof dijit.form.DropDownButton + export=exp; +} +declare module "dijit/form/Form" { + var exp: typeof dijit.form.Form + export=exp; +} +declare module "dijit/form/DateTextBox" { + var exp: typeof dijit.form.DateTextBox + export=exp; +} +declare module "dijit/form/HorizontalRule" { + var exp: typeof dijit.form.HorizontalRule + export=exp; +} +declare module "dijit/form/FilteringSelect" { + var exp: typeof dijit.form.FilteringSelect + export=exp; +} +declare module "dijit/form/HorizontalRuleLabels" { + var exp: typeof dijit.form.HorizontalRuleLabels + export=exp; +} +declare module "dijit/form/HorizontalSlider" { + var exp: typeof dijit.form.HorizontalSlider + export=exp; +} +declare module "dijit/form/HorizontalSlider._Mover" { + var exp: typeof dijit.form.HorizontalSlider._Mover + export=exp; +} +declare module "dijit/form/MultiSelect" { + var exp: typeof dijit.form.MultiSelect + export=exp; +} +declare module "dijit/form/MappedTextBox" { + var exp: typeof dijit.form.MappedTextBox + export=exp; +} +declare module "dijit/form/NumberSpinner" { + var exp: typeof dijit.form.NumberSpinner + export=exp; +} +declare module "dijit/form/RangeBoundTextBox" { + var exp: typeof dijit.form.RangeBoundTextBox + export=exp; +} +declare module "dijit/form/RangeBoundTextBox.__Constraints" { + var exp: typeof dijit.form.RangeBoundTextBox.__Constraints + export=exp; +} +declare module "dijit/form/RadioButton" { + var exp: typeof dijit.form.RadioButton + export=exp; +} +declare module "dijit/form/NumberTextBox" { + var exp: typeof dijit.form.NumberTextBox + export=exp; +} +declare module "dijit/form/NumberTextBox.__Constraints" { + var exp: typeof dijit.form.NumberTextBox.__Constraints + export=exp; +} +declare module "dijit/form/NumberTextBox.Mixin" { + var exp: typeof dijit.form.NumberTextBox.Mixin + export=exp; +} +declare module "dijit/form/SimpleTextarea" { + var exp: typeof dijit.form.SimpleTextarea + export=exp; +} +declare module "dijit/form/Textarea" { + var exp: typeof dijit.form.Textarea + export=exp; +} +declare module "dijit/form/Select" { + var exp: typeof dijit.form.Select + export=exp; +} +declare module "dijit/form/Select._Menu" { + var exp: typeof dijit.form.Select._Menu + export=exp; +} +declare module "dijit/form/TextBox" { + var exp: typeof dijit.form.TextBox + export=exp; +} +declare module "dijit/form/VerticalRule" { + var exp: typeof dijit.form.VerticalRule + export=exp; +} +declare module "dijit/form/ToggleButton" { + var exp: typeof dijit.form.ToggleButton + export=exp; +} +declare module "dijit/form/TimeTextBox" { + var exp: typeof dijit.form.TimeTextBox + export=exp; +} +declare module "dijit/form/ValidationTextBox" { + var exp: typeof dijit.form.ValidationTextBox + export=exp; +} +declare module "dijit/form/VerticalRuleLabels" { + var exp: typeof dijit.form.VerticalRuleLabels + export=exp; +} +declare module "dijit/form/VerticalSlider" { + var exp: typeof dijit.form.VerticalSlider + export=exp; +} +declare module "dijit/layout/utils" { + var exp: dijit.layout.utils + export=exp; +} +declare module "dijit/layout/_ContentPaneResizeMixin" { + var exp: typeof dijit.layout._ContentPaneResizeMixin + export=exp; +} +declare module "dijit/layout/_LayoutWidget" { + var exp: typeof dijit.layout._LayoutWidget + export=exp; +} +declare module "dijit/layout/AccordionContainer" { + var exp: typeof dijit.layout.AccordionContainer + export=exp; +} +declare module "dijit/layout/AccordionContainer._Button" { + var exp: typeof dijit.layout.AccordionContainer._Button + export=exp; +} +declare module "dijit/layout/AccordionContainer._InnerContainer" { + var exp: typeof dijit.layout.AccordionContainer._InnerContainer + export=exp; +} +declare module "dijit/layout/_TabContainerBase" { + var exp: typeof dijit.layout._TabContainerBase + export=exp; +} +declare module "dijit/layout/AccordionPane" { + var exp: typeof dijit.layout.AccordionPane + export=exp; +} +declare module "dijit/layout/BorderContainer" { + var exp: typeof dijit.layout.BorderContainer + export=exp; +} +declare module "dijit/layout/BorderContainer._Gutter" { + var exp: typeof dijit.layout.BorderContainer._Gutter + export=exp; +} +declare module "dijit/layout/BorderContainer._Splitter" { + var exp: typeof dijit.layout.BorderContainer._Splitter + export=exp; +} +declare module "dijit/layout/BorderContainer.ChildWidgetProperties" { + var exp: dijit.layout.BorderContainer.ChildWidgetProperties + export=exp; +} +declare module "dijit/layout/LayoutContainer" { + var exp: typeof dijit.layout.LayoutContainer + export=exp; +} +declare module "dijit/layout/LayoutContainer.ChildWidgetProperties" { + var exp: dijit.layout.LayoutContainer.ChildWidgetProperties + export=exp; +} +declare module "dijit/layout/ContentPane" { + var exp: typeof dijit.layout.ContentPane + export=exp; +} +declare module "dijit/layout/LinkPane" { + var exp: typeof dijit.layout.LinkPane + export=exp; +} +declare module "dijit/layout/SplitContainer" { + var exp: typeof dijit.layout.SplitContainer + export=exp; +} +declare module "dijit/layout/SplitContainer.ChildWidgetProperties" { + var exp: dijit.layout.SplitContainer.ChildWidgetProperties + export=exp; +} +declare module "dijit/layout/ScrollingTabController" { + var exp: typeof dijit.layout.ScrollingTabController + export=exp; +} +declare module "dijit/layout/StackController" { + var exp: typeof dijit.layout.StackController + export=exp; +} +declare module "dijit/layout/StackController.StackButton" { + var exp: typeof dijit.layout.StackController.StackButton + export=exp; +} +declare module "dijit/layout/StackContainer" { + var exp: typeof dijit.layout.StackContainer + export=exp; +} +declare module "dijit/layout/StackContainer.ChildWidgetProperties" { + var exp: dijit.layout.StackContainer.ChildWidgetProperties + export=exp; +} +declare module "dijit/layout/TabContainer" { + var exp: typeof dijit.layout.TabContainer + export=exp; +} +declare module "dijit/layout/TabController" { + var exp: typeof dijit.layout.TabController + export=exp; +} +declare module "dijit/layout/TabController.TabButton" { + var exp: typeof dijit.layout.TabController.TabButton + export=exp; +} +declare module "dijit/tree/_dndContainer" { + var exp: dijit.tree._dndContainer + export=exp; +} +declare module "dijit/tree/ForestStoreModel" { + var exp: typeof dijit.tree.ForestStoreModel + export=exp; +} +declare module "dijit/tree/dndSource" { + var exp: dijit.tree.dndSource + export=exp; +} +declare module "dijit/tree/dndSource.__Item" { + var exp: dijit.tree.dndSource.__Item + export=exp; +} +declare module "dijit/tree/model" { + var exp: dijit.tree.model + export=exp; +} +declare module "dijit/tree/_dndSelector" { + var exp: dijit.tree._dndSelector + export=exp; +} +declare module "dijit/tree/ObjectStoreModel" { + var exp: typeof dijit.tree.ObjectStoreModel + export=exp; +} +declare module "dijit/tree/TreeStoreModel" { + var exp: typeof dijit.tree.TreeStoreModel + export=exp; +} + +declare module "dijit/ConfirmDialog" { + var exp: typeof dijit.ConfirmDialog; + export=exp; +} +declare module "dijit/_ConfirmDialogMixin" { + var exp: typeof dijit._ConfirmDialogMixin; + export=exp; +} \ No newline at end of file diff --git a/dojo/doh.d.ts b/dojo/doh.d.ts index 13db9a265f..eab1a6b195 100644 --- a/dojo/doh.d.ts +++ b/dojo/doh.d.ts @@ -1902,3 +1902,79 @@ declare module doh { } +declare module "doh/_nodeRunner" { + var exp: doh._nodeRunner + export=exp; +} +declare module "doh/_parseURLargs" { + var exp: doh._parseURLargs + export=exp; +} +declare module "doh/_rhinoRunner" { + var exp: doh._rhinoRunner + export=exp; +} +declare module "doh/_browserRunner" { + var exp: doh._browserRunner + export=exp; +} +declare module "doh/_browserRunner._testTypes" { + var exp: doh._browserRunner._testTypes + export=exp; +} +declare module "doh/_browserRunner._groups" { + var exp: doh._browserRunner._groups + export=exp; +} +declare module "doh/_browserRunner.robot" { + var exp: doh._browserRunner.robot + export=exp; +} +declare module "doh/robot" { + var exp: doh.robot + export=exp; +} +declare module "doh/robot._runsemaphore" { + var exp: doh.robot._runsemaphore + export=exp; +} +declare module "doh/main" { + var exp: doh.main + export=exp; +} +declare module "doh/main._groups" { + var exp: doh.main._groups + export=exp; +} +declare module "doh/main._testTypes" { + var exp: doh.main._testTypes + export=exp; +} +declare module "doh/main.robot" { + var exp: doh.main.robot + export=exp; +} +declare module "doh/runner" { + var exp: doh.runner + export=exp; +} +declare module "doh/runner._groups" { + var exp: doh.runner._groups + export=exp; +} +declare module "doh/runner._testTypes" { + var exp: doh.runner._testTypes + export=exp; +} +declare module "doh/runner.robot" { + var exp: doh.runner.robot + export=exp; +} +declare module "doh/plugins/android-webdriver-robot" { + var exp: doh.plugins.android_webdriver_robot + export=exp; +} +declare module "doh/plugins/remoteRobot" { + var exp: doh.plugins.remoteRobot + export=exp; +} diff --git a/dojo/dojo.d.ts b/dojo/dojo.d.ts index a176d355c6..650258c4a8 100644 --- a/dojo/dojo.d.ts +++ b/dojo/dojo.d.ts @@ -3,7 +3,13 @@ // Definitions by: Michael Van Sickle // Definitions: https://github.com/borisyankov/DefinitelyTyped -declare var define: any; +declare function define(dependencies: String[], factory: Function): any; +declare function require(config?:Object, dependencies?: String[], callback?: Function): any; + +declare module dojox.dtl { + interface __StringArgs { } + interface __ObjectArgs { } +} declare module dojo { /** @@ -22,29 +28,30 @@ declare module dojo { * @param url URL to request * @param options OptionalOptions for the request. */ - del: { (url: String, options?: dojo.request.__BaseOptions): dojo.request.__Promise } + del(url: String, options?: dojo.request.__BaseOptions): dojo.request.__Promise; /** * Send an HTTP GET request using the default transport for the current platform. * * @param url URL to request * @param options OptionalOptions for the request. */ - get: { (url: String, options?: dojo.request.__BaseOptions): dojo.request.__Promise } + get(url: String, options?: dojo.request.__BaseOptions): dojo.request.__Promise; /** * Send an HTTP POST request using the default transport for the current platform. * * @param url URL to request * @param options OptionalOptions for the request. */ - post: { (url: String, options?: dojo.request.__BaseOptions): any } + post(url: String, options?: dojo.request.__BaseOptions): any; /** * Send an HTTP POST request using the default transport for the current platform. * * @param url URL to request * @param options OptionalOptions for the request. */ - put: { (url: String, options?: dojo.request.__BaseOptions): dojo.request.__Promise } + put(url: String, options?: dojo.request.__BaseOptions): dojo.request.__Promise; } + module request { /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/request/handlers.html @@ -53,13 +60,222 @@ declare module dojo { * @param response */ interface handlers { (response: any): void } - module handlers { + interface handlers { /** * * @param name * @param handler */ - interface register { (name: any, handler: any): void } + register(name: any, handler: any): void; + } + + module handlers { + } + + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/request/iframe.html + * + * Sends a request using an iframe element with the given URL and options. + * + * @param url URL to request + * @param options OptionalOptions for the request. + */ + interface iframe { (url: String, options?: dojo.request.iframe.__Options): void } + interface iframe { + /** + * + * @param name + * @param onloadstr + * @param uri + */ + create(name: any, onloadstr: any, uri: any): any; + /** + * + * @param iframeNode + */ + doc(iframeNode: any): any; + /** + * Send an HTTP GET request using an iframe element with the given URL and options. + * + * @param url URL to request + * @param options OptionalOptions for the request. + */ + get(url: String, options: dojo.request.iframe.__BaseOptions): dojo.request.__Promise; + /** + * Send an HTTP POST request using an iframe element with the given URL and options. + * + * @param url URL to request + * @param options OptionalOptions for the request. + */ + post(url: String, options: dojo.request.iframe.__BaseOptions): dojo.request.__Promise; + /** + * + * @param _iframe + * @param src + * @param replace + */ + setSrc(_iframe: any, src: any, replace: any): void; + } + + module iframe { + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/request/iframe.__MethodOptions.html + * + * + */ + class __MethodOptions { + constructor(); + /** + * The HTTP method to use to make the request. Must be + * uppercase. Only "GET" and "POST" are accepted. + * Default is "POST". + * + */ + "method": string; + } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/request/iframe.__BaseOptions.html + * + * + */ + class __BaseOptions { + constructor(); + /** + * Data to transfer. When making a GET request, this will + * be converted to key=value parameters and appended to the + * URL. + * + */ + "data": string; + /** + * A form node to use to submit data to the server. + * + */ + "form": HTMLElement; + /** + * How to handle the response from the server. Default is + * 'text'. Other values are 'json', 'javascript', and 'xml'. + * + */ + "handleAs": string; + /** + * Whether to append a cache-busting parameter to the URL. + * + */ + "preventCache": boolean; + /** + * Query parameters to append to the URL. + * + */ + "query": string; + /** + * Milliseconds to wait for the response. If this time + * passes, the then the promise is rejected. + * + */ + "timeout": number; + } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/request/iframe.__Options.html + * + * + */ + class __Options { + constructor(); + /** + * Data to transfer. When making a GET request, this will + * be converted to key=value parameters and appended to the + * URL. + * + */ + "data": string; + /** + * A form node to use to submit data to the server. + * + */ + "form": HTMLElement; + /** + * How to handle the response from the server. Default is + * 'text'. Other values are 'json', 'javascript', and 'xml'. + * + */ + "handleAs": string; + /** + * The HTTP method to use to make the request. Must be + * uppercase. Only "GET" and "POST" are accepted. + * Default is "POST". + * + */ + "method": string; + /** + * Whether to append a cache-busting parameter to the URL. + * + */ + "preventCache": boolean; + /** + * Query parameters to append to the URL. + * + */ + "query": string; + /** + * Milliseconds to wait for the response. If this time + * passes, the then the promise is rejected. + * + */ + "timeout": number; + } + } + + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/request/notify.html + * + * Register a listener to be notified when an event + * in dojo/request happens. + * + * @param type OptionalThe event to listen for. Events emitted: "start", "send","load", "error", "done", "stop". + * @param listener OptionalA callback to be run when an event happens. + */ + interface notify { (type?: String, listener?: Function): void } + interface notify { + /** + * + * @param type + * @param event + * @param cancel + */ + emit(type: any, event: any, cancel: any): void; + } + + module notify { + } + + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/request/registry.html + * + * + * @param url + * @param options + */ + interface registry { (url: any, options: any): void } + interface registry { + /** + * + * @param id + * @param parentRequire + * @param loaded + * @param config + */ + load(id: any, parentRequire: any, loaded: any, config: any): void; + /** + * + * @param url + * @param provider + * @param first + */ + register(url: any, provider: any, first: any): void; + } + + module registry { } /** @@ -79,81 +295,31 @@ declare module dojo { * @param url URL to request * @param options OptionalOptions for the request. */ - del: { (url: String, options: dojo.request.node.__BaseOptions): dojo.request.__Promise } + del(url: String, options: dojo.request.node.__BaseOptions): dojo.request.__Promise; /** * Send an HTTP GET request using XMLHttpRequest with the given URL and options. * * @param url URL to request * @param options OptionalOptions for the request. */ - get: { (url: String, options: dojo.request.node.__BaseOptions): dojo.request.__Promise } + get(url: String, options: dojo.request.node.__BaseOptions): dojo.request.__Promise; /** * Send an HTTP POST request using XMLHttpRequest with the given URL and options. * * @param url URL to request * @param options OptionalOptions for the request. */ - post: { (url: String, options: dojo.request.node.__BaseOptions): dojo.request.__Promise } + post(url: String, options: dojo.request.node.__BaseOptions): dojo.request.__Promise; /** * Send an HTTP PUT request using XMLHttpRequest with the given URL and options. * * @param url URL to request * @param options OptionalOptions for the request. */ - put: { (url: String, options: dojo.request.node.__BaseOptions): dojo.request.__Promise } + put(url: String, options: dojo.request.node.__BaseOptions): dojo.request.__Promise; } + module node { - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/request/node.__BaseOptions.html - * - * - */ - class __BaseOptions { - constructor(); - /** - * Data to transfer. This is ignored for GET and DELETE - * requests. - * - */ - "data": string; - /** - * How to handle the response from the server. Default is - * 'text'. Other values are 'json', 'javascript', and 'xml'. - * - */ - "handleAs": string; - /** - * Headers to use for the request. - * - */ - "headers": Object; - /** - * Password to use during the request. - * - */ - "password": string; - /** - * Whether to append a cache-busting parameter to the URL. - * - */ - "preventCache": boolean; - /** - * Query parameters to append to the URL. - * - */ - "query": string; - /** - * Milliseconds to wait for the response. If this time - * passes, the then the promise is rejected. - * - */ - "timeout": number; - /** - * Username to use during the request. - * - */ - "user": string; - } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/request/node.__MethodOptions.html * @@ -225,142 +391,35 @@ declare module dojo { */ "user": string; } - } - - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/request/iframe.html - * - * Sends a request using an iframe element with the given URL and options. - * - * @param url URL to request - * @param options OptionalOptions for the request. - */ - interface iframe { (url: String, options?: dojo.request.iframe.__Options): void } - interface iframe { /** - * - * @param name - * @param onloadstr - * @param uri - */ - create: { (name: any, onloadstr: any, uri: any): any } - /** - * - * @param iframeNode - */ - doc: { (iframeNode: any): any } - /** - * Send an HTTP GET request using an iframe element with the given URL and options. - * - * @param url URL to request - * @param options OptionalOptions for the request. - */ - get: { (url: String, options: dojo.request.iframe.__BaseOptions): dojo.request.__Promise } - /** - * Send an HTTP POST request using an iframe element with the given URL and options. - * - * @param url URL to request - * @param options OptionalOptions for the request. - */ - post: { (url: String, options: dojo.request.iframe.__BaseOptions): dojo.request.__Promise } - /** - * - * @param _iframe - * @param src - * @param replace - */ - setSrc: { (_iframe: any, src: any, replace: any): void } - } - module iframe { - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/request/iframe.__MethodOptions.html - * - * - */ - class __MethodOptions { - constructor(); - /** - * The HTTP method to use to make the request. Must be - * uppercase. Only "GET" and "POST" are accepted. - * Default is "POST". - * - */ - "method": string; - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/request/iframe.__Options.html - * - * - */ - class __Options { - constructor(); - /** - * Data to transfer. When making a GET request, this will - * be converted to key=value parameters and appended to the - * URL. - * - */ - "data": string; - /** - * A form node to use to submit data to the server. - * - */ - "form": HTMLElement; - /** - * How to handle the response from the server. Default is - * 'text'. Other values are 'json', 'javascript', and 'xml'. - * - */ - "handleAs": string; - /** - * The HTTP method to use to make the request. Must be - * uppercase. Only "GET" and "POST" are accepted. - * Default is "POST". - * - */ - "method": string; - /** - * Whether to append a cache-busting parameter to the URL. - * - */ - "preventCache": boolean; - /** - * Query parameters to append to the URL. - * - */ - "query": string; - /** - * Milliseconds to wait for the response. If this time - * passes, the then the promise is rejected. - * - */ - "timeout": number; - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/request/iframe.__BaseOptions.html + * Permalink: http://dojotoolkit.org/api/1.9/dojo/request/node.__BaseOptions.html * * */ class __BaseOptions { constructor(); /** - * Data to transfer. When making a GET request, this will - * be converted to key=value parameters and appended to the - * URL. + * Data to transfer. This is ignored for GET and DELETE + * requests. * */ "data": string; - /** - * A form node to use to submit data to the server. - * - */ - "form": HTMLElement; /** * How to handle the response from the server. Default is * 'text'. Other values are 'json', 'javascript', and 'xml'. * */ "handleAs": string; + /** + * Headers to use for the request. + * + */ + "headers": Object; + /** + * Password to use during the request. + * + */ + "password": string; /** * Whether to append a cache-busting parameter to the URL. * @@ -377,29 +436,14 @@ declare module dojo { * */ "timeout": number; + /** + * Username to use during the request. + * + */ + "user": string; } } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/request/notify.html - * - * Register a listener to be notified when an event - * in dojo/request happens. - * - * @param type OptionalThe event to listen for. Events emitted: "start", "send","load", "error", "done", "stop". - * @param listener OptionalA callback to be run when an event happens. - */ - interface notify { (type?: String, listener?: Function): void } - interface notify { - /** - * - * @param type - * @param event - * @param cancel - */ - emit: { (type: any, event: any, cancel: any): void } - } - /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/request/watch.html * @@ -414,24 +458,27 @@ declare module dojo { * object as its only argument. * */ - ioCheck: Function + ioCheck: Function; /** * Function used to process response. Gets the dfd * object as its only argument. * */ - resHandle: Function + resHandle: Function; /** * Function used to check if the IO request is still valid. Gets the dfd * object as its only argument. * */ - validCheck: Function + validCheck: Function; /** * Cancels all pending IO requests, regardless of IO type * */ - cancelAll: { (): void } + cancelAll(): void; + } + + module watch { } /** @@ -450,14 +497,15 @@ declare module dojo { * @param url URL to request * @param options OptionalOptions for the request. */ - get: { (url: String, options: dojo.request.script.__BaseOptions): dojo.request.__Promise } + get(url: String, options: dojo.request.script.__BaseOptions): dojo.request.__Promise; + } + + module script { /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/request/script.__MethodOptions.html * * */ - } - module script { class __MethodOptions { constructor(); /** @@ -541,7 +589,7 @@ declare module dojo { * */ "checkString": string; - /** + /**dojo * Data to transfer. This is ignored for GET and DELETE * requests. * @@ -593,32 +641,6 @@ declare module dojo { } } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/request/registry.html - * - * - * @param url - * @param options - */ - interface registry{(url: any, options: any): void} - interface registry { - /** - * - * @param id - * @param parentRequire - * @param loaded - * @param config - */ - load:{(id: any, parentRequire: any, loaded: any, config: any): void} - /** - * - * @param url - * @param provider - * @param first - */ - register:{(url: any, provider: any, first: any): void} - } - /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/request/xhr.html * @@ -627,7 +649,7 @@ declare module dojo { * @param url URL to request * @param options OptionalOptions for the request. */ - interface xhr{(url: String, options?: dojo.request.xhr.__Options): void} + interface xhr { (url: String, options?: dojo.request.xhr.__Options): void } interface xhr { /** * Send an HTTP DELETE request using XMLHttpRequest with the given URL and options. @@ -635,35 +657,35 @@ declare module dojo { * @param url URL to request * @param options OptionalOptions for the request. */ - del:{(url: String, options: dojo.request.xhr.__BaseOptions): dojo.request.__Promise} + del(url: String, options: dojo.request.xhr.__BaseOptions): dojo.request.__Promise; /** * Send an HTTP GET request using XMLHttpRequest with the given URL and options. * * @param url URL to request * @param options OptionalOptions for the request. */ - get:{(url: String, options: dojo.request.xhr.__BaseOptions): dojo.request.__Promise} + get(url: String, options: dojo.request.xhr.__BaseOptions): dojo.request.__Promise; /** * Send an HTTP POST request using XMLHttpRequest with the given URL and options. * * @param url URL to request * @param options OptionalOptions for the request. */ - post:{(url: String, options: dojo.request.xhr.__BaseOptions): dojo.request.__Promise} + post(url: String, options: dojo.request.xhr.__BaseOptions): dojo.request.__Promise; /** * Send an HTTP PUT request using XMLHttpRequest with the given URL and options. * * @param url URL to request * @param options OptionalOptions for the request. */ - put:{ (url: String, options: dojo.request.xhr.__BaseOptions): dojo.request.__Promise } + put(url: String, options: dojo.request.xhr.__BaseOptions): dojo.request.__Promise; } module xhr { /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/request/xhr.__BaseOptions.html * - * + * */ class __BaseOptions { constructor(); @@ -808,6 +830,42 @@ declare module dojo { } } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/request.__BaseOptions.html + * + * + */ + class __BaseOptions { + constructor(); + /** + * Data to transfer. This is ignored for GET and DELETE + * requests. + * + */ + "data": string; + /** + * How to handle the response from the server. Default is + * 'text'. Other values are 'json', 'javascript', and 'xml'. + * + */ + "handleAs": string; + /** + * Whether to append a cache-busting parameter to the URL. + * + */ + "preventCache": boolean; + /** + * Query parameters to append to the URL. + * + */ + "query": string; + /** + * Milliseconds to wait for the response. If this time + * passes, the then the promise is rejected. + * + */ + "timeout": number; + } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/request.__MethodOptions.html * @@ -936,62 +994,14 @@ declare module dojo { */ toString(): String; /** - * Trace the promise. - * Tracing allows you to transparently log progress, - * resolution and rejection of promises, without affecting the - * promise itself. Any arguments passed to trace() are - * emitted in trace events. See dojo/promise/tracer on how - * to handle traces. * */ trace(): dojo.promise.Promise; /** - * Trace rejection of the promise. - * Tracing allows you to transparently log progress, - * resolution and rejection of promises, without affecting the - * promise itself. Any arguments passed to trace() are - * emitted in trace events. See dojo/promise/tracer on how - * to handle traces. * */ traceRejected(): dojo.promise.Promise; } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/request.__BaseOptions.html - * - * - */ - class __BaseOptions { - constructor(); - /** - * Data to transfer. This is ignored for GET and DELETE - * requests. - * - */ - "data": string; - /** - * How to handle the response from the server. Default is - * 'text'. Other values are 'json', 'javascript', and 'xml'. - * - */ - "handleAs": string; - /** - * Whether to append a cache-busting parameter to the URL. - * - */ - "preventCache": boolean; - /** - * Query parameters to append to the URL. - * - */ - "query": string; - /** - * Milliseconds to wait for the response. If this time - * passes, the then the promise is rejected. - * - */ - "timeout": number; - } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/request/default.html * @@ -1079,16 +1089,16 @@ declare module dojo { * * @param returnWrappers Optional */ - class AdapterRegistry { - constructor(returnWrappers?: boolean); + interface AdapterRegistry { (returnWrappers?: boolean): void } + interface AdapterRegistry { /** * */ - pairs: any[] + pairs: any[]; /** * */ - returnWrappers: boolean + returnWrappers: boolean; /** * Find an adapter for the given arguments. If no suitable adapter * is found, throws an exception. match() accepts any number of @@ -1096,7 +1106,7 @@ declare module dojo { * from the registered pairs. * */ - match: {(): any} + match(): any; /** * register a check function to determine if the wrap function or * object gets selected @@ -1107,13 +1117,16 @@ declare module dojo { * @param directReturn OptionalIf directReturn is true, the value passed in for wrap will bereturned instead of being called. Alternately, theAdapterRegistry can be set globally to "return not call" usingthe returnWrappers property. Either way, this behavior allowsthe registry to act as a "search" function instead of afunction interception library. * @param override OptionalIf override is given and true, the check function will be givenhighest priority. Otherwise, it will be the lowest priorityadapter. */ - register: {(name: String, check: Function, wrap: Function, directReturn: boolean, override: boolean): void} + register(name: String, check: Function, wrap: Function, directReturn: boolean, override: boolean): void; /** * Remove a named adapter from the registry * * @param name The name of the adapter. */ - unregister: {(name: String): any} + unregister(name: String): any; + } + + module AdapterRegistry { } /** @@ -1137,7 +1150,7 @@ declare module dojo { * @param url The rest of the path to append to the path derived from the module argument. Ifmodule is an object, then this second argument should be the "value" argument instead. * @param value OptionalIf a String, the value to use in the cache for the module/url combination.If an Object, it can have two properties: value and sanitize. The value propertyshould be the value to use in the cache, and sanitize can be set to true or false,to indicate if XML declarations should be removed from the value and if the HTMLinside a body tag in the value should be extracted as the real value. The value argumentor the value property on the value argument are usually only used by the build systemas it inlines cache content. */ - interface cache{(module: String, url: String, value?: String): void} + interface cache { (module: String, url: String, value?: String): void } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/cache.html * @@ -1159,7 +1172,7 @@ declare module dojo { * @param url The rest of the path to append to the path derived from the module argument. Ifmodule is an object, then this second argument should be the "value" argument instead. * @param value OptionalIf a String, the value to use in the cache for the module/url combination.If an Object, it can have two properties: value and sanitize. The value propertyshould be the value to use in the cache, and sanitize can be set to true or false,to indicate if XML declarations should be removed from the value and if the HTMLinside a body tag in the value should be extracted as the real value. The value argumentor the value property on the value argument are usually only used by the build systemas it inlines cache content. */ - interface cache{(module: Object, url: String, value?: String): void} + interface cache { (module: Object, url: String, value?: String): void } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/cache.html * @@ -1181,7 +1194,7 @@ declare module dojo { * @param url The rest of the path to append to the path derived from the module argument. Ifmodule is an object, then this second argument should be the "value" argument instead. * @param value OptionalIf a String, the value to use in the cache for the module/url combination.If an Object, it can have two properties: value and sanitize. The value propertyshould be the value to use in the cache, and sanitize can be set to true or false,to indicate if XML declarations should be removed from the value and if the HTMLinside a body tag in the value should be extracted as the real value. The value argumentor the value property on the value argument are usually only used by the build systemas it inlines cache content. */ - interface cache{(module: String, url: String, value?: Object): void} + interface cache { (module: String, url: String, value?: Object): void } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/cache.html * @@ -1203,7 +1216,7 @@ declare module dojo { * @param url The rest of the path to append to the path derived from the module argument. Ifmodule is an object, then this second argument should be the "value" argument instead. * @param value OptionalIf a String, the value to use in the cache for the module/url combination.If an Object, it can have two properties: value and sanitize. The value propertyshould be the value to use in the cache, and sanitize can be set to true or false,to indicate if XML declarations should be removed from the value and if the HTMLinside a body tag in the value should be extracted as the real value. The value argumentor the value property on the value argument are usually only used by the build systemas it inlines cache content. */ - interface cache{(module: Object, url: String, value?: Object): void} + interface cache { (module: Object, url: String, value?: Object): void } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/cookie.html * @@ -1215,8 +1228,8 @@ declare module dojo { * @param value OptionalValue for the cookie * @param props OptionalProperties for the cookie */ - interface cookie{(name: String, value?: String, props?: Object): void} - module cookie { + interface cookie { (name: String, value?: String, props?: Object): void } + interface cookie { /** * Use to determine if the current browser supports cookies or not. * @@ -1224,7 +1237,10 @@ declare module dojo { * Returns false if user doesn't allow cookies. * */ - interface isSupported{(): void} + isSupported(): void; + } + + module cookie { } /** @@ -1234,81 +1250,18 @@ declare module dojo { * * @param callback */ - interface domReady{(callback: any): void} - module domReady { + interface domReady { (callback: any): void } + interface domReady { /** * * @param id * @param req * @param load */ - interface load{(id: any, req: any, load: any): void} + load(id: any, req: any, load: any): void; } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/has.html - * - * Return the current value of the named feature. - * Returns the value of the feature named by name. The feature must have been - * previously added to the cache by has.add. - * - * @param name The name (if a string) or identifier (if an integer) of the feature to test. - */ - interface has{(name: String): void} - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/has.html - * - * Return the current value of the named feature. - * Returns the value of the feature named by name. The feature must have been - * previously added to the cache by has.add. - * - * @param name The name (if a string) or identifier (if an integer) of the feature to test. - */ - interface has{(name: number): void} - module has { - /** - * - */ - var cache: string - /** - * Register a new feature test for some named feature. - * - * @param name The name (if a string) or identifier (if an integer) of the feature to test. - * @param test A test function to register. If a function, queued for testing until actuallyneeded. The test function should return a boolean indicatingthe presence of a feature or bug. - * @param now OptionalOptional. Omit if test is not a function. Provides a way to immediatelyrun the test and cache the result. - * @param force OptionalOptional. If the test already exists and force is truthy, then the existingtest will be replaced; otherwise, add does not replace an existing test (thatis, by default, the first test advice wins). - */ - interface add{(name: String, test: Function, now: boolean, force: boolean): any} - /** - * Register a new feature test for some named feature. - * - * @param name The name (if a string) or identifier (if an integer) of the feature to test. - * @param test A test function to register. If a function, queued for testing until actuallyneeded. The test function should return a boolean indicatingthe presence of a feature or bug. - * @param now OptionalOptional. Omit if test is not a function. Provides a way to immediatelyrun the test and cache the result. - * @param force OptionalOptional. If the test already exists and force is truthy, then the existingtest will be replaced; otherwise, add does not replace an existing test (thatis, by default, the first test advice wins). - */ - interface add{(name: number, test: Function, now: boolean, force: boolean): any} - /** - * Deletes the contents of the element passed to test functions. - * - * @param element - */ - interface clearElement{(element: any): void} - /** - * Conditional loading of AMD modules based on a has feature test value. - * - * @param id Gives the resolved module id to load. - * @param parentRequire The loader require function with respect to the module that contained the plugin resource in it'sdependency list. - * @param loaded Callback to loader that consumes result of plugin demand. - */ - interface load{(id: String, parentRequire: Function, loaded: Function): void} - /** - * Resolves id into a module id based on possibly-nested tenary expression that branches on has feature test value(s). - * - * @param id - * @param toAbsMid Resolves a relative module id into an absolute module id - */ - interface normalize{(id: any, toAbsMid: Function): void} + module domReady { } /** @@ -1323,7 +1276,76 @@ declare module dojo { * @param hash Optionalthe hash is set - #string. * @param replace OptionalIf true, updates the hash value in the current historystate instead of creating a new history state. */ - interface hash{(hash?: String, replace?: boolean): void} + interface hash { (hash?: String, replace?: boolean): void } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/has.html + * + * Return the current value of the named feature. + * Returns the value of the feature named by name. The feature must have been + * previously added to the cache by has.add. + * + * @param name The name (if a string) or identifier (if an integer) of the feature to test. + */ + interface has { (name: String): void } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/has.html + * + * Return the current value of the named feature. + * Returns the value of the feature named by name. The feature must have been + * previously added to the cache by has.add. + * + * @param name The name (if a string) or identifier (if an integer) of the feature to test. + */ + interface has { (name: number): void } + interface has { + /** + * + */ + cache: string; + /** + * Register a new feature test for some named feature. + * + * @param name The name (if a string) or identifier (if an integer) of the feature to test. + * @param test A test function to register. If a function, queued for testing until actuallyneeded. The test function should return a boolean indicatingthe presence of a feature or bug. + * @param now OptionalOptional. Omit if test is not a function. Provides a way to immediatelyrun the test and cache the result. + * @param force OptionalOptional. If the test already exists and force is truthy, then the existingtest will be replaced; otherwise, add does not replace an existing test (thatis, by default, the first test advice wins). + */ + add(name: String, test: Function, now: boolean, force: boolean): any; + /** + * Register a new feature test for some named feature. + * + * @param name The name (if a string) or identifier (if an integer) of the feature to test. + * @param test A test function to register. If a function, queued for testing until actuallyneeded. The test function should return a boolean indicatingthe presence of a feature or bug. + * @param now OptionalOptional. Omit if test is not a function. Provides a way to immediatelyrun the test and cache the result. + * @param force OptionalOptional. If the test already exists and force is truthy, then the existingtest will be replaced; otherwise, add does not replace an existing test (thatis, by default, the first test advice wins). + */ + add(name: number, test: Function, now: boolean, force: boolean): any; + /** + * Deletes the contents of the element passed to test functions. + * + * @param element + */ + clearElement(element: any): void; + /** + * Conditional loading of AMD modules based on a has feature test value. + * + * @param id Gives the resolved module id to load. + * @param parentRequire The loader require function with respect to the module that contained the plugin resource in it'sdependency list. + * @param loaded Callback to loader that consumes result of plugin demand. + */ + load(id: String, parentRequire: Function, loaded: Function): void; + /** + * Resolves id into a module id based on possibly-nested tenary expression that branches on has feature test value(s). + * + * @param id + * @param toAbsMid Resolves a relative module id into an absolute module id + */ + normalize(id: any, toAbsMid: Function): void; + } + + module has { + } + /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/hccss.html * @@ -1332,7 +1354,21 @@ declare module dojo { * Returns has() method; * */ - interface hccss{(): void} + interface hccss { (): void } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/NodeList-data.html + * + * Adds data() and removeData() methods to NodeList, and returns NodeList constructor. + * + */ + interface NodeList_data { (): void } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/NodeList-html.html + * + * Adds a chainable html method to dojo/query() / NodeList instances for setting/replacing node content + * + */ + interface NodeList_html { (): void } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/NodeList-fx.html * @@ -1340,39 +1376,42 @@ declare module dojo { * with additional FX functions. NodeList is the array-like object used to hold query results. * */ - interface NodeList_fx{(): void} - module NodeList_fx { + interface NodeList_fx { (): void } + interface NodeList_fx { /** * fade all elements of the node list to a specified opacity * * @param args */ - interface fadeTo{(args: any): any} + fadeTo(args: any): any; /** * highlight all elements of the node list. * Returns an instance of dojo.Animation * * @param args */ - interface highlight{(args: any): any} + highlight(args: any): any; /** * size all elements of this NodeList. Returns an instance of dojo.Animation * * @param args */ - interface sizeTo{(args: any): any} + sizeTo(args: any): any; /** * slide all elements of this NodeList. Returns an instance of dojo.Animation * * @param args */ - interface slideBy{(args: any): any} + slideBy(args: any): any; /** * Wipe all elements of the NodeList to a specified width: or height: * * @param args */ - interface wipeTo{(args: any): any} + wipeTo(args: any): any; + } + + module NodeList_fx { } /** @@ -1381,14 +1420,7 @@ declare module dojo { * Adds DOM related methods to NodeList, and returns NodeList constructor. * */ - interface NodeList_dom{(): void} - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/NodeList-html.html - * - * Adds a chainable html method to dojo/query() / NodeList instances for setting/replacing node content - * - */ - interface NodeList_html{(): void} + interface NodeList_dom { (): void } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/NodeList-manipulate.html * @@ -1396,14 +1428,14 @@ declare module dojo { * and DOM nodes and their properties. * */ - interface NodeList_manipulate{(): void} + interface NodeList_manipulate { (): void } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/NodeList-traverse.html * * Adds chainable methods to dojo/query() / NodeList instances for traversing the DOM * */ - interface NodeList_traverse{(): void} + interface NodeList_traverse { (): void } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/on.html * @@ -1437,7 +1469,7 @@ declare module dojo { * @param listener This is the function that should be called when the event fires. * @param dontFix */ - interface on{(target: HTMLElement, type: String, listener: Function, dontFix: any): void} + interface on { (target: HTMLElement, type: String, listener: Function, dontFix: any): void } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/on.html * @@ -1471,7 +1503,7 @@ declare module dojo { * @param listener This is the function that should be called when the event fires. * @param dontFix */ - interface on{(target: Object, type: String, listener: Function, dontFix: any): void} + interface on { (target: Object, type: String, listener: Function, dontFix: any): void } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/on.html * @@ -1505,7 +1537,7 @@ declare module dojo { * @param listener This is the function that should be called when the event fires. * @param dontFix */ - interface on{(target: HTMLElement, type: Function, listener: Function, dontFix: any): void} + interface on { (target: HTMLElement, type: Function, listener: Function, dontFix: any): void } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/on.html * @@ -1539,15 +1571,15 @@ declare module dojo { * @param listener This is the function that should be called when the event fires. * @param dontFix */ - interface on{(target: Object, type: Function, listener: Function, dontFix: any): void} - module on { + interface on { (target: Object, type: String, listener: Function, dontFix?: any): { remove: { (): void } } } + interface on { /** * * @param target * @param type * @param event */ - interface emit{(target: any, type: any, event: any): any} + emit(target: any, type: any, event: any): any; /** * This function acts the same as on(), but will only call the listener once. The * listener will be called for the first @@ -1558,7 +1590,7 @@ declare module dojo { * @param listener * @param dontFix */ - interface once{(target: any, type: any, listener: any, dontFix: any): any} + once(target: any, type: any, listener: any, dontFix: any): any; /** * * @param target @@ -1568,7 +1600,7 @@ declare module dojo { * @param dontFix * @param matchesTarget */ - interface parse{(target: any, type: any, listener: any, addListener: any, dontFix: any, matchesTarget: any): any} + parse(target: any, type: any, listener: any, addListener: any, dontFix: any, matchesTarget: any): any; /** * This function acts the same as on(), but with pausable functionality. The * returned signal object has pause() and resume() functions. Calling the @@ -1580,7 +1612,7 @@ declare module dojo { * @param listener * @param dontFix */ - interface pausable{(target: any, type: any, listener: any, dontFix: any): any} + pausable(target: any, type: any, listener: any, dontFix: any): any; /** * Creates a new extension event with event delegation. This is based on * the provided event type (can be extension event) that @@ -1592,16 +1624,12 @@ declare module dojo { * @param eventType The event to listen for * @param children Indicates if children elements of the selector should be allowed. This defaults to true */ - interface selector{(selector: any, eventType: any, children: any): Function} + selector(selector: any, eventType: any, children: any): Function; + } + + module on { } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/NodeList-data.html - * - * Adds data() and removeData() methods to NodeList, and returns NodeList constructor. - * - */ - interface NodeList_data{(): void} /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/query.html * @@ -1686,7 +1714,7 @@ declare module dojo { * @param context OptionalAn optional context to limit the searching scope. Only nodes under context will bescanned. */ interface query{(selector: String, context?: HTMLElement): void} - module query { + interface query { /** * can be used as AMD plugin to conditionally load new query engine * @@ -1694,7 +1722,7 @@ declare module dojo { * @param parentRequire * @param loaded */ - interface load{(id: any, parentRequire: any, loaded: any): void} + load(id: any, parentRequire: any, loaded: any): void; /** * Array-like object which adds syntactic * sugar for chaining, common iteration operations, animation, and @@ -1709,7 +1737,10 @@ declare module dojo { * * @param array */ - interface NodeList{(array: any): any[]} + NodeList(array: any): any[]; + } + + module query { } /** @@ -1791,7 +1822,7 @@ declare module dojo { /** * */ - "promise": Object; + "promise": dojo.promise.Promise; /** * Inform the deferred it may cancel its asynchronous operation. * Inform the deferred it may cancel its asynchronous operation. @@ -1848,7 +1879,7 @@ declare module dojo { * @param value The result of the deferred. Passed to callbacks. * @param strict OptionalIf strict, will throw an error if the deferred has alreadybeen fulfilled and consequently cannot be resolved. */ - resolve(value: any, strict: boolean): dojo.promise.Promise; + resolve(value: any, strict?: boolean): dojo.promise.Promise; /** * Add new callbacks to the deferred. * Add new callbacks to the deferred. Callbacks can be added @@ -1879,13 +1910,13 @@ declare module dojo { * @param type * @param event */ - emit(type: any, event: any): any; + emit(type: String, data: any): any; /** * * @param type * @param listener */ - on(type: any, listener: any): any; + on(type: String, listener: {(e:any):void}): {remove: {():void}}; } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/NodeList.html @@ -2322,6 +2353,27 @@ declare module dojo { * @param fn Callback function passed the event object, and where this == the node that matches the selector.That means that for example, after setting up a handler viadojo.query("body").delegate("fieldset", "onclick", ...)clicking on a fieldset or any nodes inside of a fieldset will be reportedas a click on the fieldset itself. */ delegate(selector: String, eventName: String, fn: Function): any; + /** + * Renders the specified template in each of the NodeList entries. + * + * @param template The template string or location + * @param context The context object or location + */ + dtl(template: dojox.dtl.__StringArgs , context: dojox.dtl.__ObjectArgs ): Function; + /** + * Renders the specified template in each of the NodeList entries. + * + * @param template The template string or location + * @param context The context object or location + */ + dtl(template: String, context: dojox.dtl.__ObjectArgs ): Function; + /** + * Renders the specified template in each of the NodeList entries. + * + * @param template The template string or location + * @param context The context object or location + */ + dtl(template: dojox.dtl.__StringArgs , context: Object): Function; /** * Renders the specified template in each of the NodeList entries. * @@ -3046,6 +3098,7 @@ declare module dojo { */ class Stateful { constructor(); + inherited: {(arguments: IArguments): any}; /** * Get a property on a Stateful instance. * Get a named property on a Stateful object. The property may @@ -3054,7 +3107,7 @@ declare module dojo { * * @param name The property to get. */ - get(name: string): any; + get(name: String): any; /** * * @param params Optional @@ -3068,7 +3121,7 @@ declare module dojo { * @param name The property to set. * @param value The value to set in the property. */ - set(name: string, value: Object): any; + set(name: String, value: Object): any; /** * Watches a property for changes * @@ -3152,7 +3205,7 @@ declare module dojo { * @param superclass May be null, a Function, or an Array of Functions. This argumentspecifies a list of bases (the left-most one is the most deepestbase). * @param props An object whose properties are copied to the created prototype.Add an instance-initialization function by making it a propertynamed "constructor". */ - interface declare{(className?: String, superclass?: Function, props?: Object): void} + interface declare { (className?: String, superclass?: any, props?: Object): any} /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/declare.html * @@ -3227,8 +3280,8 @@ declare module dojo { * @param superclass May be null, a Function, or an Array of Functions. This argumentspecifies a list of bases (the left-most one is the most deepestbase). * @param props An object whose properties are copied to the created prototype.Add an instance-initialization function by making it a propertynamed "constructor". */ - interface declare{(className?: String, superclass?: Function[], props?: Object): void} - module declare { + interface declare{(className?: String, superclass?: any[], props?: Object): any} + interface declare { /** * Mix in properties skipping a constructor and decorating functions * like it is done by declare(). @@ -3246,7 +3299,10 @@ declare module dojo { * @param target Target object to accept new properties. * @param source Source object for new properties. */ - interface safeMixin{(target: Object, source: Object): Object} + safeMixin(target: Object, source: Object): Object; + } + + module declare { /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/declare.__DeclareCreatedObject.html * @@ -3393,95 +3449,95 @@ declare module dojo { * @param canceller Optional */ interface Deferred{(canceller?: Function): void} - module Deferred { + interface Deferred { /** * */ - var fired: number + fired: number; /** * */ - var promise: Object + promise: Object; /** * Add handler as both successful callback and error callback for this deferred instance. * * @param callback */ - interface addBoth{(callback: Function): any} + addBoth(callback: Function): any; /** * Adds successful callback for this deferred instance. * * @param callback */ - interface addCallback{(callback: Function): any} + addCallback(callback: Function): any; /** * Adds callback and error callback for this deferred instance. * * @param callback OptionalThe callback attached to this deferred object. * @param errback OptionalThe error callback attached to this deferred object. */ - interface addCallbacks{(callback: Function, errback: Function): any} + addCallbacks(callback: Function, errback: Function): any; /** * Adds error callback for this deferred instance. * * @param errback */ - interface addErrback{(errback: Function): any} + addErrback(errback: Function): any; /** * Fulfills the Deferred instance successfully with the provide value * * @param value */ - interface callback{(value: any): void} + callback(value: any): void; /** * Cancels the asynchronous operation * */ - interface cancel{(): void} + cancel(): void; /** * Fulfills the Deferred instance as an error with the provided error * * @param error */ - interface errback{(error: any): void} + errback(error: any): void; /** * Checks whether the deferred has been canceled. * */ - interface isCanceled{(): boolean} + isCanceled(): boolean; /** * Checks whether the deferred has been resolved or rejected. * */ - interface isFulfilled{(): boolean} + isFulfilled(): boolean; /** * Checks whether the deferred has been rejected. * */ - interface isRejected{(): boolean} + isRejected(): boolean; /** * Checks whether the deferred has been resolved. * */ - interface isResolved{(): boolean} + isResolved(): boolean; /** * Send progress events to all listeners * * @param update */ - interface progress{(update: any): void} + progress(update: any): void; /** * Fulfills the Deferred instance as an error with the provided error * * @param error */ - interface reject{(error: any): void} + reject(error: any): void; /** * Fulfills the Deferred instance successfully with the provide value * * @param value */ - interface resolve{(value: any): void} + resolve(value: any): void; /** * Adds a fulfilledHandler, errorHandler, and progressHandler to be called for * completion of a promise. The fulfilledHandler is called when the promise @@ -3501,7 +3557,7 @@ declare module dojo { * @param errorCallback Optional * @param progressCallback Optional */ - interface then{(resolvedCallback: Function, errorCallback: Function, progressCallback: Function): any} + then(resolvedCallback: Function, errorCallback: Function, progressCallback: Function): any; /** * Transparently applies callbacks to values and/or promises. * Accepts promises but also transparently handles non-promises. If no @@ -3518,7 +3574,10 @@ declare module dojo { * @param errback OptionalCallback to be invoked when the promise is rejected. * @param progback OptionalCallback to be invoked when the promise emits a progress update. */ - interface when{(valueOrPromise: any, callback: Function, errback: Function, progback: Function): any} + when(valueOrPromise: any, callback: Function, errback: Function, progback: Function): any; + } + + module Deferred { } /** @@ -3527,58 +3586,54 @@ declare module dojo { * */ interface url{(): void} + interface url { + /** + * + */ + authority: Object; + /** + * + */ + fragment: Object; + /** + * + */ + host: Object; + /** + * + */ + password: Object; + /** + * + */ + path: Object; + /** + * + */ + port: Object; + /** + * + */ + query: Object; + /** + * + */ + scheme: Object; + /** + * + */ + uri: Object; + /** + * + */ + user: Object; + /** + * + */ + toString(): void; + } + module url { - /** - * - */ - var authority: Object - /** - * - */ - var fragment: Object - /** - * - */ - var host: Object - /** - * - */ - var password: Object - /** - * - */ - var path: Object - /** - * - */ - var port: Object - /** - * - */ - var query: Object - /** - * - */ - var scheme: Object - /** - * - */ - var uri: Object - /** - * - */ - var user: Object - /** - * - */ - interface toString{(): void} - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/url.fragment.html - * - * - */ - interface fragment { - } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/url.authority.html * @@ -3593,6 +3648,20 @@ declare module dojo { */ interface password { } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/url.port.html + * + * + */ + interface port { + } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/url.fragment.html + * + * + */ + interface fragment { + } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/url.query.html * @@ -3600,13 +3669,6 @@ declare module dojo { */ interface query { } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/url.scheme.html - * - * - */ - interface scheme { - } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/url.user.html * @@ -3615,11 +3677,11 @@ declare module dojo { interface user { } /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/url.port.html + * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/url.scheme.html * * */ - interface port { + interface scheme { } } @@ -3637,19 +3699,19 @@ declare module dojo { * @param hasBody OptionalIf the request has an HTTP body, then pass true for hasBody. */ interface xhr{(method: String, args: Object, hasBody?: boolean): void} - module xhr { + interface xhr { /** * A map of available XHR transport handle types. Name matches the * handleAs attribute passed to XHR calls. * */ - var contentHandlers: Object + contentHandlers: Object; /** * Sends an HTTP DELETE request to the server. * * @param args An object with the following properties:handleAs (String, optional): Acceptable values are: text (default), json, json-comment-optional,json-comment-filtered, javascript, xml. See dojo/_base/xhr.contentHandlerssync (Boolean, optional): false is default. Indicates whether the request shouldbe a synchronous (blocking) request.headers (Object, optional): Additional HTTP headers to send in the request.failOk (Boolean, optional): false is default. Indicates whether a request should beallowed to fail (and therefore no console error message inthe event of a failure)contentType (String|Boolean): "application/x-www-form-urlencoded" is default. Set to false toprevent a Content-Type header from being sent, or to a stringto send a different Content-Type.load: This function will becalled on a successful HTTP response code.error: This function willbe called when the request fails due to a network or server error, the urlis invalid, etc. It will also be called if the load or handle callback throws anexception, unless djConfig.debugAtAllCosts is true. This allows deployed applicationsto continue to run even when a logic error happens in the callback, while makingit easier to troubleshoot while in debug mode.handle: This function willbe called at the end of every request, whether or not an error occurs.url (String): URL to server endpoint.content (Object, optional): Contains properties with string values. Theseproperties will be serialized as name1=value2 andpassed in the request.timeout (Integer, optional): Milliseconds to wait for the response. If this timepasses, the then error callbacks are called.form (DOMNode, optional): DOM node for a form. Used to extract the form valuesand send to the server.preventCache (Boolean, optional): Default is false. If true, then a"dojo.preventCache" parameter is sent in the requestwith a value that changes with each request(timestamp). Useful only with GET-type requests.rawBody (String, optional): Sets the raw body for an HTTP request. If this is used, then the contentproperty is ignored. This is mostly useful for HTTP methods that havea body to their requests, like PUT or POST. This property can be used insteadof postData and putData for dojo/_base/xhr.rawXhrPost and dojo/_base/xhr.rawXhrPut respectively.ioPublish (Boolean, optional): Set this explicitly to false to prevent publishing of topics related toIO operations. Otherwise, if djConfig.ioPublish is set to true, topicswill be published via dojo/topic.publish() for different phases of an IO operation.See dojo/main.__IoPublish for a list of topics that are published. */ - interface del{(args: Object): any} + del(args: Object): any; /** * Serialize a form field to a JavaScript object. * Returns the value encoded in a form field as @@ -3659,7 +3721,7 @@ declare module dojo { * * @param inputNode */ - interface fieldToObject{(inputNode: HTMLElement): any} + fieldToObject(inputNode: HTMLElement): any; /** * Serialize a form field to a JavaScript object. * Returns the value encoded in a form field as @@ -3669,7 +3731,7 @@ declare module dojo { * * @param inputNode */ - interface fieldToObject{(inputNode: String): any} + fieldToObject(inputNode: String): any; /** * Create a serialized JSON string from a form node or string * ID identifying the form to serialize @@ -3677,7 +3739,7 @@ declare module dojo { * @param formNode * @param prettyPrint Optional */ - interface formToJson{(formNode: HTMLElement, prettyPrint: boolean): any} + formToJson(formNode: HTMLElement, prettyPrint: boolean): any; /** * Create a serialized JSON string from a form node or string * ID identifying the form to serialize @@ -3685,7 +3747,7 @@ declare module dojo { * @param formNode * @param prettyPrint Optional */ - interface formToJson{(formNode: String, prettyPrint: boolean): any} + formToJson(formNode: String, prettyPrint: boolean): any; /** * Serialize a form node to a JavaScript object. * Returns the values encoded in an HTML form as @@ -3695,7 +3757,7 @@ declare module dojo { * * @param formNode */ - interface formToObject{(formNode: HTMLElement): Object} + formToObject(formNode: HTMLElement): Object; /** * Serialize a form node to a JavaScript object. * Returns the values encoded in an HTML form as @@ -3705,55 +3767,58 @@ declare module dojo { * * @param formNode */ - interface formToObject{(formNode: String): Object} + formToObject(formNode: String): Object; /** * Returns a URL-encoded string representing the form passed as either a * node or string ID identifying the form to serialize * * @param formNode */ - interface formToQuery{(formNode: HTMLElement): any} + formToQuery(formNode: HTMLElement): any; /** * Returns a URL-encoded string representing the form passed as either a * node or string ID identifying the form to serialize * * @param formNode */ - interface formToQuery{(formNode: String): any} + formToQuery(formNode: String): any; /** * Sends an HTTP GET request to the server. * * @param args An object with the following properties:handleAs (String, optional): Acceptable values are: text (default), json, json-comment-optional,json-comment-filtered, javascript, xml. See dojo/_base/xhr.contentHandlerssync (Boolean, optional): false is default. Indicates whether the request shouldbe a synchronous (blocking) request.headers (Object, optional): Additional HTTP headers to send in the request.failOk (Boolean, optional): false is default. Indicates whether a request should beallowed to fail (and therefore no console error message inthe event of a failure)contentType (String|Boolean): "application/x-www-form-urlencoded" is default. Set to false toprevent a Content-Type header from being sent, or to a stringto send a different Content-Type.load: This function will becalled on a successful HTTP response code.error: This function willbe called when the request fails due to a network or server error, the urlis invalid, etc. It will also be called if the load or handle callback throws anexception, unless djConfig.debugAtAllCosts is true. This allows deployed applicationsto continue to run even when a logic error happens in the callback, while makingit easier to troubleshoot while in debug mode.handle: This function willbe called at the end of every request, whether or not an error occurs.url (String): URL to server endpoint.content (Object, optional): Contains properties with string values. Theseproperties will be serialized as name1=value2 andpassed in the request.timeout (Integer, optional): Milliseconds to wait for the response. If this timepasses, the then error callbacks are called.form (DOMNode, optional): DOM node for a form. Used to extract the form valuesand send to the server.preventCache (Boolean, optional): Default is false. If true, then a"dojo.preventCache" parameter is sent in the requestwith a value that changes with each request(timestamp). Useful only with GET-type requests.rawBody (String, optional): Sets the raw body for an HTTP request. If this is used, then the contentproperty is ignored. This is mostly useful for HTTP methods that havea body to their requests, like PUT or POST. This property can be used insteadof postData and putData for dojo/_base/xhr.rawXhrPost and dojo/_base/xhr.rawXhrPut respectively.ioPublish (Boolean, optional): Set this explicitly to false to prevent publishing of topics related toIO operations. Otherwise, if djConfig.ioPublish is set to true, topicswill be published via dojo/topic.publish() for different phases of an IO operation.See dojo/main.__IoPublish for a list of topics that are published. */ - interface get{(args: Object): any} + get(args: Object): any; /** * takes a name/value mapping object and returns a string representing * a URL-encoded version of that object. * * @param map */ - interface objectToQuery{(map: Object): any} + objectToQuery(map: Object): any; /** * Sends an HTTP POST request to the server. In addition to the properties * listed for the dojo.__XhrArgs type, the following property is allowed: * * @param args An object with the following properties:handleAs (String, optional): Acceptable values are: text (default), json, json-comment-optional,json-comment-filtered, javascript, xml. See dojo/_base/xhr.contentHandlerssync (Boolean, optional): false is default. Indicates whether the request shouldbe a synchronous (blocking) request.headers (Object, optional): Additional HTTP headers to send in the request.failOk (Boolean, optional): false is default. Indicates whether a request should beallowed to fail (and therefore no console error message inthe event of a failure)contentType (String|Boolean): "application/x-www-form-urlencoded" is default. Set to false toprevent a Content-Type header from being sent, or to a stringto send a different Content-Type.load: This function will becalled on a successful HTTP response code.error: This function willbe called when the request fails due to a network or server error, the urlis invalid, etc. It will also be called if the load or handle callback throws anexception, unless djConfig.debugAtAllCosts is true. This allows deployed applicationsto continue to run even when a logic error happens in the callback, while makingit easier to troubleshoot while in debug mode.handle: This function willbe called at the end of every request, whether or not an error occurs.url (String): URL to server endpoint.content (Object, optional): Contains properties with string values. Theseproperties will be serialized as name1=value2 andpassed in the request.timeout (Integer, optional): Milliseconds to wait for the response. If this timepasses, the then error callbacks are called.form (DOMNode, optional): DOM node for a form. Used to extract the form valuesand send to the server.preventCache (Boolean, optional): Default is false. If true, then a"dojo.preventCache" parameter is sent in the requestwith a value that changes with each request(timestamp). Useful only with GET-type requests.rawBody (String, optional): Sets the raw body for an HTTP request. If this is used, then the contentproperty is ignored. This is mostly useful for HTTP methods that havea body to their requests, like PUT or POST. This property can be used insteadof postData and putData for dojo/_base/xhr.rawXhrPost and dojo/_base/xhr.rawXhrPut respectively.ioPublish (Boolean, optional): Set this explicitly to false to prevent publishing of topics related toIO operations. Otherwise, if djConfig.ioPublish is set to true, topicswill be published via dojo/topic.publish() for different phases of an IO operation.See dojo/main.__IoPublish for a list of topics that are published. */ - interface post{(args: Object): any} + post(args: Object): any; /** * Sends an HTTP PUT request to the server. In addition to the properties * listed for the dojo.__XhrArgs type, the following property is allowed: * * @param args An object with the following properties:handleAs (String, optional): Acceptable values are: text (default), json, json-comment-optional,json-comment-filtered, javascript, xml. See dojo/_base/xhr.contentHandlerssync (Boolean, optional): false is default. Indicates whether the request shouldbe a synchronous (blocking) request.headers (Object, optional): Additional HTTP headers to send in the request.failOk (Boolean, optional): false is default. Indicates whether a request should beallowed to fail (and therefore no console error message inthe event of a failure)contentType (String|Boolean): "application/x-www-form-urlencoded" is default. Set to false toprevent a Content-Type header from being sent, or to a stringto send a different Content-Type.load: This function will becalled on a successful HTTP response code.error: This function willbe called when the request fails due to a network or server error, the urlis invalid, etc. It will also be called if the load or handle callback throws anexception, unless djConfig.debugAtAllCosts is true. This allows deployed applicationsto continue to run even when a logic error happens in the callback, while makingit easier to troubleshoot while in debug mode.handle: This function willbe called at the end of every request, whether or not an error occurs.url (String): URL to server endpoint.content (Object, optional): Contains properties with string values. Theseproperties will be serialized as name1=value2 andpassed in the request.timeout (Integer, optional): Milliseconds to wait for the response. If this timepasses, the then error callbacks are called.form (DOMNode, optional): DOM node for a form. Used to extract the form valuesand send to the server.preventCache (Boolean, optional): Default is false. If true, then a"dojo.preventCache" parameter is sent in the requestwith a value that changes with each request(timestamp). Useful only with GET-type requests.rawBody (String, optional): Sets the raw body for an HTTP request. If this is used, then the contentproperty is ignored. This is mostly useful for HTTP methods that havea body to their requests, like PUT or POST. This property can be used insteadof postData and putData for dojo/_base/xhr.rawXhrPost and dojo/_base/xhr.rawXhrPut respectively.ioPublish (Boolean, optional): Set this explicitly to false to prevent publishing of topics related toIO operations. Otherwise, if djConfig.ioPublish is set to true, topicswill be published via dojo/topic.publish() for different phases of an IO operation.See dojo/main.__IoPublish for a list of topics that are published. */ - interface put{(args: Object): any} + put(args: Object): any; /** * Create an object representing a de-serialized query section of a * URL. Query keys with multiple values are returned in an array. * * @param str */ - interface queryToObject{(str: String): Object} + queryToObject(str: String): Object; + } + + module xhr { /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/xhr.contentHandlers.html * @@ -3964,7 +4029,7 @@ declare module dojo { */ "require": Object; /** - * Array containing the r, g, b components used as transparent color in dojo._base.Color; + * Array containing the r, g, b components used as transparent color in dojo.Color; * if undefined, [255,255,255] (white) will be used. * */ @@ -4081,7 +4146,7 @@ declare module dojo { * Parses str for a color value. Accepts hex, rgb, and rgba * style color values. * Acceptable input values for str may include arrays of any form - * accepted by dojo._base.ColorFromArray, hex strings such as "#aaaaaa", or + * accepted by dojo.colorFromArray, hex strings such as "#aaaaaa", or * rgb or rgba strings such as "rgb(133, 200, 16)" or "rgba(10, 10, * 10, 50)" * @@ -4893,7 +4958,7 @@ declare module dojo { * @param callback * @param thisObject Optional */ - forEach(arr: any[], callback: Function, thisObject: Object): void; + forEach(arr: any[], callback: Function, thisObject?: Object): void; /** * for every item in arr, callback is invoked. Return values are ignored. * If you want to break out of the loop, consider using array.every() or array.some(). @@ -4908,7 +4973,7 @@ declare module dojo { * @param callback * @param thisObject Optional */ - forEach(arr: String, callback: Function, thisObject: Object): void; + forEach(arr: String, callback: Function, thisObject?: Object): void; /** * for every item in arr, callback is invoked. Return values are ignored. * If you want to break out of the loop, consider using array.every() or array.some(). @@ -4923,7 +4988,7 @@ declare module dojo { * @param callback * @param thisObject Optional */ - forEach(arr: any[], callback: String, thisObject: Object): void; + forEach(arr: any[], callback: String, thisObject?: Object): void; /** * for every item in arr, callback is invoked. Return values are ignored. * If you want to break out of the loop, consider using array.every() or array.some(). @@ -4938,7 +5003,7 @@ declare module dojo { * @param callback * @param thisObject Optional */ - forEach(arr: String, callback: String, thisObject: Object): void; + forEach(arr: String, callback: String, thisObject?: Object): void; /** * locates the first index of the provided value in the * passed array. If the value is not found, -1 is returned. @@ -5320,14 +5385,6 @@ declare module dojo { */ unsubscribe(handle: Object): void; } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/html.html - * - * This module is a stub for the core dojo DOM API. - * - */ - interface html { - } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/event.html * @@ -5352,6 +5409,39 @@ declare module dojo { */ stop(evt: Event): void; } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/html.html + * + * This module is a stub for the core dojo DOM API. + * + */ + interface html { + } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/json.html + * + * This module defines the dojo JSON API. + * + */ + interface json { + } + + module fx { + /** + * A generic animation class that fires callbacks into its handlers + * object at various states. + * A generic animation class that fires callbacks into its handlers + * object at various states. Nearly all dojo animation functions + * return an instance of this method, usually without calling the + * .play() method beforehand. Therefore, you will likely need to + * call .play() on instances of Animation when one is + * returned. + * + * @param args The 'magic argument', mixing all the properties into thisanimation instance. + */ + interface Animation { } + } + /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/fx.html * @@ -5379,7 +5469,7 @@ declare module dojo { * @param onEnd OptionalA function to be called when the animation finishesrunning. * @param delay OptionalThe number of milliseconds to delay beginning theanimation by. The default is 0. */ - anim(node: HTMLElement, properties: Object, duration: number, easing: Function, onEnd: Function, delay: number): any; + anim (node: HTMLElement, properties: Object, duration: number, easing: Function, onEnd: Function, delay: number): any ; /** * A simpler interface to animateProperty(), also returns * an instance of Animation but begins the animation @@ -5400,7 +5490,7 @@ declare module dojo { * @param onEnd OptionalA function to be called when the animation finishesrunning. * @param delay OptionalThe number of milliseconds to delay beginning theanimation by. The default is 0. */ - anim(node: String, properties: Object, duration: number, easing: Function, onEnd: Function, delay: number): any; + anim (node: String, properties: Object, duration: number, easing: Function, onEnd: Function, delay: number): any ; /** * Returns an animation that will transition the properties of * node defined in args depending how they are defined in @@ -5412,45 +5502,22 @@ declare module dojo { * * @param args An object with the following properties:properties (Object, optional): A hash map of style properties to Objects describing the transition,such as the properties of _Line with an additional 'units' propertynode (DOMNode|String): The node referenced in the animationduration (Integer, optional): Duration of the animation in milliseconds.easing (Function, optional): An easing function. */ - animateProperty(args: Object): any; - /** - * A generic animation class that fires callbacks into its handlers - * object at various states. - * A generic animation class that fires callbacks into its handlers - * object at various states. Nearly all dojo animation functions - * return an instance of this method, usually without calling the - * .play() method beforehand. Therefore, you will likely need to - * call .play() on instances of Animation when one is - * returned. - * - * @param args The 'magic argument', mixing all the properties into thisanimation instance. - */ - Animation(args: Object): void; + animateProperty (args: Object): any ; + /** * Returns an animation that will fade node defined in 'args' from * its current opacity to fully opaque. * * @param args An object with the following properties:node (DOMNode|String): The node referenced in the animationduration (Integer, optional): Duration of the animation in milliseconds.easing (Function, optional): An easing function. */ - fadeIn(args: Object): any; + fadeIn (args: Object): any ; /** * Returns an animation that will fade node defined in 'args' * from its current opacity to fully transparent. * * @param args An object with the following properties:node (DOMNode|String): The node referenced in the animationduration (Integer, optional): Duration of the animation in milliseconds.easing (Function, optional): An easing function. */ - fadeOut(args: Object): any; - } - module fx { - interface Animation { } - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/json.html - * - * This module defines the dojo JSON API. - * - */ - interface json { + fadeOut (args: Object): any ; } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/query.html @@ -5480,6 +5547,209 @@ declare module dojo { */ interface sniff { } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/lang.html + * + * This module defines Javascript language extensions. + * + */ + interface lang { + /** + * Clones objects (including DOM nodes) and all children. + * Warning: do not clone cyclic structures. + * + * @param src The object to clone + */ + clone(src: any): any; + /** + * Returns a new object which "looks" to obj for properties which it + * does not have a value for. Optionally takes a bag of properties to + * seed the returned object with initially. + * This is a small implementation of the Boodman/Crockford delegation + * pattern in JavaScript. An intermediate object constructor mediates + * the prototype chain for the returned object, using it to delegate + * down to obj for property lookup when object-local lookup fails. + * This can be thought of similarly to ES4's "wrap", save that it does + * not act on types but rather on pure objects. + * + * @param obj The object to delegate to for properties not found directly on thereturn object or in props. + * @param props an object containing properties to assign to the returned object + */ + delegate(obj: Object, props: Object[]): any; + /** + * determine if an object supports a given method + * useful for longer api chains where you have to test each object in + * the chain. Useful for object and method detection. + * + * @param name Path to an object, in the form "A.B.C". + * @param obj OptionalObject to use as root of path. Defaults to'dojo.global'. Null may be passed. + */ + exists(name: String, obj: Object): boolean; + /** + * Adds all properties and methods of props to constructor's + * prototype, making them available to all instances created with + * constructor. + * + * @param ctor Target constructor to extend. + * @param props One or more objects to mix into ctor.prototype + */ + extend(ctor: Object, props: Object): Object; + /** + * Get a property from a dot-separated string, such as "A.B.C" + * Useful for longer api chains where you have to test each object in + * the chain, or when you have an object reference in string format. + * + * @param name Path to an property, in the form "A.B.C". + * @param create OptionalOptional. Defaults to false. If true, Objects will becreated at any point along the 'path' that is undefined. + * @param context OptionalOptional. Object to use as root of path. Defaults to'dojo.global'. Null may be passed. + */ + getObject(name: String, create: boolean, context: Object): any; + /** + * Returns a function that will only ever execute in the a given scope. + * This allows for easy use of object member functions + * in callbacks and other places in which the "this" keyword may + * otherwise not reference the expected scope. + * Any number of default positional arguments may be passed as parameters + * beyond "method". + * Each of these values will be used to "placehold" (similar to curry) + * for the hitched function. + * + * @param scope The scope to use when method executes. If method is a string,scope is also the object containing method. + * @param method A function to be hitched to scope, or the name of the method inscope to be hitched. + */ + hitch(scope: Object, method: Function): any; + /** + * Returns a function that will only ever execute in the a given scope. + * This allows for easy use of object member functions + * in callbacks and other places in which the "this" keyword may + * otherwise not reference the expected scope. + * Any number of default positional arguments may be passed as parameters + * beyond "method". + * Each of these values will be used to "placehold" (similar to curry) + * for the hitched function. + * + * @param scope The scope to use when method executes. If method is a string,scope is also the object containing method. + * @param method A function to be hitched to scope, or the name of the method inscope to be hitched. + */ + hitch(scope: Object, method: String[]): any; + /** + * Returns true if it is a built-in function or some other kind of + * oddball that should report as a function but doesn't + * + * @param it + */ + isAlien(it: any): any; + /** + * Return true if it is an Array. + * Does not work on Arrays created in other windows. + * + * @param it Item to test. + */ + isArray(it: any): any; + /** + * similar to isArray() but more permissive + * Doesn't strongly test for "arrayness". Instead, settles for "isn't + * a string or number and has a length property". Arguments objects + * and DOM collections will return true when passed to + * isArrayLike(), but will return false when passed to + * isArray(). + * + * @param it Item to test. + */ + isArrayLike(it: any): any; + /** + * Return true if it is a Function + * + * @param it Item to test. + */ + isFunction(it: any): boolean; + /** + * Returns true if it is a JavaScript object (or an Array, a Function + * or null) + * + * @param it Item to test. + */ + isObject(it: any): boolean; + /** + * Return true if it is a String + * + * @param it Item to test. + */ + isString(it: any): boolean; + /** + * Copies/adds all properties of one or more sources to dest; returns dest. + * All properties, including functions (sometimes termed "methods"), excluding any non-standard extensions + * found in Object.prototype, are copied/added from sources to dest. sources are processed left to right. + * The Javascript assignment operator is used to copy/add each property; therefore, by default, mixin + * executes a so-called "shallow copy" and aggregate types are copied/added by reference. + * + * @param dest The object to which to copy/add all properties contained in source. If dest is falsy, thena new object is manufactured before copying/adding properties begins. + * @param sources One of more objects from which to draw all properties to copy into dest. sources are processedleft-to-right and if more than one of these objects contain the same property name, the right-mostvalue "wins". + */ + mixin(dest: Object, sources: Object[]): Object; + /** + * similar to hitch() except that the scope object is left to be + * whatever the execution context eventually becomes. + * Calling lang.partial is the functional equivalent of calling: + * + * lang.hitch(null, funcName, ...); + * + * @param method The function to "wrap" + */ + partial(method: Function): any; + /** + * similar to hitch() except that the scope object is left to be + * whatever the execution context eventually becomes. + * Calling lang.partial is the functional equivalent of calling: + * + * lang.hitch(null, funcName, ...); + * + * @param method The function to "wrap" + */ + partial(method: String): any; + /** + * Performs parameterized substitutions on a string. Throws an + * exception if any parameter is unmatched. + * + * @param tmpl String to be used as a template. + * @param map If an object, it is used as a dictionary to look up substitutions.If a function, it is called for every substitution with following parameters:a whole match, a name, an offset, and the whole templatestring (see https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/replacefor more details). + * @param pattern OptionalOptional regular expression objects that overrides the default pattern.Must be global and match one item. The default is: /{([^}]+)}/g,which matches patterns like that: "{xxx}", where "xxx" is any sequenceof characters, which doesn't include "}". + */ + replace(tmpl: String, map: Object, pattern: RegExp): String; + /** + * Performs parameterized substitutions on a string. Throws an + * exception if any parameter is unmatched. + * + * @param tmpl String to be used as a template. + * @param map If an object, it is used as a dictionary to look up substitutions.If a function, it is called for every substitution with following parameters:a whole match, a name, an offset, and the whole templatestring (see https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/replacefor more details). + * @param pattern OptionalOptional regular expression objects that overrides the default pattern.Must be global and match one item. The default is: /{([^}]+)}/g,which matches patterns like that: "{xxx}", where "xxx" is any sequenceof characters, which doesn't include "}". + */ + replace(tmpl: String, map: Function, pattern: RegExp): String; + /** + * Set a property from a dot-separated string, such as "A.B.C" + * Useful for longer api chains where you have to test each object in + * the chain, or when you have an object reference in string format. + * Objects are created as needed along path. Returns the passed + * value if setting is successful or undefined if not. + * + * @param name Path to a property, in the form "A.B.C". + * @param value value or object to place at location given by name + * @param context OptionalOptional. Object to use as root of path. Defaults todojo.global. + */ + setObject(name: String, value: any, context: Object): any; + /** + * Trims whitespace from both sides of the string + * This version of trim() was selected for inclusion into the base due + * to its compact size and relatively good performance + * (see Steven Levithan's blog + * Uses String.prototype.trim instead, if available. + * The fastest but longest version of this function is located at + * lang.string.trim() + * + * @param str String to be trimmed + */ + trim(str: String): String; + } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/unload.html * @@ -5718,6 +5988,25 @@ declare module dojo { withGlobal(globalObject: Object, callback: Function, thisObject: Object, cbArguments: any[]): any; } module window { + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/window.doc.html + * + * Alias for the current document. 'doc' can be modified + * for temporary context shifting. See also withDoc(). + * Use this rather than referring to 'window.document' to ensure your code runs + * correctly in managed contexts. + * + */ + interface doc { + /** + * + */ + documentElement: Object; + /** + * + */ + dojoClick: boolean; + } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/window.global.html * @@ -5753,230 +6042,8 @@ declare module dojo { */ undefined_onload(): void; } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/window.doc.html - * - * Alias for the current document. 'doc' can be modified - * for temporary context shifting. See also withDoc(). - * Use this rather than referring to 'window.document' to ensure your code runs - * correctly in managed contexts. - * - */ - interface doc { - /** - * - */ - documentElement: Object; - /** - * - */ - dojoClick: boolean; - } } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/lang.html - * - * This module defines Javascript language extensions. - * - */ - interface lang { - /** - * Clones objects (including DOM nodes) and all children. - * Warning: do not clone cyclic structures. - * - * @param src The object to clone - */ - clone(src: any): any; - /** - * Returns a new object which "looks" to obj for properties which it - * does not have a value for. Optionally takes a bag of properties to - * seed the returned object with initially. - * This is a small implementation of the Boodman/Crockford delegation - * pattern in JavaScript. An intermediate object constructor mediates - * the prototype chain for the returned object, using it to delegate - * down to obj for property lookup when object-local lookup fails. - * This can be thought of similarly to ES4's "wrap", save that it does - * not act on types but rather on pure objects. - * - * @param obj The object to delegate to for properties not found directly on thereturn object or in props. - * @param props an object containing properties to assign to the returned object - */ - delegate(obj: Object, props: Object[]): any; - /** - * determine if an object supports a given method - * useful for longer api chains where you have to test each object in - * the chain. Useful for object and method detection. - * - * @param name Path to an object, in the form "A.B.C". - * @param obj OptionalObject to use as root of path. Defaults to'dojo.global'. Null may be passed. - */ - exists(name: String, obj: Object): boolean; - /** - * Adds all properties and methods of props to constructor's - * prototype, making them available to all instances created with - * constructor. - * - * @param ctor Target constructor to extend. - * @param props One or more objects to mix into ctor.prototype - */ - extend(ctor: Object, props: Object): Object; - /** - * Get a property from a dot-separated string, such as "A.B.C" - * Useful for longer api chains where you have to test each object in - * the chain, or when you have an object reference in string format. - * - * @param name Path to an property, in the form "A.B.C". - * @param create OptionalOptional. Defaults to false. If true, Objects will becreated at any point along the 'path' that is undefined. - * @param context OptionalOptional. Object to use as root of path. Defaults to'dojo.global'. Null may be passed. - */ - getObject(name: String, create: boolean, context: Object): any; - /** - * Returns a function that will only ever execute in the a given scope. - * This allows for easy use of object member functions - * in callbacks and other places in which the "this" keyword may - * otherwise not reference the expected scope. - * Any number of default positional arguments may be passed as parameters - * beyond "method". - * Each of these values will be used to "placehold" (similar to curry) - * for the hitched function. - * - * @param scope The scope to use when method executes. If method is a string,scope is also the object containing method. - * @param method A function to be hitched to scope, or the name of the method inscope to be hitched. - */ - hitch(scope: Object, method: Function): any; - /** - * Returns a function that will only ever execute in the a given scope. - * This allows for easy use of object member functions - * in callbacks and other places in which the "this" keyword may - * otherwise not reference the expected scope. - * Any number of default positional arguments may be passed as parameters - * beyond "method". - * Each of these values will be used to "placehold" (similar to curry) - * for the hitched function. - * - * @param scope The scope to use when method executes. If method is a string,scope is also the object containing method. - * @param method A function to be hitched to scope, or the name of the method inscope to be hitched. - */ - hitch(scope: Object, method: String[]): any; - /** - * Returns true if it is a built-in function or some other kind of - * oddball that should report as a function but doesn't - * - * @param it - */ - isAlien(it: any): any; - /** - * Return true if it is an Array. - * Does not work on Arrays created in other windows. - * - * @param it Item to test. - */ - isArray(it: any): any; - /** - * similar to isArray() but more permissive - * Doesn't strongly test for "arrayness". Instead, settles for "isn't - * a string or number and has a length property". Arguments objects - * and DOM collections will return true when passed to - * isArrayLike(), but will return false when passed to - * isArray(). - * - * @param it Item to test. - */ - isArrayLike(it: any): any; - /** - * Return true if it is a Function - * - * @param it Item to test. - */ - isFunction(it: any): boolean; - /** - * Returns true if it is a JavaScript object (or an Array, a Function - * or null) - * - * @param it Item to test. - */ - isObject(it: any): boolean; - /** - * Return true if it is a String - * - * @param it Item to test. - */ - isString(it: any): boolean; - /** - * Copies/adds all properties of one or more sources to dest; returns dest. - * All properties, including functions (sometimes termed "methods"), excluding any non-standard extensions - * found in Object.prototype, are copied/added from sources to dest. sources are processed left to right. - * The Javascript assignment operator is used to copy/add each property; therefore, by default, mixin - * executes a so-called "shallow copy" and aggregate types are copied/added by reference. - * - * @param dest The object to which to copy/add all properties contained in source. If dest is falsy, thena new object is manufactured before copying/adding properties begins. - * @param sources One of more objects from which to draw all properties to copy into dest. sources are processedleft-to-right and if more than one of these objects contain the same property name, the right-mostvalue "wins". - */ - mixin(dest: Object, sources: Object[]): Object; - /** - * similar to hitch() except that the scope object is left to be - * whatever the execution context eventually becomes. - * Calling lang.partial is the functional equivalent of calling: - * - * lang.hitch(null, funcName, ...); - * - * @param method The function to "wrap" - */ - partial(method: Function): any; - /** - * similar to hitch() except that the scope object is left to be - * whatever the execution context eventually becomes. - * Calling lang.partial is the functional equivalent of calling: - * - * lang.hitch(null, funcName, ...); - * - * @param method The function to "wrap" - */ - partial(method: String): any; - /** - * Performs parameterized substitutions on a string. Throws an - * exception if any parameter is unmatched. - * - * @param tmpl String to be used as a template. - * @param map If an object, it is used as a dictionary to look up substitutions.If a function, it is called for every substitution with following parameters:a whole match, a name, an offset, and the whole templatestring (see https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/replacefor more details). - * @param pattern OptionalOptional regular expression objects that overrides the default pattern.Must be global and match one item. The default is: /{([^}]+)}/g,which matches patterns like that: "{xxx}", where "xxx" is any sequenceof characters, which doesn't include "}". - */ - replace(tmpl: String, map: Object, pattern: RegExp): String; - /** - * Performs parameterized substitutions on a string. Throws an - * exception if any parameter is unmatched. - * - * @param tmpl String to be used as a template. - * @param map If an object, it is used as a dictionary to look up substitutions.If a function, it is called for every substitution with following parameters:a whole match, a name, an offset, and the whole templatestring (see https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/replacefor more details). - * @param pattern OptionalOptional regular expression objects that overrides the default pattern.Must be global and match one item. The default is: /{([^}]+)}/g,which matches patterns like that: "{xxx}", where "xxx" is any sequenceof characters, which doesn't include "}". - */ - replace(tmpl: String, map: Function, pattern: RegExp): String; - /** - * Set a property from a dot-separated string, such as "A.B.C" - * Useful for longer api chains where you have to test each object in - * the chain, or when you have an object reference in string format. - * Objects are created as needed along path. Returns the passed - * value if setting is successful or undefined if not. - * - * @param name Path to a property, in the form "A.B.C". - * @param value value or object to place at location given by name - * @param context OptionalOptional. Object to use as root of path. Defaults todojo.global. - */ - setObject(name: String, value: any, context: Object): any; - /** - * Trims whitespace from both sides of the string - * This version of trim() was selected for inclusion into the base due - * to its compact size and relatively good performance - * (see Steven Levithan's blog - * Uses String.prototype.trim instead, if available. - * The fastest but longest version of this function is located at - * lang.string.trim() - * - * @param str String to be trimmed - */ - trim(str: String): String; - } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.html * @@ -6760,7 +6827,7 @@ declare module dojo { * Parses str for a color value. Accepts hex, rgb, and rgba * style color values. * Acceptable input values for str may include arrays of any form - * accepted by dojo._base.ColorFromArray, hex strings such as "#aaaaaa", or + * accepted by dojo.colorFromArray, hex strings such as "#aaaaaa", or * rgb or rgba strings such as "rgb(133, 200, 16)" or "rgba(10, 10, * 10, 50)" * @@ -9187,6 +9254,59 @@ declare module dojo { */ "xhr": Object; } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.__IoPublish.html + * + * This is a list of IO topics that can be published + * if djConfig.ioPublish is set to true. IO topics can be + * published for any Input/Output, network operation. So, + * dojo.xhr, dojo.io.script and dojo.io.iframe can all + * trigger these topics to be published. + * + */ + class __IoPublish { + constructor(); + /** + * "/dojo/io/done" is sent whenever an IO request has completed, + * either by loading or by erroring. It passes the error and + * the dojo.Deferred for the request with the topic. + * + */ + "done": string; + /** + * "/dojo/io/error" is sent whenever an IO request has errored. + * It passes the error and the dojo.Deferred + * for the request with the topic. + * + */ + "error": string; + /** + * "/dojo/io/load" is sent whenever an IO request has loaded + * successfully. It passes the response and the dojo.Deferred + * for the request with the topic. + * + */ + "load": string; + /** + * "/dojo/io/send" is sent whenever a new IO request is started. + * It passes the dojo.Deferred for the request with the topic. + * + */ + "send": string; + /** + * "/dojo/io/start" is sent when there are no outstanding IO + * requests, and a new IO request is started. No arguments + * are passed with this topic. + * + */ + "start": string; + /** + * "/dojo/io/stop" is sent when all outstanding IO requests have + * finished. No arguments are passed with this topic. + * + */ + "stop": string; + } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.__IoArgs.html * @@ -9396,59 +9516,6 @@ declare module dojo { */ load(response: Object, ioArgs: dojo.main.__IoCallbackArgs): void; } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.__IoPublish.html - * - * This is a list of IO topics that can be published - * if djConfig.ioPublish is set to true. IO topics can be - * published for any Input/Output, network operation. So, - * dojo.xhr, dojo.io.script and dojo.io.iframe can all - * trigger these topics to be published. - * - */ - class __IoPublish { - constructor(); - /** - * "/dojo/io/done" is sent whenever an IO request has completed, - * either by loading or by erroring. It passes the error and - * the dojo.Deferred for the request with the topic. - * - */ - "done": string; - /** - * "/dojo/io/error" is sent whenever an IO request has errored. - * It passes the error and the dojo.Deferred - * for the request with the topic. - * - */ - "error": string; - /** - * "/dojo/io/load" is sent whenever an IO request has loaded - * successfully. It passes the response and the dojo.Deferred - * for the request with the topic. - * - */ - "load": string; - /** - * "/dojo/io/send" is sent whenever a new IO request is started. - * It passes the dojo.Deferred for the request with the topic. - * - */ - "send": string; - /** - * "/dojo/io/start" is sent when there are no outstanding IO - * requests, and a new IO request is started. No arguments - * are passed with this topic. - * - */ - "start": string; - /** - * "/dojo/io/stop" is sent when all outstanding IO requests have - * finished. No arguments are passed with this topic. - * - */ - "stop": string; - } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.Stateful.html * @@ -9473,7 +9540,7 @@ declare module dojo { * * @param name The property to get. */ - get(name: string): any; + get(name: String): any; /** * * @param params Optional @@ -9487,7 +9554,7 @@ declare module dojo { * @param name The property to set. * @param value The value to set in the property. */ - set(name: string, value: Object): any; + set(name: String, value: Object): any; /** * Watches a property for changes * @@ -9496,6 +9563,91 @@ declare module dojo { */ watch(property: string, callback:{(property?:string, oldValue?:any, newValue?: any):void}) :{unwatch():void}; } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel._contentHandlers.html + * + * A map of available XHR transport handle types. Name matches the + * handleAs attribute passed to XHR calls. + * A map of available XHR transport handle types. Name matches the + * handleAs attribute passed to XHR calls. Each contentHandler is + * called, passing the xhr object for manipulation. The return value + * from the contentHandler will be passed to the load or handle + * functions defined in the original xhr call. + * + */ + interface _contentHandlers { + /** + * + * @param xhr + */ + auto(xhr: any): void; + /** + * A contentHandler which evaluates the response data, expecting it to be valid JavaScript + * + * @param xhr + */ + javascript(xhr: any): any; + /** + * A contentHandler which returns a JavaScript object created from the response data + * + * @param xhr + */ + json(xhr: any): any; + /** + * A contentHandler which expects comment-filtered JSON. + * A contentHandler which expects comment-filtered JSON. + * the json-comment-filtered option was implemented to prevent + * "JavaScript Hijacking", but it is less secure than standard JSON. Use + * standard JSON instead. JSON prefixing can be used to subvert hijacking. + * + * Will throw a notice suggesting to use application/json mimetype, as + * json-commenting can introduce security issues. To decrease the chances of hijacking, + * use the standard json contentHandler, and prefix your "JSON" with: {}&& + * + * use djConfig.useCommentedJson = true to turn off the notice + * + * @param xhr + */ + json_comment_filtered(xhr: any): any; + /** + * A contentHandler which checks the presence of comment-filtered JSON and + * alternates between the json and json-comment-filtered contentHandlers. + * + * @param xhr + */ + json_comment_optional(xhr: any): any; + /** + * + * @param xhr + */ + olson_zoneinfo(xhr: any): void; + /** + * A contentHandler which simply returns the plaintext response data + * + * @param xhr + */ + text(xhr: any): any; + /** + * A contentHandler returning an XML Document parsed from the response data + * + * @param xhr + */ + xml(xhr: any): any; + } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel._hasResource.html + * + * + */ + interface _hasResource { + } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel._nodeDataCache.html + * + * + */ + interface _nodeDataCache { + } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.back.html * @@ -9602,7 +9754,7 @@ declare module dojo { *
*
* - * + * */ init(): void; } @@ -9624,89 +9776,18 @@ declare module dojo { supplemental: Object; } /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel._nodeDataCache.html + * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.colors.html * * */ - interface _nodeDataCache { - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel._hasResource.html - * - * - */ - interface _hasResource { - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel._contentHandlers.html - * - * A map of available XHR transport handle types. Name matches the - * handleAs attribute passed to XHR calls. - * A map of available XHR transport handle types. Name matches the - * handleAs attribute passed to XHR calls. Each contentHandler is - * called, passing the xhr object for manipulation. The return value - * from the contentHandler will be passed to the load or handle - * functions defined in the original xhr call. - * - */ - interface _contentHandlers { + interface colors { /** + * creates a greyscale color with an optional alpha * - * @param xhr + * @param g + * @param a Optional */ - auto(xhr: any): void; - /** - * A contentHandler which evaluates the response data, expecting it to be valid JavaScript - * - * @param xhr - */ - javascript(xhr: any): any; - /** - * A contentHandler which returns a JavaScript object created from the response data - * - * @param xhr - */ - json(xhr: any): any; - /** - * A contentHandler which expects comment-filtered JSON. - * A contentHandler which expects comment-filtered JSON. - * the json-comment-filtered option was implemented to prevent - * "JavaScript Hijacking", but it is less secure than standard JSON. Use - * standard JSON instead. JSON prefixing can be used to subvert hijacking. - * - * Will throw a notice suggesting to use application/json mimetype, as - * json-commenting can introduce security issues. To decrease the chances of hijacking, - * use the standard json contentHandler, and prefix your "JSON" with: {}&& - * - * use djConfig.useCommentedJson = true to turn off the notice - * - * @param xhr - */ - json_comment_filtered(xhr: any): any; - /** - * A contentHandler which checks the presence of comment-filtered JSON and - * alternates between the json and json-comment-filtered contentHandlers. - * - * @param xhr - */ - json_comment_optional(xhr: any): any; - /** - * - * @param xhr - */ - olson_zoneinfo(xhr: any): void; - /** - * A contentHandler which simply returns the plaintext response data - * - * @param xhr - */ - text(xhr: any): any; - /** - * A contentHandler returning an XML Document parsed from the response data - * - * @param xhr - */ - xml(xhr: any): any; + makeGrey(g: number, a: number): void; } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.config.html @@ -9844,7 +9925,7 @@ declare module dojo { */ require: Object; /** - * Array containing the r, g, b components used as transparent color in dojo._base.Color; + * Array containing the r, g, b components used as transparent color in dojo.Color; * if undefined, [255,255,255] (white) will be used. * */ @@ -9873,47 +9954,6 @@ declare module dojo { */ useDeferredInstrumentation: boolean; } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.colors.html - * - * - */ - interface colors { - /** - * creates a greyscale color with an optional alpha - * - * @param g - * @param a Optional - */ - makeGrey(g: number, a: number): void; - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.data.html - * - * - */ - interface data { - /** - * - */ - api: Object; - /** - * - */ - util: Object; - /** - * - */ - ItemFileReadStore(): void; - /** - * - */ - ItemFileWriteStore(): void; - /** - * - */ - ObjectStore(): void; - } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.contentHandlers.html * @@ -9986,23 +10026,61 @@ declare module dojo { xml(xhr: any): any; } /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.doc.html + * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.dnd.html * - * Alias for the current document. 'doc' can be modified - * for temporary context shifting. See also withDoc(). - * Use this rather than referring to 'window.document' to ensure your code runs - * correctly in managed contexts. * */ - interface doc { + interface dnd { + /** + * Used by dojo/dnd/Manager to scroll document or internal node when the user + * drags near the edge of the viewport or a scrollable node + * + */ + autoscroll: Object; /** * */ - documentElement: Object; + move: Object; /** * */ - dojoClick: boolean; + AutoSource(): void; + /** + * + */ + Avatar(): void; + /** + * + */ + Container(): void; + /** + * + */ + Manager(): void; + /** + * + */ + Moveable(): void; + /** + * + */ + Mover(): void; + /** + * + */ + Selector(): void; + /** + * + */ + Source(): void; + /** + * + */ + Target(): void; + /** + * + */ + TimedMoveable(): void; } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.date.html @@ -10070,6 +10148,52 @@ declare module dojo { */ isLeapYear(dateObject: Date): boolean; } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.doc.html + * + * Alias for the current document. 'doc' can be modified + * for temporary context shifting. See also withDoc(). + * Use this rather than referring to 'window.document' to ensure your code runs + * correctly in managed contexts. + * + */ + interface doc { + /** + * + */ + documentElement: Object; + /** + * + */ + dojoClick: boolean; + } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.data.html + * + * + */ + interface data { + /** + * + */ + api: Object; + /** + * + */ + util: Object; + /** + * + */ + ItemFileReadStore(): void; + /** + * + */ + ItemFileWriteStore(): void; + /** + * + */ + ObjectStore(): void; + } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.currency.html * @@ -10108,61 +10232,341 @@ declare module dojo { regexp(options: Object): any; } /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.dnd.html + * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.dijit.html * * */ - interface dnd { - /** - * Used by dojo/dnd/Manager to scroll document or internal node when the user - * drags near the edge of the viewport or a scrollable node - * - */ - autoscroll: Object; + interface dijit { /** * */ - move: Object; + form: Object; /** * */ - AutoSource(): void; + layout: Object; + /** + * W3C range API + * + */ + range: Object; /** * */ - Avatar(): void; + registry: Object; /** * */ - Container(): void; + tree: Object; + /** + * + * @param id + */ + byId(id: any): any; /** * */ - Manager(): void; + Calendar(): void; /** * */ - Moveable(): void; + CalendarLite(): void; /** * */ - Mover(): void; + CheckedMenuItem(): void; /** * */ - Selector(): void; + ColorPalette(): void; /** * */ - Source(): void; + Declaration(): void; /** * */ - Target(): void; + Destroyable(): void; /** * */ - TimedMoveable(): void; + Dialog(): void; + /** + * + */ + DialogUnderlay(): void; + /** + * + */ + DropDownMenu(): void; + /** + * + */ + Dye(): void; + /** + * + */ + Editor(): void; + /** + * + */ + Fieldset(): void; + /** + * + */ + InlineEditBox(): void; + /** + * + */ + Menu(): void; + /** + * + */ + MenuBar(): void; + /** + * + */ + MenuBarItem(): void; + /** + * + */ + MenuItem(): void; + /** + * + */ + MenuSeparator(): void; + /** + * + */ + PopupMenuBarItem(): void; + /** + * + */ + PopupMenuItem(): void; + /** + * + */ + ProgressBar(): void; + /** + * + */ + RadioButtonMenuItem(): void; + /** + * + */ + TitlePane(): void; + /** + * + */ + Toolbar(): void; + /** + * + */ + ToolbarSeparator(): void; + /** + * + */ + Tooltip(): void; + /** + * + */ + TooltipDialog(): void; + /** + * + */ + Tree(): void; + /** + * + */ + WidgetSet(): void; + } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.global.html + * + * Alias for the current window. 'global' can be modified + * for temporary context shifting. See also withGlobal(). + * Use this rather than referring to 'window' to ensure your code runs + * correctly in managed contexts. + * + */ + interface global { + /** + * + */ + $(): any; + /** + * + * @param start + * @param data + * @param responseCode + * @param errorMsg + */ + GoogleSearchStoreCallback_undefined_NaN(start: any, data: any, responseCode: any, errorMsg: any): void; + /** + * + */ + jQuery(): any; + /** + * + */ + swfIsInHTML(): void; + /** + * + */ + undefined_onload(): void; + } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.gears.html + * + * TODOC + * + */ + interface gears { + /** + * True if client is using Google Gears + * + */ + available: Object; + } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.fx.html + * + * Effects library on top of Base animations + * + */ + interface fx { + /** + * Collection of easing functions to use beyond the default + * dojo._defaultEasing function. + * + */ + easing: Object; + /** + * Chain a list of dojo/_base/fx.Animations to run in sequence + * Return a dojo/_base/fx.Animation which will play all passed + * dojo/_base/fx.Animation instances in sequence, firing its own + * synthesized events simulating a single animation. (eg: + * onEnd of this animation means the end of the chain, + * not the individual animations within) + * + * @param animations + */ + chain(animations: dojo._base.fx.Animation[]): any; + /** + * Combine a list of dojo/_base/fx.Animations to run in parallel + * Combine an array of dojo/_base/fx.Animations to run in parallel, + * providing a new dojo/_base/fx.Animation instance encompasing each + * animation, firing standard animation events. + * + * @param animations + */ + combine(animations: dojo._base.fx.Animation[]): any; + /** + * Slide a node to a new top/left position + * Returns an animation that will slide "node" + * defined in args Object from its current position to + * the position defined by (args.left, args.top). + * + * @param args A hash-map of standard dojo/_base/fx.Animation constructor properties(such as easing: node: duration: and so on). Special args membersare top and left, which indicate the new position to slide to. + */ + slideTo(args: Object): any; + /** + * + */ + Toggler(): void; + /** + * Expand a node to it's natural height. + * Returns an animation that will expand the + * node defined in 'args' object from it's current height to + * it's natural height (with no scrollbar). + * Node must have no margin/border/padding. + * + * @param args A hash-map of standard dojo/_base/fx.Animation constructor properties(such as easing: node: duration: and so on) + */ + wipeIn(args: Object): any; + /** + * Shrink a node to nothing and hide it. + * Returns an animation that will shrink node defined in "args" + * from it's current height to 1px, and then hide it. + * + * @param args A hash-map of standard dojo/_base/fx.Animation constructor properties(such as easing: node: duration: and so on) + */ + wipeOut(args: Object): any; + } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.html.html + * + * TODOC + * + */ + interface html { + /** + * inserts (replaces) the given content into the given node. dojo/dom-construct.place(cont, node, "only") + * may be a better choice for simple HTML insertion. + * Unless you need to use the params capabilities of this method, you should use + * dojo/dom-construct.place(cont, node, "only"). dojo/dom-construct..place() has more robust support for injecting + * an HTML string into the DOM, but it only handles inserting an HTML string as DOM + * elements, or inserting a DOM node. dojo/dom-construct..place does not handle NodeList insertions + * dojo/dom-construct.place(cont, node, "only"). dojo/dom-construct.place() has more robust support for injecting + * an HTML string into the DOM, but it only handles inserting an HTML string as DOM + * elements, or inserting a DOM node. dojo/dom-construct.place does not handle NodeList insertions + * or the other capabilities as defined by the params object for this method. + * + * @param node the parent element that will receive the content + * @param cont the content to be set on the parent element.This can be an html string, a node reference or a NodeList, dojo/NodeList, Array or other enumerable list of nodes + * @param params OptionalOptional flags/properties to configure the content-setting. See dojo/html/_ContentSetter + */ + set(node: HTMLElement, cont: String, params: Object): any; + /** + * inserts (replaces) the given content into the given node. dojo/dom-construct.place(cont, node, "only") + * may be a better choice for simple HTML insertion. + * Unless you need to use the params capabilities of this method, you should use + * dojo/dom-construct.place(cont, node, "only"). dojo/dom-construct..place() has more robust support for injecting + * an HTML string into the DOM, but it only handles inserting an HTML string as DOM + * elements, or inserting a DOM node. dojo/dom-construct..place does not handle NodeList insertions + * dojo/dom-construct.place(cont, node, "only"). dojo/dom-construct.place() has more robust support for injecting + * an HTML string into the DOM, but it only handles inserting an HTML string as DOM + * elements, or inserting a DOM node. dojo/dom-construct.place does not handle NodeList insertions + * or the other capabilities as defined by the params object for this method. + * + * @param node the parent element that will receive the content + * @param cont the content to be set on the parent element.This can be an html string, a node reference or a NodeList, dojo/NodeList, Array or other enumerable list of nodes + * @param params OptionalOptional flags/properties to configure the content-setting. See dojo/html/_ContentSetter + */ + set(node: HTMLElement, cont: HTMLElement, params: Object): any; + /** + * inserts (replaces) the given content into the given node. dojo/dom-construct.place(cont, node, "only") + * may be a better choice for simple HTML insertion. + * Unless you need to use the params capabilities of this method, you should use + * dojo/dom-construct.place(cont, node, "only"). dojo/dom-construct..place() has more robust support for injecting + * an HTML string into the DOM, but it only handles inserting an HTML string as DOM + * elements, or inserting a DOM node. dojo/dom-construct..place does not handle NodeList insertions + * dojo/dom-construct.place(cont, node, "only"). dojo/dom-construct.place() has more robust support for injecting + * an HTML string into the DOM, but it only handles inserting an HTML string as DOM + * elements, or inserting a DOM node. dojo/dom-construct.place does not handle NodeList insertions + * or the other capabilities as defined by the params object for this method. + * + * @param node the parent element that will receive the content + * @param cont the content to be set on the parent element.This can be an html string, a node reference or a NodeList, dojo/NodeList, Array or other enumerable list of nodes + * @param params OptionalOptional flags/properties to configure the content-setting. See dojo/html/_ContentSetter + */ + set(node: HTMLElement, cont: NodeList, params: Object): any; + } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.io.html + * + * + */ + interface io { + /** + * + */ + iframe: Object; + /** + * TODOC + * + */ + script: Object; } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.dojox.html @@ -10428,159 +10832,6 @@ declare module dojo { */ sprintf(format: String, filler: any): void; } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.fx.html - * - * Effects library on top of Base animations - * - */ - interface fx { - /** - * Collection of easing functions to use beyond the default - * dojo._defaultEasing function. - * - */ - easing: Object; - /** - * Chain a list of dojo/_base/fx.Animations to run in sequence - * Return a dojo/_base/fx.Animation which will play all passed - * dojo/_base/fx.Animation instances in sequence, firing its own - * synthesized events simulating a single animation. (eg: - * onEnd of this animation means the end of the chain, - * not the individual animations within) - * - * @param animations - */ - chain(animations: dojo._base.fx.Animation[]): any; - /** - * Combine a list of dojo/_base/fx.Animations to run in parallel - * Combine an array of dojo/_base/fx.Animations to run in parallel, - * providing a new dojo/_base/fx.Animation instance encompasing each - * animation, firing standard animation events. - * - * @param animations - */ - combine(animations: dojo._base.fx.Animation[]): any; - /** - * Slide a node to a new top/left position - * Returns an animation that will slide "node" - * defined in args Object from its current position to - * the position defined by (args.left, args.top). - * - * @param args A hash-map of standard dojo/_base/fx.Animation constructor properties(such as easing: node: duration: and so on). Special args membersare top and left, which indicate the new position to slide to. - */ - slideTo(args: Object): any; - /** - * - */ - Toggler(): void; - /** - * Expand a node to it's natural height. - * Returns an animation that will expand the - * node defined in 'args' object from it's current height to - * it's natural height (with no scrollbar). - * Node must have no margin/border/padding. - * - * @param args A hash-map of standard dojo/_base/fx.Animation constructor properties(such as easing: node: duration: and so on) - */ - wipeIn(args: Object): any; - /** - * Shrink a node to nothing and hide it. - * Returns an animation that will shrink node defined in "args" - * from it's current height to 1px, and then hide it. - * - * @param args A hash-map of standard dojo/_base/fx.Animation constructor properties(such as easing: node: duration: and so on) - */ - wipeOut(args: Object): any; - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.gears.html - * - * TODOC - * - */ - interface gears { - /** - * True if client is using Google Gears - * - */ - available: Object; - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.html.html - * - * TODOC - * - */ - interface html { - /** - * inserts (replaces) the given content into the given node. dojo/dom-construct.place(cont, node, "only") - * may be a better choice for simple HTML insertion. - * Unless you need to use the params capabilities of this method, you should use - * dojo/dom-construct.place(cont, node, "only"). dojo/dom-construct..place() has more robust support for injecting - * an HTML string into the DOM, but it only handles inserting an HTML string as DOM - * elements, or inserting a DOM node. dojo/dom-construct..place does not handle NodeList insertions - * dojo/dom-construct.place(cont, node, "only"). dojo/dom-construct.place() has more robust support for injecting - * an HTML string into the DOM, but it only handles inserting an HTML string as DOM - * elements, or inserting a DOM node. dojo/dom-construct.place does not handle NodeList insertions - * or the other capabilities as defined by the params object for this method. - * - * @param node the parent element that will receive the content - * @param cont the content to be set on the parent element.This can be an html string, a node reference or a NodeList, dojo/NodeList, Array or other enumerable list of nodes - * @param params OptionalOptional flags/properties to configure the content-setting. See dojo/html/_ContentSetter - */ - set(node: HTMLElement, cont: String, params: Object): any; - /** - * inserts (replaces) the given content into the given node. dojo/dom-construct.place(cont, node, "only") - * may be a better choice for simple HTML insertion. - * Unless you need to use the params capabilities of this method, you should use - * dojo/dom-construct.place(cont, node, "only"). dojo/dom-construct..place() has more robust support for injecting - * an HTML string into the DOM, but it only handles inserting an HTML string as DOM - * elements, or inserting a DOM node. dojo/dom-construct..place does not handle NodeList insertions - * dojo/dom-construct.place(cont, node, "only"). dojo/dom-construct.place() has more robust support for injecting - * an HTML string into the DOM, but it only handles inserting an HTML string as DOM - * elements, or inserting a DOM node. dojo/dom-construct.place does not handle NodeList insertions - * or the other capabilities as defined by the params object for this method. - * - * @param node the parent element that will receive the content - * @param cont the content to be set on the parent element.This can be an html string, a node reference or a NodeList, dojo/NodeList, Array or other enumerable list of nodes - * @param params OptionalOptional flags/properties to configure the content-setting. See dojo/html/_ContentSetter - */ - set(node: HTMLElement, cont: HTMLElement, params: Object): any; - /** - * inserts (replaces) the given content into the given node. dojo/dom-construct.place(cont, node, "only") - * may be a better choice for simple HTML insertion. - * Unless you need to use the params capabilities of this method, you should use - * dojo/dom-construct.place(cont, node, "only"). dojo/dom-construct..place() has more robust support for injecting - * an HTML string into the DOM, but it only handles inserting an HTML string as DOM - * elements, or inserting a DOM node. dojo/dom-construct..place does not handle NodeList insertions - * dojo/dom-construct.place(cont, node, "only"). dojo/dom-construct.place() has more robust support for injecting - * an HTML string into the DOM, but it only handles inserting an HTML string as DOM - * elements, or inserting a DOM node. dojo/dom-construct.place does not handle NodeList insertions - * or the other capabilities as defined by the params object for this method. - * - * @param node the parent element that will receive the content - * @param cont the content to be set on the parent element.This can be an html string, a node reference or a NodeList, dojo/NodeList, Array or other enumerable list of nodes - * @param params OptionalOptional flags/properties to configure the content-setting. See dojo/html/_ContentSetter - */ - set(node: HTMLElement, cont: NodeList, params: Object): any; - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.io.html - * - * - */ - interface io { - /** - * - */ - iframe: Object; - /** - * TODOC - * - */ - script: Object; - } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.i18n.html * @@ -10792,6 +11043,73 @@ declare module dojo { */ isRight(e: Event): boolean; } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.rpc.html + * + * + */ + interface rpc { + /** + * + */ + JsonpService(): void; + /** + * + */ + JsonService(): void; + /** + * + */ + RpcService(): void; + } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.regexp.html + * + * Regular expressions and Builder resources + * + */ + interface regexp { + /** + * Builds a regular expression that groups subexpressions + * A utility function used by some of the RE generators. The + * subexpressions are constructed by the function, re, in the second + * parameter. re builds one subexpression for each elem in the array + * a, in the first parameter. Returns a string for a regular + * expression that groups all the subexpressions. + * + * @param arr A single value or an array of values. + * @param re A function. Takes one parameter and converts it to a regularexpression. + * @param nonCapture OptionalIf true, uses non-capturing match, otherwise matches are retainedby regular expression. Defaults to false + */ + buildGroupRE(arr: Object, re: Function, nonCapture: boolean): any; + /** + * Builds a regular expression that groups subexpressions + * A utility function used by some of the RE generators. The + * subexpressions are constructed by the function, re, in the second + * parameter. re builds one subexpression for each elem in the array + * a, in the first parameter. Returns a string for a regular + * expression that groups all the subexpressions. + * + * @param arr A single value or an array of values. + * @param re A function. Takes one parameter and converts it to a regularexpression. + * @param nonCapture OptionalIf true, uses non-capturing match, otherwise matches are retainedby regular expression. Defaults to false + */ + buildGroupRE(arr: any[], re: Function, nonCapture: boolean): any; + /** + * Adds escape sequences for special characters in regular expressions + * + * @param str + * @param except Optionala String with special characters to be left unescaped + */ + escapeString(str: String, except: String): any; + /** + * adds group match to expression + * + * @param expression + * @param nonCapture OptionalIf true, uses non-capturing match, otherwise matches are retainedby regular expression. + */ + group(expression: String, nonCapture: boolean): String; + } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.number.html * @@ -10845,6 +11163,33 @@ declare module dojo { */ round(value: number, places: number, increment: number): number; } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.scopeMap.html + * + * + */ + interface scopeMap { + /** + * + */ + dijit: any[]; + /** + * + */ + dojo: any[]; + /** + * + */ + dojox: any[]; + } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.tests.html + * + * D.O.H. Test files for Dojo unit testing. + * + */ + interface tests { + } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.keys.html * @@ -11110,108 +11455,6 @@ declare module dojo { */ UP_DPAD: number; } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.regexp.html - * - * Regular expressions and Builder resources - * - */ - interface regexp { - /** - * Builds a regular expression that groups subexpressions - * A utility function used by some of the RE generators. The - * subexpressions are constructed by the function, re, in the second - * parameter. re builds one subexpression for each elem in the array - * a, in the first parameter. Returns a string for a regular - * expression that groups all the subexpressions. - * - * @param arr A single value or an array of values. - * @param re A function. Takes one parameter and converts it to a regularexpression. - * @param nonCapture OptionalIf true, uses non-capturing match, otherwise matches are retainedby regular expression. Defaults to false - */ - buildGroupRE(arr: Object, re: Function, nonCapture: boolean): any; - /** - * Builds a regular expression that groups subexpressions - * A utility function used by some of the RE generators. The - * subexpressions are constructed by the function, re, in the second - * parameter. re builds one subexpression for each elem in the array - * a, in the first parameter. Returns a string for a regular - * expression that groups all the subexpressions. - * - * @param arr A single value or an array of values. - * @param re A function. Takes one parameter and converts it to a regularexpression. - * @param nonCapture OptionalIf true, uses non-capturing match, otherwise matches are retainedby regular expression. Defaults to false - */ - buildGroupRE(arr: any[], re: Function, nonCapture: boolean): any; - /** - * Adds escape sequences for special characters in regular expressions - * - * @param str - * @param except Optionala String with special characters to be left unescaped - */ - escapeString(str: String, except: String): any; - /** - * adds group match to expression - * - * @param expression - * @param nonCapture OptionalIf true, uses non-capturing match, otherwise matches are retainedby regular expression. - */ - group(expression: String, nonCapture: boolean): String; - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.scopeMap.html - * - * - */ - interface scopeMap { - /** - * - */ - dijit: any[]; - /** - * - */ - dojo: any[]; - /** - * - */ - dojox: any[]; - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.global.html - * - * Alias for the current window. 'global' can be modified - * for temporary context shifting. See also withGlobal(). - * Use this rather than referring to 'window' to ensure your code runs - * correctly in managed contexts. - * - */ - interface global { - /** - * - */ - $(): any; - /** - * - * @param start - * @param data - * @param responseCode - * @param errorMsg - */ - GoogleSearchStoreCallback_undefined_NaN(start: any, data: any, responseCode: any, errorMsg: any): void; - /** - * - */ - jQuery(): any; - /** - * - */ - swfIsInHTML(): void; - /** - * - */ - undefined_onload(): void; - } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.store.html * @@ -11306,182 +11549,6 @@ declare module dojo { */ trim(str: String): String; } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.rpc.html - * - * - */ - interface rpc { - /** - * - */ - JsonpService(): void; - /** - * - */ - JsonService(): void; - /** - * - */ - RpcService(): void; - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.tests.html - * - * D.O.H. Test files for Dojo unit testing. - * - */ - interface tests { - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.dijit.html - * - * - */ - interface dijit { - /** - * - */ - form: Object; - /** - * - */ - layout: Object; - /** - * W3C range API - * - */ - range: Object; - /** - * - */ - registry: Object; - /** - * - */ - tree: Object; - /** - * - * @param id - */ - byId(id: any): any; - /** - * - */ - Calendar(): void; - /** - * - */ - CalendarLite(): void; - /** - * - */ - CheckedMenuItem(): void; - /** - * - */ - ColorPalette(): void; - /** - * - */ - Declaration(): void; - /** - * - */ - Destroyable(): void; - /** - * - */ - Dialog(): void; - /** - * - */ - DialogUnderlay(): void; - /** - * - */ - DropDownMenu(): void; - /** - * - */ - Dye(): void; - /** - * - */ - Editor(): void; - /** - * - */ - Fieldset(): void; - /** - * - */ - InlineEditBox(): void; - /** - * - */ - Menu(): void; - /** - * - */ - MenuBar(): void; - /** - * - */ - MenuBarItem(): void; - /** - * - */ - MenuItem(): void; - /** - * - */ - MenuSeparator(): void; - /** - * - */ - PopupMenuBarItem(): void; - /** - * - */ - PopupMenuItem(): void; - /** - * - */ - ProgressBar(): void; - /** - * - */ - RadioButtonMenuItem(): void; - /** - * - */ - TitlePane(): void; - /** - * - */ - Toolbar(): void; - /** - * - */ - ToolbarSeparator(): void; - /** - * - */ - Tooltip(): void; - /** - * - */ - TooltipDialog(): void; - /** - * - */ - Tree(): void; - /** - * - */ - WidgetSet(): void; - } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.version.html * @@ -11521,33 +11588,6 @@ declare module dojo { */ toString(): String; } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.window.html - * - * TODOC - * - */ - interface window { - /** - * Get window object associated with document doc. - * - * @param doc The document to get the associated window for. - */ - get(doc: HTMLDocument): any; - /** - * Returns the dimensions and scroll position of the viewable area of a browser window - * - * @param doc Optional - */ - getBox(doc: HTMLDocument): Object; - /** - * Scroll the passed node into view using minimal movement, if it is not already. - * - * @param node - * @param pos Optional - */ - scrollIntoView(node: HTMLElement, pos: Object): void; - } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.touch.html * @@ -11619,6 +11659,33 @@ declare module dojo { */ release(node: HTMLElement, listener: Function): any; } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.window.html + * + * TODOC + * + */ + interface window { + /** + * Get window object associated with document doc. + * + * @param doc The document to get the associated window for. + */ + get(doc: HTMLDocument): any; + /** + * Returns the dimensions and scroll position of the viewable area of a browser window + * + * @param doc Optional + */ + getBox(doc: HTMLDocument): Object; + /** + * Scroll the passed node into view using minimal movement, if it is not already. + * + * @param node + * @param pos Optional + */ + scrollIntoView(node: HTMLElement, pos: Object): void; + } } } @@ -11900,6 +11967,237 @@ declare module dojo { */ on(type: any, listener: any): any; } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/data/ObjectStore.html + * + * A Dojo Data implementation that wraps Dojo object stores for backwards + * compatibility. + * + * @param options The configuration information to pass into the data store.options.objectStore:The object store to use as the source provider for this data store + */ + class ObjectStore extends dojo.Evented { + constructor(options: any); + /** + * + */ + "labelProperty": string; + /** + * + */ + "objectStore": Object; + /** + * adds an object to the list of dirty objects. This object + * contains a reference to the object itself as well as a + * cloned and trimmed version of old object for use with + * revert. + * + * @param object Indicates that the given object is changing and should be marked as dirty for the next save + * @param _deleting + */ + changing(object: Object, _deleting: boolean): void; + /** + * See dojo/data/api/Read.close() + * + * @param request + */ + close(request: any): any; + /** + * Checks to see if 'item' has 'value' at 'attribute' + * + * @param item The item to check + * @param attribute The attribute to check + * @param value The value to look for + */ + containsValue(item: Object, attribute: String, value: any): boolean; + /** + * deletes item and any references to that item from the store. + * + * @param item item to delete + */ + deleteItem(item: any): void; + /** + * + * @param type + * @param event + */ + emit(type: any, event: any): any; + /** + * See dojo/data/api/Read.fetch() + * + * @param args + */ + fetch(args: any): any; + /** + * fetch an item by its identity, by looking in our index of what we have loaded + * + * @param args + */ + fetchItemByIdentity(args: any): any; + /** + * Gets the available attributes of an item's 'property' and returns + * it as an array. + * + * @param item + */ + getAttributes(item: Object): any[]; + /** + * return the store feature set + * + */ + getFeatures(): Object; + /** + * returns the identity of the given item + * See dojo/data/api/Read.getIdentity() + * + * @param item + */ + getIdentity(item: any): any; + /** + * returns the attributes which are used to make up the + * identity of an item. Basically returns this.objectStore.idProperty + * See dojo/data/api/Read.getIdentityAttributes() + * + * @param item + */ + getIdentityAttributes(item: any): any[]; + /** + * See dojo/data/api/Read.getLabel() + * + * @param item + */ + getLabel(item: dojo.data.api.Item): any; + /** + * See dojo/data/api/Read.getLabelAttributes() + * + * @param item + */ + getLabelAttributes(item: dojo.data.api.Item): any[]; + /** + * Gets the value of an item's 'property' + * + * @param item The item to get the value from + * @param property property to look up value for + * @param defaultValue Optionalthe default value + */ + getValue(item: Object, property: String, defaultValue: any): any; + /** + * Gets the value of an item's 'property' and returns + * it. If this value is an array it is just returned, + * if not, the value is added to an array and that is returned. + * + * @param item + * @param property property to look up value for + */ + getValues(item: Object, property: String): any[]; + /** + * Checks to see if item has attribute + * + * @param item The item to check + * @param attribute The attribute to check + */ + hasAttribute(item: Object, attribute: String): boolean; + /** + * returns true if the item is marked as dirty or true if there are any dirty items + * + * @param item The item to check + */ + isDirty(item: Object): any; + /** + * Checks to see if the argument is an item + * + * @param item The item to check + */ + isItem(item: Object): boolean; + /** + * Checks to see if the item is loaded. + * + * @param item The item to check + */ + isItemLoaded(item: Object): any; + /** + * Loads an item and calls the callback handler. Note, that this will call the callback + * handler even if the item is loaded. Consequently, you can use loadItem to ensure + * that an item is loaded is situations when the item may or may not be loaded yet. + * If you access a value directly through property access, you can use this to load + * a lazy value as well (doesn't need to be an item). + * + * @param args See dojo/data/api/Read.fetch() + */ + loadItem(args: Object): any; + /** + * adds a new item to the store at the specified point. + * Takes two parameters, data, and options. + * + * @param data See dojo/data/api/Write.newItem() + * @param parentInfo + */ + newItem(data: Object, parentInfo: any): Object; + /** + * + * @param type + * @param listener + */ + on(type: any, listener: any): any; + /** + * returns any modified data to its original state prior to a save(); + * + */ + revert(): void; + /** + * Saves the dirty data using object store provider. See dojo/data/api/Write for API. + * + * @param kwArgs kwArgs.global:This will cause the save to commit the dirty data for allObjectStores as a single transaction.kwArgs.revertOnError:This will cause the changes to be reverted if there is anerror on the save. By default a revert is executed unlessa value of false is provide for this parameter.kwArgs.onError:Called when an error occurs in the commitkwArgs.onComplete:Called when an the save/commit is completed + */ + save(kwArgs: any): void; + /** + * sets 'attribute' on 'item' to 'value' + * See dojo/data/api/Write.setValue() + * + * @param item + * @param attribute + * @param value + */ + setValue(item: any, attribute: any, value: any): void; + /** + * sets 'attribute' on 'item' to 'value' value + * must be an array. + * See dojo/data/api/Write.setValues() + * + * @param item + * @param attribute + * @param values + */ + setValues(item: any, attribute: any, values: any): void; + /** + * unsets 'attribute' on 'item' + * See dojo/data/api/Write.unsetAttribute() + * + * @param item + * @param attribute + */ + unsetAttribute(item: any, attribute: any): void; + /** + * See dojo/data/api/Notification.onDelete() + * + */ + onDelete(): void; + /** + * Called when a fetch occurs + * + * @param results + */ + onFetch(results: any): void; + /** + * See dojo/data/api/Notification.onNew() + * + */ + onNew(): void; + /** + * See dojo/data/api/Notification.onSet() + * + */ + onSet(): void; + } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/data/ItemFileWriteStore.html * @@ -12221,237 +12519,6 @@ declare module dojo { */ onSet(item: dojo.data.api.Item, attribute: String, oldValue: any[], newValue: any[]): void; } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/data/ObjectStore.html - * - * A Dojo Data implementation that wraps Dojo object stores for backwards - * compatibility. - * - * @param options The configuration information to pass into the data store.options.objectStore:The object store to use as the source provider for this data store - */ - class ObjectStore extends dojo.Evented { - constructor(options: any); - /** - * - */ - "labelProperty": string; - /** - * - */ - "objectStore": Object; - /** - * adds an object to the list of dirty objects. This object - * contains a reference to the object itself as well as a - * cloned and trimmed version of old object for use with - * revert. - * - * @param object Indicates that the given object is changing and should be marked as dirty for the next save - * @param _deleting - */ - changing(object: Object, _deleting: boolean): void; - /** - * See dojo/data/api/Read.close() - * - * @param request - */ - close(request: any): any; - /** - * Checks to see if 'item' has 'value' at 'attribute' - * - * @param item The item to check - * @param attribute The attribute to check - * @param value The value to look for - */ - containsValue(item: Object, attribute: String, value: any): boolean; - /** - * deletes item and any references to that item from the store. - * - * @param item item to delete - */ - deleteItem(item: any): void; - /** - * - * @param type - * @param event - */ - emit(type: any, event: any): any; - /** - * See dojo/data/api/Read.fetch() - * - * @param args - */ - fetch(args: any): any; - /** - * fetch an item by its identity, by looking in our index of what we have loaded - * - * @param args - */ - fetchItemByIdentity(args: any): any; - /** - * Gets the available attributes of an item's 'property' and returns - * it as an array. - * - * @param item - */ - getAttributes(item: Object): any[]; - /** - * return the store feature set - * - */ - getFeatures(): Object; - /** - * returns the identity of the given item - * See dojo/data/api/Read.getIdentity() - * - * @param item - */ - getIdentity(item: any): any; - /** - * returns the attributes which are used to make up the - * identity of an item. Basically returns this.objectStore.idProperty - * See dojo/data/api/Read.getIdentityAttributes() - * - * @param item - */ - getIdentityAttributes(item: any): any[]; - /** - * See dojo/data/api/Read.getLabel() - * - * @param item - */ - getLabel(item: dojo.data.api.Item): any; - /** - * See dojo/data/api/Read.getLabelAttributes() - * - * @param item - */ - getLabelAttributes(item: dojo.data.api.Item): any[]; - /** - * Gets the value of an item's 'property' - * - * @param item The item to get the value from - * @param property property to look up value for - * @param defaultValue Optionalthe default value - */ - getValue(item: Object, property: String, defaultValue: any): any; - /** - * Gets the value of an item's 'property' and returns - * it. If this value is an array it is just returned, - * if not, the value is added to an array and that is returned. - * - * @param item - * @param property property to look up value for - */ - getValues(item: Object, property: String): any[]; - /** - * Checks to see if item has attribute - * - * @param item The item to check - * @param attribute The attribute to check - */ - hasAttribute(item: Object, attribute: String): boolean; - /** - * returns true if the item is marked as dirty or true if there are any dirty items - * - * @param item The item to check - */ - isDirty(item: Object): any; - /** - * Checks to see if the argument is an item - * - * @param item The item to check - */ - isItem(item: Object): boolean; - /** - * Checks to see if the item is loaded. - * - * @param item The item to check - */ - isItemLoaded(item: Object): any; - /** - * Loads an item and calls the callback handler. Note, that this will call the callback - * handler even if the item is loaded. Consequently, you can use loadItem to ensure - * that an item is loaded is situations when the item may or may not be loaded yet. - * If you access a value directly through property access, you can use this to load - * a lazy value as well (doesn't need to be an item). - * - * @param args See dojo/data/api/Read.fetch() - */ - loadItem(args: Object): any; - /** - * adds a new item to the store at the specified point. - * Takes two parameters, data, and options. - * - * @param data See dojo/data/api/Write.newItem() - * @param parentInfo - */ - newItem(data: Object, parentInfo: any): Object; - /** - * - * @param type - * @param listener - */ - on(type: any, listener: any): any; - /** - * returns any modified data to its original state prior to a save(); - * - */ - revert(): void; - /** - * Saves the dirty data using object store provider. See dojo/data/api/Write for API. - * - * @param kwArgs kwArgs.global:This will cause the save to commit the dirty data for allObjectStores as a single transaction.kwArgs.revertOnError:This will cause the changes to be reverted if there is anerror on the save. By default a revert is executed unlessa value of false is provide for this parameter.kwArgs.onError:Called when an error occurs in the commitkwArgs.onComplete:Called when an the save/commit is completed - */ - save(kwArgs: any): void; - /** - * sets 'attribute' on 'item' to 'value' - * See dojo/data/api/Write.setValue() - * - * @param item - * @param attribute - * @param value - */ - setValue(item: any, attribute: any, value: any): void; - /** - * sets 'attribute' on 'item' to 'value' value - * must be an array. - * See dojo/data/api/Write.setValues() - * - * @param item - * @param attribute - * @param values - */ - setValues(item: any, attribute: any, values: any): void; - /** - * unsets 'attribute' on 'item' - * See dojo/data/api/Write.unsetAttribute() - * - * @param item - * @param attribute - */ - unsetAttribute(item: any, attribute: any): void; - /** - * See dojo/data/api/Notification.onDelete() - * - */ - onDelete(): void; - /** - * Called when a fetch occurs - * - * @param results - */ - onFetch(results: any): void; - /** - * See dojo/data/api/Notification.onNew() - * - */ - onNew(): void; - /** - * See dojo/data/api/Notification.onSet() - * - */ - onSet(): void; - } module api { /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/data/api/Item.html @@ -13399,34 +13466,6 @@ declare module dojo { */ patternToRegExp(pattern: String, ignoreCase: boolean): any; } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/data/util/sorter.html - * - * - */ - interface sorter { - /** - * Basic comparison function that compares if an item is greater or less than another item - * returns 1 if a > b, -1 if a < b, 0 if equal. - * 'null' values (null, undefined) are treated as larger values so that they're pushed to the end of the list. - * And compared to each other, null is equivalent to undefined. - * - * @param a - * @param b - */ - basicComparator(a: any, b: any): number; - /** - * Helper function to generate the sorting function based off the list of sort attributes. - * The sort function creation will look for a property on the store called 'comparatorMap'. If it exists - * it will look in the mapping for comparisons function for the attributes. If one is found, it will - * use it instead of the basic comparator, which is typically used for strings, ints, booleans, and dates. - * Returns the sorting function for this particular list of attributes and sorting directions. - * - * @param sortSpec A JS object that array that defines out what attribute names to sort on and whether it should be descenting or asending.The objects should be formatted as follows:{ attribute: "attributeName-string" || attribute, descending: true|false; // Default is false.} - * @param store The datastore object to look up item values from. - */ - createSortFunction(sortSpec: Object, store: dojo.data.api.Read): String[]; - } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/data/util/simpleFetch.html * @@ -13480,6 +13519,34 @@ declare module dojo { */ fetchHandler(items: any[], requestObject: Object): void; } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/data/util/sorter.html + * + * + */ + interface sorter { + /** + * Basic comparison function that compares if an item is greater or less than another item + * returns 1 if a > b, -1 if a < b, 0 if equal. + * 'null' values (null, undefined) are treated as larger values so that they're pushed to the end of the list. + * And compared to each other, null is equivalent to undefined. + * + * @param a + * @param b + */ + basicComparator(a: any, b: any): number; + /** + * Helper function to generate the sorting function based off the list of sort attributes. + * The sort function creation will look for a property on the store called 'comparatorMap'. If it exists + * it will look in the mapping for comparisons function for the attributes. If one is found, it will + * use it instead of the basic comparator, which is typically used for strings, ints, booleans, and dates. + * Returns the sorting function for this particular list of attributes and sorting directions. + * + * @param sortSpec A JS object that array that defines out what attribute names to sort on and whether it should be descenting or asending.The objects should be formatted as follows:{ attribute: "attributeName-string" || attribute, descending: true|false; // Default is false.} + * @param store The datastore object to look up item values from. + */ + createSortFunction(sortSpec: Object, store: dojo.data.api.Read): String[]; + } } } @@ -13516,6 +13583,290 @@ declare module dojo { */ update(): void; } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/dnd/Manager.html + * + * the manager of DnD operations (usually a singleton) + * + */ + class Manager extends dojo.Evented { + constructor(); + /** + * + */ + "OFFSET_X": number; + /** + * + */ + "OFFSET_Y": number; + /** + * called to notify if the current target can accept items + * + * @param flag + */ + canDrop(flag: any): void; + /** + * + * @param type + * @param event + */ + emit(type: any, event: any): any; + /** + * makes the avatar; it is separate to be overwritten dynamically, if needed + * + */ + makeAvatar(): any; + /** + * Returns the current DnD manager. Creates one if it is not created yet. + * + */ + manager(): any; + /** + * + * @param type + * @param listener + */ + on(type: any, listener: any): any; + /** + * called when a source detected a mouse-out condition + * + * @param source the reporter + */ + outSource(source: Object): void; + /** + * called when a source detected a mouse-over condition + * + * @param source the reporter + */ + overSource(source: Object): void; + /** + * called to initiate the DnD operation + * + * @param source the source which provides items + * @param nodes the list of transferred items + * @param copy copy items, if true, move items otherwise + */ + startDrag(source: Object, nodes: any[], copy: boolean): void; + /** + * stop the DnD in progress + * + */ + stopDrag(): void; + /** + * updates the avatar; it is separate to be overwritten dynamically, if needed + * + */ + updateAvatar(): void; + /** + * event processor for onkeydown: + * watching for CTRL for copy/move status, watching for ESCAPE to cancel the drag + * + * @param e keyboard event + */ + onKeyDown(e: Event): void; + /** + * event processor for onkeyup, watching for CTRL for copy/move status + * + * @param e keyboard event + */ + onKeyUp(e: Event): void; + /** + * event processor for onmousemove + * + * @param e mouse event + */ + onMouseMove(e: Event): void; + /** + * event processor for onmouseup + * + * @param e mouse event + */ + onMouseUp(e: Event): void; + } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/dnd/Container.html + * + * a Container object, which knows when mouse hovers over it, + * and over which element it hovers + * + * @param node node or node's id to build the container on + * @param params a dictionary of parameters + */ + class Container extends dojo.Evented { + constructor(node: HTMLElement, params: Object); + /** + * Indicates whether to allow dnd item nodes to be nested within other elements. + * By default this is false, indicating that only direct children of the container can + * be draggable dnd item nodes + * + */ + "allowNested": boolean; + /** + * The DOM node the mouse is currently hovered over + * + */ + "current": HTMLElement; + /** + * Map from an item's id (which is also the DOMNode's id) to + * the dojo/dnd/Container.Item itself. + * + */ + "map": Object; + + node: HTMLElement; + /** + * + */ + "skipForm": boolean; + /** + * removes all data items from the map + * + */ + clearItems(): void; + /** + * creator function, dummy at the moment + * + */ + creator(): void; + /** + * removes a data item from the map by its key (id) + * + * @param key + */ + delItem(key: String): void; + /** + * prepares this object to be garbage-collected + * + */ + destroy(): void; + /** + * + * @param type + * @param event + */ + emit(type: any, event: any): any; + /** + * iterates over a data map skipping members that + * are present in the empty object (IE and/or 3rd-party libraries). + * + * @param f + * @param o Optional + */ + forInItems(f: Function, o: Object): String; + /** + * returns a list (an array) of all valid child nodes + * + */ + getAllNodes(): any; + /** + * returns a data item by its key (id) + * + * @param key + */ + getItem(key: String): any; + /** + * inserts an array of new nodes before/after an anchor node + * + * @param data Logical representation of the object being dragged.If the drag object's type is "text" then data is a String,if it's another type then data could be a different Object,perhaps a name/value hash. + * @param before insert before the anchor, if true, and after the anchor otherwise + * @param anchor the anchor node to be used as a point of insertion + */ + insertNodes(addSelected?: boolean, data?: any[], before?: boolean, anchor?: HTMLElement): Function; + /** + * Represents (one of) the source node(s) being dragged. + * Contains (at least) the "type" and "data" attributes. + * + */ + Item(): void; + /** + * + * @param params + * @param node + * @param Ctor + */ + markupFactory(params: any, node: any, Ctor: any): any; + /** + * + * @param type + * @param listener + */ + on(type: any, listener: any): any; + /** + * associates a data item with its key (id) + * + * @param key + * @param data + */ + setItem(key: String, data: any): void; + /** + * collects valid child items and populate the map + * + */ + startup(): void; + /** + * sync up the node list with the data map + * + */ + sync(): Function; + /** + * event processor for onmouseout + * + * @param e mouse event + */ + onMouseOut(e: Event): void; + /** + * event processor for onmouseover or touch, to mark that element as the current element + * + * @param e mouse event + */ + onMouseOver(e: Event): void; + /** + * this function is called once, when mouse is out of our container + * + */ + onOutEvent(): void; + /** + * this function is called once, when mouse is over our container + * + */ + onOverEvent(): void; + /** + * event processor for onselectevent and ondragevent + * + * @param e mouse event + */ + onSelectStart(e: Event): void; + } + module Container { + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/dnd/Container.__ContainerArgs.html + * + * + */ + class __ContainerArgs { + constructor(); + /** + * node or node's id to use as the parent node for dropped items + * (must be underneath the 'node' parameter in the DOM) + * + */ + "dropParent": HTMLElement; + /** + * don't start the drag operation, if clicked on form elements + * + */ + "skipForm": boolean; + /** + * a creator function, which takes a data item, and returns an object like that: + * {node: newNode, data: usedData, type: arrayOfStrings} + * + */ + creator(): void; + + + } + } + /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/dnd/AutoSource.html * @@ -13679,14 +14030,6 @@ declare module dojo { * */ getSelectedNodes(): any; - /** - * inserts an array of new nodes before/after an anchor node - * - * @param data Logical representation of the object being dragged.If the drag object's type is "text" then data is a String,if it's another type then data could be a different Object,perhaps a name/value hash. - * @param before insert before the anchor, if true, and after the anchor otherwise - * @param anchor the anchor node to be used as a point of insertion - */ - insertNodes(data: Object, before: boolean, anchor: HTMLElement): Function; /** * inserts new data items (see dojo/dnd/Container.insertNodes() method for details) * @@ -13849,56 +14192,19 @@ declare module dojo { onSelectStart(e: Event): void; } /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/dnd/Container.html + * Permalink: http://dojotoolkit.org/api/1.9/dojo/dnd/Mover.html * - * a Container object, which knows when mouse hovers over it, - * and over which element it hovers + * an object which makes a node follow the mouse, or touch-drag on touch devices. + * Used as a default mover, and as a base class for custom movers. * - * @param node node or node's id to build the container on - * @param params a dictionary of parameters + * @param node a node (or node's id) to be moved + * @param e a mouse event, which started the move;only pageX and pageY properties are used + * @param host Optionalobject which implements the functionality of the move,and defines proper events (onMoveStart and onMoveStop) */ - class Container extends dojo.Evented { - constructor(node: HTMLElement, params: Object); + class Mover extends dojo.Evented { + constructor(node: HTMLElement, e: Event, host?: Object); /** - * Indicates whether to allow dnd item nodes to be nested within other elements. - * By default this is false, indicating that only direct children of the container can - * be draggable dnd item nodes - * - */ - "allowNested": boolean; - /** - * The DOM node the mouse is currently hovered over - * - */ - "current": HTMLElement; - /** - * Map from an item's id (which is also the DOMNode's id) to - * the dojo/dnd/Container.Item itself. - * - */ - "map": Object; - /** - * - */ - "skipForm": boolean; - /** - * removes all data items from the map - * - */ - clearItems(): void; - /** - * creator function, dummy at the moment - * - */ - creator(): void; - /** - * removes a data item from the map by its key (id) - * - * @param key - */ - delItem(key: String): void; - /** - * prepares this object to be garbage-collected + * stops the move, deletes all references, so the object can be garbage-collected * */ destroy(): void; @@ -13908,46 +14214,6 @@ declare module dojo { * @param event */ emit(type: any, event: any): any; - /** - * iterates over a data map skipping members that - * are present in the empty object (IE and/or 3rd-party libraries). - * - * @param f - * @param o Optional - */ - forInItems(f: Function, o: Object): String; - /** - * returns a list (an array) of all valid child nodes - * - */ - getAllNodes(): any; - /** - * returns a data item by its key (id) - * - * @param key - */ - getItem(key: String): any; - /** - * inserts an array of new nodes before/after an anchor node - * - * @param data Logical representation of the object being dragged.If the drag object's type is "text" then data is a String,if it's another type then data could be a different Object,perhaps a name/value hash. - * @param before insert before the anchor, if true, and after the anchor otherwise - * @param anchor the anchor node to be used as a point of insertion - */ - insertNodes(data: Object, before: boolean, anchor: HTMLElement): Function; - /** - * Represents (one of) the source node(s) being dragged. - * Contains (at least) the "type" and "data" attributes. - * - */ - Item(): void; - /** - * - * @param params - * @param node - * @param Ctor - */ - markupFactory(params: any, node: any, Ctor: any): any; /** * * @param type @@ -13955,79 +14221,24 @@ declare module dojo { */ on(type: any, listener: any): any; /** - * associates a data item with its key (id) + * makes the node absolute; it is meant to be called only once. + * relative and absolutely positioned nodes are assumed to use pixel units * - * @param key - * @param data + * @param e */ - setItem(key: String, data: any): void; + onFirstMove(e: any): void; /** - * collects valid child items and populate the map + * event processor for onmousemove/ontouchmove * + * @param e mouse/touch event */ - startup(): void; + onMouseMove(e: Event): void; /** - * sync up the node list with the data map * + * @param e */ - sync(): Function; - /** - * event processor for onmouseout - * - * @param e mouse event - */ - onMouseOut(e: Event): void; - /** - * event processor for onmouseover or touch, to mark that element as the current element - * - * @param e mouse event - */ - onMouseOver(e: Event): void; - /** - * this function is called once, when mouse is out of our container - * - */ - onOutEvent(): void; - /** - * this function is called once, when mouse is over our container - * - */ - onOverEvent(): void; - /** - * event processor for onselectevent and ondragevent - * - * @param e mouse event - */ - onSelectStart(e: Event): void; + onMouseUp(e: any): void; } - module Container { - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/dnd/Container.__ContainerArgs.html - * - * - */ - class __ContainerArgs { - constructor(); - /** - * node or node's id to use as the parent node for dropped items - * (must be underneath the 'node' parameter in the DOM) - * - */ - "dropParent": HTMLElement; - /** - * don't start the drag operation, if clicked on form elements - * - */ - "skipForm": boolean; - /** - * a creator function, which takes a data item, and returns an object like that: - * {node: newNode, data: usedData, type: arrayOfStrings} - * - */ - creator(): void; - } - } - /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/dnd/Moveable.html * @@ -14182,167 +14393,15 @@ declare module dojo { } /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/dnd/Mover.html + * Permalink: http://dojotoolkit.org/api/1.9/dojo/dnd/Selector.html * - * an object which makes a node follow the mouse, or touch-drag on touch devices. - * Used as a default mover, and as a base class for custom movers. + * a Selector object, which knows how to select its children * - * @param node a node (or node's id) to be moved - * @param e a mouse event, which started the move;only pageX and pageY properties are used - * @param host Optionalobject which implements the functionality of the move,and defines proper events (onMoveStart and onMoveStop) + * @param node node or node's id to build the selector on + * @param params Optionala dictionary of parameters */ - class Mover extends dojo.Evented { - constructor(node: HTMLElement, e: Event, host?: Object); - /** - * stops the move, deletes all references, so the object can be garbage-collected - * - */ - destroy(): void; - /** - * - * @param type - * @param event - */ - emit(type: any, event: any): any; - /** - * - * @param type - * @param listener - */ - on(type: any, listener: any): any; - /** - * makes the node absolute; it is meant to be called only once. - * relative and absolutely positioned nodes are assumed to use pixel units - * - * @param e - */ - onFirstMove(e: any): void; - /** - * event processor for onmousemove/ontouchmove - * - * @param e mouse/touch event - */ - onMouseMove(e: Event): void; - /** - * - * @param e - */ - onMouseUp(e: any): void; - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/dnd/Manager.html - * - * the manager of DnD operations (usually a singleton) - * - */ - class Manager extends dojo.Evented { - constructor(); - /** - * - */ - "OFFSET_X": number; - /** - * - */ - "OFFSET_Y": number; - /** - * called to notify if the current target can accept items - * - * @param flag - */ - canDrop(flag: any): void; - /** - * - * @param type - * @param event - */ - emit(type: any, event: any): any; - /** - * makes the avatar; it is separate to be overwritten dynamically, if needed - * - */ - makeAvatar(): any; - /** - * Returns the current DnD manager. Creates one if it is not created yet. - * - */ - manager(): any; - /** - * - * @param type - * @param listener - */ - on(type: any, listener: any): any; - /** - * called when a source detected a mouse-out condition - * - * @param source the reporter - */ - outSource(source: Object): void; - /** - * called when a source detected a mouse-over condition - * - * @param source the reporter - */ - overSource(source: Object): void; - /** - * called to initiate the DnD operation - * - * @param source the source which provides items - * @param nodes the list of transferred items - * @param copy copy items, if true, move items otherwise - */ - startDrag(source: Object, nodes: any[], copy: boolean): void; - /** - * stop the DnD in progress - * - */ - stopDrag(): void; - /** - * updates the avatar; it is separate to be overwritten dynamically, if needed - * - */ - updateAvatar(): void; - /** - * event processor for onkeydown: - * watching for CTRL for copy/move status, watching for ESCAPE to cancel the drag - * - * @param e keyboard event - */ - onKeyDown(e: Event): void; - /** - * event processor for onkeyup, watching for CTRL for copy/move status - * - * @param e keyboard event - */ - onKeyUp(e: Event): void; - /** - * event processor for onmousemove - * - * @param e mouse event - */ - onMouseMove(e: Event): void; - /** - * event processor for onmouseup - * - * @param e mouse event - */ - onMouseUp(e: Event): void; - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/dnd/Source.html - * - * a Source object, which can be used as a DnD source, or a DnD target - * - * @param node node or node's id to build the source on - * @param params Optionalany property of this class may be configured via the paramsobject which is mixed-in to the dojo/dnd/Source instance - */ - class Source extends dojo.dnd.Selector { + class Selector extends dojo.dnd.Container { constructor(node: HTMLElement, params?: Object); - /** - * - */ - "accept": any[]; /** * Indicates whether to allow dnd item nodes to be nested within other elements. * By default this is false, indicating that only direct children of the container can @@ -14350,35 +14409,11 @@ declare module dojo { * */ "allowNested": boolean; - /** - * - */ - "autoSync": boolean; - /** - * - */ - "copyOnly": boolean; /** * The DOM node the mouse is currently hovered over * */ "current": HTMLElement; - /** - * - */ - "delay": number; - /** - * - */ - "generateText": boolean; - /** - * - */ - "horizontal": boolean; - /** - * - */ - "isSource": boolean; /** * Map from an item's id (which is also the DOMNode's id) to * the dojo/dnd/Container.Item itself. @@ -14393,14 +14428,6 @@ declare module dojo { * */ "selection": Object; - /** - * - */ - "selfAccept": boolean; - /** - * - */ - "selfCopy": boolean; /** * */ @@ -14409,30 +14436,11 @@ declare module dojo { * */ "skipForm": boolean; - /** - * - */ - "withHandles": boolean; - /** - * checks if the target can accept nodes from this source - * - * @param source the source which provides items - * @param nodes the list of transferred items - */ - checkAcceptance(source: Object, nodes: any[]): boolean; /** * removes all data items from the map * */ clearItems(): void; - /** - * Returns true if we need to copy items, false to move. - * It is separated to be overwritten dynamically, if needed. - * - * @param keyPressed the "copy" key was pressed - * @param self Optionaloptional flag that means that we are about to drop on itself - */ - copyState(keyPressed: boolean, self: boolean): any; /** * creator function, dummy at the moment * @@ -14492,14 +14500,6 @@ declare module dojo { * */ getSelectedNodes(): any; - /** - * inserts an array of new nodes before/after an anchor node - * - * @param data Logical representation of the object being dragged.If the drag object's type is "text" then data is a String,if it's another type then data could be a different Object,perhaps a name/value hash. - * @param before insert before the anchor, if true, and after the anchor otherwise - * @param anchor the anchor node to be used as a point of insertion - */ - insertNodes(data: Object, before: boolean, anchor: HTMLElement): Function; /** * inserts new data items (see dojo/dnd/Container.insertNodes() method for details) * @@ -14508,7 +14508,7 @@ declare module dojo { * @param before insert before the anchor, if true, and after the anchor otherwise * @param anchor the anchor node to be used as a point of insertion */ - insertNodes(addSelected: boolean, data: any[], before: boolean, anchor: HTMLElement): Function; + insertNodes(addSelected?: boolean, data?: any[], before?: boolean, anchor?: HTMLElement): Function; /** * * @param params @@ -14549,71 +14549,6 @@ declare module dojo { * */ sync(): Function; - /** - * topic event processor for /dnd/cancel, called to cancel the DnD operation - * - */ - onDndCancel(): void; - /** - * topic event processor for /dnd/drop, called to finish the DnD operation - * - * @param source the source which provides items - * @param nodes the list of transferred items - * @param copy copy items, if true, move items otherwise - * @param target the target which accepts items - */ - onDndDrop(source: Object, nodes: any[], copy: boolean, target: Object): void; - /** - * topic event processor for /dnd/source/over, called when detected a current source - * - * @param source the source which has the mouse over it - */ - onDndSourceOver(source: Object): void; - /** - * topic event processor for /dnd/start, called to initiate the DnD operation - * - * @param source the source which provides items - * @param nodes the list of transferred items - * @param copy copy items, if true, move items otherwise - */ - onDndStart(source: Object, nodes: any[], copy: boolean): void; - /** - * called during the active DnD operation, when items - * are dragged away from this target, and it is not disabled - * - */ - onDraggingOut(): void; - /** - * called during the active DnD operation, when items - * are dragged over this target, and it is not disabled - * - */ - onDraggingOver(): void; - /** - * called only on the current target, when drop is performed - * - * @param source the source which provides items - * @param nodes the list of transferred items - * @param copy copy items, if true, move items otherwise - */ - onDrop(source: Object, nodes: any[], copy: boolean): void; - /** - * called only on the current target, when drop is performed - * from an external source - * - * @param source the source which provides items - * @param nodes the list of transferred items - * @param copy copy items, if true, move items otherwise - */ - onDropExternal(source: Object, nodes: any[], copy: boolean): void; - /** - * called only on the current target, when drop is performed - * from the same target/source - * - * @param nodes the list of transferred items - * @param copy copy items, if true, move items otherwise - */ - onDropInternal(nodes: any[], copy: boolean): void; /** * event processor for onmousedown * @@ -14948,14 +14883,6 @@ declare module dojo { * */ getSelectedNodes(): any; - /** - * inserts an array of new nodes before/after an anchor node - * - * @param data Logical representation of the object being dragged.If the drag object's type is "text" then data is a String,if it's another type then data could be a different Object,perhaps a name/value hash. - * @param before insert before the anchor, if true, and after the anchor otherwise - * @param anchor the anchor node to be used as a point of insertion - */ - insertNodes(data: Object, before: boolean, anchor: HTMLElement): Function; /** * inserts new data items (see dojo/dnd/Container.insertNodes() method for details) * @@ -14964,7 +14891,7 @@ declare module dojo { * @param before insert before the anchor, if true, and after the anchor otherwise * @param anchor the anchor node to be used as a point of insertion */ - insertNodes(addSelected: boolean, data: any[], before: boolean, anchor: HTMLElement): Function; + insertNodes(addSelected: boolean, data: any[], before?: boolean, anchor?: HTMLElement): Function; /** * * @param params @@ -15118,15 +15045,19 @@ declare module dojo { onSelectStart(e: Event): void; } /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/dnd/Selector.html + * Permalink: http://dojotoolkit.org/api/1.9/dojo/dnd/Source.html * - * a Selector object, which knows how to select its children + * a Source object, which can be used as a DnD source, or a DnD target * - * @param node node or node's id to build the selector on - * @param params Optionala dictionary of parameters + * @param node node or node's id to build the source on + * @param params Optionalany property of this class may be configured via the paramsobject which is mixed-in to the dojo/dnd/Source instance */ - class Selector extends dojo.dnd.Container { + class Source extends dojo.dnd.Selector { constructor(node: HTMLElement, params?: Object); + /** + * + */ + "accept": any[]; /** * Indicates whether to allow dnd item nodes to be nested within other elements. * By default this is false, indicating that only direct children of the container can @@ -15134,11 +15065,35 @@ declare module dojo { * */ "allowNested": boolean; + /** + * + */ + "autoSync": boolean; + /** + * + */ + "copyOnly": boolean; /** * The DOM node the mouse is currently hovered over * */ "current": HTMLElement; + /** + * + */ + "delay": number; + /** + * + */ + "generateText": boolean; + /** + * + */ + "horizontal": boolean; + /** + * + */ + "isSource": boolean; /** * Map from an item's id (which is also the DOMNode's id) to * the dojo/dnd/Container.Item itself. @@ -15153,6 +15108,14 @@ declare module dojo { * */ "selection": Object; + /** + * + */ + "selfAccept": boolean; + /** + * + */ + "selfCopy": boolean; /** * */ @@ -15161,11 +15124,30 @@ declare module dojo { * */ "skipForm": boolean; + /** + * + */ + "withHandles": boolean; + /** + * checks if the target can accept nodes from this source + * + * @param source the source which provides items + * @param nodes the list of transferred items + */ + checkAcceptance(source: Object, nodes: any[]): boolean; /** * removes all data items from the map * */ clearItems(): void; + /** + * Returns true if we need to copy items, false to move. + * It is separated to be overwritten dynamically, if needed. + * + * @param keyPressed the "copy" key was pressed + * @param self Optionaloptional flag that means that we are about to drop on itself + */ + copyState(keyPressed: boolean, self: boolean): any; /** * creator function, dummy at the moment * @@ -15225,14 +15207,6 @@ declare module dojo { * */ getSelectedNodes(): any; - /** - * inserts an array of new nodes before/after an anchor node - * - * @param data Logical representation of the object being dragged.If the drag object's type is "text" then data is a String,if it's another type then data could be a different Object,perhaps a name/value hash. - * @param before insert before the anchor, if true, and after the anchor otherwise - * @param anchor the anchor node to be used as a point of insertion - */ - insertNodes(data: Object, before: boolean, anchor: HTMLElement): Function; /** * inserts new data items (see dojo/dnd/Container.insertNodes() method for details) * @@ -15241,7 +15215,7 @@ declare module dojo { * @param before insert before the anchor, if true, and after the anchor otherwise * @param anchor the anchor node to be used as a point of insertion */ - insertNodes(addSelected: boolean, data: any[], before: boolean, anchor: HTMLElement): Function; + insertNodes(addSelected: boolean, data: any[], before?: boolean, anchor?: HTMLElement): Function; /** * * @param params @@ -15282,6 +15256,71 @@ declare module dojo { * */ sync(): Function; + /** + * topic event processor for /dnd/cancel, called to cancel the DnD operation + * + */ + onDndCancel(): void; + /** + * topic event processor for /dnd/drop, called to finish the DnD operation + * + * @param source the source which provides items + * @param nodes the list of transferred items + * @param copy copy items, if true, move items otherwise + * @param target the target which accepts items + */ + onDndDrop(source: Object, nodes: any[], copy: boolean, target: Object): void; + /** + * topic event processor for /dnd/source/over, called when detected a current source + * + * @param source the source which has the mouse over it + */ + onDndSourceOver(source: Object): void; + /** + * topic event processor for /dnd/start, called to initiate the DnD operation + * + * @param source the source which provides items + * @param nodes the list of transferred items + * @param copy copy items, if true, move items otherwise + */ + onDndStart(source: Object, nodes: any[], copy: boolean): void; + /** + * called during the active DnD operation, when items + * are dragged away from this target, and it is not disabled + * + */ + onDraggingOut(): void; + /** + * called during the active DnD operation, when items + * are dragged over this target, and it is not disabled + * + */ + onDraggingOver(): void; + /** + * called only on the current target, when drop is performed + * + * @param source the source which provides items + * @param nodes the list of transferred items + * @param copy copy items, if true, move items otherwise + */ + onDrop(source: Object, nodes: any[], copy: boolean): void; + /** + * called only on the current target, when drop is performed + * from an external source + * + * @param source the source which provides items + * @param nodes the list of transferred items + * @param copy copy items, if true, move items otherwise + */ + onDropExternal(source: Object, nodes: any[], copy: boolean): void; + /** + * called only on the current target, when drop is performed + * from the same target/source + * + * @param nodes the list of transferred items + * @param copy copy items, if true, move items otherwise + */ + onDropInternal(nodes: any[], copy: boolean): void; /** * event processor for onmousedown * @@ -15329,6 +15368,94 @@ declare module dojo { */ onSelectStart(e: Event): void; } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/dnd/autoscroll.html + * + * Used by dojo/dnd/Manager to scroll document or internal node when the user + * drags near the edge of the viewport or a scrollable node + * + */ + interface autoscroll { + /** + * + */ + H_AUTOSCROLL_VALUE: number; + /** + * + */ + H_TRIGGER_AUTOSCROLL: number; + /** + * + */ + V_AUTOSCROLL_VALUE: number; + /** + * + */ + V_TRIGGER_AUTOSCROLL: number; + /** + * a handler for mousemove and touchmove events, which scrolls the window, if + * necessary + * + * @param e mousemove/touchmove event + */ + autoScroll(e: Event): void; + /** + * a handler for mousemove and touchmove events, which scrolls the first available + * Dom element, it falls back to exports.autoScroll() + * + * @param e mousemove/touchmove event + */ + autoScrollNodes(e: Event): void; + /** + * Called at the start of a drag. + * + * @param d The document of the node being dragged. + */ + autoScrollStart(d: HTMLDocument): void; + /** + * Returns the dimensions and scroll position of the viewable area of a browser window + * + * @param doc Optional + */ + getViewport(doc: HTMLDocument): Object; + } + module autoscroll { + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/dnd/autoscroll._validOverflow.html + * + * + */ + interface _validOverflow { + /** + * + */ + auto: number; + /** + * + */ + scroll: number; + } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/dnd/autoscroll._validNodes.html + * + * + */ + interface _validNodes { + /** + * + */ + div: number; + /** + * + */ + p: number; + /** + * + */ + td: number; + } + } + /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/dnd/common.html * @@ -15391,94 +15518,6 @@ declare module dojo { } } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/dnd/autoscroll.html - * - * Used by dojo/dnd/Manager to scroll document or internal node when the user - * drags near the edge of the viewport or a scrollable node - * - */ - interface autoscroll { - /** - * - */ - H_AUTOSCROLL_VALUE: number; - /** - * - */ - H_TRIGGER_AUTOSCROLL: number; - /** - * - */ - V_AUTOSCROLL_VALUE: number; - /** - * - */ - V_TRIGGER_AUTOSCROLL: number; - /** - * a handler for mousemove and touchmove events, which scrolls the window, if - * necessary - * - * @param e mousemove/touchmove event - */ - autoScroll(e: Event): void; - /** - * a handler for mousemove and touchmove events, which scrolls the first available - * Dom element, it falls back to exports.autoScroll() - * - * @param e mousemove/touchmove event - */ - autoScrollNodes(e: Event): void; - /** - * Called at the start of a drag. - * - * @param d The document of the node being dragged. - */ - autoScrollStart(d: HTMLDocument): void; - /** - * Returns the dimensions and scroll position of the viewable area of a browser window - * - * @param doc Optional - */ - getViewport(doc: HTMLDocument): Object; - } - module autoscroll { - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/dnd/autoscroll._validNodes.html - * - * - */ - interface _validNodes { - /** - * - */ - div: number; - /** - * - */ - p: number; - /** - * - */ - td: number; - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/dnd/autoscroll._validOverflow.html - * - * - */ - interface _validOverflow { - /** - * - */ - auto: number; - /** - * - */ - scroll: number; - } - } - /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/dnd/move.html * @@ -15501,14 +15540,19 @@ declare module dojo { } module move { /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/dnd/move.constrainedMoveable.html + * Permalink: http://dojotoolkit.org/api/1.9/dojo/dnd/move.parentConstrainedMoveable.html * * * @param node a node (or node's id) to be moved - * @param params Optionalan optional object with additional parameters;the rest is passed to the base class + * @param params Optionalan optional object with parameters */ - class constrainedMoveable extends dojo.dnd.Moveable { + class parentConstrainedMoveable extends dojo.dnd.Moveable { constructor(node: HTMLElement, params?: Object); + /** + * object attributes (for markup) + * + */ + "area": string; /** * */ @@ -15758,19 +15802,14 @@ declare module dojo { onSelectStart(e: Event): void; } /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/dnd/move.parentConstrainedMoveable.html + * Permalink: http://dojotoolkit.org/api/1.9/dojo/dnd/move.constrainedMoveable.html * * * @param node a node (or node's id) to be moved - * @param params Optionalan optional object with parameters + * @param params Optionalan optional object with additional parameters;the rest is passed to the base class */ - class parentConstrainedMoveable extends dojo.dnd.Moveable { + class constrainedMoveable extends dojo.dnd.Moveable { constructor(node: HTMLElement, params?: Object); - /** - * object attributes (for markup) - * - */ - "area": string; /** * */ @@ -15910,13 +15949,6 @@ declare module dojo { * */ interface CancelError{(): void} - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/errors/RequestTimeoutError.html - * - * TODOC - * - */ - interface RequestTimeoutError{(): void} /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/errors/RequestError.html * @@ -15924,6 +15956,13 @@ declare module dojo { * */ interface RequestError{(): void} + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/errors/RequestTimeoutError.html + * + * TODOC + * + */ + interface RequestTimeoutError{(): void} } module io { @@ -15999,32 +16038,6 @@ declare module dojo { } module promise { - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/promise/first.html - * - * Takes multiple promises and returns a new promise that is fulfilled - * when the first of these promises is fulfilled. - * Takes multiple promises and returns a new promise that is fulfilled - * when the first of these promises is fulfilled. Canceling the returned - * promise will not cancel any passed promises. The promise will be - * fulfilled with the value of the first fulfilled promise. - * - * @param objectOrArray OptionalThe promises are taken from the array or object values. If no valueis passed, the returned promise is resolved with an undefined value. - */ - interface first{(objectOrArray?: Object): void} - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/promise/first.html - * - * Takes multiple promises and returns a new promise that is fulfilled - * when the first of these promises is fulfilled. - * Takes multiple promises and returns a new promise that is fulfilled - * when the first of these promises is fulfilled. Canceling the returned - * promise will not cancel any passed promises. The promise will be - * fulfilled with the value of the first fulfilled promise. - * - * @param objectOrArray OptionalThe promises are taken from the array or object values. If no valueis passed, the returned promise is resolved with an undefined value. - */ - interface first{(objectOrArray?: any[]): void} /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/promise/all.html * @@ -16051,6 +16064,32 @@ declare module dojo { * @param objectOrArray OptionalThe promise will be fulfilled with a list of results if invoked with anarray, or an object of results when passed an object (using the samekeys). If passed neither an object or array it is resolved with anundefined value. */ interface all{(objectOrArray?: any[]): void} + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/promise/first.html + * + * Takes multiple promises and returns a new promise that is fulfilled + * when the first of these promises is fulfilled. + * Takes multiple promises and returns a new promise that is fulfilled + * when the first of these promises is fulfilled. Canceling the returned + * promise will not cancel any passed promises. The promise will be + * fulfilled with the value of the first fulfilled promise. + * + * @param objectOrArray OptionalThe promises are taken from the array or object values. If no valueis passed, the returned promise is resolved with an undefined value. + */ + interface first{(objectOrArray?: Object): void} + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/promise/first.html + * + * Takes multiple promises and returns a new promise that is fulfilled + * when the first of these promises is fulfilled. + * Takes multiple promises and returns a new promise that is fulfilled + * when the first of these promises is fulfilled. Canceling the returned + * promise will not cancel any passed promises. The promise will be + * fulfilled with the value of the first fulfilled promise. + * + * @param objectOrArray OptionalThe promises are taken from the array or object values. If no valueis passed, the returned promise is resolved with an undefined value. + */ + interface first{(objectOrArray?: any[]): void} /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/promise/instrumentation.html * @@ -16131,7 +16170,7 @@ declare module dojo { * @param errback OptionalCallback to be invoked when the promise is rejected.Receives the rejection error. * @param progback OptionalCallback to be invoked when the promise emits a progressupdate. Receives the progress update. */ - then(callback?: Function, errback?: Function, progback?: Function): dojo.promise.Promise; + then(callback: Function, errback?: Function, progback?: Function): dojo.promise.Promise; /** * */ @@ -16180,14 +16219,17 @@ declare module dojo { module rpc { /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/rpc/RpcService.html + * Permalink: http://dojotoolkit.org/api/1.9/dojo/rpc/JsonpService.html * - * TODOC + * Generic JSONP service. Minimally extends RpcService to allow + * easy definition of nearly any JSONP style service. Example + * SMD files exist in dojox.data * - * @param args Takes a number of properties as kwArgs for defining the service. It alsoaccepts a string. When passed a string, it is treated as a url fromwhich it should synchronously retrieve an smd file. Otherwise it is a kwArgsobject. It accepts serviceUrl, to manually define a url for the rpc serviceallowing the rpc system to be used without an smd definition. strictArgChecksforces the system to verify that the # of arguments provided in a callmatches those defined in the smd. smdString allows a developer to passa jsonString directly, which will be converted into an object or alternativelysmdObject is accepts an smdObject directly. + * @param args + * @param requiredArgs */ - class RpcService { - constructor(args: Object); + class JsonpService extends dojo.rpc.RpcService { + constructor(args: any, requiredArgs: any); /** * */ @@ -16196,6 +16238,23 @@ declare module dojo { * */ "strictArgChecks": boolean; + /** + * JSONP bind method. Takes remote method, parameters, + * deferred, and a url, calls createRequest to make a JSON-RPC + * envelope and passes that off with bind. + * + * @param method The name of the method we are calling + * @param parameters The parameters we are passing off to the method + * @param deferredRequestHandler The Deferred object for this particular request + * @param url + */ + bind(method: String, parameters: dojo._base.array, deferredRequestHandler: dojo.Deferred, url: any): void; + /** + * create a JSONP req + * + * @param parameters + */ + createRequest(parameters: any): Object; /** * create callback that calls the Deferred errback method * @@ -16323,17 +16382,14 @@ declare module dojo { resultCallback(deferredRequestHandler: dojo._base.Deferred): any; } /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/rpc/JsonpService.html + * Permalink: http://dojotoolkit.org/api/1.9/dojo/rpc/RpcService.html * - * Generic JSONP service. Minimally extends RpcService to allow - * easy definition of nearly any JSONP style service. Example - * SMD files exist in dojox.data + * TODOC * - * @param args - * @param requiredArgs + * @param args Takes a number of properties as kwArgs for defining the service. It alsoaccepts a string. When passed a string, it is treated as a url fromwhich it should synchronously retrieve an smd file. Otherwise it is a kwArgsobject. It accepts serviceUrl, to manually define a url for the rpc serviceallowing the rpc system to be used without an smd definition. strictArgChecksforces the system to verify that the # of arguments provided in a callmatches those defined in the smd. smdString allows a developer to passa jsonString directly, which will be converted into an object or alternativelysmdObject is accepts an smdObject directly. */ - class JsonpService extends dojo.rpc.RpcService { - constructor(args: any, requiredArgs: any); + class RpcService { + constructor(args: Object); /** * */ @@ -16342,23 +16398,6 @@ declare module dojo { * */ "strictArgChecks": boolean; - /** - * JSONP bind method. Takes remote method, parameters, - * deferred, and a url, calls createRequest to make a JSON-RPC - * envelope and passes that off with bind. - * - * @param method The name of the method we are calling - * @param parameters The parameters we are passing off to the method - * @param deferredRequestHandler The Deferred object for this particular request - * @param url - */ - bind(method: String, parameters: dojo._base.array, deferredRequestHandler: dojo.Deferred, url: any): void; - /** - * create a JSONP req - * - * @param parameters - */ - createRequest(parameters: any): Object; /** * create callback that calls the Deferred errback method * @@ -16398,6 +16437,26 @@ declare module dojo { } module selector { + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/selector/lite.html + * + * A small lightweight query selector engine that implements CSS2.1 selectors + * minus pseudo-classes and the sibling combinator, plus CSS3 attribute selectors + * + * @param selector + * @param root + */ + interface lite{(selector: any, root: any): void} + interface lite { + /** + * + */ + match: Object; + } + + module lite { + } + /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/selector/acme.html * @@ -16562,7 +16621,7 @@ declare module dojo { * @param root OptionalA DOMNode (or node id) to scope the search from. Optional. */ interface acme{(query: String, root?: HTMLElement): void} - module acme { + interface acme { /** * function for filtering a NodeList based on a selector, optimized for simple selectors * @@ -16570,7 +16629,7 @@ declare module dojo { * @param filter * @param root Optional */ - interface filter{(nodeList: HTMLElement[], filter: String, root: String): void} + filter(nodeList: HTMLElement[], filter: String, root: String): void; /** * function for filtering a NodeList based on a selector, optimized for simple selectors * @@ -16578,24 +16637,10 @@ declare module dojo { * @param filter * @param root Optional */ - interface filter{(nodeList: HTMLElement[], filter: String, root: HTMLElement): void} + filter(nodeList: HTMLElement[], filter: String, root: HTMLElement): void; } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/selector/lite.html - * - * A small lightweight query selector engine that implements CSS2.1 selectors - * minus pseudo-classes and the sibling combinator, plus CSS3 attribute selectors - * - * @param selector - * @param root - */ - interface lite{(selector: any, root: any): void} - module lite { - /** - * - */ - var match: Object + module acme { } /** @@ -16628,102 +16673,6 @@ declare module dojo { * @param store */ interface Observable{(store: dojo.store.api.Store): void} - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/store/DataStore.html - * - * This is an adapter for using Dojo Data stores with an object store consumer. - * You can provide a Dojo data store and use this adapter to interact with it through - * the Dojo object store API - * - * @param options OptionalThis provides any configuration information that will be mixed into the store,including a reference to the Dojo data store under the property "store". - */ - class DataStore extends dojo.store.api.Store { - constructor(options?: Object); - /** - * The object property to use to store the identity of the store items. - * - */ - "idProperty": string; - /** - * The object store to convert to a data store - * - */ - "store": Object; - /** - * - */ - "target": string; - /** - * Creates an object, throws an error if the object already exists - * - * @param object The object to store. - * @param directives OptionalAdditional directives for creating objects. - */ - add(object: Object, directives: dojo.store.api.Store.PutDirectives): any; - /** - * Retrieves an object by it's identity. This will trigger a fetchItemByIdentity - * - * @param id OptionalThe identity to use to lookup the object - * @param options - */ - get(id: number, options?: any): any; - /** - * Retrieves the children of an object. - * - * @param parent The object to find the children of. - * @param options OptionalAdditional options to apply to the retrieval of the children. - */ - getChildren(parent: Object, options: dojo.store.api.Store.QueryOptions): dojo.store.api.Store.QueryResults; - /** - * Fetch the identity for the given object. - * - * @param object The data object to get the identity from. - */ - getIdentity(object: Object): any; - /** - * Returns any metadata about the object. This may include attribution, - * cache directives, history, or version information. - * - * @param object The object to return metadata for. - */ - getMetadata(object: Object): Object; - - /** - * Stores an object by its identity. - * - * @param object The object to store. - * @param options OptionalAdditional metadata for storing the data. Includes a reference to an idthat the object may be stored with (i.e. { id: "foo" }). - */ - put(object: Object, options: Object): void; - /** - * Queries the store for objects. - * - * @param query The query to use for retrieving objects from the store - * @param options OptionalOptional options object as used by the underlying dojo.data Store. - */ - query(query: Object, options: Object): any; - /** - * Defines the query engine to use for querying the data store - * - * @param query An object hash with fields that may match fields of items in the store.Values in the hash will be compared by normal == operator, but regular expressionsor any object that provides a test() method are also supported and can beused to match strings by more complex expressions(and then the regex's or object's test() method will be used to match values). - * @param options OptionalAn object that contains optional information such as sort, start, and count. - */ - queryEngine(query: Object, options: dojo.store.api.Store.QueryOptions): any; - /** - * Deletes an object by its identity. - * - * @param id The identity to use to delete the object - */ - remove(id: Object): void; - /** - * Starts a new transaction. - * Note that a store user might not call transaction() prior to using put, - * delete, etc. in which case these operations effectively could be thought of - * as "auto-commit" style actions. - * - */ - transaction(): dojo.store.api.Store.Transaction; - } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/store/Cache.html * @@ -16768,7 +16717,7 @@ declare module dojo { * @param object The object to add to the store. * @param directives OptionalAny additional parameters needed to describe how the add should be performed. */ - add(object: Object, directives: Object): number; + add(object: Object, directives: any): number; /** * Remove the object with the given id from the underlying caching store. * @@ -16838,6 +16787,201 @@ declare module dojo { */ transaction(): dojo.store.api.Store.Transaction; } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/store/DataStore.html + * + * This is an adapter for using Dojo Data stores with an object store consumer. + * You can provide a Dojo data store and use this adapter to interact with it through + * the Dojo object store API + * + * @param options OptionalThis provides any configuration information that will be mixed into the store,including a reference to the Dojo data store under the property "store". + */ + class DataStore extends dojo.store.api.Store { + constructor(options?: Object); + /** + * The object property to use to store the identity of the store items. + * + */ + "idProperty": string; + /** + * The object store to convert to a data store + * + */ + "store": Object; + /** + * + */ + "target": string; + /** + * Creates an object, throws an error if the object already exists + * + * @param object The object to store. + * @param directives OptionalAdditional directives for creating objects. + */ + add(object: Object, directives: dojo.store.api.Store.PutDirectives): any; + /** + * Retrieves an object by it's identity. This will trigger a fetchItemByIdentity + * + * @param id OptionalThe identity to use to lookup the object + * @param options + */ + get(id: Object, options?: any): any; + /** + * Retrieves the children of an object. + * + * @param parent The object to find the children of. + * @param options OptionalAdditional options to apply to the retrieval of the children. + */ + getChildren(parent: Object, options: dojo.store.api.Store.QueryOptions): dojo.store.api.Store.QueryResults; + /** + * Fetch the identity for the given object. + * + * @param object The data object to get the identity from. + */ + getIdentity(object: Object): any; + /** + * Returns any metadata about the object. This may include attribution, + * cache directives, history, or version information. + * + * @param object The object to return metadata for. + */ + getMetadata(object: Object): Object; + /** + * Stores an object by its identity. + * + * @param object The object to store. + * @param options OptionalAdditional metadata for storing the data. Includes a reference to an idthat the object may be stored with (i.e. { id: "foo" }). + */ + put(object: Object, options: Object): void; + /** + * Queries the store for objects. + * + * @param query The query to use for retrieving objects from the store + * @param options OptionalOptional options object as used by the underlying dojo.data Store. + */ + query(query: Object, options: Object): any; + /** + * Defines the query engine to use for querying the data store + * + * @param query An object hash with fields that may match fields of items in the store.Values in the hash will be compared by normal == operator, but regular expressionsor any object that provides a test() method are also supported and can beused to match strings by more complex expressions(and then the regex's or object's test() method will be used to match values). + * @param options OptionalAn object that contains optional information such as sort, start, and count. + */ + queryEngine(query: Object, options: dojo.store.api.Store.QueryOptions): any; + /** + * Deletes an object by its identity. + * + * @param id The identity to use to delete the object + */ + remove(id: Object): void; + /** + * Starts a new transaction. + * Note that a store user might not call transaction() prior to using put, + * delete, etc. in which case these operations effectively could be thought of + * as "auto-commit" style actions. + * + */ + transaction(): dojo.store.api.Store.Transaction; + } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/store/Memory.html + * + * This is a basic in-memory object store. It implements dojo/store/api/Store. + * + * @param options This provides any configuration information that will be mixed into the store.This should generally include the data property to provide the starting set of data. + */ + class Memory extends dojo.store.api.Store { + constructor(options: dojo.store.Memory); + /** + * The array of all the objects in the memory store + * + */ + "data": any[]; + /** + * Indicates the property to use as the identity property. The values of this + * property should be unique. + * + */ + "idProperty": string; + /** + * An index of data indices into the data array by id + * + */ + "index": Object; + /** + * Creates an object, throws an error if the object already exists + * + * @param object The object to store. + * @param options OptionalAdditional metadata for storing the data. Includes an "id"property if a specific id is to be used. + */ + add(object: Object, options: dojo.store.api.Store.PutDirectives): any; + /** + * Retrieves an object by its identity + * + * @param id The identity to use to lookup the object + */ + get(id: number): any; + /** + * Retrieves the children of an object. + * + * @param parent The object to find the children of. + * @param options OptionalAdditional options to apply to the retrieval of the children. + */ + getChildren(parent: Object, options: dojo.store.api.Store.QueryOptions): dojo.store.api.Store.QueryResults; + /** + * Returns an object's identity + * + * @param object The object to get the identity from + */ + getIdentity(object: Object): any; + /** + * Returns any metadata about the object. This may include attribution, + * cache directives, history, or version information. + * + * @param object The object to return metadata for. + */ + getMetadata(object: Object): Object; + /** + * Stores an object + * + * @param object The object to store. + * @param options OptionalAdditional metadata for storing the data. Includes an "id"property if a specific id is to be used. + */ + put(object: Object, options: dojo.store.api.Store.PutDirectives): any; + /** + * Queries the store for objects. + * + * @param query The query to use for retrieving objects from the store. + * @param options OptionalThe optional arguments to apply to the resultset. + */ + query(query: Object, options: dojo.store.api.Store.QueryOptions): any; + /** + * Defines the query engine to use for querying the data store + * + * @param query An object hash with fields that may match fields of items in the store.Values in the hash will be compared by normal == operator, but regular expressionsor any object that provides a test() method are also supported and can beused to match strings by more complex expressions(and then the regex's or object's test() method will be used to match values). + * @param options OptionalAn object that contains optional information such as sort, start, and count. + */ + queryEngine(query: Object, options: dojo.store.api.Store.QueryOptions): any; + /** + * Deletes an object by its identity + * + * @param id The identity to use to delete the object + */ + remove(id: number): any; + /** + * Sets the given data as the source for this store, and indexes it + * + * @param data An array of objects to use as the source of data. + */ + setData(data: Object[]): void; + /** + * Starts a new transaction. + * Note that a store user might not call transaction() prior to using put, + * delete, etc. in which case these operations effectively could be thought of + * as "auto-commit" style actions. + * + */ + transaction(): dojo.store.api.Store.Transaction; + } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/store/JsonRest.html * @@ -16968,106 +17112,6 @@ declare module dojo { */ transaction(): dojo.store.api.Store.Transaction; } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/store/Memory.html - * - * This is a basic in-memory object store. It implements dojo/store/api/Store. - * - * @param options This provides any configuration information that will be mixed into the store.This should generally include the data property to provide the starting set of data. - */ - class Memory extends dojo.store.api.Store { - constructor(options: dojo.store.Memory); - /** - * The array of all the objects in the memory store - * - */ - "data": any[]; - /** - * Indicates the property to use as the identity property. The values of this - * property should be unique. - * - */ - "idProperty": string; - /** - * An index of data indices into the data array by id - * - */ - "index": Object; - /** - * Creates an object, throws an error if the object already exists - * - * @param object The object to store. - * @param options OptionalAdditional metadata for storing the data. Includes an "id"property if a specific id is to be used. - */ - add(object: Object, options: dojo.store.api.Store.PutDirectives): any; - /** - * Retrieves an object by its identity - * - * @param id The identity to use to lookup the object - */ - get(id: number): any; - /** - * Retrieves the children of an object. - * - * @param parent The object to find the children of. - * @param options OptionalAdditional options to apply to the retrieval of the children. - */ - getChildren(parent: Object, options: dojo.store.api.Store.QueryOptions): dojo.store.api.Store.QueryResults; - /** - * Returns an object's identity - * - * @param object The object to get the identity from - */ - getIdentity(object: Object): any; - /** - * Returns any metadata about the object. This may include attribution, - * cache directives, history, or version information. - * - * @param object The object to return metadata for. - */ - getMetadata(object: Object): Object; - /** - * Stores an object - * - * @param object The object to store. - * @param options OptionalAdditional metadata for storing the data. Includes an "id"property if a specific id is to be used. - */ - put(object: Object, options: dojo.store.api.Store.PutDirectives): any; - /** - * Queries the store for objects. - * - * @param query The query to use for retrieving objects from the store. - * @param options OptionalThe optional arguments to apply to the resultset. - */ - query(query: Object, options: dojo.store.api.Store.QueryOptions): any; - /** - * Defines the query engine to use for querying the data store - * - * @param query An object hash with fields that may match fields of items in the store.Values in the hash will be compared by normal == operator, but regular expressionsor any object that provides a test() method are also supported and can beused to match strings by more complex expressions(and then the regex's or object's test() method will be used to match values). - * @param options OptionalAn object that contains optional information such as sort, start, and count. - */ - queryEngine(query: Object, options: dojo.store.api.Store.QueryOptions): any; - /** - * Deletes an object by its identity - * - * @param id The identity to use to delete the object - */ - remove(id: number): any; - /** - * Sets the given data as the source for this store, and indexes it - * - * @param data An array of objects to use as the source of data. - */ - setData(data: Object[]): void; - /** - * Starts a new transaction. - * Note that a store user might not call transaction() prior to using put, - * delete, etc. in which case these operations effectively could be thought of - * as "auto-commit" style actions. - * - */ - transaction(): dojo.store.api.Store.Transaction; - } module api { /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/store/api/Store.html @@ -17248,6 +17292,36 @@ declare module dojo { */ "parent": Object; } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/store/api/Store.QueryOptions.html + * + * Optional object with additional parameters for query results. + * + */ + class QueryOptions { + constructor(); + /** + * The number of how many results should be returned. + * + */ + "count": number; + /** + * A list of attributes to sort on, as well as direction + * For example: + * + * [{attribute:"price, descending: true}]. + * If the sort parameter is omitted, then the natural order of the store may be + * + * applied if there is a natural order. + * + */ + "sort": Object; + /** + * The first result to begin iteration on + * + */ + "start": number; + } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/store/api/Store.QueryResults.html * @@ -17312,36 +17386,6 @@ declare module dojo { */ then(callback: any, errorHandler: any): void; } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/store/api/Store.QueryOptions.html - * - * Optional object with additional parameters for query results. - * - */ - class QueryOptions { - constructor(); - /** - * The number of how many results should be returned. - * - */ - "count": number; - /** - * A list of attributes to sort on, as well as direction - * For example: - * - * [{attribute:"price, descending: true}]. - * If the sort parameter is omitted, then the natural order of the store may be - * - * applied if there is a natural order. - * - */ - "sort": Object; - /** - * The first result to begin iteration on - * - */ - "start": number; - } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/store/api/Store.SortInformation.html * @@ -17392,27 +17436,6 @@ declare module dojo { } module util { - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/store/util/SimpleQueryEngine.html - * - * Simple query engine that matches using filter functions, named filter - * functions or objects by name-value on a query object hash - * The SimpleQueryEngine provides a way of getting a QueryResults through - * the use of a simple object hash as a filter. The hash will be used to - * match properties on data objects with the corresponding value given. In - * other words, only exact matches will be returned. - * - * This function can be used as a template for more complex query engines; - * for example, an engine can be created that accepts an object hash that - * contains filtering functions, or a string that gets evaluated, etc. - * - * When creating a new dojo.store, simply set the store's queryEngine - * field as a reference to this function. - * - * @param query An object hash with fields that may match fields of items in the store.Values in the hash will be compared by normal == operator, but regular expressionsor any object that provides a test() method are also supported and can beused to match strings by more complex expressions(and then the regex's or object's test() method will be used to match values). - * @param options OptionalAn object that contains optional information such as sort, start, and count. - */ - interface SimpleQueryEngine{(query: Object, options?: dojo.store.api.Store.QueryOptions): void} /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/store/util/QueryResults.html * @@ -17445,6 +17468,27 @@ declare module dojo { * @param results The result set as an array, or a promise for an array. */ interface QueryResults{(results: dojo.promise.Promise): void} + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/store/util/SimpleQueryEngine.html + * + * Simple query engine that matches using filter functions, named filter + * functions or objects by name-value on a query object hash + * The SimpleQueryEngine provides a way of getting a QueryResults through + * the use of a simple object hash as a filter. The hash will be used to + * match properties on data objects with the corresponding value given. In + * other words, only exact matches will be returned. + * + * This function can be used as a template for more complex query engines; + * for example, an engine can be created that accepts an object hash that + * contains filtering functions, or a string that gets evaluated, etc. + * + * When creating a new dojo.store, simply set the store's queryEngine + * field as a reference to this function. + * + * @param query An object hash with fields that may match fields of items in the store.Values in the hash will be compared by normal == operator, but regular expressionsor any object that provides a test() method are also supported and can beused to match strings by more complex expressions(and then the regex's or object's test() method will be used to match values). + * @param options OptionalAn object that contains optional information such as sort, start, and count. + */ + interface SimpleQueryEngine{(query: Object, options?: dojo.store.api.Store.QueryOptions): void} } } @@ -18038,7 +18082,7 @@ declare module dojo { * module for specifics. * */ - interface router { + interface router extends dojo.router.RouterBase { } module router { /** @@ -18080,7 +18124,7 @@ declare module dojo { * @param path * @param replace */ - go(path: any, replace: any): any; + go(path: string, replace?: boolean): any; /** * Registers a route to a handling callback * Given either a string or a regular expression, the router @@ -18172,6 +18216,59 @@ declare module dojo { } } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/aspect.html + * + * provides aspect oriented programming functionality, allowing for + * one to add before, around, or after advice on existing methods. + * + */ + interface aspect { + /** + * The "after" export of the aspect module is a function that can be used to attach + * "after" advice to a method. This function will be executed after the original method + * is executed. By default the function will be called with a single argument, the return + * value of the original method, or the the return value of the last executed advice (if a previous one exists). + * The fourth (optional) argument can be set to true to so the function receives the original + * arguments (from when the original method was called) rather than the return value. + * If there are multiple "after" advisors, they are executed in the order they were registered. + * + * @param target This is the target object + * @param methodName This is the name of the method to attach to. + * @param advice This is function to be called after the original method + * @param receiveArguments OptionalIf this is set to true, the advice function receives the original arguments (from when the original mehtodwas called) rather than the return value of the original/previous method. + */ + after(target: Object, methodName: String, advice: Function, receiveArguments: boolean): any; + /** + * The "around" export of the aspect module is a function that can be used to attach + * "around" advice to a method. The advisor function is immediately executed when + * the around() is called, is passed a single argument that is a function that can be + * called to continue execution of the original method (or the next around advisor). + * The advisor function should return a function, and this function will be called whenever + * the method is called. It will be called with the arguments used to call the method. + * Whatever this function returns will be returned as the result of the method call (unless after advise changes it). + * + * @param target This is the target object + * @param methodName This is the name of the method to attach to. + * @param advice This is function to be called around the original method + */ + around(target: Object, methodName: String, advice: Function): void; + /** + * The "before" export of the aspect module is a function that can be used to attach + * "before" advice to a method. This function will be executed before the original method + * is executed. This function will be called with the arguments used to call the method. + * This function may optionally return an array as the new arguments to use to call + * the original method (or the previous, next-to-execute before advice, if one exists). + * If the before method doesn't return anything (returns undefined) the original arguments + * will be preserved. + * If there are multiple "before" advisors, they are executed in the reverse order they were registered. + * + * @param target This is the target object + * @param methodName This is the name of the method to attach to. + * @param advice This is function to be called before the original method + */ + before(target: Object, methodName: String, advice: Function): void; + } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/back.html * @@ -18278,67 +18375,14 @@ declare module dojo { * * * - * + * */ init(): void; } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/aspect.html - * - * provides aspect oriented programming functionality, allowing for - * one to add before, around, or after advice on existing methods. - * - */ - interface aspect { - /** - * The "after" export of the aspect module is a function that can be used to attach - * "after" advice to a method. This function will be executed after the original method - * is executed. By default the function will be called with a single argument, the return - * value of the original method, or the the return value of the last executed advice (if a previous one exists). - * The fourth (optional) argument can be set to true to so the function receives the original - * arguments (from when the original method was called) rather than the return value. - * If there are multiple "after" advisors, they are executed in the order they were registered. - * - * @param target This is the target object - * @param methodName This is the name of the method to attach to. - * @param advice This is function to be called after the original method - * @param receiveArguments OptionalIf this is set to true, the advice function receives the original arguments (from when the original mehtodwas called) rather than the return value of the original/previous method. - */ - after(target: Object, methodName: String, advice: Function, receiveArguments: boolean): any; - /** - * The "around" export of the aspect module is a function that can be used to attach - * "around" advice to a method. The advisor function is immediately executed when - * the around() is called, is passed a single argument that is a function that can be - * called to continue execution of the original method (or the next around advisor). - * The advisor function should return a function, and this function will be called whenever - * the method is called. It will be called with the arguments used to call the method. - * Whatever this function returns will be returned as the result of the method call (unless after advise changes it). - * - * @param target This is the target object - * @param methodName This is the name of the method to attach to. - * @param advice This is function to be called around the original method - */ - around(target: Object, methodName: String, advice: Function): void; - /** - * The "before" export of the aspect module is a function that can be used to attach - * "before" advice to a method. This function will be executed before the original method - * is executed. This function will be called with the arguments used to call the method. - * This function may optionally return an array as the new arguments to use to call - * the original method (or the previous, next-to-execute before advice, if one exists). - * If the before method doesn't return anything (returns undefined) the original arguments - * will be preserved. - * If there are multiple "before" advisors, they are executed in the reverse order they were registered. - * - * @param target This is the target object - * @param methodName This is the name of the method to attach to. - * @param advice This is function to be called before the original method - */ - before(target: Object, methodName: String, advice: Function): void; - } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/colors.html * - * Color utilities, extending Base dojo._base.Color + * Color utilities, extending Base dojo.Color * */ interface colors { @@ -18509,7 +18553,7 @@ declare module dojo { * @param id A string to match an HTML id attribute or a reference to a DOM Node * @param doc OptionalDocument to work in. Defaults to the current value ofdojo/_base/window.doc. Can be used to retrievenode references from other documents. */ - byId(id: String, doc: HTMLDocument): any; + byId(id: String, doc?: HTMLDocument): any; /** * Returns DOM node with matching id attribute or falsy value (ex: null or undefined) * if not found. If id is a DomNode, this function is a no-op. @@ -18517,7 +18561,7 @@ declare module dojo { * @param id A string to match an HTML id attribute or a reference to a DOM Node * @param doc OptionalDocument to work in. Defaults to the current value ofdojo/_base/window.doc. Can be used to retrievenode references from other documents. */ - byId(id: HTMLElement, doc: HTMLDocument): any; + byId(id: HTMLElement, doc?: HTMLDocument): any; /** * Returns true if node is a descendant of ancestor * @@ -18553,276 +18597,6 @@ declare module dojo { */ setSelectable(node: any, selectable: any): void; } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/dom-construct.html - * - * - */ - interface dom_construct { - /** - * Create an element, allowing for optional attribute decoration - * and placement. - * A DOM Element creation function. A shorthand method for creating a node or - * a fragment, and allowing for a convenient optional attribute setting step, - * as well as an optional DOM placement reference. - * - * Attributes are set by passing the optional object through dojo.setAttr. - * See dojo.setAttr for noted caveats and nuances, and API if applicable. - * - * Placement is done via dojo.place, assuming the new node to be the action - * node, passing along the optional reference node and position. - * - * @param tag A string of the element to create (eg: "div", "a", "p", "li", "script", "br"),or an existing DOM node to process. - * @param attrs An object-hash of attributes to set on the newly created node.Can be null, if you don't want to set any attributes/styles.See: dojo.setAttr for a description of available attributes. - * @param refNode OptionalOptional reference node. Used by dojo.place to place the newly creatednode somewhere in the dom relative to refNode. Can be a DomNode referenceor String ID of a node. - * @param pos OptionalOptional positional reference. Defaults to "last" by way of dojo.place,though can be set to "first","after","before","last", "replace" or "only"to further control the placement of the new node relative to the refNode.'refNode' is required if a 'pos' is specified. - */ - create(tag: HTMLElement, attrs: Object, refNode: HTMLElement, pos: String): any; - /** - * Create an element, allowing for optional attribute decoration - * and placement. - * A DOM Element creation function. A shorthand method for creating a node or - * a fragment, and allowing for a convenient optional attribute setting step, - * as well as an optional DOM placement reference. - * - * Attributes are set by passing the optional object through dojo.setAttr. - * See dojo.setAttr for noted caveats and nuances, and API if applicable. - * - * Placement is done via dojo.place, assuming the new node to be the action - * node, passing along the optional reference node and position. - * - * @param tag A string of the element to create (eg: "div", "a", "p", "li", "script", "br"),or an existing DOM node to process. - * @param attrs An object-hash of attributes to set on the newly created node.Can be null, if you don't want to set any attributes/styles.See: dojo.setAttr for a description of available attributes. - * @param refNode OptionalOptional reference node. Used by dojo.place to place the newly creatednode somewhere in the dom relative to refNode. Can be a DomNode referenceor String ID of a node. - * @param pos OptionalOptional positional reference. Defaults to "last" by way of dojo.place,though can be set to "first","after","before","last", "replace" or "only"to further control the placement of the new node relative to the refNode.'refNode' is required if a 'pos' is specified. - */ - create(tag: String, attrs: Object, refNode: HTMLElement, pos: String): any; - /** - * Create an element, allowing for optional attribute decoration - * and placement. - * A DOM Element creation function. A shorthand method for creating a node or - * a fragment, and allowing for a convenient optional attribute setting step, - * as well as an optional DOM placement reference. - * - * Attributes are set by passing the optional object through dojo.setAttr. - * See dojo.setAttr for noted caveats and nuances, and API if applicable. - * - * Placement is done via dojo.place, assuming the new node to be the action - * node, passing along the optional reference node and position. - * - * @param tag A string of the element to create (eg: "div", "a", "p", "li", "script", "br"),or an existing DOM node to process. - * @param attrs An object-hash of attributes to set on the newly created node.Can be null, if you don't want to set any attributes/styles.See: dojo.setAttr for a description of available attributes. - * @param refNode OptionalOptional reference node. Used by dojo.place to place the newly creatednode somewhere in the dom relative to refNode. Can be a DomNode referenceor String ID of a node. - * @param pos OptionalOptional positional reference. Defaults to "last" by way of dojo.place,though can be set to "first","after","before","last", "replace" or "only"to further control the placement of the new node relative to the refNode.'refNode' is required if a 'pos' is specified. - */ - create(tag: HTMLElement, attrs: Object, refNode: String, pos: String): any; - /** - * Create an element, allowing for optional attribute decoration - * and placement. - * A DOM Element creation function. A shorthand method for creating a node or - * a fragment, and allowing for a convenient optional attribute setting step, - * as well as an optional DOM placement reference. - * - * Attributes are set by passing the optional object through dojo.setAttr. - * See dojo.setAttr for noted caveats and nuances, and API if applicable. - * - * Placement is done via dojo.place, assuming the new node to be the action - * node, passing along the optional reference node and position. - * - * @param tag A string of the element to create (eg: "div", "a", "p", "li", "script", "br"),or an existing DOM node to process. - * @param attrs An object-hash of attributes to set on the newly created node.Can be null, if you don't want to set any attributes/styles.See: dojo.setAttr for a description of available attributes. - * @param refNode OptionalOptional reference node. Used by dojo.place to place the newly creatednode somewhere in the dom relative to refNode. Can be a DomNode referenceor String ID of a node. - * @param pos OptionalOptional positional reference. Defaults to "last" by way of dojo.place,though can be set to "first","after","before","last", "replace" or "only"to further control the placement of the new node relative to the refNode.'refNode' is required if a 'pos' is specified. - */ - create(tag: String, attrs: Object, refNode: String, pos: String): any; - /** - * Removes a node from its parent, clobbering it and all of its - * children. - * Removes a node from its parent, clobbering it and all of its - * children. Function only works with DomNodes, and returns nothing. - * - * @param node A String ID or DomNode reference of the element to be destroyed - */ - destroy(node: HTMLElement): void; - /** - * Removes a node from its parent, clobbering it and all of its - * children. - * Removes a node from its parent, clobbering it and all of its - * children. Function only works with DomNodes, and returns nothing. - * - * @param node A String ID or DomNode reference of the element to be destroyed - */ - destroy(node: String): void; - /** - * safely removes all children of the node. - * - * @param node a reference to a DOM node or an id. - */ - empty(node: HTMLElement): void; - /** - * safely removes all children of the node. - * - * @param node a reference to a DOM node or an id. - */ - empty(node: String): void; - /** - * Attempt to insert node into the DOM, choosing from various positioning options. - * Returns the first argument resolved to a DOM node. - * - * @param node id or node reference, or HTML fragment starting with "<" to place relative to refNode - * @param refNode id or node reference to use as basis for placement - * @param position Optionalstring noting the position of node relative to refNode or anumber indicating the location in the childNodes collection of refNode.Accepted string values are:beforeafterreplaceonlyfirstlast"first" and "last" indicate positions as children of refNode, "replace" replaces refNode,"only" replaces all children. position defaults to "last" if not specified - */ - place(node: HTMLElement, refNode: HTMLElement, position: String): HTMLElement; - /** - * Attempt to insert node into the DOM, choosing from various positioning options. - * Returns the first argument resolved to a DOM node. - * - * @param node id or node reference, or HTML fragment starting with "<" to place relative to refNode - * @param refNode id or node reference to use as basis for placement - * @param position Optionalstring noting the position of node relative to refNode or anumber indicating the location in the childNodes collection of refNode.Accepted string values are:beforeafterreplaceonlyfirstlast"first" and "last" indicate positions as children of refNode, "replace" replaces refNode,"only" replaces all children. position defaults to "last" if not specified - */ - place(node: String, refNode: HTMLElement, position: String): HTMLElement; - /** - * Attempt to insert node into the DOM, choosing from various positioning options. - * Returns the first argument resolved to a DOM node. - * - * @param node id or node reference, or HTML fragment starting with "<" to place relative to refNode - * @param refNode id or node reference to use as basis for placement - * @param position Optionalstring noting the position of node relative to refNode or anumber indicating the location in the childNodes collection of refNode.Accepted string values are:beforeafterreplaceonlyfirstlast"first" and "last" indicate positions as children of refNode, "replace" replaces refNode,"only" replaces all children. position defaults to "last" if not specified - */ - place(node: HTMLElement, refNode: String, position: String): HTMLElement; - /** - * Attempt to insert node into the DOM, choosing from various positioning options. - * Returns the first argument resolved to a DOM node. - * - * @param node id or node reference, or HTML fragment starting with "<" to place relative to refNode - * @param refNode id or node reference to use as basis for placement - * @param position Optionalstring noting the position of node relative to refNode or anumber indicating the location in the childNodes collection of refNode.Accepted string values are:beforeafterreplaceonlyfirstlast"first" and "last" indicate positions as children of refNode, "replace" replaces refNode,"only" replaces all children. position defaults to "last" if not specified - */ - place(node: String, refNode: String, position: String): HTMLElement; - /** - * Attempt to insert node into the DOM, choosing from various positioning options. - * Returns the first argument resolved to a DOM node. - * - * @param node id or node reference, or HTML fragment starting with "<" to place relative to refNode - * @param refNode id or node reference to use as basis for placement - * @param position Optionalstring noting the position of node relative to refNode or anumber indicating the location in the childNodes collection of refNode.Accepted string values are:beforeafterreplaceonlyfirstlast"first" and "last" indicate positions as children of refNode, "replace" replaces refNode,"only" replaces all children. position defaults to "last" if not specified - */ - place(node: HTMLElement, refNode: HTMLElement, position: number): HTMLElement; - /** - * Attempt to insert node into the DOM, choosing from various positioning options. - * Returns the first argument resolved to a DOM node. - * - * @param node id or node reference, or HTML fragment starting with "<" to place relative to refNode - * @param refNode id or node reference to use as basis for placement - * @param position Optionalstring noting the position of node relative to refNode or anumber indicating the location in the childNodes collection of refNode.Accepted string values are:beforeafterreplaceonlyfirstlast"first" and "last" indicate positions as children of refNode, "replace" replaces refNode,"only" replaces all children. position defaults to "last" if not specified - */ - place(node: String, refNode: HTMLElement, position: number): HTMLElement; - /** - * Attempt to insert node into the DOM, choosing from various positioning options. - * Returns the first argument resolved to a DOM node. - * - * @param node id or node reference, or HTML fragment starting with "<" to place relative to refNode - * @param refNode id or node reference to use as basis for placement - * @param position Optionalstring noting the position of node relative to refNode or anumber indicating the location in the childNodes collection of refNode.Accepted string values are:beforeafterreplaceonlyfirstlast"first" and "last" indicate positions as children of refNode, "replace" replaces refNode,"only" replaces all children. position defaults to "last" if not specified - */ - place(node: HTMLElement, refNode: String, position: number): HTMLElement; - /** - * Attempt to insert node into the DOM, choosing from various positioning options. - * Returns the first argument resolved to a DOM node. - * - * @param node id or node reference, or HTML fragment starting with "<" to place relative to refNode - * @param refNode id or node reference to use as basis for placement - * @param position Optionalstring noting the position of node relative to refNode or anumber indicating the location in the childNodes collection of refNode.Accepted string values are:beforeafterreplaceonlyfirstlast"first" and "last" indicate positions as children of refNode, "replace" replaces refNode,"only" replaces all children. position defaults to "last" if not specified - */ - place(node: String, refNode: String, position: number): HTMLElement; - /** - * instantiates an HTML fragment returning the corresponding DOM. - * - * @param frag the HTML fragment - * @param doc Optionaloptional document to use when creating DOM nodes, defaults todojo/_base/window.doc if not specified. - */ - toDom(frag: String, doc: HTMLDocument): any; - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/dom-form.html - * - * This module defines form-processing functions. - * - */ - interface dom_form { - /** - * Serialize a form field to a JavaScript object. - * Returns the value encoded in a form field as - * as a string or an array of strings. Disabled form elements - * and unchecked radio and checkboxes are skipped. Multi-select - * elements are returned as an array of string values. - * - * @param inputNode - */ - fieldToObject(inputNode: HTMLElement): Object; - /** - * Serialize a form field to a JavaScript object. - * Returns the value encoded in a form field as - * as a string or an array of strings. Disabled form elements - * and unchecked radio and checkboxes are skipped. Multi-select - * elements are returned as an array of string values. - * - * @param inputNode - */ - fieldToObject(inputNode: String): Object; - /** - * Create a serialized JSON string from a form node or string - * ID identifying the form to serialize - * - * @param formNode - * @param prettyPrint Optional - */ - toJson(formNode: HTMLElement, prettyPrint: boolean): String; - /** - * Create a serialized JSON string from a form node or string - * ID identifying the form to serialize - * - * @param formNode - * @param prettyPrint Optional - */ - toJson(formNode: String, prettyPrint: boolean): String; - /** - * Serialize a form node to a JavaScript object. - * Returns the values encoded in an HTML form as - * string properties in an object which it then returns. Disabled form - * elements, buttons, and other non-value form elements are skipped. - * Multi-select elements are returned as an array of string values. - * - * @param formNode - */ - toObject(formNode: HTMLElement): Object; - /** - * Serialize a form node to a JavaScript object. - * Returns the values encoded in an HTML form as - * string properties in an object which it then returns. Disabled form - * elements, buttons, and other non-value form elements are skipped. - * Multi-select elements are returned as an array of string values. - * - * @param formNode - */ - toObject(formNode: String): Object; - /** - * Returns a URL-encoded string representing the form passed as either a - * node or string ID identifying the form to serialize - * - * @param formNode - */ - toQuery(formNode: HTMLElement): String; - /** - * Returns a URL-encoded string representing the form passed as either a - * node or string ID identifying the form to serialize - * - * @param formNode - */ - toQuery(formNode: String): String; - } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/dom-attr.html * @@ -18966,151 +18740,6 @@ declare module dojo { */ set(node: String, name: Object, value: String): any; } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/dom-prop.html - * - * - */ - interface dom_prop { - /** - * - */ - names: Object; - /** - * Gets a property on an HTML element. - * Handles normalized getting of properties on DOM nodes. - * - * @param node id or reference to the element to get the property on - * @param name the name of the property to get. - */ - get(node: HTMLElement, name: String): any; - /** - * Gets a property on an HTML element. - * Handles normalized getting of properties on DOM nodes. - * - * @param node id or reference to the element to get the property on - * @param name the name of the property to get. - */ - get(node: String, name: String): any; - /** - * Sets a property on an HTML element. - * Handles normalized setting of properties on DOM nodes. - * - * When passing functions as values, note that they will not be - * directly assigned to slots on the node, but rather the default - * behavior will be removed and the new behavior will be added - * using dojo.connect(), meaning that event handler properties - * will be normalized and that some caveats with regards to - * non-standard behaviors for onsubmit apply. Namely that you - * should cancel form submission using dojo.stopEvent() on the - * passed event object instead of returning a boolean value from - * the handler itself. - * - * @param node id or reference to the element to set the property on - * @param name the name of the property to set, or a hash object to setmultiple properties at once. - * @param value OptionalThe value to set for the property - */ - set(node: HTMLElement, name: String, value: String): any; - /** - * Sets a property on an HTML element. - * Handles normalized setting of properties on DOM nodes. - * - * When passing functions as values, note that they will not be - * directly assigned to slots on the node, but rather the default - * behavior will be removed and the new behavior will be added - * using dojo.connect(), meaning that event handler properties - * will be normalized and that some caveats with regards to - * non-standard behaviors for onsubmit apply. Namely that you - * should cancel form submission using dojo.stopEvent() on the - * passed event object instead of returning a boolean value from - * the handler itself. - * - * @param node id or reference to the element to set the property on - * @param name the name of the property to set, or a hash object to setmultiple properties at once. - * @param value OptionalThe value to set for the property - */ - set(node: String, name: String, value: String): any; - /** - * Sets a property on an HTML element. - * Handles normalized setting of properties on DOM nodes. - * - * When passing functions as values, note that they will not be - * directly assigned to slots on the node, but rather the default - * behavior will be removed and the new behavior will be added - * using dojo.connect(), meaning that event handler properties - * will be normalized and that some caveats with regards to - * non-standard behaviors for onsubmit apply. Namely that you - * should cancel form submission using dojo.stopEvent() on the - * passed event object instead of returning a boolean value from - * the handler itself. - * - * @param node id or reference to the element to set the property on - * @param name the name of the property to set, or a hash object to setmultiple properties at once. - * @param value OptionalThe value to set for the property - */ - set(node: HTMLElement, name: Object, value: String): any; - /** - * Sets a property on an HTML element. - * Handles normalized setting of properties on DOM nodes. - * - * When passing functions as values, note that they will not be - * directly assigned to slots on the node, but rather the default - * behavior will be removed and the new behavior will be added - * using dojo.connect(), meaning that event handler properties - * will be normalized and that some caveats with regards to - * non-standard behaviors for onsubmit apply. Namely that you - * should cancel form submission using dojo.stopEvent() on the - * passed event object instead of returning a boolean value from - * the handler itself. - * - * @param node id or reference to the element to set the property on - * @param name the name of the property to set, or a hash object to setmultiple properties at once. - * @param value OptionalThe value to set for the property - */ - set(node: String, name: Object, value: String): any; - } - module dom_prop { - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/dom-prop.names.html - * - * - */ - interface names { - /** - * - */ - class: string; - /** - * - */ - colspan: string; - /** - * - */ - for: string; - /** - * - */ - frameborder: string; - /** - * - */ - readonly: string; - /** - * - */ - rowspan: string; - /** - * - */ - tabindex: string; - /** - * - */ - valuetype: string; - } - } - /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/dom-class.html * @@ -19311,6 +18940,421 @@ declare module dojo { */ toggle(node: HTMLElement, classStr: any[], condition: boolean): boolean; } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/dom-form.html + * + * This module defines form-processing functions. + * + */ + interface dom_form { + /** + * Serialize a form field to a JavaScript object. + * Returns the value encoded in a form field as + * as a string or an array of strings. Disabled form elements + * and unchecked radio and checkboxes are skipped. Multi-select + * elements are returned as an array of string values. + * + * @param inputNode + */ + fieldToObject(inputNode: HTMLElement): Object; + /** + * Serialize a form field to a JavaScript object. + * Returns the value encoded in a form field as + * as a string or an array of strings. Disabled form elements + * and unchecked radio and checkboxes are skipped. Multi-select + * elements are returned as an array of string values. + * + * @param inputNode + */ + fieldToObject(inputNode: String): Object; + /** + * Create a serialized JSON string from a form node or string + * ID identifying the form to serialize + * + * @param formNode + * @param prettyPrint Optional + */ + toJson(formNode: HTMLElement, prettyPrint: boolean): String; + /** + * Create a serialized JSON string from a form node or string + * ID identifying the form to serialize + * + * @param formNode + * @param prettyPrint Optional + */ + toJson(formNode: String, prettyPrint: boolean): String; + /** + * Serialize a form node to a JavaScript object. + * Returns the values encoded in an HTML form as + * string properties in an object which it then returns. Disabled form + * elements, buttons, and other non-value form elements are skipped. + * Multi-select elements are returned as an array of string values. + * + * @param formNode + */ + toObject(formNode: HTMLElement): Object; + /** + * Serialize a form node to a JavaScript object. + * Returns the values encoded in an HTML form as + * string properties in an object which it then returns. Disabled form + * elements, buttons, and other non-value form elements are skipped. + * Multi-select elements are returned as an array of string values. + * + * @param formNode + */ + toObject(formNode: String): Object; + /** + * Returns a URL-encoded string representing the form passed as either a + * node or string ID identifying the form to serialize + * + * @param formNode + */ + toQuery(formNode: HTMLElement): String; + /** + * Returns a URL-encoded string representing the form passed as either a + * node or string ID identifying the form to serialize + * + * @param formNode + */ + toQuery(formNode: String): String; + } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/dom-construct.html + * + * + */ + interface dom_construct { + /** + * Create an element, allowing for optional attribute decoration + * and placement. + * A DOM Element creation function. A shorthand method for creating a node or + * a fragment, and allowing for a convenient optional attribute setting step, + * as well as an optional DOM placement reference. + * + * Attributes are set by passing the optional object through dojo.setAttr. + * See dojo.setAttr for noted caveats and nuances, and API if applicable. + * + * Placement is done via dojo.place, assuming the new node to be the action + * node, passing along the optional reference node and position. + * + * @param tag A string of the element to create (eg: "div", "a", "p", "li", "script", "br"),or an existing DOM node to process. + * @param attrs An object-hash of attributes to set on the newly created node.Can be null, if you don't want to set any attributes/styles.See: dojo.setAttr for a description of available attributes. + * @param refNode OptionalOptional reference node. Used by dojo.place to place the newly creatednode somewhere in the dom relative to refNode. Can be a DomNode referenceor String ID of a node. + * @param pos OptionalOptional positional reference. Defaults to "last" by way of dojo.place,though can be set to "first","after","before","last", "replace" or "only"to further control the placement of the new node relative to the refNode.'refNode' is required if a 'pos' is specified. + */ + create(tag: HTMLElement, attrs: Object, refNode: HTMLElement, pos: String): any; + /** + * Create an element, allowing for optional attribute decoration + * and placement. + * A DOM Element creation function. A shorthand method for creating a node or + * a fragment, and allowing for a convenient optional attribute setting step, + * as well as an optional DOM placement reference. + * + * Attributes are set by passing the optional object through dojo.setAttr. + * See dojo.setAttr for noted caveats and nuances, and API if applicable. + * + * Placement is done via dojo.place, assuming the new node to be the action + * node, passing along the optional reference node and position. + * + * @param tag A string of the element to create (eg: "div", "a", "p", "li", "script", "br"),or an existing DOM node to process. + * @param attrs An object-hash of attributes to set on the newly created node.Can be null, if you don't want to set any attributes/styles.See: dojo.setAttr for a description of available attributes. + * @param refNode OptionalOptional reference node. Used by dojo.place to place the newly creatednode somewhere in the dom relative to refNode. Can be a DomNode referenceor String ID of a node. + * @param pos OptionalOptional positional reference. Defaults to "last" by way of dojo.place,though can be set to "first","after","before","last", "replace" or "only"to further control the placement of the new node relative to the refNode.'refNode' is required if a 'pos' is specified. + */ + create(tag: String, attrs: Object, refNode: HTMLElement, pos: String): any; + /** + * Create an element, allowing for optional attribute decoration + * and placement. + * A DOM Element creation function. A shorthand method for creating a node or + * a fragment, and allowing for a convenient optional attribute setting step, + * as well as an optional DOM placement reference. + * + * Attributes are set by passing the optional object through dojo.setAttr. + * See dojo.setAttr for noted caveats and nuances, and API if applicable. + * + * Placement is done via dojo.place, assuming the new node to be the action + * node, passing along the optional reference node and position. + * + * @param tag A string of the element to create (eg: "div", "a", "p", "li", "script", "br"),or an existing DOM node to process. + * @param attrs An object-hash of attributes to set on the newly created node.Can be null, if you don't want to set any attributes/styles.See: dojo.setAttr for a description of available attributes. + * @param refNode OptionalOptional reference node. Used by dojo.place to place the newly creatednode somewhere in the dom relative to refNode. Can be a DomNode referenceor String ID of a node. + * @param pos OptionalOptional positional reference. Defaults to "last" by way of dojo.place,though can be set to "first","after","before","last", "replace" or "only"to further control the placement of the new node relative to the refNode.'refNode' is required if a 'pos' is specified. + */ + create(tag: HTMLElement, attrs: Object, refNode: String, pos: String): any; + /** + * Create an element, allowing for optional attribute decoration + * and placement. + * A DOM Element creation function. A shorthand method for creating a node or + * a fragment, and allowing for a convenient optional attribute setting step, + * as well as an optional DOM placement reference. + * + * Attributes are set by passing the optional object through dojo.setAttr. + * See dojo.setAttr for noted caveats and nuances, and API if applicable. + * + * Placement is done via dojo.place, assuming the new node to be the action + * node, passing along the optional reference node and position. + * + * @param tag A string of the element to create (eg: "div", "a", "p", "li", "script", "br"),or an existing DOM node to process. + * @param attrs An object-hash of attributes to set on the newly created node.Can be null, if you don't want to set any attributes/styles.See: dojo.setAttr for a description of available attributes. + * @param refNode OptionalOptional reference node. Used by dojo.place to place the newly creatednode somewhere in the dom relative to refNode. Can be a DomNode referenceor String ID of a node. + * @param pos OptionalOptional positional reference. Defaults to "last" by way of dojo.place,though can be set to "first","after","before","last", "replace" or "only"to further control the placement of the new node relative to the refNode.'refNode' is required if a 'pos' is specified. + */ + create(tag: String, attrs: Object, refNode: String, pos: String): any; + /** + * Removes a node from its parent, clobbering it and all of its + * children. + * Removes a node from its parent, clobbering it and all of its + * children. Function only works with DomNodes, and returns nothing. + * + * @param node A String ID or DomNode reference of the element to be destroyed + */ + destroy(node: HTMLElement): void; + /** + * Removes a node from its parent, clobbering it and all of its + * children. + * Removes a node from its parent, clobbering it and all of its + * children. Function only works with DomNodes, and returns nothing. + * + * @param node A String ID or DomNode reference of the element to be destroyed + */ + destroy(node: String): void; + /** + * safely removes all children of the node. + * + * @param node a reference to a DOM node or an id. + */ + empty(node: HTMLElement): void; + /** + * safely removes all children of the node. + * + * @param node a reference to a DOM node or an id. + */ + empty(node: String): void; + /** + * Attempt to insert node into the DOM, choosing from various positioning options. + * Returns the first argument resolved to a DOM node. + * + * @param node id or node reference, or HTML fragment starting with "<" to place relative to refNode + * @param refNode id or node reference to use as basis for placement + * @param position Optionalstring noting the position of node relative to refNode or anumber indicating the location in the childNodes collection of refNode.Accepted string values are:beforeafterreplaceonlyfirstlast"first" and "last" indicate positions as children of refNode, "replace" replaces refNode,"only" replaces all children. position defaults to "last" if not specified + */ + place(node: HTMLElement, refNode: HTMLElement, position: String): HTMLElement; + /** + * Attempt to insert node into the DOM, choosing from various positioning options. + * Returns the first argument resolved to a DOM node. + * + * @param node id or node reference, or HTML fragment starting with "<" to place relative to refNode + * @param refNode id or node reference to use as basis for placement + * @param position Optionalstring noting the position of node relative to refNode or anumber indicating the location in the childNodes collection of refNode.Accepted string values are:beforeafterreplaceonlyfirstlast"first" and "last" indicate positions as children of refNode, "replace" replaces refNode,"only" replaces all children. position defaults to "last" if not specified + */ + place(node: String, refNode: HTMLElement, position: String): HTMLElement; + /** + * Attempt to insert node into the DOM, choosing from various positioning options. + * Returns the first argument resolved to a DOM node. + * + * @param node id or node reference, or HTML fragment starting with "<" to place relative to refNode + * @param refNode id or node reference to use as basis for placement + * @param position Optionalstring noting the position of node relative to refNode or anumber indicating the location in the childNodes collection of refNode.Accepted string values are:beforeafterreplaceonlyfirstlast"first" and "last" indicate positions as children of refNode, "replace" replaces refNode,"only" replaces all children. position defaults to "last" if not specified + */ + place(node: HTMLElement, refNode: String, position: String): HTMLElement; + /** + * Attempt to insert node into the DOM, choosing from various positioning options. + * Returns the first argument resolved to a DOM node. + * + * @param node id or node reference, or HTML fragment starting with "<" to place relative to refNode + * @param refNode id or node reference to use as basis for placement + * @param position Optionalstring noting the position of node relative to refNode or anumber indicating the location in the childNodes collection of refNode.Accepted string values are:beforeafterreplaceonlyfirstlast"first" and "last" indicate positions as children of refNode, "replace" replaces refNode,"only" replaces all children. position defaults to "last" if not specified + */ + place(node: String, refNode: String, position: String): HTMLElement; + /** + * Attempt to insert node into the DOM, choosing from various positioning options. + * Returns the first argument resolved to a DOM node. + * + * @param node id or node reference, or HTML fragment starting with "<" to place relative to refNode + * @param refNode id or node reference to use as basis for placement + * @param position Optionalstring noting the position of node relative to refNode or anumber indicating the location in the childNodes collection of refNode.Accepted string values are:beforeafterreplaceonlyfirstlast"first" and "last" indicate positions as children of refNode, "replace" replaces refNode,"only" replaces all children. position defaults to "last" if not specified + */ + place(node: HTMLElement, refNode: HTMLElement, position: number): HTMLElement; + /** + * Attempt to insert node into the DOM, choosing from various positioning options. + * Returns the first argument resolved to a DOM node. + * + * @param node id or node reference, or HTML fragment starting with "<" to place relative to refNode + * @param refNode id or node reference to use as basis for placement + * @param position Optionalstring noting the position of node relative to refNode or anumber indicating the location in the childNodes collection of refNode.Accepted string values are:beforeafterreplaceonlyfirstlast"first" and "last" indicate positions as children of refNode, "replace" replaces refNode,"only" replaces all children. position defaults to "last" if not specified + */ + place(node: String, refNode: HTMLElement, position: number): HTMLElement; + /** + * Attempt to insert node into the DOM, choosing from various positioning options. + * Returns the first argument resolved to a DOM node. + * + * @param node id or node reference, or HTML fragment starting with "<" to place relative to refNode + * @param refNode id or node reference to use as basis for placement + * @param position Optionalstring noting the position of node relative to refNode or anumber indicating the location in the childNodes collection of refNode.Accepted string values are:beforeafterreplaceonlyfirstlast"first" and "last" indicate positions as children of refNode, "replace" replaces refNode,"only" replaces all children. position defaults to "last" if not specified + */ + place(node: HTMLElement, refNode: String, position: number): HTMLElement; + /** + * Attempt to insert node into the DOM, choosing from various positioning options. + * Returns the first argument resolved to a DOM node. + * + * @param node id or node reference, or HTML fragment starting with "<" to place relative to refNode + * @param refNode id or node reference to use as basis for placement + * @param position Optionalstring noting the position of node relative to refNode or anumber indicating the location in the childNodes collection of refNode.Accepted string values are:beforeafterreplaceonlyfirstlast"first" and "last" indicate positions as children of refNode, "replace" replaces refNode,"only" replaces all children. position defaults to "last" if not specified + */ + place(node: String, refNode: String, position: number): HTMLElement; + /** + * instantiates an HTML fragment returning the corresponding DOM. + * + * @param frag the HTML fragment + * @param doc Optionaloptional document to use when creating DOM nodes, defaults todojo/_base/window.doc if not specified. + */ + toDom(frag: String, doc: HTMLDocument): any; + } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/dom-prop.html + * + * + */ + interface dom_prop { + /** + * + */ + names: Object; + /** + * Gets a property on an HTML element. + * Handles normalized getting of properties on DOM nodes. + * + * @param node id or reference to the element to get the property on + * @param name the name of the property to get. + */ + get(node: HTMLElement, name: String): any; + /** + * Gets a property on an HTML element. + * Handles normalized getting of properties on DOM nodes. + * + * @param node id or reference to the element to get the property on + * @param name the name of the property to get. + */ + get(node: String, name: String): any; + /** + * Sets a property on an HTML element. + * Handles normalized setting of properties on DOM nodes. + * + * When passing functions as values, note that they will not be + * directly assigned to slots on the node, but rather the default + * behavior will be removed and the new behavior will be added + * using dojo.connect(), meaning that event handler properties + * will be normalized and that some caveats with regards to + * non-standard behaviors for onsubmit apply. Namely that you + * should cancel form submission using dojo.stopEvent() on the + * passed event object instead of returning a boolean value from + * the handler itself. + * + * @param node id or reference to the element to set the property on + * @param name the name of the property to set, or a hash object to setmultiple properties at once. + * @param value OptionalThe value to set for the property + */ + set(node: HTMLElement, name: String, value: String): any; + /** + * Sets a property on an HTML element. + * Handles normalized setting of properties on DOM nodes. + * + * When passing functions as values, note that they will not be + * directly assigned to slots on the node, but rather the default + * behavior will be removed and the new behavior will be added + * using dojo.connect(), meaning that event handler properties + * will be normalized and that some caveats with regards to + * non-standard behaviors for onsubmit apply. Namely that you + * should cancel form submission using dojo.stopEvent() on the + * passed event object instead of returning a boolean value from + * the handler itself. + * + * @param node id or reference to the element to set the property on + * @param name the name of the property to set, or a hash object to setmultiple properties at once. + * @param value OptionalThe value to set for the property + */ + set(node: String, name: String, value: String): any; + /** + * Sets a property on an HTML element. + * Handles normalized setting of properties on DOM nodes. + * + * When passing functions as values, note that they will not be + * directly assigned to slots on the node, but rather the default + * behavior will be removed and the new behavior will be added + * using dojo.connect(), meaning that event handler properties + * will be normalized and that some caveats with regards to + * non-standard behaviors for onsubmit apply. Namely that you + * should cancel form submission using dojo.stopEvent() on the + * passed event object instead of returning a boolean value from + * the handler itself. + * + * @param node id or reference to the element to set the property on + * @param name the name of the property to set, or a hash object to setmultiple properties at once. + * @param value OptionalThe value to set for the property + */ + set(node: HTMLElement, name: Object, value: String): any; + /** + * Sets a property on an HTML element. + * Handles normalized setting of properties on DOM nodes. + * + * When passing functions as values, note that they will not be + * directly assigned to slots on the node, but rather the default + * behavior will be removed and the new behavior will be added + * using dojo.connect(), meaning that event handler properties + * will be normalized and that some caveats with regards to + * non-standard behaviors for onsubmit apply. Namely that you + * should cancel form submission using dojo.stopEvent() on the + * passed event object instead of returning a boolean value from + * the handler itself. + * + * @param node id or reference to the element to set the property on + * @param name the name of the property to set, or a hash object to setmultiple properties at once. + * @param value OptionalThe value to set for the property + */ + set(node: String, name: Object, value: String): any; + } + module dom_prop { + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/dom-prop.names.html + * + * + */ + interface names { + /** + * + */ + class: string; + /** + * + */ + colspan: string; + /** + * + */ + for: string; + /** + * + */ + frameborder: string; + /** + * + */ + readonly: string; + /** + * + */ + rowspan: string; + /** + * + */ + tabindex: string; + /** + * + */ + valuetype: string; + } + } + /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/dom-style.html * @@ -19565,7 +19609,7 @@ declare module dojo { * @param node * @param includeScroll Optional */ - position(node: HTMLElement, includeScroll: boolean): Object; + position(node: HTMLElement, includeScroll?: boolean): { w: number; h: number; x: number; y: number }; /** * Gets the position and size of the passed element relative to * the viewport (if includeScroll==false), or relative to the @@ -19581,7 +19625,7 @@ declare module dojo { * @param node * @param includeScroll Optional */ - position(node: String, includeScroll: boolean): Object; + position(node: String, includeScroll?: boolean): { w: number; h: number; x: number; y: number }; /** * Sets the size of the node's contents, irrespective of margins, * padding, or borders. @@ -19627,28 +19671,6 @@ declare module dojo { } } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/io-query.html - * - * This module defines query string processing functions. - * - */ - interface io_query { - /** - * takes a name/value mapping object and returns a string representing - * a URL-encoded version of that object. - * - * @param map - */ - objectToQuery(map: Object): any; - /** - * Create an object representing a de-serialized query section of a - * URL. Query keys with multiple values are returned in an array. - * - * @param str - */ - queryToObject(str: String): Object; - } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/html.html * @@ -19831,6 +19853,28 @@ declare module dojo { } } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/io-query.html + * + * This module defines query string processing functions. + * + */ + interface io_query { + /** + * takes a name/value mapping object and returns a string representing + * a URL-encoded version of that object. + * + * @param map + */ + objectToQuery(map: Object): any; + /** + * Create an object representing a de-serialized query section of a + * URL. Query keys with multiple values are returned in an array. + * + * @param str + */ + queryToObject(str: String): Object; + } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/i18n.html * @@ -20038,6 +20082,26 @@ declare module dojo { */ stringify(value: any, replacer: any, spacer: any): void; } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/loadInit.html + * + * + */ + interface loadInit { + /** + * + */ + dynamic: number; + /** + * + */ + load: Object; + /** + * + * @param id + */ + normalize(id: any): any; + } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/keys.html * @@ -20303,53 +20367,6 @@ declare module dojo { */ UP_DPAD: number; } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/loadInit.html - * - * - */ - interface loadInit { - /** - * - */ - dynamic: number; - /** - * - */ - load: Object; - /** - * - * @param id - */ - normalize(id: any): any; - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/node.html - * - * This AMD plugin module allows native Node.js modules to be loaded by AMD modules using the Dojo - * loader. Note that this plugin will not work with AMD loaders other than the Dojo loader. - * - */ - interface node { - /** - * Standard AMD plugin interface. See https://github.com/amdjs/amdjs-api/wiki/Loader-Plugins - * for information. - * - * @param id - * @param require - * @param load - */ - load(id: String, require: Function, load: Function): void; - /** - * Produces a normalized id to be used by node. Relative ids are resolved relative to the requesting - * module's location in the file system and will return an id with path separators appropriate for the - * local file system. - * - * @param id - * @param normalize - */ - normalize(id: String, normalize: Function): any; - } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/mouse.html * @@ -20394,6 +20411,33 @@ declare module dojo { */ wheel(node: any, listener: any): any; } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/node.html + * + * This AMD plugin module allows native Node.js modules to be loaded by AMD modules using the Dojo + * loader. Note that this plugin will not work with AMD loaders other than the Dojo loader. + * + */ + interface node { + /** + * Standard AMD plugin interface. See https://github.com/amdjs/amdjs-api/wiki/Loader-Plugins + * for information. + * + * @param id + * @param require + * @param load + */ + load(id: String, require: Function, load: Function): void; + /** + * Produces a normalized id to be used by node. Relative ids are resolved relative to the requesting + * module's location in the file system and will return an id with path separators appropriate for the + * local file system. + * + * @param id + * @param normalize + */ + normalize(id: String, normalize: Function): any; + } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/number.html * @@ -20477,6 +20521,38 @@ declare module dojo { */ "round": number; } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/number.__IntegerRegexpFlags.html + * + * + */ + class __IntegerRegexpFlags { + constructor(); + /** + * group size between separators + * + */ + "groupSize": number; + /** + * second grouping, where separators 2..n have a different interval than the first separator (for India) + * + */ + "groupSize2": number; + /** + * The character used as the thousands separator. Default is no + * separator. For more than one symbol use an array, e.g. [",", ""], + * makes ',' optional. + * + */ + "separator": string; + /** + * The leading plus-or-minus sign. Can be true, false, or [true,false]. + * Default is [true, false], (i.e. will match if it is signed + * or unsigned). + * + */ + "signed": boolean; + } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/number.__FormatOptions.html * @@ -20520,76 +20596,6 @@ declare module dojo { */ "type": string; } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/number.__IntegerRegexpFlags.html - * - * - */ - class __IntegerRegexpFlags { - constructor(); - /** - * group size between separators - * - */ - "groupSize": number; - /** - * second grouping, where separators 2..n have a different interval than the first separator (for India) - * - */ - "groupSize2": number; - /** - * The character used as the thousands separator. Default is no - * separator. For more than one symbol use an array, e.g. [",", ""], - * makes ',' optional. - * - */ - "separator": string; - /** - * The leading plus-or-minus sign. Can be true, false, or [true,false]. - * Default is [true, false], (i.e. will match if it is signed - * or unsigned). - * - */ - "signed": boolean; - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/number.__ParseOptions.html - * - * - */ - class __ParseOptions { - constructor(); - /** - * Whether to include the fractional portion, where the number of decimal places are implied by pattern - * or explicit 'places' parameter. The value [true,false] makes the fractional portion optional. - * - */ - "fractional": boolean; - /** - * override the locale used to determine formatting rules - * - */ - "locale": string; - /** - * override formatting pattern - * with this string. Default value is based on locale. Overriding this property will defeat - * localization. Literal characters in patterns are not supported. - * - */ - "pattern": string; - /** - * strict parsing, false by default. Strict parsing requires input as produced by the format() method. - * Non-strict is more permissive, e.g. flexible on white space, omitting thousands separators - * - */ - "strict": boolean; - /** - * choose a format type based on the locale from the following: - * decimal, scientific (not yet supported), percent, currency. decimal by default. - * - */ - "type": string; - } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/number.__RealNumberRegexpFlags.html * @@ -20632,6 +20638,44 @@ declare module dojo { */ "places": number; } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/number.__ParseOptions.html + * + * + */ + class __ParseOptions { + constructor(); + /** + * Whether to include the fractional portion, where the number of decimal places are implied by pattern + * or explicit 'places' parameter. The value [true,false] makes the fractional portion optional. + * + */ + "fractional": boolean; + /** + * override the locale used to determine formatting rules + * + */ + "locale": string; + /** + * override formatting pattern + * with this string. Default value is based on locale. Overriding this property will defeat + * localization. Literal characters in patterns are not supported. + * + */ + "pattern": string; + /** + * strict parsing, false by default. Strict parsing requires input as produced by the format() method. + * Non-strict is more permissive, e.g. flexible on white space, omitting thousands separators + * + */ + "strict": boolean; + /** + * choose a format type based on the locale from the following: + * decimal, scientific (not yet supported), percent, currency. decimal by default. + * + */ + "type": string; + } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/number.__RegexpOptions.html * @@ -20788,6 +20832,518 @@ declare module dojo { */ group(expression: String, nonCapture: boolean): String; } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/require.html + * + * + */ + interface require { + /** + * + */ + dynamic: number; + /** + * + */ + load: Object; + /** + * + * @param id + */ + normalize(id: any): any; + } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/robotx.html + * + * + */ + interface robotx { + /** + * + */ + doc: Object; + /** + * + */ + mouseWheelSize: number; + /** + * + */ + window: Object; + /** + * Opens the application at the specified URL for testing, redirecting dojo to point to the application + * environment instead of the test environment. + * + * @param url URL to open. Any of the test's dojo.doc calls (e.g. dojo.byId()), and any dijit.registry calls(e.g. dijit.byId()) will point to elements and widgets inside this application. + */ + initRobot(url: String): void; + /** + * Holds down a single key, like SHIFT or 'a'. + * Holds down a single key, like SHIFT or 'a'. + * + * @param charOrCode char/JS keyCode/dojo.keys.* constant for the key you want to hold downWarning: holding down a shifted key, like 'A', can have unpredictable results. + * @param delay OptionalDelay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms:robot.mouseClick({left: true}, 100) // first call; wait 100msrobot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all + */ + keyDown(charOrCode: number, delay: number): void; + /** + * Types a key combination, like SHIFT-TAB. + * Types a key combination, like SHIFT-TAB. + * + * @param charOrCode char/JS keyCode/dojo.keys.* constant for the key you want to press + * @param delay OptionalDelay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms:robot.mouseClick({left: true}, 100) // first call; wait 100msrobot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all + * @param modifiers JSON object that represents all of the modifier keys being pressed.It takes the following Boolean attributes:shiftaltctrlmeta + * @param asynchronous If true, the delay happens asynchronously and immediately, outside of the browser's JavaScript thread and any previous calls.This is useful for interacting with the browser's modal dialogs. + */ + keyPress(charOrCode: number, delay: number, modifiers: Object, asynchronous: boolean): void; + /** + * Releases a single key, like SHIFT or 'a'. + * Releases a single key, like SHIFT or 'a'. + * + * @param charOrCode char/JS keyCode/dojo.keys.* constant for the key you want to releaseWarning: releasing a shifted key, like 'A', can have unpredictable results. + * @param delay OptionalDelay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms:robot.mouseClick({left: true}, 100) // first call; wait 100msrobot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all + */ + keyUp(charOrCode: number, delay: number): void; + /** + * + */ + killRobot(): void; + /** + * Convenience function to do a press/release. + * See robot.mousePress for more info. + * Convenience function to do a press/release. + * See robot.mousePress for more info. + * + * @param buttons + * @param delay Optional + */ + mouseClick(buttons: Object, delay: number): void; + /** + * Moves the mouse to the specified x,y offset relative to the viewport. + * + * @param x x offset relative to the viewport, in pixels, to move the mouse. + * @param y y offset relative to the viewport, in pixels, to move the mouse. + * @param delay OptionalDelay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms:robot.mouseClick({left: true}, 100) // first call; wait 100msrobot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all + * @param duration OptionalApproximate time Robot will spend moving the mouseThe default is 100ms. This also affects how many mousemove events willbe generated, which is the log of the duration. + * @param absolute Boolean indicating whether the x and y values are absolute coordinates.If false, then mouseMove expects that the x,y will be relative to the window. (clientX/Y)If true, then mouseMove expects that the x,y will be absolute. (pageX/Y) + */ + mouseMove(x: number, y: number, delay: number, duration: number, absolute: boolean): void; + /** + * Moves the mouse over the specified node at the specified relative x,y offset. + * Moves the mouse over the specified node at the specified relative x,y offset. + * If you do not specify an offset, mouseMove will default to move to the middle of the node. + * Example: to move the mouse over a ComboBox's down arrow node, call doh.mouseMoveAt(dijit.byId('setvaluetest').downArrowNode); + * + * @param node The id of the node, or the node itself, to move the mouse to.If you pass an id or a function that returns a node, the node will not be evaluated until the movement executes.This is useful if you need to move the mouse to an node that is not yet present. + * @param delay Delay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms:robot.mouseClick({left:true}, 100) // first call; wait 100msrobot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all + * @param duration Approximate time Robot will spend moving the mouseThe default is 100ms. + * @param offsetX x offset relative to the node, in pixels, to move the mouse. The default is half the node's width. + * @param offsetY y offset relative to the node, in pixels, to move the mouse. The default is half the node's height. + */ + mouseMoveAt(node: String, delay: number, duration: number, offsetX: number, offsetY: number): void; + /** + * Moves the mouse over the specified node at the specified relative x,y offset. + * Moves the mouse over the specified node at the specified relative x,y offset. + * If you do not specify an offset, mouseMove will default to move to the middle of the node. + * Example: to move the mouse over a ComboBox's down arrow node, call doh.mouseMoveAt(dijit.byId('setvaluetest').downArrowNode); + * + * @param node The id of the node, or the node itself, to move the mouse to.If you pass an id or a function that returns a node, the node will not be evaluated until the movement executes.This is useful if you need to move the mouse to an node that is not yet present. + * @param delay Delay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms:robot.mouseClick({left:true}, 100) // first call; wait 100msrobot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all + * @param duration Approximate time Robot will spend moving the mouseThe default is 100ms. + * @param offsetX x offset relative to the node, in pixels, to move the mouse. The default is half the node's width. + * @param offsetY y offset relative to the node, in pixels, to move the mouse. The default is half the node's height. + */ + mouseMoveAt(node: HTMLElement, delay: number, duration: number, offsetX: number, offsetY: number): void; + /** + * Moves the mouse over the specified node at the specified relative x,y offset. + * Moves the mouse over the specified node at the specified relative x,y offset. + * If you do not specify an offset, mouseMove will default to move to the middle of the node. + * Example: to move the mouse over a ComboBox's down arrow node, call doh.mouseMoveAt(dijit.byId('setvaluetest').downArrowNode); + * + * @param node The id of the node, or the node itself, to move the mouse to.If you pass an id or a function that returns a node, the node will not be evaluated until the movement executes.This is useful if you need to move the mouse to an node that is not yet present. + * @param delay Delay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms:robot.mouseClick({left:true}, 100) // first call; wait 100msrobot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all + * @param duration Approximate time Robot will spend moving the mouseThe default is 100ms. + * @param offsetX x offset relative to the node, in pixels, to move the mouse. The default is half the node's width. + * @param offsetY y offset relative to the node, in pixels, to move the mouse. The default is half the node's height. + */ + mouseMoveAt(node: Function, delay: number, duration: number, offsetX: number, offsetY: number): void; + /** + * Move the mouse from the current position to the specified point. + * Delays reading contents point until queued command starts running. + * See mouseMove() for details. + * + * @param point x, y position relative to viewport, or if absolute == true, to document + * @param delay Optional + * @param duration Optional + * @param absolute + */ + mouseMoveTo(point: Object, delay: number, duration: number, absolute: boolean): void; + /** + * Presses mouse buttons. + * Presses the mouse buttons you pass as true. + * Example: to press the left mouse button, pass {left: true}. + * Mouse buttons you don't specify keep their previous pressed state. + * + * @param buttons JSON object that represents all of the mouse buttons being pressed.It takes the following Boolean attributes:leftmiddleright + * @param delay OptionalDelay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms:robot.mouseClick({left: true}, 100) // first call; wait 100msrobot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all + */ + mousePress(buttons: Object, delay: number): void; + /** + * Releases mouse buttons. + * Releases the mouse buttons you pass as true. + * Example: to release the left mouse button, pass {left: true}. + * Mouse buttons you don't specify keep their previous pressed state. + * See robot.mousePress for more info. + * + * @param buttons + * @param delay Optional + */ + mouseRelease(buttons: Object, delay: number): void; + /** + * Spins the mouse wheel. + * Spins the wheel wheelAmt "notches." + * Negative wheelAmt scrolls up/away from the user. + * Positive wheelAmt scrolls down/toward the user. + * Note: this will all happen in one event. + * Warning: the size of one mouse wheel notch is an OS setting. + * You can access this size from robot.mouseWheelSize + * + * @param wheelAmt Number of notches to spin the wheel.Negative wheelAmt scrolls up/away from the user.Positive wheelAmt scrolls down/toward the user. + * @param delay OptionalDelay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms: robot.mouseClick({left: true}, 100) // first call; wait 100ms robot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all + * @param duration OptionalApproximate time Robot will spend moving the mouseBy default, the Robot will wheel the mouse as fast as possible. + */ + mouseWheel(wheelAmt: number, delay: number, duration: number): void; + /** + * Scroll the passed node into view, if it is not. + * + * @param node The id of the node, or the node itself, to move the mouse to.If you pass an id or a function that returns a node, the node will not be evaluated until the movement executes.This is useful if you need to move the mouse to an node that is not yet present. + * @param delay Delay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call. + */ + scrollIntoView(node: String, delay: number): void; + /** + * Scroll the passed node into view, if it is not. + * + * @param node The id of the node, or the node itself, to move the mouse to.If you pass an id or a function that returns a node, the node will not be evaluated until the movement executes.This is useful if you need to move the mouse to an node that is not yet present. + * @param delay Delay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call. + */ + scrollIntoView(node: HTMLElement, delay: number): void; + /** + * Scroll the passed node into view, if it is not. + * + * @param node The id of the node, or the node itself, to move the mouse to.If you pass an id or a function that returns a node, the node will not be evaluated until the movement executes.This is useful if you need to move the mouse to an node that is not yet present. + * @param delay Delay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call. + */ + scrollIntoView(node: Function, delay: number): void; + /** + * Defer an action by adding it to the robot's incrementally delayed queue of actions to execute. + * + * @param f A function containing actions you want to defer. It can return a Promiseto delay further actions. + * @param delay OptionalDelay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms:robot.mouseClick({left: true}, 100) // first call; wait 100msrobot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all + * @param duration OptionalDelay to wait after firing. + */ + sequence(f: Function, delay: number, duration: number): void; + /** + * Set clipboard content. + * Set data as clipboard content, overriding anything already there. The + * data will be put to the clipboard using the given format. + * + * @param data New clipboard content to set + * @param format OptionalSet this to "text/html" to put richtext to the clipboard.Otherwise, data is treated as plaintext. By default, plaintextis used. + */ + setClipboard(data: String, format: String): void; + /** + * + */ + startRobot(): any; + /** + * Types a string of characters in order, or types a dojo.keys.* constant. + * Types a string of characters in order, or types a dojo.keys.* constant. + * + * @param chars String of characters to type, or a dojo.keys.* constant + * @param delay OptionalDelay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms:robot.mouseClick({left: true}, 100) // first call; wait 100msrobot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all + * @param duration OptionalTime, in milliseconds, to spend pressing all of the keys.The default is (string length)*50 ms. + */ + typeKeys(chars: String, delay: number, duration: number): void; + /** + * Types a string of characters in order, or types a dojo.keys.* constant. + * Types a string of characters in order, or types a dojo.keys.* constant. + * + * @param chars String of characters to type, or a dojo.keys.* constant + * @param delay OptionalDelay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms:robot.mouseClick({left: true}, 100) // first call; wait 100msrobot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all + * @param duration OptionalTime, in milliseconds, to spend pressing all of the keys.The default is (string length)*50 ms. + */ + typeKeys(chars: number, delay: number, duration: number): void; + /** + * Notifies DOH that the doh.robot is about to make a page change in the application it is driving, + * returning a doh.Deferred object the user should return in their runTest function as part of a DOH test. + * + * @param submitActions The doh.robot will execute the actions the test passes into the submitActions argument (like clicking the submit button),expecting these actions to create a page change (like a form submit).After these actions execute and the resulting page loads, the next test will start. + */ + waitForPageToLoad(submitActions: Function): any; + } + module robotx { + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/robotx._runsemaphore.html + * + * + */ + interface _runsemaphore { + /** + * + */ + lock: any[]; + /** + * + */ + unlock(): any; + } + } + + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/robot.html + * + * + */ + interface robot { + /** + * + */ + doc: Object; + /** + * + */ + mouseWheelSize: number; + /** + * + */ + window: Object; + /** + * Opens the application at the specified URL for testing, redirecting dojo to point to the application + * environment instead of the test environment. + * + * @param url URL to open. Any of the test's dojo.doc calls (e.g. dojo.byId()), and any dijit.registry calls(e.g. dijit.byId()) will point to elements and widgets inside this application. + */ + initRobot(url: String): void; + /** + * Holds down a single key, like SHIFT or 'a'. + * Holds down a single key, like SHIFT or 'a'. + * + * @param charOrCode char/JS keyCode/dojo.keys.* constant for the key you want to hold downWarning: holding down a shifted key, like 'A', can have unpredictable results. + * @param delay OptionalDelay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms:robot.mouseClick({left: true}, 100) // first call; wait 100msrobot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all + */ + keyDown(charOrCode: number, delay: number): void; + /** + * Types a key combination, like SHIFT-TAB. + * Types a key combination, like SHIFT-TAB. + * + * @param charOrCode char/JS keyCode/dojo.keys.* constant for the key you want to press + * @param delay OptionalDelay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms:robot.mouseClick({left: true}, 100) // first call; wait 100msrobot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all + * @param modifiers JSON object that represents all of the modifier keys being pressed.It takes the following Boolean attributes:shiftaltctrlmeta + * @param asynchronous If true, the delay happens asynchronously and immediately, outside of the browser's JavaScript thread and any previous calls.This is useful for interacting with the browser's modal dialogs. + */ + keyPress(charOrCode: number, delay: number, modifiers: Object, asynchronous: boolean): void; + /** + * Releases a single key, like SHIFT or 'a'. + * Releases a single key, like SHIFT or 'a'. + * + * @param charOrCode char/JS keyCode/dojo.keys.* constant for the key you want to releaseWarning: releasing a shifted key, like 'A', can have unpredictable results. + * @param delay OptionalDelay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms:robot.mouseClick({left: true}, 100) // first call; wait 100msrobot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all + */ + keyUp(charOrCode: number, delay: number): void; + /** + * + */ + killRobot(): void; + /** + * Convenience function to do a press/release. + * See robot.mousePress for more info. + * Convenience function to do a press/release. + * See robot.mousePress for more info. + * + * @param buttons + * @param delay Optional + */ + mouseClick(buttons: Object, delay: number): void; + /** + * Moves the mouse to the specified x,y offset relative to the viewport. + * + * @param x x offset relative to the viewport, in pixels, to move the mouse. + * @param y y offset relative to the viewport, in pixels, to move the mouse. + * @param delay OptionalDelay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms:robot.mouseClick({left: true}, 100) // first call; wait 100msrobot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all + * @param duration OptionalApproximate time Robot will spend moving the mouseThe default is 100ms. This also affects how many mousemove events willbe generated, which is the log of the duration. + * @param absolute Boolean indicating whether the x and y values are absolute coordinates.If false, then mouseMove expects that the x,y will be relative to the window. (clientX/Y)If true, then mouseMove expects that the x,y will be absolute. (pageX/Y) + */ + mouseMove(x: number, y: number, delay: number, duration: number, absolute: boolean): void; + /** + * Moves the mouse over the specified node at the specified relative x,y offset. + * Moves the mouse over the specified node at the specified relative x,y offset. + * If you do not specify an offset, mouseMove will default to move to the middle of the node. + * Example: to move the mouse over a ComboBox's down arrow node, call doh.mouseMoveAt(dijit.byId('setvaluetest').downArrowNode); + * + * @param node The id of the node, or the node itself, to move the mouse to.If you pass an id or a function that returns a node, the node will not be evaluated until the movement executes.This is useful if you need to move the mouse to an node that is not yet present. + * @param delay Delay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms:robot.mouseClick({left:true}, 100) // first call; wait 100msrobot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all + * @param duration Approximate time Robot will spend moving the mouseThe default is 100ms. + * @param offsetX x offset relative to the node, in pixels, to move the mouse. The default is half the node's width. + * @param offsetY y offset relative to the node, in pixels, to move the mouse. The default is half the node's height. + */ + mouseMoveAt(node: String, delay: number, duration: number, offsetX: number, offsetY: number): void; + /** + * Moves the mouse over the specified node at the specified relative x,y offset. + * Moves the mouse over the specified node at the specified relative x,y offset. + * If you do not specify an offset, mouseMove will default to move to the middle of the node. + * Example: to move the mouse over a ComboBox's down arrow node, call doh.mouseMoveAt(dijit.byId('setvaluetest').downArrowNode); + * + * @param node The id of the node, or the node itself, to move the mouse to.If you pass an id or a function that returns a node, the node will not be evaluated until the movement executes.This is useful if you need to move the mouse to an node that is not yet present. + * @param delay Delay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms:robot.mouseClick({left:true}, 100) // first call; wait 100msrobot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all + * @param duration Approximate time Robot will spend moving the mouseThe default is 100ms. + * @param offsetX x offset relative to the node, in pixels, to move the mouse. The default is half the node's width. + * @param offsetY y offset relative to the node, in pixels, to move the mouse. The default is half the node's height. + */ + mouseMoveAt(node: HTMLElement, delay: number, duration: number, offsetX: number, offsetY: number): void; + /** + * Moves the mouse over the specified node at the specified relative x,y offset. + * Moves the mouse over the specified node at the specified relative x,y offset. + * If you do not specify an offset, mouseMove will default to move to the middle of the node. + * Example: to move the mouse over a ComboBox's down arrow node, call doh.mouseMoveAt(dijit.byId('setvaluetest').downArrowNode); + * + * @param node The id of the node, or the node itself, to move the mouse to.If you pass an id or a function that returns a node, the node will not be evaluated until the movement executes.This is useful if you need to move the mouse to an node that is not yet present. + * @param delay Delay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms:robot.mouseClick({left:true}, 100) // first call; wait 100msrobot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all + * @param duration Approximate time Robot will spend moving the mouseThe default is 100ms. + * @param offsetX x offset relative to the node, in pixels, to move the mouse. The default is half the node's width. + * @param offsetY y offset relative to the node, in pixels, to move the mouse. The default is half the node's height. + */ + mouseMoveAt(node: Function, delay: number, duration: number, offsetX: number, offsetY: number): void; + /** + * Move the mouse from the current position to the specified point. + * Delays reading contents point until queued command starts running. + * See mouseMove() for details. + * + * @param point x, y position relative to viewport, or if absolute == true, to document + * @param delay Optional + * @param duration Optional + * @param absolute + */ + mouseMoveTo(point: Object, delay: number, duration: number, absolute: boolean): void; + /** + * Presses mouse buttons. + * Presses the mouse buttons you pass as true. + * Example: to press the left mouse button, pass {left: true}. + * Mouse buttons you don't specify keep their previous pressed state. + * + * @param buttons JSON object that represents all of the mouse buttons being pressed.It takes the following Boolean attributes:leftmiddleright + * @param delay OptionalDelay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms:robot.mouseClick({left: true}, 100) // first call; wait 100msrobot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all + */ + mousePress(buttons: Object, delay: number): void; + /** + * Releases mouse buttons. + * Releases the mouse buttons you pass as true. + * Example: to release the left mouse button, pass {left: true}. + * Mouse buttons you don't specify keep their previous pressed state. + * See robot.mousePress for more info. + * + * @param buttons + * @param delay Optional + */ + mouseRelease(buttons: Object, delay: number): void; + /** + * Spins the mouse wheel. + * Spins the wheel wheelAmt "notches." + * Negative wheelAmt scrolls up/away from the user. + * Positive wheelAmt scrolls down/toward the user. + * Note: this will all happen in one event. + * Warning: the size of one mouse wheel notch is an OS setting. + * You can access this size from robot.mouseWheelSize + * + * @param wheelAmt Number of notches to spin the wheel.Negative wheelAmt scrolls up/away from the user.Positive wheelAmt scrolls down/toward the user. + * @param delay OptionalDelay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms: robot.mouseClick({left: true}, 100) // first call; wait 100ms robot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all + * @param duration OptionalApproximate time Robot will spend moving the mouseBy default, the Robot will wheel the mouse as fast as possible. + */ + mouseWheel(wheelAmt: number, delay: number, duration: number): void; + /** + * Scroll the passed node into view, if it is not. + * + * @param node The id of the node, or the node itself, to move the mouse to.If you pass an id or a function that returns a node, the node will not be evaluated until the movement executes.This is useful if you need to move the mouse to an node that is not yet present. + * @param delay Delay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call. + */ + scrollIntoView(node: String, delay: number): void; + /** + * Scroll the passed node into view, if it is not. + * + * @param node The id of the node, or the node itself, to move the mouse to.If you pass an id or a function that returns a node, the node will not be evaluated until the movement executes.This is useful if you need to move the mouse to an node that is not yet present. + * @param delay Delay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call. + */ + scrollIntoView(node: HTMLElement, delay: number): void; + /** + * Scroll the passed node into view, if it is not. + * + * @param node The id of the node, or the node itself, to move the mouse to.If you pass an id or a function that returns a node, the node will not be evaluated until the movement executes.This is useful if you need to move the mouse to an node that is not yet present. + * @param delay Delay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call. + */ + scrollIntoView(node: Function, delay: number): void; + /** + * Defer an action by adding it to the robot's incrementally delayed queue of actions to execute. + * + * @param f A function containing actions you want to defer. It can return a Promiseto delay further actions. + * @param delay OptionalDelay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms:robot.mouseClick({left: true}, 100) // first call; wait 100msrobot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all + * @param duration OptionalDelay to wait after firing. + */ + sequence(f: Function, delay: number, duration: number): void; + /** + * Set clipboard content. + * Set data as clipboard content, overriding anything already there. The + * data will be put to the clipboard using the given format. + * + * @param data New clipboard content to set + * @param format OptionalSet this to "text/html" to put richtext to the clipboard.Otherwise, data is treated as plaintext. By default, plaintextis used. + */ + setClipboard(data: String, format: String): void; + /** + * + */ + startRobot(): any; + /** + * Types a string of characters in order, or types a dojo.keys.* constant. + * Types a string of characters in order, or types a dojo.keys.* constant. + * + * @param chars String of characters to type, or a dojo.keys.* constant + * @param delay OptionalDelay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms:robot.mouseClick({left: true}, 100) // first call; wait 100msrobot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all + * @param duration OptionalTime, in milliseconds, to spend pressing all of the keys.The default is (string length)*50 ms. + */ + typeKeys(chars: String, delay: number, duration: number): void; + /** + * Types a string of characters in order, or types a dojo.keys.* constant. + * Types a string of characters in order, or types a dojo.keys.* constant. + * + * @param chars String of characters to type, or a dojo.keys.* constant + * @param delay OptionalDelay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms:robot.mouseClick({left: true}, 100) // first call; wait 100msrobot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all + * @param duration OptionalTime, in milliseconds, to spend pressing all of the keys.The default is (string length)*50 ms. + */ + typeKeys(chars: number, delay: number, duration: number): void; + /** + * Notifies DOH that the doh.robot is about to make a page change in the application it is driving, + * returning a doh.Deferred object the user should return in their runTest function as part of a DOH test. + * + * @param submitActions The doh.robot will execute the actions the test passes into the submitActions argument (like clicking the submit button),expecting these actions to create a page change (like a form submit).After these actions execute and the resulting page loads, the next test will start. + */ + waitForPageToLoad(submitActions: Function): any; + } + module robot { + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/robot._runsemaphore.html + * + * + */ + interface _runsemaphore { + /** + * + */ + lock: any[]; + /** + * + */ + unlock(): any; + } + } + /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.html * @@ -21571,7 +22127,7 @@ declare module dojo { * Parses str for a color value. Accepts hex, rgb, and rgba * style color values. * Acceptable input values for str may include arrays of any form - * accepted by dojo._base.ColorFromArray, hex strings such as "#aaaaaa", or + * accepted by dojo.colorFromArray, hex strings such as "#aaaaaa", or * rgb or rgba strings such as "rgb(133, 200, 16)" or "rgba(10, 10, * 10, 50)" * @@ -23933,6 +24489,97 @@ declare module dojo { xhrPut(args: Object): any; } module main { + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.__IoArgs.html + * + * + */ + class __IoArgs { + constructor(); + /** + * Contains properties with string values. These + * properties will be serialized as name1=value2 and + * passed in the request. + * + */ + "content": Object; + /** + * DOM node for a form. Used to extract the form values + * and send to the server. + * + */ + "form": HTMLElement; + /** + * Acceptable values depend on the type of IO + * transport (see specific IO calls for more information). + * + */ + "handleAs": string; + /** + * Set this explicitly to false to prevent publishing of topics related to + * IO operations. Otherwise, if djConfig.ioPublish is set to true, topics + * will be published via dojo/topic.publish() for different phases of an IO operation. + * See dojo/main.__IoPublish for a list of topics that are published. + * + */ + "ioPublish": boolean; + /** + * Default is false. If true, then a + * "dojo.preventCache" parameter is sent in the request + * with a value that changes with each request + * (timestamp). Useful only with GET-type requests. + * + */ + "preventCache": boolean; + /** + * Sets the raw body for an HTTP request. If this is used, then the content + * property is ignored. This is mostly useful for HTTP methods that have + * a body to their requests, like PUT or POST. This property can be used instead + * of postData and putData for dojo/_base/xhr.rawXhrPost and dojo/_base/xhr.rawXhrPut respectively. + * + */ + "rawBody": string; + /** + * Milliseconds to wait for the response. If this time + * passes, the then error callbacks are called. + * + */ + "timeout": number; + /** + * URL to server endpoint. + * + */ + "url": string; + /** + * This function will + * be called when the request fails due to a network or server error, the url + * is invalid, etc. It will also be called if the load or handle callback throws an + * exception, unless djConfig.debugAtAllCosts is true. This allows deployed applications + * to continue to run even when a logic error happens in the callback, while making + * it easier to troubleshoot while in debug mode. + * + * @param response The response in the format as defined with handleAs. + * @param ioArgs Provides additional information about the request. + */ + error(response: Object, ioArgs: dojo.main.__IoCallbackArgs): void; + /** + * This function will + * be called at the end of every request, whether or not an error occurs. + * + * @param loadOrError Provides a string that tells you whether this functionwas called because of success (load) or failure (error). + * @param response The response in the format as defined with handleAs. + * @param ioArgs Provides additional information about the request. + */ + handle(loadOrError: String, response: Object, ioArgs: dojo.main.__IoCallbackArgs): void; + /** + * This function will be + * called on a successful HTTP response code. + * + * @param response The response in the format as defined with handleAs. + * @param ioArgs Provides additional information about the request. + */ + load(response: Object, ioArgs: dojo.main.__IoCallbackArgs): void; + } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.__IoCallbackArgs.html * @@ -24051,97 +24698,6 @@ declare module dojo { */ "stop": string; } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.__IoArgs.html - * - * - */ - class __IoArgs { - constructor(); - /** - * Contains properties with string values. These - * properties will be serialized as name1=value2 and - * passed in the request. - * - */ - "content": Object; - /** - * DOM node for a form. Used to extract the form values - * and send to the server. - * - */ - "form": HTMLElement; - /** - * Acceptable values depend on the type of IO - * transport (see specific IO calls for more information). - * - */ - "handleAs": string; - /** - * Set this explicitly to false to prevent publishing of topics related to - * IO operations. Otherwise, if djConfig.ioPublish is set to true, topics - * will be published via dojo/topic.publish() for different phases of an IO operation. - * See dojo/main.__IoPublish for a list of topics that are published. - * - */ - "ioPublish": boolean; - /** - * Default is false. If true, then a - * "dojo.preventCache" parameter is sent in the request - * with a value that changes with each request - * (timestamp). Useful only with GET-type requests. - * - */ - "preventCache": boolean; - /** - * Sets the raw body for an HTTP request. If this is used, then the content - * property is ignored. This is mostly useful for HTTP methods that have - * a body to their requests, like PUT or POST. This property can be used instead - * of postData and putData for dojo/_base/xhr.rawXhrPost and dojo/_base/xhr.rawXhrPut respectively. - * - */ - "rawBody": string; - /** - * Milliseconds to wait for the response. If this time - * passes, the then error callbacks are called. - * - */ - "timeout": number; - /** - * URL to server endpoint. - * - */ - "url": string; - /** - * This function will - * be called when the request fails due to a network or server error, the url - * is invalid, etc. It will also be called if the load or handle callback throws an - * exception, unless djConfig.debugAtAllCosts is true. This allows deployed applications - * to continue to run even when a logic error happens in the callback, while making - * it easier to troubleshoot while in debug mode. - * - * @param response The response in the format as defined with handleAs. - * @param ioArgs Provides additional information about the request. - */ - error(response: Object, ioArgs: dojo.main.__IoCallbackArgs): void; - /** - * This function will - * be called at the end of every request, whether or not an error occurs. - * - * @param loadOrError Provides a string that tells you whether this functionwas called because of success (load) or failure (error). - * @param response The response in the format as defined with handleAs. - * @param ioArgs Provides additional information about the request. - */ - handle(loadOrError: String, response: Object, ioArgs: dojo.main.__IoCallbackArgs): void; - /** - * This function will be - * called on a successful HTTP response code. - * - * @param response The response in the format as defined with handleAs. - * @param ioArgs Provides additional information about the request. - */ - load(response: Object, ioArgs: dojo.main.__IoCallbackArgs): void; - } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.__XhrArgs.html * @@ -24284,7 +24840,7 @@ declare module dojo { * * @param name The property to get. */ - get(name: string): any; + get(name: String): any; /** * * @param params Optional @@ -24298,7 +24854,7 @@ declare module dojo { * @param name The property to set. * @param value The value to set in the property. */ - set(name: string, value: Object): any; + set(name: String, value: Object): any; /** * Watches a property for changes * @@ -24385,6 +24941,23 @@ declare module dojo { */ xml(xhr: any): any; } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.cldr.html + * + * + */ + interface cldr { + /** + * TODOC + * + */ + monetary: Object; + /** + * TODOC + * + */ + supplemental: Object; + } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/main._nodeDataCache.html * @@ -24392,6 +24965,20 @@ declare module dojo { */ interface _nodeDataCache { } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.colors.html + * + * + */ + interface colors { + /** + * creates a greyscale color with an optional alpha + * + * @param g + * @param a Optional + */ + makeGrey(g: number, a: number): void; + } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.back.html * @@ -24498,97 +25085,36 @@ declare module dojo { * * * - * + * */ init(): void; } /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.contentHandlers.html - * - * A map of available XHR transport handle types. Name matches the - * handleAs attribute passed to XHR calls. - * A map of available XHR transport handle types. Name matches the - * handleAs attribute passed to XHR calls. Each contentHandler is - * called, passing the xhr object for manipulation. The return value - * from the contentHandler will be passed to the load or handle - * functions defined in the original xhr call. - * - */ - interface contentHandlers { - /** - * - * @param xhr - */ - auto(xhr: any): void; - /** - * A contentHandler which evaluates the response data, expecting it to be valid JavaScript - * - * @param xhr - */ - javascript(xhr: any): any; - /** - * A contentHandler which returns a JavaScript object created from the response data - * - * @param xhr - */ - json(xhr: any): any; - /** - * A contentHandler which expects comment-filtered JSON. - * A contentHandler which expects comment-filtered JSON. - * the json-comment-filtered option was implemented to prevent - * "JavaScript Hijacking", but it is less secure than standard JSON. Use - * standard JSON instead. JSON prefixing can be used to subvert hijacking. - * - * Will throw a notice suggesting to use application/json mimetype, as - * json-commenting can introduce security issues. To decrease the chances of hijacking, - * use the standard json contentHandler, and prefix your "JSON" with: {}&& - * - * use djConfig.useCommentedJson = true to turn off the notice - * - * @param xhr - */ - json_comment_filtered(xhr: any): any; - /** - * A contentHandler which checks the presence of comment-filtered JSON and - * alternates between the json and json-comment-filtered contentHandlers. - * - * @param xhr - */ - json_comment_optional(xhr: any): any; - /** - * - * @param xhr - */ - olson_zoneinfo(xhr: any): void; - /** - * A contentHandler which simply returns the plaintext response data - * - * @param xhr - */ - text(xhr: any): any; - /** - * A contentHandler returning an XML Document parsed from the response data - * - * @param xhr - */ - xml(xhr: any): any; - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.cldr.html + * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.data.html * * */ - interface cldr { + interface data { /** - * TODOC * */ - monetary: Object; + api: Object; /** - * TODOC * */ - supplemental: Object; + util: Object; + /** + * + */ + ItemFileReadStore(): void; + /** + * + */ + ItemFileWriteStore(): void; + /** + * + */ + ObjectStore(): void; } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.config.html @@ -24726,7 +25252,7 @@ declare module dojo { */ require: Object; /** - * Array containing the r, g, b components used as transparent color in dojo._base.Color; + * Array containing the r, g, b components used as transparent color in dojo.Color; * if undefined, [255,255,255] (white) will be used. * */ @@ -24755,6 +25281,143 @@ declare module dojo { */ useDeferredInstrumentation: boolean; } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.contentHandlers.html + * + * A map of available XHR transport handle types. Name matches the + * handleAs attribute passed to XHR calls. + * A map of available XHR transport handle types. Name matches the + * handleAs attribute passed to XHR calls. Each contentHandler is + * called, passing the xhr object for manipulation. The return value + * from the contentHandler will be passed to the load or handle + * functions defined in the original xhr call. + * + */ + interface contentHandlers { + /** + * + * @param xhr + */ + auto(xhr: any): void; + /** + * A contentHandler which evaluates the response data, expecting it to be valid JavaScript + * + * @param xhr + */ + javascript(xhr: any): any; + /** + * A contentHandler which returns a JavaScript object created from the response data + * + * @param xhr + */ + json(xhr: any): any; + /** + * A contentHandler which expects comment-filtered JSON. + * A contentHandler which expects comment-filtered JSON. + * the json-comment-filtered option was implemented to prevent + * "JavaScript Hijacking", but it is less secure than standard JSON. Use + * standard JSON instead. JSON prefixing can be used to subvert hijacking. + * + * Will throw a notice suggesting to use application/json mimetype, as + * json-commenting can introduce security issues. To decrease the chances of hijacking, + * use the standard json contentHandler, and prefix your "JSON" with: {}&& + * + * use djConfig.useCommentedJson = true to turn off the notice + * + * @param xhr + */ + json_comment_filtered(xhr: any): any; + /** + * A contentHandler which checks the presence of comment-filtered JSON and + * alternates between the json and json-comment-filtered contentHandlers. + * + * @param xhr + */ + json_comment_optional(xhr: any): any; + /** + * + * @param xhr + */ + olson_zoneinfo(xhr: any): void; + /** + * A contentHandler which simply returns the plaintext response data + * + * @param xhr + */ + text(xhr: any): any; + /** + * A contentHandler returning an XML Document parsed from the response data + * + * @param xhr + */ + xml(xhr: any): any; + } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.date.html + * + * + */ + interface date { + /** + * TODOC + * + */ + stamp: Object; + /** + * Add to a Date in intervals of different size, from milliseconds to years + * + * @param date Date object to start with + * @param interval A string representing the interval. One of the following:"year", "month", "day", "hour", "minute", "second","millisecond", "quarter", "week", "weekday" + * @param amount How much to add to the date. + */ + add(date: Date, interval: String, amount: number): any; + /** + * Compare two date objects by date, time, or both. + * Returns 0 if equal, positive if a > b, else negative. + * + * @param date1 Date object + * @param date2 OptionalDate object. If not specified, the current Date is used. + * @param portion OptionalA string indicating the "date" or "time" portion of a Date object.Compares both "date" and "time" by default. One of the following:"date", "time", "datetime" + */ + compare(date1: Date, date2: Date, portion: String): number; + /** + * Get the difference in a specific unit of time (e.g., number of + * months, weeks, days, etc.) between two dates, rounded to the + * nearest integer. + * + * @param date1 Date object + * @param date2 OptionalDate object. If not specified, the current Date is used. + * @param interval OptionalA string representing the interval. One of the following:"year", "month", "day", "hour", "minute", "second","millisecond", "quarter", "week", "weekday"Defaults to "day". + */ + difference(date1: Date, date2: Date, interval: String): any; + /** + * Returns the number of days in the month used by dateObject + * + * @param dateObject + */ + getDaysInMonth(dateObject: Date): number; + /** + * Get the user's time zone as provided by the browser + * Try to get time zone info from toString or toLocaleString method of + * the Date object -- UTC offset is not a time zone. See + * http://www.twinsun.com/tz/tz-link.htm Note: results may be + * inconsistent across browsers. + * + * @param dateObject Needed because the timezone may vary with time (daylight savings) + */ + getTimezoneName(dateObject: Date): any; + /** + * Determines if the year of the dateObject is a leap year + * Leap years are years with an additional day YYYY-02-29, where the + * year number is a multiple of four with the following exception: If + * a year is a multiple of 100, then it is only a leap year if it is + * also a multiple of 400. For example, 1900 was not a leap year, but + * 2000 is one. + * + * @param dateObject + */ + isLeapYear(dateObject: Date): boolean; + } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.currency.html * @@ -24793,18 +25456,128 @@ declare module dojo { regexp(options: Object): any; } /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.colors.html + * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.dnd.html * * */ - interface colors { + interface dnd { /** - * creates a greyscale color with an optional alpha + * Used by dojo/dnd/Manager to scroll document or internal node when the user + * drags near the edge of the viewport or a scrollable node * - * @param g - * @param a Optional */ - makeGrey(g: number, a: number): void; + autoscroll: Object; + /** + * + */ + move: Object; + /** + * + */ + AutoSource(): void; + /** + * + */ + Avatar(): void; + /** + * + */ + Container(): void; + /** + * + */ + Manager(): void; + /** + * + */ + Moveable(): void; + /** + * + */ + Mover(): void; + /** + * + */ + Selector(): void; + /** + * + */ + Source(): void; + /** + * + */ + Target(): void; + /** + * + */ + TimedMoveable(): void; + } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.doc.html + * + * Alias for the current document. 'doc' can be modified + * for temporary context shifting. See also withDoc(). + * Use this rather than referring to 'window.document' to ensure your code runs + * correctly in managed contexts. + * + */ + interface doc { + /** + * + */ + documentElement: Object; + /** + * + */ + dojoClick: boolean; + } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.gears.html + * + * TODOC + * + */ + interface gears { + /** + * True if client is using Google Gears + * + */ + available: Object; + } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.global.html + * + * Alias for the current window. 'global' can be modified + * for temporary context shifting. See also withGlobal(). + * Use this rather than referring to 'window' to ensure your code runs + * correctly in managed contexts. + * + */ + interface global { + /** + * + */ + $(): any; + /** + * + * @param start + * @param data + * @param responseCode + * @param errorMsg + */ + GoogleSearchStoreCallback_undefined_NaN(start: any, data: any, responseCode: any, errorMsg: any): void; + /** + * + */ + jQuery(): any; + /** + * + */ + swfIsInHTML(): void; + /** + * + */ + undefined_onload(): void; } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.dijit.html @@ -24956,173 +25729,144 @@ declare module dojo { WidgetSet(): void; } /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.doc.html - * - * Alias for the current document. 'doc' can be modified - * for temporary context shifting. See also withDoc(). - * Use this rather than referring to 'window.document' to ensure your code runs - * correctly in managed contexts. - * - */ - interface doc { - /** - * - */ - documentElement: Object; - /** - * - */ - dojoClick: boolean; - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.data.html + * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.io.html * * */ - interface data { + interface io { /** * */ - api: Object; - /** - * - */ - util: Object; - /** - * - */ - ItemFileReadStore(): void; - /** - * - */ - ItemFileWriteStore(): void; - /** - * - */ - ObjectStore(): void; - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.date.html - * - * - */ - interface date { + iframe: Object; /** * TODOC * */ - stamp: Object; - /** - * Add to a Date in intervals of different size, from milliseconds to years - * - * @param date Date object to start with - * @param interval A string representing the interval. One of the following:"year", "month", "day", "hour", "minute", "second","millisecond", "quarter", "week", "weekday" - * @param amount How much to add to the date. - */ - add(date: Date, interval: String, amount: number): any; - /** - * Compare two date objects by date, time, or both. - * Returns 0 if equal, positive if a > b, else negative. - * - * @param date1 Date object - * @param date2 OptionalDate object. If not specified, the current Date is used. - * @param portion OptionalA string indicating the "date" or "time" portion of a Date object.Compares both "date" and "time" by default. One of the following:"date", "time", "datetime" - */ - compare(date1: Date, date2: Date, portion: String): number; - /** - * Get the difference in a specific unit of time (e.g., number of - * months, weeks, days, etc.) between two dates, rounded to the - * nearest integer. - * - * @param date1 Date object - * @param date2 OptionalDate object. If not specified, the current Date is used. - * @param interval OptionalA string representing the interval. One of the following:"year", "month", "day", "hour", "minute", "second","millisecond", "quarter", "week", "weekday"Defaults to "day". - */ - difference(date1: Date, date2: Date, interval: String): any; - /** - * Returns the number of days in the month used by dateObject - * - * @param dateObject - */ - getDaysInMonth(dateObject: Date): number; - /** - * Get the user's time zone as provided by the browser - * Try to get time zone info from toString or toLocaleString method of - * the Date object -- UTC offset is not a time zone. See - * http://www.twinsun.com/tz/tz-link.htm Note: results may be - * inconsistent across browsers. - * - * @param dateObject Needed because the timezone may vary with time (daylight savings) - */ - getTimezoneName(dateObject: Date): any; - /** - * Determines if the year of the dateObject is a leap year - * Leap years are years with an additional day YYYY-02-29, where the - * year number is a multiple of four with the following exception: If - * a year is a multiple of 100, then it is only a leap year if it is - * also a multiple of 400. For example, 1900 was not a leap year, but - * 2000 is one. - * - * @param dateObject - */ - isLeapYear(dateObject: Date): boolean; + script: Object; } /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.dnd.html + * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.fx.html * + * Effects library on top of Base animations * */ - interface dnd { + interface fx { /** - * Used by dojo/dnd/Manager to scroll document or internal node when the user - * drags near the edge of the viewport or a scrollable node + * Collection of easing functions to use beyond the default + * dojo._defaultEasing function. * */ - autoscroll: Object; + easing: Object; + /** + * Chain a list of dojo/_base/fx.Animations to run in sequence + * Return a dojo/_base/fx.Animation which will play all passed + * dojo/_base/fx.Animation instances in sequence, firing its own + * synthesized events simulating a single animation. (eg: + * onEnd of this animation means the end of the chain, + * not the individual animations within) + * + * @param animations + */ + chain(animations: dojo._base.fx.Animation[]): any; + /** + * Combine a list of dojo/_base/fx.Animations to run in parallel + * Combine an array of dojo/_base/fx.Animations to run in parallel, + * providing a new dojo/_base/fx.Animation instance encompasing each + * animation, firing standard animation events. + * + * @param animations + */ + combine(animations: dojo._base.fx.Animation[]): any; + /** + * Slide a node to a new top/left position + * Returns an animation that will slide "node" + * defined in args Object from its current position to + * the position defined by (args.left, args.top). + * + * @param args A hash-map of standard dojo/_base/fx.Animation constructor properties(such as easing: node: duration: and so on). Special args membersare top and left, which indicate the new position to slide to. + */ + slideTo(args: Object): any; /** * */ - move: Object; + Toggler(): void; /** + * Expand a node to it's natural height. + * Returns an animation that will expand the + * node defined in 'args' object from it's current height to + * it's natural height (with no scrollbar). + * Node must have no margin/border/padding. * + * @param args A hash-map of standard dojo/_base/fx.Animation constructor properties(such as easing: node: duration: and so on) */ - AutoSource(): void; + wipeIn(args: Object): any; /** + * Shrink a node to nothing and hide it. + * Returns an animation that will shrink node defined in "args" + * from it's current height to 1px, and then hide it. * + * @param args A hash-map of standard dojo/_base/fx.Animation constructor properties(such as easing: node: duration: and so on) */ - Avatar(): void; + wipeOut(args: Object): any; + } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.html.html + * + * TODOC + * + */ + interface html { /** + * inserts (replaces) the given content into the given node. dojo/dom-construct.place(cont, node, "only") + * may be a better choice for simple HTML insertion. + * Unless you need to use the params capabilities of this method, you should use + * dojo/dom-construct.place(cont, node, "only"). dojo/dom-construct..place() has more robust support for injecting + * an HTML string into the DOM, but it only handles inserting an HTML string as DOM + * elements, or inserting a DOM node. dojo/dom-construct..place does not handle NodeList insertions + * dojo/dom-construct.place(cont, node, "only"). dojo/dom-construct.place() has more robust support for injecting + * an HTML string into the DOM, but it only handles inserting an HTML string as DOM + * elements, or inserting a DOM node. dojo/dom-construct.place does not handle NodeList insertions + * or the other capabilities as defined by the params object for this method. * + * @param node the parent element that will receive the content + * @param cont the content to be set on the parent element.This can be an html string, a node reference or a NodeList, dojo/NodeList, Array or other enumerable list of nodes + * @param params OptionalOptional flags/properties to configure the content-setting. See dojo/html/_ContentSetter */ - Container(): void; + set(node: HTMLElement, cont: String, params: Object): any; /** + * inserts (replaces) the given content into the given node. dojo/dom-construct.place(cont, node, "only") + * may be a better choice for simple HTML insertion. + * Unless you need to use the params capabilities of this method, you should use + * dojo/dom-construct.place(cont, node, "only"). dojo/dom-construct..place() has more robust support for injecting + * an HTML string into the DOM, but it only handles inserting an HTML string as DOM + * elements, or inserting a DOM node. dojo/dom-construct..place does not handle NodeList insertions + * dojo/dom-construct.place(cont, node, "only"). dojo/dom-construct.place() has more robust support for injecting + * an HTML string into the DOM, but it only handles inserting an HTML string as DOM + * elements, or inserting a DOM node. dojo/dom-construct.place does not handle NodeList insertions + * or the other capabilities as defined by the params object for this method. * + * @param node the parent element that will receive the content + * @param cont the content to be set on the parent element.This can be an html string, a node reference or a NodeList, dojo/NodeList, Array or other enumerable list of nodes + * @param params OptionalOptional flags/properties to configure the content-setting. See dojo/html/_ContentSetter */ - Manager(): void; + set(node: HTMLElement, cont: HTMLElement, params: Object): any; /** + * inserts (replaces) the given content into the given node. dojo/dom-construct.place(cont, node, "only") + * may be a better choice for simple HTML insertion. + * Unless you need to use the params capabilities of this method, you should use + * dojo/dom-construct.place(cont, node, "only"). dojo/dom-construct..place() has more robust support for injecting + * an HTML string into the DOM, but it only handles inserting an HTML string as DOM + * elements, or inserting a DOM node. dojo/dom-construct..place does not handle NodeList insertions + * dojo/dom-construct.place(cont, node, "only"). dojo/dom-construct.place() has more robust support for injecting + * an HTML string into the DOM, but it only handles inserting an HTML string as DOM + * elements, or inserting a DOM node. dojo/dom-construct.place does not handle NodeList insertions + * or the other capabilities as defined by the params object for this method. * + * @param node the parent element that will receive the content + * @param cont the content to be set on the parent element.This can be an html string, a node reference or a NodeList, dojo/NodeList, Array or other enumerable list of nodes + * @param params OptionalOptional flags/properties to configure the content-setting. See dojo/html/_ContentSetter */ - Moveable(): void; - /** - * - */ - Mover(): void; - /** - * - */ - Selector(): void; - /** - * - */ - Source(): void; - /** - * - */ - Target(): void; - /** - * - */ - TimedMoveable(): void; + set(node: HTMLElement, cont: NodeList, params: Object): any; } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.dojox.html @@ -25389,179 +26133,235 @@ declare module dojo { sprintf(format: String, filler: any): void; } /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.fx.html + * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.i18n.html * - * Effects library on top of Base animations + * This module implements the dojo/i18n! plugin and the v1.6- i18n API + * We choose to include our own plugin to leverage functionality already contained in dojo + * and thereby reduce the size of the plugin compared to various loader implementations. Also, this + * allows foreign AMD loaders to be used without their plugins. * */ - interface fx { - /** - * Collection of easing functions to use beyond the default - * dojo._defaultEasing function. - * - */ - easing: Object; - /** - * Chain a list of dojo/_base/fx.Animations to run in sequence - * Return a dojo/_base/fx.Animation which will play all passed - * dojo/_base/fx.Animation instances in sequence, firing its own - * synthesized events simulating a single animation. (eg: - * onEnd of this animation means the end of the chain, - * not the individual animations within) - * - * @param animations - */ - chain(animations: dojo._base.fx.Animation[]): any; - /** - * Combine a list of dojo/_base/fx.Animations to run in parallel - * Combine an array of dojo/_base/fx.Animations to run in parallel, - * providing a new dojo/_base/fx.Animation instance encompasing each - * animation, firing standard animation events. - * - * @param animations - */ - combine(animations: dojo._base.fx.Animation[]): any; - /** - * Slide a node to a new top/left position - * Returns an animation that will slide "node" - * defined in args Object from its current position to - * the position defined by (args.left, args.top). - * - * @param args A hash-map of standard dojo/_base/fx.Animation constructor properties(such as easing: node: duration: and so on). Special args membersare top and left, which indicate the new position to slide to. - */ - slideTo(args: Object): any; + interface i18n { /** * */ - Toggler(): void; + cache: Object; /** - * Expand a node to it's natural height. - * Returns an animation that will expand the - * node defined in 'args' object from it's current height to - * it's natural height (with no scrollbar). - * Node must have no margin/border/padding. * - * @param args A hash-map of standard dojo/_base/fx.Animation constructor properties(such as easing: node: duration: and so on) */ - wipeIn(args: Object): any; + dynamic: boolean; /** - * Shrink a node to nothing and hide it. - * Returns an animation that will shrink node defined in "args" - * from it's current height to 1px, and then hide it. * - * @param args A hash-map of standard dojo/_base/fx.Animation constructor properties(such as easing: node: duration: and so on) */ - wipeOut(args: Object): any; + unitTests: any[]; + /** + * + * @param moduleName + * @param bundleName + * @param locale + */ + getL10nName(moduleName: any, bundleName: any, locale: any): String; + /** + * + * @param moduleName + * @param bundleName + * @param locale + */ + getLocalization(moduleName: any, bundleName: any, locale: any): any; + /** + * id is in one of the following formats + * + * /nls/ + * => load the bundle, localized to config.locale; load all bundles localized to + * config.extraLocale (if any); return the loaded bundle localized to config.locale. + * /nls// + * => load then return the bundle localized to + * preload/nls// + * => for config.locale and all config.extraLocale, load all bundles found + * in the best-matching bundle rollup. A value of 1 is returned, which + * is meaningless other than to say the plugin is executing the requested + * preloads + * + * In cases 1 and 2, is always normalized to an absolute module id upon entry; see + * normalize. In case 3, it is assumed to be absolute; this is arranged by the builder. + * + * To load a bundle means to insert the bundle into the plugin's cache and publish the bundle + * value to the loader. Given , , and a particular , the cache key + * + * /nls// + * will hold the value. Similarly, then plugin will publish this value to the loader by + * + * define("/nls//", ); + * Given this algorithm, other machinery can provide fast load paths be preplacing + * values in the plugin's cache, which is public. When a load is demanded the + * cache is inspected before starting any loading. Explicitly placing values in the plugin + * cache is an advanced/experimental feature that should not be needed; use at your own risk. + * + * For the normal AMD algorithm, the root bundle is loaded first, which instructs the + * plugin what additional localized bundles are required for a particular locale. These + * additional locales are loaded and a mix of the root and each progressively-specific + * locale is returned. For example: + * + * The client demands "dojo/i18n!some/path/nls/someBundle + * The loader demands load(some/path/nls/someBundle) + * This plugin require's "some/path/nls/someBundle", which is the root bundle. + * Assuming config.locale is "ab-cd-ef" and the root bundle indicates that localizations + * are available for "ab" and "ab-cd-ef" (note the missing "ab-cd", then the plugin + * requires "some/path/nls/ab/someBundle" and "some/path/nls/ab-cd-ef/someBundle" + * Upon receiving all required bundles, the plugin constructs the value of the bundle + * ab-cd-ef as... + * mixin(mixin(mixin({}, require("some/path/nls/someBundle"), + * require("some/path/nls/ab/someBundle")), + * require("some/path/nls/ab-cd-ef/someBundle")); + * + * This value is inserted into the cache and published to the loader at the + * key/module-id some/path/nls/someBundle/ab-cd-ef. + * + * The special preload signature (case 3) instructs the plugin to stop servicing all normal requests + * (further preload requests will be serviced) until all ongoing preloading has completed. + * + * The preload signature instructs the plugin that a special rollup module is available that contains + * one or more flattened, localized bundles. The JSON array of available locales indicates which locales + * are available. Here is an example: + * + * *preload*some/path/nls/someModule*["root", "ab", "ab-cd-ef"] + * This indicates the following rollup modules are available: + * + * some/path/nls/someModule_ROOT + * some/path/nls/someModule_ab + * some/path/nls/someModule_ab-cd-ef + * Each of these modules is a normal AMD module that contains one or more flattened bundles in a hash. + * For example, assume someModule contained the bundles some/bundle/path/someBundle and + * some/bundle/path/someOtherBundle, then some/path/nls/someModule_ab would be expressed as follows: + * + * define({ + * some/bundle/path/someBundle:, + * some/bundle/path/someOtherBundle:, + * }); + * E.g., given this design, preloading for locale=="ab" can execute the following algorithm: + * + * require(["some/path/nls/someModule_ab"], function(rollup){ + * for(var p in rollup){ + * var id = p + "/ab", + * cache[id] = rollup[p]; + * define(id, rollup[p]); + * } + * }); + * Similarly, if "ab-cd" is requested, the algorithm can determine that "ab" is the best available and + * load accordingly. + * + * The builder will write such rollups for every layer if a non-empty localeList profile property is + * provided. Further, the builder will include the following cache entry in the cache associated with + * any layer. + * + * "*now":function(r){r(['dojo/i18n!*preload*/nls/*']);} + * The *now special cache module instructs the loader to apply the provided function to context-require + * with respect to the particular layer being defined. This causes the plugin to hold all normal service + * requests until all preloading is complete. + * + * Notice that this algorithm is rarely better than the standard AMD load algorithm. Consider the normal case + * where the target locale has a single segment and a layer depends on a single bundle: + * + * Without Preloads: + * + * Layer loads root bundle. + * bundle is demanded; plugin loads single localized bundle. + * With Preloads: + * + * Layer causes preloading of target bundle. + * bundle is demanded; service is delayed until preloading complete; bundle is returned. + * In each case a single transaction is required to load the target bundle. In cases where multiple bundles + * are required and/or the locale has multiple segments, preloads still requires a single transaction whereas + * the normal path requires an additional transaction for each additional bundle/locale-segment. However all + * of these additional transactions can be done concurrently. Owing to this analysis, the entire preloading + * algorithm can be discard during a build by setting the has feature dojo-preload-i18n-Api to false. + * + * @param id + * @param require + * @param load + */ + load(id: any, require: any, load: any): void; + /** + * id may be relative. + * preload has form *preload*/nls/* and + * therefore never looks like a relative + * + * @param id + * @param toAbsMid + */ + normalize(id: any, toAbsMid: any): any; + /** + * + * @param locale + */ + normalizeLocale(locale: any): any; } /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.html.html + * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.scopeMap.html * - * TODOC * */ - interface html { + interface scopeMap { /** - * inserts (replaces) the given content into the given node. dojo/dom-construct.place(cont, node, "only") - * may be a better choice for simple HTML insertion. - * Unless you need to use the params capabilities of this method, you should use - * dojo/dom-construct.place(cont, node, "only"). dojo/dom-construct..place() has more robust support for injecting - * an HTML string into the DOM, but it only handles inserting an HTML string as DOM - * elements, or inserting a DOM node. dojo/dom-construct..place does not handle NodeList insertions - * dojo/dom-construct.place(cont, node, "only"). dojo/dom-construct.place() has more robust support for injecting - * an HTML string into the DOM, but it only handles inserting an HTML string as DOM - * elements, or inserting a DOM node. dojo/dom-construct.place does not handle NodeList insertions - * or the other capabilities as defined by the params object for this method. * - * @param node the parent element that will receive the content - * @param cont the content to be set on the parent element.This can be an html string, a node reference or a NodeList, dojo/NodeList, Array or other enumerable list of nodes - * @param params OptionalOptional flags/properties to configure the content-setting. See dojo/html/_ContentSetter */ - set(node: HTMLElement, cont: String, params: Object): any; + dijit: any[]; /** - * inserts (replaces) the given content into the given node. dojo/dom-construct.place(cont, node, "only") - * may be a better choice for simple HTML insertion. - * Unless you need to use the params capabilities of this method, you should use - * dojo/dom-construct.place(cont, node, "only"). dojo/dom-construct..place() has more robust support for injecting - * an HTML string into the DOM, but it only handles inserting an HTML string as DOM - * elements, or inserting a DOM node. dojo/dom-construct..place does not handle NodeList insertions - * dojo/dom-construct.place(cont, node, "only"). dojo/dom-construct.place() has more robust support for injecting - * an HTML string into the DOM, but it only handles inserting an HTML string as DOM - * elements, or inserting a DOM node. dojo/dom-construct.place does not handle NodeList insertions - * or the other capabilities as defined by the params object for this method. * - * @param node the parent element that will receive the content - * @param cont the content to be set on the parent element.This can be an html string, a node reference or a NodeList, dojo/NodeList, Array or other enumerable list of nodes - * @param params OptionalOptional flags/properties to configure the content-setting. See dojo/html/_ContentSetter */ - set(node: HTMLElement, cont: HTMLElement, params: Object): any; + dojo: any[]; /** - * inserts (replaces) the given content into the given node. dojo/dom-construct.place(cont, node, "only") - * may be a better choice for simple HTML insertion. - * Unless you need to use the params capabilities of this method, you should use - * dojo/dom-construct.place(cont, node, "only"). dojo/dom-construct..place() has more robust support for injecting - * an HTML string into the DOM, but it only handles inserting an HTML string as DOM - * elements, or inserting a DOM node. dojo/dom-construct..place does not handle NodeList insertions - * dojo/dom-construct.place(cont, node, "only"). dojo/dom-construct.place() has more robust support for injecting - * an HTML string into the DOM, but it only handles inserting an HTML string as DOM - * elements, or inserting a DOM node. dojo/dom-construct.place does not handle NodeList insertions - * or the other capabilities as defined by the params object for this method. * - * @param node the parent element that will receive the content - * @param cont the content to be set on the parent element.This can be an html string, a node reference or a NodeList, dojo/NodeList, Array or other enumerable list of nodes - * @param params OptionalOptional flags/properties to configure the content-setting. See dojo/html/_ContentSetter */ - set(node: HTMLElement, cont: NodeList, params: Object): any; + dojox: any[]; } /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.io.html + * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.regexp.html * + * Regular expressions and Builder resources * */ - interface io { + interface regexp { /** + * Builds a regular expression that groups subexpressions + * A utility function used by some of the RE generators. The + * subexpressions are constructed by the function, re, in the second + * parameter. re builds one subexpression for each elem in the array + * a, in the first parameter. Returns a string for a regular + * expression that groups all the subexpressions. * + * @param arr A single value or an array of values. + * @param re A function. Takes one parameter and converts it to a regularexpression. + * @param nonCapture OptionalIf true, uses non-capturing match, otherwise matches are retainedby regular expression. Defaults to false */ - iframe: Object; + buildGroupRE(arr: Object, re: Function, nonCapture: boolean): any; /** - * TODOC + * Builds a regular expression that groups subexpressions + * A utility function used by some of the RE generators. The + * subexpressions are constructed by the function, re, in the second + * parameter. re builds one subexpression for each elem in the array + * a, in the first parameter. Returns a string for a regular + * expression that groups all the subexpressions. * + * @param arr A single value or an array of values. + * @param re A function. Takes one parameter and converts it to a regularexpression. + * @param nonCapture OptionalIf true, uses non-capturing match, otherwise matches are retainedby regular expression. Defaults to false */ - script: Object; - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.global.html - * - * Alias for the current window. 'global' can be modified - * for temporary context shifting. See also withGlobal(). - * Use this rather than referring to 'window' to ensure your code runs - * correctly in managed contexts. - * - */ - interface global { + buildGroupRE(arr: any[], re: Function, nonCapture: boolean): any; /** + * Adds escape sequences for special characters in regular expressions * + * @param str + * @param except Optionala String with special characters to be left unescaped */ - $(): any; + escapeString(str: String, except: String): any; /** + * adds group match to expression * - * @param start - * @param data - * @param responseCode - * @param errorMsg + * @param expression + * @param nonCapture OptionalIf true, uses non-capturing match, otherwise matches are retainedby regular expression. */ - GoogleSearchStoreCallback_undefined_NaN(start: any, data: any, responseCode: any, errorMsg: any): void; - /** - * - */ - jQuery(): any; - /** - * - */ - swfIsInHTML(): void; - /** - * - */ - undefined_onload(): void; + group(expression: String, nonCapture: boolean): String; } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.mouseButtons.html @@ -25610,6 +26410,78 @@ declare module dojo { */ isRight(e: Event): boolean; } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.rpc.html + * + * + */ + interface rpc { + /** + * + */ + JsonpService(): void; + /** + * + */ + JsonService(): void; + /** + * + */ + RpcService(): void; + } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.number.html + * + * localized formatting and parsing routines for Number + * + */ + interface number_ { + /** + * Format a Number as a String, using locale-specific settings + * Create a string from a Number using a known localized pattern. + * Formatting patterns appropriate to the locale are chosen from the + * Common Locale Data Repository as well as the appropriate symbols and + * delimiters. + * If value is Infinity, -Infinity, or is not a valid JavaScript number, return null. + * + * @param value the number to be formatted + * @param options OptionalAn object with the following properties:pattern (String, optional): override formatting patternwith this string. Default value is based on locale. Overriding this property will defeatlocalization. Literal characters in patterns are not supported.type (String, optional): choose a format type based on the locale from the following:decimal, scientific (not yet supported), percent, currency. decimal by default.places (Number, optional): fixed number of decimal places to show. This overrides anyinformation in the provided pattern.round (Number, optional): 5 rounds to nearest .5; 0 rounds to nearest whole (default). -1means do not round.locale (String, optional): override the locale used to determine formatting rulesfractional (Boolean, optional): If false, show no decimal places, overriding places and pattern settings. + */ + format(value: number, options: Object): any; + /** + * Convert a properly formatted string to a primitive Number, using + * locale-specific settings. + * Create a Number from a string using a known localized pattern. + * Formatting patterns are chosen appropriate to the locale + * and follow the syntax described by + * unicode.org TR35 + * Note that literal characters in patterns are not supported. + * + * @param expression A string representation of a Number + * @param options OptionalAn object with the following properties:pattern (String, optional): override formatting patternwith this string. Default value is based on locale. Overriding this property will defeatlocalization. Literal characters in patterns are not supported.type (String, optional): choose a format type based on the locale from the following:decimal, scientific (not yet supported), percent, currency. decimal by default.locale (String, optional): override the locale used to determine formatting rulesstrict (Boolean, optional): strict parsing, false by default. Strict parsing requires input as produced by the format() method.Non-strict is more permissive, e.g. flexible on white space, omitting thousands separatorsfractional (Boolean|Array, optional): Whether to include the fractional portion, where the number of decimal places are implied by patternor explicit 'places' parameter. The value [true,false] makes the fractional portion optional. + */ + parse(expression: String, options: Object): number; + /** + * Builds the regular needed to parse a number + * Returns regular expression with positive and negative match, group + * and decimal separators + * + * @param options OptionalAn object with the following properties:pattern (String, optional): override formatting patternwith this string. Default value is based on locale. Overriding this property will defeatlocalization.type (String, optional): choose a format type based on the locale from the following:decimal, scientific (not yet supported), percent, currency. decimal by default.locale (String, optional): override the locale used to determine formatting rulesstrict (Boolean, optional): strict parsing, false by default. Strict parsing requires input as produced by the format() method.Non-strict is more permissive, e.g. flexible on white space, omitting thousands separatorsplaces (Number|String, optional): number of decimal places to accept: Infinity, a positive number, ora range "n,m". Defined by pattern or Infinity if pattern not provided. + */ + regexp(options: Object): any; + /** + * Rounds to the nearest value with the given number of decimal places, away from zero + * Rounds to the nearest value with the given number of decimal places, away from zero if equal. + * Similar to Number.toFixed(), but compensates for browser quirks. Rounding can be done by + * fractional increments also, such as the nearest quarter. + * NOTE: Subject to floating point errors. See dojox/math/round for experimental workaround. + * + * @param value The number to round + * @param places OptionalThe number of decimal places where rounding takes place. Defaults to 0 for whole rounding.Must be non-negative. + * @param increment OptionalRounds next place to nearest value of increment/10. 10 by default. + */ + round(value: number, places: number, increment: number): number; + } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.keys.html * @@ -25876,259 +26748,51 @@ declare module dojo { UP_DPAD: number; } /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.i18n.html + * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.tests.html * - * This module implements the dojo/i18n! plugin and the v1.6- i18n API - * We choose to include our own plugin to leverage functionality already contained in dojo - * and thereby reduce the size of the plugin compared to various loader implementations. Also, this - * allows foreign AMD loaders to be used without their plugins. + * D.O.H. Test files for Dojo unit testing. * */ - interface i18n { - /** - * - */ - cache: Object; - /** - * - */ - dynamic: boolean; - /** - * - */ - unitTests: any[]; - /** - * - * @param moduleName - * @param bundleName - * @param locale - */ - getL10nName(moduleName: any, bundleName: any, locale: any): String; - /** - * - * @param moduleName - * @param bundleName - * @param locale - */ - getLocalization(moduleName: any, bundleName: any, locale: any): any; - /** - * id is in one of the following formats - * - * /nls/ - * => load the bundle, localized to config.locale; load all bundles localized to - * config.extraLocale (if any); return the loaded bundle localized to config.locale. - * /nls// - * => load then return the bundle localized to - * preload/nls// - * => for config.locale and all config.extraLocale, load all bundles found - * in the best-matching bundle rollup. A value of 1 is returned, which - * is meaningless other than to say the plugin is executing the requested - * preloads - * - * In cases 1 and 2, is always normalized to an absolute module id upon entry; see - * normalize. In case 3, it is assumed to be absolute; this is arranged by the builder. - * - * To load a bundle means to insert the bundle into the plugin's cache and publish the bundle - * value to the loader. Given , , and a particular , the cache key - * - * /nls// - * will hold the value. Similarly, then plugin will publish this value to the loader by - * - * define("/nls//", ); - * Given this algorithm, other machinery can provide fast load paths be preplacing - * values in the plugin's cache, which is public. When a load is demanded the - * cache is inspected before starting any loading. Explicitly placing values in the plugin - * cache is an advanced/experimental feature that should not be needed; use at your own risk. - * - * For the normal AMD algorithm, the root bundle is loaded first, which instructs the - * plugin what additional localized bundles are required for a particular locale. These - * additional locales are loaded and a mix of the root and each progressively-specific - * locale is returned. For example: - * - * The client demands "dojo/i18n!some/path/nls/someBundle - * The loader demands load(some/path/nls/someBundle) - * This plugin require's "some/path/nls/someBundle", which is the root bundle. - * Assuming config.locale is "ab-cd-ef" and the root bundle indicates that localizations - * are available for "ab" and "ab-cd-ef" (note the missing "ab-cd", then the plugin - * requires "some/path/nls/ab/someBundle" and "some/path/nls/ab-cd-ef/someBundle" - * Upon receiving all required bundles, the plugin constructs the value of the bundle - * ab-cd-ef as... - * mixin(mixin(mixin({}, require("some/path/nls/someBundle"), - * require("some/path/nls/ab/someBundle")), - * require("some/path/nls/ab-cd-ef/someBundle")); - * - * This value is inserted into the cache and published to the loader at the - * key/module-id some/path/nls/someBundle/ab-cd-ef. - * - * The special preload signature (case 3) instructs the plugin to stop servicing all normal requests - * (further preload requests will be serviced) until all ongoing preloading has completed. - * - * The preload signature instructs the plugin that a special rollup module is available that contains - * one or more flattened, localized bundles. The JSON array of available locales indicates which locales - * are available. Here is an example: - * - * *preload*some/path/nls/someModule*["root", "ab", "ab-cd-ef"] - * This indicates the following rollup modules are available: - * - * some/path/nls/someModule_ROOT - * some/path/nls/someModule_ab - * some/path/nls/someModule_ab-cd-ef - * Each of these modules is a normal AMD module that contains one or more flattened bundles in a hash. - * For example, assume someModule contained the bundles some/bundle/path/someBundle and - * some/bundle/path/someOtherBundle, then some/path/nls/someModule_ab would be expressed as follows: - * - * define({ - * some/bundle/path/someBundle:, - * some/bundle/path/someOtherBundle:, - * }); - * E.g., given this design, preloading for locale=="ab" can execute the following algorithm: - * - * require(["some/path/nls/someModule_ab"], function(rollup){ - * for(var p in rollup){ - * var id = p + "/ab", - * cache[id] = rollup[p]; - * define(id, rollup[p]); - * } - * }); - * Similarly, if "ab-cd" is requested, the algorithm can determine that "ab" is the best available and - * load accordingly. - * - * The builder will write such rollups for every layer if a non-empty localeList profile property is - * provided. Further, the builder will include the following cache entry in the cache associated with - * any layer. - * - * "*now":function(r){r(['dojo/i18n!*preload*/nls/*']);} - * The *now special cache module instructs the loader to apply the provided function to context-require - * with respect to the particular layer being defined. This causes the plugin to hold all normal service - * requests until all preloading is complete. - * - * Notice that this algorithm is rarely better than the standard AMD load algorithm. Consider the normal case - * where the target locale has a single segment and a layer depends on a single bundle: - * - * Without Preloads: - * - * Layer loads root bundle. - * bundle is demanded; plugin loads single localized bundle. - * With Preloads: - * - * Layer causes preloading of target bundle. - * bundle is demanded; service is delayed until preloading complete; bundle is returned. - * In each case a single transaction is required to load the target bundle. In cases where multiple bundles - * are required and/or the locale has multiple segments, preloads still requires a single transaction whereas - * the normal path requires an additional transaction for each additional bundle/locale-segment. However all - * of these additional transactions can be done concurrently. Owing to this analysis, the entire preloading - * algorithm can be discard during a build by setting the has feature dojo-preload-i18n-Api to false. - * - * @param id - * @param require - * @param load - */ - load(id: any, require: any, load: any): void; - /** - * id may be relative. - * preload has form *preload*/nls/* and - * therefore never looks like a relative - * - * @param id - * @param toAbsMid - */ - normalize(id: any, toAbsMid: any): any; - /** - * - * @param locale - */ - normalizeLocale(locale: any): any; + interface tests { } /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.scopeMap.html + * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.version.html * + * Version number of the Dojo Toolkit + * Hash about the version, including + * + * major: Integer: Major version. If total version is "1.2.0beta1", will be 1 + * minor: Integer: Minor version. If total version is "1.2.0beta1", will be 2 + * patch: Integer: Patch version. If total version is "1.2.0beta1", will be 0 + * flag: String: Descriptor flag. If total version is "1.2.0beta1", will be "beta1" + * revision: Number: The Git rev from which dojo was pulled * */ - interface scopeMap { + interface version { /** * */ - dijit: any[]; + flag: string; /** * */ - dojo: any[]; + major: number; /** * */ - dojox: any[]; - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.rpc.html - * - * - */ - interface rpc { + minor: number; /** * */ - JsonpService(): void; + patch: number; /** * */ - JsonService(): void; + revision: number; /** * */ - RpcService(): void; - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.number.html - * - * localized formatting and parsing routines for Number - * - */ - interface number_ { - /** - * Format a Number as a String, using locale-specific settings - * Create a string from a Number using a known localized pattern. - * Formatting patterns appropriate to the locale are chosen from the - * Common Locale Data Repository as well as the appropriate symbols and - * delimiters. - * If value is Infinity, -Infinity, or is not a valid JavaScript number, return null. - * - * @param value the number to be formatted - * @param options OptionalAn object with the following properties:pattern (String, optional): override formatting patternwith this string. Default value is based on locale. Overriding this property will defeatlocalization. Literal characters in patterns are not supported.type (String, optional): choose a format type based on the locale from the following:decimal, scientific (not yet supported), percent, currency. decimal by default.places (Number, optional): fixed number of decimal places to show. This overrides anyinformation in the provided pattern.round (Number, optional): 5 rounds to nearest .5; 0 rounds to nearest whole (default). -1means do not round.locale (String, optional): override the locale used to determine formatting rulesfractional (Boolean, optional): If false, show no decimal places, overriding places and pattern settings. - */ - format(value: number, options: Object): any; - /** - * Convert a properly formatted string to a primitive Number, using - * locale-specific settings. - * Create a Number from a string using a known localized pattern. - * Formatting patterns are chosen appropriate to the locale - * and follow the syntax described by - * unicode.org TR35 - * Note that literal characters in patterns are not supported. - * - * @param expression A string representation of a Number - * @param options OptionalAn object with the following properties:pattern (String, optional): override formatting patternwith this string. Default value is based on locale. Overriding this property will defeatlocalization. Literal characters in patterns are not supported.type (String, optional): choose a format type based on the locale from the following:decimal, scientific (not yet supported), percent, currency. decimal by default.locale (String, optional): override the locale used to determine formatting rulesstrict (Boolean, optional): strict parsing, false by default. Strict parsing requires input as produced by the format() method.Non-strict is more permissive, e.g. flexible on white space, omitting thousands separatorsfractional (Boolean|Array, optional): Whether to include the fractional portion, where the number of decimal places are implied by patternor explicit 'places' parameter. The value [true,false] makes the fractional portion optional. - */ - parse(expression: String, options: Object): number; - /** - * Builds the regular needed to parse a number - * Returns regular expression with positive and negative match, group - * and decimal separators - * - * @param options OptionalAn object with the following properties:pattern (String, optional): override formatting patternwith this string. Default value is based on locale. Overriding this property will defeatlocalization.type (String, optional): choose a format type based on the locale from the following:decimal, scientific (not yet supported), percent, currency. decimal by default.locale (String, optional): override the locale used to determine formatting rulesstrict (Boolean, optional): strict parsing, false by default. Strict parsing requires input as produced by the format() method.Non-strict is more permissive, e.g. flexible on white space, omitting thousands separatorsplaces (Number|String, optional): number of decimal places to accept: Infinity, a positive number, ora range "n,m". Defined by pattern or Infinity if pattern not provided. - */ - regexp(options: Object): any; - /** - * Rounds to the nearest value with the given number of decimal places, away from zero - * Rounds to the nearest value with the given number of decimal places, away from zero if equal. - * Similar to Number.toFixed(), but compensates for browser quirks. Rounding can be done by - * fractional increments also, such as the nearest quarter. - * NOTE: Subject to floating point errors. See dojox/math/round for experimental workaround. - * - * @param value The number to round - * @param places OptionalThe number of decimal places where rounding takes place. Defaults to 0 for whole rounding.Must be non-negative. - * @param increment OptionalRounds next place to nearest value of increment/10. 10 by default. - */ - round(value: number, places: number, increment: number): number; + toString(): String; } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.string.html @@ -26185,53 +26849,6 @@ declare module dojo { */ trim(str: String): String; } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.store.html - * - * - */ - interface store { - /** - * - */ - util: Object; - /** - * - * @param masterStore - * @param cachingStore - * @param options - */ - Cache(masterStore: any, cachingStore: any, options: any): any; - /** - * - */ - DataStore(): void; - /** - * - */ - JsonRest(): void; - /** - * - */ - Memory(): void; - /** - * The Observable store wrapper takes a store and sets an observe method on query() - * results that can be used to monitor results for changes. - * Observable wraps an existing store so that notifications can be made when a query - * is performed. - * - * @param store - */ - Observable(store: dojo.store.api.Store): any; - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.tests.html - * - * D.O.H. Test files for Dojo unit testing. - * - */ - interface tests { - } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.touch.html * @@ -26304,104 +26921,43 @@ declare module dojo { release(node: HTMLElement, listener: Function): any; } /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.gears.html + * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.store.html * - * TODOC * */ - interface gears { - /** - * True if client is using Google Gears - * - */ - available: Object; - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.version.html - * - * Version number of the Dojo Toolkit - * Hash about the version, including - * - * major: Integer: Major version. If total version is "1.2.0beta1", will be 1 - * minor: Integer: Minor version. If total version is "1.2.0beta1", will be 2 - * patch: Integer: Patch version. If total version is "1.2.0beta1", will be 0 - * flag: String: Descriptor flag. If total version is "1.2.0beta1", will be "beta1" - * revision: Number: The Git rev from which dojo was pulled - * - */ - interface version { + interface store { /** * */ - flag: string; + util: Object; + /** + * + * @param masterStore + * @param cachingStore + * @param options + */ + Cache(masterStore: any, cachingStore: any, options: any): any; /** * */ - major: number; + DataStore(): void; /** * */ - minor: number; + JsonRest(): void; /** * */ - patch: number; + Memory(): void; /** + * The Observable store wrapper takes a store and sets an observe method on query() + * results that can be used to monitor results for changes. + * Observable wraps an existing store so that notifications can be made when a query + * is performed. * + * @param store */ - revision: number; - /** - * - */ - toString(): String; - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.regexp.html - * - * Regular expressions and Builder resources - * - */ - interface regexp { - /** - * Builds a regular expression that groups subexpressions - * A utility function used by some of the RE generators. The - * subexpressions are constructed by the function, re, in the second - * parameter. re builds one subexpression for each elem in the array - * a, in the first parameter. Returns a string for a regular - * expression that groups all the subexpressions. - * - * @param arr A single value or an array of values. - * @param re A function. Takes one parameter and converts it to a regularexpression. - * @param nonCapture OptionalIf true, uses non-capturing match, otherwise matches are retainedby regular expression. Defaults to false - */ - buildGroupRE(arr: Object, re: Function, nonCapture: boolean): any; - /** - * Builds a regular expression that groups subexpressions - * A utility function used by some of the RE generators. The - * subexpressions are constructed by the function, re, in the second - * parameter. re builds one subexpression for each elem in the array - * a, in the first parameter. Returns a string for a regular - * expression that groups all the subexpressions. - * - * @param arr A single value or an array of values. - * @param re A function. Takes one parameter and converts it to a regularexpression. - * @param nonCapture OptionalIf true, uses non-capturing match, otherwise matches are retainedby regular expression. Defaults to false - */ - buildGroupRE(arr: any[], re: Function, nonCapture: boolean): any; - /** - * Adds escape sequences for special characters in regular expressions - * - * @param str - * @param except Optionala String with special characters to be left unescaped - */ - escapeString(str: String, except: String): any; - /** - * adds group match to expression - * - * @param expression - * @param nonCapture OptionalIf true, uses non-capturing match, otherwise matches are retainedby regular expression. - */ - group(expression: String, nonCapture: boolean): String; + Observable(store: dojo.store.api.Store): any; } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.window.html @@ -26432,518 +26988,6 @@ declare module dojo { } } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/require.html - * - * - */ - interface require { - /** - * - */ - dynamic: number; - /** - * - */ - load: Object; - /** - * - * @param id - */ - normalize(id: any): any; - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/robotx.html - * - * - */ - interface robotx { - /** - * - */ - doc: Object; - /** - * - */ - mouseWheelSize: number; - /** - * - */ - window: Object; - /** - * Opens the application at the specified URL for testing, redirecting dojo to point to the application - * environment instead of the test environment. - * - * @param url URL to open. Any of the test's dojo.doc calls (e.g. dojo.byId()), and any dijit.registry calls(e.g. dijit.byId()) will point to elements and widgets inside this application. - */ - initRobot(url: String): void; - /** - * Holds down a single key, like SHIFT or 'a'. - * Holds down a single key, like SHIFT or 'a'. - * - * @param charOrCode char/JS keyCode/dojo.keys.* constant for the key you want to hold downWarning: holding down a shifted key, like 'A', can have unpredictable results. - * @param delay OptionalDelay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms:robot.mouseClick({left: true}, 100) // first call; wait 100msrobot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all - */ - keyDown(charOrCode: number, delay: number): void; - /** - * Types a key combination, like SHIFT-TAB. - * Types a key combination, like SHIFT-TAB. - * - * @param charOrCode char/JS keyCode/dojo.keys.* constant for the key you want to press - * @param delay OptionalDelay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms:robot.mouseClick({left: true}, 100) // first call; wait 100msrobot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all - * @param modifiers JSON object that represents all of the modifier keys being pressed.It takes the following Boolean attributes:shiftaltctrlmeta - * @param asynchronous If true, the delay happens asynchronously and immediately, outside of the browser's JavaScript thread and any previous calls.This is useful for interacting with the browser's modal dialogs. - */ - keyPress(charOrCode: number, delay: number, modifiers: Object, asynchronous: boolean): void; - /** - * Releases a single key, like SHIFT or 'a'. - * Releases a single key, like SHIFT or 'a'. - * - * @param charOrCode char/JS keyCode/dojo.keys.* constant for the key you want to releaseWarning: releasing a shifted key, like 'A', can have unpredictable results. - * @param delay OptionalDelay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms:robot.mouseClick({left: true}, 100) // first call; wait 100msrobot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all - */ - keyUp(charOrCode: number, delay: number): void; - /** - * - */ - killRobot(): void; - /** - * Convenience function to do a press/release. - * See robot.mousePress for more info. - * Convenience function to do a press/release. - * See robot.mousePress for more info. - * - * @param buttons - * @param delay Optional - */ - mouseClick(buttons: Object, delay: number): void; - /** - * Moves the mouse to the specified x,y offset relative to the viewport. - * - * @param x x offset relative to the viewport, in pixels, to move the mouse. - * @param y y offset relative to the viewport, in pixels, to move the mouse. - * @param delay OptionalDelay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms:robot.mouseClick({left: true}, 100) // first call; wait 100msrobot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all - * @param duration OptionalApproximate time Robot will spend moving the mouseThe default is 100ms. This also affects how many mousemove events willbe generated, which is the log of the duration. - * @param absolute Boolean indicating whether the x and y values are absolute coordinates.If false, then mouseMove expects that the x,y will be relative to the window. (clientX/Y)If true, then mouseMove expects that the x,y will be absolute. (pageX/Y) - */ - mouseMove(x: number, y: number, delay: number, duration: number, absolute: boolean): void; - /** - * Moves the mouse over the specified node at the specified relative x,y offset. - * Moves the mouse over the specified node at the specified relative x,y offset. - * If you do not specify an offset, mouseMove will default to move to the middle of the node. - * Example: to move the mouse over a ComboBox's down arrow node, call doh.mouseMoveAt(dijit.byId('setvaluetest').downArrowNode); - * - * @param node The id of the node, or the node itself, to move the mouse to.If you pass an id or a function that returns a node, the node will not be evaluated until the movement executes.This is useful if you need to move the mouse to an node that is not yet present. - * @param delay Delay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms:robot.mouseClick({left:true}, 100) // first call; wait 100msrobot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all - * @param duration Approximate time Robot will spend moving the mouseThe default is 100ms. - * @param offsetX x offset relative to the node, in pixels, to move the mouse. The default is half the node's width. - * @param offsetY y offset relative to the node, in pixels, to move the mouse. The default is half the node's height. - */ - mouseMoveAt(node: String, delay: number, duration: number, offsetX: number, offsetY: number): void; - /** - * Moves the mouse over the specified node at the specified relative x,y offset. - * Moves the mouse over the specified node at the specified relative x,y offset. - * If you do not specify an offset, mouseMove will default to move to the middle of the node. - * Example: to move the mouse over a ComboBox's down arrow node, call doh.mouseMoveAt(dijit.byId('setvaluetest').downArrowNode); - * - * @param node The id of the node, or the node itself, to move the mouse to.If you pass an id or a function that returns a node, the node will not be evaluated until the movement executes.This is useful if you need to move the mouse to an node that is not yet present. - * @param delay Delay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms:robot.mouseClick({left:true}, 100) // first call; wait 100msrobot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all - * @param duration Approximate time Robot will spend moving the mouseThe default is 100ms. - * @param offsetX x offset relative to the node, in pixels, to move the mouse. The default is half the node's width. - * @param offsetY y offset relative to the node, in pixels, to move the mouse. The default is half the node's height. - */ - mouseMoveAt(node: HTMLElement, delay: number, duration: number, offsetX: number, offsetY: number): void; - /** - * Moves the mouse over the specified node at the specified relative x,y offset. - * Moves the mouse over the specified node at the specified relative x,y offset. - * If you do not specify an offset, mouseMove will default to move to the middle of the node. - * Example: to move the mouse over a ComboBox's down arrow node, call doh.mouseMoveAt(dijit.byId('setvaluetest').downArrowNode); - * - * @param node The id of the node, or the node itself, to move the mouse to.If you pass an id or a function that returns a node, the node will not be evaluated until the movement executes.This is useful if you need to move the mouse to an node that is not yet present. - * @param delay Delay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms:robot.mouseClick({left:true}, 100) // first call; wait 100msrobot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all - * @param duration Approximate time Robot will spend moving the mouseThe default is 100ms. - * @param offsetX x offset relative to the node, in pixels, to move the mouse. The default is half the node's width. - * @param offsetY y offset relative to the node, in pixels, to move the mouse. The default is half the node's height. - */ - mouseMoveAt(node: Function, delay: number, duration: number, offsetX: number, offsetY: number): void; - /** - * Move the mouse from the current position to the specified point. - * Delays reading contents point until queued command starts running. - * See mouseMove() for details. - * - * @param point x, y position relative to viewport, or if absolute == true, to document - * @param delay Optional - * @param duration Optional - * @param absolute - */ - mouseMoveTo(point: Object, delay: number, duration: number, absolute: boolean): void; - /** - * Presses mouse buttons. - * Presses the mouse buttons you pass as true. - * Example: to press the left mouse button, pass {left: true}. - * Mouse buttons you don't specify keep their previous pressed state. - * - * @param buttons JSON object that represents all of the mouse buttons being pressed.It takes the following Boolean attributes:leftmiddleright - * @param delay OptionalDelay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms:robot.mouseClick({left: true}, 100) // first call; wait 100msrobot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all - */ - mousePress(buttons: Object, delay: number): void; - /** - * Releases mouse buttons. - * Releases the mouse buttons you pass as true. - * Example: to release the left mouse button, pass {left: true}. - * Mouse buttons you don't specify keep their previous pressed state. - * See robot.mousePress for more info. - * - * @param buttons - * @param delay Optional - */ - mouseRelease(buttons: Object, delay: number): void; - /** - * Spins the mouse wheel. - * Spins the wheel wheelAmt "notches." - * Negative wheelAmt scrolls up/away from the user. - * Positive wheelAmt scrolls down/toward the user. - * Note: this will all happen in one event. - * Warning: the size of one mouse wheel notch is an OS setting. - * You can access this size from robot.mouseWheelSize - * - * @param wheelAmt Number of notches to spin the wheel.Negative wheelAmt scrolls up/away from the user.Positive wheelAmt scrolls down/toward the user. - * @param delay OptionalDelay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms: robot.mouseClick({left: true}, 100) // first call; wait 100ms robot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all - * @param duration OptionalApproximate time Robot will spend moving the mouseBy default, the Robot will wheel the mouse as fast as possible. - */ - mouseWheel(wheelAmt: number, delay: number, duration: number): void; - /** - * Scroll the passed node into view, if it is not. - * - * @param node The id of the node, or the node itself, to move the mouse to.If you pass an id or a function that returns a node, the node will not be evaluated until the movement executes.This is useful if you need to move the mouse to an node that is not yet present. - * @param delay Delay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call. - */ - scrollIntoView(node: String, delay: number): void; - /** - * Scroll the passed node into view, if it is not. - * - * @param node The id of the node, or the node itself, to move the mouse to.If you pass an id or a function that returns a node, the node will not be evaluated until the movement executes.This is useful if you need to move the mouse to an node that is not yet present. - * @param delay Delay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call. - */ - scrollIntoView(node: HTMLElement, delay: number): void; - /** - * Scroll the passed node into view, if it is not. - * - * @param node The id of the node, or the node itself, to move the mouse to.If you pass an id or a function that returns a node, the node will not be evaluated until the movement executes.This is useful if you need to move the mouse to an node that is not yet present. - * @param delay Delay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call. - */ - scrollIntoView(node: Function, delay: number): void; - /** - * Defer an action by adding it to the robot's incrementally delayed queue of actions to execute. - * - * @param f A function containing actions you want to defer. It can return a Promiseto delay further actions. - * @param delay OptionalDelay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms:robot.mouseClick({left: true}, 100) // first call; wait 100msrobot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all - * @param duration OptionalDelay to wait after firing. - */ - sequence(f: Function, delay: number, duration: number): void; - /** - * Set clipboard content. - * Set data as clipboard content, overriding anything already there. The - * data will be put to the clipboard using the given format. - * - * @param data New clipboard content to set - * @param format OptionalSet this to "text/html" to put richtext to the clipboard.Otherwise, data is treated as plaintext. By default, plaintextis used. - */ - setClipboard(data: String, format: String): void; - /** - * - */ - startRobot(): any; - /** - * Types a string of characters in order, or types a dojo.keys.* constant. - * Types a string of characters in order, or types a dojo.keys.* constant. - * - * @param chars String of characters to type, or a dojo.keys.* constant - * @param delay OptionalDelay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms:robot.mouseClick({left: true}, 100) // first call; wait 100msrobot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all - * @param duration OptionalTime, in milliseconds, to spend pressing all of the keys.The default is (string length)*50 ms. - */ - typeKeys(chars: String, delay: number, duration: number): void; - /** - * Types a string of characters in order, or types a dojo.keys.* constant. - * Types a string of characters in order, or types a dojo.keys.* constant. - * - * @param chars String of characters to type, or a dojo.keys.* constant - * @param delay OptionalDelay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms:robot.mouseClick({left: true}, 100) // first call; wait 100msrobot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all - * @param duration OptionalTime, in milliseconds, to spend pressing all of the keys.The default is (string length)*50 ms. - */ - typeKeys(chars: number, delay: number, duration: number): void; - /** - * Notifies DOH that the doh.robot is about to make a page change in the application it is driving, - * returning a doh.Deferred object the user should return in their runTest function as part of a DOH test. - * - * @param submitActions The doh.robot will execute the actions the test passes into the submitActions argument (like clicking the submit button),expecting these actions to create a page change (like a form submit).After these actions execute and the resulting page loads, the next test will start. - */ - waitForPageToLoad(submitActions: Function): any; - } - module robotx { - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/robotx._runsemaphore.html - * - * - */ - interface _runsemaphore { - /** - * - */ - lock: any[]; - /** - * - */ - unlock(): any; - } - } - - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/robot.html - * - * - */ - interface robot { - /** - * - */ - doc: Object; - /** - * - */ - mouseWheelSize: number; - /** - * - */ - window: Object; - /** - * Opens the application at the specified URL for testing, redirecting dojo to point to the application - * environment instead of the test environment. - * - * @param url URL to open. Any of the test's dojo.doc calls (e.g. dojo.byId()), and any dijit.registry calls(e.g. dijit.byId()) will point to elements and widgets inside this application. - */ - initRobot(url: String): void; - /** - * Holds down a single key, like SHIFT or 'a'. - * Holds down a single key, like SHIFT or 'a'. - * - * @param charOrCode char/JS keyCode/dojo.keys.* constant for the key you want to hold downWarning: holding down a shifted key, like 'A', can have unpredictable results. - * @param delay OptionalDelay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms:robot.mouseClick({left: true}, 100) // first call; wait 100msrobot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all - */ - keyDown(charOrCode: number, delay: number): void; - /** - * Types a key combination, like SHIFT-TAB. - * Types a key combination, like SHIFT-TAB. - * - * @param charOrCode char/JS keyCode/dojo.keys.* constant for the key you want to press - * @param delay OptionalDelay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms:robot.mouseClick({left: true}, 100) // first call; wait 100msrobot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all - * @param modifiers JSON object that represents all of the modifier keys being pressed.It takes the following Boolean attributes:shiftaltctrlmeta - * @param asynchronous If true, the delay happens asynchronously and immediately, outside of the browser's JavaScript thread and any previous calls.This is useful for interacting with the browser's modal dialogs. - */ - keyPress(charOrCode: number, delay: number, modifiers: Object, asynchronous: boolean): void; - /** - * Releases a single key, like SHIFT or 'a'. - * Releases a single key, like SHIFT or 'a'. - * - * @param charOrCode char/JS keyCode/dojo.keys.* constant for the key you want to releaseWarning: releasing a shifted key, like 'A', can have unpredictable results. - * @param delay OptionalDelay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms:robot.mouseClick({left: true}, 100) // first call; wait 100msrobot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all - */ - keyUp(charOrCode: number, delay: number): void; - /** - * - */ - killRobot(): void; - /** - * Convenience function to do a press/release. - * See robot.mousePress for more info. - * Convenience function to do a press/release. - * See robot.mousePress for more info. - * - * @param buttons - * @param delay Optional - */ - mouseClick(buttons: Object, delay: number): void; - /** - * Moves the mouse to the specified x,y offset relative to the viewport. - * - * @param x x offset relative to the viewport, in pixels, to move the mouse. - * @param y y offset relative to the viewport, in pixels, to move the mouse. - * @param delay OptionalDelay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms:robot.mouseClick({left: true}, 100) // first call; wait 100msrobot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all - * @param duration OptionalApproximate time Robot will spend moving the mouseThe default is 100ms. This also affects how many mousemove events willbe generated, which is the log of the duration. - * @param absolute Boolean indicating whether the x and y values are absolute coordinates.If false, then mouseMove expects that the x,y will be relative to the window. (clientX/Y)If true, then mouseMove expects that the x,y will be absolute. (pageX/Y) - */ - mouseMove(x: number, y: number, delay: number, duration: number, absolute: boolean): void; - /** - * Moves the mouse over the specified node at the specified relative x,y offset. - * Moves the mouse over the specified node at the specified relative x,y offset. - * If you do not specify an offset, mouseMove will default to move to the middle of the node. - * Example: to move the mouse over a ComboBox's down arrow node, call doh.mouseMoveAt(dijit.byId('setvaluetest').downArrowNode); - * - * @param node The id of the node, or the node itself, to move the mouse to.If you pass an id or a function that returns a node, the node will not be evaluated until the movement executes.This is useful if you need to move the mouse to an node that is not yet present. - * @param delay Delay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms:robot.mouseClick({left:true}, 100) // first call; wait 100msrobot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all - * @param duration Approximate time Robot will spend moving the mouseThe default is 100ms. - * @param offsetX x offset relative to the node, in pixels, to move the mouse. The default is half the node's width. - * @param offsetY y offset relative to the node, in pixels, to move the mouse. The default is half the node's height. - */ - mouseMoveAt(node: String, delay: number, duration: number, offsetX: number, offsetY: number): void; - /** - * Moves the mouse over the specified node at the specified relative x,y offset. - * Moves the mouse over the specified node at the specified relative x,y offset. - * If you do not specify an offset, mouseMove will default to move to the middle of the node. - * Example: to move the mouse over a ComboBox's down arrow node, call doh.mouseMoveAt(dijit.byId('setvaluetest').downArrowNode); - * - * @param node The id of the node, or the node itself, to move the mouse to.If you pass an id or a function that returns a node, the node will not be evaluated until the movement executes.This is useful if you need to move the mouse to an node that is not yet present. - * @param delay Delay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms:robot.mouseClick({left:true}, 100) // first call; wait 100msrobot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all - * @param duration Approximate time Robot will spend moving the mouseThe default is 100ms. - * @param offsetX x offset relative to the node, in pixels, to move the mouse. The default is half the node's width. - * @param offsetY y offset relative to the node, in pixels, to move the mouse. The default is half the node's height. - */ - mouseMoveAt(node: HTMLElement, delay: number, duration: number, offsetX: number, offsetY: number): void; - /** - * Moves the mouse over the specified node at the specified relative x,y offset. - * Moves the mouse over the specified node at the specified relative x,y offset. - * If you do not specify an offset, mouseMove will default to move to the middle of the node. - * Example: to move the mouse over a ComboBox's down arrow node, call doh.mouseMoveAt(dijit.byId('setvaluetest').downArrowNode); - * - * @param node The id of the node, or the node itself, to move the mouse to.If you pass an id or a function that returns a node, the node will not be evaluated until the movement executes.This is useful if you need to move the mouse to an node that is not yet present. - * @param delay Delay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms:robot.mouseClick({left:true}, 100) // first call; wait 100msrobot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all - * @param duration Approximate time Robot will spend moving the mouseThe default is 100ms. - * @param offsetX x offset relative to the node, in pixels, to move the mouse. The default is half the node's width. - * @param offsetY y offset relative to the node, in pixels, to move the mouse. The default is half the node's height. - */ - mouseMoveAt(node: Function, delay: number, duration: number, offsetX: number, offsetY: number): void; - /** - * Move the mouse from the current position to the specified point. - * Delays reading contents point until queued command starts running. - * See mouseMove() for details. - * - * @param point x, y position relative to viewport, or if absolute == true, to document - * @param delay Optional - * @param duration Optional - * @param absolute - */ - mouseMoveTo(point: Object, delay: number, duration: number, absolute: boolean): void; - /** - * Presses mouse buttons. - * Presses the mouse buttons you pass as true. - * Example: to press the left mouse button, pass {left: true}. - * Mouse buttons you don't specify keep their previous pressed state. - * - * @param buttons JSON object that represents all of the mouse buttons being pressed.It takes the following Boolean attributes:leftmiddleright - * @param delay OptionalDelay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms:robot.mouseClick({left: true}, 100) // first call; wait 100msrobot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all - */ - mousePress(buttons: Object, delay: number): void; - /** - * Releases mouse buttons. - * Releases the mouse buttons you pass as true. - * Example: to release the left mouse button, pass {left: true}. - * Mouse buttons you don't specify keep their previous pressed state. - * See robot.mousePress for more info. - * - * @param buttons - * @param delay Optional - */ - mouseRelease(buttons: Object, delay: number): void; - /** - * Spins the mouse wheel. - * Spins the wheel wheelAmt "notches." - * Negative wheelAmt scrolls up/away from the user. - * Positive wheelAmt scrolls down/toward the user. - * Note: this will all happen in one event. - * Warning: the size of one mouse wheel notch is an OS setting. - * You can access this size from robot.mouseWheelSize - * - * @param wheelAmt Number of notches to spin the wheel.Negative wheelAmt scrolls up/away from the user.Positive wheelAmt scrolls down/toward the user. - * @param delay OptionalDelay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms: robot.mouseClick({left: true}, 100) // first call; wait 100ms robot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all - * @param duration OptionalApproximate time Robot will spend moving the mouseBy default, the Robot will wheel the mouse as fast as possible. - */ - mouseWheel(wheelAmt: number, delay: number, duration: number): void; - /** - * Scroll the passed node into view, if it is not. - * - * @param node The id of the node, or the node itself, to move the mouse to.If you pass an id or a function that returns a node, the node will not be evaluated until the movement executes.This is useful if you need to move the mouse to an node that is not yet present. - * @param delay Delay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call. - */ - scrollIntoView(node: String, delay: number): void; - /** - * Scroll the passed node into view, if it is not. - * - * @param node The id of the node, or the node itself, to move the mouse to.If you pass an id or a function that returns a node, the node will not be evaluated until the movement executes.This is useful if you need to move the mouse to an node that is not yet present. - * @param delay Delay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call. - */ - scrollIntoView(node: HTMLElement, delay: number): void; - /** - * Scroll the passed node into view, if it is not. - * - * @param node The id of the node, or the node itself, to move the mouse to.If you pass an id or a function that returns a node, the node will not be evaluated until the movement executes.This is useful if you need to move the mouse to an node that is not yet present. - * @param delay Delay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call. - */ - scrollIntoView(node: Function, delay: number): void; - /** - * Defer an action by adding it to the robot's incrementally delayed queue of actions to execute. - * - * @param f A function containing actions you want to defer. It can return a Promiseto delay further actions. - * @param delay OptionalDelay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms:robot.mouseClick({left: true}, 100) // first call; wait 100msrobot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all - * @param duration OptionalDelay to wait after firing. - */ - sequence(f: Function, delay: number, duration: number): void; - /** - * Set clipboard content. - * Set data as clipboard content, overriding anything already there. The - * data will be put to the clipboard using the given format. - * - * @param data New clipboard content to set - * @param format OptionalSet this to "text/html" to put richtext to the clipboard.Otherwise, data is treated as plaintext. By default, plaintextis used. - */ - setClipboard(data: String, format: String): void; - /** - * - */ - startRobot(): any; - /** - * Types a string of characters in order, or types a dojo.keys.* constant. - * Types a string of characters in order, or types a dojo.keys.* constant. - * - * @param chars String of characters to type, or a dojo.keys.* constant - * @param delay OptionalDelay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms:robot.mouseClick({left: true}, 100) // first call; wait 100msrobot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all - * @param duration OptionalTime, in milliseconds, to spend pressing all of the keys.The default is (string length)*50 ms. - */ - typeKeys(chars: String, delay: number, duration: number): void; - /** - * Types a string of characters in order, or types a dojo.keys.* constant. - * Types a string of characters in order, or types a dojo.keys.* constant. - * - * @param chars String of characters to type, or a dojo.keys.* constant - * @param delay OptionalDelay, in milliseconds, to wait before firing.The delay is a delta with respect to the previous automation call.For example, the following code ends after 600ms:robot.mouseClick({left: true}, 100) // first call; wait 100msrobot.typeKeys("dij", 500) // 500ms AFTER previous call; 600ms in all - * @param duration OptionalTime, in milliseconds, to spend pressing all of the keys.The default is (string length)*50 ms. - */ - typeKeys(chars: number, delay: number, duration: number): void; - /** - * Notifies DOH that the doh.robot is about to make a page change in the application it is driving, - * returning a doh.Deferred object the user should return in their runTest function as part of a DOH test. - * - * @param submitActions The doh.robot will execute the actions the test passes into the submitActions argument (like clicking the submit button),expecting these actions to create a page change (like a form submit).After these actions execute and the resulting page loads, the next test will start. - */ - waitForPageToLoad(submitActions: Function): any; - } - module robot { - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/robot._runsemaphore.html - * - * - */ - interface _runsemaphore { - /** - * - */ - lock: any[]; - /** - * - */ - unlock(): any; - } - } - /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/string.html * @@ -27054,6 +27098,23 @@ declare module dojo { */ subscribe(topic: String, listener: Function): any; } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dojo/uacss.html + * + * Applies pre-set CSS classes to the top-level HTML node, based on: + * + * browser (ex: dj_ie) + * browser version (ex: dj_ie6) + * box model (ex: dj_contentBox) + * text direction (ex: dijitRtl) + * In addition, browser, browser version, and box model are + * combined with an RTL flag when browser text is RTL. ex: dj_ie-rtl. + * + * Returns the has() method. + * + */ + interface uacss { + } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/window.html * @@ -27081,23 +27142,6 @@ declare module dojo { */ scrollIntoView(node: HTMLElement, pos: Object): void; } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/uacss.html - * - * Applies pre-set CSS classes to the top-level HTML node, based on: - * - * browser (ex: dj_ie) - * browser version (ex: dj_ie6) - * box model (ex: dj_contentBox) - * text direction (ex: dijitRtl) - * In addition, browser, browser version, and box model are - * combined with an RTL flag when browser text is RTL. ex: dj_ie-rtl. - * - * Returns the has() method. - * - */ - interface uacss { - } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/touch.html * @@ -27171,3 +27215,1135 @@ declare module dojo { } } +declare module "dojo/request" { + var exp: dojo.request + export=exp; +} +declare module "dojo/request.__BaseOptions" { + var exp: dojo.request.__BaseOptions + export=exp; +} +declare module "dojo/request.__MethodOptions" { + var exp: dojo.request.__MethodOptions + export=exp; +} +declare module "dojo/request.__Options" { + var exp: dojo.request.__Options + export=exp; +} +declare module "dojo/request.__Promise" { + var exp: dojo.request.__Promise + export=exp; +} +declare module "dojo/request/handlers" { + var exp: dojo.request.handlers + export=exp; +} +declare module "dojo/request/iframe" { + var exp: dojo.request.iframe + export=exp; +} +declare module "dojo/request/iframe.__MethodOptions" { + var exp: dojo.request.iframe.__MethodOptions + export=exp; +} +declare module "dojo/request/iframe.__BaseOptions" { + var exp: dojo.request.iframe.__BaseOptions + export=exp; +} +declare module "dojo/request/iframe.__Options" { + var exp: dojo.request.iframe.__Options + export=exp; +} +declare module "dojo/request/notify" { + var exp: dojo.request.notify + export=exp; +} +declare module "dojo/request/registry" { + var exp: dojo.request.registry + export=exp; +} +declare module "dojo/request/node" { + var exp: dojo.request.node + export=exp; +} +declare module "dojo/request/node.__MethodOptions" { + var exp: dojo.request.node.__MethodOptions + export=exp; +} +declare module "dojo/request/node.__Options" { + var exp: dojo.request.node.__Options + export=exp; +} +declare module "dojo/request/node.__BaseOptions" { + var exp: dojo.request.node.__BaseOptions + export=exp; +} +declare module "dojo/request/watch" { + var exp: dojo.request.watch + export=exp; +} +declare module "dojo/request/script" { + var exp: dojo.request.script + export=exp; +} +declare module "dojo/request/script.__MethodOptions" { + var exp: dojo.request.script.__MethodOptions + export=exp; +} +declare module "dojo/request/script.__BaseOptions" { + var exp: dojo.request.script.__BaseOptions + export=exp; +} +declare module "dojo/request/script.__Options" { + var exp: dojo.request.script.__Options + export=exp; +} +declare module "dojo/request/xhr" { + var exp: dojo.request.xhr + export=exp; +} +declare module "dojo/request/xhr.__BaseOptions" { + var exp: dojo.request.xhr.__BaseOptions + export=exp; +} +declare module "dojo/request/xhr.__MethodOptions" { + var exp: dojo.request.xhr.__MethodOptions + export=exp; +} +declare module "dojo/request/xhr.__Options" { + var exp: dojo.request.xhr.__Options + export=exp; +} +declare module "dojo/request/default" { + var exp: dojo.request.default_ + export=exp; +} +declare module "dojo/request/util" { + var exp: dojo.request.util + export=exp; +} +declare module "dojo/AdapterRegistry" { + var exp: dojo.AdapterRegistry + export=exp; +} +declare module "dojo/cache" { + var exp: dojo.cache + export=exp; +} +declare module "dojo/cookie" { + var exp: dojo.cookie + export=exp; +} +declare module "dojo/domReady" { + var exp: dojo.domReady + export=exp; +} +declare module "dojo/hash" { + var exp: dojo.hash + export=exp; +} +declare module "dojo/has" { + var exp: dojo.has + export=exp; +} +declare module "dojo/hccss" { + var exp: dojo.hccss + export=exp; +} +declare module "dojo/NodeList-data" { + var exp: dojo.NodeList_data + export=exp; +} +declare module "dojo/NodeList-html" { + var exp: dojo.NodeList_html + export=exp; +} +declare module "dojo/NodeList-fx" { + var exp: dojo.NodeList_fx + export=exp; +} +declare module "dojo/NodeList-dom" { + var exp: dojo.NodeList_dom + export=exp; +} +declare module "dojo/NodeList-manipulate" { + var exp: dojo.NodeList_manipulate + export=exp; +} +declare module "dojo/NodeList-traverse" { + var exp: dojo.NodeList_traverse + export=exp; +} +declare module "dojo/on" { + var exp: dojo.on + export=exp; +} +declare module "dojo/query" { + var exp: dojo.query + export=exp; +} +declare module "dojo/ready" { + var exp: dojo.ready + export=exp; +} +declare module "dojo/sniff" { + var exp: dojo.sniff + export=exp; +} +declare module "dojo/when" { + var exp: dojo.when + export=exp; +} +declare module "dojo/date" { + var exp: dojo.date + export=exp; +} +declare module "dojo/date/stamp" { + var exp: dojo.date.stamp + export=exp; +} +declare module "dojo/date/locale" { + var exp: dojo.date.locale + export=exp; +} +declare module "dojo/date/locale.__FormatOptions" { + var exp: dojo.date.locale.__FormatOptions + export=exp; +} +declare module "dojo/fx" { + var exp: dojo.fx + export=exp; +} +declare module "dojo/fx/Toggler" { + var exp: dojo.fx.Toggler + export=exp; +} +declare module "dojo/fx/easing" { + var exp: dojo.fx.easing + export=exp; +} +declare module "dojo/router" { + var exp: dojo.router + export=exp; +} +declare module "dojo/router/RouterBase" { + var exp: typeof dojo.router.RouterBase + export=exp; +} +declare module "dojo/aspect" { + var exp: dojo.aspect + export=exp; +} +declare module "dojo/back" { + var exp: dojo.back + export=exp; +} +declare module "dojo/colors" { + var exp: dojo.colors + export=exp; +} +declare module "dojo/currency" { + var exp: dojo.currency + export=exp; +} +declare module "dojo/currency.__FormatOptions" { + var exp: dojo.currency.__FormatOptions + export=exp; +} +declare module "dojo/currency.__ParseOptions" { + var exp: dojo.currency.__ParseOptions + export=exp; +} +declare module "dojo/dom" { + var exp: dojo.dom + export=exp; +} +declare module "dojo/dom-attr" { + var exp: dojo.dom_attr + export=exp; +} +declare module "dojo/dom-class" { + var exp: dojo.dom_class + export=exp; +} +declare module "dojo/dom-form" { + var exp: dojo.dom_form + export=exp; +} +declare module "dojo/dom-construct" { + var exp: dojo.dom_construct + export=exp; +} +declare module "dojo/dom-prop" { + var exp: dojo.dom_prop + export=exp; +} +declare module "dojo/dom-prop.names" { + var exp: dojo.dom_prop.names + export=exp; +} +declare module "dojo/dom-style" { + var exp: dojo.dom_style + export=exp; +} +declare module "dojo/dom-geometry" { + var exp: dojo.dom_geometry + export=exp; +} +declare module "dojo/gears" { + var exp: dojo.gears + export=exp; +} +declare module "dojo/gears.available" { + var exp: dojo.gears.available + export=exp; +} +declare module "dojo/html" { + var exp: dojo.html + export=exp; +} +declare module "dojo/html._ContentSetter" { + var exp: dojo.html._ContentSetter + export=exp; +} +declare module "dojo/io-query" { + var exp: dojo.io_query + export=exp; +} +declare module "dojo/i18n" { + var exp: dojo.i18n + export=exp; +} +declare module "dojo/i18n.cache" { + var exp: dojo.i18n.cache + export=exp; +} +declare module "dojo/json" { + var exp: dojo.json + export=exp; +} +declare module "dojo/loadInit" { + var exp: dojo.loadInit + export=exp; +} +declare module "dojo/keys" { + var exp: dojo.keys + export=exp; +} +declare module "dojo/mouse" { + var exp: dojo.mouse + export=exp; +} +declare module "dojo/node" { + var exp: dojo.node + export=exp; +} +declare module "dojo/number" { + var exp: dojo.number_ + export=exp; +} +declare module "dojo/number.__FormatAbsoluteOptions" { + var exp: dojo.number_.__FormatAbsoluteOptions + export=exp; +} +declare module "dojo/number.__IntegerRegexpFlags" { + var exp: dojo.number_.__IntegerRegexpFlags + export=exp; +} +declare module "dojo/number.__FormatOptions" { + var exp: dojo.number_.__FormatOptions + export=exp; +} +declare module "dojo/number.__RealNumberRegexpFlags" { + var exp: dojo.number_.__RealNumberRegexpFlags + export=exp; +} +declare module "dojo/number.__ParseOptions" { + var exp: dojo.number_.__ParseOptions + export=exp; +} +declare module "dojo/number.__RegexpOptions" { + var exp: dojo.number_.__RegexpOptions + export=exp; +} +declare module "dojo/parser" { + var exp: dojo.parser + export=exp; +} +declare module "dojo/regexp" { + var exp: dojo.regexp + export=exp; +} +declare module "dojo/require" { + var exp: dojo.require + export=exp; +} +declare module "dojo/robotx" { + var exp: dojo.robotx + export=exp; +} +declare module "dojo/robotx._runsemaphore" { + var exp: dojo.robotx._runsemaphore + export=exp; +} +declare module "dojo/robot" { + var exp: dojo.robot + export=exp; +} +declare module "dojo/robot._runsemaphore" { + var exp: dojo.robot._runsemaphore + export=exp; +} +declare module "dojo/main" { + var exp: dojo.main + export=exp; +} +declare module "dojo/main.__IoArgs" { + var exp: dojo.main.__IoArgs + export=exp; +} +declare module "dojo/main.__IoCallbackArgs" { + var exp: dojo.main.__IoCallbackArgs + export=exp; +} +declare module "dojo/main.__IoPublish" { + var exp: dojo.main.__IoPublish + export=exp; +} +declare module "dojo/main.__XhrArgs" { + var exp: dojo.main.__XhrArgs + export=exp; +} +declare module "dojo/main.Stateful" { + var exp: dojo.main.Stateful + export=exp; +} +declare module "dojo/main._hasResource" { + var exp: dojo.main._hasResource + export=exp; +} +declare module "dojo/main._contentHandlers" { + var exp: dojo.main._contentHandlers + export=exp; +} +declare module "dojo/main.cldr" { + var exp: dojo.main.cldr + export=exp; +} +declare module "dojo/main._nodeDataCache" { + var exp: dojo.main._nodeDataCache + export=exp; +} +declare module "dojo/main.colors" { + var exp: dojo.main.colors + export=exp; +} +declare module "dojo/main.back" { + var exp: dojo.main.back + export=exp; +} +declare module "dojo/main.data" { + var exp: dojo.main.data + export=exp; +} +declare module "dojo/main.config" { + var exp: dojo.main.config + export=exp; +} +declare module "dojo/main.contentHandlers" { + var exp: dojo.main.contentHandlers + export=exp; +} +declare module "dojo/main.date" { + var exp: dojo.main.date + export=exp; +} +declare module "dojo/main.currency" { + var exp: dojo.main.currency + export=exp; +} +declare module "dojo/main.dnd" { + var exp: dojo.main.dnd + export=exp; +} +declare module "dojo/main.doc" { + var exp: dojo.main.doc + export=exp; +} +declare module "dojo/main.gears" { + var exp: dojo.main.gears + export=exp; +} +declare module "dojo/main.global" { + var exp: dojo.main.global + export=exp; +} +declare module "dojo/main.dijit" { + var exp: dojo.main.dijit + export=exp; +} +declare module "dojo/main.io" { + var exp: dojo.main.io + export=exp; +} +declare module "dojo/main.fx" { + var exp: dojo.main.fx + export=exp; +} +declare module "dojo/main.html" { + var exp: dojo.main.html + export=exp; +} +declare module "dojo/main.dojox" { + var exp: dojo.main.dojox + export=exp; +} +declare module "dojo/main.i18n" { + var exp: dojo.main.i18n + export=exp; +} +declare module "dojo/main.scopeMap" { + var exp: dojo.main.scopeMap + export=exp; +} +declare module "dojo/main.regexp" { + var exp: dojo.main.regexp + export=exp; +} +declare module "dojo/main.mouseButtons" { + var exp: dojo.main.mouseButtons + export=exp; +} +declare module "dojo/main.rpc" { + var exp: dojo.main.rpc + export=exp; +} +declare module "dojo/main.number" { + var exp: dojo.main.number_ + export=exp; +} +declare module "dojo/main.keys" { + var exp: dojo.main.keys + export=exp; +} +declare module "dojo/main.tests" { + var exp: dojo.main.tests + export=exp; +} +declare module "dojo/main.version" { + var exp: dojo.main.version + export=exp; +} +declare module "dojo/main.string" { + var exp: dojo.main.string_ + export=exp; +} +declare module "dojo/main.touch" { + var exp: dojo.main.touch + export=exp; +} +declare module "dojo/main.store" { + var exp: dojo.main.store + export=exp; +} +declare module "dojo/main.window" { + var exp: dojo.main.window + export=exp; +} +declare module "dojo/string" { + var exp: dojo.string_ + export=exp; +} +declare module "dojo/text" { + var exp: dojo.text + export=exp; +} +declare module "dojo/topic" { + var exp: dojo.topic + export=exp; +} +declare module "dojo/uacss" { + var exp: dojo.uacss + export=exp; +} +declare module "dojo/window" { + var exp: dojo.window + export=exp; +} +declare module "dojo/touch" { + var exp: dojo.touch + export=exp; +} +declare module "dojo/DeferredList" { + var exp: typeof dojo.DeferredList + export=exp; +} +declare module "dojo/Deferred" { + var exp: typeof dojo.Deferred + export=exp; +} +declare module "dojo/Evented" { + var exp: typeof dojo.Evented + export=exp; +} +declare module "dojo/NodeList" { + var exp: typeof dojo.NodeList + export=exp; +} +declare module "dojo/NodeList._nodeDataCache" { + var exp: dojo.NodeList._nodeDataCache + export=exp; +} +declare module "dojo/Stateful" { + var exp: typeof dojo.Stateful + export=exp; +} +declare module "dojo/_base/declare" { + var exp: dojo._base.declare + export=exp; +} +declare module "dojo/_base/declare.__DeclareCreatedObject" { + var exp: dojo._base.declare.__DeclareCreatedObject + export=exp; +} +declare module "dojo/_base/Deferred" { + var exp: dojo._base.Deferred + export=exp; +} +declare module "dojo/_base/url" { + var exp: dojo._base.url + export=exp; +} +declare module "dojo/_base/url.authority" { + var exp: dojo._base.url.authority + export=exp; +} +declare module "dojo/_base/url.password" { + var exp: dojo._base.url.password + export=exp; +} +declare module "dojo/_base/url.port" { + var exp: dojo._base.url.port + export=exp; +} +declare module "dojo/_base/url.fragment" { + var exp: dojo._base.url.fragment + export=exp; +} +declare module "dojo/_base/url.query" { + var exp: dojo._base.url.query + export=exp; +} +declare module "dojo/_base/url.user" { + var exp: dojo._base.url.user + export=exp; +} +declare module "dojo/_base/url.scheme" { + var exp: dojo._base.url.scheme + export=exp; +} +declare module "dojo/_base/xhr" { + var exp: dojo._base.xhr + export=exp; +} +declare module "dojo/_base/xhr.contentHandlers" { + var exp: dojo._base.xhr.contentHandlers + export=exp; +} +declare module "dojo/_base/browser" { + var exp: dojo._base.browser + export=exp; +} +declare module "dojo/_base/array" { + var exp: dojo._base.array + export=exp; +} +declare module "dojo/_base/connect" { + var exp: dojo._base.connect + export=exp; +} +declare module "dojo/_base/event" { + var exp: dojo._base.event + export=exp; +} +declare module "dojo/_base/html" { + var exp: dojo._base.html + export=exp; +} +declare module "dojo/_base/json" { + var exp: dojo._base.json + export=exp; +} +declare module "dojo/_base/fx" { + var exp: dojo._base.fx + export=exp; +} +declare module "dojo/_base/query" { + var exp: dojo._base.query + export=exp; +} +declare module "dojo/_base/NodeList" { + var exp: dojo._base.NodeList + export=exp; +} +declare module "dojo/_base/sniff" { + var exp: dojo._base.sniff + export=exp; +} +declare module "dojo/_base/lang" { + var exp: dojo._base.lang + export=exp; +} +declare module "dojo/_base/unload" { + var exp: dojo._base.unload + export=exp; +} +declare module "dojo/_base/window" { + var exp: dojo._base.window + export=exp; +} +declare module "dojo/_base/window.doc" { + var exp: dojo._base.window.doc + export=exp; +} +declare module "dojo/_base/window.global" { + var exp: dojo._base.window.global + export=exp; +} +declare module "dojo/_base/kernel" { + var exp: dojo._base.kernel + export=exp; +} +declare module "dojo/_base/kernel.__IoCallbackArgs" { + var exp: dojo._base.kernel.__IoCallbackArgs + export=exp; +} +declare module "dojo/_base/kernel.__IoPublish" { + var exp: dojo._base.kernel.__IoPublish + export=exp; +} +declare module "dojo/_base/kernel.__IoArgs" { + var exp: dojo._base.kernel.__IoArgs + export=exp; +} +declare module "dojo/_base/kernel.__XhrArgs" { + var exp: dojo._base.kernel.__XhrArgs + export=exp; +} +declare module "dojo/_base/kernel.Stateful" { + var exp: dojo._base.kernel.Stateful + export=exp; +} +declare module "dojo/_base/kernel._contentHandlers" { + var exp: dojo._base.kernel._contentHandlers + export=exp; +} +declare module "dojo/_base/kernel._hasResource" { + var exp: dojo._base.kernel._hasResource + export=exp; +} +declare module "dojo/_base/kernel._nodeDataCache" { + var exp: dojo._base.kernel._nodeDataCache + export=exp; +} +declare module "dojo/_base/kernel.back" { + var exp: dojo._base.kernel.back + export=exp; +} +declare module "dojo/_base/kernel.cldr" { + var exp: dojo._base.kernel.cldr + export=exp; +} +declare module "dojo/_base/kernel.colors" { + var exp: dojo._base.kernel.colors + export=exp; +} +declare module "dojo/_base/kernel.config" { + var exp: dojo._base.kernel.config + export=exp; +} +declare module "dojo/_base/kernel.contentHandlers" { + var exp: dojo._base.kernel.contentHandlers + export=exp; +} +declare module "dojo/_base/kernel.dnd" { + var exp: dojo._base.kernel.dnd + export=exp; +} +declare module "dojo/_base/kernel.date" { + var exp: dojo._base.kernel.date + export=exp; +} +declare module "dojo/_base/kernel.doc" { + var exp: dojo._base.kernel.doc + export=exp; +} +declare module "dojo/_base/kernel.data" { + var exp: dojo._base.kernel.data + export=exp; +} +declare module "dojo/_base/kernel.currency" { + var exp: dojo._base.kernel.currency + export=exp; +} +declare module "dojo/_base/kernel.dijit" { + var exp: dojo._base.kernel.dijit + export=exp; +} +declare module "dojo/_base/kernel.global" { + var exp: dojo._base.kernel.global + export=exp; +} +declare module "dojo/_base/kernel.gears" { + var exp: dojo._base.kernel.gears + export=exp; +} +declare module "dojo/_base/kernel.fx" { + var exp: dojo._base.kernel.fx + export=exp; +} +declare module "dojo/_base/kernel.html" { + var exp: dojo._base.kernel.html + export=exp; +} +declare module "dojo/_base/kernel.io" { + var exp: dojo._base.kernel.io + export=exp; +} +declare module "dojo/_base/kernel.dojox" { + var exp: dojo._base.kernel.dojox + export=exp; +} +declare module "dojo/_base/kernel.i18n" { + var exp: dojo._base.kernel.i18n + export=exp; +} +declare module "dojo/_base/kernel.mouseButtons" { + var exp: dojo._base.kernel.mouseButtons + export=exp; +} +declare module "dojo/_base/kernel.rpc" { + var exp: dojo._base.kernel.rpc + export=exp; +} +declare module "dojo/_base/kernel.regexp" { + var exp: dojo._base.kernel.regexp + export=exp; +} +declare module "dojo/_base/kernel.number" { + var exp: dojo._base.kernel.number_ + export=exp; +} +declare module "dojo/_base/kernel.scopeMap" { + var exp: dojo._base.kernel.scopeMap + export=exp; +} +declare module "dojo/_base/kernel.tests" { + var exp: dojo._base.kernel.tests + export=exp; +} +declare module "dojo/_base/kernel.keys" { + var exp: dojo._base.kernel.keys + export=exp; +} +declare module "dojo/_base/kernel.store" { + var exp: dojo._base.kernel.store + export=exp; +} +declare module "dojo/_base/kernel.string" { + var exp: dojo._base.kernel.string_ + export=exp; +} +declare module "dojo/_base/kernel.version" { + var exp: dojo._base.kernel.version + export=exp; +} +declare module "dojo/_base/kernel.touch" { + var exp: dojo._base.kernel.touch + export=exp; +} +declare module "dojo/_base/kernel.window" { + var exp: dojo._base.kernel.window + export=exp; +} +declare module "dojo/_base/config" { + var exp: dojo._base.config + export=exp; +} +declare module "dojo/_base/config.modulePaths" { + var exp: dojo._base.config.modulePaths + export=exp; +} +declare module "dojo/_base/Color" { + var exp: typeof dojo._base.Color + export=exp; +} +declare module "dojo/_base/Color.named" { + var exp: dojo._base.Color.named + export=exp; +} +declare module "dojo/cldr/monetary" { + var exp: dojo.cldr.monetary + export=exp; +} +declare module "dojo/cldr/supplemental" { + var exp: dojo.cldr.supplemental + export=exp; +} +declare module "dojo/data/ItemFileReadStore" { + var exp: typeof dojo.data.ItemFileReadStore + export=exp; +} +declare module "dojo/data/ObjectStore" { + var exp: typeof dojo.data.ObjectStore + export=exp; +} +declare module "dojo/data/ItemFileWriteStore" { + var exp: typeof dojo.data.ItemFileWriteStore + export=exp; +} +declare module "dojo/data/api/Item" { + var exp: typeof dojo.data.api.Item + export=exp; +} +declare module "dojo/data/api/Identity" { + var exp: typeof dojo.data.api.Identity + export=exp; +} +declare module "dojo/data/api/Request" { + var exp: typeof dojo.data.api.Request + export=exp; +} +declare module "dojo/data/api/Notification" { + var exp: typeof dojo.data.api.Notification + export=exp; +} +declare module "dojo/data/api/Read" { + var exp: typeof dojo.data.api.Read + export=exp; +} +declare module "dojo/data/api/Write" { + var exp: typeof dojo.data.api.Write + export=exp; +} +declare module "dojo/data/util/filter" { + var exp: dojo.data.util.filter + export=exp; +} +declare module "dojo/data/util/simpleFetch" { + var exp: dojo.data.util.simpleFetch + export=exp; +} +declare module "dojo/data/util/sorter" { + var exp: dojo.data.util.sorter + export=exp; +} +declare module "dojo/dnd/autoscroll" { + var exp: dojo.dnd.autoscroll + export=exp; +} +declare module "dojo/dnd/autoscroll._validOverflow" { + var exp: dojo.dnd.autoscroll._validOverflow + export=exp; +} +declare module "dojo/dnd/autoscroll._validNodes" { + var exp: dojo.dnd.autoscroll._validNodes + export=exp; +} +declare module "dojo/dnd/common" { + var exp: dojo.dnd.common + export=exp; +} +declare module "dojo/dnd/common._empty" { + var exp: dojo.dnd.common._empty + export=exp; +} +declare module "dojo/dnd/common._defaultCreatorNodes" { + var exp: dojo.dnd.common._defaultCreatorNodes + export=exp; +} +declare module "dojo/dnd/move" { + var exp: dojo.dnd.move + export=exp; +} +declare module "dojo/dnd/move.parentConstrainedMoveable" { + var exp: dojo.dnd.move.parentConstrainedMoveable + export=exp; +} +declare module "dojo/dnd/move.boxConstrainedMoveable" { + var exp: dojo.dnd.move.boxConstrainedMoveable + export=exp; +} +declare module "dojo/dnd/move.constrainedMoveable" { + var exp: dojo.dnd.move.constrainedMoveable + export=exp; +} +declare module "dojo/dnd/Avatar" { + var exp: typeof dojo.dnd.Avatar + export=exp; +} +declare module "dojo/dnd/Manager" { + var exp: typeof dojo.dnd.Manager + export=exp; +} +declare module "dojo/dnd/Container" { + var exp: typeof dojo.dnd.Container + export=exp; +} +declare module "dojo/dnd/Container.__ContainerArgs" { + var exp: dojo.dnd.Container.__ContainerArgs + export=exp; +} +declare module "dojo/dnd/AutoSource" { + var exp: typeof dojo.dnd.AutoSource + export=exp; +} +declare module "dojo/dnd/Mover" { + var exp: typeof dojo.dnd.Mover + export=exp; +} +declare module "dojo/dnd/Moveable" { + var exp: typeof dojo.dnd.Moveable + export=exp; +} +declare module "dojo/dnd/Moveable.__MoveableArgs" { + var exp: typeof dojo.dnd.Moveable.__MoveableArgs + export=exp; +} +declare module "dojo/dnd/Selector" { + var exp: typeof dojo.dnd.Selector + export=exp; +} +declare module "dojo/dnd/TimedMoveable" { + var exp: typeof dojo.dnd.TimedMoveable + export=exp; +} +declare module "dojo/dnd/Target" { + var exp: typeof dojo.dnd.Target + export=exp; +} +declare module "dojo/dnd/Source" { + var exp: typeof dojo.dnd.Source + export=exp; +} +declare module "dojo/errors/create" { + var exp: dojo.errors.create + export=exp; +} +declare module "dojo/errors/CancelError" { + var exp: dojo.errors.CancelError + export=exp; +} +declare module "dojo/errors/RequestError" { + var exp: dojo.errors.RequestError + export=exp; +} +declare module "dojo/errors/RequestTimeoutError" { + var exp: dojo.errors.RequestTimeoutError + export=exp; +} +declare module "dojo/io/iframe" { + var exp: dojo.io.iframe + export=exp; +} +declare module "dojo/io/script" { + var exp: dojo.io.script + export=exp; +} +declare module "dojo/promise/all" { + var exp: dojo.promise.all + export=exp; +} +declare module "dojo/promise/first" { + var exp: dojo.promise.first + export=exp; +} +declare module "dojo/promise/instrumentation" { + var exp: dojo.promise.instrumentation + export=exp; +} +declare module "dojo/promise/tracer" { + var exp: dojo.promise.tracer + export=exp; +} +declare module "dojo/promise/Promise" { + var exp: typeof dojo.promise.Promise + export=exp; +} +declare module "dojo/rpc/JsonpService" { + var exp: typeof dojo.rpc.JsonpService + export=exp; +} +declare module "dojo/rpc/JsonService" { + var exp: typeof dojo.rpc.JsonService + export=exp; +} +declare module "dojo/rpc/RpcService" { + var exp: typeof dojo.rpc.RpcService + export=exp; +} +declare module "dojo/selector/lite" { + var exp: dojo.selector.lite + export=exp; +} +declare module "dojo/selector/acme" { + var exp: dojo.selector.acme + export=exp; +} +declare module "dojo/selector/_loader" { + var exp: dojo.selector._loader + export=exp; +} +declare module "dojo/store/Observable" { + var exp: dojo.store.Observable + export=exp; +} +declare module "dojo/store/Cache" { + var exp: typeof dojo.store.Cache + export=exp; +} +declare module "dojo/store/DataStore" { + var exp: typeof dojo.store.DataStore + export=exp; +} +declare module "dojo/store/Memory" { + var exp: typeof dojo.store.Memory + export=exp; +} +declare module "dojo/store/JsonRest" { + var exp: typeof dojo.store.JsonRest + export=exp; +} +declare module "dojo/store/api/Store" { + var exp: typeof dojo.store.api.Store + export=exp; +} +declare module "dojo/store/api/Store.PutDirectives" { + var exp: typeof dojo.store.api.Store.PutDirectives + export=exp; +} +declare module "dojo/store/api/Store.QueryOptions" { + var exp: typeof dojo.store.api.Store.QueryOptions + export=exp; +} +declare module "dojo/store/api/Store.QueryResults" { + var exp: typeof dojo.store.api.Store.QueryResults + export=exp; +} +declare module "dojo/store/api/Store.SortInformation" { + var exp: typeof dojo.store.api.Store.SortInformation + export=exp; +} +declare module "dojo/store/api/Store.Transaction" { + var exp: typeof dojo.store.api.Store.Transaction + export=exp; +} +declare module "dojo/store/util/QueryResults" { + var exp: dojo.store.util.QueryResults + export=exp; +} +declare module "dojo/store/util/SimpleQueryEngine" { + var exp: dojo.store.util.SimpleQueryEngine + export=exp; +} diff --git a/dojo/dojox.NodeList.d.ts b/dojo/dojox.NodeList.d.ts index 117d700854..6d9101cf31 100644 --- a/dojo/dojox.NodeList.d.ts +++ b/dojo/dojox.NodeList.d.ts @@ -1150,4 +1150,13 @@ declare module dojox { } -} \ No newline at end of file +} + +declare module "dojox/NodeList/delegate" { + var exp: dojox.NodeList.delegate + export=exp; +} +declare module "dojox/NodeList/delegate._nodeDataCache" { + var exp: dojox.NodeList.delegate._nodeDataCache + export=exp; +} diff --git a/dojo/dojox.analytics.d.ts b/dojo/dojox.analytics.d.ts index 5ef374bb74..516b24a03b 100644 --- a/dojo/dojox.analytics.d.ts +++ b/dojo/dojox.analytics.d.ts @@ -75,4 +75,16 @@ declare module dojox { } -} \ No newline at end of file +} +declare module "dojox/analytics" { + var exp: dojox.analytics + export=exp; +} +declare module "dojox/analytics/Urchin" { + var exp: dojox.analytics.Urchin + export=exp; +} +declare module "dojox/analytics/plugins/consoleMessages" { + var exp: dojox.analytics.plugins.consoleMessages + export=exp; +} diff --git a/dojo/dojox.app.d.ts b/dojo/dojox.app.d.ts index 13231ac743..6301955314 100644 --- a/dojo/dojox.app.d.ts +++ b/dojo/dojox.app.d.ts @@ -2298,7 +2298,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -2381,4 +2381,97 @@ declare module dojox { } } -} \ No newline at end of file +} + +declare module "dojox/app/main" { + var exp: dojox.app.main + export=exp; +} +declare module "dojox/app/Controller" { + var exp: dojox.app.Controller + export=exp; +} +declare module "dojox/app/ViewBase" { + var exp: dojox.app.ViewBase + export=exp; +} +declare module "dojox/app/View" { + var exp: dojox.app.View + export=exp; +} +declare module "dojox/app/controllers/BorderLayout" { + var exp: dojox.app.controllers.BorderLayout + export=exp; +} +declare module "dojox/app/controllers/History" { + var exp: dojox.app.controllers.History + export=exp; +} +declare module "dojox/app/controllers/HistoryHash" { + var exp: dojox.app.controllers.HistoryHash + export=exp; +} +declare module "dojox/app/controllers/Layout" { + var exp: dojox.app.controllers.Layout + export=exp; +} +declare module "dojox/app/controllers/LayoutBase" { + var exp: dojox.app.controllers.LayoutBase + export=exp; +} +declare module "dojox/app/controllers/Load" { + var exp: dojox.app.controllers.Load + export=exp; +} +declare module "dojox/app/controllers/Transition" { + var exp: dojox.app.controllers.Transition + export=exp; +} +declare module "dojox/app/module/env" { + var exp: dojox.app.module.env + export=exp; +} +declare module "dojox/app/module/lifecycle" { + var exp: dojox.app.module.lifecycle + export=exp; +} +declare module "dojox/app/utils/mvcModel" { + var exp: dojox.app.utils.mvcModel + export=exp; +} +declare module "dojox/app/utils/nls" { + var exp: dojox.app.utils.nls + export=exp; +} +declare module "dojox/app/utils/model" { + var exp: dojox.app.utils.model + export=exp; +} +declare module "dojox/app/utils/simpleModel" { + var exp: dojox.app.utils.simpleModel + export=exp; +} +declare module "dojox/app/utils/config" { + var exp: dojox.app.utils.config + export=exp; +} +declare module "dojox/app/utils/constraints" { + var exp: dojox.app.utils.constraints + export=exp; +} +declare module "dojox/app/utils/layout" { + var exp: dojox.app.utils.layout + export=exp; +} +declare module "dojox/app/utils/hash" { + var exp: dojox.app.utils.hash + export=exp; +} +declare module "dojox/app/widgets/_ScrollableMixin" { + var exp: dojox.app.widgets._ScrollableMixin + export=exp; +} +declare module "dojox/app/widgets/Container" { + var exp: dojox.app.widgets.Container + export=exp; +} diff --git a/dojo/dojox.atom.d.ts b/dojo/dojox.atom.d.ts index 74f005af5f..296197d9a1 100644 --- a/dojo/dojox.atom.d.ts +++ b/dojo/dojox.atom.d.ts @@ -2444,7 +2444,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -3400,7 +3400,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -4333,7 +4333,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -5173,7 +5173,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -6226,7 +6226,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -7074,7 +7074,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -7224,4 +7224,105 @@ declare module dojox { } -} \ No newline at end of file +} + +declare module "dojox/atom/io/model" { + var exp: dojox.atom.io.model + export=exp; +} +declare module "dojox/atom/io/model.Category" { + var exp: dojox.atom.io.model.Category + export=exp; +} +declare module "dojox/atom/io/model.Content" { + var exp: dojox.atom.io.model.Content + export=exp; +} +declare module "dojox/atom/io/model.AtomItem" { + var exp: dojox.atom.io.model.AtomItem + export=exp; +} +declare module "dojox/atom/io/model.Generator" { + var exp: dojox.atom.io.model.Generator + export=exp; +} +declare module "dojox/atom/io/model.Entry" { + var exp: dojox.atom.io.model.Entry + export=exp; +} +declare module "dojox/atom/io/model.Collection" { + var exp: dojox.atom.io.model.Collection + export=exp; +} +declare module "dojox/atom/io/model.Feed" { + var exp: dojox.atom.io.model.Feed + export=exp; +} +declare module "dojox/atom/io/model.Link" { + var exp: dojox.atom.io.model.Link + export=exp; +} +declare module "dojox/atom/io/model.Node" { + var exp: dojox.atom.io.model.Node + export=exp; +} +declare module "dojox/atom/io/model.Person" { + var exp: dojox.atom.io.model.Person + export=exp; +} +declare module "dojox/atom/io/model.Service" { + var exp: dojox.atom.io.model.Service + export=exp; +} +declare module "dojox/atom/io/model.Workspace" { + var exp: dojox.atom.io.model.Workspace + export=exp; +} +declare module "dojox/atom/io/model._Constants" { + var exp: dojox.atom.io.model._Constants + export=exp; +} +declare module "dojox/atom/io/model._actions" { + var exp: dojox.atom.io.model._actions + export=exp; +} +declare module "dojox/atom/io/model.util" { + var exp: dojox.atom.io.model.util + export=exp; +} +declare module "dojox/atom/io/Connection" { + var exp: dojox.atom.io.Connection + export=exp; +} +declare module "dojox/atom/widget/FeedViewer" { + var exp: dojox.atom.widget.FeedViewer + export=exp; +} +declare module "dojox/atom/widget/FeedViewer.CategoryIncludeFilter" { + var exp: dojox.atom.widget.FeedViewer.CategoryIncludeFilter + export=exp; +} +declare module "dojox/atom/widget/FeedViewer.AtomEntryCategoryFilter" { + var exp: dojox.atom.widget.FeedViewer.AtomEntryCategoryFilter + export=exp; +} +declare module "dojox/atom/widget/FeedViewer.FeedViewerEntry" { + var exp: dojox.atom.widget.FeedViewer.FeedViewerEntry + export=exp; +} +declare module "dojox/atom/widget/FeedViewer.FeedViewerGrouping" { + var exp: dojox.atom.widget.FeedViewer.FeedViewerGrouping + export=exp; +} +declare module "dojox/atom/widget/FeedEntryViewer" { + var exp: dojox.atom.widget.FeedEntryViewer + export=exp; +} +declare module "dojox/atom/widget/FeedEntryViewer.EntryHeader" { + var exp: dojox.atom.widget.FeedEntryViewer.EntryHeader + export=exp; +} +declare module "dojox/atom/widget/FeedEntryEditor" { + var exp: dojox.atom.widget.FeedEntryEditor + export=exp; +} diff --git a/dojo/dojox.av.d.ts b/dojo/dojox.av.d.ts index a98a846aad..c1def65767 100644 --- a/dojo/dojox.av.d.ts +++ b/dojo/dojox.av.d.ts @@ -1135,7 +1135,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -2069,7 +2069,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -2926,7 +2926,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -3761,7 +3761,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -4591,7 +4591,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -5469,7 +5469,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -5655,4 +5655,37 @@ declare module dojox { } -} \ No newline at end of file +} + +declare module "dojox/av/_Media" { + var exp: dojox.av._Media + export=exp; +} +declare module "dojox/av/FLAudio" { + var exp: dojox.av.FLAudio + export=exp; +} +declare module "dojox/av/FLVideo" { + var exp: dojox.av.FLVideo + export=exp; +} +declare module "dojox/av/widget/Player" { + var exp: dojox.av.widget.Player + export=exp; +} +declare module "dojox/av/widget/ProgressSlider" { + var exp: dojox.av.widget.ProgressSlider + export=exp; +} +declare module "dojox/av/widget/PlayButton" { + var exp: dojox.av.widget.PlayButton + export=exp; +} +declare module "dojox/av/widget/Status" { + var exp: dojox.av.widget.Status + export=exp; +} +declare module "dojox/av/widget/VolumeButton" { + var exp: dojox.av.widget.VolumeButton + export=exp; +} diff --git a/dojo/dojox.calc.d.ts b/dojo/dojox.calc.d.ts index bffe546b18..eb6d7c1049 100644 --- a/dojo/dojox.calc.d.ts +++ b/dojo/dojox.calc.d.ts @@ -810,7 +810,7 @@ * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -1627,7 +1627,7 @@ * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -2386,7 +2386,7 @@ * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -3143,7 +3143,7 @@ * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -4006,7 +4006,7 @@ * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -4780,7 +4780,7 @@ * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -5537,7 +5537,7 @@ * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -6400,7 +6400,7 @@ * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -7174,7 +7174,7 @@ * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -7931,7 +7931,7 @@ * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -8794,7 +8794,7 @@ * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -9568,7 +9568,7 @@ * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -10325,7 +10325,7 @@ * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -11188,7 +11188,7 @@ * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -11252,4 +11252,77 @@ } -} \ No newline at end of file +} + +declare module "dojox/calc/_Executor" { + var exp: dojox.calc._Executor + export=exp; +} +declare module "dojox/calc/_Executor._Executor" { + var exp: dojox.calc._Executor._Executor + export=exp; +} +declare module "dojox/calc/_Executor.FuncGen" { + var exp: dojox.calc._Executor.FuncGen + export=exp; +} +declare module "dojox/calc/_Executor.Grapher" { + var exp: dojox.calc._Executor.Grapher + export=exp; +} +declare module "dojox/calc/FuncGen" { + var exp: dojox.calc.FuncGen + export=exp; +} +declare module "dojox/calc/FuncGen._Executor" { + var exp: dojox.calc.FuncGen._Executor + export=exp; +} +declare module "dojox/calc/FuncGen.FuncGen" { + var exp: dojox.calc.FuncGen.FuncGen + export=exp; +} +declare module "dojox/calc/FuncGen.Grapher" { + var exp: dojox.calc.FuncGen.Grapher + export=exp; +} +declare module "dojox/calc/Grapher" { + var exp: dojox.calc.Grapher + export=exp; +} +declare module "dojox/calc/Grapher._Executor" { + var exp: dojox.calc.Grapher._Executor + export=exp; +} +declare module "dojox/calc/Grapher.FuncGen" { + var exp: dojox.calc.Grapher.FuncGen + export=exp; +} +declare module "dojox/calc/Grapher.Grapher" { + var exp: dojox.calc.Grapher.Grapher + export=exp; +} +declare module "dojox/calc/toFrac" { + var exp: dojox.calc.toFrac + export=exp; +} +declare module "dojox/calc/toFrac._Executor" { + var exp: dojox.calc.toFrac._Executor + export=exp; +} +declare module "dojox/calc/toFrac.FuncGen" { + var exp: dojox.calc.toFrac.FuncGen + export=exp; +} +declare module "dojox/calc/toFrac.Grapher" { + var exp: dojox.calc.toFrac.Grapher + export=exp; +} +declare module "dojox/calc/GraphPro" { + var exp: dojox.calc.GraphPro + export=exp; +} +declare module "dojox/calc/Standard" { + var exp: dojox.calc.Standard + export=exp; +} diff --git a/dojo/dojox.calendar.d.ts b/dojo/dojox.calendar.d.ts index c7784b1513..bf657760d7 100644 --- a/dojo/dojox.calendar.d.ts +++ b/dojo/dojox.calendar.d.ts @@ -785,7 +785,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -2141,7 +2141,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -3663,7 +3663,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -4581,7 +4581,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -5347,7 +5347,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -6195,7 +6195,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -7552,7 +7552,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -8504,7 +8504,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -9276,7 +9276,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -10293,7 +10293,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -11701,7 +11701,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -13488,7 +13488,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -15348,7 +15348,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -17155,7 +17155,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -18870,7 +18870,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -20691,7 +20691,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -20921,4 +20921,93 @@ declare module dojox { } } -} \ No newline at end of file +} + +declare module "dojox/calendar/time" { + var exp: dojox.calendar.time + export=exp; +} +declare module "dojox/calendar/_RendererMixin" { + var exp: dojox.calendar._RendererMixin + export=exp; +} +declare module "dojox/calendar/_ScrollBarBase" { + var exp: dojox.calendar._ScrollBarBase + export=exp; +} +declare module "dojox/calendar/ExpandRenderer" { + var exp: dojox.calendar.ExpandRenderer + export=exp; +} +declare module "dojox/calendar/HorizontalRenderer" { + var exp: dojox.calendar.HorizontalRenderer + export=exp; +} +declare module "dojox/calendar/Calendar" { + var exp: dojox.calendar.Calendar + export=exp; +} +declare module "dojox/calendar/Keyboard" { + var exp: dojox.calendar.Keyboard + export=exp; +} +declare module "dojox/calendar/CalendarBase" { + var exp: dojox.calendar.CalendarBase + export=exp; +} +declare module "dojox/calendar/LabelRenderer" { + var exp: dojox.calendar.LabelRenderer + export=exp; +} +declare module "dojox/calendar/MobileHorizontalRenderer" { + var exp: dojox.calendar.MobileHorizontalRenderer + export=exp; +} +declare module "dojox/calendar/MobileVerticalRenderer" { + var exp: dojox.calendar.MobileVerticalRenderer + export=exp; +} +declare module "dojox/calendar/Mouse" { + var exp: dojox.calendar.Mouse + export=exp; +} +declare module "dojox/calendar/MobileCalendar" { + var exp: dojox.calendar.MobileCalendar + export=exp; +} +declare module "dojox/calendar/StoreMixin" { + var exp: dojox.calendar.StoreMixin + export=exp; +} +declare module "dojox/calendar/Touch" { + var exp: dojox.calendar.Touch + export=exp; +} +declare module "dojox/calendar/MatrixView" { + var exp: dojox.calendar.MatrixView + export=exp; +} +declare module "dojox/calendar/VerticalRenderer" { + var exp: dojox.calendar.VerticalRenderer + export=exp; +} +declare module "dojox/calendar/MonthColumnView" { + var exp: dojox.calendar.MonthColumnView + export=exp; +} +declare module "dojox/calendar/SimpleColumnView" { + var exp: dojox.calendar.SimpleColumnView + export=exp; +} +declare module "dojox/calendar/ViewBase" { + var exp: dojox.calendar.ViewBase + export=exp; +} +declare module "dojox/calendar/ColumnView" { + var exp: dojox.calendar.ColumnView + export=exp; +} +declare module "dojox/calendar/ColumnViewSecondarySheet" { + var exp: dojox.calendar.ColumnViewSecondarySheet + export=exp; +} diff --git a/dojo/dojox.charting.d.ts b/dojo/dojox.charting.d.ts index 9dab77d6c6..52df1314e8 100644 --- a/dojo/dojox.charting.d.ts +++ b/dojo/dojox.charting.d.ts @@ -11037,7 +11037,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -11717,7 +11717,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -12394,7 +12394,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -13080,7 +13080,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -13129,4 +13129,329 @@ declare module dojox { } -} \ No newline at end of file +} + +declare module "dojox/charting/Chart3D" { + var exp: dojox.charting.Chart3D + export=exp; +} +declare module "dojox/charting/Chart2D" { + var exp: dojox.charting.Chart2D + export=exp; +} +declare module "dojox/charting/DataSeries" { + var exp: dojox.charting.DataSeries + export=exp; +} +declare module "dojox/charting/Chart" { + var exp: dojox.charting.Chart + export=exp; +} +declare module "dojox/charting/DataChart" { + var exp: dojox.charting.DataChart + export=exp; +} +declare module "dojox/charting/Element" { + var exp: dojox.charting.Element + export=exp; +} +declare module "dojox/charting/Series" { + var exp: dojox.charting.Series + export=exp; +} +declare module "dojox/charting/StoreSeries" { + var exp: dojox.charting.StoreSeries + export=exp; +} +declare module "dojox/charting/SimpleTheme" { + var exp: dojox.charting.SimpleTheme + export=exp; +} +declare module "dojox/charting/SimpleTheme.defaultMarkers" { + var exp: dojox.charting.SimpleTheme.defaultMarkers + export=exp; +} +declare module "dojox/charting/SimpleTheme.defaultTheme" { + var exp: dojox.charting.SimpleTheme.defaultTheme + export=exp; +} +declare module "dojox/charting/Theme" { + var exp: dojox.charting.Theme + export=exp; +} +declare module "dojox/charting/Theme.defaultMarkers" { + var exp: dojox.charting.Theme.defaultMarkers + export=exp; +} +declare module "dojox/charting/Theme.defaultTheme" { + var exp: dojox.charting.Theme.defaultTheme + export=exp; +} +declare module "dojox/charting/action2d/Base" { + var exp: dojox.charting.action2d.Base + export=exp; +} +declare module "dojox/charting/action2d/ChartAction" { + var exp: dojox.charting.action2d.ChartAction + export=exp; +} +declare module "dojox/charting/action2d/_IndicatorElement" { + var exp: dojox.charting.action2d._IndicatorElement + export=exp; +} +declare module "dojox/charting/action2d/Highlight" { + var exp: dojox.charting.action2d.Highlight + export=exp; +} +declare module "dojox/charting/action2d/Magnify" { + var exp: dojox.charting.action2d.Magnify + export=exp; +} +declare module "dojox/charting/action2d/MouseZoomAndPan" { + var exp: dojox.charting.action2d.MouseZoomAndPan + export=exp; +} +declare module "dojox/charting/action2d/MouseIndicator" { + var exp: dojox.charting.action2d.MouseIndicator + export=exp; +} +declare module "dojox/charting/action2d/MoveSlice" { + var exp: dojox.charting.action2d.MoveSlice + export=exp; +} +declare module "dojox/charting/action2d/PlotAction" { + var exp: dojox.charting.action2d.PlotAction + export=exp; +} +declare module "dojox/charting/action2d/Tooltip" { + var exp: dojox.charting.action2d.Tooltip + export=exp; +} +declare module "dojox/charting/action2d/Shake" { + var exp: dojox.charting.action2d.Shake + export=exp; +} +declare module "dojox/charting/action2d/TouchZoomAndPan" { + var exp: dojox.charting.action2d.TouchZoomAndPan + export=exp; +} +declare module "dojox/charting/action2d/TouchIndicator" { + var exp: dojox.charting.action2d.TouchIndicator + export=exp; +} +declare module "dojox/charting/axis2d/common" { + var exp: dojox.charting.axis2d.common + export=exp; +} +declare module "dojox/charting/axis2d/common.createText" { + var exp: dojox.charting.axis2d.common.createText + export=exp; +} +declare module "dojox/charting/axis2d/Base" { + var exp: dojox.charting.axis2d.Base + export=exp; +} +declare module "dojox/charting/axis2d/Invisible" { + var exp: dojox.charting.axis2d.Invisible + export=exp; +} +declare module "dojox/charting/axis2d/Default" { + var exp: dojox.charting.axis2d.Default + export=exp; +} +declare module "dojox/charting/bidi/_bidiutils" { + var exp: dojox.charting.bidi._bidiutils + export=exp; +} +declare module "dojox/charting/bidi/Chart" { + var exp: dojox.charting.bidi.Chart + export=exp; +} +declare module "dojox/charting/bidi/Chart3D" { + var exp: dojox.charting.bidi.Chart3D + export=exp; +} +declare module "dojox/charting/bidi/action2d/Tooltip" { + var exp: dojox.charting.bidi.action2d.Tooltip + export=exp; +} +declare module "dojox/charting/bidi/action2d/ZoomAndPan" { + var exp: dojox.charting.bidi.action2d.ZoomAndPan + export=exp; +} +declare module "dojox/charting/bidi/axis2d/Default" { + var exp: dojox.charting.bidi.axis2d.Default + export=exp; +} +declare module "dojox/charting/bidi/widget/Chart" { + var exp: dojox.charting.bidi.widget.Chart + export=exp; +} +declare module "dojox/charting/bidi/widget/Legend" { + var exp: dojox.charting.bidi.widget.Legend + export=exp; +} +declare module "dojox/charting/plot2d/common" { + var exp: dojox.charting.plot2d.common + export=exp; +} +declare module "dojox/charting/plot2d/common.defaultStats" { + var exp: dojox.charting.plot2d.common.defaultStats + export=exp; +} +declare module "dojox/charting/plot2d/commonStacked" { + var exp: dojox.charting.plot2d.commonStacked + export=exp; +} +declare module "dojox/charting/plot2d/_PlotEvents" { + var exp: dojox.charting.plot2d._PlotEvents + export=exp; +} +declare module "dojox/charting/plot2d/Areas" { + var exp: dojox.charting.plot2d.Areas + export=exp; +} +declare module "dojox/charting/plot2d/Bars" { + var exp: dojox.charting.plot2d.Bars + export=exp; +} +declare module "dojox/charting/plot2d/Base" { + var exp: dojox.charting.plot2d.Base + export=exp; +} +declare module "dojox/charting/plot2d/Bubble" { + var exp: dojox.charting.plot2d.Bubble + export=exp; +} +declare module "dojox/charting/plot2d/CartesianBase" { + var exp: dojox.charting.plot2d.CartesianBase + export=exp; +} +declare module "dojox/charting/plot2d/Candlesticks" { + var exp: dojox.charting.plot2d.Candlesticks + export=exp; +} +declare module "dojox/charting/plot2d/ClusteredBars" { + var exp: dojox.charting.plot2d.ClusteredBars + export=exp; +} +declare module "dojox/charting/plot2d/ClusteredColumns" { + var exp: dojox.charting.plot2d.ClusteredColumns + export=exp; +} +declare module "dojox/charting/plot2d/Columns" { + var exp: dojox.charting.plot2d.Columns + export=exp; +} +declare module "dojox/charting/plot2d/Grid" { + var exp: dojox.charting.plot2d.Grid + export=exp; +} +declare module "dojox/charting/plot2d/Default" { + var exp: dojox.charting.plot2d.Default + export=exp; +} +declare module "dojox/charting/plot2d/Indicator" { + var exp: dojox.charting.plot2d.Indicator + export=exp; +} +declare module "dojox/charting/plot2d/Lines" { + var exp: dojox.charting.plot2d.Lines + export=exp; +} +declare module "dojox/charting/plot2d/Markers" { + var exp: dojox.charting.plot2d.Markers + export=exp; +} +declare module "dojox/charting/plot2d/Pie" { + var exp: dojox.charting.plot2d.Pie + export=exp; +} +declare module "dojox/charting/plot2d/MarkersOnly" { + var exp: dojox.charting.plot2d.MarkersOnly + export=exp; +} +declare module "dojox/charting/plot2d/OHLC" { + var exp: dojox.charting.plot2d.OHLC + export=exp; +} +declare module "dojox/charting/plot2d/Scatter" { + var exp: dojox.charting.plot2d.Scatter + export=exp; +} +declare module "dojox/charting/plot2d/Stacked" { + var exp: dojox.charting.plot2d.Stacked + export=exp; +} +declare module "dojox/charting/plot2d/Spider" { + var exp: dojox.charting.plot2d.Spider + export=exp; +} +declare module "dojox/charting/plot2d/StackedAreas" { + var exp: dojox.charting.plot2d.StackedAreas + export=exp; +} +declare module "dojox/charting/plot2d/StackedBars" { + var exp: dojox.charting.plot2d.StackedBars + export=exp; +} +declare module "dojox/charting/plot2d/StackedColumns" { + var exp: dojox.charting.plot2d.StackedColumns + export=exp; +} +declare module "dojox/charting/plot2d/StackedLines" { + var exp: dojox.charting.plot2d.StackedLines + export=exp; +} +declare module "dojox/charting/plot3d/Bars" { + var exp: dojox.charting.plot3d.Bars + export=exp; +} +declare module "dojox/charting/plot3d/Base" { + var exp: dojox.charting.plot3d.Base + export=exp; +} +declare module "dojox/charting/plot3d/Cylinders" { + var exp: dojox.charting.plot3d.Cylinders + export=exp; +} +declare module "dojox/charting/scaler/common" { + var exp: dojox.charting.scaler.common + export=exp; +} +declare module "dojox/charting/scaler/primitive" { + var exp: dojox.charting.scaler.primitive + export=exp; +} +declare module "dojox/charting/scaler/linear" { + var exp: dojox.charting.scaler.linear + export=exp; +} +declare module "dojox/charting/themes/common" { + var exp: dojox.charting.themes.common + export=exp; +} +declare module "dojox/charting/themes/gradientGenerator" { + var exp: dojox.charting.themes.gradientGenerator + export=exp; +} +declare module "dojox/charting/themes/PlotKit/base" { + var exp: dojox.charting.themes.PlotKit.base + export=exp; +} +declare module "dojox/charting/widget/Chart2D" { + var exp: dojox.charting.widget.Chart2D + export=exp; +} +declare module "dojox/charting/widget/Chart" { + var exp: dojox.charting.widget.Chart + export=exp; +} +declare module "dojox/charting/widget/Legend" { + var exp: dojox.charting.widget.Legend + export=exp; +} +declare module "dojox/charting/widget/SelectableLegend" { + var exp: dojox.charting.widget.SelectableLegend + export=exp; +} diff --git a/dojo/dojox.collections.d.ts b/dojo/dojox.collections.d.ts index e9fe325427..aad8f555be 100644 --- a/dojo/dojox.collections.d.ts +++ b/dojo/dojox.collections.d.ts @@ -158,4 +158,41 @@ declare module dojox { interface Stack{(arr?: any[]): void} } -} \ No newline at end of file +} + +declare module "dojox/collections" { + var exp: dojox.collections + export=exp; +} +declare module "dojox/collections/ArrayList" { + var exp: dojox.collections.ArrayList + export=exp; +} +declare module "dojox/collections/BinaryTree" { + var exp: dojox.collections.BinaryTree + export=exp; +} +declare module "dojox/collections/BinaryTree.TraversalMethods" { + var exp: dojox.collections.BinaryTree.TraversalMethods + export=exp; +} +declare module "dojox/collections/Dictionary" { + var exp: dojox.collections.Dictionary + export=exp; +} +declare module "dojox/collections/Queue" { + var exp: dojox.collections.Queue + export=exp; +} +declare module "dojox/collections/Stack" { + var exp: dojox.collections.Stack + export=exp; +} +declare module "dojox/collections/SortedList" { + var exp: dojox.collections.SortedList + export=exp; +} +declare module "dojox/collections/_base" { + var exp: dojox.collections._base + export=exp; +} diff --git a/dojo/dojox.color.d.ts b/dojo/dojox.color.d.ts index f30e2c00b8..aa8d53ef4d 100644 --- a/dojo/dojox.color.d.ts +++ b/dojo/dojox.color.d.ts @@ -349,4 +349,33 @@ declare module dojox { } -} \ No newline at end of file +} + +declare module "dojox/color" { + var exp: dojox.color + export=exp; +} +declare module "dojox/color/MeanColorModel" { + var exp: dojox.color.MeanColorModel + export=exp; +} +declare module "dojox/color/NeutralColorModel" { + var exp: dojox.color.NeutralColorModel + export=exp; +} +declare module "dojox/color/SimpleColorModel" { + var exp: dojox.color.SimpleColorModel + export=exp; +} +declare module "dojox/color/Palette" { + var exp: dojox.color.Palette + export=exp; +} +declare module "dojox/color/Palette.generators" { + var exp: dojox.color.Palette.generators + export=exp; +} +declare module "dojox/color/api/ColorModel" { + var exp: dojox.color.api.ColorModel + export=exp; +} diff --git a/dojo/dojox.css3.d.ts b/dojo/dojox.css3.d.ts index 7ef11a0706..cf256fd8ed 100644 --- a/dojo/dojox.css3.d.ts +++ b/dojo/dojox.css3.d.ts @@ -218,4 +218,29 @@ declare module dojox { } } -} \ No newline at end of file +} + +declare module "dojox/css3/transit" { + var exp: dojox.css3.transit + export=exp; +} +declare module "dojox/css3/transition" { + var exp: dojox.css3.transition + export=exp; +} +declare module "dojox/css3/transition.endState" { + var exp: dojox.css3.transition.endState + export=exp; +} +declare module "dojox/css3/transition.playing" { + var exp: dojox.css3.transition.playing + export=exp; +} +declare module "dojox/css3/transition.startState" { + var exp: dojox.css3.transition.startState + export=exp; +} +declare module "dojox/css3/fx" { + var exp: dojox.css3.fx + export=exp; +} diff --git a/dojo/dojox.data.d.ts b/dojo/dojox.data.d.ts index ab46c4fd73..ed34585fd6 100644 --- a/dojo/dojox.data.d.ts +++ b/dojo/dojox.data.d.ts @@ -6597,4 +6597,185 @@ declare module dojox { } -} \ No newline at end of file +} + +declare module "dojox/data/restListener" { + var exp: dojox.data.restListener + export=exp; +} +declare module "dojox/data/css" { + var exp: dojox.data.css + export=exp; +} +declare module "dojox/data/css.rules" { + var exp: dojox.data.css.rules + export=exp; +} +declare module "dojox/data/dom" { + var exp: dojox.data.dom + export=exp; +} +declare module "dojox/data/GoogleSearchStore" { + var exp: dojox.data.GoogleSearchStore + export=exp; +} +declare module "dojox/data/GoogleSearchStore.ImageSearch" { + var exp: dojox.data.GoogleSearchStore.ImageSearch + export=exp; +} +declare module "dojox/data/GoogleSearchStore.BookSearch" { + var exp: dojox.data.GoogleSearchStore.BookSearch + export=exp; +} +declare module "dojox/data/GoogleSearchStore.LocalSearch" { + var exp: dojox.data.GoogleSearchStore.LocalSearch + export=exp; +} +declare module "dojox/data/GoogleSearchStore.BlogSearch" { + var exp: dojox.data.GoogleSearchStore.BlogSearch + export=exp; +} +declare module "dojox/data/GoogleSearchStore.VideoSearch" { + var exp: dojox.data.GoogleSearchStore.VideoSearch + export=exp; +} +declare module "dojox/data/GoogleSearchStore.Search" { + var exp: dojox.data.GoogleSearchStore.Search + export=exp; +} +declare module "dojox/data/GoogleSearchStore.WebSearch" { + var exp: dojox.data.GoogleSearchStore.WebSearch + export=exp; +} +declare module "dojox/data/GoogleSearchStore.NewsSearch" { + var exp: dojox.data.GoogleSearchStore.NewsSearch + export=exp; +} +declare module "dojox/data/AndOrReadStore" { + var exp: dojox.data.AndOrReadStore + export=exp; +} +declare module "dojox/data/AppStore" { + var exp: dojox.data.AppStore + export=exp; +} +declare module "dojox/data/AndOrWriteStore" { + var exp: dojox.data.AndOrWriteStore + export=exp; +} +declare module "dojox/data/AtomReadStore" { + var exp: dojox.data.AtomReadStore + export=exp; +} +declare module "dojox/data/ClientFilter" { + var exp: dojox.data.ClientFilter + export=exp; +} +declare module "dojox/data/CouchDBRestStore" { + var exp: dojox.data.CouchDBRestStore + export=exp; +} +declare module "dojox/data/CdfStore" { + var exp: dojox.data.CdfStore + export=exp; +} +declare module "dojox/data/CssRuleStore" { + var exp: dojox.data.CssRuleStore + export=exp; +} +declare module "dojox/data/CssClassStore" { + var exp: dojox.data.CssClassStore + export=exp; +} +declare module "dojox/data/CsvStore" { + var exp: dojox.data.CsvStore + export=exp; +} +declare module "dojox/data/FileStore" { + var exp: dojox.data.FileStore + export=exp; +} +declare module "dojox/data/FlickrRestStore" { + var exp: dojox.data.FlickrRestStore + export=exp; +} +declare module "dojox/data/GoogleFeedStore" { + var exp: dojox.data.GoogleFeedStore + export=exp; +} +declare module "dojox/data/FlickrStore" { + var exp: dojox.data.FlickrStore + export=exp; +} +declare module "dojox/data/HtmlStore" { + var exp: dojox.data.HtmlStore + export=exp; +} +declare module "dojox/data/HtmlTableStore" { + var exp: dojox.data.HtmlTableStore + export=exp; +} +declare module "dojox/data/KeyValueStore" { + var exp: dojox.data.KeyValueStore + export=exp; +} +declare module "dojox/data/JsonRestStore" { + var exp: dojox.data.JsonRestStore + export=exp; +} +declare module "dojox/data/JsonQueryRestStore" { + var exp: dojox.data.JsonQueryRestStore + export=exp; +} +declare module "dojox/data/PersevereStore" { + var exp: dojox.data.PersevereStore + export=exp; +} +declare module "dojox/data/OpenSearchStore" { + var exp: dojox.data.OpenSearchStore + export=exp; +} +declare module "dojox/data/PicasaStore" { + var exp: dojox.data.PicasaStore + export=exp; +} +declare module "dojox/data/OpmlStore" { + var exp: dojox.data.OpmlStore + export=exp; +} +declare module "dojox/data/RailsStore" { + var exp: dojox.data.RailsStore + export=exp; +} +declare module "dojox/data/QueryReadStore" { + var exp: dojox.data.QueryReadStore + export=exp; +} +declare module "dojox/data/S3Store" { + var exp: dojox.data.S3Store + export=exp; +} +declare module "dojox/data/SnapLogicStore" { + var exp: dojox.data.SnapLogicStore + export=exp; +} +declare module "dojox/data/XmlItem" { + var exp: dojox.data.XmlItem + export=exp; +} +declare module "dojox/data/ServiceStore" { + var exp: dojox.data.ServiceStore + export=exp; +} +declare module "dojox/data/WikipediaStore" { + var exp: dojox.data.WikipediaStore + export=exp; +} +declare module "dojox/data/XmlStore" { + var exp: dojox.data.XmlStore + export=exp; +} +declare module "dojox/data/util/JsonQuery" { + var exp: dojox.data.util.JsonQuery + export=exp; +} diff --git a/dojo/dojox.date.d.ts b/dojo/dojox.date.d.ts index 571e5ef350..d06c2610e8 100644 --- a/dojo/dojox.date.d.ts +++ b/dojo/dojox.date.d.ts @@ -161,7 +161,7 @@ declare module dojox { * This returns a string representation of the date in "dd, MM, YYYY HH:MM:SS" format * */ - toString(): String; + toString(): string; /** * */ @@ -430,7 +430,7 @@ declare module dojox { * dependencies on dojox.date.locale and dojo.cldr. * */ - toString(): String; + toString(): string; /** * */ @@ -697,7 +697,7 @@ declare module dojox { * This returns a string representation of the date in "DDDD MMMM DD YYYY HH:MM:SS" format * */ - toString(): String; + toString(): string; /** * This function returns The stored time value in milliseconds * since midnight, January 1, 1970 UTC @@ -972,7 +972,7 @@ declare module dojox { * This returns a string representation of the date in "DDDD MMMM DD YYYY HH:MM:SS" format * */ - toString(): String; + toString(): string; /** * This function returns The stored time value in milliseconds * since midnight, January 1, 1970 UTC @@ -1195,7 +1195,7 @@ declare module dojox { * This returns a string representation of the date in "DDDD MMMM DD YYYY HH:MM:SS" format * */ - toString(): String; + toString(): string; /** * This function returns the stored time value in milliseconds * since midnight, January 1, 1970 UTC @@ -1361,4 +1361,81 @@ declare module dojox { } } -} \ No newline at end of file +} + +declare module "dojox/date/buddhist" { + var exp: dojox.date.buddhist + export=exp; +} +declare module "dojox/date/buddhist/Date" { + var exp: dojox.date.buddhist.Date + export=exp; +} +declare module "dojox/date/buddhist/locale" { + var exp: dojox.date.buddhist.locale + export=exp; +} +declare module "dojox/date/hebrew" { + var exp: dojox.date.hebrew + export=exp; +} +declare module "dojox/date/hebrew/Date" { + var exp: dojox.date.hebrew.Date + export=exp; +} +declare module "dojox/date/hebrew/locale" { + var exp: dojox.date.hebrew.locale + export=exp; +} +declare module "dojox/date/hebrew/numerals" { + var exp: dojox.date.hebrew.numerals + export=exp; +} +declare module "dojox/date/islamic" { + var exp: dojox.date.islamic + export=exp; +} +declare module "dojox/date/islamic/Date" { + var exp: dojox.date.islamic.Date + export=exp; +} +declare module "dojox/date/islamic/locale" { + var exp: dojox.date.islamic.locale + export=exp; +} +declare module "dojox/date/persian" { + var exp: dojox.date.persian + export=exp; +} +declare module "dojox/date/persian/Date" { + var exp: dojox.date.persian.Date + export=exp; +} +declare module "dojox/date/persian/locale" { + var exp: dojox.date.persian.locale + export=exp; +} +declare module "dojox/date/umalqura" { + var exp: dojox.date.umalqura + export=exp; +} +declare module "dojox/date/umalqura/Date" { + var exp: dojox.date.umalqura.Date + export=exp; +} +declare module "dojox/date/umalqura/locale" { + var exp: dojox.date.umalqura.locale + export=exp; +} +declare module "dojox/date/php" { + var exp: dojox.date.php + export=exp; +} +declare module "dojox/date/posix" { + var exp: dojox.date.posix + export=exp; +} +declare module "dojox/date/relative" { + var exp: dojox.date.relative + export=exp; +} diff --git a/dojo/dojox.dgauges.d.ts b/dojo/dojox.dgauges.d.ts index e707a282b6..8510b11949 100644 --- a/dojo/dojox.dgauges.d.ts +++ b/dojo/dojox.dgauges.d.ts @@ -1118,7 +1118,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -2462,7 +2462,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -4309,7 +4309,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -5382,7 +5382,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -6252,7 +6252,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -7117,7 +7117,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -7987,7 +7987,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -8860,7 +8860,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -9725,7 +9725,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -10590,7 +10590,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -11460,7 +11460,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -12328,7 +12328,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -13198,7 +13198,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -14063,7 +14063,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -14933,7 +14933,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -15801,7 +15801,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -16671,7 +16671,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -17536,7 +17536,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -18406,7 +18406,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -19276,7 +19276,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -20143,7 +20143,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -21013,7 +21013,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -21883,7 +21883,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -21988,4 +21988,165 @@ declare module dojox { } } -} \ No newline at end of file +} + +declare module "dojox/dgauges/_circularUtils" { + var exp: dojox.dgauges._circularUtils + export=exp; +} +declare module "dojox/dgauges/CircularScale" { + var exp: dojox.dgauges.CircularScale + export=exp; +} +declare module "dojox/dgauges/CircularValueIndicator" { + var exp: dojox.dgauges.CircularValueIndicator + export=exp; +} +declare module "dojox/dgauges/CircularGauge" { + var exp: dojox.dgauges.CircularGauge + export=exp; +} +declare module "dojox/dgauges/CircularRangeIndicator" { + var exp: dojox.dgauges.CircularRangeIndicator + export=exp; +} +declare module "dojox/dgauges/IndicatorBase" { + var exp: dojox.dgauges.IndicatorBase + export=exp; +} +declare module "dojox/dgauges/LinearScaler" { + var exp: dojox.dgauges.LinearScaler + export=exp; +} +declare module "dojox/dgauges/LogScaler" { + var exp: dojox.dgauges.LogScaler + export=exp; +} +declare module "dojox/dgauges/MultiLinearScaler" { + var exp: dojox.dgauges.MultiLinearScaler + export=exp; +} +declare module "dojox/dgauges/GaugeBase" { + var exp: dojox.dgauges.GaugeBase + export=exp; +} +declare module "dojox/dgauges/RectangularScale" { + var exp: dojox.dgauges.RectangularScale + export=exp; +} +declare module "dojox/dgauges/RectangularSegmentedRangeIndicator" { + var exp: dojox.dgauges.RectangularSegmentedRangeIndicator + export=exp; +} +declare module "dojox/dgauges/RectangularRangeIndicator" { + var exp: dojox.dgauges.RectangularRangeIndicator + export=exp; +} +declare module "dojox/dgauges/RectangularValueIndicator" { + var exp: dojox.dgauges.RectangularValueIndicator + export=exp; +} +declare module "dojox/dgauges/ScaleBase" { + var exp: dojox.dgauges.ScaleBase + export=exp; +} +declare module "dojox/dgauges/TextIndicator" { + var exp: dojox.dgauges.TextIndicator + export=exp; +} +declare module "dojox/dgauges/ScaleIndicatorBase" { + var exp: dojox.dgauges.ScaleIndicatorBase + export=exp; +} +declare module "dojox/dgauges/RectangularGauge" { + var exp: dojox.dgauges.RectangularGauge + export=exp; +} +declare module "dojox/dgauges/components/utils" { + var exp: dojox.dgauges.components.utils + export=exp; +} +declare module "dojox/dgauges/components/DefaultPropertiesMixin" { + var exp: dojox.dgauges.components.DefaultPropertiesMixin + export=exp; +} +declare module "dojox/dgauges/components/black/CircularLinearGauge" { + var exp: dojox.dgauges.components.black.CircularLinearGauge + export=exp; +} +declare module "dojox/dgauges/components/black/SemiCircularLinearGauge" { + var exp: dojox.dgauges.components.black.SemiCircularLinearGauge + export=exp; +} +declare module "dojox/dgauges/components/black/HorizontalLinearGauge" { + var exp: dojox.dgauges.components.black.HorizontalLinearGauge + export=exp; +} +declare module "dojox/dgauges/components/black/VerticalLinearGauge" { + var exp: dojox.dgauges.components.black.VerticalLinearGauge + export=exp; +} +declare module "dojox/dgauges/components/classic/CircularLinearGauge" { + var exp: dojox.dgauges.components.classic.CircularLinearGauge + export=exp; +} +declare module "dojox/dgauges/components/classic/HorizontalLinearGauge" { + var exp: dojox.dgauges.components.classic.HorizontalLinearGauge + export=exp; +} +declare module "dojox/dgauges/components/classic/VerticalLinearGauge" { + var exp: dojox.dgauges.components.classic.VerticalLinearGauge + export=exp; +} +declare module "dojox/dgauges/components/classic/SemiCircularLinearGauge" { + var exp: dojox.dgauges.components.classic.SemiCircularLinearGauge + export=exp; +} +declare module "dojox/dgauges/components/default/CircularLinearGauge" { + var exp: dojox.dgauges.components.default_.CircularLinearGauge + export=exp; +} +declare module "dojox/dgauges/components/default/HorizontalLinearGauge" { + var exp: dojox.dgauges.components.default_.HorizontalLinearGauge + export=exp; +} +declare module "dojox/dgauges/components/default/SemiCircularLinearGauge" { + var exp: dojox.dgauges.components.default_.SemiCircularLinearGauge + export=exp; +} +declare module "dojox/dgauges/components/default/VerticalLinearGauge" { + var exp: dojox.dgauges.components.default_.VerticalLinearGauge + export=exp; +} +declare module "dojox/dgauges/components/green/HorizontalLinearGauge" { + var exp: dojox.dgauges.components.green.HorizontalLinearGauge + export=exp; +} +declare module "dojox/dgauges/components/green/CircularLinearGauge" { + var exp: dojox.dgauges.components.green.CircularLinearGauge + export=exp; +} +declare module "dojox/dgauges/components/green/SemiCircularLinearGauge" { + var exp: dojox.dgauges.components.green.SemiCircularLinearGauge + export=exp; +} +declare module "dojox/dgauges/components/green/VerticalLinearGauge" { + var exp: dojox.dgauges.components.green.VerticalLinearGauge + export=exp; +} +declare module "dojox/dgauges/components/grey/CircularLinearGauge" { + var exp: dojox.dgauges.components.grey.CircularLinearGauge + export=exp; +} +declare module "dojox/dgauges/components/grey/SemiCircularLinearGauge" { + var exp: dojox.dgauges.components.grey.SemiCircularLinearGauge + export=exp; +} +declare module "dojox/dgauges/components/grey/HorizontalLinearGauge" { + var exp: dojox.dgauges.components.grey.HorizontalLinearGauge + export=exp; +} +declare module "dojox/dgauges/components/grey/VerticalLinearGauge" { + var exp: dojox.dgauges.components.grey.VerticalLinearGauge + export=exp; +} diff --git a/dojo/dojox.dnd.d.ts b/dojo/dojox.dnd.d.ts index b1529428e3..d7cfa4c0c2 100644 --- a/dojo/dojox.dnd.d.ts +++ b/dojo/dojox.dnd.d.ts @@ -318,4 +318,12 @@ declare module dojox { } } -} \ No newline at end of file +} +declare module "dojox/dnd/BoundingBoxController" { + var exp: dojox.dnd.BoundingBoxController + export=exp; +} +declare module "dojox/dnd/Selector" { + var exp: dojox.dnd.Selector + export=exp; +} diff --git a/dojo/dojox.drawing.d.ts b/dojo/dojox.drawing.d.ts index fc221c4fca..8e1f1daf02 100644 --- a/dojo/dojox.drawing.d.ts +++ b/dojo/dojox.drawing.d.ts @@ -4620,7 +4620,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -14195,4 +14195,401 @@ declare module dojox { } -} \ No newline at end of file +} + +declare module "dojox/drawing" { + var exp: dojox.drawing + export=exp; +} +declare module "dojox/drawing/_base" { + var exp: dojox.drawing._base + export=exp; +} +declare module "dojox/drawing/Drawing" { + var exp: dojox.drawing.Drawing + export=exp; +} +declare module "dojox/drawing/defaults" { + var exp: dojox.drawing.defaults + export=exp; +} +declare module "dojox/drawing/defaults.arrows" { + var exp: dojox.drawing.defaults.arrows + export=exp; +} +declare module "dojox/drawing/defaults.disabled" { + var exp: dojox.drawing.defaults.disabled + export=exp; +} +declare module "dojox/drawing/defaults.anchors" { + var exp: dojox.drawing.defaults.anchors + export=exp; +} +declare module "dojox/drawing/defaults.highlighted" { + var exp: dojox.drawing.defaults.highlighted + export=exp; +} +declare module "dojox/drawing/defaults.button" { + var exp: dojox.drawing.defaults.button + export=exp; +} +declare module "dojox/drawing/defaults.hitSelected" { + var exp: dojox.drawing.defaults.hitSelected + export=exp; +} +declare module "dojox/drawing/defaults.hitNorm" { + var exp: dojox.drawing.defaults.hitNorm + export=exp; +} +declare module "dojox/drawing/defaults.hitHighlighted" { + var exp: dojox.drawing.defaults.hitHighlighted + export=exp; +} +declare module "dojox/drawing/defaults.selected" { + var exp: dojox.drawing.defaults.selected + export=exp; +} +declare module "dojox/drawing/defaults.norm" { + var exp: dojox.drawing.defaults.norm + export=exp; +} +declare module "dojox/drawing/defaults.textMode" { + var exp: dojox.drawing.defaults.textMode + export=exp; +} +declare module "dojox/drawing/defaults.textDisabled" { + var exp: dojox.drawing.defaults.textDisabled + export=exp; +} +declare module "dojox/drawing/defaults.text" { + var exp: dojox.drawing.defaults.text + export=exp; +} +declare module "dojox/drawing/annotations/Label" { + var exp: dojox.drawing.annotations.Label + export=exp; +} +declare module "dojox/drawing/annotations/Label.Label" { + var exp: dojox.drawing.annotations.Label.Label + export=exp; +} +declare module "dojox/drawing/annotations/Angle" { + var exp: dojox.drawing.annotations.Angle + export=exp; +} +declare module "dojox/drawing/annotations/BoxShadow" { + var exp: dojox.drawing.annotations.BoxShadow + export=exp; +} +declare module "dojox/drawing/annotations/Arrow" { + var exp: dojox.drawing.annotations.Arrow + export=exp; +} +declare module "dojox/drawing/library/icons" { + var exp: dojox.drawing.library.icons + export=exp; +} +declare module "dojox/drawing/library/icons.ellipse" { + var exp: dojox.drawing.library.icons.ellipse + export=exp; +} +declare module "dojox/drawing/library/icons.arrow" { + var exp: dojox.drawing.library.icons.arrow + export=exp; +} +declare module "dojox/drawing/library/icons.axes" { + var exp: dojox.drawing.library.icons.axes + export=exp; +} +declare module "dojox/drawing/library/icons.pan" { + var exp: dojox.drawing.library.icons.pan + export=exp; +} +declare module "dojox/drawing/library/icons.line" { + var exp: dojox.drawing.library.icons.line + export=exp; +} +declare module "dojox/drawing/library/icons.path" { + var exp: dojox.drawing.library.icons.path + export=exp; +} +declare module "dojox/drawing/library/icons.equation" { + var exp: dojox.drawing.library.icons.equation + export=exp; +} +declare module "dojox/drawing/library/icons.iconize" { + var exp: dojox.drawing.library.icons.iconize + export=exp; +} +declare module "dojox/drawing/library/icons.pencil" { + var exp: dojox.drawing.library.icons.pencil + export=exp; +} +declare module "dojox/drawing/library/icons.plus" { + var exp: dojox.drawing.library.icons.plus + export=exp; +} +declare module "dojox/drawing/library/icons.triangle" { + var exp: dojox.drawing.library.icons.triangle + export=exp; +} +declare module "dojox/drawing/library/icons.vector" { + var exp: dojox.drawing.library.icons.vector + export=exp; +} +declare module "dojox/drawing/library/icons.rect" { + var exp: dojox.drawing.library.icons.rect + export=exp; +} +declare module "dojox/drawing/library/icons.zoom100" { + var exp: dojox.drawing.library.icons.zoom100 + export=exp; +} +declare module "dojox/drawing/library/icons.textBlock" { + var exp: dojox.drawing.library.icons.textBlock + export=exp; +} +declare module "dojox/drawing/library/icons.zoomIn" { + var exp: dojox.drawing.library.icons.zoomIn + export=exp; +} +declare module "dojox/drawing/library/icons.zoomOut" { + var exp: dojox.drawing.library.icons.zoomOut + export=exp; +} +declare module "dojox/drawing/library/greek" { + var exp: dojox.drawing.library.greek + export=exp; +} +declare module "dojox/drawing/manager/_registry" { + var exp: dojox.drawing.manager._registry + export=exp; +} +declare module "dojox/drawing/manager/keys" { + var exp: dojox.drawing.manager.keys + export=exp; +} +declare module "dojox/drawing/manager/Anchors" { + var exp: dojox.drawing.manager.Anchors + export=exp; +} +declare module "dojox/drawing/manager/Canvas" { + var exp: dojox.drawing.manager.Canvas + export=exp; +} +declare module "dojox/drawing/manager/StencilUI" { + var exp: dojox.drawing.manager.StencilUI + export=exp; +} +declare module "dojox/drawing/manager/Undo" { + var exp: dojox.drawing.manager.Undo + export=exp; +} +declare module "dojox/drawing/manager/Mouse" { + var exp: dojox.drawing.manager.Mouse + export=exp; +} +declare module "dojox/drawing/manager/Stencil" { + var exp: dojox.drawing.manager.Stencil + export=exp; +} +declare module "dojox/drawing/plugins/_Plugin" { + var exp: dojox.drawing.plugins._Plugin + export=exp; +} +declare module "dojox/drawing/plugins/drawing/Grid" { + var exp: dojox.drawing.plugins.drawing.Grid + export=exp; +} +declare module "dojox/drawing/plugins/drawing/GreekPalette" { + var exp: dojox.drawing.plugins.drawing.GreekPalette + export=exp; +} +declare module "dojox/drawing/plugins/tools/Zoom" { + var exp: dojox.drawing.plugins.tools.Zoom + export=exp; +} +declare module "dojox/drawing/plugins/tools/Zoom.Zoom100" { + var exp: dojox.drawing.plugins.tools.Zoom.Zoom100 + export=exp; +} +declare module "dojox/drawing/plugins/tools/Zoom.ZoomOut" { + var exp: dojox.drawing.plugins.tools.Zoom.ZoomOut + export=exp; +} +declare module "dojox/drawing/plugins/tools/Zoom.ZoomIn" { + var exp: dojox.drawing.plugins.tools.Zoom.ZoomIn + export=exp; +} +declare module "dojox/drawing/plugins/tools/Iconize" { + var exp: dojox.drawing.plugins.tools.Iconize + export=exp; +} +declare module "dojox/drawing/plugins/tools/Iconize.setup" { + var exp: dojox.drawing.plugins.tools.Iconize.setup + export=exp; +} +declare module "dojox/drawing/plugins/tools/Pan" { + var exp: dojox.drawing.plugins.tools.Pan + export=exp; +} +declare module "dojox/drawing/plugins/tools/Pan.setup" { + var exp: dojox.drawing.plugins.tools.Pan.setup + export=exp; +} +declare module "dojox/drawing/stencil/_Base" { + var exp: dojox.drawing.stencil._Base + export=exp; +} +declare module "dojox/drawing/stencil/Line" { + var exp: dojox.drawing.stencil.Line + export=exp; +} +declare module "dojox/drawing/stencil/Ellipse" { + var exp: dojox.drawing.stencil.Ellipse + export=exp; +} +declare module "dojox/drawing/stencil/Path" { + var exp: dojox.drawing.stencil.Path + export=exp; +} +declare module "dojox/drawing/stencil/Rect" { + var exp: dojox.drawing.stencil.Rect + export=exp; +} +declare module "dojox/drawing/stencil/Image" { + var exp: dojox.drawing.stencil.Image + export=exp; +} +declare module "dojox/drawing/stencil/Text" { + var exp: dojox.drawing.stencil.Text + export=exp; +} +declare module "dojox/drawing/tools/Arrow" { + var exp: dojox.drawing.tools.Arrow + export=exp; +} +declare module "dojox/drawing/tools/Arrow.setup" { + var exp: dojox.drawing.tools.Arrow.setup + export=exp; +} +declare module "dojox/drawing/tools/Ellipse" { + var exp: dojox.drawing.tools.Ellipse + export=exp; +} +declare module "dojox/drawing/tools/Ellipse.setup" { + var exp: dojox.drawing.tools.Ellipse.setup + export=exp; +} +declare module "dojox/drawing/tools/Pencil" { + var exp: dojox.drawing.tools.Pencil + export=exp; +} +declare module "dojox/drawing/tools/Pencil.setup" { + var exp: dojox.drawing.tools.Pencil.setup + export=exp; +} +declare module "dojox/drawing/tools/Rect" { + var exp: dojox.drawing.tools.Rect + export=exp; +} +declare module "dojox/drawing/tools/Rect.setup" { + var exp: dojox.drawing.tools.Rect.setup + export=exp; +} +declare module "dojox/drawing/tools/Path" { + var exp: dojox.drawing.tools.Path + export=exp; +} +declare module "dojox/drawing/tools/Path.setup" { + var exp: dojox.drawing.tools.Path.setup + export=exp; +} +declare module "dojox/drawing/tools/Line" { + var exp: dojox.drawing.tools.Line + export=exp; +} +declare module "dojox/drawing/tools/Line.setup" { + var exp: dojox.drawing.tools.Line.setup + export=exp; +} +declare module "dojox/drawing/tools/TextBlock" { + var exp: dojox.drawing.tools.TextBlock + export=exp; +} +declare module "dojox/drawing/tools/TextBlock.setup" { + var exp: dojox.drawing.tools.TextBlock.setup + export=exp; +} +declare module "dojox/drawing/tools/custom/Axes" { + var exp: dojox.drawing.tools.custom.Axes + export=exp; +} +declare module "dojox/drawing/tools/custom/Axes.setup" { + var exp: dojox.drawing.tools.custom.Axes.setup + export=exp; +} +declare module "dojox/drawing/tools/custom/Vector" { + var exp: dojox.drawing.tools.custom.Vector + export=exp; +} +declare module "dojox/drawing/tools/custom/Vector.setup" { + var exp: dojox.drawing.tools.custom.Vector.setup + export=exp; +} +declare module "dojox/drawing/tools/custom/Equation" { + var exp: dojox.drawing.tools.custom.Equation + export=exp; +} +declare module "dojox/drawing/tools/custom/Equation.setup" { + var exp: dojox.drawing.tools.custom.Equation.setup + export=exp; +} +declare module "dojox/drawing/ui/Button" { + var exp: dojox.drawing.ui.Button + export=exp; +} +declare module "dojox/drawing/ui/Toolbar" { + var exp: dojox.drawing.ui.Toolbar + export=exp; +} +declare module "dojox/drawing/ui/Tooltip" { + var exp: dojox.drawing.ui.Tooltip + export=exp; +} +declare module "dojox/drawing/ui/dom/Toolbar" { + var exp: dojox.drawing.ui.dom.Toolbar + export=exp; +} +declare module "dojox/drawing/ui/dom/Pan" { + var exp: dojox.drawing.ui.dom.Pan + export=exp; +} +declare module "dojox/drawing/ui/dom/Pan.setup" { + var exp: dojox.drawing.ui.dom.Pan.setup + export=exp; +} +declare module "dojox/drawing/ui/dom/Zoom" { + var exp: dojox.drawing.ui.dom.Zoom + export=exp; +} +declare module "dojox/drawing/util/positioning" { + var exp: dojox.drawing.util.positioning + export=exp; +} +declare module "dojox/drawing/util/oo" { + var exp: dojox.drawing.util.oo + export=exp; +} +declare module "dojox/drawing/util/typeset" { + var exp: dojox.drawing.util.typeset + export=exp; +} +declare module "dojox/drawing/util/common" { + var exp: dojox.drawing.util.common + export=exp; +} +declare module "dojox/drawing/util/common.objects" { + var exp: dojox.drawing.util.common.objects + export=exp; +} diff --git a/dojo/dojox.dtl.d.ts b/dojo/dojox.dtl.d.ts index 620ed41ff1..0d12a452f4 100644 --- a/dojo/dojox.dtl.d.ts +++ b/dojo/dojox.dtl.d.ts @@ -1219,7 +1219,7 @@ declare module dojox { * serialization. * */ - toString(): String + toString(): string /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -1823,7 +1823,7 @@ declare module dojox { * serialization. * */ - toString(): String + toString(): string /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -4047,4 +4047,213 @@ declare module dojox { } -} \ No newline at end of file +} + +declare module "dojox/dtl" { + var exp: dojox.dtl + export=exp; +} +declare module "dojox/dtl/_Templated" { + var exp: dojox.dtl._Templated + export=exp; +} +declare module "dojox/dtl/Context" { + var exp: dojox.dtl.Context + export=exp; +} +declare module "dojox/dtl/_DomTemplated" { + var exp: dojox.dtl._DomTemplated + export=exp; +} +declare module "dojox/dtl/DomInline" { + var exp: dojox.dtl.DomInline + export=exp; +} +declare module "dojox/dtl/Inline" { + var exp: dojox.dtl.Inline + export=exp; +} +declare module "dojox/dtl/_base" { + var exp: dojox.dtl._base + export=exp; +} +declare module "dojox/dtl/_base._base" { + var exp: dojox.dtl._base._base + export=exp; +} +declare module "dojox/dtl/_base.BOOLS" { + var exp: dojox.dtl._base.BOOLS + export=exp; +} +declare module "dojox/dtl/_base.data" { + var exp: dojox.dtl._base.data + export=exp; +} +declare module "dojox/dtl/_base.date" { + var exp: dojox.dtl._base.date + export=exp; +} +declare module "dojox/dtl/_base.dates" { + var exp: dojox.dtl._base.dates + export=exp; +} +declare module "dojox/dtl/_base.dijit" { + var exp: dojox.dtl._base.dijit + export=exp; +} +declare module "dojox/dtl/_base.html" { + var exp: dojox.dtl._base.html + export=exp; +} +declare module "dojox/dtl/_base.htmlstrings" { + var exp: dojox.dtl._base.htmlstrings + export=exp; +} +declare module "dojox/dtl/_base.dom" { + var exp: dojox.dtl._base.dom + export=exp; +} +declare module "dojox/dtl/_base.integers" { + var exp: dojox.dtl._base.integers + export=exp; +} +declare module "dojox/dtl/_base.logic" { + var exp: dojox.dtl._base.logic + export=exp; +} +declare module "dojox/dtl/_base.loader" { + var exp: dojox.dtl._base.loader + export=exp; +} +declare module "dojox/dtl/_base.loop" { + var exp: dojox.dtl._base.loop + export=exp; +} +declare module "dojox/dtl/_base.misc" { + var exp: dojox.dtl._base.misc + export=exp; +} +declare module "dojox/dtl/_base.objects" { + var exp: dojox.dtl._base.objects + export=exp; +} +declare module "dojox/dtl/_base.strings" { + var exp: dojox.dtl._base.strings + export=exp; +} +declare module "dojox/dtl/_base.register" { + var exp: dojox.dtl._base.register + export=exp; +} +declare module "dojox/dtl/_base.text" { + var exp: dojox.dtl._base.text + export=exp; +} +declare module "dojox/dtl/dom" { + var exp: dojox.dtl.dom + export=exp; +} +declare module "dojox/dtl/dom._uppers" { + var exp: dojox.dtl.dom._uppers + export=exp; +} +declare module "dojox/dtl/dom._attributes" { + var exp: dojox.dtl.dom._attributes + export=exp; +} +declare module "dojox/dtl/contrib/data" { + var exp: dojox.dtl.contrib.data + export=exp; +} +declare module "dojox/dtl/contrib/objects" { + var exp: dojox.dtl.contrib.objects + export=exp; +} +declare module "dojox/dtl/contrib/dom" { + var exp: dojox.dtl.contrib.dom + export=exp; +} +declare module "dojox/dtl/contrib/dijit" { + var exp: dojox.dtl.contrib.dijit + export=exp; +} +declare module "dojox/dtl/ext-dojo/NodeList" { + var exp: dojox.dtl.ext_dojo.NodeList + export=exp; +} +declare module "dojox/dtl/ext-dojo/NodeList._nodeDataCache" { + var exp: dojox.dtl.ext_dojo.NodeList._nodeDataCache + export=exp; +} +declare module "dojox/dtl/filter/dates" { + var exp: dojox.dtl.filter.dates + export=exp; +} +declare module "dojox/dtl/filter/htmlstrings" { + var exp: dojox.dtl.filter.htmlstrings + export=exp; +} +declare module "dojox/dtl/filter/integers" { + var exp: dojox.dtl.filter.integers + export=exp; +} +declare module "dojox/dtl/filter/logic" { + var exp: dojox.dtl.filter.logic + export=exp; +} +declare module "dojox/dtl/filter/misc" { + var exp: dojox.dtl.filter.misc + export=exp; +} +declare module "dojox/dtl/filter/misc._phone2numeric" { + var exp: dojox.dtl.filter.misc._phone2numeric + export=exp; +} +declare module "dojox/dtl/filter/lists" { + var exp: dojox.dtl.filter.lists + export=exp; +} +declare module "dojox/dtl/filter/strings" { + var exp: dojox.dtl.filter.strings + export=exp; +} +declare module "dojox/dtl/filter/strings._strings" { + var exp: dojox.dtl.filter.strings._strings + export=exp; +} +declare module "dojox/dtl/filter/strings._truncate_singlets" { + var exp: dojox.dtl.filter.strings._truncate_singlets + export=exp; +} +declare module "dojox/dtl/render/html" { + var exp: dojox.dtl.render.html + export=exp; +} +declare module "dojox/dtl/render/dom" { + var exp: dojox.dtl.render.dom + export=exp; +} +declare module "dojox/dtl/tag/date" { + var exp: dojox.dtl.tag.date + export=exp; +} +declare module "dojox/dtl/tag/loader" { + var exp: dojox.dtl.tag.loader + export=exp; +} +declare module "dojox/dtl/tag/logic" { + var exp: dojox.dtl.tag.logic + export=exp; +} +declare module "dojox/dtl/tag/loop" { + var exp: dojox.dtl.tag.loop + export=exp; +} +declare module "dojox/dtl/tag/misc" { + var exp: dojox.dtl.tag.misc + export=exp; +} +declare module "dojox/dtl/utils/date" { + var exp: dojox.dtl.utils.date + export=exp; +} diff --git a/dojo/dojox.editor.d.ts b/dojo/dojox.editor.d.ts index 1c1be7fe6a..6cabae9804 100644 --- a/dojo/dojox.editor.d.ts +++ b/dojo/dojox.editor.d.ts @@ -1235,7 +1235,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -2225,7 +2225,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -3196,7 +3196,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -4090,7 +4090,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -5121,7 +5121,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -5942,7 +5942,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -6790,7 +6790,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -7716,7 +7716,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -9832,7 +9832,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -12047,7 +12047,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -13008,7 +13008,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -13967,7 +13967,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -15154,7 +15154,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -15302,4 +15302,173 @@ declare module dojox { } -} \ No newline at end of file +} + +declare module "dojox/editor/plugins/_SpellCheckParser" { + var exp: dojox.editor.plugins._SpellCheckParser + export=exp; +} +declare module "dojox/editor/plugins/AutoSave" { + var exp: dojox.editor.plugins.AutoSave + export=exp; +} +declare module "dojox/editor/plugins/AutoSave._AutoSaveSettingDialog" { + var exp: dojox.editor.plugins.AutoSave._AutoSaveSettingDialog + export=exp; +} +declare module "dojox/editor/plugins/Blockquote" { + var exp: dojox.editor.plugins.Blockquote + export=exp; +} +declare module "dojox/editor/plugins/AutoUrlLink" { + var exp: dojox.editor.plugins.AutoUrlLink + export=exp; +} +declare module "dojox/editor/plugins/Breadcrumb" { + var exp: dojox.editor.plugins.Breadcrumb + export=exp; +} +declare module "dojox/editor/plugins/Breadcrumb._BreadcrumbMenuTitle" { + var exp: dojox.editor.plugins.Breadcrumb._BreadcrumbMenuTitle + export=exp; +} +declare module "dojox/editor/plugins/CollapsibleToolbar" { + var exp: dojox.editor.plugins.CollapsibleToolbar + export=exp; +} +declare module "dojox/editor/plugins/CollapsibleToolbar._CollapsibleToolbarButton" { + var exp: dojox.editor.plugins.CollapsibleToolbar._CollapsibleToolbarButton + export=exp; +} +declare module "dojox/editor/plugins/_SmileyPalette" { + var exp: dojox.editor.plugins._SmileyPalette + export=exp; +} +declare module "dojox/editor/plugins/_SmileyPalette.Emoticon" { + var exp: dojox.editor.plugins._SmileyPalette.Emoticon + export=exp; +} +declare module "dojox/editor/plugins/InsertAnchor" { + var exp: dojox.editor.plugins.InsertAnchor + export=exp; +} +declare module "dojox/editor/plugins/NormalizeIndentOutdent" { + var exp: dojox.editor.plugins.NormalizeIndentOutdent + export=exp; +} +declare module "dojox/editor/plugins/FindReplace" { + var exp: dojox.editor.plugins.FindReplace + export=exp; +} +declare module "dojox/editor/plugins/FindReplace._FindReplaceCloseBox" { + var exp: dojox.editor.plugins.FindReplace._FindReplaceCloseBox + export=exp; +} +declare module "dojox/editor/plugins/FindReplace._FindReplaceCheckBox" { + var exp: dojox.editor.plugins.FindReplace._FindReplaceCheckBox + export=exp; +} +declare module "dojox/editor/plugins/FindReplace._FindReplaceTextBox" { + var exp: dojox.editor.plugins.FindReplace._FindReplaceTextBox + export=exp; +} +declare module "dojox/editor/plugins/FindReplace._FindReplaceToolbar" { + var exp: dojox.editor.plugins.FindReplace._FindReplaceToolbar + export=exp; +} +declare module "dojox/editor/plugins/InsertEntity" { + var exp: dojox.editor.plugins.InsertEntity + export=exp; +} +declare module "dojox/editor/plugins/PasteFromWord" { + var exp: dojox.editor.plugins.PasteFromWord + export=exp; +} +declare module "dojox/editor/plugins/PageBreak" { + var exp: dojox.editor.plugins.PageBreak + export=exp; +} +declare module "dojox/editor/plugins/Preview" { + var exp: dojox.editor.plugins.Preview + export=exp; +} +declare module "dojox/editor/plugins/PrettyPrint" { + var exp: dojox.editor.plugins.PrettyPrint + export=exp; +} +declare module "dojox/editor/plugins/ResizeTableColumn" { + var exp: dojox.editor.plugins.ResizeTableColumn + export=exp; +} +declare module "dojox/editor/plugins/NormalizeStyle" { + var exp: dojox.editor.plugins.NormalizeStyle + export=exp; +} +declare module "dojox/editor/plugins/EntityPalette" { + var exp: dojox.editor.plugins.EntityPalette + export=exp; +} +declare module "dojox/editor/plugins/EntityPalette.LatinEntity" { + var exp: dojox.editor.plugins.EntityPalette.LatinEntity + export=exp; +} +declare module "dojox/editor/plugins/Save" { + var exp: dojox.editor.plugins.Save + export=exp; +} +declare module "dojox/editor/plugins/SafePaste" { + var exp: dojox.editor.plugins.SafePaste + export=exp; +} +declare module "dojox/editor/plugins/ShowBlockNodes" { + var exp: dojox.editor.plugins.ShowBlockNodes + export=exp; +} +declare module "dojox/editor/plugins/LocalImage" { + var exp: dojox.editor.plugins.LocalImage + export=exp; +} +declare module "dojox/editor/plugins/Smiley" { + var exp: dojox.editor.plugins.Smiley + export=exp; +} +declare module "dojox/editor/plugins/TextColor" { + var exp: dojox.editor.plugins.TextColor + export=exp; +} +declare module "dojox/editor/plugins/TextColor._TextColorDropDown" { + var exp: dojox.editor.plugins.TextColor._TextColorDropDown + export=exp; +} +declare module "dojox/editor/plugins/StatusBar" { + var exp: dojox.editor.plugins.StatusBar + export=exp; +} +declare module "dojox/editor/plugins/StatusBar._StatusBar" { + var exp: dojox.editor.plugins.StatusBar._StatusBar + export=exp; +} +declare module "dojox/editor/plugins/SpellCheck" { + var exp: dojox.editor.plugins.SpellCheck + export=exp; +} +declare module "dojox/editor/plugins/SpellCheck._SpellCheckScriptMultiPart" { + var exp: dojox.editor.plugins.SpellCheck._SpellCheckScriptMultiPart + export=exp; +} +declare module "dojox/editor/plugins/SpellCheck._SpellCheckControl" { + var exp: dojox.editor.plugins.SpellCheck._SpellCheckControl + export=exp; +} +declare module "dojox/editor/plugins/TablePlugins" { + var exp: dojox.editor.plugins.TablePlugins + export=exp; +} +declare module "dojox/editor/plugins/UploadImage" { + var exp: dojox.editor.plugins.UploadImage + export=exp; +} +declare module "dojox/editor/plugins/ToolbarLineBreak" { + var exp: dojox.editor.plugins.ToolbarLineBreak + export=exp; +} diff --git a/dojo/dojox.embed.d.ts b/dojo/dojox.embed.d.ts index 9d1f272933..f2484f3a43 100644 --- a/dojo/dojox.embed.d.ts +++ b/dojo/dojox.embed.d.ts @@ -840,7 +840,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -1009,4 +1009,20 @@ declare module dojox { serialize(n: String, o: Object): any; } } -} \ No newline at end of file +} +declare module "dojox/embed/Flash" { + var exp: dojox.embed.Flash + export=exp; +} +declare module "dojox/embed/Quicktime" { + var exp: dojox.embed.Quicktime + export=exp; +} +declare module "dojox/embed/flashVars" { + var exp: dojox.embed.flashVars + export=exp; +} +declare module "dojox/embed/Object" { + var exp: dojox.embed.Object_ + export=exp; +} diff --git a/dojo/dojox.encoding.d.ts b/dojo/dojox.encoding.d.ts index 0202fb2374..c0bce15a80 100644 --- a/dojo/dojox.encoding.d.ts +++ b/dojo/dojox.encoding.d.ts @@ -584,4 +584,93 @@ declare module dojox { -} \ No newline at end of file +} + +declare module "dojox/encoding/_base" { + var exp: dojox.encoding._base + export=exp; +} +declare module "dojox/encoding/ascii85" { + var exp: dojox.encoding.ascii85 + export=exp; +} +declare module "dojox/encoding/base64" { + var exp: dojox.encoding.base64 + export=exp; +} +declare module "dojox/encoding/bits" { + var exp: dojox.encoding.bits + export=exp; +} +declare module "dojox/encoding/easy64" { + var exp: dojox.encoding.easy64 + export=exp; +} +declare module "dojox/encoding/compression/splay" { + var exp: dojox.encoding.compression.splay + export=exp; +} +declare module "dojox/encoding/compression/lzw" { + var exp: dojox.encoding.compression.lzw + export=exp; +} +declare module "dojox/encoding/crypto/_base" { + var exp: dojox.encoding.crypto._base + export=exp; +} +declare module "dojox/encoding/crypto/_base.RSAKey" { + var exp: dojox.encoding.crypto._base.RSAKey + export=exp; +} +declare module "dojox/encoding/crypto/_base.cipherModes" { + var exp: dojox.encoding.crypto._base.cipherModes + export=exp; +} +declare module "dojox/encoding/crypto/_base.outputTypes" { + var exp: dojox.encoding.crypto._base.outputTypes + export=exp; +} +declare module "dojox/encoding/crypto/RSAKey" { + var exp: dojox.encoding.crypto.RSAKey + export=exp; +} +declare module "dojox/encoding/crypto/RSAKey-ext" { + var exp: dojox.encoding.crypto.RSAKey_ext + export=exp; +} +declare module "dojox/encoding/digests/MD5" { + var exp: dojox.encoding.digests.MD5 + export=exp; +} +declare module "dojox/encoding/digests/SHA1" { + var exp: dojox.encoding.digests.SHA1 + export=exp; +} +declare module "dojox/encoding/digests/SHA224" { + var exp: dojox.encoding.digests.SHA224 + export=exp; +} +declare module "dojox/encoding/digests/SHA512" { + var exp: dojox.encoding.digests.SHA512 + export=exp; +} +declare module "dojox/encoding/digests/SHA256" { + var exp: dojox.encoding.digests.SHA256 + export=exp; +} +declare module "dojox/encoding/digests/SHA384" { + var exp: dojox.encoding.digests.SHA384 + export=exp; +} +declare module "dojox/encoding/digests/_base" { + var exp: dojox.encoding.digests._base + export=exp; +} +declare module "dojox/encoding/digests/_base.outputTypes" { + var exp: dojox.encoding.digests._base.outputTypes + export=exp; +} +declare module "dojox/encoding/digests/_sha-64" { + var exp: dojox.encoding.digests._sha_64 + export=exp; +} diff --git a/dojo/dojox.flash.d.ts b/dojo/dojox.flash.d.ts index 99eeb6bd63..68b3751882 100644 --- a/dojo/dojox.flash.d.ts +++ b/dojo/dojox.flash.d.ts @@ -21,4 +21,9 @@ declare module dojox { } -} \ No newline at end of file +} + +declare module "dojox/flash" { + var exp: dojox.flash + export=exp; +} diff --git a/dojo/dojox.form.d.ts b/dojo/dojox.form.d.ts index 1d9834d48d..dfb2299dfd 100644 --- a/dojo/dojox.form.d.ts +++ b/dojo/dojox.form.d.ts @@ -976,7 +976,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Restore the value to the last value passed to onChange * @@ -2148,7 +2148,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -3325,7 +3325,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Restore the value to the last value passed to onChange * @@ -4686,7 +4686,7 @@ declare module dojox { * Returns widget as a printable string using the widget's value * */ - toString(): String; + toString(): string; /** * Restore the value to the last value passed to onChange * @@ -6019,7 +6019,7 @@ declare module dojox { * Returns widget as a printable string using the widget's value * */ - toString(): String; + toString(): string; /** * Restore the value to the last value passed to onChange * @@ -7332,7 +7332,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Restore the value to the last value passed to onChange * @@ -8396,7 +8396,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -9387,7 +9387,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -10409,7 +10409,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -11446,7 +11446,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -12695,7 +12695,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -13888,7 +13888,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Restore the value to the last value passed to onChange * @@ -15200,7 +15200,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Restore the value to the last value passed to onChange * @@ -16348,7 +16348,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -17389,7 +17389,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -18415,7 +18415,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -19733,7 +19733,7 @@ declare module dojox { * Returns widget as a printable string using the widget's value * */ - toString(): String; + toString(): string; /** * Restore the value to the last value passed to onChange * @@ -20767,7 +20767,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Restore the value to the last value passed to onChange * @@ -22014,7 +22014,7 @@ declare module dojox { * Returns widget as a printable string using the widget's value * */ - toString(): String; + toString(): string; /** * Restore the value to the last value passed to onChange * @@ -23490,7 +23490,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Restore the value to the last value passed to onChange * @@ -24780,7 +24780,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -26168,7 +26168,7 @@ declare module dojox { * Returns widget as a printable string using the widget's value * */ - toString(): String; + toString(): string; /** * Restore the value to the last value passed to onChange * @@ -27716,7 +27716,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -28665,7 +28665,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -29056,4 +29056,177 @@ declare module dojox { } } -} \ No newline at end of file +} + +declare module "dojox/form/_HasDropDown" { + var exp: dojox.form._HasDropDown + export=exp; +} +declare module "dojox/form/DropDownStack" { + var exp: dojox.form.DropDownStack + export=exp; +} +declare module "dojox/form/RadioStack" { + var exp: dojox.form.RadioStack + export=exp; +} +declare module "dojox/form/_SelectStackMixin" { + var exp: dojox.form._SelectStackMixin + export=exp; +} +declare module "dojox/form/BusyButton" { + var exp: dojox.form.BusyButton + export=exp; +} +declare module "dojox/form/_FormSelectWidget" { + var exp: dojox.form._FormSelectWidget + export=exp; +} +declare module "dojox/form/_FormSelectWidget.__SelectOption" { + var exp: dojox.form._FormSelectWidget.__SelectOption + export=exp; +} +declare module "dojox/form/CheckedMultiSelect" { + var exp: dojox.form.CheckedMultiSelect + export=exp; +} +declare module "dojox/form/DayTextBox" { + var exp: dojox.form.DayTextBox + export=exp; +} +declare module "dojox/form/DropDownSelect" { + var exp: dojox.form.DropDownSelect + export=exp; +} +declare module "dojox/form/DropDownSelect._Menu" { + var exp: dojox.form.DropDownSelect._Menu + export=exp; +} +declare module "dojox/form/FileInput" { + var exp: dojox.form.FileInput + export=exp; +} +declare module "dojox/form/DateTextBox" { + var exp: dojox.form.DateTextBox + export=exp; +} +declare module "dojox/form/FileInputBlind" { + var exp: dojox.form.FileInputBlind + export=exp; +} +declare module "dojox/form/FileInputAuto" { + var exp: dojox.form.FileInputAuto + export=exp; +} +declare module "dojox/form/FileUploader" { + var exp: dojox.form.FileUploader + export=exp; +} +declare module "dojox/form/Manager" { + var exp: dojox.form.Manager + export=exp; +} +declare module "dojox/form/FilePickerTextBox" { + var exp: dojox.form.FilePickerTextBox + export=exp; +} +declare module "dojox/form/RangeSlider" { + var exp: dojox.form.RangeSlider + export=exp; +} +declare module "dojox/form/ListInput" { + var exp: dojox.form.ListInput + export=exp; +} +declare module "dojox/form/PasswordValidator" { + var exp: dojox.form.PasswordValidator + export=exp; +} +declare module "dojox/form/Rating" { + var exp: dojox.form.Rating + export=exp; +} +declare module "dojox/form/MonthTextBox" { + var exp: dojox.form.MonthTextBox + export=exp; +} +declare module "dojox/form/MultiComboBox" { + var exp: dojox.form.MultiComboBox + export=exp; +} +declare module "dojox/form/TimeSpinner" { + var exp: dojox.form.TimeSpinner + export=exp; +} +declare module "dojox/form/TriStateCheckBox" { + var exp: dojox.form.TriStateCheckBox + export=exp; +} +declare module "dojox/form/Uploader" { + var exp: dojox.form.Uploader + export=exp; +} +declare module "dojox/form/YearTextBox" { + var exp: dojox.form.YearTextBox + export=exp; +} +declare module "dojox/form/manager/_ClassMixin" { + var exp: dojox.form.manager._ClassMixin + export=exp; +} +declare module "dojox/form/manager/_DisplayMixin" { + var exp: dojox.form.manager._DisplayMixin + export=exp; +} +declare module "dojox/form/manager/_EnableMixin" { + var exp: dojox.form.manager._EnableMixin + export=exp; +} +declare module "dojox/form/manager/_FormMixin" { + var exp: dojox.form.manager._FormMixin + export=exp; +} +declare module "dojox/form/manager/_Mixin" { + var exp: dojox.form.manager._Mixin + export=exp; +} +declare module "dojox/form/manager/_NodeMixin" { + var exp: dojox.form.manager._NodeMixin + export=exp; +} +declare module "dojox/form/manager/_ValueMixin" { + var exp: dojox.form.manager._ValueMixin + export=exp; +} +declare module "dojox/form/uploader/_HTML5" { + var exp: dojox.form.uploader._HTML5 + export=exp; +} +declare module "dojox/form/uploader/_Flash" { + var exp: dojox.form.uploader._Flash + export=exp; +} +declare module "dojox/form/uploader/_IFrame" { + var exp: dojox.form.uploader._IFrame + export=exp; +} +declare module "dojox/form/uploader/_Base" { + var exp: dojox.form.uploader._Base + export=exp; +} +declare module "dojox/form/uploader/FileList" { + var exp: dojox.form.uploader.FileList + export=exp; +} +declare module "dojox/form/uploader/plugins/Flash" { + var exp: dojox.form.uploader.plugins.Flash + export=exp; +} +declare module "dojox/form/uploader/plugins/HTML5" { + var exp: dojox.form.uploader.plugins.HTML5 + export=exp; +} +declare module "dojox/form/uploader/plugins/IFrame" { + var exp: dojox.form.uploader.plugins.IFrame + export=exp; +} diff --git a/dojo/dojox.fx.d.ts b/dojo/dojox.fx.d.ts index ddf61096f2..dce9d82c1a 100644 --- a/dojo/dojox.fx.d.ts +++ b/dojo/dojox.fx.d.ts @@ -709,7 +709,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -2015,4 +2015,69 @@ declare module dojox { } -} \ No newline at end of file +} + +declare module "dojox/fx" { + var exp: dojox.fx + export=exp; +} +declare module "dojox/fx/Shadow" { + var exp: dojox.fx.Shadow + export=exp; +} +declare module "dojox/fx/_core" { + var exp: dojox.fx._core + export=exp; +} +declare module "dojox/fx/scroll" { + var exp: dojox.fx.scroll + export=exp; +} +declare module "dojox/fx/_arg" { + var exp: dojox.fx._arg + export=exp; +} +declare module "dojox/fx/easing" { + var exp: dojox.fx.easing + export=exp; +} +declare module "dojox/fx/_base" { + var exp: dojox.fx._base + export=exp; +} +declare module "dojox/fx/flip" { + var exp: dojox.fx.flip + export=exp; +} +declare module "dojox/fx/style" { + var exp: dojox.fx.style + export=exp; +} +declare module "dojox/fx/text" { + var exp: dojox.fx.text + export=exp; +} +declare module "dojox/fx/split" { + var exp: dojox.fx.split + export=exp; +} +declare module "dojox/fx/Timeline" { + var exp: dojox.fx.Timeline + export=exp; +} +declare module "dojox/fx/ext-dojo/reverse" { + var exp: dojox.fx.ext_dojo.reverse + export=exp; +} +declare module "dojox/fx/ext-dojo/complex" { + var exp: dojox.fx.ext_dojo.complex + export=exp; +} +declare module "dojox/fx/ext-dojo/NodeList" { + var exp: dojox.fx.ext_dojo.NodeList + export=exp; +} +declare module "dojox/fx/ext-dojo/NodeList-style" { + var exp: dojox.fx.ext_dojo.NodeList_style + export=exp; +} diff --git a/dojo/dojox.gantt.d.ts b/dojo/dojox.gantt.d.ts index 325833b766..7e21c82a9e 100644 --- a/dojo/dojox.gantt.d.ts +++ b/dojo/dojox.gantt.d.ts @@ -1080,4 +1080,37 @@ declare module dojox { } } -} \ No newline at end of file +} + +declare module "dojox/gantt/contextMenuTab" { + var exp: dojox.gantt.contextMenuTab + export=exp; +} +declare module "dojox/gantt/GanttProjectControl" { + var exp: dojox.gantt.GanttProjectControl + export=exp; +} +declare module "dojox/gantt/GanttProjectItem" { + var exp: dojox.gantt.GanttProjectItem + export=exp; +} +declare module "dojox/gantt/GanttResourceItem" { + var exp: dojox.gantt.GanttResourceItem + export=exp; +} +declare module "dojox/gantt/GanttChart" { + var exp: dojox.gantt.GanttChart + export=exp; +} +declare module "dojox/gantt/GanttTaskControl" { + var exp: dojox.gantt.GanttTaskControl + export=exp; +} +declare module "dojox/gantt/TabMenu" { + var exp: dojox.gantt.TabMenu + export=exp; +} +declare module "dojox/gantt/GanttTaskItem" { + var exp: dojox.gantt.GanttTaskItem + export=exp; +} diff --git a/dojo/dojox.gauges.d.ts b/dojo/dojox.gauges.d.ts index a559dd233e..4dab9054c1 100644 --- a/dojo/dojox.gauges.d.ts +++ b/dojo/dojox.gauges.d.ts @@ -937,7 +937,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -1870,7 +1870,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -2816,7 +2816,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -3761,7 +3761,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -4705,7 +4705,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -5651,7 +5651,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -6597,7 +6597,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -7743,7 +7743,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -8677,7 +8677,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -9621,7 +9621,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -10564,7 +10564,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -11507,7 +11507,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -12637,7 +12637,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -13566,7 +13566,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -14864,7 +14864,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -15801,7 +15801,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -17101,7 +17101,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -18314,7 +18314,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -19135,7 +19135,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -20101,7 +20101,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -21399,7 +21399,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -21551,4 +21551,89 @@ declare module dojox { onValueChanged(): void; } } -} \ No newline at end of file +} + +declare module "dojox/gauges/_Indicator" { + var exp: dojox.gauges._Indicator + export=exp; +} +declare module "dojox/gauges/_Gauge" { + var exp: dojox.gauges._Gauge + export=exp; +} +declare module "dojox/gauges/AnalogArrowIndicator" { + var exp: dojox.gauges.AnalogArrowIndicator + export=exp; +} +declare module "dojox/gauges/AnalogCircleIndicator" { + var exp: dojox.gauges.AnalogCircleIndicator + export=exp; +} +declare module "dojox/gauges/AnalogArcIndicator" { + var exp: dojox.gauges.AnalogArcIndicator + export=exp; +} +declare module "dojox/gauges/AnalogGauge" { + var exp: dojox.gauges.AnalogGauge + export=exp; +} +declare module "dojox/gauges/AnalogIndicatorBase" { + var exp: dojox.gauges.AnalogIndicatorBase + export=exp; +} +declare module "dojox/gauges/AnalogLineIndicator" { + var exp: dojox.gauges.AnalogLineIndicator + export=exp; +} +declare module "dojox/gauges/BarCircleIndicator" { + var exp: dojox.gauges.BarCircleIndicator + export=exp; +} +declare module "dojox/gauges/AnalogNeedleIndicator" { + var exp: dojox.gauges.AnalogNeedleIndicator + export=exp; +} +declare module "dojox/gauges/BarGauge" { + var exp: dojox.gauges.BarGauge + export=exp; +} +declare module "dojox/gauges/BarLineIndicator" { + var exp: dojox.gauges.BarLineIndicator + export=exp; +} +declare module "dojox/gauges/BarIndicator" { + var exp: dojox.gauges.BarIndicator + export=exp; +} +declare module "dojox/gauges/GlossyCircularGaugeNeedle" { + var exp: dojox.gauges.GlossyCircularGaugeNeedle + export=exp; +} +declare module "dojox/gauges/GlossyHorizontalGaugeMarker" { + var exp: dojox.gauges.GlossyHorizontalGaugeMarker + export=exp; +} +declare module "dojox/gauges/GlossyCircularGauge" { + var exp: dojox.gauges.GlossyCircularGauge + export=exp; +} +declare module "dojox/gauges/Range" { + var exp: dojox.gauges.Range + export=exp; +} +declare module "dojox/gauges/GlossyCircularGaugeBase" { + var exp: dojox.gauges.GlossyCircularGaugeBase + export=exp; +} +declare module "dojox/gauges/GlossyHorizontalGauge" { + var exp: dojox.gauges.GlossyHorizontalGauge + export=exp; +} +declare module "dojox/gauges/GlossySemiCircularGauge" { + var exp: dojox.gauges.GlossySemiCircularGauge + export=exp; +} +declare module "dojox/gauges/TextIndicator" { + var exp: dojox.gauges.TextIndicator + export=exp; +} diff --git a/dojo/dojox.geo.d.ts b/dojo/dojox.geo.d.ts index 8cb299d590..7eedb2cf07 100644 --- a/dojo/dojox.geo.d.ts +++ b/dojo/dojox.geo.d.ts @@ -1045,7 +1045,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -1990,7 +1990,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -3538,7 +3538,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -4721,4 +4721,177 @@ declare module dojox { } -} \ No newline at end of file +} + +declare module "dojox/geo/charting/_base" { + var exp: dojox.geo.charting._base + export=exp; +} +declare module "dojox/geo/charting/_Marker" { + var exp: dojox.geo.charting._Marker + export=exp; +} +declare module "dojox/geo/charting/Feature" { + var exp: dojox.geo.charting.Feature + export=exp; +} +declare module "dojox/geo/charting/KeyboardInteractionSupport" { + var exp: dojox.geo.charting.KeyboardInteractionSupport + export=exp; +} +declare module "dojox/geo/charting/MouseInteractionSupport" { + var exp: dojox.geo.charting.MouseInteractionSupport + export=exp; +} +declare module "dojox/geo/charting/TouchInteractionSupport" { + var exp: dojox.geo.charting.TouchInteractionSupport + export=exp; +} +declare module "dojox/geo/charting/Map" { + var exp: dojox.geo.charting.Map + export=exp; +} +declare module "dojox/geo/charting/widget/Legend" { + var exp: dojox.geo.charting.widget.Legend + export=exp; +} +declare module "dojox/geo/charting/widget/Map" { + var exp: dojox.geo.charting.widget.Map + export=exp; +} +declare module "dojox/geo/openlayers/_base" { + var exp: dojox.geo.openlayers._base + export=exp; +} +declare module "dojox/geo/openlayers/_base.Geometry" { + var exp: dojox.geo.openlayers._base.Geometry + export=exp; +} +declare module "dojox/geo/openlayers/_base.Collection" { + var exp: dojox.geo.openlayers._base.Collection + export=exp; +} +declare module "dojox/geo/openlayers/_base.Feature" { + var exp: dojox.geo.openlayers._base.Feature + export=exp; +} +declare module "dojox/geo/openlayers/_base.JsonImport" { + var exp: dojox.geo.openlayers._base.JsonImport + export=exp; +} +declare module "dojox/geo/openlayers/_base.GfxLayer" { + var exp: dojox.geo.openlayers._base.GfxLayer + export=exp; +} +declare module "dojox/geo/openlayers/_base.LineString" { + var exp: dojox.geo.openlayers._base.LineString + export=exp; +} +declare module "dojox/geo/openlayers/_base.Layer" { + var exp: dojox.geo.openlayers._base.Layer + export=exp; +} +declare module "dojox/geo/openlayers/_base.GeometryFeature" { + var exp: dojox.geo.openlayers._base.GeometryFeature + export=exp; +} +declare module "dojox/geo/openlayers/_base.Point" { + var exp: dojox.geo.openlayers._base.Point + export=exp; +} +declare module "dojox/geo/openlayers/_base.Map" { + var exp: dojox.geo.openlayers._base.Map + export=exp; +} +declare module "dojox/geo/openlayers/_base.TouchInteractionSupport" { + var exp: dojox.geo.openlayers._base.TouchInteractionSupport + export=exp; +} +declare module "dojox/geo/openlayers/_base.WidgetFeature" { + var exp: dojox.geo.openlayers._base.WidgetFeature + export=exp; +} +declare module "dojox/geo/openlayers/_base.__JsonImportArgs" { + var exp: dojox.geo.openlayers._base.__JsonImportArgs + export=exp; +} +declare module "dojox/geo/openlayers/_base.__WidgetFeatureArgs" { + var exp: dojox.geo.openlayers._base.__WidgetFeatureArgs + export=exp; +} +declare module "dojox/geo/openlayers/_base.__MapArgs" { + var exp: dojox.geo.openlayers._base.__MapArgs + export=exp; +} +declare module "dojox/geo/openlayers/_base.BaseLayerType" { + var exp: dojox.geo.openlayers._base.BaseLayerType + export=exp; +} +declare module "dojox/geo/openlayers/_base.GreatCircle" { + var exp: dojox.geo.openlayers._base.GreatCircle + export=exp; +} +declare module "dojox/geo/openlayers/_base.widget" { + var exp: dojox.geo.openlayers._base.widget + export=exp; +} +declare module "dojox/geo/openlayers/GreatCircle" { + var exp: dojox.geo.openlayers.GreatCircle + export=exp; +} +declare module "dojox/geo/openlayers/Patch" { + var exp: dojox.geo.openlayers.Patch + export=exp; +} +declare module "dojox/geo/openlayers/Collection" { + var exp: dojox.geo.openlayers.Collection + export=exp; +} +declare module "dojox/geo/openlayers/Feature" { + var exp: dojox.geo.openlayers.Feature + export=exp; +} +declare module "dojox/geo/openlayers/Geometry" { + var exp: dojox.geo.openlayers.Geometry + export=exp; +} +declare module "dojox/geo/openlayers/GfxLayer" { + var exp: dojox.geo.openlayers.GfxLayer + export=exp; +} +declare module "dojox/geo/openlayers/JsonImport" { + var exp: dojox.geo.openlayers.JsonImport + export=exp; +} +declare module "dojox/geo/openlayers/Layer" { + var exp: dojox.geo.openlayers.Layer + export=exp; +} +declare module "dojox/geo/openlayers/LineString" { + var exp: dojox.geo.openlayers.LineString + export=exp; +} +declare module "dojox/geo/openlayers/GeometryFeature" { + var exp: dojox.geo.openlayers.GeometryFeature + export=exp; +} +declare module "dojox/geo/openlayers/Point" { + var exp: dojox.geo.openlayers.Point + export=exp; +} +declare module "dojox/geo/openlayers/WidgetFeature" { + var exp: dojox.geo.openlayers.WidgetFeature + export=exp; +} +declare module "dojox/geo/openlayers/TouchInteractionSupport" { + var exp: dojox.geo.openlayers.TouchInteractionSupport + export=exp; +} +declare module "dojox/geo/openlayers/Map" { + var exp: dojox.geo.openlayers.Map + export=exp; +} +declare module "dojox/geo/openlayers/widget/Map" { + var exp: dojox.geo.openlayers.widget.Map + export=exp; +} diff --git a/dojo/dojox.gesture.d.ts b/dojo/dojox.gesture.d.ts index e4a8c38d7d..e9d89357ff 100644 --- a/dojo/dojox.gesture.d.ts +++ b/dojo/dojox.gesture.d.ts @@ -98,4 +98,10 @@ declare module dojox { } } -} \ No newline at end of file +} + + +declare module "dojox/gesture/Base" { + var exp: dojox.gesture.Base + export=exp; +} diff --git a/dojo/dojox.gfx.d.ts b/dojo/dojox.gfx.d.ts index 02c0932b68..cebb130d4e 100644 --- a/dojo/dojox.gfx.d.ts +++ b/dojo/dojox.gfx.d.ts @@ -11803,4 +11803,392 @@ declare module dojox { } -} \ No newline at end of file +} +declare module "dojox/gfx" { + var exp: dojox.gfx + export=exp; +} +declare module "dojox/gfx.__MoveableCtorArgs" { + var exp: dojox.gfx.__MoveableCtorArgs + export=exp; +} +declare module "dojox/gfx.Circle" { + var exp: dojox.gfx.Circle + export=exp; +} +declare module "dojox/gfx.Ellipse" { + var exp: dojox.gfx.Ellipse + export=exp; +} +declare module "dojox/gfx/path" { + var exp: dojox.gfx.path + export=exp; +} +declare module "dojox/gfx/Mover" { + var exp: dojox.gfx.Mover + export=exp; +} +declare module "dojox/gfx/Moveable" { + var exp: dojox.gfx.Moveable + export=exp; +} +declare module "dojox/gfx.Line" { + var exp: dojox.gfx.Line + export=exp; +} +declare module "dojox/gfx.Point" { + var exp: dojox.gfx.Point + export=exp; +} +declare module "dojox/gfx.Group" { + var exp: dojox.gfx.Group + export=exp; +} +declare module "dojox/gfx.Polyline" { + var exp: dojox.gfx.Polyline + export=exp; +} +declare module "dojox/gfx.Rect" { + var exp: dojox.gfx.Rect + export=exp; +} +declare module "dojox/gfx.Rectangle" { + var exp: dojox.gfx.Rectangle + export=exp; +} +declare module "dojox/gfx.Surface" { + var exp: dojox.gfx.Surface + export=exp; +} +declare module "dojox/gfx.TextPath" { + var exp: dojox.gfx.TextPath + export=exp; +} +declare module "dojox/gfx.Text" { + var exp: dojox.gfx.Text + export=exp; +} +declare module "dojox/gfx.VectorFont" { + var exp: dojox.gfx.VectorFont + export=exp; +} +declare module "dojox/gfx/VectorText" { + var exp: dojox.gfx.VectorText + export=exp; +} +declare module "dojox/gfx/decompose" { + var exp: dojox.gfx.decompose + export=exp; +} +declare module "dojox/gfx._vectorFontCache" { + var exp: dojox.gfx._vectorFontCache + export=exp; +} +declare module "dojox/gfx._svgFontCache" { + var exp: dojox.gfx._svgFontCache + export=exp; +} +declare module "dojox/gfx/arc" { + var exp: dojox.gfx.arc + export=exp; +} +declare module "dojox/gfx/bezierutils" { + var exp: dojox.gfx.bezierutils + export=exp; +} +declare module "dojox/gfx/_base" { + var exp: dojox.gfx._base + export=exp; +} +declare module "dojox/gfx/_gfxBidiSupport" { + var exp: dojox.gfx._gfxBidiSupport + export=exp; +} +declare module "dojox/gfx/canvas" { + var exp: dojox.gfx.canvas + export=exp; +} +declare module "dojox/gfx/canvasWithEvents" { + var exp: dojox.gfx.canvasWithEvents + export=exp; +} +declare module "dojox/gfx.defaultCircle" { + var exp: dojox.gfx.defaultCircle + export=exp; +} +declare module "dojox/gfx/canvasext" { + var exp: dojox.gfx.canvasext + export=exp; +} +declare module "dojox/gfx.defaultImage" { + var exp: dojox.gfx.defaultImage + export=exp; +} +declare module "dojox/gfx.defaultLine" { + var exp: dojox.gfx.defaultLine + export=exp; +} +declare module "dojox/gfx/canvas_attach" { + var exp: dojox.gfx.canvas_attach + export=exp; +} +declare module "dojox/gfx.defaultLinearGradient" { + var exp: dojox.gfx.defaultLinearGradient + export=exp; +} +declare module "dojox/gfx.defaultEllipse" { + var exp: dojox.gfx.defaultEllipse + export=exp; +} +declare module "dojox/gfx.defaultFont" { + var exp: dojox.gfx.defaultFont + export=exp; +} +declare module "dojox/gfx.defaultPath" { + var exp: dojox.gfx.defaultPath + export=exp; +} +declare module "dojox/gfx.defaultPattern" { + var exp: dojox.gfx.defaultPattern + export=exp; +} +declare module "dojox/gfx.defaultRadialGradient" { + var exp: dojox.gfx.defaultRadialGradient + export=exp; +} +declare module "dojox/gfx.defaultRect" { + var exp: dojox.gfx.defaultRect + export=exp; +} +declare module "dojox/gfx.defaultPolyline" { + var exp: dojox.gfx.defaultPolyline + export=exp; +} +declare module "dojox/gfx.defaultStroke" { + var exp: dojox.gfx.defaultStroke + export=exp; +} +declare module "dojox/gfx.defaultText" { + var exp: dojox.gfx.defaultText + export=exp; +} +declare module "dojox/gfx.Fill" { + var exp: dojox.gfx.Fill + export=exp; +} +declare module "dojox/gfx.defaultVectorFont" { + var exp: dojox.gfx.defaultVectorFont + export=exp; +} +declare module "dojox/gfx.defaultVectorText" { + var exp: dojox.gfx.defaultVectorText + export=exp; +} +declare module "dojox/gfx.defaultTextPath" { + var exp: dojox.gfx.defaultTextPath + export=exp; +} +declare module "dojox/gfx/fx" { + var exp: dojox.gfx.fx + export=exp; +} +declare module "dojox/gfx/gradient" { + var exp: dojox.gfx.gradient + export=exp; +} +declare module "dojox/gfx.Font" { + var exp: dojox.gfx.Font + export=exp; +} +declare module "dojox/gfx/gradutils" { + var exp: dojox.gfx.gradutils + export=exp; +} +declare module "dojox/gfx.LinearGradient" { + var exp: dojox.gfx.LinearGradient + export=exp; +} +declare module "dojox/gfx/move" { + var exp: dojox.gfx.move + export=exp; +} +declare module "dojox/gfx/matrix" { + var exp: dojox.gfx.matrix + export=exp; +} +declare module "dojox/gfx.Pattern" { + var exp: dojox.gfx.Pattern + export=exp; +} +declare module "dojox/gfx.RadialGradient" { + var exp: dojox.gfx.RadialGradient + export=exp; +} +declare module "dojox/gfx/shape" { + var exp: dojox.gfx.shape + export=exp; +} +declare module "dojox/gfx/silverlight" { + var exp: dojox.gfx.silverlight + export=exp; +} +declare module "dojox/gfx.Stroke" { + var exp: dojox.gfx.Stroke + export=exp; +} +declare module "dojox/gfx/silverlight_attach" { + var exp: dojox.gfx.silverlight_attach + export=exp; +} +declare module "dojox/gfx/svgext" { + var exp: dojox.gfx.svgext + export=exp; +} +declare module "dojox/gfx/svg" { + var exp: dojox.gfx.svg + export=exp; +} +declare module "dojox/gfx.vectorFontFitting" { + var exp: dojox.gfx.vectorFontFitting + export=exp; +} +declare module "dojox/gfx/utils" { + var exp: dojox.gfx.utils + export=exp; +} +declare module "dojox/gfx/vml" { + var exp: dojox.gfx.vml + export=exp; +} +declare module "dojox/gfx/filters" { + var exp: dojox.gfx.filters + export=exp; +} +declare module "dojox/gfx/registry" { + var exp: dojox.gfx.registry + export=exp; +} +declare module "dojox/gfx/renderer" { + var exp: dojox.gfx.renderer + export=exp; +} +declare module "dojox/gfx/svg_attach" { + var exp: dojox.gfx.svg_attach + export=exp; +} +declare module "dojox/gfx/svg_attach.Ellipse" { + var exp: dojox.gfx.svg_attach.Ellipse + export=exp; +} +declare module "dojox/gfx/svg_attach.Group" { + var exp: dojox.gfx.svg_attach.Group + export=exp; +} +declare module "dojox/gfx/svg_attach.Circle" { + var exp: dojox.gfx.svg_attach.Circle + export=exp; +} +declare module "dojox/gfx/svg_attach.Line" { + var exp: dojox.gfx.svg_attach.Line + export=exp; +} +declare module "dojox/gfx/svg_attach.Image" { + var exp: dojox.gfx.svg_attach.Image + export=exp; +} +declare module "dojox/gfx/svg_attach.Path" { + var exp: dojox.gfx.svg_attach.Path + export=exp; +} +declare module "dojox/gfx/svg_attach.Polyline" { + var exp: dojox.gfx.svg_attach.Polyline + export=exp; +} +declare module "dojox/gfx/svg_attach.Surface" { + var exp: dojox.gfx.svg_attach.Surface + export=exp; +} +declare module "dojox/gfx/svg_attach.Shape" { + var exp: dojox.gfx.svg_attach.Shape + export=exp; +} +declare module "dojox/gfx/svg_attach.Rect" { + var exp: dojox.gfx.svg_attach.Rect + export=exp; +} +declare module "dojox/gfx/svg_attach.Text" { + var exp: dojox.gfx.svg_attach.Text + export=exp; +} +declare module "dojox/gfx/svg_attach.TextPath" { + var exp: dojox.gfx.svg_attach.TextPath + export=exp; +} +declare module "dojox/gfx/svg_attach.dasharray" { + var exp: dojox.gfx.svg_attach.dasharray + export=exp; +} +declare module "dojox/gfx/svg_attach.xmlns" { + var exp: dojox.gfx.svg_attach.xmlns + export=exp; +} +declare module "dojox/gfx/vml_attach" { + var exp: dojox.gfx.vml_attach + export=exp; +} +declare module "dojox/gfx/vml_attach.Circle" { + var exp: dojox.gfx.vml_attach.Circle + export=exp; +} +declare module "dojox/gfx/vml_attach.Group" { + var exp: dojox.gfx.vml_attach.Group + export=exp; +} +declare module "dojox/gfx/vml_attach.Ellipse" { + var exp: dojox.gfx.vml_attach.Ellipse + export=exp; +} +declare module "dojox/gfx/vml_attach.Image" { + var exp: dojox.gfx.vml_attach.Image + export=exp; +} +declare module "dojox/gfx/vml_attach.Line" { + var exp: dojox.gfx.vml_attach.Line + export=exp; +} +declare module "dojox/gfx/vml_attach.Polyline" { + var exp: dojox.gfx.vml_attach.Polyline + export=exp; +} +declare module "dojox/gfx/vml_attach.Surface" { + var exp: dojox.gfx.vml_attach.Surface + export=exp; +} +declare module "dojox/gfx/vml_attach.Rect" { + var exp: dojox.gfx.vml_attach.Rect + export=exp; +} +declare module "dojox/gfx/vml_attach.Path" { + var exp: dojox.gfx.vml_attach.Path + export=exp; +} +declare module "dojox/gfx/vml_attach.Shape" { + var exp: dojox.gfx.vml_attach.Shape + export=exp; +} +declare module "dojox/gfx/vml_attach.Text" { + var exp: dojox.gfx.vml_attach.Text + export=exp; +} +declare module "dojox/gfx/vml_attach.TextPath" { + var exp: dojox.gfx.vml_attach.TextPath + export=exp; +} +declare module "dojox/gfx/vml_attach._bool" { + var exp: dojox.gfx.vml_attach._bool + export=exp; +} +declare module "dojox/gfx/vml_attach.text_alignment" { + var exp: dojox.gfx.vml_attach.text_alignment + export=exp; +} diff --git a/dojo/dojox.gfx3d.d.ts b/dojo/dojox.gfx3d.d.ts index 1b8eb78715..a86d62fe8e 100644 --- a/dojo/dojox.gfx3d.d.ts +++ b/dojo/dojox.gfx3d.d.ts @@ -3234,4 +3234,157 @@ declare module dojox { } -} \ No newline at end of file +} +declare module "dojox/gfx3d" { + var exp: dojox.gfx3d + export=exp; +} +declare module "dojox/gfx3d/object" { + var exp: dojox.gfx3d.object + export=exp; +} +declare module "dojox/gfx3d/gradient" { + var exp: dojox.gfx3d.gradient + export=exp; +} +declare module "dojox/gfx3d/_base" { + var exp: dojox.gfx3d._base + export=exp; +} +declare module "dojox/gfx3d/_base.Cube" { + var exp: dojox.gfx3d._base.Cube + export=exp; +} +declare module "dojox/gfx3d/_base.Cylinder" { + var exp: dojox.gfx3d._base.Cylinder + export=exp; +} +declare module "dojox/gfx3d/_base.Edges" { + var exp: dojox.gfx3d._base.Edges + export=exp; +} +declare module "dojox/gfx3d/_base.Polygon" { + var exp: dojox.gfx3d._base.Polygon + export=exp; +} +declare module "dojox/gfx3d/_base.Orbit" { + var exp: dojox.gfx3d._base.Orbit + export=exp; +} +declare module "dojox/gfx3d/_base.Object" { + var exp: dojox.gfx3d._base.Object + export=exp; +} +declare module "dojox/gfx3d/_base.Path3d" { + var exp: dojox.gfx3d._base.Path3d + export=exp; +} +declare module "dojox/gfx3d/_base.Quads" { + var exp: dojox.gfx3d._base.Quads + export=exp; +} +declare module "dojox/gfx3d/_base.Triangles" { + var exp: dojox.gfx3d._base.Triangles + export=exp; +} +declare module "dojox/gfx3d/_base.Scene" { + var exp: dojox.gfx3d._base.Scene + export=exp; +} +declare module "dojox/gfx3d/_base.Viewport" { + var exp: dojox.gfx3d._base.Viewport + export=exp; +} +declare module "dojox/gfx3d/_base._creators" { + var exp: dojox.gfx3d._base._creators + export=exp; +} +declare module "dojox/gfx3d/_base.defaultCube" { + var exp: dojox.gfx3d._base.defaultCube + export=exp; +} +declare module "dojox/gfx3d/_base.defaultEdges" { + var exp: dojox.gfx3d._base.defaultEdges + export=exp; +} +declare module "dojox/gfx3d/_base.defaultOrbit" { + var exp: dojox.gfx3d._base.defaultOrbit + export=exp; +} +declare module "dojox/gfx3d/_base.defaultCylinder" { + var exp: dojox.gfx3d._base.defaultCylinder + export=exp; +} +declare module "dojox/gfx3d/_base.defaultPath3d" { + var exp: dojox.gfx3d._base.defaultPath3d + export=exp; +} +declare module "dojox/gfx3d/_base.defaultPolygon" { + var exp: dojox.gfx3d._base.defaultPolygon + export=exp; +} +declare module "dojox/gfx3d/_base.defaultQuads" { + var exp: dojox.gfx3d._base.defaultQuads + export=exp; +} +declare module "dojox/gfx3d/_base.defaultTriangles" { + var exp: dojox.gfx3d._base.defaultTriangles + export=exp; +} +declare module "dojox/gfx3d/_base.drawer" { + var exp: dojox.gfx3d._base.drawer + export=exp; +} +declare module "dojox/gfx3d/_base.lighting" { + var exp: dojox.gfx3d._base.lighting + export=exp; +} +declare module "dojox/gfx3d/_base.scheduler" { + var exp: dojox.gfx3d._base.scheduler + export=exp; +} +declare module "dojox/gfx3d/_base.matrix" { + var exp: dojox.gfx3d._base.matrix + export=exp; +} +declare module "dojox/gfx3d/_base.vector" { + var exp: dojox.gfx3d._base.vector + export=exp; +} +declare module "dojox/gfx3d/scheduler" { + var exp: dojox.gfx3d.scheduler + export=exp; +} +declare module "dojox/gfx3d/scheduler.BinarySearchTree" { + var exp: dojox.gfx3d.scheduler.BinarySearchTree + export=exp; +} +declare module "dojox/gfx3d/scheduler.drawer" { + var exp: dojox.gfx3d.scheduler.drawer + export=exp; +} +declare module "dojox/gfx3d/scheduler.scheduler" { + var exp: dojox.gfx3d.scheduler.scheduler + export=exp; +} +declare module "dojox/gfx3d/lighting" { + var exp: dojox.gfx3d.lighting + export=exp; +} +declare module "dojox/gfx3d/lighting.Model" { + var exp: dojox.gfx3d.lighting.Model + export=exp; +} +declare module "dojox/gfx3d/lighting.finish" { + var exp: dojox.gfx3d.lighting.finish + export=exp; +} +declare module "dojox/gfx3d/vector" { + var exp: dojox.gfx3d.vector + export=exp; +} +declare module "dojox/gfx3d/matrix" { + var exp: dojox.gfx3d.matrix + export=exp; +} + diff --git a/dojo/dojox.grid.d.ts b/dojo/dojox.grid.d.ts index a162302cd9..0d9f4cf9d6 100644 --- a/dojo/dojox.grid.d.ts +++ b/dojo/dojox.grid.d.ts @@ -2322,7 +2322,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -3747,7 +3747,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -4820,7 +4820,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -5900,7 +5900,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -7114,7 +7114,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -9247,7 +9247,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -11093,7 +11093,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -12997,7 +12997,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -14957,7 +14957,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -20171,7 +20171,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -23032,7 +23032,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * */ @@ -23885,7 +23885,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * */ @@ -26083,4 +26083,480 @@ declare module dojox { } } -} \ No newline at end of file +} +declare module "dojox/grid/_Builder" { + var exp: dojox.grid._Builder + export=exp; +} +declare module "dojox/grid/util" { + var exp: dojox.grid.util + export=exp; +} +declare module "dojox/grid/_EditManager" { + var exp: dojox.grid._EditManager + export=exp; +} +declare module "dojox/grid/_RowManager" { + var exp: dojox.grid._RowManager + export=exp; +} +declare module "dojox/grid/_Layout" { + var exp: dojox.grid._Layout + export=exp; +} +declare module "dojox/grid/_Events" { + var exp: dojox.grid._Events + export=exp; +} +declare module "dojox/grid/_FocusManager" { + var exp: dojox.grid._FocusManager + export=exp; +} +declare module "dojox/grid/_SelectionPreserver" { + var exp: dojox.grid._SelectionPreserver + export=exp; +} +declare module "dojox/grid/_Scroller" { + var exp: dojox.grid._Scroller + export=exp; +} +declare module "dojox/grid/_ViewManager" { + var exp: dojox.grid._ViewManager + export=exp; +} +declare module "dojox/grid/_TreeView" { + var exp: dojox.grid._TreeView + export=exp; +} +declare module "dojox/grid/_View" { + var exp: dojox.grid._View + export=exp; +} +declare module "dojox/grid/_Selector" { + var exp: dojox.grid._Selector + export=exp; +} +declare module "dojox/grid/_RowSelector" { + var exp: dojox.grid._RowSelector + export=exp; +} +declare module "dojox/grid/DataSelection" { + var exp: dojox.grid.DataSelection + export=exp; +} +declare module "dojox/grid/_Grid" { + var exp: dojox.grid._Grid + export=exp; +} +declare module "dojox/grid/DataGrid" { + var exp: dojox.grid.DataGrid + export=exp; +} +declare module "dojox/grid/LazyTreeGridStoreModel" { + var exp: dojox.grid.LazyTreeGridStoreModel + export=exp; +} +declare module "dojox/grid/TreeSelection" { + var exp: dojox.grid.TreeSelection + export=exp; +} +declare module "dojox/grid/Selection" { + var exp: dojox.grid.Selection + export=exp; +} +declare module "dojox/grid/LazyTreeGrid" { + var exp: dojox.grid.LazyTreeGrid + export=exp; +} +declare module "dojox/grid/EnhancedGrid" { + var exp: dojox.grid.EnhancedGrid + export=exp; +} +declare module "dojox/grid/TreeGrid" { + var exp: dojox.grid.TreeGrid + export=exp; +} +declare module "dojox/grid/bidi/_BidiMixin" { + var exp: dojox.grid.bidi._BidiMixin + export=exp; +} +declare module "dojox/grid/cells/dijit" { + var exp: dojox.grid.cells.dijit + export=exp; +} +declare module "dojox/grid/cells/dijit._Widget" { + var exp: dojox.grid.cells.dijit._Widget + export=exp; +} +declare module "dojox/grid/cells/dijit.CheckBox" { + var exp: dojox.grid.cells.dijit.CheckBox + export=exp; +} +declare module "dojox/grid/cells/dijit.DateTextBox" { + var exp: dojox.grid.cells.dijit.DateTextBox + export=exp; +} +declare module "dojox/grid/cells/dijit.Editor" { + var exp: dojox.grid.cells.dijit.Editor + export=exp; +} +declare module "dojox/grid/cells/dijit.ComboBox" { + var exp: dojox.grid.cells.dijit.ComboBox + export=exp; +} +declare module "dojox/grid/cells/tree" { + var exp: dojox.grid.cells.tree + export=exp; +} +declare module "dojox/grid/cells/_base" { + var exp: dojox.grid.cells._base + export=exp; +} +declare module "dojox/grid/cells/_base.AlwaysEdit" { + var exp: dojox.grid.cells._base.AlwaysEdit + export=exp; +} +declare module "dojox/grid/cells/_base.Bool" { + var exp: dojox.grid.cells._base.Bool + export=exp; +} +declare module "dojox/grid/cells/_base.Cell" { + var exp: dojox.grid.cells._base.Cell + export=exp; +} +declare module "dojox/grid/cells/_base.Select" { + var exp: dojox.grid.cells._base.Select + export=exp; +} +declare module "dojox/grid/cells/_base.RowIndex" { + var exp: dojox.grid.cells._base.RowIndex + export=exp; +} +declare module "dojox/grid/enhanced/_Events" { + var exp: dojox.grid.enhanced._Events + export=exp; +} +declare module "dojox/grid/enhanced/_Plugin" { + var exp: dojox.grid.enhanced._Plugin + export=exp; +} +declare module "dojox/grid/enhanced/_PluginManager" { + var exp: dojox.grid.enhanced._PluginManager + export=exp; +} +declare module "dojox/grid/enhanced/_FocusManager" { + var exp: dojox.grid.enhanced._FocusManager + export=exp; +} +declare module "dojox/grid/enhanced/plugins/_StoreLayer" { + var exp: dojox.grid.enhanced.plugins._StoreLayer + export=exp; +} +declare module "dojox/grid/enhanced/plugins/_StoreLayer._ServerSideLayer" { + var exp: dojox.grid.enhanced.plugins._StoreLayer._ServerSideLayer + export=exp; +} +declare module "dojox/grid/enhanced/plugins/_StoreLayer._StoreLayer" { + var exp: dojox.grid.enhanced.plugins._StoreLayer._StoreLayer + export=exp; +} +declare module "dojox/grid/enhanced/plugins/_RowMapLayer" { + var exp: dojox.grid.enhanced.plugins._RowMapLayer + export=exp; +} +declare module "dojox/grid/enhanced/plugins/_SelectionPreserver" { + var exp: dojox.grid.enhanced.plugins._SelectionPreserver + export=exp; +} +declare module "dojox/grid/enhanced/plugins/AutoScroll" { + var exp: dojox.grid.enhanced.plugins.AutoScroll + export=exp; +} +declare module "dojox/grid/enhanced/plugins/DnD" { + var exp: dojox.grid.enhanced.plugins.DnD + export=exp; +} +declare module "dojox/grid/enhanced/plugins/CellMerge" { + var exp: dojox.grid.enhanced.plugins.CellMerge + export=exp; +} +declare module "dojox/grid/enhanced/plugins/Exporter" { + var exp: dojox.grid.enhanced.plugins.Exporter + export=exp; +} +declare module "dojox/grid/enhanced/plugins/Cookie" { + var exp: dojox.grid.enhanced.plugins.Cookie + export=exp; +} +declare module "dojox/grid/enhanced/plugins/Filter" { + var exp: dojox.grid.enhanced.plugins.Filter + export=exp; +} +declare module "dojox/grid/enhanced/plugins/Dialog" { + var exp: dojox.grid.enhanced.plugins.Dialog + export=exp; +} +declare module "dojox/grid/enhanced/plugins/IndirectSelection" { + var exp: dojox.grid.enhanced.plugins.IndirectSelection + export=exp; +} +declare module "dojox/grid/enhanced/plugins/Menu" { + var exp: dojox.grid.enhanced.plugins.Menu + export=exp; +} +declare module "dojox/grid/enhanced/plugins/Printer" { + var exp: dojox.grid.enhanced.plugins.Printer + export=exp; +} +declare module "dojox/grid/enhanced/plugins/NestedSorting" { + var exp: dojox.grid.enhanced.plugins.NestedSorting + export=exp; +} +declare module "dojox/grid/enhanced/plugins/Rearrange" { + var exp: dojox.grid.enhanced.plugins.Rearrange + export=exp; +} +declare module "dojox/grid/enhanced/plugins/Search" { + var exp: dojox.grid.enhanced.plugins.Search + export=exp; +} +declare module "dojox/grid/enhanced/plugins/Pagination" { + var exp: dojox.grid.enhanced.plugins.Pagination + export=exp; +} +declare module "dojox/grid/enhanced/plugins/GridSource" { + var exp: dojox.grid.enhanced.plugins.GridSource + export=exp; +} +declare module "dojox/grid/enhanced/plugins/Selector" { + var exp: dojox.grid.enhanced.plugins.Selector + export=exp; +} +declare module "dojox/grid/enhanced/plugins/exporter/_ExportWriter" { + var exp: dojox.grid.enhanced.plugins.exporter._ExportWriter + export=exp; +} +declare module "dojox/grid/enhanced/plugins/exporter/CSVWriter" { + var exp: dojox.grid.enhanced.plugins.exporter.CSVWriter + export=exp; +} +declare module "dojox/grid/enhanced/plugins/exporter/TableWriter" { + var exp: dojox.grid.enhanced.plugins.exporter.TableWriter + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/_ConditionExpr" { + var exp: dojox.grid.enhanced.plugins.filter._ConditionExpr + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/_ConditionExpr._BiOpExpr" { + var exp: dojox.grid.enhanced.plugins.filter._ConditionExpr._BiOpExpr + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/_ConditionExpr._OperatorExpr" { + var exp: dojox.grid.enhanced.plugins.filter._ConditionExpr._OperatorExpr + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/_ConditionExpr._UniOpExpr" { + var exp: dojox.grid.enhanced.plugins.filter._ConditionExpr._UniOpExpr + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/_ConditionExpr._ConditionExpr" { + var exp: dojox.grid.enhanced.plugins.filter._ConditionExpr._ConditionExpr + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/_ConditionExpr._DataExpr" { + var exp: dojox.grid.enhanced.plugins.filter._ConditionExpr._DataExpr + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/_DataExprs" { + var exp: dojox.grid.enhanced.plugins.filter._DataExprs + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/_DataExprs._BiOpExpr" { + var exp: dojox.grid.enhanced.plugins.filter._DataExprs._BiOpExpr + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/_DataExprs._ConditionExpr" { + var exp: dojox.grid.enhanced.plugins.filter._DataExprs._ConditionExpr + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/_DataExprs._OperatorExpr" { + var exp: dojox.grid.enhanced.plugins.filter._DataExprs._OperatorExpr + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/_DataExprs._UniOpExpr" { + var exp: dojox.grid.enhanced.plugins.filter._DataExprs._UniOpExpr + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/_DataExprs.NumberExpr" { + var exp: dojox.grid.enhanced.plugins.filter._DataExprs.NumberExpr + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/_DataExprs.DateExpr" { + var exp: dojox.grid.enhanced.plugins.filter._DataExprs.DateExpr + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/_DataExprs._DataExpr" { + var exp: dojox.grid.enhanced.plugins.filter._DataExprs._DataExpr + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/_DataExprs.StringExpr" { + var exp: dojox.grid.enhanced.plugins.filter._DataExprs.StringExpr + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/_DataExprs.BooleanExpr" { + var exp: dojox.grid.enhanced.plugins.filter._DataExprs.BooleanExpr + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/_DataExprs.TimeExpr" { + var exp: dojox.grid.enhanced.plugins.filter._DataExprs.TimeExpr + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/_FilterExpr" { + var exp: dojox.grid.enhanced.plugins.filter._FilterExpr + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/_FilterExpr._ConditionExpr" { + var exp: dojox.grid.enhanced.plugins.filter._FilterExpr._ConditionExpr + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/_FilterExpr._OperatorExpr" { + var exp: dojox.grid.enhanced.plugins.filter._FilterExpr._OperatorExpr + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/_FilterExpr._BiOpExpr" { + var exp: dojox.grid.enhanced.plugins.filter._FilterExpr._BiOpExpr + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/_FilterExpr.BooleanExpr" { + var exp: dojox.grid.enhanced.plugins.filter._FilterExpr.BooleanExpr + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/_FilterExpr._DataExpr" { + var exp: dojox.grid.enhanced.plugins.filter._FilterExpr._DataExpr + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/_FilterExpr._UniOpExpr" { + var exp: dojox.grid.enhanced.plugins.filter._FilterExpr._UniOpExpr + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/_FilterExpr.EndsWith" { + var exp: dojox.grid.enhanced.plugins.filter._FilterExpr.EndsWith + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/_FilterExpr.Contains" { + var exp: dojox.grid.enhanced.plugins.filter._FilterExpr.Contains + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/_FilterExpr.DateExpr" { + var exp: dojox.grid.enhanced.plugins.filter._FilterExpr.DateExpr + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/_FilterExpr.EqualTo" { + var exp: dojox.grid.enhanced.plugins.filter._FilterExpr.EqualTo + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/_FilterExpr.LargerThan" { + var exp: dojox.grid.enhanced.plugins.filter._FilterExpr.LargerThan + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/_FilterExpr.IsEmpty" { + var exp: dojox.grid.enhanced.plugins.filter._FilterExpr.IsEmpty + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/_FilterExpr.LessThanOrEqualTo" { + var exp: dojox.grid.enhanced.plugins.filter._FilterExpr.LessThanOrEqualTo + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/_FilterExpr.LessThan" { + var exp: dojox.grid.enhanced.plugins.filter._FilterExpr.LessThan + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/_FilterExpr.LargerThanOrEqualTo" { + var exp: dojox.grid.enhanced.plugins.filter._FilterExpr.LargerThanOrEqualTo + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/_FilterExpr.LogicALL" { + var exp: dojox.grid.enhanced.plugins.filter._FilterExpr.LogicALL + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/_FilterExpr.LogicAND" { + var exp: dojox.grid.enhanced.plugins.filter._FilterExpr.LogicAND + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/_FilterExpr.LogicANY" { + var exp: dojox.grid.enhanced.plugins.filter._FilterExpr.LogicANY + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/_FilterExpr.Matches" { + var exp: dojox.grid.enhanced.plugins.filter._FilterExpr.Matches + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/_FilterExpr.LogicOR" { + var exp: dojox.grid.enhanced.plugins.filter._FilterExpr.LogicOR + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/_FilterExpr.LogicNOT" { + var exp: dojox.grid.enhanced.plugins.filter._FilterExpr.LogicNOT + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/_FilterExpr.LogicXOR" { + var exp: dojox.grid.enhanced.plugins.filter._FilterExpr.LogicXOR + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/_FilterExpr.StringExpr" { + var exp: dojox.grid.enhanced.plugins.filter._FilterExpr.StringExpr + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/_FilterExpr.NumberExpr" { + var exp: dojox.grid.enhanced.plugins.filter._FilterExpr.NumberExpr + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/_FilterExpr.TimeExpr" { + var exp: dojox.grid.enhanced.plugins.filter._FilterExpr.TimeExpr + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/_FilterExpr.StartsWith" { + var exp: dojox.grid.enhanced.plugins.filter._FilterExpr.StartsWith + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/FilterLayer" { + var exp: dojox.grid.enhanced.plugins.filter.FilterLayer + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/FilterLayer._ServerSideLayer" { + var exp: dojox.grid.enhanced.plugins.filter.FilterLayer._ServerSideLayer + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/FilterLayer._StoreLayer" { + var exp: dojox.grid.enhanced.plugins.filter.FilterLayer._StoreLayer + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/FilterLayer.ServerSideFilterLayer" { + var exp: dojox.grid.enhanced.plugins.filter.FilterLayer.ServerSideFilterLayer + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/FilterLayer.ClientSideFilterLayer" { + var exp: dojox.grid.enhanced.plugins.filter.FilterLayer.ClientSideFilterLayer + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/FilterBuilder" { + var exp: dojox.grid.enhanced.plugins.filter.FilterBuilder + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/FilterStatusTip" { + var exp: dojox.grid.enhanced.plugins.filter.FilterStatusTip + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/FilterDefDialog" { + var exp: dojox.grid.enhanced.plugins.filter.FilterDefDialog + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/ClearFilterConfirm" { + var exp: dojox.grid.enhanced.plugins.filter.ClearFilterConfirm + export=exp; +} +declare module "dojox/grid/enhanced/plugins/filter/FilterBar" { + var exp: dojox.grid.enhanced.plugins.filter.FilterBar + export=exp; +} diff --git a/dojo/dojox.help.d.ts b/dojo/dojox.help.d.ts index dee039b944..9d0bc7b1ac 100644 --- a/dojo/dojox.help.d.ts +++ b/dojo/dojox.help.d.ts @@ -22,4 +22,13 @@ declare module dojox { } } -} \ No newline at end of file +} + +declare module "dojox/help/_base" { + var exp: dojox.help._base + export=exp; +} +declare module "dojox/help/console" { + var exp: dojox.help.console + export=exp; +} diff --git a/dojo/dojox.highlight.d.ts b/dojo/dojox.highlight.d.ts index 5b6f769a5e..17b88e5da5 100644 --- a/dojo/dojox.highlight.d.ts +++ b/dojo/dojox.highlight.d.ts @@ -2222,7 +2222,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -2370,4 +2370,185 @@ declare module dojox { } -} \ No newline at end of file +} + +declare module "dojox/highlight" { + var exp: dojox.highlight + export=exp; +} +declare module "dojox/highlight/_base" { + var exp: dojox.highlight._base + export=exp; +} +declare module "dojox/highlight/_base.constants" { + var exp: dojox.highlight._base.constants + export=exp; +} +declare module "dojox/highlight/languages/css" { + var exp: dojox.highlight.languages.css + export=exp; +} +declare module "dojox/highlight/languages/css.defaultMode" { + var exp: dojox.highlight.languages.css.defaultMode + export=exp; +} +declare module "dojox/highlight/languages/delphi" { + var exp: dojox.highlight.languages.delphi + export=exp; +} +declare module "dojox/highlight/languages/delphi.defaultMode" { + var exp: dojox.highlight.languages.delphi.defaultMode + export=exp; +} +declare module "dojox/highlight/languages/cpp" { + var exp: dojox.highlight.languages.cpp + export=exp; +} +declare module "dojox/highlight/languages/cpp.defaultMode" { + var exp: dojox.highlight.languages.cpp.defaultMode + export=exp; +} +declare module "dojox/highlight/languages/django" { + var exp: dojox.highlight.languages.django + export=exp; +} +declare module "dojox/highlight/languages/django.defaultMode" { + var exp: dojox.highlight.languages.django.defaultMode + export=exp; +} +declare module "dojox/highlight/languages/html" { + var exp: dojox.highlight.languages.html + export=exp; +} +declare module "dojox/highlight/languages/html.HTML_ATTR" { + var exp: dojox.highlight.languages.html.HTML_ATTR + export=exp; +} +declare module "dojox/highlight/languages/html.defaultMode" { + var exp: dojox.highlight.languages.html.defaultMode + export=exp; +} +declare module "dojox/highlight/languages/html.HTML_VALUE" { + var exp: dojox.highlight.languages.html.HTML_VALUE + export=exp; +} +declare module "dojox/highlight/languages/html.HTML_DOCTYPE" { + var exp: dojox.highlight.languages.html.HTML_DOCTYPE + export=exp; +} +declare module "dojox/highlight/languages/html.HTML_TAGS" { + var exp: dojox.highlight.languages.html.HTML_TAGS + export=exp; +} +declare module "dojox/highlight/languages/groovy" { + var exp: dojox.highlight.languages.groovy + export=exp; +} +declare module "dojox/highlight/languages/groovy.defaultMode" { + var exp: dojox.highlight.languages.groovy.defaultMode + export=exp; +} +declare module "dojox/highlight/languages/groovy.GROOVY_KEYWORDS" { + var exp: dojox.highlight.languages.groovy.GROOVY_KEYWORDS + export=exp; +} +declare module "dojox/highlight/languages/javascript" { + var exp: dojox.highlight.languages.javascript + export=exp; +} +declare module "dojox/highlight/languages/javascript.defaultMode" { + var exp: dojox.highlight.languages.javascript.defaultMode + export=exp; +} +declare module "dojox/highlight/languages/java" { + var exp: dojox.highlight.languages.java + export=exp; +} +declare module "dojox/highlight/languages/java.defaultMode" { + var exp: dojox.highlight.languages.java.defaultMode + export=exp; +} +declare module "dojox/highlight/languages/python" { + var exp: dojox.highlight.languages.python + export=exp; +} +declare module "dojox/highlight/languages/python.defaultMode" { + var exp: dojox.highlight.languages.python.defaultMode + export=exp; +} +declare module "dojox/highlight/languages/sql" { + var exp: dojox.highlight.languages.sql + export=exp; +} +declare module "dojox/highlight/languages/sql.defaultMode" { + var exp: dojox.highlight.languages.sql.defaultMode + export=exp; +} +declare module "dojox/highlight/languages/xquery" { + var exp: dojox.highlight.languages.xquery + export=exp; +} +declare module "dojox/highlight/languages/xquery.defaultMode" { + var exp: dojox.highlight.languages.xquery.defaultMode + export=exp; +} +declare module "dojox/highlight/languages/xquery.XQUERY_COMMENT" { + var exp: dojox.highlight.languages.xquery.XQUERY_COMMENT + export=exp; +} +declare module "dojox/highlight/languages/xml" { + var exp: dojox.highlight.languages.xml + export=exp; +} +declare module "dojox/highlight/languages/xml.defaultMode" { + var exp: dojox.highlight.languages.xml.defaultMode + export=exp; +} +declare module "dojox/highlight/languages/xml.XML_ATTR" { + var exp: dojox.highlight.languages.xml.XML_ATTR + export=exp; +} +declare module "dojox/highlight/languages/xml.XML_COMMENT" { + var exp: dojox.highlight.languages.xml.XML_COMMENT + export=exp; +} +declare module "dojox/highlight/languages/xml.XML_VALUE" { + var exp: dojox.highlight.languages.xml.XML_VALUE + export=exp; +} +declare module "dojox/highlight/languages/pygments/css" { + var exp: dojox.highlight.languages.pygments.css + export=exp; +} +declare module "dojox/highlight/languages/pygments/css.defaultMode" { + var exp: dojox.highlight.languages.pygments.css.defaultMode + export=exp; +} +declare module "dojox/highlight/languages/pygments/xml" { + var exp: dojox.highlight.languages.pygments.xml + export=exp; +} +declare module "dojox/highlight/languages/pygments/xml.defaultMode" { + var exp: dojox.highlight.languages.pygments.xml.defaultMode + export=exp; +} +declare module "dojox/highlight/languages/pygments/html" { + var exp: dojox.highlight.languages.pygments.html + export=exp; +} +declare module "dojox/highlight/languages/pygments/html.defaultMode" { + var exp: dojox.highlight.languages.pygments.html.defaultMode + export=exp; +} +declare module "dojox/highlight/languages/pygments/javascript" { + var exp: dojox.highlight.languages.pygments.javascript + export=exp; +} +declare module "dojox/highlight/languages/pygments/javascript.defaultMode" { + var exp: dojox.highlight.languages.pygments.javascript.defaultMode + export=exp; +} +declare module "dojox/highlight/widget/Code" { + var exp: dojox.highlight.widget.Code + export=exp; +} diff --git a/dojo/dojox.html.d.ts b/dojo/dojox.html.d.ts index fc03942436..4091666d8b 100644 --- a/dojo/dojox.html.d.ts +++ b/dojo/dojox.html.d.ts @@ -567,4 +567,45 @@ declare module dojox { } } -} \ No newline at end of file +} + +declare module "dojox/html" { + var exp: dojox.html + export=exp; +} +declare module "dojox/html/ellipsis" { + var exp: dojox.html.ellipsis + export=exp; +} +declare module "dojox/html/entities" { + var exp: dojox.html.entities + export=exp; +} +declare module "dojox/html/metrics" { + var exp: dojox.html.metrics + export=exp; +} +declare module "dojox/html/styles" { + var exp: dojox.html.styles + export=exp; +} +declare module "dojox/html/styles._ContentSetter" { + var exp: dojox.html.styles._ContentSetter + export=exp; +} +declare module "dojox/html/styles.ext-dojo" { + var exp: dojox.html.styles.ext_dojo + export=exp; +} +declare module "dojox/html/styles.metrics" { + var exp: dojox.html.styles.metrics + export=exp; +} +declare module "dojox/html/styles.entities" { + var exp: dojox.html.styles.entities + export=exp; +} +declare module "dojox/html/_base._ContentSetter" { + var exp: dojox.html._base._ContentSetter + export=exp; +} diff --git a/dojo/dojox.image.d.ts b/dojo/dojox.image.d.ts index 87ede234a1..29aac5e41e 100644 --- a/dojo/dojox.image.d.ts +++ b/dojo/dojox.image.d.ts @@ -789,7 +789,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -1828,7 +1828,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -2615,7 +2615,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -2759,4 +2759,37 @@ declare module dojox { } -} \ No newline at end of file +} + +declare module "dojox/image" { + var exp: dojox.image + export=exp; +} +declare module "dojox/image/FlickrBadge" { + var exp: dojox.image.FlickrBadge + export=exp; +} +declare module "dojox/image/Lightbox" { + var exp: dojox.image.Lightbox + export=exp; +} +declare module "dojox/image/Lightbox.LightboxDialog" { + var exp: dojox.image.Lightbox.LightboxDialog + export=exp; +} +declare module "dojox/image/LightboxNano" { + var exp: dojox.image.LightboxNano + export=exp; +} +declare module "dojox/image/Badge" { + var exp: dojox.image.Badge + export=exp; +} +declare module "dojox/image/Magnifier" { + var exp: dojox.image.Magnifier + export=exp; +} +declare module "dojox/image/MagnifierLite" { + var exp: dojox.image.MagnifierLite + export=exp; +} diff --git a/dojo/dojox.io.d.ts b/dojo/dojox.io.d.ts index 19ba8237b8..4079b56a4d 100644 --- a/dojo/dojox.io.d.ts +++ b/dojo/dojox.io.d.ts @@ -241,4 +241,45 @@ declare module dojox { } } -} \ No newline at end of file +} + +declare module "dojox/io/httpParse" { + var exp: dojox.io.httpParse + export=exp; +} +declare module "dojox/io/xhrMultiPart" { + var exp: dojox.io.xhrMultiPart + export=exp; +} +declare module "dojox/io/xhrWindowNamePlugin" { + var exp: dojox.io.xhrWindowNamePlugin + export=exp; +} +declare module "dojox/io/xhrScriptPlugin" { + var exp: dojox.io.xhrScriptPlugin + export=exp; +} +declare module "dojox/io/windowName" { + var exp: dojox.io.windowName + export=exp; +} +declare module "dojox/io/scriptFrame" { + var exp: dojox.io.scriptFrame + export=exp; +} +declare module "dojox/io/scriptFrame._loadedIds" { + var exp: dojox.io.scriptFrame._loadedIds + export=exp; +} +declare module "dojox/io/scriptFrame._waiters" { + var exp: dojox.io.scriptFrame._waiters + export=exp; +} +declare module "dojox/io/proxy/xip" { + var exp: dojox.io.proxy.xip + export=exp; +} +declare module "dojox/io/proxy/xip._state" { + var exp: dojox.io.proxy.xip._state + export=exp; +} diff --git a/dojo/dojox.jq.d.ts b/dojo/dojox.jq.d.ts index dbe9cd2664..d2e7405f9c 100644 --- a/dojo/dojox.jq.d.ts +++ b/dojo/dojox.jq.d.ts @@ -12,4 +12,9 @@ declare module dojox { */ interface jq { } -} \ No newline at end of file +} + +declare module "dojox/jq" { + var exp: dojox.jq + export=exp; +} diff --git a/dojo/dojox.json.d.ts b/dojo/dojox.json.d.ts index 10245b556c..a7a6da1efe 100644 --- a/dojo/dojox.json.d.ts +++ b/dojo/dojox.json.d.ts @@ -129,4 +129,13 @@ declare module dojox { } } -} \ No newline at end of file +} + +declare module "dojox/json/query" { + var exp: dojox.json.query + export=exp; +} +declare module "dojox/json/ref" { + var exp: dojox.json.ref + export=exp; +} diff --git a/dojo/dojox.jsonPath.d.ts b/dojo/dojox.jsonPath.d.ts index b7530a9594..7278a436f0 100644 --- a/dojo/dojox.jsonPath.d.ts +++ b/dojo/dojox.jsonPath.d.ts @@ -28,4 +28,13 @@ declare module dojox { } -} \ No newline at end of file +} + +declare module "dojox/jsonPath" { + var exp: dojox.jsonPath + export=exp; +} +declare module "dojox/jsonPath/query" { + var exp: dojox.jsonPath.query + export=exp; +} diff --git a/dojo/dojox.lang.d.ts b/dojo/dojox.lang.d.ts index 6e26bc58e3..7092b6da55 100644 --- a/dojo/dojox.lang.d.ts +++ b/dojo/dojox.lang.d.ts @@ -12019,4 +12019,117 @@ declare module dojox { } } -} \ No newline at end of file +} + +declare module "dojox/lang/observable" { + var exp: dojox.lang.observable + export=exp; +} +declare module "dojox/lang/aspect" { + var exp: dojox.lang.aspect + export=exp; +} +declare module "dojox/lang/aspect/memoizerGuard" { + var exp: dojox.lang.aspect.memoizerGuard + export=exp; +} +declare module "dojox/lang/aspect/memoizer" { + var exp: dojox.lang.aspect.memoizer + export=exp; +} +declare module "dojox/lang/aspect/counter" { + var exp: dojox.lang.aspect.counter + export=exp; +} +declare module "dojox/lang/aspect/cflow" { + var exp: dojox.lang.aspect.cflow + export=exp; +} +declare module "dojox/lang/aspect/timer" { + var exp: dojox.lang.aspect.timer + export=exp; +} +declare module "dojox/lang/aspect/profiler" { + var exp: dojox.lang.aspect.profiler + export=exp; +} +declare module "dojox/lang/aspect/tracer" { + var exp: dojox.lang.aspect.tracer + export=exp; +} +declare module "dojox/lang/async" { + var exp: dojox.lang.async + export=exp; +} +declare module "dojox/lang/async/event" { + var exp: dojox.lang.async.event + export=exp; +} +declare module "dojox/lang/async/timeout" { + var exp: dojox.lang.async.timeout + export=exp; +} +declare module "dojox/lang/async/topic" { + var exp: dojox.lang.async.topic + export=exp; +} +declare module "dojox/lang/functional" { + var exp: dojox.lang.functional + export=exp; +} +declare module "dojox/lang/functional/listcomp" { + var exp: dojox.lang.functional.listcomp + export=exp; +} +declare module "dojox/lang/functional/object" { + var exp: dojox.lang.functional.object + export=exp; +} +declare module "dojox/lang/functional/zip" { + var exp: dojox.lang.functional.zip + export=exp; +} +declare module "dojox/lang/functional/array" { + var exp: dojox.lang.functional.array + export=exp; +} +declare module "dojox/lang/functional/lambda" { + var exp: dojox.lang.functional.lambda + export=exp; +} +declare module "dojox/lang/functional/reversed" { + var exp: dojox.lang.functional.reversed + export=exp; +} +declare module "dojox/lang/functional/sequence" { + var exp: dojox.lang.functional.sequence + export=exp; +} +declare module "dojox/lang/utils" { + var exp: dojox.lang.utils + export=exp; +} +declare module "dojox/lang/oo/mixin" { + var exp: dojox.lang.oo.mixin + export=exp; +} +declare module "dojox/lang/oo/Filter" { + var exp: dojox.lang.oo.Filter + export=exp; +} +declare module "dojox/lang/oo/Decorator" { + var exp: dojox.lang.oo.Decorator + export=exp; +} +declare module "dojox/lang/oo/rearrange" { + var exp: dojox.lang.oo.rearrange + export=exp; +} +declare module "dojox/lang/oo/aop" { + var exp: dojox.lang.oo.aop + export=exp; +} +declare module "dojox/lang/oo/general" { + var exp: dojox.lang.oo.general + export=exp; +} diff --git a/dojo/dojox.layout.d.ts b/dojo/dojox.layout.d.ts index a8ef4204a8..fa03236d74 100644 --- a/dojo/dojox.layout.d.ts +++ b/dojo/dojox.layout.d.ts @@ -915,7 +915,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -1758,7 +1758,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -2448,7 +2448,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -3522,7 +3522,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -3913,6 +3913,7 @@ declare module dojox { set(property:"extractContent", value: boolean): void; get(property:"extractContent"): boolean; watch(property:"extractContent", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + focusNode: HTMLElement; /** * This widget or a widget it contains has focus, or is "active" because * it was recently clicked. @@ -4180,7 +4181,7 @@ declare module dojox { * @param widget * @param insertIndex Optional */ - addChild(widget: dijit._WidgetBase, insertIndex: number): void; + addChild(widget: dijit._WidgetBase, insertIndex? : number): void; /** * This method is deprecated, use get() or set() directly. * @@ -4688,7 +4689,7 @@ declare module dojox { * * @param callback Optional */ - show(callback: Function): void; + show(callback?: Function): void; /** * */ @@ -4713,7 +4714,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -6755,7 +6756,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -7788,7 +7789,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -8739,7 +8740,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -9817,7 +9818,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -10766,7 +10767,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -11432,4 +11433,77 @@ declare module dojox { } -} \ No newline at end of file +} + +declare module "dojox/layout/BorderContainer" { + var exp: dojox.layout.BorderContainer + export=exp; +} +declare module "dojox/layout/RadioGroup" { + var exp: dojox.layout.RadioGroup + export=exp; +} +declare module "dojox/layout/Dock" { + var exp: typeof dojox.layout.Dock + export=exp; +} +declare module "dojox/layout/DragPane" { + var exp: typeof dojox.layout.DragPane + export=exp; +} +declare module "dojox/layout/ExpandoPane" { + var exp: typeof dojox.layout.ExpandoPane + export=exp; +} +declare module "dojox/layout/ContentPane" { + var exp: typeof dojox.layout.ContentPane + export=exp; +} +declare module "dojox/layout/GridContainer" { + var exp: typeof dojox.layout.GridContainer + export=exp; +} +declare module "dojox/layout/FloatingPane" { + var exp: typeof dojox.layout.FloatingPane + export=exp; +} +declare module "dojox/layout/GridContainerLite" { + var exp: typeof dojox.layout.GridContainerLite + export=exp; +} +declare module "dojox/layout/GridContainerLite.ChildWidgetProperties" { + var exp: dojox.layout.GridContainerLite.ChildWidgetProperties + export=exp; +} +declare module "dojox/layout/ResizeHandle" { + var exp: typeof dojox.layout.ResizeHandle + export=exp; +} +declare module "dojox/layout/ToggleSplitter" { + var exp: typeof dojox.layout.ToggleSplitter + export=exp; +} +declare module "dojox/layout/RotatorContainer" { + var exp: typeof dojox.layout.RotatorContainer + export=exp; +} +declare module "dojox/layout/TableContainer" { + var exp: typeof dojox.layout.TableContainer + export=exp; +} +declare module "dojox/layout/TableContainer.ChildWidgetProperties" { + var exp: dojox.layout.TableContainer.ChildWidgetProperties + export=exp; +} +declare module "dojox/layout/ScrollPane" { + var exp: typeof dojox.layout.ScrollPane + export=exp; +} +declare module "dojox/layout/dnd/Avatar" { + var exp: typeof dojox.layout.dnd.Avatar + export=exp; +} +declare module "dojox/layout/dnd/PlottedDnd" { + var exp: typeof dojox.layout.dnd.PlottedDnd + export=exp; +} diff --git a/dojo/dojox.main.d.ts b/dojo/dojox.main.d.ts index cef3da3be1..4f4592532d 100644 --- a/dojo/dojox.main.d.ts +++ b/dojo/dojox.main.d.ts @@ -2327,4 +2327,57 @@ declare module dojox { } } -} \ No newline at end of file +} + +declare module "dojox/main" { + var exp: dojox.main + export=exp; +} +declare module "dojox/main.languages" { + var exp: dojox.main.languages + export=exp; +} +declare module "dojox/main.islamic" { + var exp: dojox.main.islamic + export=exp; +} +declare module "dojox/main.buddhist" { + var exp: dojox.main.buddhist + export=exp; +} +declare module "dojox/main.charting" { + var exp: dojox.main.charting + export=exp; +} +declare module "dojox/main.hebrew" { + var exp: dojox.main.hebrew + export=exp; +} +declare module "dojox/main.functional" { + var exp: dojox.main.functional + export=exp; +} +declare module "dojox/main.relative" { + var exp: dojox.main.relative + export=exp; +} +declare module "dojox/main.util" { + var exp: dojox.main.util + export=exp; +} +declare module "dojox/main.regexp" { + var exp: dojox.main.regexp + export=exp; +} +declare module "dojox/main.umalqura" { + var exp: dojox.main.umalqura + export=exp; +} +declare module "dojox/main.persian" { + var exp: dojox.main.persian + export=exp; +} +declare module "dojox/main.utils" { + var exp: dojox.main.utils + export=exp; +} diff --git a/dojo/dojox.math.d.ts b/dojo/dojox.math.d.ts index 0d85d20c5f..4b20f1f56f 100644 --- a/dojo/dojox.math.d.ts +++ b/dojo/dojox.math.d.ts @@ -147,4 +147,33 @@ declare module dojox { } -} \ No newline at end of file +} + +declare module "dojox/math" { + var exp: dojox.math + export=exp; +} +declare module "dojox/math/BigInteger" { + var exp: dojox.math.BigInteger + export=exp; +} +declare module "dojox/math/BigInteger-ext" { + var exp: dojox.math.BigInteger_ext + export=exp; +} +declare module "dojox/math/round" { + var exp: dojox.math.round + export=exp; +} +declare module "dojox/math/random/prng4" { + var exp: dojox.math.random.prng4 + export=exp; +} +declare module "dojox/math/random/Simple" { + var exp: dojox.math.random.Simple + export=exp; +} +declare module "dojox/math/random/Secure" { + var exp: dojox.math.random.Secure + export=exp; +} diff --git a/dojo/dojox.mdnd.d.ts b/dojo/dojox.mdnd.d.ts index a8b8f82c8f..4d596bd292 100644 --- a/dojo/dojox.mdnd.d.ts +++ b/dojo/dojox.mdnd.d.ts @@ -996,4 +996,49 @@ declare module dojox { } -} \ No newline at end of file +} + +declare module "dojox/mdnd/AutoScroll" { + var exp: dojox.mdnd.AutoScroll + export=exp; +} +declare module "dojox/mdnd/DropIndicator" { + var exp: dojox.mdnd.DropIndicator + export=exp; +} +declare module "dojox/mdnd/AreaManager" { + var exp: dojox.mdnd.AreaManager + export=exp; +} +declare module "dojox/mdnd/LazyManager" { + var exp: dojox.mdnd.LazyManager + export=exp; +} +declare module "dojox/mdnd/Moveable" { + var exp: dojox.mdnd.Moveable + export=exp; +} +declare module "dojox/mdnd/PureSource" { + var exp: dojox.mdnd.PureSource + export=exp; +} +declare module "dojox/mdnd/adapter/DndFromDojo" { + var exp: dojox.mdnd.adapter.DndFromDojo + export=exp; +} +declare module "dojox/mdnd/adapter/DndToDojo" { + var exp: dojox.mdnd.adapter.DndToDojo + export=exp; +} +declare module "dojox/mdnd/dropMode/DefaultDropMode" { + var exp: dojox.mdnd.dropMode.DefaultDropMode + export=exp; +} +declare module "dojox/mdnd/dropMode/OverDropMode" { + var exp: dojox.mdnd.dropMode.OverDropMode + export=exp; +} +declare module "dojox/mdnd/dropMode/VerticalDropMode" { + var exp: dojox.mdnd.dropMode.VerticalDropMode + export=exp; +} diff --git a/dojo/dojox.mobile.d.ts b/dojo/dojox.mobile.d.ts index 253cea1564..ae64ac4339 100644 --- a/dojo/dojox.mobile.d.ts +++ b/dojo/dojox.mobile.d.ts @@ -680,7 +680,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -2024,7 +2024,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -3004,7 +3004,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Performs a view transition. * Given a transition destination, this method performs a view @@ -3792,7 +3792,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -5215,7 +5215,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -6005,7 +6005,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -6754,7 +6754,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -7469,7 +7469,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -8296,7 +8296,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -9143,7 +9143,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -10200,7 +10200,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Restore the value to the last value passed to onChange * @@ -10932,7 +10932,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -11715,7 +11715,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -12585,7 +12585,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -13331,7 +13331,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -14144,7 +14144,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -15057,7 +15057,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -16039,7 +16039,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -16934,7 +16934,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Restore the value to the last value passed to onChange * @@ -17805,7 +17805,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -18510,7 +18510,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -19252,7 +19252,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -20005,7 +20005,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -20798,7 +20798,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -21657,7 +21657,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -22704,7 +22704,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Performs a view transition. * Given a transition destination, this method performs a view @@ -23517,7 +23517,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -24476,7 +24476,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Performs a view transition. * Given a transition destination, this method performs a view @@ -25698,7 +25698,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Performs a view transition. * Given a transition destination, this method performs a view @@ -26437,7 +26437,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -27103,7 +27103,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -27782,7 +27782,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -28460,7 +28460,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -29134,7 +29134,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -29876,7 +29876,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -30557,7 +30557,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -31323,7 +31323,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -32060,7 +32060,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -32742,7 +32742,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -33559,7 +33559,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -34472,7 +34472,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -35569,7 +35569,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -36688,7 +36688,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -37896,7 +37896,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -38936,7 +38936,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Restore the value to the last value passed to onChange * @@ -39718,7 +39718,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -40524,7 +40524,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Restore the value to the last value passed to onChange * @@ -41289,7 +41289,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -42093,7 +42093,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -43201,7 +43201,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -44000,7 +44000,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -44863,7 +44863,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -45657,7 +45657,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -46893,7 +46893,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -47775,7 +47775,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -48758,7 +48758,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Performs a view transition. * Given a transition destination, this method performs a view @@ -49658,7 +49658,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Restore the value to the last value passed to onChange * @@ -50535,7 +50535,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Restore the value to the last value passed to onChange * @@ -51309,7 +51309,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -52303,7 +52303,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Performs a view transition. * Given a transition destination, this method performs a view @@ -52992,7 +52992,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -54173,7 +54173,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -55030,7 +55030,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -55944,7 +55944,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -56737,7 +56737,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -57602,7 +57602,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -58306,7 +58306,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -59168,7 +59168,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -60715,4 +60715,597 @@ declare module dojox { } } -} \ No newline at end of file +} + +declare module "dojox/mobile" { + var exp: dojox.mobile + export=exp; +} +declare module "dojox/mobile/_ContentPaneMixin" { + var exp: dojox.mobile._ContentPaneMixin + export=exp; +} +declare module "dojox/mobile/_DataMixin" { + var exp: dojox.mobile._DataMixin + export=exp; +} +declare module "dojox/mobile/_ComboBoxMenu" { + var exp: dojox.mobile._ComboBoxMenu + export=exp; +} +declare module "dojox/mobile/_DatePickerMixin" { + var exp: dojox.mobile._DatePickerMixin + export=exp; +} +declare module "dojox/mobile/_ExecScriptMixin" { + var exp: dojox.mobile._ExecScriptMixin + export=exp; +} +declare module "dojox/mobile/_DataListMixin" { + var exp: dojox.mobile._DataListMixin + export=exp; +} +declare module "dojox/mobile/_EditableIconMixin" { + var exp: dojox.mobile._EditableIconMixin + export=exp; +} +declare module "dojox/mobile/_EditableListMixin" { + var exp: dojox.mobile._EditableListMixin + export=exp; +} +declare module "dojox/mobile/_ListTouchMixin" { + var exp: dojox.mobile._ListTouchMixin + export=exp; +} +declare module "dojox/mobile/_IconItemPane" { + var exp: dojox.mobile._IconItemPane + export=exp; +} +declare module "dojox/mobile/_StoreListMixin" { + var exp: dojox.mobile._StoreListMixin + export=exp; +} +declare module "dojox/mobile/_StoreMixin" { + var exp: dojox.mobile._StoreMixin + export=exp; +} +declare module "dojox/mobile/_TimePickerMixin" { + var exp: dojox.mobile._TimePickerMixin + export=exp; +} +declare module "dojox/mobile/_ItemBase" { + var exp: dojox.mobile._ItemBase + export=exp; +} +declare module "dojox/mobile/Badge" { + var exp: dojox.mobile.Badge + export=exp; +} +declare module "dojox/mobile/_ScrollableMixin" { + var exp: dojox.mobile._ScrollableMixin + export=exp; +} +declare module "dojox/mobile/_PickerBase" { + var exp: dojox.mobile._PickerBase + export=exp; +} +declare module "dojox/mobile/Audio" { + var exp: dojox.mobile.Audio + export=exp; +} +declare module "dojox/mobile/Accordion" { + var exp: dojox.mobile.Accordion + export=exp; +} +declare module "dojox/mobile/Accordion.ChildWidgetProperties" { + var exp: dojox.mobile.Accordion.ChildWidgetProperties + export=exp; +} +declare module "dojox/mobile/Button" { + var exp: dojox.mobile.Button + export=exp; +} +declare module "dojox/mobile/CarouselItem" { + var exp: dojox.mobile.CarouselItem + export=exp; +} +declare module "dojox/mobile/Carousel" { + var exp: dojox.mobile.Carousel + export=exp; +} +declare module "dojox/mobile/Carousel.ChildSwapViewProperties" { + var exp: dojox.mobile.Carousel.ChildSwapViewProperties + export=exp; +} +declare module "dojox/mobile/CheckBox" { + var exp: dojox.mobile.CheckBox + export=exp; +} +declare module "dojox/mobile/Container" { + var exp: dojox.mobile.Container + export=exp; +} +declare module "dojox/mobile/ComboBox" { + var exp: dojox.mobile.ComboBox + export=exp; +} +declare module "dojox/mobile/ContentPane" { + var exp: dojox.mobile.ContentPane + export=exp; +} +declare module "dojox/mobile/DataCarousel" { + var exp: dojox.mobile.DataCarousel + export=exp; +} +declare module "dojox/mobile/FilteredListMixin" { + var exp: dojox.mobile.FilteredListMixin + export=exp; +} +declare module "dojox/mobile/EdgeToEdgeList" { + var exp: dojox.mobile.EdgeToEdgeList + export=exp; +} +declare module "dojox/mobile/EdgeToEdgeCategory" { + var exp: dojox.mobile.EdgeToEdgeCategory + export=exp; +} +declare module "dojox/mobile/EdgeToEdgeStoreList" { + var exp: dojox.mobile.EdgeToEdgeStoreList + export=exp; +} +declare module "dojox/mobile/EdgeToEdgeDataList" { + var exp: dojox.mobile.EdgeToEdgeDataList + export=exp; +} +declare module "dojox/mobile/ExpandingTextArea" { + var exp: dojox.mobile.ExpandingTextArea + export=exp; +} +declare module "dojox/mobile/FixedSplitterPane" { + var exp: dojox.mobile.FixedSplitterPane + export=exp; +} +declare module "dojox/mobile/Icon" { + var exp: dojox.mobile.Icon + export=exp; +} +declare module "dojox/mobile/FixedSplitter" { + var exp: dojox.mobile.FixedSplitter + export=exp; +} +declare module "dojox/mobile/FormLayout" { + var exp: dojox.mobile.FormLayout + export=exp; +} +declare module "dojox/mobile/GridLayout" { + var exp: dojox.mobile.GridLayout + export=exp; +} +declare module "dojox/mobile/IconMenu" { + var exp: dojox.mobile.IconMenu + export=exp; +} +declare module "dojox/mobile/IconMenuItem" { + var exp: dojox.mobile.IconMenuItem + export=exp; +} +declare module "dojox/mobile/IconContainer" { + var exp: dojox.mobile.IconContainer + export=exp; +} +declare module "dojox/mobile/Heading" { + var exp: dojox.mobile.Heading + export=exp; +} +declare module "dojox/mobile/LongListMixin" { + var exp: dojox.mobile.LongListMixin + export=exp; +} +declare module "dojox/mobile/IconItem" { + var exp: dojox.mobile.IconItem + export=exp; +} +declare module "dojox/mobile/ListItem" { + var exp: dojox.mobile.ListItem + export=exp; +} +declare module "dojox/mobile/ListItem.ChildWidgetProperties" { + var exp: dojox.mobile.ListItem.ChildWidgetProperties + export=exp; +} +declare module "dojox/mobile/Pane" { + var exp: dojox.mobile.Pane + export=exp; +} +declare module "dojox/mobile/Opener" { + var exp: dojox.mobile.Opener + export=exp; +} +declare module "dojox/mobile/Overlay" { + var exp: dojox.mobile.Overlay + export=exp; +} +declare module "dojox/mobile/PageIndicator" { + var exp: dojox.mobile.PageIndicator + export=exp; +} +declare module "dojox/mobile/ProgressBar" { + var exp: dojox.mobile.ProgressBar + export=exp; +} +declare module "dojox/mobile/ProgressIndicator" { + var exp: dojox.mobile.ProgressIndicator + export=exp; +} +declare module "dojox/mobile/RoundRectCategory" { + var exp: dojox.mobile.RoundRectCategory + export=exp; +} +declare module "dojox/mobile/RoundRect" { + var exp: dojox.mobile.RoundRect + export=exp; +} +declare module "dojox/mobile/RadioButton" { + var exp: dojox.mobile.RadioButton + export=exp; +} +declare module "dojox/mobile/RoundRectList" { + var exp: dojox.mobile.RoundRectList + export=exp; +} +declare module "dojox/mobile/ScreenSizeAware" { + var exp: dojox.mobile.ScreenSizeAware + export=exp; +} +declare module "dojox/mobile/RoundRectDataList" { + var exp: dojox.mobile.RoundRectDataList + export=exp; +} +declare module "dojox/mobile/RoundRectStoreList" { + var exp: dojox.mobile.RoundRectStoreList + export=exp; +} +declare module "dojox/mobile/ScrollablePane" { + var exp: dojox.mobile.ScrollablePane + export=exp; +} +declare module "dojox/mobile/Rating" { + var exp: dojox.mobile.Rating + export=exp; +} +declare module "dojox/mobile/Slider" { + var exp: dojox.mobile.Slider + export=exp; +} +declare module "dojox/mobile/SimpleDialog" { + var exp: dojox.mobile.SimpleDialog + export=exp; +} +declare module "dojox/mobile/SearchBox" { + var exp: dojox.mobile.SearchBox + export=exp; +} +declare module "dojox/mobile/ScrollableView" { + var exp: dojox.mobile.ScrollableView + export=exp; +} +declare module "dojox/mobile/SpinWheel" { + var exp: dojox.mobile.SpinWheel + export=exp; +} +declare module "dojox/mobile/SpinWheelDatePicker" { + var exp: dojox.mobile.SpinWheelDatePicker + export=exp; +} +declare module "dojox/mobile/SpinWheelTimePicker" { + var exp: dojox.mobile.SpinWheelTimePicker + export=exp; +} +declare module "dojox/mobile/Switch" { + var exp: dojox.mobile.Switch + export=exp; +} +declare module "dojox/mobile/SpinWheelSlot" { + var exp: dojox.mobile.SpinWheelSlot + export=exp; +} +declare module "dojox/mobile/StoreCarousel" { + var exp: dojox.mobile.StoreCarousel + export=exp; +} +declare module "dojox/mobile/TabBar" { + var exp: dojox.mobile.TabBar + export=exp; +} +declare module "dojox/mobile/SwapView" { + var exp: dojox.mobile.SwapView + export=exp; +} +declare module "dojox/mobile/TextArea" { + var exp: dojox.mobile.TextArea + export=exp; +} +declare module "dojox/mobile/ToggleButton" { + var exp: dojox.mobile.ToggleButton + export=exp; +} +declare module "dojox/mobile/TransitionEvent" { + var exp: dojox.mobile.TransitionEvent + export=exp; +} +declare module "dojox/mobile/Tooltip" { + var exp: dojox.mobile.Tooltip + export=exp; +} +declare module "dojox/mobile/TextBox" { + var exp: dojox.mobile.TextBox + export=exp; +} +declare module "dojox/mobile/ToolBarButton" { + var exp: dojox.mobile.ToolBarButton + export=exp; +} +declare module "dojox/mobile/TabBarButton" { + var exp: dojox.mobile.TabBarButton + export=exp; +} +declare module "dojox/mobile/ValuePicker" { + var exp: dojox.mobile.ValuePicker + export=exp; +} +declare module "dojox/mobile/ValuePickerSlot" { + var exp: dojox.mobile.ValuePickerSlot + export=exp; +} +declare module "dojox/mobile/ValuePickerDatePicker" { + var exp: dojox.mobile.ValuePickerDatePicker + export=exp; +} +declare module "dojox/mobile/ViewController" { + var exp: dojox.mobile.ViewController + export=exp; +} +declare module "dojox/mobile/TreeView" { + var exp: dojox.mobile.TreeView + export=exp; +} +declare module "dojox/mobile/Video" { + var exp: dojox.mobile.Video + export=exp; +} +declare module "dojox/mobile/ValuePickerTimePicker" { + var exp: dojox.mobile.ValuePickerTimePicker + export=exp; +} +declare module "dojox/mobile/View" { + var exp: dojox.mobile.View + export=exp; +} +declare module "dojox/mobile/DatePicker" { + var exp: dojox.mobile.DatePicker + export=exp; +} +declare module "dojox/mobile/pageTurningUtils" { + var exp: dojox.mobile.pageTurningUtils + export=exp; +} +declare module "dojox/mobile/scrollable" { + var exp: dojox.mobile.scrollable + export=exp; +} +declare module "dojox/mobile/TimePicker" { + var exp: dojox.mobile.TimePicker + export=exp; +} +declare module "dojox/mobile/_base" { + var exp: dojox.mobile._base + export=exp; +} +declare module "dojox/mobile/_compat" { + var exp: dojox.mobile._compat + export=exp; +} +declare module "dojox/mobile/_css3" { + var exp: dojox.mobile._css3 + export=exp; +} +declare module "dojox/mobile/_PickerChooser" { + var exp: dojox.mobile._PickerChooser + export=exp; +} +declare module "dojox/mobile/_maskUtils" { + var exp: dojox.mobile._maskUtils + export=exp; +} +declare module "dojox/mobile/bookmarkable" { + var exp: dojox.mobile.bookmarkable + export=exp; +} +declare module "dojox/mobile/common" { + var exp: dojox.mobile.common + export=exp; +} +declare module "dojox/mobile/compat" { + var exp: dojox.mobile.compat + export=exp; +} +declare module "dojox/mobile/i18n" { + var exp: dojox.mobile.i18n + export=exp; +} +declare module "dojox/mobile/i18n.I18NProperties" { + var exp: dojox.mobile.i18n.I18NProperties + export=exp; +} +declare module "dojox/mobile/mobile-all" { + var exp: dojox.mobile.mobile_all + export=exp; +} +declare module "dojox/mobile/sniff" { + var exp: dojox.mobile.sniff + export=exp; +} +declare module "dojox/mobile/transition" { + var exp: dojox.mobile.transition + export=exp; +} +declare module "dojox/mobile/uacss" { + var exp: dojox.mobile.uacss + export=exp; +} +declare module "dojox/mobile/viewRegistry" { + var exp: dojox.mobile.viewRegistry + export=exp; +} +declare module "dojox/mobile/viewRegistry.hash" { + var exp: dojox.mobile.viewRegistry.hash + export=exp; +} +declare module "dojox/mobile/bidi/common" { + var exp: dojox.mobile.bidi.common + export=exp; +} +declare module "dojox/mobile/bidi/common.MARK" { + var exp: dojox.mobile.bidi.common.MARK + export=exp; +} +declare module "dojox/mobile/bidi/_ComboBoxMenu" { + var exp: dojox.mobile.bidi._ComboBoxMenu + export=exp; +} +declare module "dojox/mobile/bidi/_ItemBase" { + var exp: dojox.mobile.bidi._ItemBase + export=exp; +} +declare module "dojox/mobile/bidi/_StoreListMixin" { + var exp: dojox.mobile.bidi._StoreListMixin + export=exp; +} +declare module "dojox/mobile/bidi/Accordion" { + var exp: dojox.mobile.bidi.Accordion + export=exp; +} +declare module "dojox/mobile/bidi/Badge" { + var exp: dojox.mobile.bidi.Badge + export=exp; +} +declare module "dojox/mobile/bidi/Button" { + var exp: dojox.mobile.bidi.Button + export=exp; +} +declare module "dojox/mobile/bidi/Carousel" { + var exp: dojox.mobile.bidi.Carousel + export=exp; +} +declare module "dojox/mobile/bidi/Heading" { + var exp: dojox.mobile.bidi.Heading + export=exp; +} +declare module "dojox/mobile/bidi/IconMenu" { + var exp: dojox.mobile.bidi.IconMenu + export=exp; +} +declare module "dojox/mobile/bidi/IconItem" { + var exp: dojox.mobile.bidi.IconItem + export=exp; +} +declare module "dojox/mobile/bidi/CarouselItem" { + var exp: dojox.mobile.bidi.CarouselItem + export=exp; +} +declare module "dojox/mobile/bidi/ListItem" { + var exp: dojox.mobile.bidi.ListItem + export=exp; +} +declare module "dojox/mobile/bidi/RoundRectCategory" { + var exp: dojox.mobile.bidi.RoundRectCategory + export=exp; +} +declare module "dojox/mobile/bidi/TabBar" { + var exp: dojox.mobile.bidi.TabBar + export=exp; +} +declare module "dojox/mobile/bidi/SwapView" { + var exp: dojox.mobile.bidi.SwapView + export=exp; +} +declare module "dojox/mobile/bidi/Switch" { + var exp: dojox.mobile.bidi.Switch + export=exp; +} +declare module "dojox/mobile/bidi/SpinWheelSlot" { + var exp: dojox.mobile.bidi.SpinWheelSlot + export=exp; +} +declare module "dojox/mobile/bidi/TextBox" { + var exp: dojox.mobile.bidi.TextBox + export=exp; +} +declare module "dojox/mobile/bidi/TabBarButton" { + var exp: dojox.mobile.bidi.TabBarButton + export=exp; +} +declare module "dojox/mobile/bidi/ToolBarButton" { + var exp: dojox.mobile.bidi.ToolBarButton + export=exp; +} +declare module "dojox/mobile/bidi/Tooltip" { + var exp: dojox.mobile.bidi.Tooltip + export=exp; +} +declare module "dojox/mobile/bidi/ValuePickerSlot" { + var exp: dojox.mobile.bidi.ValuePickerSlot + export=exp; +} +declare module "dojox/mobile/bidi/TreeView" { + var exp: dojox.mobile.bidi.TreeView + export=exp; +} +declare module "dojox/mobile/dh/ContentTypeMap" { + var exp: dojox.mobile.dh.ContentTypeMap + export=exp; +} +declare module "dojox/mobile/dh/ContentTypeMap.map" { + var exp: dojox.mobile.dh.ContentTypeMap.map + export=exp; +} +declare module "dojox/mobile/dh/PatternFileTypeMap" { + var exp: dojox.mobile.dh.PatternFileTypeMap + export=exp; +} +declare module "dojox/mobile/dh/PatternFileTypeMap.map" { + var exp: dojox.mobile.dh.PatternFileTypeMap.map + export=exp; +} +declare module "dojox/mobile/dh/SuffixFileTypeMap" { + var exp: dojox.mobile.dh.SuffixFileTypeMap + export=exp; +} +declare module "dojox/mobile/dh/SuffixFileTypeMap.map" { + var exp: dojox.mobile.dh.SuffixFileTypeMap.map + export=exp; +} +declare module "dojox/mobile/dh/DataHandler" { + var exp: dojox.mobile.dh.DataHandler + export=exp; +} +declare module "dojox/mobile/dh/HtmlContentHandler" { + var exp: dojox.mobile.dh.HtmlContentHandler + export=exp; +} +declare module "dojox/mobile/dh/HtmlScriptContentHandler" { + var exp: dojox.mobile.dh.HtmlScriptContentHandler + export=exp; +} +declare module "dojox/mobile/dh/JsonContentHandler" { + var exp: dojox.mobile.dh.JsonContentHandler + export=exp; +} +declare module "dojox/mobile/dh/StringDataSource" { + var exp: dojox.mobile.dh.StringDataSource + export=exp; +} +declare module "dojox/mobile/dh/UrlDataSource" { + var exp: dojox.mobile.dh.UrlDataSource + export=exp; +} diff --git a/dojo/dojox.mvc.d.ts b/dojo/dojox.mvc.d.ts index 0961e5a5f3..7604f149c2 100644 --- a/dojo/dojox.mvc.d.ts +++ b/dojo/dojox.mvc.d.ts @@ -676,7 +676,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -2076,7 +2076,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -2737,7 +2737,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -3389,7 +3389,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -4274,7 +4274,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -4984,7 +4984,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -6196,7 +6196,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -6963,7 +6963,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -8572,7 +8572,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -9344,7 +9344,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -9996,7 +9996,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -10657,7 +10657,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -11714,7 +11714,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -12577,7 +12577,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -13339,7 +13339,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -14040,7 +14040,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -14907,7 +14907,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -16209,7 +16209,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -17091,7 +17091,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -17741,7 +17741,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -18847,7 +18847,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -19661,7 +19661,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -20423,7 +20423,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -21124,7 +21124,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -21502,4 +21502,301 @@ declare module dojox { } } -} \ No newline at end of file +} + +declare module "dojox/mvc" { + var exp: dojox.mvc + export=exp; +} +declare module "dojox/mvc/_atBindingMixin" { + var exp: dojox.mvc._atBindingMixin + export=exp; +} +declare module "dojox/mvc/_atBindingMixin.mixin" { + var exp: dojox.mvc._atBindingMixin.mixin + export=exp; +} +declare module "dojox/mvc/_InlineTemplateMixin" { + var exp: dojox.mvc._InlineTemplateMixin + export=exp; +} +declare module "dojox/mvc/_DataBindingMixin" { + var exp: dojox.mvc._DataBindingMixin + export=exp; +} +declare module "dojox/mvc/_Controller" { + var exp: dojox.mvc._Controller + export=exp; +} +declare module "dojox/mvc/_Container" { + var exp: dojox.mvc._Container + export=exp; +} +declare module "dojox/mvc/EditModelRefController" { + var exp: dojox.mvc.EditModelRefController + export=exp; +} +declare module "dojox/mvc/EditStoreRefListController" { + var exp: dojox.mvc.EditStoreRefListController + export=exp; +} +declare module "dojox/mvc/EditStoreRefController" { + var exp: dojox.mvc.EditStoreRefController + export=exp; +} +declare module "dojox/mvc/ListController" { + var exp: dojox.mvc.ListController + export=exp; +} +declare module "dojox/mvc/Element" { + var exp: dojox.mvc.Element + export=exp; +} +declare module "dojox/mvc/ModelRefController" { + var exp: dojox.mvc.ModelRefController + export=exp; +} +declare module "dojox/mvc/Group" { + var exp: dojox.mvc.Group + export=exp; +} +declare module "dojox/mvc/Generate" { + var exp: dojox.mvc.Generate + export=exp; +} +declare module "dojox/mvc/Output" { + var exp: dojox.mvc.Output + export=exp; +} +declare module "dojox/mvc/StatefulModel" { + var exp: dojox.mvc.StatefulModel + export=exp; +} +declare module "dojox/mvc/StatefulModel.getPlainValueOptions" { + var exp: dojox.mvc.StatefulModel.getPlainValueOptions + export=exp; +} +declare module "dojox/mvc/StatefulModel.getStatefulOptions" { + var exp: dojox.mvc.StatefulModel.getStatefulOptions + export=exp; +} +declare module "dojox/mvc/Repeat" { + var exp: dojox.mvc.Repeat + export=exp; +} +declare module "dojox/mvc/StoreRefController" { + var exp: dojox.mvc.StoreRefController + export=exp; +} +declare module "dojox/mvc/StatefulSeries" { + var exp: dojox.mvc.StatefulSeries + export=exp; +} +declare module "dojox/mvc/Templated" { + var exp: dojox.mvc.Templated + export=exp; +} +declare module "dojox/mvc/WidgetList" { + var exp: dojox.mvc.WidgetList + export=exp; +} +declare module "dojox/mvc/atBindingExtension" { + var exp: dojox.mvc.atBindingExtension + export=exp; +} +declare module "dojox/mvc/at" { + var exp: dojox.mvc.at + export=exp; +} +declare module "dojox/mvc/at.handle" { + var exp: dojox.mvc.at.handle + export=exp; +} +declare module "dojox/mvc/equals" { + var exp: dojox.mvc.equals + export=exp; +} +declare module "dojox/mvc/getPlainValue" { + var exp: dojox.mvc.getPlainValue + export=exp; +} +declare module "dojox/mvc/getStateful" { + var exp: dojox.mvc.getStateful + export=exp; +} +declare module "dojox/mvc/resolve" { + var exp: dojox.mvc.resolve + export=exp; +} +declare module "dojox/mvc/StatefulArray" { + var exp: dojox.mvc.StatefulArray + export=exp; +} +declare module "dojox/mvc/StatefulArray._meta" { + var exp: dojox.mvc.StatefulArray._meta + export=exp; +} +declare module "dojox/mvc/sync" { + var exp: dojox.mvc.sync + export=exp; +} +declare module "dojox/mvc/_base" { + var exp: dojox.mvc._base + export=exp; +} +declare module "dojox/mvc/_base._InlineTemplateMixin" { + var exp: dojox.mvc._base._InlineTemplateMixin + export=exp; +} +declare module "dojox/mvc/_base._Controller" { + var exp: dojox.mvc._base._Controller + export=exp; +} +declare module "dojox/mvc/_base._DataBindingMixin" { + var exp: dojox.mvc._base._DataBindingMixin + export=exp; +} +declare module "dojox/mvc/_base.EditStoreRefController" { + var exp: dojox.mvc._base.EditStoreRefController + export=exp; +} +declare module "dojox/mvc/_base._Container" { + var exp: dojox.mvc._base._Container + export=exp; +} +declare module "dojox/mvc/_base.EditModelRefController" { + var exp: dojox.mvc._base.EditModelRefController + export=exp; +} +declare module "dojox/mvc/_base.EditStoreRefListController" { + var exp: dojox.mvc._base.EditStoreRefListController + export=exp; +} +declare module "dojox/mvc/_base.Element" { + var exp: dojox.mvc._base.Element + export=exp; +} +declare module "dojox/mvc/_base.Generate" { + var exp: dojox.mvc._base.Generate + export=exp; +} +declare module "dojox/mvc/_base.ListController" { + var exp: dojox.mvc._base.ListController + export=exp; +} +declare module "dojox/mvc/_base.ModelRefController" { + var exp: dojox.mvc._base.ModelRefController + export=exp; +} +declare module "dojox/mvc/_base.Group" { + var exp: dojox.mvc._base.Group + export=exp; +} +declare module "dojox/mvc/_base.StatefulSeries" { + var exp: dojox.mvc._base.StatefulSeries + export=exp; +} +declare module "dojox/mvc/_base.Output" { + var exp: dojox.mvc._base.Output + export=exp; +} +declare module "dojox/mvc/_base.StoreRefController" { + var exp: dojox.mvc._base.StoreRefController + export=exp; +} +declare module "dojox/mvc/_base.Repeat" { + var exp: dojox.mvc._base.Repeat + export=exp; +} +declare module "dojox/mvc/_base.StatefulModel" { + var exp: dojox.mvc._base.StatefulModel + export=exp; +} +declare module "dojox/mvc/_base.Templated" { + var exp: dojox.mvc._base.Templated + export=exp; +} +declare module "dojox/mvc/_base.WidgetList" { + var exp: dojox.mvc._base.WidgetList + export=exp; +} +declare module "dojox/mvc/Bind" { + var exp: dojox.mvc.Bind + export=exp; +} +declare module "dojox/mvc/Bind._DataBindingMixin" { + var exp: dojox.mvc.Bind._DataBindingMixin + export=exp; +} +declare module "dojox/mvc/Bind._Controller" { + var exp: dojox.mvc.Bind._Controller + export=exp; +} +declare module "dojox/mvc/Bind._InlineTemplateMixin" { + var exp: dojox.mvc.Bind._InlineTemplateMixin + export=exp; +} +declare module "dojox/mvc/Bind.EditModelRefController" { + var exp: dojox.mvc.Bind.EditModelRefController + export=exp; +} +declare module "dojox/mvc/Bind.EditStoreRefController" { + var exp: dojox.mvc.Bind.EditStoreRefController + export=exp; +} +declare module "dojox/mvc/Bind._Container" { + var exp: dojox.mvc.Bind._Container + export=exp; +} +declare module "dojox/mvc/Bind.EditStoreRefListController" { + var exp: dojox.mvc.Bind.EditStoreRefListController + export=exp; +} +declare module "dojox/mvc/Bind.Element" { + var exp: dojox.mvc.Bind.Element + export=exp; +} +declare module "dojox/mvc/Bind.ListController" { + var exp: dojox.mvc.Bind.ListController + export=exp; +} +declare module "dojox/mvc/Bind.ModelRefController" { + var exp: dojox.mvc.Bind.ModelRefController + export=exp; +} +declare module "dojox/mvc/Bind.Generate" { + var exp: dojox.mvc.Bind.Generate + export=exp; +} +declare module "dojox/mvc/Bind.StatefulSeries" { + var exp: dojox.mvc.Bind.StatefulSeries + export=exp; +} +declare module "dojox/mvc/Bind.Group" { + var exp: dojox.mvc.Bind.Group + export=exp; +} +declare module "dojox/mvc/Bind.StatefulModel" { + var exp: dojox.mvc.Bind.StatefulModel + export=exp; +} +declare module "dojox/mvc/Bind.Output" { + var exp: dojox.mvc.Bind.Output + export=exp; +} +declare module "dojox/mvc/Bind.Repeat" { + var exp: dojox.mvc.Bind.Repeat + export=exp; +} +declare module "dojox/mvc/Bind.StoreRefController" { + var exp: dojox.mvc.Bind.StoreRefController + export=exp; +} +declare module "dojox/mvc/Bind.WidgetList" { + var exp: dojox.mvc.Bind.WidgetList + export=exp; +} +declare module "dojox/mvc/Bind.Templated" { + var exp: dojox.mvc.Bind.Templated + export=exp; +} diff --git a/dojo/dojox.rails.d.ts b/dojo/dojox.rails.d.ts index 15fe907cff..e85112fc31 100644 --- a/dojo/dojox.rails.d.ts +++ b/dojo/dojox.rails.d.ts @@ -19,4 +19,9 @@ declare module dojox { */ live(selector: any, evtName: any, fn: any): void; } -} \ No newline at end of file +} + +declare module "dojox/rails" { + var exp: dojox.rails + export=exp; +} diff --git a/dojo/dojox.robot.d.ts b/dojo/dojox.robot.d.ts index 5152ebb5f0..bceb29a860 100644 --- a/dojo/dojox.robot.d.ts +++ b/dojo/dojox.robot.d.ts @@ -15,4 +15,9 @@ declare module dojox { } } -} \ No newline at end of file +} + +declare module "dojox/robot/recorder" { + var exp: dojox.robot.recorder + export=exp; +} diff --git a/dojo/dojox.rpc.d.ts b/dojo/dojox.rpc.d.ts index b76cba7813..a67fbaf37e 100644 --- a/dojo/dojox.rpc.d.ts +++ b/dojo/dojox.rpc.d.ts @@ -266,4 +266,32 @@ declare module dojox { } -} \ No newline at end of file +} +declare module "dojox/rpc/Rest" { + var exp: dojox.rpc.Rest + export=exp; +} +declare module "dojox/rpc/Rest._index" { + var exp: dojox.rpc.Rest._index + export=exp; +} +declare module "dojox/rpc/Rest._timeStamps" { + var exp: dojox.rpc.Rest._timeStamps + export=exp; +} +declare module "dojox/rpc/OfflineRest" { + var exp: dojox.rpc.OfflineRest + export=exp; +} +declare module "dojox/rpc/JsonRest" { + var exp: dojox.rpc.JsonRest + export=exp; +} +declare module "dojox/rpc/JsonRest.services" { + var exp: dojox.rpc.JsonRest.services + export=exp; +} +declare module "dojox/rpc/JsonRest.schemas" { + var exp: dojox.rpc.JsonRest.schemas + export=exp; +} diff --git a/dojo/dojox.secure.d.ts b/dojo/dojox.secure.d.ts index f049b49857..9925c86f99 100644 --- a/dojo/dojox.secure.d.ts +++ b/dojo/dojox.secure.d.ts @@ -56,4 +56,17 @@ declare module dojox { } } -} \ No newline at end of file +} + +declare module "dojox/secure/DOM" { + var exp: dojox.secure.DOM + export=exp; +} +declare module "dojox/secure/sandbox" { + var exp: dojox.secure.sandbox + export=exp; +} +declare module "dojox/secure/capability" { + var exp: dojox.secure.capability + export=exp; +} diff --git a/dojo/dojox.sketch.d.ts b/dojo/dojox.sketch.d.ts index 91968e0411..2e920d9b79 100644 --- a/dojo/dojox.sketch.d.ts +++ b/dojo/dojox.sketch.d.ts @@ -1032,7 +1032,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -1820,4 +1820,81 @@ declare module dojox { } -} \ No newline at end of file +} + +declare module "dojox/sketch" { + var exp: dojox.sketch + export=exp; +} +declare module "dojox/sketch/_Plugin" { + var exp: dojox.sketch._Plugin + export=exp; +} +declare module "dojox/sketch/Slider" { + var exp: dojox.sketch.Slider + export=exp; +} +declare module "dojox/sketch/UndoStack" { + var exp: dojox.sketch.UndoStack + export=exp; +} +declare module "dojox/sketch/Toolbar" { + var exp: dojox.sketch.Toolbar + export=exp; +} +declare module "dojox/sketch/Anchor" { + var exp: dojox.sketch.Anchor + export=exp; +} +declare module "dojox/sketch/Annotation" { + var exp: dojox.sketch.Annotation + export=exp; +} +declare module "dojox/sketch/Annotation.Modes" { + var exp: dojox.sketch.Annotation.Modes + export=exp; +} +declare module "dojox/sketch/DoubleArrowAnnotation" { + var exp: dojox.sketch.DoubleArrowAnnotation + export=exp; +} +declare module "dojox/sketch/DoubleArrowAnnotation.control" { + var exp: dojox.sketch.DoubleArrowAnnotation.control + export=exp; +} +declare module "dojox/sketch/DoubleArrowAnnotation.start" { + var exp: dojox.sketch.DoubleArrowAnnotation.start + export=exp; +} +declare module "dojox/sketch/DoubleArrowAnnotation.textPosition" { + var exp: dojox.sketch.DoubleArrowAnnotation.textPosition + export=exp; +} +declare module "dojox/sketch/DoubleArrowAnnotation.transform" { + var exp: dojox.sketch.DoubleArrowAnnotation.transform + export=exp; +} +declare module "dojox/sketch/DoubleArrowAnnotation.end" { + var exp: dojox.sketch.DoubleArrowAnnotation.end + export=exp; +} +declare module "dojox/sketch/Figure" { + var exp: dojox.sketch.Figure + export=exp; +} +declare module "dojox/sketch/PreexistingAnnotation" { + var exp: dojox.sketch.PreexistingAnnotation + export=exp; +} +declare module "dojox/sketch/LeadAnnotation" { + var exp: dojox.sketch.LeadAnnotation + export=exp; +} +declare module "dojox/sketch/SingleArrowAnnotation" { + var exp: dojox.sketch.SingleArrowAnnotation + export=exp; +} +declare module "dojox/sketch/UnderlineAnnotation" { + var exp: dojox.sketch.UnderlineAnnotation + export=exp; +} diff --git a/dojo/dojox.socket.d.ts b/dojo/dojox.socket.d.ts index fd653ad64d..37d3f043c8 100644 --- a/dojo/dojox.socket.d.ts +++ b/dojo/dojox.socket.d.ts @@ -49,4 +49,13 @@ declare module dojox { */ interface Reconnect{(socket: any, options: any): void} } -} \ No newline at end of file +} + +declare module "dojox/socket" { + var exp: dojox.socket + export=exp; +} +declare module "dojox/socket/Reconnect" { + var exp: dojox.socket.Reconnect + export=exp; +} diff --git a/dojo/dojox.sql.d.ts b/dojo/dojox.sql.d.ts index 19da54076c..07b8fbdf3d 100644 --- a/dojo/dojox.sql.d.ts +++ b/dojo/dojox.sql.d.ts @@ -27,4 +27,13 @@ declare module dojox { } -} \ No newline at end of file +} + +declare module "dojox/sql" { + var exp: dojox.sql + export=exp; +} +declare module "dojox/sql/_crypto" { + var exp: dojox.sql._crypto + export=exp; +} diff --git a/dojo/dojox.storage.d.ts b/dojo/dojox.storage.d.ts index f26dfc1aa4..868f05a1b1 100644 --- a/dojo/dojox.storage.d.ts +++ b/dojo/dojox.storage.d.ts @@ -11,4 +11,9 @@ declare module dojox { */ interface storage { } -} \ No newline at end of file +} + +declare module "dojox/storage" { + var exp: dojox.storage + export=exp; +} diff --git a/dojo/dojox.string.d.ts b/dojo/dojox.string.d.ts index 4abad8bbc5..f0c7e8a97f 100644 --- a/dojo/dojox.string.d.ts +++ b/dojo/dojox.string.d.ts @@ -268,4 +268,25 @@ declare module dojox { } } -} \ No newline at end of file +} + +declare module "dojox/string/tokenize" { + var exp: dojox.string_.tokenize + export=exp; +} +declare module "dojox/string/sprintf" { + var exp: dojox.string_.sprintf + export=exp; +} +declare module "dojox/string/Builder" { + var exp: dojox.string_.Builder + export=exp; +} +declare module "dojox/string/BidiComplex" { + var exp: dojox.string_.BidiComplex + export=exp; +} +declare module "dojox/string/BidiEngine" { + var exp: dojox.string_.BidiEngine + export=exp; +} diff --git a/dojo/dojox.testing.d.ts b/dojo/dojox.testing.d.ts index e9a0ef8918..535ff2c61d 100644 --- a/dojo/dojox.testing.d.ts +++ b/dojo/dojox.testing.d.ts @@ -79,4 +79,8 @@ declare module dojox { } } -} \ No newline at end of file +} +declare module "dojox/testing/DocTest" { + var exp: dojox.testing.DocTest + export=exp; +} diff --git a/dojo/dojox.timing.d.ts b/dojo/dojox.timing.d.ts index b23da5c0cb..ba4bf27e80 100644 --- a/dojo/dojox.timing.d.ts +++ b/dojo/dojox.timing.d.ts @@ -103,4 +103,21 @@ declare module dojox { } -} \ No newline at end of file +} + +declare module "dojox/timing" { + var exp: dojox.timing + export=exp; +} +declare module "dojox/timing/Sequence" { + var exp: dojox.timing.Sequence + export=exp; +} +declare module "dojox/timing/doLater" { + var exp: dojox.timing.doLater + export=exp; +} +declare module "dojox/timing/Streamer" { + var exp: dojox.timing.Streamer + export=exp; +} diff --git a/dojo/dojox.treemap.d.ts b/dojo/dojox.treemap.d.ts index 1ee77f3948..72ecee2587 100644 --- a/dojo/dojox.treemap.d.ts +++ b/dojo/dojox.treemap.d.ts @@ -995,7 +995,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -1104,4 +1104,29 @@ declare module dojox { } } -} \ No newline at end of file +} + +declare module "dojox/treemap/_utils" { + var exp: dojox.treemap._utils + export=exp; +} +declare module "dojox/treemap/GroupLabel" { + var exp: dojox.treemap.GroupLabel + export=exp; +} +declare module "dojox/treemap/DrillDownUp" { + var exp: dojox.treemap.DrillDownUp + export=exp; +} +declare module "dojox/treemap/Keyboard" { + var exp: dojox.treemap.Keyboard + export=exp; +} +declare module "dojox/treemap/ScaledLabel" { + var exp: dojox.treemap.ScaledLabel + export=exp; +} +declare module "dojox/treemap/TreeMap" { + var exp: dojox.treemap.TreeMap + export=exp; +} diff --git a/dojo/dojox.uuid.d.ts b/dojo/dojox.uuid.d.ts index 5669d1475a..f6b925d479 100644 --- a/dojo/dojox.uuid.d.ts +++ b/dojo/dojox.uuid.d.ts @@ -221,4 +221,29 @@ declare module dojox { } -} \ No newline at end of file +} + +declare module "dojox/uuid" { + var exp: dojox.uuid + export=exp; +} +declare module "dojox/uuid/generateRandomUuid" { + var exp: dojox.uuid.generateRandomUuid + export=exp; +} +declare module "dojox/uuid/generateTimeBasedUuid" { + var exp: dojox.uuid.generateTimeBasedUuid + export=exp; +} +declare module "dojox/uuid/Uuid" { + var exp: dojox.uuid.Uuid + export=exp; +} +declare module "dojox/uuid/_base.variant" { + var exp: dojox.uuid._base.variant + export=exp; +} +declare module "dojox/uuid/_base.version" { + var exp: dojox.uuid._base.version + export=exp; +} diff --git a/dojo/dojox.validate.d.ts b/dojo/dojox.validate.d.ts index 889cbff858..8fb5b2673c 100644 --- a/dojo/dojox.validate.d.ts +++ b/dojo/dojox.validate.d.ts @@ -1303,4 +1303,85 @@ declare module dojox { interface isbn { (value: String): void } } -} \ No newline at end of file +} + +declare module "dojox/validate" { + var exp: dojox.validate + export=exp; +} +declare module "dojox/validate/check" { + var exp: dojox.validate.check + export=exp; +} +declare module "dojox/validate/isbn" { + var exp: dojox.validate.isbn + export=exp; +} +declare module "dojox/validate/ca" { + var exp: dojox.validate.ca + export=exp; +} +declare module "dojox/validate/creditCard" { + var exp: dojox.validate.creditCard + export=exp; +} +declare module "dojox/validate/_base" { + var exp: dojox.validate._base + export=exp; +} +declare module "dojox/validate/_base._cardInfo" { + var exp: dojox.validate._base._cardInfo + export=exp; +} +declare module "dojox/validate/_base._isInRangeCache" { + var exp: dojox.validate._base._isInRangeCache + export=exp; +} +declare module "dojox/validate/regexp" { + var exp: dojox.validate.regexp + export=exp; +} +declare module "dojox/validate/regexp.us" { + var exp: dojox.validate.regexp.us + export=exp; +} +declare module "dojox/validate/regexp.ca" { + var exp: dojox.validate.regexp.ca + export=exp; +} +declare module "dojox/validate/br" { + var exp: dojox.validate.br + export=exp; +} +declare module "dojox/validate/br._isInRangeCache" { + var exp: dojox.validate.br._isInRangeCache + export=exp; +} +declare module "dojox/validate/br._cardInfo" { + var exp: dojox.validate.br._cardInfo + export=exp; +} +declare module "dojox/validate/us" { + var exp: dojox.validate.us + export=exp; +} +declare module "dojox/validate/us._isInRangeCache" { + var exp: dojox.validate.us._isInRangeCache + export=exp; +} +declare module "dojox/validate/us._cardInfo" { + var exp: dojox.validate.us._cardInfo + export=exp; +} +declare module "dojox/validate/web" { + var exp: dojox.validate.web + export=exp; +} +declare module "dojox/validate/web._cardInfo" { + var exp: dojox.validate.web._cardInfo + export=exp; +} +declare module "dojox/validate/web._isInRangeCache" { + var exp: dojox.validate.web._isInRangeCache + export=exp; +} diff --git a/dojo/dojox.widget.d.ts b/dojo/dojox.widget.d.ts index c846ff45f8..dbcc6083b3 100644 --- a/dojo/dojox.widget.d.ts +++ b/dojo/dojox.widget.d.ts @@ -774,7 +774,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -1544,7 +1544,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -2314,7 +2314,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -3077,7 +3077,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -3821,7 +3821,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -4578,7 +4578,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -5619,7 +5619,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -6441,7 +6441,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -7262,7 +7262,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -8084,7 +8084,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -8905,7 +8905,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -9726,7 +9726,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -10687,7 +10687,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -12011,7 +12011,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -12913,7 +12913,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -13758,7 +13758,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -14489,7 +14489,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -15294,7 +15294,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -16108,7 +16108,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -16917,7 +16917,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -17790,7 +17790,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -18672,7 +18672,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -19477,7 +19477,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -20305,7 +20305,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -21443,7 +21443,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -22535,7 +22535,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -23018,11 +23018,12 @@ declare module dojox { */ class PortletSettings extends dijit._Container implements dijit.layout.ContentPane { constructor(params?: Object, srcNodeRef?: HTMLElement); + inherited: { (arguments: IArguments): any }; /** - * Custom press, release, and click synthetic events - * which trigger on a left mouse click, touch, or space/enter keyup. - * - */ + * Custom press, release, and click synthetic events + * which trigger on a left mouse click, touch, or space/enter keyup. + * + */ "a11yclick": Object; /** * Deprecated. Instead of attributeMap, widget should have a _setXXXAttr attribute @@ -23929,7 +23930,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -24916,7 +24917,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -25840,7 +25841,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Over-ride to hide the widget, which clears intervals, before cleanup. * @@ -26715,7 +26716,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -27467,7 +27468,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -28333,7 +28334,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -29236,7 +29237,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -30187,7 +30188,7 @@ declare module dojox { * serialization. * */ - toString(): String; + toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. @@ -30670,4 +30671,229 @@ declare module dojox { } } -} \ No newline at end of file +} + +declare module "dojox/widget/CalendarViews" { + var exp: dojox.widget.CalendarViews + export=exp; +} +declare module "dojox/widget/FilePicker" { + var exp: dojox.widget.FilePicker + export=exp; +} +declare module "dojox/widget/_CalendarDay" { + var exp: dojox.widget._CalendarDay + export=exp; +} +declare module "dojox/widget/_CalendarMonthYear" { + var exp: dojox.widget._CalendarMonthYear + export=exp; +} +declare module "dojox/widget/_CalendarMonth" { + var exp: dojox.widget._CalendarMonth + export=exp; +} +declare module "dojox/widget/_CalendarBase" { + var exp: dojox.widget._CalendarBase + export=exp; +} +declare module "dojox/widget/_CalendarDayView" { + var exp: dojox.widget._CalendarDayView + export=exp; +} +declare module "dojox/widget/_CalendarMonthView" { + var exp: dojox.widget._CalendarMonthView + export=exp; +} +declare module "dojox/widget/_CalendarYear" { + var exp: dojox.widget._CalendarYear + export=exp; +} +declare module "dojox/widget/_FisheyeFX" { + var exp: dojox.widget._FisheyeFX + export=exp; +} +declare module "dojox/widget/_CalendarView" { + var exp: dojox.widget._CalendarView + export=exp; +} +declare module "dojox/widget/AutoRotator" { + var exp: dojox.widget.AutoRotator + export=exp; +} +declare module "dojox/widget/_Invalidating" { + var exp: dojox.widget._Invalidating + export=exp; +} +declare module "dojox/widget/_CalendarYearView" { + var exp: dojox.widget._CalendarYearView + export=exp; +} +declare module "dojox/widget/_CalendarMonthYearView" { + var exp: dojox.widget._CalendarMonthYearView + export=exp; +} +declare module "dojox/widget/Calendar2Pane" { + var exp: dojox.widget.Calendar2Pane + export=exp; +} +declare module "dojox/widget/CalendarFisheye" { + var exp: dojox.widget.CalendarFisheye + export=exp; +} +declare module "dojox/widget/Calendar" { + var exp: dojox.widget.Calendar + export=exp; +} +declare module "dojox/widget/Dialog" { + var exp: dojox.widget.Dialog + export=exp; +} +declare module "dojox/widget/Calendar3Pane" { + var exp: dojox.widget.Calendar3Pane + export=exp; +} +declare module "dojox/widget/CalendarFx" { + var exp: dojox.widget.CalendarFx + export=exp; +} +declare module "dojox/widget/DailyCalendar" { + var exp: dojox.widget.DailyCalendar + export=exp; +} +declare module "dojox/widget/FisheyeLite" { + var exp: dojox.widget.FisheyeLite + export=exp; +} +declare module "dojox/widget/FisheyeListItem" { + var exp: dojox.widget.FisheyeListItem + export=exp; +} +declare module "dojox/widget/ColorPicker" { + var exp: dojox.widget.ColorPicker + export=exp; +} +declare module "dojox/widget/FisheyeList" { + var exp: dojox.widget.FisheyeList + export=exp; +} +declare module "dojox/widget/DialogSimple" { + var exp: dojox.widget.DialogSimple + export=exp; +} +declare module "dojox/widget/MonthAndYearlyCalendar" { + var exp: dojox.widget.MonthAndYearlyCalendar + export=exp; +} +declare module "dojox/widget/MonthlyCalendar" { + var exp: dojox.widget.MonthlyCalendar + export=exp; +} +declare module "dojox/widget/PagerItem" { + var exp: dojox.widget.PagerItem + export=exp; +} +declare module "dojox/widget/Pager" { + var exp: dojox.widget.Pager + export=exp; +} +declare module "dojox/widget/MultiSelectCalendar" { + var exp: dojox.widget.MultiSelectCalendar + export=exp; +} +declare module "dojox/widget/MultiSelectCalendar._MonthDropDown" { + var exp: dojox.widget.MultiSelectCalendar._MonthDropDown + export=exp; +} +declare module "dojox/widget/Roller" { + var exp: dojox.widget.Roller + export=exp; +} +declare module "dojox/widget/Roller._Hover" { + var exp: dojox.widget.Roller._Hover + export=exp; +} +declare module "dojox/widget/Roller.RollerSlide" { + var exp: dojox.widget.Roller.RollerSlide + export=exp; +} +declare module "dojox/widget/PlaceholderMenuItem" { + var exp: dojox.widget.PlaceholderMenuItem + export=exp; +} +declare module "dojox/widget/Rotator" { + var exp: dojox.widget.Rotator + export=exp; +} +declare module "dojox/widget/PortletDialogSettings" { + var exp: dojox.widget.PortletDialogSettings + export=exp; +} +declare module "dojox/widget/Portlet" { + var exp: dojox.widget.Portlet + export=exp; +} +declare module "dojox/widget/PortletSettings" { + var exp: dojox.widget.PortletSettings + export=exp; +} +declare module "dojox/widget/Selection" { + var exp: dojox.widget.Selection + export=exp; +} +declare module "dojox/widget/TitleGroup" { + var exp: dojox.widget.TitleGroup + export=exp; +} +declare module "dojox/widget/UpgradeBar" { + var exp: dojox.widget.UpgradeBar + export=exp; +} +declare module "dojox/widget/Toaster" { + var exp: dojox.widget.Toaster + export=exp; +} +declare module "dojox/widget/Wizard" { + var exp: dojox.widget.Wizard + export=exp; +} +declare module "dojox/widget/Standby" { + var exp: dojox.widget.Standby + export=exp; +} +declare module "dojox/widget/YearlyCalendar" { + var exp: dojox.widget.YearlyCalendar + export=exp; +} +declare module "dojox/widget/WizardPane" { + var exp: dojox.widget.WizardPane + export=exp; +} +declare module "dojox/widget/rotator/Fade" { + var exp: dojox.widget.rotator.Fade + export=exp; +} +declare module "dojox/widget/rotator/PanFade" { + var exp: dojox.widget.rotator.PanFade + export=exp; +} +declare module "dojox/widget/rotator/Pan" { + var exp: dojox.widget.rotator.Pan + export=exp; +} +declare module "dojox/widget/rotator/Slide" { + var exp: dojox.widget.rotator.Slide + export=exp; +} +declare module "dojox/widget/rotator/Wipe" { + var exp: dojox.widget.rotator.Wipe + export=exp; +} +declare module "dojox/widget/rotator/Controller" { + var exp: dojox.widget.rotator.Controller + export=exp; +} +declare module "dojox/widget/rotator/ThumbnailController" { + var exp: dojox.widget.rotator.ThumbnailController + export=exp; +} diff --git a/dropzone/dropzone.d.ts b/dropzone/dropzone.d.ts index 5dca7e1694..655db62203 100644 --- a/dropzone/dropzone.d.ts +++ b/dropzone/dropzone.d.ts @@ -24,7 +24,7 @@ interface DropzoneOptions { headers?: any; addRemoveLinks?: boolean; previewsContainer?: string; - clickable?: boolean; + clickable?: any; createImageThumbnails?: boolean; maxThumbnailFilesize?: number; thumbnailWidth?: number; @@ -39,7 +39,7 @@ interface DropzoneOptions { forceFallback?: boolean; fallback?: () => void; - // dictionary options + // dictionary options dictDefaultMessage?: string; dictFallbackMessage?: string; dictFallbackText?: string; @@ -66,13 +66,13 @@ declare class Dropzone { off(eventName): void; removeFile(file: DropzoneFile): void; - removeAllFiles(): void; + removeAllFiles(cancelIfNecessary?: boolean): void; processQueue(): void; getAcceptedFiles(): DropzoneFile[]; getRejectedFiles(): DropzoneFile[]; getQueuedFiles(): DropzoneFile[]; getUploadingFiles(): DropzoneFile[]; - + emit(eventName: string, file: DropzoneFile, str?: string); emit(eventName: "thumbnail", file: DropzoneFile, path: string); emit(eventName: "addedfile", file: DropzoneFile); diff --git a/fabricjs/fabricjs-tests.ts b/fabricjs/fabricjs-tests.ts index df0d217e85..e59212d805 100644 --- a/fabricjs/fabricjs-tests.ts +++ b/fabricjs/fabricjs-tests.ts @@ -1056,4 +1056,10 @@ function sample8() { obj.setCoords(); }); }; -} \ No newline at end of file +} + +function sample9() { + var canvas = new fabric.Canvas('c'); + canvas.setBackgroundImage('yolo.jpg', () => {"a"}, {opacity: 45}); + canvas.setBackgroundImage('yolo.jpg', () => {"a"}); +} diff --git a/fabricjs/fabricjs.d.ts b/fabricjs/fabricjs.d.ts index 81397ea4a8..fb73fecb3c 100644 --- a/fabricjs/fabricjs.d.ts +++ b/fabricjs/fabricjs.d.ts @@ -274,13 +274,13 @@ declare module fabric { hasControls: boolean; hasRotatingPoint: boolean; - + height: number; getHeight(): number; setHeight(value: number): IObject; includeDefaultValues: boolean; - + left: number; getLeft(): number; setLeft(value: number): IObject; @@ -296,7 +296,7 @@ declare module fabric { padding: number; perPixelTargetFind: boolean; rotatingPointOffset: number; - + scaleX: number; getScaleX(): number; setScaleX(value: number): IObject; @@ -310,7 +310,7 @@ declare module fabric { stroke: string; strokeDashArray: any[]; strokeWidth: number; - + top: number; getTop(): number; setTop(value: number): IObject; @@ -318,7 +318,7 @@ declare module fabric { transformMatrix: any[]; transparentCorners: boolean; type: string; - + width: number; getWidth(): number; setWidth(value: number): IObject; @@ -453,7 +453,7 @@ declare module fabric { toSVG(): string; } - + export interface IPath extends IObject { complexity(): number; @@ -511,7 +511,7 @@ declare module fabric { renderOnAddition: boolean; stateful: boolean; - // static + // static EMPTY_JSON: string; supports(methodName: string): boolean; @@ -546,7 +546,7 @@ declare module fabric { sendBackwards(object: IObject): ICanvas; sendToBack(object: IObject): ICanvas; - setBackgroundImage(object: IObject): ICanvas; + setBackgroundImage(image: any, callback: () => any, options?): ICanvas; setDimensions(object: { width: number; height: number; }): ICanvas; setHeight(height: number): ICanvas; setOverlayImage(url: string, callback: () => any, options): ICanvas; @@ -681,7 +681,7 @@ declare module fabric { } export interface IRectOptions extends IObjectOptions { - x?: number; + x?: number; y?: number; rx?: number; ry?: number; @@ -798,7 +798,7 @@ declare module fabric { new (element: HTMLImageElement, objObjects: IObjectOptions): IImage; prototype: any; - filters: + filters: { Grayscale: { new (): IGrayscaleFilter; diff --git a/gruntjs/gruntjs.d.ts b/gruntjs/gruntjs.d.ts index 8efa08ef6d..7de19d016c 100644 --- a/gruntjs/gruntjs.d.ts +++ b/gruntjs/gruntjs.d.ts @@ -122,8 +122,7 @@ declare module grunt { * {@link http://gruntjs.com/sample-gruntfile} */ interface IProjectConfig{ - [plugin: string]: any - pkg: any; // unfortunate. It is actually a string + [plugin: string]: any; } /** diff --git a/imap/imap-tests.ts b/imap/imap-tests.ts new file mode 100644 index 0000000000..23f5f8f17e --- /dev/null +++ b/imap/imap-tests.ts @@ -0,0 +1,162 @@ +/// + +/* +* This code contains all of the example code that was on https://www.npmjs.com/package/imap as of Sat Dec 13, 2014. +*/ + + + + + +import Imap = require('imap'); +import util = require('util'); +import inspect = util.inspect; + +var imap = new Imap({ + user: 'mygmailname@gmail.com', + password: 'mygmailpassword', + host: 'imap.gmail.com', + port: 993, + tls: true +}); + + +function openInbox(cb : (error : Error, box: IMAP.Box) => void) { + imap.openBox('INBOX', true, cb); +} + + +imap.once('ready', function() { + openInbox(function(err, box) { + if (err) throw err; + var f = imap.seq.fetch('1:3', { + bodies: 'HEADER.FIELDS (FROM TO SUBJECT DATE)', + struct: true + }); + f.on('message', function(msg : IMAP.ImapMessage, seqno : number) { + console.log('Message #%d', seqno); + var prefix = '(#' + seqno + ') '; + msg.on('body', function(stream : NodeJS.ReadableStream, info : Object) { + var buffer = ''; + stream.on('data', function(chunk : Buffer) { + buffer += chunk.toString('utf8'); + }); + stream.once('end', function() { + console.log(prefix + 'Parsed header: %s', inspect(Imap.parseHeader(buffer))); + }); + }); + msg.once('attributes', function(attrs : Object) { + console.log(prefix + 'Attributes: %s', inspect(attrs, false, 8)); + }); + msg.once('end', function() { + console.log(prefix + 'Finished'); + }); + }); + f.once('error', function(err : Error) { + console.log('Fetch error: ' + err); + }); + f.once('end', function() { + console.log('Done fetching all messages!'); + imap.end(); + }); + }); +}); + +imap.once('error', function(err : Error) { + console.log(err); +}); + +imap.once('end', function() { + console.log('Connection ended'); +}); + +imap.connect(); + + + +// using the functions and variables already defined in the first example ... + +openInbox(function(err : Error, box : IMAP.Box) { + if (err) throw err; + var f = imap.seq.fetch(box.messages.total + ':*', { bodies: ['HEADER.FIELDS (FROM)','TEXT'] }); + f.on('message', function(msg : IMAP.ImapMessage, seqno : number) { + console.log('Message #%d', seqno); + var prefix = '(#' + seqno + ') '; + msg.on('body', function(stream : NodeJS.ReadableStream, info : any) { + if (info.which === 'TEXT') + console.log(prefix + 'Body [%s] found, %d total bytes', inspect(info.which), info.size); + var buffer = '', count = 0; + stream.on('data', function(chunk : Buffer) { + count += chunk.length; + buffer += chunk.toString('utf8'); + if (info.which === 'TEXT') + console.log(prefix + 'Body [%s] (%d/%d)', inspect(info.which), count, info.size); + }); + stream.once('end', function() { + if (info.which !== 'TEXT') + console.log(prefix + 'Parsed header: %s', inspect(Imap.parseHeader(buffer))); + else + console.log(prefix + 'Body [%s] Finished', inspect(info.which)); + }); + }); + msg.once('attributes', function(attrs : Object) { + console.log(prefix + 'Attributes: %s', inspect(attrs, false, 8)); + }); + msg.once('end', function() { + console.log(prefix + 'Finished'); + }); + }); + f.once('error', function(err : Error) { + console.log('Fetch error: ' + err); + }); + f.once('end', function() { + console.log('Done fetching all messages!'); + imap.end(); + }); +}); + + + + +// using the functions and variables already defined in the first example ... + +var fs = require('fs'); + +openInbox(function(err : Error, box : IMAP.Box) { + if (err) throw err; + imap.search([ 'UNSEEN', ['SINCE', 'May 20, 2010'] ], function(err : Error, results : string[]) { + if (err) throw err; + var f = imap.fetch(results, { bodies: '' }); + f.on('message', function(msg : IMAP.ImapMessage, seqno : number) { + console.log('Message #%d', seqno); + var prefix = '(#' + seqno + ') '; + msg.on('body', function(stream : NodeJS.ReadableStream, info : any) { + console.log(prefix + 'Body'); + stream.pipe(fs.createWriteStream('msg-' + seqno + '-body.txt')); + }); + msg.once('attributes', function(attrs : Object) { + console.log(prefix + 'Attributes: %s', inspect(attrs, false, 8)); + }); + msg.once('end', function() { + console.log(prefix + 'Finished'); + }); + }); + f.once('error', function(err : Error) { + console.log('Fetch error: ' + err); + }); + f.once('end', function() { + console.log('Done fetching all messages!'); + imap.end(); + }); + }); +}); + + + +var rawHeader : string = ''; +var headers = Imap.parseHeader(rawHeader); +headers = Imap.parseHeader(rawHeader, true); + +var f : IMAP.ImapFetch; +f = imap.fetch('1:3', { bodies: '' }); +f = imap.seq.fetch('1:3', { bodies: '' }); diff --git a/imap/imap.d.ts b/imap/imap.d.ts new file mode 100644 index 0000000000..1284919556 --- /dev/null +++ b/imap/imap.d.ts @@ -0,0 +1,272 @@ +// Type definitions for imap v0.8.14 +// Project: https://www.npmjs.com/package/imap +// Definitions by: Peter Snider +// Definitions: https://github.com/psnider/DefinitelyTyped/imap + +/// + + +declare module IMAP { + + // The property names of these interfaces match the documentation (where type names were given). + + export interface Config { + user: string; // Username for plain-text authentication. + password: string; // Password for plain-text authentication. + xoauth?: string; // Base64-encoded OAuth token for OAuth authentication for servers that support it (See Andris Reinman's xoauth.js module to help generate this string). + xoauth2?: string; // Base64-encoded OAuth2 token for The SASL XOAUTH2 Mechanism for servers that support it (See Andris Reinman's xoauth2 module to help generate this string). + host?: string; // Hostname or IP address of the IMAP server. Default: "localhost" + port?: number; // Port number of the IMAP server. Default: 143 + tls?: boolean; // Perform implicit TLS connection? Default: false + tlsOptions?: Object; // Options object to pass to tls.connect() Default: (none) + autotls?: string; // Set to 'always' to always attempt connection upgrades via STARTTLS, 'required' only if upgrading is required, or 'never' to never attempt upgrading. Default: 'never' + connTimeout?: number; // Number of milliseconds to wait for a connection to be established. Default: 10000 + authTimeout?: number; // Number of milliseconds to wait to be authenticated after a connection has been established. Default: 5000 + keepalive?: any; /* boolean|KeepAlive */ // Configures the keepalive mechanism. Set to true to enable keepalive with defaults or set to object to enable and configure keepalive behavior: Default: true + debug?: Function; // If set, the function will be called with one argument, a string containing some debug info Default: (no debug output) + } + + + export interface KeepAlive { + interval?: number; // This is the interval (in milliseconds) at which NOOPs are sent and the interval at which idleInterval is checked. Default: 10000 + idleInterval?: number; // This is the interval (in milliseconds) at which an IDLE command (for servers that support IDLE) is re-sent. Default: 300000 (5 mins) + forceNoop?: boolean; // Set to true to force use of NOOP keepalive on servers also support IDLE. Default: false + } + + // One of: + // - a single message identifier + // - a message identifier range (e.g. '2504:2507' or '*' or '2504:*') + // - an array of message identifiers + // - an array of message identifier ranges. + // type MessageSource = string | string[] + + + + + + export interface Box { + name: string; // The name of this mailbox. + readOnly?: boolean; // True if this mailbox was opened in read-only mode. (Only available with openBox() calls) + newKeywords: boolean; //True if new keywords can be added to messages in this mailbox. + uidvalidity: number; // A 32-bit number that can be used to determine if UIDs in this mailbox have changed since the last time this mailbox was opened. + uidnext: number; // The uid that will be assigned to the next message that arrives at this mailbox. + flags: string[]; // array - A list of system-defined flags applicable for this mailbox. Flags in this list but not in permFlags may be stored for the current session only. Additional server implementation-specific flags may also be available. + permFlags: string[]; // A list of flags that can be permanently added/removed to/from messages in this mailbox. + persistentUIDs: boolean; // Whether or not this mailbox has persistent UIDs. This should almost always be true for modern mailboxes and should only be false for legacy mail stores where supporting persistent UIDs was not technically feasible. + messages: { //Contains various message counts for this mailbox: + total: number; // Total number of messages in this mailbox. + new: number; // Number of messages in this mailbox having the Recent flag (this IMAP session is the first to see these messages). + unseen: number; // (Only available with status() calls) Number of messages in this mailbox not having the Seen flag (marked as not having been read). + }; + } + + + // Given in a 'message' event from ImapFetch + export interface ImapMessage extends NodeJS.EventEmitter { + } + + + export interface FetchOptions { + markSeen?: boolean; // Mark message(s) as read when fetched. Default: false + struct?: boolean; // Fetch the message structure. Default: false + envelope?: boolean; // Fetch the message envelope. Default: false + size?: boolean; // Fetch the RFC822 size. Default: false + modifiers?: Object; // Fetch modifiers defined by IMAP extensions. Default: (none) + bodies?: any; /* string|string[] */ // A string or Array of strings containing the body part section to fetch. Default: (none) Example sections: + } + + + // Returned from fetch() + export interface ImapFetch extends NodeJS.EventEmitter { + } + + + export interface Folder { + attribs: string[]; + delimiter: string; + children: Folder[]; + parent: Folder; + } + + + export interface MailBoxes { + [name: string] : Folder; + } + + + export interface AppendOptions { + mailbox?: string; // The name of the mailbox to append the message to. Default: the currently open mailbox + flags?: any; /* string|string[] */ // A single flag (e.g. 'Seen') or an array of flags (e.g. ['Seen', 'Flagged']) to append to the message. Default: (no flags) + date?: Date; // What to use for message arrival date/time. Default: (current date/time) + } + + + // search() criteria + /** + // The following message flags are valid types that do not have arguments: + ALL: void; // All messages. + ANSWERED: void; // Messages with the Answered flag set. + DELETED: void; // Messages with the Deleted flag set. + DRAFT: void; // Messages with the Draft flag set. + FLAGGED: void; // Messages with the Flagged flag set. + NEW: void; // Messages that have the Recent flag set but not the Seen flag. + SEEN: void; // Messages that have the Seen flag set. + RECENT: void; // Messages that have the Recent flag set. + OLD: void; // Messages that do not have the Recent flag set. This is functionally equivalent to "!RECENT" (as opposed to "!NEW"). + UNANSWERED: void; // Messages that do not have the Answered flag set. + UNDELETED: void; // Messages that do not have the Deleted flag set. + UNDRAFT: void; // Messages that do not have the Draft flag set. + UNFLAGGED: void; // Messages that do not have the Flagged flag set. + UNSEEN: void; // Messages that do not have the Seen flag set. + + // The following are valid types that require string value(s): + + BCC: any; // Messages that contain the specified string in the BCC field. + CC: any; // Messages that contain the specified string in the CC field. + FROM: any; // Messages that contain the specified string in the FROM field. + SUBJECT: any; // Messages that contain the specified string in the SUBJECT field. + TO: any; // Messages that contain the specified string in the TO field. + BODY: any; // Messages that contain the specified string in the message body. + TEXT: any; // Messages that contain the specified string in the header OR the message body. + KEYWORD: any; // Messages with the specified keyword set. + HEADER: any; // Requires two string values, with the first being the header name and the second being the value to search for. If this second string is empty, all messages that contain the given header name will be returned. + // The following are valid types that require a string parseable by JavaScripts Date object OR a Date instance: + BEFORE: any; // Messages whose internal date (disregarding time and timezone) is earlier than the specified date. + ON: any; // Messages whose internal date (disregarding time and timezone) is within the specified date. + SINCE: any; // Messages whose internal date (disregarding time and timezone) is within or later than the specified date. + SENTBEFORE: any; // Messages whose Date header (disregarding time and timezone) is earlier than the specified date. + SENTON: any; // Messages whose Date header (disregarding time and timezone) is within the specified date. + SENTSINCE: any; // Messages whose Date header (disregarding time and timezone) is within or later than the specified date. + //The following are valid types that require one Integer value: + LARGER: number; // Messages with a size larger than the specified number of bytes. + SMALLER: number; // Messages with a size smaller than the specified number of bytes. + // The following are valid criterion that require one or more Integer values: + UID: any; // Messages with UIDs corresponding to the specified UID set. Ranges are permitted (e.g. '2504:2507' or '*' or '2504:*'). + */ + + + export interface MessageFunctions { + // Searches the currently open mailbox for messages using given criteria. criteria is a list describing what you want to find. For criteria types that require arguments, use an array instead of just the string criteria type name (e.g. ['FROM', 'foo@bar.com']). Prefix criteria types with an "!" to negate. + search(criteria : any[], callback : (error : Error, uids : string[]) => void) : void; + // Fetches message(s) in the currently open mailbox. + fetch(source : any /* MessageSource */, options : FetchOptions) : ImapFetch; + // Copies message(s) in the currently open mailbox to another mailbox. + copy(source : any /* MessageSource */, mailboxName : string, callback : (error : Error) => void) : void; + // Moves message(s) in the currently open mailbox to another mailbox. Note: The message(s) in the destination mailbox will have a new message UID. + move(source : any /* MessageSource */, mailboxName : string, callback : (error : Error) => void) : void; + // Adds flag(s) to message(s). + addFlags(source : any /* MessageSource */, flags : any, callback : (error : Error) => void) : void; + // Removes flag(s) from message(s). + delFlags(source : any /* MessageSource */, flags : any, callback : (error : Error) => void) : void; + // Sets the flag(s) for message(s). + setFlags(source : any /* MessageSource */, flags : any, callback : (error : Error) => void) : void; + // Adds keyword(s) to message(s). keywords is either a single keyword or an array of keywords. + addKeywords(source : any /* MessageSource */, keywords : any /* string|string[] */, callback : (error : Error) => void) : void; + //Removes keyword(s) from message(s). keywords is either a single keyword or an array of keywords. + delKeywords(source : any /* MessageSource */, keywords : any /* string|string[] */, callback : (error : Error) => void) : void; + // Sets keyword(s) for message(s). keywords is either a single keyword or an array of keywords. + setKeywords(source : any /* MessageSource */, keywords : any /* string|string[] */, callback : (error : Error) => void) : void; + // Checks if the server supports the specified capability. + serverSupports(capability : string) : boolean; + } + + + + + export class Connection implements NodeJS.EventEmitter, MessageFunctions { + /** @constructor */ + constructor(config : Config); + + // from NodeJS.EventEmitter + addListener(event: string, listener: Function): NodeJS.EventEmitter; + on(event: string, listener: Function): NodeJS.EventEmitter; + once(event: string, listener: Function): NodeJS.EventEmitter; + removeListener(event: string, listener: Function): NodeJS.EventEmitter; + removeAllListeners(event?: string): NodeJS.EventEmitter; + setMaxListeners(n: number): void; + listeners(event: string): Function[]; + emit(event: string, ...args: any[]): boolean; + + // from MessageFunctions + // Searches the currently open mailbox for messages using given criteria. criteria is a list describing what you want to find. For criteria types that require arguments, use an array instead of just the string criteria type name (e.g. ['FROM', 'foo@bar.com']). Prefix criteria types with an "!" to negate. + search(criteria : any[], callback : (error : Error, uids : string[]) => void) : void; + // Fetches message(s) in the currently open mailbox. + fetch(source : any /* MessageSource */, options : FetchOptions) : ImapFetch; + // Copies message(s) in the currently open mailbox to another mailbox. + copy(source : any /* MessageSource */, mailboxName : string, callback : (error : Error) => void) : void; + // Moves message(s) in the currently open mailbox to another mailbox. Note: The message(s) in the destination mailbox will have a new message UID. + move(source : any /* MessageSource */, mailboxName : string, callback : (error : Error) => void) : void; + // Adds flag(s) to message(s). + addFlags(source : any /* MessageSource */, flags : any, callback : (error : Error) => void) : void; + // Removes flag(s) from message(s). + delFlags(source : any /* MessageSource */, flags : any, callback : (error : Error) => void) : void; + // Sets the flag(s) for message(s). + setFlags(source : any /* MessageSource */, flags : any, callback : (error : Error) => void) : void; + // Adds keyword(s) to message(s). keywords is either a single keyword or an array of keywords. + addKeywords(source : any /* MessageSource */, keywords : any /* string|string[] */, callback : (error : Error) => void) : void; + //Removes keyword(s) from message(s). keywords is either a single keyword or an array of keywords. + delKeywords(source : any /* MessageSource */, keywords : any /* string|string[] */, callback : (error : Error) => void) : void; + // Sets keyword(s) for message(s). keywords is either a single keyword or an array of keywords. + setKeywords(source : any /* MessageSource */, keywords : any /* string|string[] */, callback : (error : Error) => void) : void; + // Checks if the server supports the specified capability. + serverSupports(capability : string) : boolean; + + // Parses a raw header and returns an object keyed on header fields and the values are Arrays of header field values. Set disableAutoDecode to true to disable automatic decoding of MIME encoded-words that may exist in header field values. + static parseHeader(rawHeader: string, disableAutoDecode? : boolean) : any; + + state: string; // The current state of the connection (e.g. 'disconnected', 'connected', 'authenticated'). + delimiter: string; // The (top-level) mailbox hierarchy delimiter. If the server does not support mailbox hierarchies and only a flat list, this value will be falsey. + namespaces: { // Contains information about each namespace type (if supported by the server) with the following properties: + personal: any[]; // Mailboxes that belong to the logged in user. + other: any[]; // Mailboxes that belong to other users that the logged in user has access to. + shared: any[]; // Mailboxes that are accessible by any logged in user. + }; + seq: MessageFunctions; + /** Attempts to connect and authenticate with the IMAP server. */ + connect() : void; + /** Closes the connection to the server after all requests in the queue have been sent. */ + end() : void; + /** Immediately destroys the connection to the server. */ + destroy() : void; + /** Opens a specific mailbox that exists on the server. mailboxName should include any necessary prefix/path. modifiers is used by IMAP extensions. */ + openBox(mailboxName : string, callback : (error : Error, mailbox: Box) => void) : void; + openBox(mailboxName : string, openReadOnly : boolean, callback : (error : Error, mailbox: Box) => void) : void; + openBox(mailboxName : string, openReadOnly : boolean, modifiers : Object, callback : (error : Error, mailbox: Box) => void) : void; + /** Closes the currently open mailbox. If autoExpunge is true, any messages marked as Deleted in the currently open mailbox will be removed if the mailbox was NOT opened in read-only mode. If autoExpunge is false, you disconnect, or you open another mailbox, messages marked as Deleted will NOT be removed from the currently open mailbox. */ + closeBox(callback : (error : Error) => void) : void; + closeBox(autoExpunge : boolean, callback : (error : Error) => void) : void; + /** Creates a new mailbox on the server. mailboxName should include any necessary prefix/path. */ + addBox(mailboxName : string, callback : (error : Error) => void) : void; + /** Removes a specific mailbox that exists on the server. mailboxName should including any necessary prefix/path. */ + delBox(mailboxName : string, callback : (error : Error, uids : string[]) => void) : void; + /** Renames a specific mailbox that exists on the server. Both oldMailboxName and newMailboxName should include any necessary prefix/path. Note: Renaming the 'INBOX' mailbox will instead cause all messages in 'INBOX' to be moved to the new mailbox. */ + renameBox(oldMailboxName : string, newMailboxName : string, callback : (error : Error, mailbox: Box) => void) : void; + /** Subscribes to a specific mailbox that exists on the server. mailboxName should include any necessary prefix/path. */ + subscribeBox(mailboxName : string, callback : (error : Error) => void) : void; + /** Unsubscribes from a specific mailbox that exists on the server. mailboxName should include any necessary prefix/path. */ + unsubscribeBox(mailboxName : string, callback : (error : Error) => void) : void; + /** Fetches information about a mailbox other than the one currently open. Note: There is no guarantee that this will be a fast operation on the server. Also, do not call this on the currently open mailbox. */ + status(mailboxName : string, callback : (error : Error, mailbox: Box) => void) : void; + /** Obtains the full list of mailboxes. If nsPrefix is not specified, the main personal namespace is used. */ + getBoxes(callback : (error : Error, mailboxes: MailBoxes) => void) : void; + getBoxes(nsPrefix : string, callback : (error : Error, mailboxes: MailBoxes) => void) : void; + /** Obtains the full list of subscribed mailboxes. If nsPrefix is not specified, the main personal namespace is used. */ + getSubscribedBoxes(callback : (error : Error, mailboxes: MailBoxes) => void) : void; + getSubscribedBoxes(nsPrefix : string, callback : (error : Error, mailboxes: MailBoxes) => void) : void; + /** Permanently removes all messages flagged as Deleted in the currently open mailbox. If the server supports the 'UIDPLUS' capability, uids can be supplied to only remove messages that both have their uid in uids and have the \Deleted flag set. Note: At least on Gmail, performing this operation with any currently open mailbox that is not the Spam or Trash mailbox will merely archive any messages marked as Deleted (by moving them to the 'All Mail' mailbox). */ + expunge(callback : (error : Error) => void) : void; + expunge(uids : any /* MessageSource */, callback : (error : Error) => void) : void; + // Appends a message to selected mailbox. msgData is a string or Buffer containing an RFC-822 compatible MIME message. Valid options properties are: + append(msgData : any, callback : (error : Error) => void) : void; + append(msgData : any, options : AppendOptions, callback : (error : Error) => void) : void; + } + +} + + +declare module "imap" { + + var out: typeof IMAP.Connection; + + export = out; +} diff --git a/jjv/jjv-tests.ts b/jjv/jjv-tests.ts new file mode 100644 index 0000000000..d290fe9ab0 --- /dev/null +++ b/jjv/jjv-tests.ts @@ -0,0 +1,69 @@ +/// + +import jjv = require('jjv'); + +// create new JJV environment +var env = jjv(); +var errors: jjv.Errors; + +// Register a `user` schema +env.addSchema('user', { + type: 'object', + properties: { + firstname: { + type: 'string', + minLength: 2, + maxLength: 15, + }, + lastname: { + type: 'string', + minLength: 2, + maxLength: 25, + }, + gender: { + type: 'string', + enum: ['male', 'female'], + }, + email: { + type: 'string', + format: 'email', + }, + password: { + type: 'string', + minLength: 8, + }, + }, + required: ['firstname', 'lastname', 'email', 'password'], +}); + +// Perform validation against an incomplete user object (errors will be reported) +errors = env.validate('user', { firstname: 'John', lastname: 'Smith' }); + +errors = env.validate({ + type: 'object', + properties: { + x: { type: 'number' }, + y: { type: 'number' }, + }, + required: ['x', 'y'], +}, { x: 'a' }); + +if (errors.validation['x'].type === 'string') { + console.log('x is wrong type'); +} + +if (errors.validation['y'].required) { + console.log('y is required'); +} + +env.defaultOptions.checkRequired = false; + +env.validate('schemaName', {}, { checkRequired: false }); + +env.addType('date', (v: any) => !isNaN(Date.parse(v))); + +env.addFormat('hexadecimal', (v: any) => (/^[a-fA-F0-9]+$/).test(v)); + +env.addCheck('exactLength', (v: any, p: any) => v.length === p); + +env.addTypeCoercion('integer', (x: any) => parseInt(x, 10)); diff --git a/jjv/jjv.d.ts b/jjv/jjv.d.ts new file mode 100644 index 0000000000..9dd9c6410d --- /dev/null +++ b/jjv/jjv.d.ts @@ -0,0 +1,42 @@ +// Type definitions for JJV v1.0.2 +// Project: https://github.com/acornejo/jjv +// Definitions by: Wim Looman +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module "jjv" { + function jjv(): jjv.Env; + + module jjv { + interface Errors { + validation: { + [property: string]: { + required?: boolean; + type?: string; + } + }; + } + + interface Options { + checkRequired?: boolean; + useDefault?: boolean; + useCoerce?: boolean; + removeAdditional?: boolean; + } + + interface Env { + defaultOptions: Options; + + addSchema(name: string, schema: Object): void; + + addType(name: string, parse: (input: any) => any): void; + addFormat(name: string, parse: (input: any) => any): void; + addCheck(name: string, check: (input: any, comparator: any) => any): void; + addTypeCoercion(name: string, coerce: (input: any) => any): void; + + validate(name: string, object: any, options?: Options): Errors; + validate(schema: Object, object: any, options?: Options): Errors; + } + } + + export = jjv; +} diff --git a/jjve/jjve-tests.ts b/jjve/jjve-tests.ts new file mode 100644 index 0000000000..4d5b3819e3 --- /dev/null +++ b/jjve/jjve-tests.ts @@ -0,0 +1,34 @@ +/// +/// + +import jjv = require('jjv'); +import jjve = require('jjve'); + +var env: jjv.Env = jjv(); +var je: jjve.Env = jjve(env); + +var schema = { + type: 'object', + properties: { + ok: { + type: 'boolean', + }, + }, +}; + +var data = { ok: 1 }; + +var result = env.validate(schema, data); + +if (result) { + var errors = je(schema, data, result); + console.log(JSON.stringify(errors, null, 4)); +} + +errors.forEach(error => + console.log( + 'code: %s, message: %s, data: %s, path: %s', + error.code, + error.message, + error.data, + error.path)); diff --git a/jjve/jjve.d.ts b/jjve/jjve.d.ts new file mode 100644 index 0000000000..d55c332273 --- /dev/null +++ b/jjve/jjve.d.ts @@ -0,0 +1,26 @@ +// Type definitions for JJVE v0.4.0 +// Project: https://github.com/silas/jjve +// Definitions by: Wim Looman +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module 'jjve' { + import jjv = require('jjv'); + + function jjve(jjv: jjv.Env): jjve.Env; + module jjve { + interface Issue { + code: string; + message: string; + data: any; + path: string; + } + + interface Env { + (schema: Object, data: any, errors: jjv.Errors): Issue[]; + } + } + + export = jjve; +} diff --git a/jquery.address/jquery.address.d.ts b/jquery.address/jquery.address.d.ts index 43a666e3e8..befc5fe17a 100644 --- a/jquery.address/jquery.address.d.ts +++ b/jquery.address/jquery.address.d.ts @@ -6,7 +6,7 @@ /// interface JQueryAddressStatic { - (); + (): any; /** * Binds any supported event type to a function with support for an optional map of data. */ diff --git a/less/less.d.ts b/less/less.d.ts index d5787913b9..4c096525d3 100644 --- a/less/less.d.ts +++ b/less/less.d.ts @@ -3,7 +3,7 @@ // Definitions by: AndrewGaspar // Definitions: https://github.com/borisyankov/DefinitelyTyped -declare module "less" { +declare module less { class LessError { constructor(e: Error, env); @@ -550,3 +550,7 @@ declare module "less" { export var version: number[]; } + +declare module "less" { + export = less; +} diff --git a/minimist/minimist-tests.ts b/minimist/minimist-tests.ts index b96b7d13ad..1f714fd3ee 100644 --- a/minimist/minimist-tests.ts +++ b/minimist/minimist-tests.ts @@ -7,7 +7,7 @@ var num: string; var str: string; var strArr: string[]; var args: string[]; -var obj: Object; +var obj: minimist.ParsedArgs; var opts: Opts; opts.string = strArr; @@ -25,3 +25,4 @@ opts.default = { obj = minimist(); obj = minimist(strArr); obj = minimist(strArr, opts); +var remainingArgCount = obj._.length; diff --git a/minimist/minimist.d.ts b/minimist/minimist.d.ts index 2d65e3aac5..98d0f37a8f 100644 --- a/minimist/minimist.d.ts +++ b/minimist/minimist.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/borisyankov/DefinitelyTyped declare module 'minimist' { - function minimist(args?: string[], opts?: minimist.Opts):Object; + function minimist(args?: string[], opts?: minimist.Opts): minimist.ParsedArgs; module minimist { export interface Opts { @@ -20,6 +20,10 @@ declare module 'minimist' { // an object mapping string argument names to default values default?: {[key:string]: any}; } + + export interface ParsedArgs { + _: string[]; + } } export = minimist; diff --git a/moment/moment-tests.ts b/moment/moment-tests.ts index ab629921d1..962c11294d 100644 --- a/moment/moment-tests.ts +++ b/moment/moment-tests.ts @@ -124,6 +124,8 @@ moment().isoWeek(); moment().isoWeek(45); moment().isoWeeks(); moment().isoWeeks(45); +moment().dayOfYear(); +moment().dayOfYear(45); var getMilliseconds: number = moment().milliseconds(); var getSeconds: number = moment().seconds(); diff --git a/moment/moment.d.ts b/moment/moment.d.ts index b6ac9a79e6..200e46e2b6 100644 --- a/moment/moment.d.ts +++ b/moment/moment.d.ts @@ -210,6 +210,8 @@ interface Moment { isoWeeks(d: number): Moment; weeksInYear(): number; isoWeeksInYear(): number; + dayOfYear(): number; + dayOfYear(d: number): Moment; from(f: Moment): string; from(f: Moment, suffix: boolean): string; diff --git a/mongoose/mongoose-tests.ts b/mongoose/mongoose-tests.ts index 38c469ca15..1c8b804d6e 100644 --- a/mongoose/mongoose-tests.ts +++ b/mongoose/mongoose-tests.ts @@ -364,3 +364,5 @@ schema.virtual('display_name') .get(function(): string { return this.name; }) .set((value: string): void => {}); +var id : mongoose.Types.ObjectId; +var s = id.toHexString(); diff --git a/mongoose/mongoose.d.ts b/mongoose/mongoose.d.ts index abfd5625ec..3cd48c5ec2 100644 --- a/mongoose/mongoose.d.ts +++ b/mongoose/mongoose.d.ts @@ -78,7 +78,9 @@ declare module "mongoose" { set(fn: Function): VirtualType; } export module Types { - export class ObjectId {} + export class ObjectId { + toHexString(): string; + } } export class Schema { diff --git a/multiparty/multiparty-tests.ts b/multiparty/multiparty-tests.ts new file mode 100644 index 0000000000..47e6a62f71 --- /dev/null +++ b/multiparty/multiparty-tests.ts @@ -0,0 +1,72 @@ +/// +/// +import multiparty = require('multiparty'); +import http = require('http'); +import util = require('util'); + +http.createServer(function (req: http.ServerRequest, res: http.ServerResponse) { + if (req.url === '/upload' && req.method === 'POST') { + var count = 0; + var form = new multiparty.Form(); + + // Errors may be emitted + // Note that if you are listening to 'part' events, the same error may be + // emitted from the `form` and the `part`. + form.on('error', function (err: Error) { + console.log('Error parsing form: ' + err); + }); + + // Parts are emitted when parsing the form + form.on('part', function (part: multiparty.Part) { + // You *must* act on the part by reading it + // NOTE: if you want to ignore it, just call "part.resume()" + + if (!!part.filename) { + // filename is exists when this is a file + count++; + console.log('got field named ' + part.name + ' and got file named ' + part.filename); + // ignore file's content here + part.resume(); + } else { + // filename doesn't exist when this is a field and not a file + console.log('got field named ' + part.name); + // ignore field's content + part.resume(); + } + + part.on('error', function (err: Error) { + // decide what to do + console.log('Error on part event: ' + err); + }); + }); + + form.on('progress', function (bytesReceived: number, bytesExpected: number) { + // decide what to do + console.log('BytesReceived: ' + bytesReceived, 'BytesExpected: ', bytesExpected); + }); + + form.on('field', function (name: string, value: string) { + // decide what to do + console.log('Field Name: ' + name + ', Field Value: ' + value); + }); + + // Close emitted after form parsed + form.on('close', function () { + console.log('Upload completed!'); + res.end('Received ' + count + ' files'); + }); + + // Parse req + form.parse(req); + } + + // show a file upload form + res.writeHead(200, {'content-type': 'text/html'}); + res.end( + '
' + + '
' + + '
' + + '' + + '
' + ); +}).listen(8080); \ No newline at end of file diff --git a/multiparty/multiparty.d.ts b/multiparty/multiparty.d.ts new file mode 100644 index 0000000000..1ef97c94c7 --- /dev/null +++ b/multiparty/multiparty.d.ts @@ -0,0 +1,111 @@ +// Type definitions for node-multiparty +// Project: https://github.com/andrewrk/node-multiparty +// Definitions by: Ken Fukuyama +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module "multiparty" { + import http = require('http'); + import events = require('events'); + import stream = require('stream'); + + export class Form extends events.EventEmitter { + constructor(options?: FormOptions); + /** + * Parses an incoming node.js request containing form data. + * This will cause form to emit events based off the incoming request + * @param request + * @param callback + */ + parse(request: http.ServerRequest, callback?: (error: Error, fields: any, files: any) => any): void; + } + + export interface File { + /** + * same as name - the field name for this file + */ + fieldName: string; + /** + * the filename that the user reports for the file + */ + originalFileName: string; + /** + * the absolute path of the uploaded file on disk + */ + path: string; + /** + * the HTTP headers that were sent along with this file + */ + headers: any; + /** + * size of the file in bytes + */ + size: number; + } + + interface Part extends stream.Readable { + /** + * the headers for this part. For example, you may be interested in content-type + */ + headers: any; + /** + * the field name for this part + */ + name: string; + /** + * only if the part is an incoming file + */ + filename: string; + /** + * the byte offset of this part in the request body + */ + byteOffset: number; + /** + * assuming that this is the last part in the request, this is the size of this part in bytes. + * You could use this, for example, to set the Content-Length header if uploading to S3. + * If the part had a Content-Length header then that value is used here instead. + */ + byteCount: number; + } + + export interface FormOptions { + /** + * sets encoding for the incoming form fields. Defaults to utf8. + */ + encoding?:string; + /** + * Limits the amount of memory all fields (not files) can allocate in bytes. + * If this value is exceeded, an error event is emitted. The default size is 2MB. + */ + maxFieldsSize?:number; + /** + * Limits the number of fields that will be parsed before emitting an error event. + * A file counts as a field in this case. Defaults to 1000. + */ + maxFields?:number; + /** + * Only relevant when autoFiles is true. + * Limits the total bytes accepted for all files combined. + * If this value is exceeded, an error event is emitted. + * The default is Infinity. + */ + maxFilesSize?:number; + /** + * Enables field events and disables part events for fields. + * This is automatically set to true if you add a field listener. + */ + autoFields?:boolean; + /** + * Enables file events and disables part events for files. + * This is automatically set to true if you add a file listener. + */ + autoFiles?:boolean; + /** + * Only relevant when autoFiles is true. + * The directory for placing file uploads in. + * You can move them later using fs.rename(). Defaults to os.tmpDir(). + */ + uploadDir?:string; + } +} \ No newline at end of file diff --git a/ngprogress/ngprogress-tests.ts b/ngprogress/ngprogress-tests.ts new file mode 100644 index 0000000000..9d52f97291 --- /dev/null +++ b/ngprogress/ngprogress-tests.ts @@ -0,0 +1,14 @@ +/// + + +var ngProgress: NgProgress.INgProgress = {}; + +ngProgress.start(); +ngProgress.height('10px'); +ngProgress.color('red'); +var statusResult: number = ngProgress.status(); +ngProgress.stop(); +ngProgress.set(50); +ngProgress.reset(); +ngProgress.complete(); + diff --git a/ngprogress/ngprogress.d.ts b/ngprogress/ngprogress.d.ts new file mode 100644 index 0000000000..fdcdd28cb5 --- /dev/null +++ b/ngprogress/ngprogress.d.ts @@ -0,0 +1,20 @@ +// Type definitions for ngProgress 1.0.7 +// Project: http://victorbjelkholm.github.io/ngProgress/ +// Definitions by: Martin McWhorter +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module NgProgress { + + export interface INgProgress { + start(): void; + height(height: string): void; + color(color: string): void; + status(): number; + stop(): void; + set(value: number): void; + reset(): void; + complete(): void; + } + +} + diff --git a/phonejs/dx.phonejs-tests.ts.tscparams b/phonejs/dx.phonejs-tests.ts.tscparams deleted file mode 100644 index d3f5a12faa..0000000000 --- a/phonejs/dx.phonejs-tests.ts.tscparams +++ /dev/null @@ -1 +0,0 @@ - diff --git a/phonejs/dx.phonejs.d.ts b/phonejs/dx.phonejs.d.ts deleted file mode 100644 index c7e324cec5..0000000000 --- a/phonejs/dx.phonejs.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -// Type definitions for PhoneJS -// Project: http://js.devexpress.com/MobileDevelopment/ -// Definitions by: DevExpress Inc. -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/// \ No newline at end of file diff --git a/react/react-addons-tests.ts b/react/react-addons-tests.ts index 059769bb94..7ce0fa23fc 100644 --- a/react/react-addons-tests.ts +++ b/react/react-addons-tests.ts @@ -1,7 +1,36 @@ /// import React = require("react/addons"); -// TestUtils +var isImportant: boolean; +var isRead: boolean; +var classSet: React.ClassSet = { + "message": true, + "message-important": isImportant, + "message-read": isRead +}; +var cx = React.addons.classSet; +var classes: string = cx(classSet); + +// +// React.addons (Transitions) +// -------------------------------------------------------------------------- + +React.createFactory(React.addons.TransitionGroup)({ component: "div" }); +React.createFactory(React.addons.CSSTransitionGroup)({ + component: React.createClass({ + render: (): React.ReactElement => null + }), + childFactory: (c) => c, + transitionName: "transition", + transitionAppear: false, + transitionEnter: true, + transitionLeave: true +}); + +// +// React.addons.TestUtils +// -------------------------------------------------------------------------- + var that: React.CompositeComponent; var node = that.refs["input"].getDOMNode(); React.addons.TestUtils.Simulate.click(node); @@ -16,27 +45,24 @@ interface GreetingState { } interface Greeting extends React.CompositeComponent { } -var Greeting = React.createClass({displayName: "Greeting", +var Greeting = React.createClass({ + displayName: "Greeting", getInitialState: function() { return {morning: true}; }, render: function() { var me = this; - return React.DOM.div(null, (me.state.morning ? "Hello" : "Goodbye "), me.props.name); + return React.DOM.div( + null, + me.state.morning ? "Hello " : "Goodbye ", + me.props.name); } }); -var root = React.addons.TestUtils.renderIntoDocument(React.createElement(Greeting, {name: "John"})); -var greeting = React.addons.TestUtils.findRenderedComponentWithType(root, Greeting); +var root = React.addons.TestUtils.renderIntoDocument( + React.createElement(Greeting, {name: "John"})); +var greeting = React.addons.TestUtils + .findRenderedComponentWithType(root, Greeting); greeting.setState({ morning: false }); - -var isImportant: boolean; -var isRead: boolean; -var cx = React.addons.classSet; -var classes: string = cx({ - "message": true, - "message-important": isImportant, - "message-read": isRead -}); diff --git a/react/react-tests.ts b/react/react-tests.ts index 6571556189..338e483a0c 100644 --- a/react/react-tests.ts +++ b/react/react-tests.ts @@ -18,6 +18,8 @@ interface MyComponent extends React.CompositeComponent { } var props: Props = { + key: 42, + ref: "myComponent42", hello: "world", foo: 42, bar: true @@ -60,7 +62,7 @@ var reactClass: React.ComponentClass = React.createClass({ var reactElement: React.ReactElement = React.createElement(reactClass, props); -var reactFactory: React.Factory = +var reactFactory: React.ComponentFactory = React.createFactory(reactClass); var component: React.Component = @@ -116,7 +118,34 @@ var myComponent = compComponent; myComponent.reset(); // -// PropTypes +// Attributes +// -------------------------------------------------------------------------- + +var children = ["Hello world", [null], React.DOM.span(null)]; +var divStyle = { // CSSProperties + flex: "1 1 main-size", + backgroundImage: "url('hello.png')" +}; +var htmlAttr: React.HTMLAttributes = { + key: 36, + ref: "htmlComponent", + children: children, + className: "test-attr", + style: divStyle, + onClick: (event: React.MouseEvent) => { + event.preventDefault(); + event.stopPropagation(); + }, + dangerouslySetInnerHTML: { + __html: "STRONG" + } +}; +React.DOM.div(htmlAttr); +React.DOM.span(htmlAttr); +React.DOM.input(htmlAttr); + +// +// React.PropTypes // -------------------------------------------------------------------------- var PropTypesSpecification: React.ComponentSpec = { @@ -156,6 +185,18 @@ var PropTypesSpecification: React.ComponentSpec = { } }; +// +// React.Children +// -------------------------------------------------------------------------- + +var childMap: { [key: string]: number } = + React.Children.map(children, (child) => { return 42; }); +React.Children.forEach(children, (child) => {}); +var nChildren: number = React.Children.count(children); +var onlyChild = React.Children.only([null, [[["Hallo"], true]], false, { + test: null +}]); + // // Example from http://facebook.github.io/react/ // -------------------------------------------------------------------------- diff --git a/react/react.d.ts b/react/react.d.ts index 1356b1280f..2b75bb3fd5 100644 --- a/react/react.d.ts +++ b/react/react.d.ts @@ -19,7 +19,6 @@ declare module React { interface ReactHTMLElement extends ReactElement {} interface ReactSVGElement extends ReactElement {} - interface ComponentElement

extends ReactElement

{} // // React Nodes @@ -27,7 +26,10 @@ declare module React { // type ReactText = string | number; // type Fragment = ReactNode[]; - // type ReactNode = ReactElement | Fragment | ReactText; + // type ReactNode = ReactElement | Fragment | ReactText | KeyMap; + // interface KeyMap { + // [key: string]: ReactNode; + // } // // React Components @@ -49,13 +51,12 @@ declare module React { // ReactElement Factories // ---------------------------------------------------------------------- - interface Factory

{ + interface ComponentFactory

{ (props?: P, ...children: any/*ReactNode*/[]): ReactElement

; } - interface HTMLFactory extends Factory {} - interface SVGFactory extends Factory {} - interface ComponentFactory

extends Factory

{} + interface HTMLFactory extends ComponentFactory {} + interface SVGFactory extends ComponentFactory {} // // Top-Level API @@ -64,8 +65,8 @@ declare module React { interface TopLevelAPI { createClass

(spec: ComponentSpec): ComponentClass

; createElement

(type: any/*ReactType*/, props: P, ...children: any/*ReactNode*/[]): ReactElement

; - createFactory

(componentClass: ComponentClass

): Factory

; - render

(element: ReactElement

, container: Element, callback?: () => void): Component

; + createFactory

(componentClass: ComponentClass

): ComponentFactory

; + render

(element: ReactElement

, container: Element, callback?: () => any): Component

; unmountComponentAtNode(container: Element): boolean; renderToString(element: ReactElement): string; renderToStaticMarkup(element: ReactElement): string; @@ -85,8 +86,8 @@ declare module React { isMounted(): boolean; props: P; - setProps(nextProps: P, callback?: () => void): void; - replaceProps(nextProps: P, callback?: () => void): void; + setProps(nextProps: P, callback?: () => any): void; + replaceProps(nextProps: P, callback?: () => any): void; } interface DOMComponent

extends Component

{ @@ -98,9 +99,9 @@ declare module React { interface CompositeComponent extends Component

, ComponentSpec { state: S; - setState(nextState: S, callback?: () => void): void; - replaceState(nextState: S, callback?: () => void): void; - forceUpdate(callback?: () => void): void; + setState(nextState: S, callback?: () => any): void; + replaceState(nextState: S, callback?: () => any): void; + forceUpdate(callback?: () => any): void; refs: { [key: string]: Component }; @@ -241,7 +242,7 @@ declare module React { export interface ReactAttributes { children?: any; // ReactNode - key?: string; + key?: any; // number | string ref?: string; // Event Attributes @@ -287,7 +288,7 @@ declare module React { interface CSSProperties { columnCount?: number; - flex?: number; + flex?: any; // number | string flexGrow?: number; flexShrink?: number; fontWeight?: number; @@ -303,8 +304,6 @@ declare module React { // SVG-related properties fillOpacity?: number; strokeOpacity?: number; - - [key: string]: any; // number | string } interface HTMLAttributes extends ReactAttributes { @@ -638,29 +637,39 @@ declare module React { // React.Children // ---------------------------------------------------------------------- + // type Child = ReactElement | ReactText; + interface ReactChildren { - map(children: any/*ReactNode*/, fn: (child: any/*ReactNode*/) => T): { [key:string]: T }; - forEach(children: any/*ReactNode*/, fn: (child: any/*ReactNode*/) => any): void; + map(children: any/*ReactNode*/, fn: (child: any/*Child*/) => T): { [key:string]: T }; + forEach(children: any/*ReactNode*/, fn: (child: any/*Child*/) => any): void; count(children: any/*ReactNode*/): number; - only(children: any/*ReactNode*/): any; + only(children: any/*ReactNode*/): any/*Child*/; + } + + // + // React.addons + // ---------------------------------------------------------------------- + + interface ClassSet { + [key: string]: boolean; } // // React.addons (Transitions) // ---------------------------------------------------------------------- - interface CSSTransitionGroupProps { + interface TransitionGroupProps { + component?: any; // ReactType + childFactory?: (child: ReactElement) => ReactElement; + } + + interface CSSTransitionGroupProps extends TransitionGroupProps { transitionName: string; transitionAppear?: boolean; transitionEnter?: boolean; transitionLeave?: boolean; } - interface TransitionGroupProps { - component?: any; // ReactType - childFactory?: (child: ReactElement) => ReactElement; - } - interface CSSTransitionGroup extends ComponentClass {} interface TransitionGroup extends ComponentClass {} @@ -869,11 +878,11 @@ declare module React { PureRenderMixin: PureRenderMixin; TransitionGroup: TransitionGroup; - batchedUpdates(callback: (a: A, b: B) => void, a: A, b: B): void; - batchedUpdates(callback: (a: A) => void, a: A): void; - batchedUpdates(callback: () => void): void; + batchedUpdates(callback: (a: A, b: B) => any, a: A, b: B): void; + batchedUpdates(callback: (a: A) => any, a: A): void; + batchedUpdates(callback: () => any): void; - classSet(cx: { [key: string]: boolean }): string; + classSet(cx: ClassSet): string; cloneWithProps

(element: ReactElement

, props: P): ReactElement

; update(value: any[], spec: UpdateArraySpec): any[]; diff --git a/rest/rest-tests.ts b/rest/rest-tests.ts index 4ffe17d21d..b19416c119 100644 --- a/rest/rest-tests.ts +++ b/rest/rest-tests.ts @@ -15,7 +15,7 @@ client({ path: '/data.json' }).then(function(response) { console.log('response: ', response); }); -client = rest.wrap(mime).wrap(errorCode, { code: 500 }); +client = rest.wrap(mime, { mime: 'application/json' }).wrap(errorCode, { code: 500 }); client({ path: '/data.json' }).then( function(response) { console.log('response: ', response); diff --git a/rest/rest.d.ts b/rest/rest.d.ts index 34ffc3bf21..3bec656c33 100644 --- a/rest/rest.d.ts +++ b/rest/rest.d.ts @@ -14,7 +14,7 @@ declare module "rest" { function rest(request: rest.Request): rest.ResponsePromise; module rest { - export function wrap(interceptor: Interceptor): Client; + export function wrap(interceptor: Interceptor, config?: any): Client; export interface Request { method?: string; diff --git a/selenium-webdriver/selenium-webdriver-tests.ts b/selenium-webdriver/selenium-webdriver-tests.ts index 52b317d961..467a01d3b5 100644 --- a/selenium-webdriver/selenium-webdriver-tests.ts +++ b/selenium-webdriver/selenium-webdriver-tests.ts @@ -1,28 +1,131 @@ /// -function TestAbstractBuilder() { - var builder: webdriver.AbstractBuilder = new webdriver.AbstractBuilder(); - var driver: webdriver.WebDriver = builder.build(); - var capabilities: webdriver.Capabilities = builder.getCapabilities(); - url = builder.getServerUrl(); - var otherBuilder: webdriver.AbstractBuilder = builder.usingServer(url); - otherBuilder = builder.withCapabilities(webdriver.Capabilities.android()); - var objCapabilities: { [index: string]: string; } = {}; - objCapabilities[webdriver.Capability.BROWSER_NAME] = webdriver.Browser.PHANTOM_JS; - otherBuilder = builder.withCapabilities(objCapabilities); - var url: string = webdriver.AbstractBuilder.DEFAULT_SERVER_URL; - var env: string = webdriver.AbstractBuilder.SERVER_URL_ENV; +function TestChromeDriver() { + var driver: chrome.Driver = new chrome.Driver(); + driver = new chrome.Driver(webdriver.Capabilities.chrome()); + driver = new chrome.Driver(webdriver.Capabilities.chrome(), new webdriver.promise.ControlFlow()); + + var baseDriver: webdriver.WebDriver = driver; +} + +function TestChromeOptions() { + var options: chrome.Options = new chrome.Options(); + options = chrome.Options.fromCapabilities(webdriver.Capabilities.chrome()); + + options = options.addArguments("a", "b", "c"); + options = options.addExtensions("a", "b", "c"); + options = options.detachDriver(true); + options = options.setChromeBinaryPath("path"); + options = options.setChromeLogFile("logfile"); + options = options.setLocalState("state"); + options = options.setLoggingPrefs(new webdriver.logging.Preferences()); + options = options.setProxy({ proxyType: "proxyType" }); + options = options.setUserPreferences("preferences"); + var capabilities: webdriver.Capabilities = options.toCapabilities(); + capabilities = options.toCapabilities(webdriver.Capabilities.chrome()); + var values: chrome.IOptionsValues = options.toJSON(); +} + +function TestServiceBuilder() { + var builder: chrome.ServiceBuilder = new chrome.ServiceBuilder(); + builder = new chrome.ServiceBuilder("exe"); + + var anything: any = builder.build(); + builder = builder.enableVerboseLogging(); + builder = builder.loggingTo("path"); + builder = builder.setNumHttpThreads(5); + builder = builder.setStdio("config"); + builder = builder.setStdio(["A", "B"]); + builder = builder.setUrlBasePath("path"); + builder = builder.usingPort(8080); + builder = builder.withEnvironment({ "A": "a", "B": "b" }); +} + +function TestChromeModule() { + var service: any = chrome.getDefaultService(); + chrome.setDefaultService({}); +} + +function TestBinary() { + var binary: firefox.Binary = new firefox.Binary(); + binary = new firefox.Binary("exe"); + + binary.addArguments("A", "B", "C"); + var promise: webdriver.promise.Promise = binary.kill(); + binary.launch("profile").then(function (result: any) { }); +} + +function TestFirefoxDriver() { + var driver: firefox.Driver = new firefox.Driver(); + driver = new chrome.Driver(webdriver.Capabilities.firefox()); + driver = new chrome.Driver(webdriver.Capabilities.firefox(), new webdriver.promise.ControlFlow()); + + var baseDriver: webdriver.WebDriver = driver; +} + +function TestFirefoxOptions() { + var options: firefox.Options = new firefox.Options(); + + options = options.setBinary("binary"); + options = options.setBinary(new firefox.Binary()); + options = options.setLoggingPreferences(new webdriver.logging.Preferences()); + options = options.setProfile("profile"); + options = options.setProfile(new firefox.Profile()); + options = options.setProxy({ proxyType: "proxy" }); + var capabilities: webdriver.Capabilities = options.toCapabilities(); + var capabilities: webdriver.Capabilities = options.toCapabilities({}); +} + +function TestFirefoxProfile() { + var profile: firefox.Profile = new firefox.Profile(); + profile = new firefox.Profile("dir"); + + var bool: boolean = profile.acceptUntrustedCerts(); + profile.addExtension("ext"); + bool = profile.assumeUntrustedCertIssuer(); + profile.encode().then(function (prof: string) { }); + var num: number = profile.getPort(); + var anything: any = profile.getPreference("key"); + bool = profile.nativeEventsEnabled(); + profile.setAcceptUntrustedCerts(true); + profile.setAssumeUntrustedCertIssuer(true); + profile.setNativeEventsEnabled(true); + profile.setPort(8080); + profile.setPreference("key", "value"); + profile.setPreference("key", 5); + profile.setPreference("key", true); + var stringPromise: webdriver.promise.Promise = profile.writeToDisk(); + stringPromise = profile.writeToDisk(true); +} + +function TestExecutors() { + var exec: webdriver.CommandExecutor = executors.createExecutor("url"); + exec = executors.createExecutor(new webdriver.promise.Promise()); } function TestBuilder() { var builder: webdriver.Builder = new webdriver.Builder(); - var abstractBuilder: webdriver.AbstractBuilder = builder; var driver: webdriver.WebDriver = builder.build(); - var session: string = builder.getSession(); - abstractBuilder = builder.usingSession("ID"); + builder = builder.forBrowser('name'); + builder = builder.forBrowser('name', 'version'); + builder = builder.forBrowser('name', 'version', 'platform'); - var env: string = webdriver.Builder.SESSION_ID_ENV; + var cap: webdriver.Capabilities = builder.getCapabilities(); + var str:string = builder.getServerUrl(); + + builder = builder.setAlertBehavior('behavior'); + builder = builder.setChromeOptions(new chrome.Options()); + builder = builder.setControlFlow(new webdriver.promise.ControlFlow()); + builder = builder.setEnableNativeEvents(true); + builder = builder.setFirefoxOptions(new firefox.Options()); + builder = builder.setLoggingPrefs(new webdriver.logging.Preferences()); + builder = builder.setLoggingPrefs({ "key": "value" }); + builder = builder.setProxy({ proxyType: 'type' }); + builder = builder.setScrollBehavior(1); + builder = builder.usingServer('http://someserver'); + builder = builder.withCapabilities(new webdriver.Capabilities()); + builder = builder.withCapabilities({ something: true }); } function TestActionSequence() { @@ -31,7 +134,7 @@ function TestActionSequence() { build(); var sequence: webdriver.ActionSequence = new webdriver.ActionSequence(driver); - var element: webdriver.WebElement = new webdriver.WebElement(driver, 'id'); + var element: webdriver.WebElement = new webdriver.WebElement(driver, { ELEMENT: 'id' }); // Click sequence = sequence.click(); @@ -76,23 +179,20 @@ function TestActionSequence() { sequence = sequence.sendKeys("A", "B", "C"); sequence = sequence.sendKeys(["A", "B", "C"]); - var promise: webdriver.promise.Promise = sequence.perform(); + sequence.perform().then(function () { }); } function TestAlert() { var driver: webdriver.WebDriver = new webdriver.Builder(). withCapabilities(webdriver.Capabilities.chrome()). build(); - var promise: webdriver.promise.Promise = new webdriver.promise.Promise(); - var alert: webdriver.Alert = new webdriver.Alert(driver, 'ABC'); - alert = new webdriver.Alert(driver, promise); - var deferred: webdriver.promise.Deferred = alert; + var alert: webdriver.Alert = driver.switchTo().alert(); - promise = alert.accept(); - promise = alert.dismiss(); - promise = alert.getText(); - promise = alert.sendKeys("ABC"); + alert.accept().then(function () { }); + alert.dismiss().then(function () { }); + alert.getText().then(function (text: string) { }); + alert.sendKeys("ABC").then(function () { }); } function TestBrowser() { @@ -131,6 +231,12 @@ function TestCapabilities() { capabilities = capabilities.merge(objCapabilities); capabilities = capabilities.set(webdriver.Capability.VERSION, { abc: 'def' }); capabilities = capabilities.set(webdriver.Capability.VERSION, null); + capabilities = capabilities.setLoggingPrefs(new webdriver.logging.Preferences()); + capabilities = capabilities.setLoggingPrefs({ "key": "value" }); + capabilities = capabilities.setProxy({ proxyType: 'Type' }); + capabilities = capabilities.setEnableNativeEvents(true); + capabilities = capabilities.setScrollBehavior(1); + capabilities = capabilities.setAlertBehavior('accept'); anything = capabilities.toJSON(); @@ -152,14 +258,15 @@ function TestCapability() { capability = webdriver.Capability.ACCEPT_SSL_CERTS; capability = webdriver.Capability.BROWSER_NAME; + capability = webdriver.Capability.ELEMENT_SCROLL_BEHAVIOR; capability = webdriver.Capability.HANDLES_ALERTS; capability = webdriver.Capability.LOGGING_PREFS; + capability = webdriver.Capability.NATIVE_EVENTS; capability = webdriver.Capability.PLATFORM; capability = webdriver.Capability.PROXY; capability = webdriver.Capability.ROTATABLE; capability = webdriver.Capability.SECURE_SSL; capability = webdriver.Capability.SUPPORTS_APPLICATION_CACHE; - capability = webdriver.Capability.SUPPORTS_BROWSER_CONNECTION; capability = webdriver.Capability.SUPPORTS_CSS_SELECTORS; capability = webdriver.Capability.SUPPORTS_JAVASCRIPT; capability = webdriver.Capability.SUPPORTS_LOCATION_CONTEXT; @@ -181,7 +288,8 @@ function TestCommand() { } function TestCommandExecutor() { - var c: webdriver.CommandExecutor = { execute: function(command: webdriver.Command, callback: (error: Error, obj: any) => any) {} }; + var c: webdriver.CommandExecutor = { execute: function (command: webdriver.Command, callback: (error: Error, obj: any) => any) { } }; + c.execute(new webdriver.Command('name'), function (error: Error, response: any) { }); } function TestCommandName() { @@ -291,10 +399,14 @@ function TestEventEmitter() { var callback = function (a: number, b: number, c: number) {}; emitter = emitter.addListener('ABC', callback); + emitter = emitter.addListener('ABC', callback, this); emitter.emit('ABC', 1, 2, 3); var listeners = emitter.listeners('ABC'); + if (listeners[0].oneshot) { + listeners[0].fn.apply(listeners[0].scope); + } var length: number = listeners.length; var listenerInfo = listeners[0]; if (listenerInfo.oneshot) { @@ -302,8 +414,10 @@ function TestEventEmitter() { } emitter = emitter.on('ABC', callback); + emitter = emitter.on('ABC', callback, this); emitter = emitter.once('ABC', callback); + emitter = emitter.once('ABC', callback, this); emitter = emitter.removeListener('ABC', callback); @@ -311,14 +425,6 @@ function TestEventEmitter() { emitter.removeAllListeners(); } -function TestFirefoxDomExecutor() { - if (webdriver.FirefoxDomExecutor.isAvailable()) { - var executor: webdriver.CommandExecutor = new webdriver.FirefoxDomExecutor(); - var callback = function(error: Error, responseObject: any) {}; - executor.execute(new webdriver.Command(webdriver.CommandName.CLICK), callback); - } -} - function TestKey() { var key: string; @@ -387,21 +493,28 @@ function TestKey() { } function TestLocator() { - var locator: webdriver.Locator = new webdriver.Locator('id', 'ABC'); + var driver: webdriver.WebDriver = new webdriver.Builder(). + withCapabilities(webdriver.Capabilities.chrome()). + build(); + + var locator: webdriver.Locator = webdriver.By.className('class'); var locatorStr: string = locator.toString(); var using: string = locator.using; var value: string = locator.value; - locator = webdriver.Locator.checkLocator(webdriver.Locator.Strategy.id('ABC')); - locator = webdriver.Locator.checkLocator({id: 'ABC'}); + var str: string = locator.toString(); - locator = webdriver.Locator.createFromObj({id: 'ABC'}); + locator = webdriver.By.css('css'); + locator = webdriver.By.id('id'); + locator = webdriver.By.linkText('link'); + locator = webdriver.By.name('name'); + locator = webdriver.By.partialLinkText('text'); + locator = webdriver.By.tagName('tag'); + locator = webdriver.By.xpath('xpath'); - locator = webdriver.Locator.Strategy.id('ABC'); - - locator = webdriver.By.id('ABC'); + webdriver.By.js('script', 1, 2, 3)(driver).then(function (abc: number) { }); } function TestSession() { @@ -418,16 +531,13 @@ function TestSession() { } function TestUnhandledAlertError() { - var driver: webdriver.WebDriver = new webdriver.Builder(). - withCapabilities(webdriver.Capabilities.chrome()). - build(); - var promise: webdriver.promise.Promise = new webdriver.promise.Promise(); + var someFunc = function (error: webdriver.UnhandledAlertError) { + var baseError: webdriver.error.Error = error; - var alert: webdriver.Alert = new webdriver.Alert(driver, 'ABC'); - var error = new webdriver.UnhandledAlertError('An error', alert); - var baseError: webdriver.error.Error = error; - - alert = error.getAlert(); + var alert: webdriver.Alert = error.getAlert(); + var str: string = error.getAlertText(); + str = error.toString(); + } } function TestWebDriverLogs() { @@ -435,11 +545,10 @@ function TestWebDriverLogs() { withCapabilities(webdriver.Capabilities.chrome()). build(); - var logs: webdriver.WebDriverLogs = webdriver.WebDriver.Logs; - var promise: webdriver.promise.Promise; + var logs: webdriver.WebDriverLogs = new webdriver.WebDriver.Logs(driver); - promise = logs.get(webdriver.logging.Type.BROWSER); - promise = logs.getAvailableLogTypes(); + logs.get(webdriver.logging.Type.BROWSER).then(function (entries: webdriver.logging.Entry[]) { });; + logs.getAvailableLogTypes().then(function (types: string[]) { }); } function TestWebDriverNavigation() { @@ -447,13 +556,12 @@ function TestWebDriverNavigation() { withCapabilities(webdriver.Capabilities.chrome()). build(); - var navigation: webdriver.WebDriverNavigation = webdriver.WebDriver.Navigation; - var promise: webdriver.promise.Promise; + var navigation: webdriver.WebDriverNavigation = new webdriver.WebDriver.Navigation(driver); - promise = navigation.back(); - promise = navigation.forward(); - promise = navigation.refresh(); - promise = navigation.to('http://google.com'); + navigation.back().then(function () { }); + navigation.forward().then(function () { }); + navigation.refresh().then(function () { }); + navigation.to('http://google.com').then(function () { }); } function TestWebDriverOptions() { @@ -461,8 +569,8 @@ function TestWebDriverOptions() { withCapabilities(webdriver.Capabilities.chrome()). build(); - var options: webdriver.WebDriverOptions = webdriver.WebDriver.Options; - var promise: webdriver.promise.Promise; + var options: webdriver.WebDriverOptions = new webdriver.WebDriver.Options(driver); + var promise: webdriver.promise.Promise; // Add Cookie promise = options.addCookie('name', 'value'); @@ -474,8 +582,8 @@ function TestWebDriverOptions() { promise = options.deleteAllCookies(); promise = options.deleteCookie('name'); - promise = options.getCookie('name'); - promise = options.getCookies(); + options.getCookie('name').then(function (cookies: webdriver.IWebDriverOptionsCookie) { }); + options.getCookies().then(function (cookies: webdriver.IWebDriverOptionsCookie[]) { }); var logs: webdriver.WebDriverLogs = options.logs(); var timeouts: webdriver.WebDriverTimeouts = options.timeouts(); @@ -487,8 +595,8 @@ function TestWebDriverTargetLocator() { withCapabilities(webdriver.Capabilities.chrome()). build(); - var locator: webdriver.WebDriverTargetLocator = webdriver.WebDriver.TargetLocator; - var promise: webdriver.promise.Promise; + var locator: webdriver.WebDriverTargetLocator = new webdriver.WebDriver.TargetLocator(driver); + var promise: webdriver.promise.Promise; var element: webdriver.WebElement = locator.activeElement(); var alert: webdriver.Alert = locator.alert(); @@ -503,8 +611,8 @@ function TestWebDriverTimeouts() { withCapabilities(webdriver.Capabilities.chrome()). build(); - var timeouts: webdriver.WebDriverTimeouts = webdriver.WebDriver.Timeouts; - var promise: webdriver.promise.Promise; + var timeouts: webdriver.WebDriverTimeouts = new webdriver.WebDriver.Timeouts(driver); + var promise: webdriver.promise.Promise; promise = timeouts.implicitlyWait(123); promise = timeouts.pageLoadTimeout(123); @@ -516,85 +624,92 @@ function TestWebDriverWindow() { withCapabilities(webdriver.Capabilities.chrome()). build(); - var window: webdriver.WebDriverWindow = webdriver.WebDriver.Window; - var promise: webdriver.promise.Promise; + var window: webdriver.WebDriverWindow = new webdriver.WebDriver.Window(driver); + var locationPromise: webdriver.promise.Promise; + var sizePromise: webdriver.promise.Promise; + var voidPromise: webdriver.promise.Promise; - promise = window.getPosition(); - promise = window.getSize(); - promise = window.maximize(); - promise = window.setPosition(12, 34); - promise = window.setSize(12, 34); + locationPromise = window.getPosition(); + sizePromise = window.getSize(); + voidPromise = window.maximize(); + voidPromise = window.setPosition(12, 34); + voidPromise = window.setSize(12, 34); } function TestWebDriver() { var session: webdriver.Session = new webdriver.Session('ABC', webdriver.Capabilities.android()); - var promise: webdriver.promise.Promise = new webdriver.promise.Promise(); - var executor: webdriver.CommandExecutor = new webdriver.FirefoxDomExecutor(); + var sessionPromise: webdriver.promise.Promise = new webdriver.promise.Promise(); + var executor: webdriver.CommandExecutor = executors.createExecutor("http://someserver"); var flow: webdriver.promise.ControlFlow = new webdriver.promise.ControlFlow(); var driver: webdriver.WebDriver = new webdriver.WebDriver(session, executor); driver = new webdriver.WebDriver(session, executor, flow); - driver = new webdriver.WebDriver(promise, executor); - driver = new webdriver.WebDriver(promise, executor, flow); + driver = new webdriver.WebDriver(sessionPromise, executor); + driver = new webdriver.WebDriver(sessionPromise, executor, flow); + + var voidPromise: webdriver.promise.Promise; + var stringPromise: webdriver.promise.Promise; + var booleanPromise: webdriver.promise.Promise; - // Call var actions: webdriver.ActionSequence = driver.actions(); - promise = driver.call(function(){}); - promise = driver.call(function(){ var d: any = this;}, driver); - promise = driver.call(function(a: number){}, driver, 1); - promise = driver.close(); + // call + stringPromise = driver.call(function(){}); + stringPromise = driver.call(function(){ var d: any = this;}, driver); + stringPromise = driver.call(function(a: number){}, driver, 1); + + voidPromise = driver.close(); flow = driver.controlFlow(); - // ExecuteAsyncScript - promise = driver.executeAsyncScript('function(){}'); - promise = driver.executeAsyncScript('function(){}', 1, 2, 3); - promise = driver.executeAsyncScript(function(){}); - promise = driver.executeAsyncScript(function(a: number){}, 1); + // executeAsyncScript + stringPromise = driver.executeAsyncScript('function(){}'); + stringPromise = driver.executeAsyncScript('function(){}', 1, 2, 3); + stringPromise = driver.executeAsyncScript(function(){}); + stringPromise = driver.executeAsyncScript(function(a: number){}, 1); - // ExecuteScript - promise = driver.executeScript('function(){}'); - promise = driver.executeScript('function(){}', 1, 2, 3); - promise = driver.executeScript(function(){}); - promise = driver.executeScript(function(a: number){}, 1); + // executeScript + stringPromise = driver.executeScript('function(){}'); + stringPromise = driver.executeScript('function(){}', 1, 2, 3); + stringPromise = driver.executeScript(function(){}); + stringPromise = driver.executeScript(function(a: number){}, 1); + // findElement var element: webdriver.WebElement; element = driver.findElement(webdriver.By.id('ABC')); element = driver.findElement({id: 'ABC'}); element = driver.findElement(webdriver.By.js('function(){}'), 1, 2, 3); element = driver.findElement({js: 'function(){}'}, 1, 2, 3); - promise = driver.findElements(webdriver.By.className('ABC')); - promise = driver.findElements({className: 'ABC'}); - promise = driver.findElements(webdriver.By.js('function(){}'), 1, 2, 3); - promise = driver.findElements({js: 'function(){}'}, 1, 2, 3); + // findElements + driver.findElements(webdriver.By.className('ABC')).then(function (elements: webdriver.WebElement[]) { }); + driver.findElements({ className: 'ABC' }).then(function (elements: webdriver.WebElement[]) { }); + driver.findElements(webdriver.By.js('function(){}'), 1, 2, 3).then(function (elements: webdriver.WebElement[]) { }); + driver.findElements({ js: 'function(){}' }, 1, 2, 3).then(function (elements: webdriver.WebElement[]) { }); - promise = driver.get('http://www.google.com'); - promise = driver.getAllWindowHandles(); - promise = driver.getCapabilities(); - promise = driver.getCurrentUrl(); - promise = driver.getPageSource() - promise = driver.getSession(); - promise = driver.getTitle(); - promise = driver.getWindowHandle(); + voidPromise = driver.get('http://www.google.com'); + driver.getAllWindowHandles().then(function (handles: string[]) { }); + driver.getCapabilities().then(function (caps: webdriver.Capabilities) { }); + stringPromise = driver.getCurrentUrl(); + stringPromise = driver.getPageSource() + driver.getSession().then(function (session: webdriver.Session) { });; + stringPromise = driver.getTitle(); + stringPromise = driver.getWindowHandle(); - promise = driver.isElementPresent(webdriver.By.className('ABC')); - promise = driver.isElementPresent({className: 'ABC'}); - promise = driver.isElementPresent(webdriver.By.js('function(){}'), 1, 2, 3); - promise = driver.isElementPresent({js: 'function(){}'}, 1, 2, 3); + booleanPromise = driver.isElementPresent(webdriver.By.className('ABC')); + booleanPromise = driver.isElementPresent({className: 'ABC'}); + booleanPromise = driver.isElementPresent(webdriver.By.js('function(){}'), 1, 2, 3); + booleanPromise = driver.isElementPresent({js: 'function(){}'}, 1, 2, 3); var options: webdriver.WebDriverOptions = driver.manage(); var navigation: webdriver.WebDriverNavigation = driver.navigate(); var locator: webdriver.WebDriverTargetLocator = driver.switchTo(); - promise = driver.quit(); - promise = driver.schedule(new webdriver.Command(webdriver.CommandName.CLICK), 'ABC'); - promise = driver.sleep(123); - promise = driver.takeScreenshot(); + voidPromise = driver.quit(); + voidPromise = driver.schedule(new webdriver.Command(webdriver.CommandName.CLICK), 'ABC'); + voidPromise = driver.sleep(123); + stringPromise = driver.takeScreenshot(); - promise = driver.wait(function() { return true; }, 123); - promise = driver.wait(function() { return true; }, 123, 'Message'); - promise = driver.wait(function() { return promise; }, 123); - promise = driver.wait(function() { return promise; }, 123, 'Message'); + booleanPromise = driver.wait(function() { return true; }, 123); + booleanPromise = driver.wait(function() { return true; }, 123, 'Message'); driver = webdriver.WebDriver.attachToSession(executor, 'ABC'); driver = webdriver.WebDriver.createSession(executor, webdriver.Capabilities.android()); @@ -606,55 +721,75 @@ function TestWebElement() { build(); var element: webdriver.WebElement; - var promise: webdriver.promise.Promise = new webdriver.promise.Promise(); - element = new webdriver.WebElement(driver, 'ID'); - element = new webdriver.WebElement(driver, promise); + element = new webdriver.WebElement(driver, { ELEMENT: 'ID' }); + element = new webdriver.WebElement(driver, new webdriver.promise.Promise()); - var deferred: webdriver.promise.Deferred = element; + var voidPromise: webdriver.promise.Promise; + var stringPromise: webdriver.promise.Promise; + var booleanPromise: webdriver.promise.Promise; - promise = element.clear(); - promise = element.click(); + voidPromise = element.clear(); + voidPromise = element.click(); element = element.findElement(webdriver.By.id('ABC')); element = element.findElement({id: 'ABC'}); - element = element.findElement(webdriver.By.js('function(){}'), 1, 2, 3); - element = element.findElement({js: 'function(){}'}, 1, 2, 3); - promise = element.findElements(webdriver.By.className('ABC')); - promise = element.findElements({className: 'ABC'}); - promise = element.findElements(webdriver.By.js('function(){}'), 1, 2, 3); - promise = element.findElements({js: 'function(){}'}, 1, 2, 3); + element.findElements(webdriver.By.className('ABC')).then(function (elements: webdriver.WebElement[]) { }); + element.findElements({ className: 'ABC' }).then(function (elements: webdriver.WebElement[]) { }); - promise = element.isElementPresent(webdriver.By.className('ABC')); - promise = element.isElementPresent({className: 'ABC'}); - promise = element.isElementPresent(webdriver.By.js('function(){}'), 1, 2, 3); - promise = element.isElementPresent({js: 'function(){}'}, 1, 2, 3); + booleanPromise = element.isElementPresent(webdriver.By.className('ABC')); + booleanPromise = element.isElementPresent({className: 'ABC'}); - promise = element.getAttribute('class'); - promise = element.getCssValue('display'); + stringPromise = element.getAttribute('class'); + stringPromise = element.getCssValue('display'); driver = element.getDriver(); - promise = element.getInnerHtml(); - promise = element.getLocation(); - promise = element.getOuterHtml(); - promise = element.getSize(); - promise = element.getTagName(); - promise = element.getText(); - promise = element.isDisplayed(); - promise = element.isEnabled(); - promise = element.isSelected(); - promise = element.sendKeys('A', 'B', 'C'); - promise = element.submit(); - promise = element.toWireValue(); + stringPromise = element.getInnerHtml(); + element.getLocation().then(function (location: webdriver.ILocation) { }); + stringPromise = element.getOuterHtml(); + element.getSize().then(function (size: webdriver.ISize) { }); + stringPromise = element.getTagName(); + stringPromise = element.getText(); + booleanPromise = element.isDisplayed(); + booleanPromise = element.isEnabled(); + booleanPromise = element.isSelected(); + voidPromise = element.sendKeys('A', 'B', 'C'); + voidPromise = element.submit(); + element.getId().then(function (id: webdriver.IWebElementId) { }); - promise = webdriver.WebElement.equals(element, new webdriver.WebElement(driver, 'ID2')); + booleanPromise = webdriver.WebElement.equals(element, new webdriver.WebElement(driver, { ELEMENT: 'ID2' })); var key: string = webdriver.WebElement.ELEMENT_KEY; } +function TestWebElementPromise() { + var driver: webdriver.WebDriver = new webdriver.Builder(). + withCapabilities(webdriver.Capabilities.chrome()). + build(); + + var elementPromise: webdriver.WebElementPromise = driver.findElement(webdriver.By.id('id')); + + elementPromise.cancel(); + elementPromise.cancel('reason'); + + var bool: boolean = elementPromise.isPending(); + + elementPromise.then(); + elementPromise.then(function (element: webdriver.WebElement) { }); + elementPromise.then(function (element: webdriver.WebElement) { }, function (error: any) { }); + elementPromise.then(function (element: webdriver.WebElement) { }, function (error: any) { }).then(function (result: string) { }); + + elementPromise.thenCatch(function (error: any) { }).then(function (value: any) { }); + + elementPromise.thenFinally(function () { }); +} + function TestLogging() { - webdriver.logging.Preferences['name'] = 'ABC'; - var level: webdriver.logging.Level = webdriver.logging.getLevel('OFF'); + var preferences: webdriver.logging.Preferences = new webdriver.logging.Preferences(); + preferences.setLevel(webdriver.logging.Type.BROWSER, webdriver.logging.Level.ALL); + var prefs: any = preferences.toJSON(); + + var level: webdriver.logging.ILevel = webdriver.logging.getLevel('OFF'); level = webdriver.logging.getLevel(1); level = webdriver.logging.Level.ALL; @@ -667,13 +802,6 @@ function TestLogging() { var name: string = level.name; var value: number = level.value; - name = webdriver.logging.LevelName.ALL; - name = webdriver.logging.LevelName.DEBUG; - name = webdriver.logging.LevelName.INFO; - name = webdriver.logging.LevelName.OFF; - name = webdriver.logging.LevelName.SEVERE; - name = webdriver.logging.LevelName.WARNING; - var type: string; type = webdriver.logging.Type.BROWSER; type = webdriver.logging.Type.CLIENT; @@ -702,47 +830,132 @@ function TestLoggingEntry() { entry = webdriver.logging.Entry.fromClosureLogRecord({}, webdriver.logging.Type.DRIVER); } -function TestProcess() { - var isNative: boolean = webdriver.process.isNative(); - var value: string; +function TestPromiseModule() { + var cancellationError: webdriver.promise.CancellationError = new webdriver.promise.CancellationError(); + cancellationError = new webdriver.promise.CancellationError("message"); + var str: string = cancellationError.message; + str = cancellationError.name; - value = webdriver.process.getEnv('name'); - value = webdriver.process.getEnv('name', 'default'); + var stringPromise: webdriver.promise.Promise = new webdriver.promise.Promise(); + var numberPromise: webdriver.promise.Promise; + var booleanPromise: webdriver.promise.Promise; + var voidPromise: webdriver.promise.Promise; - webdriver.process.setEnv('name', 'value'); - webdriver.process.setEnv('name', 123); -} + webdriver.promise.all([new webdriver.promise.Promise()]).then(function (values: string[]) { }); -function TestPromise() { - var promise: webdriver.promise.Promise = new webdriver.promise.Promise(); + webdriver.promise.asap('abc', function(value: any){ return true; }); + webdriver.promise.asap('abc', function(value: any){}, function(err: any) { return 'ABC'; }); - webdriver.promise.asap(promise, function(value: any){ return true; }); - webdriver.promise.asap(promise, function(value: any){}, function(err: any) { return 'ABC'; }); + stringPromise = webdriver.promise.checkedNodeCall(function(err: any, value: any) { return 'abc'; }); - promise = webdriver.promise.checkedNodeCall(function(err: any, value: any) { return 123; }); + webdriver.promise.consume(function () { + return 5; + }).then(function (value: number) { }); + webdriver.promise.consume(function () { + return 5; + }, this).then(function (value: number) { }); + webdriver.promise.consume(function (a: number, b: number, c: number) { + return 5; + }, this, 1, 2, 3).then(function (value: number) { }); + + var numbersPromise: webdriver.promise.Promise = webdriver.promise.filter([1, 2, 3], function (el: number, index: number, arr: number[]) { + return true; + }); + numbersPromise = webdriver.promise.filter([1, 2, 3], function (el: number, index: number, arr: number[]) { + return true; + }, this); + numbersPromise = webdriver.promise.filter(numbersPromise, function (el: number, index: number, arr: number[]) { + return true; + }); + numbersPromise = webdriver.promise.filter(numbersPromise, function (el: number, index: number, arr: number[]) { + return true; + }, this); + + numbersPromise = webdriver.promise.map([1, 2, 3], function (el: number, index: number, arr: number[]) { + return true; + }); + numbersPromise = webdriver.promise.map([1, 2, 3], function (el: number, index: number, arr: number[]) { + return true; + }, this); + numbersPromise = webdriver.promise.map(numbersPromise, function (el: number, index: number, arr: number[]) { + return true; + }); + numbersPromise = webdriver.promise.map(numbersPromise, function (el: number, index: number, arr: number[]) { + return true; + }, this); var flow: webdriver.promise.ControlFlow = webdriver.promise.controlFlow(); - promise = webdriver.promise.createFlow(function(newFlow: webdriver.promise.ControlFlow) { }); + stringPromise = webdriver.promise.createFlow(function(newFlow: webdriver.promise.ControlFlow) { return 'ABC' }); - var deferred: webdriver.promise.Deferred; - deferred = webdriver.promise.defer(function() {}); - deferred = webdriver.promise.defer(function(reason?: any) {}); + var deferred: webdriver.promise.Deferred; + deferred = webdriver.promise.defer(); + deferred = webdriver.promise.defer(); - promise = webdriver.promise.delayed(123); + stringPromise = deferred.promise; - promise = webdriver.promise.fulfilled(); - promise = webdriver.promise.fulfilled({a: 123}); + deferred.fulfill('ABC'); + deferred.reject('error'); - promise = webdriver.promise.fullyResolved({a: 123}); + voidPromise = webdriver.promise.delayed(123); + voidPromise = webdriver.promise.fulfilled(); + stringPromise = webdriver.promise.fulfilled('abc'); + + stringPromise = webdriver.promise.fullyResolved('abc'); + + var bool: boolean = webdriver.promise.isGenerator(function () { }); var isPromise: boolean = webdriver.promise.isPromise('ABC'); - promise = webdriver.promise.rejected({a: 123}); + voidPromise = webdriver.promise.rejected({a: 123}); webdriver.promise.setDefaultFlow(new webdriver.promise.ControlFlow()); - promise = webdriver.promise.when(promise, function(value: any) { return 123; }, function(err: Error) { return 123; }); + numberPromise = webdriver.promise.when('abc', function(value: any) { return 123; }, function(err: Error) { return 123; }); +} + +function TestStacktraceModule() { + var bool: boolean = webdriver.stacktrace.BROWSER_SUPPORTED; + + var frame: webdriver.stacktrace.Frame = new webdriver.stacktrace.Frame(); + var baseFrame: webdriver.stacktrace.Frame = frame; + + var snapshot: webdriver.stacktrace.Snapshot = new webdriver.stacktrace.Snapshot(); + var baseSnapshot: webdriver.stacktrace.Snapshot = snapshot; + + var err: Error = webdriver.stacktrace.format(new Error("Error")); + var frames: webdriver.stacktrace.Frame[] = webdriver.stacktrace.get(); +} + +function TestUntilModule() { + var driver: webdriver.WebDriver = new webdriver.Builder(). + withCapabilities(webdriver.Capabilities.chrome()). + build(); + + var conditionB: webdriver.until.Condition = new webdriver.until.Condition('message', function (driver: webdriver.WebDriver) { return true; }); + var conditionBBase: webdriver.until.Condition = conditionB; + var conditionWebElement: webdriver.until.Condition; + var conditionWebElements: webdriver.until.Condition; + + conditionB = webdriver.until.ableToSwitchToFrame(5); + var conditionAlert: webdriver.until.Condition = webdriver.until.alertIsPresent(); + var el: webdriver.WebElement = driver.findElement(webdriver.By.id('id')); + conditionB = webdriver.until.elementIsDisabled(el); + conditionB = webdriver.until.elementIsEnabled(el); + conditionB = webdriver.until.elementIsNotSelected(el); + conditionB = webdriver.until.elementIsNotVisible(el); + conditionB = webdriver.until.elementIsSelected(el); + conditionB = webdriver.until.elementIsVisible(el); + conditionB = webdriver.until.elementTextContains(el, 'text'); + conditionB = webdriver.until.elementTextIs(el, 'text'); + conditionB = webdriver.until.elementTextMatches(el, /text/); + conditionB = webdriver.until.stalenessOf(el); + conditionB = webdriver.until.titleContains('text'); + conditionB = webdriver.until.titleIs('text'); + conditionB = webdriver.until.titleMatches(/text/); + + conditionWebElement = webdriver.until.elementLocated(webdriver.By.id('id')); + conditionWebElements = webdriver.until.elementsLocated(webdriver.By.className('class')); } function TestControlFlow() { @@ -758,19 +971,20 @@ function TestControlFlow() { var eventType: string; eventType = webdriver.promise.ControlFlow.EventType.IDLE; + eventType = webdriver.promise.ControlFlow.EventType.RESET; eventType = webdriver.promise.ControlFlow.EventType.SCHEDULE_TASK; eventType = webdriver.promise.ControlFlow.EventType.UNCAUGHT_EXCEPTION; var e: any = flow.annotateError(new Error('Error')); - var promise: webdriver.promise.Promise; + var stringPromise: webdriver.promise.Promise; - promise = flow.await(promise); + stringPromise = flow.await(stringPromise); flow.clearHistory(); - promise = flow.execute(function() { return promise; }); - promise = flow.execute(function() { return promise; }, 'Description'); + stringPromise = flow.execute(function() { return stringPromise; }); + stringPromise = flow.execute(function() { return stringPromise; }, 'Description'); var history: string[] = flow.getHistory(); @@ -778,12 +992,12 @@ function TestControlFlow() { flow.reset(); - promise = flow.timeout(123); - promise = flow.timeout(123, 'Description'); + var voidPromise: webdriver.promise.Promise = flow.timeout(123); + voidPromise = flow.timeout(123, 'Description'); - promise = flow.wait(function() { return true; }, 123); - promise = flow.wait(function() { return true; }, 123, 'Timeout Message'); - promise = flow.wait(function() { return promise; }, 123, 'Timeout Message'); + voidPromise = flow.wait(function() { return true; }, 123); + voidPromise = flow.wait(function() { return true; }, 123, 'Timeout Message'); + voidPromise = flow.wait(function() { return stringPromise; }, 123, 'Timeout Message'); var timer: webdriver.promise.IControlFlowTimer = flow.timer; @@ -792,53 +1006,55 @@ function TestControlFlow() { } function TestDeferred() { - var deferred: webdriver.promise.Deferred; + var deferred: webdriver.promise.Deferred; - deferred = new webdriver.promise.Deferred(); - deferred = new webdriver.promise.Deferred(function() {}); - deferred = new webdriver.promise.Deferred(function(reason: any) { }); - deferred = new webdriver.promise.Deferred(function() {}, new webdriver.promise.ControlFlow()); + deferred = new webdriver.promise.Deferred(); + deferred = new webdriver.promise.Deferred(new webdriver.promise.ControlFlow()); - var promise: webdriver.promise.Promise = deferred; + var promise: webdriver.promise.Promise = deferred.promise; deferred.errback(new Error('Error')); deferred.errback('Error'); - deferred.fulfill(123); + deferred.fulfill('abc'); deferred.reject(new Error('Error')); deferred.reject('Error'); deferred.removeAll(); - - promise = deferred.promise; } function TestPromiseClass() { - var promise: webdriver.promise.Promise = new webdriver.promise.Promise(); + var promise: webdriver.promise.Promise = new webdriver.promise.Promise(); - var obj = { - a: 5 - } - - promise = promise.addBoth(function( a: any ) { }); - promise = promise.addBoth(function( a: any ) { return 123; }); - promise = promise.addBoth(function( a: any ) { }, obj); - - promise = promise.addCallback(function( a: any ) { }); - promise = promise.addCallback(function( a: any ) { return 123; }); - promise = promise.addCallback(function( a: any ) { }, obj); - - promise = promise.addErrback(function( e: any ) { }); - promise = promise.addErrback(function( e: any ) { return 123; }); - promise = promise.addErrback(function( e: any ) { }, obj); - - promise.cancel(obj); + promise.cancel('Abort'); var isPending: boolean = promise.isPending(); promise = promise.then(); - promise = promise.then(function( a: any ) { }); - promise = promise.then(function( a: any ) { return 123; }); - promise = promise.then(function( a: any ) {}, function( e: any) {}); - promise = promise.then(function( a: any ) {}, function( e: any) { return 123; }); + promise = promise.then(function( a: string ) { }); + promise = promise.then(function( a: string ) { return 'cde'; }); + promise = promise.then(function( a: string ) {}, function( e: any) {}); + promise = promise.then(function (a: string) { }, function (e: any) { return 123; }); + + promise = promise.thenCatch(function (error: any) { }); + + promise.thenFinally(function () { }); +} + +function TestThenableClass() { + var thenable: webdriver.promise.Thenable = new webdriver.promise.Thenable(); + + thenable.cancel('Abort'); + + var isPending: boolean = thenable.isPending(); + + thenable = thenable.then(); + thenable = thenable.then(function (a: string) { }); + thenable = thenable.then(function (a: string) { return 'cde'; }); + thenable = thenable.then(function (a: string) { }, function (e: any) { }); + thenable = thenable.then(function (a: string) { }, function (e: any) { return 123; }); + + thenable = thenable.thenCatch(function (error: any) { }); + + thenable.thenFinally(function () { }); } function TestErrorCode() { @@ -914,4 +1130,32 @@ function TestError() { state = webdriver.error.Error.State.UNKNOWN_COMMAND; state = webdriver.error.Error.State.UNKNOWN_ERROR; state = webdriver.error.Error.State.UNSUPPORTED_OPERATION; +} + +function TestTestingModule() { + testing.before(function () { + }); + + testing.beforeEach(function () { + }); + + testing.describe("My test suite", function () { + testing.it("My test", function () { + }); + + testing.iit("My exclusive test.", function () { + }); + + }); + + testing.xdescribe("My disabled suite", function () { + testing.xit("My disabled test.", function () { + }); + }); + + testing.after(function () { + }); + + testing.afterEach(function () { + }); } \ No newline at end of file diff --git a/selenium-webdriver/selenium-webdriver.d.ts b/selenium-webdriver/selenium-webdriver.d.ts index a4d1017aa5..a1b777d596 100644 --- a/selenium-webdriver/selenium-webdriver.d.ts +++ b/selenium-webdriver/selenium-webdriver.d.ts @@ -1,699 +1,560 @@ -// Type definitions for Selenium WebDriverJS 2.39.0 +// Type definitions for Selenium WebDriverJS 2.44.0 // Project: https://code.google.com/p/selenium/ // Definitions by: Bill Armstrong // Definitions: https://github.com/borisyankov/DefinitelyTyped +declare module chrome { + /** + * Creates a new WebDriver client for Chrome. + * + * @extends {webdriver.WebDriver} + */ + class Driver extends webdriver.WebDriver { + /** + * @param {(webdriver.Capabilities|Options)=} opt_config The configuration + * options. + * @param {remote.DriverService=} opt_service The session to use; will use + * the {@link getDefaultService default service} by default. + * @param {webdriver.promise.ControlFlow=} opt_flow The control flow to use, or + * {@code null} to use the currently active flow. + * @constructor + */ + constructor(opt_config?: webdriver.Capabilities, opt_service?: any, opt_flow?: webdriver.promise.ControlFlow); + constructor(opt_config?: Options, opt_service?: any, opt_flow?: webdriver.promise.ControlFlow); + } + + interface IOptionsValues { + args: string[]; + binary?: string; + detach: boolean; + extensions: string[]; + localState?: any; + logFile?: string; + prefs?: any; + } + + /** + * Class for managing ChromeDriver specific options. + */ + class Options { + /** + * @constructor + */ + constructor(); + + /** + * Extracts the ChromeDriver specific options from the given capabilities + * object. + * @param {!webdriver.Capabilities} capabilities The capabilities object. + * @return {!Options} The ChromeDriver options. + */ + static fromCapabilities(capabilities: webdriver.Capabilities): Options; + + + /** + * Add additional command line arguments to use when launching the Chrome + * browser. Each argument may be specified with or without the "--" prefix + * (e.g. "--foo" and "foo"). Arguments with an associated value should be + * delimited by an "=": "foo=bar". + * @param {...(string|!Array.)} var_args The arguments to add. + * @return {!Options} A self reference. + */ + addArguments(...var_args: string[]): Options; + + + /** + * Add additional extensions to install when launching Chrome. Each extension + * should be specified as the path to the packed CRX file, or a Buffer for an + * extension. + * @param {...(string|!Buffer|!Array.<(string|!Buffer)>)} var_args The + * extensions to add. + * @return {!Options} A self reference. + */ + addExtensions(...var_args: any[]): Options; + + + /** + * Sets the path to the Chrome binary to use. On Mac OS X, this path should + * reference the actual Chrome executable, not just the application binary + * (e.g. "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"). + * + * The binary path be absolute or relative to the chromedriver server + * executable, but it must exist on the machine that will launch Chrome. + * + * @param {string} path The path to the Chrome binary to use. + * @return {!Options} A self reference. + */ + setChromeBinaryPath(path: string): Options; + + + /** + * Sets whether to leave the started Chrome browser running if the controlling + * ChromeDriver service is killed before {@link webdriver.WebDriver#quit()} is + * called. + * @param {boolean} detach Whether to leave the browser running if the + * chromedriver service is killed before the session. + * @return {!Options} A self reference. + */ + detachDriver(detach: boolean): Options; + + + /** + * Sets the user preferences for Chrome's user profile. See the "Preferences" + * file in Chrome's user data directory for examples. + * @param {!Object} prefs Dictionary of user preferences to use. + * @return {!Options} A self reference. + */ + setUserPreferences(prefs: any): Options; + + + /** + * Sets the logging preferences for the new session. + * @param {!webdriver.logging.Preferences} prefs The logging preferences. + * @return {!Options} A self reference. + */ + setLoggingPrefs(prefs: webdriver.logging.Preferences): Options; + + + /** + * Sets preferences for the "Local State" file in Chrome's user data + * directory. + * @param {!Object} state Dictionary of local state preferences. + * @return {!Options} A self reference. + */ + setLocalState(state: any): Options; + + + /** + * Sets the path to Chrome's log file. This path should exist on the machine + * that will launch Chrome. + * @param {string} path Path to the log file to use. + * @return {!Options} A self reference. + */ + setChromeLogFile(path: string): Options; + + + /** + * Sets the proxy settings for the new session. + * @param {webdriver.ProxyConfig} proxy The proxy configuration to use. + * @return {!Options} A self reference. + */ + setProxy(proxy: webdriver.ProxyConfig): Options; + + + /** + * Converts this options instance to a {@link webdriver.Capabilities} object. + * @param {webdriver.Capabilities=} opt_capabilities The capabilities to merge + * these options into, if any. + * @return {!webdriver.Capabilities} The capabilities. + */ + toCapabilities(opt_capabilities?: webdriver.Capabilities): webdriver.Capabilities; + + + /** + * Converts this instance to its JSON wire protocol representation. Note this + * function is an implementation not intended for general use. + * @return {{args: !Array., + * binary: (string|undefined), + * detach: boolean, + * extensions: !Array., + * localState: (Object|undefined), + * logFile: (string|undefined), + * prefs: (Object|undefined)}} The JSON wire protocol representation + * of this instance. + */ + toJSON(): IOptionsValues; + } + + /** + * Creates {@link remote.DriverService} instances that manage a ChromeDriver + * server. + */ + class ServiceBuilder { + /** + * @param {string=} opt_exe Path to the server executable to use. If omitted, + * the builder will attempt to locate the chromedriver on the current + * PATH. + * @throws {Error} If provided executable does not exist, or the chromedriver + * cannot be found on the PATH. + * @constructor + */ + constructor(opt_exe?: string); + + /** + * Sets the port to start the ChromeDriver on. + * @param {number} port The port to use, or 0 for any free port. + * @return {!ServiceBuilder} A self reference. + * @throws {Error} If the port is invalid. + */ + usingPort(port: number): ServiceBuilder; + + + /** + * Sets the path of the log file the driver should log to. If a log file is + * not specified, the driver will log to stderr. + * @param {string} path Path of the log file to use. + * @return {!ServiceBuilder} A self reference. + */ + loggingTo(path: string): ServiceBuilder; + + + /** + * Enables verbose logging. + * @return {!ServiceBuilder} A self reference. + */ + enableVerboseLogging(): ServiceBuilder; + + + /** + * Sets the number of threads the driver should use to manage HTTP requests. + * By default, the driver will use 4 threads. + * @param {number} n The number of threads to use. + * @return {!ServiceBuilder} A self reference. + */ + setNumHttpThreads(n: number): ServiceBuilder; + + + /** + * Sets the base path for WebDriver REST commands (e.g. "/wd/hub"). + * By default, the driver will accept commands relative to "/". + * @param {string} path The base path to use. + * @return {!ServiceBuilder} A self reference. + */ + setUrlBasePath(path: string): ServiceBuilder; + + + /** + * Defines the stdio configuration for the driver service. See + * {@code child_process.spawn} for more information. + * @param {(string|!Array.)} config The + * configuration to use. + * @return {!ServiceBuilder} A self reference. + */ + setStdio(config: string): ServiceBuilder; + setStdio(config: any[]): ServiceBuilder; + + + /** + * Defines the environment to start the server under. This settings will be + * inherited by every browser session started by the server. + * @param {!Object.} env The environment to use. + * @return {!ServiceBuilder} A self reference. + */ + withEnvironment(env: { [key: string]: string }): ServiceBuilder; + + + /** + * Creates a new DriverService using this instance's current configuration. + * @return {remote.DriverService} A new driver service using this instance's + * current configuration. + * @throws {Error} If the driver exectuable was not specified and a default + * could not be found on the current PATH. + */ + build(): any; + } + + /** + * Returns the default ChromeDriver service. If such a service has not been + * configured, one will be constructed using the default configuration for + * a ChromeDriver executable found on the system PATH. + * @return {!remote.DriverService} The default ChromeDriver service. + */ + function getDefaultService(): any; + + /** + * Sets the default service to use for new ChromeDriver instances. + * @param {!remote.DriverService} service The service to use. + * @throws {Error} If the default service is currently running. + */ + function setDefaultService(service: any): void; +} + +declare module firefox { + /** + * Manages a Firefox subprocess configured for use with WebDriver. + */ + class Binary { + /** + * @param {string=} opt_exe Path to the Firefox binary to use. If not + * specified, will attempt to locate Firefox on the current system. + * @constructor + */ + constructor(opt_exe?: string); + + /** + * Add arguments to the command line used to start Firefox. + * @param {...(string|!Array.)} var_args Either the arguments to add as + * varargs, or the arguments as an array. + */ + addArguments(...var_args: string[]): void; + + + /** + * Launches Firefox and eturns a promise that will be fulfilled when the process + * terminates. + * @param {string} profile Path to the profile directory to use. + * @return {!promise.Promise.} A promise for the process result. + * @throws {Error} If this instance has already been started. + */ + launch(profile: string): webdriver.promise.Promise; + + + /** + * Kills the managed Firefox process. + * @return {!promise.Promise} A promise for when the process has terminated. + */ + kill(): webdriver.promise.Promise; + } + + /** + * A WebDriver client for Firefox. + * + * @extends {webdriver.WebDriver} + */ + class Driver extends webdriver.WebDriver { + /** + * @param {(Options|webdriver.Capabilities|Object)=} opt_config The + * configuration options for this driver, specified as either an + * {@link Options} or {@link webdriver.Capabilities}, or as a raw hash + * object. + * @param {webdriver.promise.ControlFlow=} opt_flow The flow to + * schedule commands through. Defaults to the active flow object. + * @constructor + */ + constructor(opt_config?: webdriver.Capabilities, opt_flow?: webdriver.promise.ControlFlow); + constructor(opt_config?: any, opt_flow?: webdriver.promise.ControlFlow); + } + + /** + * Configuration options for the FirefoxDriver. + */ + class Options { + /** + * @constructor + */ + constructor(); + + /** + * Sets the profile to use. The profile may be specified as a + * {@link Profile} object or as the path to an existing Firefox profile to use + * as a template. + * + * @param {(string|!Profile)} profile The profile to use. + * @return {!Options} A self reference. + */ + setProfile(profile: string): Options; + setProfile(profile: Profile): Options; + + + /** + * Sets the binary to use. The binary may be specified as the path to a Firefox + * executable, or as a {@link Binary} object. + * + * @param {(string|!Binary)} binary The binary to use. + * @return {!Options} A self reference. + */ + setBinary(binary: string): Options; + setBinary(binary: Binary): Options; + + + /** + * Sets the logging preferences for the new session. + * @param {webdriver.logging.Preferences} prefs The logging preferences. + * @return {!Options} A self reference. + */ + setLoggingPreferences(prefs: webdriver.logging.Preferences): Options; + + + /** + * Sets the proxy to use. + * + * @param {webdriver.ProxyConfig} proxy The proxy configuration to use. + * @return {!Options} A self reference. + */ + setProxy(proxy: webdriver.ProxyConfig): Options; + + + /** + * Converts these options to a {@link webdriver.Capabilities} instance. + * + * @return {!webdriver.Capabilities} A new capabilities object. + */ + toCapabilities(opt_remote?: any): webdriver.Capabilities; + } + + /** + * Models a Firefox proifle directory for use with the FirefoxDriver. The + * {@code Proifle} directory uses an in-memory model until {@link #writeToDisk} + * is called. + */ + class Profile { + /** + * @param {string=} opt_dir Path to an existing Firefox profile directory to + * use a template for this profile. If not specified, a blank profile will + * be used. + * @constructor + */ + constructor(opt_dir?: string); + + /** + * Registers an extension to be included with this profile. + * @param {string} extension Path to the extension to include, as either an + * unpacked extension directory or the path to a xpi file. + */ + addExtension(extension: string): void; + + + /** + * Sets a desired preference for this profile. + * @param {string} key The preference key. + * @param {(string|number|boolean)} value The preference value. + * @throws {Error} If attempting to set a frozen preference. + */ + setPreference(key: string, value: string): void; + setPreference(key: string, value: number): void; + setPreference(key: string, value: boolean): void; + + + /** + * Returns the currently configured value of a profile preference. This does + * not include any defaults defined in the profile's template directory user.js + * file (if a template were specified on construction). + * @param {string} key The desired preference. + * @return {(string|number|boolean|undefined)} The current value of the + * requested preference. + */ + getPreference(key: string): any; + + + /** + * @return {number} The port this profile is currently configured to use, or + * 0 if the port will be selected at random when the profile is written + * to disk. + */ + getPort(): number; + + + /** + * Sets the port to use for the WebDriver extension loaded by this profile. + * @param {number} port The desired port, or 0 to use any free port. + */ + setPort(port: number): void; + + + /** + * @return {boolean} Whether the FirefoxDriver is configured to automatically + * accept untrusted SSL certificates. + */ + acceptUntrustedCerts(): boolean; + + + /** + * Sets whether the FirefoxDriver should automatically accept untrusted SSL + * certificates. + * @param {boolean} value . + */ + setAcceptUntrustedCerts(value: boolean): void; + + + /** + * Sets whether to assume untrusted certificates come from untrusted issuers. + * @param {boolean} value . + */ + setAssumeUntrustedCertIssuer(value: boolean): void; + + + /** + * @return {boolean} Whether to assume untrusted certs come from untrusted + * issuers. + */ + assumeUntrustedCertIssuer(): boolean; + + + /** + * Sets whether to use native events with this profile. + * @param {boolean} enabled . + */ + setNativeEventsEnabled(enabled: boolean): void; + + + /** + * Returns whether native events are enabled in this profile. + * @return {boolean} . + */ + nativeEventsEnabled(): boolean; + + + /** + * Writes this profile to disk. + * @param {boolean=} opt_excludeWebDriverExt Whether to exclude the WebDriver + * extension from the generated profile. Used to reduce the size of an + * {@link #encode() encoded profile} since the server will always install + * the extension itself. + * @return {!promise.Promise.} A promise for the path to the new + * profile directory. + */ + writeToDisk(opt_excludeWebDriverExt?: boolean): webdriver.promise.Promise; + + + /** + * Encodes this profile as a zipped, base64 encoded directory. + * @return {!promise.Promise.} A promise for the encoded profile. + */ + encode(): webdriver.promise.Promise; + } +} + +declare module executors { + /** + * Creates a command executor that uses WebDriver's JSON wire protocol. + * @param url The server's URL, or a promise that will resolve to that URL. + * @returns {!webdriver.CommandExecutor} The new command executor. + */ + function createExecutor(url: string): webdriver.CommandExecutor; + function createExecutor(url: webdriver.promise.Promise): webdriver.CommandExecutor; +} + declare module webdriver { - module logging { - - /** - * A hash describing log preferences. - * @typedef {Object.} - */ - var Preferences: any; - - /** - * Log level names from WebDriver's JSON wire protocol. - * @enum {string} - */ - class LevelName { - static ALL: string; - static DEBUG: string; - static INFO: string; - static WARNING: string; - static SEVERE: string; - static OFF: string; - } - - /** - * Common log types. - * @enum {string} - */ - class Type { - /** Logs originating from the browser. */ - static BROWSER: string; - /** Logs from a WebDriver client. */ - static CLIENT: string; - /** Logs from a WebDriver implementation. */ - static DRIVER: string; - /** Logs related to performance. */ - static PERFORMANCE: string; - /** Logs from the remote server. */ - static SERVER: string; - } - - /** - * Logging levels. - * @enum {{value: number, name: webdriver.logging.LevelName}} - */ - class Level { - //region Static Properties - - static ALL: Level; - static DEBUG: Level; - static INFO: Level; - static WARNING: Level; - static SEVERE: Level; - static OFF: Level; - - //endregion - - //region Properties - - value: number; - name: string; - - //endregion - } - - /** - * Converts a level name or value to a {@link webdriver.logging.Level} value. - * If the name/value is not recognized, {@link webdriver.logging.Level.ALL} - * will be returned. - * @param {(number|string)} nameOrValue The log level name, or value, to - * convert . - * @return {!webdriver.logging.Level} The converted level. - */ - function getLevel(nameOrValue: string): webdriver.logging.Level; - function getLevel(nameOrValue: number): webdriver.logging.Level; - - /** - * A single log entry. - */ - class Entry { - - //region Constructors - - /** - * @param {(!webdriver.logging.Level|string)} level The entry level. - * @param {string} message The log message. - * @param {number=} opt_timestamp The time this entry was generated, in - * milliseconds since 0:00:00, January 1, 1970 UTC. If omitted, the - * current time will be used. - * @param {string=} opt_type The log type, if known. - * @constructor - */ - constructor(level: webdriver.logging.Level, message: string, opt_timestamp?:number, opt_type?:string); - constructor(level: string, message: string, opt_timestamp?:number, opt_type?:string); - - //endregion - - //region Public Properties - - /** @type {!webdriver.logging.Level} */ - level: webdriver.logging.Level; - - /** @type {string} */ - message: string; - - /** @type {number} */ - timestamp: number; - - /** @type {string} */ - type: string; - - //endregion - - //region Static Methods - - /** - * Converts a {@link goog.debug.LogRecord} into a - * {@link webdriver.logging.Entry}. - * @param {!goog.debug.LogRecord} logRecord The record to convert. - * @param {string=} opt_type The log type. - * @return {!webdriver.logging.Entry} The converted entry. - */ - static fromClosureLogRecord(logRecord: any, opt_type?:string): webdriver.logging.Entry; - - //endregion - - //region Methods - - /** - * @return {{level: string, message: string, timestamp: number, - * type: string}} The JSON representation of this entry. - */ - toJSON(): webdriver.logging.Level; - - //endregion - } - } - - module promise { - - //region Functions - - /** - * @return {!webdriver.promise.ControlFlow} The currently active control flow. - */ - function controlFlow(): webdriver.promise.ControlFlow; - - /** - * Creates a new control flow. The provided callback will be invoked as the - * first task within the new flow, with the flow as its sole argument. Returns - * a promise that resolves to the callback result. - * @param {function(!webdriver.promise.ControlFlow)} callback The entry point - * to the newly created flow. - * @return {!webdriver.promise.Promise} A promise that resolves to the callback - * result. - */ - function createFlow(callback: (flow: webdriver.promise.ControlFlow) => any): webdriver.promise.Promise; - - /** - * Determines whether a {@code value} should be treated as a promise. - * Any object whose "then" property is a function will be considered a promise. - * - * @param {*} value The value to test. - * @return {boolean} Whether the value is a promise. - */ - function isPromise(value: any): boolean; - - /** - * Creates a promise that will be resolved at a set time in the future. - * @param {number} ms The amount of time, in milliseconds, to wait before - * resolving the promise. - * @return {!webdriver.promise.Promise} The promise. - */ - function delayed(ms: number): webdriver.promise.Promise; - - /** - * Creates a new deferred object. - * @param {Function=} opt_canceller Function to call when cancelling the - * computation of this instance's value. - * @return {!webdriver.promise.Deferred} The new deferred object. - */ - function defer(opt_canceller?: any): webdriver.promise.Deferred; - - /** - * Creates a promise that has been resolved with the given value. - * @param {*=} opt_value The resolved value. - * @return {!webdriver.promise.Promise} The resolved promise. - */ - function fulfilled(opt_value?: any): webdriver.promise.Promise; - - /** - * Creates a promise that has been rejected with the given reason. - * @param {*=} opt_reason The rejection reason; may be any value, but is - * usually an Error or a string. - * @return {!webdriver.promise.Promise} The rejected promise. - */ - function rejected(opt_reason?: any): webdriver.promise.Promise; - - /** - * Wraps a function that is assumed to be a node-style callback as its final - * argument. This callback takes two arguments: an error value (which will be - * null if the call succeeded), and the success value as the second argument. - * If the call fails, the returned promise will be rejected, otherwise it will - * be resolved with the result. - * @param {!Function} fn The function to wrap. - * @return {!webdriver.promise.Promise} A promise that will be resolved with the - * result of the provided function's callback. - */ - function checkedNodeCall(fn: (error: any, value: any) => any): webdriver.promise.Promise; - - /** - * Registers an observer on a promised {@code value}, returning a new promise - * that will be resolved when the value is. If {@code value} is not a promise, - * then the return promise will be immediately resolved. - * @param {*} value The value to observe. - * @param {Function=} opt_callback The function to call when the value is - * resolved successfully. - * @param {Function=} opt_errback The function to call when the value is - * rejected. - * @return {!webdriver.promise.Promise} A new promise. - */ - function when(value: any, opt_callback?: (value: any) => any, opt_errback?: (error: any) => any): webdriver.promise.Promise; - - /** - * Invokes the appropriate callback function as soon as a promised - * {@code value} is resolved. This function is similar to - * {@code webdriver.promise.when}, except it does not return a new promise. - * @param {*} value The value to observe. - * @param {Function} callback The function to call when the value is - * resolved successfully. - * @param {Function=} opt_errback The function to call when the value is - * rejected. - */ - function asap(value: any, callback: (value: any) => any, opt_errback?: (error: any) => any): void; - - /** - * Returns a promise that will be resolved with the input value in a - * fully-resolved state. If the value is an array, each element will be fully - * resolved. Likewise, if the value is an object, all keys will be fully - * resolved. In both cases, all nested arrays and objects will also be - * fully resolved. All fields are resolved in place; the returned promise will - * resolve on {@code value} and not a copy. - * - * Warning: This function makes no checks against objects that contain - * cyclical references: - * - * var value = {}; - * value['self'] = value; - * webdriver.promise.fullyResolved(value); // Stack overflow. - * - * @param {*} value The value to fully resolve. - * @return {!webdriver.promise.Promise} A promise for a fully resolved version - * of the input value. - */ - function fullyResolved(value: any): webdriver.promise.Promise; - - /** - * Changes the default flow to use when no others are active. - * @param {!webdriver.promise.ControlFlow} flow The new default flow. - * @throws {Error} If the default flow is not currently active. - */ - function setDefaultFlow(flow: webdriver.promise.ControlFlow): void; - - //endregion - - /** - * Represents the eventual value of a completed operation. Each promise may be - * in one of three states: pending, resolved, or rejected. Each promise starts - * in the pending state and may make a single transition to either a - * fulfilled or failed state. - * - *

This class is based on the Promise/A proposal from CommonJS. Additional - * functions are provided for API compatibility with Dojo Deferred objects. - * - * @see http://wiki.commonjs.org/wiki/Promises/A - */ - class Promise { - - //region Constructors - - /** - * @constructor - * @see http://wiki.commonjs.org/wiki/Promises/A - */ - constructor(); - - //endregion - - //region Methods - - /** - * Cancels the computation of this promise's value, rejecting the promise in the - * process. - * @param {*} reason The reason this promise is being cancelled. If not an - * {@code Error}, one will be created using the value's string - * representation. - */ - cancel(reason: any): void; - - /** @return {boolean} Whether this promise's value is still being computed. */ - isPending(): boolean; - - /** - * Registers listeners for when this instance is resolved. This function most - * overridden by subtypes. - * - * @param {Function=} opt_callback The function to call if this promise is - * successfully resolved. The function should expect a single argument: the - * promise's resolved value. - * @param {Function=} opt_errback The function to call if this promise is - * rejected. The function should expect a single argument: the rejection - * reason. - * @return {!webdriver.promise.Promise} A new promise which will be resolved - * with the result of the invoked callback. - */ - then(opt_callback?: (value: any) => any, opt_errback?: (error: any) => any): Promise; - - /** - * Registers a function to be invoked when this promise is successfully - * resolved. This function is provided for backwards compatibility with the - * Dojo Deferred API. - * - * @param {Function} callback The function to call if this promise is - * successfully resolved. The function should expect a single argument: the - * promise's resolved value. - * @param {!Object=} opt_self The object which |this| should refer to when the - * function is invoked. - * @return {!webdriver.promise.Promise} A new promise which will be resolved - * with the result of the invoked callback. - */ - addCallback(callback: (value: any) => any, opt_self?: any): Promise; - - - /** - * Registers a function to be invoked when this promise is rejected. - * This function is provided for backwards compatibility with the - * Dojo Deferred API. - * - * @param {Function} errback The function to call if this promise is - * rejected. The function should expect a single argument: the rejection - * reason. - * @param {!Object=} opt_self The object which |this| should refer to when the - * function is invoked. - * @return {!webdriver.promise.Promise} A new promise which will be resolved - * with the result of the invoked callback. - */ - addErrback(errback: (error: any) => any, opt_self?: any): Promise; - - /** - * Registers a function to be invoked when this promise is either rejected or - * resolved. This function is provided for backwards compatibility with the - * Dojo Deferred API. - * - * @param {Function} callback The function to call when this promise is - * either resolved or rejected. The function should expect a single - * argument: the resolved value or rejection error. - * @param {!Object=} opt_self The object which |this| should refer to when the - * function is invoked. - * @return {!webdriver.promise.Promise} A new promise which will be resolved - * with the result of the invoked callback. - */ - addBoth(callback : (value: any) => any, opt_self?: any): Promise; - - /** - * An alias for {@code webdriver.promise.Promise.prototype.then} that permits - * the scope of the invoked function to be specified. This function is provided - * for backwards compatibility with the Dojo Deferred API. - * - * @param {Function} callback The function to call if this promise is - * successfully resolved. The function should expect a single argument: the - * promise's resolved value. - * @param {Function} errback The function to call if this promise is - * rejected. The function should expect a single argument: the rejection - * reason. - * @param {!Object=} opt_self The object which |this| should refer to when the - * function is invoked. - * @return {!webdriver.promise.Promise} A new promise which will be resolved - * with the result of the invoked callback. - */ - addCallbacks(callback: (value: any) => any, errback: (error: any) => any, opt_self?: any): Promise; - - //endregion - } - - /** - * Represents a value that will be resolved at some point in the future. This - * class represents the protected "producer" half of a Promise - each Deferred - * has a {@code promise} property that may be returned to consumers for - * registering callbacks, reserving the ability to resolve the deferred to the - * producer. - * - *

If this Deferred is rejected and there are no listeners registered before - * the next turn of the event loop, the rejection will be passed to the - * {@link webdriver.promise.ControlFlow} as an unhandled failure. - * - *

If this Deferred is cancelled, the cancellation reason will be forward to - * the Deferred's canceller function (if provided). The canceller may return a - * truth-y value to override the reason provided for rejection. - * - * @extends {webdriver.promise.Promise} - */ - class Deferred extends Promise { - //region Constructors - - /** - * - * @param {Function=} opt_canceller Function to call when cancelling the - * computation of this instance's value. - * @param {webdriver.promise.ControlFlow=} opt_flow The control flow - * this instance was created under. This should only be provided during - * unit tests. - * @constructor - */ - constructor(opt_canceller?: any, opt_flow?: webdriver.promise.ControlFlow); - - //endregion - - //region Properties - - /** - * The consumer promise for this instance. Provides protected access to the - * callback registering functions. - * @type {!webdriver.promise.Promise} - */ - promise: webdriver.promise.Promise; - - //endregion - - //region Methods - - /** - * Rejects this promise. If the error is itself a promise, this instance will - * be chained to it and be rejected with the error's resolved value. - * @param {*=} opt_error The rejection reason, typically either a - * {@code Error} or a {@code string}. - */ - reject(opt_error?: any): void; - errback(opt_error?: any): void; - - /** - * Resolves this promise with the given value. If the value is itself a - * promise and not a reference to this deferred, this instance will wait for - * it before resolving. - * @param {*=} opt_value The resolved value. - */ - fulfill(opt_value?: any): void; - - /** - * Cancels the computation of this promise's value and flags the promise as a - * rejected value. - * @param {*=} opt_reason The reason for cancelling this promise. - */ - cancel(opt_reason?: any): void; - - /** - * Removes all of the listeners previously registered on this deferred. - * @throws {Error} If this deferred has already been resolved. - */ - removeAll(): void; - - //endregion - } - - interface IControlFlowTimer { - clearInterval: (ms: number) => void; - clearTimeout: (ms: number) => void; - setInterval: (fn: any, ms: number) => number; - setTimeout: (fn: any, ms: number) => number; - } - - /** - * Handles the execution of scheduled tasks, each of which may be an - * asynchronous operation. The control flow will ensure tasks are executed in - * the ordered scheduled, starting each task only once those before it have - * completed. - * - *

Each task scheduled within this flow may return a - * {@link webdriver.promise.Promise} to indicate it is an asynchronous - * operation. The ControlFlow will wait for such promises to be resolved before - * marking the task as completed. - * - *

Tasks and each callback registered on a {@link webdriver.promise.Deferred} - * will be run in their own ControlFlow frame. Any tasks scheduled within a - * frame will have priority over previously scheduled tasks. Furthermore, if - * any of the tasks in the frame fails, the remainder of the tasks in that frame - * will be discarded and the failure will be propagated to the user through the - * callback/task's promised result. - * - *

Each time a ControlFlow empties its task queue, it will fire an - * {@link webdriver.promise.ControlFlow.EventType.IDLE} event. Conversely, - * whenever the flow terminates due to an unhandled error, it will remove all - * remaining tasks in its queue and fire an - * {@link webdriver.promise.ControlFlow.EventType.UNCAUGHT_EXCEPTION} event. If - * there are no listeners registered with the flow, the error will be - * rethrown to the global error handler. - * - * @extends {webdriver.EventEmitter} - */ - class ControlFlow extends webdriver.EventEmitter { - - //region Constructors - - /** - * @param {webdriver.promise.ControlFlow.Timer=} opt_timer The timer object - * to use. Should only be set for testing. - * @constructor - */ - constructor(opt_timer?: webdriver.promise.IControlFlowTimer); - - //endregion - - //region Properties - - /** - * The timer used by this instance. - * @type {webdriver.promise.ControlFlow.Timer} - */ - timer: webdriver.promise.IControlFlowTimer; - - //endregion - - //region Static Properties - - /** - * The default timer object, which uses the global timer functions. - * @type {webdriver.promise.ControlFlow.Timer} - */ - static defaultTimer: webdriver.promise.IControlFlowTimer; - - /** - * Events that may be emitted by an {@link webdriver.promise.ControlFlow}. - * @enum {string} - */ - static EventType: { - /** Emitted when all tasks have been successfully executed. */ - IDLE: string; - - /** Emitted whenever a new task has been scheduled. */ - SCHEDULE_TASK: string; - - /** - * Emitted whenever a control flow aborts due to an unhandled promise - * rejection. This event will be emitted along with the offending rejection - * reason. Upon emitting this event, the control flow will empty its task - * queue and revert to its initial state. - */ - UNCAUGHT_EXCEPTION: string; - }; - - /** - * How often, in milliseconds, the event loop should run. - * @type {number} - * @const - */ - static EVENT_LOOP_FREQUENCY: number; - - //endregion - - //region Methods - - /** - * Resets this instance, clearing its queue and removing all event listeners. - */ - reset(): void; - - /** - * Returns a summary of the recent task activity for this instance. This - * includes the most recently completed task, as well as any parent tasks. In - * the returned summary, the task at index N is considered a sub-task of the - * task at index N+1. - * @return {!Array.} A summary of this instance's recent task - * activity. - */ - getHistory(): string[]; - - /** Clears this instance's task history. */ - clearHistory(): void; - - /** - * Appends a summary of this instance's recent task history to the given - * error's stack trace. This function will also ensure the error's stack trace - * is in canonical form. - * @param {!(Error|goog.testing.JsUnitException)} e The error to annotate. - * @return {!(Error|goog.testing.JsUnitException)} The annotated error. - */ - annotateError(e: any): any; - - /** - * @return {string} The scheduled tasks still pending with this instance. - */ - getSchedule(): string; - - /** - * Schedules a task for execution. If there is nothing currently in the - * queue, the task will be executed in the next turn of the event loop. - * - * @param {!Function} fn The function to call to start the task. If the - * function returns a {@link webdriver.promise.Promise}, this instance - * will wait for it to be resolved before starting the next task. - * @param {string=} opt_description A description of the task. - * @return {!webdriver.promise.Promise} A promise that will be resolved with - * the result of the action. - */ - execute(fn: any, opt_description?: string): webdriver.promise.Promise; - - /** - * Inserts a {@code setTimeout} into the command queue. This is equivalent to - * a thread sleep in a synchronous programming language. - * - * @param {number} ms The timeout delay, in milliseconds. - * @param {string=} opt_description A description to accompany the timeout. - * @return {!webdriver.promise.Promise} A promise that will be resolved with - * the result of the action. - */ - timeout(ms: number, opt_description?: string): webdriver.promise.Promise; - - /** - * Schedules a task that shall wait for a condition to hold. Each condition - * function may return any value, but it will always be evaluated as a boolean. - * - *

Condition functions may schedule sub-tasks with this instance, however, - * their execution time will be factored into whether a wait has timed out. - * - *

In the event a condition returns a Promise, the polling loop will wait for - * it to be resolved before evaluating whether the condition has been satisfied. - * The resolution time for a promise is factored into whether a wait has timed - * out. - * - *

If the condition function throws, or returns a rejected promise, the - * wait task will fail. - * - * @param {!Function} condition The condition function to poll. - * @param {number} timeout How long to wait, in milliseconds, for the condition - * to hold before timing out. - * @param {string=} opt_message An optional error message to include if the - * wait times out; defaults to the empty string. - * @return {!webdriver.promise.Promise} A promise that will be resolved when the - * condition has been satisified. The promise shall be rejected if the wait - * times out waiting for the condition. - */ - wait(condition: any, timeout: number, opt_message?: string): webdriver.promise.Promise; - - /** - * Schedules a task that will wait for another promise to resolve. The resolved - * promise's value will be returned as the task result. - * @param {!webdriver.promise.Promise} promise The promise to wait on. - * @return {!webdriver.promise.Promise} A promise that will resolve when the - * task has completed. - */ - await(promise: webdriver.promise.Promise): webdriver.promise.Promise; - - //endregion - } - } - module error { + interface IErrorCode { + SUCCESS: number; - // NOTE: A class was used instead of an Enum so that it could be extended in Protractor. - class ErrorCode { - static SUCCESS: number; - - static NO_SUCH_ELEMENT: number; - static NO_SUCH_FRAME: number; - static UNKNOWN_COMMAND: number; - static UNSUPPORTED_OPERATION: number; // Alias for UNKNOWN_COMMAND. - static STALE_ELEMENT_REFERENCE: number; - static ELEMENT_NOT_VISIBLE: number; - static INVALID_ELEMENT_STATE: number; - static UNKNOWN_ERROR: number; - static ELEMENT_NOT_SELECTABLE: number; - static JAVASCRIPT_ERROR: number; - static XPATH_LOOKUP_ERROR: number; - static TIMEOUT: number; - static NO_SUCH_WINDOW: number; - static INVALID_COOKIE_DOMAIN: number; - static UNABLE_TO_SET_COOKIE: number; - static MODAL_DIALOG_OPENED: number; - static NO_MODAL_DIALOG_OPEN: number; - static SCRIPT_TIMEOUT: number; - static INVALID_ELEMENT_COORDINATES: number; - static IME_NOT_AVAILABLE: number; - static IME_ENGINE_ACTIVATION_FAILED: number; - static INVALID_SELECTOR_ERROR: number; - static SESSION_NOT_CREATED: number; - static MOVE_TARGET_OUT_OF_BOUNDS: number; - static SQL_DATABASE_ERROR: number; - static INVALID_XPATH_SELECTOR: number; - static INVALID_XPATH_SELECTOR_RETURN_TYPE: number; + NO_SUCH_ELEMENT: number; + NO_SUCH_FRAME: number; + UNKNOWN_COMMAND: number; + UNSUPPORTED_OPERATION: number; // Alias for UNKNOWN_COMMAND. + STALE_ELEMENT_REFERENCE: number; + ELEMENT_NOT_VISIBLE: number; + INVALID_ELEMENT_STATE: number; + UNKNOWN_ERROR: number; + ELEMENT_NOT_SELECTABLE: number; + JAVASCRIPT_ERROR: number; + XPATH_LOOKUP_ERROR: number; + TIMEOUT: number; + NO_SUCH_WINDOW: number; + INVALID_COOKIE_DOMAIN: number; + UNABLE_TO_SET_COOKIE: number; + MODAL_DIALOG_OPENED: number; + UNEXPECTED_ALERT_OPEN: number; + NO_SUCH_ALERT: number; + NO_MODAL_DIALOG_OPEN: number; + SCRIPT_TIMEOUT: number; + INVALID_ELEMENT_COORDINATES: number; + IME_NOT_AVAILABLE: number; + IME_ENGINE_ACTIVATION_FAILED: number; + INVALID_SELECTOR_ERROR: number; + SESSION_NOT_CREATED: number; + MOVE_TARGET_OUT_OF_BOUNDS: number; + SQL_DATABASE_ERROR: number; + INVALID_XPATH_SELECTOR: number; + INVALID_XPATH_SELECTOR_RETURN_TYPE: number; // The following error codes are derived straight from HTTP return codes. - static METHOD_NOT_ALLOWED: number; + METHOD_NOT_ALLOWED: number; } + var ErrorCode: IErrorCode; + /** * Error extension that includes error status codes from the WebDriver wire * protocol: @@ -710,7 +571,7 @@ declare module webdriver { * @param {string=} opt_message Optional error message. * @constructor */ - constructor(code: number, opt_message?: string); + constructor(code: number, opt_message?: string); //endregion @@ -784,124 +645,1327 @@ declare module webdriver { //region Methods /** @return {string} The string representation of this error. */ - toString(): string; + toString(): string; //endregion } } - module process { + module logging { /** - * Queries for a named environment variable. - * @param {string} name The name of the environment variable to look up. - * @param {string=} opt_default The default value if the named variable is not - * defined. - * @return {string} The queried environment variable. + * A hash describing log preferences. + * @typedef {Object.} */ - function getEnv(name: string, opt_default?: string): string; + class Preferences { + setLevel(type: string, level: ILevel): void; + toJSON(): { [key: string]: string }; + } + + interface IType { + /** Logs originating from the browser. */ + BROWSER: string; + /** Logs from a WebDriver client. */ + CLIENT: string; + /** Logs from a WebDriver implementation. */ + DRIVER: string; + /** Logs related to performance. */ + PERFORMANCE: string; + /** Logs from the remote server. */ + SERVER: string; + } /** - * @return {boolean} Whether the current process is Node's native process - * object. + * Common log types. + * @enum {string} */ - function isNative(): boolean; + var Type: IType; /** - * Sets an environment value. If the new value is either null or undefined, the - * environment variable will be cleared. - * @param {string} name The value to set. - * @param {*} value The new value; will be coerced to a string. + * Logging levels. + * @enum {{value: number, name: webdriver.logging.LevelName}} */ - function setEnv(name: string, value: any): void; + interface ILevel { + value: number; + name: string; + } + interface ILevelValues { + ALL: ILevel; + DEBUG: ILevel; + INFO: ILevel; + WARNING: ILevel; + SEVERE: ILevel; + OFF: ILevel; + } + + var Level: ILevelValues; + + /** + * Converts a level name or value to a {@link webdriver.logging.Level} value. + * If the name/value is not recognized, {@link webdriver.logging.Level.ALL} + * will be returned. + * @param {(number|string)} nameOrValue The log level name, or value, to + * convert . + * @return {!webdriver.logging.Level} The converted level. + */ + function getLevel(nameOrValue: string): ILevel; + function getLevel(nameOrValue: number): ILevel; + + interface IEntryJSON { + level: string; + message: string; + timestamp: number; + type: string; + } + + /** + * A single log entry. + */ + class Entry { + + //region Constructors + + /** + * @param {(!webdriver.logging.Level|string)} level The entry level. + * @param {string} message The log message. + * @param {number=} opt_timestamp The time this entry was generated, in + * milliseconds since 0:00:00, January 1, 1970 UTC. If omitted, the + * current time will be used. + * @param {string=} opt_type The log type, if known. + * @constructor + */ + constructor(level: ILevel, message: string, opt_timestamp?:number, opt_type?:string); + constructor(level: string, message: string, opt_timestamp?:number, opt_type?:string); + + //endregion + + //region Public Properties + + /** @type {!webdriver.logging.Level} */ + level: ILevel; + + /** @type {string} */ + message: string; + + /** @type {number} */ + timestamp: number; + + /** @type {string} */ + type: string; + + //endregion + + //region Static Methods + + /** + * Converts a {@link goog.debug.LogRecord} into a + * {@link webdriver.logging.Entry}. + * @param {!goog.debug.LogRecord} logRecord The record to convert. + * @param {string=} opt_type The log type. + * @return {!webdriver.logging.Entry} The converted entry. + */ + static fromClosureLogRecord(logRecord: any, opt_type?:string): Entry; + + //endregion + + //region Methods + + /** + * @return {{level: string, message: string, timestamp: number, + * type: string}} The JSON representation of this entry. + */ + toJSON(): IEntryJSON; + + //endregion + } } - /** - * Creates new {@code webdriver.WebDriver} clients. Upon instantiation, each - * Builder will configure itself based on the following environment variables: - *

- *
{@code webdriver.AbstractBuilder.SERVER_URL_ENV}
- *
Defines the remote WebDriver server that should be used for command - * command execution; may be overridden using - * {@code webdriver.AbstractBuilder.prototype.usingServer}.
- *
- */ - class AbstractBuilder { - - //region Constructors + module promise { + //region Functions /** - * @constructor + * Given an array of promises, will return a promise that will be fulfilled + * with the fulfillment values of the input array's values. If any of the + * input array's promises are rejected, the returned promise will be rejected + * with the same reason. + * + * @param {!Array.<(T|!webdriver.promise.Promise.)>} arr An array of + * promises to wait on. + * @return {!webdriver.promise.Promise.>} A promise that is + * fulfilled with an array containing the fulfilled values of the + * input array, or rejected with the same reason as the first + * rejected value. + * @template T */ - constructor(); + function all(arr: Promise[]): Promise; + + /** + * Invokes the appropriate callback function as soon as a promised + * {@code value} is resolved. This function is similar to + * {@link webdriver.promise.when}, except it does not return a new promise. + * @param {*} value The value to observe. + * @param {Function} callback The function to call when the value is + * resolved successfully. + * @param {Function=} opt_errback The function to call when the value is + * rejected. + */ + function asap(value: any, callback: Function, opt_errback?: Function): void; + + /** + * @return {!webdriver.promise.ControlFlow} The currently active control flow. + */ + function controlFlow(): ControlFlow; + + /** + * Creates a new control flow. The provided callback will be invoked as the + * first task within the new flow, with the flow as its sole argument. Returns + * a promise that resolves to the callback result. + * @param {function(!webdriver.promise.ControlFlow)} callback The entry point + * to the newly created flow. + * @return {!webdriver.promise.Promise} A promise that resolves to the callback + * result. + */ + function createFlow(callback: (flow: ControlFlow) => R): Promise; + + /** + * Determines whether a {@code value} should be treated as a promise. + * Any object whose "then" property is a function will be considered a promise. + * + * @param {*} value The value to test. + * @return {boolean} Whether the value is a promise. + */ + function isPromise(value: any): boolean; + + /** + * Tests is a function is a generator. + * @param {!Function} fn The function to test. + * @return {boolean} Whether the function is a generator. + */ + function isGenerator(fn: Function): boolean; + + /** + * Creates a promise that will be resolved at a set time in the future. + * @param {number} ms The amount of time, in milliseconds, to wait before + * resolving the promise. + * @return {!webdriver.promise.Promise} The promise. + */ + function delayed(ms: number): Promise; + + /** + * Calls a function for each element in an array, and if the function returns + * true adds the element to a new array. + * + *

If the return value of the filter function is a promise, this function + * will wait for it to be fulfilled before determining whether to insert the + * element into the new array. + * + *

If the filter function throws or returns a rejected promise, the promise + * returned by this function will be rejected with the same reason. Only the + * first failure will be reported; all subsequent errors will be silently + * ignored. + * + * @param {!(Array.|webdriver.promise.Promise.>)} arr The + * array to iterator over, or a promise that will resolve to said array. + * @param {function(this: SELF, TYPE, number, !Array.): ( + * boolean|webdriver.promise.Promise.)} fn The function + * to call for each element in the array. + * @param {SELF=} opt_self The object to be used as the value of 'this' within + * {@code fn}. + * @template TYPE, SELF + */ + function filter(arr: T[], fn: (element: T, index: number, array: T[]) => any, opt_self?: any): Promise; + function filter(arr: Promise, fn: (element: T, index: number, array: T[]) => any, opt_self?: any): Promise + + /** + * Creates a new deferred object. + * @return {!webdriver.promise.Deferred} The new deferred object. + */ + function defer(): Deferred; + + /** + * Creates a promise that has been resolved with the given value. + * @param {*=} opt_value The resolved value. + * @return {!webdriver.promise.Promise} The resolved promise. + */ + function fulfilled(opt_value?: T): Promise; + + /** + * Calls a function for each element in an array and inserts the result into a + * new array, which is used as the fulfillment value of the promise returned + * by this function. + * + *

If the return value of the mapping function is a promise, this function + * will wait for it to be fulfilled before inserting it into the new array. + * + *

If the mapping function throws or returns a rejected promise, the + * promise returned by this function will be rejected with the same reason. + * Only the first failure will be reported; all subsequent errors will be + * silently ignored. + * + * @param {!(Array.|webdriver.promise.Promise.>)} arr The + * array to iterator over, or a promise that will resolve to said array. + * @param {function(this: SELF, TYPE, number, !Array.): ?} fn The + * function to call for each element in the array. This function should + * expect three arguments (the element, the index, and the array itself. + * @param {SELF=} opt_self The object to be used as the value of 'this' within + * {@code fn}. + * @template TYPE, SELF + */ + function map(arr: T[], fn: (element: T, index: number, array: T[]) => any, opt_self?: any): Promise + function map(arr: Promise, fn: (element: T, index: number, array: T[]) => any, opt_self?: any): Promise + + /** + * Creates a promise that has been rejected with the given reason. + * @param {*=} opt_reason The rejection reason; may be any value, but is + * usually an Error or a string. + * @return {!webdriver.promise.Promise} The rejected promise. + */ + function rejected(opt_reason?: any): Promise; + + /** + * Wraps a function that is assumed to be a node-style callback as its final + * argument. This callback takes two arguments: an error value (which will be + * null if the call succeeded), and the success value as the second argument. + * If the call fails, the returned promise will be rejected, otherwise it will + * be resolved with the result. + * @param {!Function} fn The function to wrap. + * @return {!webdriver.promise.Promise} A promise that will be resolved with the + * result of the provided function's callback. + */ + function checkedNodeCall(fn: Function, ...var_args: any[]): Promise; + + /** + * Consumes a {@code GeneratorFunction}. Each time the generator yields a + * promise, this function will wait for it to be fulfilled before feeding the + * fulfilled value back into {@code next}. Likewise, if a yielded promise is + * rejected, the rejection error will be passed to {@code throw}. + * + *

Example 1: the Fibonacci Sequence. + *


+         * webdriver.promise.consume(function* fibonacci() {
+         *   var n1 = 1, n2 = 1;
+         *   for (var i = 0; i < 4; ++i) {
+         *     var tmp = yield n1 + n2;
+         *     n1 = n2;
+         *     n2 = tmp;
+         *   }
+         *   return n1 + n2;
+         * }).then(function(result) {
+         *   console.log(result);  // 13
+         * });
+         * 
+ * + *

Example 2: a generator that throws. + *


+         * webdriver.promise.consume(function* () {
+         *   yield webdriver.promise.delayed(250).then(function() {
+         *     throw Error('boom');
+         *   });
+         * }).thenCatch(function(e) {
+         *   console.log(e.toString());  // Error: boom
+         * });
+         * 
+ * + * @param {!Function} generatorFn The generator function to execute. + * @param {Object=} opt_self The object to use as "this" when invoking the + * initial generator. + * @param {...*} var_args Any arguments to pass to the initial generator. + * @return {!webdriver.promise.Promise.} A promise that will resolve to the + * generator's final result. + * @throws {TypeError} If the given function is not a generator. + */ + function consume(generatorFn: Function, opt_self?: any, ...var_args: any[]): Promise; + + /** + * Registers an observer on a promised {@code value}, returning a new promise + * that will be resolved when the value is. If {@code value} is not a promise, + * then the return promise will be immediately resolved. + * @param {*} value The value to observe. + * @param {Function=} opt_callback The function to call when the value is + * resolved successfully. + * @param {Function=} opt_errback The function to call when the value is + * rejected. + * @return {!webdriver.promise.Promise} A new promise. + */ + function when(value: T, opt_callback?: (value: T) => any, opt_errback?: (error: any) => any): Promise; + function when(value: Promise, opt_callback?: (value: T) => any, opt_errback?: (error: any) => any): Promise; + + /** + * Returns a promise that will be resolved with the input value in a + * fully-resolved state. If the value is an array, each element will be fully + * resolved. Likewise, if the value is an object, all keys will be fully + * resolved. In both cases, all nested arrays and objects will also be + * fully resolved. All fields are resolved in place; the returned promise will + * resolve on {@code value} and not a copy. + * + * Warning: This function makes no checks against objects that contain + * cyclical references: + * + * var value = {}; + * value['self'] = value; + * webdriver.promise.fullyResolved(value); // Stack overflow. + * + * @param {*} value The value to fully resolve. + * @return {!webdriver.promise.Promise} A promise for a fully resolved version + * of the input value. + */ + function fullyResolved(value: any): Promise; + + /** + * Changes the default flow to use when no others are active. + * @param {!webdriver.promise.ControlFlow} flow The new default flow. + * @throws {Error} If the default flow is not currently active. + */ + function setDefaultFlow(flow: ControlFlow): void; //endregion - //region Static Properties - /** - * Environment variable that defines the URL of the WebDriver server that - * should be used for all new WebDriver clients. This setting may be overridden - * using {@code #usingServer(url)}. - * @type {string} - * @const - * @see webdriver.process.getEnv + * Error used when the computation of a promise is cancelled. + * + * @extends {goog.debug.Error} + * @final */ - static SERVER_URL_ENV: string; + class CancellationError { + /** + * @param {string=} opt_msg The cancellation message. + * @constructor + */ + constructor(opt_msg?: string); + name: string; + message: string; + } + + interface IThenable { + /** + * Cancels the computation of this promise's value, rejecting the promise in the + * process. This method is a no-op if the promise has alreayd been resolved. + * + * @param {string=} opt_reason The reason this promise is being cancelled. + */ + cancel(opt_reason?: string): void; + + + /** @return {boolean} Whether this promise's value is still being computed. */ + isPending(): boolean; + + + /** + * Registers listeners for when this instance is resolved. + * + * @param {?(function(T): (R|webdriver.promise.Promise.))=} opt_callback The + * function to call if this promise is successfully resolved. The function + * should expect a single argument: the promise's resolved value. + * @param {?(function(*): (R|webdriver.promise.Promise.))=} opt_errback The + * function to call if this promise is rejected. The function should expect + * a single argument: the rejection reason. + * @return {!webdriver.promise.Promise.} A new promise which will be + * resolved with the result of the invoked callback. + * @template R + */ + then(opt_callback?: (value: T) => any, opt_errback?: (error: any) => any): Promise; + + + /** + * Registers a listener for when this promise is rejected. This is synonymous + * with the {@code catch} clause in a synchronous API: + *

+             *   // Synchronous API:
+             *   try {
+             *     doSynchronousWork();
+             *   } catch (ex) {
+             *     console.error(ex);
+             *   }
+             *
+             *   // Asynchronous promise API:
+             *   doAsynchronousWork().thenCatch(function(ex) {
+             *     console.error(ex);
+             *   });
+             * 
+ * + * @param {function(*): (R|webdriver.promise.Promise.)} errback The function + * to call if this promise is rejected. The function should expect a single + * argument: the rejection reason. + * @return {!webdriver.promise.Promise.} A new promise which will be + * resolved with the result of the invoked callback. + * @template R + */ + thenCatch(errback: (error: any) => any): Promise; + + + /** + * Registers a listener to invoke when this promise is resolved, regardless + * of whether the promise's value was successfully computed. This function + * is synonymous with the {@code finally} clause in a synchronous API: + *

+             *   // Synchronous API:
+             *   try {
+             *     doSynchronousWork();
+             *   } finally {
+             *     cleanUp();
+             *   }
+             *
+             *   // Asynchronous promise API:
+             *   doAsynchronousWork().thenFinally(cleanUp);
+             * 
+ * + * Note: similar to the {@code finally} clause, if the registered + * callback returns a rejected promise or throws an error, it will silently + * replace the rejection error (if any) from this promise: + *

+             *   try {
+             *     throw Error('one');
+             *   } finally {
+             *     throw Error('two');  // Hides Error: one
+             *   }
+             *
+             *   webdriver.promise.rejected(Error('one'))
+             *       .thenFinally(function() {
+             *         throw Error('two');  // Hides Error: one
+             *       });
+             * 
+ * + * + * @param {function(): (R|webdriver.promise.Promise.)} callback The function + * to call when this promise is resolved. + * @return {!webdriver.promise.Promise.} A promise that will be fulfilled + * with the callback result. + * @template R + */ + thenFinally(callback: () => any): Promise; + } /** - * The default URL of the WebDriver server to use if - * {@link webdriver.AbstractBuilder.SERVER_URL_ENV} is not set. - * @type {string} + * Thenable is a promise-like object with a {@code then} method which may be + * used to schedule callbacks on a promised value. + * + * @interface + * @template T + */ + class Thenable implements IThenable { + /** + * Cancels the computation of this promise's value, rejecting the promise in the + * process. This method is a no-op if the promise has alreayd been resolved. + * + * @param {string=} opt_reason The reason this promise is being cancelled. + */ + cancel(opt_reason?: string): void; + + + /** @return {boolean} Whether this promise's value is still being computed. */ + isPending(): boolean; + + + /** + * Registers listeners for when this instance is resolved. + * + * @param {?(function(T): (R|webdriver.promise.Promise.))=} opt_callback The + * function to call if this promise is successfully resolved. The function + * should expect a single argument: the promise's resolved value. + * @param {?(function(*): (R|webdriver.promise.Promise.))=} opt_errback The + * function to call if this promise is rejected. The function should expect + * a single argument: the rejection reason. + * @return {!webdriver.promise.Promise.} A new promise which will be + * resolved with the result of the invoked callback. + * @template R + */ + then(opt_callback?: (value: T) => any, opt_errback?: (error: any) => any): Promise; + + + /** + * Registers a listener for when this promise is rejected. This is synonymous + * with the {@code catch} clause in a synchronous API: + *

+             *   // Synchronous API:
+             *   try {
+             *     doSynchronousWork();
+             *   } catch (ex) {
+             *     console.error(ex);
+             *   }
+             *
+             *   // Asynchronous promise API:
+             *   doAsynchronousWork().thenCatch(function(ex) {
+             *     console.error(ex);
+             *   });
+             * 
+ * + * @param {function(*): (R|webdriver.promise.Promise.)} errback The function + * to call if this promise is rejected. The function should expect a single + * argument: the rejection reason. + * @return {!webdriver.promise.Promise.} A new promise which will be + * resolved with the result of the invoked callback. + * @template R + */ + thenCatch(errback: (error: any) => any): Promise; + + + /** + * Registers a listener to invoke when this promise is resolved, regardless + * of whether the promise's value was successfully computed. This function + * is synonymous with the {@code finally} clause in a synchronous API: + *

+             *   // Synchronous API:
+             *   try {
+             *     doSynchronousWork();
+             *   } finally {
+             *     cleanUp();
+             *   }
+             *
+             *   // Asynchronous promise API:
+             *   doAsynchronousWork().thenFinally(cleanUp);
+             * 
+ * + * Note: similar to the {@code finally} clause, if the registered + * callback returns a rejected promise or throws an error, it will silently + * replace the rejection error (if any) from this promise: + *

+             *   try {
+             *     throw Error('one');
+             *   } finally {
+             *     throw Error('two');  // Hides Error: one
+             *   }
+             *
+             *   webdriver.promise.rejected(Error('one'))
+             *       .thenFinally(function() {
+             *         throw Error('two');  // Hides Error: one
+             *       });
+             * 
+ * + * + * @param {function(): (R|webdriver.promise.Promise.)} callback The function + * to call when this promise is resolved. + * @return {!webdriver.promise.Promise.} A promise that will be fulfilled + * with the callback result. + * @template R + */ + thenFinally(callback: () => any): Promise; + + /** + * Adds a property to a class prototype to allow runtime checks of whether + * instances of that class implement the Thenable interface. This function will + * also ensure the prototype's {@code then} function is exported from compiled + * code. + * @param {function(new: webdriver.promise.Thenable, ...[?])} ctor The + * constructor whose prototype to modify. + */ + static addImplementation(ctor: Function): void; + + + /** + * Checks if an object has been tagged for implementing the Thenable interface + * as defined by {@link webdriver.promise.Thenable.addImplementation}. + * @param {*} object The object to test. + * @return {boolean} Whether the object is an implementation of the Thenable + * interface. + */ + static isImplementation(object: any): boolean; + } + + /** + * Represents the eventual value of a completed operation. Each promise may be + * in one of three states: pending, resolved, or rejected. Each promise starts + * in the pending state and may make a single transition to either a + * fulfilled or failed state. + * + *

This class is based on the Promise/A proposal from CommonJS. Additional + * functions are provided for API compatibility with Dojo Deferred objects. + * + * @see http://wiki.commonjs.org/wiki/Promises/A + */ + class Promise implements IThenable { + + //region Constructors + + /** + * @constructor + * @see http://wiki.commonjs.org/wiki/Promises/A + */ + constructor(); + + //endregion + + //region Methods + + /** + * Cancels the computation of this promise's value, rejecting the promise in the + * process. + * @param {*} reason The reason this promise is being cancelled. If not an + * {@code Error}, one will be created using the value's string + * representation. + */ + cancel(reason: any): void; + + /** @return {boolean} Whether this promise's value is still being computed. */ + isPending(): boolean; + + /** + * Registers listeners for when this instance is resolved. This function most + * overridden by subtypes. + * + * @param {Function=} opt_callback The function to call if this promise is + * successfully resolved. The function should expect a single argument: the + * promise's resolved value. + * @param {Function=} opt_errback The function to call if this promise is + * rejected. The function should expect a single argument: the rejection + * reason. + * @return {!webdriver.promise.Promise} A new promise which will be resolved + * with the result of the invoked callback. + */ + then(opt_callback?: (value: T) => any, opt_errback?: (error: any) => any): Promise; + + + /** + * Registers a listener for when this promise is rejected. This is synonymous + * with the {@code catch} clause in a synchronous API: + *


+             *   // Synchronous API:
+             *   try {
+             *     doSynchronousWork();
+             *   } catch (ex) {
+             *     console.error(ex);
+             *   }
+             *
+             *   // Asynchronous promise API:
+             *   doAsynchronousWork().thenCatch(function(ex) {
+             *     console.error(ex);
+             *   });
+             * 
+ * + * @param {function(*): (R|webdriver.promise.Promise.)} errback The function + * to call if this promise is rejected. The function should expect a single + * argument: the rejection reason. + * @return {!webdriver.promise.Promise.} A new promise which will be + * resolved with the result of the invoked callback. + * @template R + */ + thenCatch(errback: (error: any) => any): Promise; + + + /** + * Registers a listener to invoke when this promise is resolved, regardless + * of whether the promise's value was successfully computed. This function + * is synonymous with the {@code finally} clause in a synchronous API: + *

+             *   // Synchronous API:
+             *   try {
+             *     doSynchronousWork();
+             *   } finally {
+             *     cleanUp();
+             *   }
+             *
+             *   // Asynchronous promise API:
+             *   doAsynchronousWork().thenFinally(cleanUp);
+             * 
+ * + * Note: similar to the {@code finally} clause, if the registered + * callback returns a rejected promise or throws an error, it will silently + * replace the rejection error (if any) from this promise: + *

+             *   try {
+             *     throw Error('one');
+             *   } finally {
+             *     throw Error('two');  // Hides Error: one
+             *   }
+             *
+             *   webdriver.promise.rejected(Error('one'))
+             *       .thenFinally(function() {
+             *         throw Error('two');  // Hides Error: one
+             *       });
+             * 
+ * + * + * @param {function(): (R|webdriver.promise.Promise.)} callback The function + * to call when this promise is resolved. + * @return {!webdriver.promise.Promise.} A promise that will be fulfilled + * with the callback result. + * @template R + */ + thenFinally(callback: () => any): Promise; + + //endregion + } + + /** + * Represents a value that will be resolved at some point in the future. This + * class represents the protected "producer" half of a Promise - each Deferred + * has a {@code promise} property that may be returned to consumers for + * registering callbacks, reserving the ability to resolve the deferred to the + * producer. + * + *

If this Deferred is rejected and there are no listeners registered before + * the next turn of the event loop, the rejection will be passed to the + * {@link webdriver.promise.ControlFlow} as an unhandled failure. + * + *

If this Deferred is cancelled, the cancellation reason will be forward to + * the Deferred's canceller function (if provided). The canceller may return a + * truth-y value to override the reason provided for rejection. + * + * @extends {webdriver.promise.Promise} + */ + class Deferred extends Promise { + //region Constructors + + /** + * + * @param {webdriver.promise.ControlFlow=} opt_flow The control flow + * this instance was created under. This should only be provided during + * unit tests. + * @constructor + */ + constructor(opt_flow?: ControlFlow); + + //endregion + + static State_: { + BLOCKED: number; + PENDING: number; + REJECTED: number; + RESOLVED: number; + } + + //region Properties + + /** + * The consumer promise for this instance. Provides protected access to the + * callback registering functions. + * @type {!webdriver.promise.Promise} + */ + promise: Promise; + + //endregion + + //region Methods + + /** + * Rejects this promise. If the error is itself a promise, this instance will + * be chained to it and be rejected with the error's resolved value. + * @param {*=} opt_error The rejection reason, typically either a + * {@code Error} or a {@code string}. + */ + reject(opt_error?: any): void; + errback(opt_error?: any): void; + + /** + * Resolves this promise with the given value. If the value is itself a + * promise and not a reference to this deferred, this instance will wait for + * it before resolving. + * @param {*=} opt_value The resolved value. + */ + fulfill(opt_value?: T): void; + + /** + * Removes all of the listeners previously registered on this deferred. + * @throws {Error} If this deferred has already been resolved. + */ + removeAll(): void; + + //endregion + } + + interface IControlFlowTimer { + clearInterval: (ms: number) => void; + clearTimeout: (ms: number) => void; + setInterval: (fn: Function, ms: number) => number; + setTimeout: (fn: Function, ms: number) => number; + } + + /** + * Handles the execution of scheduled tasks, each of which may be an + * asynchronous operation. The control flow will ensure tasks are executed in + * the ordered scheduled, starting each task only once those before it have + * completed. + * + *

Each task scheduled within this flow may return a + * {@link webdriver.promise.Promise} to indicate it is an asynchronous + * operation. The ControlFlow will wait for such promises to be resolved before + * marking the task as completed. + * + *

Tasks and each callback registered on a {@link webdriver.promise.Deferred} + * will be run in their own ControlFlow frame. Any tasks scheduled within a + * frame will have priority over previously scheduled tasks. Furthermore, if + * any of the tasks in the frame fails, the remainder of the tasks in that frame + * will be discarded and the failure will be propagated to the user through the + * callback/task's promised result. + * + *

Each time a ControlFlow empties its task queue, it will fire an + * {@link webdriver.promise.ControlFlow.EventType.IDLE} event. Conversely, + * whenever the flow terminates due to an unhandled error, it will remove all + * remaining tasks in its queue and fire an + * {@link webdriver.promise.ControlFlow.EventType.UNCAUGHT_EXCEPTION} event. If + * there are no listeners registered with the flow, the error will be + * rethrown to the global error handler. + * + * @extends {webdriver.EventEmitter} + */ + class ControlFlow extends EventEmitter { + + //region Constructors + + /** + * @param {webdriver.promise.ControlFlow.Timer=} opt_timer The timer object + * to use. Should only be set for testing. + * @constructor + */ + constructor(opt_timer?: IControlFlowTimer); + + //endregion + + //region Properties + + /** + * The timer used by this instance. + * @type {webdriver.promise.ControlFlow.Timer} + */ + timer: IControlFlowTimer; + + //endregion + + //region Static Properties + + /** + * The default timer object, which uses the global timer functions. + * @type {webdriver.promise.ControlFlow.Timer} + */ + static defaultTimer: IControlFlowTimer; + + /** + * Events that may be emitted by an {@link webdriver.promise.ControlFlow}. + * @enum {string} + */ + static EventType: { + /** Emitted when all tasks have been successfully executed. */ + IDLE: string; + + /** Emitted when a ControlFlow has been reset. */ + RESET: string; + + /** Emitted whenever a new task has been scheduled. */ + SCHEDULE_TASK: string; + + /** + * Emitted whenever a control flow aborts due to an unhandled promise + * rejection. This event will be emitted along with the offending rejection + * reason. Upon emitting this event, the control flow will empty its task + * queue and revert to its initial state. + */ + UNCAUGHT_EXCEPTION: string; + }; + + /** + * How often, in milliseconds, the event loop should run. + * @type {number} + * @const + */ + static EVENT_LOOP_FREQUENCY: number; + + //endregion + + //region Methods + + /** + * Resets this instance, clearing its queue and removing all event listeners. + */ + reset(): void; + + /** + * Returns a summary of the recent task activity for this instance. This + * includes the most recently completed task, as well as any parent tasks. In + * the returned summary, the task at index N is considered a sub-task of the + * task at index N+1. + * @return {!Array.} A summary of this instance's recent task + * activity. + */ + getHistory(): string[]; + + /** Clears this instance's task history. */ + clearHistory(): void; + + /** + * Appends a summary of this instance's recent task history to the given + * error's stack trace. This function will also ensure the error's stack trace + * is in canonical form. + * @param {!(Error|goog.testing.JsUnitException)} e The error to annotate. + * @return {!(Error|goog.testing.JsUnitException)} The annotated error. + */ + annotateError(e: any): any; + + /** + * @return {string} The scheduled tasks still pending with this instance. + */ + getSchedule(): string; + + /** + * Schedules a task for execution. If there is nothing currently in the + * queue, the task will be executed in the next turn of the event loop. + * + * @param {!Function} fn The function to call to start the task. If the + * function returns a {@link webdriver.promise.Promise}, this instance + * will wait for it to be resolved before starting the next task. + * @param {string=} opt_description A description of the task. + * @return {!webdriver.promise.Promise} A promise that will be resolved with + * the result of the action. + */ + execute(fn: Function, opt_description?: string): Promise; + + /** + * Inserts a {@code setTimeout} into the command queue. This is equivalent to + * a thread sleep in a synchronous programming language. + * + * @param {number} ms The timeout delay, in milliseconds. + * @param {string=} opt_description A description to accompany the timeout. + * @return {!webdriver.promise.Promise} A promise that will be resolved with + * the result of the action. + */ + timeout(ms: number, opt_description?: string): Promise; + + /** + * Schedules a task that shall wait for a condition to hold. Each condition + * function may return any value, but it will always be evaluated as a boolean. + * + *

Condition functions may schedule sub-tasks with this instance, however, + * their execution time will be factored into whether a wait has timed out. + * + *

In the event a condition returns a Promise, the polling loop will wait for + * it to be resolved before evaluating whether the condition has been satisfied. + * The resolution time for a promise is factored into whether a wait has timed + * out. + * + *

If the condition function throws, or returns a rejected promise, the + * wait task will fail. + * + * @param {!Function} condition The condition function to poll. + * @param {number} timeout How long to wait, in milliseconds, for the condition + * to hold before timing out. + * @param {string=} opt_message An optional error message to include if the + * wait times out; defaults to the empty string. + * @return {!webdriver.promise.Promise} A promise that will be resolved when the + * condition has been satisified. The promise shall be rejected if the wait + * times out waiting for the condition. + */ + wait(condition: Function, timeout: number, opt_message?: string): Promise; + + /** + * Schedules a task that will wait for another promise to resolve. The resolved + * promise's value will be returned as the task result. + * @param {!webdriver.promise.Promise} promise The promise to wait on. + * @return {!webdriver.promise.Promise} A promise that will resolve when the + * task has completed. + */ + await(promise: Promise): Promise; + + //endregion + } + } + + module stacktrace { + /** + * Class representing one stack frame. + */ + class Frame { + /** + * @param {(string|undefined)} context Context object, empty in case of global + * functions or if the browser doesn't provide this information. + * @param {(string|undefined)} name Function name, empty in case of anonymous + * functions. + * @param {(string|undefined)} alias Alias of the function if available. For + * example the function name will be 'c' and the alias will be 'b' if the + * function is defined as a.b = function c() {};. + * @param {(string|undefined)} path File path or URL including line number and + * optionally column number separated by colons. + * @constructor + */ + constructor(context?: string, name?: string, alias?: string, path?: string); + + /** + * @return {string} The function name or empty string if the function is + * anonymous and the object field which it's assigned to is unknown. + */ + getName(): string; + + + /** + * @return {string} The url or empty string if it is unknown. + */ + getUrl(): string; + + + /** + * @return {number} The line number if known or -1 if it is unknown. + */ + getLine(): number; + + + /** + * @return {number} The column number if known and -1 if it is unknown. + */ + getColumn(): number; + + + /** + * @return {boolean} Whether the stack frame contains an anonymous function. + */ + isAnonymous(): boolean; + + + /** + * Converts this frame to its string representation using V8's stack trace + * format: http://code.google.com/p/v8/wiki/JavaScriptStackTraceApi + * @return {string} The string representation of this frame. + * @override + */ + toString(): string; + } + + /** + * Stores a snapshot of the stack trace at the time this instance was created. + * The stack trace will always be adjusted to exclude this function call. + */ + class Snapshot { + /** + * @param {number=} opt_slice The number of frames to remove from the top of + * the generated stack trace. + * @constructor + */ + constructor(opt_slice?: number); + + /** + * @return {!Array.} The parsed stack trace. + */ + getStacktrace(): Frame[]; + } + + /** + * Formats an error's stack trace. + * @param {!(Error|goog.testing.JsUnitException)} error The error to format. + * @return {!(Error|goog.testing.JsUnitException)} The formatted error. + */ + function format(error: any): any; + + /** + * Gets the native stack trace if available otherwise follows the call chain. + * The generated trace will exclude all frames up to and including the call to + * this function. + * @return {!Array.} The frames of the stack trace. + */ + function get(): Frame[]; + + /** + * Whether the current browser supports stack traces. + * + * @type {boolean} * @const */ - static DEFAULT_SERVER_URL: string; - - //endregion - - //region Methods + var BROWSER_SUPPORTED: boolean; + } + module until { /** - * Configures which WebDriver server should be used for new sessions. Overrides - * the value loaded from the {@link webdriver.AbstractBuilder.SERVER_URL_ENV} - * upon creation of this instance. - * @param {string} url URL of the server to use. - * @return {!webdriver.AbstractBuilder} This Builder instance for chain calling. + * Defines a condition to */ - usingServer(url: string): AbstractBuilder; + class Condition { + /** + * @param {string} message A descriptive error message. Should complete the + * sentence "Waiting [...]" + * @param {function(!webdriver.WebDriver): OUT} fn The condition function to + * evaluate on each iteration of the wait loop. + * @constructor + */ + constructor(message: string, fn: (webdriver: WebDriver) => any); + + /** @return {string} A description of this condition. */ + description(): string; + + /** @type {function(!webdriver.WebDriver): OUT} */ + fn(webdriver: WebDriver): any; + } /** - * @return {string} The URL of the WebDriver server this instance is configured + * Creates a condition that will wait until the input driver is able to switch + * to the designated frame. The target frame may be specified as: + *

    + *
  1. A numeric index into {@code window.frames} for the currently selected + * frame. + *
  2. A {@link webdriver.WebElement}, which must reference a FRAME or IFRAME + * element on the current page. + *
  3. A locator which may be used to first locate a FRAME or IFRAME on the + * current page before attempting to switch to it. + *
+ * + *

Upon successful resolution of this condition, the driver will be left + * focused on the new frame. + * + * @param {!(number|webdriver.WebElement| + * webdriver.Locator|webdriver.By.Hash| + * function(!webdriver.WebDriver): !webdriver.WebElement)} frame + * The frame identifier. + * @return {!until.Condition.} A new condition. + */ + function ableToSwitchToFrame(frame: number): Condition; + function ableToSwitchToFrame(frame: IWebElement): Condition; + function ableToSwitchToFrame(frame: Locator): Condition; + function ableToSwitchToFrame(frame: (webdriver: WebDriver) => IWebElement): Condition; + function ableToSwitchToFrame(frame: any): Condition; + + /** + * Creates a condition that waits for an alert to be opened. Upon success, the + * returned promise will be fulfilled with the handle for the opened alert. + * + * @return {!until.Condition.} The new condition. + */ + function alertIsPresent(): Condition; + + /** + * Creates a condition that will wait for the given element to be disabled. + * + * @param {!webdriver.WebElement} element The element to test. + * @return {!until.Condition.} The new condition. + * @see webdriver.WebDriver#isEnabled + */ + function elementIsDisabled(element: IWebElement): Condition; + + /** + * Creates a condition that will wait for the given element to be enabled. + * + * @param {!webdriver.WebElement} element The element to test. + * @return {!until.Condition.} The new condition. + * @see webdriver.WebDriver#isEnabled + */ + function elementIsEnabled(element: IWebElement): Condition; + + /** + * Creates a condition that will wait for the given element to be deselected. + * + * @param {!webdriver.WebElement} element The element to test. + * @return {!until.Condition.} The new condition. + * @see webdriver.WebDriver#isSelected + */ + function elementIsNotSelected(element: IWebElement): Condition; + + /** + * Creates a condition that will wait for the given element to be in the DOM, + * yet not visible to the user. + * + * @param {!webdriver.WebElement} element The element to test. + * @return {!until.Condition.} The new condition. + * @see webdriver.WebDriver#isDisplayed + */ + function elementIsNotVisible(element: IWebElement): Condition; + + /** + * Creates a condition that will wait for the given element to be selected. + * @param {!webdriver.WebElement} element The element to test. + * @return {!until.Condition.} The new condition. + * @see webdriver.WebDriver#isSelected + */ + function elementIsSelected(element: IWebElement): Condition; + + /** + * Creates a condition that will wait for the given element to become visible. + * + * @param {!webdriver.WebElement} element The element to test. + * @return {!until.Condition.} The new condition. + * @see webdriver.WebDriver#isDisplayed + */ + function elementIsVisible(element: IWebElement): Condition; + + /** + * Creates a condition that will loop until an element is + * {@link webdriver.WebDriver#findElement found} with the given locator. + * + * @param {!(webdriver.Locator|webdriver.By.Hash|Function)} locator The locator * to use. + * @return {!until.Condition.} The new condition. */ - getServerUrl(): string; + function elementLocated(locator: Locator): Condition; + function elementLocated(locator: any): Condition; /** - * Sets the desired capabilities when requesting a new session. This will - * overwrite any previously set desired capabilities. - * @param {!(Object|webdriver.Capabilities)} capabilities The desired - * capabilities for a new session. - * @return {!webdriver.AbstractBuilder} This Builder instance for chain calling. + * Creates a condition that will wait for the given element's + * {@link webdriver.WebDriver#getText visible text} to contain the given + * substring. + * + * @param {!webdriver.WebElement} element The element to test. + * @param {string} substr The substring to search for. + * @return {!until.Condition.} The new condition. + * @see webdriver.WebDriver#getText */ - withCapabilities(capabilities: webdriver.Capabilities): AbstractBuilder; - withCapabilities(capabilities: any): AbstractBuilder; + function elementTextContains(element: IWebElement, substr: string): Condition; /** - * @return {!webdriver.Capabilities} The current desired capabilities for this - * builder. + * Creates a condition that will wait for the given element's + * {@link webdriver.WebDriver#getText visible text} to match the given + * {@code text} exactly. + * + * @param {!webdriver.WebElement} element The element to test. + * @param {string} text The expected text. + * @return {!until.Condition.} The new condition. + * @see webdriver.WebDriver#getText */ - getCapabilities(): webdriver.Capabilities; + function elementTextIs(element: IWebElement, text: string): Condition; /** - * Builds a new {@link webdriver.WebDriver} instance using this builder's - * current configuration. - * @return {!webdriver.WebDriver} A new WebDriver client. + * Creates a condition that will wait for the given element's + * {@link webdriver.WebDriver#getText visible text} to match a regular + * expression. + * + * @param {!webdriver.WebElement} element The element to test. + * @param {!RegExp} regex The regular expression to test against. + * @return {!until.Condition.} The new condition. + * @see webdriver.WebDriver#getText */ - build(): webdriver.WebDriver; + function elementTextMatches(element: IWebElement, regex: RegExp): Condition; - //endregion + /** + * Creates a condition that will loop until at least one element is + * {@link webdriver.WebDriver#findElement found} with the given locator. + * + * @param {!(webdriver.Locator|webdriver.By.Hash|Function)} locator The locator + * to use. + * @return {!until.Condition.>} The new + * condition. + */ + function elementsLocated(locator: Locator): Condition; + function elementsLocated(locator: any): Condition; + + /** + * Creates a condition that will wait for the given element to become stale. An + * element is considered stale once it is removed from the DOM, or a new page + * has loaded. + * + * @param {!webdriver.WebElement} element The element that should become stale. + * @return {!until.Condition.} The new condition. + */ + function stalenessOf(element: IWebElement): Condition; + + /** + * Creates a condition that will wait for the current page's title to contain + * the given substring. + * + * @param {string} substr The substring that should be present in the page + * title. + * @return {!until.Condition.} The new condition. + */ + function titleContains(substr: string): Condition; + + /** + * Creates a condition that will wait for the current page's title to match the + * given value. + * + * @param {string} title The expected page title. + * @return {!until.Condition.} The new condition. + */ + function titleIs(title: string): Condition; + + /** + * Creates a condition that will wait for the current page's title to match the + * given regular expression. + * + * @param {!RegExp} regex The regular expression to test against. + * @return {!until.Condition.} The new condition. + */ + function titleMatches(regex: RegExp): Condition; } interface ILocation { @@ -909,89 +1973,95 @@ declare module webdriver { y: number; } + interface ISize { + width: number; + height: number; + } + /** * Enumeration of the buttons used in the advanced interactions API. * NOTE: A TypeScript enum was not used so that this class could be extended in Protractor. * @enum {number} */ - class Button { - static LEFT: number; - static MIDDLE: number; - static RIGHT: number; + interface IButton { + LEFT: number; + MIDDLE: number; + RIGHT: number; } + var Button: IButton + /** * Representations of pressable keys that aren't text. These are stored in * the Unicode PUA (Private Use Area) code points, 0xE000-0xF8FF. Refer to * http://www.google.com.au/search?&q=unicode+pua&btnG=Search - * NOTE: A class was used instead of an Enum so that it could be extended in Protractor * * @enum {string} */ - class Key { - static NULL: string; - static CANCEL: string; // ^break - static HELP: string; - static BACK_SPACE: string; - static TAB: string; - static CLEAR: string; - static RETURN: string; - static ENTER: string; - static SHIFT: string; - static CONTROL: string; - static ALT: string; - static PAUSE: string; - static ESCAPE: string; - static SPACE: string; - static PAGE_UP: string; - static PAGE_DOWN: string; - static END: string; - static HOME: string; - static ARROW_LEFT: string; - static LEFT: string; - static ARROW_UP: string; - static UP: string; - static ARROW_RIGHT: string; - static RIGHT: string; - static ARROW_DOWN: string; - static DOWN: string; - static INSERT: string; - static DELETE: string; - static SEMICOLON: string; - static EQUALS: string; + interface IKey { + NULL: string; + CANCEL: string; // ^break + HELP: string; + BACK_SPACE: string; + TAB: string; + CLEAR: string; + RETURN: string; + ENTER: string; + SHIFT: string; + CONTROL: string; + ALT: string; + PAUSE: string; + ESCAPE: string; + SPACE: string; + PAGE_UP: string; + PAGE_DOWN: string; + END: string; + HOME: string; + ARROW_LEFT: string; + LEFT: string; + ARROW_UP: string; + UP: string; + ARROW_RIGHT: string; + RIGHT: string; + ARROW_DOWN: string; + DOWN: string; + INSERT: string; + DELETE: string; + SEMICOLON: string; + EQUALS: string; - static NUMPAD0: string; // number pad keys - static NUMPAD1: string; - static NUMPAD2: string; - static NUMPAD3: string; - static NUMPAD4: string; - static NUMPAD5: string; - static NUMPAD6: string; - static NUMPAD7: string; - static NUMPAD8: string; - static NUMPAD9: string; - static MULTIPLY: string; - static ADD: string; - static SEPARATOR: string; - static SUBTRACT: string; - static DECIMAL: string; - static DIVIDE: string; + NUMPAD0: string; // number pad keys + NUMPAD1: string; + NUMPAD2: string; + NUMPAD3: string; + NUMPAD4: string; + NUMPAD5: string; + NUMPAD6: string; + NUMPAD7: string; + NUMPAD8: string; + NUMPAD9: string; + MULTIPLY: string; + ADD: string; + SEPARATOR: string; + SUBTRACT: string; + DECIMAL: string; + DIVIDE: string; - static F1: string; // function keys - static F2: string; - static F3: string; - static F4: string; - static F5: string; - static F6: string; - static F7: string; - static F8: string; - static F9: string; - static F10: string; - static F11: string; - static F12: string; + F1: string; // function keys + F2: string; + F3: string; + F4: string; + F5: string; + F6: string; + F7: string; + F8: string; + F9: string; + F10: string; + F11: string; + F12: string; - static COMMAND: string; // Apple command key - static META: string; // alias for Windows key + COMMAND: string; // Apple command key + META: string; // alias for Windows key /** * Simulate pressing many keys at once in a "chord". Takes a sequence of @@ -1006,9 +2076,11 @@ declare module webdriver { * @return {string} The null-terminated key sequence. * @see http://code.google.com/p/webdriver/issues/detail?id=79 */ - static chord(...var_args: string[]): string; + chord: (...var_args: string[]) => string; } + var Key: IKey; + /** * Class for defining sequences of complex user interactions. Each sequence * will not be executed until {@link #perform} is called. @@ -1032,7 +2104,7 @@ declare module webdriver { * @param {!webdriver.WebDriver} driver The driver instance to use. * @constructor */ - constructor(driver: webdriver.WebDriver); + constructor(driver: WebDriver); //endregion @@ -1043,7 +2115,7 @@ declare module webdriver { * @return {!webdriver.promise.Promise} A promise that will be resolved once * this sequence has completed. */ - perform(): webdriver.promise.Promise; + perform(): webdriver.promise.Promise; /** * Moves the mouse. The location to move to may be specified in terms of the @@ -1055,8 +2127,8 @@ declare module webdriver { * Defaults to (0, 0). * @return {!webdriver.ActionSequence} A self reference. */ - mouseMove(location: webdriver.WebElement, opt_offset?: ILocation): ActionSequence - mouseMove(location: ILocation): ActionSequence + mouseMove(location: IWebElement, opt_offset?: ILocation): ActionSequence; + mouseMove(location: ILocation): ActionSequence; /** * Presses a mouse button. The mouse button will not be released until @@ -1080,7 +2152,7 @@ declare module webdriver { * first argument. * @return {!webdriver.ActionSequence} A self reference. */ - mouseDown(opt_elementOrButton?: webdriver.WebElement, opt_button?: number): ActionSequence; + mouseDown(opt_elementOrButton?: IWebElement, opt_button?: number): ActionSequence; mouseDown(opt_elementOrButton?: number): ActionSequence; /** @@ -1103,7 +2175,7 @@ declare module webdriver { * first argument. * @return {!webdriver.ActionSequence} A self reference. */ - mouseUp(opt_elementOrButton?: webdriver.WebElement, opt_button?: number): ActionSequence; + mouseUp(opt_elementOrButton?: IWebElement, opt_button?: number): ActionSequence; mouseUp(opt_elementOrButton?: number): ActionSequence; /** @@ -1115,8 +2187,8 @@ declare module webdriver { * location to drag to, either as another WebElement or an offset in pixels. * @return {!webdriver.ActionSequence} A self reference. */ - dragAndDrop(element: webdriver.WebElement, location: webdriver.WebElement): ActionSequence; - dragAndDrop(element: webdriver.WebElement, location: ILocation): ActionSequence; + dragAndDrop(element: IWebElement, location: IWebElement): ActionSequence; + dragAndDrop(element: IWebElement, location: ILocation): ActionSequence; /** * Clicks a mouse button. @@ -1134,7 +2206,7 @@ declare module webdriver { * first argument. * @return {!webdriver.ActionSequence} A self reference. */ - click(opt_elementOrButton?: webdriver.WebElement, opt_button?: number): ActionSequence; + click(opt_elementOrButton?: IWebElement, opt_button?: number): ActionSequence; click(opt_elementOrButton?: number): ActionSequence; /** @@ -1156,7 +2228,7 @@ declare module webdriver { * first argument. * @return {!webdriver.ActionSequence} A self reference. */ - doubleClick(opt_elementOrButton?: webdriver.WebElement, opt_button?: number): ActionSequence; + doubleClick(opt_elementOrButton?: IWebElement, opt_button?: number): ActionSequence; doubleClick(opt_elementOrButton?: number): ActionSequence; /** @@ -1199,24 +2271,8 @@ declare module webdriver { * {@code prompt}. Provides functions to retrieve the message displayed with * the alert, accept or dismiss the alert, and set the response text (in the * case of {@code prompt}). - * @extends {webdriver.promise.Deferred} */ - class Alert extends webdriver.promise.Deferred { - - //region Constructors - - /** - * @param {!webdriver.WebDriver} driver The driver controlling the browser this - * alert is attached to. - * @param {!(string|webdriver.promise.Promise)} text Either the message text - * displayed with this alert, or a promise that will be resolved to said - * text. - * @constructor - */ - constructor(driver: webdriver.WebDriver, text: string); - constructor(driver: webdriver.WebDriver, text: webdriver.promise.Promise); - - //endregion + interface Alert { //region Methods @@ -1226,21 +2282,21 @@ declare module webdriver { * @return {!webdriver.promise.Promise} A promise that will be resolved to the * text displayed with this alert. */ - getText(): webdriver.promise.Promise; + getText(): webdriver.promise.Promise; /** * Accepts this alert. * @return {!webdriver.promise.Promise} A promise that will be resolved when * this command has completed. */ - accept(): webdriver.promise.Promise; + accept(): webdriver.promise.Promise; /** * Dismisses this alert. * @return {!webdriver.promise.Promise} A promise that will be resolved when * this command has completed. */ - dismiss(): webdriver.promise.Promise; + dismiss(): webdriver.promise.Promise; /** * Sets the response text on this alert. This command will return an error if @@ -1250,35 +2306,56 @@ declare module webdriver { * @return {!webdriver.promise.Promise} A promise that will be resolved when * this command has completed. */ - sendKeys(text: string): webdriver.promise.Promise; + sendKeys(text: string): webdriver.promise.Promise; //endregion } + /** + * AlertPromise is a promise that will be fulfilled with an Alert. This promise + * serves as a forward proxy on an Alert, allowing calls to be scheduled + * directly on this instance before the underlying Alert has been fulfilled. In + * other words, the following two statements are equivalent: + *


+     *     driver.switchTo().alert().dismiss();
+     *     driver.switchTo().alert().then(function(alert) {
+     *       return alert.dismiss();
+     *     });
+     * 
+ * + * @param {!webdriver.WebDriver} driver The driver controlling the browser this + * alert is attached to. + * @param {!webdriver.promise.Thenable.} alert A thenable + * that will be fulfilled with the promised alert. + * @constructor + * @extends {webdriver.Alert} + * @implements {webdriver.promise.Thenable.} + * @final + */ + interface AlertPromise extends Alert, webdriver.promise.IThenable { + } + /** * An error returned to indicate that there is an unhandled modal dialog on the * current page. * @extends {bot.Error} */ - class UnhandledAlertError extends webdriver.error.Error { - //region Constructors - - /** - * @param {string} message The error message. - * @param {!webdriver.Alert} alert The alert handle. - * @constructor - */ - constructor(message: string, alert: webdriver.Alert); - - //endregion - + interface UnhandledAlertError extends webdriver.error.Error { //region Methods /** - * @return {!webdriver.Alert} The open alert. + * @return {string} The text displayed with the unhandled alert. */ - getAlert(): webdriver.Alert; + getAlertText(): string; + + /** + * @return {!webdriver.Alert} The open alert. + * @deprecated Use {@link #getAlertText}. This method will be removed in + * 2.45.0. + */ + getAlert(): Alert; + //endregion } @@ -1287,23 +2364,31 @@ declare module webdriver { * Recognized browser names. * @enum {string} */ - class Browser { - static ANDROID: string; - static CHROME: string; - static FIREFOX: string; - static INTERNET_EXPLORER: string; - static IPAD: string; - static IPHONE: string; - static OPERA: string; - static PHANTOM_JS: string; - static SAFARI: string; - static HTMLUNIT: string; + interface IBrowser { + ANDROID: string; + CHROME: string; + FIREFOX: string; + INTERNET_EXPLORER: string; + IPAD: string; + IPHONE: string; + OPERA: string; + PHANTOM_JS: string; + SAFARI: string; + HTMLUNIT: string; } - /** - * @extends {webdriver.AbstractBuilder} - */ - class Builder extends AbstractBuilder { + var Browser: IBrowser + + interface ProxyConfig { + proxyType: string; + proxyAutoconfigUrl?: string; + ftpProxy?: string; + httpProxy?: string; + sslProxy?: string; + noProxy?: string; + } + + class Builder { //region Constructors @@ -1314,43 +2399,146 @@ declare module webdriver { //endregion - //region Static Properties - - /** - * Environment variable that defines the session ID of an existing WebDriver - * session to use when creating clients. If set, all new Builder instances will - * default to creating clients that use this session. To create a new session, - * use {@code #useExistingSession(boolean)}. The use of this environment - * variable requires that {@link webdriver.AbstractBuilder.SERVER_URL_ENV} also - * be set. - * @type {string} - * @const - * @see webdriver.process.getEnv - */ - static SESSION_ID_ENV: string; - - //endregion - //region Methods /** - * Configures the builder to create a client that will use an existing WebDriver - * session. - * @param {string} id The existing session ID to use. - * @return {!webdriver.AbstractBuilder} This Builder instance for chain calling. + * Creates a new WebDriver client based on this builder's current + * configuration. + * + * @return {!webdriver.WebDriver} A new WebDriver instance. + * @throws {Error} If the current configuration is invalid. */ - usingSession(id: string): webdriver.AbstractBuilder; + build(): WebDriver; /** - * @return {string} The ID of the session, if any, this builder is configured - * to reuse. + * Configures the target browser for clients created by this instance. + * Any calls to {@link #withCapabilities} after this function will + * overwrite these settings. + * + *

You may also define the target browser using the {@code SELENIUM_BROWSER} + * environment variable. If set, this environment variable should be of the + * form {@code browser[:[version][:platform]]}. + * + * @param {(string|webdriver.Browser)} name The name of the target browser; + * common defaults are available on the {@link webdriver.Browser} enum. + * @param {string=} opt_version A desired version; may be omitted if any + * version should be used. + * @param {string=} opt_platform The desired platform; may be omitted if any + * version may be used. + * @return {!Builder} A self reference. */ - getSession(): string; + forBrowser(name: string, opt_version?: string, opt_platform?: string): Builder; /** - * @override + * Returns the base set of capabilities this instance is currently configured + * to use. + * @return {!webdriver.Capabilities} The current capabilities for this builder. */ - build(): webdriver.WebDriver; + getCapabilities(): Capabilities; + + /** + * @return {string} The URL of the WebDriver server this instance is configured + * to use. + */ + getServerUrl(): string; + + /** + * Sets the default action to take with an unexpected alert before returning + * an error. + * @param {string} beahvior The desired behavior; should be "accept", "dismiss", + * or "ignore". Defaults to "dismiss". + * @return {!Builder} A self reference. + */ + setAlertBehavior(behavior: string): Builder; + + /** + * Sets Chrome-specific options for drivers created by this builder. Any + * logging or proxy settings defined on the given options will take precedence + * over those set through {@link #setLoggingPrefs} and {@link #setProxy}, + * respectively. + * + * @param {!chrome.Options} options The ChromeDriver options to use. + * @return {!Builder} A self reference. + */ + setChromeOptions(options: chrome.Options): Builder; + + /** + * Sets the control flow that created drivers should execute actions in. If + * the flow is never set, or is set to {@code null}, it will use the active + * flow at the time {@link #build()} is called. + * @param {webdriver.promise.ControlFlow} flow The control flow to use, or + * {@code null} to + * @return {!Builder} A self reference. + */ + setControlFlow(flow: webdriver.promise.ControlFlow): Builder; + + /** + * Sets whether native events should be used. + * @param {boolean} enabled Whether to enable native events. + * @return {!Builder} A self reference. + */ + setEnableNativeEvents(enabled: boolean): Builder; + + /** + * Sets Firefox-specific options for drivers created by this builder. Any + * logging or proxy settings defined on the given options will take precedence + * over those set through {@link #setLoggingPrefs} and {@link #setProxy}, + * respectively. + * + * @param {!firefox.Options} options The FirefoxDriver options to use. + * @return {!Builder} A self reference. + */ + setFirefoxOptions(options: firefox.Options): Builder; + + /** + * Sets the logging preferences for the created session. Preferences may be + * changed by repeated calls, or by calling {@link #withCapabilities}. + * @param {!(webdriver.logging.Preferences|Object.)} prefs The + * desired logging preferences. + * @return {!Builder} A self reference. + */ + setLoggingPrefs(prefs: webdriver.logging.Preferences): Builder; + setLoggingPrefs(prefs: { [key: string]: string }): Builder; + + /** + * Sets the proxy configuration to use for WebDriver clients created by this + * builder. Any calls to {@link #withCapabilities} after this function will + * overwrite these settings. + * @param {!webdriver.ProxyConfig} config The configuration to use. + * @return {!Builder} A self reference. + */ + setProxy(config: ProxyConfig): Builder; + + /** + * Sets how elements should be scrolled into view for interaction. + * @param {number} behavior The desired scroll behavior: either 0 to align with + * the top of the viewport or 1 to align with the bottom. + * @return {!Builder} A self reference. + */ + setScrollBehavior(behavior: number): Builder; + + /** + * Sets the URL of a remote WebDriver server to use. Once a remote URL has been + * specified, the builder direct all new clients to that server. If this method + * is never called, the Builder will attempt to create all clients locally. + * + *

As an alternative to this method, you may also set the + * {@code SELENIUM_REMOTE_URL} environment variable. + * + * @param {string} url The URL of a remote server to use. + * @return {!Builder} A self reference. + */ + usingServer(url: string): Builder; + + /** + * Sets the desired capabilities when requesting a new session. This will + * overwrite any previously set capabilities. + * @param {!(Object|webdriver.Capabilities)} capabilities The desired + * capabilities for a new session. + * @return {!Builder} A self reference. + */ + withCapabilities(capabilities: Capabilities): Builder; + withCapabilities(capabilities: any): Builder; //endregion } @@ -1359,7 +2547,7 @@ declare module webdriver { * Common webdriver capability keys. * @enum {string} */ - class Capability { + interface ICapability { /** * Indicates whether a driver should accept all SSL certs by default. This @@ -1367,26 +2555,39 @@ declare module webdriver { * a driver can handle insecure SSL certs, see * {@link webdriver.Capability.SECURE_SSL}. */ - static ACCEPT_SSL_CERTS: string; + ACCEPT_SSL_CERTS: string; /** * The browser name. Common browser names are defined in the * {@link webdriver.Browser} enum. */ - static BROWSER_NAME: string; + BROWSER_NAME: string; + + /** + * Defines how elements should be scrolled into the viewport for interaction. + * This capability will be set to zero (0) if elements are aligned with the + * top of the viewport, or one (1) if aligned with the bottom. The default + * behavior is to align with the top of the viewport. + */ + ELEMENT_SCROLL_BEHAVIOR: string; /** * Whether the driver is capable of handling modal alerts (e.g. alert, * confirm, prompt). To define how a driver should handle alerts, * use {@link webdriver.Capability.UNEXPECTED_ALERT_BEHAVIOR}. */ - static HANDLES_ALERTS: string; + HANDLES_ALERTS: string; /** * Key for the logging driver logging preferences. */ - static LOGGING_PREFS: string; + LOGGING_PREFS: string; + + /** + * Whether this session generates native events when simulating user input. + */ + NATIVE_EVENTS: string; /** * Describes the platform the browser is running on. Will be one of @@ -1394,54 +2595,50 @@ declare module webdriver { * session, ANY may be used to indicate no platform preference (this is * semantically equivalent to omitting the platform capability). */ - static PLATFORM: string; + PLATFORM: string; /** * Describes the proxy configuration to use for a new WebDriver session. */ - static PROXY: string; + PROXY: string; /** Whether the driver supports changing the brower's orientation. */ - static ROTATABLE: string; + ROTATABLE: string; /** * Whether a driver is only capable of handling secure SSL certs. To request * that a driver accept insecure SSL certs by default, use * {@link webdriver.Capability.ACCEPT_SSL_CERTS}. */ - static SECURE_SSL: string; + SECURE_SSL: string; /** Whether the driver supports manipulating the app cache. */ - static SUPPORTS_APPLICATION_CACHE: string; - - /** - * Whether the driver supports controlling the browser's internet - * connectivity. - */ - static SUPPORTS_BROWSER_CONNECTION: string; + SUPPORTS_APPLICATION_CACHE: string; /** Whether the driver supports locating elements with CSS selectors. */ - static SUPPORTS_CSS_SELECTORS: string; + SUPPORTS_CSS_SELECTORS: string; /** Whether the browser supports JavaScript. */ - static SUPPORTS_JAVASCRIPT: string; + SUPPORTS_JAVASCRIPT: string; /** Whether the driver supports controlling the browser's location info. */ - static SUPPORTS_LOCATION_CONTEXT: string; + SUPPORTS_LOCATION_CONTEXT: string; /** Whether the driver supports taking screenshots. */ - static TAKES_SCREENSHOT: string; + TAKES_SCREENSHOT: string; /** * Defines how the driver should handle unexpected alerts. The value should * be one of "accept", "dismiss", or "ignore. */ - static UNEXPECTED_ALERT_BEHAVIOR: string; + UNEXPECTED_ALERT_BEHAVIOR: string; /** Defines the browser version. */ - static VERSION: string; + VERSION: string; } + var Capability: ICapability; + class Capabilities { //region Constructors @@ -1478,6 +2675,51 @@ declare module webdriver { */ set(key: string, value: any): Capabilities; + /** + * Sets the logging preferences. Preferences may be specified as a + * {@link webdriver.logging.Preferences} instance, or a as a map of log-type to + * log-level. + * @param {!(webdriver.logging.Preferences|Object.)} prefs The + * logging preferences. + * @return {!webdriver.Capabilities} A self reference. + */ + setLoggingPrefs(prefs: webdriver.logging.Preferences): Capabilities; + setLoggingPrefs(prefs: { [key: string]: string }): Capabilities; + + + /** + * Sets the proxy configuration for this instance. + * @param {webdriver.ProxyConfig} proxy The desired proxy configuration. + * @return {!webdriver.Capabilities} A self reference. + */ + setProxy(proxy: ProxyConfig): Capabilities; + + + /** + * Sets whether native events should be used. + * @param {boolean} enabled Whether to enable native events. + * @return {!webdriver.Capabilities} A self reference. + */ + setEnableNativeEvents(enabled: boolean): Capabilities; + + + /** + * Sets how elements should be scrolled into view for interaction. + * @param {number} behavior The desired scroll behavior: either 0 to align with + * the top of the viewport or 1 to align with the bottom. + * @return {!webdriver.Capabilities} A self reference. + */ + setScrollBehavior(behavior: number): Capabilities; + + /** + * Sets the default action to take with an unexpected alert before returning + * an error. + * @param {string} behavior The desired behavior; should be "accept", "dismiss", + * or "ignore". Defaults to "dismiss". + * @return {!webdriver.Capabilities} A self reference. + */ + setAlertBehavior(behavior: string): Capabilities; + /** * @param {string} key The capability to return. * @return {*} The capability with the given key, or {@code null} if it has @@ -1558,129 +2800,130 @@ declare module webdriver { /** * An enumeration of valid command string. - * NOTE: A Class was used instead of an Enum so that the class could be extended in Protractor. */ - class CommandName { - static GET_SERVER_STATUS: string; + interface ICommandName { + GET_SERVER_STATUS: string; - static NEW_SESSION: string; - static GET_SESSIONS: string; - static DESCRIBE_SESSION: string; + NEW_SESSION: string; + GET_SESSIONS: string; + DESCRIBE_SESSION: string; - static CLOSE: string; - static QUIT: string; + CLOSE: string; + QUIT: string; - static GET_CURRENT_URL: string; - static GET: string; - static GO_BACK: string; - static GO_FORWARD: string; - static REFRESH: string; + GET_CURRENT_URL: string; + GET: string; + GO_BACK: string; + GO_FORWARD: string; + REFRESH: string; - static ADD_COOKIE: string; - static GET_COOKIE: string; - static GET_ALL_COOKIES: string; - static DELETE_COOKIE: string; - static DELETE_ALL_COOKIES: string; + ADD_COOKIE: string; + GET_COOKIE: string; + GET_ALL_COOKIES: string; + DELETE_COOKIE: string; + DELETE_ALL_COOKIES: string; - static GET_ACTIVE_ELEMENT: string; - static FIND_ELEMENT: string; - static FIND_ELEMENTS: string; - static FIND_CHILD_ELEMENT: string; - static FIND_CHILD_ELEMENTS: string; + GET_ACTIVE_ELEMENT: string; + FIND_ELEMENT: string; + FIND_ELEMENTS: string; + FIND_CHILD_ELEMENT: string; + FIND_CHILD_ELEMENTS: string; - static CLEAR_ELEMENT: string; - static CLICK_ELEMENT: string; - static SEND_KEYS_TO_ELEMENT: string; - static SUBMIT_ELEMENT: string; + CLEAR_ELEMENT: string; + CLICK_ELEMENT: string; + SEND_KEYS_TO_ELEMENT: string; + SUBMIT_ELEMENT: string; - static GET_CURRENT_WINDOW_HANDLE: string; - static GET_WINDOW_HANDLES: string; - static GET_WINDOW_POSITION: string; - static SET_WINDOW_POSITION: string; - static GET_WINDOW_SIZE: string; - static SET_WINDOW_SIZE: string; - static MAXIMIZE_WINDOW: string; + GET_CURRENT_WINDOW_HANDLE: string; + GET_WINDOW_HANDLES: string; + GET_WINDOW_POSITION: string; + SET_WINDOW_POSITION: string; + GET_WINDOW_SIZE: string; + SET_WINDOW_SIZE: string; + MAXIMIZE_WINDOW: string; - static SWITCH_TO_WINDOW: string; - static SWITCH_TO_FRAME: string; - static GET_PAGE_SOURCE: string; - static GET_TITLE: string; + SWITCH_TO_WINDOW: string; + SWITCH_TO_FRAME: string; + GET_PAGE_SOURCE: string; + GET_TITLE: string; - static EXECUTE_SCRIPT: string; - static EXECUTE_ASYNC_SCRIPT: string; + EXECUTE_SCRIPT: string; + EXECUTE_ASYNC_SCRIPT: string; - static GET_ELEMENT_TEXT: string; - static GET_ELEMENT_TAG_NAME: string; - static IS_ELEMENT_SELECTED: string; - static IS_ELEMENT_ENABLED: string; - static IS_ELEMENT_DISPLAYED: string; - static GET_ELEMENT_LOCATION: string; - static GET_ELEMENT_LOCATION_IN_VIEW: string; - static GET_ELEMENT_SIZE: string; - static GET_ELEMENT_ATTRIBUTE: string; - static GET_ELEMENT_VALUE_OF_CSS_PROPERTY: string; - static ELEMENT_EQUALS: string; + GET_ELEMENT_TEXT: string; + GET_ELEMENT_TAG_NAME: string; + IS_ELEMENT_SELECTED: string; + IS_ELEMENT_ENABLED: string; + IS_ELEMENT_DISPLAYED: string; + GET_ELEMENT_LOCATION: string; + GET_ELEMENT_LOCATION_IN_VIEW: string; + GET_ELEMENT_SIZE: string; + GET_ELEMENT_ATTRIBUTE: string; + GET_ELEMENT_VALUE_OF_CSS_PROPERTY: string; + ELEMENT_EQUALS: string; - static SCREENSHOT: string; - static IMPLICITLY_WAIT: string; - static SET_SCRIPT_TIMEOUT: string; - static SET_TIMEOUT: string; + SCREENSHOT: string; + IMPLICITLY_WAIT: string; + SET_SCRIPT_TIMEOUT: string; + SET_TIMEOUT: string; - static ACCEPT_ALERT: string; - static DISMISS_ALERT: string; - static GET_ALERT_TEXT: string; - static SET_ALERT_TEXT: string; + ACCEPT_ALERT: string; + DISMISS_ALERT: string; + GET_ALERT_TEXT: string; + SET_ALERT_TEXT: string; - static EXECUTE_SQL: string; - static GET_LOCATION: string; - static SET_LOCATION: string; - static GET_APP_CACHE: string; - static GET_APP_CACHE_STATUS: string; - static CLEAR_APP_CACHE: string; - static IS_BROWSER_ONLINE: string; - static SET_BROWSER_ONLINE: string; + EXECUTE_SQL: string; + GET_LOCATION: string; + SET_LOCATION: string; + GET_APP_CACHE: string; + GET_APP_CACHE_STATUS: string; + CLEAR_APP_CACHE: string; + IS_BROWSER_ONLINE: string; + SET_BROWSER_ONLINE: string; - static GET_LOCAL_STORAGE_ITEM: string; - static GET_LOCAL_STORAGE_KEYS: string; - static SET_LOCAL_STORAGE_ITEM: string; - static REMOVE_LOCAL_STORAGE_ITEM: string; - static CLEAR_LOCAL_STORAGE: string; - static GET_LOCAL_STORAGE_SIZE: string; + GET_LOCAL_STORAGE_ITEM: string; + GET_LOCAL_STORAGE_KEYS: string; + SET_LOCAL_STORAGE_ITEM: string; + REMOVE_LOCAL_STORAGE_ITEM: string; + CLEAR_LOCAL_STORAGE: string; + GET_LOCAL_STORAGE_SIZE: string; - static GET_SESSION_STORAGE_ITEM: string; - static GET_SESSION_STORAGE_KEYS: string; - static SET_SESSION_STORAGE_ITEM: string; - static REMOVE_SESSION_STORAGE_ITEM: string; - static CLEAR_SESSION_STORAGE: string; - static GET_SESSION_STORAGE_SIZE: string; + GET_SESSION_STORAGE_ITEM: string; + GET_SESSION_STORAGE_KEYS: string; + SET_SESSION_STORAGE_ITEM: string; + REMOVE_SESSION_STORAGE_ITEM: string; + CLEAR_SESSION_STORAGE: string; + GET_SESSION_STORAGE_SIZE: string; - static SET_SCREEN_ORIENTATION: string; - static GET_SCREEN_ORIENTATION: string; + SET_SCREEN_ORIENTATION: string; + GET_SCREEN_ORIENTATION: string; // These belong to the Advanced user interactions - an element is // optional for these commands. - static CLICK: string; - static DOUBLE_CLICK: string; - static MOUSE_DOWN: string; - static MOUSE_UP: string; - static MOVE_TO: string; - static SEND_KEYS_TO_ACTIVE_ELEMENT: string; + CLICK: string; + DOUBLE_CLICK: string; + MOUSE_DOWN: string; + MOUSE_UP: string; + MOVE_TO: string; + SEND_KEYS_TO_ACTIVE_ELEMENT: string; // These belong to the Advanced Touch API - static TOUCH_SINGLE_TAP: string; - static TOUCH_DOWN: string; - static TOUCH_UP: string; - static TOUCH_MOVE: string; - static TOUCH_SCROLL: string; - static TOUCH_DOUBLE_TAP: string; - static TOUCH_LONG_PRESS: string; - static TOUCH_FLICK: string; + TOUCH_SINGLE_TAP: string; + TOUCH_DOWN: string; + TOUCH_UP: string; + TOUCH_MOVE: string; + TOUCH_SCROLL: string; + TOUCH_DOUBLE_TAP: string; + TOUCH_LONG_PRESS: string; + TOUCH_FLICK: string; - static GET_AVAILABLE_LOG_TYPES: string; - static GET_LOG: string; - static GET_SESSION_LOGS: string; + GET_AVAILABLE_LOG_TYPES: string; + GET_LOG: string; + GET_SESSION_LOGS: string; } + var CommandName: ICommandName; + /** * Describes a command to be executed by the WebDriverJS framework. * @param {!webdriver.CommandName} name The name of this command. @@ -1710,14 +2953,14 @@ declare module webdriver { * @param {*} value The parameter value. * @return {!webdriver.Command} A self reference. */ - setParameter(name: string, value: any): webdriver.Command; + setParameter(name: string, value: any): Command; /** * Sets the parameters for this command. * @param {!Object.<*>} parameters The command parameters. * @return {!webdriver.Command} A self reference. */ - setParameters(parameters: any): webdriver.Command; + setParameters(parameters: any): Command; /** * Returns a named command parameter. @@ -1747,7 +2990,7 @@ declare module webdriver { * @param {function(Error, !bot.response.ResponseObject=)} callback the function * to invoke when the command response is ready. */ - execute(command: webdriver.Command, callback: (error: Error, responseObject: any) => any ): void; + execute(command: Command, callback: (error: Error, responseObject: any) => any ): void; } /** @@ -1781,7 +3024,7 @@ declare module webdriver { * scope: (Object|undefined)}>} The registered listeners for * the given event type. */ - listeners(type: string): Array<{fn: any; oneshot: boolean; scope: any;}>; + listeners(type: string): Array<{fn: Function; oneshot: boolean; scope: any;}>; /** * Registers a listener. @@ -1790,7 +3033,7 @@ declare module webdriver { * @param {Object=} opt_scope The object in whose scope to invoke the listener. * @return {!webdriver.EventEmitter} A self reference. */ - addListener(type: string, listenerFn: any, opt_scope?:any): EventEmitter; + addListener(type: string, listenerFn: Function, opt_scope?:any): EventEmitter; /** * Registers a one-time listener which will be called only the first time an @@ -1809,7 +3052,7 @@ declare module webdriver { * @param {Object=} opt_scope The object in whose scope to invoke the listener. * @return {!webdriver.EventEmitter} A self reference. */ - on(type: string, listenerFn: any, opt_scope?:any): EventEmitter; + on(type: string, listenerFn: Function, opt_scope?:any): EventEmitter; /** * Removes a previously registered event listener. @@ -1817,7 +3060,7 @@ declare module webdriver { * @param {!Function} listenerFn The handler function to remove. * @return {!webdriver.EventEmitter} A self reference. */ - removeListener(type: string, listenerFn: any): EventEmitter; + removeListener(type: string, listenerFn: Function): EventEmitter; /** * Removes all listeners for a specific type of event. If no event is @@ -1830,48 +3073,17 @@ declare module webdriver { //endregion } - /** - * @implements {webdriver.CommandExecutor} - */ - class FirefoxDomExecutor implements webdriver.CommandExecutor { - //region Constructors - - /** - * @constructor - */ - constructor(); - - //endregion - - //region Static Methods - - /** - * @return {boolean} Whether the current environment supports the - * FirefoxDomExecutor. - */ - static isAvailable(): boolean; - - //endretion - - //region Methods - - /** @override */ - execute(command: webdriver.Command, callback: (error: Error, responseObject: any) => any ): void; - - //endregion - } - /** * Interface for navigating back and forth in the browser history. */ - class WebDriverNavigation { + interface WebDriverNavigation { //region Constructors /** * @param {!webdriver.WebDriver} driver The parent driver. * @constructor */ - constructor(driver: webdriver.WebDriver); + new (driver: WebDriver): WebDriverNavigation; //endregion @@ -1883,43 +3095,52 @@ declare module webdriver { * @return {!webdriver.promise.Promise} A promise that will be resolved when the * URL has been loaded. */ - to(url: string): webdriver.promise.Promise; + to(url: string): webdriver.promise.Promise; /** * Schedules a command to move backwards in the browser history. * @return {!webdriver.promise.Promise} A promise that will be resolved when the * navigation event has completed. */ - back(): webdriver.promise.Promise; + back(): webdriver.promise.Promise; /** * Schedules a command to move forwards in the browser history. * @return {!webdriver.promise.Promise} A promise that will be resolved when the * navigation event has completed. */ - forward(): webdriver.promise.Promise; + forward(): webdriver.promise.Promise; /** * Schedules a command to refresh the current page. * @return {!webdriver.promise.Promise} A promise that will be resolved when the * navigation event has completed. */ - refresh(): webdriver.promise.Promise; + refresh(): webdriver.promise.Promise; //endregion } + interface IWebDriverOptionsCookie { + name: string; + value: string; + path?: string; + domain?: string; + secure?: boolean; + expiry?: number; + } + /** * Provides methods for managing browser and driver state. */ - class WebDriverOptions { + interface WebDriverOptions { //region Constructors /** * @param {!webdriver.WebDriver} driver The parent driver. * @constructor */ - constructor(driver: webdriver.WebDriver); + new (driver: webdriver.WebDriver): WebDriverOptions; //endregion @@ -1937,15 +3158,15 @@ declare module webdriver { * @return {!webdriver.promise.Promise} A promise that will be resolved when the * cookie has been added to the page. */ - addCookie(name: string, value: string, opt_path?: string, opt_domain?: string, opt_isSecure?: boolean, opt_expiry?: number): webdriver.promise.Promise; - addCookie(name: string, value: string, opt_path?: string, opt_domain?: string, opt_isSecure?: boolean, opt_expiry?: Date): webdriver.promise.Promise; + addCookie(name: string, value: string, opt_path?: string, opt_domain?: string, opt_isSecure?: boolean, opt_expiry?: number): webdriver.promise.Promise; + addCookie(name: string, value: string, opt_path?: string, opt_domain?: string, opt_isSecure?: boolean, opt_expiry?: Date): webdriver.promise.Promise; /** * Schedules a command to delete all cookies visible to the current page. * @return {!webdriver.promise.Promise} A promise that will be resolved when all * cookies have been deleted. */ - deleteAllCookies(): webdriver.promise.Promise; + deleteAllCookies(): webdriver.promise.Promise; /** * Schedules a command to delete the cookie with the given name. This command is @@ -1955,7 +3176,7 @@ declare module webdriver { * @return {!webdriver.promise.Promise} A promise that will be resolved when the * cookie has been deleted. */ - deleteCookie(name: string): webdriver.promise.Promise; + deleteCookie(name: string): webdriver.promise.Promise; /** * Schedules a command to retrieve all cookies visible to the current page. @@ -1965,7 +3186,7 @@ declare module webdriver { * cookies visible to the current page. * @see http://code.google.com/p/selenium/wiki/JsonWireProtocol#Cookie_JSON_Object */ - getCookies(): webdriver.promise.Promise; + getCookies(): webdriver.promise.Promise; /** * Schedules a command to retrieve the cookie with the given name. Returns null @@ -1976,25 +3197,25 @@ declare module webdriver { * named cookie, or {@code null} if there is no such cookie. * @see http://code.google.com/p/selenium/wiki/JsonWireProtocol#Cookie_JSON_Object */ - getCookie(name: string): webdriver.promise.Promise; + getCookie(name: string): webdriver.promise.Promise; /** * @return {!webdriver.WebDriver.Logs} The interface for managing driver * logs. */ - logs(): webdriver.WebDriverLogs; + logs(): WebDriverLogs; /** * @return {!webdriver.WebDriver.Timeouts} The interface for managing driver * timeouts. */ - timeouts(): webdriver.WebDriverTimeouts; + timeouts(): WebDriverTimeouts; /** * @return {!webdriver.WebDriver.Window} The interface for managing the * current window. */ - window(): webdriver.WebDriverWindow; + window(): WebDriverWindow; //endregion } @@ -2002,14 +3223,14 @@ declare module webdriver { /** * An interface for managing timeout behavior for WebDriver instances. */ - class WebDriverTimeouts { + interface WebDriverTimeouts { //region Constructors /** * @param {!webdriver.WebDriver} driver The parent driver. * @constructor */ - constructor(driver: webdriver.WebDriver); + new (driver: WebDriver): WebDriverTimeouts; //endregion @@ -2036,7 +3257,7 @@ declare module webdriver { * @return {!webdriver.promise.Promise} A promise that will be resolved when the * implicit wait timeout has been set. */ - implicitlyWait(ms: number): webdriver.promise.Promise; + implicitlyWait(ms: number): webdriver.promise.Promise; /** * Sets the amount of time to wait, in milliseconds, for an asynchronous script @@ -2047,7 +3268,7 @@ declare module webdriver { * @return {!webdriver.promise.Promise} A promise that will be resolved when the * script timeout has been set. */ - setScriptTimeout(ms: number): webdriver.promise.Promise; + setScriptTimeout(ms: number): webdriver.promise.Promise; /** * Sets the amount of time to wait for a page load to complete before returning @@ -2056,7 +3277,7 @@ declare module webdriver { * @return {!webdriver.promise.Promise} A promise that will be resolved when * the timeout has been set. */ - pageLoadTimeout(ms: number): webdriver.promise.Promise; + pageLoadTimeout(ms: number): webdriver.promise.Promise; //endregion } @@ -2064,7 +3285,7 @@ declare module webdriver { /** * An interface for managing the current window. */ - class WebDriverWindow { + interface WebDriverWindow { //region Constructors @@ -2072,7 +3293,7 @@ declare module webdriver { * @param {!webdriver.WebDriver} driver The parent driver. * @constructor */ - constructor(driver: webdriver.WebDriver); + new (driver: WebDriver): WebDriverWindow; //endregion @@ -2084,7 +3305,7 @@ declare module webdriver { * @return {!webdriver.promise.Promise} A promise that will be resolved with the * window's position in the form of a {x:number, y:number} object literal. */ - getPosition(): webdriver.promise.Promise; + getPosition(): webdriver.promise.Promise; /** * Repositions the current window. @@ -2095,7 +3316,7 @@ declare module webdriver { * @return {!webdriver.promise.Promise} A promise that will be resolved when the * command has completed. */ - setPosition(x: number, y: number): webdriver.promise.Promise; + setPosition(x: number, y: number): webdriver.promise.Promise; /** * Retrieves the window's current size. @@ -2103,7 +3324,7 @@ declare module webdriver { * window's size in the form of a {width:number, height:number} object * literal. */ - getSize(): webdriver.promise.Promise; + getSize(): webdriver.promise.Promise; /** * Resizes the current window. @@ -2112,14 +3333,14 @@ declare module webdriver { * @return {!webdriver.promise.Promise} A promise that will be resolved when the * command has completed. */ - setSize(width: number, height: number): webdriver.promise.Promise; + setSize(width: number, height: number): webdriver.promise.Promise; /** * Maximizes the current window. * @return {!webdriver.promise.Promise} A promise that will be resolved when the * command has completed. */ - maximize(): webdriver.promise.Promise; + maximize(): webdriver.promise.Promise; //endregion } @@ -2127,7 +3348,7 @@ declare module webdriver { /** * Interface for managing WebDriver log records. */ - class WebDriverLogs { + interface WebDriverLogs { //region Constructors @@ -2135,7 +3356,7 @@ declare module webdriver { * @param {!webdriver.WebDriver} driver The parent driver. * @constructor */ - constructor(driver: webdriver.WebDriver); + new (driver: WebDriver): WebDriverLogs; //endregion @@ -2155,14 +3376,14 @@ declare module webdriver { * promise that will resolve to a list of log entries for the specified * type. */ - get(type: string): webdriver.promise.Promise; + get(type: string): webdriver.promise.Promise; /** * Retrieves the log types available to this driver. * @return {!webdriver.promise.Promise.>} A * promise that will resolve to a list of available log types. */ - getAvailableLogTypes(): webdriver.promise.Promise; + getAvailableLogTypes(): webdriver.promise.Promise; //endregion } @@ -2170,7 +3391,7 @@ declare module webdriver { /** * An interface for changing the focus of the driver to another frame or window. */ - class WebDriverTargetLocator { + interface WebDriverTargetLocator { //region Constructors @@ -2178,7 +3399,7 @@ declare module webdriver { * @param {!webdriver.WebDriver} driver The parent driver. * @constructor */ - constructor(driver: webdriver.WebDriver); + new (driver: WebDriver): WebDriverTargetLocator; //endregion @@ -2190,7 +3411,7 @@ declare module webdriver { * available. * @return {!webdriver.WebElement} The active element. */ - activeElement(): webdriver.WebElement; + activeElement(): WebElementPromise; /** * Schedules a command to switch focus of all future commands to the first frame @@ -2198,7 +3419,7 @@ declare module webdriver { * @return {!webdriver.promise.Promise} A promise that will be resolved when the * driver has changed focus to the default content. */ - defaultContent(): webdriver.promise.Promise; + defaultContent(): webdriver.promise.Promise; /** * Schedules a command to switch the focus of all future commands to another @@ -2218,8 +3439,8 @@ declare module webdriver { * @return {!webdriver.promise.Promise} A promise that will be resolved when the * driver has changed focus to the specified frame. */ - frame(nameOrIndex: string): webdriver.promise.Promise; - frame(nameOrIndex: number): webdriver.promise.Promise; + frame(nameOrIndex: string): webdriver.promise.Promise; + frame(nameOrIndex: number): webdriver.promise.Promise; /** * Schedules a command to switch the focus of all future commands to another @@ -2233,7 +3454,7 @@ declare module webdriver { * @return {!webdriver.promise.Promise} A promise that will be resolved when the * driver has changed focus to the specified window. */ - window(nameOrHandle: string): webdriver.promise.Promise; + window(nameOrHandle: string): webdriver.promise.Promise; /** * Schedules a command to change focus to the active alert dialog. This command @@ -2241,7 +3462,7 @@ declare module webdriver { * dialog is not currently open. * @return {!webdriver.Alert} The open alert. */ - alert(): webdriver.Alert; + alert(): AlertPromise; //endregion } @@ -2277,8 +3498,8 @@ declare module webdriver { * schedule commands through. Defaults to the active flow object. * @constructor */ - constructor(session: webdriver.Session, executor: webdriver.CommandExecutor, opt_flow?: webdriver.promise.ControlFlow); - constructor(session: webdriver.promise.Promise, executor: webdriver.CommandExecutor, opt_flow?: webdriver.promise.ControlFlow); + constructor(session: Session, executor: CommandExecutor, opt_flow?: webdriver.promise.ControlFlow); + constructor(session: webdriver.promise.Promise, executor: CommandExecutor, opt_flow?: webdriver.promise.ControlFlow); //endregion @@ -2300,9 +3521,12 @@ declare module webdriver { * @param {!webdriver.CommandExecutor} executor Command executor to use when * querying for session details. * @param {string} sessionId ID of the session to attach to. + * @param {webdriver.promise.ControlFlow=} opt_flow The control flow all driver + * commands should execute under. Defaults to the + * {@link webdriver.promise.controlFlow() currently active} control flow. * @return {!webdriver.WebDriver} A new client for the specified session. */ - static attachToSession(executor: webdriver.CommandExecutor, sessionId: string): WebDriver; + static attachToSession(executor: CommandExecutor, sessionId: string, opt_flow?: webdriver.promise.ControlFlow): WebDriver; /** * Creates a new WebDriver session. @@ -2310,9 +3534,13 @@ declare module webdriver { * session with. * @param {!webdriver.Capabilities} desiredCapabilities The desired * capabilities for the new session. + * @param {webdriver.promise.ControlFlow=} opt_flow The control flow all driver + * commands should execute under, including the initial session creation. + * Defaults to the {@link webdriver.promise.controlFlow() currently active} + * control flow. * @return {!webdriver.WebDriver} The driver for the newly created session. */ - static createSession(executor: webdriver.CommandExecutor, desiredCapabilities: webdriver.Capabilities): WebDriver; + static createSession(executor: CommandExecutor, desiredCapabilities: Capabilities, opt_flow?: webdriver.promise.ControlFlow): WebDriver; //endregion @@ -2332,18 +3560,18 @@ declare module webdriver { * @return {!webdriver.promise.Promise} A promise that will be resolved with * the command result. */ - schedule(command: webdriver.Command, description: string): webdriver.promise.Promise; + schedule(command: Command, description: string): webdriver.promise.Promise; /** * @return {!webdriver.promise.Promise} A promise for this client's session. */ - getSession(): webdriver.promise.Promise; + getSession(): webdriver.promise.Promise; /** * @return {!webdriver.promise.Promise} A promise that will resolve with the * this instance's capabilities. */ - getCapabilities(): webdriver.promise.Promise; + getCapabilities(): webdriver.promise.Promise; /** * Schedules a command to quit the current session. After calling quit, this @@ -2352,7 +3580,7 @@ declare module webdriver { * @return {!webdriver.promise.Promise} A promise that will be resolved when * the command has completed. */ - quit(): webdriver.promise.Promise; + quit(): webdriver.promise.Promise; /** * Creates a new action sequence using this driver. The sequence will not be @@ -2367,7 +3595,7 @@ declare module webdriver { * * @return {!webdriver.ActionSequence} A new action sequence for this instance. */ - actions(): webdriver.ActionSequence; + actions(): ActionSequence; /** * Schedules a command to execute JavaScript in the context of the currently @@ -2406,8 +3634,8 @@ declare module webdriver { * @return {!webdriver.promise.Promise} A promise that will resolve to the * scripts return value. */ - executeScript(script: string, ...var_args: any[]): webdriver.promise.Promise; - executeScript(script: any, ...var_args: any[]): webdriver.promise.Promise; + executeScript(script: string, ...var_args: any[]): webdriver.promise.Promise; + executeScript(script: Function, ...var_args: any[]): webdriver.promise.Promise; /** * Schedules a command to execute asynchronous JavaScript in the context of the @@ -2488,8 +3716,8 @@ declare module webdriver { * @return {!webdriver.promise.Promise} A promise that will resolve to the * scripts return value. */ - executeAsyncScript(script: string, ...var_args: any[]): webdriver.promise.Promise; - executeAsyncScript(script: any, ...var_args: any[]): webdriver.promise.Promise; + executeAsyncScript(script: string, ...var_args: any[]): webdriver.promise.Promise; + executeAsyncScript(script: Function, ...var_args: any[]): webdriver.promise.Promise; /** * Schedules a command to execute a custom function. @@ -2499,21 +3727,31 @@ declare module webdriver { * @return {!webdriver.promise.Promise} A promise that will be resolved with the * function's result. */ - call(fn: any, opt_scope?: any, ...var_args: any[]): webdriver.promise.Promise; + call(fn: Function, opt_scope?: any, ...var_args: any[]): webdriver.promise.Promise; /** * Schedules a command to wait for a condition to hold, as defined by some * user supplied function. If any errors occur while evaluating the wait, they * will be allowed to propagate. - * @param {function():boolean|!webdriver.promise.Promise} fn The function to - * evaluate as a wait condition. + * + *

In the event a condition returns a {@link webdriver.promise.Promise}, the + * polling loop will wait for it to be resolved and use the resolved value for + * evaluating whether the condition has been satisfied. The resolution time for + * a promise is factored into whether a wait has timed out. + * + * @param {!(webdriver.until.Condition.| + * function(!webdriver.WebDriver): T)} condition Either a condition + * object, or a function to evaluate as a condition. * @param {number} timeout How long to wait for the condition to be true. * @param {string=} opt_message An optional message to use if the wait times * out. - * @return {!webdriver.promise.Promise} A promise that will be resolved when the - * wait condition has been satisfied. + * @return {!webdriver.promise.Promise.} A promise that will be fulfilled + * with the first truthy value returned by the condition function, or + * rejected if the condition times out. + * @template T */ - wait(fn: () => any, timeout: number, opt_message?: string): webdriver.promise.Promise; + wait(condition: webdriver.until.Condition, timeout: number, opt_message?: string): webdriver.promise.Promise; + wait(condition: (webdriver: WebDriver) => any, timeout: number, opt_message?: string): webdriver.promise.Promise; /** * Schedules a command to make the driver sleep for the given amount of time. @@ -2521,21 +3759,21 @@ declare module webdriver { * @return {!webdriver.promise.Promise} A promise that will be resolved when the * sleep has finished. */ - sleep(ms: number): webdriver.promise.Promise; + sleep(ms: number): webdriver.promise.Promise; /** * Schedules a command to retrieve they current window handle. * @return {!webdriver.promise.Promise} A promise that will be resolved with the * current window handle. */ - getWindowHandle(): webdriver.promise.Promise; + getWindowHandle(): webdriver.promise.Promise; /** * Schedules a command to retrieve the current list of available window handles. * @return {!webdriver.promise.Promise} A promise that will be resolved with an * array of window handles. */ - getAllWindowHandles(): webdriver.promise.Promise; + getAllWindowHandles(): webdriver.promise.Promise; /** * Schedules a command to retrieve the current page's source. The page source @@ -2545,14 +3783,14 @@ declare module webdriver { * @return {!webdriver.promise.Promise} A promise that will be resolved with the * current page source. */ - getPageSource(): webdriver.promise.Promise; + getPageSource(): webdriver.promise.Promise; /** * Schedules a command to close the current window. * @return {!webdriver.promise.Promise} A promise that will be resolved when * this command has completed. */ - close(): webdriver.promise.Promise; + close(): webdriver.promise.Promise; /** * Schedules a command to navigate to the given URL. @@ -2560,21 +3798,21 @@ declare module webdriver { * @return {!webdriver.promise.Promise} A promise that will be resolved when the * document has finished loading. */ - get(url: string): webdriver.promise.Promise; + get(url: string): webdriver.promise.Promise; /** * Schedules a command to retrieve the URL of the current page. * @return {!webdriver.promise.Promise} A promise that will be resolved with the * current URL. */ - getCurrentUrl(): webdriver.promise.Promise; + getCurrentUrl(): webdriver.promise.Promise; /** * Schedules a command to retrieve the current page's title. * @return {!webdriver.promise.Promise} A promise that will be resolved with the * current page's title. */ - getTitle(): webdriver.promise.Promise; + getTitle(): webdriver.promise.Promise; /** * Schedule a command to find an element on the page. If the element cannot be @@ -2612,8 +3850,8 @@ declare module webdriver { * commands against the located element. If the element is not found, the * element will be invalidated and all scheduled commands aborted. */ - findElement(locatorOrElement: webdriver.Locator, ...var_args: any[]): webdriver.WebElement; - findElement(locatorOrElement: any, ...var_args: any[]): webdriver.WebElement; + findElement(locatorOrElement: Locator, ...var_args: any[]): WebElementPromise; + findElement(locatorOrElement: any, ...var_args: any[]): WebElementPromise; /** * Schedules a command to test if an element is present on the page. @@ -2630,8 +3868,8 @@ declare module webdriver { * @return {!webdriver.promise.Promise} A promise that will resolve to whether * the element is present on the page. */ - isElementPresent(locatorOrElement: webdriver.Locator, ...var_args: any[]): webdriver.promise.Promise; - isElementPresent(locatorOrElement: any, ...var_args: any[]): webdriver.promise.Promise; + isElementPresent(locatorOrElement: Locator, ...var_args: any[]): webdriver.promise.Promise; + isElementPresent(locatorOrElement: any, ...var_args: any[]): webdriver.promise.Promise; /** * Schedule a command to search for multiple elements on the page. @@ -2643,8 +3881,8 @@ declare module webdriver { * @return {!webdriver.promise.Promise} A promise that will be resolved to an * array of the located {@link webdriver.WebElement}s. */ - findElements(locator: webdriver.Locator, ...var_args: any[]): webdriver.promise.Promise; - findElements(locator: any, ...var_args: any[]): webdriver.promise.Promise; + findElements(locator: Locator, ...var_args: any[]): webdriver.promise.Promise; + findElements(locator: any, ...var_args: any[]): webdriver.promise.Promise; /** * Schedule a command to take a screenshot. The driver makes a best effort to @@ -2659,166 +3897,66 @@ declare module webdriver { * @return {!webdriver.promise.Promise} A promise that will be resolved to the * screenshot as a base-64 encoded PNG. */ - takeScreenshot(): webdriver.promise.Promise; + takeScreenshot(): webdriver.promise.Promise; /** * @return {!webdriver.WebDriver.Options} The options interface for this * instance. */ - manage(): webdriver.WebDriverOptions; + manage(): WebDriverOptions; /** * @return {!webdriver.WebDriver.Navigation} The navigation interface for this * instance. */ - navigate(): webdriver.WebDriverNavigation; + navigate(): WebDriverNavigation; /** * @return {!webdriver.WebDriver.TargetLocator} The target locator interface for * this instance. */ - switchTo(): webdriver.WebDriverTargetLocator + switchTo(): WebDriverTargetLocator; //endregion } + interface IWebElementId { + ELEMENT: string; + } + /** * Represents a DOM element. WebElements can be found by searching from the * document root using a {@code webdriver.WebDriver} instance, or by searching * under another {@code webdriver.WebElement}: - * + *


      *   driver.get('http://www.google.com');
      *   var searchForm = driver.findElement(By.tagName('form'));
      *   var searchBox = searchForm.findElement(By.name('q'));
      *   searchBox.sendKeys('webdriver');
+     * 
* * The WebElement is implemented as a promise for compatibility with the promise * API. It will always resolve itself when its internal state has been fully * resolved and commands may be issued against the element. This can be used to * catch errors when an element cannot be located on the page: - * + *

      *   driver.findElement(By.id('not-there')).then(function(element) {
      *     alert('Found an element that was not expected to be there!');
      *   }, function(error) {
      *     alert('The element was not found, as expected');
      *   });
-     *
-     * @extends {webdriver.promise.Deferred}
+     * 
*/ - class WebElement extends webdriver.promise.Deferred { - //region Constructors - - /** - * @param {!webdriver.WebDriver} driver The parent WebDriver instance for this - * element. - * @param {!(string|webdriver.promise.Promise)} id Either the opaque ID for the - * underlying DOM element assigned by the server, or a promise that will - * resolve to that ID or another WebElement. - * @constructor - */ - constructor(driver: webdriver.WebDriver, id: webdriver.promise.Promise); - constructor(driver: webdriver.WebDriver, id: string); - - //endregion - - //region Static Properties - - /** - * The property key used in the wire protocol to indicate that a JSON object - * contains the ID of a WebElement. - * @type {string} - * @const - */ - static ELEMENT_KEY: string; - - //endregion + interface IWebElement { //region Methods - /** - * @return {!webdriver.WebDriver} The parent driver for this instance. - */ - getDriver(): webdriver.WebDriver; - - /** - * @return {!webdriver.promise.Promise} A promise that resolves to this - * element's JSON representation as defined by the WebDriver wire protocol. - * @see http://code.google.com/p/selenium/wiki/JsonWireProtocol - */ - toWireValue(): webdriver.promise.Promise; - - /** - * Schedule a command to find a descendant of this element. If the element - * cannot be found, a {@code bot.ErrorCode.NO_SUCH_ELEMENT} result will - * be returned by the driver. Unlike other commands, this error cannot be - * suppressed. In other words, scheduling a command to find an element doubles - * as an assert that the element is present on the page. To test whether an - * element is present on the page, use {@code #isElementPresent} instead. - *

- * The search criteria for find an element may either be a - * {@code webdriver.Locator} object, or a simple JSON object whose sole key - * is one of the accepted locator strategies, as defined by - * {@code webdriver.Locator.Strategy}. For example, the following two - * statements are equivalent: - *

-         * var e1 = element.findElement(By.id('foo'));
-         * var e2 = element.findElement({id:'foo'});
-         * 
- *

- * Note that JS locator searches cannot be restricted to a subtree. All such - * searches are delegated to this instance's parent WebDriver. - * - * @param {webdriver.Locator|Object.} locator The locator - * strategy to use when searching for the element. - * @param {...} var_args Arguments to pass to {@code WebDriver#executeScript} if - * using a JavaScript locator. Otherwise ignored. - * @return {webdriver.WebElement} A WebElement that can be used to issue - * commands against the located element. If the element is not found, the - * element will be invalidated and all scheduled commands aborted. - */ - findElement(locator: webdriver.Locator, ...var_args: any[]): WebElement; - findElement(locator: any, ...var_args: any[]): WebElement; - - /** - * Schedules a command to test if there is at least one descendant of this - * element that matches the given search criteria. - * - *

Note that JS locator searches cannot be restricted to a subtree of the - * DOM. All such searches are delegated to this instance's parent WebDriver. - * - * @param {webdriver.Locator|Object.} locator The locator - * strategy to use when searching for the element. - * @param {...} var_args Arguments to pass to {@code WebDriver#executeScript} if - * using a JavaScript locator. Otherwise ignored. - * @return {!webdriver.promise.Promise} A promise that will be resolved with - * whether an element could be located on the page. - */ - isElementPresent(locator: webdriver.Locator, ...var_args: any[]): webdriver.promise.Promise; - isElementPresent(locator: any, ...var_args: any[]): webdriver.promise.Promise; - - /** - * Schedules a command to find all of the descendants of this element that match - * the given search criteria. - *

- * Note that JS locator searches cannot be restricted to a subtree. All such - * searches are delegated to this instance's parent WebDriver. - * - * @param {webdriver.Locator|Object.} locator The locator - * strategy to use when searching for the elements. - * @param {...} var_args Arguments to pass to {@code WebDriver#executeScript} if - * using a JavaScript locator. Otherwise ignored. - * @return {!webdriver.promise.Promise} A promise that will be resolved with an - * array of located {@link webdriver.WebElement}s. - */ - findElements(locator: webdriver.Locator, ...var_args: any[]): webdriver.promise.Promise; - findElements(locator: any, ...var_args: any[]): webdriver.promise.Promise; - /** * Schedules a command to click on this element. * @return {!webdriver.promise.Promise} A promise that will be resolved when * the click command has completed. */ - click(): webdriver.promise.Promise; + click(): webdriver.promise.Promise; /** * Schedules a command to type a sequence on the DOM element represented by this @@ -2860,14 +3998,14 @@ declare module webdriver { * @return {!webdriver.promise.Promise} A promise that will be resolved when all * keys have been typed. */ - sendKeys(...var_args: string[]): webdriver.promise.Promise; + sendKeys(...var_args: string[]): webdriver.promise.Promise; /** * Schedules a command to query for the tag/node name of this element. * @return {!webdriver.promise.Promise} A promise that will be resolved with the * element's tag name. */ - getTagName(): webdriver.promise.Promise; + getTagName(): webdriver.promise.Promise; /** * Schedules a command to query for the computed style of the element @@ -2884,7 +4022,7 @@ declare module webdriver { * @return {!webdriver.promise.Promise} A promise that will be resolved with the * requested CSS value. */ - getCssValue(cssStyleProperty: string): webdriver.promise.Promise; + getCssValue(cssStyleProperty: string): webdriver.promise.Promise; /** * Schedules a command to query for the value of the given attribute of the @@ -2913,7 +4051,7 @@ declare module webdriver { * @return {!webdriver.promise.Promise} A promise that will be resolved with the * attribute's value. */ - getAttribute(attributeName: string): webdriver.promise.Promise; + getAttribute(attributeName: string): webdriver.promise.Promise; /** * Get the visible (i.e. not hidden by CSS) innerText of this element, including @@ -2921,7 +4059,7 @@ declare module webdriver { * @return {!webdriver.promise.Promise} A promise that will be resolved with the * element's visible text. */ - getText(): webdriver.promise.Promise; + getText(): webdriver.promise.Promise; /** * Schedules a command to compute the size of this element's bounding box, in @@ -2929,14 +4067,14 @@ declare module webdriver { * @return {!webdriver.promise.Promise} A promise that will be resolved with the * element's size as a {@code {width:number, height:number}} object. */ - getSize(): webdriver.promise.Promise; + getSize(): webdriver.promise.Promise; /** * Schedules a command to compute the location of this element in page space. * @return {!webdriver.promise.Promise} A promise that will be resolved to the * element's location as a {@code {x:number, y:number}} object. */ - getLocation(): webdriver.promise.Promise; + getLocation(): webdriver.promise.Promise; /** * Schedules a command to query whether the DOM element represented by this @@ -2944,14 +4082,14 @@ declare module webdriver { * @return {!webdriver.promise.Promise} A promise that will be resolved with * whether this element is currently enabled. */ - isEnabled(): webdriver.promise.Promise; + isEnabled(): webdriver.promise.Promise; /** * Schedules a command to query whether this element is selected. * @return {!webdriver.promise.Promise} A promise that will be resolved with * whether this element is currently selected. */ - isSelected(): webdriver.promise.Promise; + isSelected(): webdriver.promise.Promise; /** * Schedules a command to submit the form containing this element (or this @@ -2960,7 +4098,7 @@ declare module webdriver { * @return {!webdriver.promise.Promise} A promise that will be resolved when * the form has been submitted. */ - submit(): webdriver.promise.Promise; + submit(): webdriver.promise.Promise; /** * Schedules a command to clear the {@code value} of this element. This command @@ -2969,28 +4107,397 @@ declare module webdriver { * @return {!webdriver.promise.Promise} A promise that will be resolved when * the element has been cleared. */ - clear(): webdriver.promise.Promise; + clear(): webdriver.promise.Promise; /** * Schedules a command to test whether this element is currently displayed. * @return {!webdriver.promise.Promise} A promise that will be resolved with * whether this element is currently visible on the page. */ - isDisplayed(): webdriver.promise.Promise; + isDisplayed(): webdriver.promise.Promise; /** * Schedules a command to retrieve the outer HTML of this element. * @return {!webdriver.promise.Promise} A promise that will be resolved with * the element's outer HTML. */ - getOuterHtml(): webdriver.promise.Promise; + getOuterHtml(): webdriver.promise.Promise; + + /** + * @return {!webdriver.promise.Promise.} A promise + * that resolves to this element's JSON representation as defined by the + * WebDriver wire protocol. + * @see http://code.google.com/p/selenium/wiki/JsonWireProtocol + */ + getId(): webdriver.promise.Promise /** * Schedules a command to retrieve the inner HTML of this element. * @return {!webdriver.promise.Promise} A promise that will be resolved with the * element's inner HTML. */ - getInnerHtml(): webdriver.promise.Promise; + getInnerHtml(): webdriver.promise.Promise; + + //endregion + } + + interface IWebElementFinders { + /** + * Schedule a command to find a descendant of this element. If the element + * cannot be found, a {@code bot.ErrorCode.NO_SUCH_ELEMENT} result will + * be returned by the driver. Unlike other commands, this error cannot be + * suppressed. In other words, scheduling a command to find an element doubles + * as an assert that the element is present on the page. To test whether an + * element is present on the page, use {@code #isElementPresent} instead. + * + *

The search criteria for an element may be defined using one of the + * factories in the {@link webdriver.By} namespace, or as a short-hand + * {@link webdriver.By.Hash} object. For example, the following two statements + * are equivalent: + *

+         * var e1 = element.findElement(By.id('foo'));
+         * var e2 = element.findElement({id:'foo'});
+         * 
+ * + *

You may also provide a custom locator function, which takes as input + * this WebDriver instance and returns a {@link webdriver.WebElement}, or a + * promise that will resolve to a WebElement. For example, to find the first + * visible link on a page, you could write: + *

+         * var link = element.findElement(firstVisibleLink);
+         *
+         * function firstVisibleLink(element) {
+         *   var links = element.findElements(By.tagName('a'));
+         *   return webdriver.promise.filter(links, function(link) {
+         *     return links.isDisplayed();
+         *   }).then(function(visibleLinks) {
+         *     return visibleLinks[0];
+         *   });
+         * }
+         * 
+ * + * @param {!(webdriver.Locator|webdriver.By.Hash|Function)} locator The + * locator strategy to use when searching for the element. + * @return {!webdriver.WebElement} A WebElement that can be used to issue + * commands against the located element. If the element is not found, the + * element will be invalidated and all scheduled commands aborted. + */ + findElement(locator: Locator): WebElementPromise; + findElement(locator: any): WebElementPromise; + + /** + * Schedules a command to test if there is at least one descendant of this + * element that matches the given search criteria. + * + * @param {!(webdriver.Locator|webdriver.By.Hash|Function)} locator The + * locator strategy to use when searching for the element. + * @return {!webdriver.promise.Promise.} A promise that will be + * resolved with whether an element could be located on the page. + */ + isElementPresent(locator: Locator): webdriver.promise.Promise; + isElementPresent(locator: any): webdriver.promise.Promise; + + /** + * Schedules a command to find all of the descendants of this element that + * match the given search criteria. + * + * @param {!(webdriver.Locator|webdriver.By.Hash|Function)} locator The + * locator strategy to use when searching for the elements. + * @return {!webdriver.promise.Promise.>} A + * promise that will resolve to an array of WebElements. + */ + findElements(locator: Locator): webdriver.promise.Promise; + findElements(locator: any): webdriver.promise.Promise; + } + + class WebElement implements IWebElement, IWebElementFinders { + //region Constructors + + /** + * @param {!webdriver.WebDriver} driver The parent WebDriver instance for this + * element. + * @param {!(webdriver.promise.Promise.| + * webdriver.WebElement.Id)} id The server-assigned opaque ID for the + * underlying DOM element. + * @constructor + */ + constructor(driver: WebDriver, id: webdriver.promise.Promise); + constructor(driver: WebDriver, id: IWebElementId); + + //endregion + + //region Static Properties + + /** + * The property key used in the wire protocol to indicate that a JSON object + * contains the ID of a WebElement. + * @type {string} + * @const + */ + static ELEMENT_KEY: string; + + //endregion + + //region Methods + + /** + * @return {!webdriver.WebDriver} The parent driver for this instance. + */ + getDriver(): WebDriver; + + /** + * Schedule a command to find a descendant of this element. If the element + * cannot be found, a {@code bot.ErrorCode.NO_SUCH_ELEMENT} result will + * be returned by the driver. Unlike other commands, this error cannot be + * suppressed. In other words, scheduling a command to find an element doubles + * as an assert that the element is present on the page. To test whether an + * element is present on the page, use {@code #isElementPresent} instead. + * + *

The search criteria for an element may be defined using one of the + * factories in the {@link webdriver.By} namespace, or as a short-hand + * {@link webdriver.By.Hash} object. For example, the following two statements + * are equivalent: + *

+         * var e1 = element.findElement(By.id('foo'));
+         * var e2 = element.findElement({id:'foo'});
+         * 
+ * + *

You may also provide a custom locator function, which takes as input + * this WebDriver instance and returns a {@link webdriver.WebElement}, or a + * promise that will resolve to a WebElement. For example, to find the first + * visible link on a page, you could write: + *

+         * var link = element.findElement(firstVisibleLink);
+         *
+         * function firstVisibleLink(element) {
+         *   var links = element.findElements(By.tagName('a'));
+         *   return webdriver.promise.filter(links, function(link) {
+         *     return links.isDisplayed();
+         *   }).then(function(visibleLinks) {
+         *     return visibleLinks[0];
+         *   });
+         * }
+         * 
+ * + * @param {!(webdriver.Locator|webdriver.By.Hash|Function)} locator The + * locator strategy to use when searching for the element. + * @return {!webdriver.WebElement} A WebElement that can be used to issue + * commands against the located element. If the element is not found, the + * element will be invalidated and all scheduled commands aborted. + */ + findElement(locator: Locator): WebElementPromise; + findElement(locator: any): WebElementPromise; + + /** + * Schedules a command to test if there is at least one descendant of this + * element that matches the given search criteria. + * + * @param {!(webdriver.Locator|webdriver.By.Hash|Function)} locator The + * locator strategy to use when searching for the element. + * @return {!webdriver.promise.Promise.} A promise that will be + * resolved with whether an element could be located on the page. + */ + isElementPresent(locator: Locator): webdriver.promise.Promise; + isElementPresent(locator: any): webdriver.promise.Promise; + + /** + * Schedules a command to find all of the descendants of this element that + * match the given search criteria. + * + * @param {!(webdriver.Locator|webdriver.By.Hash|Function)} locator The + * locator strategy to use when searching for the elements. + * @return {!webdriver.promise.Promise.>} A + * promise that will resolve to an array of WebElements. + */ + findElements(locator: Locator): webdriver.promise.Promise; + findElements(locator: any): webdriver.promise.Promise; + + /** + * Schedules a command to click on this element. + * @return {!webdriver.promise.Promise} A promise that will be resolved when + * the click command has completed. + */ + click(): webdriver.promise.Promise; + + /** + * Schedules a command to type a sequence on the DOM element represented by this + * instance. + *

+ * Modifier keys (SHIFT, CONTROL, ALT, META) are stateful; once a modifier is + * processed in the keysequence, that key state is toggled until one of the + * following occurs: + *

    + *
  • The modifier key is encountered again in the sequence. At this point the + * state of the key is toggled (along with the appropriate keyup/down events). + *
  • + *
  • The {@code webdriver.Key.NULL} key is encountered in the sequence. When + * this key is encountered, all modifier keys current in the down state are + * released (with accompanying keyup events). The NULL key can be used to + * simulate common keyboard shortcuts: + * + * element.sendKeys("text was", + * webdriver.Key.CONTROL, "a", webdriver.Key.NULL, + * "now text is"); + * // Alternatively: + * element.sendKeys("text was", + * webdriver.Key.chord(webdriver.Key.CONTROL, "a"), + * "now text is"); + *
  • + *
  • The end of the keysequence is encountered. When there are no more keys + * to type, all depressed modifier keys are released (with accompanying keyup + * events). + *
  • + *
+ * Note: On browsers where native keyboard events are not yet + * supported (e.g. Firefox on OS X), key events will be synthesized. Special + * punctionation keys will be synthesized according to a standard QWERTY en-us + * keyboard layout. + * + * @param {...string} var_args The sequence of keys to + * type. All arguments will be joined into a single sequence (var_args is + * permitted for convenience). + * @return {!webdriver.promise.Promise} A promise that will be resolved when all + * keys have been typed. + */ + sendKeys(...var_args: string[]): webdriver.promise.Promise; + + /** + * Schedules a command to query for the tag/node name of this element. + * @return {!webdriver.promise.Promise} A promise that will be resolved with the + * element's tag name. + */ + getTagName(): webdriver.promise.Promise; + + /** + * Schedules a command to query for the computed style of the element + * represented by this instance. If the element inherits the named style from + * its parent, the parent will be queried for its value. Where possible, color + * values will be converted to their hex representation (e.g. #00ff00 instead of + * rgb(0, 255, 0)). + *

+ * Warning: the value returned will be as the browser interprets it, so + * it may be tricky to form a proper assertion. + * + * @param {string} cssStyleProperty The name of the CSS style property to look + * up. + * @return {!webdriver.promise.Promise} A promise that will be resolved with the + * requested CSS value. + */ + getCssValue(cssStyleProperty: string): webdriver.promise.Promise; + + /** + * Schedules a command to query for the value of the given attribute of the + * element. Will return the current value even if it has been modified after the + * page has been loaded. More exactly, this method will return the value of the + * given attribute, unless that attribute is not present, in which case the + * value of the property with the same name is returned. If neither value is + * set, null is returned. The "style" attribute is converted as best can be to a + * text representation with a trailing semi-colon. The following are deemed to + * be "boolean" attributes and will be returned as thus: + * + *

async, autofocus, autoplay, checked, compact, complete, controls, declare, + * defaultchecked, defaultselected, defer, disabled, draggable, ended, + * formnovalidate, hidden, indeterminate, iscontenteditable, ismap, itemscope, + * loop, multiple, muted, nohref, noresize, noshade, novalidate, nowrap, open, + * paused, pubdate, readonly, required, reversed, scoped, seamless, seeking, + * selected, spellcheck, truespeed, willvalidate + * + *

Finally, the following commonly mis-capitalized attribute/property names + * are evaluated as expected: + *

    + *
  • "class" + *
  • "readonly" + *
+ * @param {string} attributeName The name of the attribute to query. + * @return {!webdriver.promise.Promise} A promise that will be resolved with the + * attribute's value. + */ + getAttribute(attributeName: string): webdriver.promise.Promise; + + /** + * Get the visible (i.e. not hidden by CSS) innerText of this element, including + * sub-elements, without any leading or trailing whitespace. + * @return {!webdriver.promise.Promise} A promise that will be resolved with the + * element's visible text. + */ + getText(): webdriver.promise.Promise; + + /** + * Schedules a command to compute the size of this element's bounding box, in + * pixels. + * @return {!webdriver.promise.Promise} A promise that will be resolved with the + * element's size as a {@code {width:number, height:number}} object. + */ + getSize(): webdriver.promise.Promise; + + /** + * Schedules a command to compute the location of this element in page space. + * @return {!webdriver.promise.Promise} A promise that will be resolved to the + * element's location as a {@code {x:number, y:number}} object. + */ + getLocation(): webdriver.promise.Promise; + + /** + * Schedules a command to query whether the DOM element represented by this + * instance is enabled, as dicted by the {@code disabled} attribute. + * @return {!webdriver.promise.Promise} A promise that will be resolved with + * whether this element is currently enabled. + */ + isEnabled(): webdriver.promise.Promise; + + /** + * Schedules a command to query whether this element is selected. + * @return {!webdriver.promise.Promise} A promise that will be resolved with + * whether this element is currently selected. + */ + isSelected(): webdriver.promise.Promise; + + /** + * Schedules a command to submit the form containing this element (or this + * element if it is a FORM element). This command is a no-op if the element is + * not contained in a form. + * @return {!webdriver.promise.Promise} A promise that will be resolved when + * the form has been submitted. + */ + submit(): webdriver.promise.Promise; + + /** + * Schedules a command to clear the {@code value} of this element. This command + * has no effect if the underlying DOM element is neither a text INPUT element + * nor a TEXTAREA element. + * @return {!webdriver.promise.Promise} A promise that will be resolved when + * the element has been cleared. + */ + clear(): webdriver.promise.Promise; + + /** + * Schedules a command to test whether this element is currently displayed. + * @return {!webdriver.promise.Promise} A promise that will be resolved with + * whether this element is currently visible on the page. + */ + isDisplayed(): webdriver.promise.Promise; + + /** + * Schedules a command to retrieve the outer HTML of this element. + * @return {!webdriver.promise.Promise} A promise that will be resolved with + * the element's outer HTML. + */ + getOuterHtml(): webdriver.promise.Promise; + + /** + * @return {!webdriver.promise.Promise.} A promise + * that resolves to this element's JSON representation as defined by the + * WebDriver wire protocol. + * @see http://code.google.com/p/selenium/wiki/JsonWireProtocol + */ + getId(): webdriver.promise.Promise; + + /** + * Schedules a command to retrieve the inner HTML of this element. + * @return {!webdriver.promise.Promise} A promise that will be resolved with the + * element's inner HTML. + */ + getInnerHtml(): webdriver.promise.Promise; //endregion @@ -3003,24 +4510,141 @@ declare module webdriver { * @return {!webdriver.promise.Promise} A promise that will be resolved to * whether the two WebElements are equal. */ - static equals(a: WebElement, b: WebElement): webdriver.promise.Promise; + static equals(a: WebElement, b: WebElement): webdriver.promise.Promise; //endregion } + /** + * WebElementPromise is a promise that will be fulfilled with a WebElement. + * This serves as a forward proxy on WebElement, allowing calls to be + * scheduled without directly on this instance before the underlying + * WebElement has been fulfilled. In other words, the following two statements + * are equivalent: + *

+     *     driver.findElement({id: 'my-button'}).click();
+     *     driver.findElement({id: 'my-button'}).then(function(el) {
+     *       return el.click();
+     *     });
+     * 
+ * + * @param {!webdriver.WebDriver} driver The parent WebDriver instance for this + * element. + * @param {!webdriver.promise.Promise.} el A promise + * that will resolve to the promised element. + * @constructor + * @extends {webdriver.WebElement} + * @implements {webdriver.promise.Thenable.} + * @final + */ + class WebElementPromise extends WebElement implements webdriver.promise.IThenable { + /** + * Cancels the computation of this promise's value, rejecting the promise in the + * process. This method is a no-op if the promise has alreayd been resolved. + * + * @param {string=} opt_reason The reason this promise is being cancelled. + */ + cancel(opt_reason?: string): void; + + + /** @return {boolean} Whether this promise's value is still being computed. */ + isPending(): boolean; + + + /** + * Registers listeners for when this instance is resolved. + * + * @param {?(function(T): (R|webdriver.promise.Promise.))=} opt_callback The + * function to call if this promise is successfully resolved. The function + * should expect a single argument: the promise's resolved value. + * @param {?(function(*): (R|webdriver.promise.Promise.))=} opt_errback The + * function to call if this promise is rejected. The function should expect + * a single argument: the rejection reason. + * @return {!webdriver.promise.Promise.} A new promise which will be + * resolved with the result of the invoked callback. + * @template R + */ + then(opt_callback?: (value: WebElement) => any, opt_errback?: (error: any) => any): webdriver.promise.Promise; + + + /** + * Registers a listener for when this promise is rejected. This is synonymous + * with the {@code catch} clause in a synchronous API: + *

+         *   // Synchronous API:
+         *   try {
+         *     doSynchronousWork();
+         *   } catch (ex) {
+         *     console.error(ex);
+         *   }
+         *
+         *   // Asynchronous promise API:
+         *   doAsynchronousWork().thenCatch(function(ex) {
+         *     console.error(ex);
+         *   });
+         * 
+ * + * @param {function(*): (R|webdriver.promise.Promise.)} errback The function + * to call if this promise is rejected. The function should expect a single + * argument: the rejection reason. + * @return {!webdriver.promise.Promise.} A new promise which will be + * resolved with the result of the invoked callback. + * @template R + */ + thenCatch(errback: (error: any) => any): webdriver.promise.Promise; + + + /** + * Registers a listener to invoke when this promise is resolved, regardless + * of whether the promise's value was successfully computed. This function + * is synonymous with the {@code finally} clause in a synchronous API: + *

+         *   // Synchronous API:
+         *   try {
+         *     doSynchronousWork();
+         *   } finally {
+         *     cleanUp();
+         *   }
+         *
+         *   // Asynchronous promise API:
+         *   doAsynchronousWork().thenFinally(cleanUp);
+         * 
+ * + * Note: similar to the {@code finally} clause, if the registered + * callback returns a rejected promise or throws an error, it will silently + * replace the rejection error (if any) from this promise: + *

+         *   try {
+         *     throw Error('one');
+         *   } finally {
+         *     throw Error('two');  // Hides Error: one
+         *   }
+         *
+         *   webdriver.promise.rejected(Error('one'))
+         *       .thenFinally(function() {
+         *         throw Error('two');  // Hides Error: one
+         *       });
+         * 
+ * + * + * @param {function(): (R|webdriver.promise.Promise.)} callback The function + * to call when this promise is resolved. + * @return {!webdriver.promise.Promise.} A promise that will be fulfilled + * with the callback result. + * @template R + */ + thenFinally(callback: () => any): webdriver.promise.Promise; + } + interface ILocatorStrategy { className(value: string): Locator; - 'class name'(value: string): Locator; css(value: string): Locator; id(value: string): Locator; - js(value: string): Locator; + js(script: any, ...var_args: any[]): (WebDriver: webdriver.WebDriver) => webdriver.promise.Promise; linkText(value: string): Locator; - 'link text'(value: string): Locator; name(value: string): Locator; partialLinkText(value: string): Locator; - 'partial link text'(value: string): Locator; tagName(value: string): Locator; - 'tag name'(value: string): Locator; xpath(value: string): Locator; } @@ -3029,19 +4653,7 @@ declare module webdriver { /** * An element locator. */ - class Locator { - - //region Constructors - - /** - * An element locator. - * @param {string} using The type of strategy to use for this locator. - * @param {string} value The search target of this locator. - * @constructor - */ - constructor(using: string, value: string); - - //endregion + interface Locator { //region Properties @@ -3059,45 +4671,12 @@ declare module webdriver { //endregion - //region Static Properties - - /** - * Factory methods for the supported locator strategies. - * @type {Object.} - */ - static Strategy: ILocatorStrategy; - - //endregion - //region Methods /** @return {string} String representation of this locator. */ toString(): string; //endregion - - //region Static Methods - - /** - * Creates a new Locator from an object whose only property is also a key in - * the {@code webdriver.Locator.Strategy} map. - * @param {Object.} obj The object to convert into a locator. - * @return {webdriver.Locator} The new locator object. - */ - static createFromObj(obj: any): Locator - - /** - * Verifies that a {@code locator} is a valid locator to use for searching for - * elements on the page. - * @param {webdriver.Locator|Object.} locator The locator - * to verify, or a short-hand object that can be converted into a locator - * to verify. - * @return {!webdriver.Locator} The validated locator. - */ - static checkLocator(locator: Locator): Locator; - static checkLocator(obj: any): Locator; - - //endregion } /** @@ -3113,7 +4692,7 @@ declare module webdriver { * capabilities. * @constructor */ - constructor(id: string, capabilities: webdriver.Capabilities); + constructor(id: string, capabilities: Capabilities); constructor(id: string, capabilities: any); //endregion @@ -3128,7 +4707,7 @@ declare module webdriver { /** * @return {!webdriver.Capabilities} This session's capabilities. */ - getCapabilities(): webdriver.Capabilities; + getCapabilities(): Capabilities; /** * Retrieves the value of a specific capability. @@ -3148,12 +4727,7 @@ declare module webdriver { } } -declare module 'selenium-webdriver' { - export = webdriver; -} - -declare module 'selenium-webdriver/testing' { - +declare module testing { /** * Registers a new test suite. * @param name The suite name. @@ -3215,11 +4789,22 @@ declare module 'selenium-webdriver/testing' { function xit(name: string, fn: Function): void; } -declare module 'selenium-webdriver/executors' { - /** - * Creates a command executor that uses WebDriver's JSON wire protocol. - * @param url The server's URL, or a promise that will resolve to that URL. - * @returns {!webdriver.CommandExecutor} The new command executor. - */ - function createExecutor(url: any): webdriver.CommandExecutor; +declare module 'selenium-webdriver/chrome' { + export = chrome; } + +declare module 'selenium-webdriver/firefox' { + export = firefox; +} + +declare module 'selenium-webdriver/executors' { + export = executors; +} + +declare module 'selenium-webdriver' { + export = webdriver; +} + +declare module 'selenium-webdriver/testing' { + export = testing; +} \ No newline at end of file diff --git a/stripe/stripe.d.ts b/stripe/stripe.d.ts index f5c1b3ff0f..2d50056180 100644 --- a/stripe/stripe.d.ts +++ b/stripe/stripe.d.ts @@ -1,16 +1,16 @@ -// Type definitions for stripe +// Type definitions for stripe // Project: https://stripe.com/ // Definitions by: Eric J. Smith // Definitions: https://github.com/borisyankov/DefinitelyTyped interface StripeStatic { setPublishableKey(key: string); - createToken(data: StripeTokenData, responseHandler: (status: number, response: StripeTokenResponse) => void); validateCardNumber(cardNumber: string): boolean; validateExpiry(month: string, year: string): boolean; validateCVC(cardCVC: string): boolean; cardType(cardNumber: string): string; getToken(token: string, responseHandler: (status: number, response: StripeTokenResponse) => void); + card: StripeCardData; } interface StripeTokenData { @@ -57,6 +57,8 @@ interface StripeCardData { address_state?: string; address_zip?: string; address_country?: string; + + createToken(data: StripeTokenData, responseHandler: (status: number, response: StripeTokenResponse) => void); } -declare var Stripe: StripeStatic; \ No newline at end of file +declare var Stripe: StripeStatic; diff --git a/threejs/three-effectcomposer.d.ts b/threejs/three-effectcomposer.d.ts index 25ada71d5d..df10afab58 100644 --- a/threejs/three-effectcomposer.d.ts +++ b/threejs/three-effectcomposer.d.ts @@ -21,7 +21,7 @@ declare module THREE { swapBuffers(): void; addPass(pass: any): void; insertPass(pass: any, index: number): void; - render(delta: number): void; + render(delta?: number): void; reset(renderTarget?: WebGLRenderTarget): void; setSize( width: number, height: number ): void; } diff --git a/threejs/three.d.ts b/threejs/three.d.ts index 39d65da6ca..649b6e0af4 100644 --- a/threejs/three.d.ts +++ b/threejs/three.d.ts @@ -444,7 +444,7 @@ declare module THREE { attributesKeys: string[]; drawcalls: { start: number; count: number; index: number; }[]; offsets: { start: number; count: number; index: number; }[]; - boundingBox: BoundingBox3D; + boundingBox: Box3; boundingSphere: BoundingSphere; addAttribute(name: string, attribute: BufferAttribute): any; @@ -716,11 +716,6 @@ declare module THREE { normals: Vector3[]; } - export interface BoundingBox3D { - min: Vector3; - max: Vector3; - } - export interface BoundingSphere { radius: number; } @@ -825,7 +820,7 @@ declare module THREE { /** * Bounding box. */ - boundingBox: BoundingBox3D; + boundingBox: Box3; /** * Bounding sphere. @@ -3674,7 +3669,7 @@ declare module THREE { /** * Adds v to this vector. */ - add(a: Vector): Vector3; + add(a: Vector3): Vector3; addScalar(s: number): Vector3; /** @@ -5057,30 +5052,30 @@ declare module THREE { * An extensible curve object which contains methods for interpolation * class Curve<T extends Vector> */ - export class Curve { + export class Curve { /** * Returns a vector for point t of the curve where t is between 0 and 1 * getPoint(t: number): T; */ - getPoint(t: number): Vector; + getPoint(t: number): T; /** * Returns a vector for point at relative position in curve according to arc length * getPointAt(u: number): T; */ - getPointAt(u: number): Vector; + getPointAt(u: number):T; /** * Get sequence of points using getPoint( t ) * getPoints(divisions?: number): T[]; */ - getPoints(divisions?: number): Vector[]; + getPoints(divisions?: number): T[]; /** * Get sequence of equi-spaced points using getPointAt( u ) * getSpacedPoints(divisions?: number): T[]; */ - getSpacedPoints(divisions?: number): Vector[]; + getSpacedPoints(divisions?: number): T[]; /** * Get total curve arc length @@ -5106,13 +5101,13 @@ declare module THREE { * Returns a unit vector tangent at t. If the subclassed curve do not implement its tangent derivation, 2 points a small delta apart will be used to find its gradient which seems to give a reasonable approximation * getTangent(t: number): T; */ - getTangent(t: number): Vector; + getTangent(t: number): T; /** * Returns tangent at equidistance point u on the curve * getTangentAt(u: number): T; */ - getTangentAt(u: number): Vector; + getTangentAt(u: number): T; static Utils: { tangentQuadraticBezier(t: number, p0: number, p1: number, p2: number): number; @@ -5127,32 +5122,32 @@ declare module THREE { export interface BoundingBox { minX: number; minY: number; + minZ?: number; maxX: number; maxY: number; - centroid: Vector; + maxZ?: number; } - export class CurvePath extends Curve { + export class CurvePath extends Curve { constructor(); - curves: Curve[]; + curves: Curve[]; bends: Path[]; autoClose: boolean; - add(curve: Curve): void; + add(curve: Curve): void; checkConnection(): boolean; closePath(): void; - getPoint(t: number): Vector; getLength(): number; getCurveLengths(): number[]; getBoundingBox(): BoundingBox; createPointsGeometry(divisions: number): Geometry; createSpacedPointsGeometry(divisions: number): Geometry; - createGeometry(points: Vector2[]): Geometry; + createGeometry(points: T[]): Geometry; addWrapPath(bendpath: Path): void; - getTransformedPoints(segments: number, bends?: Path[]): Vector2[]; - getTransformedSpacedPoints(segments: number, bends?: Path[]): Vector2[]; - getWrapPoints(oldPts: Vector2[], path: Path): Vector2[]; + getTransformedPoints(segments: number, bends?: Path[]): T[]; + getTransformedSpacedPoints(segments: number, bends?: Path[]): T[]; + getWrapPoints(oldPts: T[], path: Path): T[]; } export class Gyroscope extends Object3D { @@ -5179,7 +5174,7 @@ declare module THREE { /** * a 2d path representation, comprising of points, lines, and cubes, similar to the html5 2d canvas api. It extends CurvePath. */ - export class Path extends CurvePath { + export class Path extends CurvePath { constructor(points?: Vector2[]); actions: PathAction[]; @@ -5228,36 +5223,29 @@ declare module THREE { constructor(aX: number, aY: number, aRadius: number, aStartAngle: number, aEndAngle: number, aClockwise: boolean ); } - export class ClosedSplineCurve3 extends Curve { + export class ClosedSplineCurve3 extends Curve { constructor( points?:Vector3[] ); points:Vector3[]; - - getPoint(t: number): Vector3; } - export class CubicBezierCurve extends Curve { + export class CubicBezierCurve extends Curve { constructor( v0: Vector2, v1: Vector2, v2: Vector2, v3: Vector2 ); v0: Vector2; v1: Vector2; v2: Vector2; v3: Vector2; - - getPoint(t: number): Vector2; - getTangent(t: number): Vector2; } - export class CubicBezierCurve3 extends Curve { + export class CubicBezierCurve3 extends Curve { constructor( v0: Vector3, v1: Vector3, v2: Vector3, v3: Vector3 ); v0: Vector3; v1: Vector3; v2: Vector3; v3: Vector3; - - getPoint(t: number): Vector3; } - export class EllipseCurve extends Curve { + export class EllipseCurve extends Curve { constructor( aX: number, aY: number, xRadius: number, yRadius: number, aStartAngle: number, aEndAngle: number, aClockwise: boolean ); aX: number; @@ -5267,59 +5255,43 @@ declare module THREE { aStartAngle: number; aEndAngle: number; aClockwise: boolean; - - getPoint(t: number): Vector2; } - export class LineCurve extends Curve { + export class LineCurve extends Curve { constructor( v1: Vector2, v2: Vector2 ); v1: Vector2; v2: Vector2; - getPoint(t: number): Vector2; - getPointAt(u: number): Vector2; - getTangent(t: number): Vector2; } - export class LineCurve3 extends Curve { + export class LineCurve3 extends Curve { constructor( v1: Vector3, v2: Vector3 ); v1: Vector3; v2: Vector3; - - getPoint(t: number): Vector3; } - export class QuadraticBezierCurve extends Curve { + export class QuadraticBezierCurve extends Curve { constructor( v0: Vector2, v1: Vector2, v2: Vector2 ); v0: Vector2; v1: Vector2; v2: Vector2; - - getPoint(t: number): Vector2; - getTangent(t: number): Vector2; } - export class QuadraticBezierCurve3 extends Curve { + export class QuadraticBezierCurve3 extends Curve { constructor( v0: Vector3, v1: Vector3, v2: Vector3 ); v0: Vector3; v1: Vector3; v2: Vector3; - - getPoint(t: number): Vector3; } - export class SplineCurve extends Curve { + export class SplineCurve extends Curve { constructor( points?: Vector2[] ); points:Vector2[]; - - getPoint(t: number): Vector2; } - export class SplineCurve3 extends Curve { + export class SplineCurve3 extends Curve { constructor( points?: Vector3[] ); points:Vector3[]; - - getPoint(t: number): Vector3; } // Extras / Geomerties ///////////////////////////////////////////////////////////////////// diff --git a/when/when-tests.ts b/when/when-tests.ts index 35a97e01e8..d90ab69bd2 100644 --- a/when/when-tests.ts +++ b/when/when-tests.ts @@ -1,5 +1,9 @@ +/// /// +import fs = require('fs'); +import dns = require('dns'); + import when = require("when"); class ForeignPromise { @@ -12,6 +16,7 @@ class ForeignPromise { var promise: when.Promise; var foreign = new ForeignPromise(1); var error = new Error("boom!"); +var example: () => void; // TODO: with TypeScript 1.4 a lot of these functions should change to use PromiseOrValue // type PromiseOrValue = Promise | T; @@ -182,3 +187,151 @@ status = when(1).inspect() promise = when(1).with(2); promise = when(1).withThis(2); + +/* * * * * * * * * + * when/node * + * * * * * * * * */ + +import nodefn = require('when/node'); + +/* node.lift */ + +// TODO: Again it's not possible to represent the return type of node.lift without union types. + +var nodeFn0 = (callback: (err: any, result: number) => void) => callback(null, 0); +var nodeFn1 = (a: number, callback: (err: any, result: number) => void) => callback(null, a); +var nodeFn2 = (a: number, b: number, callback: (err: any, result: number) => void) => callback(null, a + b); +var nodeFn3 = (a: number, b: number, c: number, callback: (err: any, result: number) => void) => callback(null, a + b + c); + +var promiseFunc0: () => when.Promise = nodefn.lift(nodeFn0); +var promiseFunc1: (a: when.Promise) => when.Promise = nodefn.lift(nodeFn1); +var promiseFunc2: (a: when.Promise, b: when.Promise) => when.Promise = nodefn.lift(nodeFn2); +var promiseFunc3: (a: when.Promise, b: when.Promise, c: when.Promise) => when.Promise = nodefn.lift(nodeFn3); + +example = function() { + var resolveAddress = nodefn.lift(dns.resolve); + + when.join( + resolveAddress(when('twitter.com')), + resolveAddress(when('facebook.com')), + resolveAddress(when('google.com')) + ).then((addresses) => { + // All addresses resolved + }).catch((reason) => { + // At least one of the lookups failed + }); +} + +/* node.liftAll */ + +// Cannot be represented? + +example = function() { + // Lift the entire dns API + var promisedDns = nodefn.liftAll(dns); + + when.join( + promisedDns.resolve("twitter.com"), + promisedDns.resolveNs("facebook.com"), + promisedDns.resolveMx("google.com") + ).then((addresses) => { + // All addresses resolved + }).catch((reason) => { + // At least one of the lookups failed + }); +} + +example = function() { + // Lift all of the fs methods, but name them with an 'Async' suffix + var promisedFs = nodefn.liftAll(fs, (promisedFs: any, liftedFunc: Function, name: string) => { + promisedFs[name + 'Async'] = liftedFunc; + return promisedFs; + }); + + promisedFs.readFileAsync('file.txt').done(console.log.bind(console)); +} + +example = function() { + // Lift all of the fs methods, but name them with an 'Async' suffix + // and add them back onto fs! + var promisedFs = nodefn.liftAll(fs, (promisedFs: any, liftedFunc: Function, name: string) => { + promisedFs[name + 'Async'] = liftedFunc; + return promisedFs; + }, fs); + + if (promisedFs === fs) { + promisedFs.readFileAsync('file.txt').done(console.log.bind(console)); + } +} + +/* node.call */ + +promise = nodefn.call(nodeFn0); + +promise = nodefn.call(nodeFn1, 1); +promise = nodefn.call(nodeFn1, when(1)); + +promise = nodefn.call(nodeFn2, 1, 2); +promise = nodefn.call(nodeFn2, 1, when(2)); +promise = nodefn.call(nodeFn2, when(1), 2); +promise = nodefn.call(nodeFn2, when(1), when(2)); + +promise = nodefn.call(nodeFn3, 1, 2, 3); +promise = nodefn.call(nodeFn3, 1, when(2), 3); +promise = nodefn.call(nodeFn3, when(1), 2, 3); +promise = nodefn.call(nodeFn3, when(1), when(2), 3); +promise = nodefn.call(nodeFn3, 1, 2, when(3)); +promise = nodefn.call(nodeFn3, 1, when(2), when(3)); +promise = nodefn.call(nodeFn3, when(1), 2, when(3)); +promise = nodefn.call(nodeFn3, when(1), when(2), when(3)); + +example = function () { + var loadPasswd = nodefn.call(fs.readFile, '/etc/passwd'); + + loadPasswd.done( + (passwd: Buffer) => console.log('Contents of /etc/passwd:\n' + passwd), + (error: any) => console.log('Something wrong happened: ' + error)); +}; + +/* node.apply */ + +promise = nodefn.apply(nodeFn2, [1, 2]); + +example = function () { + var loadPasswd = nodefn.apply(fs.readFile, ['/etc/passwd']); + + loadPasswd.done( + (passwd: Buffer) => console.log('Contents of /etc/passwd:\n' + passwd), + (error: any) => console.log('Something wrong happened: ' + error)); +}; + +/* node.liftCallback */ + +example = function () { + var fetchData: (key: string) => when.Promise; + var handleData: (err: any, result: number) => void; + + var handlePromisedData: (result: when.Promise) => when.Promise; + handlePromisedData = nodefn.liftCallback(handleData); + + handlePromisedData(fetchData('thing')); +}; + +/* node.bindCallback */ + +example = function () { + var fetchData: (key: string) => when.Promise; + var handleData: (err: any, result: number) => void; + + nodefn.bindCallback(fetchData('thing'), handleData); +}; + +/* node.createCallback */ + +example = function () { + when.promise((resolve, reject) => + nodeFn2(1, 2, nodefn.createCallback({ resolve: resolve, reject: reject }))) + .then( + (value: number) => console.log(value), + (err: any) => console.error(err)); +}; diff --git a/when/when.d.ts b/when/when.d.ts index f22ae0116d..5db15b316b 100644 --- a/when/when.d.ts +++ b/when/when.d.ts @@ -163,3 +163,56 @@ declare module When { declare module "when" { export = When; } + +declare module "when/node" { + import when = require('when'); + + function lift(fn: (callback: (err: any, result: TResult) => void) => void): () => when.Promise; + function lift(fn: (arg1: TArg1, callback: (err: any, result: TResult) => void) => void): (arg1: when.Promise) => when.Promise; + function lift(fn: (arg1: TArg1, arg2: TArg2, callback: (err: any, result: TResult) => void) => void): (arg1: when.Promise, arg2: when.Promise) => when.Promise; + function lift(fn: (arg1: TArg1, arg2: TArg2, arg3: TArg3, callback: (err: any, result: TResult) => void) => void): (arg1: when.Promise, arg2: when.Promise, arg3: when.Promise) => when.Promise; + + + function liftAll(srcApi: any, transform?: (destApi: any, liftedFunc: Function, name: string) => any, destApi?: any): any; + + + function call(fn: (callback: (err: any, result: TResult) => void) => void): when.Promise; + + function call(fn: (arg1: TArg1, callback: (err: any, result: TResult) => void) => void, arg1: TArg1): when.Promise; + function call(fn: (arg1: TArg1, callback: (err: any, result: TResult) => void) => void, arg1: when.Promise): when.Promise; + + function call(fn: (arg1: TArg1, arg2: TArg2, callback: (err: any, result: TResult) => void) => void, arg1: TArg1, arg2: TArg2): when.Promise; + function call(fn: (arg1: TArg1, arg2: TArg2, callback: (err: any, result: TResult) => void) => void, arg1: when.Promise, arg2: TArg2): when.Promise; + function call(fn: (arg1: TArg1, arg2: TArg2, callback: (err: any, result: TResult) => void) => void, arg1: TArg1, arg2: when.Promise): when.Promise; + function call(fn: (arg1: TArg1, arg2: TArg2, callback: (err: any, result: TResult) => void) => void, arg1: when.Promise, arg2: when.Promise): when.Promise; + + function call(fn: (arg1: TArg1, arg2: TArg2, arg3: TArg3, callback: (err: any, result: TResult) => void) => void, arg1: TArg1, arg2: TArg2, arg3: TArg3): when.Promise; + function call(fn: (arg1: TArg1, arg2: TArg2, arg3: TArg3, callback: (err: any, result: TResult) => void) => void, arg1: TArg1, arg2: TArg2, arg3: when.Promise): when.Promise; + function call(fn: (arg1: TArg1, arg2: TArg2, arg3: TArg3, callback: (err: any, result: TResult) => void) => void, arg1: TArg1, arg2: when.Promise, arg3: TArg3): when.Promise; + function call(fn: (arg1: TArg1, arg2: TArg2, arg3: TArg3, callback: (err: any, result: TResult) => void) => void, arg1: TArg1, arg2: when.Promise, arg3: when.Promise): when.Promise; + function call(fn: (arg1: TArg1, arg2: TArg2, arg3: TArg3, callback: (err: any, result: TResult) => void) => void, arg1: when.Promise, arg2: TArg2, arg3: TArg3): when.Promise; + function call(fn: (arg1: TArg1, arg2: TArg2, arg3: TArg3, callback: (err: any, result: TResult) => void) => void, arg1: when.Promise, arg2: TArg2, arg3: when.Promise): when.Promise; + function call(fn: (arg1: TArg1, arg2: TArg2, arg3: TArg3, callback: (err: any, result: TResult) => void) => void, arg1: when.Promise, arg2: when.Promise, arg3: TArg3): when.Promise; + function call(fn: (arg1: TArg1, arg2: TArg2, arg3: TArg3, callback: (err: any, result: TResult) => void) => void, arg1: when.Promise, arg2: when.Promise, arg3: when.Promise): when.Promise; + + + function apply(fn: (callback: (err: any, result: TResult) => void) => void, args: any[]): when.Promise; + function apply(fn: (arg1: any, callback: (err: any, result: TResult) => void) => void, args: any[]): when.Promise; + function apply(fn: (arg1: any, arg2: any, callback: (err: any, result: TResult) => void) => void, args: any[]): when.Promise; + function apply(fn: (arg1: any, arg2: any, arg3: any, callback: (err: any, result: TResult) => void) => void, args: any[]): when.Promise; + + + function liftCallback(callback: (err: any, arg: TArg) => void): (value: when.Promise) => when.Promise; + + + function bindCallback(arg: when.Promise, callback: (err: any, arg: TArg) => void): when.Promise; + + + interface Resolver { + reject(reason: any): void; + resolve(value?: T): void; + resolve(value?: when.Promise): void; + } + + function createCallback(resolver: Resolver): (err: any, arg: TArg) => void; +}